@magmamath/students-features 0.9.106 → 0.9.107-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/voiceRecord/components/VoiceRecord.js +82 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecord.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordButton.js +45 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordButton.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDelete.js +32 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDelete.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDevider.js +27 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDevider.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordTimer.js +44 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordTimer.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/helpers.js +34 -0
- package/dist/commonjs/features/voiceRecord/helpers.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorder.hook.js +36 -0
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorder.hook.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/index.js +28 -0
- package/dist/commonjs/features/voiceRecord/index.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecord.model.js +37 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecord.model.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordApi.js +9 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordApi.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/voiceRecord/components/VoiceRecord.js +74 -0
- package/dist/module/features/voiceRecord/components/VoiceRecord.js.map +1 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordButton.js +39 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordButton.js.map +1 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordDelete.js +26 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordDelete.js.map +1 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordDevider.js +21 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordDevider.js.map +1 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordTimer.js +38 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordTimer.js.map +1 -0
- package/dist/module/features/voiceRecord/helpers.js +28 -0
- package/dist/module/features/voiceRecord/helpers.js.map +1 -0
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorder.hook.js +31 -0
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorder.hook.js.map +1 -0
- package/dist/module/features/voiceRecord/index.js +5 -0
- package/dist/module/features/voiceRecord/index.js.map +1 -0
- package/dist/module/features/voiceRecord/model/VoiceRecord.model.js +32 -0
- package/dist/module/features/voiceRecord/model/VoiceRecord.model.js.map +1 -0
- package/dist/module/features/voiceRecord/model/VoiceRecordApi.js +4 -0
- package/dist/module/features/voiceRecord/model/VoiceRecordApi.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDelete.d.ts +7 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDelete.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordTimer.d.ts +9 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/helpers.d.ts +4 -0
- package/dist/typescript/commonjs/features/voiceRecord/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorder.hook.d.ts +9 -0
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorder.hook.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/voiceRecord/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecord.model.d.ts +17 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordApi.d.ts +3 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDelete.d.ts +7 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDelete.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordTimer.d.ts +9 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/helpers.d.ts +4 -0
- package/dist/typescript/module/features/voiceRecord/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorder.hook.d.ts +9 -0
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorder.hook.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/index.d.ts +3 -0
- package/dist/typescript/module/features/voiceRecord/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecord.model.d.ts +17 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordApi.d.ts +3 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordApi.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +7 -3
- package/src/features/voiceRecord/components/VoiceRecord.tsx +78 -0
- package/src/features/voiceRecord/components/VoiceRecordButton.tsx +44 -0
- package/src/features/voiceRecord/components/VoiceRecordDelete.tsx +24 -0
- package/src/features/voiceRecord/components/VoiceRecordDevider.tsx +17 -0
- package/src/features/voiceRecord/components/VoiceRecordTimer.tsx +37 -0
- package/src/features/voiceRecord/helpers.ts +30 -0
- package/src/features/voiceRecord/hooks/useVoiceRecorder.hook.ts +39 -0
- package/src/features/voiceRecord/index.ts +2 -0
- package/src/features/voiceRecord/model/VoiceRecord.model.ts +41 -0
- package/src/features/voiceRecord/model/VoiceRecordApi.ts +1 -0
- package/src/index.ts +1 -0
- package/.editorconfig +0 -15
- package/.eslintignore +0 -2
- package/.eslintrc +0 -22
- package/.gitattributes +0 -3
- package/.github/actions/setup/action.yml +0 -37
- package/.github/workflows/ci.yml +0 -73
- package/.gitignore +0 -84
- package/.idea/.gitignore +0 -8
- package/.idea/codeStyles/Project.xml +0 -62
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -8
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -7
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_30_12_2025,_11_06_[Changes]/shelved.patch +0 -18
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_30_12_2025,_11_07_[Changes]/shelved.patch +0 -18
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_30_12_2025__11_06__Changes_.xml +0 -4
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_30_12_2025__11_07__Changes_.xml +0 -4
- package/.idea/students-features.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -646
- package/.nvmrc +0 -1
- package/.prettierrc +0 -11
- package/.release-it.json +0 -17
- package/.watchmanconfig +0 -1
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
- package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +0 -28
- package/.yarn/releases/yarn-3.6.1.cjs +0 -874
- package/babel.config.js +0 -5
- package/bob.config.js +0 -25
- package/example/.expo/README.md +0 -8
- package/example/.expo/devices.json +0 -3
- package/example/.expo/web/cache/production/images/favicon/favicon-24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb-contain-transparent/favicon-48.png +0 -0
- package/example/app.json +0 -30
- package/example/assets/adaptive-icon.png +0 -0
- package/example/assets/favicon.png +0 -0
- package/example/assets/icon.png +0 -0
- package/example/assets/splash-icon.png +0 -0
- package/example/babel.config.js +0 -28
- package/example/index.js +0 -8
- package/example/metro.config.js +0 -18
- package/example/package.json +0 -25
- package/example/src/App.tsx +0 -8
- package/example/tsconfig.json +0 -6
- package/example/yarn.lock +0 -6552
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -34
- package/yarn.lock +0 -8623
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
4
|
+
import { TrashcanIcon } from '@magmamath/react-native-ui';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const VoiceRecordDelete = ({
|
|
8
|
+
onPress
|
|
9
|
+
}) => {
|
|
10
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
11
|
+
style: styles.container,
|
|
12
|
+
onPress: onPress,
|
|
13
|
+
children: /*#__PURE__*/_jsx(TrashcanIcon, {
|
|
14
|
+
size: 20
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
container: {
|
|
20
|
+
width: 36,
|
|
21
|
+
height: 36,
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=VoiceRecordDelete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","TouchableOpacity","TrashcanIcon","React","jsx","_jsx","VoiceRecordDelete","onPress","style","styles","container","children","size","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/components/VoiceRecordDelete.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AAC3D,SAASC,YAAY,QAAQ,4BAA4B;AACzD,OAAOC,KAAK,MAAM,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMzB,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC;AAAgC,CAAC,KAAK;EACxE,oBACEF,IAAA,CAACJ,gBAAgB;IAACO,KAAK,EAAEC,MAAM,CAACC,SAAU;IAACH,OAAO,EAAEA,OAAQ;IAAAI,QAAA,eAC1DN,IAAA,CAACH,YAAY;MAACU,IAAI,EAAE;IAAG,CAAE;EAAC,CACV,CAAC;AAEvB,CAAC;AAED,MAAMH,MAAM,GAAGT,UAAU,CAACa,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const VoiceRecordDevider = () => {
|
|
8
|
+
return /*#__PURE__*/_jsx(View, {
|
|
9
|
+
style: styles.container
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const styles = StyleSheet.create({
|
|
13
|
+
container: {
|
|
14
|
+
height: 1,
|
|
15
|
+
borderRadius: 1,
|
|
16
|
+
width: 28,
|
|
17
|
+
margin: 8,
|
|
18
|
+
backgroundColor: COLORS.NEUTRAL_6
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=VoiceRecordDevider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","React","COLORS","jsx","_jsx","VoiceRecordDevider","style","styles","container","create","height","borderRadius","width","margin","backgroundColor","NEUTRAL_6"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/components/VoiceRecordDevider.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,oBAAOD,IAAA,CAACJ,IAAI;IAACM,KAAK,EAAEC,MAAM,CAACC;EAAU,CAAE,CAAC;AAC1C,CAAC;AAED,MAAMD,MAAM,GAAGR,UAAU,CAACU,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAEZ,MAAM,CAACa;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { COLORS, Typography } from '@magmamath/react-native-ui';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const VoiceRecordTimer = ({
|
|
8
|
+
style,
|
|
9
|
+
time
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/_jsx(View, {
|
|
12
|
+
style: [styles.container, style],
|
|
13
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
14
|
+
style: styles.text,
|
|
15
|
+
children: time
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export default VoiceRecordTimer;
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
23
|
+
paddingHorizontal: 8,
|
|
24
|
+
paddingVertical: 2,
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
borderWidth: 0.5,
|
|
27
|
+
borderColor: COLORS.NEUTRAL_4,
|
|
28
|
+
borderRadius: 18
|
|
29
|
+
},
|
|
30
|
+
text: {
|
|
31
|
+
color: COLORS.NEUTRAL_10,
|
|
32
|
+
fontSize: 13,
|
|
33
|
+
fontWeight: '600',
|
|
34
|
+
lineHeight: 18,
|
|
35
|
+
textTransform: 'uppercase'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=VoiceRecordTimer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","COLORS","Typography","React","jsx","_jsx","VoiceRecordTimer","style","time","styles","container","children","text","create","backgroundColor","NEUTRAL_1","paddingHorizontal","paddingVertical","alignItems","borderWidth","borderColor","NEUTRAL_4","borderRadius","color","NEUTRAL_10","fontSize","fontWeight","lineHeight","textTransform"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/components/VoiceRecordTimer.tsx"],"mappings":";;AAAA,SAAoBA,UAAU,EAAQC,IAAI,QAAmB,cAAc;AAC3E,SAASC,MAAM,EAAEC,UAAU,QAAQ,4BAA4B;AAC/D,OAAOC,KAAK,MAAM,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOzB,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAA4B,CAAC,KAAK;EAC1E,oBACEH,IAAA,CAACL,IAAI;IAACO,KAAK,EAAE,CAACE,MAAM,CAACC,SAAS,EAAEH,KAAK,CAAE;IAAAI,QAAA,eACrCN,IAAA,CAACH,UAAU;MAACK,KAAK,EAAEE,MAAM,CAACG,IAAK;MAAAD,QAAA,EAAEH;IAAI,CAAa;EAAC,CAC/C,CAAC;AAEX,CAAC;AAED,eAAeF,gBAAgB;AAE/B,MAAMG,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,eAAe,EAAEb,MAAM,CAACc,SAAS;IACjCC,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE,CAAC;IAClBC,UAAU,EAAE,QAAQ;IACpBC,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAEnB,MAAM,CAACoB,SAAS;IAC7BC,YAAY,EAAE;EAChB,CAAC;EACDV,IAAI,EAAE;IACJW,KAAK,EAAEtB,MAAM,CAACuB,UAAU;IACxBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { IS_MOBILE, IS_WEB } from '@magmamath/react-native-ui';
|
|
4
|
+
import { getRecordingPermissionsAsync, requestRecordingPermissionsAsync } from 'expo-audio';
|
|
5
|
+
export const ensureRecordingPermissions = async () => {
|
|
6
|
+
const {
|
|
7
|
+
status
|
|
8
|
+
} = await getRecordingPermissionsAsync();
|
|
9
|
+
if (status !== 'granted') {
|
|
10
|
+
const {
|
|
11
|
+
granted
|
|
12
|
+
} = await requestRecordingPermissionsAsync();
|
|
13
|
+
return granted;
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
};
|
|
17
|
+
export const getAvailableInputs = async recorder => {
|
|
18
|
+
if (IS_WEB) {
|
|
19
|
+
if (!navigator.mediaDevices?.enumerateDevices) return [];
|
|
20
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
21
|
+
return devices.filter(d => d.kind === 'audioinput');
|
|
22
|
+
}
|
|
23
|
+
if (IS_MOBILE) {
|
|
24
|
+
return await recorder.getAvailableInputs();
|
|
25
|
+
}
|
|
26
|
+
return [];
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IS_MOBILE","IS_WEB","getRecordingPermissionsAsync","requestRecordingPermissionsAsync","ensureRecordingPermissions","status","granted","getAvailableInputs","recorder","navigator","mediaDevices","enumerateDevices","devices","filter","d","kind"],"sourceRoot":"../../../../src","sources":["features/voiceRecord/helpers.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,4BAA4B;AAC9D,SAEEC,4BAA4B,EAC5BC,gCAAgC,QAC3B,YAAY;AAEnB,OAAO,MAAMC,0BAA0B,GAAG,MAAAA,CAAA,KAAY;EACpD,MAAM;IAAEC;EAAO,CAAC,GAAG,MAAMH,4BAA4B,CAAC,CAAC;EAEvD,IAAIG,MAAM,KAAK,SAAS,EAAE;IACxB,MAAM;MAAEC;IAAQ,CAAC,GAAG,MAAMH,gCAAgC,CAAC,CAAC;IAC5D,OAAOG,OAAO;EAChB;EAEA,OAAO,IAAI;AACb,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAG,MAAOC,QAAuB,IAAK;EACnE,IAAIP,MAAM,EAAE;IACV,IAAI,CAACQ,SAAS,CAACC,YAAY,EAAEC,gBAAgB,EAAE,OAAO,EAAE;IAExD,MAAMC,OAAO,GAAG,MAAMH,SAAS,CAACC,YAAY,CAACC,gBAAgB,CAAC,CAAC;IAC/D,OAAOC,OAAO,CAACC,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACC,IAAI,KAAK,YAAY,CAAC;EACvD;EACA,IAAIf,SAAS,EAAE;IACb,OAAO,MAAMQ,QAAQ,CAACD,kBAAkB,CAAC,CAAC;EAC5C;EACA,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { RecordingPresets, useAudioPlayer, useAudioRecorder, useAudioRecorderState } from 'expo-audio';
|
|
4
|
+
import { ensureRecordingPermissions, getAvailableInputs } from "../helpers.js";
|
|
5
|
+
export const useVoiceRecorder = model => {
|
|
6
|
+
const recorder = useAudioRecorder(RecordingPresets.LOW_QUALITY, status => console.log('Recording status:', status));
|
|
7
|
+
const recorderState = useAudioRecorderState(recorder);
|
|
8
|
+
const player = useAudioPlayer();
|
|
9
|
+
const startRecording = async () => {
|
|
10
|
+
if (!(await ensureRecordingPermissions())) return model.showError('No microphone access');
|
|
11
|
+
await recorder.prepareToRecordAsync();
|
|
12
|
+
if (await getAvailableInputs(recorder).then(inputs => inputs.length === 0)) {
|
|
13
|
+
return model.showError('No microphone found');
|
|
14
|
+
}
|
|
15
|
+
recorder.record();
|
|
16
|
+
};
|
|
17
|
+
const stopRecording = async () => {
|
|
18
|
+
await recorder.stop();
|
|
19
|
+
recorder.uri && console.log('Recording stopped and stored at', recorder.uri);
|
|
20
|
+
player.replace(recorder.uri);
|
|
21
|
+
player.play();
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
recorder,
|
|
25
|
+
recorderState,
|
|
26
|
+
player,
|
|
27
|
+
startRecording,
|
|
28
|
+
stopRecording
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useVoiceRecorder.hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RecordingPresets","useAudioPlayer","useAudioRecorder","useAudioRecorderState","ensureRecordingPermissions","getAvailableInputs","useVoiceRecorder","model","recorder","LOW_QUALITY","status","console","log","recorderState","player","startRecording","showError","prepareToRecordAsync","then","inputs","length","record","stopRecording","stop","uri","replace","play"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/hooks/useVoiceRecorder.hook.ts"],"mappings":";;AAAA,SACEA,gBAAgB,EAChBC,cAAc,EACdC,gBAAgB,EAChBC,qBAAqB,QAChB,YAAY;AACnB,SAASC,0BAA0B,EAAEC,kBAAkB,QAAQ,eAAY;AAG3E,OAAO,MAAMC,gBAAgB,GAAIC,KAAuB,IAAK;EAC3D,MAAMC,QAAQ,GAAGN,gBAAgB,CAACF,gBAAgB,CAACS,WAAW,EAAGC,MAAM,IACrEC,OAAO,CAACC,GAAG,CAAC,mBAAmB,EAAEF,MAAM,CACzC,CAAC;EACD,MAAMG,aAAa,GAAGV,qBAAqB,CAACK,QAAQ,CAAC;EAErD,MAAMM,MAAM,GAAGb,cAAc,CAAC,CAAC;EAE/B,MAAMc,cAAc,GAAG,MAAAA,CAAA,KAAY;IACjC,IAAI,EAAE,MAAMX,0BAA0B,CAAC,CAAC,CAAC,EAAE,OAAOG,KAAK,CAACS,SAAS,CAAC,sBAAsB,CAAC;IAEzF,MAAMR,QAAQ,CAACS,oBAAoB,CAAC,CAAC;IAErC,IAAI,MAAMZ,kBAAkB,CAACG,QAAQ,CAAC,CAACU,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,MAAM,KAAK,CAAC,CAAC,EAAE;MAC5E,OAAOb,KAAK,CAACS,SAAS,CAAC,qBAAqB,CAAC;IAC/C;IAEAR,QAAQ,CAACa,MAAM,CAAC,CAAC;EACnB,CAAC;EAED,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAAY;IAChC,MAAMd,QAAQ,CAACe,IAAI,CAAC,CAAC;IACrBf,QAAQ,CAACgB,GAAG,IAAIb,OAAO,CAACC,GAAG,CAAC,iCAAiC,EAAEJ,QAAQ,CAACgB,GAAG,CAAC;IAE5EV,MAAM,CAACW,OAAO,CAACjB,QAAQ,CAACgB,GAAI,CAAC;IAC7BV,MAAM,CAACY,IAAI,CAAC,CAAC;EACf,CAAC;EAED,OAAO;IAAElB,QAAQ;IAAEK,aAAa;IAAEC,MAAM;IAAEC,cAAc;IAAEO;EAAc,CAAC;AAC3E,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["features/voiceRecord/index.ts"],"mappings":";;AAAA,cAAc,6BAA0B;AACxC,cAAc,8BAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createEffect, createEvent, restore, sample } from 'effector';
|
|
4
|
+
export class VoiceRecordModel {
|
|
5
|
+
startRecord = createEvent();
|
|
6
|
+
stop = createEvent();
|
|
7
|
+
deleteFile = createEvent();
|
|
8
|
+
setAudioFilePath = createEvent();
|
|
9
|
+
clearAudioFilePath = createEvent();
|
|
10
|
+
$audioFilePath = restore(this.setAudioFilePath, '').reset(this.clearAudioFilePath);
|
|
11
|
+
constructor({
|
|
12
|
+
showToatInfo,
|
|
13
|
+
showToastError
|
|
14
|
+
}) {
|
|
15
|
+
this.showInfo = showToatInfo;
|
|
16
|
+
this.showError = showToastError;
|
|
17
|
+
sample({
|
|
18
|
+
clock: this.deleteFile,
|
|
19
|
+
target: createEffect(async () => {
|
|
20
|
+
this.clearAudioFilePath();
|
|
21
|
+
showToatInfo('Recording deleted');
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
sample({
|
|
25
|
+
clock: this.startRecord,
|
|
26
|
+
target: createEffect(async () => {
|
|
27
|
+
showToatInfo('Recording started');
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=VoiceRecord.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createEffect","createEvent","restore","sample","VoiceRecordModel","startRecord","stop","deleteFile","setAudioFilePath","clearAudioFilePath","$audioFilePath","reset","constructor","showToatInfo","showToastError","showInfo","showError","clock","target"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/model/VoiceRecord.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,UAAU;AAQrE,OAAO,MAAMC,gBAAgB,CAAC;EACZC,WAAW,GAAGJ,WAAW,CAAC,CAAC;EAC3BK,IAAI,GAAGL,WAAW,CAAC,CAAC;EAEpBM,UAAU,GAAGN,WAAW,CAAC,CAAC;EAE1BO,gBAAgB,GAAGP,WAAW,CAAS,CAAC;EACxCQ,kBAAkB,GAAGR,WAAW,CAAC,CAAC;EAClCS,cAAc,GAAGR,OAAO,CAAC,IAAI,CAACM,gBAAgB,EAAE,EAAE,CAAC,CAACG,KAAK,CAAC,IAAI,CAACF,kBAAkB,CAAC;EAKlGG,WAAWA,CAAC;IAAEC,YAAY;IAAEC;EAAuC,CAAC,EAAE;IACpE,IAAI,CAACC,QAAQ,GAAGF,YAAY;IAC5B,IAAI,CAACG,SAAS,GAAGF,cAAc;IAE/BX,MAAM,CAAC;MACLc,KAAK,EAAE,IAAI,CAACV,UAAU;MACtBW,MAAM,EAAElB,YAAY,CAAC,YAAY;QAC/B,IAAI,CAACS,kBAAkB,CAAC,CAAC;QACzBI,YAAY,CAAC,mBAAmB,CAAC;MACnC,CAAC;IACH,CAAC,CAAC;IAEFV,MAAM,CAAC;MACLc,KAAK,EAAE,IAAI,CAACZ,WAAW;MACvBa,MAAM,EAAElB,YAAY,CAAC,YAAY;QAC/Ba,YAAY,CAAC,mBAAmB,CAAC;MACnC,CAAC;IACH,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VoiceRecordApi"],"sourceRoot":"../../../../../src","sources":["features/voiceRecord/model/VoiceRecordApi.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,CAAC","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export * from "./features/gifCelebrations/index.js";
|
|
|
12
12
|
export * from "./features/exampleSolution/index.js";
|
|
13
13
|
export * from "./features/keyboard/index.js";
|
|
14
14
|
export * from "./shared/icons/index.js";
|
|
15
|
+
export * from "./features/voiceRecord/index.js";
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,yBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,yBAAgB;AAC9B,cAAc,iCAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
4
|
+
type VoiceRecordProps = {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
model: VoiceRecordModel;
|
|
7
|
+
};
|
|
8
|
+
export declare const VoiceRecord: ({ style, model }: VoiceRecordProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VoiceRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecord.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAA;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAG7D,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,EAAE,gBAAgB,CAAA;CACxB,CAAA;AAOD,eAAO,MAAM,WAAW,qBAAsB,gBAAgB,sBAsC7D,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonStyle } from '@magmamath/react-native-ui';
|
|
3
|
+
type VoiceRecordButtonProps = {
|
|
4
|
+
style?: ButtonStyle;
|
|
5
|
+
onPress?: () => void;
|
|
6
|
+
isRecording: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const VoiceRecordButton: ({ style, onPress, isRecording }: VoiceRecordButtonProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VoiceRecordButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,EAIL,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAInC,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,oCAAqC,sBAAsB,sBA0BxF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordDelete.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordDelete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,sBAAsB,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,gBAAiB,sBAAsB,sBAMpE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordDevider.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordDevider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,kBAAkB,yBAE9B,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type VoiceRecordTimerProps = {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
time: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const VoiceRecordTimer: ({ style, time }: VoiceRecordTimerProps) => React.JSX.Element;
|
|
8
|
+
export default VoiceRecordTimer;
|
|
9
|
+
//# sourceMappingURL=VoiceRecordTimer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordTimer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordTimer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAE3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,eAAO,MAAM,gBAAgB,oBAAqB,qBAAqB,sBAMtE,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AudioRecorder } from 'expo-audio';
|
|
2
|
+
export declare const ensureRecordingPermissions: () => Promise<boolean>;
|
|
3
|
+
export declare const getAvailableInputs: (recorder: AudioRecorder) => Promise<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
|
|
4
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EAGd,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,0BAA0B,wBAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,aAAoB,aAAa,uEAW/D,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
2
|
+
export declare const useVoiceRecorder: (model: VoiceRecordModel) => {
|
|
3
|
+
recorder: import("expo-audio").AudioRecorder;
|
|
4
|
+
recorderState: import("expo-audio").RecorderState;
|
|
5
|
+
player: import("expo-audio").AudioPlayer;
|
|
6
|
+
startRecording: () => Promise<void>;
|
|
7
|
+
stopRecording: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useVoiceRecorder.hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.hook.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorder.hook.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,eAAO,MAAM,gBAAgB,UAAW,gBAAgB;;;;;;CA6BvD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type VoiceRecordModelParams = {
|
|
2
|
+
showToatInfo: (message: string) => void;
|
|
3
|
+
showToastError: (message: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare class VoiceRecordModel {
|
|
6
|
+
readonly startRecord: import("effector").EventCallable<void>;
|
|
7
|
+
readonly stop: import("effector").EventCallable<void>;
|
|
8
|
+
readonly deleteFile: import("effector").EventCallable<void>;
|
|
9
|
+
readonly setAudioFilePath: import("effector").EventCallable<string>;
|
|
10
|
+
readonly clearAudioFilePath: import("effector").EventCallable<void>;
|
|
11
|
+
readonly $audioFilePath: import("effector").StoreWritable<string>;
|
|
12
|
+
readonly showInfo: (message: string) => void;
|
|
13
|
+
readonly showError: (message: string) => void;
|
|
14
|
+
constructor({ showToatInfo, showToastError }: VoiceRecordModelParams);
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=VoiceRecord.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecord.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecord.model.ts"],"names":[],"mappings":"AAGA,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,WAAW,yCAAgB;IAC3C,SAAgB,IAAI,yCAAgB;IAEpC,SAAgB,UAAU,yCAAgB;IAE1C,SAAgB,gBAAgB,2CAAwB;IACxD,SAAgB,kBAAkB,yCAAgB;IAClD,SAAgB,cAAc,2CAAoE;IAElG,SAAgB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,SAAgB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;gBAExC,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,sBAAsB;CAmBrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecordApi.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
4
|
+
type VoiceRecordProps = {
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
model: VoiceRecordModel;
|
|
7
|
+
};
|
|
8
|
+
export declare const VoiceRecord: ({ style, model }: VoiceRecordProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VoiceRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecord.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecord.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAA;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAG7D,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,EAAE,gBAAgB,CAAA;CACxB,CAAA;AAOD,eAAO,MAAM,WAAW,qBAAsB,gBAAgB,sBAsC7D,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonStyle } from '@magmamath/react-native-ui';
|
|
3
|
+
type VoiceRecordButtonProps = {
|
|
4
|
+
style?: ButtonStyle;
|
|
5
|
+
onPress?: () => void;
|
|
6
|
+
isRecording: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const VoiceRecordButton: ({ style, onPress, isRecording }: VoiceRecordButtonProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=VoiceRecordButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,EAIL,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAInC,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,oCAAqC,sBAAsB,sBA0BxF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordDelete.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordDelete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,sBAAsB,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,gBAAiB,sBAAsB,sBAMpE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordDevider.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordDevider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,kBAAkB,yBAE9B,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type VoiceRecordTimerProps = {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
time: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const VoiceRecordTimer: ({ style, time }: VoiceRecordTimerProps) => React.JSX.Element;
|
|
8
|
+
export default VoiceRecordTimer;
|
|
9
|
+
//# sourceMappingURL=VoiceRecordTimer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordTimer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/components/VoiceRecordTimer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAE3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,eAAO,MAAM,gBAAgB,oBAAqB,qBAAqB,sBAMtE,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AudioRecorder } from 'expo-audio';
|
|
2
|
+
export declare const ensureRecordingPermissions: () => Promise<boolean>;
|
|
3
|
+
export declare const getAvailableInputs: (recorder: AudioRecorder) => Promise<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
|
|
4
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EAGd,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,0BAA0B,wBAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,aAAoB,aAAa,uEAW/D,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
2
|
+
export declare const useVoiceRecorder: (model: VoiceRecordModel) => {
|
|
3
|
+
recorder: import("expo-audio").AudioRecorder;
|
|
4
|
+
recorderState: import("expo-audio").RecorderState;
|
|
5
|
+
player: import("expo-audio").AudioPlayer;
|
|
6
|
+
startRecording: () => Promise<void>;
|
|
7
|
+
stopRecording: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useVoiceRecorder.hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.hook.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorder.hook.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,eAAO,MAAM,gBAAgB,UAAW,gBAAgB;;;;;;CA6BvD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type VoiceRecordModelParams = {
|
|
2
|
+
showToatInfo: (message: string) => void;
|
|
3
|
+
showToastError: (message: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare class VoiceRecordModel {
|
|
6
|
+
readonly startRecord: import("effector").EventCallable<void>;
|
|
7
|
+
readonly stop: import("effector").EventCallable<void>;
|
|
8
|
+
readonly deleteFile: import("effector").EventCallable<void>;
|
|
9
|
+
readonly setAudioFilePath: import("effector").EventCallable<string>;
|
|
10
|
+
readonly clearAudioFilePath: import("effector").EventCallable<void>;
|
|
11
|
+
readonly $audioFilePath: import("effector").StoreWritable<string>;
|
|
12
|
+
readonly showInfo: (message: string) => void;
|
|
13
|
+
readonly showError: (message: string) => void;
|
|
14
|
+
constructor({ showToatInfo, showToastError }: VoiceRecordModelParams);
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=VoiceRecord.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecord.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecord.model.ts"],"names":[],"mappings":"AAGA,KAAK,sBAAsB,GAAG;IAC5B,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,WAAW,yCAAgB;IAC3C,SAAgB,IAAI,yCAAgB;IAEpC,SAAgB,UAAU,yCAAgB;IAE1C,SAAgB,gBAAgB,2CAAwB;IACxD,SAAgB,kBAAkB,yCAAgB;IAClD,SAAgB,cAAc,2CAAoE;IAElG,SAAgB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,SAAgB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;gBAExC,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,sBAAsB;CAmBrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecordApi.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.107-rc.1",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"react-native-gesture-handler": "*",
|
|
27
27
|
"react-native-modalfy": "*",
|
|
28
28
|
"react-native-reanimated": ">=0.3.16",
|
|
29
|
-
"react-native-svg": "^15.10.0"
|
|
29
|
+
"react-native-svg": "^15.10.0",
|
|
30
|
+
"expo-audio": "^1.1.1",
|
|
31
|
+
"expo": ">=52.0.47"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
|
-
"@magmamath/react-native-ui": "0.4.
|
|
34
|
+
"@magmamath/react-native-ui": "0.4.75",
|
|
33
35
|
"@react-native/eslint-config": "^0.73.1",
|
|
34
36
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
35
37
|
"@types/jest": "^29.5.5",
|
|
@@ -40,6 +42,8 @@
|
|
|
40
42
|
"eslint": "^8.51.0",
|
|
41
43
|
"eslint-config-prettier": "^9.0.0",
|
|
42
44
|
"eslint-plugin-prettier": "^5.0.1",
|
|
45
|
+
"expo": "^52.0.47",
|
|
46
|
+
"expo-audio": "^1.1.1",
|
|
43
47
|
"jest": "^29.7.0",
|
|
44
48
|
"prettier": "^3.0.3",
|
|
45
49
|
"react": "18.3.1",
|