omnipay-reactnative-sdk 1.2.2-beta.8 → 1.2.3-beta.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.
Files changed (66) hide show
  1. package/README.md +43 -93
  2. package/android/build.gradle +0 -9
  3. package/android/src/main/AndroidManifest.xml +0 -5
  4. package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +1 -4
  5. package/lib/commonjs/components/OmnipayProvider.js +1 -1
  6. package/lib/commonjs/components/biometrics/FaceVerification.js +235 -275
  7. package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -1
  8. package/lib/commonjs/index.js +0 -33
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/module/components/OmnipayProvider.js +1 -1
  11. package/lib/module/components/biometrics/FaceVerification.js +237 -277
  12. package/lib/module/components/biometrics/FaceVerification.js.map +1 -1
  13. package/lib/module/index.js +0 -6
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/components/biometrics/FaceVerification.d.ts +1 -3
  16. package/lib/typescript/components/biometrics/FaceVerification.d.ts.map +1 -1
  17. package/lib/typescript/index.d.ts +0 -2
  18. package/lib/typescript/index.d.ts.map +1 -1
  19. package/package.json +4 -2
  20. package/src/components/OmnipayProvider.tsx +1 -1
  21. package/src/components/biometrics/FaceVerification.tsx +232 -317
  22. package/src/index.tsx +0 -7
  23. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraView.java +0 -153
  24. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraViewManager.java +0 -49
  25. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessModule.java +0 -557
  26. package/ios/OmnipayLivenessCameraView.h +0 -15
  27. package/ios/OmnipayLivenessCameraView.m +0 -80
  28. package/ios/OmnipayLivenessCameraViewManager.m +0 -19
  29. package/ios/OmnipayLivenessModule.h +0 -38
  30. package/ios/OmnipayLivenessModule.m +0 -615
  31. package/lib/commonjs/components/biometrics/LivenessDetection.js +0 -149
  32. package/lib/commonjs/components/biometrics/LivenessDetection.js.map +0 -1
  33. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js +0 -15
  34. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  35. package/lib/commonjs/components/biometrics/PermissionManager.js +0 -279
  36. package/lib/commonjs/components/biometrics/PermissionManager.js.map +0 -1
  37. package/lib/commonjs/components/biometrics/index.js +0 -45
  38. package/lib/commonjs/components/biometrics/index.js.map +0 -1
  39. package/lib/commonjs/components/biometrics/types.js +0 -17
  40. package/lib/commonjs/components/biometrics/types.js.map +0 -1
  41. package/lib/module/components/biometrics/LivenessDetection.js +0 -129
  42. package/lib/module/components/biometrics/LivenessDetection.js.map +0 -1
  43. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js +0 -7
  44. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  45. package/lib/module/components/biometrics/PermissionManager.js +0 -272
  46. package/lib/module/components/biometrics/PermissionManager.js.map +0 -1
  47. package/lib/module/components/biometrics/index.js +0 -12
  48. package/lib/module/components/biometrics/index.js.map +0 -1
  49. package/lib/module/components/biometrics/types.js +0 -16
  50. package/lib/module/components/biometrics/types.js.map +0 -1
  51. package/lib/typescript/components/biometrics/LivenessDetection.d.ts +0 -33
  52. package/lib/typescript/components/biometrics/LivenessDetection.d.ts.map +0 -1
  53. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts +0 -18
  54. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts.map +0 -1
  55. package/lib/typescript/components/biometrics/PermissionManager.d.ts +0 -58
  56. package/lib/typescript/components/biometrics/PermissionManager.d.ts.map +0 -1
  57. package/lib/typescript/components/biometrics/index.d.ts +0 -5
  58. package/lib/typescript/components/biometrics/index.d.ts.map +0 -1
  59. package/lib/typescript/components/biometrics/types.d.ts +0 -73
  60. package/lib/typescript/components/biometrics/types.d.ts.map +0 -1
  61. package/omnipay-reactnative-sdk.podspec +0 -50
  62. package/src/components/biometrics/LivenessDetection.ts +0 -178
  63. package/src/components/biometrics/OmnipayLivenessCameraView.tsx +0 -19
  64. package/src/components/biometrics/PermissionManager.ts +0 -317
  65. package/src/components/biometrics/index.ts +0 -11
  66. package/src/components/biometrics/types.ts +0 -86
