@magmamath/students-features 1.7.9 → 1.7.10-rc.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.
Files changed (154) hide show
  1. package/dist/commonjs/features/voice/constants.js +39 -3
  2. package/dist/commonjs/features/voice/constants.js.map +1 -1
  3. package/dist/commonjs/features/voice/helpers.js +67 -1
  4. package/dist/commonjs/features/voice/helpers.js.map +1 -1
  5. package/dist/commonjs/features/voice/index.js +77 -0
  6. package/dist/commonjs/features/voice/index.js.map +1 -1
  7. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +17 -9
  8. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -1
  9. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +4 -27
  10. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -1
  11. package/dist/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.js +49 -0
  12. package/dist/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.js.map +1 -0
  13. package/dist/commonjs/features/voice/recording/components/VoiceTranscriptPanel.js +245 -0
  14. package/dist/commonjs/features/voice/recording/components/VoiceTranscriptPanel.js.map +1 -0
  15. package/dist/commonjs/features/voice/recording/components/VoiceWaveform.js +93 -0
  16. package/dist/commonjs/features/voice/recording/components/VoiceWaveform.js.map +1 -0
  17. package/dist/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.js +42 -0
  18. package/dist/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.js.map +1 -0
  19. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +17 -2
  20. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -1
  21. package/dist/commonjs/features/voice/recording/hooks/useVoiceWaveform.js +43 -0
  22. package/dist/commonjs/features/voice/recording/hooks/useVoiceWaveform.js.map +1 -0
  23. package/dist/commonjs/features/voice/recording/model/Recorder.model.js +3 -0
  24. package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -1
  25. package/dist/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.js +83 -0
  26. package/dist/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
  27. package/dist/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.js +65 -0
  28. package/dist/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.js.map +1 -0
  29. package/dist/commonjs/features/voice/transcript.helpers.js +36 -0
  30. package/dist/commonjs/features/voice/transcript.helpers.js.map +1 -0
  31. package/dist/commonjs/features/voice/types.js +11 -7
  32. package/dist/commonjs/features/voice/types.js.map +1 -1
  33. package/dist/module/features/voice/constants.js +38 -0
  34. package/dist/module/features/voice/constants.js.map +1 -1
  35. package/dist/module/features/voice/helpers.js +65 -1
  36. package/dist/module/features/voice/helpers.js.map +1 -1
  37. package/dist/module/features/voice/index.js +7 -0
  38. package/dist/module/features/voice/index.js.map +1 -1
  39. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +15 -9
  40. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -1
  41. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +4 -27
  42. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -1
  43. package/dist/module/features/voice/recording/components/VoiceRecordWithTranscript.js +43 -0
  44. package/dist/module/features/voice/recording/components/VoiceRecordWithTranscript.js.map +1 -0
  45. package/dist/module/features/voice/recording/components/VoiceTranscriptPanel.js +238 -0
  46. package/dist/module/features/voice/recording/components/VoiceTranscriptPanel.js.map +1 -0
  47. package/dist/module/features/voice/recording/components/VoiceWaveform.js +86 -0
  48. package/dist/module/features/voice/recording/components/VoiceWaveform.js.map +1 -0
  49. package/dist/module/features/voice/recording/hooks/useTranscriptPanelAnimation.js +37 -0
  50. package/dist/module/features/voice/recording/hooks/useTranscriptPanelAnimation.js.map +1 -0
  51. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +20 -3
  52. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -1
  53. package/dist/module/features/voice/recording/hooks/useVoiceWaveform.js +38 -0
  54. package/dist/module/features/voice/recording/hooks/useVoiceWaveform.js.map +1 -0
  55. package/dist/module/features/voice/recording/model/Recorder.model.js +3 -0
  56. package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -1
  57. package/dist/module/features/voice/recording/model/VoiceRecordWithTranscript.model.js +78 -0
  58. package/dist/module/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
  59. package/dist/module/features/voice/recording/model/VoiceTranscriptPanel.model.js +60 -0
  60. package/dist/module/features/voice/recording/model/VoiceTranscriptPanel.model.js.map +1 -0
  61. package/dist/module/features/voice/transcript.helpers.js +31 -0
  62. package/dist/module/features/voice/transcript.helpers.js.map +1 -0
  63. package/dist/module/features/voice/types.js +4 -6
  64. package/dist/module/features/voice/types.js.map +1 -1
  65. package/dist/typescript/commonjs/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts +2 -0
  66. package/dist/typescript/commonjs/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts.map +1 -0
  67. package/dist/typescript/commonjs/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts +2 -0
  68. package/dist/typescript/commonjs/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts.map +1 -0
  69. package/dist/typescript/commonjs/features/voice/constants.d.ts +32 -0
  70. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
  71. package/dist/typescript/commonjs/features/voice/helpers.d.ts +3 -0
  72. package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -1
  73. package/dist/typescript/commonjs/features/voice/index.d.ts +7 -0
  74. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  75. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +2 -1
  76. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -1
  77. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +2 -7
  78. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.d.ts +13 -0
  80. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.d.ts.map +1 -0
  81. package/dist/typescript/commonjs/features/voice/recording/components/VoiceTranscriptPanel.d.ts +11 -0
  82. package/dist/typescript/commonjs/features/voice/recording/components/VoiceTranscriptPanel.d.ts.map +1 -0
  83. package/dist/typescript/commonjs/features/voice/recording/components/VoiceWaveform.d.ts +8 -0
  84. package/dist/typescript/commonjs/features/voice/recording/components/VoiceWaveform.d.ts.map +1 -0
  85. package/dist/typescript/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts +18 -0
  86. package/dist/typescript/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts.map +1 -0
  87. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -1
  88. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceWaveform.d.ts +7 -0
  89. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceWaveform.d.ts.map +1 -0
  90. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +2 -0
  91. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -1
  92. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts +16 -0
  93. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts.map +1 -0
  94. package/dist/typescript/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts +26 -0
  95. package/dist/typescript/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts.map +1 -0
  96. package/dist/typescript/commonjs/features/voice/transcript.helpers.d.ts +8 -0
  97. package/dist/typescript/commonjs/features/voice/transcript.helpers.d.ts.map +1 -0
  98. package/dist/typescript/commonjs/features/voice/types.d.ts +2 -5
  99. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  100. package/dist/typescript/module/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts +2 -0
  101. package/dist/typescript/module/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts.map +1 -0
  102. package/dist/typescript/module/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts +2 -0
  103. package/dist/typescript/module/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts.map +1 -0
  104. package/dist/typescript/module/features/voice/constants.d.ts +32 -0
  105. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
  106. package/dist/typescript/module/features/voice/helpers.d.ts +3 -0
  107. package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -1
  108. package/dist/typescript/module/features/voice/index.d.ts +7 -0
  109. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  110. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +2 -1
  111. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -1
  112. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +2 -7
  113. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -1
  114. package/dist/typescript/module/features/voice/recording/components/VoiceRecordWithTranscript.d.ts +13 -0
  115. package/dist/typescript/module/features/voice/recording/components/VoiceRecordWithTranscript.d.ts.map +1 -0
  116. package/dist/typescript/module/features/voice/recording/components/VoiceTranscriptPanel.d.ts +11 -0
  117. package/dist/typescript/module/features/voice/recording/components/VoiceTranscriptPanel.d.ts.map +1 -0
  118. package/dist/typescript/module/features/voice/recording/components/VoiceWaveform.d.ts +8 -0
  119. package/dist/typescript/module/features/voice/recording/components/VoiceWaveform.d.ts.map +1 -0
  120. package/dist/typescript/module/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts +18 -0
  121. package/dist/typescript/module/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts.map +1 -0
  122. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -1
  123. package/dist/typescript/module/features/voice/recording/hooks/useVoiceWaveform.d.ts +7 -0
  124. package/dist/typescript/module/features/voice/recording/hooks/useVoiceWaveform.d.ts.map +1 -0
  125. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +2 -0
  126. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -1
  127. package/dist/typescript/module/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts +16 -0
  128. package/dist/typescript/module/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts.map +1 -0
  129. package/dist/typescript/module/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts +26 -0
  130. package/dist/typescript/module/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts.map +1 -0
  131. package/dist/typescript/module/features/voice/transcript.helpers.d.ts +8 -0
  132. package/dist/typescript/module/features/voice/transcript.helpers.d.ts.map +1 -0
  133. package/dist/typescript/module/features/voice/types.d.ts +2 -5
  134. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  135. package/package.json +1 -1
  136. package/src/features/voice/__tests__/VoiceRecordWithTranscript.model.test.ts +145 -0
  137. package/src/features/voice/__tests__/VoiceTranscriptPanel.model.test.ts +135 -0
  138. package/src/features/voice/constants.ts +40 -0
  139. package/src/features/voice/helpers.ts +85 -1
  140. package/src/features/voice/index.ts +7 -0
  141. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +16 -8
  142. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +8 -30
  143. package/src/features/voice/recording/components/VoiceRecordWithTranscript.tsx +52 -0
  144. package/src/features/voice/recording/components/VoiceTranscriptPanel.tsx +285 -0
  145. package/src/features/voice/recording/components/VoiceWaveform.tsx +102 -0
  146. package/src/features/voice/recording/hooks/useTranscriptPanelAnimation.ts +49 -0
  147. package/src/features/voice/recording/hooks/useVoiceRecorder.ts +26 -3
  148. package/src/features/voice/recording/hooks/useVoiceWaveform.ts +46 -0
  149. package/src/features/voice/recording/model/Recorder.model.ts +3 -0
  150. package/src/features/voice/recording/model/VoiceRecordWithTranscript.model.ts +81 -0
  151. package/src/features/voice/recording/model/VoiceTranscriptPanel.model.ts +76 -0
  152. package/src/features/voice/transcript.helpers.ts +37 -0
  153. package/src/features/voice/types.ts +5 -6
  154. package/src/i18n/.generated/schema.json +6 -5
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ import { createEvent, createStore, sample } from 'effector';
4
+ import { VoicePanelPhase } from "../../constants.js";
5
+ import { DropdownModel } from "../../playing/model/Dropdown.model.js";
6
+ // Phase machine for the recording-flow panel: open → RECORDING (waveform),
7
+ // confirm → PROCESSING (loader), complete/fail → DONE (transcript text).
8
+ // The transcript shows inside a collapsible dropdown (same UX as the playing
9
+ // side): collapsed to a short preview by default, expandable via the caret.
10
+ // Transcript fetching itself is wired externally
11
+ // (see VoiceRecordWithTranscriptModel).
12
+ export class VoiceTranscriptPanelModel {
13
+ reset = createEvent();
14
+ dropdown = new DropdownModel();
15
+ open = createEvent();
16
+ confirm = createEvent();
17
+ complete = createEvent();
18
+ fail = createEvent();
19
+ discard = createEvent();
20
+ $phase = createStore(null);
21
+ $transcript = createStore('');
22
+ $hasError = createStore(false);
23
+ $flags = this.$phase.map(phase => ({
24
+ isOpen: phase !== null,
25
+ isRecording: phase === VoicePanelPhase.RECORDING,
26
+ isProcessing: phase === VoicePanelPhase.PROCESSING,
27
+ isDone: phase === VoicePanelPhase.DONE
28
+ }));
29
+ constructor() {
30
+ this.setupPhaseTransitions();
31
+ }
32
+
33
+ // The event passes through only while the panel is in the given phase —
34
+ // e.g. a transcript that arrives after a discard must not reopen the panel
35
+ allowInPhase(clock, phase) {
36
+ return sample({
37
+ clock,
38
+ source: this.$phase,
39
+ filter: currentPhase => currentPhase === phase,
40
+ fn: (_, payload) => payload
41
+ });
42
+ }
43
+ setupPhaseTransitions() {
44
+ const confirmed = this.allowInPhase(this.confirm, VoicePanelPhase.RECORDING);
45
+ const completed = this.allowInPhase(this.complete, VoicePanelPhase.PROCESSING);
46
+ const failed = this.allowInPhase(this.fail, VoicePanelPhase.PROCESSING);
47
+ this.$phase.on(this.open, () => VoicePanelPhase.RECORDING).on(confirmed, () => VoicePanelPhase.PROCESSING).on(completed, () => VoicePanelPhase.DONE).on(failed, () => VoicePanelPhase.DONE).reset(this.reset);
48
+ this.$transcript.on(completed, (_, transcript) => transcript).reset(this.reset);
49
+ this.$hasError.on(failed, () => true).reset(this.reset);
50
+ sample({
51
+ clock: this.discard,
52
+ target: this.reset
53
+ });
54
+ sample({
55
+ clock: this.reset,
56
+ target: this.dropdown.reset
57
+ });
58
+ }
59
+ }
60
+ //# sourceMappingURL=VoiceTranscriptPanel.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEvent","createStore","sample","VoicePanelPhase","DropdownModel","VoiceTranscriptPanelModel","reset","dropdown","open","confirm","complete","fail","discard","$phase","$transcript","$hasError","$flags","map","phase","isOpen","isRecording","RECORDING","isProcessing","PROCESSING","isDone","DONE","constructor","setupPhaseTransitions","allowInPhase","clock","source","filter","currentPhase","fn","_","payload","confirmed","completed","failed","on","transcript","target"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/VoiceTranscriptPanel.model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,EAASC,MAAM,QAAQ,UAAU;AAElE,SAASC,eAAe,QAAQ,oBAAiB;AACjD,SAASC,aAAa,QAAQ,uCAAoC;AASlE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,CAAC;EACrBC,KAAK,GAAGN,WAAW,CAAC,CAAC;EAErBO,QAAQ,GAAG,IAAIH,aAAa,CAAC,CAAC;EAE9BI,IAAI,GAAGR,WAAW,CAAC,CAAC;EACpBS,OAAO,GAAGT,WAAW,CAAC,CAAC;EACvBU,Q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AAM,CACR0B,EAAE,CAAC,IAAI,CAAC/B,IAAI,EAAE,MAAML,eAAe,CAACkB,SAAS,CAAC,CAC9CkB,EAAE,CAACH,SAAS,EAAE,MAAMjC,eAAe,CAACoB,UAAU,CAAC,CAC/CgB,EAAE,CAACF,SAAS,EAAE,MAAMlC,eAAe,CAACsB,IAAI,CAAC,CACzCc,EAAE,CAACD,MAAM,EAAE,MAAMnC,eAAe,CAACsB,IAAI,CAAC,CACtCnB,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;IAEpB,IAAI,CAACQ,WAAW,CAACyB,EAAE,CAACF,SAAS,EAAE,CAACH,CAAC,EAAEM,UAAU,KAAKA,UAAU,CAAC,CAAClC,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;IAC/E,IAAI,CAACS,SAAS,CAACwB,EAAE,CAACD,MAAM,EAAE,MAAM,IAAI,CAAC,CAAChC,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;IAEvDJ,MAAM,CAAC;MAAE2B,KAAK,EAAE,IAAI,CAACjB,OAAO;MAAE6B,MAAM,EAAE,IAAI,CAACnC;IAAM,CAAC,CAAC;IACnDJ,MAAM,CAAC;MAAE2B,KAAK,EAAE,IAAI,CAACvB,KAAK;MAAEmC,MAAM,EAAE,IAAI,CAAClC,QAAQ,CAACD;IAAM,CAAC,CAAC;EAC5D;AACF","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import { NO_AUDIO_BE_MESSAGE, TRANSCRIPT_MAX_RETRIES, TRANSCRIPT_RETRY_INTERVAL_MS, TranscriptionStatus } from "./constants.js";
4
+ const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
5
+
6
+ // Polls the transcript endpoint until the BE finishes processing. FAILED and
7
+ // exhausted retries both resolve to the NO_AUDIO sentinel — same contract the
8
+ // playing side relies on.
9
+ export const fetchTranscriptWithRetry = async (getTranscript, audioFileId) => {
10
+ for (let attempt = 0; attempt < TRANSCRIPT_MAX_RETRIES; attempt++) {
11
+ const response = await getTranscript(audioFileId);
12
+ if (response.status === TranscriptionStatus.COMPLETED) {
13
+ return {
14
+ text: response.text,
15
+ language: response.language
16
+ };
17
+ }
18
+ if (response.status === TranscriptionStatus.FAILED) {
19
+ return {
20
+ text: NO_AUDIO_BE_MESSAGE
21
+ };
22
+ }
23
+ if (attempt < TRANSCRIPT_MAX_RETRIES - 1) {
24
+ await delay(TRANSCRIPT_RETRY_INTERVAL_MS);
25
+ }
26
+ }
27
+ return {
28
+ text: NO_AUDIO_BE_MESSAGE
29
+ };
30
+ };
31
+ //# sourceMappingURL=transcript.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NO_AUDIO_BE_MESSAGE","TRANSCRIPT_MAX_RETRIES","TRANSCRIPT_RETRY_INTERVAL_MS","TranscriptionStatus","delay","ms","Promise","resolve","setTimeout","fetchTranscriptWithRetry","getTranscript","audioFileId","attempt","response","status","COMPLETED","text","language","FAILED"],"sourceRoot":"../../../../src","sources":["features/voice/transcript.helpers.ts"],"mappings":";;AAAA,SACEA,mBAAmB,EACnBC,sBAAsB,EACtBC,4BAA4B,EAC5BC,mBAAmB,QACd,gBAAa;AAMpB,MAAMC,KAAK,GAAIC,EAAU,IAAK,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEF,EAAE,CAAC,CAAC;;AAE/E;AACA;AACA;AACA,OAAO,MAAMI,wBAAwB,GAAG,MAAAA,CACtCC,aAAqC,EACrCC,WAAmB,KACW;EAC9B,KAAK,IAAIC,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAGX,sBAAsB,EAAEW,OAAO,EAAE,EAAE;IACjE,MAAMC,QAAQ,GAAG,MAAMH,aAAa,CAACC,WAAW,CAAC;IAEjD,IAAIE,QAAQ,CAACC,MAAM,KAAKX,mBAAmB,CAACY,SAAS,EAAE;MACrD,OAAO;QAAEC,IAAI,EAAEH,QAAQ,CAACG,IAAI;QAAEC,QAAQ,EAAEJ,QAAQ,CAACI;MAAS,CAAC;IAC7D;IAEA,IAAIJ,QAAQ,CAACC,MAAM,KAAKX,mBAAmB,CAACe,MAAM,EAAE;MAClD,OAAO;QAAEF,IAAI,EAAEhB;MAAoB,CAAC;IACtC;IAEA,IAAIY,OAAO,GAAGX,sBAAsB,GAAG,CAAC,EAAE;MACxC,MAAMG,KAAK,CAACF,4BAA4B,CAAC;IAC3C;EACF;EACA,OAAO;IAAEc,IAAI,EAAEhB;EAAoB,CAAC;AACtC,CAAC","ignoreList":[]}
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- export let TranscriptionStatus = /*#__PURE__*/function (TranscriptionStatus) {
4
- TranscriptionStatus["PENDING"] = "pending";
5
- TranscriptionStatus["COMPLETED"] = "completed";
6
- TranscriptionStatus["FAILED"] = "failed";
7
- return TranscriptionStatus;
8
- }({});
3
+ import { TranscriptionStatus } from "./constants.js";
4
+ // The enum moved to constants.ts (jest-safe import chain for transcript helpers);
5
+ // re-exported here to keep the public surface unchanged.
6
+ export { TranscriptionStatus };
9
7
  export let RecordButtonVariant = /*#__PURE__*/function (RecordButtonVariant) {
10
8
  RecordButtonVariant["DEFAULT"] = "default";
11
9
  RecordButtonVariant["ADVANCED"] = "advanced";
@@ -1 +1 @@
1
- {"version":3,"names":["TranscriptionStatus","RecordButtonVariant","VoiceTranscriptionVariant"],"sourceRoot":"../../../../src","sources":["features/voice/types.ts"],"mappings":";;AA8DA,WAAYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAqC/B,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAK/B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["TranscriptionStatus","RecordButtonVariant","VoiceTranscriptionVariant"],"sourceRoot":"../../../../src","sources":["features/voice/types.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,gBAAa;AAKjD;AACA;AACA,SAASA,mBAAmB;AA0F5B,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAK/B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VoiceRecordWithTranscript.model.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceRecordWithTranscript.model.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voice/__tests__/VoiceRecordWithTranscript.model.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VoiceTranscriptPanel.model.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceTranscriptPanel.model.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voice/__tests__/VoiceTranscriptPanel.model.test.ts"],"names":[],"mappings":""}
@@ -19,8 +19,40 @@ export declare const DROPDOWN_MAX_CONTENT_HEIGHT = 330;
19
19
  export declare const TRANSCRIPT_RETRY_INTERVAL_MS = 4000;
20
20
  export declare const TRANSCRIPT_MAX_RETRIES = 15;
21
21
  export declare const NO_AUDIO_BE_MESSAGE = "No audio";
22
+ export declare enum TranscriptionStatus {
23
+ PENDING = "pending",
24
+ COMPLETED = "completed",
25
+ FAILED = "failed"
26
+ }
22
27
  export declare const VOICE_RECORD_SHADOWS: {
23
28
  default: string;
24
29
  advanced: string;
25
30
  };
31
+ export declare enum VoicePanelPhase {
32
+ RECORDING = "recording",
33
+ PROCESSING = "processing",
34
+ DONE = "done"
35
+ }
36
+ export declare const VOICE_WAVEFORM: {
37
+ readonly BAR_WIDTH: 3;
38
+ readonly BAR_GAP: 3;
39
+ readonly MIN_BAR_HEIGHT: 2;
40
+ readonly HEIGHT: 40;
41
+ readonly AMPLITUDE_PADDING: 12;
42
+ readonly MIN_LEVEL: 0.04;
43
+ readonly MIN_BARS: 16;
44
+ readonly BUFFER_SIZE: 120;
45
+ readonly SAMPLE_INTERVAL_MS: 80;
46
+ readonly FADE_RATIO: 0.22;
47
+ readonly METERING_FLOOR_DB: -60;
48
+ readonly LEVEL_SMOOTHING: 0.55;
49
+ };
50
+ export declare const METERING_UPDATE_INTERVAL_MS = 100;
51
+ export declare const WEB_METERING_FFT_SIZE = 1024;
52
+ export declare const VOICE_TRANSCRIPT_PANEL: {
53
+ readonly WIDTH: 240;
54
+ readonly WIDTH_DONE: 360;
55
+ readonly TRANSCRIPT_MAX_HEIGHT: 200;
56
+ readonly SCROLLBAR_WIDTH: 8;
57
+ };
26
58
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;;;;CAS1C,CAAA;AACD,eAAO,MAAM,8BAA8B,QAAQ,CAAA;AACnD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,oBAAY,kBAAkB;IAC5B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AACD,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAA;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAG7C,eAAO,MAAM,oBAAoB;;;CAGhC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;;;;CAS1C,CAAA;AACD,eAAO,MAAM,8BAA8B,QAAQ,CAAA;AACnD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,oBAAY,kBAAkB;IAC5B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AACD,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAA;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAE7C,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAGD,eAAO,MAAM,oBAAoB;;;CAGhC,CAAA;AAED,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAcjB,CAAA;AAIV,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAA;AAEzC,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAA"}
@@ -3,6 +3,9 @@ import { VoicePlayerApi, VoiceRecorderApi } from './types';
3
3
  import { PlayerState } from './playing/model';
4
4
  import { AudioStatus } from '../chatbot';
5
5
  export declare const formatDuration: (ms: number) => string;
6
+ export declare const normalizeMetering: (metering: number | null | undefined) => number;
7
+ type MeteringCallback = (decibels: number | null) => void;
8
+ export declare const createWebMeteringMonitor: (recorder: AudioRecorder, onMetering: MeteringCallback) => (() => void);
6
9
  export declare const ensureRecordingPermissions: () => Promise<boolean>;
7
10
  export declare const getAvailableInputs: (recorder: AudioRecorder) => Promise<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
8
11
  export declare const addAudioInputsListenerWeb: (callback: (devices: MediaDeviceInfo[]) => void) => () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features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;AAED,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,kBAAkB,MAAM,KAAG,MAAM,GAAG,IAG1F,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,WAAW,KAAG,WAAW,GAAG,SAIjE,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,OAM3C,CAAA"}
@@ -1,7 +1,14 @@
1
1
  export * from './recording/components/VoiceRecord';
2
+ export * from './recording/components/VoiceRecordWithTranscript';
3
+ export * from './recording/components/VoiceWaveform';
4
+ export * from './recording/components/VoiceTranscriptPanel';
5
+ export * from './recording/hooks/useVoiceWaveform';
2
6
  export * from './recording/model/VoiceRecord.model';
7
+ export * from './recording/model/VoiceRecordWithTranscript.model';
8
+ export * from './recording/model/VoiceTranscriptPanel.model';
3
9
  export * from './recording/modal/VoiceRecordDeleteModal';
4
10
  export * from './recording/modal/VoiceRecordUndoModal';
11
+ export * from './transcript.helpers';
5
12
  export * from './playing/model/VoicePlayer.model';
6
13
  export * from './playing/components/VoiceTranscription';
7
14
  export * from './playing/hooks/useVoicePlayerLifecycle';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,0CAA0C,CAAA;AACxD,cAAc,wCAAwC,CAAA;AAEtD,cAAc,mCAAmC,CAAA;AACjD,cAAc,yCAAyC,CAAA;AACvD,cAAc,yCAAyC,CAAA;AAEvD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA;AAClD,cAAc,kDAAkD,CAAA;AAChE,cAAc,sCAAsC,CAAA;AACpD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,8CAA8C,CAAA;AAC5D,cAAc,0CAA0C,CAAA;AACxD,cAAc,wCAAwC,CAAA;AACtD,cAAc,sBAAsB,CAAA;AAEpC,cAAc,mCAAmC,CAAA;AACjD,cAAc,yCAAyC,CAAA;AACvD,cAAc,yCAAyC,CAAA;AAEvD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA"}
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  type VoiceTranscriptContentProps = {
3
3
  text: string;
4
4
  isLoading: boolean;
5
+ numberOfLines?: number;
5
6
  };
6
- export declare const VoiceTranscriptContent: ({ text, isLoading }: VoiceTranscriptContentProps) => React.JSX.Element;
7
+ export declare const VoiceTranscriptContent: ({ text, isLoading, numberOfLines, }: VoiceTranscriptContentProps) => React.JSX.Element;
7
8
  export {};
8
9
  //# sourceMappingURL=VoiceTranscriptContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VoiceTranscriptContent.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,sBAAsB,wBAAyB,2BAA2B,sBActF,CAAA"}
1
+ {"version":3,"file":"VoiceTranscriptContent.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptContent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,sBAAsB,wCAIhC,2BAA2B,sBAgB7B,CAAA"}
@@ -1,19 +1,14 @@
1
1
  import { TranscriptionsCollection } from './TranscriptionsCollection';
2
2
  import { VoicePlayerApi } from '../../types';
3
- type TranscriptResult = {
4
- text: string;
5
- language?: string;
6
- };
3
+ import { TranscriptResult } from '../../transcript.helpers';
7
4
  export declare class TranscriptionsDownloaderModel {
8
5
  private readonly collection;
9
6
  private readonly api;
10
7
  private readonly inflightFetches;
11
8
  private readonly transcriptCache;
12
9
  constructor(collection: TranscriptionsCollection, api: VoicePlayerApi);
13
- private fetchTranscriptWithRetry;
14
- private runFetchWithRetry;
10
+ private fetchTranscript;
15
11
  readonly loadTranscriptForAttempt: import("effector").Effect<number, void, Error>;
16
12
  getCachedTranscript(audioFileId: string): TranscriptResult | undefined;
17
13
  }
18
- export {};
19
14
  //# sourceMappingURL=TranscriptionsDownloader.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TranscriptionsDownloader.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/TranscriptionsDownloader.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAuB,cAAc,EAAE,MAAM,aAAa,CAAA;AAOjE,KAAK,gBAAgB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA+C;IAC/E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;gBAE1D,UAAU,EAAE,wBAAwB,EAAE,GAAG,EAAE,cAAc;YAKvD,wBAAwB;YAmBxB,iBAAiB;IAmB/B,SAAgB,wBAAwB,iDAsBtC;IAEK,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;CAG9E"}
1
+ {"version":3,"file":"TranscriptionsDownloader.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/TranscriptionsDownloader.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAA4B,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAErF,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA+C;IAC/E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;gBAE1D,UAAU,EAAE,wBAAwB,EAAE,GAAG,EAAE,cAAc;YAKvD,eAAe;IAsB7B,SAAgB,wBAAwB,iDAsBtC;IAEK,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;CAG9E"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { RecordButtonVariant } from '../../types';
4
+ import { VoiceRecordWithTranscriptModel } from '../model/VoiceRecordWithTranscript.model';
5
+ type VoiceRecordWithTranscriptProps = {
6
+ model: VoiceRecordWithTranscriptModel;
7
+ buttonVariant: RecordButtonVariant;
8
+ style?: StyleProp<ViewStyle>;
9
+ panelStyle?: StyleProp<ViewStyle>;
10
+ };
11
+ export declare const VoiceRecordWithTranscript: ({ model, buttonVariant, style, panelStyle, }: VoiceRecordWithTranscriptProps) => React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=VoiceRecordWithTranscript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceRecordWithTranscript.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceRecordWithTranscript.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAA;AAIzF,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,8BAA8B,CAAA;IACrC,aAAa,EAAE,mBAAmB,CAAA;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAClC,CAAA;AAID,eAAO,MAAM,yBAAyB,iDAKnC,8BAA8B,sBAahC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { VoiceTranscriptPanelModel } from '../model/VoiceTranscriptPanel.model';
4
+ type VoiceTranscriptPanelProps = {
5
+ model: VoiceTranscriptPanelModel;
6
+ metering: number | null;
7
+ style?: StyleProp<ViewStyle>;
8
+ };
9
+ export declare const VoiceTranscriptPanel: ({ model, metering, style }: VoiceTranscriptPanelProps) => React.JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=VoiceTranscriptPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceTranscriptPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceTranscriptPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAEL,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAA;AA6BrB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAsD/E,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,yBAAyB,CAAA;IAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,oBAAoB,+BAAgC,yBAAyB,6BAgHzF,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type VoiceWaveformProps = {
3
+ levels: number[];
4
+ width: number;
5
+ };
6
+ export declare const VoiceWaveform: ({ levels, width }: VoiceWaveformProps) => React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=VoiceWaveform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceWaveform.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceWaveform.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAaxC,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAyBD,eAAO,MAAM,aAAa,sBAAuB,kBAAkB,sBAsClE,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { LayoutChangeEvent } from 'react-native';
2
+ export declare const useTranscriptPanelAnimation: (isExpanded: boolean) => {
3
+ onContentLayout: (event: LayoutChangeEvent) => void;
4
+ containerAnimatedStyle: {
5
+ width: 240 | 360;
6
+ };
7
+ bodyAnimatedStyle: {
8
+ height?: undefined;
9
+ } | {
10
+ height: number;
11
+ };
12
+ caretAnimatedStyle: {
13
+ transform: {
14
+ rotate: "180deg" | "0deg";
15
+ }[];
16
+ };
17
+ };
18
+ //# sourceMappingURL=useTranscriptPanelAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTranscriptPanelAnimation.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/hooks/useTranscriptPanelAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAehD,eAAO,MAAM,2BAA2B,eAAgB,OAAO;6BAG7B,iBAAiB;;;;;;;;;;;;;;CA8BlD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAM7D,eAAO,MAAM,gBAAgB,UAAW,gBAAgB;;CAsDvD,CAAA"}
1
+ {"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAmB7D,eAAO,MAAM,gBAAgB,UAAW,gBAAgB;;CAgEvD,CAAA"}
@@ -0,0 +1,7 @@
1
+ type UseVoiceWaveformParams = {
2
+ metering: number | null;
3
+ isActive: boolean;
4
+ };
5
+ export declare const useVoiceWaveform: ({ metering, isActive }: UseVoiceWaveformParams) => number[];
6
+ export {};
7
+ //# sourceMappingURL=useVoiceWaveform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVoiceWaveform.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/hooks/useVoiceWaveform.ts"],"names":[],"mappings":"AAKA,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAWD,eAAO,MAAM,gBAAgB,2BAA4B,sBAAsB,aA0B9E,CAAA"}
@@ -7,9 +7,11 @@ export declare class RecorderModel<T = unknown> {
7
7
  readonly setVoiceRecordState: import("effector").EventCallable<VoiceRecorderState>;
8
8
  readonly setAvailableInputs: import("effector").EventCallable<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
9
9
  readonly setLastKnownDurationMs: import("effector").EventCallable<number>;
10
+ readonly setMetering: import("effector").EventCallable<number | null>;
10
11
  readonly $voiceRecordState: import("effector").StoreWritable<VoiceRecorderState>;
11
12
  readonly $availableInputs: import("effector").StoreWritable<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
12
13
  readonly $lastKnownDurationMs: import("effector").StoreWritable<number>;
14
+ readonly $metering: import("effector").StoreWritable<number | null>;
13
15
  readonly start: import("effector").Effect<void, void, Error>;
14
16
  readonly stop: import("effector").Effect<void, void | undefined, Error>;
15
17
  stopAndAwaitResult(): Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"Recorder.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/model/Recorder.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAUpD,qBAAa,aAAa,CAAC,CAAC,GAAG,OAAO;IAC7B,QAAQ,EAAG,aAAa,CAAA;IAC/B,OAAO,CAAC,YAAY,CAA+B;IAEnD,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,mBAAmB,uDAAoC;IACvE,SAAgB,kBAAkB,8FAAsC;IACxE,SAAgB,sBAAsB,2CAAwB;IAE9D,SAAgB,iBAAiB,uDAGd;IACnB,SAAgB,gBAAgB,8FAAuC;IACvE,SAAgB,oBAAoB,2CAA4D;IAEhG,SAAgB,KAAK,+CAUnB;IAEF,SAAgB,IAAI,2DAGlB;IAEK,kBAAkB,IAAI,OAAO,CAAC,CAAC,CAAC;IAOhC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI;IAO9B,iBAAiB,IAAI,IAAI;CAGjC"}
1
+ {"version":3,"file":"Recorder.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/model/Recorder.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAUpD,qBAAa,aAAa,CAAC,CAAC,GAAG,OAAO;IAC7B,QAAQ,EAAG,aAAa,CAAA;IAC/B,OAAO,CAAC,YAAY,CAA+B;IAEnD,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,mBAAmB,uDAAoC;IACvE,SAAgB,kBAAkB,8FAAsC;IACxE,SAAgB,sBAAsB,2CAAwB;IAC9D,SAAgB,WAAW,kDAA+B;IAE1D,SAAgB,iBAAiB,uDAGd;IACnB,SAAgB,gBAAgB,8FAAuC;IACvE,SAAgB,oBAAoB,2CAA4D;IAEhG,SAAgB,SAAS,kDAAoD;IAE7E,SAAgB,KAAK,+CAUnB;IAEF,SAAgB,IAAI,2DAGlB;IAEK,kBAAkB,IAAI,OAAO,CAAC,CAAC,CAAC;IAOhC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI;IAO9B,iBAAiB,IAAI,IAAI;CAGjC"}
@@ -0,0 +1,16 @@
1
+ import { GetAudioFileTranscript } from '../../transcript.helpers';
2
+ import { VoiceTranscriptPanelModel } from './VoiceTranscriptPanel.model';
3
+ import type { VoiceRecordModel } from './VoiceRecord.model';
4
+ export type VoiceRecordWithTranscriptModelProps = {
5
+ recordModel: VoiceRecordModel;
6
+ getTranscript: GetAudioFileTranscript;
7
+ };
8
+ export declare class VoiceRecordWithTranscriptModel {
9
+ readonly record: VoiceRecordModel;
10
+ readonly panel: VoiceTranscriptPanelModel;
11
+ private readonly resolveTranscriptFx;
12
+ constructor({ recordModel, getTranscript }: VoiceRecordWithTranscriptModelProps);
13
+ private setupPanelLifecycle;
14
+ private setupTranscriptPipeline;
15
+ }
16
+ //# sourceMappingURL=VoiceRecordWithTranscript.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceRecordWithTranscript.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/model/VoiceRecordWithTranscript.model.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAG3D,MAAM,MAAM,mCAAmC,GAAG;IAChD,WAAW,EAAE,gBAAgB,CAAA;IAC7B,aAAa,EAAE,sBAAsB,CAAA;CACtC,CAAA;AAMD,qBAAa,8BAA8B;IACzC,SAAgB,MAAM,EAAE,gBAAgB,CAAA;IACxC,SAAgB,KAAK,4BAAkC;IAEvD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA2C;gBAEnE,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,mCAAmC;IAe/E,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,uBAAuB;CA8BhC"}
@@ -0,0 +1,26 @@
1
+ import { VoicePanelPhase } from '../../constants';
2
+ import { DropdownModel } from '../../playing/model/Dropdown.model';
3
+ type PhaseFlags = {
4
+ isOpen: boolean;
5
+ isRecording: boolean;
6
+ isProcessing: boolean;
7
+ isDone: boolean;
8
+ };
9
+ export declare class VoiceTranscriptPanelModel {
10
+ readonly reset: import("effector").EventCallable<void>;
11
+ readonly dropdown: DropdownModel;
12
+ readonly open: import("effector").EventCallable<void>;
13
+ readonly confirm: import("effector").EventCallable<void>;
14
+ readonly complete: import("effector").EventCallable<string>;
15
+ readonly fail: import("effector").EventCallable<void>;
16
+ readonly discard: import("effector").EventCallable<void>;
17
+ readonly $phase: import("effector").StoreWritable<VoicePanelPhase | null>;
18
+ readonly $transcript: import("effector").StoreWritable<string>;
19
+ readonly $hasError: import("effector").StoreWritable<boolean>;
20
+ readonly $flags: import("effector").Store<PhaseFlags>;
21
+ constructor();
22
+ private allowInPhase;
23
+ private setupPhaseTransitions;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=VoiceTranscriptPanel.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceTranscriptPanel.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/model/VoiceTranscriptPanel.model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAElE,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAQD,qBAAa,yBAAyB;IACpC,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,QAAQ,gBAAsB;IAE9C,SAAgB,IAAI,yCAAgB;IACpC,SAAgB,OAAO,yCAAgB;IACvC,SAAgB,QAAQ,2CAAwB;IAChD,SAAgB,IAAI,yCAAgB;IACpC,SAAgB,OAAO,yCAAgB;IAEvC,SAAgB,MAAM,2DAA4C;IAClE,SAAgB,WAAW,2CAAkB;IAC7C,SAAgB,SAAS,4CAAqB;IAE9C,SAAgB,MAAM,uCAOrB;;IAQD,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,qBAAqB;CAkB9B"}
@@ -0,0 +1,8 @@
1
+ import type { AudioTranscriptResponse } from './types';
2
+ export type TranscriptResult = {
3
+ text: string;
4
+ language?: string;
5
+ };
6
+ export type GetAudioFileTranscript = (audioFileId: string) => Promise<AudioTranscriptResponse>;
7
+ export declare const fetchTranscriptWithRetry: (getTranscript: GetAudioFileTranscript, audioFileId: string) => Promise<TranscriptResult>;
8
+ //# sourceMappingURL=transcript.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcript.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/transcript.helpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAClE,MAAM,MAAM,sBAAsB,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAO9F,eAAO,MAAM,wBAAwB,kBACpB,sBAAsB,eACxB,MAAM,KAClB,OAAO,CAAC,gBAAgB,CAiB1B,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import { WithAbortSignal } from 'src/types/common.types';
2
+ import { TranscriptionStatus } from './constants';
2
3
  import { getAvailableInputs } from './helpers';
3
4
  import { VoiceRecordModel } from './recording/model/VoiceRecord.model';
4
5
  import { AxiosResponse } from 'axios';
6
+ export { TranscriptionStatus };
5
7
  import type { GoogleTranslateProps as GoogleTranslatePayload, GoogleTranslateResponse } from '../translation/providers/google.types';
6
8
  export type { GoogleTranslatePayload, GoogleTranslateResponse };
7
9
  export type VoiceRecordNotificationTypes = {
@@ -45,11 +47,6 @@ export type VoiceRecorderApi = {
45
47
  uploadAudioFile: (data: UploadAudioPayload) => Promise<UploadAudioResponse>;
46
48
  deleteAudioFile: (audioFileId: string) => Promise<void>;
47
49
  };
48
- export declare enum TranscriptionStatus {
49
- PENDING = "pending",
50
- COMPLETED = "completed",
51
- FAILED = "failed"
52
- }
53
50
  export type AudioTranscriptResponse = {
54
51
  text: string;
55
52
  language: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EACV,oBAAoB,IAAI,sBA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AChB,MAAM,EAAE,mBAAmB,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACjF,iBAAiB,EAAE,CACjB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAC/B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAA;IACjC,aAAa,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CACrF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;IACnC,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,oBAAY,yBAAyB;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VoiceRecordWithTranscript.model.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceRecordWithTranscript.model.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voice/__tests__/VoiceRecordWithTranscript.model.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VoiceTranscriptPanel.model.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceTranscriptPanel.model.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voice/__tests__/VoiceTranscriptPanel.model.test.ts"],"names":[],"mappings":""}
@@ -19,8 +19,40 @@ export declare const DROPDOWN_MAX_CONTENT_HEIGHT = 330;
19
19
  export declare const TRANSCRIPT_RETRY_INTERVAL_MS = 4000;
20
20
  export declare const TRANSCRIPT_MAX_RETRIES = 15;
21
21
  export declare const NO_AUDIO_BE_MESSAGE = "No audio";
22
+ export declare enum TranscriptionStatus {
23
+ PENDING = "pending",
24
+ COMPLETED = "completed",
25
+ FAILED = "failed"
26
+ }
22
27
  export declare const VOICE_RECORD_SHADOWS: {
23
28
  default: string;
24
29
  advanced: string;
25
30
  };
31
+ export declare enum VoicePanelPhase {
32
+ RECORDING = "recording",
33
+ PROCESSING = "processing",
34
+ DONE = "done"
35
+ }
36
+ export declare const VOICE_WAVEFORM: {
37
+ readonly BAR_WIDTH: 3;
38
+ readonly BAR_GAP: 3;
39
+ readonly MIN_BAR_HEIGHT: 2;
40
+ readonly HEIGHT: 40;
41
+ readonly AMPLITUDE_PADDING: 12;
42
+ readonly MIN_LEVEL: 0.04;
43
+ readonly MIN_BARS: 16;
44
+ readonly BUFFER_SIZE: 120;
45
+ readonly SAMPLE_INTERVAL_MS: 80;
46
+ readonly FADE_RATIO: 0.22;
47
+ readonly METERING_FLOOR_DB: -60;
48
+ readonly LEVEL_SMOOTHING: 0.55;
49
+ };
50
+ export declare const METERING_UPDATE_INTERVAL_MS = 100;
51
+ export declare const WEB_METERING_FFT_SIZE = 1024;
52
+ export declare const VOICE_TRANSCRIPT_PANEL: {
53
+ readonly WIDTH: 240;
54
+ readonly WIDTH_DONE: 360;
55
+ readonly TRANSCRIPT_MAX_HEIGHT: 200;
56
+ readonly SCROLLBAR_WIDTH: 8;
57
+ };
26
58
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;;;;CAS1C,CAAA;AACD,eAAO,MAAM,8BAA8B,QAAQ,CAAA;AACnD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,oBAAY,kBAAkB;IAC5B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AACD,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAA;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAG7C,eAAO,MAAM,oBAAoB;;;CAGhC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;;;;CAS1C,CAAA;AACD,eAAO,MAAM,8BAA8B,QAAQ,CAAA;AACnD,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,oBAAY,kBAAkB;IAC5B,IAAI,IAAA;IACJ,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AACD,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAA;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAE7C,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAGD,eAAO,MAAM,oBAAoB;;;CAGhC,CAAA;AAED,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAcjB,CAAA;AAIV,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAA;AAEzC,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAA"}
@@ -3,6 +3,9 @@ import { VoicePlayerApi, VoiceRecorderApi } from './types';
3
3
  import { PlayerState } from './playing/model';
4
4
  import { AudioStatus } from '../chatbot';
5
5
  export declare const formatDuration: (ms: number) => string;
6
+ export declare const normalizeMetering: (metering: number | null | undefined) => number;
7
+ type MeteringCallback = (decibels: number | null) => void;
8
+ export declare const createWebMeteringMonitor: (recorder: AudioRecorder, onMetering: MeteringCallback) => (() => void);
6
9
  export declare const ensureRecordingPermissions: () => Promise<boolean>;
7
10
  export declare const getAvailableInputs: (recorder: AudioRecorder) => Promise<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
8
11
  export declare const addAudioInputsListenerWeb: (callback: (devices: MediaDeviceInfo[]) => void) => () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voice/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,EAId,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,eAAO,MAAM,cAAc,OAAQ,MAAM,KAAG,MAK3C,CAAA;AAED,eAAO,MAAM,0BAA0B,wBAStC,CAAA;AASD,eAAO,MAAM,kBAAkB,aAAoB,aAAa,uEAQ/D,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,eAiBvF,CAAA;AACD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YACpB,MA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C,MAAM,IAAI,CAsCb,CAAA;AAED,eAAO,MAAM,0BAA0B,wBAStC,CAAA;AASD,eAAO,MAAM,kBAAkB,aAAoB,aAAa,uEAQ/D,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,eAiBvF,CAAA;AACD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YACpB,MAAM,mBACE,WAAW,KAC3B,OAAO,CAAC,MAAM,GAAG,SAAS,CAkC5B,CAAA;AAED,KAAK,2BAA2B,GAAG;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAI/B,2BAA2B,KAAG,OAAO,CAAC,QAAQ,CA4BhD,CAAA;AAED,eAAO,MAAM,+BAA+B,sBACvB,QAAQ,OACtB,gBAAgB;;;;;;;CAiBtB,CAAA;AA2CD,eAAO,MAAM,iCAAiC,gBAAiB,MAAM,OAAO,cAAc;;;;;;;;;;;CAgBzF,CAAA;AAED,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,kBAAkB,MAAM,KAAG,MAAM,GAAG,IAG1F,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,WAAW,KAAG,WAAW,GAAG,SAIjE,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,OAM3C,CAAA"}
@@ -1,7 +1,14 @@
1
1
  export * from './recording/components/VoiceRecord';
2
+ export * from './recording/components/VoiceRecordWithTranscript';
3
+ export * from './recording/components/VoiceWaveform';
4
+ export * from './recording/components/VoiceTranscriptPanel';
5
+ export * from './recording/hooks/useVoiceWaveform';
2
6
  export * from './recording/model/VoiceRecord.model';
7
+ export * from './recording/model/VoiceRecordWithTranscript.model';
8
+ export * from './recording/model/VoiceTranscriptPanel.model';
3
9
  export * from './recording/modal/VoiceRecordDeleteModal';
4
10
  export * from './recording/modal/VoiceRecordUndoModal';
11
+ export * from './transcript.helpers';
5
12
  export * from './playing/model/VoicePlayer.model';
6
13
  export * from './playing/components/VoiceTranscription';
7
14
  export * from './playing/hooks/useVoicePlayerLifecycle';