@magmamath/students-features 1.3.12 → 1.3.14
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/recording/components/VoiceRecordButton.js +37 -22
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +39 -24
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +50 -29
- package/.claude/settings.local.json +0 -25
- 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/students-features.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -675
- 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/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -34
- package/yarn.lock +0 -11101
|
@@ -19,6 +19,40 @@ const defaultButtonStyles = {
|
|
|
19
19
|
height: 50
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
+
const AdvancedButton = ({
|
|
23
|
+
isRecording,
|
|
24
|
+
disabled,
|
|
25
|
+
onPressIn
|
|
26
|
+
}) => {
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
28
|
+
style: [styles.advancedButtonContainer, disabled && styles.disabledCursor],
|
|
29
|
+
onPressIn: onPressIn,
|
|
30
|
+
disabled: disabled,
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
32
|
+
customColorScheme: {
|
|
33
|
+
[_reactNativeUi.ButtonStates.ACTIVE]: {
|
|
34
|
+
backgroundColor: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
35
|
+
borderColor: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
36
|
+
raiseColor: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
37
|
+
color: _reactNativeUi.COLORS.PRIMARY_BLUE
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
button: styles.advancedButton
|
|
42
|
+
},
|
|
43
|
+
isActive: isRecording,
|
|
44
|
+
variant: _reactNativeUi.ButtonVariant.TERTIARY,
|
|
45
|
+
onPressIn: onPressIn,
|
|
46
|
+
icon: isRecording ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CheckIcon, {
|
|
47
|
+
size: 25,
|
|
48
|
+
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
49
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.MicrophoneIcon, {
|
|
50
|
+
style: styles.advancedMicrophoneIcon,
|
|
51
|
+
color: disabled ? _reactNativeUi.COLORS.NEUTRAL_5 : isRecording ? _reactNativeUi.COLORS.NEUTRAL_1 : _reactNativeUi.COLORS.NEUTRAL_9
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
22
56
|
const VoiceRecordButton = ({
|
|
23
57
|
model,
|
|
24
58
|
buttonVariant
|
|
@@ -29,7 +63,6 @@ const VoiceRecordButton = ({
|
|
|
29
63
|
const isButtonDisabled = (0, _effectorReact.useUnit)(model.$isButtonDisabled);
|
|
30
64
|
const isInitializing = (0, _effectorReact.useUnit)(model.initializeRecording.pending);
|
|
31
65
|
const isRecording = voiceRecordState === _constants.VoiceRecorderState.RECORDING;
|
|
32
|
-
const isIdle = voiceRecordState === _constants.VoiceRecorderState.IDLE;
|
|
33
66
|
const hasInputs = availableInputs.length > 0;
|
|
34
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
35
68
|
onPressIn: e => {
|
|
@@ -41,7 +74,6 @@ const VoiceRecordButton = ({
|
|
|
41
74
|
style: [isButtonDisabled ? styles.disabledCursor : undefined],
|
|
42
75
|
children: buttonVariant === _types.RecordButtonVariant.ADVANCED ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AdvancedButton, {
|
|
43
76
|
isRecording: isRecording,
|
|
44
|
-
isIdle: isIdle,
|
|
45
77
|
disabled: isButtonDisabled,
|
|
46
78
|
onPressIn: () => model.recorderButtonHandler()
|
|
47
79
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
@@ -60,26 +92,6 @@ const VoiceRecordButton = ({
|
|
|
60
92
|
});
|
|
61
93
|
};
|
|
62
94
|
exports.VoiceRecordButton = VoiceRecordButton;
|
|
63
|
-
const AdvancedButton = ({
|
|
64
|
-
isRecording,
|
|
65
|
-
isIdle,
|
|
66
|
-
disabled,
|
|
67
|
-
onPressIn
|
|
68
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
69
|
-
style: [styles.advancedButtonContainer, disabled && styles.disabledCursor],
|
|
70
|
-
onPressIn: onPressIn,
|
|
71
|
-
disabled: disabled,
|
|
72
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
73
|
-
style: [styles.advancedIconContainer, !isIdle && styles.advancedIconContainerActive],
|
|
74
|
-
children: isRecording ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CheckIcon, {
|
|
75
|
-
size: 18,
|
|
76
|
-
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
77
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.MicrophoneIcon, {
|
|
78
|
-
style: styles.advancedMicrophoneIcon,
|
|
79
|
-
color: disabled ? _reactNativeUi.COLORS.NEUTRAL_5 : isIdle ? _reactNativeUi.COLORS.NEUTRAL_9 : _reactNativeUi.COLORS.NEUTRAL_1
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
});
|
|
83
95
|
const styles = _reactNative.StyleSheet.create({
|
|
84
96
|
advancedButtonContainer: {
|
|
85
97
|
width: 52,
|
|
@@ -115,6 +127,9 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
115
127
|
advancedMicrophoneIcon: {
|
|
116
128
|
width: 14,
|
|
117
129
|
height: 19
|
|
130
|
+
},
|
|
131
|
+
advancedButton: {
|
|
132
|
+
boxShadow: 'none'
|
|
118
133
|
}
|
|
119
134
|
});
|
|
120
135
|
//# sourceMappingURL=VoiceRecordButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_reactNative","_effectorReact","_constants","_index","_types","_jsxRuntime","e","__esModule","default","defaultButtonStyles","button","width","height","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_reactNative","_effectorReact","_constants","_index","_types","_jsxRuntime","e","__esModule","default","defaultButtonStyles","button","width","height","AdvancedButton","isRecording","disabled","onPressIn","jsx","Pressable","style","styles","advancedButtonContainer","disabledCursor","children","Button","customColorScheme","ButtonStates","ACTIVE","backgroundColor","COLORS","PRIMARY_BLUE","borderColor","raiseColor","color","advancedButton","isActive","variant","ButtonVariant","TERTIARY","icon","CheckIcon","size","NEUTRAL_1","MicrophoneIcon","advancedMicrophoneIcon","NEUTRAL_5","NEUTRAL_9","VoiceRecordButton","model","buttonVariant","t","useText","availableInputs","useUnit","recorderModel","$availableInputs","voiceRecordState","$voiceRecordState","isButtonDisabled","$isButtonDisabled","isInitializing","initializeRecording","pending","VoiceRecorderState","RECORDING","hasInputs","length","preventDefault","notification","warning","pointerEvents","undefined","RecordButtonVariant","ADVANCED","recorderButtonHandler","ButtonSize","LARGE","SECONDARY","colorScheme","ButtonColor","WHITE","IS_WEB","microphoneIconWeb","microphoneIconNative","exports","StyleSheet","create","alignItems","justifyContent","borderRadius","BORDER_RADIUS","boxShadow","VOICE_RECORD_SHADOWS","advancedIconContainer","cursor","minWidth","minHeight","advancedIconContainerActive"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecordButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAaA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAA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,EAAEC,4BAAa,CAAC,GAAG,CAAC;IAChCC,SAAS,EAAEC,+BAAoB,CAACpB,0BAAmB,CAACC,QAAQ;EAC9D,CAAC;EACDoB,qBAAqB,EAAE;IACrBlF,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACV6E,YAAY,EAAEC,4BAAa,CAAC,GAAG,CAAC;IAChCF,cAAc,EAAE,QAAQ;IACxBD,UAAU,EAAE;EACd,CAAC;EACDjE,cAAc,EAAE;IACd;IACAwE,MAAM,EAAE;EACV,CAAC;EACDZ,iBAAiB,EAAE;IACjBvE,KAAK,EAAE;EACT,CAAC;EACDwE,oBAAoB,EAAE;IACpBY,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACb,CAAC;EACDC,2BAA2B,EAAE;IAC3BR,YAAY,EAAE,EAAE;IAChB7D,eAAe,EAAEC,qBAAM,CAACC;EAC1B,CAAC;EACDc,sBAAsB,EAAE;IACtBjC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACDsB,cAAc,EAAE;IACdyD,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { BORDER_RADIUS, Button, ButtonColor, ButtonSize, ButtonVariant, CheckIcon, COLORS, IS_WEB, MicrophoneIcon } from '@magmamath/react-native-ui';
|
|
5
|
-
import { Pressable, StyleSheet
|
|
4
|
+
import { BORDER_RADIUS, Button, ButtonColor, ButtonSize, ButtonStates, ButtonVariant, CheckIcon, COLORS, IS_WEB, MicrophoneIcon } from '@magmamath/react-native-ui';
|
|
5
|
+
import { Pressable, StyleSheet } from 'react-native';
|
|
6
6
|
import { useUnit } from 'effector-react';
|
|
7
7
|
import { VOICE_RECORD_SHADOWS, VoiceRecorderState } from "../../constants.js";
|
|
8
8
|
import { useText } from "../../../../shared/translation/index.js";
|
|
@@ -14,6 +14,40 @@ const defaultButtonStyles = {
|
|
|
14
14
|
height: 50
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
+
const AdvancedButton = ({
|
|
18
|
+
isRecording,
|
|
19
|
+
disabled,
|
|
20
|
+
onPressIn
|
|
21
|
+
}) => {
|
|
22
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
23
|
+
style: [styles.advancedButtonContainer, disabled && styles.disabledCursor],
|
|
24
|
+
onPressIn: onPressIn,
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
27
|
+
customColorScheme: {
|
|
28
|
+
[ButtonStates.ACTIVE]: {
|
|
29
|
+
backgroundColor: COLORS.PRIMARY_BLUE,
|
|
30
|
+
borderColor: COLORS.PRIMARY_BLUE,
|
|
31
|
+
raiseColor: COLORS.PRIMARY_BLUE,
|
|
32
|
+
color: COLORS.PRIMARY_BLUE
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
style: {
|
|
36
|
+
button: styles.advancedButton
|
|
37
|
+
},
|
|
38
|
+
isActive: isRecording,
|
|
39
|
+
variant: ButtonVariant.TERTIARY,
|
|
40
|
+
onPressIn: onPressIn,
|
|
41
|
+
icon: isRecording ? /*#__PURE__*/_jsx(CheckIcon, {
|
|
42
|
+
size: 25,
|
|
43
|
+
color: COLORS.NEUTRAL_1
|
|
44
|
+
}) : /*#__PURE__*/_jsx(MicrophoneIcon, {
|
|
45
|
+
style: styles.advancedMicrophoneIcon,
|
|
46
|
+
color: disabled ? COLORS.NEUTRAL_5 : isRecording ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
};
|
|
17
51
|
export const VoiceRecordButton = ({
|
|
18
52
|
model,
|
|
19
53
|
buttonVariant
|
|
@@ -24,7 +58,6 @@ export const VoiceRecordButton = ({
|
|
|
24
58
|
const isButtonDisabled = useUnit(model.$isButtonDisabled);
|
|
25
59
|
const isInitializing = useUnit(model.initializeRecording.pending);
|
|
26
60
|
const isRecording = voiceRecordState === VoiceRecorderState.RECORDING;
|
|
27
|
-
const isIdle = voiceRecordState === VoiceRecorderState.IDLE;
|
|
28
61
|
const hasInputs = availableInputs.length > 0;
|
|
29
62
|
return /*#__PURE__*/_jsx(Pressable, {
|
|
30
63
|
onPressIn: e => {
|
|
@@ -36,7 +69,6 @@ export const VoiceRecordButton = ({
|
|
|
36
69
|
style: [isButtonDisabled ? styles.disabledCursor : undefined],
|
|
37
70
|
children: buttonVariant === RecordButtonVariant.ADVANCED ? /*#__PURE__*/_jsx(AdvancedButton, {
|
|
38
71
|
isRecording: isRecording,
|
|
39
|
-
isIdle: isIdle,
|
|
40
72
|
disabled: isButtonDisabled,
|
|
41
73
|
onPressIn: () => model.recorderButtonHandler()
|
|
42
74
|
}) : /*#__PURE__*/_jsx(Button, {
|
|
@@ -54,26 +86,6 @@ export const VoiceRecordButton = ({
|
|
|
54
86
|
})
|
|
55
87
|
});
|
|
56
88
|
};
|
|
57
|
-
const AdvancedButton = ({
|
|
58
|
-
isRecording,
|
|
59
|
-
isIdle,
|
|
60
|
-
disabled,
|
|
61
|
-
onPressIn
|
|
62
|
-
}) => /*#__PURE__*/_jsx(Pressable, {
|
|
63
|
-
style: [styles.advancedButtonContainer, disabled && styles.disabledCursor],
|
|
64
|
-
onPressIn: onPressIn,
|
|
65
|
-
disabled: disabled,
|
|
66
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
67
|
-
style: [styles.advancedIconContainer, !isIdle && styles.advancedIconContainerActive],
|
|
68
|
-
children: isRecording ? /*#__PURE__*/_jsx(CheckIcon, {
|
|
69
|
-
size: 18,
|
|
70
|
-
color: COLORS.NEUTRAL_1
|
|
71
|
-
}) : /*#__PURE__*/_jsx(MicrophoneIcon, {
|
|
72
|
-
style: styles.advancedMicrophoneIcon,
|
|
73
|
-
color: disabled ? COLORS.NEUTRAL_5 : isIdle ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_1
|
|
74
|
-
})
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
89
|
const styles = StyleSheet.create({
|
|
78
90
|
advancedButtonContainer: {
|
|
79
91
|
width: 52,
|
|
@@ -109,6 +121,9 @@ const styles = StyleSheet.create({
|
|
|
109
121
|
advancedMicrophoneIcon: {
|
|
110
122
|
width: 14,
|
|
111
123
|
height: 19
|
|
124
|
+
},
|
|
125
|
+
advancedButton: {
|
|
126
|
+
boxShadow: 'none'
|
|
112
127
|
}
|
|
113
128
|
});
|
|
114
129
|
//# sourceMappingURL=VoiceRecordButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BORDER_RADIUS","Button","ButtonColor","ButtonSize","ButtonVariant","CheckIcon","COLORS","IS_WEB","MicrophoneIcon","Pressable","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","BORDER_RADIUS","Button","ButtonColor","ButtonSize","ButtonStates","ButtonVariant","CheckIcon","COLORS","IS_WEB","MicrophoneIcon","Pressable","StyleSheet","useUnit","VOICE_RECORD_SHADOWS","VoiceRecorderState","useText","RecordButtonVariant","jsx","_jsx","defaultButtonStyles","button","width","height","AdvancedButton","isRecording","disabled","onPressIn","style","styles","advancedButtonContainer","disabledCursor","children","customColorScheme","ACTIVE","backgroundColor","PRIMARY_BLUE","borderColor","raiseColor","color","advancedButton","isActive","variant","TERTIARY","icon","size","NEUTRAL_1","advancedMicrophoneIcon","NEUTRAL_5","NEUTRAL_9","VoiceRecordButton","model","buttonVariant","t","availableInputs","recorderModel","$availableInputs","voiceRecordState","$voiceRecordState","isButtonDisabled","$isButtonDisabled","isInitializing","initializeRecording","pending","RECORDING","hasInputs","length","e","preventDefault","notification","warning","pointerEvents","undefined","ADVANCED","recorderButtonHandler","LARGE","SECONDARY","colorScheme","WHITE","microphoneIconWeb","microphoneIconNative","create","alignItems","justifyContent","borderRadius","boxShadow","advancedIconContainer","cursor","minWidth","minHeight","advancedIconContainerActive"],"sourceRoot":"../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EAAE;IACrBhE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACV6D,YAAY,EAAEnF,aAAa,CAAC,GAAG,CAAC;IAChCkF,cAAc,EAAE,QAAQ;IACxBD,UAAU,EAAE;EACd,CAAC;EACDnD,cAAc,EAAE;IACd;IACAwD,MAAM,EAAE;EACV,CAAC;EACDR,iBAAiB,EAAE;IACjBzD,KAAK,EAAE;EACT,CAAC;EACD0D,oBAAoB,EAAE;IACpBQ,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACb,CAAC;EACDC,2BAA2B,EAAE;IAC3BN,YAAY,EAAE,EAAE;IAChBjD,eAAe,EAAE3B,MAAM,CAAC4B;EAC1B,CAAC;EACDW,sBAAsB,EAAE;IACtBzB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACDiB,cAAc,EAAE;IACd6C,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAI7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,gBAAgB,CAAA;IACvB,aAAa,EAAE,mBAAmB,CAAA;CACnC,CAAA;AAsDD,eAAO,MAAM,iBAAiB,6BAA8B,sBAAsB,sBAgDjF,CAAA"}
|
package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"VoiceRecordButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/recording/components/VoiceRecordButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAI7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,gBAAgB,CAAA;IACvB,aAAa,EAAE,mBAAmB,CAAA;CACnC,CAAA;AAsDD,eAAO,MAAM,iBAAiB,6BAA8B,sBAAsB,sBAgDjF,CAAA"}
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Button,
|
|
5
5
|
ButtonColor,
|
|
6
6
|
ButtonSize,
|
|
7
|
+
ButtonStates,
|
|
7
8
|
ButtonStyle,
|
|
8
9
|
ButtonVariant,
|
|
9
10
|
CheckIcon,
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
IS_WEB,
|
|
12
13
|
MicrophoneIcon,
|
|
13
14
|
} from '@magmamath/react-native-ui'
|
|
14
|
-
import { Pressable, StyleSheet
|
|
15
|
+
import { Pressable, StyleSheet } from 'react-native'
|
|
15
16
|
import { VoiceRecordModel } from '../model/VoiceRecord.model'
|
|
16
17
|
import { useUnit } from 'effector-react'
|
|
17
18
|
import { VOICE_RECORD_SHADOWS, VoiceRecorderState } from '../../constants'
|
|
@@ -30,6 +31,51 @@ const defaultButtonStyles: ButtonStyle = {
|
|
|
30
31
|
},
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
type AdvancedButtonProps = {
|
|
35
|
+
isRecording: boolean
|
|
36
|
+
disabled: boolean
|
|
37
|
+
onPressIn: () => void
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const AdvancedButton = ({ isRecording, disabled, onPressIn }: AdvancedButtonProps) => {
|
|
41
|
+
return (
|
|
42
|
+
<Pressable
|
|
43
|
+
style={[styles.advancedButtonContainer, disabled && styles.disabledCursor]}
|
|
44
|
+
onPressIn={onPressIn}
|
|
45
|
+
disabled={disabled}
|
|
46
|
+
>
|
|
47
|
+
<Button
|
|
48
|
+
customColorScheme={{
|
|
49
|
+
[ButtonStates.ACTIVE]: {
|
|
50
|
+
backgroundColor: COLORS.PRIMARY_BLUE,
|
|
51
|
+
borderColor: COLORS.PRIMARY_BLUE,
|
|
52
|
+
raiseColor: COLORS.PRIMARY_BLUE,
|
|
53
|
+
color: COLORS.PRIMARY_BLUE,
|
|
54
|
+
},
|
|
55
|
+
}}
|
|
56
|
+
style={{
|
|
57
|
+
button: styles.advancedButton,
|
|
58
|
+
}}
|
|
59
|
+
isActive={isRecording}
|
|
60
|
+
variant={ButtonVariant.TERTIARY}
|
|
61
|
+
onPressIn={onPressIn}
|
|
62
|
+
icon={
|
|
63
|
+
isRecording ? (
|
|
64
|
+
<CheckIcon size={25} color={COLORS.NEUTRAL_1} />
|
|
65
|
+
) : (
|
|
66
|
+
<MicrophoneIcon
|
|
67
|
+
style={styles.advancedMicrophoneIcon}
|
|
68
|
+
color={
|
|
69
|
+
disabled ? COLORS.NEUTRAL_5 : isRecording ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
/>
|
|
75
|
+
</Pressable>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
33
79
|
export const VoiceRecordButton = ({ model, buttonVariant }: VoiceRecordButtonProps) => {
|
|
34
80
|
const t = useText()
|
|
35
81
|
|
|
@@ -39,7 +85,6 @@ export const VoiceRecordButton = ({ model, buttonVariant }: VoiceRecordButtonPro
|
|
|
39
85
|
const isInitializing = useUnit(model.initializeRecording.pending)
|
|
40
86
|
|
|
41
87
|
const isRecording = voiceRecordState === VoiceRecorderState.RECORDING
|
|
42
|
-
const isIdle = voiceRecordState === VoiceRecorderState.IDLE
|
|
43
88
|
const hasInputs = availableInputs.length > 0
|
|
44
89
|
|
|
45
90
|
return (
|
|
@@ -55,7 +100,6 @@ export const VoiceRecordButton = ({ model, buttonVariant }: VoiceRecordButtonPro
|
|
|
55
100
|
{buttonVariant === RecordButtonVariant.ADVANCED ? (
|
|
56
101
|
<AdvancedButton
|
|
57
102
|
isRecording={isRecording}
|
|
58
|
-
isIdle={isIdle}
|
|
59
103
|
disabled={isButtonDisabled}
|
|
60
104
|
onPressIn={() => model.recorderButtonHandler()}
|
|
61
105
|
/>
|
|
@@ -82,32 +126,6 @@ export const VoiceRecordButton = ({ model, buttonVariant }: VoiceRecordButtonPro
|
|
|
82
126
|
)
|
|
83
127
|
}
|
|
84
128
|
|
|
85
|
-
type AdvancedButtonProps = {
|
|
86
|
-
isRecording: boolean
|
|
87
|
-
isIdle: boolean
|
|
88
|
-
disabled: boolean
|
|
89
|
-
onPressIn: () => void
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const AdvancedButton = ({ isRecording, isIdle, disabled, onPressIn }: AdvancedButtonProps) => (
|
|
93
|
-
<Pressable
|
|
94
|
-
style={[styles.advancedButtonContainer, disabled && styles.disabledCursor]}
|
|
95
|
-
onPressIn={onPressIn}
|
|
96
|
-
disabled={disabled}
|
|
97
|
-
>
|
|
98
|
-
<View style={[styles.advancedIconContainer, !isIdle && styles.advancedIconContainerActive]}>
|
|
99
|
-
{isRecording ? (
|
|
100
|
-
<CheckIcon size={18} color={COLORS.NEUTRAL_1} />
|
|
101
|
-
) : (
|
|
102
|
-
<MicrophoneIcon
|
|
103
|
-
style={styles.advancedMicrophoneIcon}
|
|
104
|
-
color={disabled ? COLORS.NEUTRAL_5 : isIdle ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_1}
|
|
105
|
-
/>
|
|
106
|
-
)}
|
|
107
|
-
</View>
|
|
108
|
-
</Pressable>
|
|
109
|
-
)
|
|
110
|
-
|
|
111
129
|
const styles = StyleSheet.create({
|
|
112
130
|
advancedButtonContainer: {
|
|
113
131
|
width: 52,
|
|
@@ -144,4 +162,7 @@ const styles = StyleSheet.create({
|
|
|
144
162
|
width: 14,
|
|
145
163
|
height: 19,
|
|
146
164
|
},
|
|
165
|
+
advancedButton: {
|
|
166
|
+
boxShadow: 'none',
|
|
167
|
+
},
|
|
147
168
|
})
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npx tsc:*)",
|
|
5
|
-
"Bash(find /Users/alesiaskarakhod/Work/students-features -name rn-draw-area -o -name *draw*area*)",
|
|
6
|
-
"Bash(grep:*)",
|
|
7
|
-
"Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f -name \"*.ts*\" ! -path \"*/node_modules/*\" ! -path \"*/.next/*\" ! -path \"*/dist/*\" -exec grep -l \"convertLatexToBrackets\\\\|convertBracketsToLatex\" {})",
|
|
8
|
-
"Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f \\\\\\(-name *.test.ts* -o -name *.spec.ts* \\\\\\))",
|
|
9
|
-
"Bash(ls jest.config* vitest.config* tsconfig*)",
|
|
10
|
-
"Bash(npm ls:*)",
|
|
11
|
-
"Read(//Users/alesiaskarakhod/node_modules/.bin/**)",
|
|
12
|
-
"Bash(yarn add:*)",
|
|
13
|
-
"Bash(npx jest:*)",
|
|
14
|
-
"Bash(node:*)",
|
|
15
|
-
"Bash(npx ts-node:*)",
|
|
16
|
-
"Bash(find /Users/alesiaskarakhod/Work/magmamath-tools/packages -name jest.config.* -o -name *.test.ts -o -name *.test.js -o -name *.spec.ts)",
|
|
17
|
-
"Bash(find /Users/alesiaskarakhod/Work/magmamath-tools/packages -maxdepth 3 -type f \\\\\\(-name *.test.ts -o -name *.spec.ts -o -name *.test.tsx -o -name *.spec.tsx \\\\\\))",
|
|
18
|
-
"Bash(find /Users/alesiaskarakhod/Work/magmamath-tools -type f \\\\\\(-name *.test.ts -o -name *.test.tsx -o -name *.spec.ts -o -name *.spec.tsx \\\\\\))",
|
|
19
|
-
"Bash(yarn test:*)",
|
|
20
|
-
"Bash(npx vitest:*)",
|
|
21
|
-
"Bash(npx tsup:*)",
|
|
22
|
-
"Bash(find /Users/alesiaskarakhod/Work/react-native/node_modules/@magmamath/frontend-config -name *.d.ts -o -name *.js)"
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.eslintignore
DELETED
package/.eslintrc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2020": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:react-hooks/recommended",
|
|
10
|
-
"plugin:storybook/recommended",
|
|
11
|
-
"prettier"
|
|
12
|
-
],
|
|
13
|
-
"parser": "@typescript-eslint/parser",
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"ecmaVersion": "latest",
|
|
16
|
-
"sourceType": "module"
|
|
17
|
-
},
|
|
18
|
-
"plugins": ["react-refresh"],
|
|
19
|
-
"rules": {
|
|
20
|
-
"react-refresh/only-export-components": "warn"
|
|
21
|
-
}
|
|
22
|
-
}
|
package/.gitattributes
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Setup
|
|
2
|
-
description: Setup Node.js and install dependencies
|
|
3
|
-
|
|
4
|
-
inputs:
|
|
5
|
-
npmrc-auth-token:
|
|
6
|
-
required: true
|
|
7
|
-
|
|
8
|
-
runs:
|
|
9
|
-
using: composite
|
|
10
|
-
steps:
|
|
11
|
-
- name: Setup Node.js
|
|
12
|
-
uses: actions/setup-node@v4
|
|
13
|
-
with:
|
|
14
|
-
node-version-file: .nvmrc
|
|
15
|
-
|
|
16
|
-
- name: Create .npmrc
|
|
17
|
-
shell: bash
|
|
18
|
-
run: |
|
|
19
|
-
echo "registry=https://registry.npmjs.org" > .npmrc
|
|
20
|
-
echo "//registry.npmjs.org/:_authToken=${{ inputs.npmrc-auth-token }}" >> .npmrc
|
|
21
|
-
|
|
22
|
-
- name: Cache dependencies
|
|
23
|
-
id: yarn-cache
|
|
24
|
-
uses: actions/cache@v4
|
|
25
|
-
with:
|
|
26
|
-
path: |
|
|
27
|
-
**/node_modules
|
|
28
|
-
.yarn/install-state.gz
|
|
29
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
|
|
30
|
-
restore-keys: |
|
|
31
|
-
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
|
32
|
-
${{ runner.os }}-yarn-
|
|
33
|
-
|
|
34
|
-
- name: Install dependencies
|
|
35
|
-
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
36
|
-
run: yarn install --immutable
|
|
37
|
-
shell: bash
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
merge_group:
|
|
11
|
-
types:
|
|
12
|
-
- checks_requested
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
lint:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: Setup
|
|
22
|
-
uses: ./.github/actions/setup
|
|
23
|
-
with:
|
|
24
|
-
npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
|
|
25
|
-
|
|
26
|
-
- name: Lint files
|
|
27
|
-
run: yarn lint
|
|
28
|
-
|
|
29
|
-
- name: Typecheck files
|
|
30
|
-
run: yarn typecheck
|
|
31
|
-
|
|
32
|
-
test:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
steps:
|
|
35
|
-
- name: Checkout
|
|
36
|
-
uses: actions/checkout@v4
|
|
37
|
-
|
|
38
|
-
- name: Setup
|
|
39
|
-
uses: ./.github/actions/setup
|
|
40
|
-
with:
|
|
41
|
-
npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
|
|
42
|
-
|
|
43
|
-
- name: Run unit tests
|
|
44
|
-
run: yarn test --maxWorkers=2 --coverage
|
|
45
|
-
|
|
46
|
-
build-library:
|
|
47
|
-
runs-on: ubuntu-latest
|
|
48
|
-
steps:
|
|
49
|
-
- name: Checkout
|
|
50
|
-
uses: actions/checkout@v4
|
|
51
|
-
|
|
52
|
-
- name: Setup
|
|
53
|
-
uses: ./.github/actions/setup
|
|
54
|
-
with:
|
|
55
|
-
npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
|
|
56
|
-
|
|
57
|
-
- name: Build package
|
|
58
|
-
run: yarn prepare
|
|
59
|
-
|
|
60
|
-
build-web:
|
|
61
|
-
runs-on: ubuntu-latest
|
|
62
|
-
steps:
|
|
63
|
-
- name: Checkout
|
|
64
|
-
uses: actions/checkout@v4
|
|
65
|
-
|
|
66
|
-
- name: Setup
|
|
67
|
-
uses: ./.github/actions/setup
|
|
68
|
-
with:
|
|
69
|
-
npmrc-auth-token: ${{ secrets.MAGMA_NPMRC_TOKEN }}
|
|
70
|
-
|
|
71
|
-
- name: Build example for Web
|
|
72
|
-
run: |
|
|
73
|
-
yarn example expo export --platform web
|