@neofaceid/web-sdk 1.36.0 → 1.36.1

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
@@ -1310,7 +1310,7 @@ export declare const registerPersonWithoutFace: (personData: {
1310
1310
  /**
1311
1311
  * Data de lançamento da versão atual
1312
1312
  */
1313
- export declare const RELEASE_DATE = "2026-09-02";
1313
+ export declare const RELEASE_DATE = "2026-09-03";
1314
1314
 
1315
1315
  declare interface RequestChallengeWithSessionParams {
1316
1316
  applicationToken: string;
@@ -1650,7 +1650,7 @@ export declare const validateToken: (applicationToken: string) => Promise<boolea
1650
1650
  * MINOR: Incrementado quando adicionamos funcionalidades mantendo compatibilidade
1651
1651
  * PATCH: Incrementado quando corrigimos bugs mantendo compatibilidade
1652
1652
  */
1653
- export declare const VERSION = "1.36.0";
1653
+ export declare const VERSION = "1.36.1";
1654
1654
 
1655
1655
  /**
1656
1656
  * Executa `fn(sessionId)`. Se o servidor devolver 410 (sessão consumida/expirada),
@@ -6560,10 +6560,8 @@ function FaceCaptureModal({
6560
6560
  const canvasRef = useRef(null);
6561
6561
  const streamRef = useRef(null);
6562
6562
  const faceDetectionTimeoutRef = useRef(null);
6563
- const livenessCheckRef = useRef(null);
6564
6563
  const [state, dispatch] = useReducer(modalReducer$1, { status: "requestingPermission" });
6565
6564
  const [faceDetected, setFaceDetected] = useState(false);
6566
- const [livenessAttempts, setLivenessAttempts] = useState(0);
6567
6565
  const { startCamera, stopCamera } = useCamera();
6568
6566
  const isFaceCentered = (detection) => {
6569
6567
  if (!videoRef.current) return false;
@@ -6575,14 +6573,6 @@ function FaceCaptureModal({
6575
6573
  const centerHeight = videoHeight * 0.4;
6576
6574
  return box.x + box.width / 2 > centerX - centerWidth / 2 && box.x + box.width / 2 < centerX + centerWidth / 2 && box.y + box.height / 2 > centerY - centerHeight / 2 && box.y + box.height / 2 < centerY + centerHeight / 2;
6577
6575
  };
6578
- const startLivenessCheck = () => {
6579
- livenessCheckRef.current = window.setTimeout(() => {
6580
- if (state.status === "ready") {
6581
- setLivenessAttempts((prev) => prev + 1);
6582
- dispatch({ type: "START_CAPTURE" });
6583
- }
6584
- }, 3e3);
6585
- };
6586
6576
  const startFaceDetection = () => {
6587
6577
  if (!videoRef.current) return;
6588
6578
  const detectFaces = async () => {
@@ -6595,9 +6585,6 @@ function FaceCaptureModal({
6595
6585
  const isOneFace = detections.length === 1;
6596
6586
  const isCentered = isOneFace && isFaceCentered(detections[0]);
6597
6587
  setFaceDetected(isOneFace && isCentered);
6598
- if (isOneFace && isCentered && livenessAttempts === 0) {
6599
- startLivenessCheck();
6600
- }
6601
6588
  } catch (error) {
6602
6589
  console.error("Face detection error:", error);
6603
6590
  }
@@ -6626,9 +6613,6 @@ function FaceCaptureModal({
6626
6613
  if (faceDetectionTimeoutRef.current) {
6627
6614
  window.clearTimeout(faceDetectionTimeoutRef.current);
6628
6615
  }
6629
- if (livenessCheckRef.current) {
6630
- window.clearInterval(livenessCheckRef.current);
6631
- }
6632
6616
  };
6633
6617
  }, []);
6634
6618
  useEffect(() => {
@@ -6695,7 +6679,6 @@ function FaceCaptureModal({
6695
6679
  };
6696
6680
  const handleRetry = () => {
6697
6681
  dispatch({ type: "RESET" });
6698
- setLivenessAttempts(0);
6699
6682
  };
6700
6683
  return /* @__PURE__ */ jsxs("div", { className: "neofaceid-root", style: styles.overlay, children: [
6701
6684
  /* @__PURE__ */ jsx(ScreenFlashOverlay, { active: flashOn }),
@@ -11194,8 +11177,8 @@ const biometricDetection = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
11194
11177
  initializeBiometricDetection,
11195
11178
  isAdvancedDetectionAvailable
11196
11179
  }, Symbol.toStringTag, { value: "Module" }));
11197
- const VERSION = "1.36.0";
11198
- const RELEASE_DATE = "2026-09-02";
11180
+ const VERSION = "1.36.1";
11181
+ const RELEASE_DATE = "2026-09-03";
11199
11182
  let cachedSession = null;
11200
11183
  function getCachedCaptureSession() {
11201
11184
  return cachedSession;