@magmamath/students-features 1.7.9 → 1.7.10-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/voice/constants.js +42 -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 +22 -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 +253 -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 +100 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceTranscriptPanel.model.js +115 -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 +41 -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 +20 -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 +246 -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 +95 -0
- package/dist/module/features/voice/recording/model/VoiceRecordWithTranscript.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceTranscriptPanel.model.js +110 -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 +34 -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 +3 -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 +31 -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 +34 -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 +3 -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 +31 -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 +228 -0
- package/src/features/voice/__tests__/VoiceTranscriptPanel.model.test.ts +237 -0
- package/src/features/voice/constants.ts +43 -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 +27 -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 +293 -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 +104 -0
- package/src/features/voice/recording/model/VoiceTranscriptPanel.model.ts +131 -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,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptPanel = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _effectorReact = require("effector-react");
|
|
11
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
12
|
+
var _i18n = require("../../../../i18n/i18n.js");
|
|
13
|
+
var _constants = require("../../constants.js");
|
|
14
|
+
var _VoiceTranscriptContent = require("../../playing/components/VoiceTranscriptContent.js");
|
|
15
|
+
var _useTranscriptPanelAnimation = require("../hooks/useTranscriptPanelAnimation.js");
|
|
16
|
+
var _useVoiceWaveform = require("../hooks/useVoiceWaveform.js");
|
|
17
|
+
var _VoiceWaveform = require("./VoiceWaveform.js");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
const AnimatedTouchableOpacity = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TouchableOpacity);
|
|
22
|
+
const RECORDING_DOT_SIZE = 8;
|
|
23
|
+
const BLINK_DURATION_MS = 700;
|
|
24
|
+
const RECORDING_DOT_MIN_OPACITY = 0.2;
|
|
25
|
+
const CARET_SIZE = 22;
|
|
26
|
+
const DIMMED_OPACITY = _constants.VOICE_TRANSCRIPT_PANEL.DIMMED_OPACITY;
|
|
27
|
+
const PREVIEW_LINE_COUNT = 3;
|
|
28
|
+
// Cosmetic only (fade overlay height) — roughly the Typography h8 line height
|
|
29
|
+
const PREVIEW_LINE_HEIGHT = 19.6;
|
|
30
|
+
const PREVIEW_FADE_WIDTH = 72;
|
|
31
|
+
const PREVIEW_FADE_STRIPES_COUNT = 12;
|
|
32
|
+
// Rounding slack when comparing the two measured text heights
|
|
33
|
+
const PREVIEW_HEIGHT_TOLERANCE = 2;
|
|
34
|
+
const WAVEFORM_WIDTH = _constants.VOICE_TRANSCRIPT_PANEL.WIDTH - _reactNativeUi.SPACING[200] * 2 - RECORDING_DOT_SIZE - _reactNativeUi.SPACING[200];
|
|
35
|
+
const RecordingDot = () => {
|
|
36
|
+
const opacity = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
37
|
+
(0, _react.useEffect)(() => {
|
|
38
|
+
opacity.value = (0, _reactNativeReanimated.withRepeat)((0, _reactNativeReanimated.withTiming)(RECORDING_DOT_MIN_OPACITY, {
|
|
39
|
+
duration: BLINK_DURATION_MS,
|
|
40
|
+
easing: _reactNativeReanimated.Easing.inOut(_reactNativeReanimated.Easing.ease)
|
|
41
|
+
}), -1, true);
|
|
42
|
+
}, [opacity]);
|
|
43
|
+
|
|
44
|
+
// Explicit deps: consumers compile this library without the Reanimated Babel plugin
|
|
45
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
46
|
+
opacity: opacity.value
|
|
47
|
+
}), [opacity]);
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
49
|
+
style: [styles.recordingDot, animatedStyle]
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Stripes of the panel background with rising opacity imitate the text
|
|
54
|
+
// dissolving at the end of the last preview line (no gradient dependency)
|
|
55
|
+
const PreviewLineFade = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
56
|
+
style: styles.previewFade,
|
|
57
|
+
pointerEvents: "none",
|
|
58
|
+
children: Array.from({
|
|
59
|
+
length: PREVIEW_FADE_STRIPES_COUNT
|
|
60
|
+
}, (_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
61
|
+
style: [styles.previewFadeStripe, {
|
|
62
|
+
opacity: (index + 1) / PREVIEW_FADE_STRIPES_COUNT
|
|
63
|
+
}]
|
|
64
|
+
}, index))
|
|
65
|
+
});
|
|
66
|
+
const VoiceTranscriptPanel = ({
|
|
67
|
+
model,
|
|
68
|
+
metering,
|
|
69
|
+
style
|
|
70
|
+
}) => {
|
|
71
|
+
const t = (0, _i18n.useText)();
|
|
72
|
+
const {
|
|
73
|
+
flags,
|
|
74
|
+
transcript,
|
|
75
|
+
hasError,
|
|
76
|
+
isExpanded,
|
|
77
|
+
isDimmed
|
|
78
|
+
} = (0, _effectorReact.useUnit)({
|
|
79
|
+
flags: model.$flags,
|
|
80
|
+
transcript: model.$transcript,
|
|
81
|
+
hasError: model.$hasError,
|
|
82
|
+
isExpanded: model.dropdown.$isExpanded,
|
|
83
|
+
isDimmed: model.$isDimmed
|
|
84
|
+
});
|
|
85
|
+
const [fullTextHeight, setFullTextHeight] = (0, _react.useState)(0);
|
|
86
|
+
const [previewHeight, setPreviewHeight] = (0, _react.useState)(0);
|
|
87
|
+
const levels = (0, _useVoiceWaveform.useVoiceWaveform)({
|
|
88
|
+
metering,
|
|
89
|
+
isActive: flags.isRecording
|
|
90
|
+
});
|
|
91
|
+
const panelAnimation = (0, _useTranscriptPanelAnimation.useTranscriptPanelAnimation)(isExpanded);
|
|
92
|
+
if (!flags.isOpen) return null;
|
|
93
|
+
const transcriptText = hasError ? t('voice.transcriptNotAvailable') : transcript;
|
|
94
|
+
|
|
95
|
+
// Both heights are measured, so the comparison stays correct regardless of
|
|
96
|
+
// the text's font metrics or paddings
|
|
97
|
+
const isTruncated = fullTextHeight > 0 && previewHeight > 0 && fullTextHeight > previewHeight + PREVIEW_HEIGHT_TOLERANCE;
|
|
98
|
+
const measureFullText = event => {
|
|
99
|
+
const {
|
|
100
|
+
height
|
|
101
|
+
} = event.nativeEvent.layout;
|
|
102
|
+
if (height > 0) setFullTextHeight(height);
|
|
103
|
+
};
|
|
104
|
+
const measurePreview = event => {
|
|
105
|
+
const {
|
|
106
|
+
height
|
|
107
|
+
} = event.nativeEvent.layout;
|
|
108
|
+
// Expanded shows the full text — only the collapsed (3-line) layout counts
|
|
109
|
+
if (height > 0 && !isExpanded) setPreviewHeight(height);
|
|
110
|
+
};
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
112
|
+
entering: _reactNativeReanimated.FadeIn,
|
|
113
|
+
exiting: _reactNativeReanimated.FadeOut,
|
|
114
|
+
style: [styles.container, panelAnimation.containerAnimatedStyle, style],
|
|
115
|
+
children: [flags.isRecording && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
116
|
+
style: styles.recordingRow,
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RecordingDot, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceWaveform.VoiceWaveform, {
|
|
118
|
+
levels: levels,
|
|
119
|
+
width: WAVEFORM_WIDTH
|
|
120
|
+
})]
|
|
121
|
+
}), flags.isProcessing && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
122
|
+
style: styles.processing,
|
|
123
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Loader, {
|
|
124
|
+
size: _reactNativeUi.LoaderSize.SMALL,
|
|
125
|
+
color: _reactNativeUi.LoaderColor.BLUE
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
127
|
+
variant: "h8",
|
|
128
|
+
style: styles.processingText,
|
|
129
|
+
children: `${t('voice.preparingTranscript')}...`
|
|
130
|
+
})]
|
|
131
|
+
}), flags.isDone && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
132
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
133
|
+
style: [styles.contentCollapsed, styles.fullTextMeasure],
|
|
134
|
+
pointerEvents: "none",
|
|
135
|
+
onLayout: measureFullText,
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
|
|
137
|
+
text: transcriptText,
|
|
138
|
+
isLoading: false
|
|
139
|
+
})
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
141
|
+
variant: "h5",
|
|
142
|
+
style: [styles.title, isDimmed && styles.dimmed],
|
|
143
|
+
children: t('voice.transcriptions')
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
145
|
+
style: [styles.transcriptBody, panelAnimation.bodyAnimatedStyle],
|
|
146
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
147
|
+
style: [styles.transcriptBodyInner, isExpanded ? styles.contentExpanded : styles.contentCollapsed],
|
|
148
|
+
onLayout: panelAnimation.onContentLayout,
|
|
149
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableListScrollView, {
|
|
150
|
+
style: styles.transcriptScroll,
|
|
151
|
+
scrollbarWidth: _constants.VOICE_TRANSCRIPT_PANEL.SCROLLBAR_WIDTH,
|
|
152
|
+
scrollEnabled: isExpanded,
|
|
153
|
+
hideShadow: true,
|
|
154
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
155
|
+
onLayout: measurePreview,
|
|
156
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
|
|
157
|
+
text: transcriptText,
|
|
158
|
+
isLoading: false,
|
|
159
|
+
numberOfLines: isExpanded ? undefined : PREVIEW_LINE_COUNT,
|
|
160
|
+
dimmed: isDimmed
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
}), !isExpanded && isTruncated && /*#__PURE__*/(0, _jsxRuntime.jsx)(PreviewLineFade, {})]
|
|
164
|
+
})
|
|
165
|
+
}), isTruncated && /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTouchableOpacity, {
|
|
166
|
+
style: [styles.expandButton, panelAnimation.caretAnimatedStyle],
|
|
167
|
+
onPress: () => model.dropdown.toggleExpand(),
|
|
168
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CaretDownIcon, {
|
|
169
|
+
size: CARET_SIZE
|
|
170
|
+
})
|
|
171
|
+
})]
|
|
172
|
+
})]
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
exports.VoiceTranscriptPanel = VoiceTranscriptPanel;
|
|
176
|
+
const styles = _reactNative.StyleSheet.create({
|
|
177
|
+
container: {
|
|
178
|
+
padding: _reactNativeUi.SPACING[200],
|
|
179
|
+
borderRadius: _reactNativeUi.BORDER_RADIUS[300],
|
|
180
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
181
|
+
overflow: 'hidden',
|
|
182
|
+
..._reactNativeUi.SHADOWS['4']
|
|
183
|
+
},
|
|
184
|
+
recordingRow: {
|
|
185
|
+
flexDirection: 'row',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
gap: _reactNativeUi.SPACING[200]
|
|
188
|
+
},
|
|
189
|
+
recordingDot: {
|
|
190
|
+
width: RECORDING_DOT_SIZE,
|
|
191
|
+
height: RECORDING_DOT_SIZE,
|
|
192
|
+
borderRadius: RECORDING_DOT_SIZE / 2,
|
|
193
|
+
backgroundColor: _reactNativeUi.COLORS.PRIMARY_RED
|
|
194
|
+
},
|
|
195
|
+
title: {
|
|
196
|
+
color: _reactNativeUi.COLORS.NEUTRAL_10,
|
|
197
|
+
marginLeft: _reactNativeUi.SPACING[100]
|
|
198
|
+
},
|
|
199
|
+
dimmed: {
|
|
200
|
+
opacity: DIMMED_OPACITY
|
|
201
|
+
},
|
|
202
|
+
transcriptBody: {
|
|
203
|
+
overflow: 'hidden'
|
|
204
|
+
},
|
|
205
|
+
// Absolute so its measured height stays the content's natural height,
|
|
206
|
+
// independent of the animated wrapper height around it
|
|
207
|
+
transcriptBodyInner: {
|
|
208
|
+
position: 'absolute',
|
|
209
|
+
top: 0,
|
|
210
|
+
left: 0
|
|
211
|
+
},
|
|
212
|
+
// Fixed per-state widths: the text snaps to its final layout once while the
|
|
213
|
+
// panel frame animates around it
|
|
214
|
+
contentCollapsed: {
|
|
215
|
+
width: _constants.VOICE_TRANSCRIPT_PANEL.WIDTH - _reactNativeUi.SPACING[200] * 2
|
|
216
|
+
},
|
|
217
|
+
fullTextMeasure: {
|
|
218
|
+
position: 'absolute',
|
|
219
|
+
opacity: 0
|
|
220
|
+
},
|
|
221
|
+
contentExpanded: {
|
|
222
|
+
width: _constants.VOICE_TRANSCRIPT_PANEL.WIDTH_DONE - _reactNativeUi.SPACING[200] * 2
|
|
223
|
+
},
|
|
224
|
+
transcriptScroll: {
|
|
225
|
+
maxHeight: _constants.VOICE_TRANSCRIPT_PANEL.TRANSCRIPT_MAX_HEIGHT
|
|
226
|
+
},
|
|
227
|
+
previewFade: {
|
|
228
|
+
position: 'absolute',
|
|
229
|
+
right: _reactNativeUi.SPACING[200],
|
|
230
|
+
bottom: _reactNativeUi.SPACING[100],
|
|
231
|
+
width: PREVIEW_FADE_WIDTH,
|
|
232
|
+
height: PREVIEW_LINE_HEIGHT,
|
|
233
|
+
flexDirection: 'row'
|
|
234
|
+
},
|
|
235
|
+
previewFadeStripe: {
|
|
236
|
+
flex: 1,
|
|
237
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
238
|
+
},
|
|
239
|
+
expandButton: {
|
|
240
|
+
justifyContent: 'center',
|
|
241
|
+
alignItems: 'center'
|
|
242
|
+
},
|
|
243
|
+
processing: {
|
|
244
|
+
alignItems: 'center',
|
|
245
|
+
justifyContent: 'center',
|
|
246
|
+
gap: _reactNativeUi.SPACING[200],
|
|
247
|
+
paddingVertical: _reactNativeUi.SPACING[200]
|
|
248
|
+
},
|
|
249
|
+
processingText: {
|
|
250
|
+
color: _reactNativeUi.COLORS.NEUTRAL_7
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
//# sourceMappingURL=VoiceTranscriptPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeUi","_effectorReact","_reactNativeReanimated","_i18n","_constants","_VoiceTranscriptContent","_useTranscriptPanelAnimation","_useVoiceWaveform","_VoiceWaveform","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","RECORDING_DOT_SIZE","BLINK_DURATION_MS","RECORDING_DOT_MIN_OPACITY","CARET_SIZE","DIMMED_OPACITY","VOICE_TRANSCRIPT_PANEL","PREVIEW_LINE_COUNT","PREVIEW_LINE_HEIGHT","PREVIEW_FADE_WIDTH","PREVIEW_FADE_STRIPES_COUNT","PREVIEW_HEIGHT_TOLERANCE","WAVEFORM_WIDTH","WIDTH","SPACING","RecordingDot","opacity","useSharedValue","useEffect","value","withRepeat","withTiming","duration","easing","Easing","inOut","ease","animatedStyle","useAnimatedStyle","jsx","View","style","styles","recordingDot","PreviewLineFade","previewFade","pointerEvents","children","Array","from","length","_","index","previewFadeStripe","VoiceTranscriptPanel","model","metering","useText","flags","transcript","hasError","isExpanded","isDimmed","useUnit","$flags","$transcript","$hasError","dropdown","$isExpanded","$isDimmed","fullTextHeight","setFullTextHeight","useState","previewHeight","setPreviewHeight","levels","useVoiceWaveform","isActive","isRecording","panelAnimation","useTranscriptPanelAnimation","isOpen","transcriptText","isTruncated","measureFullText","event","height","nativeEvent","layout","measurePreview","jsxs","entering","FadeIn","exiting","FadeOut","container","containerAnimatedStyle","recordingRow","VoiceWaveform","width","isProcessing","processing","Loader","size","LoaderSize","SMALL","color","LoaderColor","BLUE","Typography","variant","processingText","isDone","contentCollapsed","fullTextMeasure","onLayout","VoiceTranscriptContent","text","isLoading","title","dimmed","transcriptBody","bodyAnimatedStyle","transcriptBodyInner","contentExpanded","onContentLayout","ScrollableListScrollView","transcriptScroll","scrollbarWidth","SCROLLBAR_WIDTH","scrollEnabled","hideShadow","numberOfLines","undefined","expandButton","caretAnimatedStyle","onPress","toggleExpand","CaretDownIcon","exports","StyleSheet","create","padding","borderRadius","BORDER_RADIUS","backgroundColor","COLORS","NEUTRAL_1","overflow","SHADOWS","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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,cAAA,GAAAF,OAAA;AAYA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAL,uBAAA,CAAAC,OAAA;AAUA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,uBAAA,GAAAP,OAAA;AACA,IAAAQ,4BAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AAEA,IAAAU,cAAA,GAAAV,OAAA;AAA+C,I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
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceWaveform = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _constants = require("../../constants.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
const BAR_STEP = _constants.VOICE_WAVEFORM.BAR_WIDTH + _constants.VOICE_WAVEFORM.BAR_GAP;
|
|
16
|
+
// One extra bar is rendered off-screen on the right and slides in as the row
|
|
17
|
+
// shifts — that is what makes the scroll continuous instead of stepping
|
|
18
|
+
const OFFSCREEN_BARS = 1;
|
|
19
|
+
const getVisibleBarsCount = width => {
|
|
20
|
+
const barsForWidth = Math.floor(width / BAR_STEP);
|
|
21
|
+
return Math.max(_constants.VOICE_WAVEFORM.MIN_BARS, barsForWidth);
|
|
22
|
+
};
|
|
23
|
+
const getBarHeight = level => Math.max(_constants.VOICE_WAVEFORM.MIN_BAR_HEIGHT, Math.round(level * (_constants.VOICE_WAVEFORM.HEIGHT - _constants.VOICE_WAVEFORM.AMPLITUDE_PADDING)));
|
|
24
|
+
|
|
25
|
+
// Older bars (toward the left) fade out, mirroring the dotted lead-in in the
|
|
26
|
+
// design. Opacity ramps from 0 up to full across the first FADE_RATIO of bars.
|
|
27
|
+
const getBarOpacity = (index, count) => {
|
|
28
|
+
const fadeBars = count * _constants.VOICE_WAVEFORM.FADE_RATIO;
|
|
29
|
+
return Math.min(1, index / fadeBars);
|
|
30
|
+
};
|
|
31
|
+
const VoiceWaveform = ({
|
|
32
|
+
levels,
|
|
33
|
+
width
|
|
34
|
+
}) => {
|
|
35
|
+
const count = getVisibleBarsCount(width);
|
|
36
|
+
const visibleLevels = levels.slice(-(count + OFFSCREEN_BARS));
|
|
37
|
+
|
|
38
|
+
// Conveyor-belt motion: each new sample shifts the buffer one slot left and
|
|
39
|
+
// snaps the row back, then the row glides left by one step until the next
|
|
40
|
+
// sample lands — the two cancel out into continuous movement.
|
|
41
|
+
const shift = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
42
|
+
(0, _react.useEffect)(() => {
|
|
43
|
+
shift.value = 0;
|
|
44
|
+
shift.value = (0, _reactNativeReanimated.withTiming)(-BAR_STEP, {
|
|
45
|
+
duration: _constants.VOICE_WAVEFORM.SAMPLE_INTERVAL_MS,
|
|
46
|
+
easing: _reactNativeReanimated.Easing.linear
|
|
47
|
+
});
|
|
48
|
+
}, [levels, shift]);
|
|
49
|
+
|
|
50
|
+
// Explicit deps: consumers compile this library without the Reanimated Babel plugin
|
|
51
|
+
const rowAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
52
|
+
transform: [{
|
|
53
|
+
translateX: shift.value
|
|
54
|
+
}]
|
|
55
|
+
}), [shift]);
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
|
+
style: [styles.container, {
|
|
58
|
+
width
|
|
59
|
+
}],
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
61
|
+
style: [styles.row, rowAnimatedStyle],
|
|
62
|
+
children: visibleLevels.map((level, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
63
|
+
style: [styles.bar, {
|
|
64
|
+
height: getBarHeight(level),
|
|
65
|
+
opacity: getBarOpacity(index, visibleLevels.length)
|
|
66
|
+
}]
|
|
67
|
+
}, index))
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
exports.VoiceWaveform = VoiceWaveform;
|
|
72
|
+
const styles = _reactNative.StyleSheet.create({
|
|
73
|
+
container: {
|
|
74
|
+
height: _constants.VOICE_WAVEFORM.HEIGHT,
|
|
75
|
+
overflow: 'hidden'
|
|
76
|
+
},
|
|
77
|
+
// Hangs one step past the right edge so the newest bar starts hidden
|
|
78
|
+
row: {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: 0,
|
|
81
|
+
bottom: 0,
|
|
82
|
+
right: -BAR_STEP,
|
|
83
|
+
flexDirection: 'row',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
gap: _constants.VOICE_WAVEFORM.BAR_GAP
|
|
86
|
+
},
|
|
87
|
+
bar: {
|
|
88
|
+
width: _constants.VOICE_WAVEFORM.BAR_WIDTH,
|
|
89
|
+
borderRadius: _constants.VOICE_WAVEFORM.BAR_WIDTH / 2,
|
|
90
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_7
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=VoiceWaveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeUi","_reactNativeReanimated","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","BAR_STEP","VOICE_WAVEFORM","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","useSharedValue","useEffect","value","withTiming","duration","SAMPLE_INTERVAL_MS","easing","Easing","linear","rowAnimatedStyle","useAnimatedStyle","transform","translateX","jsx","View","style","styles","container","children","row","map","bar","height","opacity","length","exports","StyleSheet","create","overflow","position","top","bottom","right","flexDirection","alignItems","gap","borderRadius","backgroundColor","COLORS","NEUTRAL_7"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceWaveform.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAOA,IAAAI,UAAA,GAAAJ,OAAA;AAAgD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD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K,EAAE,CACLC,MAAM,CAACK,GAAG,EACV;UAAEC,MAAM,EAAEvC,YAAY,CAACC,KAAK,CAAC;UAAEuC,OAAO,EAAElC,aAAa,CAACC,KAAK,EAAEO,aAAa,CAAC2B,MAAM;QAAE,CAAC;MACpF,GAJGlC,KAKN,CACF;IAAC,CACW;EAAC,CACZ,CAAC;AAEX,CAAC;AAAAmC,OAAA,CAAA9B,aAAA,GAAAA,aAAA;AAED,MAAMqB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTK,MAAM,EAAElD,yBAAc,CAACe,MAAM;IAC7ByC,QAAQ,EAAE;EACZ,CAAC;EACD;EACAT,GAAG,EAAE;IACHU,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAAC7D,QAAQ;IAChB8D,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE/D,yBAAc,CAACE;EACtB,CAAC;EACD+C,GAAG,EAAE;IACH5C,KAAK,EAAEL,yBAAc,CAACC,SAAS;IAC/B+D,YAAY,EAAEhE,yBAAc,CAACC,SAAS,GAAG,CAAC;IAC1CgE,eAAe,EAAEC,qBAAM,CAACC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useTranscriptPanelAnimation = void 0;
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
const TIMING = {
|
|
10
|
+
duration: 170
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// Width and height are animated as explicit numbers instead of reanimated
|
|
14
|
+
// layout transitions: on web those run as FLIP animations that scale the
|
|
15
|
+
// subtree, visibly stretching the text while the panel resizes.
|
|
16
|
+
const useTranscriptPanelAnimation = isExpanded => {
|
|
17
|
+
const contentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
18
|
+
const onContentLayout = event => {
|
|
19
|
+
const height = event.nativeEvent.layout.height;
|
|
20
|
+
if (height <= 0) return;
|
|
21
|
+
contentHeight.value = contentHeight.value === 0 ? height : (0, _reactNativeReanimated.withTiming)(height, TIMING);
|
|
22
|
+
};
|
|
23
|
+
const containerAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
24
|
+
width: (0, _reactNativeReanimated.withTiming)(isExpanded ? _constants.VOICE_TRANSCRIPT_PANEL.WIDTH_DONE : _constants.VOICE_TRANSCRIPT_PANEL.WIDTH, TIMING)
|
|
25
|
+
}), [isExpanded]);
|
|
26
|
+
const bodyAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => contentHeight.value === 0 ? {} : {
|
|
27
|
+
height: contentHeight.value
|
|
28
|
+
}, [contentHeight]);
|
|
29
|
+
const caretAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
30
|
+
transform: [{
|
|
31
|
+
rotate: (0, _reactNativeReanimated.withTiming)(isExpanded ? '180deg' : '0deg', TIMING)
|
|
32
|
+
}]
|
|
33
|
+
}), [isExpanded]);
|
|
34
|
+
return {
|
|
35
|
+
onContentLayout,
|
|
36
|
+
containerAnimatedStyle,
|
|
37
|
+
bodyAnimatedStyle,
|
|
38
|
+
caretAnimatedStyle
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.useTranscriptPanelAnimation = useTranscriptPanelAnimation;
|
|
42
|
+
//# sourceMappingURL=useTranscriptPanelAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_constants","TIMING","duration","useTranscriptPanelAnimation","isExpanded","contentHeight","useSharedValue","onContentLayout","event","height","nativeEvent","layout","value","withTiming","containerAnimatedStyle","useAnimatedStyle","width","VOICE_TRANSCRIPT_PANEL","WIDTH_DONE","WIDTH","bodyAnimatedStyle","caretAnimatedStyle","transform","rotate","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useTranscriptPanelAnimation.ts"],"mappings":";;;;;;AAEA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,MAAM,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAU;;AAEzC;AACA;AACA;AACO,MAAMC,2BAA2B,GAAIC,UAAmB,IAAK;EAClE,MAAMC,aAAa,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAEvC,MAAMC,eAAe,GAAIC,KAAwB,IAAK;IACpD,MAAMC,MAAM,GAAGD,KAAK,CAACE,WAAW,CAACC,MAAM,CAACF,MAAM;IAC9C,IAAIA,MAAM,IAAI,CAAC,EAAE;IACjBJ,aAAa,CAACO,KAAK,GACjBP,aAAa,CAACO,KAAK,KAAK,CAAC,GAAGH,MAAM,GAAG,IAAAI,iCAAU,EAACJ,MAAM,EAAER,MAAM,CAAC;EACnE,CAAC;EAED,MAAMa,sBAAsB,GAAG,IAAAC,uCAAgB,EAC7C,OAAO;IACLC,KAAK,EAAE,IAAAH,iCAAU,EACfT,UAAU,GAAGa,iCAAsB,CAACC,UAAU,GAAGD,iCAAsB,CAACE,KAAK,EAC7ElB,MACF;EACF,CAAC,CAAC,EACF,CAACG,UAAU,CACb,CAAC;EAED,MAAMgB,iBAAiB,GAAG,IAAAL,uCAAgB,EACxC,MAAOV,aAAa,CAACO,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;IAAEH,MAAM,EAAEJ,aAAa,CAACO;EAAM,CAAE,EACxE,CAACP,aAAa,CAChB,CAAC;EAED,MAAMgB,kBAAkB,GAAG,IAAAN,uCAAgB,EACzC,OAAO;IACLO,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE,IAAAV,iCAAU,EAACT,UAAU,GAAG,QAAQ,GAAG,MAAM,EAAEH,MAAM;IAAE,CAAC;EAC5E,CAAC,CAAC,EACF,CAACG,UAAU,CACb,CAAC;EAED,OAAO;IAAEG,eAAe;IAAEO,sBAAsB;IAAEM,iBAAiB;IAAEC;EAAmB,CAAC;AAC3F,CAAC;AAAAG,OAAA,CAAArB,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -9,9 +9,24 @@ var _react = require("react");
|
|
|
9
9
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
10
|
var _constants = require("../../constants.js");
|
|
11
11
|
var _helpers = require("../../helpers.js");
|
|
12
|
+
// Metering powers the live recording waveform (recorderState.metering).
|
|
13
|
+
// Only native respects it — on web the level is measured by
|
|
14
|
+
// createWebMeteringMonitor instead.
|
|
15
|
+
const RECORDING_OPTIONS = {
|
|
16
|
+
..._expoAudio.RecordingPresets.LOW_QUALITY,
|
|
17
|
+
isMeteringEnabled: true
|
|
18
|
+
};
|
|
12
19
|
const useVoiceRecorder = model => {
|
|
13
|
-
const recorder = (0, _expoAudio.useAudioRecorder)(
|
|
14
|
-
const recorderState = (0, _expoAudio.useAudioRecorderState)(recorder);
|
|
20
|
+
const recorder = (0, _expoAudio.useAudioRecorder)(RECORDING_OPTIONS, model.recordingStatusUpdate);
|
|
21
|
+
const recorderState = (0, _expoAudio.useAudioRecorderState)(recorder, _constants.METERING_UPDATE_INTERVAL_MS);
|
|
22
|
+
(0, _react.useEffect)(() => {
|
|
23
|
+
if (_reactNativeUi.IS_WEB) return;
|
|
24
|
+
model.recorderModel.setMetering(recorderState.metering ?? null);
|
|
25
|
+
}, [recorderState.metering, model.recorderModel]);
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
if (!_reactNativeUi.IS_WEB || !recorderState.isRecording) return;
|
|
28
|
+
return (0, _helpers.createWebMeteringMonitor)(recorder, model.recorderModel.setMetering);
|
|
29
|
+
}, [recorderState.isRecording, recorder, model.recorderModel]);
|
|
15
30
|
(0, _react.useEffect)(() => {
|
|
16
31
|
if (recorderState.durationMillis >= _constants.VOICE_RECORDER_MAX_DURATION_MS && recorderState.isRecording) {
|
|
17
32
|
model.recorderModel.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_expoAudio","require","_react","_reactNativeUi","_constants","_helpers","
|
|
1
|
+
{"version":3,"names":["_expoAudio","require","_react","_reactNativeUi","_constants","_helpers","RECORDING_OPTIONS","RecordingPresets","LOW_QUALITY","isMeteringEnabled","useVoiceRecorder","model","recorder","useAudioRecorder","recordingStatusUpdate","recorderState","useAudioRecorderState","METERING_UPDATE_INTERVAL_MS","useEffect","IS_WEB","recorderModel","setMetering","metering","isRecording","createWebMeteringMonitor","durationMillis","VOICE_RECORDER_MAX_DURATION_MS","stop","setLastKnownDurationMs","getAvailableInputs","then","inputs","setAvailableInputs","removeListener","addAudioInputsListenerWeb","devices","setVoiceRecordState","VoiceRecorderState","RECORDING","PAUSED","IDLE","reset","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorder.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAOA;AACA;AACA;AACA,MAAMK,iBAAiB,GAAG;EACxB,GAAGC,2BAAgB,CAACC,WAAW;EAC/BC,iBAAiB,EAAE;AACrB,CAAC;AAEM,MAAMC,gBAAgB,GAAIC,KAAuB,IAAK;EAC3D,MAAMC,QAAQ,GAAG,IAAAC,2BAAgB,EAACP,iBAAiB,EAAEK,KAAK,CAACG,qBAAqB,CAAC;EACjF,MAAMC,aAAa,GAAG,IAAAC,gCAAqB,EAACJ,QAAQ,EAAEK,sCAA2B,CAAC;EAElF,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIC,qBAAM,EAAE;IACZR,KAAK,C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,CAACS,aAAa,CAAC,CAAC;EAEnC,IAAAF,gBAAS,EAAC,MAAM;IACd,IAAIH,aAAa,CAACQ,WAAW,EAAE;MAC7BZ,KAAK,CAACS,aAAa,CAACgB,mBAAmB,CAACC,6BAAkB,CAACC,SAAS,CAAC;MACrE;IACF;IACA,IAAIvB,aAAa,CAACU,cAAc,GAAG,CAAC,EAAE;MACpCd,KAAK,CAACS,aAAa,CAACgB,mBAAmB,CAACC,6BAAkB,CAACE,MAAM,CAAC;MAClE;IACF;IACA5B,KAAK,CAACS,aAAa,CAACgB,mBAAmB,CAACC,6BAAkB,CAACG,IAAI,CAAC;IAEhE,OAAO,MAAM;MACX7B,KAAK,CAACS,aAAa,CAACqB,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAAC1B,aAAa,EAAEJ,KAAK,CAACS,aAAa,CAAC,CAAC;EAExC,IAAAF,gBAAS,EAAC,MAAM;IACdP,KAAK,CAACS,aAAa,CAACR,QAAQ,GAAGA,QAAQ;EACzC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEG;EAAc,CAAC;AAC1B,CAAC;AAAA2B,OAAA,CAAAhC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useVoiceWaveform = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
var _helpers = require("../../helpers.js");
|
|
10
|
+
const createSilentBuffer = () => new Array(_constants.VOICE_WAVEFORM.BUFFER_SIZE).fill(_constants.VOICE_WAVEFORM.MIN_LEVEL);
|
|
11
|
+
|
|
12
|
+
// Keeps a rolling buffer of normalized levels that scrolls right-to-left while
|
|
13
|
+
// recording. We sample on a fixed interval (rather than on every metering
|
|
14
|
+
// update) so the scroll speed stays constant regardless of the recorder's
|
|
15
|
+
// status cadence. The latest metering value is read from a ref to avoid
|
|
16
|
+
// resubscribing the interval on each change. Levels are low-pass filtered so
|
|
17
|
+
// neighboring bars flow into each other instead of jumping.
|
|
18
|
+
const useVoiceWaveform = ({
|
|
19
|
+
metering,
|
|
20
|
+
isActive
|
|
21
|
+
}) => {
|
|
22
|
+
const meteringRef = (0, _react.useRef)(metering);
|
|
23
|
+
meteringRef.current = metering;
|
|
24
|
+
const smoothedLevelRef = (0, _react.useRef)(_constants.VOICE_WAVEFORM.MIN_LEVEL);
|
|
25
|
+
const [levels, setLevels] = (0, _react.useState)(createSilentBuffer);
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
if (!isActive) {
|
|
28
|
+
smoothedLevelRef.current = _constants.VOICE_WAVEFORM.MIN_LEVEL;
|
|
29
|
+
setLevels(createSilentBuffer());
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const intervalId = setInterval(() => {
|
|
33
|
+
const target = (0, _helpers.normalizeMetering)(meteringRef.current);
|
|
34
|
+
smoothedLevelRef.current += (target - smoothedLevelRef.current) * _constants.VOICE_WAVEFORM.LEVEL_SMOOTHING;
|
|
35
|
+
const level = Math.max(_constants.VOICE_WAVEFORM.MIN_LEVEL, smoothedLevelRef.current);
|
|
36
|
+
setLevels(prev => [...prev.slice(1), level]);
|
|
37
|
+
}, _constants.VOICE_WAVEFORM.SAMPLE_INTERVAL_MS);
|
|
38
|
+
return () => clearInterval(intervalId);
|
|
39
|
+
}, [isActive]);
|
|
40
|
+
return levels;
|
|
41
|
+
};
|
|
42
|
+
exports.useVoiceWaveform = useVoiceWaveform;
|
|
43
|
+
//# sourceMappingURL=useVoiceWaveform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_constants","_helpers","createSilentBuffer","Array","VOICE_WAVEFORM","BUFFER_SIZE","fill","MIN_LEVEL","useVoiceWaveform","metering","isActive","meteringRef","useRef","current","smoothedLevelRef","levels","setLevels","useState","useEffect","intervalId","setInterval","target","normalizeMetering","LEVEL_SMOOTHING","level","Math","max","prev","slice","SAMPLE_INTERVAL_MS","clearInterval","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceWaveform.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,MAAMG,kBAAkB,GAAGA,CAAA,KACzB,IAAIC,KAAK,CAASC,yBAAc,CAACC,WAAW,CAAC,CAACC,IAAI,CAACF,yBAAc,CAACG,SAAS,CAAC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAiC,CAAC,KAAK;EAClF,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACH,QAAQ,CAAC;EACpCE,WAAW,CAACE,OAAO,GAAGJ,QAAQ;EAE9B,MAAMK,gBAAgB,GAAG,IAAAF,aAAM,EAACR,yBAAc,CAACG,SAAS,CAAC;EACzD,MAAM,CAACQ,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAAWf,kBAAkB,CAAC;EAElE,IAAAgB,gBAAS,EAAC,MAAM;IACd,IAAI,CAACR,QAAQ,EAAE;MACbI,gBAAgB,CAACD,OAAO,GAAGT,yBAAc,CAACG,SAAS;MACnDS,SAAS,CAACd,kBAAkB,CAAC,CAAC,CAAC;MAC/B;IACF;IAEA,MAAMiB,UAAU,GAAGC,WAAW,CAAC,MAAM;MACnC,MAAMC,MAAM,GAAG,IAAAC,0BAAiB,EAACX,WAAW,CAACE,OAAO,CAAC;MACrDC,gBAAgB,CAACD,OAAO,IACtB,CAACQ,MAAM,GAAGP,gBAAgB,CAACD,OAAO,IAAIT,yBAAc,CAACmB,eAAe;MACtE,MAAMC,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACtB,yBAAc,CAACG,SAAS,EAAEO,gBAAgB,CAACD,OAAO,CAAC;MAC1EG,SAAS,CAAEW,IAAI,IAAK,CAAC,GAAGA,IAAI,CAACC,KAAK,CAAC,CAAC,CAAC,EAAEJ,KAAK,CAAC,CAAC;IAChD,CAAC,EAAEpB,yBAAc,CAACyB,kBAAkB,CAAC;IAErC,OAAO,MAAMC,aAAa,CAACX,UAAU,CAAC;EACxC,CAAC,EAAE,CAACT,QAAQ,CAAC,CAAC;EAEd,OAAOK,MAAM;AACf,CAAC;AAAAgB,OAAA,CAAAvB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -17,9 +17,12 @@ class RecorderModel {
|
|
|
17
17
|
setVoiceRecordState = (0, _effector.createEvent)();
|
|
18
18
|
setAvailableInputs = (0, _effector.createEvent)();
|
|
19
19
|
setLastKnownDurationMs = (0, _effector.createEvent)();
|
|
20
|
+
setMetering = (0, _effector.createEvent)();
|
|
20
21
|
$voiceRecordState = (0, _effector.restore)(this.setVoiceRecordState, _constants.VoiceRecorderState.IDLE).reset(this.reset);
|
|
21
22
|
$availableInputs = (0, _effector.restore)(this.setAvailableInputs, []);
|
|
22
23
|
$lastKnownDurationMs = (0, _effector.restore)(this.setLastKnownDurationMs, 0).reset(this.reset);
|
|
24
|
+
// Live input level in dBFS while recording (powers the waveform)
|
|
25
|
+
$metering = (0, _effector.restore)(this.setMetering, null).reset(this.reset);
|
|
23
26
|
start = (0, _effector.createEffect)(async () => {
|
|
24
27
|
try {
|
|
25
28
|
await (0, _expoAudio.setAudioModeAsync)(AUDIO_MODE_CONFIG);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_expoAudio","_constants","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","createEvent","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","$voiceRecordState","restore","VoiceRecorderState","IDLE","$availableInputs","$lastKnownDurationMs","start","createEffect","setAudioModeAsync","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAGA,MAAMG,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIH,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACrBC,mBAAmB,GAAG,IAAAD,qBAAW,EAAqB,CAAC;EACvDE,kBAAkB,GAAG,IAAAF,qBAAW,EAAuB,CAAC;EACxDG,sBAAsB,GAAG,IAAAH,qBAAW,EAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["_effector","require","_expoAudio","_constants","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","createEvent","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","setMetering","$voiceRecordState","restore","VoiceRecorderState","IDLE","$availableInputs","$lastKnownDurationMs","$metering","start","createEffect","setAudioModeAsync","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAGA,MAAMG,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIH,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,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