omnipay-reactnative-sdk 1.2.2-beta.0 → 1.2.2-beta.3

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.
Files changed (129) hide show
  1. package/README.md +45 -136
  2. package/android/build.gradle +13 -0
  3. package/android/src/main/AndroidManifest.xml +5 -0
  4. package/android/src/main/java/com/omniretail/omnipay/LivenessCameraViewManager.java +116 -0
  5. package/android/src/main/java/com/omniretail/omnipay/LivenessDetectionModule.java +588 -0
  6. package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +4 -1
  7. package/ios/LivenessCameraView.h +22 -0
  8. package/ios/LivenessCameraView.m +135 -0
  9. package/ios/LivenessCameraViewManager.h +12 -0
  10. package/ios/LivenessCameraViewManager.m +24 -0
  11. package/ios/LivenessDetectionModule.h +46 -0
  12. package/ios/LivenessDetectionModule.m +603 -0
  13. package/lib/commonjs/components/OmnipayProvider.js +48 -104
  14. package/lib/commonjs/components/OmnipayProvider.js.map +1 -1
  15. package/lib/commonjs/components/OmnipayView.js +11 -14
  16. package/lib/commonjs/components/OmnipayView.js.map +1 -1
  17. package/lib/commonjs/components/biometrics/FaceVerification.js +435 -0
  18. package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -0
  19. package/lib/commonjs/components/biometrics/LivenessCameraView.js +45 -0
  20. package/lib/commonjs/components/biometrics/LivenessCameraView.js.map +1 -0
  21. package/lib/commonjs/components/biometrics/LivenessDetection.js +251 -0
  22. package/lib/commonjs/components/biometrics/LivenessDetection.js.map +1 -0
  23. package/lib/commonjs/components/views/BvnVerification.js +10 -12
  24. package/lib/commonjs/components/views/BvnVerification.js.map +1 -1
  25. package/lib/commonjs/components/views/PaylaterAgreement.js +14 -16
  26. package/lib/commonjs/components/views/PaylaterAgreement.js.map +1 -1
  27. package/lib/commonjs/components/views/Registration.js +13 -11
  28. package/lib/commonjs/components/views/Registration.js.map +1 -1
  29. package/lib/commonjs/functions.js.map +1 -1
  30. package/lib/commonjs/hooks/useOmnipay.js.map +1 -1
  31. package/lib/commonjs/index.js +30 -3
  32. package/lib/commonjs/index.js.map +1 -1
  33. package/lib/commonjs/lib/colors.js +1 -2
  34. package/lib/commonjs/lib/colors.js.map +1 -1
  35. package/lib/commonjs/lib/config.js +2 -4
  36. package/lib/commonjs/lib/config.js.map +1 -1
  37. package/lib/module/components/OmnipayProvider.js +45 -99
  38. package/lib/module/components/OmnipayProvider.js.map +1 -1
  39. package/lib/module/components/OmnipayView.js +9 -10
  40. package/lib/module/components/OmnipayView.js.map +1 -1
  41. package/lib/module/components/biometrics/FaceVerification.js +427 -0
  42. package/lib/module/components/biometrics/FaceVerification.js.map +1 -0
  43. package/lib/module/components/biometrics/LivenessCameraView.js +39 -0
  44. package/lib/module/components/biometrics/LivenessCameraView.js.map +1 -0
  45. package/lib/module/components/biometrics/LivenessDetection.js +245 -0
  46. package/lib/module/components/biometrics/LivenessDetection.js.map +1 -0
  47. package/lib/module/components/views/BvnVerification.js +9 -10
  48. package/lib/module/components/views/BvnVerification.js.map +1 -1
  49. package/lib/module/components/views/PaylaterAgreement.js +13 -14
  50. package/lib/module/components/views/PaylaterAgreement.js.map +1 -1
  51. package/lib/module/components/views/Registration.js +13 -9
  52. package/lib/module/components/views/Registration.js.map +1 -1
  53. package/lib/module/functions.js.map +1 -1
  54. package/lib/module/hooks/useOmnipay.js.map +1 -1
  55. package/lib/module/index.js +5 -0
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/lib/colors.js.map +1 -1
  58. package/lib/module/lib/config.js.map +1 -1
  59. package/lib/typescript/demo/src/App.d.ts +3 -0
  60. package/lib/typescript/demo/src/App.d.ts.map +1 -0
  61. package/lib/typescript/demo/src/Body.d.ts +3 -0
  62. package/lib/typescript/demo/src/Body.d.ts.map +1 -0
  63. package/lib/typescript/demo/src/NotificationsExample.d.ts +4 -0
  64. package/lib/typescript/demo/src/NotificationsExample.d.ts.map +1 -0
  65. package/lib/typescript/{components → src/components}/OmnipayProvider.d.ts +5 -5
  66. package/lib/typescript/src/components/OmnipayProvider.d.ts.map +1 -0
  67. package/lib/typescript/{components → src/components}/OmnipayView.d.ts +1 -3
  68. package/lib/typescript/src/components/OmnipayView.d.ts.map +1 -0
  69. package/lib/typescript/src/components/biometrics/FaceVerification.d.ts +12 -0
  70. package/lib/typescript/src/components/biometrics/FaceVerification.d.ts.map +1 -0
  71. package/lib/typescript/src/components/biometrics/LivenessCameraView.d.ts +22 -0
  72. package/lib/typescript/src/components/biometrics/LivenessCameraView.d.ts.map +1 -0
  73. package/lib/typescript/src/components/biometrics/LivenessDetection.d.ts +73 -0
  74. package/lib/typescript/src/components/biometrics/LivenessDetection.d.ts.map +1 -0
  75. package/lib/typescript/{components → src/components}/views/BvnVerification.d.ts +1 -3
  76. package/lib/typescript/src/components/views/BvnVerification.d.ts.map +1 -0
  77. package/lib/typescript/{components → src/components}/views/PaylaterAgreement.d.ts +2 -4
  78. package/lib/typescript/src/components/views/PaylaterAgreement.d.ts.map +1 -0
  79. package/lib/typescript/{components → src/components}/views/Registration.d.ts +2 -4
  80. package/lib/typescript/src/components/views/Registration.d.ts.map +1 -0
  81. package/lib/typescript/src/functions.d.ts.map +1 -0
  82. package/lib/typescript/src/hooks/useOmnipay.d.ts.map +1 -0
  83. package/lib/typescript/src/index.d.ts +8 -0
  84. package/lib/typescript/src/index.d.ts.map +1 -0
  85. package/lib/typescript/src/lib/colors.d.ts.map +1 -0
  86. package/lib/typescript/src/lib/config.d.ts.map +1 -0
  87. package/omnipay-reactnative-sdk.podspec +47 -0
  88. package/package.json +6 -11
  89. package/src/components/OmnipayProvider.tsx +9 -66
  90. package/src/components/biometrics/FaceVerification.tsx +484 -0
  91. package/src/components/biometrics/LivenessCameraView.tsx +61 -0
  92. package/src/components/biometrics/LivenessDetection.ts +305 -0
  93. package/src/index.tsx +18 -0
  94. package/lib/commonjs/components/FaceVerification.js +0 -755
  95. package/lib/commonjs/components/FaceVerification.js.map +0 -1
  96. package/lib/commonjs/types/faceVerification.js +0 -2
  97. package/lib/commonjs/types/faceVerification.js.map +0 -1
  98. package/lib/commonjs/types/index.js +0 -17
  99. package/lib/commonjs/types/index.js.map +0 -1
  100. package/lib/module/components/FaceVerification.js +0 -746
  101. package/lib/module/components/FaceVerification.js.map +0 -1
  102. package/lib/module/types/faceVerification.js +0 -2
  103. package/lib/module/types/faceVerification.js.map +0 -1
  104. package/lib/module/types/index.js +0 -2
  105. package/lib/module/types/index.js.map +0 -1
  106. package/lib/typescript/components/FaceVerification.d.ts +0 -10
  107. package/lib/typescript/components/FaceVerification.d.ts.map +0 -1
  108. package/lib/typescript/components/OmnipayProvider.d.ts.map +0 -1
  109. package/lib/typescript/components/OmnipayView.d.ts.map +0 -1
  110. package/lib/typescript/components/views/BvnVerification.d.ts.map +0 -1
  111. package/lib/typescript/components/views/PaylaterAgreement.d.ts.map +0 -1
  112. package/lib/typescript/components/views/Registration.d.ts.map +0 -1
  113. package/lib/typescript/functions.d.ts.map +0 -1
  114. package/lib/typescript/hooks/useOmnipay.d.ts.map +0 -1
  115. package/lib/typescript/index.d.ts +0 -5
  116. package/lib/typescript/index.d.ts.map +0 -1
  117. package/lib/typescript/lib/colors.d.ts.map +0 -1
  118. package/lib/typescript/lib/config.d.ts.map +0 -1
  119. package/lib/typescript/types/faceVerification.d.ts +0 -18
  120. package/lib/typescript/types/faceVerification.d.ts.map +0 -1
  121. package/lib/typescript/types/index.d.ts +0 -2
  122. package/lib/typescript/types/index.d.ts.map +0 -1
  123. package/src/components/FaceVerification.tsx +0 -884
  124. package/src/types/faceVerification.ts +0 -27
  125. package/src/types/index.ts +0 -1
  126. /package/lib/typescript/{functions.d.ts → src/functions.d.ts} +0 -0
  127. /package/lib/typescript/{hooks → src/hooks}/useOmnipay.d.ts +0 -0
  128. /package/lib/typescript/{lib → src/lib}/colors.d.ts +0 -0
  129. /package/lib/typescript/{lib → src/lib}/config.d.ts +0 -0
