@aws-amplify/ui-react-liveness 3.0.2 → 3.0.3
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.
|
@@ -99,11 +99,13 @@ const Hint = ({ hintDisplayText }) => {
|
|
|
99
99
|
// During face matching, we want to only show the TOO_CLOSE or
|
|
100
100
|
// TOO_FAR texts. If FaceMatchState matches TOO_CLOSE, we'll show
|
|
101
101
|
// the TOO_CLOSE text, but for FACE_IDENTIFED, CANT_IDENTIFY, TOO_MANY
|
|
102
|
-
// we are defaulting to the TOO_FAR text (for now).
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
// we are defaulting to the TOO_FAR text (for now).
|
|
103
|
+
let resultHintString = FaceMatchStateStringMap[FaceMatchState.TOO_FAR];
|
|
104
|
+
if (faceMatchState === FaceMatchState.TOO_CLOSE ||
|
|
105
|
+
faceMatchState === FaceMatchState.MATCHED) {
|
|
106
|
+
resultHintString = FaceMatchStateStringMap[faceMatchState];
|
|
107
|
+
}
|
|
108
|
+
return (React.createElement(Toast, { size: "large", variation: faceMatchState === FaceMatchState.TOO_CLOSE ? 'error' : 'primary' }, resultHintString));
|
|
107
109
|
}
|
|
108
110
|
return null;
|
|
109
111
|
};
|
package/dist/esm/version.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -771,7 +771,7 @@ class VideoRecorder {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
const VERSION = '3.0.
|
|
774
|
+
const VERSION = '3.0.3';
|
|
775
775
|
|
|
776
776
|
const BASE_USER_AGENT = `ui-react-liveness/${VERSION}`;
|
|
777
777
|
const getLivenessUserAgent = () => {
|
|
@@ -2609,11 +2609,13 @@ const Hint = ({ hintDisplayText }) => {
|
|
|
2609
2609
|
// During face matching, we want to only show the TOO_CLOSE or
|
|
2610
2610
|
// TOO_FAR texts. If FaceMatchState matches TOO_CLOSE, we'll show
|
|
2611
2611
|
// the TOO_CLOSE text, but for FACE_IDENTIFED, CANT_IDENTIFY, TOO_MANY
|
|
2612
|
-
// we are defaulting to the TOO_FAR text (for now).
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2612
|
+
// we are defaulting to the TOO_FAR text (for now).
|
|
2613
|
+
let resultHintString = FaceMatchStateStringMap[FaceMatchState.TOO_FAR];
|
|
2614
|
+
if (faceMatchState === FaceMatchState.TOO_CLOSE ||
|
|
2615
|
+
faceMatchState === FaceMatchState.MATCHED) {
|
|
2616
|
+
resultHintString = FaceMatchStateStringMap[faceMatchState];
|
|
2617
|
+
}
|
|
2618
|
+
return (React__namespace.createElement(Toast, { size: "large", variation: faceMatchState === FaceMatchState.TOO_CLOSE ? 'error' : 'primary' }, resultHintString));
|
|
2617
2619
|
}
|
|
2618
2620
|
return null;
|
|
2619
2621
|
};
|
|
@@ -2824,7 +2826,6 @@ const showMatchIndicatorStates = [
|
|
|
2824
2826
|
FaceMatchState.TOO_FAR,
|
|
2825
2827
|
FaceMatchState.CANT_IDENTIFY,
|
|
2826
2828
|
FaceMatchState.FACE_IDENTIFIED,
|
|
2827
|
-
FaceMatchState.MATCHED,
|
|
2828
2829
|
];
|
|
2829
2830
|
/**
|
|
2830
2831
|
* For now we want to memoize the HOC for MatchIndicator because to optimize renders
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.3";
|