@hexar/biometric-identity-sdk-react-native 1.6.0 → 1.8.0
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/components/ValidationProgress.d.ts.map +1 -1
- package/dist/components/ValidationProgress.js +9 -2
- package/dist/components/VideoRecorder.d.ts.map +1 -1
- package/dist/components/VideoRecorder.js +2 -8
- package/package.json +1 -1
- package/src/components/ValidationProgress.tsx +12 -2
- package/src/components/VideoRecorder.tsx +2 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationProgress.d.ts","sourceRoot":"","sources":["../../src/components/ValidationProgress.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA2B,MAAM,oCAAoC,CAAC;AAE7G,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ValidationProgress.d.ts","sourceRoot":"","sources":["../../src/components/ValidationProgress.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA2B,MAAM,oCAAoC,CAAC;AAE7G,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAyGhE,CAAC;AA2DF,eAAe,kBAAkB,CAAC"}
|
|
@@ -55,10 +55,10 @@ const ValidationProgress = ({ progress, theme, language = 'en', }) => {
|
|
|
55
55
|
// Start animation from 0 to 90% over 60 seconds (1 minute) - only once
|
|
56
56
|
if (!hasStartedAnimation.current) {
|
|
57
57
|
hasStartedAnimation.current = true;
|
|
58
|
-
// Start animation to 90% over
|
|
58
|
+
// Start animation to 90% over 70 seconds, regardless of backend progress
|
|
59
59
|
animationRef.current = react_native_1.Animated.timing(animatedProgress, {
|
|
60
60
|
toValue: 90,
|
|
61
|
-
duration:
|
|
61
|
+
duration: 70000, // 70 seconds
|
|
62
62
|
useNativeDriver: false,
|
|
63
63
|
});
|
|
64
64
|
animationRef.current.start();
|
|
@@ -93,6 +93,7 @@ const ValidationProgress = ({ progress, theme, language = 'en', }) => {
|
|
|
93
93
|
react_1.default.createElement(react_native_1.ActivityIndicator, { size: "large", color: theme?.primaryColor || '#6366F1' }),
|
|
94
94
|
react_1.default.createElement(react_native_1.Text, { style: [styles.title, { color: theme?.textColor || '#000000' }] }, strings.validation.title || 'Validating Identity'),
|
|
95
95
|
react_1.default.createElement(react_native_1.Text, { style: [styles.statusText, { color: theme?.secondaryTextColor || '#6B7280' }] }, strings.validation.validatingDocumentAndFace || 'Validando documento y rostro...'),
|
|
96
|
+
react_1.default.createElement(react_native_1.Text, { style: [styles.doNotLockText, { color: theme?.secondaryTextColor || '#6B7280' }] }, strings.validation.doNotLockScreen || 'No bloquees la pantalla'),
|
|
96
97
|
react_1.default.createElement(react_native_1.View, { style: styles.progressBarContainer },
|
|
97
98
|
react_1.default.createElement(react_native_1.View, { style: styles.progressBar },
|
|
98
99
|
react_1.default.createElement(react_native_1.Animated.View, { style: [
|
|
@@ -127,6 +128,12 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
127
128
|
},
|
|
128
129
|
statusText: {
|
|
129
130
|
fontSize: 16,
|
|
131
|
+
marginBottom: 8,
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
},
|
|
134
|
+
doNotLockText: {
|
|
135
|
+
fontSize: 14,
|
|
136
|
+
fontWeight: '600',
|
|
130
137
|
marginBottom: 32,
|
|
131
138
|
textAlign: 'center',
|
|
132
139
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../src/components/VideoRecorder.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAmC,MAAM,oCAAoC,CAAC;AAE1I,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,UAAU,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACtD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO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AE,OAAO,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2CD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAm6BtD,CAAC;AA6OF,eAAe,aAAa,CAAC"}
|
|
@@ -59,15 +59,9 @@ const getDefaultChallenges = (strings) => [
|
|
|
59
59
|
{
|
|
60
60
|
action: 'blink',
|
|
61
61
|
instruction: strings.liveness.instructions.blink || 'Blink your eyes naturally',
|
|
62
|
-
duration_ms:
|
|
62
|
+
duration_ms: 2000,
|
|
63
63
|
order: 3,
|
|
64
64
|
},
|
|
65
|
-
{
|
|
66
|
-
action: 'smile',
|
|
67
|
-
instruction: strings.liveness.instructions.smile || 'Smile',
|
|
68
|
-
duration_ms: 1800,
|
|
69
|
-
order: 4,
|
|
70
|
-
},
|
|
71
65
|
];
|
|
72
66
|
const getInstructionMap = (strings) => {
|
|
73
67
|
if (!strings || !strings.liveness || !strings.liveness.instructions) {
|
|
@@ -353,7 +347,7 @@ const VideoRecorder = ({ theme, language, duration, instructions, challenges: pr
|
|
|
353
347
|
framesRef.current = [];
|
|
354
348
|
let consecutiveErrors = 0;
|
|
355
349
|
const maxConsecutiveErrors = 10;
|
|
356
|
-
const MAX_FRAMES =
|
|
350
|
+
const MAX_FRAMES = 150;
|
|
357
351
|
// Serial capture: each frame is captured only after the previous one
|
|
358
352
|
// finishes, preventing overlapping takePhoto() calls that cause the
|
|
359
353
|
// camera to throw "busy" errors and kill the capture loop.
|
package/package.json
CHANGED
|
@@ -40,10 +40,10 @@ export const ValidationProgress: React.FC<ValidationProgressProps> = ({
|
|
|
40
40
|
if (!hasStartedAnimation.current) {
|
|
41
41
|
hasStartedAnimation.current = true;
|
|
42
42
|
|
|
43
|
-
// Start animation to 90% over
|
|
43
|
+
// Start animation to 90% over 70 seconds, regardless of backend progress
|
|
44
44
|
animationRef.current = Animated.timing(animatedProgress, {
|
|
45
45
|
toValue: 90,
|
|
46
|
-
duration:
|
|
46
|
+
duration: 70000, // 70 seconds
|
|
47
47
|
useNativeDriver: false,
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -96,6 +96,10 @@ export const ValidationProgress: React.FC<ValidationProgressProps> = ({
|
|
|
96
96
|
{strings.validation.validatingDocumentAndFace || 'Validando documento y rostro...'}
|
|
97
97
|
</Text>
|
|
98
98
|
|
|
99
|
+
<Text style={[styles.doNotLockText, { color: theme?.secondaryTextColor || '#6B7280' }]}>
|
|
100
|
+
{strings.validation.doNotLockScreen || 'No bloquees la pantalla'}
|
|
101
|
+
</Text>
|
|
102
|
+
|
|
99
103
|
{/* Progress Bar */}
|
|
100
104
|
<View style={styles.progressBarContainer}>
|
|
101
105
|
<View style={styles.progressBar}>
|
|
@@ -141,6 +145,12 @@ const styles = StyleSheet.create({
|
|
|
141
145
|
},
|
|
142
146
|
statusText: {
|
|
143
147
|
fontSize: 16,
|
|
148
|
+
marginBottom: 8,
|
|
149
|
+
textAlign: 'center',
|
|
150
|
+
},
|
|
151
|
+
doNotLockText: {
|
|
152
|
+
fontSize: 14,
|
|
153
|
+
fontWeight: '600',
|
|
144
154
|
marginBottom: 32,
|
|
145
155
|
textAlign: 'center',
|
|
146
156
|
},
|
|
@@ -72,15 +72,9 @@ const getDefaultChallenges = (strings: any): ChallengeAction[] => [
|
|
|
72
72
|
{
|
|
73
73
|
action: 'blink',
|
|
74
74
|
instruction: strings.liveness.instructions.blink || 'Blink your eyes naturally',
|
|
75
|
-
duration_ms:
|
|
75
|
+
duration_ms: 2000,
|
|
76
76
|
order: 3,
|
|
77
77
|
},
|
|
78
|
-
{
|
|
79
|
-
action: 'smile',
|
|
80
|
-
instruction: strings.liveness.instructions.smile || 'Smile',
|
|
81
|
-
duration_ms: 1800,
|
|
82
|
-
order: 4,
|
|
83
|
-
},
|
|
84
78
|
];
|
|
85
79
|
|
|
86
80
|
const getInstructionMap = (strings: any): Record<string, { text: string; icon?: string }> => {
|
|
@@ -421,7 +415,7 @@ export const VideoRecorder: React.FC<VideoRecorderProps> = ({
|
|
|
421
415
|
framesRef.current = [];
|
|
422
416
|
let consecutiveErrors = 0;
|
|
423
417
|
const maxConsecutiveErrors = 10;
|
|
424
|
-
const MAX_FRAMES =
|
|
418
|
+
const MAX_FRAMES = 150;
|
|
425
419
|
|
|
426
420
|
// Serial capture: each frame is captured only after the previous one
|
|
427
421
|
// finishes, preventing overlapping takePhoto() calls that cause the
|