biometry-react-components 1.2.0 → 1.2.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/index.esm.js +8 -8
- package/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7681,7 +7681,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7681
7681
|
const [state, setState] = useState('preparation');
|
|
7682
7682
|
const [prepTimer, setPrepTimer] = useState(PREP_SECONDS);
|
|
7683
7683
|
const [recordTimer, setRecordTimer] = useState(RECORD_SECONDS);
|
|
7684
|
-
const [digits, setDigits] = useState(generateRandomDigits(
|
|
7684
|
+
const [digits, setDigits] = useState(generateRandomDigits(10));
|
|
7685
7685
|
const [audioLevel, setAudioLevel] = useState(0);
|
|
7686
7686
|
const [waveformData, setWaveformData] = useState([]);
|
|
7687
7687
|
const { permission, stream, stopStreamTracks, requestPermissions, isLoading } = useAudioPermissions();
|
|
@@ -7768,7 +7768,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7768
7768
|
}
|
|
7769
7769
|
}, [state, recordTimer]);
|
|
7770
7770
|
const startRecording = async () => {
|
|
7771
|
-
setDigits(generateRandomDigits(
|
|
7771
|
+
setDigits(generateRandomDigits(10));
|
|
7772
7772
|
setRecordTimer(RECORD_SECONDS);
|
|
7773
7773
|
setState('countdown');
|
|
7774
7774
|
};
|
|
@@ -7865,16 +7865,16 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7865
7865
|
const numberRow = {
|
|
7866
7866
|
display: 'flex',
|
|
7867
7867
|
justifyContent: 'center',
|
|
7868
|
-
gap:
|
|
7868
|
+
gap: 6,
|
|
7869
7869
|
margin: '16px 0 24px 0',
|
|
7870
7870
|
};
|
|
7871
7871
|
const numberBox = {
|
|
7872
|
-
minWidth:
|
|
7873
|
-
minHeight:
|
|
7872
|
+
minWidth: 24,
|
|
7873
|
+
minHeight: 32,
|
|
7874
7874
|
background: '#f5f5f5',
|
|
7875
7875
|
border: '2px solid #333',
|
|
7876
|
-
borderRadius:
|
|
7877
|
-
fontSize:
|
|
7876
|
+
borderRadius: 4,
|
|
7877
|
+
fontSize: 16,
|
|
7878
7878
|
fontWeight: 600,
|
|
7879
7879
|
color: '#333',
|
|
7880
7880
|
display: 'flex',
|
|
@@ -7983,7 +7983,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7983
7983
|
justifyContent: 'center',
|
|
7984
7984
|
height: '120px',
|
|
7985
7985
|
gap: '2px',
|
|
7986
|
-
}, children: waveformData.map((value, index) => (jsx("div", { style: waveformBar(value / 255) }, index))) }) }), jsx("div", { style: timerStyle, children: recordTimer }), jsx("div", { style: guidanceText, children: "Speak clearly into your microphone" })] }))] })] }), jsx("div", { style: numberRow, children: (state === 'recording' ? digits : Array(
|
|
7986
|
+
}, children: waveformData.map((value, index) => (jsx("div", { style: waveformBar(value / 255) }, index))) }) }), jsx("div", { style: timerStyle, children: recordTimer }), jsx("div", { style: guidanceText, children: "Speak clearly into your microphone" })] }))] })] }), jsx("div", { style: numberRow, children: (state === 'recording' ? digits : Array(10).fill('*')).map((num, i) => (jsx("div", { style: numberBox, children: num }, i))) }), state === 'preparation' && (jsx("button", { type: "button", style: actionButton, onClick: startRecording, children: "Start recording" })), state === 'recording' && (jsx("button", { type: "button", style: { ...actionButton, background: '#d32f2f' }, onClick: handleCancel, children: "Cancel" }))] })), state === 'processing' && (jsx(Fragment, { children: jsx("div", { className: "voicerecorder-processing", style: preview, children: jsxs("div", { style: {
|
|
7987
7987
|
display: 'flex',
|
|
7988
7988
|
flexDirection: 'column',
|
|
7989
7989
|
alignItems: 'center',
|
package/dist/index.js
CHANGED
|
@@ -7681,7 +7681,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7681
7681
|
const [state, setState] = react.useState('preparation');
|
|
7682
7682
|
const [prepTimer, setPrepTimer] = react.useState(PREP_SECONDS);
|
|
7683
7683
|
const [recordTimer, setRecordTimer] = react.useState(RECORD_SECONDS);
|
|
7684
|
-
const [digits, setDigits] = react.useState(generateRandomDigits(
|
|
7684
|
+
const [digits, setDigits] = react.useState(generateRandomDigits(10));
|
|
7685
7685
|
const [audioLevel, setAudioLevel] = react.useState(0);
|
|
7686
7686
|
const [waveformData, setWaveformData] = react.useState([]);
|
|
7687
7687
|
const { permission, stream, stopStreamTracks, requestPermissions, isLoading } = useAudioPermissions();
|
|
@@ -7768,7 +7768,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7768
7768
|
}
|
|
7769
7769
|
}, [state, recordTimer]);
|
|
7770
7770
|
const startRecording = async () => {
|
|
7771
|
-
setDigits(generateRandomDigits(
|
|
7771
|
+
setDigits(generateRandomDigits(10));
|
|
7772
7772
|
setRecordTimer(RECORD_SECONDS);
|
|
7773
7773
|
setState('countdown');
|
|
7774
7774
|
};
|
|
@@ -7865,16 +7865,16 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7865
7865
|
const numberRow = {
|
|
7866
7866
|
display: 'flex',
|
|
7867
7867
|
justifyContent: 'center',
|
|
7868
|
-
gap:
|
|
7868
|
+
gap: 6,
|
|
7869
7869
|
margin: '16px 0 24px 0',
|
|
7870
7870
|
};
|
|
7871
7871
|
const numberBox = {
|
|
7872
|
-
minWidth:
|
|
7873
|
-
minHeight:
|
|
7872
|
+
minWidth: 24,
|
|
7873
|
+
minHeight: 32,
|
|
7874
7874
|
background: '#f5f5f5',
|
|
7875
7875
|
border: '2px solid #333',
|
|
7876
|
-
borderRadius:
|
|
7877
|
-
fontSize:
|
|
7876
|
+
borderRadius: 4,
|
|
7877
|
+
fontSize: 16,
|
|
7878
7878
|
fontWeight: 600,
|
|
7879
7879
|
color: '#333',
|
|
7880
7880
|
display: 'flex',
|
|
@@ -7983,7 +7983,7 @@ const VoiceRecorder = ({ rectWidth = 360, rectHeight, onCapture, className, styl
|
|
|
7983
7983
|
justifyContent: 'center',
|
|
7984
7984
|
height: '120px',
|
|
7985
7985
|
gap: '2px',
|
|
7986
|
-
}, children: waveformData.map((value, index) => (jsxRuntime.jsx("div", { style: waveformBar(value / 255) }, index))) }) }), jsxRuntime.jsx("div", { style: timerStyle, children: recordTimer }), jsxRuntime.jsx("div", { style: guidanceText, children: "Speak clearly into your microphone" })] }))] })] }), jsxRuntime.jsx("div", { style: numberRow, children: (state === 'recording' ? digits : Array(
|
|
7986
|
+
}, children: waveformData.map((value, index) => (jsxRuntime.jsx("div", { style: waveformBar(value / 255) }, index))) }) }), jsxRuntime.jsx("div", { style: timerStyle, children: recordTimer }), jsxRuntime.jsx("div", { style: guidanceText, children: "Speak clearly into your microphone" })] }))] })] }), jsxRuntime.jsx("div", { style: numberRow, children: (state === 'recording' ? digits : Array(10).fill('*')).map((num, i) => (jsxRuntime.jsx("div", { style: numberBox, children: num }, i))) }), state === 'preparation' && (jsxRuntime.jsx("button", { type: "button", style: actionButton, onClick: startRecording, children: "Start recording" })), state === 'recording' && (jsxRuntime.jsx("button", { type: "button", style: { ...actionButton, background: '#d32f2f' }, onClick: handleCancel, children: "Cancel" }))] })), state === 'processing' && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { className: "voicerecorder-processing", style: preview, children: jsxRuntime.jsxs("div", { style: {
|
|
7987
7987
|
display: 'flex',
|
|
7988
7988
|
flexDirection: 'column',
|
|
7989
7989
|
alignItems: 'center',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biometry-react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React UI component library for capturing high-quality biometric data (voice, face, documents, video) to facilitate integration with Biometry services",
|
|
6
6
|
"main": "dist/index.js",
|