@realeyes/verifeye-sdk 1.1.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -12,6 +12,111 @@ export declare const ConsentSkipMode: {
12
12
 
13
13
  export declare type ConsentSkipMode = (typeof ConsentSkipMode)[keyof typeof ConsentSkipMode];
14
14
 
15
+ declare const _default: {
16
+ "consent_title": "One quick check",
17
+ "consent_body": "Use your camera to verify in seconds.<br/>Fast, secure and <b>no images are stored.</b>",
18
+ "consent_notice": "By continuing, you give consent to the use of your camera and image for the verification process. Read our {privacyPolicy}.",
19
+ "consent_notice_privacy_policy_link": "Privacy Policy",
20
+ "consent_continue_button": "Continue",
21
+ "consent_close_button_label": "Close",
22
+ "consent_image_alt": "Face Verification",
23
+
24
+ "camera_permission_title": "Verify you are not a robot with a selfie",
25
+ "camera_permission_body": "Realeyes needs brief camera access<br/>Please, click “Allow”",
26
+ "camera_permission_assurance_privacy": "No one will ever see you",
27
+ "camera_permission_assurance_encryption": "Your data is encrypted",
28
+ "camera_permission_image_alt": "Face Verification",
29
+
30
+ "camera_permission_denied_title": "Verify you are not a robot with a selfie",
31
+ "camera_permission_denied_body": "Realeyes needs brief camera access<br/>Please allow your camera and click on \"Try Again\".",
32
+ "camera_permission_denied_assurance_privacy": "No one will ever see you",
33
+ "camera_permission_denied_assurance_encryption": "Your data is encrypted",
34
+ "camera_permission_denied_try_again_button": "Try Again",
35
+ "camera_permission_denied_image_alt": "Face Verification",
36
+
37
+ "verification_title": "Verification in progress",
38
+ "verification_image_alt": "Face Verification",
39
+
40
+ "no_face_title": "We cannot see your face",
41
+ "no_face_tip_look_into_camera": "<b>Look</b> into the camera",
42
+ "no_face_tip_check_lighting": "Check your <b>lighting</b>",
43
+ "no_face_tip_camera_in_use": "Make sure only this page <b>uses your camera</b>",
44
+ "no_face_retry_button": "Retry",
45
+ "no_face_image_alt": "No face detected",
46
+
47
+ "session_timeout_title": "Session timeout",
48
+ "session_timeout_body": "Your session has expired. Please try again.",
49
+ "session_timeout_countdown": "Redirecting in {seconds} seconds...",
50
+ "session_timeout_ok_button": "OK",
51
+
52
+ "loading_text": "Loading...",
53
+ "loading_verifying_text": "Verifying...",
54
+
55
+ "session_id": "Session ID:<br/>{sessionId}",
56
+
57
+ "server_busy_title": "Server is busy",
58
+ "server_busy_retry_message": "Retrying (attempt: {attempt}) in {delay} seconds...",
59
+ "server_busy_retry_countdown": "Retrying (attempt: {attempt}) in {delay} / {remaining} seconds...",
60
+
61
+ "error_title": "Error",
62
+ "error_retry_button": "Retry",
63
+ "error_init_session": "An error occurred during initializing the session!",
64
+ "error_face_detection": "An error occurred during face detection!",
65
+ "error_verification": "An error occurred during the verification!",
66
+ "error_service_busy": "Service is currently busy. Please try again later.",
67
+ "error_liveness_camera_access": "Please allow the camera for the liveness test!",
68
+ "error_liveness_mobile_landscape": "Please use the mobile in portrait mode!",
69
+
70
+ "liveness_close_button_label": "Close",
71
+ "liveness_camera_min_specifications_heading": "Camera does not meet minimum specifications",
72
+ "liveness_camera_min_specifications_message": "Camera must support at least 320*240 resolution and 15 frames per second.",
73
+ "liveness_camera_not_found_heading": "Camera is not accessible.",
74
+ "liveness_camera_not_found_message": "Check that a camera is connected and there is not another application using the camera. You may have to go into settings to grant camera permissions and close out all instances of your browser and retry.",
75
+ "liveness_a11y_video_label": "Webcam for liveness check",
76
+ "liveness_cancel_check": "Cancel Liveness check",
77
+ "liveness_retry_camera_permissions": "Retry",
78
+ "liveness_waiting_camera_permission": "Waiting for you to allow camera permission.",
79
+ "liveness_recording_indicator": "Rec",
80
+
81
+ "liveness_hint_center_face": "Center your face",
82
+ "liveness_hint_center_face_instruction": "Instruction: Before starting the check, make sure your camera is at the center top of your screen and center your face to the camera. When the check starts an oval will show up in the center. You will be prompted to move forward into the oval and then prompted to hold still. After holding still for a few seconds, you should hear check complete.",
83
+ "liveness_hint_face_off_center": "Face is not in the oval, center your face to the camera.",
84
+ "liveness_hint_move_face_front_of_camera": "Move face in front of camera",
85
+ "liveness_hint_too_many_faces": "Ensure only one face is in front of camera",
86
+ "liveness_hint_face_detected": "Face detected",
87
+ "liveness_hint_can_not_identify": "Move face in front of camera",
88
+ "liveness_hint_too_close": "Move back",
89
+ "liveness_hint_too_far": "Move closer",
90
+ "liveness_hint_connecting": "Connecting...",
91
+ "liveness_hint_verifying": "Verifying...",
92
+ "liveness_hint_check_complete": "Check complete",
93
+ "liveness_hint_illumination_too_bright": "Move to dimmer area",
94
+ "liveness_hint_illumination_too_dark": "Move to brighter area",
95
+ "liveness_hint_illumination_normal": "Lighting conditions normal",
96
+ "liveness_hint_hold_face_for_freshness": "Hold still",
97
+ "liveness_hint_match_indicator": "50% completed. Keep moving closer.",
98
+
99
+ "liveness_error_label": "Error",
100
+ "liveness_error_connection_timeout_header": "Connection time out",
101
+ "liveness_error_connection_timeout_message": "Connection has timed out.",
102
+ "liveness_error_timeout_header": "Time out",
103
+ "liveness_error_timeout_message": "Face didn't fit inside oval in time limit. Try again and completely fill the oval with face in it.",
104
+ "liveness_error_face_distance_header": "Forward movement detected",
105
+ "liveness_error_face_distance_message": "Avoid moving closer when connecting.",
106
+ "liveness_error_multiple_faces_header": "Multiple faces detected",
107
+ "liveness_error_multiple_faces_message": "Ensure only one face is present in front of the camera when connecting.",
108
+ "liveness_error_client_header": "Client error",
109
+ "liveness_error_client_message": "Check failed due to client issue",
110
+ "liveness_error_server_header": "Server issue",
111
+ "liveness_error_server_message": "Cannot complete check due to server issue",
112
+ "liveness_error_landscape_header": "Landscape orientation not supported",
113
+ "liveness_error_landscape_message": "Rotate your device to portrait (vertical) orientation.",
114
+ "liveness_error_portrait_message": "Ensure your device remains in portrait (vertical) orientation for the check’s duration.",
115
+ "liveness_error_try_again": "Try again"
116
+ };
117
+
118
+ export declare const DEFAULT_LANGUAGE = "en";
119
+
15
120
  export declare type Environment = "production" | "development" | "local";
16
121
 
17
122
  export declare interface HeadlessCallbacks {
@@ -24,8 +129,14 @@ export declare type Region = (typeof REGIONS)[number];
24
129
 
25
130
  export declare const REGIONS: readonly ["eu", "us"];
26
131
 
132
+ export declare const SUPPORTED_LANGUAGES: readonly ["en", "bg", "cs", "da", "de", "el", "es", "et", "fi", "fr", "hu", "id", "it", "ja", "ko", "lt", "lv", "nb", "nl", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sv", "tr", "uk", "zh-Hans", "zh-Hant"];
133
+
27
134
  export declare type VerifyServiceOperation = "init-session" | "capture-image" | "verify" | "unknown";
28
135
 
136
+ export declare type VerifyTextKey = keyof typeof _default;
137
+
138
+ export declare type VerifyTextOverrides = Partial<Record<VerifyTextKey, string>>;
139
+
29
140
  export declare const VerifyVerifier: default_2.FC<VerifyVerifierProps>;
30
141
 
31
142
  export declare interface VerifyVerifierProps {
@@ -40,6 +151,8 @@ export declare interface VerifyVerifierProps {
40
151
  region: Region;
41
152
  createConfig?: (region: Region) => Config;
42
153
  mediaStream?: MediaStream;
154
+ lang?: string;
155
+ langOverrides?: VerifyTextOverrides;
43
156
  }
44
157
 
45
158
  export { }
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import { a, b as i, V as o } from "./index-Wwkx7Prz.js";
1
+ import { a as s, b as r, c as A, S as E, V as G } from "./index-CokarRpN.js";
2
2
  export {
3
- a as ConsentSkipMode,
4
- i as REGIONS,
5
- o as VerifyVerifier
3
+ s as ConsentSkipMode,
4
+ r as DEFAULT_LANGUAGE,
5
+ A as REGIONS,
6
+ E as SUPPORTED_LANGUAGES,
7
+ G as VerifyVerifier
6
8
  };
@@ -0,0 +1,165 @@
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import m from "@mui/material/DialogContent";
3
+ import h from "@mui/material/IconButton";
4
+ import { u as x, R as v, C as d, D as T } from "./index-CokarRpN.js";
5
+ import { useMemo as f } from "react";
6
+ import { Box as g, Stack as u } from "@mui/material";
7
+ import { FaceLivenessDetector as p } from "@aws-amplify/ui-react-liveness";
8
+ import "@aws-amplify/ui-react/styles.css";
9
+ import './livenessCheckDialog.css';function C(n) {
10
+ const { t: e } = n;
11
+ return {
12
+ cameraMinSpecificationsHeadingText: e("liveness_camera_min_specifications_heading"),
13
+ cameraMinSpecificationsMessageText: e("liveness_camera_min_specifications_message"),
14
+ cameraNotFoundHeadingText: e("liveness_camera_not_found_heading"),
15
+ cameraNotFoundMessageText: e("liveness_camera_not_found_message"),
16
+ a11yVideoLabelText: e("liveness_a11y_video_label"),
17
+ cancelLivenessCheckText: e("liveness_cancel_check"),
18
+ retryCameraPermissionsText: e("liveness_retry_camera_permissions"),
19
+ waitingCameraPermissionText: e("liveness_waiting_camera_permission"),
20
+ recordingIndicatorText: e("liveness_recording_indicator"),
21
+ hintCenterFaceText: e("liveness_hint_center_face"),
22
+ hintCenterFaceInstructionText: e("liveness_hint_center_face_instruction"),
23
+ hintFaceOffCenterText: e("liveness_hint_face_off_center"),
24
+ hintMoveFaceFrontOfCameraText: e("liveness_hint_move_face_front_of_camera"),
25
+ hintTooManyFacesText: e("liveness_hint_too_many_faces"),
26
+ hintFaceDetectedText: e("liveness_hint_face_detected"),
27
+ hintCanNotIdentifyText: e("liveness_hint_can_not_identify"),
28
+ hintTooCloseText: e("liveness_hint_too_close"),
29
+ hintTooFarText: e("liveness_hint_too_far"),
30
+ hintConnectingText: e("liveness_hint_connecting"),
31
+ hintVerifyingText: e("liveness_hint_verifying"),
32
+ hintCheckCompleteText: e("liveness_hint_check_complete"),
33
+ hintIlluminationTooBrightText: e("liveness_hint_illumination_too_bright"),
34
+ hintIlluminationTooDarkText: e("liveness_hint_illumination_too_dark"),
35
+ hintIlluminationNormalText: e("liveness_hint_illumination_normal"),
36
+ hintHoldFaceForFreshnessText: e("liveness_hint_hold_face_for_freshness"),
37
+ hintMatchIndicatorText: e("liveness_hint_match_indicator"),
38
+ // Start-screen copy (goodFit/tooFar/startScreen/photosensitivity) is intentionally omitted:
39
+ // the dialog passes disableStartScreen, so it never renders. If that flag is ever flipped,
40
+ // add the corresponding liveness_* keys back to the locales and map them here — otherwise the
41
+ // start screen falls back to AWS's built-in English.
42
+ // goodFitCaptionText: t("liveness_good_fit_caption"),
43
+ // goodFitAltText: t("liveness_good_fit_alt"),
44
+ // tooFarCaptionText: t("liveness_too_far_caption"),
45
+ // tooFarAltText: t("liveness_too_far_alt"),
46
+ // startScreenBeginCheckText: t("liveness_start_screen_begin_check"),
47
+ // photosensitivityWarningBodyText,
48
+ // photosensitivityWarningHeadingText,
49
+ // photosensitivityWarningInfoText,
50
+ // photosensitivityWarningLabelText,
51
+ // Deprecated misspelled aliases still read by older code paths in the library. Fed from the
52
+ // same locale keys so translators never see the typo'd names.
53
+ // photosensitivyWarningBodyText: photosensitivityWarningBodyText,
54
+ // photosensitivyWarningHeadingText: photosensitivityWarningHeadingText,
55
+ // photosensitivyWarningInfoText: photosensitivityWarningInfoText,
56
+ // photosensitivyWarningLabelText: photosensitivityWarningLabelText,
57
+ errorLabelText: e("liveness_error_label"),
58
+ connectionTimeoutHeaderText: e("liveness_error_connection_timeout_header"),
59
+ connectionTimeoutMessageText: e("liveness_error_connection_timeout_message"),
60
+ timeoutHeaderText: e("liveness_error_timeout_header"),
61
+ timeoutMessageText: e("liveness_error_timeout_message"),
62
+ faceDistanceHeaderText: e("liveness_error_face_distance_header"),
63
+ faceDistanceMessageText: e("liveness_error_face_distance_message"),
64
+ multipleFacesHeaderText: e("liveness_error_multiple_faces_header"),
65
+ multipleFacesMessageText: e("liveness_error_multiple_faces_message"),
66
+ clientHeaderText: e("liveness_error_client_header"),
67
+ clientMessageText: e("liveness_error_client_message"),
68
+ serverHeaderText: e("liveness_error_server_header"),
69
+ serverMessageText: e("liveness_error_server_message"),
70
+ landscapeHeaderText: e("liveness_error_landscape_header"),
71
+ landscapeMessageText: e("liveness_error_landscape_message"),
72
+ portraitMessageText: e("liveness_error_portrait_message"),
73
+ tryAgainText: e("liveness_error_try_again")
74
+ };
75
+ }
76
+ const L = ({
77
+ isOpen: n,
78
+ uniqueId: e,
79
+ livenessSessionId: s,
80
+ livenessRegion: r,
81
+ onLivenessComplete: o,
82
+ onLivenessError: a,
83
+ onClose: _
84
+ }) => {
85
+ const i = x(), l = f(() => C(i), [i]);
86
+ return n ? /* @__PURE__ */ t(v, { open: n, children: /* @__PURE__ */ c(
87
+ m,
88
+ {
89
+ sx: {
90
+ textAlign: "center !important",
91
+ justifyContent: "center !important",
92
+ alignItems: "center !important"
93
+ },
94
+ children: [
95
+ /* @__PURE__ */ t(
96
+ h,
97
+ {
98
+ sx: {
99
+ position: "absolute",
100
+ right: 10,
101
+ top: 10,
102
+ // Above the liveness widget's instruction overlay, which is positioned over
103
+ // the whole dialog while it asks the user to move closer and carries
104
+ // `z-index: 2` (.amplify-liveness-instruction-overlay in the package's
105
+ // stylesheet — the general .amplify-liveness-overlay rule has none, which
106
+ // is why a first attempt at 1 was not enough).
107
+ //
108
+ // Measured, not assumed: the end-to-end suite's click on this button is
109
+ // rejected with "amplify-liveness-instruction-overlay ... intercepts
110
+ // pointer events", three retries in a row, while the button itself reports
111
+ // visible, enabled and stable. Clicking it by hand does work, so this is
112
+ // about removing the ambiguity rather than a claim that the control was
113
+ // unusable.
114
+ zIndex: 3,
115
+ color: "#b0b0b0",
116
+ "&:hover": {
117
+ color: "#263235"
118
+ }
119
+ },
120
+ onClick: _,
121
+ "aria-label": i.t("liveness_close_button_label"),
122
+ children: /* @__PURE__ */ t(d, { size: 30 })
123
+ }
124
+ ),
125
+ /* @__PURE__ */ t(
126
+ g,
127
+ {
128
+ sx: {
129
+ minHeight: 600,
130
+ display: "flex",
131
+ flexDirection: "column",
132
+ justifyContent: "center !important"
133
+ },
134
+ children: /* @__PURE__ */ t(
135
+ p,
136
+ {
137
+ sessionId: s,
138
+ region: r,
139
+ disableStartScreen: !0,
140
+ displayText: l,
141
+ onAnalysisComplete: o,
142
+ onError: a
143
+ }
144
+ )
145
+ }
146
+ ),
147
+ /* @__PURE__ */ t(
148
+ u,
149
+ {
150
+ direction: "column",
151
+ sx: {
152
+ justifyContent: "center",
153
+ alignItems: "center",
154
+ gap: 2
155
+ },
156
+ children: /* @__PURE__ */ t(T, { uniqueId: e })
157
+ }
158
+ )
159
+ ]
160
+ }
161
+ ) }) : null;
162
+ };
163
+ export {
164
+ L as default
165
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realeyes/verifeye-sdk",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "React component library for embedding the VerifEye identity-verification flow into your web application.",
5
5
  "keywords": [
6
6
  "verifeye",