omnipay-reactnative-sdk 1.2.2-beta.9 → 1.2.3-beta.10

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 (97) hide show
  1. package/README.md +58 -48
  2. package/android/build.gradle +4 -7
  3. package/android/src/main/AndroidManifest.xml +0 -5
  4. package/android/src/main/java/com/omniretail/omnipay/FaceVerificationFrameProcessor.kt +111 -0
  5. package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +6 -4
  6. package/ios/FaceVerificationFrameProcessor.swift +138 -0
  7. package/ios/FaceVerificationFrameProcessorPlugin.m +4 -0
  8. package/ios/OmnipayReactnativeSdk.m +5 -0
  9. package/ios/OmnipayReactnativeSdk.swift +10 -0
  10. package/ios/omnipay_reactnative_sdk.h +6 -0
  11. package/lib/commonjs/components/Button.js +68 -0
  12. package/lib/commonjs/components/Button.js.map +1 -0
  13. package/lib/commonjs/components/OmnipayProvider.js +7 -23
  14. package/lib/commonjs/components/OmnipayProvider.js.map +1 -1
  15. package/lib/commonjs/components/biometrics/FaceVerification.js +294 -270
  16. package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -1
  17. package/lib/commonjs/components/biometrics/useFaceVerification.js +85 -0
  18. package/lib/commonjs/components/biometrics/useFaceVerification.js.map +1 -0
  19. package/lib/commonjs/components/biometrics/useFaceVerificationFlow.js +157 -0
  20. package/lib/commonjs/components/biometrics/useFaceVerificationFlow.js.map +1 -0
  21. package/lib/commonjs/index.js +0 -33
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/module/components/Button.js +61 -0
  24. package/lib/module/components/Button.js.map +1 -0
  25. package/lib/module/components/OmnipayProvider.js +7 -23
  26. package/lib/module/components/OmnipayProvider.js.map +1 -1
  27. package/lib/module/components/biometrics/FaceVerification.js +294 -271
  28. package/lib/module/components/biometrics/FaceVerification.js.map +1 -1
  29. package/lib/module/components/biometrics/useFaceVerification.js +78 -0
  30. package/lib/module/components/biometrics/useFaceVerification.js.map +1 -0
  31. package/lib/module/components/biometrics/useFaceVerificationFlow.js +150 -0
  32. package/lib/module/components/biometrics/useFaceVerificationFlow.js.map +1 -0
  33. package/lib/module/index.js +0 -6
  34. package/lib/module/index.js.map +1 -1
  35. package/lib/typescript/components/Button.d.ts +17 -0
  36. package/lib/typescript/components/Button.d.ts.map +1 -0
  37. package/lib/typescript/components/OmnipayProvider.d.ts.map +1 -1
  38. package/lib/typescript/components/biometrics/FaceVerification.d.ts +1 -3
  39. package/lib/typescript/components/biometrics/FaceVerification.d.ts.map +1 -1
  40. package/lib/typescript/components/biometrics/useFaceVerification.d.ts +38 -0
  41. package/lib/typescript/components/biometrics/useFaceVerification.d.ts.map +1 -0
  42. package/lib/typescript/components/biometrics/useFaceVerificationFlow.d.ts +29 -0
  43. package/lib/typescript/components/biometrics/useFaceVerificationFlow.d.ts.map +1 -0
  44. package/lib/typescript/index.d.ts +0 -2
  45. package/lib/typescript/index.d.ts.map +1 -1
  46. package/omnipay_reactnative_sdk.podspec +46 -0
  47. package/package.json +5 -8
  48. package/src/components/Button.tsx +86 -0
  49. package/src/components/OmnipayProvider.tsx +7 -24
  50. package/src/components/biometrics/FaceVerification.tsx +315 -309
  51. package/src/components/biometrics/useFaceVerification.ts +120 -0
  52. package/src/components/biometrics/useFaceVerificationFlow.ts +224 -0
  53. package/src/index.tsx +0 -7
  54. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraView.java +0 -153
  55. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraViewManager.java +0 -49
  56. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessModule.java +0 -557
  57. package/ios/OmnipayLivenessCameraView.h +0 -15
  58. package/ios/OmnipayLivenessCameraView.m +0 -80
  59. package/ios/OmnipayLivenessCameraViewManager.m +0 -19
  60. package/ios/OmnipayLivenessModule.h +0 -38
  61. package/ios/OmnipayLivenessModule.m +0 -615
  62. package/lib/commonjs/components/biometrics/LivenessDetection.js +0 -149
  63. package/lib/commonjs/components/biometrics/LivenessDetection.js.map +0 -1
  64. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js +0 -15
  65. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  66. package/lib/commonjs/components/biometrics/PermissionManager.js +0 -279
  67. package/lib/commonjs/components/biometrics/PermissionManager.js.map +0 -1
  68. package/lib/commonjs/components/biometrics/index.js +0 -45
  69. package/lib/commonjs/components/biometrics/index.js.map +0 -1
  70. package/lib/commonjs/components/biometrics/types.js +0 -17
  71. package/lib/commonjs/components/biometrics/types.js.map +0 -1
  72. package/lib/module/components/biometrics/LivenessDetection.js +0 -129
  73. package/lib/module/components/biometrics/LivenessDetection.js.map +0 -1
  74. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js +0 -7
  75. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  76. package/lib/module/components/biometrics/PermissionManager.js +0 -272
  77. package/lib/module/components/biometrics/PermissionManager.js.map +0 -1
  78. package/lib/module/components/biometrics/index.js +0 -12
  79. package/lib/module/components/biometrics/index.js.map +0 -1
  80. package/lib/module/components/biometrics/types.js +0 -16
  81. package/lib/module/components/biometrics/types.js.map +0 -1
  82. package/lib/typescript/components/biometrics/LivenessDetection.d.ts +0 -33
  83. package/lib/typescript/components/biometrics/LivenessDetection.d.ts.map +0 -1
  84. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts +0 -18
  85. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts.map +0 -1
  86. package/lib/typescript/components/biometrics/PermissionManager.d.ts +0 -58
  87. package/lib/typescript/components/biometrics/PermissionManager.d.ts.map +0 -1
  88. package/lib/typescript/components/biometrics/index.d.ts +0 -5
  89. package/lib/typescript/components/biometrics/index.d.ts.map +0 -1
  90. package/lib/typescript/components/biometrics/types.d.ts +0 -73
  91. package/lib/typescript/components/biometrics/types.d.ts.map +0 -1
  92. package/omnipay-reactnative-sdk.podspec +0 -50
  93. package/src/components/biometrics/LivenessDetection.ts +0 -178
  94. package/src/components/biometrics/OmnipayLivenessCameraView.tsx +0 -19
  95. package/src/components/biometrics/PermissionManager.ts +0 -317
  96. package/src/components/biometrics/index.ts +0 -11
  97. package/src/components/biometrics/types.ts +0 -86
@@ -1,158 +1,116 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { View, Modal, Dimensions, StyleSheet, TouchableOpacity, Image, Text, ActivityIndicator } from 'react-native';
3
- import { LivenessDetection } from './LivenessDetection';
4
- import { OmnipayLivenessCameraView } from './OmnipayLivenessCameraView';
5
- import { CameraPermissionManager, PermissionResult } from './PermissionManager';
6
- import { LivenessChallenge } from './types';
2
+ import { View, Modal, Dimensions, Platform, StyleSheet, TouchableOpacity, Image, Text } from 'react-native';
3
+ import { Camera, useCameraDevice, useCameraPermission } from 'react-native-vision-camera';
4
+ import Button from '../Button';
5
+ import { useFaceVerification } from './useFaceVerification';
6
+ import { useFaceVerificationFlow } from './useFaceVerificationFlow';
7
7
  const FaceVerification = ({
8
8
  onClose,
9
9
  onSuccess,
10
- primaryColor,
11
- config
10
+ primaryColor
12
11
  }) => {
13
- const [state, setState] = useState('initializing');
14
- const [error, setError] = useState(null);
15
- const [isSupported, setIsSupported] = useState(false);
16
- const [currentChallenge, setCurrentChallenge] = useState(null);
17
- const [challengeProgress, setChallengeProgress] = useState('');
18
- useEffect(() => {
19
- checkSupport();
20
- // eslint-disable-next-line react-hooks/exhaustive-deps
21
- }, []);
22
- const checkSupport = async () => {
23
- try {
24
- console.log('🔍 Starting liveness detection initialization...');
12
+ const device = useCameraDevice('front');
13
+ const {
14
+ hasPermission,
15
+ requestPermission
16
+ } = useCameraPermission();
17
+ const [isRequestingPermission, setIsRequestingPermission] = useState(false);
25
18
 
26
- // Step 1: Request camera permission first
27
- console.log('📹 Requesting camera permission...');
28
- const permissionResponse = await CameraPermissionManager.requestCameraPermission();
29
- if (permissionResponse.result !== PermissionResult.GRANTED) {
30
- console.log('❌ Camera permission denied:', permissionResponse.result);
31
- setState('failed');
32
- setError(permissionResponse.result === PermissionResult.BLOCKED ? 'Camera permission is blocked. Please enable it in device settings.' : 'Camera permission is required for face verification.');
33
- return;
34
- }
35
- console.log('✅ Camera permission granted');
19
+ // Face verification flow
20
+ const {
21
+ state: flowState,
22
+ resetFlow,
23
+ isCompleted,
24
+ isFailed
25
+ } = useFaceVerificationFlow();
36
26
 
37
- // Step 2: Check device support (hardware/framework capability)
38
- console.log('🔍 Checking device capabilities...');
39
- const supported = await LivenessDetection.isSupported();
40
- console.log('📱 Device support result:', supported);
41
- setIsSupported(supported);
42
- if (supported) {
43
- console.log('✅ Device supports liveness detection, starting...');
44
- await startDetection();
45
- } else {
46
- console.log('❌ Device does not support liveness detection');
47
- setState('failed');
48
- setError('Liveness detection is not supported on this device');
49
- }
50
- } catch (err) {
51
- console.error('💥 Error during initialization:', err);
52
- setState('failed');
53
- setError('Failed to initialize liveness detection');
54
- }
55
- };
56
- const startDetection = async () => {
57
- if (!isSupported) {
58
- return;
27
+ // Frame processor
28
+ const frameProcessor = useFaceVerification();
29
+
30
+ // Handle completion
31
+ useEffect(() => {
32
+ if (isCompleted) {
33
+ setTimeout(() => {
34
+ onSuccess();
35
+ }, 1000); // Show success message briefly
59
36
  }
60
- setState('starting');
61
- setError(null);
37
+ }, [isCompleted, onSuccess]);
38
+ const handleRequestPermission = async () => {
39
+ setIsRequestingPermission(true);
62
40
  try {
63
- // Permission already checked in checkSupport(), proceed with detection
64
- console.log('🚀 Starting liveness detection with config...');
65
- const livenessConfig = {
66
- ...LivenessDetection.getDefaultConfig(),
67
- ...config
68
- };
69
- const result = await LivenessDetection.startDetection(livenessConfig, {
70
- onChallengeStart: challenge => {
71
- setCurrentChallenge(challenge);
72
- setState('running');
73
- setChallengeProgress(getChallengeInstruction(challenge));
74
- },
75
- onChallengeSuccess: (challenge, _challengeResult) => {
76
- setChallengeProgress(`✓ ${getChallengeInstruction(challenge)} completed`);
77
- },
78
- onChallengeFailure: (challenge, reason) => {
79
- setError(`Failed: ${reason}, ${challenge}`);
80
- },
81
- onAllChallengesComplete: () => {
82
- setChallengeProgress('All challenges completed! Taking final photo...');
83
- },
84
- onScreenshotCaptured: _screenshot => {
85
- // Screenshot captured, detection will complete soon
86
- },
87
- onDetectionFailed: reason => {
88
- setError(reason);
89
- setState('failed');
90
- }
91
- });
92
- if (result.success) {
93
- setState('completed');
94
- setTimeout(() => {
95
- onSuccess(result);
96
- }, 1000); // Brief delay to show success state
97
- } else {
98
- setState('failed');
99
- setError(result.failureReason || 'Face verification failed');
100
- }
101
- } catch (err) {
102
- setState('failed');
103
- setError(err instanceof Error ? err.message : 'Unknown error occurred');
104
- }
105
- };
106
- const getChallengeInstruction = challenge => {
107
- switch (challenge) {
108
- case LivenessChallenge.SMILE:
109
- return 'Please smile';
110
- case LivenessChallenge.BLINK:
111
- return 'Please blink';
112
- case LivenessChallenge.TURN_LEFT:
113
- return 'Please turn your head left';
114
- case LivenessChallenge.TURN_RIGHT:
115
- return 'Please turn your head right';
116
- default:
117
- return 'Follow the instruction';
41
+ await requestPermission();
42
+ } catch (error) {
43
+ console.error('Error requesting camera permission:', error);
44
+ } finally {
45
+ setIsRequestingPermission(false);
118
46
  }
119
47
  };
120
- const getStateMessage = () => {
121
- switch (state) {
122
- case 'initializing':
123
- return 'Initializing camera...';
124
- case 'starting':
125
- return 'Starting face verification...';
126
- case 'running':
127
- return challengeProgress || 'Look at the camera';
128
- case 'completed':
129
- return 'Face verification completed!';
130
- case 'failed':
131
- return error || 'Face verification failed';
132
- default:
133
- return 'Please wait...';
134
- }
135
- };
136
- const getStateColor = () => {
137
- switch (state) {
138
- case 'completed':
139
- return '#4CAF50';
140
- case 'failed':
141
- return '#F44336';
142
- case 'running':
143
- return primaryColor;
144
- default:
145
- return '#666';
146
- }
147
- };
148
- const handleRetry = () => {
149
- setState('initializing');
150
- setError(null);
151
- setCurrentChallenge(null);
152
- setChallengeProgress('');
153
- checkSupport();
48
+ const renderPermissionRequest = () => /*#__PURE__*/React.createElement(View, {
49
+ style: styles.permissionContainer
50
+ }, /*#__PURE__*/React.createElement(View, {
51
+ style: styles.permissionIconContainer
52
+ }, /*#__PURE__*/React.createElement(Text, {
53
+ style: styles.permissionIcon
54
+ }, "\uD83D\uDCF7")), /*#__PURE__*/React.createElement(Text, {
55
+ style: styles.permissionTitle
56
+ }, "Camera Permission Required"), /*#__PURE__*/React.createElement(Text, {
57
+ style: styles.permissionDescription
58
+ }, "To verify your identity, we need access to your camera. This allows us to capture your face for secure verification."), /*#__PURE__*/React.createElement(Button, {
59
+ title: "Allow Camera Access",
60
+ onPress: handleRequestPermission,
61
+ backgroundColor: primaryColor,
62
+ loading: isRequestingPermission
63
+ }));
64
+ const renderNoDevice = () => /*#__PURE__*/React.createElement(View, {
65
+ style: styles.errorContainer
66
+ }, /*#__PURE__*/React.createElement(Text, {
67
+ style: styles.errorTitle
68
+ }, "Camera Not Available"), /*#__PURE__*/React.createElement(Text, {
69
+ style: styles.errorSubtitle
70
+ }, "No front camera detected on this device. Face verification requires a front-facing camera."));
71
+ const renderCamera = () => {
72
+ if (!device) return null;
73
+ return /*#__PURE__*/React.createElement(View, {
74
+ style: styles.cameraContainer
75
+ }, /*#__PURE__*/React.createElement(Camera, {
76
+ device: device,
77
+ style: styles.camera,
78
+ isActive: true,
79
+ frameProcessor: frameProcessor
80
+ }), /*#__PURE__*/React.createElement(View, {
81
+ style: styles.cameraOverlay
82
+ }, /*#__PURE__*/React.createElement(View, {
83
+ style: styles.faceFrame
84
+ }), /*#__PURE__*/React.createElement(View, {
85
+ style: styles.progressContainer
86
+ }, /*#__PURE__*/React.createElement(View, {
87
+ style: [styles.progressBar, {
88
+ width: `${flowState.progress}%`,
89
+ backgroundColor: primaryColor
90
+ }]
91
+ })), /*#__PURE__*/React.createElement(Text, {
92
+ style: styles.instructionText
93
+ }, flowState.instruction), /*#__PURE__*/React.createElement(Text, {
94
+ style: styles.stepIndicator
95
+ }, "Step ", flowState.completedSteps.length + 1, " of 5"), isCompleted && /*#__PURE__*/React.createElement(View, {
96
+ style: [styles.statusContainer, {
97
+ backgroundColor: primaryColor
98
+ }]
99
+ }, /*#__PURE__*/React.createElement(Text, {
100
+ style: styles.statusText
101
+ }, "\u2713 Verification Complete!")), isFailed && /*#__PURE__*/React.createElement(View, {
102
+ style: [styles.statusContainer, styles.statusContainerError]
103
+ }, /*#__PURE__*/React.createElement(Text, {
104
+ style: styles.statusText
105
+ }, "\u2717 Verification Failed"), /*#__PURE__*/React.createElement(Button, {
106
+ title: "Try Again",
107
+ onPress: resetFlow,
108
+ backgroundColor: "white",
109
+ textColor: "#ff4444",
110
+ style: styles.retryButton
111
+ }))));
154
112
  };
155
- const showRetryButton = state === 'failed' && error !== 'Camera permission is blocked. Please enable it in device settings.';
113
+ console.log(onSuccess, primaryColor);
156
114
  return /*#__PURE__*/React.createElement(Modal, {
157
115
  visible: true,
158
116
  transparent: true,
@@ -161,7 +119,7 @@ const FaceVerification = ({
161
119
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
162
120
  style: styles.backdrop,
163
121
  activeOpacity: 1,
164
- onPress: () => {}
122
+ onPress: onClose
165
123
  }, /*#__PURE__*/React.createElement(View, {
166
124
  style: [styles.container]
167
125
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
@@ -172,178 +130,243 @@ const FaceVerification = ({
172
130
  style: styles.closeIcon
173
131
  })), /*#__PURE__*/React.createElement(View, {
174
132
  style: styles.contentContainer
175
- }, /*#__PURE__*/React.createElement(Text, {
176
- style: styles.title
177
- }, "Face Verification"), /*#__PURE__*/React.createElement(View, {
178
- style: styles.cameraContainer
179
- }, state === 'running' && isSupported ? /*#__PURE__*/React.createElement(OmnipayLivenessCameraView, {
180
- style: styles.camera
181
- }) : /*#__PURE__*/React.createElement(View, {
182
- style: [styles.camera, styles.cameraPlaceholder]
183
- }, state === 'initializing' || state === 'starting' ? /*#__PURE__*/React.createElement(ActivityIndicator, {
184
- size: "large",
185
- color: primaryColor
186
- }) : state === 'completed' ? /*#__PURE__*/React.createElement(View, {
187
- style: styles.successIcon
188
- }, /*#__PURE__*/React.createElement(Text, {
189
- style: styles.successText
190
- }, "\u2713")) : /*#__PURE__*/React.createElement(View, {
191
- style: styles.errorIcon
192
- }, /*#__PURE__*/React.createElement(Text, {
193
- style: styles.errorText
194
- }, "!"))), /*#__PURE__*/React.createElement(View, {
195
- style: styles.overlay
196
- }, /*#__PURE__*/React.createElement(Text, {
197
- style: [styles.instruction, {
198
- color: getStateColor()
199
- }]
200
- }, getStateMessage()))), state === 'running' && currentChallenge && /*#__PURE__*/React.createElement(View, {
201
- style: styles.progressContainer
202
- }, /*#__PURE__*/React.createElement(Text, {
203
- style: styles.challengeText
204
- }, getChallengeInstruction(currentChallenge))), /*#__PURE__*/React.createElement(View, {
205
- style: styles.buttonContainer
206
- }, showRetryButton && /*#__PURE__*/React.createElement(TouchableOpacity, {
207
- style: [styles.retryButton, {
208
- backgroundColor: primaryColor
209
- }],
210
- onPress: handleRetry
211
- }, /*#__PURE__*/React.createElement(Text, {
212
- style: styles.retryButtonText
213
- }, "Try Again")))))));
133
+ }, !hasPermission && renderPermissionRequest(), hasPermission && !device && renderNoDevice(), hasPermission && device && renderCamera()))));
214
134
  };
