@hydralms/components 0.2.0 → 0.3.1

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 (302) hide show
  1. package/dist/StudentProfile-BPsZBaJj.cjs +1 -0
  2. package/dist/StudentProfile-Cw2p-RZn.js +3273 -0
  3. package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
  4. package/dist/assessment-toolbar/timer-display.d.ts +1 -1
  5. package/dist/common/index.d.ts +2 -1
  6. package/dist/common/pagination.d.ts +26 -0
  7. package/dist/common/types.d.ts +1 -0
  8. package/dist/components.css +1 -1
  9. package/dist/content/audio-player.d.ts +22 -0
  10. package/dist/content/code-block.d.ts +30 -0
  11. package/dist/content/embed-block.d.ts +28 -0
  12. package/dist/content/index.d.ts +6 -0
  13. package/dist/content/types.d.ts +24 -0
  14. package/dist/curriculum/course-card.d.ts +51 -0
  15. package/dist/curriculum/index.d.ts +2 -0
  16. package/dist/curriculum/types.d.ts +2 -2
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +495 -439
  20. package/dist/license/HydraContext.d.ts +16 -0
  21. package/dist/license/ProBadge.d.ts +6 -0
  22. package/dist/license/index.d.ts +7 -0
  23. package/dist/license/tiers.d.ts +6 -0
  24. package/dist/license/useHydraLicense.d.ts +6 -0
  25. package/dist/license/validate.d.ts +13 -0
  26. package/dist/license/withProGate.d.ts +6 -0
  27. package/dist/modules/AssignmentModule/AssignmentModule.d.ts +4 -7
  28. package/dist/modules/AssignmentModule/types.d.ts +5 -1
  29. package/dist/modules/CertificateModule/CertificateModule.d.ts +4 -8
  30. package/dist/modules/CertificateModule/types.d.ts +6 -4
  31. package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
  32. package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
  33. package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
  34. package/dist/modules/DiscussionModule/DiscussionModule.d.ts +4 -7
  35. package/dist/modules/ExamModule/ExamModule.d.ts +4 -7
  36. package/dist/modules/ExamModule/types.d.ts +5 -14
  37. package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
  38. package/dist/modules/FlashcardLab/types.d.ts +2 -0
  39. package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +4 -8
  40. package/dist/modules/GradeCenterModule/types.d.ts +2 -0
  41. package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
  42. package/dist/modules/QuizModule/types.d.ts +5 -14
  43. package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
  44. package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
  45. package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
  46. package/dist/modules/StudentProfileModule/types.d.ts +43 -0
  47. package/dist/modules/SurveyModule/SurveyModule.d.ts +4 -6
  48. package/dist/modules/SurveyModule/types.d.ts +2 -0
  49. package/dist/modules/_shared/assessment-intro.d.ts +16 -0
  50. package/dist/modules/_shared/assessment-results.d.ts +23 -0
  51. package/dist/modules/_shared/types.d.ts +10 -0
  52. package/dist/modules/_shared/use-timer.d.ts +9 -0
  53. package/dist/modules/index.d.ts +6 -0
  54. package/dist/modules.cjs +1 -1
  55. package/dist/modules.js +1267 -854
  56. package/dist/progress/types.d.ts +2 -0
  57. package/dist/provider/HydraProvider.d.ts +5 -1
  58. package/dist/questions/choice.d.ts +1 -1
  59. package/dist/questions/confidence-indicator.d.ts +37 -0
  60. package/dist/questions/essay.d.ts +1 -1
  61. package/dist/questions/fill-in-the-blank.d.ts +1 -1
  62. package/dist/questions/hotspot.d.ts +1 -1
  63. package/dist/questions/index.d.ts +2 -0
  64. package/dist/questions/inline-choice.d.ts +1 -1
  65. package/dist/questions/matching.d.ts +1 -1
  66. package/dist/questions/multiple-choice.d.ts +1 -1
  67. package/dist/questions/numeric.d.ts +1 -1
  68. package/dist/questions/ordering.d.ts +1 -1
  69. package/dist/questions/question-renderer.d.ts +1 -1
  70. package/dist/questions/scenario.d.ts +1 -1
  71. package/dist/questions/spreadsheet.d.ts +1 -1
  72. package/dist/questions/true-false.d.ts +1 -1
  73. package/dist/sections/AdaptiveLearningPath/AdaptiveLearningPath.d.ts +5 -0
  74. package/dist/sections/AdaptiveLearningPath/path-connector.d.ts +8 -0
  75. package/dist/sections/AdaptiveLearningPath/path-milestone-marker.d.ts +7 -0
  76. package/dist/sections/AdaptiveLearningPath/path-node-card.d.ts +10 -0
  77. package/dist/sections/AdaptiveLearningPath/path-skill-bar.d.ts +8 -0
  78. package/dist/sections/AdaptiveLearningPath/types.d.ts +136 -0
  79. package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
  80. package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
  81. package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
  82. package/dist/sections/AssessmentReview/types.d.ts +6 -0
  83. package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
  84. package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
  85. package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
  86. package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
  87. package/dist/sections/CertificateViewer/types.d.ts +6 -0
  88. package/dist/sections/ContentAuthoringStudio/ContentAuthoringStudio.d.ts +5 -0
  89. package/dist/sections/ContentAuthoringStudio/block-editor-item.d.ts +14 -0
  90. package/dist/sections/ContentAuthoringStudio/block-type-picker.d.ts +12 -0
  91. package/dist/sections/ContentAuthoringStudio/types.d.ts +67 -0
  92. package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
  93. package/dist/sections/CourseCatalog/types.d.ts +80 -0
  94. package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
  95. package/dist/sections/CourseOutline/types.d.ts +6 -0
  96. package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
  97. package/dist/sections/DiscussionThread/types.d.ts +6 -0
  98. package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
  99. package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
  100. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  101. package/dist/sections/ExamSession/types.d.ts +6 -0
  102. package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
  103. package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
  104. package/dist/sections/ForumBoard/ForumBoard.d.ts +1 -1
  105. package/dist/sections/ForumBoard/types.d.ts +14 -0
  106. package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
  107. package/dist/sections/GradebookTable/types.d.ts +14 -0
  108. package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
  109. package/dist/sections/LecturePlayer/types.d.ts +8 -0
  110. package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
  111. package/dist/sections/LessonPage/types.d.ts +6 -0
  112. package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
  113. package/dist/sections/PracticeQuiz/types.d.ts +6 -0
  114. package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
  115. package/dist/sections/ProgressDashboard/types.d.ts +6 -0
  116. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  117. package/dist/sections/QuizSession/types.d.ts +6 -0
  118. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +1 -1
  119. package/dist/sections/RequirementsChecklist/types.d.ts +6 -0
  120. package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
  121. package/dist/sections/ResourceLibrary/types.d.ts +15 -1
  122. package/dist/sections/RubricView/RubricView.d.ts +1 -1
  123. package/dist/sections/RubricView/types.d.ts +6 -0
  124. package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
  125. package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
  126. package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
  127. package/dist/sections/StudentProfile/types.d.ts +98 -0
  128. package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
  129. package/dist/sections/SurveyForm/types.d.ts +6 -0
  130. package/dist/sections/_shared/merge-answers.d.ts +9 -0
  131. package/dist/sections/_shared/section-shell.d.ts +20 -0
  132. package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
  133. package/dist/sections/index.d.ts +10 -0
  134. package/dist/sections.cjs +1 -1
  135. package/dist/sections.js +1361 -307
  136. package/dist/ui/badge.d.ts +1 -1
  137. package/dist/ui/index.d.ts +2 -0
  138. package/dist/ui/progress.d.ts +1 -1
  139. package/dist/ui/rich-text-editor.d.ts +3 -1
  140. package/dist/ui/toast.d.ts +43 -0
  141. package/dist/utils/debounce.d.ts +5 -1
  142. package/dist/utils/pick-palette-color.d.ts +19 -0
  143. package/dist/video/types.d.ts +15 -0
  144. package/dist/video/video-player.d.ts +1 -1
  145. package/dist/withProGate-BJdu1T9Y.cjs +2 -0
  146. package/dist/withProGate-BvFc7Jwy.js +4975 -0
  147. package/package.json +57 -226
  148. package/src/assessment-toolbar/question-navigator.tsx +10 -5
  149. package/src/assessment-toolbar/timer-display.tsx +4 -3
  150. package/src/assessment-toolbar/use-countdown.ts +1 -1
  151. package/src/common/empty-state.tsx +1 -0
  152. package/src/common/index.ts +2 -0
  153. package/src/common/pagination.tsx +135 -0
  154. package/src/common/search-input.tsx +2 -1
  155. package/src/common/types.ts +2 -0
  156. package/src/content/attachment-list.tsx +2 -0
  157. package/src/content/audio-player.tsx +196 -0
  158. package/src/content/code-block.tsx +113 -0
  159. package/src/content/content-block.tsx +64 -0
  160. package/src/content/embed-block.tsx +78 -0
  161. package/src/content/file-upload-zone.tsx +10 -0
  162. package/src/content/index.ts +6 -0
  163. package/src/content/types.ts +5 -0
  164. package/src/curriculum/course-card.tsx +199 -0
  165. package/src/curriculum/curriculum-item.tsx +3 -3
  166. package/src/curriculum/curriculum-tree.tsx +20 -13
  167. package/src/curriculum/index.ts +2 -0
  168. package/src/curriculum/types.ts +2 -2
  169. package/src/flashcards/flashcard.tsx +28 -8
  170. package/src/index.ts +3 -0
  171. package/src/license/HydraContext.tsx +62 -0
  172. package/src/license/ProBadge.tsx +43 -0
  173. package/src/license/index.ts +7 -0
  174. package/src/license/tiers.ts +34 -0
  175. package/src/license/useHydraLicense.ts +10 -0
  176. package/src/license/validate.ts +90 -0
  177. package/src/license/withProGate.tsx +21 -0
  178. package/src/modules/AssignmentModule/AssignmentModule.tsx +17 -8
  179. package/src/modules/AssignmentModule/types.ts +5 -1
  180. package/src/modules/CertificateModule/CertificateModule.tsx +21 -9
  181. package/src/modules/CertificateModule/types.ts +6 -4
  182. package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
  183. package/src/modules/CourseCatalogModule/types.ts +47 -0
  184. package/src/modules/CoursePlayer/CoursePlayer.tsx +39 -22
  185. package/src/modules/DiscussionModule/DiscussionModule.tsx +57 -22
  186. package/src/modules/ExamModule/ExamModule.tsx +64 -198
  187. package/src/modules/ExamModule/types.ts +5 -14
  188. package/src/modules/FlashcardLab/FlashcardLab.tsx +10 -5
  189. package/src/modules/FlashcardLab/types.ts +2 -0
  190. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +7 -2
  191. package/src/modules/GradeCenterModule/types.ts +2 -0
  192. package/src/modules/QuizModule/QuizModule.tsx +49 -169
  193. package/src/modules/QuizModule/types.ts +5 -15
  194. package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
  195. package/src/modules/StudentDashboardModule/types.ts +56 -0
  196. package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
  197. package/src/modules/StudentProfileModule/types.ts +45 -0
  198. package/src/modules/SurveyModule/SurveyModule.tsx +9 -4
  199. package/src/modules/SurveyModule/types.ts +2 -0
  200. package/src/modules/_shared/assessment-intro.tsx +75 -0
  201. package/src/modules/_shared/assessment-results.tsx +133 -0
  202. package/src/modules/_shared/types.ts +11 -0
  203. package/src/modules/_shared/use-timer.ts +49 -0
  204. package/src/modules/index.ts +9 -0
  205. package/src/progress/achievement-badge.tsx +3 -3
  206. package/src/progress/grade-indicator.tsx +9 -1
  207. package/src/progress/progress-ring.tsx +2 -1
  208. package/src/progress/stat-card.tsx +14 -2
  209. package/src/progress/types.ts +2 -0
  210. package/src/provider/HydraProvider.tsx +15 -6
  211. package/src/questions/choice.tsx +13 -6
  212. package/src/questions/confidence-indicator.tsx +107 -0
  213. package/src/questions/essay.tsx +6 -4
  214. package/src/questions/fill-in-the-blank.tsx +8 -4
  215. package/src/questions/hotspot.tsx +4 -4
  216. package/src/questions/index.ts +2 -0
  217. package/src/questions/inline-choice.tsx +5 -4
  218. package/src/questions/matching.tsx +5 -4
  219. package/src/questions/multiple-choice.tsx +13 -6
  220. package/src/questions/numeric.tsx +8 -4
  221. package/src/questions/ordering.tsx +12 -4
  222. package/src/questions/question-renderer.tsx +3 -2
  223. package/src/questions/scenario.tsx +4 -4
  224. package/src/questions/spreadsheet.tsx +5 -4
  225. package/src/questions/true-false.tsx +13 -6
  226. package/src/sections/AdaptiveLearningPath/AdaptiveLearningPath.tsx +251 -0
  227. package/src/sections/AdaptiveLearningPath/path-connector.tsx +27 -0
  228. package/src/sections/AdaptiveLearningPath/path-milestone-marker.tsx +50 -0
  229. package/src/sections/AdaptiveLearningPath/path-node-card.tsx +166 -0
  230. package/src/sections/AdaptiveLearningPath/path-skill-bar.tsx +49 -0
  231. package/src/sections/AdaptiveLearningPath/types.ts +159 -0
  232. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +64 -8
  233. package/src/sections/AnnouncementFeed/types.ts +15 -1
  234. package/src/sections/AssessmentReview/AssessmentReview.tsx +37 -0
  235. package/src/sections/AssessmentReview/types.ts +6 -0
  236. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +37 -1
  237. package/src/sections/AssignmentSubmission/types.ts +6 -0
  238. package/src/sections/CertificateViewer/CertificateViewer.tsx +29 -227
  239. package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
  240. package/src/sections/CertificateViewer/types.ts +6 -0
  241. package/src/sections/ContentAuthoringStudio/ContentAuthoringStudio.tsx +289 -0
  242. package/src/sections/ContentAuthoringStudio/block-editor-item.tsx +487 -0
  243. package/src/sections/ContentAuthoringStudio/block-type-picker.tsx +123 -0
  244. package/src/sections/ContentAuthoringStudio/types.ts +67 -0
  245. package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
  246. package/src/sections/CourseCatalog/types.ts +76 -0
  247. package/src/sections/CourseOutline/CourseOutline.tsx +41 -0
  248. package/src/sections/CourseOutline/types.ts +6 -0
  249. package/src/sections/DiscussionThread/DiscussionThread.tsx +42 -1
  250. package/src/sections/DiscussionThread/types.ts +6 -0
  251. package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
  252. package/src/sections/EnrollmentWizard/types.ts +65 -0
  253. package/src/sections/ExamSession/ExamSession.tsx +100 -94
  254. package/src/sections/ExamSession/types.ts +6 -0
  255. package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
  256. package/src/sections/FlashcardStudySession/types.ts +6 -0
  257. package/src/sections/ForumBoard/ForumBoard.tsx +67 -7
  258. package/src/sections/ForumBoard/types.ts +14 -0
  259. package/src/sections/GradebookTable/GradebookTable.tsx +54 -1
  260. package/src/sections/GradebookTable/types.ts +14 -0
  261. package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
  262. package/src/sections/LecturePlayer/types.ts +8 -0
  263. package/src/sections/LessonPage/LessonPage.tsx +34 -6
  264. package/src/sections/LessonPage/types.ts +6 -0
  265. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +106 -74
  266. package/src/sections/PracticeQuiz/types.ts +6 -0
  267. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +64 -10
  268. package/src/sections/ProgressDashboard/types.ts +6 -0
  269. package/src/sections/QuizSession/QuizSession.tsx +71 -82
  270. package/src/sections/QuizSession/types.ts +6 -0
  271. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +41 -1
  272. package/src/sections/RequirementsChecklist/types.ts +6 -0
  273. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +64 -8
  274. package/src/sections/ResourceLibrary/types.ts +15 -1
  275. package/src/sections/RubricView/RubricView.tsx +37 -1
  276. package/src/sections/RubricView/types.ts +6 -0
  277. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +36 -15
  278. package/src/sections/ScrollableQuiz/types.ts +6 -0
  279. package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
  280. package/src/sections/StudentProfile/types.ts +99 -0
  281. package/src/sections/SurveyForm/SurveyForm.tsx +32 -5
  282. package/src/sections/SurveyForm/types.ts +6 -0
  283. package/src/sections/_shared/merge-answers.ts +22 -0
  284. package/src/sections/_shared/section-shell.tsx +64 -0
  285. package/src/sections/_shared/use-assessment-session.ts +125 -0
  286. package/src/sections/index.ts +40 -0
  287. package/src/social/user-avatar.tsx +9 -5
  288. package/src/styles/globals.css +39 -41
  289. package/src/ui/badge.tsx +8 -0
  290. package/src/ui/index.ts +2 -0
  291. package/src/ui/progress.tsx +4 -0
  292. package/src/ui/rich-text-editor.tsx +10 -0
  293. package/src/ui/rich-text-toolbar.tsx +2 -1
  294. package/src/ui/toast.tsx +170 -0
  295. package/src/utils/debounce.ts +8 -2
  296. package/src/utils/pick-palette-color.ts +33 -0
  297. package/src/video/types.ts +16 -0
  298. package/src/video/video-player.tsx +27 -6
  299. package/dist/ForumBoard-CHXU3mjC.js +0 -2207
  300. package/dist/ForumBoard-d1w5-r6n.cjs +0 -1
  301. package/dist/tabs-DRM2Iq_J.cjs +0 -172
  302. package/dist/tabs-Wf3h_Cx3.js +0 -21580
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export type HydraPlan = 'pro' | 'free' | 'validating' | 'invalid';
3
+ export interface HydraLicenseContextValue {
4
+ plan: HydraPlan;
5
+ isPro: boolean;
6
+ }
7
+ export declare const HydraLicenseContext: import('react').Context<HydraLicenseContextValue>;
8
+ export interface HydraLicenseProviderProps {
9
+ licenseKey?: string;
10
+ validateUrl?: string;
11
+ children: ReactNode;
12
+ }
13
+ /** Provides license state to all HydraLMS components.
14
+ * When `validateUrl` is omitted or empty, all features are unlocked (dev mode).
15
+ */
16
+ export declare function HydraLicenseProvider({ licenseKey, validateUrl, children }: HydraLicenseProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** Wraps children with a subtle "HydraLMS Pro" upgrade badge when the module requires a pro license. */
3
+ export declare function ProBadge({ children, feature }: {
4
+ children: ReactNode;
5
+ feature?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export { HydraLicenseProvider, HydraLicenseContext } from './HydraContext';
2
+ export type { HydraPlan, HydraLicenseContextValue, HydraLicenseProviderProps } from './HydraContext';
3
+ export { useHydraLicense } from './useHydraLicense';
4
+ export { isProModule, PRO_MODULES, isProSection, PRO_SECTIONS } from './tiers';
5
+ export type { ProModuleName, ProSectionName } from './tiers';
6
+ export { ProBadge } from './ProBadge';
7
+ export { withProGate } from './withProGate';
@@ -0,0 +1,6 @@
1
+ export declare const PRO_MODULES: Set<"QuizModule" | "FlashcardLab" | "CoursePlayer" | "ExamModule" | "SurveyModule" | "GradeCenterModule" | "AssignmentModule" | "CertificateModule" | "DiscussionModule" | "StudentDashboardModule" | "CourseCatalogModule" | "StudentProfileModule">;
2
+ export type ProModuleName = typeof PRO_MODULES extends Set<infer T> ? T : never;
3
+ export declare function isProModule(name: string): boolean;
4
+ export declare const PRO_SECTIONS: Set<"ContentAuthoringStudio">;
5
+ export type ProSectionName = typeof PRO_SECTIONS extends Set<infer T> ? T : never;
6
+ export declare function isProSection(name: string): boolean;
@@ -0,0 +1,6 @@
1
+ import { HydraLicenseContextValue } from './HydraContext';
2
+ /** Returns the current HydraLMS license status. Pro modules render with a
3
+ * watermark badge when `isPro` is false. Wrap your app in `<HydraProvider>`
4
+ * with a valid license key to unlock all features.
5
+ */
6
+ export declare function useHydraLicense(): HydraLicenseContextValue;
@@ -0,0 +1,13 @@
1
+ export type KeyResult = 'valid-pro' | 'valid-free' | 'invalid' | 'no-key' | 'skip';
2
+ export interface ValidationResponse {
3
+ valid: boolean;
4
+ plan: 'pro' | 'enterprise' | null;
5
+ }
6
+ /**
7
+ * Validate a license key against the validation endpoint.
8
+ * @param rawKey - The license key string, or null if not provided.
9
+ * @param validateUrl - The validation endpoint URL. Empty string skips validation (dev mode).
10
+ */
11
+ export declare function validateKey(rawKey: string | null, validateUrl: string): Promise<KeyResult>;
12
+ /** Whether a watermark should be shown for the given key result. */
13
+ export declare function shouldShowWatermark(result: KeyResult): boolean;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ /** Higher-order component that wraps a pro-tier module with ProBadge when unlicensed. */
3
+ export declare function withProGate<P extends object>(Component: React.ComponentType<P>, moduleName: string): {
4
+ (props: P): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
@@ -1,8 +1,5 @@
1
1
  import { AssignmentModuleProps } from './types';
2
- /**
3
- * AssignmentModule — a complete assignment experience with instructions,
4
- * submission work area, and confirmation/grade review.
5
- *
6
- * Steps: Instructions → Work (AssignmentSubmission) → Confirmation.
7
- */
8
- export declare function AssignmentModule({ title, instructions, dueDate, maxScore, submissionTypes, fileConstraints, rubric, existingSubmission, status, grade, onSubmit, onSaveDraft, className, style, }: AssignmentModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const AssignmentModule: {
3
+ (props: AssignmentModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -50,8 +50,12 @@ export interface AssignmentModuleProps {
50
50
  };
51
51
  /** Called on final submission */
52
52
  onSubmit?: (submission: SubmissionData) => void;
53
+ /** Called when the assignment is submitted or draft-saved, with the full result */
54
+ onComplete?: (result: AssignmentModuleResult) => void;
53
55
  /** Called on draft save */
54
56
  onSaveDraft?: (submission: SubmissionData) => void;
57
+ /** When true, disables interactions for preview/demo mode. @default false */
58
+ readOnly?: boolean;
55
59
  /** CSS class name for the root element */
56
60
  className?: string;
57
61
  /** Inline styles for the root element */
@@ -61,5 +65,5 @@ export interface AssignmentModuleResult {
61
65
  /** The submitted data */
62
66
  submission: SubmissionData;
63
67
  /** Status after submission */
64
- status: string;
68
+ status: "not_started" | "draft" | "submitted" | "late" | "graded" | "resubmit";
65
69
  }
@@ -1,9 +1,5 @@
1
1
  import { CertificateModuleProps } from './types';
2
- /**
3
- * CertificateModule — a certificate-earning flow with requirements tracking
4
- * and certificate display.
5
- *
6
- * Steps: Requirements (checklist + progress) → Certificate (CertificateViewer).
7
- * The certificate step is only accessible when all requirements are completed.
8
- */
9
- export declare function CertificateModule({ courseTitle, recipientName, organizationName, organizationLogo, signatory, completionDate, certificateVariant, requirements, overallProgress, onRequirementClick, onCertificateEarned, className, style, }: CertificateModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const CertificateModule: {
3
+ (props: CertificateModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -36,12 +36,14 @@ export interface CertificateModuleProps {
36
36
  certificateVariant?: CertificateVariant;
37
37
  /** Completion requirements */
38
38
  requirements: Requirement[];
39
- /** Overall course progress (0-100) */
40
- overallProgress: number;
39
+ /** Overall course progress (0-100). When omitted, derived from requirements completion. */
40
+ overallProgress?: number;
41
41
  /** Called when a requirement item is clicked */
42
42
  onRequirementClick?: (uid: string) => void;
43
- /** Called when the certificate screen is first displayed */
44
- onCertificateEarned?: () => void;
43
+ /** Called when the certificate is first displayed. @default undefined */
44
+ onComplete?: () => void;
45
+ /** When true, disables interactions for preview/demo mode. @default false */
46
+ readOnly?: boolean;
45
47
  /** CSS class name for the root element */
46
48
  className?: string;
47
49
  /** Inline styles for the root element */
@@ -0,0 +1,5 @@
1
+ import { CourseCatalogModuleProps } from './types';
2
+ export declare const CourseCatalogModule: {
3
+ (props: CourseCatalogModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,43 @@
1
+ import { CourseInfo } from '../../sections/CourseCatalog/types';
2
+ import { EnrollmentCourse, Prerequisite } from '../../sections/EnrollmentWizard/types';
3
+ /**
4
+ * CourseCatalogModule — a browse-and-enroll course catalog module.
5
+ *
6
+ * Master-detail layout: CourseCatalog (browse) ↔ EnrollmentWizard (enroll).
7
+ * Clicking a course drills into the enrollment flow; a back button returns to browsing.
8
+ *
9
+ * @example
10
+ * <CourseCatalogModule
11
+ * title="Course Catalog"
12
+ * courses={courses}
13
+ * categories={categories}
14
+ * enrollmentData={enrollmentData}
15
+ * onEnroll={(courseUid) => handleEnroll(courseUid)}
16
+ * />
17
+ */
18
+ export interface CourseCatalogModuleProps {
19
+ /** Catalog title */
20
+ title?: string;
21
+ /** Courses to display */
22
+ courses: CourseInfo[];
23
+ /** Optional categories for filtering */
24
+ categories?: {
25
+ uid: string;
26
+ label: string;
27
+ }[];
28
+ /** Enrollment data keyed by course UID — provides course details and prerequisites for the enrollment wizard */
29
+ enrollmentData?: Record<string, {
30
+ course: EnrollmentCourse;
31
+ prerequisites?: Prerequisite[];
32
+ }>;
33
+ /** Called when a user confirms enrollment */
34
+ onEnroll: (courseUid: string) => void;
35
+ /** Called when a course is opened (for lazy-loading enrollment data) */
36
+ onCourseOpen?: (courseUid: string) => void;
37
+ /** When true, disables interactions for preview/demo mode. @default false */
38
+ readOnly?: boolean;
39
+ /** CSS class name for the root element */
40
+ className?: string;
41
+ /** Inline styles for the root element */
42
+ style?: React.CSSProperties;
43
+ }
@@ -1,2 +1,5 @@
1
1
  import { CoursePlayerProps } from './types';
2
- export declare function CoursePlayer({ courseTitle, curriculum, progress, items, initialItemUid, onItemComplete, onItemChange, sidebarCollapsed, readOnly, className, style, }: CoursePlayerProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const CoursePlayer: {
3
+ (props: CoursePlayerProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -1,8 +1,5 @@
1
1
  import { DiscussionModuleProps } from './types';
2
- /**
3
- * DiscussionModule — a master-detail discussion forum with topic list and thread view.
4
- *
5
- * Panel-based layout: ForumBoard (topic listing) ↔ DiscussionThread (thread detail).
6
- * Clicking a topic drills into the thread; a back button returns to the board.
7
- */
8
- export declare function DiscussionModule({ forumTitle, topics, currentUser, threads, onCreateTopic, onReply, onToggleLike, onMarkAnswer, onTopicOpen, readOnly, className, style, }: DiscussionModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const DiscussionModule: {
3
+ (props: DiscussionModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -1,8 +1,5 @@
1
1
  import { ExamModuleProps } from './types';
2
- /**
3
- * ExamModule — a complete formal exam experience.
4
- *
5
- * Steps: Intro (rules/instructions) → Exam (timed ExamSession) → Results (score + review).
6
- * Manages an external timer that feeds elapsed time to ExamSession.
7
- */
8
- export declare function ExamModule({ title, description, instructions, questions, timeLimitSeconds, passingScore, allowBackNavigation, autoSubmitOnTimeout, timeWarningThreshold, allowRetake, showReview, onComplete, className, style, }: ExamModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const ExamModule: {
3
+ (props: ExamModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { QuestionData, SessionAnswer } from '../../questions/types';
2
+ import { QuestionData } from '../../questions/types';
3
+ import { AssessmentResult } from '../_shared/types';
3
4
  /**
4
5
  * ExamModule — a formal timed exam experience with intro, exam, and results steps.
5
6
  *
@@ -41,24 +42,14 @@ export interface ExamModuleProps {
41
42
  showReview?: boolean;
42
43
  /** Called when the exam is completed (submitted) */
43
44
  onComplete?: (result: ExamModuleResult) => void;
45
+ /** When true, disables interactions for preview/demo mode. @default false */
46
+ readOnly?: boolean;
44
47
  /** CSS class name for the root element */
45
48
  className?: string;
46
49
  /** Inline styles for the root element */
47
50
  style?: React.CSSProperties;
48
51
  }
49
- export interface ExamModuleResult {
50
- /** The user's submitted answers */
51
- answers: SessionAnswer[];
52
- /** Number of correct answers */
53
- correct: number;
54
- /** Total number of gradable questions */
55
- total: number;
56
- /** Score as a percentage (0-100) */
57
- percentage: number;
58
- /** Whether the user passed (only meaningful when passingScore is set) */
59
- passed: boolean;
60
- /** Total time taken in seconds */
61
- timeElapsedSeconds: number;
52
+ export interface ExamModuleResult extends AssessmentResult {
62
53
  /** Whether the submission was triggered by timeout */
63
54
  wasAutoSubmitted: boolean;
64
55
  }
@@ -1,2 +1,5 @@
1
1
  import { FlashcardLabProps } from './types';
2
- export declare function FlashcardLab({ decks, showShuffleToggle, defaultShuffled, allowMultiSelect, onComplete, className, style, }: FlashcardLabProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const FlashcardLab: {
3
+ (props: FlashcardLabProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -26,6 +26,8 @@ export interface FlashcardLabProps {
26
26
  allowMultiSelect?: boolean;
27
27
  /** Called when the user completes a study session */
28
28
  onComplete?: (result: FlashcardLabResult) => void;
29
+ /** When true, disables interactions for preview/demo mode. @default false */
30
+ readOnly?: boolean;
29
31
  /** CSS class name for the root element */
30
32
  className?: string;
31
33
  /** Inline styles for the root element */
@@ -1,9 +1,5 @@
1
1
  import { GradeCenterModuleProps } from './types';
2
- /**
3
- * GradeCenterModule — a tabbed grade center with gradebook, progress dashboard,
4
- * and drill-down into individual assessment reviews.
5
- *
6
- * Uses a panel-based layout (like CoursePlayer) with tabs for Grades and Progress,
7
- * and a slide-in detail panel for reviewing individual assessments.
8
- */
9
- export declare function GradeCenterModule({ courseTitle, gradeItems, categories, overallGrade, showWeights, progressData, reviewData, className, style, }: GradeCenterModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const GradeCenterModule: {
3
+ (props: GradeCenterModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -47,6 +47,8 @@ export interface GradeCenterModuleProps {
47
47
  sessionAnswers: SessionAnswer[];
48
48
  score?: AssessmentScore;
49
49
  }>;
50
+ /** When true, disables interactions for preview/demo mode. @default false */
51
+ readOnly?: boolean;
50
52
  /** CSS class name for the root element */
51
53
  className?: string;
52
54
  /** Inline styles for the root element */
@@ -1,2 +1,5 @@
1
1
  import { QuizModuleProps } from './types';
2
- export declare function QuizModule({ title, description, questions, timeLimitSeconds, passingScore, allowRetake, onComplete, showReview, questionMaterials, className, style, }: QuizModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const QuizModule: {
3
+ (props: QuizModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -1,4 +1,5 @@
1
- import { QuestionData, QuestionMaterial, SessionAnswer } from '../../questions/types';
1
+ import { QuestionData, QuestionMaterial } from '../../questions/types';
2
+ import { AssessmentResult } from '../_shared/types';
2
3
  /**
3
4
  * QuizModule — a complete multi-step assessment experience.
4
5
  *
@@ -38,22 +39,12 @@ export interface QuizModuleProps {
38
39
  * button appears in the question header, opening a drawer with content blocks.
39
40
  */
40
41
  questionMaterials?: QuestionMaterial[];
42
+ /** When true, disables interactions for preview/demo mode. @default false */
43
+ readOnly?: boolean;
41
44
  /** CSS class name for the root element */
42
45
  className?: string;
43
46
  /** Inline styles for the root element */
44
47
  style?: React.CSSProperties;
45
48
  }
46
- export interface QuizModuleResult {
47
- /** The user's submitted answers */
48
- answers: SessionAnswer[];
49
- /** Number of correct answers */
50
- correct: number;
51
- /** Total number of questions */
52
- total: number;
53
- /** Score as a percentage (0-100) */
54
- percentage: number;
55
- /** Whether the user passed (only meaningful when passingScore is set) */
56
- passed: boolean;
57
- /** Total time taken in seconds */
58
- timeElapsedSeconds: number;
49
+ export interface QuizModuleResult extends AssessmentResult {
59
50
  }
@@ -0,0 +1,5 @@
1
+ import { StudentDashboardModuleProps } from './types';
2
+ export declare const StudentDashboardModule: {
3
+ (props: StudentDashboardModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,54 @@
1
+ import { CourseInfo } from '../../sections/CourseCatalog/types';
2
+ import { Announcement } from '../../sections/AnnouncementFeed/types';
3
+ import { ModuleProgress, ActivityItem, Achievement } from '../../sections/ProgressDashboard/types';
4
+ /**
5
+ * StudentDashboardModule — a multi-tab student home page.
6
+ *
7
+ * Combines ProgressDashboard, CourseCatalog, and AnnouncementFeed in a tabbed layout
8
+ * to provide a complete student landing page experience.
9
+ *
10
+ * @example
11
+ * <StudentDashboardModule
12
+ * studentName="Jane"
13
+ * overallProgress={72}
14
+ * totalTimeSpent={14400}
15
+ * modules={[]}
16
+ * enrolledCourses={courses}
17
+ * onCourseClick={(uid) => navigate(`/courses/${uid}`)}
18
+ * />
19
+ */
20
+ export interface StudentDashboardModuleProps {
21
+ /** Student's display name */
22
+ studentName: string;
23
+ /** Overall progress percentage (0-100) */
24
+ overallProgress: number;
25
+ /** Total time spent in seconds */
26
+ totalTimeSpent: number;
27
+ /** Per-module progress data */
28
+ modules: ModuleProgress[];
29
+ /** Recent activity items */
30
+ recentActivity?: ActivityItem[];
31
+ /** Streak data */
32
+ streak?: {
33
+ currentDays: number;
34
+ longestDays: number;
35
+ };
36
+ /** Achievements */
37
+ achievements?: Achievement[];
38
+ /** Enrolled courses for the courses tab */
39
+ enrolledCourses: CourseInfo[];
40
+ /** Called when a course is clicked */
41
+ onCourseClick: (courseUid: string) => void;
42
+ /** Announcements for the announcements tab */
43
+ announcements?: Announcement[];
44
+ /** Called when an announcement is selected */
45
+ onAnnouncementSelect?: (announcement: Announcement) => void;
46
+ /** Called when an announcement is marked as read */
47
+ onMarkRead?: (uid: string) => void;
48
+ /** When true, disables interactions for preview/demo mode. @default false */
49
+ readOnly?: boolean;
50
+ /** CSS class name for the root element */
51
+ className?: string;
52
+ /** Inline styles for the root element */
53
+ style?: React.CSSProperties;
54
+ }
@@ -0,0 +1,5 @@
1
+ import { StudentProfileModuleProps } from './types';
2
+ export declare const StudentProfileModule: {
3
+ (props: StudentProfileModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,43 @@
1
+ import { StudentInfo, EnrolledCourse, ProfileAchievement, ProfileCertificate } from '../../sections/StudentProfile/types';
2
+ import { CertificateViewerProps } from '../../sections/CertificateViewer/types';
3
+ /**
4
+ * StudentProfileModule — a tabbed student profile page with certificate drill-down.
5
+ *
6
+ * Combines StudentProfile, course list, achievements, and CertificateViewer
7
+ * in a tabbed layout with drill-down into individual certificates.
8
+ *
9
+ * @example
10
+ * <StudentProfileModule
11
+ * student={{ uid: "s1", displayName: "Jane Doe" }}
12
+ * enrolledCourses={courses}
13
+ * achievements={badges}
14
+ * certificates={certs}
15
+ * certificateData={{ cert1: { recipientName: "Jane", courseTitle: "React 101", completionDate: "2025-01-01", organizationName: "Hydra Academy" } }}
16
+ * />
17
+ */
18
+ export interface StudentProfileModuleProps {
19
+ /** Student information */
20
+ student: StudentInfo;
21
+ /** Enrolled courses */
22
+ enrolledCourses?: EnrolledCourse[];
23
+ /** Earned achievements */
24
+ achievements?: ProfileAchievement[];
25
+ /** Earned certificates */
26
+ certificates?: ProfileCertificate[];
27
+ /** Custom stat cards */
28
+ stats?: {
29
+ label: string;
30
+ value: string;
31
+ icon?: React.ReactNode;
32
+ }[];
33
+ /** Called when a course is clicked */
34
+ onCourseClick?: (courseUid: string) => void;
35
+ /** Certificate data keyed by certificate UID — enables drill-down on click */
36
+ certificateData?: Record<string, CertificateViewerProps>;
37
+ /** When true, disables interactions for preview/demo mode. @default false */
38
+ readOnly?: boolean;
39
+ /** CSS class name for the root element */
40
+ className?: string;
41
+ /** Inline styles for the root element */
42
+ style?: React.CSSProperties;
43
+ }
@@ -1,7 +1,5 @@
1
1
  import { SurveyModuleProps } from './types';
2
- /**
3
- * SurveyModule — a complete survey experience with intro, form, and thank-you steps.
4
- *
5
- * Steps: Intro → SurveyForm → Thank You with response stats.
6
- */
7
- export declare function SurveyModule({ title, description, questions, requireAll, showProgress, thankYouTitle, thankYouMessage, onComplete, allowRestart, className, style, }: SurveyModuleProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const SurveyModule: {
3
+ (props: SurveyModuleProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -32,6 +32,8 @@ export interface SurveyModuleProps {
32
32
  onComplete?: (result: SurveyModuleResult) => void;
33
33
  /** Allow restarting the survey from the thank-you screen. @default false */
34
34
  allowRestart?: boolean;
35
+ /** When true, disables interactions for preview/demo mode. @default false */
36
+ readOnly?: boolean;
35
37
  /** CSS class name for the root element */
36
38
  className?: string;
37
39
  /** Inline styles for the root element */
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export interface AssessmentIntroProps {
3
+ icon: ReactNode;
4
+ title: string;
5
+ description?: string;
6
+ questionCount: number;
7
+ timeLimitSeconds?: number;
8
+ passingScore?: number;
9
+ startLabel: string;
10
+ onStart: () => void;
11
+ /** Extra content rendered between the description and metadata badges. */
12
+ children?: ReactNode;
13
+ /** When true, disables interactions for preview/demo mode. @default false */
14
+ readOnly?: boolean;
15
+ }
16
+ export declare function AssessmentIntro({ icon, title, description, questionCount, timeLimitSeconds, passingScore, startLabel, onStart, children, readOnly, }: AssessmentIntroProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ import { QuestionData, SessionAnswer } from '../../questions/types';
3
+ export interface AssessmentResultsProps {
4
+ title: string;
5
+ percentage: number;
6
+ passed: boolean;
7
+ correct: number;
8
+ total: number;
9
+ timeElapsedSeconds: number;
10
+ answers: SessionAnswer[];
11
+ questions: QuestionData[];
12
+ /** Allow retaking the assessment. */
13
+ allowRetake?: boolean;
14
+ onRetake?: () => void;
15
+ retakeLabel?: string;
16
+ /** Show per-question review below the summary. */
17
+ showReview?: boolean;
18
+ /** Extra badges shown next to the pass/fail badge (e.g., "Auto-submitted"). */
19
+ extraBadges?: ReactNode;
20
+ /** When true, disables interactions for preview/demo mode. @default false */
21
+ readOnly?: boolean;
22
+ }
23
+ export declare function AssessmentResults({ title, percentage, passed, correct, total, timeElapsedSeconds, answers, questions, allowRetake, onRetake, retakeLabel, showReview, extraBadges, readOnly, }: AssessmentResultsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { SessionAnswer } from '../../questions/types';
2
+ /** Shared result shape for scored assessment modules. */
3
+ export interface AssessmentResult {
4
+ answers: SessionAnswer[];
5
+ correct: number;
6
+ total: number;
7
+ percentage: number;
8
+ passed: boolean;
9
+ timeElapsedSeconds: number;
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Manages an interval-based timer that runs while `active` is true.
3
+ * Returns elapsed seconds and a reset function.
4
+ */
5
+ export declare function useTimer(active: boolean): {
6
+ timeElapsed: number;
7
+ getFinalElapsed: () => number;
8
+ reset: () => void;
9
+ };
@@ -16,3 +16,9 @@ export { CertificateModule } from './CertificateModule/CertificateModule';
16
16
  export type { CertificateModuleProps } from './CertificateModule/types';
17
17
  export { DiscussionModule } from './DiscussionModule/DiscussionModule';
18
18
  export type { DiscussionModuleProps } from './DiscussionModule/types';
19
+ export { StudentDashboardModule } from './StudentDashboardModule/StudentDashboardModule';
20
+ export type { StudentDashboardModuleProps } from './StudentDashboardModule/types';
21
+ export { CourseCatalogModule } from './CourseCatalogModule/CourseCatalogModule';
22
+ export type { CourseCatalogModuleProps } from './CourseCatalogModule/types';
23
+ export { StudentProfileModule } from './StudentProfileModule/StudentProfileModule';
24
+ export type { StudentProfileModuleProps } from './StudentProfileModule/types';