vesant-sdk 1.7.1-dev.5fd5309 → 1.7.1-dev.8d65fa4
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +1 -1
- package/dist/kyc/core.d.ts +1 -1
- package/dist/kyc/core.js +4 -0
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +4 -1
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +102 -9
- package/dist/kyc/index.d.ts +102 -9
- package/dist/kyc/index.js +4 -0
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +4 -1
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.js +19 -16
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +19 -16
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -930,19 +930,19 @@ var Close = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0id
|
|
|
930
930
|
var FACE_MESSAGES = {
|
|
931
931
|
idle: "Initializing camera...",
|
|
932
932
|
loading: "Loading face detection...",
|
|
933
|
-
scanning: "Position your face in the
|
|
933
|
+
scanning: "Position your face in the oval",
|
|
934
934
|
too_far: "Face too far. Please move closer to the camera",
|
|
935
935
|
too_close: "Too close. Please move back a little",
|
|
936
|
-
off_center: "Center your face in the
|
|
936
|
+
off_center: "Center your face in the oval",
|
|
937
937
|
ok: "Looking great! Tap the button to capture"
|
|
938
938
|
};
|
|
939
939
|
var FACE_COLORS = {
|
|
940
940
|
idle: "#9ca3af",
|
|
941
|
-
loading: "#
|
|
942
|
-
scanning: "#
|
|
941
|
+
loading: "#ef4444",
|
|
942
|
+
scanning: "#ef4444",
|
|
943
943
|
too_far: "#ef4444",
|
|
944
|
-
too_close: "#
|
|
945
|
-
off_center: "#
|
|
944
|
+
too_close: "#ef4444",
|
|
945
|
+
off_center: "#ef4444",
|
|
946
946
|
ok: "#10b981"
|
|
947
947
|
};
|
|
948
948
|
var MEDIAPIPE_BASE = "https://cdn.jsdelivr.net/npm/@mediapipe/face_detection";
|
|
@@ -1011,7 +1011,7 @@ function loadMediaPipeFaceDetection(assetBasePath) {
|
|
|
1011
1011
|
var MOBILE_UA = /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
1012
1012
|
var SESSION_EXPIRY_MS = 15 * 60 * 1e3;
|
|
1013
1013
|
var LIVENESS_MESSAGES = [
|
|
1014
|
-
"Position your face inside the
|
|
1014
|
+
"Position your face inside the oval",
|
|
1015
1015
|
"Make sure your face is well lit",
|
|
1016
1016
|
"Remove glasses or hats if possible",
|
|
1017
1017
|
"Look straight at the camera, then tap Capture"
|
|
@@ -1658,9 +1658,10 @@ function LiveCamera({ onCapture, onCancel, message, assetBasePath }) {
|
|
|
1658
1658
|
if (error) {
|
|
1659
1659
|
return /* @__PURE__ */ React__default.default.createElement("div", { style: { ...contentStyle, alignItems: "center", textAlign: "center", padding: 0 } }, /* @__PURE__ */ React__default.default.createElement("div", { style: errorCircleStyle }, "!"), /* @__PURE__ */ React__default.default.createElement("h3", { style: titleStyle }, "Camera unavailable"), /* @__PURE__ */ React__default.default.createElement("p", { style: alertTextStyle }, error), /* @__PURE__ */ React__default.default.createElement("div", { style: buttonsContainerStyle }, /* @__PURE__ */ React__default.default.createElement("button", { style: secondaryButtonStyle, onClick: onCancel }, "Back")));
|
|
1660
1660
|
}
|
|
1661
|
-
const
|
|
1662
|
-
const
|
|
1663
|
-
const
|
|
1661
|
+
const detectionAvailable = !faceDetectionFailed;
|
|
1662
|
+
const detectionActive = ready && detectionAvailable;
|
|
1663
|
+
const liveMessage = detectionAvailable ? FACE_MESSAGES[faceStatus] : message;
|
|
1664
|
+
const liveFaceColor = detectionAvailable ? FACE_COLORS[faceStatus] : void 0;
|
|
1664
1665
|
const captureDisabled = isCaptureDisabled(ready, detectionActive, faceStatus);
|
|
1665
1666
|
const ringPulse = detectionActive && (faceStatus === "too_far" || faceStatus === "too_close") ? "pulse 1.5s ease-in-out infinite" : void 0;
|
|
1666
1667
|
const dynamicCircleStyle = {
|
|
@@ -1776,20 +1777,22 @@ var faceOverlayContainerStyle = {
|
|
|
1776
1777
|
};
|
|
1777
1778
|
var faceRingWrapStyle = {
|
|
1778
1779
|
position: "relative",
|
|
1779
|
-
|
|
1780
|
-
aspectRatio: "
|
|
1780
|
+
height: "64%",
|
|
1781
|
+
aspectRatio: "3 / 4"
|
|
1781
1782
|
};
|
|
1782
1783
|
var faceDashedRingStyle = {
|
|
1783
1784
|
position: "absolute",
|
|
1784
1785
|
inset: -6,
|
|
1785
|
-
borderRadius:
|
|
1786
|
-
border: "6px dashed rgba(255, 255, 255, 0.4)"
|
|
1787
|
-
animation: "spin 10s linear infinite"
|
|
1786
|
+
borderRadius: 9999,
|
|
1787
|
+
border: "6px dashed rgba(255, 255, 255, 0.4)"
|
|
1788
1788
|
};
|
|
1789
1789
|
var faceCircleStyle = {
|
|
1790
1790
|
position: "absolute",
|
|
1791
1791
|
inset: 0,
|
|
1792
|
-
|
|
1792
|
+
// Tailwind's `rounded-full` resolves to a very large fixed radius. On a
|
|
1793
|
+
// 3:4 box that creates the normal KYC capsule/head guide with straighter
|
|
1794
|
+
// sides; 50% would instead produce a mathematically perfect ellipse.
|
|
1795
|
+
borderRadius: 9999,
|
|
1793
1796
|
border: "4px solid #00bc7d",
|
|
1794
1797
|
boxShadow: "0 0 0 1000px rgba(0, 0, 0, 0.5)"
|
|
1795
1798
|
};
|