@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.
- package/dist/commonjs/features/voice/constants.js +39 -3
- package/dist/commonjs/features/voice/constants.js.map +1 -1
- package/dist/commonjs/features/voice/helpers.js +67 -1
- package/dist/commonjs/features/voice/helpers.js.map +1 -1
- package/dist/commonjs/features/voice/index.js +77 -0
- package/dist/commonjs/features/voice/index.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +17 -9
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +4 -27
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.js +49 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceTranscriptPanel.js +245 -0
- package/dist/commonjs/features/voice/recording/components/VoiceTranscriptPanel.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceWaveform.js +93 -0
- package/dist/commonjs/features/voice/recording/components/VoiceWaveform.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.js +42 -0
- package/dist/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +17 -2
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -1
- package/dist/commonjs/features/voice/recording/hooks/useVoiceWaveform.js +43 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceWaveform.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +3 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.js +83 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.js +65 -0
- package/dist/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.js.map +1 -0
- package/dist/commonjs/features/voice/transcript.helpers.js +36 -0
- package/dist/commonjs/features/voice/transcript.helpers.js.map +1 -0
- package/dist/commonjs/features/voice/types.js +11 -7
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/module/features/voice/constants.js +38 -0
- package/dist/module/features/voice/constants.js.map +1 -1
- package/dist/module/features/voice/helpers.js +65 -1
- package/dist/module/features/voice/helpers.js.map +1 -1
- package/dist/module/features/voice/index.js +7 -0
- package/dist/module/features/voice/index.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +15 -9
- package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -1
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +4 -27
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordWithTranscript.js +43 -0
- package/dist/module/features/voice/recording/components/VoiceRecordWithTranscript.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceTranscriptPanel.js +238 -0
- package/dist/module/features/voice/recording/components/VoiceTranscriptPanel.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceWaveform.js +86 -0
- package/dist/module/features/voice/recording/components/VoiceWaveform.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useTranscriptPanelAnimation.js +37 -0
- package/dist/module/features/voice/recording/hooks/useTranscriptPanelAnimation.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +20 -3
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -1
- package/dist/module/features/voice/recording/hooks/useVoiceWaveform.js +38 -0
- package/dist/module/features/voice/recording/hooks/useVoiceWaveform.js.map +1 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js +3 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecordWithTranscript.model.js +78 -0
- package/dist/module/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceTranscriptPanel.model.js +60 -0
- package/dist/module/features/voice/recording/model/VoiceTranscriptPanel.model.js.map +1 -0
- package/dist/module/features/voice/transcript.helpers.js +31 -0
- package/dist/module/features/voice/transcript.helpers.js.map +1 -0
- package/dist/module/features/voice/types.js +4 -6
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/typescript/commonjs/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts +32 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/helpers.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +2 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +2 -7
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.d.ts +13 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordWithTranscript.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceTranscriptPanel.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceTranscriptPanel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceWaveform.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceWaveform.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceWaveform.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceWaveform.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +2 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts +26 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/transcript.helpers.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/transcript.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +2 -5
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts +2 -0
- package/dist/typescript/module/features/voice/__tests__/VoiceRecordWithTranscript.model.test.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts +2 -0
- package/dist/typescript/module/features/voice/__tests__/VoiceTranscriptPanel.model.test.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/constants.d.ts +32 -0
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/helpers.d.ts +3 -0
- package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/index.d.ts +7 -0
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +2 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +2 -7
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordWithTranscript.d.ts +13 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordWithTranscript.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceTranscriptPanel.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceTranscriptPanel.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceWaveform.d.ts +8 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceWaveform.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts +18 -0
- package/dist/typescript/module/features/voice/recording/hooks/useTranscriptPanelAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceWaveform.d.ts +7 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceWaveform.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +2 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts +16 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordWithTranscript.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts +26 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceTranscriptPanel.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/transcript.helpers.d.ts +8 -0
- package/dist/typescript/module/features/voice/transcript.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +2 -5
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/voice/__tests__/VoiceRecordWithTranscript.model.test.ts +145 -0
- package/src/features/voice/__tests__/VoiceTranscriptPanel.model.test.ts +135 -0
- package/src/features/voice/constants.ts +40 -0
- package/src/features/voice/helpers.ts +85 -1
- package/src/features/voice/index.ts +7 -0
- package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +16 -8
- package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +8 -30
- package/src/features/voice/recording/components/VoiceRecordWithTranscript.tsx +52 -0
- package/src/features/voice/recording/components/VoiceTranscriptPanel.tsx +285 -0
- package/src/features/voice/recording/components/VoiceWaveform.tsx +102 -0
- package/src/features/voice/recording/hooks/useTranscriptPanelAnimation.ts +49 -0
- package/src/features/voice/recording/hooks/useVoiceRecorder.ts +26 -3
- package/src/features/voice/recording/hooks/useVoiceWaveform.ts +46 -0
- package/src/features/voice/recording/model/Recorder.model.ts +3 -0
- package/src/features/voice/recording/model/VoiceRecordWithTranscript.model.ts +81 -0
- package/src/features/voice/recording/model/VoiceTranscriptPanel.model.ts +76 -0
- package/src/features/voice/transcript.helpers.ts +37 -0
- package/src/features/voice/types.ts +5 -6
- package/src/i18n/.generated/schema.json +6 -5
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import { BORDER_RADIUS, CaretDownIcon, COLORS, Loader, LoaderColor, LoaderSize, ScrollableListScrollView, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
|
+
import { useUnit } from 'effector-react';
|
|
7
|
+
import Animated, { Easing, FadeIn, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
|
|
8
|
+
import { useText } from "../../../../i18n/i18n.js";
|
|
9
|
+
import { VOICE_TRANSCRIPT_PANEL } from "../../constants.js";
|
|
10
|
+
import { VoiceTranscriptContent } from "../../playing/components/VoiceTranscriptContent.js";
|
|
11
|
+
import { useTranscriptPanelAnimation } from "../hooks/useTranscriptPanelAnimation.js";
|
|
12
|
+
import { useVoiceWaveform } from "../hooks/useVoiceWaveform.js";
|
|
13
|
+
import { VoiceWaveform } from "./VoiceWaveform.js";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);
|
|
16
|
+
const RECORDING_DOT_SIZE = 8;
|
|
17
|
+
const BLINK_DURATION_MS = 700;
|
|
18
|
+
const RECORDING_DOT_MIN_OPACITY = 0.2;
|
|
19
|
+
const CARET_SIZE = 22;
|
|
20
|
+
const PREVIEW_LINE_COUNT = 3;
|
|
21
|
+
// Cosmetic only (fade overlay height) — roughly the Typography h8 line height
|
|
22
|
+
const PREVIEW_LINE_HEIGHT = 19.6;
|
|
23
|
+
const PREVIEW_FADE_WIDTH = 72;
|
|
24
|
+
const PREVIEW_FADE_STRIPES_COUNT = 12;
|
|
25
|
+
// Rounding slack when comparing the two measured text heights
|
|
26
|
+
const PREVIEW_HEIGHT_TOLERANCE = 2;
|
|
27
|
+
const WAVEFORM_WIDTH = VOICE_TRANSCRIPT_PANEL.WIDTH - SPACING[200] * 2 - RECORDING_DOT_SIZE - SPACING[200];
|
|
28
|
+
const RecordingDot = () => {
|
|
29
|
+
const opacity = useSharedValue(1);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
opacity.value = withRepeat(withTiming(RECORDING_DOT_MIN_OPACITY, {
|
|
32
|
+
duration: BLINK_DURATION_MS,
|
|
33
|
+
easing: Easing.inOut(Easing.ease)
|
|
34
|
+
}), -1, true);
|
|
35
|
+
}, [opacity]);
|
|
36
|
+
|
|
37
|
+
// Explicit deps: consumers compile this library without the Reanimated Babel plugin
|
|
38
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
39
|
+
opacity: opacity.value
|
|
40
|
+
}), [opacity]);
|
|
41
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
42
|
+
style: [styles.recordingDot, animatedStyle]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Stripes of the panel background with rising opacity imitate the text
|
|
47
|
+
// dissolving at the end of the last preview line (no gradient dependency)
|
|
48
|
+
const PreviewLineFade = () => /*#__PURE__*/_jsx(View, {
|
|
49
|
+
style: styles.previewFade,
|
|
50
|
+
pointerEvents: "none",
|
|
51
|
+
children: Array.from({
|
|
52
|
+
length: PREVIEW_FADE_STRIPES_COUNT
|
|
53
|
+
}, (_, index) => /*#__PURE__*/_jsx(View, {
|
|
54
|
+
style: [styles.previewFadeStripe, {
|
|
55
|
+
opacity: (index + 1) / PREVIEW_FADE_STRIPES_COUNT
|
|
56
|
+
}]
|
|
57
|
+
}, index))
|
|
58
|
+
});
|
|
59
|
+
export const VoiceTranscriptPanel = ({
|
|
60
|
+
model,
|
|
61
|
+
metering,
|
|
62
|
+
style
|
|
63
|
+
}) => {
|
|
64
|
+
const t = useText();
|
|
65
|
+
const {
|
|
66
|
+
flags,
|
|
67
|
+
transcript,
|
|
68
|
+
hasError,
|
|
69
|
+
isExpanded
|
|
70
|
+
} = useUnit({
|
|
71
|
+
flags: model.$flags,
|
|
72
|
+
transcript: model.$transcript,
|
|
73
|
+
hasError: model.$hasError,
|
|
74
|
+
isExpanded: model.dropdown.$isExpanded
|
|
75
|
+
});
|
|
76
|
+
const [fullTextHeight, setFullTextHeight] = useState(0);
|
|
77
|
+
const [previewHeight, setPreviewHeight] = useState(0);
|
|
78
|
+
const levels = useVoiceWaveform({
|
|
79
|
+
metering,
|
|
80
|
+
isActive: flags.isRecording
|
|
81
|
+
});
|
|
82
|
+
const panelAnimation = useTranscriptPanelAnimation(isExpanded);
|
|
83
|
+
if (!flags.isOpen) return null;
|
|
84
|
+
const transcriptText = hasError ? t('voice.transcriptNotAvailable') : transcript;
|
|
85
|
+
|
|
86
|
+
// Both heights are measured, so the comparison stays correct regardless of
|
|
87
|
+
// the text's font metrics or paddings
|
|
88
|
+
const isTruncated = fullTextHeight > 0 && previewHeight > 0 && fullTextHeight > previewHeight + PREVIEW_HEIGHT_TOLERANCE;
|
|
89
|
+
const measureFullText = event => {
|
|
90
|
+
const {
|
|
91
|
+
height
|
|
92
|
+
} = event.nativeEvent.layout;
|
|
93
|
+
if (height > 0) setFullTextHeight(height);
|
|
94
|
+
};
|
|
95
|
+
const measurePreview = event => {
|
|
96
|
+
const {
|
|
97
|
+
height
|
|
98
|
+
} = event.nativeEvent.layout;
|
|
99
|
+
// Expanded shows the full text — only the collapsed (3-line) layout counts
|
|
100
|
+
if (height > 0 && !isExpanded) setPreviewHeight(height);
|
|
101
|
+
};
|
|
102
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
103
|
+
entering: FadeIn,
|
|
104
|
+
style: [styles.container, panelAnimation.containerAnimatedStyle, style],
|
|
105
|
+
children: [flags.isRecording && /*#__PURE__*/_jsxs(View, {
|
|
106
|
+
style: styles.recordingRow,
|
|
107
|
+
children: [/*#__PURE__*/_jsx(RecordingDot, {}), /*#__PURE__*/_jsx(VoiceWaveform, {
|
|
108
|
+
levels: levels,
|
|
109
|
+
width: WAVEFORM_WIDTH
|
|
110
|
+
})]
|
|
111
|
+
}), flags.isProcessing && /*#__PURE__*/_jsxs(View, {
|
|
112
|
+
style: styles.processing,
|
|
113
|
+
children: [/*#__PURE__*/_jsx(Loader, {
|
|
114
|
+
size: LoaderSize.SMALL,
|
|
115
|
+
color: LoaderColor.BLUE
|
|
116
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
117
|
+
variant: "h8",
|
|
118
|
+
style: styles.processingText,
|
|
119
|
+
children: `${t('voice.preparingTranscript')}...`
|
|
120
|
+
})]
|
|
121
|
+
}), flags.isDone && /*#__PURE__*/_jsxs(View, {
|
|
122
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
123
|
+
style: [styles.contentCollapsed, styles.fullTextMeasure],
|
|
124
|
+
pointerEvents: "none",
|
|
125
|
+
onLayout: measureFullText,
|
|
126
|
+
children: /*#__PURE__*/_jsx(VoiceTranscriptContent, {
|
|
127
|
+
text: transcriptText,
|
|
128
|
+
isLoading: false
|
|
129
|
+
})
|
|
130
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
131
|
+
variant: "h5",
|
|
132
|
+
style: styles.title,
|
|
133
|
+
children: t('voice.transcriptions')
|
|
134
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
135
|
+
style: [styles.transcriptBody, panelAnimation.bodyAnimatedStyle],
|
|
136
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
137
|
+
style: [styles.transcriptBodyInner, isExpanded ? styles.contentExpanded : styles.contentCollapsed],
|
|
138
|
+
onLayout: panelAnimation.onContentLayout,
|
|
139
|
+
children: [/*#__PURE__*/_jsx(ScrollableListScrollView, {
|
|
140
|
+
style: styles.transcriptScroll,
|
|
141
|
+
scrollbarWidth: VOICE_TRANSCRIPT_PANEL.SCROLLBAR_WIDTH,
|
|
142
|
+
scrollEnabled: isExpanded,
|
|
143
|
+
hideShadow: true,
|
|
144
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
145
|
+
onLayout: measurePreview,
|
|
146
|
+
children: /*#__PURE__*/_jsx(VoiceTranscriptContent, {
|
|
147
|
+
text: transcriptText,
|
|
148
|
+
isLoading: false,
|
|
149
|
+
numberOfLines: isExpanded ? undefined : PREVIEW_LINE_COUNT
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
}), !isExpanded && isTruncated && /*#__PURE__*/_jsx(PreviewLineFade, {})]
|
|
153
|
+
})
|
|
154
|
+
}), isTruncated && /*#__PURE__*/_jsx(AnimatedTouchableOpacity, {
|
|
155
|
+
style: [styles.expandButton, panelAnimation.caretAnimatedStyle],
|
|
156
|
+
onPress: () => model.dropdown.toggleExpand(),
|
|
157
|
+
children: /*#__PURE__*/_jsx(CaretDownIcon, {
|
|
158
|
+
size: CARET_SIZE
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
const styles = StyleSheet.create({
|
|
165
|
+
container: {
|
|
166
|
+
padding: SPACING[200],
|
|
167
|
+
borderRadius: BORDER_RADIUS[300],
|
|
168
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
169
|
+
overflow: 'hidden',
|
|
170
|
+
...SHADOWS['4']
|
|
171
|
+
},
|
|
172
|
+
recordingRow: {
|
|
173
|
+
flexDirection: 'row',
|
|
174
|
+
alignItems: 'center',
|
|
175
|
+
gap: SPACING[200]
|
|
176
|
+
},
|
|
177
|
+
recordingDot: {
|
|
178
|
+
width: RECORDING_DOT_SIZE,
|
|
179
|
+
height: RECORDING_DOT_SIZE,
|
|
180
|
+
borderRadius: RECORDING_DOT_SIZE / 2,
|
|
181
|
+
backgroundColor: COLORS.PRIMARY_RED
|
|
182
|
+
},
|
|
183
|
+
title: {
|
|
184
|
+
color: COLORS.NEUTRAL_10,
|
|
185
|
+
marginLeft: SPACING[100]
|
|
186
|
+
},
|
|
187
|
+
transcriptBody: {
|
|
188
|
+
overflow: 'hidden'
|
|
189
|
+
},
|
|
190
|
+
// Absolute so its measured height stays the content's natural height,
|
|
191
|
+
// independent of the animated wrapper height around it
|
|
192
|
+
transcriptBodyInner: {
|
|
193
|
+
position: 'absolute',
|
|
194
|
+
top: 0,
|
|
195
|
+
left: 0
|
|
196
|
+
},
|
|
197
|
+
// Fixed per-state widths: the text snaps to its final layout once while the
|
|
198
|
+
// panel frame animates around it
|
|
199
|
+
contentCollapsed: {
|
|
200
|
+
width: VOICE_TRANSCRIPT_PANEL.WIDTH - SPACING[200] * 2
|
|
201
|
+
},
|
|
202
|
+
fullTextMeasure: {
|
|
203
|
+
position: 'absolute',
|
|
204
|
+
opacity: 0
|
|
205
|
+
},
|
|
206
|
+
contentExpanded: {
|
|
207
|
+
width: VOICE_TRANSCRIPT_PANEL.WIDTH_DONE - SPACING[200] * 2
|
|
208
|
+
},
|
|
209
|
+
transcriptScroll: {
|
|
210
|
+
maxHeight: VOICE_TRANSCRIPT_PANEL.TRANSCRIPT_MAX_HEIGHT
|
|
211
|
+
},
|
|
212
|
+
previewFade: {
|
|
213
|
+
position: 'absolute',
|
|
214
|
+
right: SPACING[200],
|
|
215
|
+
bottom: SPACING[100],
|
|
216
|
+
width: PREVIEW_FADE_WIDTH,
|
|
217
|
+
height: PREVIEW_LINE_HEIGHT,
|
|
218
|
+
flexDirection: 'row'
|
|
219
|
+
},
|
|
220
|
+
previewFadeStripe: {
|
|
221
|
+
flex: 1,
|
|
222
|
+
backgroundColor: COLORS.NEUTRAL_1
|
|
223
|
+
},
|
|
224
|
+
expandButton: {
|
|
225
|
+
justifyContent: 'center',
|
|
226
|
+
alignItems: 'center'
|
|
227
|
+
},
|
|
228
|
+
processing: {
|
|
229
|
+
alignItems: 'center',
|
|
230
|
+
justifyContent: 'center',
|
|
231
|
+
gap: SPACING[200],
|
|
232
|
+
paddingVertical: SPACING[200]
|
|
233
|
+
},
|
|
234
|
+
processingText: {
|
|
235
|
+
color: COLORS.NEUTRAL_7
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
//# sourceMappingURL=VoiceTranscriptPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","StyleSheet","TouchableOpacity","View","BORDER_RADIUS","CaretDownIcon","COLORS","Loader","LoaderColor","LoaderSize","ScrollableListScrollView","SHADOWS","SPACING","Typography","useUnit","Animated","Easing","FadeIn","useAnimatedStyle","useSharedValue","withRepeat","withTiming","useText","VOICE_TRANSCRIPT_PANEL","VoiceTranscriptContent","useTranscriptPanelAnimation","useVoiceWaveform","VoiceWaveform","jsx","_jsx","jsxs","_jsxs","AnimatedTouchableOpacity","createAnimatedComponent","RECORDING_DOT_SIZE","BLINK_DURATION_MS","RECORDING_DOT_MIN_OPACITY","CARET_SIZE","PREVIEW_LINE_COUNT","PREVIEW_LINE_HEIGHT","PREVIEW_FADE_WIDTH","PREVIEW_FADE_STRIPES_COUNT","PREVIEW_HEIGHT_TOLERANCE","WAVEFORM_WIDTH","WIDTH","RecordingDot","opacity","value","duration","easing","inOut","ease","animatedStyle","style","styles","recordingDot","PreviewLineFade","previewFade","pointerEvents","children","Array","from","length","_","index","previewFadeStripe","VoiceTranscriptPanel","model","metering","t","flags","transcript","hasError","isExpanded","$flags","$transcript","$hasError","dropdown","$isExpanded","fullTextHeight","setFullTextHeight","previewHeight","setPreviewHeight","levels","isActive","isRecording","panelAnimation","isOpen","transcriptText","isTruncated","measureFullText","event","height","nativeEvent","layout","measurePreview","entering","container","containerAnimatedStyle","recordingRow","width","isProcessing","processing","size","SMALL","color","BLUE","variant","processingText","isDone","contentCollapsed","fullTextMeasure","onLayout","text","isLoading","title","transcriptBody","bodyAnimatedStyle","transcriptBodyInner","contentExpanded","onContentLayout","transcriptScroll","scrollbarWidth","SCROLLBAR_WIDTH","scrollEnabled","hideShadow","numberOfLines","undefined","expandButton","caretAnimatedStyle","onPress","toggleExpand","create","padding","borderRadius","backgroundColor","NEUTRAL_1","overflow","flexDirection","alignItems","gap","PRIMARY_RED","NEUTRAL_10","marginLeft","position","top","left","WIDTH_DONE","maxHeight","TRANSCRIPT_MAX_HEIGHT","right","bottom","flex","justifyContent","paddingVertical","NEUTRAL_7"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceTranscriptPanel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAGEC,UAAU,EACVC,gBAAgB,EAChBC,IAAI,QAEC,cAAc;AAErB,SACEC,aAAa,EACbC,aAAa,EACbC,MAAM,EACNC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,wBAAwB,EACxBC,OAAO,EACPC,OAAO,EACPC,UAAU,QACL,4BAA4B;AACnC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,QAAQ,IACbC,MAAM,EACNC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAEhC,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,sBAAsB,QAAQ,oBAAiB;AACxD,SAASC,sBAAsB,QAAQ,oDAAiD;AACxF,SAASC,2BAA2B,QAAQ,yCAAsC;AAClF,SAASC,gBAAgB,QAAQ,8BAA2B;AAE5D,SAASC,aAAa,QAAQ,oBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,wBAAwB,GAAGjB,QAAQ,CAACkB,uBAAuB,CAAC/B,gBAAgB,CAAC;AAEnF,MAAMgC,kBAAkB,GAAG,CAAC;AAC5B,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,yBAAyB,GAAG,GAAG;AACrC,MAAMC,UAAU,GAAG,EAAE;AAErB,MAAMC,kBAAkB,GAAG,CAAC;AAC5B;AACA,MAAMC,mBAAmB,GAAG,IAAI;AAChC,MAAMC,kBAAkB,GAAG,EAAE;AAC7B,MAAMC,0BAA0B,GAAG,EAAE;AACrC;AACA,MAAMC,wBAAwB,GAAG,CAAC;AAElC,MAAMC,cAAc,GAClBpB,sBAAsB,CAACqB,KAAK,GAAGhC,OAAO,CA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,CAAC,GAAG;EACvD,CAAC;EACDmG,eAAe,EAAE;IACfiC,QAAQ,EAAE,UAAU;IACpBlG,OAAO,EAAE;EACX,CAAC;EACDyE,eAAe,EAAE;IACfnB,KAAK,EAAE7E,sBAAsB,CAAC4H,UAAU,GAAGvI,OAAO,CAAC,GAAG,CAAC,GAAG;EAC5D,CAAC;EACD6G,gBAAgB,EAAE;IAChB2B,SAAS,EAAE7H,sBAAsB,CAAC8H;EACpC,CAAC;EACD5F,WAAW,EAAE;IACXuF,QAAQ,EAAE,UAAU;IACpBM,KAAK,EAAE1I,OAAO,CAAC,GAAG,CAAC;IACnB2I,MAAM,EAAE3I,OAAO,CAAC,GAAG,CAAC;IACpBwF,KAAK,EAAE5D,kBAAkB;IACzBoD,MAAM,EAAErD,mBAAmB;IAC3BmG,aAAa,EAAE;EACjB,CAAC;EACDzE,iBAAiB,EAAE;IACjBuF,IAAI,EAAE,CAAC;IACPjB,eAAe,EAAEjI,MAAM,CAACkI;EAC1B,CAAC;EACDR,YAAY,EAAE;IACZyB,cAAc,EAAE,QAAQ;IACxBd,UAAU,EAAE;EACd,CAAC;EACDrC,UAAU,EAAE;IACVqC,UAAU,EAAE,QAAQ;IACpBc,cAAc,EAAE,QAAQ;IACxBb,GAAG,EAAEhI,OAAO,CAAC,GAAG,CAAC;IACjB8I,eAAe,EAAE9I,OAAO,CAAC,GAAG;EAC9B,CAAC;EACDgG,cAAc,EAAE;IACdH,KAAK,EAAEnG,MAAM,CAACqJ;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
|
+
import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
|
+
import { VOICE_WAVEFORM } from "../../constants.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const BAR_STEP = VOICE_WAVEFORM.BAR_WIDTH + VOICE_WAVEFORM.BAR_GAP;
|
|
10
|
+
// One extra bar is rendered off-screen on the right and slides in as the row
|
|
11
|
+
// shifts — that is what makes the scroll continuous instead of stepping
|
|
12
|
+
const OFFSCREEN_BARS = 1;
|
|
13
|
+
const getVisibleBarsCount = width => {
|
|
14
|
+
const barsForWidth = Math.floor(width / BAR_STEP);
|
|
15
|
+
return Math.max(VOICE_WAVEFORM.MIN_BARS, barsForWidth);
|
|
16
|
+
};
|
|
17
|
+
const getBarHeight = level => Math.max(VOICE_WAVEFORM.MIN_BAR_HEIGHT, Math.round(level * (VOICE_WAVEFORM.HEIGHT - VOICE_WAVEFORM.AMPLITUDE_PADDING)));
|
|
18
|
+
|
|
19
|
+
// Older bars (toward the left) fade out, mirroring the dotted lead-in in the
|
|
20
|
+
// design. Opacity ramps from 0 up to full across the first FADE_RATIO of bars.
|
|
21
|
+
const getBarOpacity = (index, count) => {
|
|
22
|
+
const fadeBars = count * VOICE_WAVEFORM.FADE_RATIO;
|
|
23
|
+
return Math.min(1, index / fadeBars);
|
|
24
|
+
};
|
|
25
|
+
export const VoiceWaveform = ({
|
|
26
|
+
levels,
|
|
27
|
+
width
|
|
28
|
+
}) => {
|
|
29
|
+
const count = getVisibleBarsCount(width);
|
|
30
|
+
const visibleLevels = levels.slice(-(count + OFFSCREEN_BARS));
|
|
31
|
+
|
|
32
|
+
// Conveyor-belt motion: each new sample shifts the buffer one slot left and
|
|
33
|
+
// snaps the row back, then the row glides left by one step until the next
|
|
34
|
+
// sample lands — the two cancel out into continuous movement.
|
|
35
|
+
const shift = useSharedValue(0);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
shift.value = 0;
|
|
38
|
+
shift.value = withTiming(-BAR_STEP, {
|
|
39
|
+
duration: VOICE_WAVEFORM.SAMPLE_INTERVAL_MS,
|
|
40
|
+
easing: Easing.linear
|
|
41
|
+
});
|
|
42
|
+
}, [levels, shift]);
|
|
43
|
+
|
|
44
|
+
// Explicit deps: consumers compile this library without the Reanimated Babel plugin
|
|
45
|
+
const rowAnimatedStyle = useAnimatedStyle(() => ({
|
|
46
|
+
transform: [{
|
|
47
|
+
translateX: shift.value
|
|
48
|
+
}]
|
|
49
|
+
}), [shift]);
|
|
50
|
+
return /*#__PURE__*/_jsx(View, {
|
|
51
|
+
style: [styles.container, {
|
|
52
|
+
width
|
|
53
|
+
}],
|
|
54
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
55
|
+
style: [styles.row, rowAnimatedStyle],
|
|
56
|
+
children: visibleLevels.map((level, index) => /*#__PURE__*/_jsx(View, {
|
|
57
|
+
style: [styles.bar, {
|
|
58
|
+
height: getBarHeight(level),
|
|
59
|
+
opacity: getBarOpacity(index, visibleLevels.length)
|
|
60
|
+
}]
|
|
61
|
+
}, index))
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
container: {
|
|
67
|
+
height: VOICE_WAVEFORM.HEIGHT,
|
|
68
|
+
overflow: 'hidden'
|
|
69
|
+
},
|
|
70
|
+
// Hangs one step past the right edge so the newest bar starts hidden
|
|
71
|
+
row: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
top: 0,
|
|
74
|
+
bottom: 0,
|
|
75
|
+
right: -BAR_STEP,
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
gap: VOICE_WAVEFORM.BAR_GAP
|
|
79
|
+
},
|
|
80
|
+
bar: {
|
|
81
|
+
width: VOICE_WAVEFORM.BAR_WIDTH,
|
|
82
|
+
borderRadius: VOICE_WAVEFORM.BAR_WIDTH / 2,
|
|
83
|
+
backgroundColor: COLORS.NEUTRAL_7
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=VoiceWaveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","StyleSheet","View","COLORS","Animated","Easing","useAnimatedStyle","useSharedValue","withTiming","VOICE_WAVEFORM","jsx","_jsx","BAR_STEP","BAR_WIDTH","BAR_GAP","OFFSCREEN_BARS","getVisibleBarsCount","width","barsForWidth","Math","floor","max","MIN_BARS","getBarHeight","level","MIN_BAR_HEIGHT","round","HEIGHT","AMPLITUDE_PADDING","getBarOpacity","index","count","fadeBars","FADE_RATIO","min","VoiceWaveform","levels","visibleLevels","slice","shift","value","duration","SAMPLE_INTERVAL_MS","easing","linear","rowAnimatedStyle","transform","translateX","style","styles","container","children","row","map","bar","height","opacity","length","create","overflow","position","top","bottom","right","flexDirection","alignItems","gap","borderRadius","backgroundColor","NEUTRAL_7"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceWaveform.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,MAAM,QAAQ,4BAA4B;AACnD,OAAOC,QAAQ,IACbC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAEhC,SAASC,cAAc,QAAQ,oBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOhD,MAAMC,QAAQ,GAAGH,cAAc,CAACI,SAAS,GAAGJ,cAAc,CAACK,OAAO;AAClE;AACA;AACA,MAAMC,cAAc,GAAG,CAAC;AAExB,MAAMC,mBAAmB,GAAIC,KAAa,IAAK;EAC7C,MAAMC,YAAY,GAAGC,IAAI,CAACC,KAAK,CAACH,KAAK,GAAGL,QAAQ,CAAC;EACjD,OAAOO,IAAI,CAACE,GAAG,CAACZ,cAAc,CAACa,QAAQ,EAAEJ,YAAY,CAAC;AACxD,CAAC;AAED,MAAMK,YAAY,GAAIC,KAAa,IACjCL,IAAI,CAACE,GAAG,CACNZ,cAAc,CAACgB,cAAc,EAC7BN,I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AI;MAAC8C,KAAK,EAAE,CAACC,MAAM,CAACG,GAAG,EAAEP,gBAAgB,CAAE;MAAAM,QAAA,EAClDd,aAAa,CAACgB,GAAG,CAAC,CAAC7B,KAAK,EAAEM,KAAK,kBAC9BnB,IAAA,CAACT,IAAI;QAEH8C,KAAK,EAAE,CACLC,MAAM,CAACK,GAAG,EACV;UAAEC,MAAM,EAAEhC,YAAY,CAACC,KAAK,CAAC;UAAEgC,OAAO,EAAE3B,aAAa,CAACC,KAAK,EAAEO,aAAa,CAACoB,MAAM;QAAE,CAAC;MACpF,GAJG3B,KAKN,CACF;IAAC,CACW;EAAC,CACZ,CAAC;AAEX,CAAC;AAED,MAAMmB,MAAM,GAAGhD,UAAU,CAACyD,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTK,MAAM,EAAE9C,cAAc,CAACkB,MAAM;IAC7BgC,QAAQ,EAAE;EACZ,CAAC;EACD;EACAP,GAAG,EAAE;IACHQ,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAACnD,QAAQ;IAChBoD,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEzD,cAAc,CAACK;EACtB,CAAC;EACDwC,GAAG,EAAE;IACHrC,KAAK,EAAER,cAAc,CAACI,SAAS;IAC/BsD,YAAY,EAAE1D,cAAc,CAACI,SAAS,GAAG,CAAC;IAC1CuD,eAAe,EAAEjE,MAAM,CAACkE;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
4
|
+
import { VOICE_TRANSCRIPT_PANEL } from "../../constants.js";
|
|
5
|
+
const TIMING = {
|
|
6
|
+
duration: 170
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// Width and height are animated as explicit numbers instead of reanimated
|
|
10
|
+
// layout transitions: on web those run as FLIP animations that scale the
|
|
11
|
+
// subtree, visibly stretching the text while the panel resizes.
|
|
12
|
+
export const useTranscriptPanelAnimation = isExpanded => {
|
|
13
|
+
const contentHeight = useSharedValue(0);
|
|
14
|
+
const onContentLayout = event => {
|
|
15
|
+
const height = event.nativeEvent.layout.height;
|
|
16
|
+
if (height <= 0) return;
|
|
17
|
+
contentHeight.value = contentHeight.value === 0 ? height : withTiming(height, TIMING);
|
|
18
|
+
};
|
|
19
|
+
const containerAnimatedStyle = useAnimatedStyle(() => ({
|
|
20
|
+
width: withTiming(isExpanded ? VOICE_TRANSCRIPT_PANEL.WIDTH_DONE : VOICE_TRANSCRIPT_PANEL.WIDTH, TIMING)
|
|
21
|
+
}), [isExpanded]);
|
|
22
|
+
const bodyAnimatedStyle = useAnimatedStyle(() => contentHeight.value === 0 ? {} : {
|
|
23
|
+
height: contentHeight.value
|
|
24
|
+
}, [contentHeight]);
|
|
25
|
+
const caretAnimatedStyle = useAnimatedStyle(() => ({
|
|
26
|
+
transform: [{
|
|
27
|
+
rotate: withTiming(isExpanded ? '180deg' : '0deg', TIMING)
|
|
28
|
+
}]
|
|
29
|
+
}), [isExpanded]);
|
|
30
|
+
return {
|
|
31
|
+
onContentLayout,
|
|
32
|
+
containerAnimatedStyle,
|
|
33
|
+
bodyAnimatedStyle,
|
|
34
|
+
caretAnimatedStyle
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=useTranscriptPanelAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedStyle","useSharedValue","withTiming","VOICE_TRANSCRIPT_PANEL","TIMING","duration","useTranscriptPanelAnimation","isExpanded","contentHeight","onContentLayout","event","height","nativeEvent","layout","value","containerAnimatedStyle","width","WIDTH_DONE","WIDTH","bodyAnimatedStyle","caretAnimatedStyle","transform","rotate"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/h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iB;IAAEC;EAAmB,CAAC;AAC3F,CAAC","ignoreList":[]}
|
|
@@ -4,10 +4,27 @@ import { RecordingPresets, useAudioRecorder, useAudioRecorderState } from 'expo-
|
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { IS_WEB } from '@magmamath/react-native-ui';
|
|
6
6
|
import { VOICE_RECORDER_MAX_DURATION_MS, VoiceRecorderState } from "../../constants.js";
|
|
7
|
-
import { addAudioInputsListenerWeb, getAvailableInputs } from "../../helpers.js";
|
|
7
|
+
import { addAudioInputsListenerWeb, createWebMeteringMonitor, getAvailableInputs } from "../../helpers.js";
|
|
8
|
+
import { METERING_UPDATE_INTERVAL_MS } from "../../constants.js";
|
|
9
|
+
|
|
10
|
+
// Metering powers the live recording waveform (recorderState.metering).
|
|
11
|
+
// Only native respects it — on web the level is measured by
|
|
12
|
+
// createWebMeteringMonitor instead.
|
|
13
|
+
const RECORDING_OPTIONS = {
|
|
14
|
+
...RecordingPresets.LOW_QUALITY,
|
|
15
|
+
isMeteringEnabled: true
|
|
16
|
+
};
|
|
8
17
|
export const useVoiceRecorder = model => {
|
|
9
|
-
const recorder = useAudioRecorder(
|
|
10
|
-
const recorderState = useAudioRecorderState(recorder);
|
|
18
|
+
const recorder = useAudioRecorder(RECORDING_OPTIONS, model.recordingStatusUpdate);
|
|
19
|
+
const recorderState = useAudioRecorderState(recorder, METERING_UPDATE_INTERVAL_MS);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (IS_WEB) return;
|
|
22
|
+
model.recorderModel.setMetering(recorderState.metering ?? null);
|
|
23
|
+
}, [recorderState.metering, model.recorderModel]);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!IS_WEB || !recorderState.isRecording) return;
|
|
26
|
+
return createWebMeteringMonitor(recorder, model.recorderModel.setMetering);
|
|
27
|
+
}, [recorderState.isRecording, recorder, model.recorderModel]);
|
|
11
28
|
useEffect(() => {
|
|
12
29
|
if (recorderState.durationMillis >= VOICE_RECORDER_MAX_DURATION_MS && recorderState.isRecording) {
|
|
13
30
|
model.recorderModel.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RecordingPresets","useAudioRecorder","useAudioRecorderState","useEffect","IS_WEB","VOICE_RECORDER_MAX_DURATION_MS","VoiceRecorderState","addAudioInputsListenerWeb","getAvailableInputs","useVoiceRecorder","model","recorder","
|
|
1
|
+
{"version":3,"names":["RecordingPresets","useAudioRecorder","useAudioRecorderState","useEffect","IS_WEB","VOICE_RECORDER_MAX_DURATION_MS","VoiceRecorderState","addAudioInputsListenerWeb","createWebMeteringMonitor","getAvailableInputs","METERING_UPDATE_INTERVAL_MS","RECORDING_OPTIONS","LOW_QUALITY","isMeteringEnabled","useVoiceRecorder","model","recorder","recordingStatusUpdate","recorderState","recorderModel","setMetering","metering","isRecording","durationMillis","stop","setLastKnownDurationMs","then","inputs","setAvailableInputs","removeListener","devices","setVoiceRecordState","RECORDING","PAUSED","IDLE","reset"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorder.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,gBAAgB,EAAEC,qBAAqB,QAAQ,YAAY;AAEtF,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,8BAA8B,EAAEC,kBAAkB,QAAQ,oBAAiB;AACpF,SACEC,yBAAyB,EACzBC,wBAAwB,EACxBC,kBAAkB,QACb,kBAAe;AACtB,SAASC,2BAA2B,QAAQ,oBAAiB;;AAE7D;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG;EACxB,GAAGX,gBAAgB,CAACY,WAAW;EAC/BC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAIC,KAAuB,IAAK;EAC3D,MAAMC,QAAQ,GAAGf,gBAAgB,CAACU,iBAAiB,EAAEI,KAAK,CAACE,qBAAqB,CAAC;EACjF,MAAMC,aAAa,GAAGhB,qBAAqB,CA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Ac;EACvB,CAAC,EAAE,CAACb,QAAQ,EAAED,KAAK,CAACI,aAAa,CAAC,CAAC;EAEnChB,SAAS,CAAC,MAAM;IACd,IAAIe,aAAa,CAACI,WAAW,EAAE;MAC7BP,KAAK,CAACI,aAAa,CAACY,mBAAmB,CAACzB,kBAAkB,CAAC0B,SAAS,CAAC;MACrE;IACF;IACA,IAAId,aAAa,CAACK,cAAc,GAAG,CAAC,EAAE;MACpCR,KAAK,CAACI,aAAa,CAACY,mBAAmB,CAACzB,kBAAkB,CAAC2B,MAAM,CAAC;MAClE;IACF;IACAlB,KAAK,CAACI,aAAa,CAACY,mBAAmB,CAACzB,kBAAkB,CAAC4B,IAAI,CAAC;IAEhE,OAAO,MAAM;MACXnB,KAAK,CAACI,aAAa,CAACgB,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACjB,aAAa,EAAEH,KAAK,CAACI,aAAa,CAAC,CAAC;EAExChB,SAAS,CAAC,MAAM;IACdY,KAAK,CAACI,aAAa,CAACH,QAAQ,GAAGA,QAAQ;EACzC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEE;EAAc,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { VOICE_WAVEFORM } from "../../constants.js";
|
|
5
|
+
import { normalizeMetering } from "../../helpers.js";
|
|
6
|
+
const createSilentBuffer = () => new Array(VOICE_WAVEFORM.BUFFER_SIZE).fill(VOICE_WAVEFORM.MIN_LEVEL);
|
|
7
|
+
|
|
8
|
+
// Keeps a rolling buffer of normalized levels that scrolls right-to-left while
|
|
9
|
+
// recording. We sample on a fixed interval (rather than on every metering
|
|
10
|
+
// update) so the scroll speed stays constant regardless of the recorder's
|
|
11
|
+
// status cadence. The latest metering value is read from a ref to avoid
|
|
12
|
+
// resubscribing the interval on each change. Levels are low-pass filtered so
|
|
13
|
+
// neighboring bars flow into each other instead of jumping.
|
|
14
|
+
export const useVoiceWaveform = ({
|
|
15
|
+
metering,
|
|
16
|
+
isActive
|
|
17
|
+
}) => {
|
|
18
|
+
const meteringRef = useRef(metering);
|
|
19
|
+
meteringRef.current = metering;
|
|
20
|
+
const smoothedLevelRef = useRef(VOICE_WAVEFORM.MIN_LEVEL);
|
|
21
|
+
const [levels, setLevels] = useState(createSilentBuffer);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!isActive) {
|
|
24
|
+
smoothedLevelRef.current = VOICE_WAVEFORM.MIN_LEVEL;
|
|
25
|
+
setLevels(createSilentBuffer());
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const intervalId = setInterval(() => {
|
|
29
|
+
const target = normalizeMetering(meteringRef.current);
|
|
30
|
+
smoothedLevelRef.current += (target - smoothedLevelRef.current) * VOICE_WAVEFORM.LEVEL_SMOOTHING;
|
|
31
|
+
const level = Math.max(VOICE_WAVEFORM.MIN_LEVEL, smoothedLevelRef.current);
|
|
32
|
+
setLevels(prev => [...prev.slice(1), level]);
|
|
33
|
+
}, VOICE_WAVEFORM.SAMPLE_INTERVAL_MS);
|
|
34
|
+
return () => clearInterval(intervalId);
|
|
35
|
+
}, [isActive]);
|
|
36
|
+
return levels;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=useVoiceWaveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useState","VOICE_WAVEFORM","normalizeMetering","createSilentBuffer","Array","BUFFER_SIZE","fill","MIN_LEVEL","useVoiceWaveform","metering","isActive","meteringRef","current","smoothedLevelRef","levels","setLevels","intervalId","setInterval","target","LEVEL_SMOOTHING","level","Math","max","prev","slice","SAMPLE_INTERVAL_MS","clearInterval"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceWaveform.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAA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AAMC,aAAa,CAACV,UAAU,CAAC;EACxC,CAAC,EAAE,CAACN,QAAQ,CAAC,CAAC;EAEd,OAAOI,MAAM;AACf,CAAC","ignoreList":[]}
|
|
@@ -13,9 +13,12 @@ export class RecorderModel {
|
|
|
13
13
|
setVoiceRecordState = createEvent();
|
|
14
14
|
setAvailableInputs = createEvent();
|
|
15
15
|
setLastKnownDurationMs = createEvent();
|
|
16
|
+
setMetering = createEvent();
|
|
16
17
|
$voiceRecordState = restore(this.setVoiceRecordState, VoiceRecorderState.IDLE).reset(this.reset);
|
|
17
18
|
$availableInputs = restore(this.setAvailableInputs, []);
|
|
18
19
|
$lastKnownDurationMs = restore(this.setLastKnownDurationMs, 0).reset(this.reset);
|
|
20
|
+
// Live input level in dBFS while recording (powers the waveform)
|
|
21
|
+
$metering = restore(this.setMetering, null).reset(this.reset);
|
|
19
22
|
start = createEffect(async () => {
|
|
20
23
|
try {
|
|
21
24
|
await setAudioModeAsync(AUDIO_MODE_CONFIG);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEffect","createEvent","restore","setAudioModeAsync","VoiceRecorderState","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","$voiceRecordState","IDLE","$availableInputs","$lastKnownDurationMs","start","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAC7D,SAAwBC,iBAAiB,QAAQ,YAAY;AAC7D,SAASC,kBAAkB,QAAQ,oBAAiB;AAGpD,MAAMC,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIV,OAAO,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAGT,WAAW,CAAC,CAAC;EACrBU,mBAAmB,GAAGV,WAAW,CAAqB,CAAC;EACvDW,kBAAkB,GAAGX,WAAW,CAAuB,CAAC;EACxDY,sBAAsB,GAAGZ,WAAW,CAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["createEffect","createEvent","restore","setAudioModeAsync","VoiceRecorderState","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","setMetering","$voiceRecordState","IDLE","$availableInputs","$lastKnownDurationMs","$metering","start","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAC7D,SAAwBC,iBAAiB,QAAQ,YAAY;AAC7D,SAASC,kBAAkB,QAAQ,oBAAiB;AAGpD,MAAMC,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIV,OAAO,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAGT,WAAW,CAAC,CAAC;EACrBU,mBAAmB,GAAGV,WAAW,CAAqB,CAAC;EACvDW,kBAAkB,GAAGX,WAAW,CAAuB,CAAC;EACxDY,sBAAsB,GAAGZ,WAAW,CAAS,CAAC;EAC9Ca,WAAW,GAAGb,WAAW,CAAgB,CAAC;EAE1Cc,iBAAiB,GAAGb,OAAO,CACzC,IAAI,CAACS,mBAAmB,EACxBP,kBAAkB,CAACY,IACrB,CAAC,CAACN,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACHO,gBAAgB,GAAGf,OAAO,CAAC,IAAI,CAACU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B,IAAI,CAACzB,YAAY,GAAG,IAAI;IAC1B;EACF;EAEO0B,iBAAiBA,CAAA,EAAS;IAC/B,IAAI,CAAC1B,YAAY,GAAG,IAAI;EAC1B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createEffect, sample } from 'effector';
|
|
4
|
+
import { NO_AUDIO_BE_MESSAGE, VoiceRecorderState } from "../../constants.js";
|
|
5
|
+
import { fetchTranscriptWithRetry } from "../../transcript.helpers.js";
|
|
6
|
+
import { VoiceTranscriptPanelModel } from "./VoiceTranscriptPanel.model.js";
|
|
7
|
+
// Wires the existing recording flow to the transcript panel:
|
|
8
|
+
// recording starts → panel opens with the waveform; the recording is confirmed
|
|
9
|
+
// (upload kicks off) → panel shows the loader; the uploaded file's transcript
|
|
10
|
+
// arrives → panel shows the text. Deleting/discarding the record closes the panel.
|
|
11
|
+
export class VoiceRecordWithTranscriptModel {
|
|
12
|
+
panel = new VoiceTranscriptPanelModel();
|
|
13
|
+
constructor({
|
|
14
|
+
recordModel,
|
|
15
|
+
getTranscript
|
|
16
|
+
}) {
|
|
17
|
+
this.record = recordModel;
|
|
18
|
+
this.resolveTranscriptFx = createEffect(async record => {
|
|
19
|
+
const upload = await record.audioUploadPromise;
|
|
20
|
+
if (!upload || !upload.id) throw new Error('Audio upload did not return a file id');
|
|
21
|
+
const {
|
|
22
|
+
text
|
|
23
|
+
} = await fetchTranscriptWithRetry(getTranscript, upload.id);
|
|
24
|
+
if (text === NO_AUDIO_BE_MESSAGE) throw new Error('Transcript is not available');
|
|
25
|
+
return text;
|
|
26
|
+
});
|
|
27
|
+
this.setupPanelLifecycle();
|
|
28
|
+
this.setupTranscriptPipeline();
|
|
29
|
+
}
|
|
30
|
+
setupPanelLifecycle() {
|
|
31
|
+
sample({
|
|
32
|
+
clock: this.record.recorderModel.$voiceRecordState,
|
|
33
|
+
filter: state => state === VoiceRecorderState.RECORDING,
|
|
34
|
+
target: this.panel.open
|
|
35
|
+
});
|
|
36
|
+
// startAudioUpload fires exactly when a recording was confirmed (the
|
|
37
|
+
// discard path never uploads), so it doubles as the panel's confirm clock.
|
|
38
|
+
sample({
|
|
39
|
+
clock: this.record.startAudioUpload,
|
|
40
|
+
target: this.panel.confirm
|
|
41
|
+
});
|
|
42
|
+
sample({
|
|
43
|
+
clock: [this.record.reset, this.record.stop.done],
|
|
44
|
+
target: this.panel.discard
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
setupTranscriptPipeline() {
|
|
48
|
+
// Identity guard: a fetch result only applies if the record it was fetched
|
|
49
|
+
// for is still the current one — late results from a discarded or
|
|
50
|
+
// re-recorded take are dropped.
|
|
51
|
+
const isFetchedRecordCurrent = (currentRecord, {
|
|
52
|
+
params
|
|
53
|
+
}) => currentRecord === params;
|
|
54
|
+
sample({
|
|
55
|
+
clock: this.record.$currentRecord.updates,
|
|
56
|
+
source: this.panel.$flags,
|
|
57
|
+
filter: (flags, record) => flags.isProcessing && Boolean(record?.audioUploadPromise),
|
|
58
|
+
fn: (_, record) => record,
|
|
59
|
+
target: this.resolveTranscriptFx
|
|
60
|
+
});
|
|
61
|
+
sample({
|
|
62
|
+
clock: this.resolveTranscriptFx.done,
|
|
63
|
+
source: this.record.$currentRecord,
|
|
64
|
+
filter: isFetchedRecordCurrent,
|
|
65
|
+
fn: (_, {
|
|
66
|
+
result
|
|
67
|
+
}) => result,
|
|
68
|
+
target: this.panel.complete
|
|
69
|
+
});
|
|
70
|
+
sample({
|
|
71
|
+
clock: this.resolveTranscriptFx.fail,
|
|
72
|
+
source: this.record.$currentRecord,
|
|
73
|
+
filter: isFetchedRecordCurrent,
|
|
74
|
+
target: this.panel.fail
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=VoiceRecordWithTranscript.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createEffect","sample","NO_AUDIO_BE_MESSAGE","VoiceRecorderState","fetchTranscriptWithRetry","VoiceTranscriptPanelModel","VoiceRecordWithTranscriptModel","panel","constructor","recordModel","getTranscript","record","resolveTranscriptFx","upload","audioUploadPromise","id","Error","text","setupPanelLifecycle","setupTranscriptPipeline","clock","recorderModel","$voiceRecordState","filter","state","RECORDING","target","open","startAudioUpload","confirm","reset","stop","done","discard","isFetchedRecordCurrent","currentRecord","params","$currentRecord","updates","source","$flags","flags","isProcessing","Boolean","fn","_","result","complete","fail"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/VoiceRecordWithTranscript.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAUC,MAAM,QAAQ,UAAU;AAEvD,SAASC,mBAAmB,EAAEC,kBAAkB,QAAQ,oBAAiB;AACzE,SAASC,wBAAwB,QAAgC,6BAA0B;AAC3F,SAASC,yBAAyB,QAAQ,iCAA8B;AASxE;AACA;AACA;AACA;AACA,OAAO,MAAMC,8BAA8B,CAAC;EAE1BC,KAAK,GAAG,IAAIF,yBAAyB,CAAC,CAAC;EAIvDG,WAAWA,CAAC;IAAEC,WAAW;IAAEC;EAAmD,CAAC,EAAE;IAC/E,IAAI,CAACC,MAAM,GAAGF,WAAW;IACzB,IAAI,CAACG,mBAAmB,GAAGZ,YAAY,CAAC,MAAOW,MAAiC,IAAK;MACnF,MAAME,MAAM,GAAG,MAAMF,MAAM,CAACG,kBAAkB;MAC9C,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,EAAE,EAAE,MAAM,IAAIC,KAAK,CAAC,uCAAuC,CAAC;MAEnF,MAAM;QAAEC;MAAK,CAAC,GAAG,MAAMb,wBAAwB,CAACM,aAAa,EAAEG,MAAM,CAACE,EAAE,CAAC;MACzE,IAAIE,IAAI,KAAKf,mBAAmB,EAAE,MAAM,IAAIc,KAAK,CAAC,6BAA6B,CAAC;MAChF,OAAOC,IAAI;IACb,CAAC,CAAC;IAEF,IAAI,CAACC,mBAAmB,CAAC,CAAC;IAC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