@intellectif/lk-react 23.1.0 → 23.1.2

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 (360) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +9 -5
  3. package/dist/ActivityErrorBoundary-B379hvtL.cjs +39 -0
  4. package/dist/ActivityErrorBoundary-B379hvtL.cjs.map +1 -0
  5. package/dist/ActivityErrorBoundary-Dw6SbWv3.js +34 -0
  6. package/dist/ActivityErrorBoundary-Dw6SbWv3.js.map +1 -0
  7. package/dist/ActivityMedia-CQQTRNl7.cjs +641 -0
  8. package/dist/ActivityMedia-CQQTRNl7.cjs.map +1 -0
  9. package/dist/ActivityMedia-vDiP-Psa.js +636 -0
  10. package/dist/ActivityMedia-vDiP-Psa.js.map +1 -0
  11. package/dist/ActivityPreview-1hhTkYuj.js +240 -0
  12. package/dist/ActivityPreview-1hhTkYuj.js.map +1 -0
  13. package/dist/ActivityPreview-BKr34exz.cjs +245 -0
  14. package/dist/ActivityPreview-BKr34exz.cjs.map +1 -0
  15. package/dist/ActivitySequence-CkX87pfB.js +839 -0
  16. package/dist/ActivitySequence-CkX87pfB.js.map +1 -0
  17. package/dist/ActivitySequence-CmoSyDnp.cjs +844 -0
  18. package/dist/ActivitySequence-CmoSyDnp.cjs.map +1 -0
  19. package/dist/Dictation-BlxRp-3k.js +926 -0
  20. package/dist/Dictation-BlxRp-3k.js.map +1 -0
  21. package/dist/Dictation-jECzL88E.cjs +931 -0
  22. package/dist/Dictation-jECzL88E.cjs.map +1 -0
  23. package/dist/FeedbackRegion-BNNMtTY-.cjs +108 -0
  24. package/dist/FeedbackRegion-BNNMtTY-.cjs.map +1 -0
  25. package/dist/FeedbackRegion-CyPSp8bA.js +85 -0
  26. package/dist/FeedbackRegion-CyPSp8bA.js.map +1 -0
  27. package/dist/FillInTheBlanks-B6xzqYXx.js +474 -0
  28. package/dist/FillInTheBlanks-B6xzqYXx.js.map +1 -0
  29. package/dist/FillInTheBlanks-BpKhdHg2.cjs +479 -0
  30. package/dist/FillInTheBlanks-BpKhdHg2.cjs.map +1 -0
  31. package/dist/GapSelect-DUSiaEQH.js +441 -0
  32. package/dist/GapSelect-DUSiaEQH.js.map +1 -0
  33. package/dist/GapSelect-payTq_Zn.cjs +446 -0
  34. package/dist/GapSelect-payTq_Zn.cjs.map +1 -0
  35. package/dist/InteractiveVideo-BguGv-HA.cjs +2955 -0
  36. package/dist/InteractiveVideo-BguGv-HA.cjs.map +1 -0
  37. package/dist/InteractiveVideo-Cg2jbU3j.js +2944 -0
  38. package/dist/InteractiveVideo-Cg2jbU3j.js.map +1 -0
  39. package/dist/LkAiProvider-DAPpA3PQ.d.cts +84 -0
  40. package/dist/LkAiProvider-DAPpA3PQ.d.cts.map +1 -0
  41. package/dist/LkAiProvider-QdEcIhoo.d.ts +84 -0
  42. package/dist/LkAiProvider-QdEcIhoo.d.ts.map +1 -0
  43. package/dist/LkIntlProvider-D_FdYXjQ.js +375 -0
  44. package/dist/LkIntlProvider-D_FdYXjQ.js.map +1 -0
  45. package/dist/LkIntlProvider-oi57lYB0.cjs +410 -0
  46. package/dist/LkIntlProvider-oi57lYB0.cjs.map +1 -0
  47. package/dist/MultipleChoice-COn5MtKY.cjs +433 -0
  48. package/dist/MultipleChoice-COn5MtKY.cjs.map +1 -0
  49. package/dist/MultipleChoice-Dra0_KYD.js +428 -0
  50. package/dist/MultipleChoice-Dra0_KYD.js.map +1 -0
  51. package/dist/PronunciationFeedback-DlMPGjkR.cjs +831 -0
  52. package/dist/PronunciationFeedback-DlMPGjkR.cjs.map +1 -0
  53. package/dist/PronunciationFeedback-Dxd6XPkO.js +772 -0
  54. package/dist/PronunciationFeedback-Dxd6XPkO.js.map +1 -0
  55. package/dist/ReadAloud-C8RhaUqV.js +1092 -0
  56. package/dist/{chunk-DC4CQCK5.js.map → ReadAloud-C8RhaUqV.js.map} +1 -1
  57. package/dist/ReadAloud-akDehitT.cjs +1103 -0
  58. package/dist/ReadAloud-akDehitT.cjs.map +1 -0
  59. package/dist/StimulusPanel-BgzByfkb.js +74 -0
  60. package/dist/StimulusPanel-BgzByfkb.js.map +1 -0
  61. package/dist/StimulusPanel-b66gaN3i.cjs +79 -0
  62. package/dist/StimulusPanel-b66gaN3i.cjs.map +1 -0
  63. package/dist/ThemeProvider-B6DyGqzh.d.cts +62 -0
  64. package/dist/ThemeProvider-B6DyGqzh.d.cts.map +1 -0
  65. package/dist/ThemeProvider-BCrxBaY-.d.ts +62 -0
  66. package/dist/ThemeProvider-BCrxBaY-.d.ts.map +1 -0
  67. package/dist/ThemeProvider-BRN1tj4n.cjs +187 -0
  68. package/dist/ThemeProvider-BRN1tj4n.cjs.map +1 -0
  69. package/dist/ThemeProvider-C7K9iMLX.js +158 -0
  70. package/dist/ThemeProvider-C7K9iMLX.js.map +1 -0
  71. package/dist/WrittenResponse-Bj3eFmGl.cjs +491 -0
  72. package/dist/WrittenResponse-Bj3eFmGl.cjs.map +1 -0
  73. package/dist/WrittenResponse-Cl8G6nO_.js +486 -0
  74. package/dist/WrittenResponse-Cl8G6nO_.js.map +1 -0
  75. package/dist/ai/LkAiProvider.cjs +34 -14
  76. package/dist/ai/LkAiProvider.cjs.map +1 -1
  77. package/dist/ai/LkAiProvider.d.cts +2 -83
  78. package/dist/ai/LkAiProvider.d.ts +2 -83
  79. package/dist/ai/LkAiProvider.js +33 -2
  80. package/dist/ai/LkAiProvider.js.map +1 -1
  81. package/dist/ai/useAiHelp.cjs +7 -25
  82. package/dist/ai/useAiHelp.d.cts +175 -177
  83. package/dist/ai/useAiHelp.d.cts.map +1 -0
  84. package/dist/ai/useAiHelp.d.ts +175 -177
  85. package/dist/ai/useAiHelp.d.ts.map +1 -0
  86. package/dist/ai/useAiHelp.js +3 -4
  87. package/dist/components/ActivityPreview.cjs +3 -29
  88. package/dist/components/ActivityPreview.d.cts +2 -81
  89. package/dist/components/ActivityPreview.d.ts +2 -81
  90. package/dist/components/ActivityPreview.js +2 -20
  91. package/dist/components/ActivitySequence.cjs +3 -30
  92. package/dist/components/ActivitySequence.d.cts +2 -432
  93. package/dist/components/ActivitySequence.d.ts +2 -432
  94. package/dist/components/ActivitySequence.js +2 -21
  95. package/dist/components/Dictation.cjs +4 -21
  96. package/dist/components/Dictation.d.cts +2 -19
  97. package/dist/components/Dictation.d.ts +2 -19
  98. package/dist/components/Dictation.js +3 -12
  99. package/dist/components/FillInTheBlanks.cjs +4 -20
  100. package/dist/components/FillInTheBlanks.d.cts +2 -30
  101. package/dist/components/FillInTheBlanks.d.ts +2 -30
  102. package/dist/components/FillInTheBlanks.js +3 -11
  103. package/dist/components/GapSelect.cjs +4 -20
  104. package/dist/components/GapSelect.d.cts +2 -27
  105. package/dist/components/GapSelect.d.ts +2 -27
  106. package/dist/components/GapSelect.js +3 -11
  107. package/dist/components/InteractiveVideo.cjs +5 -32
  108. package/dist/components/InteractiveVideo.d.cts +3 -291
  109. package/dist/components/InteractiveVideo.d.ts +3 -291
  110. package/dist/components/InteractiveVideo.js +3 -19
  111. package/dist/components/MultipleChoice.cjs +4 -20
  112. package/dist/components/MultipleChoice.d.cts +2 -26
  113. package/dist/components/MultipleChoice.d.ts +2 -26
  114. package/dist/components/MultipleChoice.js +3 -11
  115. package/dist/components/PronunciationFeedback.cjs +4 -17
  116. package/dist/components/PronunciationFeedback.d.cts +2 -90
  117. package/dist/components/PronunciationFeedback.d.ts +2 -90
  118. package/dist/components/PronunciationFeedback.js +3 -8
  119. package/dist/components/ReadAloud.cjs +4 -22
  120. package/dist/components/ReadAloud.d.cts +7 -11
  121. package/dist/components/ReadAloud.d.cts.map +1 -0
  122. package/dist/components/ReadAloud.d.ts +7 -11
  123. package/dist/components/ReadAloud.d.ts.map +1 -0
  124. package/dist/components/ReadAloud.js +3 -13
  125. package/dist/components/StimulusPanel.cjs +3 -14
  126. package/dist/components/StimulusPanel.d.cts +2 -51
  127. package/dist/components/StimulusPanel.d.ts +2 -51
  128. package/dist/components/StimulusPanel.js +2 -5
  129. package/dist/components/WrittenResponse.cjs +4 -19
  130. package/dist/components/WrittenResponse.d.cts +3 -18
  131. package/dist/components/WrittenResponse.d.ts +3 -18
  132. package/dist/components/WrittenResponse.js +3 -10
  133. package/dist/direction-Dq0_HtA5.js +183 -0
  134. package/dist/direction-Dq0_HtA5.js.map +1 -0
  135. package/dist/direction-K1pj0HCA.cjs +200 -0
  136. package/dist/direction-K1pj0HCA.cjs.map +1 -0
  137. package/dist/hooks/useActivityState.cjs +28 -10
  138. package/dist/hooks/useActivityState.cjs.map +1 -1
  139. package/dist/hooks/useActivityState.d.cts +25 -24
  140. package/dist/hooks/useActivityState.d.cts.map +1 -0
  141. package/dist/hooks/useActivityState.d.ts +25 -24
  142. package/dist/hooks/useActivityState.d.ts.map +1 -0
  143. package/dist/hooks/useActivityState.js +28 -2
  144. package/dist/hooks/useActivityState.js.map +1 -1
  145. package/dist/hooks/useSpeechRecorder.cjs +5 -16
  146. package/dist/hooks/useSpeechRecorder.d.cts +2 -127
  147. package/dist/hooks/useSpeechRecorder.d.ts +2 -127
  148. package/dist/hooks/useSpeechRecorder.js +3 -3
  149. package/dist/hooks/useXAPI.cjs +126 -10
  150. package/dist/hooks/useXAPI.cjs.map +1 -1
  151. package/dist/hooks/useXAPI.d.cts +14 -14
  152. package/dist/hooks/useXAPI.d.cts.map +1 -0
  153. package/dist/hooks/useXAPI.d.ts +14 -14
  154. package/dist/hooks/useXAPI.d.ts.map +1 -0
  155. package/dist/hooks/useXAPI.js +126 -2
  156. package/dist/hooks/useXAPI.js.map +1 -1
  157. package/dist/i18n/LkIntlProvider.cjs +9 -32
  158. package/dist/i18n/LkIntlProvider.d.cts +34 -38
  159. package/dist/i18n/LkIntlProvider.d.cts.map +1 -0
  160. package/dist/i18n/LkIntlProvider.d.ts +34 -38
  161. package/dist/i18n/LkIntlProvider.d.ts.map +1 -0
  162. package/dist/i18n/LkIntlProvider.js +3 -3
  163. package/dist/index-6P4rJHrJ.d.cts +432 -0
  164. package/dist/index-6P4rJHrJ.d.cts.map +1 -0
  165. package/dist/index-90CX504k.d.ts +90 -0
  166. package/dist/index-90CX504k.d.ts.map +1 -0
  167. package/dist/index-B_SgnjsC.d.cts +291 -0
  168. package/dist/index-B_SgnjsC.d.cts.map +1 -0
  169. package/dist/index-BavVW5z5.d.cts +25 -0
  170. package/dist/index-BavVW5z5.d.cts.map +1 -0
  171. package/dist/index-BhHv6Fiu.d.cts +28 -0
  172. package/dist/index-BhHv6Fiu.d.cts.map +1 -0
  173. package/dist/index-Bsu8VciA.d.ts +432 -0
  174. package/dist/index-Bsu8VciA.d.ts.map +1 -0
  175. package/dist/index-C1KGpD1k.d.ts +49 -0
  176. package/dist/index-C1KGpD1k.d.ts.map +1 -0
  177. package/dist/index-CKTpYTCC.d.cts +49 -0
  178. package/dist/index-CKTpYTCC.d.cts.map +1 -0
  179. package/dist/index-CO_SRFJj.d.ts +16 -0
  180. package/dist/index-CO_SRFJj.d.ts.map +1 -0
  181. package/dist/index-CSsuUsP7.d.cts +124 -0
  182. package/dist/index-CSsuUsP7.d.cts.map +1 -0
  183. package/dist/index-CunUyeuN.d.cts +78 -0
  184. package/dist/index-CunUyeuN.d.cts.map +1 -0
  185. package/dist/index-CzfRzks6.d.cts +90 -0
  186. package/dist/index-CzfRzks6.d.cts.map +1 -0
  187. package/dist/index-D14xtpBS.d.cts +24 -0
  188. package/dist/index-D14xtpBS.d.cts.map +1 -0
  189. package/dist/index-DHRPAPZf.d.ts +291 -0
  190. package/dist/index-DHRPAPZf.d.ts.map +1 -0
  191. package/dist/index-DLV6cK26.d.cts +16 -0
  192. package/dist/index-DLV6cK26.d.cts.map +1 -0
  193. package/dist/index-DbCCQ9cP.d.ts +124 -0
  194. package/dist/index-DbCCQ9cP.d.ts.map +1 -0
  195. package/dist/index-DeV5B2m5.d.ts +24 -0
  196. package/dist/index-DeV5B2m5.d.ts.map +1 -0
  197. package/dist/index-TZCJVSge.d.ts +28 -0
  198. package/dist/index-TZCJVSge.d.ts.map +1 -0
  199. package/dist/index-ZVvLHsd3.d.ts +25 -0
  200. package/dist/index-ZVvLHsd3.d.ts.map +1 -0
  201. package/dist/index-eQwBgpSw.d.ts +78 -0
  202. package/dist/index-eQwBgpSw.d.ts.map +1 -0
  203. package/dist/index.cjs +118 -163
  204. package/dist/index.cjs.map +1 -1
  205. package/dist/index.d.cts +20 -24
  206. package/dist/index.d.ts +20 -24
  207. package/dist/index.js +84 -29
  208. package/dist/index.js.map +1 -1
  209. package/dist/theme/ThemeProvider.cjs +8 -28
  210. package/dist/theme/ThemeProvider.d.cts +2 -59
  211. package/dist/theme/ThemeProvider.d.ts +2 -59
  212. package/dist/theme/ThemeProvider.js +3 -3
  213. package/dist/tries-CbbtZkdG.cjs +363 -0
  214. package/dist/tries-CbbtZkdG.cjs.map +1 -0
  215. package/dist/tries-DTHSrLCm.js +310 -0
  216. package/dist/tries-DTHSrLCm.js.map +1 -0
  217. package/dist/types-BOQd93x3.d.cts +994 -0
  218. package/dist/types-BOQd93x3.d.cts.map +1 -0
  219. package/dist/types-HIrgF_mS.d.ts +994 -0
  220. package/dist/types-HIrgF_mS.d.ts.map +1 -0
  221. package/dist/useAiHelp-B-ccDL5Q.js +906 -0
  222. package/dist/useAiHelp-B-ccDL5Q.js.map +1 -0
  223. package/dist/useAiHelp-h9yOLFqt.cjs +995 -0
  224. package/dist/useAiHelp-h9yOLFqt.cjs.map +1 -0
  225. package/dist/useSpeechRecorder--O_f-xvt.cjs +720 -0
  226. package/dist/useSpeechRecorder--O_f-xvt.cjs.map +1 -0
  227. package/dist/useSpeechRecorder-DtAYvl02.d.cts +154 -0
  228. package/dist/useSpeechRecorder-DtAYvl02.d.cts.map +1 -0
  229. package/dist/useSpeechRecorder-DtAYvl02.d.ts +154 -0
  230. package/dist/useSpeechRecorder-DtAYvl02.d.ts.map +1 -0
  231. package/dist/useSpeechRecorder-zIi9Dlw8.js +709 -0
  232. package/dist/useSpeechRecorder-zIi9Dlw8.js.map +1 -0
  233. package/package.json +10 -11
  234. package/dist/WrittenResponse-B7A5gHMj.d.ts +0 -115
  235. package/dist/WrittenResponse-BpL9p2Hn.d.cts +0 -115
  236. package/dist/ai/useAiHelp.cjs.map +0 -1
  237. package/dist/ai/useAiHelp.js.map +0 -1
  238. package/dist/chunk-2PNSVBLQ.cjs +0 -54
  239. package/dist/chunk-2PNSVBLQ.cjs.map +0 -1
  240. package/dist/chunk-2TW6WLBC.js +0 -80
  241. package/dist/chunk-2TW6WLBC.js.map +0 -1
  242. package/dist/chunk-4ZZWZSWI.js +0 -61
  243. package/dist/chunk-4ZZWZSWI.js.map +0 -1
  244. package/dist/chunk-6N43WDVG.js +0 -29
  245. package/dist/chunk-6N43WDVG.js.map +0 -1
  246. package/dist/chunk-7ALBSPYR.cjs +0 -436
  247. package/dist/chunk-7ALBSPYR.cjs.map +0 -1
  248. package/dist/chunk-7NFY3M3W.js +0 -234
  249. package/dist/chunk-7NFY3M3W.js.map +0 -1
  250. package/dist/chunk-7SB2MJA4.js +0 -29
  251. package/dist/chunk-7SB2MJA4.js.map +0 -1
  252. package/dist/chunk-ABJJ3LII.js +0 -434
  253. package/dist/chunk-ABJJ3LII.js.map +0 -1
  254. package/dist/chunk-BIGGXHAW.cjs +0 -342
  255. package/dist/chunk-BIGGXHAW.cjs.map +0 -1
  256. package/dist/chunk-C7QZE5BI.js +0 -430
  257. package/dist/chunk-C7QZE5BI.js.map +0 -1
  258. package/dist/chunk-CWTUWNV3.cjs +0 -2937
  259. package/dist/chunk-CWTUWNV3.cjs.map +0 -1
  260. package/dist/chunk-DC4CQCK5.js +0 -915
  261. package/dist/chunk-DS6HN3YR.cjs +0 -496
  262. package/dist/chunk-DS6HN3YR.cjs.map +0 -1
  263. package/dist/chunk-FDQR4GAZ.js +0 -240
  264. package/dist/chunk-FDQR4GAZ.js.map +0 -1
  265. package/dist/chunk-FKGMSOJF.js +0 -394
  266. package/dist/chunk-FKGMSOJF.js.map +0 -1
  267. package/dist/chunk-G6PXJ2SA.js +0 -823
  268. package/dist/chunk-G6PXJ2SA.js.map +0 -1
  269. package/dist/chunk-HNLRVRQR.js +0 -335
  270. package/dist/chunk-HNLRVRQR.js.map +0 -1
  271. package/dist/chunk-J3C72RPK.cjs +0 -31
  272. package/dist/chunk-J3C72RPK.cjs.map +0 -1
  273. package/dist/chunk-K63VPFOV.cjs +0 -134
  274. package/dist/chunk-K63VPFOV.cjs.map +0 -1
  275. package/dist/chunk-KFLIDTDU.cjs +0 -825
  276. package/dist/chunk-KFLIDTDU.cjs.map +0 -1
  277. package/dist/chunk-KHKH5LCT.cjs +0 -250
  278. package/dist/chunk-KHKH5LCT.cjs.map +0 -1
  279. package/dist/chunk-LBEKRN6Y.cjs +0 -664
  280. package/dist/chunk-LBEKRN6Y.cjs.map +0 -1
  281. package/dist/chunk-LPUWXIPR.cjs +0 -578
  282. package/dist/chunk-LPUWXIPR.cjs.map +0 -1
  283. package/dist/chunk-MCO52PV5.js +0 -520
  284. package/dist/chunk-MCO52PV5.js.map +0 -1
  285. package/dist/chunk-MKXEM2C5.cjs +0 -396
  286. package/dist/chunk-MKXEM2C5.cjs.map +0 -1
  287. package/dist/chunk-MXNC5UNO.js +0 -563
  288. package/dist/chunk-MXNC5UNO.js.map +0 -1
  289. package/dist/chunk-NAK55BYU.cjs +0 -859
  290. package/dist/chunk-NAK55BYU.cjs.map +0 -1
  291. package/dist/chunk-NDBMKGQ5.cjs +0 -599
  292. package/dist/chunk-NDBMKGQ5.cjs.map +0 -1
  293. package/dist/chunk-OD65OZIW.cjs +0 -159
  294. package/dist/chunk-OD65OZIW.cjs.map +0 -1
  295. package/dist/chunk-ORT3KLGI.js +0 -50
  296. package/dist/chunk-ORT3KLGI.js.map +0 -1
  297. package/dist/chunk-PNNUPUH4.cjs +0 -82
  298. package/dist/chunk-PNNUPUH4.cjs.map +0 -1
  299. package/dist/chunk-PWHECW6N.js +0 -2934
  300. package/dist/chunk-PWHECW6N.js.map +0 -1
  301. package/dist/chunk-RBS5A2DF.js +0 -857
  302. package/dist/chunk-RBS5A2DF.js.map +0 -1
  303. package/dist/chunk-RPWUDXG5.cjs +0 -63
  304. package/dist/chunk-RPWUDXG5.cjs.map +0 -1
  305. package/dist/chunk-TCDJY3H6.js +0 -494
  306. package/dist/chunk-TCDJY3H6.js.map +0 -1
  307. package/dist/chunk-TP5UMRAU.cjs +0 -918
  308. package/dist/chunk-TP5UMRAU.cjs.map +0 -1
  309. package/dist/chunk-TS7J6DTY.js +0 -597
  310. package/dist/chunk-TS7J6DTY.js.map +0 -1
  311. package/dist/chunk-TUVENMXB.cjs +0 -20
  312. package/dist/chunk-TUVENMXB.cjs.map +0 -1
  313. package/dist/chunk-UDCQTOVU.cjs +0 -523
  314. package/dist/chunk-UDCQTOVU.cjs.map +0 -1
  315. package/dist/chunk-UHKZXOXD.js +0 -128
  316. package/dist/chunk-UHKZXOXD.js.map +0 -1
  317. package/dist/chunk-V6BA44DS.cjs +0 -236
  318. package/dist/chunk-V6BA44DS.cjs.map +0 -1
  319. package/dist/chunk-XO5R73Y4.js +0 -653
  320. package/dist/chunk-XO5R73Y4.js.map +0 -1
  321. package/dist/chunk-XOR4MPEN.cjs +0 -31
  322. package/dist/chunk-XOR4MPEN.cjs.map +0 -1
  323. package/dist/chunk-YORQQXGO.js +0 -155
  324. package/dist/chunk-YORQQXGO.js.map +0 -1
  325. package/dist/chunk-YY4PFR3Z.cjs +0 -432
  326. package/dist/chunk-YY4PFR3Z.cjs.map +0 -1
  327. package/dist/chunk-ZPI6Q42R.js +0 -17
  328. package/dist/chunk-ZPI6Q42R.js.map +0 -1
  329. package/dist/components/ActivityPreview.cjs.map +0 -1
  330. package/dist/components/ActivityPreview.js.map +0 -1
  331. package/dist/components/ActivitySequence.cjs.map +0 -1
  332. package/dist/components/ActivitySequence.js.map +0 -1
  333. package/dist/components/Dictation.cjs.map +0 -1
  334. package/dist/components/Dictation.js.map +0 -1
  335. package/dist/components/FillInTheBlanks.cjs.map +0 -1
  336. package/dist/components/FillInTheBlanks.js.map +0 -1
  337. package/dist/components/GapSelect.cjs.map +0 -1
  338. package/dist/components/GapSelect.js.map +0 -1
  339. package/dist/components/InteractiveVideo.cjs.map +0 -1
  340. package/dist/components/InteractiveVideo.js.map +0 -1
  341. package/dist/components/MultipleChoice.cjs.map +0 -1
  342. package/dist/components/MultipleChoice.js.map +0 -1
  343. package/dist/components/PronunciationFeedback.cjs.map +0 -1
  344. package/dist/components/PronunciationFeedback.js.map +0 -1
  345. package/dist/components/ReadAloud.cjs.map +0 -1
  346. package/dist/components/ReadAloud.js.map +0 -1
  347. package/dist/components/StimulusPanel.cjs.map +0 -1
  348. package/dist/components/StimulusPanel.js.map +0 -1
  349. package/dist/components/WrittenResponse.cjs.map +0 -1
  350. package/dist/components/WrittenResponse.js.map +0 -1
  351. package/dist/hooks/useSpeechRecorder.cjs.map +0 -1
  352. package/dist/hooks/useSpeechRecorder.js.map +0 -1
  353. package/dist/i18n/LkIntlProvider.cjs.map +0 -1
  354. package/dist/i18n/LkIntlProvider.js.map +0 -1
  355. package/dist/machine-CuwKqWXC.d.cts +0 -26
  356. package/dist/machine-CuwKqWXC.d.ts +0 -26
  357. package/dist/theme/ThemeProvider.cjs.map +0 -1
  358. package/dist/theme/ThemeProvider.js.map +0 -1
  359. package/dist/types-C4IsUQsK.d.ts +0 -989
  360. package/dist/types-CJgZWtl4.d.cts +0 -989
