@aws-amplify/ui-react-liveness 3.3.7 → 3.3.9

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 (42) hide show
  1. package/README.md +15 -15
  2. package/dist/esm/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.mjs +2 -2
  3. package/dist/esm/components/FaceLivenessDetector/service/machine/machine.mjs +2 -2
  4. package/dist/esm/components/FaceLivenessDetector/service/types/error.mjs +0 -1
  5. package/dist/esm/components/FaceLivenessDetector/service/utils/blazefaceFaceDetection.mjs +1 -1
  6. package/dist/esm/components/FaceLivenessDetector/service/utils/createStreamingClient/CustomWebSocketFetchHandler.mjs +1 -1
  7. package/dist/esm/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.mjs +1 -1
  8. package/dist/esm/components/FaceLivenessDetector/shared/FaceLivenessErrorModal.mjs +1 -1
  9. package/dist/esm/version.mjs +1 -1
  10. package/dist/index.js +1 -2
  11. package/dist/types/components/FaceLivenessDetector/FaceLivenessDetector.d.ts +3 -3
  12. package/dist/types/components/FaceLivenessDetector/FaceLivenessDetectorCore.d.ts +3 -3
  13. package/dist/types/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.d.ts +2 -2
  14. package/dist/types/components/FaceLivenessDetector/LivenessCheck/LivenessCheck.d.ts +2 -2
  15. package/dist/types/components/FaceLivenessDetector/displayText.d.ts +1 -1
  16. package/dist/types/components/FaceLivenessDetector/hooks/useLivenessSelector.d.ts +1 -1
  17. package/dist/types/components/FaceLivenessDetector/index.d.ts +5 -3
  18. package/dist/types/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.d.ts +1 -1
  19. package/dist/types/components/FaceLivenessDetector/service/machine/machine.d.ts +1 -1
  20. package/dist/types/components/FaceLivenessDetector/service/types/credentials.d.ts +1 -1
  21. package/dist/types/components/FaceLivenessDetector/service/types/liveness.d.ts +2 -2
  22. package/dist/types/components/FaceLivenessDetector/service/types/machine.d.ts +6 -6
  23. package/dist/types/components/FaceLivenessDetector/service/utils/blazefaceFaceDetection.d.ts +2 -1
  24. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/CustomWebSocketFetchHandler.d.ts +3 -2
  25. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/Signer.d.ts +1 -1
  26. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/createStreamingClient.d.ts +1 -1
  27. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/resolveCredentials.d.ts +1 -1
  28. package/dist/types/components/FaceLivenessDetector/service/utils/createStreamingClient/types.d.ts +1 -1
  29. package/dist/types/components/FaceLivenessDetector/service/utils/eventUtils.d.ts +1 -1
  30. package/dist/types/components/FaceLivenessDetector/service/utils/freshnessColorDisplay.d.ts +2 -2
  31. package/dist/types/components/FaceLivenessDetector/service/utils/getFaceMatchStateInLivenessOval.d.ts +3 -2
  32. package/dist/types/components/FaceLivenessDetector/service/utils/liveness.d.ts +5 -4
  33. package/dist/types/components/FaceLivenessDetector/service/utils/streamProvider.d.ts +2 -2
  34. package/dist/types/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.d.ts +1 -1
  35. package/dist/types/components/FaceLivenessDetector/shared/FaceLivenessErrorModal.d.ts +2 -2
  36. package/dist/types/components/FaceLivenessDetector/shared/Hint.d.ts +1 -1
  37. package/dist/types/components/FaceLivenessDetector/shared/Overlay.d.ts +1 -1
  38. package/dist/types/components/FaceLivenessDetector/shared/Toast.d.ts +1 -1
  39. package/dist/types/components/FaceLivenessDetector/utils/getDisplayText.d.ts +1 -1
  40. package/dist/types/index.d.ts +2 -1
  41. package/dist/types/version.d.ts +1 -1
  42. package/package.json +4 -4
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- # Amplify UI
1
+ # Amplify UI React Liveness
2
2
 
3
- Amplify UI is an open-source UI library with cloud-connected components that are endlessly customizable, accessible, and can integrate into _any_ application. Amplify UI consists of:
3
+ The React Liveness package provides components for face liveness detection in Amplify connected applications.
4
4
 
