@aws-amplify/ui-react-liveness 3.0.15 → 3.0.17

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 (35) hide show
  1. package/dist/esm/components/FaceLivenessDetector/FaceLivenessDetectorCore.mjs +1 -1
  2. package/dist/esm/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.mjs +1 -1
  3. package/dist/esm/components/FaceLivenessDetector/LivenessCheck/LivenessCheck.mjs +1 -1
  4. package/dist/esm/components/FaceLivenessDetector/displayText.mjs +2 -0
  5. package/dist/esm/components/FaceLivenessDetector/service/machine/{index.mjs → machine.mjs} +43 -35
  6. package/dist/esm/components/FaceLivenessDetector/service/types/error.mjs +1 -0
  7. package/dist/esm/components/FaceLivenessDetector/service/types/liveness.mjs +0 -1
  8. package/dist/esm/components/FaceLivenessDetector/service/utils/constants.mjs +10 -2
  9. package/dist/esm/components/FaceLivenessDetector/service/utils/createStreamingClient/CustomWebSocketFetchHandler.mjs +3 -6
  10. package/dist/esm/components/FaceLivenessDetector/service/utils/eventUtils.mjs +7 -1
  11. package/dist/esm/components/FaceLivenessDetector/service/utils/getFaceMatchStateInLivenessOval.mjs +59 -0
  12. package/dist/esm/components/FaceLivenessDetector/service/utils/liveness.mjs +22 -74
  13. package/dist/esm/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.mjs +1 -1
  14. package/dist/esm/components/FaceLivenessDetector/shared/FaceLivenessErrorModal.mjs +6 -2
  15. package/dist/esm/components/FaceLivenessDetector/shared/Hint.mjs +5 -8
  16. package/dist/esm/components/FaceLivenessDetector/utils/getDisplayText.mjs +3 -1
  17. package/dist/esm/version.mjs +1 -1
  18. package/dist/index.js +145 -122
  19. package/dist/styles.css +1 -1
  20. package/dist/types/components/FaceLivenessDetector/displayText.d.ts +2 -0
  21. package/dist/types/components/FaceLivenessDetector/service/machine/index.d.ts +1 -5
  22. package/dist/types/components/FaceLivenessDetector/service/machine/machine.d.ts +5 -0
  23. package/dist/types/components/FaceLivenessDetector/service/types/error.d.ts +1 -0
  24. package/dist/types/components/FaceLivenessDetector/service/types/liveness.d.ts +0 -1
  25. package/dist/types/components/FaceLivenessDetector/service/types/machine.d.ts +2 -3
  26. package/dist/types/components/FaceLivenessDetector/service/utils/constants.d.ts +6 -0
  27. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/CustomWebSocketFetchHandler.d.ts +1 -0
  28. package/dist/types/components/FaceLivenessDetector/service/utils/eventUtils.d.ts +1 -0
  29. package/dist/types/components/FaceLivenessDetector/service/utils/getFaceMatchStateInLivenessOval.d.ts +17 -0
  30. package/dist/types/components/FaceLivenessDetector/service/utils/index.d.ts +1 -0
  31. package/dist/types/components/FaceLivenessDetector/service/utils/liveness.d.ts +2 -8
  32. package/dist/types/components/FaceLivenessDetector/shared/FaceLivenessErrorModal.d.ts +2 -0
  33. package/dist/types/components/FaceLivenessDetector/shared/Hint.d.ts +1 -1
  34. package/dist/types/version.d.ts +1 -1
  35. package/package.json +4 -4