@@ -3,24 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- OmnipayProvider: true,
8
- useOmnipay: true,
9
- FaceVerification: true,
10
- LivenessDetection: true
11
- };
12
- Object.defineProperty(exports, "FaceVerification", {
13
- enumerable: true,
14
- get: function () {
15
- return _biometrics.FaceVerification;
16
- }
17
- });
18
- Object.defineProperty(exports, "LivenessDetection", {
19
- enumerable: true,
20
- get: function () {
21
- return _biometrics.LivenessDetection;
22
- }
23
- });
24
6
  Object.defineProperty(exports, "OmnipayProvider", {
25
7
  enumerable: true,
26
8
  get: function () {
@@ -37,21 +19,6 @@ Object.defineProperty(exports, "useOmnipay", {
37
19
  var _OmnipayView = _interopRequireDefault(require("./components/OmnipayView"));
38
20
  var _OmnipayProvider = require("./components/OmnipayProvider");
39
21
  var _useOmnipay = require("./hooks/useOmnipay");
40
- var _biometrics = require("./components/biometrics");
41
- var _types = require("./components/biometrics/types");
42
- Object.keys(_types).forEach(function (key) {
43
- if (key === "default" || key === "__esModule") return;
44
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
45
- if (key in exports && exports[key] === _types[key]) return;
46
- Object.defineProperty(exports, key, {
47
- enumerable: true,
48
- get: function () {
49
- return _types[key];
50
- }
51
- });
52
- });
53
22
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
54
- // Biometric components and utilities
55
- // Biometric types
56
23
  var _default = exports.default = _OmnipayView.default;
57
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_OmnipayView","_interopRequireDefault","require","_OmnipayProvider","_useOmnipay","_biometrics","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","__esModule","default","_default","Omnipay"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAGA,IAAAG,WAAA,GAAAH,OAAA;AAGA,IAAAI,MAAA,GAAAJ,OAAA;AAAAK,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAA8C,SAAAT,uBAAAkB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ9C;AAGA;AAAA,IAAAG,QAAA,GAAAP,OAAA,CAAAM,OAAA,GAGeE,oBAAO","ignoreList":[]}
1
+ {"version":3,"names":["_OmnipayView","_interopRequireDefault","require","_OmnipayProvider","_useOmnipay","e","__esModule","default","_default","exports","Omnipay"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAgD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GACjCG,oBAAO","ignoreList":[]}
@@ -30,7 +30,7 @@ export const OmnipayProvider = ({
30
30
  useEffect(() => {
31
31
  setTimeout(() => {
32
32
  setShowFaceVerification(true);
33
- }, 4000);
33
+ }, 1000);
34
34
  }, []);
35
35
  useEffect(() => {
36
36
  visibilityRef.current = isVisible;
@@ -1,158 +1,73 @@
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';
1
+ import React, { useState } from 'react';
2
+ import { View, Modal, Dimensions, Platform, StyleSheet, TouchableOpacity, Image, Text, ActivityIndicator } from 'react-native';
3
+ import { Camera, useCameraDevice, useCameraPermission } from 'react-native-vision-camera';
7
4
  const FaceVerification = ({
8
5
  onClose,
9
6
  onSuccess,
10
- primaryColor,
11
- config
7
+ primaryColor
12
8
  }) => {
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 () => {
9
+ const device = useCameraDevice('front');
10
+ const {
11
+ hasPermission,
12
+ requestPermission
13
+ } = useCameraPermission();
14
+ const [isRequestingPermission, setIsRequestingPermission] = useState(false);
15
+ const handleRequestPermission = async () => {
16
+ setIsRequestingPermission(true);
23
17
  try {
24
- console.log('🔍 Starting liveness detection initialization...');
25
-
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');
36
-
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');
18
+ await requestPermission();
19
+ } catch (error) {
20
+ console.error('Error requesting camera permission:', error);
21
+ } finally {
22
+ setIsRequestingPermission(false);
54
23
  }
55
24
  };
56
- const startDetection = async () => {
57
- if (!isSupported) {
58
- return;
59
- }
60
- setState('starting');
61
- setError(null);
62
- 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';
118
- }
119
- };
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();
25
+ const renderPermissionRequest = () => /*#__PURE__*/React.createElement(View, {
26
+ style: styles.permissionContainer
27
+ }, /*#__PURE__*/React.createElement(View, {
28
+ style: styles.permissionIconContainer
29
+ }, /*#__PURE__*/React.createElement(Text, {
30
+ style: styles.permissionIcon
31
+ }, "\uD83D\uDCF7")), /*#__PURE__*/React.createElement(Text, {
32
+ style: styles.permissionTitle
33
+ }, "Camera Permission Required"), /*#__PURE__*/React.createElement(Text, {
34
+ style: styles.permissionDescription
35
+ }, "To verify your identity, we need access to your camera. This allows us to capture your face for secure verification."), /*#__PURE__*/React.createElement(TouchableOpacity, {
36
+ style: [styles.permissionButton, {
37
+ backgroundColor: primaryColor
38
+ }],
39
+ onPress: handleRequestPermission,
40
+ disabled: isRequestingPermission
41
+ }, isRequestingPermission ? /*#__PURE__*/React.createElement(ActivityIndicator, {
42
+ color: "white",
43
+ size: "small"
44
+ }) : /*#__PURE__*/React.createElement(Text, {
45
+ style: styles.permissionButtonText
46
+ }, "Allow Camera Access")));
47
+ const renderNoDevice = () => /*#__PURE__*/React.createElement(View, {
48
+ style: styles.errorContainer
49
+ }, /*#__PURE__*/React.createElement(Text, {
50
+ style: styles.errorTitle
51
+ }, "Camera Not Available"), /*#__PURE__*/React.createElement(Text, {
52
+ style: styles.errorSubtitle
53
+ }, "No front camera detected on this device. Face verification requires a front-facing camera."));
54
+ const renderCamera = () => {
55
+ if (!device) return null;
56
+ return /*#__PURE__*/React.createElement(View, {
57
+ style: styles.cameraContainer
58
+ }, /*#__PURE__*/React.createElement(Camera, {
59
+ device: device,
60
+ style: styles.camera,
61
+ isActive: true
62
+ }), /*#__PURE__*/React.createElement(View, {
63
+ style: styles.cameraOverlay
64
+ }, /*#__PURE__*/React.createElement(View, {
65
+ style: styles.faceFrame
66
+ }), /*#__PURE__*/React.createElement(Text, {
67
+ style: styles.instructionText
68
+ }, "Position your face within the frame")));
154
69
  };
155
- const showRetryButton = state === 'failed' && error !== 'Camera permission is blocked. Please enable it in device settings.';
70
+ console.log(onSuccess, primaryColor);
156
71
  return /*#__PURE__*/React.createElement(Modal, {
157
72
  visible: true,
158
73
  transparent: true,
@@ -161,7 +76,7 @@ const FaceVerification = ({
161
76
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
162
77
  style: styles.backdrop,
163
78
  activeOpacity: 1,
164
- onPress: () => {}
79
+ onPress: onClose
165
80
  }, /*#__PURE__*/React.createElement(View, {
166
81
  style: [styles.container]
167
82
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
@@ -172,178 +87,223 @@ const FaceVerification = ({
172
87
  style: styles.closeIcon
173
88
  })), /*#__PURE__*/React.createElement(View, {
174
89
  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")))))));
90
+ }, !hasPermission && renderPermissionRequest(), hasPermission && !device && renderNoDevice(), hasPermission && device && renderCamera()))));
214
91
  };
215
- const {
216
- width: screenWidth,
217
- height: screenHeight
218
- } = Dimensions.get('window');
92
+ export default FaceVerification;
219
93
  const styles = StyleSheet.create({
220
- modal: {
221
- margin: 0
94
+ hide: {
95
+ display: 'none'
222
96
  },
223
- backdrop: {
97
+ full: {
224
98
  flex: 1,
225
- backgroundColor: 'rgba(0, 0, 0, 0.8)',
99
+ width: '100%',
100
+ height: '100%'
101
+ },
102
+ webview: {
103
+ flex: 1,
104
+ width: '100%',
105
+ height: Dimensions.get('window').height - 40,
106
+ backgroundColor: 'white',
107
+ borderTopRightRadius: 20,
108
+ borderTopLeftRadius: 20,
109
+ paddingTop: 150
110
+ },
111
+ webviewLoader: {
112
+ zIndex: 3,
113
+ backgroundColor: 'white',
114
+ alignItems: 'center',
226
115
  justifyContent: 'center',
227
- alignItems: 'center'
116
+ flex: 1,
117
+ width: '100%',
118
+ height: '100%',
119
+ position: 'absolute',
120
+ top: 0,
121
+ left: 0,
122
+ borderTopRightRadius: 20,
123
+ borderTopLeftRadius: 20
124
+ },
125
+ backdrop: {
126
+ backgroundColor: 'rgba(0,0,0,0.3)',
127
+ flex: 1,
128
+ justifyContent: 'flex-end',
129
+ position: 'relative',
130
+ height: '100%'
228
131
  },
229
132
  container: {
230
- width: screenWidth * 0.9,
231
- maxHeight: screenHeight * 0.8,
232
133
  backgroundColor: 'white',
233
- borderRadius: 16,
234
- padding: 20,
235
- alignItems: 'center'
134
+ borderTopRightRadius: 20,
135
+ borderTopLeftRadius: 20,
136
+ maxHeight: Dimensions.get('window').height - 120,
137
+ flex: 1,
138
+ position: 'relative',
139
+ ...(Platform.OS === 'android' && {
140
+ overflow: 'hidden'
141
+ })
142
+ },
143
+ modal: {
144
+ flex: 1,
145
+ backgroundColor: 'rgba(0,0,0,0.48)',
146
+ height: '100%',
147
+ width: '100%'
236
148
  },
237
149
  close: {
238
150
  position: 'absolute',
239
- top: 15,
240
- right: 15,
241
- zIndex: 10,
242
- padding: 5
151
+ top: 10,
152
+ right: 10,
153
+ backgroundColor: 'white',
154
+ height: 24,
155
+ width: 24,
156
+ borderRadius: 1000,
157
+ alignItems: 'center',
158
+ justifyContent: 'center',
159
+ zIndex: 2
243
160
  },
244
161
  closeIcon: {
245
- width: 20,
246
- height: 20,
247
- tintColor: '#666'
162
+ height: 12,
163
+ width: 12
248
164
  },
249
165
  contentContainer: {
250
- width: '100%',
251
- alignItems: 'center',
252
- paddingTop: 20
166
+ height: '100%',
167
+ position: 'relative',
168
+ borderTopRightRadius: 20,
169
+ borderTopLeftRadius: 20,
170
+ padding: 16
171
+ },
172
+ testContent: {
173
+ paddingTop: 30,
174
+ paddingLeft: 16
253
175
  },
254
- title: {
255
- fontSize: 24,
256
- fontWeight: 'bold',
257
- color: '#333',
176
+ testTwoContent: {
177
+ paddingTop: 10,
178
+ paddingLeft: 16
179
+ },
180
+ errorSubtitle: {
181
+ textAlign: 'center',
182
+ fontSize: 14,
183
+ color: '#5e7079',
258
184
  marginBottom: 20,
259
- textAlign: 'center'
185
+ paddingHorizontal: 8,
186
+ marginTop: 14
260
187
  },
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
188
+ errorContainer: {
189
+ flex: 1,
190
+ justifyContent: 'center',
191
+ alignItems: 'center',
192
+ width: Dimensions.get('window').width,
193
+ height: Dimensions.get('window').height,
194
+ zIndex: 2,
195
+ backgroundColor: 'white'
196
+ },
197
+ retryButton: {
198
+ minWidth: 160,
199
+ marginHorizontal: 'auto'
200
+ },
201
+ button: {
202
+ borderRadius: 6,
203
+ paddingHorizontal: 12,
204
+ paddingVertical: 14,
205
+ borderWidth: 1,
206
+ alignItems: 'center',
207
+ justifyContent: 'center'
208
+ },
209
+ buttonText: {
210
+ color: 'white',
211
+ fontSize: 16,
212
+ paddingHorizontal: 30
269
213
  },
270
214
  camera: {
271
215
  flex: 1,
272
216
  width: '100%',
273
- height: '100%'
217
+ height: 400
274
218
  },
275
- cameraPlaceholder: {
219
+ // Permission request styles
220
+ permissionContainer: {
221
+ flex: 1,
276
222
  justifyContent: 'center',
277
223
  alignItems: 'center',
278
- backgroundColor: '#f5f5f5'
279
- },
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'
224
+ paddingHorizontal: 24,
225
+ paddingVertical: 40
288
226
  },
289
- instruction: {
290
- fontSize: 16,
291
- fontWeight: '600',
292
- textAlign: 'center',
293
- color: 'white'
227
+ permissionIconContainer: {
228
+ width: 80,
229
+ height: 80,
230
+ borderRadius: 40,
231
+ backgroundColor: '#f0f0f0',
232
+ justifyContent: 'center',
233
+ alignItems: 'center',
234
+ marginBottom: 24
294
235
  },
295
- progressContainer: {
296
- marginBottom: 20,
297
- alignItems: 'center'
236
+ permissionIcon: {
237
+ fontSize: 40
298
238
  },
299
- challengeText: {
300
- fontSize: 18,
239
+ permissionTitle: {
240
+ fontSize: 20,
301
241
  fontWeight: '600',
302
- color: '#333',
303
- textAlign: 'center'
242
+ color: '#1a1a1a',
243
+ textAlign: 'center',
244
+ marginBottom: 12
304
245
  },
305
- buttonContainer: {
306
- flexDirection: 'row',
307
- justifyContent: 'center',
308
- gap: 15
246
+ permissionDescription: {
247
+ fontSize: 16,
248
+ color: '#666',
249
+ textAlign: 'center',
250
+ lineHeight: 22,
251
+ marginBottom: 32
309
252
  },
310
- retryButton: {
311
- paddingHorizontal: 30,
312
- paddingVertical: 12,
253
+ permissionButton: {
254
+ paddingHorizontal: 32,
255
+ paddingVertical: 16,
313
256
  borderRadius: 8,
314
- alignItems: 'center'
257
+ minWidth: 200,
258
+ alignItems: 'center',
259
+ justifyContent: 'center'
315
260
  },
316
- retryButtonText: {
261
+ permissionButtonText: {
317
262
  color: 'white',
318
263
  fontSize: 16,
319
264
  fontWeight: '600'
320
265
  },
321
- successIcon: {
322
- width: 60,
323
- height: 60,
324
- borderRadius: 30,
325
- backgroundColor: '#4CAF50',
326
- justifyContent: 'center',
327
- alignItems: 'center'
266
+ // Error styles
267
+ errorTitle: {
268
+ fontSize: 18,
269
+ fontWeight: '600',
270
+ color: '#1a1a1a',
271
+ textAlign: 'center',
272
+ marginBottom: 8
328
273
  },
329
- successText: {
330
- fontSize: 30,
331
- color: 'white',
332
- fontWeight: 'bold'
274
+ // Camera styles
275
+ cameraContainer: {
276
+ flex: 1,
277
+ position: 'relative'
333
278
  },
334
- errorIcon: {
335
- width: 60,
336
- height: 60,
337
- borderRadius: 30,
338
- backgroundColor: '#F44336',
279
+ cameraOverlay: {
280
+ position: 'absolute',
281
+ top: 0,
282
+ left: 0,
283
+ right: 0,
284
+ bottom: 0,
339
285
  justifyContent: 'center',
340
286
  alignItems: 'center'
341
287
  },
342
- errorText: {
343
- fontSize: 30,
288
+ faceFrame: {
289
+ width: 200,
290
+ height: 250,
291
+ borderWidth: 3,
292
+ borderColor: 'white',
293
+ borderRadius: 100,
294
+ borderStyle: 'dashed',
295
+ backgroundColor: 'transparent'
296
+ },
297
+ instructionText: {
344
298
  color: 'white',
345
- fontWeight: 'bold'
299
+ fontSize: 16,
300
+ fontWeight: '500',
301
+ textAlign: 'center',
302
+ marginTop: 20,
303
+ backgroundColor: 'rgba(0,0,0,0.5)',
304
+ paddingHorizontal: 16,
305
+ paddingVertical: 8,
306
+ borderRadius: 20
346
307
  }
347
308
  });
348
- export default FaceVerification;
349
309
  //# sourceMappingURL=FaceVerification.js.map