@regulaforensics/vp-frontend-document-components 1.2.0 → 2.0.1
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/README.md +660 -81
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +41 -0
- package/esm/main.js +2 -0
- package/esm/main.js.LICENSE.txt +41 -0
- package/lib/common/BackCameraIcon.d.ts +6 -0
- package/lib/common/Button.d.ts +7 -0
- package/lib/common/CameraChangeIcon.d.ts +6 -0
- package/lib/common/CameraIcon.d.ts +6 -0
- package/lib/common/CheckIcon.d.ts +6 -0
- package/lib/common/CrossIcon.d.ts +6 -0
- package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
- package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
- package/lib/common/DocReaderFlip.d.ts +5 -0
- package/lib/common/DocReaderProcessing.d.ts +5 -0
- package/lib/common/DocReaderProcessingError.d.ts +5 -0
- package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
- package/lib/common/DocReaderSearch.d.ts +5 -0
- package/lib/common/ErrorIcon.d.ts +6 -0
- package/lib/common/FromCameraIcon.d.ts +5 -0
- package/lib/common/FromGalleryIcon.d.ts +5 -0
- package/lib/common/FrontCameraIcon.d.ts +6 -0
- package/lib/common/FullscreenExitIcon.d.ts +6 -0
- package/lib/common/FullscreenIcon.d.ts +6 -0
- package/lib/common/Icon.d.ts +7 -0
- package/lib/common/InstructionIconFaceDetection.d.ts +5 -0
- package/lib/common/InstructionIconFaceLiveness.d.ts +5 -0
- package/lib/common/Message.d.ts +7 -0
- package/lib/common/NoGlareIcon.d.ts +5 -0
- package/lib/common/NoSmilingIcon.d.ts +5 -0
- package/lib/common/RegulaLogo.d.ts +6 -0
- package/lib/common/SnapshotIcon.d.ts +6 -0
- package/lib/common/Spinner.d.ts +3 -0
- package/lib/common/SquareIcon.d.ts +6 -0
- package/lib/common/StopIcon.d.ts +6 -0
- package/lib/common/VerifiedIcon.d.ts +6 -0
- package/lib/components/CameraCapture.d.ts +9 -0
- package/lib/components/CameraSnapshot.d.ts +2 -0
- package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
- package/lib/components/DocumentCapture.d.ts +10 -0
- package/lib/components/DocumentFullScreenOverlay.d.ts +11 -0
- package/lib/components/DocumentReader.d.ts +2 -0
- package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
- package/lib/components/DocumentReaderLayout.d.ts +22 -0
- package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
- package/lib/components/ErrorBoundary.d.ts +18 -0
- package/lib/components/FaceCapture.d.ts +15 -0
- package/lib/components/FaceDetection.d.ts +2 -0
- package/lib/components/FaceFullScreenOverlay.d.ts +11 -0
- package/lib/components/FaceLayout.d.ts +18 -0
- package/lib/components/FaceLiveness.d.ts +2 -0
- package/lib/components/InfoScreen.d.ts +10 -0
- package/lib/components/InstructionScreen.d.ts +9 -0
- package/lib/components/ProcessScreen.d.ts +6 -0
- package/lib/components/RetryScreen.d.ts +7 -0
- package/lib/components/WebCamera.d.ts +19 -0
- package/lib/constants.d.ts +568 -0
- package/lib/contexts/DocumentAttributesContext.d.ts +24 -0
- package/lib/contexts/DocumentSDKContext.d.ts +6 -0
- package/lib/contexts/FaceAttributesContext.d.ts +21 -0
- package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
- package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
- package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
- package/lib/hoc/withLocalize.d.ts +7 -0
- package/lib/hooks/useDocumentReaderSeries.d.ts +25 -0
- package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
- package/lib/hooks/useFaceLiveness.d.ts +30 -0
- package/lib/hooks/useImageInputParam.d.ts +9 -0
- package/lib/hooks/useOrientationChange.d.ts +10 -0
- package/lib/hooks/useStream.d.ts +10 -0
- package/lib/hooks/useUserAgent.d.ts +3 -0
- package/lib/hooks/useWindowBlur.d.ts +2 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2115 -0
- package/lib/index-document.d.ts +5 -0
- package/lib/models/CameraModel.d.ts +9 -0
- package/lib/models/CustomError.d.ts +7 -0
- package/lib/models/ImageModel.d.ts +7 -0
- package/lib/services/DebugService.d.ts +13 -0
- package/lib/services/DocumentReaderProcessor.d.ts +53 -0
- package/lib/services/DocumentReaderService.d.ts +44 -0
- package/lib/services/EventEmitter.d.ts +9 -0
- package/lib/services/FaceLivenessService.d.ts +43 -0
- package/lib/services/FaceService.d.ts +12 -0
- package/lib/types.d.ts +323 -0
- package/lib/utils.d.ts +27 -0
- package/lib/web-components/CameraSnapshot.d.ts +11 -0
- package/lib/web-components/DocumentReader.d.ts +11 -0
- package/lib/web-components/FaceDetection.d.ts +11 -0
- package/lib/web-components/FaceLiveness.d.ts +14 -0
- package/lib/web-components/FullScreenContainer.d.ts +4 -0
- package/package.json +63 -69
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FaceMessage, FaceProcessingStage, FaceStatus, FaceEventActions, StreamStatus } from '../constants';
|
|
2
|
+
import { CameraTypes, FaceDebugOutput, Oval, VideoParamsType } from '../types';
|
|
3
|
+
import CustomError from '../models/CustomError';
|
|
4
|
+
declare type ResponseType = {
|
|
5
|
+
message: FaceMessage;
|
|
6
|
+
processingStage: FaceProcessingStage;
|
|
7
|
+
status: FaceStatus;
|
|
8
|
+
request: Uint8Array | null;
|
|
9
|
+
requestSize: number | null;
|
|
10
|
+
initialized: boolean;
|
|
11
|
+
debugOutput: FaceDebugOutput | null;
|
|
12
|
+
prepared: boolean;
|
|
13
|
+
images: Array<string>;
|
|
14
|
+
ovals: Array<Oval>;
|
|
15
|
+
readiness: number;
|
|
16
|
+
error: CustomError | null;
|
|
17
|
+
};
|
|
18
|
+
declare function useFaceLiveness(options: {
|
|
19
|
+
videoStatus: StreamStatus;
|
|
20
|
+
videoElementParams: VideoParamsType;
|
|
21
|
+
cameraInfo: CameraTypes;
|
|
22
|
+
uuid?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
tryCount?: number;
|
|
25
|
+
debug?: boolean;
|
|
26
|
+
}, onAction: ({ manual, action }: {
|
|
27
|
+
manual: boolean;
|
|
28
|
+
action: FaceEventActions;
|
|
29
|
+
}) => void): ResponseType;
|
|
30
|
+
export default useFaceLiveness;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FrameParamsType, VideoParamsType } from '../types';
|
|
2
|
+
import { ObjectFit } from '../constants';
|
|
3
|
+
declare type UseImageInputParamPropsType = {
|
|
4
|
+
videoElementParams: VideoParamsType;
|
|
5
|
+
scenario: string;
|
|
6
|
+
objectFit: ObjectFit;
|
|
7
|
+
};
|
|
8
|
+
declare function useImageInputParam({ videoElementParams, scenario, objectFit }: UseImageInputParamPropsType): FrameParamsType;
|
|
9
|
+
export default useImageInputParam;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CameraFacingMode } from '../constants';
|
|
2
|
+
import { StreamDataType } from '../types';
|
|
3
|
+
interface UseStreamReturnType extends StreamDataType {
|
|
4
|
+
onPlay: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare function useStream(mode?: CameraFacingMode, resolution?: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}, preferredCameraId?: string): UseStreamReturnType;
|
|
10
|
+
export default useStream;
|