@smileid/usesmileid 12.2.0 → 12.3.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/CHANGELOG.md +5 -1
- package/README.md +57 -18
- package/dist/camera/bounding_box_metering_region.d.ts +10 -0
- package/dist/camera/bounding_box_metering_region.js +1 -0
- package/dist/camera/camera_defaults.d.ts +0 -2
- package/dist/camera/camera_defaults.js +1 -1
- package/dist/camera/document_image_pipeline.d.ts +9 -0
- package/dist/camera/document_image_pipeline.js +1 -1
- package/dist/camera/imported_document_folder.d.ts +15 -0
- package/dist/camera/imported_document_folder.js +1 -0
- package/dist/camera/kamera_config_factory.d.ts +11 -1
- package/dist/camera/kamera_config_factory.js +1 -1
- package/dist/camera/use_smile_id_frame_stream.js +1 -1
- package/dist/camera/use_smile_id_kamera_camera_system.d.ts +46 -2
- package/dist/camera/use_smile_id_kamera_camera_system.js +1 -1
- package/dist/core/exception/use_smile_id_error_code.js +1 -1
- package/dist/core/exception/use_smile_id_network_exception.d.ts +10 -3
- package/dist/core/exception/use_smile_id_network_exception.js +1 -1
- package/dist/core/is_development_build.d.ts +6 -0
- package/dist/core/is_development_build.js +1 -0
- package/dist/core/models/config.d.ts +6 -0
- package/dist/core/models/ml_config.d.ts +1 -1
- package/dist/core/models/network_config.d.ts +4 -1
- package/dist/core/models/params.d.ts +8 -6
- package/dist/core/models/result.d.ts +11 -0
- package/dist/core/models/result.js +1 -1
- package/dist/core/perf/capture_perf_trace.d.ts +90 -0
- package/dist/core/perf/capture_perf_trace.js +1 -0
- package/dist/data/api/interceptors/logging_interceptor.js +1 -1
- package/dist/data/api/interceptors/smile_auth_interceptor.js +1 -1
- package/dist/data/api/request_capture.d.ts +16 -0
- package/dist/data/api/request_capture.js +1 -0
- package/dist/data/api/smile_id_api.d.ts +1 -1
- package/dist/data/api/smile_id_api.js +1 -1
- package/dist/data/factory/networking_factory.d.ts +3 -1
- package/dist/data/factory/networking_factory.js +1 -1
- package/dist/data/model/captured_job.d.ts +49 -0
- package/dist/data/model/captured_job.js +1 -0
- package/dist/data/model/job_request.d.ts +1 -1
- package/dist/data/model/sealed_job_request.d.ts +15 -0
- package/dist/data/model/sealed_job_request.js +1 -0
- package/dist/data/model/token_payload.d.ts +5 -7
- package/dist/data/model/token_payload.js +1 -1
- package/dist/data/model/user_details_payload.d.ts +6 -4
- package/dist/data/repository/use_smile_id_repository.d.ts +7 -0
- package/dist/data/repository/use_smile_id_repository_impl.d.ts +29 -2
- package/dist/data/repository/use_smile_id_repository_impl.js +1 -1
- package/dist/data/security/job_package_crypto.d.ts +41 -0
- package/dist/data/security/job_package_crypto.js +1 -0
- package/dist/data/security/job_package_sealer.d.ts +35 -0
- package/dist/data/security/job_package_sealer.js +1 -0
- package/dist/data/security/signing_crypto.d.ts +34 -0
- package/dist/data/security/signing_crypto.js +1 -1
- package/dist/data/util/retry_util.d.ts +9 -6
- package/dist/data/util/retry_util.js +1 -1
- package/dist/debug/selfie_preview_debug_geometry.d.ts +13 -13
- package/dist/debug/selfie_preview_debug_geometry.js +1 -1
- package/dist/debug/use_smile_id_debug.d.ts +25 -2
- package/dist/debug/use_smile_id_debug.js +1 -1
- package/dist/debug/use_smile_id_document_preview_debug_overlay.js +1 -1
- package/dist/debug/use_smile_id_selfie_preview_debug_overlay.d.ts +5 -1
- package/dist/debug/use_smile_id_selfie_preview_debug_overlay.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/l10n/strings_en.d.ts +3 -3
- package/dist/l10n/strings_en.js +2 -2
- package/dist/l10n/use_smile_id_localizations.d.ts +5 -7
- package/dist/l10n/use_smile_id_localizations.js +1 -1
- package/dist/metadata/metadata_configuration_mappers.d.ts +3 -5
- package/dist/metadata/metadata_configuration_mappers.js +1 -1
- package/dist/metadata/use_smile_id_metadata_factory.js +1 -1
- package/dist/presentation/assets/si_dark_lighting_animation.json +1 -927
- package/dist/presentation/assets/si_device_orientation_animation.json +1 -850
- package/dist/presentation/assets/si_document_green_book_hero_animation.json +1 -4740
- package/dist/presentation/assets/si_document_hero_animation.json +1 -4870
- package/dist/presentation/assets/si_document_hero_back_animation.json +1 -2122
- package/dist/presentation/assets/si_document_passport_hero_animation.json +1 -14540
- package/dist/presentation/assets/si_ess_all_directions_hero_animation.json +1 -5906
- package/dist/presentation/assets/si_ess_animation_all_directions.json +1 -5906
- package/dist/presentation/assets/si_selfie_hero_animation.json +1 -1468
- package/dist/presentation/assets/si_smile_to_capture_animation.json +1 -1412
- package/dist/presentation/components/helpers/captured_image_uri.d.ts +11 -0
- package/dist/presentation/components/helpers/captured_image_uri.js +1 -0
- package/dist/presentation/components/helpers/captured_oval_region.d.ts +40 -0
- package/dist/presentation/components/helpers/captured_oval_region.js +1 -0
- package/dist/presentation/components/helpers/document_interior_crop.d.ts +13 -2
- package/dist/presentation/components/helpers/document_interior_crop.js +1 -1
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts +35 -29
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js +1 -1
- package/dist/presentation/components/helpers/selfie_interior_crop.js +1 -1
- package/dist/presentation/components/use_smile_id_capture_content.d.ts +5 -2
- package/dist/presentation/components/use_smile_id_capture_content.js +1 -1
- package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +8 -4
- package/dist/presentation/components/use_smile_id_captured_document_image.js +1 -1
- package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts +6 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.js +1 -1
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts +17 -7
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js +1 -1
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts +13 -14
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js +1 -1
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js +1 -1
- package/dist/presentation/components/use_smile_id_face_oval_image.js +1 -1
- package/dist/presentation/flow/analytics/unsatisfied_reasons.d.ts +14 -0
- package/dist/presentation/flow/analytics/unsatisfied_reasons.js +1 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts +8 -7
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js +1 -1
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event_kind.d.ts +9 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event_kind.js +1 -1
- package/dist/presentation/flow/config/flow_configuration_camera.d.ts +9 -0
- package/dist/presentation/flow/config/flow_configuration_camera.js +1 -0
- package/dist/presentation/flow/dsl/builder/config_builder.d.ts +6 -0
- package/dist/presentation/flow/dsl/builder/config_builder.js +1 -1
- package/dist/presentation/flow/dsl/builder/ml_builder.d.ts +1 -7
- package/dist/presentation/flow/dsl/builder/ml_builder.js +1 -1
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts +0 -9
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js +1 -1
- package/dist/presentation/flow/flow_navigation_manager.d.ts +39 -70
- package/dist/presentation/flow/flow_navigation_manager.js +1 -1
- package/dist/presentation/flow/flow_navigation_manager_analytics.d.ts +23 -0
- package/dist/presentation/flow/flow_navigation_manager_analytics.js +1 -0
- package/dist/presentation/flow/flow_navigation_manager_documents.d.ts +18 -0
- package/dist/presentation/flow/flow_navigation_manager_documents.js +1 -0
- package/dist/presentation/flow/flow_navigation_manager_job_request.d.ts +7 -0
- package/dist/presentation/flow/flow_navigation_manager_job_request.js +1 -0
- package/dist/presentation/flow/flow_navigation_manager_routing.d.ts +12 -0
- package/dist/presentation/flow/flow_navigation_manager_routing.js +1 -0
- package/dist/presentation/flow/flow_navigation_manager_submission.d.ts +17 -0
- package/dist/presentation/flow/flow_navigation_manager_submission.js +1 -0
- package/dist/presentation/flow/job_submission_state.d.ts +4 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.d.ts +1 -1
- package/dist/presentation/flow/screen/helpers/failure_message.js +1 -1
- package/dist/presentation/flow/screen/orchestrated_capture_screen.js +1 -1
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.js +1 -1
- package/dist/presentation/flow/screen/orchestrated_preview_screen.js +1 -1
- package/dist/presentation/flow/screen/orchestrated_processing_screen.js +1 -1
- package/dist/presentation/flow/use_smile_id_flow.js +1 -1
- package/dist/presentation/flow/validation/flow_validator.d.ts +0 -19
- package/dist/presentation/flow/validation/flow_validator.js +1 -1
- package/dist/presentation/flow/validation/job_type_validator.js +1 -1
- package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts +0 -12
- package/dist/presentation/screen/helpers/capture_screen_helpers.js +1 -1
- package/dist/presentation/screen/helpers/capture_ui_state.d.ts +33 -6
- package/dist/presentation/screen/helpers/capture_ui_state.js +1 -1
- package/dist/presentation/screen/helpers/dropped_frames.d.ts +6 -0
- package/dist/presentation/screen/helpers/dropped_frames.js +1 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts +2 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.js +1 -1
- package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts +5 -1
- package/dist/presentation/screen/helpers/instructions_screen_helpers.js +1 -1
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +23 -1
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +1 -1
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts +1 -1
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.js +1 -1
- package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +4 -1
- package/dist/presentation/screen/use_smile_id_capture_screen.js +1 -1
- package/dist/presentation/screen/use_smile_id_consent_screen.js +1 -1
- package/dist/presentation/screen/use_smile_id_preview_screen.d.ts +3 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.js +1 -1
- package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +3 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.js +1 -1
- package/dist/presentation/utils/locale_utils.d.ts +3 -6
- package/dist/presentation/utils/locale_utils.js +1 -1
- package/dist/testing/scenario_expectations.d.ts +7 -2
- package/dist/testing/scenario_expectations.js +1 -1
- package/dist/testing/scripted_scan_results.d.ts +2 -1
- package/dist/testing/scripted_scan_results.js +1 -1
- package/package.json +7 -7
- package/dist/presentation/flow/validation/user_details_validator.d.ts +0 -8
- package/dist/presentation/flow/validation/user_details_validator.js +0 -1
|
@@ -11,16 +11,19 @@ import { type RetryConfig } from "../../core/models/network_config";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function withRetry<T>(config: RetryConfig, block: (attempt: number) => Promise<T>): Promise<T>;
|
|
13
13
|
/**
|
|
14
|
-
* Network-class failure check. Returns `true` for
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Network-class failure check. Returns `true` for a 5xx, 408 or 429
|
|
15
|
+
* response, and for any failure with none but a cancelled request: React
|
|
16
|
+
* Native's XHR adapter reports a connection failure, a failed TLS handshake
|
|
17
|
+
* and a redirect loop alike as `ERR_NETWORK`, so they can't be told apart.
|
|
18
|
+
* Other 4xx responses and non-axios errors (programming bugs) are not retried.
|
|
18
19
|
*/
|
|
19
20
|
export declare function isRetryable(error: unknown): boolean;
|
|
20
21
|
/**
|
|
21
22
|
* Compute the delay (in milliseconds) before the next retry attempt.
|
|
22
23
|
* `attempt` is 0-indexed (0 = first retry, after the initial call
|
|
23
24
|
* failed). Config delays are in seconds; the return value is converted
|
|
24
|
-
* to ms so it can drive `setTimeout` directly.
|
|
25
|
+
* to ms so it can drive `setTimeout` directly. Jitter moves the delay by
|
|
26
|
+
* up to `jitter` of itself either way (`jitterDraw` in [-1, 1], random by
|
|
27
|
+
* default), with jitter clamped to [0, 1] and never past `maxDelay`.
|
|
25
28
|
*/
|
|
26
|
-
export declare function computeDelayMs(config: RetryConfig, attempt: number): number;
|
|
29
|
+
export declare function computeDelayMs(config: RetryConfig, attempt: number, jitterDraw?: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{isAxiosError as
|
|
1
|
+
"use strict";import{isAxiosError as m}from"axios";import{CANCELED as u}from"../../core/exception/use_smile_id_network_exception";import{RetryStrategy as p}from"../../core/models/network_config";export async function withRetry(t,e){if(t.strategy===p.none||t.maxAttempts<=1)return e(0);let s;for(let r=0;r<t.maxAttempts;r++)try{return await e(r)}catch(a){if(s=a,!isRetryable(a)||r===t.maxAttempts-1)throw a;const n=computeDelayMs(t,r);await l(n)}throw s}export function isRetryable(t){if(!m(t)||t.code===u)return!1;if(!t.response)return!0;const e=t.response.status;return e>=500&&e<600||e===408||e===429}export function computeDelayMs(t,e,s=Math.random()*2-1){if(t.strategy==="none")return 0;if(t.strategy==="fixed")return t.fixedDelay*1e3;const r=t.maxDelay*1e3,a=t.initialDelay*1e3*Math.pow(t.multiplier,e),n=Math.min(a,r),i=s*Math.min(1,Math.max(0,t.jitter)),o=n*(1+i);return Math.max(0,Math.min(r,Math.round(o)))}function l(t){return new Promise(e=>setTimeout(e,t))}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { capturedOvalRegion } from "../presentation/components/helpers/captured_oval_region";
|
|
2
|
+
/** How the preview places the selfie in its oval. */
|
|
3
|
+
export type SelfiePreviewPlacement = ReturnType<typeof capturedOvalRegion>;
|
|
1
4
|
/** A width × height in layout units (or image pixels). */
|
|
2
5
|
export type DebugSize = {
|
|
3
6
|
readonly width: number;
|
|
@@ -24,10 +27,10 @@ export type SelfiePreviewPanelGeometry = {
|
|
|
24
27
|
/**
|
|
25
28
|
* Pure geometry for the selfie preview-screen debug overlay.
|
|
26
29
|
*
|
|
27
|
-
* The preview screen draws the captured selfie
|
|
28
|
-
* `
|
|
29
|
-
*
|
|
30
|
-
* reaches the user. These helpers compute where the full frame, the ellipse
|
|
30
|
+
* The preview screen draws the captured selfie into an oval-sized box through
|
|
31
|
+
* `capturedOvalRegion` and clips it to an ellipse: the region the capture oval
|
|
32
|
+
* showed fills the box, and the frame's interior always covers it, so the
|
|
33
|
+
* border ring never reaches the user. These helpers compute where the full frame, the ellipse
|
|
31
34
|
* the user actually sees, and the interior crop land — in the oval box's
|
|
32
35
|
* coordinate space for the in-place marking (`inPlace`) and in a fit-scaled
|
|
33
36
|
* thumbnail's coordinate space for the full-frame panel (`panel`).
|
|
@@ -38,18 +41,15 @@ export declare const SelfiePreviewDebugGeometry: {
|
|
|
38
41
|
readonly plannedBorderFraction: 0.15;
|
|
39
42
|
/**
|
|
40
43
|
* Maps the captured frame onto the preview screen the way the production
|
|
41
|
-
* layout does
|
|
42
|
-
*
|
|
43
|
-
* when either size is degenerate.
|
|
44
|
+
* layout does, through `placement`. Returns `null` when either size is
|
|
45
|
+
* degenerate.
|
|
44
46
|
*/
|
|
45
|
-
readonly inPlace: (imageSize: DebugSize, ovalRect: DebugRect) => SelfiePreviewInPlaceGeometry | null;
|
|
47
|
+
readonly inPlace: (imageSize: DebugSize, ovalRect: DebugRect, placement: SelfiePreviewPlacement) => SelfiePreviewInPlaceGeometry | null;
|
|
46
48
|
/**
|
|
47
49
|
* Lays the full frame out inside a panel the way contain scaling would
|
|
48
50
|
* (uniform contain scale, centred) and maps the planned interior plus the
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* coordinates.
|
|
52
|
-
* Returns `null` when any size is degenerate.
|
|
51
|
+
* window the preview screen shows through `placement` into the same panel
|
|
52
|
+
* coordinates. Returns `null` when any size is degenerate.
|
|
53
53
|
*/
|
|
54
|
-
readonly panel: (imageSize: DebugSize, ovalSize: DebugSize, panelSize: DebugSize) => SelfiePreviewPanelGeometry | null;
|
|
54
|
+
readonly panel: (imageSize: DebugSize, ovalSize: DebugSize, panelSize: DebugSize, placement: SelfiePreviewPlacement) => SelfiePreviewPanelGeometry | null;
|
|
55
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{SelfieInteriorCrop as
|
|
1
|
+
"use strict";import{SelfieInteriorCrop as l}from"../presentation/components/helpers/selfie_interior_crop";const i=l.borderFraction;export const SelfiePreviewDebugGeometry={plannedBorderFraction:i,inPlace(t,h,o){if(e(t)||e(h))return null;const f=o.scale(t,h),n={width:t.width*f,height:t.height*f},d=o.offset(n,h),r={left:h.left+d.x,top:h.top+d.y,...n};return{frameRect:r,plannedInteriorRect:u(r,w(t)*f)}},panel(t,h,o,f){if(e(t)||e(h)||e(o))return null;const n=Math.min(o.width/t.width,o.height/t.height),d=s({x:o.width/2,y:o.height/2},{width:t.width*n,height:t.height*n}),r=f.scale(t,h),c=f.offset({width:t.width*r,height:t.height*r},h);return{frameRect:d,plannedInteriorRect:u(d,w(t)*n),visibleOvalRect:{left:d.left-c.x/r*n,top:d.top-c.y/r*n,width:h.width/r*n,height:h.height/r*n}}}};function w(t){return i*Math.min(t.width,t.height)}function s(t,h){return{left:t.x-h.width/2,top:t.y-h.height/2,width:h.width,height:h.height}}function u(t,h){return{left:t.left+h,top:t.top+h,width:t.width-2*h,height:t.height-2*h}}function e(t){return t.width<=0||t.height<=0}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CapturePerfReport } from "../core/perf/capture_perf_trace";
|
|
1
2
|
type Listener = () => void;
|
|
2
3
|
/**
|
|
3
4
|
* Debug hook state the SDK's screens subscribe to, so toggling a switch
|
|
@@ -12,6 +13,13 @@ export declare const UseSmileIDDebugHooks: {
|
|
|
12
13
|
readonly isDocumentPreviewOverlayEnabled: () => boolean;
|
|
13
14
|
/** Sets the flag and notifies subscribers; ungated, for tests and the public setter. */
|
|
14
15
|
readonly setDocumentPreviewOverlayEnabled: (enabled: boolean) => void;
|
|
16
|
+
/** Whether each capture screen logs its perf trace. */
|
|
17
|
+
readonly isPerfTraceEnabled: () => boolean;
|
|
18
|
+
/** Sets the flag; read when a capture screen opens. */
|
|
19
|
+
readonly setPerfTraceEnabled: (enabled: boolean) => void;
|
|
20
|
+
/** Where each capture attempt's perf report also goes, beside the log; null for nowhere. */
|
|
21
|
+
readonly perfTraceListener: () => ((report: CapturePerfReport) => void) | null;
|
|
22
|
+
readonly setPerfTraceListener: (listener: ((report: CapturePerfReport) => void) | null) => void;
|
|
15
23
|
readonly subscribe: (listener: Listener) => () => void;
|
|
16
24
|
};
|
|
17
25
|
/**
|
|
@@ -51,11 +59,26 @@ export declare const UseSmileIDDebug: {
|
|
|
51
59
|
readonly setDocumentDebugOverlaysEnabled: (enabled: boolean) => void;
|
|
52
60
|
/** Whether the document debug overlays are currently installed. */
|
|
53
61
|
readonly isDocumentDebugOverlaysEnabled: () => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Logs each capture's timings, one line per capture screen through
|
|
64
|
+
* `console.log`: when the screen appeared, asked the camera to start, the
|
|
65
|
+
* camera ran, its first frame, the first analysis, the capture and its files
|
|
66
|
+
* on disk, plus the camera's analysis and still timings. Release builds too,
|
|
67
|
+
* since that is where timings mean something; it logs no images or personal
|
|
68
|
+
* data. Read when a capture screen opens.
|
|
69
|
+
*/
|
|
70
|
+
readonly setPerfTraceEnabled: (enabled: boolean) => void;
|
|
71
|
+
/** Whether capture screens log their perf trace. */
|
|
72
|
+
readonly isPerfTraceEnabled: () => boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Also hands each capture attempt's {@link CapturePerfReport} to `listener`: its marks and
|
|
75
|
+
* timings, typed, and its log line, for a release build, whose `console.log` reaches no device
|
|
76
|
+
* log, or to forward the timings to your own analytics. Null stops it.
|
|
77
|
+
*/
|
|
78
|
+
readonly setPerfTraceListener: (listener: ((report: CapturePerfReport) => void) | null) => void;
|
|
54
79
|
};
|
|
55
80
|
/** Subscribes a component to the selfie preview overlay flag. */
|
|
56
81
|
export declare function useSelfiePreviewOverlayEnabled(): boolean;
|
|
57
82
|
/** Subscribes a component to the document overlays flag. */
|
|
58
83
|
export declare function useDocumentPreviewOverlayEnabled(): boolean;
|
|
59
|
-
/** Whether this is a dev build, where the debug overlays can switch on. @internal */
|
|
60
|
-
export declare function isDevBuild(): boolean;
|
|
61
84
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useSyncExternalStore as t}from"react";let n=!1,
|
|
1
|
+
"use strict";import{useSyncExternalStore as t}from"react";import{isDevelopmentBuild as i}from"../core/is_development_build";let n=!1,a=!1,s=!1,u=null;const r=new Set;export const UseSmileIDDebugHooks={isSelfiePreviewOverlayEnabled(){return n},setSelfiePreviewOverlayEnabled(e){n!==e&&(n=e,r.forEach(l=>l()))},isDocumentPreviewOverlayEnabled(){return a},setDocumentPreviewOverlayEnabled(e){a!==e&&(a=e,r.forEach(l=>l()))},isPerfTraceEnabled(){return s},setPerfTraceEnabled(e){s=e},perfTraceListener(){return u},setPerfTraceListener(e){u=e},subscribe(e){return r.add(e),()=>r.delete(e)}},UseSmileIDDebug={setSelfieDebugOverlaysEnabled(e){i()&&UseSmileIDDebugHooks.setSelfiePreviewOverlayEnabled(e)},isSelfieDebugOverlaysEnabled(){return UseSmileIDDebugHooks.isSelfiePreviewOverlayEnabled()},setDocumentDebugOverlaysEnabled(e){i()&&UseSmileIDDebugHooks.setDocumentPreviewOverlayEnabled(e)},isDocumentDebugOverlaysEnabled(){return UseSmileIDDebugHooks.isDocumentPreviewOverlayEnabled()},setPerfTraceEnabled(e){UseSmileIDDebugHooks.setPerfTraceEnabled(e)},isPerfTraceEnabled(){return UseSmileIDDebugHooks.isPerfTraceEnabled()},setPerfTraceListener(e){UseSmileIDDebugHooks.setPerfTraceListener(e)}};export function useSelfiePreviewOverlayEnabled(){return t(UseSmileIDDebugHooks.subscribe,UseSmileIDDebugHooks.isSelfiePreviewOverlayEnabled,UseSmileIDDebugHooks.isSelfiePreviewOverlayEnabled)}export function useDocumentPreviewOverlayEnabled(){return t(UseSmileIDDebugHooks.subscribe,UseSmileIDDebugHooks.isDocumentPreviewOverlayEnabled,UseSmileIDDebugHooks.isDocumentPreviewOverlayEnabled)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{jsx as i,jsxs as d}from"react/jsx-runtime";import{useId as
|
|
1
|
+
"use strict";import{jsx as i,jsxs as d}from"react/jsx-runtime";import{useId as I}from"react";import{Image as v,StyleSheet as n,View as o}from"react-native";import{useSafeAreaInsets as b}from"react-native-safe-area-context";import h,{ClipPath as S,Defs as y,Path as c,Rect as a}from"react-native-svg";import{DocumentPreviewDebugGeometry as s}from"./document_preview_debug_geometry";import{BORDER_RING_FILL as u,BOUNDARY_STROKE as m,HIDDEN_TODAY_DIM as P,PANEL_WIDTH as g,PlannedBoundary as _,VISIBLE_BOUNDARY_COLOR as f,debugPreviewStyles as w,rectPath as R,ringPath as D}from"./preview_debug_drawing";import{SelfiePreviewDebugHud as p}from"./use_smile_id_selfie_preview_debug_overlay";import{capturedImageUri as z}from"../presentation/components/helpers/captured_image_uri";export function UseSmileIDDocumentPreviewDebugOverlay(t){const r=b();return i(o,{pointerEvents:"box-none",style:n.absoluteFill,testID:"si_debug_document_preview_overlay",children:i(o,{style:[w.hudAnchor,{top:r.top+8}],children:i(p,{title:"DOCUMENT",children:i(x,{...t})})})})}export function DocumentPreviewHiddenRegionsInPlace(t){const r=`si_debug_card_clip_${I().replace(/:/g,"")}`,l=s.inPlace(t.imageSize,t.cardSize,t.borderFraction);if(!l)return null;const e={left:0,top:0,width:t.cardSize.width,height:t.cardSize.height};return d(h,{width:"100%",height:"100%",style:n.absoluteFill,testID:"si_debug_document_preview_in_place",children:[i(y,{children:i(S,{id:r,children:i(a,{x:0,y:0,width:e.width,height:e.height})})}),i(c,{d:D(l.frameRect,l.plannedInteriorRect),fill:u,fillRule:"evenodd",clipPath:`url(#${r})`}),i(_,{rect:l.plannedInteriorRect}),i(a,{x:e.left,y:e.top,width:e.width,height:e.height,fill:"none",stroke:f,strokeWidth:m})]})}function x(t){const r=t.imageSize?t.imageSize.width/t.imageSize.height:E,l={width:g,height:g/r},e=t.imageSize?s.panel(t.imageSize,t.cardSize,l,t.borderFraction):null;return d(o,{style:[w.panel,l],testID:"si_debug_document_preview_panel",children:[i(v,{source:{uri:z(t.uri)},resizeMode:"contain",style:n.absoluteFill}),e?d(h,{width:l.width,height:l.height,style:n.absoluteFill,testID:"si_debug_document_preview_panel_markings",children:[i(c,{d:`${R(e.frameRect)} ${R(e.visibleCardRect)}`,fill:P,fillRule:"evenodd"}),i(c,{d:D(e.frameRect,e.plannedInteriorRect),fill:u,fillRule:"evenodd"}),i(_,{rect:e.plannedInteriorRect}),i(a,{x:e.visibleCardRect.left,y:e.visibleCardRect.top,width:e.visibleCardRect.width,height:e.visibleCardRect.height,fill:"none",stroke:f,strokeWidth:m})]}):null]})}const E=1.586;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type DebugRect, type DebugSize } from "./selfie_preview_debug_geometry";
|
|
2
|
+
import { type DebugRect, type DebugSize, type SelfiePreviewPlacement } from "./selfie_preview_debug_geometry";
|
|
3
3
|
export type UseSmileIDSelfiePreviewDebugOverlayProps = {
|
|
4
4
|
/** Local file URI of the captured selfie the preview screen shows. */
|
|
5
5
|
readonly uri: string;
|
|
6
6
|
/** The laid-out oval box, in this overlay's coordinate space. */
|
|
7
7
|
readonly ovalRect: DebugRect;
|
|
8
|
+
/** How the preview places the selfie in `ovalRect`. */
|
|
9
|
+
readonly placement: SelfiePreviewPlacement;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Developer overlay for the post-capture selfie preview screen: shows which
|
|
@@ -38,6 +40,7 @@ export declare function UseSmileIDSelfiePreviewDebugOverlay(props: UseSmileIDSel
|
|
|
38
40
|
export declare function SelfiePreviewHiddenRegionsInPlace(props: {
|
|
39
41
|
readonly imageSize: DebugSize;
|
|
40
42
|
readonly ovalRect: DebugRect;
|
|
43
|
+
readonly placement: SelfiePreviewPlacement;
|
|
41
44
|
}): import("react").JSX.Element | null;
|
|
42
45
|
/**
|
|
43
46
|
* Markings over the full-frame panel: everything outside the user-visible
|
|
@@ -48,6 +51,7 @@ export declare function SelfiePreviewPanelMarkings(props: {
|
|
|
48
51
|
readonly imageSize: DebugSize;
|
|
49
52
|
readonly ovalSize: DebugSize;
|
|
50
53
|
readonly panelSize: DebugSize;
|
|
54
|
+
readonly placement: SelfiePreviewPlacement;
|
|
51
55
|
}): import("react").JSX.Element | null;
|
|
52
56
|
/**
|
|
53
57
|
* Collapsible heads-up display chrome: dark rounded background, the title
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useEffect as b,useId as w,useState as
|
|
1
|
+
"use strict";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useEffect as b,useId as w,useState as m}from"react";import{Image as D,Pressable as x,StyleSheet as d,Text as f,View as o}from"react-native";import{useSafeAreaInsets as p}from"react-native-safe-area-context";import g,{ClipPath as E,Defs as $,Ellipse as u,Path as h}from"react-native-svg";import{decodeUprightImageSize as A}from"../presentation/components/helpers/selfie_interior_crop";import{SelfiePreviewDebugGeometry as S}from"./selfie_preview_debug_geometry";import{BORDER_RING_FILL as _,BOUNDARY_STROKE as v,HIDDEN_TODAY_DIM as F,PANEL_WIDTH as R,PlannedBoundary as y,VISIBLE_BOUNDARY_COLOR as I,debugPreviewStyles as O,rectPath as T,ringPath as P}from"./preview_debug_drawing";import{capturedImageUri as L}from"../presentation/components/helpers/captured_image_uri";export function UseSmileIDSelfiePreviewDebugOverlay(e){const t=p(),[l,n]=m(null);return b(()=>{let c=!0;return A(e.uri).then(z=>{c&&n(z)}),()=>{c=!1}},[e.uri]),a(o,{pointerEvents:"box-none",style:d.absoluteFill,testID:"si_debug_selfie_preview_overlay",children:[l?i(o,{pointerEvents:"none",style:d.absoluteFill,children:i(SelfiePreviewHiddenRegionsInPlace,{imageSize:l,ovalRect:e.ovalRect,placement:e.placement})}):null,i(o,{style:[r.hudAnchor,{top:t.top+8}],children:i(SelfiePreviewDebugHud,{title:"FRAME",children:i(k,{uri:e.uri,imageSize:l,ovalSize:e.ovalRect,placement:e.placement})})})]})}export function SelfiePreviewHiddenRegionsInPlace(e){const t=`si_debug_oval_clip_${w().replace(/:/g,"")}`,l=S.inPlace(e.imageSize,e.ovalRect,e.placement);if(!l)return null;const n=e.ovalRect;return a(g,{width:"100%",height:"100%",testID:"si_debug_selfie_preview_in_place",children:[i($,{children:i(E,{id:t,children:i(u,{...s(n)})})}),i(h,{d:P(l.frameRect,l.plannedInteriorRect),fill:_,fillRule:"evenodd",clipPath:`url(#${t})`}),i(y,{rect:l.plannedInteriorRect}),i(u,{...s(n),fill:"none",stroke:I,strokeWidth:v})]})}export function SelfiePreviewPanelMarkings(e){const t=S.panel(e.imageSize,e.ovalSize,e.panelSize,e.placement);if(!t)return null;const l=t.visibleOvalRect;return a(g,{width:e.panelSize.width,height:e.panelSize.height,style:d.absoluteFill,testID:"si_debug_selfie_preview_panel_markings",children:[i(h,{d:`${T(t.frameRect)} ${N(l)}`,fill:F,fillRule:"evenodd"}),i(h,{d:P(t.frameRect,t.plannedInteriorRect),fill:_,fillRule:"evenodd"}),i(y,{rect:t.plannedInteriorRect}),i(u,{...s(l),fill:"none",stroke:I,strokeWidth:v})]})}export function SelfiePreviewDebugHud(e){const[t,l]=m(!0);return a(o,{style:r.hud,children:[a(o,{style:r.hudHeader,children:[t?i(f,{style:r.hudText,children:e.title}):null,i(x,{accessibilityRole:"button",testID:"si_debug_hud_toggle",onPress:()=>l(n=>!n),hitSlop:8,style:r.hudChevron,children:i(f,{style:r.hudText,children:t?"\u25B2":"\u25BC"})})]}),t?e.children:null]})}function k(e){const t=e.imageSize?e.imageSize.width/e.imageSize.height:U,l={width:R,height:R/t};return a(o,{style:[r.panel,l],testID:"si_debug_selfie_preview_panel",children:[i(D,{source:{uri:L(e.uri)},resizeMode:"contain",style:d.absoluteFill}),e.imageSize?i(SelfiePreviewPanelMarkings,{imageSize:e.imageSize,ovalSize:e.ovalSize,placement:e.placement,panelSize:l}):null]})}function s(e){return{cx:e.left+e.width/2,cy:e.top+e.height/2,rx:e.width/2,ry:e.height/2}}function N(e){const{cx:t,cy:l,rx:n,ry:c}=s(e);return`M${t-n},${l} a${n},${c} 0 1,0 ${2*n},0 a${n},${c} 0 1,0 ${-2*n},0 Z`}const U=3/4,r=O;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,8 @@ export { JobType, jobTypeFromValue, requiresDocument, requiresSelfie, type JobTy
|
|
|
47
47
|
export { FlowStep } from "./core/models/flow_step";
|
|
48
48
|
export { DocumentType, type DocumentOrientation, type GenericDocumentArgs, } from "./core/models/document_type";
|
|
49
49
|
export { DEFAULT_ACTIVATE_MANUAL_AFTER_MS, DocumentCaptureMode, type AutoCaptureWithManualFallbackArgs, } from "./core/models/document_capture_mode";
|
|
50
|
-
export { cancelled, failure, success, type UseSmileIDResult, } from "./core/models/result";
|
|
50
|
+
export { cancelled, captured, failure, success, type UseSmileIDResult, } from "./core/models/result";
|
|
51
|
+
export type { CapturedJob } from "./data/model/captured_job";
|
|
51
52
|
export type { ConfigOptions } from "./core/models/config";
|
|
52
53
|
export { GlobalPrivacyControl, GLOBAL_PRIVACY_CONTROL_WIRE_KEY, globalPrivacyControlFromWire, } from "./core/models/global_privacy_control";
|
|
53
54
|
export { LogLevel } from "./core/models/network_config";
|
|
@@ -118,3 +119,5 @@ export { UseSmileIDProcessingScreen, type ProcessingState, type UseSmileIDProces
|
|
|
118
119
|
export { ForceMaxBrightness } from "./presentation/utils/force_max_brightness";
|
|
119
120
|
export type { ForceMaxBrightnessProps } from "./presentation/utils/force_max_brightness";
|
|
120
121
|
export { UseSmileIDDebug } from "./debug/use_smile_id_debug";
|
|
122
|
+
export { CapturePerfMark } from "./core/perf/capture_perf_trace";
|
|
123
|
+
export type { CapturePerfOutcome, CapturePerfReport, CapturePerfStat, } from "./core/perf/capture_perf_trace";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{UseSmileIDBuilder}from"./presentation/flow/dsl/use_smile_id_builder";export{UseSmileIDFlowBuilder}from"./presentation/flow/dsl/use_smile_id_flow_builder";export{ValidationState}from"./presentation/flow/validation/validation_state";export{AgentModeWithEnhancedLivenessException,BuilderValidationException,isNetworkErrorCode,isRetryableErrorCode,ConsentDeniedException,DuplicateScreenTypeException,EmptyScreensBlockException,InvalidConsentConfigException,InvalidConsentInformationException,InvalidDocumentCaptureConfigException,InvalidFieldValueException,InvalidJobTypeScreenConfigException,InvalidMissingCaptureTypeException,InvalidScreenOrderException,InvalidSelfieCaptureConfigException,LivenessFrameCountException,IssueSeverity,MissingCaptureForPreviewException,MissingJobTypeException,MissingMLConfigurationBlockException,MissingNetworkConfigurationBlockException,MissingPartnerConfigException,MissingRequiredFieldException,ProcessingCancelledException,UseSmileIDAttestationException,UseSmileIDBuilderException,UseSmileIDCameraException,UseSmileIDCameraSurfaceException,UseSmileIDErrorCode,UseSmileIDException,UseSmileIDGeneralException,UnusedJobParamsException,UseSmileIDNetworkException,UseSmileIDValidationException}from"./core/exception";export{UseSmileIDConfigBuilder}from"./presentation/flow/dsl/builder/config_builder";export{ThemeConfigBuilder}from"./presentation/flow/dsl/builder/theme_builder";export{UseSmileIDNetworkBuilder}from"./data/dsl/use_smile_id_network_builder";export{ConfigBuilder,LoggingConfigBuilder,PartnerConfigBuilder}from"./data/dsl/builder/config_builder";export{TimeoutConfigBuilder}from"./data/dsl/builder/timeout_config_builder";export{CacheConfigBuilder}from"./data/dsl/builder/cache_config_builder";export{RetryConfigBuilder,RetryStrategy}from"./data/dsl/builder/retry_config_builder";export{InterceptorConfigBuilder,LoggingInterceptorBuilder}from"./data/dsl/builder/interceptor_config_builder";export{AnalyzerRegistryBuilder,DocumentAnalyzerScope,FaceAnalyzerScope,UseSmileIDMLBuilder}from"./presentation/flow/dsl/builder/ml_builder";export{CaptureConfigBuilder,CaptureType,ConsentConfigBuilder,DocumentCaptureConfigBuilder,InstructionsConfigBuilder,PreviewConfigBuilder,ProcessingConfigBuilder,ScreensBuilder,SelfieCaptureConfigBuilder}from"./presentation/flow/dsl/builder/screens_builder";export{FlowNavigationManager}from"./presentation/flow/flow_navigation_manager";export{FlowNavigationProvider,useFlowNavigation}from"./presentation/flow/flow_navigation_context";export{UseSmileIDOrchestratedScreenHost}from"./presentation/flow/screen/use_smile_id_orchestrated_screen_host";export{OrchestratedInstructionsScreen}from"./presentation/flow/screen/orchestrated_instructions_screen";export{OrchestratedConsentScreen}from"./presentation/flow/screen/orchestrated_consent_screen";export{OrchestratedCaptureScreen}from"./presentation/flow/screen/orchestrated_capture_screen";export{OrchestratedPreviewScreen}from"./presentation/flow/screen/orchestrated_preview_screen";export{OrchestratedProcessingScreen}from"./presentation/flow/screen/orchestrated_processing_screen";export{UseSmileIDCrashReporting}from"@smileid/usesmileid_bridge";export{DocumentSide}from"@smileid/usesmileid_bridge";export{UseSmileIDLocalizations}from"./l10n/use_smile_id_localizations";export{UseSmileIDLocalizationsProvider,useStableLocalizations,useUseSmileIDLocalizations}from"./l10n/use_smile_id_localizations_provider";export{enStrings}from"./l10n/strings_en";export{UseSmileIDKameraCameraSystem}from"./camera/use_smile_id_kamera_camera_system";export{UseSmileIDKameraPreview}from"./camera/use_smile_id_kamera_preview";export{useSmileIDFrameStream}from"./camera/use_smile_id_frame_stream";export{CameraDefaults}from"./camera/camera_defaults";export{CameraLens}from"./camera/camera_lens";export{FocusStates}from"./camera/focus_state";export{getCameraPermissionStatus,requestCameraPermission}from"./camera/camera_permissions";export{JobType,jobTypeFromValue,requiresDocument,requiresSelfie}from"./core/models/job_type";export{FlowStep}from"./core/models/flow_step";export{DocumentType}from"./core/models/document_type";export{DEFAULT_ACTIVATE_MANUAL_AFTER_MS,DocumentCaptureMode}from"./core/models/document_capture_mode";export{cancelled,failure,success}from"./core/models/result";export{GlobalPrivacyControl,GLOBAL_PRIVACY_CONTROL_WIRE_KEY,globalPrivacyControlFromWire}from"./core/models/global_privacy_control";export{LogLevel}from"./core/models/network_config";export{RESIDENCY_ID_TYPE}from"./core/models/params";export{UseSmileIDAnalyticsEventTypes,UseSmileIDAnalyticsParamKeys,UseSmileIDAnalyticsReasons,UseSmileIDAnalyticsScreenNames}from"./presentation/flow/analytics/use_smile_id_analytics_event";export{analyticsEventKind}from"./presentation/flow/analytics/use_smile_id_analytics_event_kind";export{decodeSmileIDToken}from"./data/util/use_smile_id_token_decoder";export{numSamplesOverride}from"./data/model/sdk_config";export{resolveDimensions,resolveJpegQuality}from"./data/model/sdk_config_capture";export{SdkConfigSource}from"./data/model/sdk_config_source";export{defaultDarkTheme,defaultLightTheme,DEFAULT_FONT_FAMILY,DM_SANS_FONT_NAMES,resolveFontFamily,typographyWithFontFamily}from"./presentation/theme/theme";export{UseSmileIDThemeProvider,useUseSmileIDTheme}from"./presentation/theme/theme_context";export{loadUseSmileIDFonts,useUseSmileIDFonts}from"./presentation/theme/use_use_smile_id_fonts";export{UseSmileIDButton}from"./presentation/components/use_smile_id_button";export{UseSmileIDBackButton}from"./presentation/components/use_smile_id_back_button";export{UseSmileIDRoundedCheckbox}from"./presentation/components/use_smile_id_rounded_checkbox";export{UseSmileIDAttribution}from"./presentation/components/use_smile_id_attribution";export{UseSmileIDPartnerIcon}from"./presentation/components/use_smile_id_partner_icon";export{StatusIndicatorState}from"./presentation/components/status_indicator_state";export{UseSmileIDStatusIndicator}from"./presentation/components/use_smile_id_status_indicator";export{UseSmileIDLoadingIndicator}from"./presentation/components/use_smile_id_loading_indicator";export{UseSmileIDExpandableIcon}from"./presentation/components/use_smile_id_expandable_icon";export{UseSmileIDContentCard}from"./presentation/components/use_smile_id_content_card";export{FaceOvalDefaults,computeFaceOvalGeometry}from"./presentation/components/face_oval_defaults";export{UseSmileIDOvalBorderPalette}from"./presentation/components/use_smile_id_oval_border_palette";export{UseSmileIDMotion}from"./presentation/theme/use_smile_id_motion";export{UseSmileIDFaceOverlay}from"./presentation/components/use_smile_id_face_overlay";export{UseSmileIDFaceOvalImage}from"./presentation/components/use_smile_id_face_oval_image";export{UseSmileIDCapturedImageOval}from"./presentation/components/use_smile_id_captured_image_oval";export{UseSmileIDCardSurface}from"./presentation/components/use_smile_id_card_surface";export{computeScaledOvalGeometry}from"./presentation/components/helpers/scaled_oval_geometry";export{UseSmileIDProcessingCenterIndicator}from"./presentation/components/use_smile_id_processing_center_indicator";export{UseSmileIDDocumentOverlay}from"./presentation/components/use_smile_id_document_overlay";export{UseSmileIDInstructionsHero}from"./presentation/components/use_smile_id_instructions_hero";export{UseSmileIDGuidelineThumbnail}from"./presentation/components/use_smile_id_guideline_thumbnail";export{SELFIE_GUIDELINES,SELFIE_HERO_ANIMATION,ESS_HERO_ANIMATION}from"./presentation/flow/model/instructions_defaults";export{UseSmileIDConsentRow}from"./presentation/components/use_smile_id_consent_row";export{UseSmileIDConfirmationButtons}from"./presentation/components/use_smile_id_confirmation_buttons";export{UseSmileIDLoadingContent}from"./presentation/components/use_smile_id_loading_content";export{UseSmileIDSuccessContent}from"./presentation/components/use_smile_id_success_content";export{UseSmileIDFailedContent}from"./presentation/components/use_smile_id_failed_content";export{UseSmileIDLearnMoreContent}from"./presentation/components/use_smile_id_learn_more_content";export{UseSmileIDEnhancedSmartSelfieFullAnimation}from"./presentation/components/use_smile_id_enhanced_smart_selfie_full_animation";export{UseSmileIDEnhancedSmartSelfieDirectionAnimation}from"./presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation";export{EnhancedSmartSelfieAnimationFrames,ENHANCED_SMART_SELFIE_TOTAL_FRAMES,ENHANCED_SMART_SELFIE_FRAME_RATE}from"./presentation/components/helpers/enhanced_smart_selfie_animation_frames";export{UseSmileIDCaptureContent}from"./presentation/components/use_smile_id_capture_content";export{UseSmileIDCaptureInstructionAnimation}from"./presentation/components/use_smile_id_capture_instruction_animation";export{captureInstructionAnimationSpec}from"./presentation/components/helpers/capture_instruction_animation_spec";export{mapCaptureUiState,mapSelfieUiState,mapDocumentUiState,preCaptureUiState,scannedUiState,scannedDocumentUiState,withEnhancedLivenessPolicy}from"./presentation/screen/helpers/capture_ui_state";export{resolveFeedbackCopy,selfieFeedbackKeyFor,documentFeedbackKeyFor}from"./presentation/screen/helpers/capture_screen_helpers";export{UseSmileIDFeedbackDebouncer}from"./presentation/screen/helpers/feedback_debouncer";export{UseSmileIDOverlayState,OVERLAY_STATE_COUNT,isDirectional}from"./presentation/state/use_smile_id_overlay_state";export{HEAD_TURN_DIRECTIONS}from"./core/models/head_turn_direction";export{UseSmileIDCaptureScreen}from"./presentation/screen/use_smile_id_capture_screen";export{UseSmileIDConsentScreen}from"./presentation/screen/use_smile_id_consent_screen";export{UseSmileIDInstructionsScreen}from"./presentation/screen/use_smile_id_instructions_screen";export{UseSmileIDDocumentBackInstructions}from"./presentation/screen/use_smile_id_document_back_instructions";export{UseSmileIDPreviewScreen}from"./presentation/screen/use_smile_id_preview_screen";export{UseSmileIDProcessingScreen}from"./presentation/screen/use_smile_id_processing_screen";export{ForceMaxBrightness}from"./presentation/utils/force_max_brightness";export{UseSmileIDDebug}from"./debug/use_smile_id_debug";
|
|
1
|
+
"use strict";export{UseSmileIDBuilder}from"./presentation/flow/dsl/use_smile_id_builder";export{UseSmileIDFlowBuilder}from"./presentation/flow/dsl/use_smile_id_flow_builder";export{ValidationState}from"./presentation/flow/validation/validation_state";export{AgentModeWithEnhancedLivenessException,BuilderValidationException,isNetworkErrorCode,isRetryableErrorCode,ConsentDeniedException,DuplicateScreenTypeException,EmptyScreensBlockException,InvalidConsentConfigException,InvalidConsentInformationException,InvalidDocumentCaptureConfigException,InvalidFieldValueException,InvalidJobTypeScreenConfigException,InvalidMissingCaptureTypeException,InvalidScreenOrderException,InvalidSelfieCaptureConfigException,LivenessFrameCountException,IssueSeverity,MissingCaptureForPreviewException,MissingJobTypeException,MissingMLConfigurationBlockException,MissingNetworkConfigurationBlockException,MissingPartnerConfigException,MissingRequiredFieldException,ProcessingCancelledException,UseSmileIDAttestationException,UseSmileIDBuilderException,UseSmileIDCameraException,UseSmileIDCameraSurfaceException,UseSmileIDErrorCode,UseSmileIDException,UseSmileIDGeneralException,UnusedJobParamsException,UseSmileIDNetworkException,UseSmileIDValidationException}from"./core/exception";export{UseSmileIDConfigBuilder}from"./presentation/flow/dsl/builder/config_builder";export{ThemeConfigBuilder}from"./presentation/flow/dsl/builder/theme_builder";export{UseSmileIDNetworkBuilder}from"./data/dsl/use_smile_id_network_builder";export{ConfigBuilder,LoggingConfigBuilder,PartnerConfigBuilder}from"./data/dsl/builder/config_builder";export{TimeoutConfigBuilder}from"./data/dsl/builder/timeout_config_builder";export{CacheConfigBuilder}from"./data/dsl/builder/cache_config_builder";export{RetryConfigBuilder,RetryStrategy}from"./data/dsl/builder/retry_config_builder";export{InterceptorConfigBuilder,LoggingInterceptorBuilder}from"./data/dsl/builder/interceptor_config_builder";export{AnalyzerRegistryBuilder,DocumentAnalyzerScope,FaceAnalyzerScope,UseSmileIDMLBuilder}from"./presentation/flow/dsl/builder/ml_builder";export{CaptureConfigBuilder,CaptureType,ConsentConfigBuilder,DocumentCaptureConfigBuilder,InstructionsConfigBuilder,PreviewConfigBuilder,ProcessingConfigBuilder,ScreensBuilder,SelfieCaptureConfigBuilder}from"./presentation/flow/dsl/builder/screens_builder";export{FlowNavigationManager}from"./presentation/flow/flow_navigation_manager";export{FlowNavigationProvider,useFlowNavigation}from"./presentation/flow/flow_navigation_context";export{UseSmileIDOrchestratedScreenHost}from"./presentation/flow/screen/use_smile_id_orchestrated_screen_host";export{OrchestratedInstructionsScreen}from"./presentation/flow/screen/orchestrated_instructions_screen";export{OrchestratedConsentScreen}from"./presentation/flow/screen/orchestrated_consent_screen";export{OrchestratedCaptureScreen}from"./presentation/flow/screen/orchestrated_capture_screen";export{OrchestratedPreviewScreen}from"./presentation/flow/screen/orchestrated_preview_screen";export{OrchestratedProcessingScreen}from"./presentation/flow/screen/orchestrated_processing_screen";export{UseSmileIDCrashReporting}from"@smileid/usesmileid_bridge";export{DocumentSide}from"@smileid/usesmileid_bridge";export{UseSmileIDLocalizations}from"./l10n/use_smile_id_localizations";export{UseSmileIDLocalizationsProvider,useStableLocalizations,useUseSmileIDLocalizations}from"./l10n/use_smile_id_localizations_provider";export{enStrings}from"./l10n/strings_en";export{UseSmileIDKameraCameraSystem}from"./camera/use_smile_id_kamera_camera_system";export{UseSmileIDKameraPreview}from"./camera/use_smile_id_kamera_preview";export{useSmileIDFrameStream}from"./camera/use_smile_id_frame_stream";export{CameraDefaults}from"./camera/camera_defaults";export{CameraLens}from"./camera/camera_lens";export{FocusStates}from"./camera/focus_state";export{getCameraPermissionStatus,requestCameraPermission}from"./camera/camera_permissions";export{JobType,jobTypeFromValue,requiresDocument,requiresSelfie}from"./core/models/job_type";export{FlowStep}from"./core/models/flow_step";export{DocumentType}from"./core/models/document_type";export{DEFAULT_ACTIVATE_MANUAL_AFTER_MS,DocumentCaptureMode}from"./core/models/document_capture_mode";export{cancelled,captured,failure,success}from"./core/models/result";export{GlobalPrivacyControl,GLOBAL_PRIVACY_CONTROL_WIRE_KEY,globalPrivacyControlFromWire}from"./core/models/global_privacy_control";export{LogLevel}from"./core/models/network_config";export{RESIDENCY_ID_TYPE}from"./core/models/params";export{UseSmileIDAnalyticsEventTypes,UseSmileIDAnalyticsParamKeys,UseSmileIDAnalyticsReasons,UseSmileIDAnalyticsScreenNames}from"./presentation/flow/analytics/use_smile_id_analytics_event";export{analyticsEventKind}from"./presentation/flow/analytics/use_smile_id_analytics_event_kind";export{decodeSmileIDToken}from"./data/util/use_smile_id_token_decoder";export{numSamplesOverride}from"./data/model/sdk_config";export{resolveDimensions,resolveJpegQuality}from"./data/model/sdk_config_capture";export{SdkConfigSource}from"./data/model/sdk_config_source";export{defaultDarkTheme,defaultLightTheme,DEFAULT_FONT_FAMILY,DM_SANS_FONT_NAMES,resolveFontFamily,typographyWithFontFamily}from"./presentation/theme/theme";export{UseSmileIDThemeProvider,useUseSmileIDTheme}from"./presentation/theme/theme_context";export{loadUseSmileIDFonts,useUseSmileIDFonts}from"./presentation/theme/use_use_smile_id_fonts";export{UseSmileIDButton}from"./presentation/components/use_smile_id_button";export{UseSmileIDBackButton}from"./presentation/components/use_smile_id_back_button";export{UseSmileIDRoundedCheckbox}from"./presentation/components/use_smile_id_rounded_checkbox";export{UseSmileIDAttribution}from"./presentation/components/use_smile_id_attribution";export{UseSmileIDPartnerIcon}from"./presentation/components/use_smile_id_partner_icon";export{StatusIndicatorState}from"./presentation/components/status_indicator_state";export{UseSmileIDStatusIndicator}from"./presentation/components/use_smile_id_status_indicator";export{UseSmileIDLoadingIndicator}from"./presentation/components/use_smile_id_loading_indicator";export{UseSmileIDExpandableIcon}from"./presentation/components/use_smile_id_expandable_icon";export{UseSmileIDContentCard}from"./presentation/components/use_smile_id_content_card";export{FaceOvalDefaults,computeFaceOvalGeometry}from"./presentation/components/face_oval_defaults";export{UseSmileIDOvalBorderPalette}from"./presentation/components/use_smile_id_oval_border_palette";export{UseSmileIDMotion}from"./presentation/theme/use_smile_id_motion";export{UseSmileIDFaceOverlay}from"./presentation/components/use_smile_id_face_overlay";export{UseSmileIDFaceOvalImage}from"./presentation/components/use_smile_id_face_oval_image";export{UseSmileIDCapturedImageOval}from"./presentation/components/use_smile_id_captured_image_oval";export{UseSmileIDCardSurface}from"./presentation/components/use_smile_id_card_surface";export{computeScaledOvalGeometry}from"./presentation/components/helpers/scaled_oval_geometry";export{UseSmileIDProcessingCenterIndicator}from"./presentation/components/use_smile_id_processing_center_indicator";export{UseSmileIDDocumentOverlay}from"./presentation/components/use_smile_id_document_overlay";export{UseSmileIDInstructionsHero}from"./presentation/components/use_smile_id_instructions_hero";export{UseSmileIDGuidelineThumbnail}from"./presentation/components/use_smile_id_guideline_thumbnail";export{SELFIE_GUIDELINES,SELFIE_HERO_ANIMATION,ESS_HERO_ANIMATION}from"./presentation/flow/model/instructions_defaults";export{UseSmileIDConsentRow}from"./presentation/components/use_smile_id_consent_row";export{UseSmileIDConfirmationButtons}from"./presentation/components/use_smile_id_confirmation_buttons";export{UseSmileIDLoadingContent}from"./presentation/components/use_smile_id_loading_content";export{UseSmileIDSuccessContent}from"./presentation/components/use_smile_id_success_content";export{UseSmileIDFailedContent}from"./presentation/components/use_smile_id_failed_content";export{UseSmileIDLearnMoreContent}from"./presentation/components/use_smile_id_learn_more_content";export{UseSmileIDEnhancedSmartSelfieFullAnimation}from"./presentation/components/use_smile_id_enhanced_smart_selfie_full_animation";export{UseSmileIDEnhancedSmartSelfieDirectionAnimation}from"./presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation";export{EnhancedSmartSelfieAnimationFrames,ENHANCED_SMART_SELFIE_TOTAL_FRAMES,ENHANCED_SMART_SELFIE_FRAME_RATE}from"./presentation/components/helpers/enhanced_smart_selfie_animation_frames";export{UseSmileIDCaptureContent}from"./presentation/components/use_smile_id_capture_content";export{UseSmileIDCaptureInstructionAnimation}from"./presentation/components/use_smile_id_capture_instruction_animation";export{captureInstructionAnimationSpec}from"./presentation/components/helpers/capture_instruction_animation_spec";export{mapCaptureUiState,mapSelfieUiState,mapDocumentUiState,preCaptureUiState,scannedUiState,scannedDocumentUiState,withEnhancedLivenessPolicy}from"./presentation/screen/helpers/capture_ui_state";export{resolveFeedbackCopy,selfieFeedbackKeyFor,documentFeedbackKeyFor}from"./presentation/screen/helpers/capture_screen_helpers";export{UseSmileIDFeedbackDebouncer}from"./presentation/screen/helpers/feedback_debouncer";export{UseSmileIDOverlayState,OVERLAY_STATE_COUNT,isDirectional}from"./presentation/state/use_smile_id_overlay_state";export{HEAD_TURN_DIRECTIONS}from"./core/models/head_turn_direction";export{UseSmileIDCaptureScreen}from"./presentation/screen/use_smile_id_capture_screen";export{UseSmileIDConsentScreen}from"./presentation/screen/use_smile_id_consent_screen";export{UseSmileIDInstructionsScreen}from"./presentation/screen/use_smile_id_instructions_screen";export{UseSmileIDDocumentBackInstructions}from"./presentation/screen/use_smile_id_document_back_instructions";export{UseSmileIDPreviewScreen}from"./presentation/screen/use_smile_id_preview_screen";export{UseSmileIDProcessingScreen}from"./presentation/screen/use_smile_id_processing_screen";export{ForceMaxBrightness}from"./presentation/utils/force_max_brightness";export{UseSmileIDDebug}from"./debug/use_smile_id_debug";export{CapturePerfMark}from"./core/perf/capture_perf_trace";
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
export declare const enStrings: {
|
|
9
9
|
readonly si_selfie_capture_complete: "Selfie capture is complete";
|
|
10
10
|
readonly si_capturing: "Capturing…";
|
|
11
|
-
readonly si_selfie_capture_timeout: "Reached the set timeout";
|
|
12
11
|
readonly si_selfie_capture_unsatisfied: "Some requirements have not been met for selfie capture";
|
|
13
12
|
readonly si_label_continue: "Continue";
|
|
14
13
|
readonly si_consent_title: "{partnerName} would like to verify your identity using Smile ID.";
|
|
@@ -53,7 +52,6 @@ export declare const enStrings: {
|
|
|
53
52
|
readonly si_capture_move_right: "Move your device to the right";
|
|
54
53
|
readonly si_capture_move_higher: "Move your device higher";
|
|
55
54
|
readonly si_capture_move_lower: "Move your device lower";
|
|
56
|
-
readonly si_capture_ready: "Place your head in the frame and press Start Capture to proceed";
|
|
57
55
|
readonly si_capture_low_light: "Move to a well lit environment";
|
|
58
56
|
readonly si_capture_rotate_device: "Please hold your device upright";
|
|
59
57
|
readonly si_capture_smile: "Please smile…";
|
|
@@ -114,11 +112,13 @@ export declare const enStrings: {
|
|
|
114
112
|
readonly si_document_capturing: "Capturing document…";
|
|
115
113
|
readonly si_document_capture_complete: "Document captured";
|
|
116
114
|
readonly si_document_capture_unsatisfied: "Document lost. Try again.";
|
|
117
|
-
readonly si_document_capture_timeout: "Capture timed out. Try again.";
|
|
118
115
|
readonly si_document_gallery_image_too_small: "Selected image is too small. Choose a higher-resolution photo.";
|
|
119
116
|
readonly si_document_gallery_image_failed: "Couldn't load the selected image. Try another.";
|
|
120
117
|
readonly si_capture_button_document: "Capture Document";
|
|
121
118
|
readonly si_document_flip_title: "Flip your {id_type}";
|
|
119
|
+
readonly si_document_type_passport: "Passport";
|
|
120
|
+
readonly si_document_type_green_book: "Green Book";
|
|
121
|
+
readonly si_document_type_generic: "Document";
|
|
122
122
|
readonly si_document_capture_back: "Capture Back of ID";
|
|
123
123
|
readonly si_document_skip_back: "Skip";
|
|
124
124
|
readonly si_document_guideline_good: "Good";
|
package/dist/l10n/strings_en.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";export const enStrings={si_selfie_capture_complete:"Selfie capture is complete",si_capturing:"Capturing\u2026",
|
|
2
|
-
Do not close or refresh this page`,si_processing_success_title:"Submission Complete",si_processing_success_message:"Thank you for your submission. We are currently verifying your details.",si_processing_failed_title:"Submission Failed",si_processing_failed_message:"Reasons for failure",si_processing_error_no_connection:"No internet connection.",si_processing_error_generic:"Something went wrong. Try again.",si_processing_error_retry_later:"Try again in a moment.",si_processing_error_camera_permission:"Allow camera access in your device settings.",si_processing_error_unavailable:"Something went wrong. Contact support.",si_processing_retry:"Retry",si_processing_exit:"Exit",si_accessibility_capture_progress:"Capture progress",si_cd_back:"Back",si_cd_captured_image:"Captured image",si_cd_success:"Success",si_cd_failure:"Failure",si_cd_powered_by_smile_id:"Powered by Smile ID",si_cd_add:"Add",si_cd_close:"Close",si_cd_document_capture_shutter:"Capture document",si_cd_document_gallery:"Upload document from gallery",si_cd_checkbox:"Checkbox",si_cd_checkbox_checked:"Checked",si_cd_checkbox_unchecked:"Unchecked",si_cd_expand:"Expand",si_cd_expanded:"Expanded",si_cd_collapsed:"Collapsed",si_cd_smile_id:"Smile ID",si_camera_error_title:"Camera error",si_camera_error_body:"The camera is unavailable. Try again.",si_label_ok:"OK",si_document_center:"Centre the document in the frame",si_document_too_far:"Move closer to the document",si_document_too_close:"Move farther from the document",si_document_hold_still:"Hold still",si_doc_v_capture_directive_wrong_aspect_ratio:"Match the document to the outline",si_document_initial_instruction:"Align document in frame",si_document_ready:"Align document in frame and press capture to proceed",si_document_capturing:"Capturing document\u2026",si_document_capture_complete:"Document captured",si_document_capture_unsatisfied:"Document lost. Try again.",
|
|
1
|
+
"use strict";export const enStrings={si_selfie_capture_complete:"Selfie capture is complete",si_capturing:"Capturing\u2026",si_selfie_capture_unsatisfied:"Some requirements have not been met for selfie capture",si_label_continue:"Continue",si_consent_title:"{partnerName} would like to verify your identity using Smile ID.",si_consent_subtitle:"By selecting {allow}, you consent to {smile_id} collecting and processing your personal data for the purpose of providing identity verification and fraud prevention services, and securely sharing the results with {partner}.",si_consent_subtitle_smile_id:"Smile ID",si_consent_processing:"This may include processing:",si_consent_contact:"Contact Information",si_consent_personal:"Personal Information",si_consent_biometric:"Biometric Data and Identification Documents",si_consent_device:"Device Information",si_consent_consent:"I consent to my identity information and related data being shared with service providers to prevent fraud and securely process this transaction.",si_consent_allow:"Allow",si_consent_deny:"Deny",si_consent_learn_more:"Learn more",si_consent_learn_more_description:"{smile_id} and {partner} process your personal and biometric data to verify your identity and prevent fraud. We retain your data for {retention} to meet legal obligations. We may share data with specific partners to complete this check.",si_consent_learn_more_description_smile_id:"Smile ID",si_consent_learn_more_description_retention:"5 years",si_consent_learn_more_dsar_prefix:"You can withdraw consent, access your data, or exercise your rights at our ",si_consent_learn_more_dsar_link:"DSAR page",si_consent_learn_more_privacy_prefix:"Full details are in the ",si_consent_learn_more_privacy_smile_link:"Smile ID",si_consent_learn_more_privacy_and:" and ",si_consent_learn_more_privacy_partner_link:"{partnerName}",si_consent_learn_more_privacy_suffix:" Privacy Policies.",si_instructions_title_prefix:"Get ready to capture your",si_instructions_emphasis_selfie:"selfie",si_instructions_emphasis_visa:"Visa",si_instructions_capture_guidelines:"Capture Guidelines",si_instructions_guideline_good:"Good",si_instructions_guideline_accessories:"Accessories",si_instructions_guideline_multiple_faces:"Multiple Faces",si_instructions_guideline_poor_lighting:"Poor Lighting",si_cd_guideline_allowed:"Allowed",si_cd_guideline_blocked:"Not allowed",si_instructions_next:"Next",si_start_capture_instruction:"Place your head in the frame and press Start Capture to proceed",si_capture_initial_instruction:"Centre your face in the frame and follow the instruction on the screen",si_capture_too_close:"Move your device away from your face",si_capture_too_far:"Move your device closer to your face",si_capture_center_face:"Centre your face within the oval frame",si_capture_move_left:"Move your device to the left",si_capture_move_right:"Move your device to the right",si_capture_move_higher:"Move your device higher",si_capture_move_lower:"Move your device lower",si_capture_low_light:"Move to a well lit environment",si_capture_rotate_device:"Please hold your device upright",si_capture_smile:"Please smile\u2026",si_capture_start_button:"Start Capture",si_capture_warning_text:"Avoid poor lighting, accessories, or looking away as this may lead to rejection of your selfie.",si_capture_hold_steady:"Hold still\u2026",si_capture_timeout:"Capture timed out. Try again.",si_capture_failed:"Capture failed. Please try again.",si_capture_camera_unavailable:"No camera frames received. Close other apps using the camera, then try again.",si_capture_adjusting:"Adjusting\u2026",si_capture_bright_light:"Please move away from direct light",si_preview_title:"Confirm image quality",si_preview_subtitle:"Make sure that the image is clear.",si_preview_retake:"Retake",si_preview_confirm:"Confirm",si_preview_accessibility_image:"Captured image. Review it, then tap Confirm to continue or Retake to capture again.",si_preview_accessibility_retake:"Retake",si_processing_submitting:"Submitting\u2026",si_processing_submitting_subtitle:`This might take a moment\u2026
|
|
2
|
+
Do not close or refresh this page`,si_processing_success_title:"Submission Complete",si_processing_success_message:"Thank you for your submission. We are currently verifying your details.",si_processing_failed_title:"Submission Failed",si_processing_failed_message:"Reasons for failure",si_processing_error_no_connection:"No internet connection.",si_processing_error_generic:"Something went wrong. Try again.",si_processing_error_retry_later:"Try again in a moment.",si_processing_error_camera_permission:"Allow camera access in your device settings.",si_processing_error_unavailable:"Something went wrong. Contact support.",si_processing_retry:"Retry",si_processing_exit:"Exit",si_accessibility_capture_progress:"Capture progress",si_cd_back:"Back",si_cd_captured_image:"Captured image",si_cd_success:"Success",si_cd_failure:"Failure",si_cd_powered_by_smile_id:"Powered by Smile ID",si_cd_add:"Add",si_cd_close:"Close",si_cd_document_capture_shutter:"Capture document",si_cd_document_gallery:"Upload document from gallery",si_cd_checkbox:"Checkbox",si_cd_checkbox_checked:"Checked",si_cd_checkbox_unchecked:"Unchecked",si_cd_expand:"Expand",si_cd_expanded:"Expanded",si_cd_collapsed:"Collapsed",si_cd_smile_id:"Smile ID",si_camera_error_title:"Camera error",si_camera_error_body:"The camera is unavailable. Try again.",si_label_ok:"OK",si_document_center:"Centre the document in the frame",si_document_too_far:"Move closer to the document",si_document_too_close:"Move farther from the document",si_document_hold_still:"Hold still",si_doc_v_capture_directive_wrong_aspect_ratio:"Match the document to the outline",si_document_initial_instruction:"Align document in frame",si_document_ready:"Align document in frame and press capture to proceed",si_document_capturing:"Capturing document\u2026",si_document_capture_complete:"Document captured",si_document_capture_unsatisfied:"Document lost. Try again.",si_document_gallery_image_too_small:"Selected image is too small. Choose a higher-resolution photo.",si_document_gallery_image_failed:"Couldn't load the selected image. Try another.",si_capture_button_document:"Capture Document",si_document_flip_title:"Flip your {id_type}",si_document_type_passport:"Passport",si_document_type_green_book:"Green Book",si_document_type_generic:"Document",si_document_capture_back:"Capture Back of ID",si_document_skip_back:"Skip",si_document_guideline_good:"Good",si_document_guideline_not_cropped:"Not cropped",si_document_guideline_not_blurry:"Not blurry",si_document_guideline_not_reflective:"Not reflective",si_document_preview_title:"Confirm image quality",si_document_preview_subtitle:"Make sure that all the information is readable",si_document_processing_complete:"Submission Complete",si_ess_look_left:"Turn your head to the left",si_ess_look_right:"Turn your head to the right",si_ess_look_up:"Turn your head slightly upwards",si_ess_look_at_camera:"Look at the camera",si_ess_capture_initial_instruction:"Centre your face in the frame and turn your head in the direction of the arrow.",si_ess_hold_still:"Hold still\u2026"},CANONICAL_KEY_COUNT=128;
|
|
@@ -21,10 +21,8 @@ export declare class UseSmileIDLocalizations {
|
|
|
21
21
|
private static _registry;
|
|
22
22
|
private static _registryRevision;
|
|
23
23
|
/**
|
|
24
|
-
* Default
|
|
25
|
-
* `
|
|
26
|
-
* language subtag, or `'en'` if Intl is unavailable. Partners may override this
|
|
27
|
-
* static field at startup to plug in their own resolution (e.g. `expo-localization`).
|
|
24
|
+
* Default resolver: the language subtag of the device's current locale (`getDeviceLocale`), or
|
|
25
|
+
* `'en'`. Partners may override this static field at startup with their own resolution.
|
|
28
26
|
*/
|
|
29
27
|
static localeResolver: () => string;
|
|
30
28
|
/**
|
|
@@ -61,7 +59,6 @@ export declare class UseSmileIDLocalizations {
|
|
|
61
59
|
get siLabelOk(): string;
|
|
62
60
|
get siSelfieCaptureComplete(): string;
|
|
63
61
|
get siCapturing(): string;
|
|
64
|
-
get siSelfieCaptureTimeout(): string;
|
|
65
62
|
get siSelfieCaptureUnsatisfied(): string;
|
|
66
63
|
siConsentTitle(partnerName: string): string;
|
|
67
64
|
get siConsentSubtitle(): string;
|
|
@@ -105,7 +102,6 @@ export declare class UseSmileIDLocalizations {
|
|
|
105
102
|
get siCaptureMoveRight(): string;
|
|
106
103
|
get siCaptureMoveHigher(): string;
|
|
107
104
|
get siCaptureMoveLower(): string;
|
|
108
|
-
get siCaptureReady(): string;
|
|
109
105
|
get siCaptureLowLight(): string;
|
|
110
106
|
get siCaptureRotateDevice(): string;
|
|
111
107
|
get siCaptureSmile(): string;
|
|
@@ -168,9 +164,11 @@ export declare class UseSmileIDLocalizations {
|
|
|
168
164
|
get siDocumentCaptureUnsatisfied(): string;
|
|
169
165
|
get siDocumentGalleryImageTooSmall(): string;
|
|
170
166
|
get siDocumentGalleryImageFailed(): string;
|
|
171
|
-
get siDocumentCaptureTimeout(): string;
|
|
172
167
|
/** Back-of-ID interstitial title — `{id_type}` resolves to the document's display name. */
|
|
173
168
|
siDocumentFlipTitle(idType: string): string;
|
|
169
|
+
get siDocumentTypePassport(): string;
|
|
170
|
+
get siDocumentTypeGreenBook(): string;
|
|
171
|
+
get siDocumentTypeGeneric(): string;
|
|
174
172
|
get siDocumentCaptureBack(): string;
|
|
175
173
|
get siDocumentSkipBack(): string;
|
|
176
174
|
get siDocumentGuidelineGood(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{enStrings as e}from"./strings_en";const l="\u2068",g="\u2069";function c(){return typeof __DEV__<"u"&&__DEV__}const u=new Set;function d(r){!c()||u.has(r)||(u.add(r),console.warn(`[UseSmileID] No translations registered for locale '${r}' \u2014 the SDK is rendering English. Call UseSmileIDLocalizations.register('`+r+"', \u2026) at startup, or set b.localizations explicitly."))}export class UseSmileIDLocalizations{_overrides;constructor(s={}){this._overrides=s}static fromOverrides(s){const i={};for(const[t,_]of Object.entries(s))t.startsWith("@")||typeof _=="string"&&(i[t]=_);return new UseSmileIDLocalizations(i)}static _registry=new Map;static _registryRevision=0;static localeResolver=()=>{try{return new Intl.DateTimeFormat().resolvedOptions().locale.split("-")[0]??"en"}catch{return"en"}};static register(s,i){const t={};for(const[_,n]of Object.entries(i))_.startsWith("@")||typeof n=="string"&&(t[_]=n);UseSmileIDLocalizations._registry.set(s,t),UseSmileIDLocalizations._registryRevision+=1}static clearRegistry(){UseSmileIDLocalizations._registry.clear(),UseSmileIDLocalizations._registryRevision+=1}static hasRegisteredLocales(){return UseSmileIDLocalizations._registry.size>0}static get activeLocaleKey(){return`${UseSmileIDLocalizations.localeResolver()}#${UseSmileIDLocalizations._registryRevision}`}static forActiveLocale(){const s=UseSmileIDLocalizations.localeResolver(),i=UseSmileIDLocalizations._registry.get(s);if(i)return new UseSmileIDLocalizations(i);const t=s.split("-")[0];if(t&&t!==s){const _=UseSmileIDLocalizations._registry.get(t);if(_)return new UseSmileIDLocalizations(_)}return d(s),new UseSmileIDLocalizations}_warnedMissingKey=!1;_lookup(s,i){const t=this._overrides[s];return t!==void 0?t:(c()&&!this._warnedMissingKey&&Object.keys(this._overrides).length>0&&(this._warnedMissingKey=!0,console.warn(`[UseSmileID] '${s}' is missing from the supplied translations and is rendering English; other keys may be too. Compare your overrides against the si_* key set in the SDK's English strings.`)),i)}_s(s,i){return this._lookup(s,i)}_t(s,i,t){let _=this._lookup(s,i);for(const[n,o]of Object.entries(t)){const a=o===""?o:`${l}${o}${g}`;_=_.split(`{${n}}`).join(a)}return _}get siLabelContinue(){return this._s("si_label_continue",e.si_label_continue)}get siLabelOk(){return this._s("si_label_ok",e.si_label_ok)}get siSelfieCaptureComplete(){return this._s("si_selfie_capture_complete",e.si_selfie_capture_complete)}get siCapturing(){return this._s("si_capturing",e.si_capturing)}get siSelfieCaptureTimeout(){return this._s("si_selfie_capture_timeout",e.si_selfie_capture_timeout)}get siSelfieCaptureUnsatisfied(){return this._s("si_selfie_capture_unsatisfied",e.si_selfie_capture_unsatisfied)}siConsentTitle(s){return this._t("si_consent_title",e.si_consent_title,{partnerName:s})}get siConsentSubtitle(){return this._s("si_consent_subtitle",e.si_consent_subtitle)}get siConsentSubtitleSmileId(){return this._s("si_consent_subtitle_smile_id",e.si_consent_subtitle_smile_id)}get siConsentProcessing(){return this._s("si_consent_processing",e.si_consent_processing)}get siConsentContact(){return this._s("si_consent_contact",e.si_consent_contact)}get siConsentPersonal(){return this._s("si_consent_personal",e.si_consent_personal)}get siConsentBiometric(){return this._s("si_consent_biometric",e.si_consent_biometric)}get siConsentDevice(){return this._s("si_consent_device",e.si_consent_device)}get siConsentConsent(){return this._s("si_consent_consent",e.si_consent_consent)}get siConsentAllow(){return this._s("si_consent_allow",e.si_consent_allow)}get siConsentDeny(){return this._s("si_consent_deny",e.si_consent_deny)}get siConsentLearnMore(){return this._s("si_consent_learn_more",e.si_consent_learn_more)}get siConsentLearnMoreDescription(){return this._s("si_consent_learn_more_description",e.si_consent_learn_more_description)}get siConsentLearnMoreDescriptionSmileId(){return this._s("si_consent_learn_more_description_smile_id",e.si_consent_learn_more_description_smile_id)}get siConsentLearnMoreDescriptionRetention(){return this._s("si_consent_learn_more_description_retention",e.si_consent_learn_more_description_retention)}get siConsentLearnMoreDsarPrefix(){return this._s("si_consent_learn_more_dsar_prefix",e.si_consent_learn_more_dsar_prefix)}get siConsentLearnMoreDsarLink(){return this._s("si_consent_learn_more_dsar_link",e.si_consent_learn_more_dsar_link)}get siConsentLearnMorePrivacyPrefix(){return this._s("si_consent_learn_more_privacy_prefix",e.si_consent_learn_more_privacy_prefix)}get siConsentLearnMorePrivacySmileLink(){return this._s("si_consent_learn_more_privacy_smile_link",e.si_consent_learn_more_privacy_smile_link)}get siConsentLearnMorePrivacyAnd(){return this._s("si_consent_learn_more_privacy_and",e.si_consent_learn_more_privacy_and)}siConsentLearnMorePrivacyPartnerLink(s){return this._t("si_consent_learn_more_privacy_partner_link",e.si_consent_learn_more_privacy_partner_link,{partnerName:s})}get siConsentLearnMorePrivacySuffix(){return this._s("si_consent_learn_more_privacy_suffix",e.si_consent_learn_more_privacy_suffix)}get siInstructionsTitlePrefix(){return this._s("si_instructions_title_prefix",e.si_instructions_title_prefix)}get siInstructionsEmphasisSelfie(){return this._s("si_instructions_emphasis_selfie",e.si_instructions_emphasis_selfie)}get siInstructionsEmphasisVisa(){return this._s("si_instructions_emphasis_visa",e.si_instructions_emphasis_visa)}get siInstructionsCaptureGuidelines(){return this._s("si_instructions_capture_guidelines",e.si_instructions_capture_guidelines)}get siInstructionsGuidelineGood(){return this._s("si_instructions_guideline_good",e.si_instructions_guideline_good)}get siInstructionsGuidelineAccessories(){return this._s("si_instructions_guideline_accessories",e.si_instructions_guideline_accessories)}get siInstructionsGuidelineMultipleFaces(){return this._s("si_instructions_guideline_multiple_faces",e.si_instructions_guideline_multiple_faces)}get siInstructionsGuidelinePoorLighting(){return this._s("si_instructions_guideline_poor_lighting",e.si_instructions_guideline_poor_lighting)}get siCdGuidelineAllowed(){return this._s("si_cd_guideline_allowed",e.si_cd_guideline_allowed)}get siCdGuidelineBlocked(){return this._s("si_cd_guideline_blocked",e.si_cd_guideline_blocked)}get siInstructionsNext(){return this._s("si_instructions_next",e.si_instructions_next)}get siStartCaptureInstruction(){return this._s("si_start_capture_instruction",e.si_start_capture_instruction)}get siCaptureInitialInstruction(){return this._s("si_capture_initial_instruction",e.si_capture_initial_instruction)}get siCaptureTooClose(){return this._s("si_capture_too_close",e.si_capture_too_close)}get siCaptureTooFar(){return this._s("si_capture_too_far",e.si_capture_too_far)}get siCaptureCenterFace(){return this._s("si_capture_center_face",e.si_capture_center_face)}get siCaptureMoveLeft(){return this._s("si_capture_move_left",e.si_capture_move_left)}get siCaptureMoveRight(){return this._s("si_capture_move_right",e.si_capture_move_right)}get siCaptureMoveHigher(){return this._s("si_capture_move_higher",e.si_capture_move_higher)}get siCaptureMoveLower(){return this._s("si_capture_move_lower",e.si_capture_move_lower)}get siCaptureReady(){return this._s("si_capture_ready",e.si_capture_ready)}get siCaptureLowLight(){return this._s("si_capture_low_light",e.si_capture_low_light)}get siCaptureRotateDevice(){return this._s("si_capture_rotate_device",e.si_capture_rotate_device)}get siCaptureSmile(){return this._s("si_capture_smile",e.si_capture_smile)}get siCaptureStartButton(){return this._s("si_capture_start_button",e.si_capture_start_button)}get siCaptureWarningText(){return this._s("si_capture_warning_text",e.si_capture_warning_text)}get siCaptureHoldSteady(){return this._s("si_capture_hold_steady",e.si_capture_hold_steady)}get siCaptureCameraUnavailable(){return this._s("si_capture_camera_unavailable",e.si_capture_camera_unavailable)}get siCaptureTimeout(){return this._s("si_capture_timeout",e.si_capture_timeout)}get siCaptureFailed(){return this._s("si_capture_failed",e.si_capture_failed)}get siCaptureAdjusting(){return this._s("si_capture_adjusting",e.si_capture_adjusting)}get siCaptureBrightLight(){return this._s("si_capture_bright_light",e.si_capture_bright_light)}get siCaptureButtonDocument(){return this._s("si_capture_button_document",e.si_capture_button_document)}get siPreviewTitle(){return this._s("si_preview_title",e.si_preview_title)}get siPreviewSubtitle(){return this._s("si_preview_subtitle",e.si_preview_subtitle)}get siPreviewRetake(){return this._s("si_preview_retake",e.si_preview_retake)}get siPreviewConfirm(){return this._s("si_preview_confirm",e.si_preview_confirm)}get siPreviewAccessibilityImage(){return this._s("si_preview_accessibility_image",e.si_preview_accessibility_image)}get siPreviewAccessibilityRetake(){return this._s("si_preview_accessibility_retake",e.si_preview_accessibility_retake)}get siProcessingSubmitting(){return this._s("si_processing_submitting",e.si_processing_submitting)}get siProcessingSubmittingSubtitle(){return this._s("si_processing_submitting_subtitle",e.si_processing_submitting_subtitle)}get siProcessingSuccessTitle(){return this._s("si_processing_success_title",e.si_processing_success_title)}get siProcessingSuccessMessage(){return this._s("si_processing_success_message",e.si_processing_success_message)}get siProcessingFailedTitle(){return this._s("si_processing_failed_title",e.si_processing_failed_title)}get siProcessingFailedMessage(){return this._s("si_processing_failed_message",e.si_processing_failed_message)}get siProcessingErrorNoConnection(){return this._s("si_processing_error_no_connection",e.si_processing_error_no_connection)}get siProcessingErrorGeneric(){return this._s("si_processing_error_generic",e.si_processing_error_generic)}get siProcessingErrorRetryLater(){return this._s("si_processing_error_retry_later",e.si_processing_error_retry_later)}get siProcessingErrorCameraPermission(){return this._s("si_processing_error_camera_permission",e.si_processing_error_camera_permission)}get siProcessingErrorUnavailable(){return this._s("si_processing_error_unavailable",e.si_processing_error_unavailable)}get siProcessingRetry(){return this._s("si_processing_retry",e.si_processing_retry)}get siProcessingExit(){return this._s("si_processing_exit",e.si_processing_exit)}get siAccessibilityCaptureProgress(){return this._s("si_accessibility_capture_progress",e.si_accessibility_capture_progress)}get siCdBack(){return this._s("si_cd_back",e.si_cd_back)}get siCdCapturedImage(){return this._s("si_cd_captured_image",e.si_cd_captured_image)}get siCdSuccess(){return this._s("si_cd_success",e.si_cd_success)}get siCdFailure(){return this._s("si_cd_failure",e.si_cd_failure)}get siCdPoweredBySmileId(){return this._s("si_cd_powered_by_smile_id",e.si_cd_powered_by_smile_id)}get siCdAdd(){return this._s("si_cd_add",e.si_cd_add)}get siCdClose(){return this._s("si_cd_close",e.si_cd_close)}get siCdDocumentCaptureShutter(){return this._s("si_cd_document_capture_shutter",e.si_cd_document_capture_shutter)}get siCdDocumentGallery(){return this._s("si_cd_document_gallery",e.si_cd_document_gallery)}get siCdCheckbox(){return this._s("si_cd_checkbox",e.si_cd_checkbox)}get siCdCheckboxChecked(){return this._s("si_cd_checkbox_checked",e.si_cd_checkbox_checked)}get siCdCheckboxUnchecked(){return this._s("si_cd_checkbox_unchecked",e.si_cd_checkbox_unchecked)}get siCdExpand(){return this._s("si_cd_expand",e.si_cd_expand)}get siCdExpanded(){return this._s("si_cd_expanded",e.si_cd_expanded)}get siCdCollapsed(){return this._s("si_cd_collapsed",e.si_cd_collapsed)}get siCdSmileId(){return this._s("si_cd_smile_id",e.si_cd_smile_id)}get siCameraErrorTitle(){return this._s("si_camera_error_title",e.si_camera_error_title)}get siCameraErrorBody(){return this._s("si_camera_error_body",e.si_camera_error_body)}get siDocumentCenter(){return this._s("si_document_center",e.si_document_center)}get siDocumentTooFar(){return this._s("si_document_too_far",e.si_document_too_far)}get siDocumentTooClose(){return this._s("si_document_too_close",e.si_document_too_close)}get siDocumentWrongAspectRatio(){return this._s("si_doc_v_capture_directive_wrong_aspect_ratio",e.si_doc_v_capture_directive_wrong_aspect_ratio)}get siDocumentHoldStill(){return this._s("si_document_hold_still",e.si_document_hold_still)}get siDocumentInitialInstruction(){return this._s("si_document_initial_instruction",e.si_document_initial_instruction)}get siDocumentReady(){return this._s("si_document_ready",e.si_document_ready)}get siDocumentCapturing(){return this._s("si_document_capturing",e.si_document_capturing)}get siDocumentCaptureComplete(){return this._s("si_document_capture_complete",e.si_document_capture_complete)}get siDocumentCaptureUnsatisfied(){return this._s("si_document_capture_unsatisfied",e.si_document_capture_unsatisfied)}get siDocumentGalleryImageTooSmall(){return this._s("si_document_gallery_image_too_small",e.si_document_gallery_image_too_small)}get siDocumentGalleryImageFailed(){return this._s("si_document_gallery_image_failed",e.si_document_gallery_image_failed)}get siDocumentCaptureTimeout(){return this._s("si_document_capture_timeout",e.si_document_capture_timeout)}siDocumentFlipTitle(s){return this._t("si_document_flip_title",e.si_document_flip_title,{id_type:s})}get siDocumentCaptureBack(){return this._s("si_document_capture_back",e.si_document_capture_back)}get siDocumentSkipBack(){return this._s("si_document_skip_back",e.si_document_skip_back)}get siDocumentGuidelineGood(){return this._s("si_document_guideline_good",e.si_document_guideline_good)}get siDocumentGuidelineNotCropped(){return this._s("si_document_guideline_not_cropped",e.si_document_guideline_not_cropped)}get siDocumentGuidelineNotBlurry(){return this._s("si_document_guideline_not_blurry",e.si_document_guideline_not_blurry)}get siDocumentGuidelineNotReflective(){return this._s("si_document_guideline_not_reflective",e.si_document_guideline_not_reflective)}get siDocumentPreviewTitle(){return this._s("si_document_preview_title",e.si_document_preview_title)}get siDocumentPreviewSubtitle(){return this._s("si_document_preview_subtitle",e.si_document_preview_subtitle)}get siDocumentProcessingComplete(){return this._s("si_document_processing_complete",e.si_document_processing_complete)}get siEssLookLeft(){return this._s("si_ess_look_left",e.si_ess_look_left)}get siEssLookRight(){return this._s("si_ess_look_right",e.si_ess_look_right)}get siEssLookUp(){return this._s("si_ess_look_up",e.si_ess_look_up)}get siEssLookAtCamera(){return this._s("si_ess_look_at_camera",e.si_ess_look_at_camera)}get siEssCaptureInitialInstruction(){return this._s("si_ess_capture_initial_instruction",e.si_ess_capture_initial_instruction)}get siEssHoldStill(){return this._s("si_ess_hold_still",e.si_ess_hold_still)}}
|
|
1
|
+
"use strict";import{enStrings as e}from"./strings_en";import{isDevelopmentBuild as c}from"../core/is_development_build";import{getDeviceLocale as l}from"../presentation/utils/locale_utils";const g="\u2068",d="\u2069",u=new Set;function p(r){!c()||u.has(r)||(u.add(r),console.warn(`[UseSmileID] No translations registered for locale '${r}' \u2014 the SDK is rendering English. Call UseSmileIDLocalizations.register('`+r+"', \u2026) at startup, or set b.localizations explicitly."))}export class UseSmileIDLocalizations{_overrides;constructor(s={}){this._overrides=s}static fromOverrides(s){const t={};for(const[i,_]of Object.entries(s))i.startsWith("@")||typeof _=="string"&&(t[i]=_);return new UseSmileIDLocalizations(t)}static _registry=new Map;static _registryRevision=0;static localeResolver=()=>l().split("-")[0]||"en";static register(s,t){const i={};for(const[_,n]of Object.entries(t))_.startsWith("@")||typeof n=="string"&&(i[_]=n);UseSmileIDLocalizations._registry.set(s,i),UseSmileIDLocalizations._registryRevision+=1}static clearRegistry(){UseSmileIDLocalizations._registry.clear(),UseSmileIDLocalizations._registryRevision+=1}static hasRegisteredLocales(){return UseSmileIDLocalizations._registry.size>0}static get activeLocaleKey(){return`${UseSmileIDLocalizations.localeResolver()}#${UseSmileIDLocalizations._registryRevision}`}static forActiveLocale(){const s=UseSmileIDLocalizations.localeResolver(),t=UseSmileIDLocalizations._registry.get(s);if(t)return new UseSmileIDLocalizations(t);const i=s.split("-")[0];if(i&&i!==s){const _=UseSmileIDLocalizations._registry.get(i);if(_)return new UseSmileIDLocalizations(_)}return p(s),new UseSmileIDLocalizations}_warnedMissingKey=!1;_lookup(s,t){const i=this._overrides[s];return i!==void 0?i:(c()&&!this._warnedMissingKey&&Object.keys(this._overrides).length>0&&(this._warnedMissingKey=!0,console.warn(`[UseSmileID] '${s}' is missing from the supplied translations and is rendering English; other keys may be too. Compare your overrides against the si_* key set in the SDK's English strings.`)),t)}_s(s,t){return this._lookup(s,t)}_t(s,t,i){let _=this._lookup(s,t);for(const[n,o]of Object.entries(i)){const a=o===""?o:`${g}${o}${d}`;_=_.split(`{${n}}`).join(a)}return _}get siLabelContinue(){return this._s("si_label_continue",e.si_label_continue)}get siLabelOk(){return this._s("si_label_ok",e.si_label_ok)}get siSelfieCaptureComplete(){return this._s("si_selfie_capture_complete",e.si_selfie_capture_complete)}get siCapturing(){return this._s("si_capturing",e.si_capturing)}get siSelfieCaptureUnsatisfied(){return this._s("si_selfie_capture_unsatisfied",e.si_selfie_capture_unsatisfied)}siConsentTitle(s){return this._t("si_consent_title",e.si_consent_title,{partnerName:s})}get siConsentSubtitle(){return this._s("si_consent_subtitle",e.si_consent_subtitle)}get siConsentSubtitleSmileId(){return this._s("si_consent_subtitle_smile_id",e.si_consent_subtitle_smile_id)}get siConsentProcessing(){return this._s("si_consent_processing",e.si_consent_processing)}get siConsentContact(){return this._s("si_consent_contact",e.si_consent_contact)}get siConsentPersonal(){return this._s("si_consent_personal",e.si_consent_personal)}get siConsentBiometric(){return this._s("si_consent_biometric",e.si_consent_biometric)}get siConsentDevice(){return this._s("si_consent_device",e.si_consent_device)}get siConsentConsent(){return this._s("si_consent_consent",e.si_consent_consent)}get siConsentAllow(){return this._s("si_consent_allow",e.si_consent_allow)}get siConsentDeny(){return this._s("si_consent_deny",e.si_consent_deny)}get siConsentLearnMore(){return this._s("si_consent_learn_more",e.si_consent_learn_more)}get siConsentLearnMoreDescription(){return this._s("si_consent_learn_more_description",e.si_consent_learn_more_description)}get siConsentLearnMoreDescriptionSmileId(){return this._s("si_consent_learn_more_description_smile_id",e.si_consent_learn_more_description_smile_id)}get siConsentLearnMoreDescriptionRetention(){return this._s("si_consent_learn_more_description_retention",e.si_consent_learn_more_description_retention)}get siConsentLearnMoreDsarPrefix(){return this._s("si_consent_learn_more_dsar_prefix",e.si_consent_learn_more_dsar_prefix)}get siConsentLearnMoreDsarLink(){return this._s("si_consent_learn_more_dsar_link",e.si_consent_learn_more_dsar_link)}get siConsentLearnMorePrivacyPrefix(){return this._s("si_consent_learn_more_privacy_prefix",e.si_consent_learn_more_privacy_prefix)}get siConsentLearnMorePrivacySmileLink(){return this._s("si_consent_learn_more_privacy_smile_link",e.si_consent_learn_more_privacy_smile_link)}get siConsentLearnMorePrivacyAnd(){return this._s("si_consent_learn_more_privacy_and",e.si_consent_learn_more_privacy_and)}siConsentLearnMorePrivacyPartnerLink(s){return this._t("si_consent_learn_more_privacy_partner_link",e.si_consent_learn_more_privacy_partner_link,{partnerName:s})}get siConsentLearnMorePrivacySuffix(){return this._s("si_consent_learn_more_privacy_suffix",e.si_consent_learn_more_privacy_suffix)}get siInstructionsTitlePrefix(){return this._s("si_instructions_title_prefix",e.si_instructions_title_prefix)}get siInstructionsEmphasisSelfie(){return this._s("si_instructions_emphasis_selfie",e.si_instructions_emphasis_selfie)}get siInstructionsEmphasisVisa(){return this._s("si_instructions_emphasis_visa",e.si_instructions_emphasis_visa)}get siInstructionsCaptureGuidelines(){return this._s("si_instructions_capture_guidelines",e.si_instructions_capture_guidelines)}get siInstructionsGuidelineGood(){return this._s("si_instructions_guideline_good",e.si_instructions_guideline_good)}get siInstructionsGuidelineAccessories(){return this._s("si_instructions_guideline_accessories",e.si_instructions_guideline_accessories)}get siInstructionsGuidelineMultipleFaces(){return this._s("si_instructions_guideline_multiple_faces",e.si_instructions_guideline_multiple_faces)}get siInstructionsGuidelinePoorLighting(){return this._s("si_instructions_guideline_poor_lighting",e.si_instructions_guideline_poor_lighting)}get siCdGuidelineAllowed(){return this._s("si_cd_guideline_allowed",e.si_cd_guideline_allowed)}get siCdGuidelineBlocked(){return this._s("si_cd_guideline_blocked",e.si_cd_guideline_blocked)}get siInstructionsNext(){return this._s("si_instructions_next",e.si_instructions_next)}get siStartCaptureInstruction(){return this._s("si_start_capture_instruction",e.si_start_capture_instruction)}get siCaptureInitialInstruction(){return this._s("si_capture_initial_instruction",e.si_capture_initial_instruction)}get siCaptureTooClose(){return this._s("si_capture_too_close",e.si_capture_too_close)}get siCaptureTooFar(){return this._s("si_capture_too_far",e.si_capture_too_far)}get siCaptureCenterFace(){return this._s("si_capture_center_face",e.si_capture_center_face)}get siCaptureMoveLeft(){return this._s("si_capture_move_left",e.si_capture_move_left)}get siCaptureMoveRight(){return this._s("si_capture_move_right",e.si_capture_move_right)}get siCaptureMoveHigher(){return this._s("si_capture_move_higher",e.si_capture_move_higher)}get siCaptureMoveLower(){return this._s("si_capture_move_lower",e.si_capture_move_lower)}get siCaptureLowLight(){return this._s("si_capture_low_light",e.si_capture_low_light)}get siCaptureRotateDevice(){return this._s("si_capture_rotate_device",e.si_capture_rotate_device)}get siCaptureSmile(){return this._s("si_capture_smile",e.si_capture_smile)}get siCaptureStartButton(){return this._s("si_capture_start_button",e.si_capture_start_button)}get siCaptureWarningText(){return this._s("si_capture_warning_text",e.si_capture_warning_text)}get siCaptureHoldSteady(){return this._s("si_capture_hold_steady",e.si_capture_hold_steady)}get siCaptureCameraUnavailable(){return this._s("si_capture_camera_unavailable",e.si_capture_camera_unavailable)}get siCaptureTimeout(){return this._s("si_capture_timeout",e.si_capture_timeout)}get siCaptureFailed(){return this._s("si_capture_failed",e.si_capture_failed)}get siCaptureAdjusting(){return this._s("si_capture_adjusting",e.si_capture_adjusting)}get siCaptureBrightLight(){return this._s("si_capture_bright_light",e.si_capture_bright_light)}get siCaptureButtonDocument(){return this._s("si_capture_button_document",e.si_capture_button_document)}get siPreviewTitle(){return this._s("si_preview_title",e.si_preview_title)}get siPreviewSubtitle(){return this._s("si_preview_subtitle",e.si_preview_subtitle)}get siPreviewRetake(){return this._s("si_preview_retake",e.si_preview_retake)}get siPreviewConfirm(){return this._s("si_preview_confirm",e.si_preview_confirm)}get siPreviewAccessibilityImage(){return this._s("si_preview_accessibility_image",e.si_preview_accessibility_image)}get siPreviewAccessibilityRetake(){return this._s("si_preview_accessibility_retake",e.si_preview_accessibility_retake)}get siProcessingSubmitting(){return this._s("si_processing_submitting",e.si_processing_submitting)}get siProcessingSubmittingSubtitle(){return this._s("si_processing_submitting_subtitle",e.si_processing_submitting_subtitle)}get siProcessingSuccessTitle(){return this._s("si_processing_success_title",e.si_processing_success_title)}get siProcessingSuccessMessage(){return this._s("si_processing_success_message",e.si_processing_success_message)}get siProcessingFailedTitle(){return this._s("si_processing_failed_title",e.si_processing_failed_title)}get siProcessingFailedMessage(){return this._s("si_processing_failed_message",e.si_processing_failed_message)}get siProcessingErrorNoConnection(){return this._s("si_processing_error_no_connection",e.si_processing_error_no_connection)}get siProcessingErrorGeneric(){return this._s("si_processing_error_generic",e.si_processing_error_generic)}get siProcessingErrorRetryLater(){return this._s("si_processing_error_retry_later",e.si_processing_error_retry_later)}get siProcessingErrorCameraPermission(){return this._s("si_processing_error_camera_permission",e.si_processing_error_camera_permission)}get siProcessingErrorUnavailable(){return this._s("si_processing_error_unavailable",e.si_processing_error_unavailable)}get siProcessingRetry(){return this._s("si_processing_retry",e.si_processing_retry)}get siProcessingExit(){return this._s("si_processing_exit",e.si_processing_exit)}get siAccessibilityCaptureProgress(){return this._s("si_accessibility_capture_progress",e.si_accessibility_capture_progress)}get siCdBack(){return this._s("si_cd_back",e.si_cd_back)}get siCdCapturedImage(){return this._s("si_cd_captured_image",e.si_cd_captured_image)}get siCdSuccess(){return this._s("si_cd_success",e.si_cd_success)}get siCdFailure(){return this._s("si_cd_failure",e.si_cd_failure)}get siCdPoweredBySmileId(){return this._s("si_cd_powered_by_smile_id",e.si_cd_powered_by_smile_id)}get siCdAdd(){return this._s("si_cd_add",e.si_cd_add)}get siCdClose(){return this._s("si_cd_close",e.si_cd_close)}get siCdDocumentCaptureShutter(){return this._s("si_cd_document_capture_shutter",e.si_cd_document_capture_shutter)}get siCdDocumentGallery(){return this._s("si_cd_document_gallery",e.si_cd_document_gallery)}get siCdCheckbox(){return this._s("si_cd_checkbox",e.si_cd_checkbox)}get siCdCheckboxChecked(){return this._s("si_cd_checkbox_checked",e.si_cd_checkbox_checked)}get siCdCheckboxUnchecked(){return this._s("si_cd_checkbox_unchecked",e.si_cd_checkbox_unchecked)}get siCdExpand(){return this._s("si_cd_expand",e.si_cd_expand)}get siCdExpanded(){return this._s("si_cd_expanded",e.si_cd_expanded)}get siCdCollapsed(){return this._s("si_cd_collapsed",e.si_cd_collapsed)}get siCdSmileId(){return this._s("si_cd_smile_id",e.si_cd_smile_id)}get siCameraErrorTitle(){return this._s("si_camera_error_title",e.si_camera_error_title)}get siCameraErrorBody(){return this._s("si_camera_error_body",e.si_camera_error_body)}get siDocumentCenter(){return this._s("si_document_center",e.si_document_center)}get siDocumentTooFar(){return this._s("si_document_too_far",e.si_document_too_far)}get siDocumentTooClose(){return this._s("si_document_too_close",e.si_document_too_close)}get siDocumentWrongAspectRatio(){return this._s("si_doc_v_capture_directive_wrong_aspect_ratio",e.si_doc_v_capture_directive_wrong_aspect_ratio)}get siDocumentHoldStill(){return this._s("si_document_hold_still",e.si_document_hold_still)}get siDocumentInitialInstruction(){return this._s("si_document_initial_instruction",e.si_document_initial_instruction)}get siDocumentReady(){return this._s("si_document_ready",e.si_document_ready)}get siDocumentCapturing(){return this._s("si_document_capturing",e.si_document_capturing)}get siDocumentCaptureComplete(){return this._s("si_document_capture_complete",e.si_document_capture_complete)}get siDocumentCaptureUnsatisfied(){return this._s("si_document_capture_unsatisfied",e.si_document_capture_unsatisfied)}get siDocumentGalleryImageTooSmall(){return this._s("si_document_gallery_image_too_small",e.si_document_gallery_image_too_small)}get siDocumentGalleryImageFailed(){return this._s("si_document_gallery_image_failed",e.si_document_gallery_image_failed)}siDocumentFlipTitle(s){return this._t("si_document_flip_title",e.si_document_flip_title,{id_type:s})}get siDocumentTypePassport(){return this._s("si_document_type_passport",e.si_document_type_passport)}get siDocumentTypeGreenBook(){return this._s("si_document_type_green_book",e.si_document_type_green_book)}get siDocumentTypeGeneric(){return this._s("si_document_type_generic",e.si_document_type_generic)}get siDocumentCaptureBack(){return this._s("si_document_capture_back",e.si_document_capture_back)}get siDocumentSkipBack(){return this._s("si_document_skip_back",e.si_document_skip_back)}get siDocumentGuidelineGood(){return this._s("si_document_guideline_good",e.si_document_guideline_good)}get siDocumentGuidelineNotCropped(){return this._s("si_document_guideline_not_cropped",e.si_document_guideline_not_cropped)}get siDocumentGuidelineNotBlurry(){return this._s("si_document_guideline_not_blurry",e.si_document_guideline_not_blurry)}get siDocumentGuidelineNotReflective(){return this._s("si_document_guideline_not_reflective",e.si_document_guideline_not_reflective)}get siDocumentPreviewTitle(){return this._s("si_document_preview_title",e.si_document_preview_title)}get siDocumentPreviewSubtitle(){return this._s("si_document_preview_subtitle",e.si_document_preview_subtitle)}get siDocumentProcessingComplete(){return this._s("si_document_processing_complete",e.si_document_processing_complete)}get siEssLookLeft(){return this._s("si_ess_look_left",e.si_ess_look_left)}get siEssLookRight(){return this._s("si_ess_look_right",e.si_ess_look_right)}get siEssLookUp(){return this._s("si_ess_look_up",e.si_ess_look_up)}get siEssLookAtCamera(){return this._s("si_ess_look_at_camera",e.si_ess_look_at_camera)}get siEssCaptureInitialInstruction(){return this._s("si_ess_capture_initial_instruction",e.si_ess_capture_initial_instruction)}get siEssHoldStill(){return this._s("si_ess_hold_still",e.si_ess_hold_still)}}
|
|
@@ -15,11 +15,9 @@ import type { MetadataEntry } from "./use_smile_id_metadata";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function flowConfigurationToBuilderConfiguration(configuration: FlowConfiguration): BuilderConfiguration;
|
|
17
17
|
/**
|
|
18
|
-
* Describes the face and document models backing this flow
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* the document model reports the native no-op fallback, since the React Native
|
|
22
|
-
* document detector is not selectable from JS.
|
|
18
|
+
* Describes the face and document models backing this flow, each resolved from
|
|
19
|
+
* the key of the analyzer registered for its capture type. A document analyzer
|
|
20
|
+
* with no key reports the native no-op fallback.
|
|
23
21
|
*/
|
|
24
22
|
export declare function flowConfigurationToModelConfiguration(configuration: FlowConfiguration): ModelConfiguration;
|
|
25
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{GlobalPrivacyControl as
|
|
1
|
+
"use strict";import{GlobalPrivacyControl as g}from"../core/models/global_privacy_control";import{AnalyzerFactoryKey as c,DocumentAnalyzerKey as u}from"@smileid/usesmileid_bridge";import{CaptureType as f}from"../core/models/ml_config";import{JobType as y}from"../core/models/job_type";import{autoCaptureWireValue as b}from"../core/models/document_capture_mode";import{flowShowAttribution as w}from"../presentation/flow/config/attribution_resolver";import{builderConfigurationToJson as C}from"./builder_configuration";import{MODEL_DESCRIPTOR_UNKNOWN as _,ModelProvider as r,modelConfigurationToJson as T}from"./model_configuration";export function flowConfigurationToBuilderConfiguration(e){const o=e.screens.steps;let n;const t=[];let d=!1,a=!1,p=!1;for(const i of o)switch(i.kind){case"consent":n=i.config;break;case"instructions":d=!0;break;case"capture":t.push(i.config);break;case"preview":a=!0;break;case"processing":p=!0;break}const l=t.find(i=>i.selfieConfig)?.selfieConfig,s=t.find(i=>i.documentConfig)?.documentConfig,v=l!==void 0||t.some(i=>i.captureType===f.selfie),m=s!==void 0||t.some(i=>i.captureType===f.document);return{consentScreenUsed:n!==void 0,consentIconProvided:n?.partnerIcon!=null,consentIconDimensions:null,consentAttributionShown:n!==void 0&&w(e),instructionsScreenUsed:d,selfiePreviewEnabled:a&&v,documentPreviewEnabled:a&&m,submissionSkipped:!p,allowAgentMode:l?.allowAgentMode??!1,enhancedLivenessEnabled:l?.enableEnhancedLiveness??!1,autoCaptureEnabled:b(s?.captureMode),allowGalleryUpload:s?.allowGalleryUpload??!1,captureBothSides:e.network?.config?.jobType===y.residencyDocumentVerification&&m||(s?.captureBothSides??!1),allowSkipBack:s?.allowSkipBack??!1,globalPrivacyControl:e.config?.globalPrivacyControl??g.OptOut}}export function flowConfigurationToModelConfiguration(e){const o=e.ml?.analyzers.selfieConfig?.analyzerFactoryKey,n=e.ml?.analyzers.document?.key;return{faceModel:h(o),documentModel:k(n)}}export function configurationMetadataEntries(e){const o=[{name:"builder_configuration_object",value:JSON.stringify(C(flowConfigurationToBuilderConfiguration(e)))},{name:"model_configuration_object",value:JSON.stringify(T(flowConfigurationToModelConfiguration(e)))}],n=flowConfigurationToSelfieLivenessTelemetry(e);return n.activeLivenessType!==null&&o.push({name:"active_liveness_type",value:n.activeLivenessType},{name:"active_liveness_version",value:n.activeLivenessVersion},{name:"selfie_image_origin",value:n.selfieImageOrigin}),o}export function flowConfigurationToSelfieLivenessTelemetry(e){let o,n=!1;for(const t of e.screens.steps)t.kind==="capture"&&(o??=t.config.selfieConfig,t.config.captureType===f.selfie&&(n=!0));return!n&&o===void 0?{activeLivenessType:null,activeLivenessVersion:null,selfieImageOrigin:null}:{activeLivenessType:O(o),activeLivenessVersion:"2.0.0",selfieImageOrigin:S(o)}}function O(e){return e?.enableEnhancedLiveness?"head_pose":"smile"}function S(e){return e?.allowAgentMode?"back_camera":"front_camera"}function h(e){switch(e){case c.MLKitFace:return{provider:r.Google,name:"play-services-mlkit-face-detection",version:"17.1.0",bundled:!1};case c.HuaweiFace:return{provider:r.Huawei,name:"ml-computer-vision-face",version:"3.18.1.300",bundled:!1};case c.VisionFace:return{provider:r.Apple,name:"vision_face_detector",version:"system",bundled:!0};default:return _}}function k(e){switch(e){case u.MLKitDocument:return{provider:r.Google,name:"object-detection",version:"17.0.2",bundled:!0};case u.HuaweiDocument:return{provider:r.Huawei,name:"ml-computer-vision-object",version:"3.7.0.301",bundled:!1};case u.VisionDocument:return{provider:r.Apple,name:"vision_document_detector",version:"system",bundled:!0};default:return L}}const L={provider:r.Smile,name:"noop_document_detector",version:"12.3.0",bundled:!0};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Dimensions as d,Platform as r}from"react-native";import{Attestation as w,DeviceIntegrityProvider as b,PrivilegesProvider as S}from"@smileid/usesmileid_bridge";import{UseSmileIDMetadata as A}from"./use_smile_id_metadata";import{loadAsyncStorage as D,loadExpoBattery as O,loadExpoCellular as C,loadExpoDevice as l,loadExpoNetwork as M}from"./optional_native_modules";import{resolveGeolocation as U}from"./geolocation";import{resolveDimensions as u}from"../data/model/sdk_config_capture";import{SdkConfigSource as h}from"../data/model/sdk_config_source";import{CameraDefaults as o}from"../camera/camera_defaults";const m="12.
|
|
1
|
+
"use strict";import{Dimensions as d,Platform as r}from"react-native";import{Attestation as w,DeviceIntegrityProvider as b,PrivilegesProvider as S}from"@smileid/usesmileid_bridge";import{UseSmileIDMetadata as A}from"./use_smile_id_metadata";import{loadAsyncStorage as D,loadExpoBattery as O,loadExpoCellular as C,loadExpoDevice as l,loadExpoNetwork as M}from"./optional_native_modules";import{resolveGeolocation as U}from"./geolocation";import{resolveDimensions as u}from"../data/model/sdk_config_capture";import{SdkConfigSource as h}from"../data/model/sdk_config_source";import{CameraDefaults as o}from"../camera/camera_defaults";const m="12.3.0",k="12.0.0",N="react-native-expo",p="com.usesmileid.metadata.sdk_launch_count";export class UseSmileIDMetadataFactory{_sessionId;_deviceOs;_deviceModel;_appName;_hostApplication;_systemArchitecture;_memoryInfoMb;_buildBrand;_buildDevice;_buildFingerprint;_buildProduct;_carrierInfo;_batteryStatus;_sdkLaunchCount;_geolocation;_privileges;_deviceIntegrity;_clientIp="";_networkConnection="";_hardwareAttestation;constructor(t={}){this._sessionId=generateSessionId(),this._deviceOs=x(),this._appName=t.appName??"",this._hostApplication=t.hostApplication??"";const e=l();e?(this._deviceModel=resolveDeviceModel(e),this._systemArchitecture=e.supportedCpuArchitectures?.[0]?.trim()??"",this._memoryInfoMb=typeof e.totalMemory=="number"&&e.totalMemory>0?Math.round(e.totalMemory/(1024*1024)):0,this._buildBrand=e.brand?.trim()??"",this._buildDevice=(r.OS==="ios"?e.modelId:e.designName)?.trim()??"",this._buildFingerprint=e.osBuildFingerprint?.trim()??"",this._buildProduct=e.productName?.trim()??""):(this._deviceModel="",this._systemArchitecture="",this._memoryInfoMb=0,this._buildBrand="",this._buildDevice="",this._buildFingerprint="",this._buildProduct=""),this._carrierInfo=C()?.carrier?.trim()??"",this._warmupAsync(),this._warmUpHardwareAttestation()}get sessionId(){return this._sessionId}async warmup(){return this._warmupAsync()}async _warmupAsync(){const t=M();if(!t)return;const e=t.getNetworkStateAsync().then(s=>{this._networkConnection=(s.type??"").toString()}).catch(()=>{}),n=t.getIpAddressAsync?t.getIpAddressAsync().then(s=>{this._clientIp=s??""}).catch(()=>{}):Promise.resolve();await Promise.all([e,n,this._warmUpBatteryStatus(),this._warmUpLaunchCount(),this._warmUpGeolocation(),this._warmUpPrivileges(),this._warmUpDeviceIntegrity()])}async _warmUpGeolocation(){const t=await U();t&&(this._geolocation=t)}async _warmUpPrivileges(){const t=await S.privileges();t.length>0&&(this._privileges=t)}async _warmUpDeviceIntegrity(){this._deviceIntegrity=await b.signals()}async _warmUpLaunchCount(){const t=D();if(t)try{const n=(Number(await t.getItem(p))||0)+1;await t.setItem(p,String(n)),this._sdkLaunchCount=n}catch{}}async _warmUpBatteryStatus(){const t=O();if(t)try{switch(await t.getBatteryStateAsync()){case 1:this._batteryStatus=0;break;case 2:case 3:this._batteryStatus=1;break;default:this._batteryStatus=-1}}catch{}}async _warmUpHardwareAttestation(){try{this._hardwareAttestation=await w.generateHardwareAttestation(this._sessionId)}catch{}}make(t){const e=this._hardwareAttestation,n=r.OS==="android"&&e?{hardwareAttestationSecurityLevel:e.securityLevel,...e.certificateChain&&e.certificateChain.length>0?{attestationCertificateChain:e.certificateChain}:{}}:{},s=r.OS==="ios"&&e?{supportsAppAttest:e.supportsAppAttest}:{},a=u(t?.selfie),_=t!==void 0?h.sdkConfig:h.defaultSource,f=a?.width??o.selfieJpegTargetWidth,g=a?.height??o.selfieJpegTargetHeight,c=u(t?.liveness),y=c?.width??o.selfieJpegTargetWidth,v=c?.height??o.selfieJpegTargetHeight,I={sdkVersion:m,sdk:N,deviceOs:this._deviceOs,deviceModel:this._deviceModel,appName:this._appName,sessionId:this._sessionId,clientIp:this._clientIp,networkConnection:this._networkConnection,carrierInfo:this._carrierInfo,timezone:L(),timezoneOffsetMinutes:E(),locale:B(),screenResolution:H(),memoryInfoMb:this._memoryInfoMb,deviceOrientation:R(),systemArchitecture:this._systemArchitecture,numberOfCameras:0,hostApplication:this._hostApplication,securityPolicyVersion:k,...n,...s,sdkConfigSource:_,imageWidth:f,imageHeight:g,livenessImageWidth:y,livenessImageHeight:v,buildBrand:this._buildBrand,buildDevice:this._buildDevice,buildFingerprint:this._buildFingerprint,buildProduct:this._buildProduct,buildHardware:this._deviceIntegrity?.buildHardware??"",buildSource:this._deviceIntegrity?.buildSource??"",packageName:this._deviceIntegrity?.packageName??"",fingerprint:this._deviceIntegrity?.fingerprint??"",localTimeOfEnrolment:T(),wrapperName:"react_native_expo",wrapperVersion:m,...this._deviceIntegrity?.vpn!==void 0?{vpn:this._deviceIntegrity.vpn}:{},...this._deviceIntegrity?.certificateDigest!==void 0?{certificateDigest:this._deviceIntegrity.certificateDigest}:{},...this._batteryStatus!==void 0?{batteryStatus:this._batteryStatus}:{},...this._sdkLaunchCount!==void 0?{sdkLaunchCount:this._sdkLaunchCount}:{},...this._geolocation!==void 0?{geolocation:this._geolocation}:{},...this._privileges!==void 0?{privileges:this._privileges}:{}};return new A(I)}}export function resolveDeviceModel(i=l()){if(!i)return"";const t=i.brand?.trim()??"",e=i.modelName?.trim()??"";return[t,e].filter(Boolean).join(" ")}function x(){const i=r.OS==="ios"?"iOS":r.OS==="android"?"Android":r.OS,t=P();return t?`${i} ${t}`:i}function P(){if(r.OS==="android"){const i=r.constants?.Release;if(i!=null&&`${i}`!="")return`${i}`}return typeof r.Version<"u"?String(r.Version):""}function T(){try{return new Date().toISOString()}catch{return""}}function L(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??""}catch{return""}}function E(){return-new Date().getTimezoneOffset()}function B(){try{return Intl.DateTimeFormat().resolvedOptions().locale??""}catch{return""}}function H(){try{const{width:i,height:t,scale:e}=d.get("screen");if(!i||!t)return"";const n=Math.round(i*(e||1)),s=Math.round(t*(e||1));return`${n} \xD7 ${s}`}catch{return""}}function R(){try{const{width:i,height:t}=d.get("window");return!i||!t?"":t>=i?"Portrait":"Landscape"}catch{return""}}export function generateSessionId(){const i=globalThis.crypto;if(i&&typeof i.randomUUID=="function")return i.randomUUID();const t=()=>typeof i?.getRandomValues=="function"?i.getRandomValues(new Uint16Array(1))[0]??0:Math.floor(Math.random()*65536),e=()=>t().toString(16).padStart(4,"0");return[e()+e(),e(),"4"+e().slice(1),(parseInt(e(),16)&16383|32768).toString(16),e()+e()+e()].join("-")}
|