@@ -0,0 +1,427 @@
1
+ import React, { useState, useEffect, useCallback } from 'react';
2
+ import { View, Text, Modal, Dimensions, Platform, StyleSheet, TouchableOpacity, ActivityIndicator } from 'react-native';
3
+ import { LivenessDetection } from './LivenessDetection';
4
+ import LivenessCameraView from './LivenessCameraView';
5
+ const FaceVerification = ({
6
+ onClose,
7
+ onSuccess,
8
+ primaryColor,
9
+ challenges = ['smile', 'blink', 'turn_left'],
10
+ timeout = 300000 // 5 minutes default
11
+ }) => {
12
+ const [detectionState, setDetectionState] = useState('idle');
13
+ const [currentChallenge, setCurrentChallenge] = useState('');
14
+ const [completedChallenges, setCompletedChallenges] = useState([]);
15
+ const [error, setError] = useState('');
16
+ const [isLoading, setIsLoading] = useState(false);
17
+
18
+ // Challenge instruction messages
19
+ const getChallengeInstruction = challenge => {
20
+ switch (challenge) {
21
+ case 'smile':
22
+ return 'Please smile naturally';
23
+ case 'blink':
24
+ return 'Please blink your eyes';
25
+ case 'turn_left':
26
+ return 'Please turn your head to the left';
27
+ case 'turn_right':
28
+ return 'Please turn your head to the right';
29
+ default:
30
+ return 'Please follow the instruction';
31
+ }
32
+ };
33
+ const startLivenessDetection = useCallback(async () => {
34
+ try {
35
+ setDetectionState('starting');
36
+ setIsLoading(true);
37
+ setError('');
38
+
39
+ // Check and request camera permission first
40
+ const hasPermission = await LivenessDetection.checkCameraPermission();
41
+ if (!hasPermission) {
42
+ const granted = await LivenessDetection.requestCameraPermission();
43
+ if (!granted) {
44
+ throw new Error('Camera permission is required for face verification');
45
+ }
46
+ }
47
+ const config = {
48
+ challenges,
49
+ timeout
50
+ };
51
+ await LivenessDetection.startLivenessDetection(config, {
52
+ onChallengeStart: challenge => {
53
+ setCurrentChallenge(challenge);
54
+ setDetectionState('active');
55
+ setIsLoading(false);
56
+ },
57
+ onChallengeSuccess: challenge => {
58
+ setCompletedChallenges(prev => [...prev, challenge]);
59
+ },
60
+ onChallengeFailure: (challenge, reason) => {
61
+ console.warn(`Challenge ${challenge} failed: ${reason}`);
62
+ // Continue with next challenge - the native module handles this
63
+ },
64
+ onAllChallengesComplete: result => {
65
+ setDetectionState('completed');
66
+ setCurrentChallenge('');
67
+ onSuccess(result);
68
+ }
69
+ });
70
+ } catch (err) {
71
+ console.error('Liveness detection error:', err);
72
+ setError(err instanceof Error ? err.message : 'Unknown error occurred');
73
+ setDetectionState('error');
74
+ setIsLoading(false);
75
+ }
76
+ }, [challenges, timeout, onSuccess]);
77
+ const handleClose = useCallback(() => {
78
+ if (detectionState === 'active' || detectionState === 'starting') {
79
+ LivenessDetection.stopDetection();
80
+ }
81
+ onClose();
82
+ }, [detectionState, onClose]);
83
+ const handleRetry = useCallback(() => {
84
+ setDetectionState('idle');
85
+ setError('');
86
+ setCompletedChallenges([]);
87
+ setCurrentChallenge('');
88
+ }, []);
89
+
90
+ // Auto-start detection when component mounts
91
+ useEffect(() => {
92
+ if (detectionState === 'idle') {
93
+ // Small delay to ensure UI is ready
94
+ const timer = setTimeout(() => {
95
+ startLivenessDetection();
96
+ }, 500);
97
+ return () => clearTimeout(timer);
98
+ }
99
+ return undefined;
100
+ }, [detectionState, startLivenessDetection]);
101
+
102
+ // Cleanup on unmount
103
+ useEffect(() => {
104
+ return () => {
105
+ LivenessDetection.cleanup();
106
+ };
107
+ }, []);
108
+ const renderContent = () => {
109
+ if (detectionState === 'error') {
110
+ return /*#__PURE__*/React.createElement(View, {
111
+ style: styles.errorContainer
112
+ }, /*#__PURE__*/React.createElement(Text, {
113
+ style: styles.errorTitle
114
+ }, "Detection Failed"), /*#__PURE__*/React.createElement(Text, {
115
+ style: styles.errorSubtitle
116
+ }, error), /*#__PURE__*/React.createElement(TouchableOpacity, {
117
+ style: [styles.button, {
118
+ backgroundColor: primaryColor
119
+ }],
120
+ onPress: handleRetry
121
+ }, /*#__PURE__*/React.createElement(Text, {
122
+ style: styles.buttonText
123
+ }, "Try Again")));
124
+ }
125
+ if (detectionState === 'completed') {
126
+ return /*#__PURE__*/React.createElement(View, {
127
+ style: styles.successContainer
128
+ }, /*#__PURE__*/React.createElement(Text, {
129
+ style: styles.successTitle
130
+ }, "Verification Complete!"), /*#__PURE__*/React.createElement(Text, {
131
+ style: styles.successSubtitle
132
+ }, "All challenges completed successfully"));
133
+ }
134
+ return /*#__PURE__*/React.createElement(View, {
135
+ style: styles.contentContainer
136
+ }, /*#__PURE__*/React.createElement(View, {
137
+ style: styles.cameraContainer
138
+ }, /*#__PURE__*/React.createElement(LivenessCameraView, {
139
+ style: styles.camera,
140
+ scaleType: "fillCenter",
141
+ onCameraReady: () => console.log('Camera ready'),
142
+ onCameraError: error => {
143
+ console.error('Camera error:', error);
144
+ setError('Camera initialization failed');
145
+ setDetectionState('error');
146
+ }
147
+ }), /*#__PURE__*/React.createElement(View, {
148
+ style: styles.overlay
149
+ }, isLoading ? /*#__PURE__*/React.createElement(View, {
150
+ style: styles.loadingContainer
151
+ }, /*#__PURE__*/React.createElement(ActivityIndicator, {
152
+ size: "large",
153
+ color: primaryColor
154
+ }), /*#__PURE__*/React.createElement(Text, {
155
+ style: styles.loadingText
156
+ }, "Initializing camera...")) : /*#__PURE__*/React.createElement(React.Fragment, null, currentChallenge && /*#__PURE__*/React.createElement(View, {
157
+ style: styles.instructionContainer
158
+ }, /*#__PURE__*/React.createElement(Text, {
159
+ style: styles.instructionText
160
+ }, getChallengeInstruction(currentChallenge))), /*#__PURE__*/React.createElement(View, {
161
+ style: styles.progressContainer
162
+ }, /*#__PURE__*/React.createElement(Text, {
163
+ style: styles.progressText
164
+ }, completedChallenges.length, " / ", challenges.length, " completed"), /*#__PURE__*/React.createElement(View, {
165
+ style: styles.progressBar
166
+ }, /*#__PURE__*/React.createElement(View, {
167
+ style: [styles.progressFill, {
168
+ width: `${completedChallenges.length / challenges.length * 100}%`,
169
+ backgroundColor: primaryColor
170
+ }]
171
+ })))))));
172
+ };
173
+ return /*#__PURE__*/React.createElement(Modal, {
174
+ visible: true,
175
+ transparent: true,
176
+ onRequestClose: handleClose,
177
+ style: styles.modal,
178
+ animationType: "slide"
179
+ }, /*#__PURE__*/React.createElement(View, {
180
+ style: styles.backdrop
181
+ }, /*#__PURE__*/React.createElement(View, {
182
+ style: styles.container
183
+ }, /*#__PURE__*/React.createElement(View, {
184
+ style: styles.header
185
+ }, /*#__PURE__*/React.createElement(Text, {
186
+ style: styles.title
187
+ }, "Face Verification"), /*#__PURE__*/React.createElement(TouchableOpacity, {
188
+ onPress: handleClose,
189
+ style: styles.closeButton
190
+ }, /*#__PURE__*/React.createElement(Text, {
191
+ style: styles.closeText
192
+ }, "\u2715"))), renderContent())));
193
+ };
194
+ export default FaceVerification;
195
+ const styles = StyleSheet.create({
196
+ hide: {
197
+ display: 'none'
198
+ },
199
+ full: {
200
+ flex: 1,
201
+ width: '100%',
202
+ height: '100%'
203
+ },
204
+ webview: {
205
+ flex: 1,
206
+ width: '100%',
207
+ height: Dimensions.get('window').height - 40,
208
+ backgroundColor: 'white',
209
+ borderTopRightRadius: 20,
210
+ borderTopLeftRadius: 20,
211
+ paddingTop: 150
212
+ },
213
+ webviewLoader: {
214
+ zIndex: 3,
215
+ backgroundColor: 'white',
216
+ alignItems: 'center',
217
+ justifyContent: 'center',
218
+ flex: 1,
219
+ width: '100%',
220
+ height: '100%',
221
+ position: 'absolute',
222
+ top: 0,
223
+ left: 0,
224
+ borderTopRightRadius: 20,
225
+ borderTopLeftRadius: 20
226
+ },
227
+ backdrop: {
228
+ backgroundColor: 'rgba(0,0,0,0.48)',
229
+ flex: 1,
230
+ justifyContent: 'flex-end',
231
+ position: 'relative',
232
+ height: '100%'
233
+ },
234
+ container: {
235
+ backgroundColor: 'white',
236
+ borderTopRightRadius: 20,
237
+ borderTopLeftRadius: 20,
238
+ maxHeight: Dimensions.get('window').height - 40,
239
+ flex: 1,
240
+ position: 'relative',
241
+ ...(Platform.OS === 'android' && {
242
+ overflow: 'hidden'
243
+ })
244
+ },
245
+ modal: {
246
+ flex: 1,
247
+ backgroundColor: 'rgba(0,0,0,0.48)',
248
+ height: '100%',
249
+ width: '100%'
250
+ },
251
+ header: {
252
+ flexDirection: 'row',
253
+ justifyContent: 'space-between',
254
+ alignItems: 'center',
255
+ padding: 16,
256
+ borderBottomWidth: 1,
257
+ borderBottomColor: '#f0f0f0'
258
+ },
259
+ title: {
260
+ fontSize: 18,
261
+ fontWeight: '600',
262
+ color: '#333'
263
+ },
264
+ closeButton: {
265
+ width: 30,
266
+ height: 30,
267
+ borderRadius: 15,
268
+ backgroundColor: '#f0f0f0',
269
+ alignItems: 'center',
270
+ justifyContent: 'center'
271
+ },
272
+ closeText: {
273
+ fontSize: 16,
274
+ color: '#666'
275
+ },
276
+ contentContainer: {
277
+ flex: 1
278
+ },
279
+ cameraContainer: {
280
+ flex: 1,
281
+ position: 'relative'
282
+ },
283
+ camera: {
284
+ flex: 1,
285
+ width: '100%',
286
+ height: '100%'
287
+ },
288
+ overlay: {
289
+ position: 'absolute',
290
+ top: 0,
291
+ left: 0,
292
+ right: 0,
293
+ bottom: 0,
294
+ justifyContent: 'space-between',
295
+ alignItems: 'center',
296
+ paddingVertical: 40,
297
+ paddingHorizontal: 20
298
+ },
299
+ loadingContainer: {
300
+ flex: 1,
301
+ justifyContent: 'center',
302
+ alignItems: 'center'
303
+ },
304
+ loadingText: {
305
+ color: 'white',
306
+ fontSize: 16,
307
+ marginTop: 12,
308
+ textAlign: 'center'
309
+ },
310
+ instructionContainer: {
311
+ backgroundColor: 'rgba(0,0,0,0.7)',
312
+ paddingHorizontal: 20,
313
+ paddingVertical: 12,
314
+ borderRadius: 8,
315
+ marginTop: 20
316
+ },
317
+ instructionText: {
318
+ color: 'white',
319
+ fontSize: 16,
320
+ fontWeight: '500',
321
+ textAlign: 'center'
322
+ },
323
+ progressContainer: {
324
+ backgroundColor: 'rgba(0,0,0,0.7)',
325
+ paddingHorizontal: 20,
326
+ paddingVertical: 12,
327
+ borderRadius: 8,
328
+ minWidth: 200
329
+ },
330
+ progressText: {
331
+ color: 'white',
332
+ fontSize: 14,
333
+ textAlign: 'center',
334
+ marginBottom: 8
335
+ },
336
+ progressBar: {
337
+ height: 4,
338
+ backgroundColor: 'rgba(255,255,255,0.3)',
339
+ borderRadius: 2,
340
+ overflow: 'hidden'
341
+ },
342
+ progressFill: {
343
+ height: '100%',
344
+ borderRadius: 2
345
+ },
346
+ errorContainer: {
347
+ flex: 1,
348
+ justifyContent: 'center',
349
+ alignItems: 'center',
350
+ paddingHorizontal: 20
351
+ },
352
+ errorTitle: {
353
+ fontSize: 20,
354
+ fontWeight: '600',
355
+ color: '#d32f2f',
356
+ marginBottom: 8,
357
+ textAlign: 'center'
358
+ },
359
+ errorSubtitle: {
360
+ textAlign: 'center',
361
+ fontSize: 14,
362
+ color: '#5e7079',
363
+ marginBottom: 20,
364
+ paddingHorizontal: 8
365
+ },
366
+ successContainer: {
367
+ flex: 1,
368
+ justifyContent: 'center',
369
+ alignItems: 'center',
370
+ paddingHorizontal: 20
371
+ },
372
+ successTitle: {
373
+ fontSize: 20,
374
+ fontWeight: '600',
375
+ color: '#2e7d32',
376
+ marginBottom: 8,
377
+ textAlign: 'center'
378
+ },
379
+ successSubtitle: {
380
+ textAlign: 'center',
381
+ fontSize: 14,
382
+ color: '#5e7079',
383
+ paddingHorizontal: 8
384
+ },
385
+ close: {
386
+ position: 'absolute',
387
+ top: 10,
388
+ right: 10,
389
+ backgroundColor: 'white',
390
+ height: 24,
391
+ width: 24,
392
+ borderRadius: 1000,
393
+ alignItems: 'center',
394
+ justifyContent: 'center',
395
+ zIndex: 2
396
+ },
397
+ closeIcon: {
398
+ height: 12,
399
+ width: 12
400
+ },
401
+ testContent: {
402
+ paddingTop: 30,
403
+ paddingLeft: 16
404
+ },
405
+ testTwoContent: {
406
+ paddingTop: 10,
407
+ paddingLeft: 16
408
+ },
409
+ retryButton: {
410
+ minWidth: 160,
411
+ marginHorizontal: 'auto'
412
+ },
413
+ button: {
414
+ borderRadius: 6,
415
+ paddingHorizontal: 20,
416
+ paddingVertical: 14,
417
+ alignItems: 'center',
418
+ justifyContent: 'center',
419
+ minWidth: 120
420
+ },
421
+ buttonText: {
422
+ color: 'white',
423
+ fontSize: 16,
424
+ fontWeight: '600'
425
+ }
426
+ });
427
+ //# sourceMappingURL=FaceVerification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useEffect","useCallback","View","Text","Modal","Dimensions","Platform","StyleSheet","TouchableOpacity","ActivityIndicator","LivenessDetection","LivenessCameraView","FaceVerification","onClose","onSuccess","primaryColor","challenges","timeout","detectionState","setDetectionState","currentChallenge","setCurrentChallenge","completedChallenges","setCompletedChallenges","error","setError","isLoading","setIsLoading","getChallengeInstruction","challenge","startLivenessDetection","hasPermission","checkCameraPermission","granted","requestCameraPermission","Error","config","onChallengeStart","onChallengeSuccess","prev","onChallengeFailure","reason","console","warn","onAllChallengesComplete","result","err","message","handleClose","stopDetection","handleRetry","timer","setTimeout","clearTimeout","undefined","cleanup","renderContent","createElement","style","styles","errorContainer","errorTitle","errorSubtitle","button","backgroundColor","onPress","buttonText","successContainer","successTitle","successSubtitle","contentContainer","cameraContainer","camera","scaleType","onCameraReady","log","onCameraError","overlay","loadingContainer","size","color","loadingText","Fragment","instructionContainer","instructionText","progressContainer","progressText","length","progressBar","progressFill","width","visible","transparent","onRequestClose","modal","animationType","backdrop","container","header","title","closeButton","closeText","create","hide","display","full","flex","height","webview","get","borderTopRightRadius","borderTopLeftRadius","paddingTop","webviewLoader","zIndex","alignItems","justifyContent","position","top","left","maxHeight","OS","overflow","flexDirection","padding","borderBottomWidth","borderBottomColor","fontSize","fontWeight","borderRadius","right","bottom","paddingVertical","paddingHorizontal","marginTop","textAlign","minWidth","marginBottom","close","closeIcon","testContent","paddingLeft","testTwoContent","retryButton","marginHorizontal"],"sourceRoot":"../../../../src","sources":["components/biometrics/FaceVerification.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAQ,OAAO;AAC/D,SACEC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,QAAQ,EACRC,U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KAAK,EAAE,SAAS;IAChByD,YAAY,EAAE,CAAC;IACfF,SAAS,EAAE;EACb,CAAC;EACDlE,eAAe,EAAE;IACfkE,SAAS,EAAE,QAAQ;IACnBR,QAAQ,EAAE,EAAE;IACZ/C,KAAK,EAAE,SAAS;IAChBqD,iBAAiB,EAAE;EACrB,CAAC;EACDK,KAAK,EAAE;IACLrB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPY,KAAK,EAAE,EAAE;IACTlE,eAAe,EAAE,OAAO;IACxB2C,MAAM,EAAE,EAAE;IACVjB,KAAK,EAAE,EAAE;IACTuC,YAAY,EAAE,IAAI;IAClBd,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBF,MAAM,EAAE;EACV,CAAC;EACDyB,SAAS,EAAE;IACThC,MAAM,EAAE,EAAE;IACVjB,KAAK,EAAE;EACT,CAAC;EACDkD,WAAW,EAAE;IACX5B,UAAU,EAAE,EAAE;IACd6B,WAAW,EAAE;EACf,CAAC;EACDC,cAAc,EAAE;IACd9B,UAAU,EAAE,EAAE;IACd6B,WAAW,EAAE;EACf,CAAC;EACDE,WAAW,EAAE;IACXP,QAAQ,EAAE,GAAG;IACbQ,gBAAgB,EAAE;EACpB,CAAC;EACDjF,MAAM,EAAE;IACNkE,YAAY,EAAE,CAAC;IACfI,iBAAiB,EAAE,EAAE;IACrBD,eAAe,EAAE,EAAE;IACnBjB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBoB,QAAQ,EAAE;EACZ,CAAC;EACDtE,UAAU,EAAE;IACVc,KAAK,EAAE,OAAO;IACd+C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { requireNativeComponent, Platform } from 'react-native';
3
+
4
+ // Props for the native camera view
5
+
6
+ // Native component interface
7
+
8
+ // Import native component based on platform
9
+ const NativeLivenessCameraView = Platform.select({
10
+ android: requireNativeComponent('LivenessCameraView'),
11
+ ios: requireNativeComponent('LivenessCameraView')
12
+ });
13
+
14
+ /**
15
+ * LivenessCameraView - Native camera component for liveness detection
16
+ *
17
+ * This component provides a camera preview that integrates with the
18
+ * liveness detection native module for real-time face analysis.
19
+ */
20
+ const LivenessCameraView = ({
21
+ style,
22
+ scaleType = 'fillCenter',
23
+ onCameraReady,
24
+ onCameraError
25
+ }) => {
26
+ // Platform check
27
+ if (!NativeLivenessCameraView) {
28
+ console.warn('LivenessCameraView is not available on this platform');
29
+ return null;
30
+ }
31
+ return /*#__PURE__*/React.createElement(NativeLivenessCameraView, {
32
+ style: style,
33
+ scaleType: scaleType,
34
+ onCameraReady: onCameraReady,
35
+ onCameraError: onCameraError
36
+ });
37
+ };
38
+ export default LivenessCameraView;
39
+ //# sourceMappingURL=LivenessCameraView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","requireNativeComponent","Platform","NativeLivenessCameraView","select","android","ios","LivenessCameraView","style","scaleType","onCameraReady","onCameraError","console","warn","createElement"],"sourceRoot":"../../../../src","sources":["components/biometrics/LivenessCameraView.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,sBAAsB,EAAEC,QAAQ,QAAmB,cAAc;;AAE1E;;AAcA;;AAKA;AACA,MAAMC,wBAAwB,GAAGD,QAAQ,CAACE,MAAM,CAAC;EAC/CC,OAAO,EACLJ,sBAAsB,CAAgC,oBAAoB,CAAC;EAC7EK,GAAG,EAAEL,sBAAsB,CACzB,oBACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,kBAAqD,GAAGA,CAAC;EAC7DC,KAAK;EACLC,SAAS,GAAG,YAAY;EACxBC,aAAa;EACbC;AACF,CAAC,KAAK;EACJ;EACA,IAAI,CAACR,wBAAwB,EAAE;IAC7BS,OAAO,CAACC,IAAI,CAAC,sDAAsD,CAAC;IACpE,OAAO,IAAI;EACb;EAEA,oBACEb,KAAA,CAAAc,aAAA,CAACX,wBAAwB;IACvBK,KAAK,EAAEA,KAAM;IACbC,SAAS,EAAEA,SAAU;IACrBC,aAAa,EAAEA,aAAc;IAC7BC,aAAa,EAAEA;EAAc,CAC9B,CAAC;AAEN,CAAC;AAED,eAAeJ,kBAAkB","ignoreList":[]}