@@ -50,14 +50,7 @@ export declare function drawStaticOval(canvasEl: HTMLCanvasElement, videoEl: HTM
50
50
  export declare function clearOvalCanvas({ canvas, }: {
51
51
  canvas: HTMLCanvasElement;
52
52
  }): void;
53
- export declare function generateBboxFromLandmarks(face: Face, oval: LivenessOvalDetails): BoundingBox;
54
- /**
55
- * Returns the state of the provided face with respect to the provided liveness oval.
56
- */
57
- export declare function getFaceMatchStateInLivenessOval(face: Face, ovalDetails: LivenessOvalDetails, initialFaceIntersection: number, sessionInformation: SessionInformation): {
58
- faceMatchState: FaceMatchState;
59
- faceMatchPercentage: number;
60
- };
53
+ export declare function generateBboxFromLandmarks(face: Face, oval: LivenessOvalDetails, frameHeight: number): BoundingBox;
61
54
  /**
62
55
  * Returns the illumination state in the provided video frame.
63
56
  */
@@ -68,6 +61,7 @@ export declare function estimateIllumination(videoEl: HTMLVideoElement): Illumin
68
61
  */
69
62
  export declare function isCameraDeviceVirtual(device: MediaDeviceInfo): boolean;
70
63
  export declare const LivenessErrorStateStringMap: {
64
+ CONNECTION_TIMEOUT: string;
71
65
  RUNTIME_ERROR: string;
72
66
  SERVER_ERROR: string;
73
67
  TIMEOUT: string;
@@ -13,6 +13,8 @@ export declare const renderErrorModal: ({ errorState, overrideErrorDisplayText,
13
13
  errorState: ErrorState;
14
14
  overrideErrorDisplayText?: Partial<{
15
15
  errorLabelText: string;
16
+ connectionTimeoutHeaderText: string;
17
+ connectionTimeoutMessageText: string;
16
18
  timeoutHeaderText: string;
17
19
  timeoutMessageText: string;
18
20
  faceDistanceHeaderText: string;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { IlluminationState, FaceMatchState } from '../service';
3
3
  import { HintDisplayText } from '../displayText';
4
- export declare const selectErrorState: import("../hooks").LivenessSelectorFn<"TIMEOUT" | "RUNTIME_ERROR" | "FRESHNESS_TIMEOUT" | "SERVER_ERROR" | "CAMERA_FRAMERATE_ERROR" | "CAMERA_ACCESS_ERROR" | "FACE_DISTANCE_ERROR" | "MOBILE_LANDSCAPE_ERROR" | "MULTIPLE_FACES_ERROR" | undefined>;
4
+ export declare const selectErrorState: import("../hooks").LivenessSelectorFn<"CONNECTION_TIMEOUT" | "TIMEOUT" | "RUNTIME_ERROR" | "FRESHNESS_TIMEOUT" | "SERVER_ERROR" | "CAMERA_FRAMERATE_ERROR" | "CAMERA_ACCESS_ERROR" | "FACE_DISTANCE_ERROR" | "MOBILE_LANDSCAPE_ERROR" | "MULTIPLE_FACES_ERROR" | undefined>;
5
5
  export declare const selectFaceMatchState: import("../hooks").LivenessSelectorFn<FaceMatchState | undefined>;
6
6
  export declare const selectIlluminationState: import("../hooks").LivenessSelectorFn<IlluminationState | undefined>;
7
7
  export declare const selectIsFaceFarEnoughBeforeRecording: import("../hooks").LivenessSelectorFn<boolean | undefined>;
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.15";
1
+ export declare const VERSION = "3.0.17";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-liveness",
3
- "version": "3.0.15",
3
+ "version": "3.0.17",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -42,13 +42,13 @@
42
42
  "typecheck": "tsc --noEmit"
43
43
  },
44
44
  "peerDependencies": {
45
- "aws-amplify": "^6.0.2",
45
+ "aws-amplify": "^6.0.26",
46
46
  "react": "^16.14.0 || ^17.0 || ^18.0",
47
47
  "react-dom": "^16.14.0 || ^17.0 || ^18.0"
48
48
  },
49
49
  "dependencies": {
50
- "@aws-amplify/ui": "6.0.12",
51
- "@aws-amplify/ui-react": "6.1.6",
50
+ "@aws-amplify/ui": "6.0.13",
51
+ "@aws-amplify/ui-react": "6.1.7",
52
52
  "@aws-sdk/client-rekognitionstreaming": "3.398.0",
53
53
  "@aws-sdk/util-format-url": "^3.410.0",
54
54
  "@smithy/eventstream-serde-browser": "^2.0.4",