@@ -0,0 +1,124 @@
1
+ import { t as LearnerAi } from "./LkAiProvider-QdEcIhoo.js";
2
+ import { a as RenderMode, i as MediaTransportStrings, n as HtmlSanitizer, o as Renderable, r as MediaBudgetBinding, v as LkStringsOverride } from "./types-HIrgF_mS.js";
3
+ import { DeliveryPolicy, InteractionEvent, ItemOutcome, LearnerResponse, ThemeTokens, WrittenResponseData, XAPIStatement } from "@intellectif/lk-core";
4
+ //#region src/components/WrittenResponse/WrittenResponse.d.ts
5
+ /**
6
+ * Payload delivered when the learner submits a written response. Grading is
7
+ * DEFERRED (asynchronous AI/human grading), so there is no score here — and
8
+ * deliberately no fake one: an ungraded submission must never be shown or
9
+ * stored as a 0. The consumer persists `text` and grades it out-of-band.
10
+ */
11
+ interface WrittenResponseSubmission {
12
+ /** The submitted text, verbatim. */
13
+ text: string;
14
+ /** Word count of `text`, recomputed with the canonical `countWords()`. */
15
+ wordCount: number;
16
+ /** Whether `wordCount` falls within the activity's `[minWords, maxWords]`. */
17
+ withinWordBounds: boolean;
18
+ /** Time in milliseconds from first interaction to submission. */
19
+ timeSpent: number;
20
+ /** The SUBMITTED-verb xAPI statement built for this submission (no score fields). */
21
+ xapiStatement: XAPIStatement;
22
+ }
23
+ /**
24
+ * Props for {@link WrittenResponse}. Mirrors `ActivityProps` except for the
25
+ * completion callback: a deferred-grading activity completes with a
26
+ * {@link WrittenResponseSubmission} (`onSubmitted`), not a scored
27
+ * `ActivityResult` (`onComplete`), on purpose: fabricating a score of 0 for
28
+ * ungraded work is the exact bug this type exists to fix. Everything else — controlled value, render
29
+ * mode, server outcome, rich text — follows the shared `ActivityProps`
30
+ * contract verbatim.
31
+ */
32
+ interface WrittenResponseProps {
33
+ /** Activity content. Accepts a `redact()` projection in `exam` mode. */
34
+ data: Renderable<WrittenResponseData>;
35
+ /**
36
+ * Called on submit with the ungraded submission (text, recomputed word
37
+ * count, bounds flag, timing, xAPI statement). Fires in `practice` and
38
+ * `exam` mode, after `onSubmit`; never in `review`.
39
+ *
40
+ * Optional since lk-react 2.1.0 so a `review`-mode render (which has no submit
41
+ * control) and an exam runner that only wants the raw response through
42
+ * `onSubmit` do not have to pass a no-op. Supply it in `practice`/`exam`
43
+ * unless `onSubmit` already captures everything you persist.
44
+ */
45
+ onSubmitted?: (submission: WrittenResponseSubmission) => void;
46
+ /**
47
+ * Called on submit with the raw learner response and no grade, BEFORE
48
+ * `onSubmitted`. This is the only submit callback an exam runner needs:
49
+ * the server grades the text and returns an {@link ItemOutcome} later.
50
+ */
51
+ onSubmit?: (response: LearnerResponse) => void;
52
+ /**
53
+ * Controlled value: the learner's current response. When present the
54
+ * textarea renders from it (never from internal state) and every keystroke
55
+ * goes out through `onChange` — restore an in-progress attempt, autosave a
56
+ * delta, or drive a review render with it.
57
+ */
58
+ value?: LearnerResponse;
59
+ /** Initial response for an uncontrolled component (ignored when `value` is set). */
60
+ defaultValue?: LearnerResponse;
61
+ /**
62
+ * Mount as already submitted — read at mount only. Without it a resumed
63
+ * attempt reopens an essay the learner had already submitted as editable
64
+ * and re-submittable.
65
+ */
66
+ defaultSubmitted?: boolean;
67
+ /** Fires on every change to the learner's response. Required for a controlled component. */
68
+ onChange?: (response: LearnerResponse) => void;
69
+ /**
70
+ * Presentation mode, default `practice`. `practice` and `exam` are nearly
71
+ * identical here — a written response is never graded client-side, so
72
+ * there is no local score to withhold; `exam` additionally never calls
73
+ * `evaluate()` and renders happily from a `redact()` projection.
74
+ * `review` is read-only and shows the server's `outcome`.
75
+ */
76
+ renderMode?: RenderMode;
77
+ /**
78
+ * Server-computed outcome, rendered by `review` mode: `deferred` shows a
79
+ * "not graded yet" affordance, `scored` shows the returned grade and
80
+ * feedback. Ignored in other modes — this component never manufactures an
81
+ * outcome of its own.
82
+ */
83
+ outcome?: ItemOutcome;
84
+ /** Renders `data.promptHtml` when provided. See `HtmlSanitizer`. */
85
+ sanitizeHtml?: HtmlSanitizer;
86
+ /** Binds this activity's own `data.media` to a play budget. See {@link MediaBudgetBinding}. */
87
+ mediaBudget?: MediaBudgetBinding;
88
+ /** Translations for the audio transport chrome. See {@link MediaTransportStrings}. */
89
+ mediaStrings?: Partial<MediaTransportStrings>;
90
+ /** Overrides the SDK's chrome text for this activity. See {@link LkIntlProvider}. */
91
+ strings?: LkStringsOverride;
92
+ onInteraction?: (event: InteractionEvent) => void;
93
+ /** Per-instance token overrides, applied as inline CSS vars on the root. */
94
+ theme?: Partial<ThemeTokens>;
95
+ locale?: string;
96
+ disabled?: boolean;
97
+ /**
98
+ * The delivery policy. An essay is graded later, so `feedback` reaches it —
99
+ * `false` reads a returned grade back as nothing in `review` — and so does
100
+ * AI feedback on a draft, which needs `feedback`, `solutions` and
101
+ * `ai.explanations`. See `DeliveryPolicy` in lk-core.
102
+ */
103
+ delivery?: DeliveryPolicy | null;
104
+ /**
105
+ * The host's AI ports, overriding `LkAiProvider`'s. With a `writingFeedback`
106
+ * port, a learner in `practice` can ask for feedback on a draft before
107
+ * submitting it — up to `maxWritingFeedback` times — and revise. Every
108
+ * correction in it quotes the learner's own words, or the SDK refuses it.
109
+ * Never in `exam` or `review`. See {@link LearnerAi}.
110
+ */
111
+ ai?: LearnerAi;
112
+ }
113
+ //#endregion
114
+ //#region src/components/WrittenResponse/index.d.ts
115
+ /**
116
+ * Public Written Response activity: a labelled textarea with a live word
117
+ * counter for free-text writing graded asynchronously (AI or human). The core
118
+ * is wrapped in `ActivityErrorBoundary` so a render failure (incl. the dev
119
+ * schema-validation throw) degrades to an accessible fallback.
120
+ */
121
+ declare function WrittenResponse(props: WrittenResponseProps): React.JSX.Element;
122
+ //#endregion
123
+ export { WrittenResponseProps as n, WrittenResponseSubmission as r, WrittenResponse as t };
124
+ //# sourceMappingURL=index-DbCCQ9cP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DbCCQ9cP.d.ts","names":[],"sources":["../src/components/WrittenResponse/WrittenResponse.tsx","../src/components/WrittenResponse/index.tsx"],"mappings":";;;;;;;;;;UA2CiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,eAAe;;;;;;;;;;;UAYA;;EAEf,MAAM,WAAW;;;;;;;;;;;EAWjB,eAAe,YAAY;;;;;;EAM3B,YAAY,UAAU;;;;;;;EAOtB,QAAQ;;EAER,eAAe;;;;;;EAMf;;EAEA,YAAY,UAAU;;;;;;;;EAQtB,aAAa;;;;;;;EAOb,UAAU;;EAEV,eAAe;;EAEf,cAAc;;EAEd,eAAe,QAAQ;;EAEvB,UAAU;EACV,iBAAiB,OAAO;;EAExB,QAAQ,QAAQ;EAChB;EACA;;;;;;;EAOA,WAAW;;;;;;;;EAQX,KAAK;;;;;;;;;;iBC9HS,gBAAgB,OAAO,uBAAuB,MAAM,IAAI"}
@@ -0,0 +1,24 @@
1
+ import { t as ActivityProps } from "./types-HIrgF_mS.js";
2
+ import { MultipleChoiceData } from "@intellectif/lk-core";
3
+ //#region src/components/MultipleChoice/MultipleChoice.d.ts
4
+ interface MultipleChoiceProps extends ActivityProps<MultipleChoiceData> {
5
+ /**
6
+ * Seed for the deterministic option shuffle. Supply one (e.g. the attempt
7
+ * id) to make the shuffled order reproducible server-side, stable across
8
+ * page reloads, and identical between SSR and hydration. When absent, a
9
+ * random per-mount session seed is used (order stable within the mount
10
+ * only — the behaviour before `shuffleSeed` existed).
11
+ */
12
+ shuffleSeed?: string;
13
+ }
14
+ //#endregion
15
+ //#region src/components/MultipleChoice/index.d.ts
16
+ /**
17
+ * Public Multiple Choice activity: the core component wrapped in
18
+ * `ActivityErrorBoundary` so a render failure (incl. the dev schema-validation
19
+ * throw) degrades to an accessible fallback instead of crashing the host.
20
+ */
21
+ declare function MultipleChoice(props: MultipleChoiceProps): React.JSX.Element;
22
+ //#endregion
23
+ export { MultipleChoiceProps as n, MultipleChoice as t };
24
+ //# sourceMappingURL=index-DeV5B2m5.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DeV5B2m5.d.ts","names":[],"sources":["../src/components/MultipleChoice/MultipleChoice.tsx","../src/components/MultipleChoice/index.tsx"],"mappings":";;;UAyGiB,4BAA4B,cAAc;;;;;;;;EAQzD;;;;;;;;;iBCjGc,eAAe,OAAO,sBAAsB,MAAM,IAAI"}
@@ -0,0 +1,28 @@
1
+ import { t as ActivityProps } from "./types-HIrgF_mS.js";
2
+ import { FillInTheBlanksData } from "@intellectif/lk-core";
3
+ //#region src/components/FillInTheBlanks/FillInTheBlanks.d.ts
4
+ interface FillInTheBlanksProps extends ActivityProps<FillInTheBlanksData> {
5
+ /**
6
+ * After submission, replace each incorrectly-answered blank with its first
7
+ * accepted answer, styled distinctly. Component-specific prop: it
8
+ * is presentation, not activity data, and is outside the fixed Req-3.1 set.
9
+ *
10
+ * Ignored in `exam` mode — revealing the key is precisely what an exam must
11
+ * not do, and on a `redact()` projection there is no key to reveal. In
12
+ * `review` mode it applies only to blanks the supplied `outcome` marks
13
+ * incorrect, and only when the caller passed data that still carries the key
14
+ * (e.g. `redact(data, { reveal: 'after-submit' })`).
15
+ */
16
+ showCorrectAnswers?: boolean;
17
+ }
18
+ //#endregion
19
+ //#region src/components/FillInTheBlanks/index.d.ts
20
+ /**
21
+ * Public Fill-in-the-Blanks activity: the core wrapped in
22
+ * `ActivityErrorBoundary` so a render failure (incl. the dev schema-validation
23
+ * throw) degrades to an accessible fallback instead of crashing the host.
24
+ */
25
+ declare function FillInTheBlanks(props: FillInTheBlanksProps): React.JSX.Element;
26
+ //#endregion
27
+ export { FillInTheBlanksProps as n, FillInTheBlanks as t };
28
+ //# sourceMappingURL=index-TZCJVSge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-TZCJVSge.d.ts","names":[],"sources":["../src/components/FillInTheBlanks/FillInTheBlanks.tsx","../src/components/FillInTheBlanks/index.tsx"],"mappings":";;;UAoCiB,6BAA6B,cAAc;;;;;;;;;;;;EAY1D;;;;;;;;;iBChCc,gBAAgB,OAAO,uBAAuB,MAAM,IAAI"}
@@ -0,0 +1,25 @@
1
+ import { t as ActivityProps } from "./types-HIrgF_mS.js";
2
+ import { GapSelectData } from "@intellectif/lk-core";
3
+ //#region src/components/GapSelect/GapSelect.d.ts
4
+ interface GapSelectProps extends ActivityProps<GapSelectData> {
5
+ /**
6
+ * Seeds the per-gap choice shuffle when `data.shuffleChoices` is set. Pass
7
+ * the attempt id, exactly as on `<MultipleChoice>`: an order nobody can
8
+ * reproduce cannot be reconciled with the attempt a server recorded. Without
9
+ * one, a random per-mount seed is used — stable within the mount, and
10
+ * deliberately not reproducible.
11
+ */
12
+ shuffleSeed?: string;
13
+ }
14
+ //#endregion
15
+ //#region src/components/GapSelect/index.d.ts
16
+ /**
17
+ * Public Gap Select activity: the core wrapped in `ActivityErrorBoundary` so a
18
+ * render failure (including the dev schema-validation throw and the
19
+ * redacted-in-`practice` guard) degrades to an accessible fallback instead of
20
+ * crashing the host.
21
+ */
22
+ declare function GapSelect(props: GapSelectProps): React.JSX.Element;
23
+ //#endregion
24
+ export { GapSelectProps as n, GapSelect as t };
25
+ //# sourceMappingURL=index-ZVvLHsd3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ZVvLHsd3.d.ts","names":[],"sources":["../src/components/GapSelect/GapSelect.tsx","../src/components/GapSelect/index.tsx"],"mappings":";;;UA8CiB,uBAAuB,cAAc;;;;;;;;EAQpD;;;;;;;;;;iBCxCc,UAAU,OAAO,iBAAiB,MAAM,IAAI"}
@@ -0,0 +1,78 @@
1
+ import { a as RenderMode, n as HtmlSanitizer, v as LkStringsOverride } from "./types-HIrgF_mS.js";
2
+ import { t as ActivityRenderer } from "./index-Bsu8VciA.js";
3
+ import { ReactNode } from "react";
4
+ import { DraftNotComplete, ItemOutcome, LearnerResponse, ThemeTokens } from "@intellectif/lk-core";
5
+ //#region src/components/ActivityPreview/ActivityPreview.d.ts
6
+ interface ActivityPreviewProps {
7
+ /**
8
+ * The activity as an editor holds it right now, finished or not. It is checked
9
+ * with `validateDraft` before anything renders — by content, on every render —
10
+ * so a half-written question never reaches a component that assumes a valid
11
+ * one.
12
+ */
13
+ draft: unknown;
14
+ /** The mode to preview in. Defaults to `practice`. */
15
+ renderMode?: RenderMode;
16
+ /**
17
+ * A learner response to show as if a learner had given it. In `practice` and
18
+ * `exam` it seeds the answer, which stays editable; in `review` it is the
19
+ * submitted answer, marked by `evaluate()` unless `outcome` is given.
20
+ */
21
+ response?: LearnerResponse;
22
+ /**
23
+ * The outcome `review` marks the response with, instead of the one
24
+ * `evaluate()` computes — which is how to preview a returned grade on a written
25
+ * response, since the SDK cannot score one. Ignored in other modes.
26
+ */
27
+ outcome?: ItemOutcome;
28
+ /**
29
+ * Rendered in place of the activity while the draft is not complete, with the
30
+ * issues `validateDraft` found — so an editor can list them in its own words.
31
+ * The issue messages are English, and a preview that rendered them would put
32
+ * untranslatable text on screen. Without it, the preview shows the
33
+ * `previewIncomplete` or `previewInvalid` string.
34
+ */
35
+ fallback?: (result: DraftNotComplete) => ReactNode;
36
+ /**
37
+ * Renderers for activity types beyond the built-ins, keyed by `type`, as on
38
+ * `<ActivitySequence>`. An entry receives the shared prop contract and
39
+ * nothing else, so — like the shuffle seed below — the in-memory recording
40
+ * binding a previewed read-aloud is given does not reach one. Nor does the
41
+ * `question` a sequence hands a renderer: a preview is one question with no
42
+ * set around it, so there is no slot to report to and nothing to page away
43
+ * from. A renderer that uses it must treat it as optional, which its type
44
+ * already says.
45
+ */
46
+ renderers?: Readonly<Record<string, ActivityRenderer>>;
47
+ /**
48
+ * Seeds `<MultipleChoice>`'s option shuffle. Defaults to a fixed seed, so the
49
+ * order holds while options are edited; adding or removing one deals them
50
+ * again, because the shuffle orders by position. A `renderers` entry is given
51
+ * no seed, as on `<ActivitySequence>`.
52
+ */
53
+ shuffleSeed?: string;
54
+ /** Renders author-supplied rich text. See `HtmlSanitizer`. */
55
+ sanitizeHtml?: HtmlSanitizer;
56
+ /** Overrides the SDK's chrome text, for the preview's notice and the activity alike. */
57
+ strings?: LkStringsOverride;
58
+ /** Per-instance token overrides, passed to the activity. */
59
+ theme?: Partial<ThemeTokens>;
60
+ /** BCP 47 tag of the interface language, passed to the activity. */
61
+ locale?: string;
62
+ }
63
+ /**
64
+ * Renders an activity from an editor's draft, in any render mode, with a
65
+ * simulated learner response — and renders a notice instead while the draft is
66
+ * not an activity yet.
67
+ *
68
+ * Nothing it renders is recorded: no callback is wired, so a practice attempt in
69
+ * a preview scores locally and goes nowhere, and a recording's play limit is
70
+ * counted in memory only.
71
+ *
72
+ * A draft with no string `type`, a type nobody registered, and a `response` of a
73
+ * different type from the draft are wiring errors, and throw.
74
+ */
75
+ declare function ActivityPreview({ draft, renderMode, response, outcome, fallback, renderers, shuffleSeed, sanitizeHtml, strings, theme, locale }: ActivityPreviewProps): React.JSX.Element;
76
+ //#endregion
77
+ export { ActivityPreviewProps as n, ActivityPreview as t };
78
+ //# sourceMappingURL=index-eQwBgpSw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-eQwBgpSw.d.ts","names":[],"sources":["../src/components/ActivityPreview/ActivityPreview.tsx"],"mappings":";;;;;UAkEiB;;;;;;;EAOf;;EAEA,aAAa;;;;;;EAMb,WAAW;;;;;;EAMX,UAAU;;;;;;;;EAQV,YAAY,QAAQ,qBAAqB;;;;;;;;;;;EAWzC,YAAY,SAAS,eAAe;;;;;;;EAOpC;;EAEA,eAAe;;EAEf,UAAU;;EAEV,QAAQ,QAAQ;;EAEhB;;;;;;;;;;;;;;iBAiBc,kBACd,OACA,YACA,UACA,SACA,UACA,WACA,aACA,cACA,SACA,OACA,UACC,uBAAuB,MAAM,IAAI"}
package/dist/index.cjs CHANGED
@@ -1,171 +1,126 @@
1
1
  'use client';