5
- 1. Connected components that simplify complex cloud-connected workflows, like Authenticator.
6
- 2. Primitive components that create consistency across Amplify UI and allow you to build complete applications that fit your brand, like Buttons and Badges.
7
- 3. Data-bound components that make it easy to display dynamic data, like DataStoreCollections.
8
- 4. Theming capabilities that allow you to customize the appearance of Amplify UI to match your brand.
5
+ ## Contents
9
6
 
10
- ## React Documentation
7
+ ### Core Components
11
8
 
12
- - https://ui.docs.amplify.aws/react
9
+ - `FaceLivenessDetector` - Component for face liveness detection
10
+ - `FaceLivenessDetectorCore` - Core component for face liveness detection
13
11
 
14
- ## Features 🚀
12
+ ### Type Definitions
15
13
 
16
- - **Better developer experience** Connected-components like Authenticator are being written with framework-specific implementations so that they follow framework conventions and are easier to integrate into your application.
17
- - **Endlessly customizable** Every detail of Amplify UI is customizable to match your brand. Style all of Amplify UI with themes, override components with your own, or build your own UI and use Amplify for complex state management.
18
- - **Accessible** Amplify UI components follow [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) and [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) best practices and guidelines such as color contrast, keyboard navigation, accessible labels, and focus management.
19
- - **Primitive components (React only right now)** Primitive components are used in the connected components, like Authenticator, you can also customize them and use them to build the rest of your UI.
14
+ - `FaceLivenessDetectorProps` - Props for FaceLivenessDetector component
15
+ - `FaceLivenessDetectorCoreProps` - Props for FaceLivenessDetectorCore component
16
+ - `AwsCredentialProvider` - Type for AWS credential provider
17
+ - `AwsCredentials` - Type for AWS credentials
18
+ - `AwsTemporaryCredentials` - Type for AWS temporary credentials
19
+ - `ErrorState` - Type for error state
20
20
 
21
- ## We love contributors!!
21
+ ## React Documentation
22
22
 
23
- See our contributing guide [CONTRIBUTING.md](/CONTRIBUTING.md) to help us scale Amplify UI!
23
+ - https://ui.docs.amplify.aws/react
@@ -20,8 +20,8 @@ import { LivenessClassNames } from '../types/classNames.mjs';
20
20
  import { selectErrorState, Hint } from '../shared/Hint.mjs';
21
21
  import { MatchIndicator } from '../shared/MatchIndicator.mjs';
22
22
  import { Overlay } from '../shared/Overlay.mjs';
23
- import { renderErrorModal, FaceLivenessErrorModal } from '../shared/FaceLivenessErrorModal.mjs';
24
- import { DefaultRecordingIcon, DefaultCancelButton, DefaultPhotosensitiveWarning } from '../shared/DefaultStartScreenComponents.mjs';
23
+ import { FaceLivenessErrorModal, renderErrorModal } from '../shared/FaceLivenessErrorModal.mjs';
24
+ import { DefaultPhotosensitiveWarning, DefaultRecordingIcon, DefaultCancelButton } from '../shared/DefaultStartScreenComponents.mjs';
25
25
 
26
26
  const selectVideoConstraints = createLivenessSelector((state) => state.context.videoAssociatedParams?.videoConstraints);
27
27
  const selectVideoStream = createLivenessSelector((state) => state.context.videoAssociatedParams?.videoMediaStream);
@@ -1,6 +1,6 @@
1
1
  import { nanoid } from 'nanoid';
2
- import { createMachine, assign, spawn, actions } from 'xstate';
3
- import { drawStaticOval, getBoundingBox, getColorsSequencesFromSessionInformation, isCameraDeviceVirtual, getFaceMatchState, isFaceDistanceBelowThreshold, estimateIllumination, getOvalDetailsFromSessionInformation, generateBboxFromLandmarks, drawLivenessOvalInCanvas, getOvalBoundingBox, getIntersectionOverUnion, getStaticLivenessOvalDetails } from '../utils/liveness.mjs';
2
+ import { createMachine, assign, actions, spawn } from 'xstate';
3
+ import { getBoundingBox, generateBboxFromLandmarks, getOvalBoundingBox, getIntersectionOverUnion, estimateIllumination, getOvalDetailsFromSessionInformation, drawLivenessOvalInCanvas, isFaceDistanceBelowThreshold, getFaceMatchState, isCameraDeviceVirtual, getColorsSequencesFromSessionInformation, drawStaticOval, getStaticLivenessOvalDetails } from '../utils/liveness.mjs';
4
4
  import { FaceMatchState } from '../types/liveness.mjs';