215
- const {
216
- width: screenWidth,
217
- height: screenHeight
218
- } = Dimensions.get('window');
135
+ export default FaceVerification;
219
136
  const styles = StyleSheet.create({
220
- modal: {
221
- margin: 0
137
+ hide: {
138
+ display: 'none'
222
139
  },
223
- backdrop: {
140
+ full: {
141
+ flex: 1,
142
+ width: '100%',
143
+ height: '100%'
144
+ },
145
+ webview: {
224
146
  flex: 1,
225
- backgroundColor: 'rgba(0, 0, 0, 0.8)',
147
+ width: '100%',
148
+ height: Dimensions.get('window').height - 40,
149
+ backgroundColor: 'white',
150
+ borderTopRightRadius: 20,
151
+ borderTopLeftRadius: 20,
152
+ paddingTop: 150
153
+ },
154
+ webviewLoader: {
155
+ zIndex: 3,
156
+ backgroundColor: 'white',
157
+ alignItems: 'center',
226
158
  justifyContent: 'center',
227
- alignItems: 'center'
159
+ flex: 1,
160
+ width: '100%',
161
+ height: '100%',
162
+ position: 'absolute',
163
+ top: 0,
164
+ left: 0,
165
+ borderTopRightRadius: 20,
166
+ borderTopLeftRadius: 20
167
+ },
168
+ backdrop: {
169
+ backgroundColor: 'rgba(0,0,0,0.3)',
170
+ flex: 1,
171
+ justifyContent: 'flex-end',
172
+ position: 'relative',
173
+ height: '100%'
228
174
  },
229
175
  container: {
230
- width: screenWidth * 0.9,
231
- maxHeight: screenHeight * 0.8,
232
176
  backgroundColor: 'white',
233
- borderRadius: 16,
234
- padding: 20,
235
- alignItems: 'center'
177
+ borderTopRightRadius: 20,
178
+ borderTopLeftRadius: 20,
179
+ maxHeight: Dimensions.get('window').height - 120,
180
+ flex: 1,
181
+ position: 'relative',
182
+ ...(Platform.OS === 'android' && {
183
+ overflow: 'hidden'
184
+ })
185
+ },
186
+ modal: {
187
+ flex: 1,
188
+ backgroundColor: 'rgba(0,0,0,0.48)',
189
+ height: '100%',
190
+ width: '100%'
236
191
  },
237
192
  close: {
238
193
  position: 'absolute',
239
- top: 15,
240
- right: 15,
241
- zIndex: 10,
242
- padding: 5
194
+ top: 10,
195
+ right: 10,
196
+ backgroundColor: 'white',
197
+ height: 24,
198
+ width: 24,
199
+ borderRadius: 1000,
200
+ alignItems: 'center',
201
+ justifyContent: 'center',
202
+ zIndex: 2
243
203
  },
244
204
  closeIcon: {
245
- width: 20,
246
- height: 20,
247
- tintColor: '#666'
205
+ height: 12,
206
+ width: 12
248
207
  },
249
208
  contentContainer: {
250
- width: '100%',
251
- alignItems: 'center',
252
- paddingTop: 20
209
+ height: '100%',
210
+ position: 'relative',
211
+ borderTopRightRadius: 20,
212
+ borderTopLeftRadius: 20,
213
+ padding: 16
214
+ },
215
+ testContent: {
216
+ paddingTop: 30,
217
+ paddingLeft: 16
253
218
  },
254
- title: {
255
- fontSize: 24,
256
- fontWeight: 'bold',
257
- color: '#333',
219
+ testTwoContent: {
220
+ paddingTop: 10,
221
+ paddingLeft: 16
222
+ },
223
+ errorSubtitle: {
224
+ textAlign: 'center',
225
+ fontSize: 14,
226
+ color: '#5e7079',
258
227
  marginBottom: 20,
259
- textAlign: 'center'
228
+ paddingHorizontal: 8,
229
+ marginTop: 14
260
230
  },
261
- cameraContainer: {
262
- width: screenWidth * 0.7,
263
- height: screenWidth * 0.9,
264
- borderRadius: 12,
265
- overflow: 'hidden',
266
- backgroundColor: '#f0f0f0',
267
- position: 'relative',
268
- marginBottom: 20
231
+ errorContainer: {
232
+ flex: 1,
233
+ justifyContent: 'center',
234
+ alignItems: 'center',
235
+ width: Dimensions.get('window').width,
236
+ height: Dimensions.get('window').height,
237
+ zIndex: 2,
238
+ backgroundColor: 'white'
269
239
  },
270
240
  camera: {
271
- flex: 1,
272
241
  width: '100%',
273
- height: '100%'
242
+ height: 400
274
243
  },
275
- cameraPlaceholder: {
244
+ // Permission request styles
245
+ permissionContainer: {
246
+ flex: 1,
276
247
  justifyContent: 'center',
277
248
  alignItems: 'center',
278
- backgroundColor: '#f5f5f5'
249
+ paddingHorizontal: 24,
250
+ paddingVertical: 40
279
251
  },
280
- overlay: {
281
- position: 'absolute',
282
- bottom: 0,
283
- left: 0,
284
- right: 0,
285
- backgroundColor: 'rgba(0, 0, 0, 0.7)',
286
- padding: 15,
287
- alignItems: 'center'
252
+ permissionIconContainer: {
253
+ width: 80,
254
+ height: 80,
255
+ borderRadius: 40,
256
+ backgroundColor: '#f0f0f0',
257
+ justifyContent: 'center',
258
+ alignItems: 'center',
259
+ marginBottom: 24
288
260
  },
289
- instruction: {
290
- fontSize: 16,
261
+ permissionIcon: {
262
+ fontSize: 40
263
+ },
264
+ permissionTitle: {
265
+ fontSize: 20,
291
266
  fontWeight: '600',
267
+ color: '#1a1a1a',
292
268
  textAlign: 'center',
293
- color: 'white'
269
+ marginBottom: 12
294
270
  },
295
- progressContainer: {
296
- marginBottom: 20,
297
- alignItems: 'center'
271
+ permissionDescription: {
272
+ fontSize: 16,
273
+ color: '#666',
274
+ textAlign: 'center',
275
+ lineHeight: 22,
276
+ marginBottom: 32
298
277
  },
299
- challengeText: {
278
+ // Error styles
279
+ errorTitle: {
300
280
  fontSize: 18,
301
281
  fontWeight: '600',
302
- color: '#333',
303
- textAlign: 'center'
282
+ color: '#1a1a1a',
283
+ textAlign: 'center',
284
+ marginBottom: 8
304
285
  },
305
- buttonContainer: {
306
- flexDirection: 'row',
307
- justifyContent: 'center',
308
- gap: 15
286
+ // Camera styles
287
+ cameraContainer: {
288
+ flex: 1,
289
+ position: 'relative',
290
+ marginTop: 60
309
291
  },
310
- retryButton: {
311
- paddingHorizontal: 30,
312
- paddingVertical: 12,
313
- borderRadius: 8,
292
+ cameraOverlay: {
293
+ position: 'absolute',
294
+ top: 0,
295
+ left: 0,
296
+ right: 0,
297
+ bottom: 0,
298
+ justifyContent: 'center',
314
299
  alignItems: 'center'
315
300
  },
316
- retryButtonText: {
301
+ faceFrame: {
302
+ width: 200,
303
+ height: 250,
304
+ borderWidth: 3,
305
+ borderColor: 'white',
306
+ borderRadius: 100,
307
+ borderStyle: 'dashed',
308
+ backgroundColor: 'transparent'
309
+ },
310
+ instructionText: {
317
311
  color: 'white',
318
312
  fontSize: 16,
319
- fontWeight: '600'
313
+ fontWeight: '500',
314
+ textAlign: 'center',
315
+ marginTop: 20,
316
+ backgroundColor: 'rgba(0,0,0,0.7)',
317
+ paddingHorizontal: 16,
318
+ paddingVertical: 8,
319
+ borderRadius: 20
320
320
  },
321
- successIcon: {
322
- width: 60,
323
- height: 60,
324
- borderRadius: 30,
325
- backgroundColor: '#4CAF50',
326
- justifyContent: 'center',
327
- alignItems: 'center'
321
+ // Verification flow styles
322
+ progressContainer: {
323
+ position: 'absolute',
324
+ top: 20,
325
+ left: 20,
326
+ right: 20,
327
+ height: 4,
328
+ backgroundColor: 'rgba(255,255,255,0.3)',
329
+ borderRadius: 2,
330
+ overflow: 'hidden'
328
331
  },
329
- successText: {
330
- fontSize: 30,
332
+ progressBar: {
333
+ height: '100%',
334
+ borderRadius: 2
335
+ },
336
+ stepIndicator: {
331
337
  color: 'white',
332
- fontWeight: 'bold'
338
+ fontSize: 14,
339
+ fontWeight: '400',
340
+ textAlign: 'center',
341
+ marginTop: 8,
342
+ backgroundColor: 'rgba(0,0,0,0.5)',
343
+ paddingHorizontal: 12,
344
+ paddingVertical: 4,
345
+ borderRadius: 12,
346
+ alignSelf: 'center'
333
347
  },
334
- errorIcon: {
335
- width: 60,
336
- height: 60,
337
- borderRadius: 30,
338
- backgroundColor: '#F44336',
339
- justifyContent: 'center',
348
+ statusContainer: {
349
+ position: 'absolute',
350
+ bottom: 40,
351
+ left: 20,
352
+ right: 20,
353
+ padding: 20,
354
+ borderRadius: 12,
340
355
  alignItems: 'center'
341
356
  },
342
- errorText: {
343
- fontSize: 30,
357
+ statusContainerError: {
358
+ backgroundColor: '#ff4444'
359
+ },
360
+ statusText: {
344
361
  color: 'white',
345
- fontWeight: 'bold'
362
+ fontSize: 18,
363
+ fontWeight: '600',
364
+ textAlign: 'center',
365
+ marginBottom: 8
366
+ },
367
+ retryButton: {
368
+ marginTop: 12,
369
+ minWidth: 120
346
370
  }
347
371
  });
348
- export default FaceVerification;
349
372
  //# sourceMappingURL=FaceVerification.js.map