@magmamath/students-features 1.3.23-rc.10 → 1.3.23-rc.11
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/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +5 -2
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -1
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +5 -2
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +6 -2
|
@@ -19,10 +19,13 @@ const useVoiceTranscriptionEffects = ({
|
|
|
19
19
|
return () => model.cleanup();
|
|
20
20
|
}, [model]);
|
|
21
21
|
(0, _react.useEffect)(() => {
|
|
22
|
-
const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing;
|
|
23
|
-
model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing);
|
|
24
22
|
model.resetPlayer();
|
|
25
23
|
}, [problemId]);
|
|
24
|
+
(0, _react.useEffect)(() => {
|
|
25
|
+
if (activeAttempt === null) return;
|
|
26
|
+
const hasAudio = !!answersRef.current[activeAttempt - 1]?.audioFileId;
|
|
27
|
+
model.dropdown.setExpanded(hasAudio);
|
|
28
|
+
}, [activeAttempt, answersKey]);
|
|
26
29
|
(0, _react.useEffect)(() => {
|
|
27
30
|
if (answersRef.current.some(answer => answer.audioFileId)) {
|
|
28
31
|
model.initializeWithAudios(answersRef.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","useRef","current","useEffect","reinitializePlayer","cleanup","
|
|
1
|
+
{"version":3,"names":["_react","require","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","useRef","current","useEffect","reinitializePlayer","cleanup","resetPlayer","hasAudio","audioFileId","dropdown","setExpanded","some","answer","initializeWithAudios","loader","loadAllTranscripts","stopAudio","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAYO,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CC,KAAK;EACLC,OAAO;EACPC,UAAU;EACVC,SAAS;EACTC;AACM,CAAC,KAAK;EACZ,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACL,OAAO,CAAC;EAClCI,UAAU,CAACE,OAAO,GAAGN,OAAO;EAE5B,IAAAO,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACS,kBAAkB,CAAC,CAAC;IAC1B,OAAO,MAAMT,KAAK,CAACU,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACV,KAAK,CAAC,CAAC;EAEX,IAAAQ,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACW,WAAW,CAAC,CAAC;EACrB,CAAC,EAAE,CAACR,SAAS,CAAC,CAAC;EAEf,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIJ,aAAa,KAAK,IAAI,EAAE;IAC5B,MAAMQ,QAAQ,GAAG,CAAC,CAACP,UAAU,CAACE,OAAO,CAACH,aAAa,GAAG,CAAC,CAAC,EAAES,WAAW;IACrEb,KAAK,CAACc,QAAQ,CAACC,WAAW,CAACH,QAAQ,CAAC;EACtC,CAAC,EAAE,CAACR,aAAa,EAAEF,UAAU,CAAC,CAAC;EAE/B,IAAAM,gBAAS,EAAC,MAAM;IACd,IAAIH,UAAU,CAACE,OAAO,CAACS,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACJ,WAAW,CAAC,EAAE;MAC3Db,KAAK,CAACkB,oBAAoB,CAACb,UAAU,CAACE,OAAO,CAAC;MAC9CP,KAAK,CAACmB,MAAM,CAACC,kBAAkB,CAAC,CAAC;IACnC;EACF,CAAC,EAAE,CAACpB,KAAK,EAAEE,UAAU,CAAC,CAAC;EAEvB,IAAAM,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACqB,SAAS,CAAC,CAAC;EACnB,CAAC,EAAE,CAACjB,aAAa,CAAC,CAAC;AACrB,CAAC;AAAAkB,OAAA,CAAAvB,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -15,10 +15,13 @@ export const useVoiceTranscriptionEffects = ({
|
|
|
15
15
|
return () => model.cleanup();
|
|
16
16
|
}, [model]);
|
|
17
17
|
useEffect(() => {
|
|
18
|
-
const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing;
|
|
19
|
-
model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing);
|
|
20
18
|
model.resetPlayer();
|
|
21
19
|
}, [problemId]);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (activeAttempt === null) return;
|
|
22
|
+
const hasAudio = !!answersRef.current[activeAttempt - 1]?.audioFileId;
|
|
23
|
+
model.dropdown.setExpanded(hasAudio);
|
|
24
|
+
}, [activeAttempt, answersKey]);
|
|
22
25
|
useEffect(() => {
|
|
23
26
|
if (answersRef.current.some(answer => answer.audioFileId)) {
|
|
24
27
|
model.initializeWithAudios(answersRef.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","current","reinitializePlayer","cleanup","
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","current","reinitializePlayer","cleanup","resetPlayer","hasAudio","audioFileId","dropdown","setExpanded","some","answer","initializeWithAudios","loader","loadAllTranscripts","stopAudio"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscript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[]}
|
package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceTranscriptionEffects.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,4BAA4B,8DAMtC,MAAM,
|
|
1
|
+
{"version":3,"file":"useVoiceTranscriptionEffects.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,4BAA4B,8DAMtC,MAAM,SA6BR,CAAA"}
|
package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceTranscriptionEffects.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,4BAA4B,8DAMtC,MAAM,
|
|
1
|
+
{"version":3,"file":"useVoiceTranscriptionEffects.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,KAAK,MAAM,GAAG;IACZ,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,4BAA4B,8DAMtC,MAAM,SA6BR,CAAA"}
|
package/package.json
CHANGED
|
@@ -26,11 +26,15 @@ export const useVoiceTranscriptionEffects = ({
|
|
|
26
26
|
}, [model])
|
|
27
27
|
|
|
28
28
|
useEffect(() => {
|
|
29
|
-
const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing
|
|
30
|
-
model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing)
|
|
31
29
|
model.resetPlayer()
|
|
32
30
|
}, [problemId])
|
|
33
31
|
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (activeAttempt === null) return
|
|
34
|
+
const hasAudio = !!answersRef.current[activeAttempt - 1]?.audioFileId
|
|
35
|
+
model.dropdown.setExpanded(hasAudio)
|
|
36
|
+
}, [activeAttempt, answersKey])
|
|
37
|
+
|
|
34
38
|
useEffect(() => {
|
|
35
39
|
if (answersRef.current.some((answer) => answer.audioFileId)) {
|
|
36
40
|
model.initializeWithAudios(answersRef.current)
|