2
- 'use strict';
3
-
4
- var chunkPNNUPUH4_cjs = require('./chunk-PNNUPUH4.cjs');
5
- var chunkK63VPFOV_cjs = require('./chunk-K63VPFOV.cjs');
6
- var chunkCWTUWNV3_cjs = require('./chunk-CWTUWNV3.cjs');
7
- var chunkV6BA44DS_cjs = require('./chunk-V6BA44DS.cjs');
8
- var chunkKFLIDTDU_cjs = require('./chunk-KFLIDTDU.cjs');
9
- var chunkRPWUDXG5_cjs = require('./chunk-RPWUDXG5.cjs');
10
- var chunkMKXEM2C5_cjs = require('./chunk-MKXEM2C5.cjs');
11
- var chunkYY4PFR3Z_cjs = require('./chunk-YY4PFR3Z.cjs');
12
- var chunkDS6HN3YR_cjs = require('./chunk-DS6HN3YR.cjs');
13
- var chunk7ALBSPYR_cjs = require('./chunk-7ALBSPYR.cjs');
14
- var chunkNAK55BYU_cjs = require('./chunk-NAK55BYU.cjs');
15
- require('./chunk-KHKH5LCT.cjs');
16
- var chunkTP5UMRAU_cjs = require('./chunk-TP5UMRAU.cjs');
17
- var chunkLBEKRN6Y_cjs = require('./chunk-LBEKRN6Y.cjs');
18
- var chunkUDCQTOVU_cjs = require('./chunk-UDCQTOVU.cjs');
19
- require('./chunk-OD65OZIW.cjs');
20
- require('./chunk-2PNSVBLQ.cjs');
21
- require('./chunk-J3C72RPK.cjs');
22
- var chunkLPUWXIPR_cjs = require('./chunk-LPUWXIPR.cjs');
23
- require('./chunk-NDBMKGQ5.cjs');
24
- var chunkXOR4MPEN_cjs = require('./chunk-XOR4MPEN.cjs');
25
- var chunkBIGGXHAW_cjs = require('./chunk-BIGGXHAW.cjs');
26
- var chunkTUVENMXB_cjs = require('./chunk-TUVENMXB.cjs');
27
-
28
- // src/components/types.ts
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_ai_LkAiProvider = require("./ai/LkAiProvider.cjs");
4
+ const require_useAiHelp = require("./useAiHelp-h9yOLFqt.cjs");
5
+ const require_LkIntlProvider = require("./LkIntlProvider-oi57lYB0.cjs");
6
+ const require_hooks_useActivityState = require("./hooks/useActivityState.cjs");
7
+ const require_Dictation = require("./Dictation-jECzL88E.cjs");
8
+ const require_FillInTheBlanks = require("./FillInTheBlanks-BpKhdHg2.cjs");
9
+ const require_GapSelect = require("./GapSelect-payTq_Zn.cjs");
10
+ const require_MultipleChoice = require("./MultipleChoice-COn5MtKY.cjs");
11
+ const require_useSpeechRecorder = require("./useSpeechRecorder--O_f-xvt.cjs");
12
+ const require_PronunciationFeedback = require("./PronunciationFeedback-DlMPGjkR.cjs");
13
+ const require_ReadAloud = require("./ReadAloud-akDehitT.cjs");
14
+ const require_WrittenResponse = require("./WrittenResponse-Bj3eFmGl.cjs");
15
+ const require_ActivityPreview = require("./ActivityPreview-BKr34exz.cjs");
16
+ const require_StimulusPanel = require("./StimulusPanel-b66gaN3i.cjs");
17
+ const require_ActivitySequence = require("./ActivitySequence-CmoSyDnp.cjs");
18
+ const require_InteractiveVideo = require("./InteractiveVideo-BguGv-HA.cjs");
19
+ const require_hooks_useXAPI = require("./hooks/useXAPI.cjs");
20
+ const require_ThemeProvider = require("./ThemeProvider-BRN1tj4n.cjs");
21
+ //#region src/components/types.ts
22
+ /**
23
+ * Bridges a server-produced `redact()` projection into the `data` prop.
24
+ *
25
+ * `RedactedActivityData` is deliberately index-signature typed in lk-core — it
26
+ * proves a payload is learner-safe, not what shape it has — so TypeScript
27
+ * cannot know it still carries the public fields a renderer needs. This is the
28
+ * SDK's single, documented crossing of that gap, so an exam runner does not
29
+ * have to write `as unknown as` at every call site:
30
+ *
31
+ * ```tsx
32
+ * <MultipleChoice
33
+ * data={asRenderable<MultipleChoiceData>(redactedFromServer)}
34
+ * renderMode="exam"
35
+ * onSubmit={persist}
36
+ * />
37
+ * ```
38
+ *
39
+ * Safe because `exam` mode reads only public fields; the answer-key fields the
40
+ * type claims are exactly the ones the component is forbidden to touch there.
41
+ *
42
+ * Per-type redacted interfaces (`RedactedMultipleChoiceData`, …) ship from
43
+ * lk-core since 0.6.0, but they are not yet *assignable* to `data`:
44
+ * {@link Renderable} widens `scoringStrategy` and leaves nested answer-key
45
+ * fields (`options[].isCorrect`, `blanks[].acceptedAnswers`) required, so a
46
+ * real redacted payload still needs this bridge. Closing that gap is tracked
47
+ * in the roadmap.
48
+ */
29
49
  function asRenderable(redacted) {
30
- return redacted;
50
+ return redacted;
31
51
  }