5
5
  import { LivenessErrorState } from '../types/error.mjs';
6
6
  import { BlazeFaceFaceDetection } from '../utils/blazefaceFaceDetection.mjs';
@@ -5,7 +5,6 @@ const LivenessErrorState = {
5
5
  CONNECTION_TIMEOUT: 'CONNECTION_TIMEOUT',
6
6
  TIMEOUT: 'TIMEOUT',
7
7
  RUNTIME_ERROR: 'RUNTIME_ERROR',
8
- FRESHNESS_TIMEOUT: 'FRESHNESS_TIMEOUT',
9
8
  SERVER_ERROR: 'SERVER_ERROR',
10
9
  CAMERA_FRAMERATE_ERROR: 'CAMERA_FRAMERATE_ERROR',
11
10
  CAMERA_ACCESS_ERROR: 'CAMERA_ACCESS_ERROR',
@@ -1,6 +1,6 @@
1
1
  import { ready, setBackend } from '@tensorflow/tfjs-core';
2
2
  import { createDetector, SupportedModels } from '@tensorflow-models/face-detection';
3
- import { setWasmPaths, version_wasm } from '@tensorflow/tfjs-backend-wasm';
3
+ import { version_wasm, setWasmPaths } from '@tensorflow/tfjs-backend-wasm';
4
4
  import '@tensorflow/tfjs-backend-cpu';
5
5
  import { jitteredExponentialRetry } from '@aws-amplify/core/internals/utils';
6
6
  import { isWebAssemblySupported } from './support.mjs';
@@ -1,5 +1,5 @@
1
1
  import { formatUrl } from '@aws-sdk/util-format-url';
2
- import { readableStreamtoIterable, iterableToReadableStream } from '@smithy/eventstream-serde-browser';
2
+ import { iterableToReadableStream, readableStreamtoIterable } from '@smithy/eventstream-serde-browser';
3
3
  import { FetchHttpHandler } from '@smithy/fetch-http-handler';
4
4
  import { HttpResponse } from '@smithy/protocol-http';
5
5
  import { WS_CLOSURE_CODE } from '../constants.mjs';
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import { ComponentClassName } from '@aws-amplify/ui';
3
- import { View, Flex } from '@aws-amplify/ui-react';
3
+ import { Flex, View } from '@aws-amplify/ui-react';
4
4
  import { CancelButton } from './CancelButton.mjs';
5
5
  import '../service/machine/machine.mjs';
6
6
  import '../service/types/liveness.mjs';
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { Flex, Text, Button } from '@aws-amplify/ui-react';
2
+ import { Flex, Button, Text } from '@aws-amplify/ui-react';
3
3
  import { AlertIcon } from '@aws-amplify/ui-react/internal';
4
4
  import '../service/machine/machine.mjs';
5
5
  import '../service/types/liveness.mjs';
@@ -1,3 +1,3 @@
1
- const VERSION = '3.3.7';
1
+ const VERSION = '3.3.9';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -85,7 +85,6 @@ const LivenessErrorState = {
85
85
  CONNECTION_TIMEOUT: 'CONNECTION_TIMEOUT',
86
86
  TIMEOUT: 'TIMEOUT',
87
87
  RUNTIME_ERROR: 'RUNTIME_ERROR',
88
- FRESHNESS_TIMEOUT: 'FRESHNESS_TIMEOUT',
89
88
  SERVER_ERROR: 'SERVER_ERROR',
90
89
  CAMERA_FRAMERATE_ERROR: 'CAMERA_FRAMERATE_ERROR',
91
90
  CAMERA_ACCESS_ERROR: 'CAMERA_ACCESS_ERROR',
@@ -832,7 +831,7 @@ function getFaceMatchStateInLivenessOval({ face, ovalDetails, initialFaceInterse
832
831
  return { faceMatchState, faceMatchPercentage };
833
832
  }
834
833
 
835
- const VERSION = '3.3.7';
834
+ const VERSION = '3.3.9';
836
835
 
837
836
  const BASE_USER_AGENT = `ui-react-liveness/${VERSION}`;
838
837
  const getLivenessUserAgent = () => {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { FaceLivenessDetectorProps as FaceLivenessDetectorPropsFromUi } from './service';
3
- import { LivenessDisplayText } from './displayText';
4
- import { FaceLivenessDetectorComponents } from './shared/DefaultStartScreenComponents';
2
+ import type { FaceLivenessDetectorProps as FaceLivenessDetectorPropsFromUi } from './service';
3
+ import type { LivenessDisplayText } from './displayText';
4
+ import type { FaceLivenessDetectorComponents } from './shared/DefaultStartScreenComponents';
5
5
  export interface FaceLivenessDetectorProps extends FaceLivenessDetectorPropsFromUi {
6
6
  components?: FaceLivenessDetectorComponents;
7
7
  displayText?: LivenessDisplayText;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { FaceLivenessDetectorCoreProps as FaceLivenessDetectorPropsFromUi } from './service';
3
- import { FaceLivenessDetectorComponents } from './shared/DefaultStartScreenComponents';
4
- import { LivenessDisplayText } from './displayText';
2
+ import type { FaceLivenessDetectorCoreProps as FaceLivenessDetectorPropsFromUi } from './service';
3
+ import type { FaceLivenessDetectorComponents } from './shared/DefaultStartScreenComponents';
4
+ import type { LivenessDisplayText } from './displayText';
5
5
  export interface FaceLivenessDetectorCoreProps extends FaceLivenessDetectorPropsFromUi {
6
6
  components?: FaceLivenessDetectorComponents;
7
7
  displayText?: LivenessDisplayText;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FaceMatchState } from '../service';
3
- import { InstructionDisplayText, ErrorDisplayText, HintDisplayText, StreamDisplayText, CameraDisplayText } from '../displayText';
4
- import { FaceLivenessDetectorComponents } from '../shared/DefaultStartScreenComponents';
3
+ import type { InstructionDisplayText, ErrorDisplayText, HintDisplayText, StreamDisplayText, CameraDisplayText } from '../displayText';
4
+ import type { FaceLivenessDetectorComponents } from '../shared/DefaultStartScreenComponents';
5
5
  export declare const selectVideoConstraints: import("../hooks").LivenessSelectorFn<MediaTrackConstraints | undefined>;
6
6
  export declare const selectVideoStream: import("../hooks").LivenessSelectorFn<MediaStream | undefined>;
7
7
  export declare const selectFaceMatchPercentage: import("../hooks").LivenessSelectorFn<number | undefined>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { InstructionDisplayText, HintDisplayText, CameraDisplayText, StreamDisplayText, ErrorDisplayText } from '../displayText';
3
- import { FaceLivenessDetectorComponents } from '../shared/DefaultStartScreenComponents';
2
+ import type { InstructionDisplayText, HintDisplayText, CameraDisplayText, StreamDisplayText, ErrorDisplayText } from '../displayText';
3
+ import type { FaceLivenessDetectorComponents } from '../shared/DefaultStartScreenComponents';
4
4
  export declare const selectIsRecordingStopped: import("../hooks").LivenessSelectorFn<boolean | undefined>;
5
5
  interface LivenessCheckProps {
6
6
  instructionDisplayText: Required<InstructionDisplayText>;
@@ -1,4 +1,4 @@
1
- import { DisplayTextTemplate } from '@aws-amplify/ui';
1
+ import type { DisplayTextTemplate } from '@aws-amplify/ui';
2
2
  export type HintDisplayText = {
3
3
  hintMoveFaceFrontOfCameraText?: string;
4
4
  hintTooManyFacesText?: string;
@@ -1,4 +1,4 @@
1
- import { LivenessMachineState } from '../service';
1
+ import type { LivenessMachineState } from '../service';
2
2
  export type LivenessSelectorFn<T> = (state: LivenessMachineState) => T;
3
3
  export declare function createLivenessSelector<T>(selector: LivenessSelectorFn<T>): LivenessSelectorFn<T>;
4
4
  export declare function useLivenessSelector<T>(selector: LivenessSelectorFn<T>): T;
@@ -1,3 +1,5 @@
1
- export { default as FaceLivenessDetector, FaceLivenessDetectorProps, } from './FaceLivenessDetector';
2
- export { default as FaceLivenessDetectorCore, FaceLivenessDetectorCoreProps, } from './FaceLivenessDetectorCore';
3
- export { AwsCredentialProvider, AwsTemporaryCredentials, AwsCredentials, ErrorState, } from './service';
1
+ export type { FaceLivenessDetectorProps } from './FaceLivenessDetector';
2
+ export { default as FaceLivenessDetector } from './FaceLivenessDetector';
3
+ export type { FaceLivenessDetectorCoreProps } from './FaceLivenessDetectorCore';
4
+ export { default as FaceLivenessDetectorCore } from './FaceLivenessDetectorCore';
5
+ export type { AwsCredentialProvider, AwsTemporaryCredentials, AwsCredentials, ErrorState, } from './service';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LivenessInterpreter, FaceLivenessDetectorProps } from '../service';
2
+ import type { LivenessInterpreter, FaceLivenessDetectorProps } from '../service';
3
3
  interface FaceLivenessDetectorContextType {
4
4
  componentProps: FaceLivenessDetectorProps;
5
5
  service: LivenessInterpreter;
@@ -1,4 +1,4 @@
1
- import { LivenessContext, LivenessEvent } from '../types';
1
+ import type { LivenessContext, LivenessEvent } from '../types';
2
2
  export declare const livenessMachine: import("xstate").StateMachine<LivenessContext, any, LivenessEvent, {
3
3
  value: any;
4
4
  context: LivenessContext;
@@ -1,4 +1,4 @@
1
- import { CredentialsAndIdentityId } from 'aws-amplify/auth';
1
+ import type { CredentialsAndIdentityId } from 'aws-amplify/auth';
2
2
  export type AwsCredentials = CredentialsAndIdentityId['credentials'];
3
3
  export interface IdentityProvider<IdentityT extends AwsCredentials> {
4
4
  (identityProperties?: Record<string, any>): Promise<IdentityT>;
@@ -1,5 +1,5 @@
1
- import { AwsCredentialProvider } from './credentials';
2
- import { ErrorState } from './error';
1
+ import type { AwsCredentialProvider } from './credentials';
2
+ import type { ErrorState } from './error';
3
3
  /**
4
4
  * The props for the FaceLivenessDetectorCore which allows for full configuration of auth
5
5
  */
@@ -1,9 +1,9 @@
1
- import { ActorRef, Interpreter, State } from 'xstate';
2
- import { ValidationException, InternalServerException, ThrottlingException, ServiceQuotaExceededException, SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
3
- import { FaceLivenessDetectorCoreProps, FaceMatchState, LivenessOvalDetails, IlluminationState } from './liveness';
4
- import { ErrorState } from './error';
5
- import { VideoRecorder, LivenessStreamProvider, FreshnessColorDisplay } from '../utils';
6
- import { Face, FaceDetection } from './faceDetection';
1
+ import type { ActorRef, Interpreter, State } from 'xstate';
2
+ import type { ValidationException, InternalServerException, ThrottlingException, ServiceQuotaExceededException, SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
3
+ import type { FaceLivenessDetectorCoreProps, FaceMatchState, LivenessOvalDetails, IlluminationState } from './liveness';
4
+ import type { ErrorState } from './error';
5
+ import type { VideoRecorder, LivenessStreamProvider, FreshnessColorDisplay } from '../utils';
6
+ import type { Face, FaceDetection } from './faceDetection';
7
7
  export interface FaceMatchAssociatedParams {
8
8
  illuminationState?: IlluminationState;
9
9
  faceMatchState?: FaceMatchState;
@@ -1,5 +1,6 @@
1
1
  import '@tensorflow/tfjs-backend-cpu';
2
- import { FaceDetection, Face } from '../types';
2
+ import type { Face } from '../types';
3
+ import { FaceDetection } from '../types';
3
4
  type BlazeFaceModelBackend = 'wasm' | 'cpu';
4
5
  export declare const BLAZEFACE_VERSION = "1.0.2";
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@smithy/protocol-http';
2
- import { Provider, RequestHandler, RequestHandlerMetadata } from './types';
1
+ import type { HttpRequest } from '@smithy/protocol-http';
2
+ import { HttpResponse } from '@smithy/protocol-http';
3
+ import type { Provider, RequestHandler, RequestHandlerMetadata } from './types';
3
4
  export declare const WEBSOCKET_CONNECTION_TIMEOUT_MESSAGE = "Websocket connection timeout";
4
5
  export interface WebSocketFetchHandlerOptions {
5
6
  /**
@@ -1,5 +1,5 @@
1
1
  import { SignatureV4 } from '@smithy/signature-v4';
2
- import { HttpRequest as HttpRequest, RequestPresigningArguments } from './types';
2
+ import type { HttpRequest as HttpRequest, RequestPresigningArguments } from './types';
3
3
  export declare const REQUEST_EXPIRY = 299;
4
4
  export declare class Signer extends SignatureV4 {
5
5
  presign(request: HttpRequest, options?: Omit<RequestPresigningArguments, 'expiresIn'>): Promise<HttpRequest>;
@@ -1,5 +1,5 @@
1
1
  import { RekognitionStreamingClient } from '@aws-sdk/client-rekognitionstreaming';
2
- import { AwsCredentialProvider } from '../../types';
2
+ import type { AwsCredentialProvider } from '../../types';
3
3
  interface CreateClientConfig {
4
4
  credentialsProvider?: AwsCredentialProvider;
5
5
  endpointOverride?: string;
@@ -1,4 +1,4 @@
1
- import { AwsCredentialProvider, AwsCredentials } from '../../types';
1
+ import type { AwsCredentialProvider, AwsCredentials } from '../../types';
2
2
  /**
3
3
  * Resolves the `credentials` param to be passed to `RekognitionStreamingClient` which accepts either:
4
4
  * - a `credentials` object
@@ -1 +1 @@
1
- export { HttpRequest, Provider, RequestHandler, RequestHandlerMetadata, RequestPresigningArguments, } from '@smithy/types';
1
+ export type { HttpRequest, Provider, RequestHandler, RequestHandlerMetadata, RequestPresigningArguments, } from '@smithy/types';
@@ -1,4 +1,4 @@
1
- import { LivenessResponseStream } from '@aws-sdk/client-rekognitionstreaming';
1
+ import type { LivenessResponseStream } from '@aws-sdk/client-rekognitionstreaming';
2
2
  export declare const isServerSesssionInformationEvent: (value: unknown) => value is LivenessResponseStream.ServerSessionInformationEventMember;
3
3
  export declare const isConnectionTimeoutError: (error: unknown) => error is Error;
4
4
  export declare const isDisconnectionEvent: (value: unknown) => value is LivenessResponseStream.DisconnectionEventMember;
@@ -1,5 +1,5 @@
1
- import { LivenessContext } from '../types/machine';
2
- import { ClientFreshnessColorSequence } from '../types/service';
1
+ import type { LivenessContext } from '../types/machine';
2
+ import type { ClientFreshnessColorSequence } from '../types/service';
3
3
  export declare class FreshnessColorDisplay {
4
4
  private freshnessColorsSequence;
5
5
  private context;
@@ -1,5 +1,6 @@
1
- import { LivenessOvalDetails, Face, FaceMatchState } from '../types';
2
- import { SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
1
+ import type { LivenessOvalDetails, Face } from '../types';
2
+ import { FaceMatchState } from '../types';
3
+ import type { SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
3
4
  interface MatchStateInOvalParams {
4
5
  face: Face;
5
6
  ovalDetails: LivenessOvalDetails;
@@ -1,7 +1,8 @@
1
- import { LivenessOvalDetails, IlluminationState, Face, FaceMatchState, BoundingBox, ErrorState } from '../types';
2
- import { FaceDetection } from '../types/faceDetection';
3
- import { ClientFreshnessColorSequence } from '../types/service';
4
- import { SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
1
+ import type { LivenessOvalDetails, Face, BoundingBox, ErrorState } from '../types';
2
+ import { IlluminationState, FaceMatchState } from '../types';
3
+ import type { FaceDetection } from '../types/faceDetection';
4
+ import type { ClientFreshnessColorSequence } from '../types/service';
5
+ import type { SessionInformation } from '@aws-sdk/client-rekognitionstreaming';
5
6
  interface OvalBoundingBox {
6
7
  ovalBoundingBox: BoundingBox;
7
8
  minOvalX: number;
@@ -1,6 +1,6 @@
1
- import { ClientSessionInformationEvent, LivenessResponseStream } from '@aws-sdk/client-rekognitionstreaming';
1
+ import type { ClientSessionInformationEvent, LivenessResponseStream } from '@aws-sdk/client-rekognitionstreaming';
2
2
  import { VideoRecorder } from './videoRecorder';
3
- import { AwsCredentialProvider } from '../types';
3
+ import type { AwsCredentialProvider } from '../types';
4
4
  export interface StartLivenessStreamInput {
5
5
  sessionId: string;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CheckScreenComponents } from './FaceLivenessErrorModal';
2
+ import type { CheckScreenComponents } from './FaceLivenessErrorModal';
3
3
  export type FaceLivenessDetectorComponents = StartScreenComponents & CheckScreenComponents;
4
4
  export interface StartScreenComponents {
5
5
  PhotosensitiveWarning?: React.ComponentType;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ErrorState } from '../service';
3
- import { ErrorDisplayText } from '../displayText';
2
+ import type { ErrorState } from '../service';
3
+ import type { ErrorDisplayText } from '../displayText';
4
4
  export interface CheckScreenComponents {
5
5
  ErrorView?: React.ComponentType<FaceLivenessErrorModalProps>;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IlluminationState, FaceMatchState } from '../service';
3
- import { HintDisplayText } from '../displayText';
3
+ import type { HintDisplayText } from '../displayText';
4
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>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { FlexProps } from '@aws-amplify/ui-react';
2
+ import type { FlexProps } from '@aws-amplify/ui-react';
3
3
  interface OverlayProps extends FlexProps {
4
4
  horizontal?: 'start' | 'center' | 'end';
5
5
  vertical?: 'start' | 'center' | 'end' | 'space-between';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ViewProps } from '@aws-amplify/ui-react';
2
+ import type { ViewProps } from '@aws-amplify/ui-react';
3
3
  interface ToastProps extends ViewProps {
4
4
  variation?: 'default' | 'primary' | 'error';
5
5
  size?: 'medium' | 'large';
@@ -1,4 +1,4 @@
1
- import { LivenessDisplayText, HintDisplayText, CameraDisplayText, InstructionDisplayText, StreamDisplayText, ErrorDisplayText } from '../displayText';
1
+ import type { LivenessDisplayText, HintDisplayText, CameraDisplayText, InstructionDisplayText, StreamDisplayText, ErrorDisplayText } from '../displayText';
2
2
  interface LivenessDisplayTextInterface {
3
3
  hintDisplayText: Required<HintDisplayText>;
4
4
  cameraDisplayText: Required<CameraDisplayText>;
@@ -1 +1,2 @@
1
- export { FaceLivenessDetector, FaceLivenessDetectorProps, FaceLivenessDetectorCore, FaceLivenessDetectorCoreProps, AwsCredentialProvider, AwsCredentials, AwsTemporaryCredentials, ErrorState, } from './components';
1
+ export type { FaceLivenessDetectorProps, FaceLivenessDetectorCoreProps, AwsCredentialProvider, AwsCredentials, AwsTemporaryCredentials, ErrorState, } from './components';
2
+ export { FaceLivenessDetector, FaceLivenessDetectorCore } from './components';
@@ -1 +1 @@
1
- export declare const VERSION = "3.3.7";
1
+ export declare const VERSION = "3.3.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-liveness",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -43,13 +43,13 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@aws-amplify/core": "*",
46
- "aws-amplify": "^6.9.0",
46
+ "aws-amplify": "^6.14.3",
47
47
  "react": "^16.14 || ^17 || ^18 || ^19",
48
48
  "react-dom": "^16.14 || ^17 || ^18 || ^19"
49
49
  },
50
50
  "dependencies": {
51
- "@aws-amplify/ui": "6.10.1",
52
- "@aws-amplify/ui-react": "6.11.0",
51
+ "@aws-amplify/ui": "6.10.3",
52
+ "@aws-amplify/ui-react": "6.11.2",
53
53
  "@aws-sdk/client-rekognitionstreaming": "3.621.0",
54
54
  "@aws-sdk/util-format-url": "3.609.0",
55
55
  "@smithy/eventstream-serde-browser": "^2.0.4",