@regulaforensics/vp-frontend-document-components 1.1.0 → 2.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.
Files changed (91) hide show
  1. package/README.md +694 -81
  2. package/dist/main.js +1 -1
  3. package/dist/main.js.LICENSE.txt +41 -0
  4. package/esm/main.js +2 -0
  5. package/esm/main.js.LICENSE.txt +41 -0
  6. package/lib/common/BackCameraIcon.d.ts +6 -0
  7. package/lib/common/Button.d.ts +7 -0
  8. package/lib/common/CameraChangeIcon.d.ts +6 -0
  9. package/lib/common/CameraIcon.d.ts +6 -0
  10. package/lib/common/CheckIcon.d.ts +6 -0
  11. package/lib/common/CrossIcon.d.ts +6 -0
  12. package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
  13. package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
  14. package/lib/common/DocReaderFlip.d.ts +5 -0
  15. package/lib/common/DocReaderProcessing.d.ts +5 -0
  16. package/lib/common/DocReaderProcessingError.d.ts +5 -0
  17. package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
  18. package/lib/common/DocReaderSearch.d.ts +5 -0
  19. package/lib/common/ErrorIcon.d.ts +6 -0
  20. package/lib/common/FromCameraIcon.d.ts +5 -0
  21. package/lib/common/FromGalleryIcon.d.ts +5 -0
  22. package/lib/common/FrontCameraIcon.d.ts +6 -0
  23. package/lib/common/FullscreenExitIcon.d.ts +6 -0
  24. package/lib/common/FullscreenIcon.d.ts +6 -0
  25. package/lib/common/Icon.d.ts +7 -0
  26. package/lib/common/InstructionIconFaceDetection.d.ts +5 -0
  27. package/lib/common/InstructionIconFaceLiveness.d.ts +5 -0
  28. package/lib/common/Message.d.ts +7 -0
  29. package/lib/common/NoGlareIcon.d.ts +5 -0
  30. package/lib/common/NoSmilingIcon.d.ts +5 -0
  31. package/lib/common/RegulaLogo.d.ts +6 -0
  32. package/lib/common/SnapshotIcon.d.ts +6 -0
  33. package/lib/common/Spinner.d.ts +3 -0
  34. package/lib/common/SquareIcon.d.ts +6 -0
  35. package/lib/common/StopIcon.d.ts +6 -0
  36. package/lib/common/VerifiedIcon.d.ts +6 -0
  37. package/lib/components/CameraCapture.d.ts +9 -0
  38. package/lib/components/CameraSnapshot.d.ts +2 -0
  39. package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
  40. package/lib/components/DocumentCapture.d.ts +10 -0
  41. package/lib/components/DocumentFullScreenOverlay.d.ts +11 -0
  42. package/lib/components/DocumentReader.d.ts +2 -0
  43. package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
  44. package/lib/components/DocumentReaderLayout.d.ts +22 -0
  45. package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
  46. package/lib/components/ErrorBoundary.d.ts +18 -0
  47. package/lib/components/FaceCapture.d.ts +15 -0
  48. package/lib/components/FaceDetection.d.ts +2 -0
  49. package/lib/components/FaceFullScreenOverlay.d.ts +11 -0
  50. package/lib/components/FaceLayout.d.ts +18 -0
  51. package/lib/components/FaceLiveness.d.ts +2 -0
  52. package/lib/components/InfoScreen.d.ts +10 -0
  53. package/lib/components/InstructionScreen.d.ts +9 -0
  54. package/lib/components/ProcessScreen.d.ts +6 -0
  55. package/lib/components/RetryScreen.d.ts +7 -0
  56. package/lib/components/WebCamera.d.ts +19 -0
  57. package/lib/constants.d.ts +568 -0
  58. package/lib/contexts/DocumentAttributesContext.d.ts +24 -0
  59. package/lib/contexts/DocumentSDKContext.d.ts +6 -0
  60. package/lib/contexts/FaceAttributesContext.d.ts +21 -0
  61. package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
  62. package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
  63. package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
  64. package/lib/hoc/withLocalize.d.ts +7 -0
  65. package/lib/hooks/useDocumentReaderSeries.d.ts +25 -0
  66. package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
  67. package/lib/hooks/useFaceLiveness.d.ts +30 -0
  68. package/lib/hooks/useImageInputParam.d.ts +9 -0
  69. package/lib/hooks/useOrientationChange.d.ts +10 -0
  70. package/lib/hooks/useStream.d.ts +10 -0
  71. package/lib/hooks/useUserAgent.d.ts +3 -0
  72. package/lib/hooks/useWindowBlur.d.ts +2 -0
  73. package/lib/i18n/dictionaries/_dictionaries.d.ts +2115 -0
  74. package/lib/index-document.d.ts +5 -0
  75. package/lib/models/CameraModel.d.ts +9 -0
  76. package/lib/models/CustomError.d.ts +7 -0
  77. package/lib/models/ImageModel.d.ts +7 -0
  78. package/lib/services/DebugService.d.ts +13 -0
  79. package/lib/services/DocumentReaderProcessor.d.ts +53 -0
  80. package/lib/services/DocumentReaderService.d.ts +44 -0
  81. package/lib/services/EventEmitter.d.ts +9 -0
  82. package/lib/services/FaceLivenessService.d.ts +43 -0
  83. package/lib/services/FaceService.d.ts +12 -0
  84. package/lib/types.d.ts +323 -0
  85. package/lib/utils.d.ts +27 -0
  86. package/lib/web-components/CameraSnapshot.d.ts +11 -0
  87. package/lib/web-components/DocumentReader.d.ts +11 -0
  88. package/lib/web-components/FaceDetection.d.ts +11 -0
  89. package/lib/web-components/FaceLiveness.d.ts +14 -0
  90. package/lib/web-components/FullScreenContainer.d.ts +4 -0
  91. package/package.json +63 -67
@@ -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
+ declare enum orientations {
2
+ portrait = "portrait",
3
+ landscape = "landscape"
4
+ }
5
+ export default function useMobileOrientation(): {
6
+ isPortrait: boolean;
7
+ isLandscape: boolean;
8
+ orientation: orientations;
9
+ };
10
+ export {};
@@ -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;
@@ -0,0 +1,3 @@
1
+ import { UserAgentType } from '../types';
2
+ declare function useUserAgent(): UserAgentType | null;
3
+ export default useUserAgent;
@@ -0,0 +1,2 @@
1
+ declare function useWindowBlur(videoStatus: string, callback?: null | (() => void)): void;
2
+ export default useWindowBlur;