52
+ /**
53
+ * The same bridge as {@link asRenderable}, for a whole sequence: activities
54
+ * and item groups as a server hands them over, ready for `<ActivitySequence>`.
55
+ *
56
+ * Needed for the same reason and no other. `redactItemGroup` returns
57
+ * `ItemGroup<RedactedActivityData>`, and `RedactedActivityData` is an
58
+ * index-signature type whose fields are all `unknown` — so its `question` is
59
+ * not a `string` and it satisfies no per-type renderable, however the prop is
60
+ * widened. Widening alone cannot fix this; a crossing point is required, and
61
+ * having exactly one keeps `as unknown as` out of consumer code.
62
+ *
63
+ * ```tsx
64
+ * const entries = await fetchExam(); // redacted, server-side
65
+ * <ActivitySequence
66
+ * activities={asRenderableSequence(entries)}
67
+ * renderMode="exam" // REQUIRED: see below
68
+ * shuffleSeed={attemptId}
69
+ * onSubmit={persist}
70
+ * />
71
+ * ```
72
+ *
73
+ * Pass `renderMode="exam"` (or `"review"`). Redacted data has no answer key, and
74
+ * almost every built-in activity throws at render in the default `practice`
75
+ * mode rather than fail later: `<MultipleChoice>`, `<FillInTheBlanks>`,
76
+ * `<GapSelect>` and `<Dictation>` because they grade locally, and
77
+ * `<WrittenResponse>` because `practice` still runs its local submit path and
78
+ * emits a practice-mode xAPI statement.
79
+ *
80
+ * `<ReadAloud>` is the exception and renders a projection in every mode: a
81
+ * read-aloud item has no answer key to withhold, so `redact()` removes only the
82
+ * authored feedback and leaves the reading, its language and its bounds — which
83
+ * is everything the component puts on screen. It grades nothing locally either;
84
+ * the grade comes back from whatever the application asked to judge the take.
85
+ */
32
86
  function asRenderableSequence(entries) {
33
- return entries;
87
+ return entries;
34
88
  }
