@hexar/biometric-identity-sdk-react-native 1.0.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 (39) hide show
  1. package/README.md +68 -0
  2. package/dist/components/BiometricIdentityFlow.d.ts +17 -0
  3. package/dist/components/BiometricIdentityFlow.d.ts.map +1 -0
  4. package/dist/components/BiometricIdentityFlow.js +366 -0
  5. package/dist/components/CameraCapture.d.ts +15 -0
  6. package/dist/components/CameraCapture.d.ts.map +1 -0
  7. package/dist/components/CameraCapture.js +238 -0
  8. package/dist/components/ErrorScreen.d.ts +15 -0
  9. package/dist/components/ErrorScreen.d.ts.map +1 -0
  10. package/dist/components/ErrorScreen.js +142 -0
  11. package/dist/components/InstructionsScreen.d.ts +14 -0
  12. package/dist/components/InstructionsScreen.d.ts.map +1 -0
  13. package/dist/components/InstructionsScreen.js +181 -0
  14. package/dist/components/ResultScreen.d.ts +15 -0
  15. package/dist/components/ResultScreen.d.ts.map +1 -0
  16. package/dist/components/ResultScreen.js +182 -0
  17. package/dist/components/ValidationProgress.d.ts +14 -0
  18. package/dist/components/ValidationProgress.d.ts.map +1 -0
  19. package/dist/components/ValidationProgress.js +143 -0
  20. package/dist/components/VideoRecorder.d.ts +43 -0
  21. package/dist/components/VideoRecorder.d.ts.map +1 -0
  22. package/dist/components/VideoRecorder.js +631 -0
  23. package/dist/hooks/useBiometricSDK.d.ts +25 -0
  24. package/dist/hooks/useBiometricSDK.d.ts.map +1 -0
  25. package/dist/hooks/useBiometricSDK.js +173 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +47 -0
  29. package/package.json +27 -0
  30. package/src/components/BiometricIdentityFlow.tsx +557 -0
  31. package/src/components/CameraCapture.tsx +262 -0
  32. package/src/components/ErrorScreen.tsx +201 -0
  33. package/src/components/InstructionsScreen.tsx +269 -0
  34. package/src/components/ResultScreen.tsx +301 -0
  35. package/src/components/ValidationProgress.tsx +223 -0
  36. package/src/components/VideoRecorder.tsx +794 -0
  37. package/src/hooks/useBiometricSDK.ts +230 -0
  38. package/src/index.ts +24 -0
  39. package/tsconfig.json +20 -0
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ /**
3
+ * Camera Capture Component for React Native
4
+ * Handles ID document photo capture
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.CameraCapture = void 0;
41
+ const react_1 = __importStar(require("react"));
42
+ const react_native_1 = require("react-native");
43
+ const { width, height } = react_native_1.Dimensions.get('window');
44
+ const CameraCapture = ({ mode, theme, onCapture, onCancel, }) => {
45
+ const [isCapturing, setIsCapturing] = (0, react_1.useState)(false);
46
+ const cameraRef = (0, react_1.useRef)(null);
47
+ const handleCapture = async () => {
48
+ if (isCapturing)
49
+ return;
50
+ try {
51
+ setIsCapturing(true);
52
+ // In real implementation, this would use react-native-vision-camera
53
+ // For now, simulate capture
54
+ await new Promise(resolve => setTimeout(resolve, 500));
55
+ // Mock captured image data
56
+ const mockImageData = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...';
57
+ onCapture(mockImageData);
58
+ }
59
+ catch (error) {
60
+ console.error('Capture error:', error);
61
+ setIsCapturing(false);
62
+ }
63
+ };
64
+ const instructions = mode === 'front'
65
+ ? 'Position the front of your ID within the frame'
66
+ : 'Position the back of your ID within the frame';
67
+ return (react_1.default.createElement(react_native_1.View, { style: styles.container },
68
+ react_1.default.createElement(react_native_1.View, { style: styles.cameraContainer },
69
+ react_1.default.createElement(react_native_1.View, { style: styles.mockCamera },
70
+ react_1.default.createElement(react_native_1.Text, { style: styles.mockCameraText }, "Camera View"),
71
+ react_1.default.createElement(react_native_1.Text, { style: styles.mockCameraSubtext }, "(In production, this uses react-native-vision-camera)")),
72
+ react_1.default.createElement(react_native_1.View, { style: styles.overlay },
73
+ react_1.default.createElement(react_native_1.View, { style: styles.frameContainer },
74
+ react_1.default.createElement(react_native_1.View, { style: styles.frame },
75
+ react_1.default.createElement(react_native_1.View, { style: [styles.corner, styles.cornerTopLeft] }),
76
+ react_1.default.createElement(react_native_1.View, { style: [styles.corner, styles.cornerTopRight] }),
77
+ react_1.default.createElement(react_native_1.View, { style: [styles.corner, styles.cornerBottomLeft] }),
78
+ react_1.default.createElement(react_native_1.View, { style: [styles.corner, styles.cornerBottomRight] }))))),
79
+ react_1.default.createElement(react_native_1.View, { style: styles.instructionsContainer },
80
+ react_1.default.createElement(react_native_1.Text, { style: styles.instructionsText }, instructions),
81
+ react_1.default.createElement(react_native_1.Text, { style: styles.tipsText },
82
+ "\u2022 Ensure good lighting",
83
+ '\n',
84
+ "\u2022 Avoid glare and shadows",
85
+ '\n',
86
+ "\u2022 Keep document flat and complete")),
87
+ react_1.default.createElement(react_native_1.View, { style: styles.controls },
88
+ react_1.default.createElement(react_native_1.TouchableOpacity, { style: [styles.button, styles.cancelButton], onPress: onCancel },
89
+ react_1.default.createElement(react_native_1.Text, { style: styles.buttonText }, "Cancel")),
90
+ react_1.default.createElement(react_native_1.TouchableOpacity, { style: [
91
+ styles.button,
92
+ styles.captureButton,
93
+ { backgroundColor: theme?.primaryColor || '#6366F1' },
94
+ isCapturing && styles.captureButtonDisabled,
95
+ ], onPress: handleCapture, disabled: isCapturing },
96
+ react_1.default.createElement(react_native_1.View, { style: styles.captureButtonInner })),
97
+ react_1.default.createElement(react_native_1.View, { style: styles.buttonPlaceholder }))));
98
+ };
99
+ exports.CameraCapture = CameraCapture;
100
+ const styles = react_native_1.StyleSheet.create({
101
+ container: {
102
+ flex: 1,
103
+ backgroundColor: '#000000',
104
+ },
105
+ cameraContainer: {
106
+ flex: 1,
107
+ position: 'relative',
108
+ },
109
+ mockCamera: {
110
+ flex: 1,
111
+ backgroundColor: '#1F2937',
112
+ justifyContent: 'center',
113
+ alignItems: 'center',
114
+ },
115
+ mockCameraText: {
116
+ color: '#FFFFFF',
117
+ fontSize: 20,
118
+ fontWeight: 'bold',
119
+ marginBottom: 8,
120
+ },
121
+ mockCameraSubtext: {
122
+ color: '#9CA3AF',
123
+ fontSize: 12,
124
+ textAlign: 'center',
125
+ paddingHorizontal: 32,
126
+ },
127
+ overlay: {
128
+ ...react_native_1.StyleSheet.absoluteFillObject,
129
+ justifyContent: 'center',
130
+ alignItems: 'center',
131
+ },
132
+ frameContainer: {
133
+ width: width * 0.85,
134
+ height: width * 0.85 * 0.63, // ID card aspect ratio
135
+ justifyContent: 'center',
136
+ alignItems: 'center',
137
+ },
138
+ frame: {
139
+ width: '100%',
140
+ height: '100%',
141
+ borderWidth: 2,
142
+ borderColor: '#FFFFFF',
143
+ borderRadius: 8,
144
+ borderStyle: 'dashed',
145
+ },
146
+ corner: {
147
+ position: 'absolute',
148
+ width: 24,
149
+ height: 24,
150
+ borderColor: '#FFFFFF',
151
+ },
152
+ cornerTopLeft: {
153
+ top: -2,
154
+ left: -2,
155
+ borderTopWidth: 4,
156
+ borderLeftWidth: 4,
157
+ borderTopLeftRadius: 8,
158
+ },
159
+ cornerTopRight: {
160
+ top: -2,
161
+ right: -2,
162
+ borderTopWidth: 4,
163
+ borderRightWidth: 4,
164
+ borderTopRightRadius: 8,
165
+ },
166
+ cornerBottomLeft: {
167
+ bottom: -2,
168
+ left: -2,
169
+ borderBottomWidth: 4,
170
+ borderLeftWidth: 4,
171
+ borderBottomLeftRadius: 8,
172
+ },
173
+ cornerBottomRight: {
174
+ bottom: -2,
175
+ right: -2,
176
+ borderBottomWidth: 4,
177
+ borderRightWidth: 4,
178
+ borderBottomRightRadius: 8,
179
+ },
180
+ instructionsContainer: {
181
+ paddingVertical: 24,
182
+ paddingHorizontal: 32,
183
+ backgroundColor: 'rgba(0, 0, 0, 0.7)',
184
+ },
185
+ instructionsText: {
186
+ color: '#FFFFFF',
187
+ fontSize: 16,
188
+ fontWeight: '600',
189
+ textAlign: 'center',
190
+ marginBottom: 12,
191
+ },
192
+ tipsText: {
193
+ color: '#D1D5DB',
194
+ fontSize: 14,
195
+ lineHeight: 20,
196
+ },
197
+ controls: {
198
+ flexDirection: 'row',
199
+ justifyContent: 'space-between',
200
+ alignItems: 'center',
201
+ paddingVertical: 32,
202
+ paddingHorizontal: 32,
203
+ backgroundColor: 'rgba(0, 0, 0, 0.9)',
204
+ },
205
+ button: {
206
+ paddingVertical: 12,
207
+ paddingHorizontal: 24,
208
+ borderRadius: 8,
209
+ },
210
+ cancelButton: {
211
+ backgroundColor: '#374151',
212
+ },
213
+ buttonText: {
214
+ color: '#FFFFFF',
215
+ fontSize: 16,
216
+ fontWeight: '600',
217
+ },
218
+ captureButton: {
219
+ width: 72,
220
+ height: 72,
221
+ borderRadius: 36,
222
+ justifyContent: 'center',
223
+ alignItems: 'center',
224
+ },
225
+ captureButtonInner: {
226
+ width: 60,
227
+ height: 60,
228
+ borderRadius: 30,
229
+ backgroundColor: '#FFFFFF',
230
+ },
231
+ captureButtonDisabled: {
232
+ opacity: 0.5,
233
+ },
234
+ buttonPlaceholder: {
235
+ width: 80,
236
+ },
237
+ });
238
+ exports.default = exports.CameraCapture;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Error Screen Component
3
+ */
4
+ import React from 'react';
5
+ import { BiometricError, ThemeConfig, SupportedLanguage } from '@hexar/biometric-identity-sdk-core';
6
+ export interface ErrorScreenProps {
7
+ error: BiometricError;
8
+ theme?: ThemeConfig;
9
+ language?: SupportedLanguage;
10
+ onRetry: () => void;
11
+ onClose: () => void;
12
+ }
13
+ export declare const ErrorScreen: React.FC<ErrorScreenProps>;
14
+ export default ErrorScreen;
15
+ //# sourceMappingURL=ErrorScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorScreen.d.ts","sourceRoot":"","sources":["../../src/components/ErrorScreen.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEpG,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqGlD,CAAC;AA4EF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ /**
3
+ * Error Screen Component
4
+ */
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ErrorScreen = void 0;
10
+ const react_1 = __importDefault(require("react"));
11
+ const react_native_1 = require("react-native");
12
+ const ErrorScreen = ({ error, theme, language = 'en', onRetry, onClose, }) => {
13
+ const getErrorMessage = () => {
14
+ const messages = {
15
+ CAMERA_PERMISSION_DENIED: {
16
+ en: 'Camera permission is required to capture your ID and face video.',
17
+ es: 'Se requiere permiso de cámara para capturar tu documento y video facial.',
18
+ },
19
+ FACE_NOT_DETECTED: {
20
+ en: 'No face detected in the document. Please ensure the photo is clear.',
21
+ es: 'No se detectó rostro en el documento. Asegúrate de que la foto sea clara.',
22
+ },
23
+ POOR_IMAGE_QUALITY: {
24
+ en: 'Image quality is insufficient. Please avoid glare, blur, and ensure good lighting.',
25
+ es: 'La calidad de la imagen es insuficiente. Evita brillos, desenfoque y asegura buena iluminación.',
26
+ },
27
+ LIVENESS_CHECK_FAILED: {
28
+ en: 'Liveness verification failed. Please record a new video following the instructions.',
29
+ es: 'La verificación de presencia vital falló. Por favor graba un nuevo video siguiendo las instrucciones.',
30
+ },
31
+ FACE_MATCH_FAILED: {
32
+ en: 'The face in the video does not match the document photo.',
33
+ es: 'El rostro en el video no coincide con la foto del documento.',
34
+ },
35
+ DOCUMENT_TAMPERED: {
36
+ en: 'Document appears to be tampered or altered.',
37
+ es: 'El documento parece estar adulterado o alterado.',
38
+ },
39
+ };
40
+ const message = messages[error.code] || {
41
+ en: 'An unexpected error occurred. Please try again.',
42
+ es: 'Ocurrió un error inesperado. Por favor intenta de nuevo.',
43
+ };
44
+ return language === 'es' ? message.es : message.en;
45
+ };
46
+ return (react_1.default.createElement(react_native_1.View, { style: styles.container },
47
+ react_1.default.createElement(react_native_1.View, { style: styles.content },
48
+ react_1.default.createElement(react_native_1.View, { style: [
49
+ styles.iconContainer,
50
+ { backgroundColor: theme?.errorColor || '#EF4444' },
51
+ ] },
52
+ react_1.default.createElement(react_native_1.Text, { style: styles.icon }, "\u2717")),
53
+ react_1.default.createElement(react_native_1.Text, { style: [styles.title, { color: theme?.textColor || '#000000' }] }, language === 'es' ? 'Error de Verificación' : 'Verification Error'),
54
+ react_1.default.createElement(react_native_1.Text, { style: [styles.message, { color: theme?.secondaryTextColor || '#6B7280' }] }, getErrorMessage()),
55
+ react_1.default.createElement(react_native_1.View, { style: styles.codeContainer },
56
+ react_1.default.createElement(react_native_1.Text, { style: styles.codeLabel }, language === 'es' ? 'Código de Error:' : 'Error Code:'),
57
+ react_1.default.createElement(react_native_1.Text, { style: styles.codeText }, error.code)),
58
+ react_1.default.createElement(react_native_1.View, { style: styles.buttonsContainer },
59
+ react_1.default.createElement(react_native_1.TouchableOpacity, { style: [
60
+ styles.button,
61
+ styles.retryButton,
62
+ { backgroundColor: theme?.primaryColor || '#6366F1' },
63
+ ], onPress: onRetry },
64
+ react_1.default.createElement(react_native_1.Text, { style: styles.buttonText }, language === 'es' ? 'Reintentar' : 'Try Again')),
65
+ react_1.default.createElement(react_native_1.TouchableOpacity, { style: [styles.button, styles.closeButton], onPress: onClose },
66
+ react_1.default.createElement(react_native_1.Text, { style: [styles.buttonText, { color: theme?.textColor || '#000000' }] }, language === 'es' ? 'Cerrar' : 'Close'))))));
67
+ };
68
+ exports.ErrorScreen = ErrorScreen;
69
+ const styles = react_native_1.StyleSheet.create({
70
+ container: {
71
+ flex: 1,
72
+ backgroundColor: '#FFFFFF',
73
+ justifyContent: 'center',
74
+ alignItems: 'center',
75
+ },
76
+ content: {
77
+ width: '85%',
78
+ alignItems: 'center',
79
+ },
80
+ iconContainer: {
81
+ width: 80,
82
+ height: 80,
83
+ borderRadius: 40,
84
+ justifyContent: 'center',
85
+ alignItems: 'center',
86
+ marginBottom: 24,
87
+ },
88
+ icon: {
89
+ fontSize: 40,
90
+ color: '#FFFFFF',
91
+ fontWeight: 'bold',
92
+ },
93
+ title: {
94
+ fontSize: 24,
95
+ fontWeight: 'bold',
96
+ marginBottom: 16,
97
+ textAlign: 'center',
98
+ },
99
+ message: {
100
+ fontSize: 16,
101
+ textAlign: 'center',
102
+ lineHeight: 24,
103
+ marginBottom: 24,
104
+ },
105
+ codeContainer: {
106
+ backgroundColor: '#F3F4F6',
107
+ paddingVertical: 12,
108
+ paddingHorizontal: 16,
109
+ borderRadius: 8,
110
+ marginBottom: 32,
111
+ },
112
+ codeLabel: {
113
+ fontSize: 12,
114
+ color: '#6B7280',
115
+ marginBottom: 4,
116
+ },
117
+ codeText: {
118
+ fontSize: 14,
119
+ fontWeight: '600',
120
+ color: '#111827',
121
+ },
122
+ buttonsContainer: {
123
+ width: '100%',
124
+ },
125
+ button: {
126
+ paddingVertical: 16,
127
+ paddingHorizontal: 32,
128
+ borderRadius: 8,
129
+ alignItems: 'center',
130
+ marginVertical: 8,
131
+ },
132
+ retryButton: {},
133
+ closeButton: {
134
+ backgroundColor: '#F3F4F6',
135
+ },
136
+ buttonText: {
137
+ fontSize: 16,
138
+ fontWeight: '600',
139
+ color: '#FFFFFF',
140
+ },
141
+ });
142
+ exports.default = exports.ErrorScreen;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Instructions Screen Component
3
+ * Shows initial instructions before starting verification
4
+ */
5
+ import React from 'react';
6
+ import { ThemeConfig, SupportedLanguage } from '@hexar/biometric-identity-sdk-core';
7
+ export interface InstructionsScreenProps {
8
+ theme?: ThemeConfig;
9
+ language?: SupportedLanguage;
10
+ onStart: () => void;
11
+ }
12
+ export declare const InstructionsScreen: React.FC<InstructionsScreenProps>;
13
+ export default InstructionsScreen;
14
+ //# sourceMappingURL=InstructionsScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstructionsScreen.d.ts","sourceRoot":"","sources":["../../src/components/InstructionsScreen.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAc,MAAM,oCAAoC,CAAC;AAEhG,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwEhE,CAAC;AA6KF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ /**
3
+ * Instructions Screen Component
4
+ * Shows initial instructions before starting verification
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.InstructionsScreen = void 0;
11
+ const react_1 = __importDefault(require("react"));
12
+ const react_native_1 = require("react-native");
13
+ const InstructionsScreen = ({ theme, language = 'en', onStart, }) => {
14
+ const content = language === 'es' ? spanishContent : englishContent;
15
+ return (react_1.default.createElement(react_native_1.View, { style: styles.container },
16
+ react_1.default.createElement(react_native_1.ScrollView, { contentContainerStyle: styles.content },
17
+ react_1.default.createElement(react_native_1.Text, { style: [styles.title, { color: theme?.textColor || '#000000' }] }, content.title),
18
+ react_1.default.createElement(react_native_1.Text, { style: [styles.subtitle, { color: theme?.secondaryTextColor || '#6B7280' }] }, content.subtitle),
19
+ react_1.default.createElement(react_native_1.View, { style: styles.stepsContainer },
20
+ react_1.default.createElement(InstructionStep, { number: 1, title: content.step1Title, description: content.step1Description, theme: theme }),
21
+ react_1.default.createElement(InstructionStep, { number: 2, title: content.step2Title, description: content.step2Description, theme: theme }),
22
+ react_1.default.createElement(InstructionStep, { number: 3, title: content.step3Title, description: content.step3Description, theme: theme })),
23
+ react_1.default.createElement(react_native_1.View, { style: styles.tipsContainer },
24
+ react_1.default.createElement(react_native_1.Text, { style: [styles.tipsTitle, { color: theme?.textColor || '#000000' }] }, content.tipsTitle),
25
+ content.tips.map((tip, index) => (react_1.default.createElement(react_native_1.Text, { key: index, style: styles.tipText },
26
+ "\u2022 ",
27
+ tip)))),
28
+ react_1.default.createElement(react_native_1.View, { style: styles.privacyContainer },
29
+ react_1.default.createElement(react_native_1.Text, { style: styles.privacyText }, content.privacy))),
30
+ react_1.default.createElement(react_native_1.View, { style: styles.footer },
31
+ react_1.default.createElement(react_native_1.TouchableOpacity, { style: [
32
+ styles.button,
33
+ { backgroundColor: theme?.primaryColor || '#6366F1' },
34
+ ], onPress: onStart },
35
+ react_1.default.createElement(react_native_1.Text, { style: styles.buttonText }, content.startButton)))));
36
+ };
37
+ exports.InstructionsScreen = InstructionsScreen;
38
+ const InstructionStep = ({ number, title, description, theme, }) => (react_1.default.createElement(react_native_1.View, { style: stepStyles.container },
39
+ react_1.default.createElement(react_native_1.View, { style: [
40
+ stepStyles.numberContainer,
41
+ { backgroundColor: theme?.primaryColor || '#6366F1' },
42
+ ] },
43
+ react_1.default.createElement(react_native_1.Text, { style: stepStyles.number }, number)),
44
+ react_1.default.createElement(react_native_1.View, { style: stepStyles.content },
45
+ react_1.default.createElement(react_native_1.Text, { style: [stepStyles.title, { color: theme?.textColor || '#000000' }] }, title),
46
+ react_1.default.createElement(react_native_1.Text, { style: [stepStyles.description, { color: theme?.secondaryTextColor || '#6B7280' }] }, description))));
47
+ const stepStyles = react_native_1.StyleSheet.create({
48
+ container: {
49
+ flexDirection: 'row',
50
+ marginBottom: 24,
51
+ },
52
+ numberContainer: {
53
+ width: 40,
54
+ height: 40,
55
+ borderRadius: 20,
56
+ justifyContent: 'center',
57
+ alignItems: 'center',
58
+ marginRight: 16,
59
+ },
60
+ number: {
61
+ fontSize: 18,
62
+ fontWeight: 'bold',
63
+ color: '#FFFFFF',
64
+ },
65
+ content: {
66
+ flex: 1,
67
+ },
68
+ title: {
69
+ fontSize: 16,
70
+ fontWeight: '600',
71
+ marginBottom: 4,
72
+ },
73
+ description: {
74
+ fontSize: 14,
75
+ lineHeight: 20,
76
+ },
77
+ });
78
+ const styles = react_native_1.StyleSheet.create({
79
+ container: {
80
+ flex: 1,
81
+ backgroundColor: '#FFFFFF',
82
+ },
83
+ content: {
84
+ padding: 24,
85
+ },
86
+ title: {
87
+ fontSize: 28,
88
+ fontWeight: 'bold',
89
+ marginBottom: 8,
90
+ },
91
+ subtitle: {
92
+ fontSize: 16,
93
+ marginBottom: 32,
94
+ lineHeight: 24,
95
+ },
96
+ stepsContainer: {
97
+ marginBottom: 32,
98
+ },
99
+ tipsContainer: {
100
+ backgroundColor: '#F9FAFB',
101
+ padding: 16,
102
+ borderRadius: 8,
103
+ marginBottom: 24,
104
+ },
105
+ tipsTitle: {
106
+ fontSize: 16,
107
+ fontWeight: '600',
108
+ marginBottom: 12,
109
+ },
110
+ tipText: {
111
+ fontSize: 14,
112
+ color: '#6B7280',
113
+ marginVertical: 4,
114
+ lineHeight: 20,
115
+ },
116
+ privacyContainer: {
117
+ backgroundColor: '#EEF2FF',
118
+ padding: 16,
119
+ borderRadius: 8,
120
+ },
121
+ privacyText: {
122
+ fontSize: 12,
123
+ color: '#4F46E5',
124
+ lineHeight: 18,
125
+ },
126
+ footer: {
127
+ padding: 24,
128
+ borderTopWidth: 1,
129
+ borderTopColor: '#E5E7EB',
130
+ },
131
+ button: {
132
+ paddingVertical: 16,
133
+ paddingHorizontal: 32,
134
+ borderRadius: 8,
135
+ alignItems: 'center',
136
+ },
137
+ buttonText: {
138
+ color: '#FFFFFF',
139
+ fontSize: 16,
140
+ fontWeight: '600',
141
+ },
142
+ });
143
+ const englishContent = {
144
+ title: 'Identity Verification',
145
+ subtitle: 'We need to verify your identity to continue. This process takes about 2 minutes.',
146
+ step1Title: 'Capture ID Front',
147
+ step1Description: 'Take a clear photo of the front of your ID document.',
148
+ step2Title: 'Capture ID Back',
149
+ step2Description: 'Take a clear photo of the back of your ID document.',
150
+ step3Title: 'Record Face Video',
151
+ step3Description: 'Record a short video of your face while following on-screen instructions.',
152
+ tipsTitle: 'Tips for Success',
153
+ tips: [
154
+ 'Ensure good lighting without glare or shadows',
155
+ 'Keep your ID flat and all edges visible',
156
+ 'Remove glasses and face coverings',
157
+ 'Find a quiet place without distractions',
158
+ ],
159
+ privacy: '🔒 Your data is encrypted and processed securely. We do not store your biometric data locally.',
160
+ startButton: 'Start Verification',
161
+ };
162
+ const spanishContent = {
163
+ title: 'Verificación de Identidad',
164
+ subtitle: 'Necesitamos verificar tu identidad para continuar. Este proceso toma aproximadamente 2 minutos.',
165
+ step1Title: 'Captura Frente del Documento',
166
+ step1Description: 'Toma una foto clara del frente de tu documento de identidad.',
167
+ step2Title: 'Captura Reverso del Documento',
168
+ step2Description: 'Toma una foto clara del reverso de tu documento de identidad.',
169
+ step3Title: 'Graba Video Facial',
170
+ step3Description: 'Graba un video corto de tu rostro siguiendo las instrucciones en pantalla.',
171
+ tipsTitle: 'Consejos para el Éxito',
172
+ tips: [
173
+ 'Asegura buena iluminación sin brillos o sombras',
174
+ 'Mantén tu documento plano y todos los bordes visibles',
175
+ 'Quítate los lentes y cubiertas faciales',
176
+ 'Encuentra un lugar tranquilo sin distracciones',
177
+ ],
178
+ privacy: '🔒 Tus datos están encriptados y procesados de forma segura. No almacenamos tus datos biométricos localmente.',
179
+ startButton: 'Iniciar Verificación',
180
+ };
181
+ exports.default = exports.InstructionsScreen;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Result Screen Component
3
+ * Shows validation result (pass/fail)
4
+ */
5
+ import React from 'react';
6
+ import { ValidationResult, ThemeConfig, SupportedLanguage } from '@hexar/biometric-identity-sdk-core';
7
+ export interface ResultScreenProps {
8
+ result: ValidationResult;
9
+ theme?: ThemeConfig;
10
+ language?: SupportedLanguage;
11
+ onClose: () => void;
12
+ }
13
+ export declare const ResultScreen: React.FC<ResultScreenProps>;
14
+ export default ResultScreen;
15
+ //# sourceMappingURL=ResultScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../src/components/ResultScreen.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEtG,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoHpD,CAAC;AAgKF,eAAe,YAAY,CAAC"}