@aws-amplify/ui-react-liveness 2.0.11 → 3.0.0
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/dist/esm/components/FaceLivenessDetector/FaceLivenessDetector.mjs +17 -1
- package/dist/esm/components/FaceLivenessDetector/FaceLivenessDetectorCore.mjs +42 -1
- package/dist/esm/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.mjs +199 -1
- package/dist/esm/components/FaceLivenessDetector/LivenessCheck/LivenessCheck.mjs +97 -1
- package/dist/esm/components/FaceLivenessDetector/displayText.mjs +50 -1
- package/dist/esm/components/FaceLivenessDetector/hooks/useLivenessActor.mjs +13 -1
- package/dist/esm/components/FaceLivenessDetector/hooks/useLivenessSelector.mjs +12 -1
- package/dist/esm/components/FaceLivenessDetector/hooks/useMediaStreamInVideo.mjs +38 -1
- package/dist/esm/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.mjs +15 -1
- package/dist/esm/components/FaceLivenessDetector/service/machine/index.mjs +1130 -1
- package/dist/esm/components/FaceLivenessDetector/service/types/error.mjs +16 -1
- package/dist/esm/components/FaceLivenessDetector/service/types/faceDetection.mjs +15 -1
- package/dist/esm/components/FaceLivenessDetector/service/types/liveness.mjs +23 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/CustomWebSocketFetchHandler.mjs +200 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/blazefaceFaceDetection.mjs +102 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/constants.mjs +18 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/eventUtils.mjs +30 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/freshnessColorDisplay.mjs +131 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/liveness.mjs +462 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/streamProvider.mjs +144 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/support.mjs +14 -1
- package/dist/esm/components/FaceLivenessDetector/service/utils/videoRecorder.mjs +98 -1
- package/dist/esm/components/FaceLivenessDetector/shared/CancelButton.mjs +24 -1
- package/dist/esm/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.mjs +41 -1
- package/dist/esm/components/FaceLivenessDetector/shared/FaceLivenessErrorModal.mjs +88 -1
- package/dist/esm/components/FaceLivenessDetector/shared/Hint.mjs +114 -1
- package/dist/esm/components/FaceLivenessDetector/shared/LandscapeErrorModal.mjs +30 -1
- package/dist/esm/components/FaceLivenessDetector/shared/LivenessIconWithPopover.mjs +37 -1
- package/dist/esm/components/FaceLivenessDetector/shared/MatchIndicator.mjs +24 -1
- package/dist/esm/components/FaceLivenessDetector/shared/Overlay.mjs +9 -1
- package/dist/esm/components/FaceLivenessDetector/shared/RecordingIcon.mjs +13 -1
- package/dist/esm/components/FaceLivenessDetector/shared/Toast.mjs +12 -1
- package/dist/esm/components/FaceLivenessDetector/types/classNames.mjs +54 -1
- package/dist/esm/components/FaceLivenessDetector/utils/device.mjs +24 -1
- package/dist/esm/components/FaceLivenessDetector/utils/getDisplayText.mjs +78 -1
- package/dist/esm/components/FaceLivenessDetector/utils/helpers.mjs +14 -0
- package/dist/esm/components/FaceLivenessDetector/utils/platform.mjs +8 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/version.mjs +3 -1
- package/dist/index.js +3208 -1
- package/dist/styles.css +343 -680
- package/dist/types/components/FaceLivenessDetector/FaceLivenessDetector.d.ts +1 -1
- package/dist/types/components/FaceLivenessDetector/FaceLivenessDetectorCore.d.ts +1 -3
- package/dist/types/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.d.ts +7 -3
- package/dist/types/components/FaceLivenessDetector/LivenessCheck/LivenessCheck.d.ts +5 -3
- package/dist/types/components/FaceLivenessDetector/displayText.d.ts +3 -10
- package/dist/types/components/FaceLivenessDetector/service/machine/index.d.ts +1 -1
- package/dist/types/components/FaceLivenessDetector/service/types/faceDetection.d.ts +2 -0
- package/dist/types/components/FaceLivenessDetector/service/types/liveness.d.ts +1 -1
- package/dist/types/components/FaceLivenessDetector/service/types/machine.d.ts +3 -1
- package/dist/types/components/FaceLivenessDetector/service/utils/blazefaceFaceDetection.d.ts +4 -3
- package/dist/types/components/FaceLivenessDetector/service/utils/liveness.d.ts +5 -2
- package/dist/types/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.d.ts +9 -15
- package/dist/types/components/FaceLivenessDetector/shared/Overlay.d.ts +2 -5
- package/dist/types/components/FaceLivenessDetector/shared/Toast.d.ts +1 -0
- package/dist/types/components/FaceLivenessDetector/types/classNames.d.ts +3 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +16 -37
- package/dist/esm/components/FaceLivenessDetector/StartLiveness/StartLiveness.mjs +0 -1
- package/dist/esm/components/FaceLivenessDetector/StartLiveness/helpers.mjs +0 -1
- package/dist/esm/components/FaceLivenessDetector/shared/GoodFitIllustration.mjs +0 -1
- package/dist/esm/components/FaceLivenessDetector/shared/StartScreenFigure.mjs +0 -1
- package/dist/esm/components/FaceLivenessDetector/shared/TooFarIllustration.mjs +0 -1
- package/dist/types/components/FaceLivenessDetector/StartLiveness/StartLiveness.d.ts +0 -9
- package/dist/types/components/FaceLivenessDetector/StartLiveness/index.d.ts +0 -1
- /package/dist/types/components/FaceLivenessDetector/{StartLiveness → utils}/helpers.d.ts +0 -0
|
@@ -1 +1,78 @@
|
|
|
1
|
-
import{defaultLivenessDisplayText
|
|
1
|
+
import { defaultLivenessDisplayText } from '../displayText.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merges optional displayText prop with
|
|
5
|
+
* defaultLivenessDisplayText and returns more bite size portions to pass
|
|
6
|
+
* down to child components of FaceLivenessDetector.
|
|
7
|
+
* @param overrideDisplayText
|
|
8
|
+
* @returns hintDisplayText, cameraDisplayText, instructionDisplayText, cancelLivenessCheckText
|
|
9
|
+
*/
|
|
10
|
+
function getDisplayText(overrideDisplayText) {
|
|
11
|
+
const displayText = {
|
|
12
|
+
...defaultLivenessDisplayText,
|
|
13
|
+
...overrideDisplayText,
|
|
14
|
+
};
|
|
15
|
+
const { photosensitivyWarningHeadingText, photosensitivyWarningBodyText, photosensitivyWarningInfoText, goodFitCaptionText, goodFitAltText, tooFarCaptionText, tooFarAltText, cameraMinSpecificationsHeadingText, cameraMinSpecificationsMessageText, cameraNotFoundHeadingText, cameraNotFoundMessageText, retryCameraPermissionsText, waitingCameraPermissionText, cancelLivenessCheckText, recordingIndicatorText, hintMoveFaceFrontOfCameraText, hintTooManyFacesText, hintFaceDetectedText, hintCanNotIdentifyText, hintTooCloseText, hintTooFarText, hintConnectingText, hintVerifyingText, hintIlluminationTooBrightText, hintIlluminationTooDarkText, hintIlluminationNormalText, hintHoldFaceForFreshnessText, timeoutHeaderText, timeoutMessageText, faceDistanceHeaderText, faceDistanceMessageText, multipleFacesHeaderText, multipleFacesMessageText, clientHeaderText, clientMessageText, serverHeaderText, serverMessageText, landscapeHeaderText, landscapeMessageText, portraitMessageText, tryAgainText, startScreenBeginCheckText, hintCenterFaceText, } = displayText;
|
|
16
|
+
const hintDisplayText = {
|
|
17
|
+
hintMoveFaceFrontOfCameraText,
|
|
18
|
+
hintTooManyFacesText,
|
|
19
|
+
hintFaceDetectedText,
|
|
20
|
+
hintCanNotIdentifyText,
|
|
21
|
+
hintTooCloseText,
|
|
22
|
+
hintTooFarText,
|
|
23
|
+
hintConnectingText,
|
|
24
|
+
hintVerifyingText,
|
|
25
|
+
hintIlluminationTooBrightText,
|
|
26
|
+
hintIlluminationTooDarkText,
|
|
27
|
+
hintIlluminationNormalText,
|
|
28
|
+
hintHoldFaceForFreshnessText,
|
|
29
|
+
hintCenterFaceText,
|
|
30
|
+
};
|
|
31
|
+
const cameraDisplayText = {
|
|
32
|
+
cameraMinSpecificationsHeadingText,
|
|
33
|
+
cameraMinSpecificationsMessageText,
|
|
34
|
+
cameraNotFoundHeadingText,
|
|
35
|
+
cameraNotFoundMessageText,
|
|
36
|
+
retryCameraPermissionsText,
|
|
37
|
+
waitingCameraPermissionText,
|
|
38
|
+
};
|
|
39
|
+
const instructionDisplayText = {
|
|
40
|
+
photosensitivyWarningHeadingText,
|
|
41
|
+
photosensitivyWarningBodyText,
|
|
42
|
+
photosensitivyWarningInfoText,
|
|
43
|
+
goodFitCaptionText,
|
|
44
|
+
goodFitAltText,
|
|
45
|
+
tooFarCaptionText,
|
|
46
|
+
tooFarAltText,
|
|
47
|
+
startScreenBeginCheckText,
|
|
48
|
+
};
|
|
49
|
+
const streamDisplayText = {
|
|
50
|
+
cancelLivenessCheckText,
|
|
51
|
+
recordingIndicatorText,
|
|
52
|
+
};
|
|
53
|
+
const errorDisplayText = {
|
|
54
|
+
timeoutHeaderText,
|
|
55
|
+
timeoutMessageText,
|
|
56
|
+
faceDistanceHeaderText,
|
|
57
|
+
faceDistanceMessageText,
|
|
58
|
+
multipleFacesHeaderText,
|
|
59
|
+
multipleFacesMessageText,
|
|
60
|
+
clientHeaderText,
|
|
61
|
+
clientMessageText,
|
|
62
|
+
serverHeaderText,
|
|
63
|
+
serverMessageText,
|
|
64
|
+
landscapeHeaderText,
|
|
65
|
+
landscapeMessageText,
|
|
66
|
+
portraitMessageText,
|
|
67
|
+
tryAgainText,
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
hintDisplayText,
|
|
71
|
+
cameraDisplayText,
|
|
72
|
+
instructionDisplayText,
|
|
73
|
+
streamDisplayText,
|
|
74
|
+
errorDisplayText,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { getDisplayText };
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{VERSION
|
|
1
|
+
import { VERSION } from '../../../version.mjs';
|
|
2
|
+
|
|
3
|
+
const BASE_USER_AGENT = `ui-react-liveness/${VERSION}`;
|
|
4
|
+
const getLivenessUserAgent = () => {
|
|
5
|
+
return BASE_USER_AGENT;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { getLivenessUserAgent };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export{default as FaceLivenessDetector}from
|
|
1
|
+
export { default as FaceLivenessDetector } from './components/FaceLivenessDetector/FaceLivenessDetector.mjs';
|
|
2
|
+
export { default as FaceLivenessDetectorCore } from './components/FaceLivenessDetector/FaceLivenessDetectorCore.mjs';
|
package/dist/esm/version.mjs
CHANGED