@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.
- package/CHANGELOG.md +23 -0
- package/README.md +9 -5
- 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/{chunk-DC4CQCK5.js.map → ReadAloud-C8RhaUqV.js.map} +1 -1
- 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-B6DyGqzh.d.cts +62 -0
- package/dist/ThemeProvider-B6DyGqzh.d.cts.map +1 -0
- package/dist/ThemeProvider-BCrxBaY-.d.ts +62 -0
- package/dist/ThemeProvider-BCrxBaY-.d.ts.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/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 -83
- package/dist/ai/LkAiProvider.d.ts +2 -83
- package/dist/ai/LkAiProvider.js +33 -2
- package/dist/ai/LkAiProvider.js.map +1 -1
- package/dist/ai/useAiHelp.cjs +7 -25
- package/dist/ai/useAiHelp.d.cts +175 -177
- package/dist/ai/useAiHelp.d.cts.map +1 -0
- package/dist/ai/useAiHelp.d.ts +175 -177
- package/dist/ai/useAiHelp.d.ts.map +1 -0
- package/dist/ai/useAiHelp.js +3 -4
- package/dist/components/ActivityPreview.cjs +3 -29
- package/dist/components/ActivityPreview.d.cts +2 -81
- package/dist/components/ActivityPreview.d.ts +2 -81
- package/dist/components/ActivityPreview.js +2 -20
- package/dist/components/ActivitySequence.cjs +3 -30
- package/dist/components/ActivitySequence.d.cts +2 -432
- package/dist/components/ActivitySequence.d.ts +2 -432
- package/dist/components/ActivitySequence.js +2 -21
- package/dist/components/Dictation.cjs +4 -21
- package/dist/components/Dictation.d.cts +2 -19
- package/dist/components/Dictation.d.ts +2 -19
- package/dist/components/Dictation.js +3 -12
- package/dist/components/FillInTheBlanks.cjs +4 -20
- package/dist/components/FillInTheBlanks.d.cts +2 -30
- package/dist/components/FillInTheBlanks.d.ts +2 -30
- package/dist/components/FillInTheBlanks.js +3 -11
- package/dist/components/GapSelect.cjs +4 -20
- package/dist/components/GapSelect.d.cts +2 -27
- package/dist/components/GapSelect.d.ts +2 -27
- package/dist/components/GapSelect.js +3 -11
- package/dist/components/InteractiveVideo.cjs +5 -32
- package/dist/components/InteractiveVideo.d.cts +3 -291
- package/dist/components/InteractiveVideo.d.ts +3 -291
- package/dist/components/InteractiveVideo.js +3 -19
- package/dist/components/MultipleChoice.cjs +4 -20
- package/dist/components/MultipleChoice.d.cts +2 -26
- package/dist/components/MultipleChoice.d.ts +2 -26
- package/dist/components/MultipleChoice.js +3 -11
- package/dist/components/PronunciationFeedback.cjs +4 -17
- package/dist/components/PronunciationFeedback.d.cts +2 -90
- package/dist/components/PronunciationFeedback.d.ts +2 -90
- package/dist/components/PronunciationFeedback.js +3 -8
- 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 -19
- package/dist/components/WrittenResponse.d.cts +3 -18
- package/dist/components/WrittenResponse.d.ts +3 -18
- package/dist/components/WrittenResponse.js +3 -10
- 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-6P4rJHrJ.d.cts +432 -0
- package/dist/index-6P4rJHrJ.d.cts.map +1 -0
- package/dist/index-90CX504k.d.ts +90 -0
- package/dist/index-90CX504k.d.ts.map +1 -0
- package/dist/index-B_SgnjsC.d.cts +291 -0
- package/dist/index-B_SgnjsC.d.cts.map +1 -0
- package/dist/index-BavVW5z5.d.cts +25 -0
- package/dist/index-BavVW5z5.d.cts.map +1 -0
- package/dist/index-BhHv6Fiu.d.cts +28 -0
- package/dist/index-BhHv6Fiu.d.cts.map +1 -0
- package/dist/index-Bsu8VciA.d.ts +432 -0
- package/dist/index-Bsu8VciA.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-CKTpYTCC.d.cts +49 -0
- package/dist/index-CKTpYTCC.d.cts.map +1 -0
- package/dist/index-CO_SRFJj.d.ts +16 -0
- package/dist/index-CO_SRFJj.d.ts.map +1 -0
- package/dist/index-CSsuUsP7.d.cts +124 -0
- package/dist/index-CSsuUsP7.d.cts.map +1 -0
- package/dist/index-CunUyeuN.d.cts +78 -0
- package/dist/index-CunUyeuN.d.cts.map +1 -0
- package/dist/index-CzfRzks6.d.cts +90 -0
- package/dist/index-CzfRzks6.d.cts.map +1 -0
- package/dist/index-D14xtpBS.d.cts +24 -0
- package/dist/index-D14xtpBS.d.cts.map +1 -0
- package/dist/index-DHRPAPZf.d.ts +291 -0
- package/dist/index-DHRPAPZf.d.ts.map +1 -0
- package/dist/index-DLV6cK26.d.cts +16 -0
- package/dist/index-DLV6cK26.d.cts.map +1 -0
- package/dist/index-DbCCQ9cP.d.ts +124 -0
- package/dist/index-DbCCQ9cP.d.ts.map +1 -0
- package/dist/index-DeV5B2m5.d.ts +24 -0
- package/dist/index-DeV5B2m5.d.ts.map +1 -0
- package/dist/index-TZCJVSge.d.ts +28 -0
- package/dist/index-TZCJVSge.d.ts.map +1 -0
- package/dist/index-ZVvLHsd3.d.ts +25 -0
- package/dist/index-ZVvLHsd3.d.ts.map +1 -0
- package/dist/index-eQwBgpSw.d.ts +78 -0
- package/dist/index-eQwBgpSw.d.ts.map +1 -0
- package/dist/index.cjs +118 -163
- 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 -29
- 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/tries-CbbtZkdG.cjs +363 -0
- package/dist/tries-CbbtZkdG.cjs.map +1 -0
- 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-B7A5gHMj.d.ts +0 -115
- package/dist/WrittenResponse-BpL9p2Hn.d.cts +0 -115
- package/dist/ai/useAiHelp.cjs.map +0 -1
- package/dist/ai/useAiHelp.js.map +0 -1
- package/dist/chunk-2PNSVBLQ.cjs +0 -54
- package/dist/chunk-2PNSVBLQ.cjs.map +0 -1
- package/dist/chunk-2TW6WLBC.js +0 -80
- package/dist/chunk-2TW6WLBC.js.map +0 -1
- package/dist/chunk-4ZZWZSWI.js +0 -61
- package/dist/chunk-4ZZWZSWI.js.map +0 -1
- package/dist/chunk-6N43WDVG.js +0 -29
- package/dist/chunk-6N43WDVG.js.map +0 -1
- package/dist/chunk-7ALBSPYR.cjs +0 -436
- package/dist/chunk-7ALBSPYR.cjs.map +0 -1
- package/dist/chunk-7NFY3M3W.js +0 -234
- package/dist/chunk-7NFY3M3W.js.map +0 -1
- package/dist/chunk-7SB2MJA4.js +0 -29
- package/dist/chunk-7SB2MJA4.js.map +0 -1
- package/dist/chunk-ABJJ3LII.js +0 -434
- package/dist/chunk-ABJJ3LII.js.map +0 -1
- package/dist/chunk-BIGGXHAW.cjs +0 -342
- package/dist/chunk-BIGGXHAW.cjs.map +0 -1
- package/dist/chunk-C7QZE5BI.js +0 -430
- package/dist/chunk-C7QZE5BI.js.map +0 -1
- package/dist/chunk-CWTUWNV3.cjs +0 -2937
- package/dist/chunk-CWTUWNV3.cjs.map +0 -1
- package/dist/chunk-DC4CQCK5.js +0 -915
- package/dist/chunk-DS6HN3YR.cjs +0 -496
- package/dist/chunk-DS6HN3YR.cjs.map +0 -1
- package/dist/chunk-FDQR4GAZ.js +0 -240
- package/dist/chunk-FDQR4GAZ.js.map +0 -1
- package/dist/chunk-FKGMSOJF.js +0 -394
- package/dist/chunk-FKGMSOJF.js.map +0 -1
- package/dist/chunk-G6PXJ2SA.js +0 -823
- package/dist/chunk-G6PXJ2SA.js.map +0 -1
- package/dist/chunk-HNLRVRQR.js +0 -335
- package/dist/chunk-HNLRVRQR.js.map +0 -1
- package/dist/chunk-J3C72RPK.cjs +0 -31
- package/dist/chunk-J3C72RPK.cjs.map +0 -1
- package/dist/chunk-K63VPFOV.cjs +0 -134
- package/dist/chunk-K63VPFOV.cjs.map +0 -1
- package/dist/chunk-KFLIDTDU.cjs +0 -825
- package/dist/chunk-KFLIDTDU.cjs.map +0 -1
- package/dist/chunk-KHKH5LCT.cjs +0 -250
- package/dist/chunk-KHKH5LCT.cjs.map +0 -1
- package/dist/chunk-LBEKRN6Y.cjs +0 -664
- package/dist/chunk-LBEKRN6Y.cjs.map +0 -1
- package/dist/chunk-LPUWXIPR.cjs +0 -578
- package/dist/chunk-LPUWXIPR.cjs.map +0 -1
- package/dist/chunk-MCO52PV5.js +0 -520
- package/dist/chunk-MCO52PV5.js.map +0 -1
- package/dist/chunk-MKXEM2C5.cjs +0 -396
- package/dist/chunk-MKXEM2C5.cjs.map +0 -1
- package/dist/chunk-MXNC5UNO.js +0 -563
- package/dist/chunk-MXNC5UNO.js.map +0 -1
- package/dist/chunk-NAK55BYU.cjs +0 -859
- package/dist/chunk-NAK55BYU.cjs.map +0 -1
- package/dist/chunk-NDBMKGQ5.cjs +0 -599
- package/dist/chunk-NDBMKGQ5.cjs.map +0 -1
- package/dist/chunk-OD65OZIW.cjs +0 -159
- package/dist/chunk-OD65OZIW.cjs.map +0 -1
- package/dist/chunk-ORT3KLGI.js +0 -50
- package/dist/chunk-ORT3KLGI.js.map +0 -1
- package/dist/chunk-PNNUPUH4.cjs +0 -82
- package/dist/chunk-PNNUPUH4.cjs.map +0 -1
- package/dist/chunk-PWHECW6N.js +0 -2934
- package/dist/chunk-PWHECW6N.js.map +0 -1
- package/dist/chunk-RBS5A2DF.js +0 -857
- package/dist/chunk-RBS5A2DF.js.map +0 -1
- package/dist/chunk-RPWUDXG5.cjs +0 -63
- package/dist/chunk-RPWUDXG5.cjs.map +0 -1
- package/dist/chunk-TCDJY3H6.js +0 -494
- package/dist/chunk-TCDJY3H6.js.map +0 -1
- package/dist/chunk-TP5UMRAU.cjs +0 -918
- package/dist/chunk-TP5UMRAU.cjs.map +0 -1
- package/dist/chunk-TS7J6DTY.js +0 -597
- package/dist/chunk-TS7J6DTY.js.map +0 -1
- package/dist/chunk-TUVENMXB.cjs +0 -20
- package/dist/chunk-TUVENMXB.cjs.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-V6BA44DS.cjs +0 -236
- package/dist/chunk-V6BA44DS.cjs.map +0 -1
- package/dist/chunk-XO5R73Y4.js +0 -653
- package/dist/chunk-XO5R73Y4.js.map +0 -1
- package/dist/chunk-XOR4MPEN.cjs +0 -31
- package/dist/chunk-XOR4MPEN.cjs.map +0 -1
- package/dist/chunk-YORQQXGO.js +0 -155
- package/dist/chunk-YORQQXGO.js.map +0 -1
- package/dist/chunk-YY4PFR3Z.cjs +0 -432
- package/dist/chunk-YY4PFR3Z.cjs.map +0 -1
- package/dist/chunk-ZPI6Q42R.js +0 -17
- package/dist/chunk-ZPI6Q42R.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-C4IsUQsK.d.ts +0 -989
- package/dist/types-CJgZWtl4.d.cts +0 -989
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
require('../chunk-UDCQTOVU.cjs');
|
|
7
|
-
require('../chunk-OD65OZIW.cjs');
|
|
8
|
-
require('../chunk-2PNSVBLQ.cjs');
|
|
9
|
-
require('../chunk-J3C72RPK.cjs');
|
|
10
|
-
require('../chunk-LPUWXIPR.cjs');
|
|
11
|
-
require('../chunk-NDBMKGQ5.cjs');
|
|
12
|
-
require('../chunk-XOR4MPEN.cjs');
|
|
13
|
-
require('../chunk-BIGGXHAW.cjs');
|
|
14
|
-
require('../chunk-TUVENMXB.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "ReadAloud", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return chunkTP5UMRAU_cjs.ReadAloud; }
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=ReadAloud.cjs.map
|
|
23
|
-
//# sourceMappingURL=ReadAloud.cjs.map
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_ReadAloud = require("../ReadAloud-akDehitT.cjs");
|
|
5
|
+
exports.ReadAloud = require_ReadAloud.ReadAloud;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export { R as RecordedTake } from '../machine-CuwKqWXC.cjs';
|
|
5
|
-
import '@intellectif/lk-core';
|
|
6
|
-
import '../ai/LkAiProvider.cjs';
|
|
7
|
-
import 'react';
|
|
8
|
-
|
|
1
|
+
import { a as RecordedTake } from "../useSpeechRecorder-DtAYvl02.cjs";
|
|
2
|
+
import { h as RecordingBinding, m as ReadAloudProps, p as ReadAloudAssessResult } from "../types-BOQd93x3.cjs";
|
|
3
|
+
//#region src/components/ReadAloud/index.d.ts
|
|
9
4
|
/**
|
|
10
5
|
* Public Read Aloud activity: the core wrapped in `ActivityErrorBoundary` so a
|
|
11
6
|
* render failure (including the dev schema-validation throw and the
|
|
12
7
|
* missing-`upload` guard) degrades to an accessible fallback instead of
|
|
13
8
|
* crashing the host.
|
|
14
9
|
*/
|
|
15
|
-
declare function ReadAloud(props: ReadAloudProps):
|
|
16
|
-
|
|
17
|
-
export {
|
|
10
|
+
export declare function ReadAloud(props: ReadAloudProps): React.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export type { ReadAloudAssessResult, ReadAloudProps, RecordedTake, RecordingBinding };
|
|
13
|
+
//# sourceMappingURL=ReadAloud.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadAloud.d.cts","names":[],"sources":["../../src/components/ReadAloud/index.tsx"],"mappings":";;;;;;;;;wBAkBgB,UAAU,OAAO,iBAAiB,MAAM,IAAI"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export { R as RecordedTake } from '../machine-CuwKqWXC.js';
|
|
5
|
-
import '@intellectif/lk-core';
|
|
6
|
-
import '../ai/LkAiProvider.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
|
|
1
|
+
import { a as RecordedTake } from "../useSpeechRecorder-DtAYvl02.js";
|
|
2
|
+
import { h as RecordingBinding, m as ReadAloudProps, p as ReadAloudAssessResult } from "../types-HIrgF_mS.js";
|
|
3
|
+
//#region src/components/ReadAloud/index.d.ts
|
|
9
4
|
/**
|
|
10
5
|
* Public Read Aloud activity: the core wrapped in `ActivityErrorBoundary` so a
|
|
11
6
|
* render failure (including the dev schema-validation throw and the
|
|
12
7
|
* missing-`upload` guard) degrades to an accessible fallback instead of
|
|
13
8
|
* crashing the host.
|
|
14
9
|
*/
|
|
15
|
-
declare function ReadAloud(props: ReadAloudProps):
|
|
16
|
-
|
|
17
|
-
export {
|
|
10
|
+
export declare function ReadAloud(props: ReadAloudProps): React.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export type { ReadAloudAssessResult, ReadAloudProps, RecordedTake, RecordingBinding };
|
|
13
|
+
//# sourceMappingURL=ReadAloud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadAloud.d.ts","names":[],"sources":["../../src/components/ReadAloud/index.tsx"],"mappings":";;;;;;;;;wBAkBgB,UAAU,OAAO,iBAAiB,MAAM,IAAI"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import '../chunk-YORQQXGO.js';
|
|
6
|
-
import '../chunk-ORT3KLGI.js';
|
|
7
|
-
import '../chunk-7SB2MJA4.js';
|
|
8
|
-
import '../chunk-MXNC5UNO.js';
|
|
9
|
-
import '../chunk-TS7J6DTY.js';
|
|
10
|
-
import '../chunk-6N43WDVG.js';
|
|
11
|
-
import '../chunk-HNLRVRQR.js';
|
|
12
|
-
import '../chunk-ZPI6Q42R.js';
|
|
13
|
-
//# sourceMappingURL=ReadAloud.js.map
|
|
14
|
-
//# sourceMappingURL=ReadAloud.js.map
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as ReadAloud } from "../ReadAloud-C8RhaUqV.js";
|
|
4
|
+
export { ReadAloud };
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../chunk-NDBMKGQ5.cjs');
|
|
6
|
-
require('../chunk-BIGGXHAW.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "StimulusPanel", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return chunkRPWUDXG5_cjs.StimulusPanel; }
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
15
|
-
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_StimulusPanel = require("../StimulusPanel-b66gaN3i.cjs");
|
|
4
|
+
exports.StimulusPanel = require_StimulusPanel.StimulusPanel;
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../ai/LkAiProvider.cjs';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../machine-CuwKqWXC.cjs';
|
|
6
|
-
|
|
7
|
-
interface StimulusPanelProps {
|
|
8
|
-
stimulus: Stimulus;
|
|
9
|
-
/**
|
|
10
|
-
* 1-based presented positions of the first and last question this material
|
|
11
|
-
* serves, rendered as "Questions 3–8" so a learner knows how far the
|
|
12
|
-
* passage carries.
|
|
13
|
-
*/
|
|
14
|
-
range?: {
|
|
15
|
-
first: number;
|
|
16
|
-
last: number;
|
|
17
|
-
};
|
|
18
|
-
/** Renders `stimulus.bodyHtml` when provided. See `HtmlSanitizer`. */
|
|
19
|
-
sanitizeHtml?: HtmlSanitizer;
|
|
20
|
-
locale?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Forwarded to the stimulus's own media. `review` keeps the browser's control
|
|
23
|
-
* bar even under an enforcing policy — a graded paper cannot be changed by
|
|
24
|
-
* listening again.
|
|
25
|
-
*/
|
|
26
|
-
renderMode?: RenderMode;
|
|
27
|
-
/**
|
|
28
|
-
* Binds this group's recording to a play budget the consumer persists. One
|
|
29
|
-
* recording serves every question in the group, so the key is derived from
|
|
30
|
-
* the ENTRY rather than the slot — see `stimulusMediaKey()` in lk-core.
|
|
31
|
-
*/
|
|
32
|
-
mediaBudget?: MediaBudgetBinding;
|
|
33
|
-
/** Translations for the audio transport chrome. */
|
|
34
|
-
mediaStrings?: Partial<MediaTransportStrings>;
|
|
35
|
-
onInteraction?: (event: InteractionEvent) => void;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
/** Overrides the SDK's chrome text for this panel. See {@link LkIntlProvider}. */
|
|
38
|
-
strings?: LkStringsOverride;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
42
|
-
* questions refer to. A landmark region named by its title (or by its kind),
|
|
43
|
-
* so a screen-reader user can jump back to the material from any question.
|
|
44
|
-
*
|
|
45
|
-
* Rich text follows the SDK-wide rule: `bodyHtml` is rendered only through a
|
|
46
|
-
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
47
|
-
* schema guarantees exists whenever `bodyHtml` does.
|
|
48
|
-
*/
|
|
49
|
-
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, strings, }: StimulusPanelProps): React.JSX.Element;
|
|
50
|
-
|
|
51
|
-
export { StimulusPanel, type StimulusPanelProps };
|
|
1
|
+
import { n as StimulusPanelProps, t as StimulusPanel } from "../index-CKTpYTCC.cjs";
|
|
2
|
+
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../ai/LkAiProvider.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../machine-CuwKqWXC.js';
|
|
6
|
-
|
|
7
|
-
interface StimulusPanelProps {
|
|
8
|
-
stimulus: Stimulus;
|
|
9
|
-
/**
|
|
10
|
-
* 1-based presented positions of the first and last question this material
|
|
11
|
-
* serves, rendered as "Questions 3–8" so a learner knows how far the
|
|
12
|
-
* passage carries.
|
|
13
|
-
*/
|
|
14
|
-
range?: {
|
|
15
|
-
first: number;
|
|
16
|
-
last: number;
|
|
17
|
-
};
|
|
18
|
-
/** Renders `stimulus.bodyHtml` when provided. See `HtmlSanitizer`. */
|
|
19
|
-
sanitizeHtml?: HtmlSanitizer;
|
|
20
|
-
locale?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Forwarded to the stimulus's own media. `review` keeps the browser's control
|
|
23
|
-
* bar even under an enforcing policy — a graded paper cannot be changed by
|
|
24
|
-
* listening again.
|
|
25
|
-
*/
|
|
26
|
-
renderMode?: RenderMode;
|
|
27
|
-
/**
|
|
28
|
-
* Binds this group's recording to a play budget the consumer persists. One
|
|
29
|
-
* recording serves every question in the group, so the key is derived from
|
|
30
|
-
* the ENTRY rather than the slot — see `stimulusMediaKey()` in lk-core.
|
|
31
|
-
*/
|
|
32
|
-
mediaBudget?: MediaBudgetBinding;
|
|
33
|
-
/** Translations for the audio transport chrome. */
|
|
34
|
-
mediaStrings?: Partial<MediaTransportStrings>;
|
|
35
|
-
onInteraction?: (event: InteractionEvent) => void;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
/** Overrides the SDK's chrome text for this panel. See {@link LkIntlProvider}. */
|
|
38
|
-
strings?: LkStringsOverride;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
42
|
-
* questions refer to. A landmark region named by its title (or by its kind),
|
|
43
|
-
* so a screen-reader user can jump back to the material from any question.
|
|
44
|
-
*
|
|
45
|
-
* Rich text follows the SDK-wide rule: `bodyHtml` is rendered only through a
|
|
46
|
-
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
47
|
-
* schema guarantees exists whenever `bodyHtml` does.
|
|
48
|
-
*/
|
|
49
|
-
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, strings, }: StimulusPanelProps): React.JSX.Element;
|
|
50
|
-
|
|
51
|
-
export { StimulusPanel, type StimulusPanelProps };
|
|
1
|
+
import { n as StimulusPanelProps, t as StimulusPanel } from "../index-C1KGpD1k.js";
|
|
2
|
+
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import '../chunk-HNLRVRQR.js';
|
|
5
|
-
//# sourceMappingURL=StimulusPanel.js.map
|
|
6
|
-
//# sourceMappingURL=StimulusPanel.js.map
|
|
2
|
+
import { t as StimulusPanel } from "../StimulusPanel-BgzByfkb.js";
|
|
3
|
+
export { StimulusPanel };
|
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
require('../chunk-J3C72RPK.cjs');
|
|
7
|
-
require('../chunk-LPUWXIPR.cjs');
|
|
8
|
-
require('../chunk-NDBMKGQ5.cjs');
|
|
9
|
-
require('../chunk-XOR4MPEN.cjs');
|
|
10
|
-
require('../chunk-BIGGXHAW.cjs');
|
|
11
|
-
require('../chunk-TUVENMXB.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "WrittenResponse", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkMKXEM2C5_cjs.WrittenResponse; }
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=WrittenResponse.cjs.map
|
|
20
|
-
//# sourceMappingURL=WrittenResponse.cjs.map
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_WrittenResponse = require("../WrittenResponse-Bj3eFmGl.cjs");
|
|
5
|
+
exports.WrittenResponse = require_WrittenResponse.WrittenResponse;
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { H as HtmlSanitizer, e as RenderMode, f as Renderable } from '../types-CJgZWtl4.cjs';
|
|
5
|
-
import '@intellectif/lk-core';
|
|
6
|
-
import '../ai/LkAiProvider.cjs';
|
|
7
|
-
import 'react';
|
|
8
|
-
import '../machine-CuwKqWXC.cjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Public Written Response activity: a labelled textarea with a live word
|
|
12
|
-
* counter for free-text writing graded asynchronously (AI or human). The core
|
|
13
|
-
* is wrapped in `ActivityErrorBoundary` so a render failure (incl. the dev
|
|
14
|
-
* schema-validation throw) degrades to an accessible fallback.
|
|
15
|
-
*/
|
|
16
|
-
declare function WrittenResponse(props: WrittenResponseProps): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { WrittenResponse, WrittenResponseProps };
|
|
1
|
+
import { a as RenderMode, n as HtmlSanitizer, o as Renderable } from "../types-BOQd93x3.cjs";
|
|
2
|
+
import { n as WrittenResponseProps, r as WrittenResponseSubmission, t as WrittenResponse } from "../index-CSsuUsP7.cjs";
|
|
3
|
+
export { type HtmlSanitizer, type RenderMode, type Renderable, WrittenResponse, type WrittenResponseProps, type WrittenResponseSubmission };
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { H as HtmlSanitizer, e as RenderMode, f as Renderable } from '../types-C4IsUQsK.js';
|
|
5
|
-
import '@intellectif/lk-core';
|
|
6
|
-
import '../ai/LkAiProvider.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
import '../machine-CuwKqWXC.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Public Written Response activity: a labelled textarea with a live word
|
|
12
|
-
* counter for free-text writing graded asynchronously (AI or human). The core
|
|
13
|
-
* is wrapped in `ActivityErrorBoundary` so a render failure (incl. the dev
|
|
14
|
-
* schema-validation throw) degrades to an accessible fallback.
|
|
15
|
-
*/
|
|
16
|
-
declare function WrittenResponse(props: WrittenResponseProps): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { WrittenResponse, WrittenResponseProps };
|
|
1
|
+
import { a as RenderMode, n as HtmlSanitizer, o as Renderable } from "../types-HIrgF_mS.js";
|
|
2
|
+
import { n as WrittenResponseProps, r as WrittenResponseSubmission, t as WrittenResponse } from "../index-DbCCQ9cP.js";
|
|
3
|
+
export { type HtmlSanitizer, type RenderMode, type Renderable, WrittenResponse, type WrittenResponseProps, type WrittenResponseSubmission };
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import '../chunk-MXNC5UNO.js';
|
|
6
|
-
import '../chunk-TS7J6DTY.js';
|
|
7
|
-
import '../chunk-6N43WDVG.js';
|
|
8
|
-
import '../chunk-HNLRVRQR.js';
|
|
9
|
-
import '../chunk-ZPI6Q42R.js';
|
|
10
|
-
//# sourceMappingURL=WrittenResponse.js.map
|
|
11
|
-
//# sourceMappingURL=WrittenResponse.js.map
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as WrittenResponse } from "../WrittenResponse-Cl8G6nO_.js";
|
|
4
|
+
export { WrittenResponse };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
//#region src/i18n/direction.ts
|
|
3
|
+
/**
|
|
4
|
+
* The writing direction of authored content. A language tag is read from the
|
|
5
|
+
* tag alone, so a server rendering and the browser that hydrates it agree on
|
|
6
|
+
* it. Text is read by the runtime's Unicode tables, which agree on every
|
|
7
|
+
* character both runtimes' Unicode versions know.
|
|
8
|
+
*/
|
|
9
|
+
/** ISO 15924 codes of the scripts written right to left. */
|
|
10
|
+
const RTL_SCRIPT_CODES = /* @__PURE__ */ new Set([
|
|
11
|
+
"phlv",
|
|
12
|
+
"adlm",
|
|
13
|
+
"arab",
|
|
14
|
+
"aran",
|
|
15
|
+
"armi",
|
|
16
|
+
"avst",
|
|
17
|
+
"chrs",
|
|
18
|
+
"cprt",
|
|
19
|
+
"elym",
|
|
20
|
+
"gara",
|
|
21
|
+
"hatr",
|
|
22
|
+
"hebr",
|
|
23
|
+
"hung",
|
|
24
|
+
"khar",
|
|
25
|
+
"lydi",
|
|
26
|
+
"mand",
|
|
27
|
+
"mani",
|
|
28
|
+
"mend",
|
|
29
|
+
"merc",
|
|
30
|
+
"mero",
|
|
31
|
+
"narb",
|
|
32
|
+
"nbat",
|
|
33
|
+
"nkoo",
|
|
34
|
+
"orkh",
|
|
35
|
+
"ougr",
|
|
36
|
+
"palm",
|
|
37
|
+
"phli",
|
|
38
|
+
"phlp",
|
|
39
|
+
"phnx",
|
|
40
|
+
"prti",
|
|
41
|
+
"rohg",
|
|
42
|
+
"samr",
|
|
43
|
+
"sarb",
|
|
44
|
+
"sidt",
|
|
45
|
+
"sogd",
|
|
46
|
+
"sogo",
|
|
47
|
+
"syrc",
|
|
48
|
+
"syre",
|
|
49
|
+
"syrj",
|
|
50
|
+
"syrn",
|
|
51
|
+
"thaa",
|
|
52
|
+
"yezi"
|
|
53
|
+
]);
|
|
54
|
+
/**
|
|
55
|
+
* Languages written right to left in every script they are commonly written
|
|
56
|
+
* in, including the deprecated tags `iw` and `ji` and the Arabic varieties
|
|
57
|
+
* with tags of their own. A language also written left to right — Kurdish,
|
|
58
|
+
* Sindhi, Uyghur — is not listed: its own text decides.
|
|
59
|
+
*/
|
|
60
|
+
const RTL_LANGUAGES = /* @__PURE__ */ new Set([
|
|
61
|
+
"acm",
|
|
62
|
+
"aeb",
|
|
63
|
+
"aii",
|
|
64
|
+
"ajp",
|
|
65
|
+
"apc",
|
|
66
|
+
"ar",
|
|
67
|
+
"arc",
|
|
68
|
+
"ars",
|
|
69
|
+
"ary",
|
|
70
|
+
"arz",
|
|
71
|
+
"azb",
|
|
72
|
+
"bqi",
|
|
73
|
+
"ckb",
|
|
74
|
+
"dv",
|
|
75
|
+
"fa",
|
|
76
|
+
"glk",
|
|
77
|
+
"hbo",
|
|
78
|
+
"he",
|
|
79
|
+
"iw",
|
|
80
|
+
"ji",
|
|
81
|
+
"jrb",
|
|
82
|
+
"khw",
|
|
83
|
+
"lrc",
|
|
84
|
+
"mzn",
|
|
85
|
+
"nqo",
|
|
86
|
+
"ota",
|
|
87
|
+
"pnb",
|
|
88
|
+
"prs",
|
|
89
|
+
"ps",
|
|
90
|
+
"sdh",
|
|
91
|
+
"skr",
|
|
92
|
+
"syc",
|
|
93
|
+
"syr",
|
|
94
|
+
"ur",
|
|
95
|
+
"yi"
|
|
96
|
+
]);
|
|
97
|
+
/**
|
|
98
|
+
* The code-point blocks Unicode reserves for right-to-left scripts (their
|
|
99
|
+
* default bidirectional class is R or AL): Hebrew through Arabic Extended-A,
|
|
100
|
+
* the Hebrew and Arabic presentation forms, the historic right-to-left scripts
|
|
101
|
+
* of the Supplementary Multilingual Plane, and Mende Kikakui through the Arabic
|
|
102
|
+
* mathematical letters. A letter in one of them is written right to left.
|
|
103
|
+
*/
|
|
104
|
+
const RTL_BLOCKS = [
|
|
105
|
+
[1424, 2303],
|
|
106
|
+
[64285, 65023],
|
|
107
|
+
[65136, 65279],
|
|
108
|
+
[67584, 69631],
|
|
109
|
+
[124928, 126975]
|
|
110
|
+
];
|
|
111
|
+
/** Digits whose bidirectional class is R: N'Ko, Mende Kikakui and Adlam. */
|
|
112
|
+
const RTL_DIGITS = [
|
|
113
|
+
[1984, 1993],
|
|
114
|
+
[125127, 125135],
|
|
115
|
+
[125264, 125273]
|
|
116
|
+
];
|
|
117
|
+
const LETTER_RE = /^\p{L}$/u;
|
|
118
|
+
const NUMBER_RE = /^\p{N}$/u;
|
|
119
|
+
function within(point, ranges) {
|
|
120
|
+
return ranges.some(([first, last]) => point >= first && point <= last);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The script subtag of a BCP 47 tag's lowercased subtags, if it names a
|
|
124
|
+
* direction: not in a private-use or grandfathered tag (`x-arab`, `i-klingon`),
|
|
125
|
+
* and not one of the codes for no particular script — Common, Inherited,
|
|
126
|
+
* Unwritten, Unknown and the like (`Z` codes) or private use (`Qaaa`–`Qabx`).
|
|
127
|
+
*/
|
|
128
|
+
function scriptSubtagOf(subtags) {
|
|
129
|
+
if (subtags[0].length === 1) return;
|
|
130
|
+
let index = 1;
|
|
131
|
+
while (index < subtags.length && index <= 3 && /^[a-z]{3}$/.test(subtags[index])) index += 1;
|
|
132
|
+
const candidate = subtags[index];
|
|
133
|
+
if (candidate === void 0 || !/^[a-z]{4}$/.test(candidate)) return;
|
|
134
|
+
return /^z/.test(candidate) || candidate >= "qaaa" && candidate <= "qabx" ? void 0 : candidate;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The direction a language tag names, or `undefined` when it names none: its
|
|
138
|
+
* script subtag when it has one (`ku-Arab` is right-to-left, `ar-Latn` is not),
|
|
139
|
+
* then the languages above. `-` and `_` both separate subtags. Anything that is
|
|
140
|
+
* not a string names none.
|
|
141
|
+
*/
|
|
142
|
+
function localeDirectionOf(locale) {
|
|
143
|
+
if (typeof locale !== "string") return;
|
|
144
|
+
const subtags = locale.toLowerCase().split(/[-_]/);
|
|
145
|
+
const script = scriptSubtagOf(subtags);
|
|
146
|
+
if (script !== void 0) return RTL_SCRIPT_CODES.has(script) ? "rtl" : "ltr";
|
|
147
|
+
return RTL_LANGUAGES.has(subtags[0]) ? "rtl" : void 0;
|
|
148
|
+
}
|
|
149
|
+
const LEFT_TO_RIGHT_MARK = String.fromCodePoint(8206);
|
|
150
|
+
/** RIGHT-TO-LEFT MARK and ARABIC LETTER MARK. */
|
|
151
|
+
const RIGHT_TO_LEFT_MARKS = /* @__PURE__ */ new Set([String.fromCodePoint(8207), String.fromCodePoint(1564)]);
|
|
152
|
+
/**
|
|
153
|
+
* The direction of `text`'s first letter or directional mark — an author can
|
|
154
|
+
* start a transcript with a right-to-left mark to lay it out right to left — or
|
|
155
|
+
* `undefined` when it has neither. Other characters with a strong direction,
|
|
156
|
+
* such as a Hebrew punctuation mark or an N'Ko digit, are not read, so this is
|
|
157
|
+
* the first strong character the Unicode bidirectional algorithm finds only
|
|
158
|
+
* where the text starts with a letter or a mark. Letters are read by the
|
|
159
|
+
* runtime's Unicode tables: a letter added in a later Unicode version than a
|
|
160
|
+
* server's is not one to that server.
|
|
161
|
+
*/
|
|
162
|
+
function textDirectionOf(text) {
|
|
163
|
+
for (const character of text) {
|
|
164
|
+
if (character === LEFT_TO_RIGHT_MARK) return "ltr";
|
|
165
|
+
if (RIGHT_TO_LEFT_MARKS.has(character)) return "rtl";
|
|
166
|
+
if (LETTER_RE.test(character)) return within(character.codePointAt(0), RTL_BLOCKS) ? "rtl" : "ltr";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The direction a single character is laid out in, for a mark standing in for
|
|
171
|
+
* it: a digit runs left to right unless it is one of the right-to-left digits,
|
|
172
|
+
* a letter runs in its script's direction, and anything else has none of its
|
|
173
|
+
* own.
|
|
174
|
+
*/
|
|
175
|
+
function characterDirectionOf(character) {
|
|
176
|
+
const point = character.codePointAt(0);
|
|
177
|
+
if (NUMBER_RE.test(character)) return within(point, RTL_DIGITS) ? "rtl" : "ltr";
|
|
178
|
+
if (LETTER_RE.test(character)) return within(point, RTL_BLOCKS) ? "rtl" : "ltr";
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { localeDirectionOf as n, textDirectionOf as r, characterDirectionOf as t };
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=direction-Dq0_HtA5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction-Dq0_HtA5.js","names":[],"sources":["../src/i18n/direction.ts"],"sourcesContent":["/**\n * The writing direction of authored content. A language tag is read from the\n * tag alone, so a server rendering and the browser that hydrates it agree on\n * it. Text is read by the runtime's Unicode tables, which agree on every\n * character both runtimes' Unicode versions know.\n */\n\n/** ISO 15924 codes of the scripts written right to left. */\nconst RTL_SCRIPT_CODES = new Set([\n 'phlv',\n 'adlm',\n 'arab',\n 'aran',\n 'armi',\n 'avst',\n 'chrs',\n 'cprt',\n 'elym',\n 'gara',\n 'hatr',\n 'hebr',\n 'hung',\n 'khar',\n 'lydi',\n 'mand',\n 'mani',\n 'mend',\n 'merc',\n 'mero',\n 'narb',\n 'nbat',\n 'nkoo',\n 'orkh',\n 'ougr',\n 'palm',\n 'phli',\n 'phlp',\n 'phnx',\n 'prti',\n 'rohg',\n 'samr',\n 'sarb',\n 'sidt',\n 'sogd',\n 'sogo',\n 'syrc',\n 'syre',\n 'syrj',\n 'syrn',\n 'thaa',\n 'yezi',\n]);\n\n/**\n * Languages written right to left in every script they are commonly written\n * in, including the deprecated tags `iw` and `ji` and the Arabic varieties\n * with tags of their own. A language also written left to right — Kurdish,\n * Sindhi, Uyghur — is not listed: its own text decides.\n */\nconst RTL_LANGUAGES = new Set([\n 'acm',\n 'aeb',\n 'aii',\n 'ajp',\n 'apc',\n 'ar',\n 'arc',\n 'ars',\n 'ary',\n 'arz',\n 'azb',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'hbo',\n 'he',\n 'iw',\n 'ji',\n 'jrb',\n 'khw',\n 'lrc',\n 'mzn',\n 'nqo',\n 'ota',\n 'pnb',\n 'prs',\n 'ps',\n 'sdh',\n 'skr',\n 'syc',\n 'syr',\n 'ur',\n 'yi',\n]);\n\n/**\n * The code-point blocks Unicode reserves for right-to-left scripts (their\n * default bidirectional class is R or AL): Hebrew through Arabic Extended-A,\n * the Hebrew and Arabic presentation forms, the historic right-to-left scripts\n * of the Supplementary Multilingual Plane, and Mende Kikakui through the Arabic\n * mathematical letters. A letter in one of them is written right to left.\n */\nconst RTL_BLOCKS: readonly (readonly [number, number])[] = [\n [0x0590, 0x08ff],\n [0xfb1d, 0xfdff],\n [0xfe70, 0xfeff],\n [0x10800, 0x10fff],\n [0x1e800, 0x1efff],\n];\n\n/** Digits whose bidirectional class is R: N'Ko, Mende Kikakui and Adlam. */\nconst RTL_DIGITS: readonly (readonly [number, number])[] = [\n [0x07c0, 0x07c9],\n [0x1e8c7, 0x1e8cf],\n [0x1e950, 0x1e959],\n];\n\nconst LETTER_RE = /^\\p{L}$/u;\nconst NUMBER_RE = /^\\p{N}$/u;\n\nfunction within(point: number, ranges: readonly (readonly [number, number])[]): boolean {\n return ranges.some(([first, last]) => point >= first && point <= last);\n}\n\n/**\n * The script subtag of a BCP 47 tag's lowercased subtags, if it names a\n * direction: not in a private-use or grandfathered tag (`x-arab`, `i-klingon`),\n * and not one of the codes for no particular script — Common, Inherited,\n * Unwritten, Unknown and the like (`Z` codes) or private use (`Qaaa`–`Qabx`).\n */\nfunction scriptSubtagOf(subtags: readonly string[]): string | undefined {\n if ((subtags[0] as string).length === 1) {\n return undefined;\n }\n let index = 1;\n // Up to three extended language subtags may come between language and script.\n while (index < subtags.length && index <= 3 && /^[a-z]{3}$/.test(subtags[index] as string)) {\n index += 1;\n }\n const candidate = subtags[index];\n if (candidate === undefined || !/^[a-z]{4}$/.test(candidate)) {\n return undefined;\n }\n return /^z/.test(candidate) || (candidate >= 'qaaa' && candidate <= 'qabx')\n ? undefined\n : candidate;\n}\n\n/**\n * The direction a language tag names, or `undefined` when it names none: its\n * script subtag when it has one (`ku-Arab` is right-to-left, `ar-Latn` is not),\n * then the languages above. `-` and `_` both separate subtags. Anything that is\n * not a string names none.\n */\nexport function localeDirectionOf(locale: unknown): 'ltr' | 'rtl' | undefined {\n if (typeof locale !== 'string') {\n return undefined;\n }\n const subtags = locale.toLowerCase().split(/[-_]/);\n const script = scriptSubtagOf(subtags);\n if (script !== undefined) {\n return RTL_SCRIPT_CODES.has(script) ? 'rtl' : 'ltr';\n }\n return RTL_LANGUAGES.has(subtags[0] as string) ? 'rtl' : undefined;\n}\n\nconst LEFT_TO_RIGHT_MARK = String.fromCodePoint(0x200e);\n/** RIGHT-TO-LEFT MARK and ARABIC LETTER MARK. */\nconst RIGHT_TO_LEFT_MARKS = new Set([String.fromCodePoint(0x200f), String.fromCodePoint(0x61c)]);\n\n/**\n * The direction of `text`'s first letter or directional mark — an author can\n * start a transcript with a right-to-left mark to lay it out right to left — or\n * `undefined` when it has neither. Other characters with a strong direction,\n * such as a Hebrew punctuation mark or an N'Ko digit, are not read, so this is\n * the first strong character the Unicode bidirectional algorithm finds only\n * where the text starts with a letter or a mark. Letters are read by the\n * runtime's Unicode tables: a letter added in a later Unicode version than a\n * server's is not one to that server.\n */\nexport function textDirectionOf(text: string): 'ltr' | 'rtl' | undefined {\n for (const character of text) {\n if (character === LEFT_TO_RIGHT_MARK) {\n return 'ltr';\n }\n if (RIGHT_TO_LEFT_MARKS.has(character)) {\n return 'rtl';\n }\n if (LETTER_RE.test(character)) {\n return within(character.codePointAt(0) as number, RTL_BLOCKS) ? 'rtl' : 'ltr';\n }\n }\n return undefined;\n}\n\n/**\n * The direction a single character is laid out in, for a mark standing in for\n * it: a digit runs left to right unless it is one of the right-to-left digits,\n * a letter runs in its script's direction, and anything else has none of its\n * own.\n */\nexport function characterDirectionOf(character: string): 'ltr' | 'rtl' | undefined {\n const point = character.codePointAt(0) as number;\n if (NUMBER_RE.test(character)) {\n return within(point, RTL_DIGITS) ? 'rtl' : 'ltr';\n }\n if (LETTER_RE.test(character)) {\n return within(point, RTL_BLOCKS) ? 'rtl' : 'ltr';\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,mCAAmB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;AAQD,MAAM,gCAAgB,IAAI,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;AASD,MAAM,aAAqD;CACzD,CAAC,MAAQ,IAAM;CACf,CAAC,OAAQ,KAAM;CACf,CAAC,OAAQ,KAAM;CACf,CAAC,OAAS,KAAO;CACjB,CAAC,QAAS,MAAO;AACnB;;AAGA,MAAM,aAAqD;CACzD,CAAC,MAAQ,IAAM;CACf,CAAC,QAAS,MAAO;CACjB,CAAC,QAAS,MAAO;AACnB;AAEA,MAAM,YAAY;AAClB,MAAM,YAAY;AAElB,SAAS,OAAO,OAAe,QAAyD;CACtF,OAAO,OAAO,MAAM,CAAC,OAAO,UAAU,SAAS,SAAS,SAAS,IAAI;AACvE;;;;;;;AAQA,SAAS,eAAe,SAAgD;CACtE,IAAK,QAAQ,EAAE,CAAY,WAAW,GACpC;CAEF,IAAI,QAAQ;CAEZ,OAAO,QAAQ,QAAQ,UAAU,SAAS,KAAK,aAAa,KAAK,QAAQ,MAAgB,GACvF,SAAS;CAEX,MAAM,YAAY,QAAQ;CAC1B,IAAI,cAAc,KAAA,KAAa,CAAC,aAAa,KAAK,SAAS,GACzD;CAEF,OAAO,KAAK,KAAK,SAAS,KAAM,aAAa,UAAU,aAAa,SAChE,KAAA,IACA;AACN;;;;;;;AAQA,SAAgB,kBAAkB,QAA4C;CAC5E,IAAI,OAAO,WAAW,UACpB;CAEF,MAAM,UAAU,OAAO,YAAY,CAAC,CAAC,MAAM,MAAM;CACjD,MAAM,SAAS,eAAe,OAAO;CACrC,IAAI,WAAW,KAAA,GACb,OAAO,iBAAiB,IAAI,MAAM,IAAI,QAAQ;CAEhD,OAAO,cAAc,IAAI,QAAQ,EAAY,IAAI,QAAQ,KAAA;AAC3D;AAEA,MAAM,qBAAqB,OAAO,cAAc,IAAM;;AAEtD,MAAM,sCAAsB,IAAI,IAAI,CAAC,OAAO,cAAc,IAAM,GAAG,OAAO,cAAc,IAAK,CAAC,CAAC;;;;;;;;;;;AAY/F,SAAgB,gBAAgB,MAAyC;CACvE,KAAK,MAAM,aAAa,MAAM;EAC5B,IAAI,cAAc,oBAChB,OAAO;EAET,IAAI,oBAAoB,IAAI,SAAS,GACnC,OAAO;EAET,IAAI,UAAU,KAAK,SAAS,GAC1B,OAAO,OAAO,UAAU,YAAY,CAAC,GAAa,UAAU,IAAI,QAAQ;CAE5E;AAEF;;;;;;;AAQA,SAAgB,qBAAqB,WAA8C;CACjF,MAAM,QAAQ,UAAU,YAAY,CAAC;CACrC,IAAI,UAAU,KAAK,SAAS,GAC1B,OAAO,OAAO,OAAO,UAAU,IAAI,QAAQ;CAE7C,IAAI,UAAU,KAAK,SAAS,GAC1B,OAAO,OAAO,OAAO,UAAU,IAAI,QAAQ;AAG/C"}
|