@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.
@@ -38,7 +38,6 @@ const showMatchIndicatorStates = [
38
38
  FaceMatchState.TOO_FAR,
39
39
  FaceMatchState.CANT_IDENTIFY,
40
40
  FaceMatchState.FACE_IDENTIFIED,
41
- FaceMatchState.MATCHED,
42
41
  ];
43
42
  /**
44
43
  * For now we want to memoize the HOC for MatchIndicator because to optimize renders
@@ -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). For MATCHED state,
103
- // we don't want to show any toasts.
104
- return (React.createElement(Toast, { size: "large", variation: faceMatchState === FaceMatchState.TOO_CLOSE ? 'error' : 'primary' }, faceMatchState === FaceMatchState.TOO_CLOSE
105
- ? FaceMatchStateStringMap[FaceMatchState.TOO_CLOSE]
106
- : FaceMatchStateStringMap[FaceMatchState.TOO_FAR]));
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
  };
@@ -1,3 +1,3 @@
1
- const VERSION = '3.0.2';
1
+ const VERSION = '3.0.3';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -771,7 +771,7 @@ class VideoRecorder {
771
771
  }
772
772
  }
773
773
 
774
- const VERSION = '3.0.2';
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). For MATCHED state,
2613
- // we don't want to show any toasts.
2614
- return (React__namespace.createElement(Toast, { size: "large", variation: faceMatchState === FaceMatchState.TOO_CLOSE ? 'error' : 'primary' }, faceMatchState === FaceMatchState.TOO_CLOSE
2615
- ? FaceMatchStateStringMap[FaceMatchState.TOO_CLOSE]
2616
- : FaceMatchStateStringMap[FaceMatchState.TOO_FAR]));
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
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.2";
1
+ export declare const VERSION = "3.0.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-liveness",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {