@authme/identity-verification 2.8.30 → 2.8.32
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/index.cjs +16 -22
- package/index.js +16 -22
- package/package.json +6 -6
- package/src/lib/ui/ocr.animate.d.ts +1 -1
package/index.cjs
CHANGED
|
@@ -29151,11 +29151,12 @@ const renderLivenessUI = config => {
|
|
|
29151
29151
|
if (uiThemeConfig.isStatementEnabled) {
|
|
29152
29152
|
config.videoContainer.appendChild(statementContainer);
|
|
29153
29153
|
}
|
|
29154
|
-
util.uiThemeText(titleText, uiThemeConfig.titleThree, '
|
|
29154
|
+
util.uiThemeText(titleText, uiThemeConfig.titleThree, '8vh');
|
|
29155
29155
|
util.uiThemeHint(statusText, uiThemeConfig.hint, '15vh');
|
|
29156
29156
|
// Set init text
|
|
29157
29157
|
titleText.textContent = translateService.translate('sdk.liveness.detection.step');
|
|
29158
29158
|
statusText.textContent = translateService.translate('sdk.general.verify.error.noFace');
|
|
29159
|
+
faceMask.classList.add('error');
|
|
29159
29160
|
return {
|
|
29160
29161
|
statusText,
|
|
29161
29162
|
faceMask,
|
|
@@ -29613,7 +29614,7 @@ function startLiveness(config) {
|
|
|
29613
29614
|
switch (result.eStatus) {
|
|
29614
29615
|
case liveness.FasRecognitionResult.NoFace:
|
|
29615
29616
|
uiComponentLiveness.statusText.textContent = translateService.translate('sdk.general.verify.error.noFace');
|
|
29616
|
-
setBorderStatus(
|
|
29617
|
+
setBorderStatus('error');
|
|
29617
29618
|
break;
|
|
29618
29619
|
case liveness.FasRecognitionResult.FaceNotAtCenter:
|
|
29619
29620
|
uiComponentLiveness.statusText.textContent = translateService.translate('sdk.general.verify.error.faceNotAtCenter');
|
|
@@ -30139,13 +30140,14 @@ const renderOCRUI = config => {
|
|
|
30139
30140
|
successContainer.appendChild(successBlockDom);
|
|
30140
30141
|
const arrowAnimationContainer = document.createElement('div');
|
|
30141
30142
|
arrowAnimationContainer.classList.add('arrow_container');
|
|
30143
|
+
arrowAnimationContainer.appendChild(directionTextPanel);
|
|
30142
30144
|
config.videoContainer.appendChild(titleTextPanel);
|
|
30143
30145
|
// if (config.showStatement) {
|
|
30144
30146
|
if (uiThemeConfig.isStatementEnabled) {
|
|
30145
30147
|
config.videoContainer.appendChild(statementContainer);
|
|
30146
30148
|
}
|
|
30147
30149
|
config.videoContainer.appendChild(statusTextPanel);
|
|
30148
|
-
config.videoContainer.appendChild(directionTextPanel);
|
|
30150
|
+
// config.videoContainer.appendChild(directionTextPanel);
|
|
30149
30151
|
config.videoContainer.appendChild(scanAnimationContainer);
|
|
30150
30152
|
config.videoContainer.appendChild(successContainer);
|
|
30151
30153
|
config.videoContainer.appendChild(arrowAnimationContainer);
|
|
@@ -31061,8 +31063,9 @@ function renderCardRotateAnimate(container) {
|
|
|
31061
31063
|
}, roundAnimateDuration);
|
|
31062
31064
|
});
|
|
31063
31065
|
}
|
|
31064
|
-
function fadeAnimate(inOrOut) {
|
|
31066
|
+
function fadeAnimate(inOrOut, directionTextPanel = null) {
|
|
31065
31067
|
div.style.opacity = inOrOut === 'in' ? '0.8' : '0';
|
|
31068
|
+
if (directionTextPanel) directionTextPanel.style.display = inOrOut === 'in' ? 'flex' : 'none';
|
|
31066
31069
|
return new Promise(resolve => {
|
|
31067
31070
|
setTimeout(() => {
|
|
31068
31071
|
resolve(true);
|
|
@@ -31071,13 +31074,13 @@ function renderCardRotateAnimate(container) {
|
|
|
31071
31074
|
}
|
|
31072
31075
|
function rotateCard(direction, beforeAnimate = () => {
|
|
31073
31076
|
return;
|
|
31074
|
-
}, stopOn = -1) {
|
|
31077
|
+
}, directionTextPanel = null, stopOn = -1) {
|
|
31075
31078
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31076
31079
|
// console.log('rotateCard', direction);
|
|
31077
31080
|
animateStop = false;
|
|
31078
31081
|
stopTimeout = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
31079
31082
|
if (animateStop) return;
|
|
31080
|
-
yield fadeAnimate('out');
|
|
31083
|
+
yield fadeAnimate('out', directionTextPanel);
|
|
31081
31084
|
setTimeout(() => {
|
|
31082
31085
|
resetAnimateStatus();
|
|
31083
31086
|
}, fadeDuration);
|
|
@@ -31088,7 +31091,7 @@ function renderCardRotateAnimate(container) {
|
|
|
31088
31091
|
cardSvg.style.display = 'block';
|
|
31089
31092
|
frontArrowSvg.style.display = 'block';
|
|
31090
31093
|
backArrowSvg.style.display = 'block';
|
|
31091
|
-
yield fadeAnimate('in');
|
|
31094
|
+
yield fadeAnimate('in', directionTextPanel);
|
|
31092
31095
|
function _rotateCard(direction) {
|
|
31093
31096
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31094
31097
|
switch (direction) {
|
|
@@ -33708,7 +33711,6 @@ function startOCR(config) {
|
|
|
33708
33711
|
// Helper function to set up direction display
|
|
33709
33712
|
const setupDirectionDisplay = (direction, translationKey, iconOnRight = false) => {
|
|
33710
33713
|
const arrow = createDirectionArrow(direction);
|
|
33711
|
-
console.log(`DEBUG: Created ${direction} arrow SVG:`, arrow);
|
|
33712
33714
|
uiComponentOCR.directionIcon.appendChild(arrow);
|
|
33713
33715
|
// Set text
|
|
33714
33716
|
uiComponentOCR.directionText.textContent = translateService.translate(translationKey);
|
|
@@ -33722,14 +33724,6 @@ function startOCR(config) {
|
|
|
33722
33724
|
uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionIcon);
|
|
33723
33725
|
uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionText);
|
|
33724
33726
|
}
|
|
33725
|
-
if (showDirection) {
|
|
33726
|
-
uiComponentOCR.directionTextPanel.style.display = 'flex';
|
|
33727
|
-
// Set timer to hide panel after 2 seconds (for any direction)
|
|
33728
|
-
setTimeout(() => {
|
|
33729
|
-
uiComponentOCR.directionTextPanel.style.display = 'none';
|
|
33730
|
-
}, 2000);
|
|
33731
|
-
}
|
|
33732
|
-
// Set top text
|
|
33733
33727
|
setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
|
|
33734
33728
|
};
|
|
33735
33729
|
// Create direction arrow using embedded SVG content
|
|
@@ -33772,22 +33766,22 @@ function startOCR(config) {
|
|
|
33772
33766
|
case idRecognition.EAuthMeIDCardAntiFraudStage.Left:
|
|
33773
33767
|
rotateCard(facingMode === 'front' ? 'right' : 'left', () => {
|
|
33774
33768
|
previosAntiFraudAnimateTime = Date.now();
|
|
33775
|
-
});
|
|
33769
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33776
33770
|
break;
|
|
33777
33771
|
case idRecognition.EAuthMeIDCardAntiFraudStage.Right:
|
|
33778
33772
|
rotateCard(facingMode === 'front' ? 'left' : 'right', () => {
|
|
33779
33773
|
previosAntiFraudAnimateTime = Date.now();
|
|
33780
|
-
});
|
|
33774
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33781
33775
|
break;
|
|
33782
33776
|
case idRecognition.EAuthMeIDCardAntiFraudStage.Up:
|
|
33783
33777
|
rotateCard('up', () => {
|
|
33784
33778
|
previosAntiFraudAnimateTime = Date.now();
|
|
33785
|
-
});
|
|
33779
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33786
33780
|
break;
|
|
33787
33781
|
case idRecognition.EAuthMeIDCardAntiFraudStage.Down:
|
|
33788
33782
|
rotateCard('down', () => {
|
|
33789
33783
|
previosAntiFraudAnimateTime = Date.now();
|
|
33790
|
-
});
|
|
33784
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33791
33785
|
break;
|
|
33792
33786
|
}
|
|
33793
33787
|
}
|
|
@@ -37253,8 +37247,8 @@ class AuthmeIdentityVerification extends engine.AuthmeFunctionModule {
|
|
|
37253
37247
|
}
|
|
37254
37248
|
|
|
37255
37249
|
var name = "authme/sdk";
|
|
37256
|
-
var version$1 = "2.8.
|
|
37257
|
-
var date = "2025-
|
|
37250
|
+
var version$1 = "2.8.32";
|
|
37251
|
+
var date = "2025-11-07T03:04:15+0000";
|
|
37258
37252
|
var packageInfo = {
|
|
37259
37253
|
name: name,
|
|
37260
37254
|
version: version$1,
|
package/index.js
CHANGED
|
@@ -29143,11 +29143,12 @@ const renderLivenessUI = config => {
|
|
|
29143
29143
|
if (uiThemeConfig.isStatementEnabled) {
|
|
29144
29144
|
config.videoContainer.appendChild(statementContainer);
|
|
29145
29145
|
}
|
|
29146
|
-
uiThemeText(titleText, uiThemeConfig.titleThree, '
|
|
29146
|
+
uiThemeText(titleText, uiThemeConfig.titleThree, '8vh');
|
|
29147
29147
|
uiThemeHint(statusText, uiThemeConfig.hint, '15vh');
|
|
29148
29148
|
// Set init text
|
|
29149
29149
|
titleText.textContent = translateService.translate('sdk.liveness.detection.step');
|
|
29150
29150
|
statusText.textContent = translateService.translate('sdk.general.verify.error.noFace');
|
|
29151
|
+
faceMask.classList.add('error');
|
|
29151
29152
|
return {
|
|
29152
29153
|
statusText,
|
|
29153
29154
|
faceMask,
|
|
@@ -29605,7 +29606,7 @@ function startLiveness(config) {
|
|
|
29605
29606
|
switch (result.eStatus) {
|
|
29606
29607
|
case FasRecognitionResult.NoFace:
|
|
29607
29608
|
uiComponentLiveness.statusText.textContent = translateService.translate('sdk.general.verify.error.noFace');
|
|
29608
|
-
setBorderStatus(
|
|
29609
|
+
setBorderStatus('error');
|
|
29609
29610
|
break;
|
|
29610
29611
|
case FasRecognitionResult.FaceNotAtCenter:
|
|
29611
29612
|
uiComponentLiveness.statusText.textContent = translateService.translate('sdk.general.verify.error.faceNotAtCenter');
|
|
@@ -30131,13 +30132,14 @@ const renderOCRUI = config => {
|
|
|
30131
30132
|
successContainer.appendChild(successBlockDom);
|
|
30132
30133
|
const arrowAnimationContainer = document.createElement('div');
|
|
30133
30134
|
arrowAnimationContainer.classList.add('arrow_container');
|
|
30135
|
+
arrowAnimationContainer.appendChild(directionTextPanel);
|
|
30134
30136
|
config.videoContainer.appendChild(titleTextPanel);
|
|
30135
30137
|
// if (config.showStatement) {
|
|
30136
30138
|
if (uiThemeConfig.isStatementEnabled) {
|
|
30137
30139
|
config.videoContainer.appendChild(statementContainer);
|
|
30138
30140
|
}
|
|
30139
30141
|
config.videoContainer.appendChild(statusTextPanel);
|
|
30140
|
-
config.videoContainer.appendChild(directionTextPanel);
|
|
30142
|
+
// config.videoContainer.appendChild(directionTextPanel);
|
|
30141
30143
|
config.videoContainer.appendChild(scanAnimationContainer);
|
|
30142
30144
|
config.videoContainer.appendChild(successContainer);
|
|
30143
30145
|
config.videoContainer.appendChild(arrowAnimationContainer);
|
|
@@ -31053,8 +31055,9 @@ function renderCardRotateAnimate(container) {
|
|
|
31053
31055
|
}, roundAnimateDuration);
|
|
31054
31056
|
});
|
|
31055
31057
|
}
|
|
31056
|
-
function fadeAnimate(inOrOut) {
|
|
31058
|
+
function fadeAnimate(inOrOut, directionTextPanel = null) {
|
|
31057
31059
|
div.style.opacity = inOrOut === 'in' ? '0.8' : '0';
|
|
31060
|
+
if (directionTextPanel) directionTextPanel.style.display = inOrOut === 'in' ? 'flex' : 'none';
|
|
31058
31061
|
return new Promise(resolve => {
|
|
31059
31062
|
setTimeout(() => {
|
|
31060
31063
|
resolve(true);
|
|
@@ -31063,13 +31066,13 @@ function renderCardRotateAnimate(container) {
|
|
|
31063
31066
|
}
|
|
31064
31067
|
function rotateCard(direction, beforeAnimate = () => {
|
|
31065
31068
|
return;
|
|
31066
|
-
}, stopOn = -1) {
|
|
31069
|
+
}, directionTextPanel = null, stopOn = -1) {
|
|
31067
31070
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31068
31071
|
// console.log('rotateCard', direction);
|
|
31069
31072
|
animateStop = false;
|
|
31070
31073
|
stopTimeout = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
31071
31074
|
if (animateStop) return;
|
|
31072
|
-
yield fadeAnimate('out');
|
|
31075
|
+
yield fadeAnimate('out', directionTextPanel);
|
|
31073
31076
|
setTimeout(() => {
|
|
31074
31077
|
resetAnimateStatus();
|
|
31075
31078
|
}, fadeDuration);
|
|
@@ -31080,7 +31083,7 @@ function renderCardRotateAnimate(container) {
|
|
|
31080
31083
|
cardSvg.style.display = 'block';
|
|
31081
31084
|
frontArrowSvg.style.display = 'block';
|
|
31082
31085
|
backArrowSvg.style.display = 'block';
|
|
31083
|
-
yield fadeAnimate('in');
|
|
31086
|
+
yield fadeAnimate('in', directionTextPanel);
|
|
31084
31087
|
function _rotateCard(direction) {
|
|
31085
31088
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31086
31089
|
switch (direction) {
|
|
@@ -33700,7 +33703,6 @@ function startOCR(config) {
|
|
|
33700
33703
|
// Helper function to set up direction display
|
|
33701
33704
|
const setupDirectionDisplay = (direction, translationKey, iconOnRight = false) => {
|
|
33702
33705
|
const arrow = createDirectionArrow(direction);
|
|
33703
|
-
console.log(`DEBUG: Created ${direction} arrow SVG:`, arrow);
|
|
33704
33706
|
uiComponentOCR.directionIcon.appendChild(arrow);
|
|
33705
33707
|
// Set text
|
|
33706
33708
|
uiComponentOCR.directionText.textContent = translateService.translate(translationKey);
|
|
@@ -33714,14 +33716,6 @@ function startOCR(config) {
|
|
|
33714
33716
|
uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionIcon);
|
|
33715
33717
|
uiComponentOCR.directionTextPanel.appendChild(uiComponentOCR.directionText);
|
|
33716
33718
|
}
|
|
33717
|
-
if (showDirection) {
|
|
33718
|
-
uiComponentOCR.directionTextPanel.style.display = 'flex';
|
|
33719
|
-
// Set timer to hide panel after 2 seconds (for any direction)
|
|
33720
|
-
setTimeout(() => {
|
|
33721
|
-
uiComponentOCR.directionTextPanel.style.display = 'none';
|
|
33722
|
-
}, 2000);
|
|
33723
|
-
}
|
|
33724
|
-
// Set top text
|
|
33725
33719
|
setTopText(translateService.translate('sdk.guard.verify.guide.idCardFlip'));
|
|
33726
33720
|
};
|
|
33727
33721
|
// Create direction arrow using embedded SVG content
|
|
@@ -33764,22 +33758,22 @@ function startOCR(config) {
|
|
|
33764
33758
|
case EAuthMeIDCardAntiFraudStage.Left:
|
|
33765
33759
|
rotateCard(facingMode === 'front' ? 'right' : 'left', () => {
|
|
33766
33760
|
previosAntiFraudAnimateTime = Date.now();
|
|
33767
|
-
});
|
|
33761
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33768
33762
|
break;
|
|
33769
33763
|
case EAuthMeIDCardAntiFraudStage.Right:
|
|
33770
33764
|
rotateCard(facingMode === 'front' ? 'left' : 'right', () => {
|
|
33771
33765
|
previosAntiFraudAnimateTime = Date.now();
|
|
33772
|
-
});
|
|
33766
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33773
33767
|
break;
|
|
33774
33768
|
case EAuthMeIDCardAntiFraudStage.Up:
|
|
33775
33769
|
rotateCard('up', () => {
|
|
33776
33770
|
previosAntiFraudAnimateTime = Date.now();
|
|
33777
|
-
});
|
|
33771
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33778
33772
|
break;
|
|
33779
33773
|
case EAuthMeIDCardAntiFraudStage.Down:
|
|
33780
33774
|
rotateCard('down', () => {
|
|
33781
33775
|
previosAntiFraudAnimateTime = Date.now();
|
|
33782
|
-
});
|
|
33776
|
+
}, uiComponentOCR.directionTextPanel);
|
|
33783
33777
|
break;
|
|
33784
33778
|
}
|
|
33785
33779
|
}
|
|
@@ -37245,8 +37239,8 @@ class AuthmeIdentityVerification extends AuthmeFunctionModule {
|
|
|
37245
37239
|
}
|
|
37246
37240
|
|
|
37247
37241
|
var name = "authme/sdk";
|
|
37248
|
-
var version$1 = "2.8.
|
|
37249
|
-
var date = "2025-
|
|
37242
|
+
var version$1 = "2.8.32";
|
|
37243
|
+
var date = "2025-11-07T03:04:15+0000";
|
|
37250
37244
|
var packageInfo = {
|
|
37251
37245
|
name: name,
|
|
37252
37246
|
version: version$1,
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/identity-verification",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.32",
|
|
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.
|
|
9
|
-
"@authme/engine": "2.8.
|
|
10
|
-
"@authme/id-recognition": "2.8.
|
|
11
|
-
"@authme/liveness": "2.8.
|
|
12
|
-
"@authme/util": "2.8.
|
|
8
|
+
"@authme/core": "2.8.32",
|
|
9
|
+
"@authme/engine": "2.8.32",
|
|
10
|
+
"@authme/id-recognition": "2.8.32",
|
|
11
|
+
"@authme/liveness": "2.8.32",
|
|
12
|
+
"@authme/util": "2.8.32"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.js",
|
|
15
15
|
"main": "./index.cjs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare type direction = 'left' | 'right' | 'up' | 'down';
|
|
2
2
|
export declare function renderCardRotateAnimate(container: HTMLElement): {
|
|
3
3
|
stopAnimate: () => Promise<unknown>;
|
|
4
|
-
rotateCard: (direction: direction, beforeAnimate?: () => void, stopOn?: number) => Promise<void>;
|
|
4
|
+
rotateCard: (direction: direction, beforeAnimate?: () => void, directionTextPanel?: HTMLElement | null, stopOn?: number) => Promise<void>;
|
|
5
5
|
getIsRotateCardAnimating: () => boolean;
|
|
6
6
|
};
|
|
7
7
|
export {};
|