35
-
36
- Object.defineProperty(exports, "useXAPI", {
37
- enumerable: true,
38
- get: function () { return chunkPNNUPUH4_cjs.useXAPI; }
39
- });
40
- Object.defineProperty(exports, "ThemeProvider", {
41
- enumerable: true,
42
- get: function () { return chunkK63VPFOV_cjs.ThemeProvider; }
43
- });
44
- Object.defineProperty(exports, "createTailwindTheme", {
45
- enumerable: true,
46
- get: function () { return chunkK63VPFOV_cjs.createTailwindTheme; }
47
- });
48
- Object.defineProperty(exports, "darkTheme", {
49
- enumerable: true,
50
- get: function () { return chunkK63VPFOV_cjs.darkTheme; }
51
- });
52
- Object.defineProperty(exports, "defaultTheme", {
53
- enumerable: true,
54
- get: function () { return chunkK63VPFOV_cjs.defaultTheme; }
55
- });
56
- Object.defineProperty(exports, "useTheme", {
57
- enumerable: true,
58
- get: function () { return chunkK63VPFOV_cjs.useTheme; }
59
- });
60
- Object.defineProperty(exports, "InteractiveVideo", {
61
- enumerable: true,
62
- get: function () { return chunkCWTUWNV3_cjs.InteractiveVideo; }
63
- });
64
- Object.defineProperty(exports, "resolveCaptionTracks", {
65
- enumerable: true,
66
- get: function () { return chunkCWTUWNV3_cjs.resolveCaptionTracks; }
67
- });
68
- Object.defineProperty(exports, "ActivityPreview", {
69
- enumerable: true,
70
- get: function () { return chunkV6BA44DS_cjs.ActivityPreview; }
71
- });
72
- Object.defineProperty(exports, "ActivitySequence", {
73
- enumerable: true,
74
- get: function () { return chunkKFLIDTDU_cjs.ActivitySequence; }
75
- });
76
- Object.defineProperty(exports, "StimulusPanel", {
77
- enumerable: true,
78
- get: function () { return chunkRPWUDXG5_cjs.StimulusPanel; }
79
- });
80
- Object.defineProperty(exports, "WrittenResponse", {
81
- enumerable: true,
82
- get: function () { return chunkMKXEM2C5_cjs.WrittenResponse; }
83
- });
84
- Object.defineProperty(exports, "MultipleChoice", {
85
- enumerable: true,
86
- get: function () { return chunkYY4PFR3Z_cjs.MultipleChoice; }
87
- });
88
- Object.defineProperty(exports, "FillInTheBlanks", {
89
- enumerable: true,
90
- get: function () { return chunkDS6HN3YR_cjs.FillInTheBlanks; }
91
- });
92
- Object.defineProperty(exports, "GapSelect", {
93
- enumerable: true,
94
- get: function () { return chunk7ALBSPYR_cjs.GapSelect; }
95
- });
96
- Object.defineProperty(exports, "Dictation", {
97
- enumerable: true,
98
- get: function () { return chunkNAK55BYU_cjs.Dictation; }
99
- });
100
- Object.defineProperty(exports, "ReadAloud", {
101
- enumerable: true,
102
- get: function () { return chunkTP5UMRAU_cjs.ReadAloud; }
103
- });
104
- Object.defineProperty(exports, "PronunciationFeedback", {
105
- enumerable: true,
106
- get: function () { return chunkLBEKRN6Y_cjs.PronunciationFeedback; }
107
- });
108
- Object.defineProperty(exports, "CAPTURE_PROCESSOR_SOURCE", {
109
- enumerable: true,
110
- get: function () { return chunkUDCQTOVU_cjs.CAPTURE_PROCESSOR_SOURCE; }
111
- });
112
- Object.defineProperty(exports, "useSpeechRecorder", {
113
- enumerable: true,
114
- get: function () { return chunkUDCQTOVU_cjs.useSpeechRecorder; }
115
- });
116
- Object.defineProperty(exports, "useAiCoaching", {
117
- enumerable: true,
118
- get: function () { return chunkLPUWXIPR_cjs.useAiCoaching; }
119
- });
120
- Object.defineProperty(exports, "useAiExplanation", {
121
- enumerable: true,
122
- get: function () { return chunkLPUWXIPR_cjs.useAiExplanation; }
123
- });
124
- Object.defineProperty(exports, "useAiHints", {
125
- enumerable: true,
126
- get: function () { return chunkLPUWXIPR_cjs.useAiHints; }
127
- });
128
- Object.defineProperty(exports, "useAiWritingFeedback", {
129
- enumerable: true,
130
- get: function () { return chunkLPUWXIPR_cjs.useAiWritingFeedback; }
131
- });
132
- Object.defineProperty(exports, "useActivityState", {
133
- enumerable: true,
134
- get: function () { return chunkXOR4MPEN_cjs.useActivityState; }
135
- });
136
- Object.defineProperty(exports, "DEFAULT_STRINGS", {
137
- enumerable: true,
138
- get: function () { return chunkBIGGXHAW_cjs.DEFAULT_STRINGS; }
139
- });
140
- Object.defineProperty(exports, "LkIntlProvider", {
141
- enumerable: true,
142
- get: function () { return chunkBIGGXHAW_cjs.LkIntlProvider; }
143
- });
144
- Object.defineProperty(exports, "directionForLocale", {
145
- enumerable: true,
146
- get: function () { return chunkBIGGXHAW_cjs.directionForLocale; }
147
- });
148
- Object.defineProperty(exports, "mergeStrings", {
149
- enumerable: true,
150
- get: function () { return chunkBIGGXHAW_cjs.mergeStrings; }
151
- });
152
- Object.defineProperty(exports, "useLkDirection", {
153
- enumerable: true,
154
- get: function () { return chunkBIGGXHAW_cjs.useLkDirection; }
155
- });
156
- Object.defineProperty(exports, "useLkStrings", {
157
- enumerable: true,
158
- get: function () { return chunkBIGGXHAW_cjs.useLkStrings; }
159
- });
160
- Object.defineProperty(exports, "LkAiProvider", {
161
- enumerable: true,
162
- get: function () { return chunkTUVENMXB_cjs.LkAiProvider; }
163
- });
164
- Object.defineProperty(exports, "useLearnerAi", {
165
- enumerable: true,
166
- get: function () { return chunkTUVENMXB_cjs.useLearnerAi; }
167
- });
89
+ //#endregion
90
+ exports.ActivityPreview = require_ActivityPreview.ActivityPreview;
91
+ exports.ActivitySequence = require_ActivitySequence.ActivitySequence;
92
+ exports.CAPTURE_PROCESSOR_SOURCE = require_useSpeechRecorder.CAPTURE_PROCESSOR_SOURCE;
93
+ exports.DEFAULT_STRINGS = require_LkIntlProvider.DEFAULT_STRINGS;
94
+ exports.Dictation = require_Dictation.Dictation;
95
+ exports.FillInTheBlanks = require_FillInTheBlanks.FillInTheBlanks;
96
+ exports.GapSelect = require_GapSelect.GapSelect;
97
+ exports.InteractiveVideo = require_InteractiveVideo.InteractiveVideo;
98
+ exports.LkAiProvider = require_ai_LkAiProvider.LkAiProvider;
99
+ exports.LkIntlProvider = require_LkIntlProvider.LkIntlProvider;
100
+ exports.MultipleChoice = require_MultipleChoice.MultipleChoice;
101
+ exports.PronunciationFeedback = require_PronunciationFeedback.PronunciationFeedback;
102
+ exports.ReadAloud = require_ReadAloud.ReadAloud;
103
+ exports.StimulusPanel = require_StimulusPanel.StimulusPanel;
104
+ exports.ThemeProvider = require_ThemeProvider.ThemeProvider;
105
+ exports.WrittenResponse = require_WrittenResponse.WrittenResponse;
168
106
  exports.asRenderable = asRenderable;
