@authme/identity-verification 2.8.33 → 2.8.35

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 (3) hide show
  1. package/index.cjs +22 -7
  2. package/index.js +22 -7
  3. package/package.json +6 -6
package/index.cjs CHANGED
@@ -30749,6 +30749,10 @@ function renderCardRotateAnimate(container, directionTextPanel = null, setAnimat
30749
30749
  clearTimeout(stopTimeout);
30750
30750
  stopTimeout = null;
30751
30751
  }
30752
+ // 手動調用狀態清理回調,確保在動畫中斷時也能重置 ocrSendFrameAnimation
30753
+ if (setAnimationFrameState) {
30754
+ setAnimationFrameState(false);
30755
+ }
30752
30756
  fadeAnimate('out');
30753
30757
  return new Promise(resolve => {
30754
30758
  setTimeout(() => {
@@ -32621,7 +32625,6 @@ function startOCR(config) {
32621
32625
  function startAntiFraud(type, cardType) {
32622
32626
  const animateInterval = 2 * util.TIME_UNIT.SECOND;
32623
32627
  const nextAnimateInterval = 6 * util.TIME_UNIT.SECOND;
32624
- let eStage = null;
32625
32628
  let needDeformationCount = 0;
32626
32629
  setStatusEvent$1(core.StatusEvent.TWID);
32627
32630
  setStatusView(core.StatusView.Init);
@@ -32777,8 +32780,8 @@ function startOCR(config) {
32777
32780
  yield applyTextByResult(x);
32778
32781
  cardRotateByStage(x.eStage);
32779
32782
  if (isTutorialFinish) {
32780
- cardRotateTextProcess(x.eStage, eStage != x.eStage);
32781
- eStage = x.eStage;
32783
+ // 文字更新移到 cardRotateAnimationProcess 中,確保與動畫同步
32784
+ x.eStage;
32782
32785
  }
32783
32786
  if (x.eStage !== currentAntiFraudStage) {
32784
32787
  needDeformationCount = 0;
@@ -32802,7 +32805,11 @@ function startOCR(config) {
32802
32805
  rxjs.takeWhile(x => x.eStatus !== idRecognition.EAuthMeIDCardAntiFraudStatus.Pass,
32803
32806
  // &&
32804
32807
  // x.eStatus !== EAuthMeIDCardAntiFraudStatus.Failed,
32805
- true))), rxjs.shareReplay(1));
32808
+ true),
32809
+ // 確保在任何情況下(成功、失敗、取消)都重置 flag
32810
+ rxjs.finalize(() => {
32811
+ ocrSendFrameAnimation = false;
32812
+ }))), rxjs.shareReplay(1));
32806
32813
  const handleSuccess$ = antiFraudStart$.pipe(rxjs.filter(x => x.eStatus === idRecognition.EAuthMeIDCardAntiFraudStatus.Pass || x.eStatus === idRecognition.EAuthMeIDCardAntiFraudStatus.Failed), rxjs.take(1), rxjs.tap(() => {
32807
32814
  util.hidePopup();
32808
32815
  clearAllFraudLottie();
@@ -33008,7 +33015,11 @@ function startOCR(config) {
33008
33015
  util.showElement(uiComponentOCR.scanAnimationContainer);
33009
33016
  return rxjs.of(true);
33010
33017
  }
33011
- }), rxjs.map(confirmResp => confirmResp));
33018
+ }), rxjs.map(confirmResp => confirmResp),
33019
+ // 確保在任何情況下(成功、失敗、取消)都重置 flag
33020
+ rxjs.finalize(() => {
33021
+ ocrSendFrameAnimation = false;
33022
+ }));
33012
33023
  }));
33013
33024
  };
33014
33025
  uiComponentOCRMask.setCardBorderColor(null);
@@ -33789,6 +33800,10 @@ function startOCR(config) {
33789
33800
  }
33790
33801
  }
