vesant-sdk 1.7.1-dev.2a5fd70 → 1.7.1-dev.2f18a76
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/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.mjs
CHANGED
|
@@ -924,19 +924,19 @@ var Close = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0id
|
|
|
924
924
|
var FACE_MESSAGES = {
|
|
925
925
|
idle: "Initializing camera...",
|
|
926
926
|
loading: "Loading face detection...",
|
|
927
|
-
scanning: "Position your face in the
|
|
927
|
+
scanning: "Position your face in the oval",
|
|
928
928
|
too_far: "Face too far. Please move closer to the camera",
|
|
929
929
|
too_close: "Too close. Please move back a little",
|
|
930
|
-
off_center: "Center your face in the
|
|
930
|
+
off_center: "Center your face in the oval",
|
|
931
931
|
ok: "Looking great! Tap the button to capture"
|
|
932
932
|
};
|
|
933
933
|
var FACE_COLORS = {
|
|
934
934
|
idle: "#9ca3af",
|
|
935
|
-
loading: "#
|
|
936
|
-
scanning: "#
|
|
935
|
+
loading: "#ef4444",
|
|
936
|
+
scanning: "#ef4444",
|
|
937
937
|
too_far: "#ef4444",
|
|
938
|
-
too_close: "#
|
|
939
|
-
off_center: "#
|
|
938
|
+
too_close: "#ef4444",
|
|
939
|
+
off_center: "#ef4444",
|
|
940
940
|
ok: "#10b981"
|
|
941
941
|
};
|
|
942
942
|
var MEDIAPIPE_BASE = "https://cdn.jsdelivr.net/npm/@mediapipe/face_detection";
|
|
@@ -1005,7 +1005,7 @@ function loadMediaPipeFaceDetection(assetBasePath) {
|
|
|
1005
1005
|
var MOBILE_UA = /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
1006
1006
|
var SESSION_EXPIRY_MS = 15 * 60 * 1e3;
|
|
1007
1007
|
var LIVENESS_MESSAGES = [
|
|
1008
|
-
"Position your face inside the
|
|
1008
|
+
"Position your face inside the oval",
|
|
1009
1009
|
"Make sure your face is well lit",
|
|
1010
1010
|
"Remove glasses or hats if possible",
|
|
1011
1011
|
"Look straight at the camera, then tap Capture"
|
|
@@ -1652,9 +1652,10 @@ function LiveCamera({ onCapture, onCancel, message, assetBasePath }) {
|
|
|
1652
1652
|
if (error) {
|
|
1653
1653
|
return /* @__PURE__ */ React.createElement("div", { style: { ...contentStyle, alignItems: "center", textAlign: "center", padding: 0 } }, /* @__PURE__ */ React.createElement("div", { style: errorCircleStyle }, "!"), /* @__PURE__ */ React.createElement("h3", { style: titleStyle }, "Camera unavailable"), /* @__PURE__ */ React.createElement("p", { style: alertTextStyle }, error), /* @__PURE__ */ React.createElement("div", { style: buttonsContainerStyle }, /* @__PURE__ */ React.createElement("button", { style: secondaryButtonStyle, onClick: onCancel }, "Back")));
|
|
1654
1654
|
}
|
|
1655
|
-
const
|
|
1656
|
-
const
|
|
1657
|
-
const
|
|
1655
|
+
const detectionAvailable = !faceDetectionFailed;
|
|
1656
|
+
const detectionActive = ready && detectionAvailable;
|
|
1657
|
+
const liveMessage = detectionAvailable ? FACE_MESSAGES[faceStatus] : message;
|
|
1658
|
+
const liveFaceColor = detectionAvailable ? FACE_COLORS[faceStatus] : void 0;
|
|
1658
1659
|
const captureDisabled = isCaptureDisabled(ready, detectionActive, faceStatus);
|
|
1659
1660
|
const ringPulse = detectionActive && (faceStatus === "too_far" || faceStatus === "too_close") ? "pulse 1.5s ease-in-out infinite" : void 0;
|
|
1660
1661
|
const dynamicCircleStyle = {
|
|
@@ -1770,20 +1771,22 @@ var faceOverlayContainerStyle = {
|
|
|
1770
1771
|
};
|
|
1771
1772
|
var faceRingWrapStyle = {
|
|
1772
1773
|
position: "relative",
|
|
1773
|
-
|
|
1774
|
-
aspectRatio: "
|
|
1774
|
+
height: "64%",
|
|
1775
|
+
aspectRatio: "3 / 4"
|
|
1775
1776
|
};
|
|
1776
1777
|
var faceDashedRingStyle = {
|
|
1777
1778
|
position: "absolute",
|
|
1778
1779
|
inset: -6,
|
|
1779
|
-
borderRadius:
|
|
1780
|
-
border: "6px dashed rgba(255, 255, 255, 0.4)"
|
|
1781
|
-
animation: "spin 10s linear infinite"
|
|
1780
|
+
borderRadius: 9999,
|
|
1781
|
+
border: "6px dashed rgba(255, 255, 255, 0.4)"
|
|
1782
1782
|
};
|
|
1783
1783
|
var faceCircleStyle = {
|
|
1784
1784
|
position: "absolute",
|
|
1785
1785
|
inset: 0,
|
|
1786
|
-
|
|
1786
|
+
// Tailwind's `rounded-full` resolves to a very large fixed radius. On a
|
|
1787
|
+
// 3:4 box that creates the normal KYC capsule/head guide with straighter
|
|
1788
|
+
// sides; 50% would instead produce a mathematically perfect ellipse.
|
|
1789
|
+
borderRadius: 9999,
|
|
1787
1790
|
border: "4px solid #00bc7d",
|
|
1788
1791
|
boxShadow: "0 0 0 1000px rgba(0, 0, 0, 0.5)"
|
|
1789
1792
|
};
|