169
107
  exports.asRenderableSequence = asRenderableSequence;
170
- //# sourceMappingURL=index.cjs.map
108
+ exports.createTailwindTheme = require_ThemeProvider.createTailwindTheme;
109
+ exports.darkTheme = require_ThemeProvider.darkTheme;
110
+ exports.defaultTheme = require_ThemeProvider.defaultTheme;
111
+ exports.directionForLocale = require_LkIntlProvider.directionForLocale;
112
+ exports.mergeStrings = require_LkIntlProvider.mergeStrings;
113
+ exports.resolveCaptionTracks = require_InteractiveVideo.resolveCaptionTracks;
114
+ exports.useActivityState = require_hooks_useActivityState.useActivityState;
115
+ exports.useAiCoaching = require_useAiHelp.useAiCoaching;
116
+ exports.useAiExplanation = require_useAiHelp.useAiExplanation;
117
+ exports.useAiHints = require_useAiHelp.useAiHints;
118
+ exports.useAiWritingFeedback = require_useAiHelp.useAiWritingFeedback;
119
+ exports.useLearnerAi = require_ai_LkAiProvider.useLearnerAi;
120
+ exports.useLkDirection = require_LkIntlProvider.useLkDirection;
121
+ exports.useLkStrings = require_LkIntlProvider.useLkStrings;
122
+ exports.useSpeechRecorder = require_useSpeechRecorder.useSpeechRecorder;
123
+ exports.useTheme = require_ThemeProvider.useTheme;
124
+ exports.useXAPI = require_hooks_useXAPI.useXAPI;
125
+
171
126
  //# sourceMappingURL=index.cjs.map