33791
33802
  function cardRotateAnimationProcess(stage) {
33803
+ // 在動畫開始前更新文字,確保文字與動畫同步
33804
+ if (isTutorialFinish) {
33805
+ cardRotateTextProcess(stage, true);
33806
+ }
33792
33807
  switch (stage) {
33793
33808
  case idRecognition.EAuthMeIDCardAntiFraudStage.Left:
33794
33809
  rotateCard(facingMode === 'front' ? 'right' : 'left', () => {
@@ -37274,8 +37289,8 @@ class AuthmeIdentityVerification extends engine.AuthmeFunctionModule {
37274
37289
  }
37275
37290
 
37276
37291
  var name = "authme/sdk";
37277
- var version$1 = "2.8.33";
37278
- var date = "2025-11-21T09:00:22+0000";
37292
+ var version$1 = "2.8.35";
37293
+ var date = "2025-11-25T04:34:17+0000";
37279
37294
  var packageInfo = {
37280
37295
  name: name,
37281
37296
  version: version$1,
package/index.js CHANGED
@@ -30741,6 +30741,10 @@ function renderCardRotateAnimate(container, directionTextPanel = null, setAnimat
30741
30741
  clearTimeout(stopTimeout);
30742
30742
  stopTimeout = null;
30743
30743
  }
30744
+ // 手動調用狀態清理回調,確保在動畫中斷時也能重置 ocrSendFrameAnimation
30745
+ if (setAnimationFrameState) {
30746
+ setAnimationFrameState(false);
30747
+ }
30744
30748
  fadeAnimate('out');
30745
30749
  return new Promise(resolve => {
30746
30750
  setTimeout(() => {
@@ -32613,7 +32617,6 @@ function startOCR(config) {
32613
32617
  function startAntiFraud(type, cardType) {
32614
32618
  const animateInterval = 2 * TIME_UNIT.SECOND;
32615
32619
  const nextAnimateInterval = 6 * TIME_UNIT.SECOND;
32616
- let eStage = null;
32617
32620
  let needDeformationCount = 0;
32618
32621
  setStatusEvent$1(StatusEvent.TWID);
32619
32622
  setStatusView(StatusView.Init);
@@ -32769,8 +32772,8 @@ function startOCR(config) {
32769
32772
  yield applyTextByResult(x);
32770
32773
  cardRotateByStage(x.eStage);
32771
32774
  if (isTutorialFinish) {
32772
- cardRotateTextProcess(x.eStage, eStage != x.eStage);
32773
- eStage = x.eStage;
32775
+ // 文字更新移到 cardRotateAnimationProcess 中,確保與動畫同步
32776
+ x.eStage;
32774
32777
  }
32775
32778
  if (x.eStage !== currentAntiFraudStage) {
32776
32779
  needDeformationCount = 0;
@@ -32794,7 +32797,11 @@ function startOCR(config) {
32794
32797
  takeWhile$1(x => x.eStatus !== EAuthMeIDCardAntiFraudStatus.Pass,
32795
32798
  // &&
32796
32799
  // x.eStatus !== EAuthMeIDCardAntiFraudStatus.Failed,
32797
- true))), shareReplay(1));
32800
+ true),
32801
+ // 確保在任何情況下(成功、失敗、取消)都重置 flag
32802
+ finalize(() => {
32803
+ ocrSendFrameAnimation = false;
32804
+ }))), shareReplay(1));
32798
32805
  const handleSuccess$ = antiFraudStart$.pipe(filter(x => x.eStatus === EAuthMeIDCardAntiFraudStatus.Pass || x.eStatus === EAuthMeIDCardAntiFraudStatus.Failed), take(1), tap(() => {
32799
32806
  hidePopup();
32800
32807
  clearAllFraudLottie();
@@ -33000,7 +33007,11 @@ function startOCR(config) {
33000
33007
  showElement(uiComponentOCR.scanAnimationContainer);
33001
33008
  return of(true);
33002
33009
  }
33003
- }), map(confirmResp => confirmResp));
33010
+ }), map(confirmResp => confirmResp),
33011
+ // 確保在任何情況下(成功、失敗、取消)都重置 flag
33012
+ finalize(() => {
33013
+ ocrSendFrameAnimation = false;
33014
+ }));
33004
33015
  }));
33005
33016
  };
33006
33017
  uiComponentOCRMask.setCardBorderColor(null);
@@ -33781,6 +33792,10 @@ function startOCR(config) {
33781
33792
  }
33782
33793
  }
33783
33794
  function cardRotateAnimationProcess(stage) {
33795
+ // 在動畫開始前更新文字,確保文字與動畫同步
33796
+ if (isTutorialFinish) {
33797
+ cardRotateTextProcess(stage, true);
33798
+ }
33784
33799
  switch (stage) {
33785
33800
  case EAuthMeIDCardAntiFraudStage.Left:
33786
33801
  rotateCard(facingMode === 'front' ? 'right' : 'left', () => {
@@ -37266,8 +37281,8 @@ class AuthmeIdentityVerification extends AuthmeFunctionModule {
37266
37281
  }
37267
37282
 
37268
37283
  var name = "authme/sdk";
37269
- var version$1 = "2.8.33";
37270
- var date = "2025-11-21T09:00:22+0000";
37284
+ var version$1 = "2.8.35";
37285
+ var date = "2025-11-25T04:34:17+0000";
37271
37286
  var packageInfo = {
37272
37287
  name: name,
37273
37288
  version: version$1,
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@authme/identity-verification",
3
- "version": "2.8.33",
3
+ "version": "2.8.35",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
6
  "lottie-web": "^5.9.2",
7
7
  "rxjs": "^7.4.0",
8
- "@authme/core": "2.8.33",
9
- "@authme/engine": "2.8.33",
10
- "@authme/id-recognition": "2.8.33",
11
- "@authme/liveness": "2.8.33",
12
- "@authme/util": "2.8.33"
8
+ "@authme/core": "2.8.35",
9
+ "@authme/engine": "2.8.35",
10
+ "@authme/id-recognition": "2.8.35",
11
+ "@authme/liveness": "2.8.35",
12
+ "@authme/util": "2.8.35"
13
13
  },
14
14
  "module": "./index.js",
15
15
  "main": "./index.cjs",