@intellectif/lk-react 23.0.1 → 23.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +13 -9
- package/dist/ActivityErrorBoundary-B379hvtL.cjs +39 -0
- package/dist/ActivityErrorBoundary-B379hvtL.cjs.map +1 -0
- package/dist/ActivityErrorBoundary-Dw6SbWv3.js +34 -0
- package/dist/ActivityErrorBoundary-Dw6SbWv3.js.map +1 -0
- package/dist/ActivityMedia-CQQTRNl7.cjs +641 -0
- package/dist/ActivityMedia-CQQTRNl7.cjs.map +1 -0
- package/dist/ActivityMedia-vDiP-Psa.js +636 -0
- package/dist/ActivityMedia-vDiP-Psa.js.map +1 -0
- package/dist/ActivityPreview-1hhTkYuj.js +240 -0
- package/dist/ActivityPreview-1hhTkYuj.js.map +1 -0
- package/dist/ActivityPreview-BKr34exz.cjs +245 -0
- package/dist/ActivityPreview-BKr34exz.cjs.map +1 -0
- package/dist/ActivitySequence-CkX87pfB.js +839 -0
- package/dist/ActivitySequence-CkX87pfB.js.map +1 -0
- package/dist/ActivitySequence-CmoSyDnp.cjs +844 -0
- package/dist/ActivitySequence-CmoSyDnp.cjs.map +1 -0
- package/dist/Dictation-BlxRp-3k.js +926 -0
- package/dist/Dictation-BlxRp-3k.js.map +1 -0
- package/dist/Dictation-jECzL88E.cjs +931 -0
- package/dist/Dictation-jECzL88E.cjs.map +1 -0
- package/dist/FeedbackRegion-BNNMtTY-.cjs +108 -0
- package/dist/FeedbackRegion-BNNMtTY-.cjs.map +1 -0
- package/dist/FeedbackRegion-CyPSp8bA.js +85 -0
- package/dist/FeedbackRegion-CyPSp8bA.js.map +1 -0
- package/dist/FillInTheBlanks-B6xzqYXx.js +474 -0
- package/dist/FillInTheBlanks-B6xzqYXx.js.map +1 -0
- package/dist/FillInTheBlanks-BpKhdHg2.cjs +479 -0
- package/dist/FillInTheBlanks-BpKhdHg2.cjs.map +1 -0
- package/dist/GapSelect-DUSiaEQH.js +441 -0
- package/dist/GapSelect-DUSiaEQH.js.map +1 -0
- package/dist/GapSelect-payTq_Zn.cjs +446 -0
- package/dist/GapSelect-payTq_Zn.cjs.map +1 -0
- package/dist/InteractiveVideo-BguGv-HA.cjs +2955 -0
- package/dist/InteractiveVideo-BguGv-HA.cjs.map +1 -0
- package/dist/InteractiveVideo-Cg2jbU3j.js +2944 -0
- package/dist/InteractiveVideo-Cg2jbU3j.js.map +1 -0
- package/dist/LkAiProvider-DAPpA3PQ.d.cts +84 -0
- package/dist/LkAiProvider-DAPpA3PQ.d.cts.map +1 -0
- package/dist/LkAiProvider-QdEcIhoo.d.ts +84 -0
- package/dist/LkAiProvider-QdEcIhoo.d.ts.map +1 -0
- package/dist/LkIntlProvider-D_FdYXjQ.js +375 -0
- package/dist/LkIntlProvider-D_FdYXjQ.js.map +1 -0
- package/dist/LkIntlProvider-oi57lYB0.cjs +410 -0
- package/dist/LkIntlProvider-oi57lYB0.cjs.map +1 -0
- package/dist/MultipleChoice-COn5MtKY.cjs +433 -0
- package/dist/MultipleChoice-COn5MtKY.cjs.map +1 -0
- package/dist/MultipleChoice-Dra0_KYD.js +428 -0
- package/dist/MultipleChoice-Dra0_KYD.js.map +1 -0
- package/dist/PronunciationFeedback-DlMPGjkR.cjs +831 -0
- package/dist/PronunciationFeedback-DlMPGjkR.cjs.map +1 -0
- package/dist/PronunciationFeedback-Dxd6XPkO.js +772 -0
- package/dist/PronunciationFeedback-Dxd6XPkO.js.map +1 -0
- package/dist/ReadAloud-C8RhaUqV.js +1092 -0
- package/dist/ReadAloud-C8RhaUqV.js.map +1 -0
- package/dist/ReadAloud-akDehitT.cjs +1103 -0
- package/dist/ReadAloud-akDehitT.cjs.map +1 -0
- package/dist/StimulusPanel-BgzByfkb.js +74 -0
- package/dist/StimulusPanel-BgzByfkb.js.map +1 -0
- package/dist/StimulusPanel-b66gaN3i.cjs +79 -0
- package/dist/StimulusPanel-b66gaN3i.cjs.map +1 -0
- package/dist/ThemeProvider-BRN1tj4n.cjs +187 -0
- package/dist/ThemeProvider-BRN1tj4n.cjs.map +1 -0
- package/dist/ThemeProvider-C7K9iMLX.js +158 -0
- package/dist/ThemeProvider-C7K9iMLX.js.map +1 -0
- package/dist/ThemeProvider-CocC8ODJ.d.ts +62 -0
- package/dist/ThemeProvider-CocC8ODJ.d.ts.map +1 -0
- package/dist/ThemeProvider-DS4KOL86.d.cts +62 -0
- package/dist/ThemeProvider-DS4KOL86.d.cts.map +1 -0
- package/dist/WrittenResponse-Bj3eFmGl.cjs +491 -0
- package/dist/WrittenResponse-Bj3eFmGl.cjs.map +1 -0
- package/dist/WrittenResponse-Cl8G6nO_.js +486 -0
- package/dist/WrittenResponse-Cl8G6nO_.js.map +1 -0
- package/dist/ai/LkAiProvider.cjs +34 -14
- package/dist/ai/LkAiProvider.cjs.map +1 -1
- package/dist/ai/LkAiProvider.d.cts +2 -73
- package/dist/ai/LkAiProvider.d.ts +2 -73
- package/dist/ai/LkAiProvider.js +33 -2
- package/dist/ai/LkAiProvider.js.map +1 -1
- package/dist/ai/useAiHelp.cjs +7 -23
- package/dist/ai/useAiHelp.d.cts +198 -121
- package/dist/ai/useAiHelp.d.cts.map +1 -0
- package/dist/ai/useAiHelp.d.ts +198 -121
- package/dist/ai/useAiHelp.d.ts.map +1 -0
- package/dist/ai/useAiHelp.js +3 -6
- package/dist/components/ActivityPreview.cjs +3 -31
- package/dist/components/ActivityPreview.d.cts +2 -81
- package/dist/components/ActivityPreview.d.ts +2 -81
- package/dist/components/ActivityPreview.js +2 -22
- package/dist/components/ActivitySequence.cjs +3 -32
- package/dist/components/ActivitySequence.d.cts +2 -432
- package/dist/components/ActivitySequence.d.ts +2 -432
- package/dist/components/ActivitySequence.js +2 -23
- package/dist/components/Dictation.cjs +4 -23
- package/dist/components/Dictation.d.cts +2 -19
- package/dist/components/Dictation.d.ts +2 -19
- package/dist/components/Dictation.js +3 -14
- package/dist/components/FillInTheBlanks.cjs +4 -22
- package/dist/components/FillInTheBlanks.d.cts +2 -30
- package/dist/components/FillInTheBlanks.d.ts +2 -30
- package/dist/components/FillInTheBlanks.js +3 -13
- package/dist/components/GapSelect.cjs +4 -22
- package/dist/components/GapSelect.d.cts +2 -27
- package/dist/components/GapSelect.d.ts +2 -27
- package/dist/components/GapSelect.js +3 -13
- package/dist/components/InteractiveVideo.cjs +5 -34
- package/dist/components/InteractiveVideo.d.cts +3 -291
- package/dist/components/InteractiveVideo.d.ts +3 -291
- package/dist/components/InteractiveVideo.js +3 -21
- package/dist/components/MultipleChoice.cjs +4 -22
- package/dist/components/MultipleChoice.d.cts +2 -26
- package/dist/components/MultipleChoice.d.ts +2 -26
- package/dist/components/MultipleChoice.js +3 -13
- package/dist/components/PronunciationFeedback.cjs +4 -16
- package/dist/components/PronunciationFeedback.d.cts +2 -69
- package/dist/components/PronunciationFeedback.d.ts +2 -69
- package/dist/components/PronunciationFeedback.js +3 -7
- package/dist/components/ReadAloud.cjs +4 -22
- package/dist/components/ReadAloud.d.cts +7 -11
- package/dist/components/ReadAloud.d.cts.map +1 -0
- package/dist/components/ReadAloud.d.ts +7 -11
- package/dist/components/ReadAloud.d.ts.map +1 -0
- package/dist/components/ReadAloud.js +3 -13
- package/dist/components/StimulusPanel.cjs +3 -14
- package/dist/components/StimulusPanel.d.cts +2 -51
- package/dist/components/StimulusPanel.d.ts +2 -51
- package/dist/components/StimulusPanel.js +2 -5
- package/dist/components/WrittenResponse.cjs +4 -21
- package/dist/components/WrittenResponse.d.cts +3 -18
- package/dist/components/WrittenResponse.d.ts +3 -18
- package/dist/components/WrittenResponse.js +3 -12
- package/dist/direction-Dq0_HtA5.js +183 -0
- package/dist/direction-Dq0_HtA5.js.map +1 -0
- package/dist/direction-K1pj0HCA.cjs +200 -0
- package/dist/direction-K1pj0HCA.cjs.map +1 -0
- package/dist/hooks/useActivityState.cjs +28 -10
- package/dist/hooks/useActivityState.cjs.map +1 -1
- package/dist/hooks/useActivityState.d.cts +25 -24
- package/dist/hooks/useActivityState.d.cts.map +1 -0
- package/dist/hooks/useActivityState.d.ts +25 -24
- package/dist/hooks/useActivityState.d.ts.map +1 -0
- package/dist/hooks/useActivityState.js +28 -2
- package/dist/hooks/useActivityState.js.map +1 -1
- package/dist/hooks/useSpeechRecorder.cjs +5 -16
- package/dist/hooks/useSpeechRecorder.d.cts +2 -127
- package/dist/hooks/useSpeechRecorder.d.ts +2 -127
- package/dist/hooks/useSpeechRecorder.js +3 -3
- package/dist/hooks/useXAPI.cjs +126 -10
- package/dist/hooks/useXAPI.cjs.map +1 -1
- package/dist/hooks/useXAPI.d.cts +14 -14
- package/dist/hooks/useXAPI.d.cts.map +1 -0
- package/dist/hooks/useXAPI.d.ts +14 -14
- package/dist/hooks/useXAPI.d.ts.map +1 -0
- package/dist/hooks/useXAPI.js +126 -2
- package/dist/hooks/useXAPI.js.map +1 -1
- package/dist/i18n/LkIntlProvider.cjs +9 -32
- package/dist/i18n/LkIntlProvider.d.cts +34 -38
- package/dist/i18n/LkIntlProvider.d.cts.map +1 -0
- package/dist/i18n/LkIntlProvider.d.ts +34 -38
- package/dist/i18n/LkIntlProvider.d.ts.map +1 -0
- package/dist/i18n/LkIntlProvider.js +3 -3
- package/dist/index-2iDJohip.d.cts +90 -0
- package/dist/index-2iDJohip.d.cts.map +1 -0
- package/dist/index-BAqT5tXN.d.ts +90 -0
- package/dist/index-BAqT5tXN.d.ts.map +1 -0
- package/dist/index-BRbEfXgE.d.ts +78 -0
- package/dist/index-BRbEfXgE.d.ts.map +1 -0
- package/dist/index-BW7aA5eN.d.cts +25 -0
- package/dist/index-BW7aA5eN.d.cts.map +1 -0
- package/dist/index-BeiVd-qe.d.ts +124 -0
- package/dist/index-BeiVd-qe.d.ts.map +1 -0
- package/dist/index-C1KGpD1k.d.ts +49 -0
- package/dist/index-C1KGpD1k.d.ts.map +1 -0
- package/dist/index-C7cCHEze.d.cts +24 -0
- package/dist/index-C7cCHEze.d.cts.map +1 -0
- package/dist/index-CKTpYTCC.d.cts +49 -0
- package/dist/index-CKTpYTCC.d.cts.map +1 -0
- package/dist/index-CN3_TwDL.d.ts +28 -0
- package/dist/index-CN3_TwDL.d.ts.map +1 -0
- package/dist/index-CNoAqj5I.d.ts +16 -0
- package/dist/index-CNoAqj5I.d.ts.map +1 -0
- package/dist/index-CTlht6OV.d.cts +432 -0
- package/dist/index-CTlht6OV.d.cts.map +1 -0
- package/dist/index-CmgSzapt.d.cts +124 -0
- package/dist/index-CmgSzapt.d.cts.map +1 -0
- package/dist/index-D4WYDN_p.d.cts +28 -0
- package/dist/index-D4WYDN_p.d.cts.map +1 -0
- package/dist/index-DAJ6KK49.d.ts +25 -0
- package/dist/index-DAJ6KK49.d.ts.map +1 -0
- package/dist/index-DIiacP_z.d.cts +78 -0
- package/dist/index-DIiacP_z.d.cts.map +1 -0
- package/dist/index-DR0SOJig.d.ts +291 -0
- package/dist/index-DR0SOJig.d.ts.map +1 -0
- package/dist/index-DRMauOVH.d.ts +432 -0
- package/dist/index-DRMauOVH.d.ts.map +1 -0
- package/dist/index-bmmRfGad.d.cts +16 -0
- package/dist/index-bmmRfGad.d.cts.map +1 -0
- package/dist/index-n9PKZm7W.d.cts +291 -0
- package/dist/index-n9PKZm7W.d.cts.map +1 -0
- package/dist/index-zu9H7owf.d.ts +24 -0
- package/dist/index-zu9H7owf.d.ts.map +1 -0
- package/dist/index.cjs +118 -161
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -24
- package/dist/index.d.ts +20 -24
- package/dist/index.js +84 -31
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeProvider.cjs +8 -28
- package/dist/theme/ThemeProvider.d.cts +2 -59
- package/dist/theme/ThemeProvider.d.ts +2 -59
- package/dist/theme/ThemeProvider.js +3 -3
- package/dist/theme/skin.css +46 -1
- package/dist/tries-CbbtZkdG.cjs +363 -0
- package/dist/{chunk-W6UMY7PF.cjs.map → tries-CbbtZkdG.cjs.map} +1 -1
- package/dist/tries-DTHSrLCm.js +310 -0
- package/dist/tries-DTHSrLCm.js.map +1 -0
- package/dist/types-BOQd93x3.d.cts +994 -0
- package/dist/types-BOQd93x3.d.cts.map +1 -0
- package/dist/types-HIrgF_mS.d.ts +994 -0
- package/dist/types-HIrgF_mS.d.ts.map +1 -0
- package/dist/useAiHelp-B-ccDL5Q.js +906 -0
- package/dist/useAiHelp-B-ccDL5Q.js.map +1 -0
- package/dist/useAiHelp-h9yOLFqt.cjs +995 -0
- package/dist/useAiHelp-h9yOLFqt.cjs.map +1 -0
- package/dist/useSpeechRecorder--O_f-xvt.cjs +720 -0
- package/dist/useSpeechRecorder--O_f-xvt.cjs.map +1 -0
- package/dist/useSpeechRecorder-DtAYvl02.d.cts +154 -0
- package/dist/useSpeechRecorder-DtAYvl02.d.cts.map +1 -0
- package/dist/useSpeechRecorder-DtAYvl02.d.ts +154 -0
- package/dist/useSpeechRecorder-DtAYvl02.d.ts.map +1 -0
- package/dist/useSpeechRecorder-zIi9Dlw8.js +709 -0
- package/dist/useSpeechRecorder-zIi9Dlw8.js.map +1 -0
- package/package.json +10 -11
- package/dist/WrittenResponse-CgRrjM4S.d.ts +0 -115
- package/dist/WrittenResponse-D2K1VW_V.d.cts +0 -115
- package/dist/ai/useAiHelp.cjs.map +0 -1
- package/dist/ai/useAiHelp.js.map +0 -1
- package/dist/chunk-2OP5YHRR.js +0 -543
- package/dist/chunk-2OP5YHRR.js.map +0 -1
- package/dist/chunk-2TW6WLBC.js +0 -80
- package/dist/chunk-2TW6WLBC.js.map +0 -1
- package/dist/chunk-4MXECBZT.js +0 -888
- package/dist/chunk-4MXECBZT.js.map +0 -1
- package/dist/chunk-54DX6SLS.cjs +0 -42
- package/dist/chunk-54DX6SLS.cjs.map +0 -1
- package/dist/chunk-6GQLCCGN.js +0 -858
- package/dist/chunk-6GQLCCGN.js.map +0 -1
- package/dist/chunk-6N43WDVG.js +0 -29
- package/dist/chunk-6N43WDVG.js.map +0 -1
- package/dist/chunk-6RIM5EQP.cjs +0 -393
- package/dist/chunk-6RIM5EQP.cjs.map +0 -1
- package/dist/chunk-7F2YQWMW.cjs +0 -553
- package/dist/chunk-7F2YQWMW.cjs.map +0 -1
- package/dist/chunk-B4JRBV56.cjs +0 -63
- package/dist/chunk-B4JRBV56.cjs.map +0 -1
- package/dist/chunk-B7JU52YQ.cjs +0 -437
- package/dist/chunk-B7JU52YQ.cjs.map +0 -1
- package/dist/chunk-C4PSJ3ZC.js +0 -329
- package/dist/chunk-C4PSJ3ZC.js.map +0 -1
- package/dist/chunk-CXIP7ERK.js +0 -389
- package/dist/chunk-CXIP7ERK.js.map +0 -1
- package/dist/chunk-DPNCCWOV.js +0 -395
- package/dist/chunk-DPNCCWOV.js.map +0 -1
- package/dist/chunk-DXFCYNST.js +0 -35
- package/dist/chunk-DXFCYNST.js.map +0 -1
- package/dist/chunk-DZ7VLLDQ.cjs +0 -891
- package/dist/chunk-DZ7VLLDQ.cjs.map +0 -1
- package/dist/chunk-E4UF4XZM.js +0 -29
- package/dist/chunk-E4UF4XZM.js.map +0 -1
- package/dist/chunk-ERV666AR.js +0 -435
- package/dist/chunk-ERV666AR.js.map +0 -1
- package/dist/chunk-FISEZBLF.cjs +0 -31
- package/dist/chunk-FISEZBLF.cjs.map +0 -1
- package/dist/chunk-HYOUMTPW.js +0 -597
- package/dist/chunk-HYOUMTPW.js.map +0 -1
- package/dist/chunk-HZIT24BK.js +0 -61
- package/dist/chunk-HZIT24BK.js.map +0 -1
- package/dist/chunk-IYGF7PZY.cjs +0 -2938
- package/dist/chunk-IYGF7PZY.cjs.map +0 -1
- package/dist/chunk-J2QIHZ3H.cjs +0 -27
- package/dist/chunk-J2QIHZ3H.cjs.map +0 -1
- package/dist/chunk-JMEZYYCE.js +0 -2935
- package/dist/chunk-JMEZYYCE.js.map +0 -1
- package/dist/chunk-K63VPFOV.cjs +0 -134
- package/dist/chunk-K63VPFOV.cjs.map +0 -1
- package/dist/chunk-KI6DJ5ZF.js +0 -495
- package/dist/chunk-KI6DJ5ZF.js.map +0 -1
- package/dist/chunk-MCO52PV5.js +0 -520
- package/dist/chunk-MCO52PV5.js.map +0 -1
- package/dist/chunk-MXZHL4U5.cjs +0 -860
- package/dist/chunk-MXZHL4U5.cjs.map +0 -1
- package/dist/chunk-NFGUJ52G.cjs +0 -336
- package/dist/chunk-NFGUJ52G.cjs.map +0 -1
- package/dist/chunk-O7MINPKZ.js +0 -431
- package/dist/chunk-O7MINPKZ.js.map +0 -1
- package/dist/chunk-OD65OZIW.cjs +0 -159
- package/dist/chunk-OD65OZIW.cjs.map +0 -1
- package/dist/chunk-OJGTJOWI.cjs +0 -20
- package/dist/chunk-OJGTJOWI.cjs.map +0 -1
- package/dist/chunk-PGAPZ6UE.cjs +0 -497
- package/dist/chunk-PGAPZ6UE.cjs.map +0 -1
- package/dist/chunk-PNNUPUH4.cjs +0 -82
- package/dist/chunk-PNNUPUH4.cjs.map +0 -1
- package/dist/chunk-QAZO3ANW.cjs +0 -433
- package/dist/chunk-QAZO3ANW.cjs.map +0 -1
- package/dist/chunk-RX3A6KIY.js +0 -17
- package/dist/chunk-RX3A6KIY.js.map +0 -1
- package/dist/chunk-SHDSOOBF.cjs +0 -826
- package/dist/chunk-SHDSOOBF.cjs.map +0 -1
- package/dist/chunk-SPSKDNEE.js +0 -824
- package/dist/chunk-SPSKDNEE.js.map +0 -1
- package/dist/chunk-TGTP5DKF.js +0 -234
- package/dist/chunk-TGTP5DKF.js.map +0 -1
- package/dist/chunk-U4KTOH7C.js +0 -22
- package/dist/chunk-U4KTOH7C.js.map +0 -1
- package/dist/chunk-U5VFJVQ2.js +0 -241
- package/dist/chunk-U5VFJVQ2.js.map +0 -1
- package/dist/chunk-UDCQTOVU.cjs +0 -523
- package/dist/chunk-UDCQTOVU.cjs.map +0 -1
- package/dist/chunk-UHKZXOXD.js +0 -128
- package/dist/chunk-UHKZXOXD.js.map +0 -1
- package/dist/chunk-UKUHVCZX.cjs +0 -599
- package/dist/chunk-UKUHVCZX.cjs.map +0 -1
- package/dist/chunk-VPU6UY4O.cjs +0 -55
- package/dist/chunk-VPU6UY4O.cjs.map +0 -1
- package/dist/chunk-W6UMY7PF.cjs +0 -251
- package/dist/chunk-WZ2TBXVB.cjs +0 -236
- package/dist/chunk-WZ2TBXVB.cjs.map +0 -1
- package/dist/chunk-XOR4MPEN.cjs +0 -31
- package/dist/chunk-XOR4MPEN.cjs.map +0 -1
- package/dist/chunk-XS6OYYVR.cjs +0 -397
- package/dist/chunk-XS6OYYVR.cjs.map +0 -1
- package/dist/chunk-XYJBRKBZ.js +0 -51
- package/dist/chunk-XYJBRKBZ.js.map +0 -1
- package/dist/chunk-YORQQXGO.js +0 -155
- package/dist/chunk-YORQQXGO.js.map +0 -1
- package/dist/components/ActivityPreview.cjs.map +0 -1
- package/dist/components/ActivityPreview.js.map +0 -1
- package/dist/components/ActivitySequence.cjs.map +0 -1
- package/dist/components/ActivitySequence.js.map +0 -1
- package/dist/components/Dictation.cjs.map +0 -1
- package/dist/components/Dictation.js.map +0 -1
- package/dist/components/FillInTheBlanks.cjs.map +0 -1
- package/dist/components/FillInTheBlanks.js.map +0 -1
- package/dist/components/GapSelect.cjs.map +0 -1
- package/dist/components/GapSelect.js.map +0 -1
- package/dist/components/InteractiveVideo.cjs.map +0 -1
- package/dist/components/InteractiveVideo.js.map +0 -1
- package/dist/components/MultipleChoice.cjs.map +0 -1
- package/dist/components/MultipleChoice.js.map +0 -1
- package/dist/components/PronunciationFeedback.cjs.map +0 -1
- package/dist/components/PronunciationFeedback.js.map +0 -1
- package/dist/components/ReadAloud.cjs.map +0 -1
- package/dist/components/ReadAloud.js.map +0 -1
- package/dist/components/StimulusPanel.cjs.map +0 -1
- package/dist/components/StimulusPanel.js.map +0 -1
- package/dist/components/WrittenResponse.cjs.map +0 -1
- package/dist/components/WrittenResponse.js.map +0 -1
- package/dist/hooks/useSpeechRecorder.cjs.map +0 -1
- package/dist/hooks/useSpeechRecorder.js.map +0 -1
- package/dist/i18n/LkIntlProvider.cjs.map +0 -1
- package/dist/i18n/LkIntlProvider.js.map +0 -1
- package/dist/machine-CuwKqWXC.d.cts +0 -26
- package/dist/machine-CuwKqWXC.d.ts +0 -26
- package/dist/theme/ThemeProvider.cjs.map +0 -1
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/types-CO0XLEN6.d.cts +0 -973
- package/dist/types-CrtIcRcK.d.ts +0 -973
|
@@ -1,73 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The model a host runs for learners, as the components call it. The SDK never
|
|
6
|
-
* calls a model, holds a key or writes a prompt: each port is the host's
|
|
7
|
-
* function — usually a request to its own server, which holds the key and the
|
|
8
|
-
* prompt and chooses the model.
|
|
9
|
-
*
|
|
10
|
-
* A port is called only when the learner asks — a button, never on render —
|
|
11
|
-
* and gets an `AbortSignal` that fires when the answer it was asked about goes
|
|
12
|
-
* away. Whatever it resolves to is checked before a learner sees it: see
|
|
13
|
-
* `checkAiExplanation` and `checkAiHint` in lk-core. A port that rejects, or
|
|
14
|
-
* resolves to something refused, costs the learner the help, never the
|
|
15
|
-
* question.
|
|
16
|
-
*
|
|
17
|
-
* Leave a port out to switch that feature off. Nothing AI renders in `exam`,
|
|
18
|
-
* whatever is passed.
|
|
19
|
-
*/
|
|
20
|
-
interface LearnerAi {
|
|
21
|
-
/** Explains a graded answer. */
|
|
22
|
-
explain?: (request: AiExplanationRequest, options: {
|
|
23
|
-
signal: AbortSignal;
|
|
24
|
-
}) => Promise<AiTextResult>;
|
|
25
|
-
/** Writes the next hint for an answer not yet submitted. */
|
|
26
|
-
hint?: (request: AiHintRequest, options: {
|
|
27
|
-
signal: AbortSignal;
|
|
28
|
-
}) => Promise<AiTextResult>;
|
|
29
|
-
/** The most hints a learner can ask for on one question. Default 3, at most 10. */
|
|
30
|
-
maxHints?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Gives feedback on a draft of a written response, before the learner
|
|
33
|
-
* submits it: the overall feedback as text, corrections that quote the
|
|
34
|
-
* draft, and a judgement per rubric criterion. See `checkAiWritingFeedback`
|
|
35
|
-
* in lk-core for what is refused.
|
|
36
|
-
*/
|
|
37
|
-
writingFeedback?: (request: AiWritingFeedbackRequest, options: {
|
|
38
|
-
signal: AbortSignal;
|
|
39
|
-
}) => Promise<AiWritingFeedbackResult>;
|
|
40
|
-
/** How many times a learner can ask for feedback on one written response. Default 3, at most 10. */
|
|
41
|
-
maxWritingFeedback?: number;
|
|
42
|
-
/**
|
|
43
|
-
* The language to write explanations and hints in, as a tag (`es`,
|
|
44
|
-
* `pt-BR`). Defaults to the component's `locale`: the interface language,
|
|
45
|
-
* which the buttons around the help are in, and usually the right one. In a
|
|
46
|
-
* language course it need not be the item's — English items, explained in
|
|
47
|
-
* Spanish — and the item's own language reaches your port as `facts.locale`.
|
|
48
|
-
*/
|
|
49
|
-
learnerLocale?: string;
|
|
50
|
-
}
|
|
51
|
-
interface LkAiProviderProps {
|
|
52
|
-
ai: LearnerAi;
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Supplies the host's AI ports to every activity beneath, as `LkIntlProvider`
|
|
57
|
-
* supplies strings. A component's own `ai` prop wins over it, whole.
|
|
58
|
-
*
|
|
59
|
-
* ```tsx
|
|
60
|
-
* <LkAiProvider ai={{
|
|
61
|
-
* explain: (request, { signal }) => api.explain(request, signal),
|
|
62
|
-
* hint: (request, { signal }) => api.hint(request, signal),
|
|
63
|
-
* learnerLocale: learner.language,
|
|
64
|
-
* }}>
|
|
65
|
-
* <ActivitySequence … />
|
|
66
|
-
* </LkAiProvider>
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
declare function LkAiProvider({ ai, children }: LkAiProviderProps): React.JSX.Element;
|
|
70
|
-
/** The ports in force: a component's own, else the provider's, else none. */
|
|
71
|
-
declare function useLearnerAi(override?: LearnerAi): LearnerAi | undefined;
|
|
72
|
-
|
|
73
|
-
export { type LearnerAi, LkAiProvider, type LkAiProviderProps, useLearnerAi };
|
|
1
|
+
import { i as useLearnerAi, n as LkAiProvider, r as LkAiProviderProps, t as LearnerAi } from "../LkAiProvider-DAPpA3PQ.cjs";
|
|
2
|
+
export { LearnerAi, LkAiProvider, LkAiProviderProps, useLearnerAi };
|
|
@@ -1,73 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The model a host runs for learners, as the components call it. The SDK never
|
|
6
|
-
* calls a model, holds a key or writes a prompt: each port is the host's
|
|
7
|
-
* function — usually a request to its own server, which holds the key and the
|
|
8
|
-
* prompt and chooses the model.
|
|
9
|
-
*
|
|
10
|
-
* A port is called only when the learner asks — a button, never on render —
|
|
11
|
-
* and gets an `AbortSignal` that fires when the answer it was asked about goes
|
|
12
|
-
* away. Whatever it resolves to is checked before a learner sees it: see
|
|
13
|
-
* `checkAiExplanation` and `checkAiHint` in lk-core. A port that rejects, or
|
|
14
|
-
* resolves to something refused, costs the learner the help, never the
|
|
15
|
-
* question.
|
|
16
|
-
*
|
|
17
|
-
* Leave a port out to switch that feature off. Nothing AI renders in `exam`,
|
|
18
|
-
* whatever is passed.
|
|
19
|
-
*/
|
|
20
|
-
interface LearnerAi {
|
|
21
|
-
/** Explains a graded answer. */
|
|
22
|
-
explain?: (request: AiExplanationRequest, options: {
|
|
23
|
-
signal: AbortSignal;
|
|
24
|
-
}) => Promise<AiTextResult>;
|
|
25
|
-
/** Writes the next hint for an answer not yet submitted. */
|
|
26
|
-
hint?: (request: AiHintRequest, options: {
|
|
27
|
-
signal: AbortSignal;
|
|
28
|
-
}) => Promise<AiTextResult>;
|
|
29
|
-
/** The most hints a learner can ask for on one question. Default 3, at most 10. */
|
|
30
|
-
maxHints?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Gives feedback on a draft of a written response, before the learner
|
|
33
|
-
* submits it: the overall feedback as text, corrections that quote the
|
|
34
|
-
* draft, and a judgement per rubric criterion. See `checkAiWritingFeedback`
|
|
35
|
-
* in lk-core for what is refused.
|
|
36
|
-
*/
|
|
37
|
-
writingFeedback?: (request: AiWritingFeedbackRequest, options: {
|
|
38
|
-
signal: AbortSignal;
|
|
39
|
-
}) => Promise<AiWritingFeedbackResult>;
|
|
40
|
-
/** How many times a learner can ask for feedback on one written response. Default 3, at most 10. */
|
|
41
|
-
maxWritingFeedback?: number;
|
|
42
|
-
/**
|
|
43
|
-
* The language to write explanations and hints in, as a tag (`es`,
|
|
44
|
-
* `pt-BR`). Defaults to the component's `locale`: the interface language,
|
|
45
|
-
* which the buttons around the help are in, and usually the right one. In a
|
|
46
|
-
* language course it need not be the item's — English items, explained in
|
|
47
|
-
* Spanish — and the item's own language reaches your port as `facts.locale`.
|
|
48
|
-
*/
|
|
49
|
-
learnerLocale?: string;
|
|
50
|
-
}
|
|
51
|
-
interface LkAiProviderProps {
|
|
52
|
-
ai: LearnerAi;
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Supplies the host's AI ports to every activity beneath, as `LkIntlProvider`
|
|
57
|
-
* supplies strings. A component's own `ai` prop wins over it, whole.
|
|
58
|
-
*
|
|
59
|
-
* ```tsx
|
|
60
|
-
* <LkAiProvider ai={{
|
|
61
|
-
* explain: (request, { signal }) => api.explain(request, signal),
|
|
62
|
-
* hint: (request, { signal }) => api.hint(request, signal),
|
|
63
|
-
* learnerLocale: learner.language,
|
|
64
|
-
* }}>
|
|
65
|
-
* <ActivitySequence … />
|
|
66
|
-
* </LkAiProvider>
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
declare function LkAiProvider({ ai, children }: LkAiProviderProps): React.JSX.Element;
|
|
70
|
-
/** The ports in force: a component's own, else the provider's, else none. */
|
|
71
|
-
declare function useLearnerAi(override?: LearnerAi): LearnerAi | undefined;
|
|
72
|
-
|
|
73
|
-
export { type LearnerAi, LkAiProvider, type LkAiProviderProps, useLearnerAi };
|
|
1
|
+
import { i as useLearnerAi, n as LkAiProvider, r as LkAiProviderProps, t as LearnerAi } from "../LkAiProvider-QdEcIhoo.js";
|
|
2
|
+
export { LearnerAi, LkAiProvider, LkAiProviderProps, useLearnerAi };
|
package/dist/ai/LkAiProvider.js
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/ai/LkAiProvider.tsx
|
|
6
|
+
const LkAiContext = createContext(null);
|
|
7
|
+
/**
|
|
8
|
+
* Supplies the host's AI ports to every activity beneath, as `LkIntlProvider`
|
|
9
|
+
* supplies strings. A component's own `ai` prop wins over it, whole.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <LkAiProvider ai={{
|
|
13
|
+
* explain: (request, { signal }) => api.explain(request, signal),
|
|
14
|
+
* hint: (request, { signal }) => api.hint(request, signal),
|
|
15
|
+
* learnerLocale: learner.language,
|
|
16
|
+
* }}>
|
|
17
|
+
* <ActivitySequence … />
|
|
18
|
+
* </LkAiProvider>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function LkAiProvider({ ai, children }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(LkAiContext.Provider, {
|
|
23
|
+
value: ai,
|
|
24
|
+
children
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** The ports in force: a component's own, else the provider's, else none. */
|
|
28
|
+
function useLearnerAi(override) {
|
|
29
|
+
const context = useContext(LkAiContext);
|
|
30
|
+
return override ?? context ?? void 0;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { LkAiProvider, useLearnerAi };
|
|
34
|
+
|
|
4
35
|
//# sourceMappingURL=LkAiProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"LkAiProvider.js","names":[],"sources":["../../src/ai/LkAiProvider.tsx"],"sourcesContent":["'use client';\n\nimport type {\n AiCoachingRequest,\n AiCoachingResult,\n AiExplanationRequest,\n AiHintRequest,\n AiTextResult,\n AiWritingFeedbackRequest,\n AiWritingFeedbackResult,\n} from '@intellectif/lk-core';\nimport { createContext, type ReactNode, useContext } from 'react';\n\n/**\n * The model a host runs for learners, as the components call it. The SDK never\n * calls a model, holds a key or writes a prompt: each port is the host's\n * function — usually a request to its own server, which holds the key and the\n * prompt and chooses the model.\n *\n * A port is called only when the learner asks — a button, never on render —\n * and gets an `AbortSignal` that fires when the answer it was asked about goes\n * away. Whatever it resolves to is checked before a learner sees it: see\n * `checkAiExplanation` and `checkAiHint` in lk-core. A port that rejects, or\n * resolves to something refused, costs the learner the help, never the\n * question.\n *\n * Leave a port out to switch that feature off. Nothing AI renders in `exam`,\n * whatever is passed.\n */\nexport interface LearnerAi {\n /** Explains a graded answer. */\n explain?: (\n request: AiExplanationRequest,\n options: { signal: AbortSignal },\n ) => Promise<AiTextResult>;\n /** Writes the next hint for an answer not yet submitted. */\n hint?: (request: AiHintRequest, options: { signal: AbortSignal }) => Promise<AiTextResult>;\n /** The most hints a learner can ask for on one question. Default 3, at most 10. */\n maxHints?: number;\n /**\n * Gives feedback on a draft of a written response, before the learner\n * submits it: the overall feedback as text, corrections that quote the\n * draft, and a judgement per rubric criterion. See `checkAiWritingFeedback`\n * in lk-core for what is refused.\n */\n writingFeedback?: (\n request: AiWritingFeedbackRequest,\n options: { signal: AbortSignal },\n ) => Promise<AiWritingFeedbackResult>;\n /** How many times a learner can ask for feedback on one written response. Default 3, at most 10. */\n maxWritingFeedback?: number;\n /**\n * Coaches a learner on a graded reading aloud: what the speech engine's\n * marks mean and how to practise, word by word. The marks are the engine's\n * and are never re-scored; coaching on a word the engine did not mark, or a\n * sound it did not report, is refused whole. See `checkAiCoaching` in\n * lk-core. One coaching per reading.\n */\n pronunciationCoaching?: (\n request: AiCoachingRequest,\n options: { signal: AbortSignal },\n ) => Promise<AiCoachingResult>;\n /**\n * The language to write explanations, hints, feedback and coaching in, as a tag (`es`,\n * `pt-BR`). Defaults to the component's `locale`: the interface language,\n * which the buttons around the help are in, and usually the right one. In a\n * language course it need not be the item's — English items, explained in\n * Spanish — and the item's own language reaches your port as `facts.locale`.\n */\n learnerLocale?: string;\n}\n\nconst LkAiContext = createContext<LearnerAi | null>(null);\n\nexport interface LkAiProviderProps {\n ai: LearnerAi;\n children: ReactNode;\n}\n\n/**\n * Supplies the host's AI ports to every activity beneath, as `LkIntlProvider`\n * supplies strings. A component's own `ai` prop wins over it, whole.\n *\n * ```tsx\n * <LkAiProvider ai={{\n * explain: (request, { signal }) => api.explain(request, signal),\n * hint: (request, { signal }) => api.hint(request, signal),\n * learnerLocale: learner.language,\n * }}>\n * <ActivitySequence … />\n * </LkAiProvider>\n * ```\n */\nexport function LkAiProvider({ ai, children }: LkAiProviderProps): React.JSX.Element {\n return <LkAiContext.Provider value={ai}>{children}</LkAiContext.Provider>;\n}\n\n/** The ports in force: a component's own, else the provider's, else none. */\nexport function useLearnerAi(override?: LearnerAi): LearnerAi | undefined {\n const context = useContext(LkAiContext);\n return override ?? context ?? undefined;\n}\n"],"mappings":";;;;AAwEA,MAAM,cAAc,cAAgC,IAAI;;;;;;;;;;;;;;;AAqBxD,SAAgB,aAAa,EAAE,IAAI,YAAkD;CACnF,OAAO,oBAAC,YAAY,UAAb;EAAsB,OAAO;EAAK;CAA+B,CAAA;AAC1E;;AAGA,SAAgB,aAAa,UAA6C;CACxE,MAAM,UAAU,WAAW,WAAW;CACtC,OAAO,YAAY,WAAW,KAAA;AAChC"}
|
package/dist/ai/useAiHelp.cjs
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "useAiExplanation", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunk6RIM5EQP_cjs.useAiExplanation; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "useAiHints", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunk6RIM5EQP_cjs.useAiHints; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "useAiWritingFeedback", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunk6RIM5EQP_cjs.useAiWritingFeedback; }
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=useAiHelp.cjs.map
|
|
24
|
-
//# sourceMappingURL=useAiHelp.cjs.map
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_useAiHelp = require("../useAiHelp-h9yOLFqt.cjs");
|
|
5
|
+
exports.useAiCoaching = require_useAiHelp.useAiCoaching;
|
|
6
|
+
exports.useAiExplanation = require_useAiHelp.useAiExplanation;
|
|
7
|
+
exports.useAiHints = require_useAiHelp.useAiHints;
|
|
8
|
+
exports.useAiWritingFeedback = require_useAiHelp.useAiWritingFeedback;
|
package/dist/ai/useAiHelp.d.cts
CHANGED
|
@@ -1,96 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import 'react';
|
|
6
|
-
|
|
1
|
+
import { t as LearnerAi } from "../LkAiProvider-DAPpA3PQ.cjs";
|
|
2
|
+
import { a as RenderMode, s as RenderableActivity } from "../types-BOQd93x3.cjs";
|
|
3
|
+
import { AiCoaching, AiTextResult, AiWritingFeedback, DeliveryPolicy, GradeRecord, InteractionEvent, ItemOutcome, LearnerResponse, ReadAloudData, SpeechAssessment } from "@intellectif/lk-core";
|
|
4
|
+
//#region src/ai/useAiHelp.d.ts
|
|
7
5
|
/**
|
|
8
6
|
* The question AI help is being asked about, as the SDK's own components know
|
|
9
7
|
* it. A host drawing its own question passes what it has; everything optional
|
|
10
8
|
* defaults to what the components pass.
|
|
11
9
|
*/
|
|
12
|
-
interface AiHelpSituation {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
export interface AiHelpSituation {
|
|
11
|
+
/** The question, as `data` is given to any activity component. */
|
|
12
|
+
data: RenderableActivity;
|
|
13
|
+
/** The learner's answer as it stands: submitted, restored, or being written. */
|
|
14
|
+
response: LearnerResponse;
|
|
15
|
+
/** Whether the learner has committed that answer. */
|
|
16
|
+
submitted: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Pass on the `renderMode` your question was given. Left out, the paper
|
|
19
|
+
* around the question answers for it — a question inside `<ActivitySequence>`
|
|
20
|
+
* or `<InteractiveVideo>` knows its mode — and `practice` only where there is
|
|
21
|
+
* no paper at all. An `exam` around the question wins over anything passed
|
|
22
|
+
* here.
|
|
23
|
+
*/
|
|
24
|
+
renderMode?: RenderMode;
|
|
25
|
+
/**
|
|
26
|
+
* The AI ports to use, overriding {@link LkAiProvider}'s for this question.
|
|
27
|
+
* A question inside `<ActivitySequence>` or `<InteractiveVideo>` is handed
|
|
28
|
+
* the ports in force as `ai` — pass that straight in.
|
|
29
|
+
*/
|
|
30
|
+
ai?: LearnerAi;
|
|
31
|
+
/** The interface language: the default language for what a model writes. */
|
|
32
|
+
locale?: string;
|
|
33
|
+
/** Where `ai-hint-shown` and `ai-explanation-shown` go. */
|
|
34
|
+
onInteraction?: (event: InteractionEvent) => void;
|
|
35
|
+
/**
|
|
36
|
+
* The delivery policy your question was handed. The paper around the
|
|
37
|
+
* question holds as well — a set that switched AI hints off keeps them off
|
|
38
|
+
* here, whatever is passed — so leaving it out never turns anything on.
|
|
39
|
+
*/
|
|
40
|
+
delivery?: DeliveryPolicy | null;
|
|
43
41
|
}
|
|
44
|
-
interface AiExplanationInput extends AiHelpSituation {
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
export interface AiExplanationInput extends AiHelpSituation {
|
|
43
|
+
/** The grade of record, which `review` explains. */
|
|
44
|
+
outcome?: ItemOutcome;
|
|
47
45
|
}
|
|
48
|
-
interface AiExplanationHelp {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
export interface AiExplanationHelp {
|
|
47
|
+
/**
|
|
48
|
+
* Whether to offer the learner an explanation at all: a port is present, the
|
|
49
|
+
* answer is graded, the type is one the SDK explains, and the author left
|
|
50
|
+
* explanations on. False in `exam`, always.
|
|
51
|
+
*/
|
|
52
|
+
offered: boolean;
|
|
53
|
+
status: 'idle' | 'loading' | 'shown' | 'unavailable';
|
|
54
|
+
/** What to show, once it has arrived and been checked. Its `text` is text, never HTML. */
|
|
55
|
+
explanation: AiTextResult | null;
|
|
56
|
+
/**
|
|
57
|
+
* Asks the port, when the learner presses something. Does nothing while a
|
|
58
|
+
* call is on its way, and nothing at all where `offered` is false — so an
|
|
59
|
+
* exam cannot reach a model through this hook, whatever ports are in scope.
|
|
60
|
+
*
|
|
61
|
+
* One identity for the life of the question, so it is safe in an effect's
|
|
62
|
+
* dependencies.
|
|
63
|
+
*/
|
|
64
|
+
ask: () => void;
|
|
67
65
|
}
|
|
68
|
-
interface AiHintsInput extends AiHelpSituation {
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
export interface AiHintsInput extends AiHelpSituation {
|
|
67
|
+
/** A disabled question gives no hints, as it takes no answer. */
|
|
68
|
+
disabled?: boolean;
|
|
71
69
|
}
|
|
72
|
-
interface AiHintsHelp {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
export interface AiHintsHelp {
|
|
71
|
+
/**
|
|
72
|
+
* Whether the learner may ask for hints here at all: a port is present, the
|
|
73
|
+
* mode is `practice`, the answer is not in, the question is not disabled or
|
|
74
|
+
* redacted, the type takes hints and the author left them on. It stays true
|
|
75
|
+
* once `used` reaches `limit` — there are no more to give, but the question
|
|
76
|
+
* is still one that gives them.
|
|
77
|
+
*/
|
|
78
|
+
offered: boolean;
|
|
79
|
+
status: 'idle' | 'loading' | 'unavailable';
|
|
80
|
+
/** Every hint shown for this question, in the order they were given. */
|
|
81
|
+
hints: readonly AiTextResult[];
|
|
82
|
+
/** The host's `maxHints`, as a whole number from 1 to 10 (3 by default). */
|
|
83
|
+
limit: number;
|
|
84
|
+
/** How many hints have been shown. A refused hint is not counted. */
|
|
85
|
+
used: number;
|
|
86
|
+
/**
|
|
87
|
+
* Asks for the next hint. Does nothing at the limit, while a call is on its
|
|
88
|
+
* way, or where `offered` is false. One identity for the life of the
|
|
89
|
+
* question.
|
|
90
|
+
*/
|
|
91
|
+
ask: () => void;
|
|
94
92
|
}
|
|
95
93
|
/**
|
|
96
94
|
* "Explain my answer", without the SDK's own button and panel: the rules, the
|
|
@@ -124,7 +122,7 @@ interface AiHintsHelp {
|
|
|
124
122
|
* still on its way is abandoned — a late explanation never lands beside an
|
|
125
123
|
* answer it was not written for — as it is when the caller unmounts.
|
|
126
124
|
*/
|
|
127
|
-
declare function useAiExplanation(input: AiExplanationInput): AiExplanationHelp;
|
|
125
|
+
export declare function useAiExplanation(input: AiExplanationInput): AiExplanationHelp;
|
|
128
126
|
/**
|
|
129
127
|
* "Get a hint", without the SDK's own button and list: the rules, the call, the
|
|
130
128
|
* checks and the record, for a question you draw yourself.
|
|
@@ -147,40 +145,40 @@ declare function useAiExplanation(input: AiExplanationInput): AiExplanationHelp;
|
|
|
147
145
|
* Keep the hints on screen after submit — the learner can see what they were
|
|
148
146
|
* given — while `offered` turns false. Another question starts with none.
|
|
149
147
|
*/
|
|
150
|
-
declare function useAiHints(input: AiHintsInput): AiHintsHelp;
|
|
151
|
-
interface AiWritingFeedbackInput extends AiHelpSituation {
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
export declare function useAiHints(input: AiHintsInput): AiHintsHelp;
|
|
149
|
+
export interface AiWritingFeedbackInput extends AiHelpSituation {
|
|
150
|
+
/** A disabled question takes no feedback, as it takes no answer. */
|
|
151
|
+
disabled?: boolean;
|
|
154
152
|
}
|
|
155
|
-
interface AiWritingFeedbackHelp {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
153
|
+
export interface AiWritingFeedbackHelp {
|
|
154
|
+
/**
|
|
155
|
+
* Whether the learner may ask for feedback here at all: a port is present,
|
|
156
|
+
* the mode is `practice`, the answer is not in, the question is a written
|
|
157
|
+
* response that is not disabled or redacted, its author left explanations on,
|
|
158
|
+
* and the paper shows feedback and solutions and allows AI explanations. It
|
|
159
|
+
* stays true once `used` reaches `limit`.
|
|
160
|
+
*/
|
|
161
|
+
offered: boolean;
|
|
162
|
+
status: 'idle' | 'loading' | 'unavailable';
|
|
163
|
+
/** Every piece of feedback shown for this question, oldest first. */
|
|
164
|
+
feedback: readonly AiWritingFeedback[];
|
|
165
|
+
/** The latest, or `null` before any. Its `text` is text, never HTML. */
|
|
166
|
+
latest: AiWritingFeedback | null;
|
|
167
|
+
/**
|
|
168
|
+
* Whether `latest` is about the draft as it stands. Once the learner revises,
|
|
169
|
+
* its corrections point at words that may no longer be there: say so.
|
|
170
|
+
*/
|
|
171
|
+
current: boolean;
|
|
172
|
+
/** The host's `maxWritingFeedback`, as a whole number from 1 to 10 (3 by default). */
|
|
173
|
+
limit: number;
|
|
174
|
+
/** How many times feedback has been shown. A refused reply is not counted. */
|
|
175
|
+
used: number;
|
|
176
|
+
/**
|
|
177
|
+
* Asks for feedback on the draft as it stands. Does nothing at the limit,
|
|
178
|
+
* while a call is on its way, on an empty draft, or where `offered` is false.
|
|
179
|
+
* One identity for the life of the question.
|
|
180
|
+
*/
|
|
181
|
+
ask: () => void;
|
|
184
182
|
}
|
|
185
183
|
/**
|
|
186
184
|
* "Get feedback on my draft", without the SDK's own button and panel: the
|
|
@@ -202,6 +200,85 @@ interface AiWritingFeedbackHelp {
|
|
|
202
200
|
* mistakes." And show `indicativeScore` as what it is — an indication, not a
|
|
203
201
|
* grade.
|
|
204
202
|
*/
|
|
205
|
-
declare function useAiWritingFeedback(input: AiWritingFeedbackInput): AiWritingFeedbackHelp;
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
export declare function useAiWritingFeedback(input: AiWritingFeedbackInput): AiWritingFeedbackHelp;
|
|
204
|
+
export interface AiCoachingInput {
|
|
205
|
+
/**
|
|
206
|
+
* The read-aloud item, as `data` is given to `<ReadAloud>` — or as much of
|
|
207
|
+
* one as coaching reads: its id, title, text and language, and the author's
|
|
208
|
+
* `instructions` and `ai` settings where it has them.
|
|
209
|
+
*/
|
|
210
|
+
data: Pick<ReadAloudData, 'id' | 'title' | 'referenceText' | 'locale'> & Partial<Pick<ReadAloudData, 'instructions' | 'ai'>>;
|
|
211
|
+
/**
|
|
212
|
+
* The speech engine's assessment of the take, as the learner is shown it.
|
|
213
|
+
* When given, it is the marks — each word's, with its sounds and what each
|
|
214
|
+
* was heard as — and the only ones: see `aiCoachingRequest` in lk-core.
|
|
215
|
+
*/
|
|
216
|
+
assessment?: SpeechAssessment | null;
|
|
217
|
+
/**
|
|
218
|
+
* The grade of record. Its score is context for the model; without an
|
|
219
|
+
* assessment, its word details are the marks, and they carry no sounds.
|
|
220
|
+
*/
|
|
221
|
+
grade?: GradeRecord | null;
|
|
222
|
+
/**
|
|
223
|
+
* Pass on the `renderMode` your reading was given. Coaching is never offered
|
|
224
|
+
* in `exam`, and an `exam` around the reading wins over anything passed here.
|
|
225
|
+
*/
|
|
226
|
+
renderMode?: RenderMode;
|
|
227
|
+
/** The AI ports to use, overriding {@link LkAiProvider}'s for this reading. */
|
|
228
|
+
ai?: LearnerAi;
|
|
229
|
+
/** The interface language: the default language for what a model writes. */
|
|
230
|
+
locale?: string;
|
|
231
|
+
/** Where `ai-coaching-shown` and `ai-help-refused` go. */
|
|
232
|
+
onInteraction?: (event: InteractionEvent) => void;
|
|
233
|
+
/**
|
|
234
|
+
* The delivery policy your reading was handed. Coaching needs feedback shown
|
|
235
|
+
* and AI explanations allowed; the paper around the reading holds as well.
|
|
236
|
+
*/
|
|
237
|
+
delivery?: DeliveryPolicy | null;
|
|
238
|
+
}
|
|
239
|
+
export interface AiCoachingHelp {
|
|
240
|
+
/**
|
|
241
|
+
* Whether to offer coaching at all: a `pronunciationCoaching` port is
|
|
242
|
+
* present, there are marks to coach, the mode is not `exam`, the item's
|
|
243
|
+
* author left explanations on, and the paper shows feedback and allows AI
|
|
244
|
+
* explanations.
|
|
245
|
+
*/
|
|
246
|
+
offered: boolean;
|
|
247
|
+
status: 'idle' | 'loading' | 'shown' | 'unavailable';
|
|
248
|
+
/**
|
|
249
|
+
* What to show, once it has arrived and been checked: the coaching's text,
|
|
250
|
+
* and the words it works on in reading order, each with its tip and, where
|
|
251
|
+
* the engine reported one, the sound. All of it is text, never HTML.
|
|
252
|
+
*/
|
|
253
|
+
coaching: AiCoaching | null;
|
|
254
|
+
/**
|
|
255
|
+
* Asks the port, when the learner presses something. Does nothing while a
|
|
256
|
+
* call is on its way, once coaching is shown — one per reading — or where
|
|
257
|
+
* `offered` is false. One identity for the life of the reading.
|
|
258
|
+
*/
|
|
259
|
+
ask: () => void;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* "Coach me on this reading", without the SDK's own button and panel: the
|
|
263
|
+
* rules, the call, the checks and the record, for marks you draw yourself.
|
|
264
|
+
*
|
|
265
|
+
* It is what `<PronunciationFeedback>` and `<ReadAloud>` use, so a host's own
|
|
266
|
+
* marks get coaching on the same terms: never in `exam`, never where the
|
|
267
|
+
* item's author switched explanations off, and never coaching on a word the
|
|
268
|
+
* engine did not mark or a sound it did not report — which is refused whole.
|
|
269
|
+
*
|
|
270
|
+
* ```tsx
|
|
271
|
+
* const { offered, status, coaching, ask } = useAiCoaching({
|
|
272
|
+
* data: item, assessment, grade, renderMode, ai,
|
|
273
|
+
* });
|
|
274
|
+
* ```
|
|
275
|
+
*
|
|
276
|
+
* **Say who wrote it**, as the SDK's own panel does: "Written by AI. It can make
|
|
277
|
+
* mistakes." The marks beside it are the engine's; the coaching is a model's.
|
|
278
|
+
*
|
|
279
|
+
* Another reading — other marks, another text — drops the coaching and
|
|
280
|
+
* abandons a call still on its way, as the caller unmounting does.
|
|
281
|
+
*/
|
|
282
|
+
export declare function useAiCoaching(input: AiCoachingInput): AiCoachingHelp;
|
|
283
|
+
//#endregion
|
|
284
|
+
//# sourceMappingURL=useAiHelp.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAiHelp.d.cts","names":[],"sources":["../../src/ai/useAiHelp.ts"],"mappings":";;;;;;;;;iBA6CiB;;EAEf,MAAM;;EAEN,UAAU;;EAEV;;;;;;;;EAQA,aAAa;;;;;;EAMb,KAAK;;EAEL;;EAEA,iBAAiB,OAAO;;;;;;EAMxB,WAAW;;iBAGI,2BAA2B;;EAE1C,UAAU;;iBAGK;;;;;;EAMf;EACA;;EAEA,aAAa;;;;;;;;;EASb;;iBAGe,qBAAqB;;EAEpC;;iBAGe;;;;;;;;EAQf;EACA;;EAEA,gBAAgB;;EAEhB;;EAEA;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwEc,iBAAiB,OAAO,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;wBA8H7C,WAAW,OAAO,eAAe;iBA2HhC,+BAA+B;;EAE9C;;iBAGe;;;;;;;;EAQf;EACA;;EAEA,mBAAmB;;EAEnB,QAAQ;;;;;EAKR;;EAEA;;EAEA;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;;;wBAiCc,qBAAqB,OAAO,yBAAyB;iBA4IpD;;;;;;EAMf,MAAM,KAAK,8DACT,QAAQ,KAAK;;;;;;EAMf,aAAa;;;;;EAKb,QAAQ;;;;;EAKR,aAAa;;EAEb,KAAK;;EAEL;;EAEA,iBAAiB,OAAO;;;;;EAKxB,WAAW;;iBAGI;;;;;;;EAOf;EACA;;;;;;EAMA,UAAU;;;;;;EAMV;;;;;;;;;;;;;;;;;;;;;;;wBA4Bc,cAAc,OAAO,kBAAkB"}
|