@idmission/websdk-ui 0.2.0 → 0.6.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/README.md +75 -4
- package/dist/DocumentCaptureView.d.ts +7 -5
- package/dist/DocumentCaptureView.d.ts.map +1 -1
- package/dist/DocumentCaptureView.js +30 -26
- package/dist/FaceLivenessView.d.ts +2 -2
- package/dist/FaceLivenessView.d.ts.map +1 -1
- package/dist/FaceLivenessView.js +47 -13
- package/dist/IdCaptureView.d.ts +27 -15
- package/dist/IdCaptureView.d.ts.map +1 -1
- package/dist/IdCaptureView.js +149 -26
- package/dist/SelfieCaptureView.d.ts +18 -1
- package/dist/SelfieCaptureView.d.ts.map +1 -1
- package/dist/SelfieCaptureView.js +13 -4
- package/dist/SignatureCaptureView.d.ts +18 -5
- package/dist/SignatureCaptureView.d.ts.map +1 -1
- package/dist/SignatureCaptureView.js +90 -15
- package/dist/VideoIdCaptureView.d.ts +14 -2
- package/dist/VideoIdCaptureView.d.ts.map +1 -1
- package/dist/VideoIdCaptureView.js +13 -6
- package/dist/bindings/useDocumentCapture.d.ts.map +1 -1
- package/dist/bindings/useDocumentCapture.js +2 -1
- package/dist/bindings/useIdCapture.d.ts.map +1 -1
- package/dist/bindings/useIdCapture.js +2 -1
- package/dist/bindings/useSelfieCapture.d.ts.map +1 -1
- package/dist/bindings/useSelfieCapture.js +2 -1
- package/dist/bindings/useSignatureCapture.d.ts.map +1 -1
- package/dist/bindings/useSignatureCapture.js +2 -1
- package/dist/bindings/useVideoIdCapture.d.ts.map +1 -1
- package/dist/bindings/useVideoIdCapture.js +2 -1
- package/dist/components/common/BrowserEdgeTint.d.ts +63 -0
- package/dist/components/common/BrowserEdgeTint.d.ts.map +1 -0
- package/dist/components/common/BrowserEdgeTint.js +111 -0
- package/dist/components/common/LoaderButton.d.ts +9 -0
- package/dist/components/common/LoaderButton.d.ts.map +1 -1
- package/dist/components/common/LoaderButton.js +44 -321
- package/dist/components/common/ScreenReaderStatus.d.ts +8 -0
- package/dist/components/common/ScreenReaderStatus.d.ts.map +1 -0
- package/dist/components/common/ScreenReaderStatus.js +18 -0
- package/dist/components/common/overlay.d.ts +6 -0
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/common/overlay.js +7 -1
- package/dist/components/debug/debug.d.ts +6 -0
- package/dist/components/debug/debug.d.ts.map +1 -1
- package/dist/components/debug/debug.js +5 -1
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts.map +1 -1
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.js +4 -5
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts.map +1 -1
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.js +40 -13
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts +8 -1
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -1
- package/dist/components/error/useCameraAccessDeniedReport.d.ts +12 -0
- package/dist/components/error/useCameraAccessDeniedReport.d.ts.map +1 -0
- package/dist/components/error/useCameraAccessDeniedReport.js +31 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessFailure.js +4 -2
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessSuccess.js +6 -2
- package/dist/components/guides/IdCaptureFitGuide.d.ts +2 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureFitGuide.js +4 -1
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts +2 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuideOverlay.js +3 -1
- package/dist/components/guides/IdCaptureGuides.d.ts +14 -0
- package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuides.js +22 -7
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuidesCommon.js +12 -7
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +9 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +26 -4
- package/dist/components/loading/RingIntroScreen.d.ts.map +1 -1
- package/dist/components/loading/RingIntroScreen.js +4 -34
- package/dist/components/review/ReviewScreen.d.ts +10 -1
- package/dist/components/review/ReviewScreen.d.ts.map +1 -1
- package/dist/components/review/ReviewScreen.js +8 -8
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts +5 -1
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -1
- package/dist/components/review/SignatureCaptureDiagnostics.js +4 -2
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +9 -2
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/selfie/FaceCaptureGuideOverlay.js +10 -4
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +8 -1
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureAnimatedMask.js +55 -21
- package/dist/components/selfie/SelfieCaptureSurface.d.ts +9 -2
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureSurface.js +77 -16
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +9 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +26 -4
- package/dist/flows/AuthStateContext.d.ts.map +1 -1
- package/dist/flows/AuthStateContext.js +2 -1
- package/dist/flows/CaptureProgress.d.ts +14 -0
- package/dist/flows/CaptureProgress.d.ts.map +1 -0
- package/dist/flows/CaptureProgress.js +51 -0
- package/dist/flows/CompositeWizard.d.ts +7 -1
- package/dist/flows/CompositeWizard.d.ts.map +1 -1
- package/dist/flows/CompositeWizard.js +6 -2
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +3 -3
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +26 -4
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +3 -3
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +45 -9
- package/dist/flows/DocumentCaptureFlow.d.ts +4 -3
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
- package/dist/flows/DocumentCaptureFlow.js +14 -8
- package/dist/flows/FaceValidationFlow.d.ts +2 -2
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/FaceValidationFlow.js +7 -2
- package/dist/flows/FlowChassis.d.ts +19 -1
- package/dist/flows/FlowChassis.d.ts.map +1 -1
- package/dist/flows/FlowChassis.js +40 -4
- package/dist/flows/IdAndFaceValidationFlow.d.ts +3 -3
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdAndFaceValidationFlow.js +33 -3
- package/dist/flows/IdValidationFlow.d.ts +10 -5
- package/dist/flows/IdValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdValidationFlow.js +32 -5
- package/dist/flows/SignatureKYCFlow.d.ts +43 -7
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
- package/dist/flows/SignatureKYCFlow.js +154 -16
- package/dist/flows/SubmissionProvider.d.ts +12 -3
- package/dist/flows/SubmissionProvider.d.ts.map +1 -1
- package/dist/flows/SubmissionProvider.js +142 -16
- package/dist/flows/VideoIdValidationFlow.d.ts +3 -5
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
- package/dist/flows/VideoIdValidationFlow.js +38 -4
- package/dist/flows/additionalDocuments.d.ts.map +1 -1
- package/dist/flows/additionalDocuments.js +3 -6
- package/dist/flows/approval.d.ts +1 -14
- package/dist/flows/approval.d.ts.map +1 -1
- package/dist/flows/approval.js +1 -19
- package/dist/flows/artifacts.d.ts +1 -1
- package/dist/flows/artifacts.d.ts.map +1 -1
- package/dist/flows/artifacts.js +29 -9
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +3 -2
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchCapture.js +3 -2
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +13 -4
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchFlow.js +17 -12
- package/dist/flows/flowSettings.d.ts +11 -0
- package/dist/flows/flowSettings.d.ts.map +1 -0
- package/dist/flows/flowSettings.js +20 -0
- package/dist/flows/ringScreens.d.ts +1 -0
- package/dist/flows/ringScreens.d.ts.map +1 -1
- package/dist/flows/ringScreens.js +17 -2
- package/dist/flows/signatureStep.d.ts +6 -1
- package/dist/flows/signatureStep.d.ts.map +1 -1
- package/dist/flows/types.d.ts +120 -10
- package/dist/flows/types.d.ts.map +1 -1
- package/dist/flows/videoIdSteps.d.ts +2 -2
- package/dist/flows/videoIdSteps.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.js +8 -4
- package/dist/guidance/strings.d.ts +34 -1
- package/dist/guidance/strings.d.ts.map +1 -1
- package/dist/guidance/strings.js +39 -0
- package/dist/i18n/index.d.ts +5 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +13 -2
- package/dist/i18n/locales/threeOh.d.ts.map +1 -1
- package/dist/i18n/locales/threeOh.js +56 -2
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/testing/autoCaptureFrames.d.ts.map +1 -1
- package/dist/testing/autoCaptureFrames.js +10 -4
- package/dist/testing/buildSelfieState.d.ts.map +1 -1
- package/dist/testing/buildSelfieState.js +5 -0
- package/dist/testing/classNamesLeaves.js +1 -1
- package/dist/testing/fakeClient.d.ts +41 -2
- package/dist/testing/fakeClient.d.ts.map +1 -1
- package/dist/testing/fakeClient.js +71 -16
- package/dist/testing/fakeSelfieController.d.ts.map +1 -1
- package/dist/testing/fakeSelfieController.js +7 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/theme/index.d.ts +10 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/useDocumentUpload.d.ts +63 -0
- package/dist/useDocumentUpload.d.ts.map +1 -0
- package/dist/useDocumentUpload.js +45 -0
- package/dist/useIdmissionClient.d.ts +24 -3
- package/dist/useIdmissionClient.d.ts.map +1 -1
- package/dist/useIdmissionClient.js +46 -0
- package/dist/utils/mountOnly.d.ts +25 -0
- package/dist/utils/mountOnly.d.ts.map +1 -0
- package/dist/utils/mountOnly.js +111 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -9
- package/dist/flows/autoCaptureMountGuard.d.ts +0 -22
- package/dist/flows/autoCaptureMountGuard.d.ts.map +0 -1
- package/dist/flows/autoCaptureMountGuard.js +0 -61
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewScreen.d.ts","sourceRoot":"","sources":["../../../src/components/review/ReviewScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReviewScreen.d.ts","sourceRoot":"","sources":["../../../src/components/review/ReviewScreen.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EAChB,MAAM,kCAAkC,CAAA;AAYzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;A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AAU,CAAC,EAAE,sBAAsB,CAAA;IACnC,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,+IAW1B,iBAAiB,4CAmGnB,CAAA"}
|
|
@@ -10,10 +10,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
// `useAuthContext()`-derived `sessionReady` -> `submission` (core's
|
|
11
11
|
// `SubmissionPhase`) and `sessionReady` props (default `true`).
|
|
12
12
|
// - `onSubmitClick` / `onRetryClick` -> `onSubmit` / `onRetry`.
|
|
13
|
-
// -
|
|
14
|
-
// `
|
|
15
|
-
//
|
|
16
|
-
// defaults.
|
|
13
|
+
// - Source's `IdCaptureSuccessColors` (`doneBtn`/`retryBtn`) ->
|
|
14
|
+
// `colors.submitBtn`/`colors.retryBtn`, keyed like `classNames`. Unset,
|
|
15
|
+
// the buttons keep their `variant` colours.
|
|
17
16
|
// `classNames` keeps only the fields the surviving (non-debug) render tree
|
|
18
17
|
// actually reads: `container`, `inner`, `card`, `heading`, `imageContainer`,
|
|
19
18
|
// `imageRow`, `imageCol`, `image`, `buttonsRow`, `submitBtn`, `retryBtn`.
|
|
@@ -38,7 +37,7 @@ const imageDisplayOrder = [
|
|
|
38
37
|
'idFrontUvImage',
|
|
39
38
|
'idBackUvImage',
|
|
40
39
|
];
|
|
41
|
-
export const ReviewScreen = ({ capturedDocuments, submission, sessionReady = true, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage = {}, classNames = {}, }) => {
|
|
40
|
+
export const ReviewScreen = ({ capturedDocuments, showBarcodeImage = true, submission, sessionReady = true, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage = {}, classNames = {}, colors = {}, }) => {
|
|
42
41
|
const submitButtonRef = useRef(null);
|
|
43
42
|
// Auto-focus submit button when session becomes ready.
|
|
44
43
|
useEffect(() => {
|
|
@@ -54,14 +53,15 @@ export const ReviewScreen = ({ capturedDocuments, submission, sessionReady = tru
|
|
|
54
53
|
});
|
|
55
54
|
return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(FlexCard, { className: classNames.card, children: [_jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsx(ImagesContainer, { className: classNames.imageContainer, children: _jsxs(ImageRow, { className: classNames.imageRow, children: [imageDisplayOrder.map((name) => {
|
|
56
55
|
const doc = capturedDocuments[name];
|
|
57
|
-
if (!doc)
|
|
56
|
+
if (!doc || (name === 'idBarcodeImage' && !showBarcodeImage)) {
|
|
58
57
|
return null;
|
|
58
|
+
}
|
|
59
59
|
return (_jsxs(ImageCol, { className: classNames.imageCol, children: [_jsx(StyledImage, { image: doc, className: classNames.image, alt: doc.documentType }), diagnostics ? (_jsx(ReviewDocumentDiagnostics, { document: doc, diagnostics: diagnostics })) : null] }, doc.imageData));
|
|
60
|
-
}), diagnostics ? (_jsx(ReviewDiagnosticsPanel, { capturedDocuments: capturedDocuments, diagnostics: diagnostics })) : null] }) }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(WideButton, { ref: submitButtonRef, className: classNames.submitBtn, variant: "positive", onClick: onSubmit, disabled: submission === 'submitting' || !sessionReady, finished: true, children: submission === 'submitting'
|
|
60
|
+
}), diagnostics ? (_jsx(ReviewDiagnosticsPanel, { capturedDocuments: capturedDocuments, diagnostics: diagnostics })) : null] }) }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(WideButton, { ref: submitButtonRef, className: classNames.submitBtn, colors: colors.submitBtn, variant: "positive", onClick: onSubmit, disabled: submission === 'submitting' || !sessionReady, finished: true, children: submission === 'submitting'
|
|
61
61
|
? verbiage.submittingText
|
|
62
62
|
: !sessionReady
|
|
63
63
|
? 'Initializing...'
|
|
64
|
-
: verbiage.submitText }), _jsx(WideBorderButton, { className: classNames.retryBtn, variant: "warning", onClick: onRetry, disabled: submission !== 'idle', finished: true, children: verbiage.retryText })] })] }) }) }));
|
|
64
|
+
: verbiage.submitText }), _jsx(WideBorderButton, { className: classNames.retryBtn, colors: colors.retryBtn, variant: "warning", onClick: onRetry, disabled: submission !== 'idle', finished: true, children: verbiage.retryText })] })] }) }) }));
|
|
65
65
|
};
|
|
66
66
|
const Heading = styled.h1 `
|
|
67
67
|
font-size: 1.5rem;
|
|
@@ -43,8 +43,12 @@ export type SignatureTrimPadding = {
|
|
|
43
43
|
};
|
|
44
44
|
export declare const ASSUMED_TRIM_PADDING: SignatureTrimPadding;
|
|
45
45
|
export declare function describeSignatureTrimWindow(metadata: VideoSignatureMetadata | null, padding?: SignatureTrimPadding): SignatureTrimWindow;
|
|
46
|
-
export declare function SignatureCaptureDiagnostics({ artifact, className, }: {
|
|
46
|
+
export declare function SignatureCaptureDiagnostics({ artifact, cameraResolution, className, }: {
|
|
47
47
|
artifact: SignatureCaptureArtifact;
|
|
48
|
+
cameraResolution?: {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
};
|
|
48
52
|
className?: string;
|
|
49
53
|
}): import("react/jsx-runtime").JSX.Element;
|
|
50
54
|
//# sourceMappingURL=SignatureCaptureDiagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureCaptureDiagnostics.d.ts","sourceRoot":"","sources":["../../../src/components/review/SignatureCaptureDiagnostics.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAA;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,IAAI,EAA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AO,GAAE,oBAA2C,GACnD,mBAAmB,CAmCrB;AAwBD,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,gBAAgB,EAChB,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,wBAAwB,CAAA;IAClC,gBAAgB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,2CA6IA"}
|
|
@@ -48,7 +48,7 @@ const offset = (at, from) => at === undefined || at === 0 || from === undefined
|
|
|
48
48
|
: `${at - from >= 0 ? '+' : ''}${((at - from) / 1000).toFixed(2)}s`;
|
|
49
49
|
const bytes = (n) => n === undefined ? '—' : `${(n / 1048576).toFixed(2)} MB (${n.toLocaleString()} B)`;
|
|
50
50
|
const bool = (value) => value === undefined ? '—' : value ? 'yes' : 'no';
|
|
51
|
-
export function SignatureCaptureDiagnostics({ artifact, className, }) {
|
|
51
|
+
export function SignatureCaptureDiagnostics({ artifact, cameraResolution, className, }) {
|
|
52
52
|
const { metadata, videoBlob, validity } = artifact;
|
|
53
53
|
const trim = useMemo(() => describeSignatureTrimWindow(metadata), [metadata]);
|
|
54
54
|
const timing = metadata?.timingData;
|
|
@@ -64,7 +64,9 @@ export function SignatureCaptureDiagnostics({ artifact, className, }) {
|
|
|
64
64
|
: undefined;
|
|
65
65
|
return (_jsx(Panel, { className: className, "data-testid": "signature-capture-diagnostics", children: _jsx(Table, { children: _jsxs("tbody", { children: [_jsx(SectionRow, { label: "Trim window (backend formula, assumed padding)" }), trim.kind === 'window' ? (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Clip start", value: secs(trim.startMs) }), _jsx(Row, { label: "Clip end", value: secs(trim.endMs) }), _jsx(Row, { label: "Clip length", value: secs(trim.lengthMs) }), _jsx(Row, { label: "Share of recording", value: `${Math.round(trim.shareOfRecording * 100)}%`, suspect: trim.shareOfRecording > TRIM_SHARE_SUSPECT, note: trim.shareOfRecording > TRIM_SHARE_SUSPECT
|
|
66
66
|
? 'the clip is nearly the whole recording — check the signature marks below'
|
|
67
|
-
: undefined })] })) : (_jsx(Row, { label: "Clip", value: trim.reason, suspect: true })), _jsx(Row, { label: "Padding assumed", value: `${secs(ASSUMED_TRIM_PADDING.startMs)} before / ${secs(ASSUMED_TRIM_PADDING.endMs)} after`, note: "the backend reads these from its own config; if it was set differently, the clip above shifts by the difference" }), _jsx(SectionRow, { label: "Marks (offset from recording start)" }), _jsx(Row, { label: "Start requested", value: offset(timing?.recordingStartRequestedAt, started) }), _jsx(Row, { label: "Recording started", value: started ? '+0.00s' : '—' }), _jsx(Row, { label: "First chunk", value: offset(timing?.firstChunkReceivedAt, started) }), _jsx(Row, { label: "Signature started", value: offset(timing?.signatureStartedAt, started) }), _jsx(Row, { label: "Signature ended", value: offset(timing?.signatureEndedAt, started) }), _jsx(Row, { label: "Accept clicked", value: offset(timing?.acceptClickedAt, started) }), _jsx(Row, { label: "Stop requested", value: offset(timing?.recordingStopRequestedAt, started) }), _jsx(Row, { label: "Last chunk", value: offset(timing?.lastChunkReceivedAt, started) }), _jsx(Row, { label: "Recording stopped", value: offset(timing?.recordingStoppedAt, started) }), _jsx(SectionRow, { label: "Intervals" }), _jsx(Row, { label: "Lead-in", value: secs(leadInMs), note: "recording start \u2192 first ink" }), _jsx(Row, { label: "Signing window", value: secs(signingMs), note: "first ink \u2192 last ink" }), _jsx(Row, { label: "Tail", value: secs(tailMs), note: "last ink \u2192 recording stop" }), _jsx(Row, { label: "Recording", value: secs(recordingMs) }), _jsx(SectionRow, { label: "Recording quality" }), _jsx(Row, { label: "
|
|
67
|
+
: undefined })] })) : (_jsx(Row, { label: "Clip", value: trim.reason, suspect: true })), _jsx(Row, { label: "Padding assumed", value: `${secs(ASSUMED_TRIM_PADDING.startMs)} before / ${secs(ASSUMED_TRIM_PADDING.endMs)} after`, note: "the backend reads these from its own config; if it was set differently, the clip above shifts by the difference" }), _jsx(SectionRow, { label: "Marks (offset from recording start)" }), _jsx(Row, { label: "Start requested", value: offset(timing?.recordingStartRequestedAt, started) }), _jsx(Row, { label: "Recording started", value: started ? '+0.00s' : '—' }), _jsx(Row, { label: "First chunk", value: offset(timing?.firstChunkReceivedAt, started) }), _jsx(Row, { label: "Signature started", value: offset(timing?.signatureStartedAt, started) }), _jsx(Row, { label: "Signature ended", value: offset(timing?.signatureEndedAt, started) }), _jsx(Row, { label: "Accept clicked", value: offset(timing?.acceptClickedAt, started) }), _jsx(Row, { label: "Stop requested", value: offset(timing?.recordingStopRequestedAt, started) }), _jsx(Row, { label: "Last chunk", value: offset(timing?.lastChunkReceivedAt, started) }), _jsx(Row, { label: "Recording stopped", value: offset(timing?.recordingStoppedAt, started) }), _jsx(SectionRow, { label: "Intervals" }), _jsx(Row, { label: "Lead-in", value: secs(leadInMs), note: "recording start \u2192 first ink" }), _jsx(Row, { label: "Signing window", value: secs(signingMs), note: "first ink \u2192 last ink" }), _jsx(Row, { label: "Tail", value: secs(tailMs), note: "last ink \u2192 recording stop" }), _jsx(Row, { label: "Recording", value: secs(recordingMs) }), _jsx(SectionRow, { label: "Recording quality" }), _jsx(Row, { label: "Camera stream", value: cameraResolution && cameraResolution.width > 0 && cameraResolution.height > 0
|
|
68
|
+
? `${cameraResolution.width} × ${cameraResolution.height}`
|
|
69
|
+
: '—' }), _jsx(Row, { label: "MIME type", value: metadata?.mimeType ?? '—' }), _jsx(Row, { label: "Video size", value: bytes(videoBlob?.size) }), _jsx(Row, { label: "Signing FPS", value: diagnostics?.signingWindowFps?.toFixed(2) ?? '—' }), _jsx(Row, { label: "Frames", value: `${diagnostics?.totalFramesDrawn ?? '—'} drawn / ${diagnostics?.signingWindowFrameCount ?? '—'} in window` }), _jsx(Row, { label: "Max frame gap", value: secs(diagnostics?.maxFrameGapMs) }), _jsx(Row, { label: "Null chunks", value: String(diagnostics?.nullChunksReceived ?? '—') }), _jsx(Row, { label: "Final chunk", value: diagnostics?.finalChunkReceived === undefined
|
|
68
70
|
? '—'
|
|
69
71
|
: `${bool(diagnostics.finalChunkReceived)}${diagnostics.finalChunkTimedOut ? ' (timed out)' : ''} after ${secs(diagnostics.finalChunkWaitedMs)}`, suspect: diagnostics?.finalChunkTimedOut === true }), _jsx(Row, { label: "Times cleared", value: String(diagnostics?.timesSignatureCleared ?? '—') }), _jsx(Row, { label: "Hidden during capture", value: bool(diagnostics?.wasHiddenDuringCapture), suspect: diagnostics?.wasHiddenDuringCapture === true }), diagnostics?.recorderDiedState ? (_jsx(Row, { label: "Recorder died", value: `${diagnostics.recorderDiedState}${diagnostics.recorderDiedError ? ` — ${diagnostics.recorderDiedError}` : ''}`, suspect: true })) : null, diagnostics?.qualityWarning ? (_jsx(Row, { label: "Quality warning", value: `score ${diagnostics.qualityWarning.score} (watermark ${diagnostics.qualityWarning.watermarkScore})`, note: trippedSignals(diagnostics.qualityWarning) || undefined, suspect: true })) : null, _jsx(SectionRow, { label: "Signature validity" }), _jsx(Row, { label: "Valid", value: bool(validity?.isValid), suspect: validity?.isValid === false }), _jsx(Row, { label: "Concern", value: validity
|
|
70
72
|
? `${bool(validity.concern)} (${validity.concernScore}/${validity.concernThreshold})`
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { type FaceGuideStyle } from './SelfieCaptureAnimatedMask';
|
|
1
2
|
export type FaceCaptureGuideOverlayVariant = 'satisfied' | 'unsatisfied';
|
|
2
|
-
export declare const FaceCaptureGuideContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("
|
|
3
|
+
export declare const FaceCaptureGuideContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$clip"> & {
|
|
4
|
+
$clip?: boolean;
|
|
5
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$clip"> & {
|
|
6
|
+
$clip?: boolean;
|
|
7
|
+
}, never>>> & string;
|
|
3
8
|
export type FaceCaptureGuideOverlayClassNames = {
|
|
4
9
|
container?: string;
|
|
5
10
|
oval?: string;
|
|
@@ -9,9 +14,11 @@ export type FaceCaptureGuideOverlayProps = {
|
|
|
9
14
|
classNames?: FaceCaptureGuideOverlayClassNames;
|
|
10
15
|
variant?: FaceCaptureGuideOverlayVariant;
|
|
11
16
|
status?: FaceGuideStatus;
|
|
17
|
+
/** 'pulse' (default) or 'spotlight'; see SelfieCaptureAnimatedMaskProps. */
|
|
18
|
+
guideStyle?: FaceGuideStyle;
|
|
12
19
|
borderWidth?: number;
|
|
13
20
|
borderColor?: string;
|
|
14
21
|
borderOpacity?: number;
|
|
15
22
|
};
|
|
16
|
-
export declare const FaceCaptureGuideOverlay:
|
|
23
|
+
export declare const FaceCaptureGuideOverlay: import("react").NamedExoticComponent<FaceCaptureGuideOverlayProps>;
|
|
17
24
|
//# sourceMappingURL=FaceCaptureGuideOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaceCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/FaceCaptureGuideOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FaceCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/FaceCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,8BAA8B,GAAG,WAAW,GAAG,aAAa,CAAA;AAExE,eAAO,MAAM,yBAAyB;YAAwB,OAAO;;YAAP,OAAO;oBAgBpE,CAAA;AAOD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5E,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,iCAAiC,CAAA;IAC9C,OAAO,CAAC,EAAE,8BAA8B,CAAA;IACxC,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAID,eAAO,MAAM,uBAAuB,oEAyBlC,CAAA"}
|
|
@@ -14,8 +14,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
// type-imports `FaceGuideStatus` from face_liveness/FaceCaptureGuideOverlay.tsx
|
|
15
15
|
// while this file value-imports back) — a type-only import erases at compile
|
|
16
16
|
// time, so this never becomes a real runtime circular dependency.
|
|
17
|
+
import { memo } from 'react';
|
|
17
18
|
import { styled } from 'styled-components';
|
|
18
|
-
import { SelfieCaptureAnimatedMaskWithStatus } from './SelfieCaptureAnimatedMask';
|
|
19
|
+
import { SelfieCaptureAnimatedMaskWithStatus, } from './SelfieCaptureAnimatedMask';
|
|
19
20
|
export const FaceCaptureGuideContainer = styled.div `
|
|
20
21
|
position: absolute;
|
|
21
22
|
z-index: 1000;
|
|
@@ -29,11 +30,16 @@ export const FaceCaptureGuideContainer = styled.div `
|
|
|
29
30
|
justify-content: center;
|
|
30
31
|
padding: 40px;
|
|
31
32
|
box-sizing: border-box;
|
|
33
|
+
/* Keeps the spotlight dim inside the capture surface when the view is
|
|
34
|
+
embedded rather than full-screen. */
|
|
35
|
+
${(props) => (props.$clip ? 'overflow: hidden;' : '')}
|
|
32
36
|
`;
|
|
33
37
|
const FaceCaptureGuideInner = styled.div `
|
|
34
38
|
position: relative;
|
|
35
39
|
height: 60%;
|
|
36
40
|
`;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
41
|
+
// Memoized: the capture surfaces re-render on every analyzed frame, but the
|
|
42
|
+
// guide's props only change when the mask status does.
|
|
43
|
+
export const FaceCaptureGuideOverlay = memo(function FaceCaptureGuideOverlay({ classNames = {}, status = 'ready', guideStyle, borderWidth = 5, borderColor, borderOpacity = 0.8, }) {
|
|
44
|
+
return (_jsx(FaceCaptureGuideContainer, { className: classNames.container, "$clip": guideStyle === 'spotlight', children: _jsx(FaceCaptureGuideInner, { children: _jsx(SelfieCaptureAnimatedMaskWithStatus, { status: status, guideStyle: guideStyle, borderColor: borderColor, borderWidth: borderWidth, borderOpacity: borderOpacity, verticalAlign: "center" }) }) }));
|
|
45
|
+
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type SVGProps } from 'react';
|
|
2
2
|
import type { FaceGuideStatus } from './FaceCaptureGuideOverlay';
|
|
3
|
+
/** How the selfie guide prompts the user to put their head in the oval. */
|
|
4
|
+
export type FaceGuideStyle = 'pulse' | 'spotlight';
|
|
3
5
|
export type SelfieCaptureAnimatedMaskProps = SVGProps<SVGSVGElement> & {
|
|
4
6
|
frame?: number;
|
|
5
7
|
borderWidth?: number;
|
|
@@ -7,8 +9,13 @@ export type SelfieCaptureAnimatedMaskProps = SVGProps<SVGSVGElement> & {
|
|
|
7
9
|
borderOpacity?: number;
|
|
8
10
|
verticalAlign?: 'center' | 'bottom';
|
|
9
11
|
status?: FaceGuideStatus;
|
|
12
|
+
/** 'pulse' (default) animates waves out of the oval until a face is framed;
|
|
13
|
+
* 'spotlight' dims everything outside the oval instead, with no animation.
|
|
14
|
+
* The dim reaches the nearest clipping ancestor, so render the mask inside
|
|
15
|
+
* an `overflow: hidden` container (FaceCaptureGuideOverlay provides one). */
|
|
16
|
+
guideStyle?: FaceGuideStyle;
|
|
10
17
|
};
|
|
11
|
-
export declare function SelfieCaptureAnimatedMask({ frame, borderWidth, borderColor, borderOpacity, verticalAlign, status, ...props }: SelfieCaptureAnimatedMaskProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function SelfieCaptureAnimatedMask({ frame, borderWidth, borderColor, borderOpacity, verticalAlign, status, guideStyle, ...props }: SelfieCaptureAnimatedMaskProps): import("react/jsx-runtime").JSX.Element;
|
|
12
19
|
export declare function SelfieCaptureAnimatedMaskWithStatus({ status, ...props }: SelfieCaptureAnimatedMaskProps & {
|
|
13
20
|
status?: FaceGuideStatus;
|
|
14
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieCaptureAnimatedMask.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/SelfieCaptureAnimatedMask.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelfieCaptureAnimatedMask.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/SelfieCaptureAnimatedMask.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAWhE,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,WAAW,CAAA;AAyNlD,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IACnC,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB;;;iFAG6E;IAC7E,UAAU,CAAC,EAAE,cAAc,CAAA;CAC5B,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,KAAS,EACT,WAAe,EACf,WAAW,EACX,aAAmB,EACnB,aAAwB,EACxB,MAAgB,EAChB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,8BAA8B,2CA8MhC;AAED,wBAAgB,mCAAmC,CAAC,EAClD,MAAgB,EAChB,GAAG,KAAK,EACT,EAAE,8BAA8B,GAAG;IAClC,MAAM,CAAC,EAAE,eAAe,CAAA;CACzB,2CAoBA"}
|
|
@@ -3,14 +3,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
// lines 305-730: `HeadGuideSvg`, `HeadGuide`, `SelfieCaptureAnimatedMask`, and
|
|
4
4
|
// `SelfieCaptureAnimatedMaskWithStatus` (the file's other export, the
|
|
5
5
|
// `SelfieCaptureLoadingGraphic` avatar animation, lives in the sibling
|
|
6
|
-
// ./SelfieCaptureLoadingGraphic.tsx per the task-3 file split). SVG paths
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// ./SelfieCaptureLoadingGraphic.tsx per the task-3 file split). SVG paths
|
|
7
|
+
// and the 250ms processing frame cycle are kept byte-identical; the ready-state
|
|
8
|
+
// waves deliberately diverge from sdk2 for GPU cost (see
|
|
9
|
+
// `headGuideWavesAnimation`). Otherwise only sanctioned transforms applied:
|
|
9
10
|
// - unused `React` default import dropped (new JSX transform);
|
|
10
11
|
// - `styled` repointed to a named import;
|
|
11
|
-
// - `wavesAnimation` repointed to this package's existing
|
|
12
|
-
// components/common/animation.ts (already ported in iteration 3 and used
|
|
13
|
-
// by components/guides/IdCaptureGuidesCommon.tsx's own waves stack);
|
|
14
12
|
// - `useResizeObserver` repointed to this package's layout/useResizeObserver;
|
|
15
13
|
// - `FaceGuideStatus` type-only-imported from the sibling
|
|
16
14
|
// ./FaceCaptureGuideOverlay.tsx (see that file's header comment for why
|
|
@@ -21,12 +19,34 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
21
19
|
// guide_images/defaults.ts uses for its own CDN asset URLs — the resolved
|
|
22
20
|
// URL string is unchanged.
|
|
23
21
|
import { forwardRef, useEffect, useMemo, useRef, useState, } from 'react';
|
|
24
|
-
import { styled, useTheme } from 'styled-components';
|
|
25
|
-
import { wavesAnimation } from '../common/animation';
|
|
22
|
+
import { keyframes, styled, useTheme } from 'styled-components';
|
|
26
23
|
import useResizeObserver from '../../layout/useResizeObserver';
|
|
27
24
|
import { DEFAULT_CDN_URL } from '../../utils/cdn';
|
|
28
|
-
const
|
|
25
|
+
const HEAD_GUIDE_OVAL_PATH = 'M565.5 295C565.5 350.583 549.016 400.803 522.488 437.067C495.958 473.332 459.517 495.5 419.5 495.5C379.483 495.5 343.042 473.332 316.512 437.067C289.984 400.803 273.5 350.583 273.5 295C273.5 239.417 289.984 189.197 316.512 152.933C343.042 116.668 379.483 94.5 419.5 94.5C459.517 94.5 495.958 116.668 522.488 152.933C549.016 189.197 565.5 239.417 565.5 295Z';
|
|
26
|
+
// A rectangle far larger than any screen with the oval cut out of it
|
|
27
|
+
// (evenodd), so one static path dims everything except the guide.
|
|
28
|
+
const SPOTLIGHT_PATH = `M-10000 -10000H10000V10000H-10000Z ${HEAD_GUIDE_OVAL_PATH}`;
|
|
29
|
+
const HeadGuideSvg = forwardRef(({ borderColor = 'white', borderOpacity = 0.8, borderWidth = 5, status = 'ready', ...props }, ref) => (_jsxs("svg", { ...props, ref: ref, viewBox: "271 92 297 406", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsxs("g", { clipPath: "url(#clip0_428_1188)", children: [_jsx("path", { d: HEAD_GUIDE_OVAL_PATH, stroke: borderColor, strokeOpacity: borderOpacity, strokeWidth: borderWidth }), status === 'success' && (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "518.5", cy: "438.5", r: "25.5", fill: borderColor }), _jsx("path", { d: "M504 440.5L512 448L531 427", stroke: "white", strokeWidth: "5", strokeLinecap: "round", strokeLinejoin: "round" })] })), status === 'failure' && (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "518.5", cy: "438.5", r: "25.5", fill: borderColor }), _jsx("image", { href: `${DEFAULT_CDN_URL}/x.svg`, x: "507", y: "427", width: "24", height: "24" })] }))] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_428_1188", children: _jsx("rect", { width: "840", height: "740", fill: "white" }) }) })] })));
|
|
29
30
|
HeadGuideSvg.displayName = 'HeadGuideSvg';
|
|
31
|
+
// One wave that grows to 1.3x and fades out, three times, then stops. sdk2
|
|
32
|
+
// stacked three copies growing to 2x on an infinite loop: three translucent
|
|
33
|
+
// layers up to 4x the guide's area, blended over the video at the display
|
|
34
|
+
// refresh rate for the whole capture, which low-end GPUs can't keep up with
|
|
35
|
+
// while also running the camera and face model. Waves only render while the
|
|
36
|
+
// status is 'ready', so the pulse replays each time the face leaves the guide.
|
|
37
|
+
const headGuideWavesAnimation = keyframes `
|
|
38
|
+
0% {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
transform: scale(1);
|
|
41
|
+
}
|
|
42
|
+
60% {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
}
|
|
45
|
+
100% {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transform: scale(1.3);
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
30
50
|
const PulsingHeadGuideContainer = styled.div `
|
|
31
51
|
display: flex;
|
|
32
52
|
position: relative;
|
|
@@ -35,29 +55,36 @@ const PulsingHeadGuideContainer = styled.div `
|
|
|
35
55
|
|
|
36
56
|
& > .idmSdkWaves {
|
|
37
57
|
position: absolute;
|
|
38
|
-
|
|
39
|
-
|
|
58
|
+
opacity: 0;
|
|
59
|
+
animation: ${headGuideWavesAnimation} 2s ease-out 3;
|
|
40
60
|
|
|
41
|
-
|
|
42
|
-
|
|
61
|
+
@media (prefers-reduced-motion: reduce) {
|
|
62
|
+
display: none;
|
|
43
63
|
}
|
|
64
|
+
}
|
|
44
65
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
66
|
+
/* Paints far past its box; the nearest clipping ancestor bounds it
|
|
67
|
+
(FaceCaptureGuideOverlay clips to the capture surface). */
|
|
68
|
+
& > .idmSdkSpotlight {
|
|
69
|
+
position: absolute;
|
|
70
|
+
overflow: visible;
|
|
71
|
+
pointer-events: none;
|
|
48
72
|
}
|
|
49
73
|
|
|
50
74
|
& > .idmSdkWavesOrigin {
|
|
51
75
|
position: relative;
|
|
52
76
|
}
|
|
53
77
|
`;
|
|
54
|
-
function HeadGuide({ status = 'ready', ...props }) {
|
|
78
|
+
function HeadGuide({ status = 'ready', guideStyle = 'pulse', ...props }) {
|
|
55
79
|
const ref = useRef(null);
|
|
56
80
|
const { ref: parentRef, height: parentHeight } = useResizeObserver();
|
|
57
81
|
const [contentAspectRatio, setContentAspectRatio] = useState();
|
|
58
82
|
const theme = useTheme();
|
|
59
83
|
const wavesDisabled = theme.selfieCapture?.guides?.wavesDisabled ?? false;
|
|
60
84
|
const wavesColor = theme.selfieCapture?.guides?.wavesColor ?? '#287ec6';
|
|
85
|
+
const spotlightColor = guideStyle === 'spotlight'
|
|
86
|
+
? (theme.selfieCapture?.guides?.spotlightColor ?? 'rgba(0, 0, 0, 0.55)')
|
|
87
|
+
: undefined;
|
|
61
88
|
useEffect(() => {
|
|
62
89
|
if (!ref.current)
|
|
63
90
|
return;
|
|
@@ -65,7 +92,11 @@ function HeadGuide({ status = 'ready', ...props }) {
|
|
|
65
92
|
setContentAspectRatio((bbox.x + bbox.width + bbox.x) / (bbox.y + bbox.height + bbox.y));
|
|
66
93
|
}, []);
|
|
67
94
|
const scaledWidth = useMemo(() => contentAspectRatio && parentHeight && parentHeight / contentAspectRatio, [contentAspectRatio, parentHeight]);
|
|
68
|
-
return (_jsxs(PulsingHeadGuideContainer, { ref: parentRef, children: [
|
|
95
|
+
return (_jsxs(PulsingHeadGuideContainer, { ref: parentRef, children: [spotlightColor && (
|
|
96
|
+
// Its own svg, so the origin's getBBox() (which sizes the guide) never
|
|
97
|
+
// sees the huge rectangle. Painted before the origin so the outline
|
|
98
|
+
// and status badges stay on top.
|
|
99
|
+
_jsx("svg", { className: "idmSdkSpotlight", viewBox: "271 92 297 406", width: scaledWidth, height: parentHeight, "aria-hidden": true, children: _jsx("path", { d: SPOTLIGHT_PATH, fill: spotlightColor, fillRule: "evenodd" }) })), status === 'ready' && guideStyle === 'pulse' && !wavesDisabled && (_jsx(HeadGuideSvg, { ...props, className: "idmSdkWaves", borderOpacity: 0.25, borderColor: wavesColor, width: scaledWidth, height: parentHeight })), _jsx(HeadGuideSvg, { ...props, ref: ref, borderOpacity: 1, className: `idmSdkWavesOrigin ${props.className ?? ''}`, status: status, width: scaledWidth, height: parentHeight })] }));
|
|
69
100
|
}
|
|
70
101
|
const AbsoluteSvg = styled.svg `
|
|
71
102
|
position: absolute;
|
|
@@ -80,8 +111,11 @@ const RelativeSvgContainer = styled.div `
|
|
|
80
111
|
display: flex;
|
|
81
112
|
align-items: ${(props) => props.$verticalAlign === 'bottom' ? 'flex-end' : 'center'};
|
|
82
113
|
`;
|
|
83
|
-
export function SelfieCaptureAnimatedMask({ frame = 0, borderWidth = 5, borderColor
|
|
114
|
+
export function SelfieCaptureAnimatedMask({ frame = 0, borderWidth = 5, borderColor, borderOpacity = 0.8, verticalAlign = 'center', status = 'ready', guideStyle, ...props }) {
|
|
84
115
|
const theme = useTheme();
|
|
116
|
+
// The outline while no face is framed yet. An explicit `borderColor` wins,
|
|
117
|
+
// as the video-ID guides pass their own.
|
|
118
|
+
const unsatisfiedColor = borderColor ?? theme.selfieCapture?.guides?.unsatisfiedColor ?? 'white';
|
|
85
119
|
const satisfiedColor = theme.selfieCapture?.guides?.satisfiedColor ??
|
|
86
120
|
'var(--idm-color-positive-600)';
|
|
87
121
|
const negativeColor = theme.selfieCapture?.guides?.failureColor ?? 'var(--idm-color-negative-600)';
|
|
@@ -89,8 +123,8 @@ export function SelfieCaptureAnimatedMask({ frame = 0, borderWidth = 5, borderCo
|
|
|
89
123
|
? negativeColor
|
|
90
124
|
: status === 'success'
|
|
91
125
|
? satisfiedColor
|
|
92
|
-
:
|
|
93
|
-
return (_jsxs(RelativeSvgContainer, { "$verticalAlign": verticalAlign, children: [_jsx(HeadGuide, { borderOpacity: borderOpacity, borderWidth: borderWidth, borderColor: statusBorderColor, status: status, ...props }), status === 'processing' && (_jsxs(AbsoluteSvg, { ...props, viewBox: "271 92 297 406", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsxs("g", { clipPath: "url(#clip0_428_1188)", children: [frame > 1 && (_jsxs(_Fragment, { children: [frame > 2 && (_jsxs(_Fragment, { children: [frame > 3 && (_jsxs(_Fragment, { children: [frame > 4 && (_jsxs(_Fragment, { children: [_jsx("path", { d: "M298.5 182.5L419 164.5L540 182", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "419", cy: "165", r: "7", fill: "white" })] })), _jsx("path", { d: "M299.939 262.805L419 478.5L538.5 261.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M298.5 182.5L418.871 230.054L540 182", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M298.5 182.5L299.939 262.805", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M540.001 182L538.501 261.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "299.914", cy: "182", r: "7", fill: "white" }), _jsx("circle", { cx: "540", cy: "182", r: "7", fill: "white" })] })), _jsx("path", { d: "M418.828 230L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M300 263.001L419 342.501", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M538.5 261.5L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M301.5 409L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M536.5 410L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M300 263L419 230", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M538.5 261.5L419 230", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("circle", { cx: "419", cy: "229.971", r: "7", fill: "white" }), _jsx("circle", { cx: "419", cy: "342.4", r: "7", fill: "white" })] })), _jsx("path", { d: "M538.5 261.5L536.5 410", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 7 ? 0.3 : 1 }), _jsx("path", { d: "M419 478.5L536.5 410", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 7 ? 0.3 : 1 }), _jsx("circle", { cx: "537", cy: "263", r: "7", fill: "white" }), _jsx("circle", { cx: "537", cy: "409", r: "7", fill: "white" })] })), frame > 0 && (_jsxs(_Fragment, { children: [_jsx("path", { d: "M301.501 409L300.001 263", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 1 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M301.501 409L419.001 478.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 1 && frame < 6 ? 0.3 : 1 }), _jsx("circle", { cx: "419", cy: "477.576", r: "7", fill: "white" }), _jsx("circle", { cx: "301.914", cy: "263", r: "7", fill: "white" }), _jsx("circle", { cx: "301.444", cy: "409", r: "7", fill: "white" })] }))] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_428_1188", children: _jsx("rect", { width: "840", height: "740", fill: "white" }) }) })] }))] }));
|
|
126
|
+
: unsatisfiedColor;
|
|
127
|
+
return (_jsxs(RelativeSvgContainer, { "$verticalAlign": verticalAlign, children: [_jsx(HeadGuide, { borderOpacity: borderOpacity, borderWidth: borderWidth, borderColor: statusBorderColor, status: status, guideStyle: guideStyle, ...props }), status === 'processing' && (_jsxs(AbsoluteSvg, { ...props, viewBox: "271 92 297 406", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsxs("g", { clipPath: "url(#clip0_428_1188)", children: [frame > 1 && (_jsxs(_Fragment, { children: [frame > 2 && (_jsxs(_Fragment, { children: [frame > 3 && (_jsxs(_Fragment, { children: [frame > 4 && (_jsxs(_Fragment, { children: [_jsx("path", { d: "M298.5 182.5L419 164.5L540 182", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "419", cy: "165", r: "7", fill: "white" })] })), _jsx("path", { d: "M299.939 262.805L419 478.5L538.5 261.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M298.5 182.5L418.871 230.054L540 182", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M298.5 182.5L299.939 262.805", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M540.001 182L538.501 261.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "299.914", cy: "182", r: "7", fill: "white" }), _jsx("circle", { cx: "540", cy: "182", r: "7", fill: "white" })] })), _jsx("path", { d: "M418.828 230L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M300 263.001L419 342.501", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M538.5 261.5L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M301.5 409L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M536.5 410L419 342.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M300 263L419 230", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M538.5 261.5L419 230", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 6 ? 0.3 : 1 }), _jsx("circle", { cx: "419", cy: "229.971", r: "7", fill: "white" }), _jsx("circle", { cx: "419", cy: "342.4", r: "7", fill: "white" })] })), _jsx("path", { d: "M538.5 261.5L536.5 410", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 7 ? 0.3 : 1 }), _jsx("path", { d: "M419 478.5L536.5 410", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 3 && frame < 7 ? 0.3 : 1 }), _jsx("circle", { cx: "537", cy: "263", r: "7", fill: "white" }), _jsx("circle", { cx: "537", cy: "409", r: "7", fill: "white" })] })), frame > 0 && (_jsxs(_Fragment, { children: [_jsx("path", { d: "M301.501 409L300.001 263", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 1 && frame < 6 ? 0.3 : 1 }), _jsx("path", { d: "M301.501 409L419.001 478.5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: frame > 1 && frame < 6 ? 0.3 : 1 }), _jsx("circle", { cx: "419", cy: "477.576", r: "7", fill: "white" }), _jsx("circle", { cx: "301.914", cy: "263", r: "7", fill: "white" }), _jsx("circle", { cx: "301.444", cy: "409", r: "7", fill: "white" })] }))] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_428_1188", children: _jsx("rect", { width: "840", height: "740", fill: "white" }) }) })] }))] }));
|
|
94
128
|
}
|
|
95
129
|
export function SelfieCaptureAnimatedMaskWithStatus({ status = 'ready', ...props }) {
|
|
96
130
|
const [frame, setFrame] = useState(1);
|
|
@@ -2,9 +2,11 @@ import { ReactElement, ReactNode, type RefObject } from 'react';
|
|
|
2
2
|
import { FaceMessageCode } from '@idmission/websdk-core/selfieCapture';
|
|
3
3
|
import type { SelfieCaptureController, SelfieCaptureControllerState, SelfieGuidanceCode } from '@idmission/websdk-core/selfieCapture';
|
|
4
4
|
import { type FaceCaptureGuideOverlayClassNames, type FaceGuideStatus } from './FaceCaptureGuideOverlay';
|
|
5
|
+
import type { FaceGuideStyle } from './SelfieCaptureAnimatedMask';
|
|
5
6
|
import { type GuidanceMessageVariant } from '../GuidanceMessage';
|
|
6
7
|
import { type SelfieCaptureLoadingOverlayAssets, type SelfieCaptureLoadingOverlayClassNames, type SelfieCaptureLoadingOverlayColors, type SelfieCaptureLoadingOverlayMode, type SelfieCaptureLoadingOverlayVerbiage } from '../selfie_loading/SelfieCaptureLoadingOverlay';
|
|
7
8
|
import { type ErrorScreenClassNames, type ErrorScreenVerbiage } from '../error/ErrorScreen';
|
|
9
|
+
import type { CameraAccessDeniedReason } from '../error/CameraAccessDeniedOverlay';
|
|
8
10
|
import { type SelfieCaptureFallbackClassNames, type SelfieCaptureFallbackColors, type SelfieCaptureFallbackVerbiage } from '../fallback/SelfieCaptureFallback';
|
|
9
11
|
export type SelfieCaptureSurfaceClassNames = {
|
|
10
12
|
cameraFeed?: string;
|
|
@@ -50,7 +52,9 @@ export type SelfieCaptureSurfaceProps = {
|
|
|
50
52
|
onLoadingCompleted?: () => void;
|
|
51
53
|
onLoadingFailed?: (error?: Error) => void;
|
|
52
54
|
onLoadingOverlayDismissed?: () => void;
|
|
53
|
-
|
|
55
|
+
/** Fires once per camera failure, with whether permission was refused or
|
|
56
|
+
* the camera could not be started. */
|
|
57
|
+
onCameraAccessDenied?: (reason: CameraAccessDeniedReason) => void;
|
|
54
58
|
/** sdk2's `onModelError` / `onSelfieCaptureModelError`: fires once with the
|
|
55
59
|
* Error when a selfie model fails to load or times out. `onLoadingFailed`
|
|
56
60
|
* carries the same event but is the loading overlay's own lifecycle
|
|
@@ -82,12 +86,15 @@ export type SelfieCaptureSurfaceProps = {
|
|
|
82
86
|
silentFallback?: boolean;
|
|
83
87
|
manualCaptureText?: ReactNode;
|
|
84
88
|
manualCaptureButtonText?: ReactNode;
|
|
89
|
+
recoveryCaptureText?: ReactNode;
|
|
90
|
+
recoveryCaptureButtonText?: ReactNode;
|
|
85
91
|
/** An existing, persistently mounted video element owned by a parent flow. */
|
|
86
92
|
videoRef?: RefObject<HTMLVideoElement | null>;
|
|
87
93
|
/** False when a parent flow owns the shared camera feed element. */
|
|
88
94
|
renderCameraFeed?: boolean;
|
|
89
95
|
/** False when a parent flow owns the face-guide composition. */
|
|
90
96
|
renderFaceGuide?: boolean;
|
|
97
|
+
faceGuideStyle?: FaceGuideStyle;
|
|
91
98
|
/** Whether the mask/guidance-pill layer renders at all -- the calling
|
|
92
99
|
* view's own phase-set decision (plain vs. liveness disagree). */
|
|
93
100
|
showCaptureSurface: boolean;
|
|
@@ -131,5 +138,5 @@ export type SelfieCaptureSurfaceProps = {
|
|
|
131
138
|
colors?: SelfieCaptureSurfaceColors;
|
|
132
139
|
assets?: SelfieCaptureSurfaceAssets;
|
|
133
140
|
};
|
|
134
|
-
export declare function SelfieCaptureSurface({ controller, state, loadingOverlayMode, sessionReady, autoContinueAfterLoading, showIntroScreen, transitionFromIdCapture, onExit, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onLoadingOverlayDismissed, onCameraAccessDenied, onModelError, onCameraTamperingDetected, onExitAfterTamperSealPopped, onUserCancel, customOverlayContent, allowManualSelfieCaptureOnLoadingError, fallbackCapture, silentFallback, manualCaptureText, manualCaptureButtonText, videoRef, renderCameraFeed, renderFaceGuide, showCaptureSurface, maskStatus, showGuidancePill, guidanceText, guidanceVariant, guidanceCode, debugMode, showFaceLandmarks, debugShowSamplePoints, verbiage, classNames, colors, assets, }: SelfieCaptureSurfaceProps): ReactElement;
|
|
141
|
+
export declare function SelfieCaptureSurface({ controller, state, loadingOverlayMode, sessionReady, autoContinueAfterLoading, showIntroScreen, transitionFromIdCapture, onExit, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onLoadingOverlayDismissed, onCameraAccessDenied, onModelError, onCameraTamperingDetected, onExitAfterTamperSealPopped, onUserCancel, customOverlayContent, allowManualSelfieCaptureOnLoadingError, fallbackCapture, silentFallback, manualCaptureText, manualCaptureButtonText, recoveryCaptureText, recoveryCaptureButtonText, videoRef, renderCameraFeed, renderFaceGuide, faceGuideStyle, showCaptureSurface, maskStatus, showGuidancePill, guidanceText, guidanceVariant, guidanceCode, debugMode, showFaceLandmarks, debugShowSamplePoints, verbiage, classNames, colors, assets, }: SelfieCaptureSurfaceProps): ReactElement;
|
|
135
142
|
//# sourceMappingURL=SelfieCaptureSurface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieCaptureSurface.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/SelfieCaptureSurface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelfieCaptureSurface.d.ts","sourceRoot":"","sources":["../../../src/components/selfie/SelfieCaptureSurface.tsx"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