@hydralms/components 0.1.3 → 0.3.0

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 (344) hide show
  1. package/dist/StudentProfile-BVfZMbnV.cjs +1 -0
  2. package/dist/StudentProfile-DeMxdrL3.js +3275 -0
  3. package/dist/assessment-toolbar/assessment-toolbar.d.ts +1 -1
  4. package/dist/assessment-toolbar/index.d.ts +5 -1
  5. package/dist/assessment-toolbar/question-header-bar.d.ts +2 -0
  6. package/dist/assessment-toolbar/question-materials-drawer.d.ts +2 -0
  7. package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
  8. package/dist/assessment-toolbar/timer-display.d.ts +1 -1
  9. package/dist/assessment-toolbar/types.d.ts +52 -4
  10. package/dist/assessment-toolbar/use-countdown.d.ts +43 -0
  11. package/dist/common/index.d.ts +3 -1
  12. package/dist/common/pagination.d.ts +26 -0
  13. package/dist/common/stepper.d.ts +6 -0
  14. package/dist/common/types.d.ts +38 -0
  15. package/dist/components.css +1 -1
  16. package/dist/content/attachment-list.d.ts +6 -0
  17. package/dist/content/audio-player.d.ts +22 -0
  18. package/dist/content/code-block.d.ts +30 -0
  19. package/dist/content/content-block.d.ts +1 -1
  20. package/dist/content/embed-block.d.ts +28 -0
  21. package/dist/content/index.d.ts +8 -1
  22. package/dist/content/types.d.ts +63 -0
  23. package/dist/curriculum/course-card.d.ts +51 -0
  24. package/dist/curriculum/curriculum-item.d.ts +1 -1
  25. package/dist/curriculum/index.d.ts +2 -0
  26. package/dist/curriculum/types.d.ts +2 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +597 -308
  30. package/dist/license/HydraContext.d.ts +16 -0
  31. package/dist/license/ProBadge.d.ts +6 -0
  32. package/dist/license/index.d.ts +7 -0
  33. package/dist/license/tiers.d.ts +3 -0
  34. package/dist/license/useHydraLicense.d.ts +6 -0
  35. package/dist/license/validate.d.ts +13 -0
  36. package/dist/license/withProGate.d.ts +6 -0
  37. package/dist/modules/AssignmentModule/AssignmentModule.d.ts +5 -0
  38. package/dist/modules/AssignmentModule/types.d.ts +69 -0
  39. package/dist/modules/CertificateModule/CertificateModule.d.ts +5 -0
  40. package/dist/modules/CertificateModule/types.d.ts +51 -0
  41. package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
  42. package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
  43. package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
  44. package/dist/modules/DiscussionModule/DiscussionModule.d.ts +5 -0
  45. package/dist/modules/DiscussionModule/types.d.ts +47 -0
  46. package/dist/modules/ExamModule/ExamModule.d.ts +5 -0
  47. package/dist/modules/ExamModule/types.d.ts +55 -0
  48. package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
  49. package/dist/modules/FlashcardLab/types.d.ts +2 -0
  50. package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +5 -0
  51. package/dist/modules/GradeCenterModule/types.d.ts +56 -0
  52. package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
  53. package/dist/modules/QuizModule/types.d.ts +10 -14
  54. package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
  55. package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
  56. package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
  57. package/dist/modules/StudentProfileModule/types.d.ts +43 -0
  58. package/dist/modules/SurveyModule/SurveyModule.d.ts +5 -0
  59. package/dist/modules/SurveyModule/types.d.ts +51 -0
  60. package/dist/modules/_shared/assessment-intro.d.ts +16 -0
  61. package/dist/modules/_shared/assessment-results.d.ts +23 -0
  62. package/dist/modules/_shared/types.d.ts +10 -0
  63. package/dist/modules/_shared/use-timer.d.ts +9 -0
  64. package/dist/modules/index.d.ts +18 -0
  65. package/dist/modules.cjs +1 -0
  66. package/dist/modules.js +1834 -0
  67. package/dist/progress/achievement-badge.d.ts +6 -0
  68. package/dist/progress/activity-timeline.d.ts +6 -0
  69. package/dist/progress/index.d.ts +4 -1
  70. package/dist/progress/stat-card.d.ts +1 -1
  71. package/dist/progress/streak-badge.d.ts +6 -0
  72. package/dist/progress/types.d.ts +99 -0
  73. package/dist/provider/HydraProvider.d.ts +5 -1
  74. package/dist/questions/choice.d.ts +1 -1
  75. package/dist/questions/confidence-indicator.d.ts +37 -0
  76. package/dist/questions/essay.d.ts +2 -2
  77. package/dist/questions/fill-in-the-blank.d.ts +1 -1
  78. package/dist/questions/hotspot.d.ts +21 -0
  79. package/dist/questions/index.d.ts +11 -1
  80. package/dist/questions/inline-choice.d.ts +21 -0
  81. package/dist/questions/matching.d.ts +22 -0
  82. package/dist/questions/multiple-choice.d.ts +1 -1
  83. package/dist/questions/numeric.d.ts +11 -0
  84. package/dist/questions/ordering.d.ts +12 -0
  85. package/dist/questions/question-renderer.d.ts +1 -1
  86. package/dist/questions/scenario.d.ts +23 -0
  87. package/dist/questions/scoring.d.ts +22 -0
  88. package/dist/questions/spreadsheet.d.ts +29 -0
  89. package/dist/questions/true-false.d.ts +1 -1
  90. package/dist/questions/types.d.ts +106 -1
  91. package/dist/questions/use-drag-reorder.d.ts +17 -0
  92. package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
  93. package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
  94. package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
  95. package/dist/sections/AssessmentReview/types.d.ts +6 -0
  96. package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
  97. package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
  98. package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
  99. package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
  100. package/dist/sections/CertificateViewer/types.d.ts +13 -5
  101. package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
  102. package/dist/sections/CourseCatalog/types.d.ts +80 -0
  103. package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
  104. package/dist/sections/CourseOutline/types.d.ts +6 -0
  105. package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
  106. package/dist/sections/DiscussionThread/types.d.ts +6 -0
  107. package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
  108. package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
  109. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  110. package/dist/sections/ExamSession/types.d.ts +12 -1
  111. package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
  112. package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
  113. package/dist/sections/ForumBoard/ForumBoard.d.ts +8 -0
  114. package/dist/sections/ForumBoard/types.d.ts +78 -0
  115. package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
  116. package/dist/sections/GradebookTable/types.d.ts +14 -0
  117. package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
  118. package/dist/sections/LecturePlayer/types.d.ts +8 -0
  119. package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
  120. package/dist/sections/LessonPage/types.d.ts +6 -0
  121. package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
  122. package/dist/sections/PracticeQuiz/types.d.ts +6 -0
  123. package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
  124. package/dist/sections/ProgressDashboard/types.d.ts +6 -0
  125. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  126. package/dist/sections/QuizSession/types.d.ts +12 -1
  127. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +8 -0
  128. package/dist/sections/RequirementsChecklist/types.d.ts +43 -0
  129. package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
  130. package/dist/sections/ResourceLibrary/types.d.ts +15 -1
  131. package/dist/sections/RubricView/RubricView.d.ts +9 -0
  132. package/dist/sections/RubricView/types.d.ts +56 -0
  133. package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
  134. package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
  135. package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
  136. package/dist/sections/StudentProfile/types.d.ts +98 -0
  137. package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
  138. package/dist/sections/SurveyForm/types.d.ts +6 -0
  139. package/dist/sections/_shared/merge-answers.d.ts +9 -0
  140. package/dist/sections/_shared/section-shell.d.ts +20 -0
  141. package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
  142. package/dist/sections/index.d.ts +13 -1
  143. package/dist/sections.cjs +1 -1
  144. package/dist/sections.js +282 -1786
  145. package/dist/social/post-card.d.ts +1 -1
  146. package/dist/tabs-BsfVo2Bl.cjs +173 -0
  147. package/dist/tabs-BuY1iNJE.js +22305 -0
  148. package/dist/ui/alert.d.ts +1 -1
  149. package/dist/ui/badge.d.ts +1 -1
  150. package/dist/ui/button.d.ts +1 -1
  151. package/dist/ui/drawer.d.ts +84 -0
  152. package/dist/ui/index.d.ts +5 -0
  153. package/dist/ui/progress.d.ts +1 -1
  154. package/dist/ui/rich-text-editor.d.ts +32 -0
  155. package/dist/ui/rich-text-toolbar.d.ts +8 -0
  156. package/dist/ui/toast.d.ts +43 -0
  157. package/dist/utils/array-utils.d.ts +4 -0
  158. package/dist/utils/debounce.d.ts +5 -1
  159. package/dist/utils/flatten-leaves.d.ts +6 -0
  160. package/dist/utils/format-file-size.d.ts +1 -0
  161. package/dist/utils/format-timestamp.d.ts +1 -0
  162. package/dist/utils/is-empty-html.d.ts +5 -0
  163. package/dist/utils/pick-palette-color.d.ts +19 -0
  164. package/dist/utils/shuffle.d.ts +1 -0
  165. package/dist/utils/string-utils.d.ts +12 -0
  166. package/dist/video/types.d.ts +15 -0
  167. package/dist/video/video-bookmark.d.ts +1 -1
  168. package/dist/video/video-player.d.ts +1 -1
  169. package/dist/video/video-playlist-item.d.ts +1 -1
  170. package/dist/withProGate-BWqcKdPM.js +137 -0
  171. package/dist/withProGate-DX6XqKLp.cjs +1 -0
  172. package/package.json +40 -137
  173. package/src/assessment-toolbar/assessment-toolbar.tsx +54 -49
  174. package/src/assessment-toolbar/index.ts +6 -0
  175. package/src/assessment-toolbar/question-header-bar.tsx +61 -0
  176. package/src/assessment-toolbar/question-materials-drawer.tsx +55 -0
  177. package/src/assessment-toolbar/question-navigator.tsx +13 -36
  178. package/src/assessment-toolbar/timer-display.tsx +6 -5
  179. package/src/assessment-toolbar/types.ts +54 -4
  180. package/src/assessment-toolbar/use-countdown.ts +153 -0
  181. package/src/common/empty-state.tsx +1 -0
  182. package/src/common/index.ts +5 -0
  183. package/src/common/pagination.tsx +135 -0
  184. package/src/common/search-input.tsx +8 -6
  185. package/src/common/stepper.tsx +100 -0
  186. package/src/common/types.ts +41 -0
  187. package/src/content/attachment-list.tsx +92 -0
  188. package/src/content/audio-player.tsx +196 -0
  189. package/src/content/code-block.tsx +113 -0
  190. package/src/content/content-block.tsx +68 -2
  191. package/src/content/embed-block.tsx +78 -0
  192. package/src/content/file-upload-zone.tsx +11 -6
  193. package/src/content/index.ts +9 -0
  194. package/src/content/types.ts +46 -0
  195. package/src/curriculum/course-card.tsx +199 -0
  196. package/src/curriculum/curriculum-item.tsx +9 -5
  197. package/src/curriculum/curriculum-tree.tsx +20 -13
  198. package/src/curriculum/index.ts +2 -0
  199. package/src/curriculum/types.ts +2 -2
  200. package/src/feedback/feedback-banner.tsx +12 -14
  201. package/src/flashcards/flashcard-deck.tsx +1 -9
  202. package/src/flashcards/flashcard.tsx +29 -9
  203. package/src/index.ts +3 -0
  204. package/src/license/HydraContext.tsx +62 -0
  205. package/src/license/ProBadge.tsx +43 -0
  206. package/src/license/index.ts +7 -0
  207. package/src/license/tiers.ts +24 -0
  208. package/src/license/useHydraLicense.ts +10 -0
  209. package/src/license/validate.ts +90 -0
  210. package/src/license/withProGate.tsx +21 -0
  211. package/src/modules/AssignmentModule/AssignmentModule.tsx +314 -0
  212. package/src/modules/AssignmentModule/types.ts +77 -0
  213. package/src/modules/CertificateModule/CertificateModule.tsx +173 -0
  214. package/src/modules/CertificateModule/types.ts +49 -0
  215. package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
  216. package/src/modules/CourseCatalogModule/types.ts +47 -0
  217. package/src/modules/CoursePlayer/CoursePlayer.tsx +80 -69
  218. package/src/modules/DiscussionModule/DiscussionModule.tsx +145 -0
  219. package/src/modules/DiscussionModule/types.ts +54 -0
  220. package/src/modules/ExamModule/ExamModule.tsx +151 -0
  221. package/src/modules/ExamModule/types.ts +57 -0
  222. package/src/modules/FlashcardLab/FlashcardLab.tsx +39 -21
  223. package/src/modules/FlashcardLab/types.ts +2 -0
  224. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +174 -0
  225. package/src/modules/GradeCenterModule/types.ts +65 -0
  226. package/src/modules/QuizModule/QuizModule.tsx +58 -178
  227. package/src/modules/QuizModule/types.ts +10 -15
  228. package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
  229. package/src/modules/StudentDashboardModule/types.ts +56 -0
  230. package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
  231. package/src/modules/StudentProfileModule/types.ts +45 -0
  232. package/src/modules/SurveyModule/SurveyModule.tsx +185 -0
  233. package/src/modules/SurveyModule/types.ts +53 -0
  234. package/src/modules/_shared/assessment-intro.tsx +75 -0
  235. package/src/modules/_shared/assessment-results.tsx +133 -0
  236. package/src/modules/_shared/types.ts +11 -0
  237. package/src/modules/_shared/use-timer.ts +49 -0
  238. package/src/modules/index.ts +33 -0
  239. package/src/progress/achievement-badge.tsx +52 -0
  240. package/src/progress/activity-timeline.tsx +84 -0
  241. package/src/progress/grade-indicator.tsx +9 -1
  242. package/src/progress/index.ts +7 -0
  243. package/src/progress/progress-ring.tsx +2 -1
  244. package/src/progress/stat-card.tsx +37 -18
  245. package/src/progress/streak-badge.tsx +35 -0
  246. package/src/progress/types.ts +103 -0
  247. package/src/provider/HydraProvider.tsx +15 -6
  248. package/src/questions/choice.tsx +19 -14
  249. package/src/questions/confidence-indicator.tsx +107 -0
  250. package/src/questions/essay.tsx +28 -28
  251. package/src/questions/fill-in-the-blank.tsx +20 -19
  252. package/src/questions/hotspot.tsx +154 -0
  253. package/src/questions/index.ts +18 -0
  254. package/src/questions/inline-choice.tsx +152 -0
  255. package/src/questions/matching.tsx +229 -0
  256. package/src/questions/multiple-choice.tsx +19 -14
  257. package/src/questions/numeric.tsx +106 -0
  258. package/src/questions/ordering.tsx +167 -0
  259. package/src/questions/question-renderer.tsx +24 -2
  260. package/src/questions/scenario.tsx +140 -0
  261. package/src/questions/scoring.ts +201 -0
  262. package/src/questions/spreadsheet.tsx +260 -0
  263. package/src/questions/true-false.tsx +19 -14
  264. package/src/questions/types.ts +123 -1
  265. package/src/questions/use-drag-reorder.ts +80 -0
  266. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +66 -23
  267. package/src/sections/AnnouncementFeed/types.ts +15 -1
  268. package/src/sections/AssessmentReview/AssessmentReview.tsx +50 -2
  269. package/src/sections/AssessmentReview/types.ts +6 -0
  270. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +44 -6
  271. package/src/sections/AssignmentSubmission/types.ts +6 -0
  272. package/src/sections/CertificateViewer/CertificateViewer.tsx +215 -60
  273. package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
  274. package/src/sections/CertificateViewer/types.ts +19 -5
  275. package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
  276. package/src/sections/CourseCatalog/types.ts +76 -0
  277. package/src/sections/CourseOutline/CourseOutline.tsx +45 -14
  278. package/src/sections/CourseOutline/types.ts +6 -0
  279. package/src/sections/DiscussionThread/DiscussionThread.tsx +55 -11
  280. package/src/sections/DiscussionThread/types.ts +6 -0
  281. package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
  282. package/src/sections/EnrollmentWizard/types.ts +65 -0
  283. package/src/sections/ExamSession/ExamSession.tsx +125 -82
  284. package/src/sections/ExamSession/types.ts +12 -1
  285. package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
  286. package/src/sections/FlashcardStudySession/types.ts +6 -0
  287. package/src/sections/ForumBoard/ForumBoard.tsx +342 -0
  288. package/src/sections/ForumBoard/types.ts +81 -0
  289. package/src/sections/GradebookTable/GradebookTable.tsx +55 -2
  290. package/src/sections/GradebookTable/types.ts +14 -0
  291. package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
  292. package/src/sections/LecturePlayer/types.ts +8 -0
  293. package/src/sections/LessonPage/LessonPage.tsx +40 -13
  294. package/src/sections/LessonPage/types.ts +6 -0
  295. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +119 -98
  296. package/src/sections/PracticeQuiz/types.ts +6 -0
  297. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +121 -67
  298. package/src/sections/ProgressDashboard/types.ts +6 -0
  299. package/src/sections/QuizSession/QuizSession.tsx +115 -67
  300. package/src/sections/QuizSession/types.ts +12 -1
  301. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +147 -0
  302. package/src/sections/RequirementsChecklist/types.ts +44 -0
  303. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +68 -17
  304. package/src/sections/ResourceLibrary/types.ts +15 -1
  305. package/src/sections/RubricView/RubricView.tsx +174 -0
  306. package/src/sections/RubricView/types.ts +58 -0
  307. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +58 -23
  308. package/src/sections/ScrollableQuiz/types.ts +6 -0
  309. package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
  310. package/src/sections/StudentProfile/types.ts +99 -0
  311. package/src/sections/SurveyForm/SurveyForm.tsx +40 -10
  312. package/src/sections/SurveyForm/types.ts +6 -0
  313. package/src/sections/_shared/merge-answers.ts +22 -0
  314. package/src/sections/_shared/section-shell.tsx +64 -0
  315. package/src/sections/_shared/use-assessment-session.ts +125 -0
  316. package/src/sections/index.ts +42 -1
  317. package/src/social/post-card.tsx +8 -19
  318. package/src/social/user-avatar.tsx +10 -5
  319. package/src/styles/globals.css +52 -41
  320. package/src/ui/badge.tsx +8 -0
  321. package/src/ui/drawer.tsx +600 -0
  322. package/src/ui/index.ts +21 -0
  323. package/src/ui/progress.tsx +4 -0
  324. package/src/ui/rich-text-editor.tsx +119 -0
  325. package/src/ui/rich-text-toolbar.tsx +157 -0
  326. package/src/ui/toast.tsx +170 -0
  327. package/src/utils/array-utils.ts +17 -0
  328. package/src/utils/debounce.ts +8 -2
  329. package/src/utils/flatten-leaves.ts +17 -0
  330. package/src/utils/format-file-size.ts +5 -0
  331. package/src/utils/format-timestamp.ts +13 -0
  332. package/src/utils/is-empty-html.ts +7 -0
  333. package/src/utils/pick-palette-color.ts +33 -0
  334. package/src/utils/shuffle.ts +8 -0
  335. package/src/utils/string-utils.ts +30 -0
  336. package/src/video/types.ts +16 -0
  337. package/src/video/video-bookmark.tsx +4 -3
  338. package/src/video/video-chapter-list.tsx +9 -4
  339. package/src/video/video-player.tsx +24 -5
  340. package/src/video/video-playlist-item.tsx +8 -3
  341. package/src/video/video-thumbnail-card.tsx +4 -0
  342. package/src/video/video-transcript.tsx +8 -5
  343. package/dist/table-BrS5cDQu.js +0 -2510
  344. package/dist/table-D6AkBBEo.cjs +0 -1
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./table-D6AkBBEo.cjs"),t=require("react/jsx-runtime"),c=require("lucide-react"),f=require("react"),p=({entries:r,currentTime:s=0,onSeek:a,readOnly:i=!1,maxHeight:o="400px",className:d,style:l})=>{const m=f.useRef(null),n=f.useRef(null),b=r.reduce((u,g,x)=>g.time<=s?x:u,-1);return f.useEffect(()=>{n.current&&m.current&&n.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[b]),r.length===0?t.jsxs("div",{className:e.cn("flex flex-col items-center justify-center gap-2 rounded-md border border-border bg-muted p-6",d),style:l,children:[t.jsx(c.Clock,{size:20,className:"text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"No transcript available"})]}):t.jsx("div",{ref:m,className:e.cn("overflow-y-auto rounded-md border border-border",d),style:{maxHeight:o,...l},children:r.map((u,g)=>{const x=g===b;return t.jsxs("div",{ref:x?n:void 0,className:e.cn("flex gap-3 px-3 py-2 text-sm transition-colors",x&&"bg-primary/10",!i&&a&&"cursor-pointer hover:bg-muted"),onClick:()=>!i&&(a==null?void 0:a(u.time)),children:[t.jsx("span",{className:e.cn("shrink-0 font-mono text-xs tabular-nums pt-0.5",x?"text-primary font-medium":"text-muted-foreground"),children:e.formatTimer(Math.floor(u.time))}),t.jsxs("div",{className:"min-w-0",children:[u.speaker&&t.jsxs("span",{className:"mr-1 font-semibold text-foreground",children:[u.speaker,":"]}),t.jsx("span",{className:x?"text-foreground":"text-muted-foreground",children:u.text})]})]},g)})})},h=({chapters:r,currentTime:s=0,onSeek:a,className:i,style:o})=>{const d=r.reduce((l,m,n)=>m.time<=s?n:l,-1);return t.jsx("div",{className:e.cn("divide-y divide-border rounded-md border border-border",i),style:o,children:r.map((l,m)=>{const n=m===d;return t.jsxs("div",{className:e.cn("flex items-center gap-3 p-3 transition-colors",n&&"bg-primary/10",a&&"cursor-pointer hover:bg-muted"),onClick:()=>a==null?void 0:a(l.time),children:[l.thumbnail?t.jsxs("div",{className:"relative shrink-0 w-16 overflow-hidden rounded",style:{aspectRatio:"16/9"},children:[t.jsx("img",{src:l.thumbnail,alt:l.title,className:"size-full object-cover"}),n&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:t.jsx(c.Play,{size:14,className:"ml-px text-white"})})]}):t.jsx("div",{className:e.cn("flex shrink-0 items-center justify-center size-8 rounded-full",n?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:t.jsx("span",{className:"text-xs font-semibold",children:m+1})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:e.cn("truncate text-sm font-medium",n?"text-primary":"text-foreground"),children:l.title}),t.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[t.jsx("span",{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.formatTimer(Math.floor(l.time))}),l.duration!=null&&l.duration>0&&t.jsx("span",{className:"text-xs text-muted-foreground",children:e.formatDuration(l.duration)})]})]})]},m)})})},j=({poster:r,title:s,duration:a,progress:i,onClick:o,className:d,style:l})=>t.jsxs("div",{className:e.cn("group overflow-hidden rounded-lg border border-border transition-colors",o&&"cursor-pointer hover:border-primary/50 hover:shadow-sm",d),style:l,onClick:o,children:[t.jsxs("div",{className:"relative overflow-hidden",style:{aspectRatio:"16/9"},children:[r?t.jsx("img",{src:r,alt:s,className:"size-full object-cover transition-transform duration-300 group-hover:scale-105"}):t.jsx("div",{className:"flex size-full items-center justify-center bg-muted",children:t.jsx(c.Video,{size:32,className:"text-muted-foreground"})}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/0 transition-colors group-hover:bg-black/20",children:t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(c.Play,{size:20,className:"ml-0.5 text-white"})})}),a!=null&&a>0&&t.jsx("span",{className:"absolute bottom-2 right-2 rounded bg-black/75 px-1.5 py-0.5 text-xs font-medium tabular-nums text-white",children:e.formatDuration(a)})]}),t.jsx("div",{className:"p-3",children:t.jsx("h4",{className:"truncate text-sm font-medium text-foreground",children:s})}),i!=null&&i>=0&&t.jsx("div",{className:"px-3 pb-3",children:t.jsx(e.Progress,{value:i,size:"sm",variant:i>=100?"success":"default"})})]}),v=({bookmark:r,onSeek:s,onDelete:a,onEdit:i,className:o,style:d})=>t.jsxs("div",{className:e.cn("flex items-start gap-3 rounded-md border border-border p-3",o),style:d,children:[t.jsx("div",{className:"flex shrink-0 items-center justify-center size-8 rounded-full bg-primary/10 text-primary",children:t.jsx(c.Bookmark,{size:16})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("button",{type:"button",className:e.cn("font-mono text-xs font-medium tabular-nums",s?"cursor-pointer text-primary hover:underline":"text-muted-foreground"),onClick:()=>s==null?void 0:s(r.time),disabled:!s,children:e.formatTimer(Math.floor(r.time))}),r.note&&t.jsx("p",{className:"mt-0.5 text-sm text-foreground",children:r.note}),r.createdAt&&t.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(r.createdAt).toLocaleDateString()})]}),(i||a)&&t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i&&t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":"Edit bookmark",onClick:()=>i(r.id),children:t.jsx(c.Pencil,{size:14})}),a&&t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive","aria-label":"Delete bookmark",onClick:()=>a(r.id),children:t.jsx(c.Trash2,{size:14})})]})]}),N=({thumbnail:r,title:s,duration:a,status:i="unwatched",isActive:o=!1,index:d,onClick:l,className:m,style:n})=>t.jsxs("div",{className:e.cn("flex items-center gap-3 rounded-md px-3 py-2 transition-colors",o&&"bg-primary/10",l&&"cursor-pointer hover:bg-muted",m),style:n,onClick:l,children:[t.jsx("div",{className:"flex shrink-0 items-center justify-center size-6",children:i==="completed"?t.jsx("span",{className:"text-success",children:t.jsx(c.CheckCircle2,{size:18})}):o?t.jsx("span",{className:"text-primary",children:t.jsx(c.Play,{size:16,className:"ml-px"})}):d!=null?t.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground",children:d}):t.jsx("span",{className:"text-muted-foreground",children:t.jsx(c.Circle,{size:16})})}),r&&t.jsxs("div",{className:"relative shrink-0 w-16 overflow-hidden rounded",style:{aspectRatio:"16/9"},children:[t.jsx("img",{src:r,alt:s,className:e.cn("size-full object-cover",i==="completed"&&"opacity-60")}),o&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:t.jsx(c.Play,{size:12,className:"ml-px text-white"})})]}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:e.cn("truncate text-sm",o?"font-medium text-primary":"text-foreground",i==="completed"&&!o&&"text-muted-foreground"),children:s}),a!=null&&a>0&&t.jsx("span",{className:"text-xs text-muted-foreground",children:e.formatDuration(a)})]})]});function T({children:r,colorMode:s="dark",className:a,style:i}){return t.jsx("div",{className:`hydra-root${s==="dark"?" dark":""}${a?` ${a}`:""}`,style:i,children:r})}function y({className:r,...s}){return t.jsx("span",{"data-slot":"avatar",className:e.cn("relative flex size-9 shrink-0 overflow-hidden rounded-full",r),...s})}function C({className:r,onError:s,...a}){return t.jsx("img",{"data-slot":"avatar-image",className:e.cn("aspect-square size-full object-cover",r),onError:s,...a})}function D({className:r,...s}){return t.jsx("span",{"data-slot":"avatar-fallback",className:e.cn("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",r),...s})}function A({className:r,...s}){return t.jsx("div",{"data-slot":"skeleton",className:e.cn("bg-muted animate-pulse rounded-md",r),...s})}exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogBackdrop=e.AlertDialogBackdrop;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogPortal=e.AlertDialogPortal;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.AssessmentToolbar=e.AssessmentToolbar;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardAction=e.CardAction;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Choice=e.Choice;exports.ConfirmDialog=e.ConfirmDialog;exports.ContentBlock=e.ContentBlock;exports.CurriculumItemRow=e.CurriculumItemRow;exports.CurriculumTree=e.CurriculumTree;exports.DueDateDisplay=e.DueDateDisplay;exports.EmptyState=e.EmptyState;exports.Essay=e.Essay;exports.FeedbackBanner=e.FeedbackBanner;exports.FileUploadZone=e.FileUploadZone;exports.FillInTheBlank=e.FillInTheBlank;exports.Flashcard=e.Flashcard;exports.FlashcardDeck=e.FlashcardDeck;exports.GradeIndicator=e.GradeIndicator;exports.Input=e.Input;exports.LearningObjectIcon=e.LearningObjectIcon;exports.LikertScale=e.LikertScale;exports.MultipleChoice=e.MultipleChoice;exports.PostCard=e.PostCard;exports.Progress=e.Progress;exports.ProgressRing=e.ProgressRing;exports.QuestionNavigator=e.QuestionNavigator;exports.QuestionRenderer=e.QuestionRenderer;exports.SearchInput=e.SearchInput;exports.Separator=e.Separator;exports.StarRating=e.StarRating;exports.StatCard=e.StatCard;exports.StatusBadge=e.StatusBadge;exports.Table=e.Table;exports.TableBody=e.TableBody;exports.TableCaption=e.TableCaption;exports.TableCell=e.TableCell;exports.TableFooter=e.TableFooter;exports.TableHead=e.TableHead;exports.TableHeader=e.TableHeader;exports.TableRow=e.TableRow;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.TimerDisplay=e.TimerDisplay;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipTrigger=e.TooltipTrigger;exports.TrueFalse=e.TrueFalse;exports.UserAvatar=e.UserAvatar;exports.VideoPlayer=e.VideoPlayer;exports.alertVariants=e.alertVariants;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.cn=e.cn;exports.progressVariants=e.progressVariants;exports.Avatar=y;exports.AvatarFallback=D;exports.AvatarImage=C;exports.HydraProvider=T;exports.Skeleton=A;exports.VideoBookmark=v;exports.VideoChapterList=h;exports.VideoPlaylistItem=N;exports.VideoThumbnailCard=j;exports.VideoTranscript=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tabs-BsfVo2Bl.cjs"),t=require("react/jsx-runtime"),d=require("react"),f=require("lucide-react"),v=require("./withProGate-DX6XqKLp.cjs"),R=require("react-dom"),V=require("class-variance-authority"),z=[{value:"low",label:"Guessing",icon:t.jsx(f.HelpCircle,{className:"size-3.5"})},{value:"medium",label:"Somewhat sure",icon:t.jsx(f.Brain,{className:"size-3.5"})},{value:"high",label:"Confident",icon:t.jsx(f.Lightbulb,{className:"size-3.5"})}],M=d.memo(function({value:s,onChange:a,levels:n=z,disabled:l=!1,readOnly:c=!1,className:i,style:o}){const m=l||c;return t.jsx("div",{"data-slot":"confidence-indicator",className:e.cn("flex items-center gap-1",i),style:o,role:"radiogroup","aria-label":"Confidence level",children:n.map(x=>{const u=s===x.value;return t.jsxs("button",{type:"button",role:"radio","aria-checked":u,"aria-label":x.label,disabled:m,onClick:()=>a(x.value),className:e.cn("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-all","border outline-none focus-visible:ring-2 focus-visible:ring-ring/50",u?"border-primary bg-primary/10 text-primary":"border-transparent bg-muted text-muted-foreground hover:bg-muted/80",m&&"opacity-50 pointer-events-none"),children:[x.icon,x.label]},x.value)})})}),F=({entries:r,currentTime:s=0,onSeek:a,readOnly:n=!1,maxHeight:l="400px",className:c,style:i})=>{const o=d.useRef(null),m=d.useRef(null),x=d.useMemo(()=>r.reduce((u,p,g)=>p.time<=s?g:u,-1),[r,s]);return d.useEffect(()=>{m.current&&o.current&&m.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[x]),r.length===0?t.jsxs("div",{className:e.cn("flex flex-col items-center justify-center gap-2 rounded-md border border-border bg-muted p-6",c),style:i,children:[t.jsx(f.Clock,{size:20,className:"text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"No transcript available"})]}):t.jsx("div",{ref:o,className:e.cn("overflow-y-auto rounded-md border border-border",c),style:{maxHeight:l,...i},children:r.map((u,p)=>{const g=p===x;return t.jsxs("div",{ref:g?m:void 0,className:e.cn("flex gap-3 px-3 py-2 text-sm transition-colors",g&&"bg-primary/10",!n&&a&&"cursor-pointer hover:bg-muted"),onClick:()=>!n&&(a==null?void 0:a(u.time)),role:!n&&a?"button":void 0,tabIndex:!n&&a?0:void 0,onKeyDown:!n&&a?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),a(u.time))}:void 0,children:[t.jsx("span",{className:e.cn("shrink-0 font-mono text-xs tabular-nums pt-0.5",g?"text-primary font-medium":"text-muted-foreground"),children:e.formatTimer(Math.floor(u.time))}),t.jsxs("div",{className:"min-w-0",children:[u.speaker&&t.jsxs("span",{className:"mr-1 font-semibold text-foreground",children:[u.speaker,":"]}),t.jsx("span",{className:g?"text-foreground":"text-muted-foreground",children:u.text})]})]},`${u.time}-${u.text.slice(0,20)}`)})})},L=({chapters:r,currentTime:s=0,onSeek:a,className:n,style:l})=>{const c=d.useMemo(()=>r.reduce((i,o,m)=>o.time<=s?m:i,-1),[r,s]);return t.jsx("div",{className:e.cn("divide-y divide-border rounded-md border border-border",n),style:l,children:r.map((i,o)=>{const m=o===c;return t.jsxs("div",{className:e.cn("flex items-center gap-3 p-3 transition-colors",m&&"bg-primary/10",a&&"cursor-pointer hover:bg-muted"),onClick:()=>a==null?void 0:a(i.time),role:a?"button":void 0,tabIndex:a?0:void 0,onKeyDown:a?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a(i.time))}:void 0,children:[i.thumbnail?t.jsxs("div",{className:"relative shrink-0 w-16 overflow-hidden rounded",style:{aspectRatio:"16/9"},children:[t.jsx("img",{src:i.thumbnail,alt:i.title,loading:"lazy",className:"size-full object-cover"}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:t.jsx(f.Play,{size:14,className:"ml-px text-white"})})]}):t.jsx("div",{className:e.cn("flex shrink-0 items-center justify-center size-8 rounded-full",m?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:t.jsx("span",{className:"text-xs font-semibold",children:o+1})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:e.cn("truncate text-sm font-medium",m?"text-primary":"text-foreground"),children:i.title}),t.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[t.jsx("span",{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.formatTimer(Math.floor(i.time))}),i.duration!=null&&i.duration>0&&t.jsx("span",{className:"text-xs text-muted-foreground",children:e.formatDuration(i.duration)})]})]})]},i.time)})})},H=({poster:r,title:s,duration:a,progress:n,onClick:l,className:c,style:i})=>t.jsxs("div",{className:e.cn("group overflow-hidden rounded-lg border border-border transition-colors",l&&"cursor-pointer hover:border-primary/50 hover:shadow-sm",c),style:i,onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,onKeyDown:l?o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),l())}:void 0,children:[t.jsxs("div",{className:"relative overflow-hidden",style:{aspectRatio:"16/9"},children:[r?t.jsx("img",{src:r,alt:s,loading:"lazy",className:"size-full object-cover transition-transform duration-300 group-hover:scale-105"}):t.jsx("div",{className:"flex size-full items-center justify-center bg-muted",children:t.jsx(f.Video,{size:32,className:"text-muted-foreground"})}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/0 transition-colors group-hover:bg-black/20",children:t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(f.Play,{size:20,className:"ml-0.5 text-white"})})}),a!=null&&a>0&&t.jsx("span",{className:"absolute bottom-2 right-2 rounded bg-black/75 px-1.5 py-0.5 text-xs font-medium tabular-nums text-white",children:e.formatDuration(a)})]}),t.jsx("div",{className:"p-3",children:t.jsx("h4",{className:"truncate text-sm font-medium text-foreground",children:s})}),n!=null&&n>=0&&t.jsx("div",{className:"px-3 pb-3",children:t.jsx(e.Progress,{value:n,size:"sm",variant:n>=100?"success":"default"})})]}),E=d.memo(function({bookmark:s,onSeek:a,onDelete:n,onEdit:l,className:c,style:i}){return t.jsxs("div",{className:e.cn("flex items-start gap-3 rounded-md border border-border p-3",c),style:i,children:[t.jsx("div",{className:"flex shrink-0 items-center justify-center size-8 rounded-full bg-primary/10 text-primary",children:t.jsx(f.Bookmark,{size:16})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("button",{type:"button",className:e.cn("font-mono text-xs font-medium tabular-nums",a?"cursor-pointer text-primary hover:underline":"text-muted-foreground"),onClick:()=>a==null?void 0:a(s.time),disabled:!a,children:e.formatTimer(Math.floor(s.time))}),s.note&&t.jsx("p",{className:"mt-0.5 text-sm text-foreground",children:s.note}),s.createdAt&&t.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(s.createdAt).toLocaleDateString()})]}),(l||n)&&t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l&&t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":"Edit bookmark",onClick:()=>l(s.id),children:t.jsx(f.Pencil,{size:14})}),n&&t.jsx("button",{type:"button",className:"inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive","aria-label":"Delete bookmark",onClick:()=>n(s.id),children:t.jsx(f.Trash2,{size:14})})]})]})}),Q=d.memo(function({thumbnail:s,title:a,duration:n,status:l="unwatched",isActive:c=!1,index:i,onClick:o,className:m,style:x}){return t.jsxs("div",{className:e.cn("flex items-center gap-3 rounded-md px-3 py-2 transition-colors",c&&"bg-primary/10",o&&"cursor-pointer hover:bg-muted",m),style:x,onClick:o,role:o?"button":void 0,tabIndex:o?0:void 0,onKeyDown:o?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o())}:void 0,children:[t.jsx("div",{className:"flex shrink-0 items-center justify-center size-6",children:l==="completed"?t.jsx("span",{className:"text-success",children:t.jsx(f.CheckCircle2,{size:18})}):c?t.jsx("span",{className:"text-primary",children:t.jsx(f.Play,{size:16,className:"ml-px"})}):i!=null?t.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground",children:i}):t.jsx("span",{className:"text-muted-foreground",children:t.jsx(f.Circle,{size:16})})}),s&&t.jsxs("div",{className:"relative shrink-0 w-16 overflow-hidden rounded",style:{aspectRatio:"16/9"},children:[t.jsx("img",{src:s,alt:a,loading:"lazy",className:e.cn("size-full object-cover",l==="completed"&&"opacity-60")}),c&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:t.jsx(f.Play,{size:12,className:"ml-px text-white"})})]}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:e.cn("truncate text-sm",c?"font-medium text-primary":"text-foreground",l==="completed"&&!c&&"text-muted-foreground"),children:a}),n!=null&&n>0&&t.jsx("span",{className:"text-xs text-muted-foreground",children:e.formatDuration(n)})]})]})});function S({durationSeconds:r,warningThresholdSeconds:s=60,onExpire:a,onWarning:n,autoStart:l=!1}){const[c,i]=d.useState(r),o=d.useRef(l?"running":"idle"),m=d.useRef(null),x=d.useRef(a),u=d.useRef(n),p=d.useRef(!1);x.current=a,u.current=n;const g=d.useCallback(()=>{m.current!=null&&(clearInterval(m.current),m.current=null)},[]),b=d.useCallback(()=>{g(),m.current=setInterval(()=>{i(y=>{var C,D;const h=y-1;return!p.current&&h<=s&&h>0&&(p.current=!0,(C=u.current)==null||C.call(u)),h<=0?(g(),o.current="expired",(D=x.current)==null||D.call(x),0):h})},1e3)},[g,s]),P=d.useCallback(()=>{i(r),p.current=!1,o.current="running",b()},[r,b]),I=d.useCallback(()=>{o.current==="running"&&(g(),o.current="paused",i(y=>y))},[g]),k=d.useCallback(()=>{o.current==="paused"&&(o.current="running",b())},[b]),B=d.useCallback(()=>{g(),o.current="idle",p.current=!1,i(r)},[g,r]);d.useEffect(()=>(l&&b(),g),[l,b,g]);const j=o.current;return{timeRemaining:c,isRunning:j==="running",isPaused:j==="paused",isExpired:j==="expired",isWarning:c<=s&&c>0,start:P,pause:I,resume:k,reset:B}}function q({children:r,colorMode:s="dark",licenseKey:a,validateUrl:n,className:l,style:c}){return t.jsx(v.HydraLicenseProvider,{licenseKey:a,validateUrl:n,children:t.jsx("div",{className:`hydra-root${s==="dark"?" dark":""}${l?` ${l}`:""}`,style:c,children:r})})}function G({className:r,...s}){return t.jsx("textarea",{"data-slot":"textarea",className:e.cn("placeholder:text-muted-foreground border-input flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 aria-invalid:border-destructive",r),...s})}function O({className:r,...s}){return t.jsx("span",{"data-slot":"avatar",className:e.cn("relative flex size-9 shrink-0 overflow-hidden rounded-full",r),...s})}function U({className:r,onError:s,...a}){return t.jsx("img",{"data-slot":"avatar-image",className:e.cn("aspect-square size-full object-cover",r),onError:s,...a})}function $({className:r,...s}){return t.jsx("span",{"data-slot":"avatar-fallback",className:e.cn("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",r),...s})}const T=V.cva("pointer-events-auto relative flex w-full items-start gap-3 rounded-lg border p-4 pr-8 shadow-lg text-sm transition-all",{variants:{variant:{success:"border-success/50 bg-success/5 text-success [&>svg]:text-success",error:"border-destructive/50 bg-destructive/5 text-destructive [&>svg]:text-destructive",warning:"border-warning/50 bg-warning/5 text-warning [&>svg]:text-warning",info:"border-info/50 bg-info/5 text-info [&>svg]:text-info"}},defaultVariants:{variant:"info"}}),w=d.createContext(null),K={success:f.CheckCircle2,error:f.AlertCircle,warning:f.AlertTriangle,info:f.Info};function _({item:r,onDismiss:s}){const a=d.useRef(void 0),n=r.duration??5e3,l=K[r.variant??"info"];return d.useEffect(()=>(n>0&&(a.current=setTimeout(()=>s(r.id),n)),()=>clearTimeout(a.current)),[n,r.id,s]),t.jsxs("div",{"data-slot":"toast",role:"status","aria-live":"polite",className:e.cn(T({variant:r.variant??"info"})),children:[t.jsx(l,{className:"size-4 shrink-0 translate-y-0.5"}),t.jsxs("div",{className:"flex-1 space-y-1",children:[r.title&&t.jsx("p",{className:"font-medium leading-none",children:r.title}),t.jsx("p",{className:"text-sm opacity-90",children:r.message})]}),t.jsx("button",{type:"button",onClick:()=>s(r.id),"aria-label":"Dismiss notification",className:"absolute right-2 top-2 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:t.jsx(f.X,{className:"size-3.5"})})]})}let Z=0;function N({children:r}){const[s,a]=d.useState([]),n=d.useCallback(c=>{const i=`toast-${++Z}`;a(o=>[...o.slice(-2),{...c,id:i}])},[]),l=d.useCallback(c=>{a(i=>i.filter(o=>o.id!==c))},[]);return t.jsxs(w.Provider,{value:{toast:n},children:[r,typeof document<"u"&&R.createPortal(t.jsx("div",{"data-slot":"toaster",className:"fixed top-4 right-4 z-50 flex flex-col gap-2 w-80 pointer-events-none",children:s.map(c=>t.jsx(_,{item:c,onDismiss:l},c.id))}),document.body)]})}function X(){const r=d.useContext(w);if(!r)throw new Error("useToast must be used within a ToastProvider");return r}const J=N,A=new Set(["QuizModule","FlashcardLab","CoursePlayer","ExamModule","SurveyModule","GradeCenterModule","AssignmentModule","CertificateModule","DiscussionModule","StudentDashboardModule","CourseCatalogModule","StudentProfileModule"]);function Y(r){return A.has(r)}exports.AchievementBadge=e.AchievementBadge;exports.ActivityTimeline=e.ActivityTimeline;exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogBackdrop=e.AlertDialogBackdrop;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogPortal=e.AlertDialogPortal;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.AssessmentToolbar=e.AssessmentToolbar;exports.AttachmentList=e.AttachmentList;exports.AudioPlayer=e.AudioPlayer;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardAction=e.CardAction;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Choice=e.Choice;exports.CodeBlock=e.CodeBlock;exports.ConfirmDialog=e.ConfirmDialog;exports.ContentBlock=e.ContentBlock;exports.CourseCard=e.CourseCard;exports.CurriculumItemRow=e.CurriculumItemRow;exports.CurriculumTree=e.CurriculumTree;exports.Drawer=e.Drawer;exports.DrawerBackdrop=e.DrawerBackdrop;exports.DrawerBody=e.DrawerBody;exports.DrawerClose=e.DrawerClose;exports.DrawerContent=e.DrawerContent;exports.DrawerDescription=e.DrawerDescription;exports.DrawerFooter=e.DrawerFooter;exports.DrawerHeader=e.DrawerHeader;exports.DrawerNav=e.DrawerNav;exports.DrawerNavItem=e.DrawerNavItem;exports.DrawerPortal=e.DrawerPortal;exports.DrawerTitle=e.DrawerTitle;exports.DrawerTrigger=e.DrawerTrigger;exports.DrawerViewport=e.DrawerViewport;exports.DueDateDisplay=e.DueDateDisplay;exports.EmbedBlock=e.EmbedBlock;exports.EmptyState=e.EmptyState;exports.Essay=e.Essay;exports.FeedbackBanner=e.FeedbackBanner;exports.FileUploadZone=e.FileUploadZone;exports.FillInTheBlank=e.FillInTheBlank;exports.Flashcard=e.Flashcard;exports.FlashcardDeck=e.FlashcardDeck;exports.GradeIndicator=e.GradeIndicator;exports.Hotspot=e.Hotspot;exports.InlineChoice=e.InlineChoice;exports.Input=e.Input;exports.LearningObjectIcon=e.LearningObjectIcon;exports.LikertScale=e.LikertScale;exports.Matching=e.Matching;exports.MultipleChoice=e.MultipleChoice;exports.Numeric=e.Numeric;exports.Ordering=e.Ordering;exports.Pagination=e.Pagination;exports.PostCard=e.PostCard;exports.Progress=e.Progress;exports.ProgressRing=e.ProgressRing;exports.QuestionHeaderBar=e.QuestionHeaderBar;exports.QuestionMaterialsDrawer=e.QuestionMaterialsDrawer;exports.QuestionNavigator=e.QuestionNavigator;exports.QuestionRenderer=e.QuestionRenderer;exports.RichTextEditor=e.RichTextEditor;exports.Scenario=e.Scenario;exports.SearchInput=e.SearchInput;exports.Separator=e.Separator;exports.Skeleton=e.Skeleton;exports.Spreadsheet=e.Spreadsheet;exports.StarRating=e.StarRating;exports.StatCard=e.StatCard;exports.StatusBadge=e.StatusBadge;exports.Stepper=e.Stepper;exports.StreakBadge=e.StreakBadge;exports.Table=e.Table;exports.TableBody=e.TableBody;exports.TableCaption=e.TableCaption;exports.TableCell=e.TableCell;exports.TableFooter=e.TableFooter;exports.TableHead=e.TableHead;exports.TableHeader=e.TableHeader;exports.TableRow=e.TableRow;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.TimerDisplay=e.TimerDisplay;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipTrigger=e.TooltipTrigger;exports.TrueFalse=e.TrueFalse;exports.UserAvatar=e.UserAvatar;exports.VideoPlayer=e.VideoPlayer;exports.alertVariants=e.alertVariants;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.cn=e.cn;exports.drawerContentVariants=e.drawerContentVariants;exports.progressVariants=e.progressVariants;exports.scoreQuestion=e.scoreQuestion;exports.scoreScenarioSubQuestions=e.scoreScenarioSubQuestions;exports.HydraLicenseContext=v.HydraLicenseContext;exports.HydraLicenseProvider=v.HydraLicenseProvider;exports.ProBadge=v.ProBadge;exports.useHydraLicense=v.useHydraLicense;exports.withProGate=v.withProGate;exports.Avatar=O;exports.AvatarFallback=$;exports.AvatarImage=U;exports.ConfidenceIndicator=M;exports.HydraProvider=q;exports.PRO_MODULES=A;exports.Textarea=G;exports.ToastProvider=N;exports.Toaster=J;exports.VideoBookmark=E;exports.VideoChapterList=L;exports.VideoPlaylistItem=Q;exports.VideoThumbnailCard=H;exports.VideoTranscript=F;exports.isProModule=Y;exports.toastVariants=T;exports.useCountdown=S;exports.useToast=X;
package/dist/index.d.ts CHANGED
@@ -10,4 +10,5 @@ export * from './social';
10
10
  export * from './content';
11
11
  export * from './provider';
12
12
  export * from './ui';
13
+ export * from './license';
13
14
  export { cn } from './lib/utils';