@smileid/usesmileid 12.0.0-beta01
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 +10 -0
- package/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/camera/camera_configuration.d.ts +31 -0
- package/dist/camera/camera_configuration.d.ts.map +1 -0
- package/dist/camera/camera_configuration.js +2 -0
- package/dist/camera/camera_configuration.js.map +1 -0
- package/dist/camera/camera_defaults.d.ts +25 -0
- package/dist/camera/camera_defaults.d.ts.map +1 -0
- package/dist/camera/camera_defaults.js +22 -0
- package/dist/camera/camera_defaults.js.map +1 -0
- package/dist/camera/camera_lens.d.ts +13 -0
- package/dist/camera/camera_lens.d.ts.map +1 -0
- package/dist/camera/camera_lens.js +12 -0
- package/dist/camera/camera_lens.js.map +1 -0
- package/dist/camera/camera_permissions.d.ts +18 -0
- package/dist/camera/camera_permissions.d.ts.map +1 -0
- package/dist/camera/camera_permissions.js +23 -0
- package/dist/camera/camera_permissions.js.map +1 -0
- package/dist/camera/camera_preview_image.d.ts +18 -0
- package/dist/camera/camera_preview_image.d.ts.map +1 -0
- package/dist/camera/camera_preview_image.js +8 -0
- package/dist/camera/camera_preview_image.js.map +1 -0
- package/dist/camera/document_image_pipeline.d.ts +24 -0
- package/dist/camera/document_image_pipeline.d.ts.map +1 -0
- package/dist/camera/document_image_pipeline.js +70 -0
- package/dist/camera/document_image_pipeline.js.map +1 -0
- package/dist/camera/document_resize_target.d.ts +13 -0
- package/dist/camera/document_resize_target.d.ts.map +1 -0
- package/dist/camera/document_resize_target.js +17 -0
- package/dist/camera/document_resize_target.js.map +1 -0
- package/dist/camera/focus_state.d.ts +31 -0
- package/dist/camera/focus_state.d.ts.map +1 -0
- package/dist/camera/focus_state.js +13 -0
- package/dist/camera/focus_state.js.map +1 -0
- package/dist/camera/frame_processor_plugin.d.ts +28 -0
- package/dist/camera/frame_processor_plugin.d.ts.map +1 -0
- package/dist/camera/frame_processor_plugin.js +21 -0
- package/dist/camera/frame_processor_plugin.js.map +1 -0
- package/dist/camera/orientation_degrees.d.ts +11 -0
- package/dist/camera/orientation_degrees.d.ts.map +1 -0
- package/dist/camera/orientation_degrees.js +21 -0
- package/dist/camera/orientation_degrees.js.map +1 -0
- package/dist/camera/use_smile_id_camera_preview.d.ts +64 -0
- package/dist/camera/use_smile_id_camera_preview.d.ts.map +1 -0
- package/dist/camera/use_smile_id_camera_preview.js +141 -0
- package/dist/camera/use_smile_id_camera_preview.js.map +1 -0
- package/dist/camera/use_smile_id_camera_system.d.ts +97 -0
- package/dist/camera/use_smile_id_camera_system.d.ts.map +1 -0
- package/dist/camera/use_smile_id_camera_system.js +185 -0
- package/dist/camera/use_smile_id_camera_system.js.map +1 -0
- package/dist/camera/use_smile_id_frame_processor.d.ts +38 -0
- package/dist/camera/use_smile_id_frame_processor.d.ts.map +1 -0
- package/dist/camera/use_smile_id_frame_processor.js +2 -0
- package/dist/camera/use_smile_id_frame_processor.js.map +1 -0
- package/dist/camera/use_smile_id_frame_stream.d.ts +70 -0
- package/dist/camera/use_smile_id_frame_stream.d.ts.map +1 -0
- package/dist/camera/use_smile_id_frame_stream.js +93 -0
- package/dist/camera/use_smile_id_frame_stream.js.map +1 -0
- package/dist/core/exception/builder_validation_exception.d.ts +29 -0
- package/dist/core/exception/builder_validation_exception.d.ts.map +1 -0
- package/dist/core/exception/builder_validation_exception.js +37 -0
- package/dist/core/exception/builder_validation_exception.js.map +1 -0
- package/dist/core/exception/capture_validation_exceptions.d.ts +9 -0
- package/dist/core/exception/capture_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/capture_validation_exceptions.js +9 -0
- package/dist/core/exception/capture_validation_exceptions.js.map +1 -0
- package/dist/core/exception/consent_validation_exceptions.d.ts +8 -0
- package/dist/core/exception/consent_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/consent_validation_exceptions.js +8 -0
- package/dist/core/exception/consent_validation_exceptions.js.map +1 -0
- package/dist/core/exception/duplicate_screen_type_exception.d.ts +13 -0
- package/dist/core/exception/duplicate_screen_type_exception.d.ts.map +1 -0
- package/dist/core/exception/duplicate_screen_type_exception.js +20 -0
- package/dist/core/exception/duplicate_screen_type_exception.js.map +1 -0
- package/dist/core/exception/empty_screens_block_exception.d.ts +11 -0
- package/dist/core/exception/empty_screens_block_exception.d.ts.map +1 -0
- package/dist/core/exception/empty_screens_block_exception.js +17 -0
- package/dist/core/exception/empty_screens_block_exception.js.map +1 -0
- package/dist/core/exception/flow_exceptions.d.ts +27 -0
- package/dist/core/exception/flow_exceptions.d.ts.map +1 -0
- package/dist/core/exception/flow_exceptions.js +37 -0
- package/dist/core/exception/flow_exceptions.js.map +1 -0
- package/dist/core/exception/index.d.ts +41 -0
- package/dist/core/exception/index.d.ts.map +1 -0
- package/dist/core/exception/index.js +53 -0
- package/dist/core/exception/index.js.map +1 -0
- package/dist/core/exception/invalid_consent_config_exception.d.ts +13 -0
- package/dist/core/exception/invalid_consent_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_consent_config_exception.js +18 -0
- package/dist/core/exception/invalid_consent_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_consent_information_exception.d.ts +14 -0
- package/dist/core/exception/invalid_consent_information_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_consent_information_exception.js +19 -0
- package/dist/core/exception/invalid_consent_information_exception.js.map +1 -0
- package/dist/core/exception/invalid_document_capture_config_exception.d.ts +14 -0
- package/dist/core/exception/invalid_document_capture_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_document_capture_config_exception.js +20 -0
- package/dist/core/exception/invalid_document_capture_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_field_value_exception.d.ts +16 -0
- package/dist/core/exception/invalid_field_value_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_field_value_exception.js +20 -0
- package/dist/core/exception/invalid_field_value_exception.js.map +1 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts +36 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.js +61 -0
- package/dist/core/exception/invalid_job_type_screen_config_exception.js.map +1 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.d.ts +11 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.js +17 -0
- package/dist/core/exception/invalid_missing_capture_type_exception.js.map +1 -0
- package/dist/core/exception/invalid_screen_order_exception.d.ts +17 -0
- package/dist/core/exception/invalid_screen_order_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_screen_order_exception.js +22 -0
- package/dist/core/exception/invalid_screen_order_exception.js.map +1 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts +14 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts.map +1 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.js +20 -0
- package/dist/core/exception/invalid_selfie_capture_config_exception.js.map +1 -0
- package/dist/core/exception/issue_severity.d.ts +14 -0
- package/dist/core/exception/issue_severity.d.ts.map +1 -0
- package/dist/core/exception/issue_severity.js +13 -0
- package/dist/core/exception/issue_severity.js.map +1 -0
- package/dist/core/exception/job_validation_exceptions.d.ts +12 -0
- package/dist/core/exception/job_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/job_validation_exceptions.js +12 -0
- package/dist/core/exception/job_validation_exceptions.js.map +1 -0
- package/dist/core/exception/liveness_frame_count_exception.d.ts +15 -0
- package/dist/core/exception/liveness_frame_count_exception.d.ts.map +1 -0
- package/dist/core/exception/liveness_frame_count_exception.js +19 -0
- package/dist/core/exception/liveness_frame_count_exception.js.map +1 -0
- package/dist/core/exception/missing_capture_for_preview_exception.d.ts +14 -0
- package/dist/core/exception/missing_capture_for_preview_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_capture_for_preview_exception.js +22 -0
- package/dist/core/exception/missing_capture_for_preview_exception.js.map +1 -0
- package/dist/core/exception/missing_job_type_exception.d.ts +11 -0
- package/dist/core/exception/missing_job_type_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_job_type_exception.js +17 -0
- package/dist/core/exception/missing_job_type_exception.js.map +1 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.d.ts +11 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.js +19 -0
- package/dist/core/exception/missing_ml_configuration_block_exception.js.map +1 -0
- package/dist/core/exception/missing_network_configuration_block_exception.d.ts +11 -0
- package/dist/core/exception/missing_network_configuration_block_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_network_configuration_block_exception.js +19 -0
- package/dist/core/exception/missing_network_configuration_block_exception.js.map +1 -0
- package/dist/core/exception/missing_partner_config_exception.d.ts +18 -0
- package/dist/core/exception/missing_partner_config_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_partner_config_exception.js +35 -0
- package/dist/core/exception/missing_partner_config_exception.js.map +1 -0
- package/dist/core/exception/missing_required_field_exception.d.ts +13 -0
- package/dist/core/exception/missing_required_field_exception.d.ts.map +1 -0
- package/dist/core/exception/missing_required_field_exception.js +18 -0
- package/dist/core/exception/missing_required_field_exception.js.map +1 -0
- package/dist/core/exception/screen_config_validation_exceptions.d.ts +11 -0
- package/dist/core/exception/screen_config_validation_exceptions.d.ts.map +1 -0
- package/dist/core/exception/screen_config_validation_exceptions.js +11 -0
- package/dist/core/exception/screen_config_validation_exceptions.js.map +1 -0
- package/dist/core/exception/use_smile_id_attestation_exception.d.ts +12 -0
- package/dist/core/exception/use_smile_id_attestation_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_attestation_exception.js +12 -0
- package/dist/core/exception/use_smile_id_attestation_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_builder_exception.d.ts +19 -0
- package/dist/core/exception/use_smile_id_builder_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_builder_exception.js +19 -0
- package/dist/core/exception/use_smile_id_builder_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_camera_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_camera_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_camera_exception.js +13 -0
- package/dist/core/exception/use_smile_id_camera_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_error_code.d.ts +78 -0
- package/dist/core/exception/use_smile_id_error_code.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_error_code.js +70 -0
- package/dist/core/exception/use_smile_id_error_code.js.map +1 -0
- package/dist/core/exception/use_smile_id_exception.d.ts +27 -0
- package/dist/core/exception/use_smile_id_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_exception.js +39 -0
- package/dist/core/exception/use_smile_id_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_general_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_general_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_general_exception.js +13 -0
- package/dist/core/exception/use_smile_id_general_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_network_exception.d.ts +117 -0
- package/dist/core/exception/use_smile_id_network_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_network_exception.js +203 -0
- package/dist/core/exception/use_smile_id_network_exception.js.map +1 -0
- package/dist/core/exception/use_smile_id_validation_exception.d.ts +13 -0
- package/dist/core/exception/use_smile_id_validation_exception.d.ts.map +1 -0
- package/dist/core/exception/use_smile_id_validation_exception.js +13 -0
- package/dist/core/exception/use_smile_id_validation_exception.js.map +1 -0
- package/dist/core/models/config.d.ts +35 -0
- package/dist/core/models/config.d.ts.map +1 -0
- package/dist/core/models/config.js +2 -0
- package/dist/core/models/config.js.map +1 -0
- package/dist/core/models/document_capture_mode.d.ts +34 -0
- package/dist/core/models/document_capture_mode.d.ts.map +1 -0
- package/dist/core/models/document_capture_mode.js +23 -0
- package/dist/core/models/document_capture_mode.js.map +1 -0
- package/dist/core/models/document_type.d.ts +52 -0
- package/dist/core/models/document_type.d.ts.map +1 -0
- package/dist/core/models/document_type.js +45 -0
- package/dist/core/models/document_type.js.map +1 -0
- package/dist/core/models/flow_step.d.ts +10 -0
- package/dist/core/models/flow_step.d.ts.map +1 -0
- package/dist/core/models/flow_step.js +16 -0
- package/dist/core/models/flow_step.js.map +1 -0
- package/dist/core/models/head_turn_direction.d.ts +11 -0
- package/dist/core/models/head_turn_direction.d.ts.map +1 -0
- package/dist/core/models/head_turn_direction.js +14 -0
- package/dist/core/models/head_turn_direction.js.map +1 -0
- package/dist/core/models/job_type.d.ts +34 -0
- package/dist/core/models/job_type.d.ts.map +1 -0
- package/dist/core/models/job_type.js +43 -0
- package/dist/core/models/job_type.js.map +1 -0
- package/dist/core/models/ml_config.d.ts +41 -0
- package/dist/core/models/ml_config.d.ts.map +1 -0
- package/dist/core/models/ml_config.js +27 -0
- package/dist/core/models/ml_config.js.map +1 -0
- package/dist/core/models/network_config.d.ts +127 -0
- package/dist/core/models/network_config.d.ts.map +1 -0
- package/dist/core/models/network_config.js +41 -0
- package/dist/core/models/network_config.js.map +1 -0
- package/dist/core/models/params.d.ts +92 -0
- package/dist/core/models/params.d.ts.map +1 -0
- package/dist/core/models/params.js +5 -0
- package/dist/core/models/params.js.map +1 -0
- package/dist/core/models/result.d.ts +29 -0
- package/dist/core/models/result.d.ts.map +1 -0
- package/dist/core/models/result.js +18 -0
- package/dist/core/models/result.js.map +1 -0
- package/dist/data/api/auth/token_holder.d.ts +40 -0
- package/dist/data/api/auth/token_holder.d.ts.map +1 -0
- package/dist/data/api/auth/token_holder.js +67 -0
- package/dist/data/api/auth/token_holder.js.map +1 -0
- package/dist/data/api/interceptors/gzip_interceptor.d.ts +21 -0
- package/dist/data/api/interceptors/gzip_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/gzip_interceptor.js +29 -0
- package/dist/data/api/interceptors/gzip_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/logging_interceptor.d.ts +26 -0
- package/dist/data/api/interceptors/logging_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/logging_interceptor.js +108 -0
- package/dist/data/api/interceptors/logging_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/sensitive_headers.d.ts +26 -0
- package/dist/data/api/interceptors/sensitive_headers.d.ts.map +1 -0
- package/dist/data/api/interceptors/sensitive_headers.js +42 -0
- package/dist/data/api/interceptors/sensitive_headers.js.map +1 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.d.ts +22 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.js +71 -0
- package/dist/data/api/interceptors/smile_auth_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts +39 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.js +66 -0
- package/dist/data/api/interceptors/smile_integrity_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts +34 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.js +66 -0
- package/dist/data/api/interceptors/smile_request_mac_interceptor.js.map +1 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.d.ts +45 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.d.ts.map +1 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.js +58 -0
- package/dist/data/api/interceptors/token_refresh_interceptor.js.map +1 -0
- package/dist/data/api/smile_id_api.d.ts +124 -0
- package/dist/data/api/smile_id_api.d.ts.map +1 -0
- package/dist/data/api/smile_id_api.js +371 -0
- package/dist/data/api/smile_id_api.js.map +1 -0
- package/dist/data/dsl/builder/cache_config_builder.d.ts +20 -0
- package/dist/data/dsl/builder/cache_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/cache_config_builder.js +23 -0
- package/dist/data/dsl/builder/cache_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/config_builder.d.ts +77 -0
- package/dist/data/dsl/builder/config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/config_builder.js +111 -0
- package/dist/data/dsl/builder/config_builder.js.map +1 -0
- package/dist/data/dsl/builder/interceptor_config_builder.d.ts +46 -0
- package/dist/data/dsl/builder/interceptor_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/interceptor_config_builder.js +69 -0
- package/dist/data/dsl/builder/interceptor_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/retry_config_builder.d.ts +21 -0
- package/dist/data/dsl/builder/retry_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/retry_config_builder.js +31 -0
- package/dist/data/dsl/builder/retry_config_builder.js.map +1 -0
- package/dist/data/dsl/builder/timeout_config_builder.d.ts +16 -0
- package/dist/data/dsl/builder/timeout_config_builder.d.ts.map +1 -0
- package/dist/data/dsl/builder/timeout_config_builder.js +22 -0
- package/dist/data/dsl/builder/timeout_config_builder.js.map +1 -0
- package/dist/data/dsl/use_smile_id_network_builder.d.ts +37 -0
- package/dist/data/dsl/use_smile_id_network_builder.d.ts.map +1 -0
- package/dist/data/dsl/use_smile_id_network_builder.js +66 -0
- package/dist/data/dsl/use_smile_id_network_builder.js.map +1 -0
- package/dist/data/factory/networking_factory.d.ts +53 -0
- package/dist/data/factory/networking_factory.d.ts.map +1 -0
- package/dist/data/factory/networking_factory.js +164 -0
- package/dist/data/factory/networking_factory.js.map +1 -0
- package/dist/data/model/image_dimensions.d.ts +16 -0
- package/dist/data/model/image_dimensions.d.ts.map +1 -0
- package/dist/data/model/image_dimensions.js +2 -0
- package/dist/data/model/image_dimensions.js.map +1 -0
- package/dist/data/model/job_request.d.ts +130 -0
- package/dist/data/model/job_request.d.ts.map +1 -0
- package/dist/data/model/job_request.js +2 -0
- package/dist/data/model/job_request.js.map +1 -0
- package/dist/data/model/job_submission_response.d.ts +18 -0
- package/dist/data/model/job_submission_response.d.ts.map +1 -0
- package/dist/data/model/job_submission_response.js +2 -0
- package/dist/data/model/job_submission_response.js.map +1 -0
- package/dist/data/model/sdk_config.d.ts +54 -0
- package/dist/data/model/sdk_config.d.ts.map +1 -0
- package/dist/data/model/sdk_config.js +68 -0
- package/dist/data/model/sdk_config.js.map +1 -0
- package/dist/data/model/sdk_config_capture.d.ts +39 -0
- package/dist/data/model/sdk_config_capture.d.ts.map +1 -0
- package/dist/data/model/sdk_config_capture.js +69 -0
- package/dist/data/model/sdk_config_capture.js.map +1 -0
- package/dist/data/model/sdk_config_source.d.ts +25 -0
- package/dist/data/model/sdk_config_source.d.ts.map +1 -0
- package/dist/data/model/sdk_config_source.js +24 -0
- package/dist/data/model/sdk_config_source.js.map +1 -0
- package/dist/data/repository/use_smile_id_repository.d.ts +19 -0
- package/dist/data/repository/use_smile_id_repository.d.ts.map +1 -0
- package/dist/data/repository/use_smile_id_repository.js +2 -0
- package/dist/data/repository/use_smile_id_repository.js.map +1 -0
- package/dist/data/repository/use_smile_id_repository_impl.d.ts +29 -0
- package/dist/data/repository/use_smile_id_repository_impl.d.ts.map +1 -0
- package/dist/data/repository/use_smile_id_repository_impl.js +75 -0
- package/dist/data/repository/use_smile_id_repository_impl.js.map +1 -0
- package/dist/data/security/request_canonicalizer.d.ts +4 -0
- package/dist/data/security/request_canonicalizer.d.ts.map +1 -0
- package/dist/data/security/request_canonicalizer.js +120 -0
- package/dist/data/security/request_canonicalizer.js.map +1 -0
- package/dist/data/security/request_timestamp.d.ts +11 -0
- package/dist/data/security/request_timestamp.d.ts.map +1 -0
- package/dist/data/security/request_timestamp.js +13 -0
- package/dist/data/security/request_timestamp.js.map +1 -0
- package/dist/data/security/signing_crypto.d.ts +25 -0
- package/dist/data/security/signing_crypto.d.ts.map +1 -0
- package/dist/data/security/signing_crypto.js +145 -0
- package/dist/data/security/signing_crypto.js.map +1 -0
- package/dist/data/security/smile_id_crypto_error.d.ts +11 -0
- package/dist/data/security/smile_id_crypto_error.d.ts.map +1 -0
- package/dist/data/security/smile_id_crypto_error.js +14 -0
- package/dist/data/security/smile_id_crypto_error.js.map +1 -0
- package/dist/data/security/smile_id_crypto_manager.d.ts +30 -0
- package/dist/data/security/smile_id_crypto_manager.d.ts.map +1 -0
- package/dist/data/security/smile_id_crypto_manager.js +40 -0
- package/dist/data/security/smile_id_crypto_manager.js.map +1 -0
- package/dist/data/smile_id_urls.d.ts +12 -0
- package/dist/data/smile_id_urls.d.ts.map +1 -0
- package/dist/data/smile_id_urls.js +14 -0
- package/dist/data/smile_id_urls.js.map +1 -0
- package/dist/data/util/retry_util.d.ts +27 -0
- package/dist/data/util/retry_util.d.ts.map +1 -0
- package/dist/data/util/retry_util.js +68 -0
- package/dist/data/util/retry_util.js.map +1 -0
- package/dist/data/util/use_smile_id_token_decoder.d.ts +33 -0
- package/dist/data/util/use_smile_id_token_decoder.d.ts.map +1 -0
- package/dist/data/util/use_smile_id_token_decoder.js +102 -0
- package/dist/data/util/use_smile_id_token_decoder.js.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/l10n/strings_en.d.ts +131 -0
- package/dist/l10n/strings_en.d.ts.map +1 -0
- package/dist/l10n/strings_en.js +141 -0
- package/dist/l10n/strings_en.js.map +1 -0
- package/dist/l10n/use_smile_id_localizations.d.ts +173 -0
- package/dist/l10n/use_smile_id_localizations.d.ts.map +1 -0
- package/dist/l10n/use_smile_id_localizations.js +487 -0
- package/dist/l10n/use_smile_id_localizations.js.map +1 -0
- package/dist/l10n/use_smile_id_localizations_provider.d.ts +26 -0
- package/dist/l10n/use_smile_id_localizations_provider.d.ts.map +1 -0
- package/dist/l10n/use_smile_id_localizations_provider.js +53 -0
- package/dist/l10n/use_smile_id_localizations_provider.js.map +1 -0
- package/dist/metadata/document_image_origin.d.ts +20 -0
- package/dist/metadata/document_image_origin.d.ts.map +1 -0
- package/dist/metadata/document_image_origin.js +19 -0
- package/dist/metadata/document_image_origin.js.map +1 -0
- package/dist/metadata/optional_native_modules.d.ts +85 -0
- package/dist/metadata/optional_native_modules.d.ts.map +1 -0
- package/dist/metadata/optional_native_modules.js +101 -0
- package/dist/metadata/optional_native_modules.js.map +1 -0
- package/dist/metadata/use_smile_id_metadata.d.ts +69 -0
- package/dist/metadata/use_smile_id_metadata.d.ts.map +1 -0
- package/dist/metadata/use_smile_id_metadata.js +116 -0
- package/dist/metadata/use_smile_id_metadata.js.map +1 -0
- package/dist/metadata/use_smile_id_metadata_factory.d.ts +82 -0
- package/dist/metadata/use_smile_id_metadata_factory.d.ts.map +1 -0
- package/dist/metadata/use_smile_id_metadata_factory.js +320 -0
- package/dist/metadata/use_smile_id_metadata_factory.js.map +1 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.d.ts +17 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.d.ts.map +1 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.js +21 -0
- package/dist/presentation/assets/svg/instruction_svg_strings.js.map +1 -0
- package/dist/presentation/assets/svg/svg_strings.d.ts +29 -0
- package/dist/presentation/assets/svg/svg_strings.d.ts.map +1 -0
- package/dist/presentation/assets/svg/svg_strings.js +140 -0
- package/dist/presentation/assets/svg/svg_strings.js.map +1 -0
- package/dist/presentation/components/face_oval_defaults.d.ts +41 -0
- package/dist/presentation/components/face_oval_defaults.d.ts.map +1 -0
- package/dist/presentation/components/face_oval_defaults.js +41 -0
- package/dist/presentation/components/face_oval_defaults.js.map +1 -0
- package/dist/presentation/components/helpers/animated_lottie_view.d.ts +9 -0
- package/dist/presentation/components/helpers/animated_lottie_view.d.ts.map +1 -0
- package/dist/presentation/components/helpers/animated_lottie_view.js +9 -0
- package/dist/presentation/components/helpers/animated_lottie_view.js.map +1 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts +26 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts.map +1 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.js +47 -0
- package/dist/presentation/components/helpers/capture_instruction_animation_spec.js.map +1 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts +70 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts.map +1 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js +49 -0
- package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js.map +1 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts +24 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts.map +1 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.js +29 -0
- package/dist/presentation/components/helpers/scaled_oval_geometry.js.map +1 -0
- package/dist/presentation/components/icons/index.d.ts +82 -0
- package/dist/presentation/components/icons/index.d.ts.map +1 -0
- package/dist/presentation/components/icons/index.js +97 -0
- package/dist/presentation/components/icons/index.js.map +1 -0
- package/dist/presentation/components/status_indicator_state.d.ts +20 -0
- package/dist/presentation/components/status_indicator_state.d.ts.map +1 -0
- package/dist/presentation/components/status_indicator_state.js +19 -0
- package/dist/presentation/components/status_indicator_state.js.map +1 -0
- package/dist/presentation/components/use_smile_id_attribution.d.ts +19 -0
- package/dist/presentation/components/use_smile_id_attribution.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_attribution.js +25 -0
- package/dist/presentation/components/use_smile_id_attribution.js.map +1 -0
- package/dist/presentation/components/use_smile_id_back_button.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_back_button.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_back_button.js +38 -0
- package/dist/presentation/components/use_smile_id_back_button.js.map +1 -0
- package/dist/presentation/components/use_smile_id_button.d.ts +20 -0
- package/dist/presentation/components/use_smile_id_button.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_button.js +63 -0
- package/dist/presentation/components/use_smile_id_button.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_content.d.ts +58 -0
- package/dist/presentation/components/use_smile_id_capture_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_content.js +131 -0
- package/dist/presentation/components/use_smile_id_capture_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts +20 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.js +50 -0
- package/dist/presentation/components/use_smile_id_capture_instruction_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.d.ts +9 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.js +30 -0
- package/dist/presentation/components/use_smile_id_capture_spinner.js.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +23 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.js +41 -0
- package/dist/presentation/components/use_smile_id_captured_document_image.js.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts +41 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.js +63 -0
- package/dist/presentation/components/use_smile_id_captured_image_oval.js.map +1 -0
- package/dist/presentation/components/use_smile_id_card_surface.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_card_surface.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_card_surface.js +37 -0
- package/dist/presentation/components/use_smile_id_card_surface.js.map +1 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.js +48 -0
- package/dist/presentation/components/use_smile_id_confirmation_buttons.js.map +1 -0
- package/dist/presentation/components/use_smile_id_consent_row.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_consent_row.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_consent_row.js +32 -0
- package/dist/presentation/components/use_smile_id_consent_row.js.map +1 -0
- package/dist/presentation/components/use_smile_id_content_card.d.ts +21 -0
- package/dist/presentation/components/use_smile_id_content_card.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_content_card.js +41 -0
- package/dist/presentation/components/use_smile_id_content_card.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts +27 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.js +77 -0
- package/dist/presentation/components/use_smile_id_document_capture_controls.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.js +17 -0
- package/dist/presentation/components/use_smile_id_document_frame_glyph.js.map +1 -0
- package/dist/presentation/components/use_smile_id_document_overlay.d.ts +25 -0
- package/dist/presentation/components/use_smile_id_document_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_document_overlay.js +118 -0
- package/dist/presentation/components/use_smile_id_document_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js +91 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js +74 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts +25 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js +21 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts +13 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js +14 -0
- package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js.map +1 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.d.ts +22 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.js +55 -0
- package/dist/presentation/components/use_smile_id_expandable_icon.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.js +41 -0
- package/dist/presentation/components/use_smile_id_face_oval_image.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_overlay.d.ts +23 -0
- package/dist/presentation/components/use_smile_id_face_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_overlay.js +194 -0
- package/dist/presentation/components/use_smile_id_face_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js +19 -0
- package/dist/presentation/components/use_smile_id_face_silhouette_overlay.js.map +1 -0
- package/dist/presentation/components/use_smile_id_failed_content.d.ts +19 -0
- package/dist/presentation/components/use_smile_id_failed_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_failed_content.js +44 -0
- package/dist/presentation/components/use_smile_id_failed_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts +12 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.js +96 -0
- package/dist/presentation/components/use_smile_id_guideline_thumbnail.js.map +1 -0
- package/dist/presentation/components/use_smile_id_instruction_card.d.ts +31 -0
- package/dist/presentation/components/use_smile_id_instruction_card.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_instruction_card.js +43 -0
- package/dist/presentation/components/use_smile_id_instruction_card.js.map +1 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.js +144 -0
- package/dist/presentation/components/use_smile_id_instructions_hero.js.map +1 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.d.ts +24 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.js +70 -0
- package/dist/presentation/components/use_smile_id_learn_more_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_content.d.ts +14 -0
- package/dist/presentation/components/use_smile_id_loading_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_content.js +31 -0
- package/dist/presentation/components/use_smile_id_loading_content.js.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.d.ts +15 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.js +48 -0
- package/dist/presentation/components/use_smile_id_loading_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts +12 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.js +45 -0
- package/dist/presentation/components/use_smile_id_oval_border_palette.js.map +1 -0
- package/dist/presentation/components/use_smile_id_partner_icon.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_partner_icon.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_partner_icon.js +34 -0
- package/dist/presentation/components/use_smile_id_partner_icon.js.map +1 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts +26 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.js +44 -0
- package/dist/presentation/components/use_smile_id_processing_center_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts +18 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.js +41 -0
- package/dist/presentation/components/use_smile_id_rounded_checkbox.js.map +1 -0
- package/dist/presentation/components/use_smile_id_status_indicator.d.ts +16 -0
- package/dist/presentation/components/use_smile_id_status_indicator.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_status_indicator.js +22 -0
- package/dist/presentation/components/use_smile_id_status_indicator.js.map +1 -0
- package/dist/presentation/components/use_smile_id_success_content.d.ts +17 -0
- package/dist/presentation/components/use_smile_id_success_content.d.ts.map +1 -0
- package/dist/presentation/components/use_smile_id_success_content.js +39 -0
- package/dist/presentation/components/use_smile_id_success_content.js.map +1 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts +77 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts.map +1 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js +71 -0
- package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js.map +1 -0
- package/dist/presentation/flow/config/flow_configuration.d.ts +12 -0
- package/dist/presentation/flow/config/flow_configuration.d.ts.map +1 -0
- package/dist/presentation/flow/config/flow_configuration.js +2 -0
- package/dist/presentation/flow/config/flow_configuration.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/config_builder.d.ts +15 -0
- package/dist/presentation/flow/dsl/builder/config_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/config_builder.js +20 -0
- package/dist/presentation/flow/dsl/builder/config_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.d.ts +80 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.js +163 -0
- package/dist/presentation/flow/dsl/builder/ml_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.d.ts +122 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.js +119 -0
- package/dist/presentation/flow/dsl/builder/screens_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.d.ts +44 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.js +70 -0
- package/dist/presentation/flow/dsl/builder/theme_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/flow_build_result.d.ts +35 -0
- package/dist/presentation/flow/dsl/flow_build_result.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/flow_build_result.js +2 -0
- package/dist/presentation/flow/dsl/flow_build_result.js.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts +59 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.js +49 -0
- package/dist/presentation/flow/dsl/use_smile_id_builder.js.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts +241 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts.map +1 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js +308 -0
- package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js.map +1 -0
- package/dist/presentation/flow/flow_navigation_context.d.ts +17 -0
- package/dist/presentation/flow/flow_navigation_context.d.ts.map +1 -0
- package/dist/presentation/flow/flow_navigation_context.js +34 -0
- package/dist/presentation/flow/flow_navigation_context.js.map +1 -0
- package/dist/presentation/flow/flow_navigation_manager.d.ts +217 -0
- package/dist/presentation/flow/flow_navigation_manager.d.ts.map +1 -0
- package/dist/presentation/flow/flow_navigation_manager.js +766 -0
- package/dist/presentation/flow/flow_navigation_manager.js.map +1 -0
- package/dist/presentation/flow/graph/screen_renderer.d.ts +16 -0
- package/dist/presentation/flow/graph/screen_renderer.d.ts.map +1 -0
- package/dist/presentation/flow/graph/screen_renderer.js +31 -0
- package/dist/presentation/flow/graph/screen_renderer.js.map +1 -0
- package/dist/presentation/flow/job_submission_state.d.ts +23 -0
- package/dist/presentation/flow/job_submission_state.d.ts.map +1 -0
- package/dist/presentation/flow/job_submission_state.js +2 -0
- package/dist/presentation/flow/job_submission_state.js.map +1 -0
- package/dist/presentation/flow/model/instruction_guideline.d.ts +17 -0
- package/dist/presentation/flow/model/instruction_guideline.d.ts.map +1 -0
- package/dist/presentation/flow/model/instruction_guideline.js +2 -0
- package/dist/presentation/flow/model/instruction_guideline.js.map +1 -0
- package/dist/presentation/flow/model/instructions_defaults.d.ts +27 -0
- package/dist/presentation/flow/model/instructions_defaults.d.ts.map +1 -0
- package/dist/presentation/flow/model/instructions_defaults.js +82 -0
- package/dist/presentation/flow/model/instructions_defaults.js.map +1 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.d.ts +25 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.d.ts.map +1 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.js +65 -0
- package/dist/presentation/flow/screen/helpers/face_session_config.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts +13 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.js +203 -0
- package/dist/presentation/flow/screen/orchestrated_capture_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts +14 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.js +47 -0
- package/dist/presentation/flow/screen/orchestrated_consent_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.js +47 -0
- package/dist/presentation/flow/screen/orchestrated_instructions_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.js +40 -0
- package/dist/presentation/flow/screen/orchestrated_preview_screen.js.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts +11 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.js +59 -0
- package/dist/presentation/flow/screen/orchestrated_processing_screen.js.map +1 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts +23 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts.map +1 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js +22 -0
- package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js.map +1 -0
- package/dist/presentation/flow/screen/validation_error_screen.d.ts +12 -0
- package/dist/presentation/flow/screen/validation_error_screen.d.ts.map +1 -0
- package/dist/presentation/flow/screen/validation_error_screen.js +87 -0
- package/dist/presentation/flow/screen/validation_error_screen.js.map +1 -0
- package/dist/presentation/flow/use_smile_id_flow.d.ts +54 -0
- package/dist/presentation/flow/use_smile_id_flow.d.ts.map +1 -0
- package/dist/presentation/flow/use_smile_id_flow.js +264 -0
- package/dist/presentation/flow/use_smile_id_flow.js.map +1 -0
- package/dist/presentation/flow/validation/flow_validator.d.ts +107 -0
- package/dist/presentation/flow/validation/flow_validator.d.ts.map +1 -0
- package/dist/presentation/flow/validation/flow_validator.js +286 -0
- package/dist/presentation/flow/validation/flow_validator.js.map +1 -0
- package/dist/presentation/flow/validation/job_type_validator.d.ts +124 -0
- package/dist/presentation/flow/validation/job_type_validator.d.ts.map +1 -0
- package/dist/presentation/flow/validation/job_type_validator.js +420 -0
- package/dist/presentation/flow/validation/job_type_validator.js.map +1 -0
- package/dist/presentation/flow/validation/validation_state.d.ts +59 -0
- package/dist/presentation/flow/validation/validation_state.d.ts.map +1 -0
- package/dist/presentation/flow/validation/validation_state.js +23 -0
- package/dist/presentation/flow/validation/validation_state.js.map +1 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts +29 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.js +133 -0
- package/dist/presentation/screen/helpers/capture_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/capture_ui_state.d.ts +54 -0
- package/dist/presentation/screen/helpers/capture_ui_state.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/capture_ui_state.js +179 -0
- package/dist/presentation/screen/helpers/capture_ui_state.js.map +1 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts +39 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.js +68 -0
- package/dist/presentation/screen/helpers/consent_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts +27 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.js +53 -0
- package/dist/presentation/screen/helpers/ess_turn_haptics.js.map +1 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.d.ts +37 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.js +77 -0
- package/dist/presentation/screen/helpers/feedback_debouncer.js.map +1 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts +43 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.js +50 -0
- package/dist/presentation/screen/helpers/instructions_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts +29 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.js +27 -0
- package/dist/presentation/screen/helpers/preview_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts +13 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.js +12 -0
- package/dist/presentation/screen/helpers/processing_screen_helpers.js.map +1 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts +21 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js +104 -0
- package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js.map +1 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +16 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +37 -0
- package/dist/presentation/screen/helpers/use_capture_orientation_lock.js.map +1 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts +9 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.js +44 -0
- package/dist/presentation/screen/helpers/use_debounced_feedback_key.js.map +1 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts +24 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.d.ts.map +1 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.js +47 -0
- package/dist/presentation/screen/helpers/use_document_orientation_lock.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +71 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.js +438 -0
- package/dist/presentation/screen/use_smile_id_capture_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.d.ts +56 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.js +175 -0
- package/dist/presentation/screen/use_smile_id_consent_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts +24 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.js +51 -0
- package/dist/presentation/screen/use_smile_id_document_back_instructions.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts +24 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.js +64 -0
- package/dist/presentation/screen/use_smile_id_document_preview_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts +39 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.js +65 -0
- package/dist/presentation/screen/use_smile_id_instructions_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.d.ts +16 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.js +28 -0
- package/dist/presentation/screen/use_smile_id_permission_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.d.ts +42 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.js +81 -0
- package/dist/presentation/screen/use_smile_id_preview_screen.js.map +1 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +55 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.d.ts.map +1 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.js +84 -0
- package/dist/presentation/screen/use_smile_id_processing_screen.js.map +1 -0
- package/dist/presentation/state/processing_state.d.ts +25 -0
- package/dist/presentation/state/processing_state.d.ts.map +1 -0
- package/dist/presentation/state/processing_state.js +2 -0
- package/dist/presentation/state/processing_state.js.map +1 -0
- package/dist/presentation/state/use_smile_id_overlay_state.d.ts +44 -0
- package/dist/presentation/state/use_smile_id_overlay_state.d.ts.map +1 -0
- package/dist/presentation/state/use_smile_id_overlay_state.js +56 -0
- package/dist/presentation/state/use_smile_id_overlay_state.js.map +1 -0
- package/dist/presentation/theme/theme.d.ts +131 -0
- package/dist/presentation/theme/theme.d.ts.map +1 -0
- package/dist/presentation/theme/theme.js +224 -0
- package/dist/presentation/theme/theme.js.map +1 -0
- package/dist/presentation/theme/theme_context.d.ts +14 -0
- package/dist/presentation/theme/theme_context.d.ts.map +1 -0
- package/dist/presentation/theme/theme_context.js +31 -0
- package/dist/presentation/theme/theme_context.js.map +1 -0
- package/dist/presentation/theme/use_smile_id_motion.d.ts +13 -0
- package/dist/presentation/theme/use_smile_id_motion.d.ts.map +1 -0
- package/dist/presentation/theme/use_smile_id_motion.js +13 -0
- package/dist/presentation/theme/use_smile_id_motion.js.map +1 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.d.ts +14 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.d.ts.map +1 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.js +64 -0
- package/dist/presentation/theme/use_use_smile_id_fonts.js.map +1 -0
- package/dist/presentation/utils/force_max_brightness.d.ts +46 -0
- package/dist/presentation/utils/force_max_brightness.d.ts.map +1 -0
- package/dist/presentation/utils/force_max_brightness.js +105 -0
- package/dist/presentation/utils/force_max_brightness.js.map +1 -0
- package/dist/presentation/utils/locale_utils.d.ts +25 -0
- package/dist/presentation/utils/locale_utils.d.ts.map +1 -0
- package/dist/presentation/utils/locale_utils.js +66 -0
- package/dist/presentation/utils/locale_utils.js.map +1 -0
- package/dist/presentation/utils/use_reduced_motion.d.ts +3 -0
- package/dist/presentation/utils/use_reduced_motion.d.ts.map +1 -0
- package/dist/presentation/utils/use_reduced_motion.js +24 -0
- package/dist/presentation/utils/use_reduced_motion.js.map +1 -0
- package/package.json +113 -0
- package/src/__tests__/dsl.test.ts +1115 -0
- package/src/__tests__/enum_parity.test.ts +84 -0
- package/src/__tests__/react_native_mock.tsx +210 -0
- package/src/__tests__/setup_react_native.ts +353 -0
- package/src/__tests__/theme.test.ts +156 -0
- package/src/camera/__tests__/camera_defaults.test.ts +28 -0
- package/src/camera/__tests__/camera_lens.test.ts +18 -0
- package/src/camera/__tests__/document_resize_target.test.ts +44 -0
- package/src/camera/__tests__/focus_state.test.ts +48 -0
- package/src/camera/__tests__/orientation_degrees.test.ts +21 -0
- package/src/camera/__tests__/use_smile_id_frame_stream.test.ts +227 -0
- package/src/camera/camera_configuration.ts +32 -0
- package/src/camera/camera_defaults.ts +23 -0
- package/src/camera/camera_lens.ts +13 -0
- package/src/camera/camera_permissions.ts +36 -0
- package/src/camera/camera_preview_image.ts +19 -0
- package/src/camera/document_image_pipeline.ts +101 -0
- package/src/camera/document_resize_target.ts +22 -0
- package/src/camera/focus_state.ts +26 -0
- package/src/camera/orientation_degrees.ts +22 -0
- package/src/camera/use_smile_id_camera_preview.tsx +256 -0
- package/src/camera/use_smile_id_camera_system.ts +236 -0
- package/src/camera/use_smile_id_frame_stream.ts +189 -0
- package/src/core/exception/__tests__/network_exception_mapper.test.ts +179 -0
- package/src/core/exception/builder_validation_exception.ts +40 -0
- package/src/core/exception/capture_validation_exceptions.ts +8 -0
- package/src/core/exception/consent_validation_exceptions.ts +7 -0
- package/src/core/exception/duplicate_screen_type_exception.ts +22 -0
- package/src/core/exception/empty_screens_block_exception.ts +19 -0
- package/src/core/exception/flow_exceptions.test.ts +39 -0
- package/src/core/exception/flow_exceptions.ts +42 -0
- package/src/core/exception/index.ts +73 -0
- package/src/core/exception/invalid_consent_config_exception.ts +20 -0
- package/src/core/exception/invalid_consent_information_exception.ts +21 -0
- package/src/core/exception/invalid_document_capture_config_exception.ts +22 -0
- package/src/core/exception/invalid_field_value_exception.ts +21 -0
- package/src/core/exception/invalid_job_type_screen_config_exception.ts +70 -0
- package/src/core/exception/invalid_missing_capture_type_exception.ts +19 -0
- package/src/core/exception/invalid_screen_order_exception.ts +28 -0
- package/src/core/exception/invalid_selfie_capture_config_exception.ts +22 -0
- package/src/core/exception/issue_severity.ts +14 -0
- package/src/core/exception/job_validation_exceptions.ts +11 -0
- package/src/core/exception/liveness_frame_count_exception.ts +21 -0
- package/src/core/exception/missing_capture_for_preview_exception.ts +24 -0
- package/src/core/exception/missing_job_type_exception.ts +20 -0
- package/src/core/exception/missing_ml_configuration_block_exception.ts +21 -0
- package/src/core/exception/missing_network_configuration_block_exception.ts +22 -0
- package/src/core/exception/missing_partner_config_exception.ts +38 -0
- package/src/core/exception/missing_required_field_exception.ts +19 -0
- package/src/core/exception/screen_config_validation_exceptions.ts +10 -0
- package/src/core/exception/use_smile_id_attestation_exception.ts +11 -0
- package/src/core/exception/use_smile_id_builder_exception.ts +18 -0
- package/src/core/exception/use_smile_id_camera_exception.ts +12 -0
- package/src/core/exception/use_smile_id_error_code.ts +83 -0
- package/src/core/exception/use_smile_id_exception.ts +52 -0
- package/src/core/exception/use_smile_id_general_exception.ts +12 -0
- package/src/core/exception/use_smile_id_network_exception.ts +279 -0
- package/src/core/exception/use_smile_id_validation_exception.ts +12 -0
- package/src/core/models/__tests__/document_capture_mode.test.ts +43 -0
- package/src/core/models/__tests__/document_type.test.ts +64 -0
- package/src/core/models/__tests__/job_type.test.ts +48 -0
- package/src/core/models/config.ts +36 -0
- package/src/core/models/document_capture_mode.ts +46 -0
- package/src/core/models/document_type.ts +77 -0
- package/src/core/models/flow_step.ts +17 -0
- package/src/core/models/head_turn_direction.ts +15 -0
- package/src/core/models/job_type.ts +53 -0
- package/src/core/models/ml_config.ts +47 -0
- package/src/core/models/network_config.ts +138 -0
- package/src/core/models/params.ts +98 -0
- package/src/core/models/result.test.ts +20 -0
- package/src/core/models/result.ts +32 -0
- package/src/data/api/__tests__/smile_id_api.test.ts +1197 -0
- package/src/data/api/auth/token_holder.ts +72 -0
- package/src/data/api/interceptors/__tests__/logging_interceptor.test.ts +252 -0
- package/src/data/api/interceptors/__tests__/sensitive_headers.test.ts +29 -0
- package/src/data/api/interceptors/__tests__/smile_integrity_interceptor.test.ts +156 -0
- package/src/data/api/interceptors/__tests__/smile_request_mac_interceptor.test.ts +98 -0
- package/src/data/api/interceptors/__tests__/token_refresh_interceptor.test.ts +173 -0
- package/src/data/api/interceptors/gzip_interceptor.ts +31 -0
- package/src/data/api/interceptors/logging_interceptor.ts +155 -0
- package/src/data/api/interceptors/sensitive_headers.ts +46 -0
- package/src/data/api/interceptors/smile_auth_interceptor.ts +88 -0
- package/src/data/api/interceptors/smile_integrity_interceptor.ts +79 -0
- package/src/data/api/interceptors/smile_request_mac_interceptor.ts +93 -0
- package/src/data/api/interceptors/token_refresh_interceptor.ts +122 -0
- package/src/data/api/smile_id_api.ts +488 -0
- package/src/data/dsl/builder/__tests__/interceptor_config_builder.test.ts +173 -0
- package/src/data/dsl/builder/cache_config_builder.ts +26 -0
- package/src/data/dsl/builder/config_builder.ts +125 -0
- package/src/data/dsl/builder/interceptor_config_builder.ts +81 -0
- package/src/data/dsl/builder/retry_config_builder.ts +36 -0
- package/src/data/dsl/builder/timeout_config_builder.ts +24 -0
- package/src/data/dsl/use_smile_id_network_builder.ts +69 -0
- package/src/data/factory/__tests__/networking_factory_order.test.ts +201 -0
- package/src/data/factory/__tests__/signed_job_submission_headers.test.ts +110 -0
- package/src/data/factory/networking_factory.ts +188 -0
- package/src/data/model/__tests__/sdk_config.test.ts +85 -0
- package/src/data/model/__tests__/sdk_config_capture.test.ts +140 -0
- package/src/data/model/image_dimensions.ts +15 -0
- package/src/data/model/job_request.ts +150 -0
- package/src/data/model/job_submission_response.ts +17 -0
- package/src/data/model/sdk_config.ts +74 -0
- package/src/data/model/sdk_config_capture.ts +78 -0
- package/src/data/model/sdk_config_source.ts +26 -0
- package/src/data/repository/__tests__/use_smile_id_repository.test.ts +118 -0
- package/src/data/repository/use_smile_id_repository.ts +19 -0
- package/src/data/repository/use_smile_id_repository_impl.ts +94 -0
- package/src/data/security/__tests__/smile_id_crypto_manager.test.ts +158 -0
- package/src/data/security/request_canonicalizer.ts +148 -0
- package/src/data/security/request_timestamp.ts +12 -0
- package/src/data/security/signing_crypto.ts +219 -0
- package/src/data/security/smile_id_crypto_error.ts +13 -0
- package/src/data/security/smile_id_crypto_manager.ts +46 -0
- package/src/data/smile_id_urls.ts +13 -0
- package/src/data/util/__tests__/retry_util.test.ts +157 -0
- package/src/data/util/__tests__/use_smile_id_token_decoder.test.ts +195 -0
- package/src/data/util/retry_util.ts +72 -0
- package/src/data/util/use_smile_id_token_decoder.ts +138 -0
- package/src/index.ts +512 -0
- package/src/l10n/__tests__/use_smile_id_localizations.test.ts +127 -0
- package/src/l10n/strings_en.ts +171 -0
- package/src/l10n/use_smile_id_localizations.ts +688 -0
- package/src/l10n/use_smile_id_localizations_provider.tsx +71 -0
- package/src/metadata/__tests__/use_smile_id_metadata.test.ts +436 -0
- package/src/metadata/document_image_origin.ts +22 -0
- package/src/metadata/optional_native_modules.ts +120 -0
- package/src/metadata/use_smile_id_metadata.ts +182 -0
- package/src/metadata/use_smile_id_metadata_factory.ts +385 -0
- package/src/presentation/assets/fonts/DMSans-Bold.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-ExtraBold.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-Medium.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-Regular.ttf +0 -0
- package/src/presentation/assets/fonts/DMSans-SemiBold.ttf +0 -0
- package/src/presentation/assets/fonts/OFL.txt +93 -0
- package/src/presentation/assets/si_dark_lighting_animation.json +927 -0
- package/src/presentation/assets/si_device_orientation_animation.json +850 -0
- package/src/presentation/assets/si_document_green_book_hero_animation.json +4668 -0
- package/src/presentation/assets/si_document_hero_animation.json +4799 -0
- package/src/presentation/assets/si_document_hero_back_animation.json +2039 -0
- package/src/presentation/assets/si_document_passport_hero_animation.json +14491 -0
- package/src/presentation/assets/si_ess_animation_all_directions.json +5575 -0
- package/src/presentation/assets/si_selfie_hero_animation.json +1439 -0
- package/src/presentation/assets/si_smile_to_capture_animation.json +1439 -0
- package/src/presentation/assets/svg/instruction_svg_strings.ts +32 -0
- package/src/presentation/assets/svg/si_attribution.svg +19 -0
- package/src/presentation/assets/svg/si_attribution_dark.svg +19 -0
- package/src/presentation/assets/svg/si_checkbox_check.svg +3 -0
- package/src/presentation/assets/svg/si_consent_biometric.svg +9 -0
- package/src/presentation/assets/svg/si_consent_biometric_dark.svg +9 -0
- package/src/presentation/assets/svg/si_consent_contact.svg +8 -0
- package/src/presentation/assets/svg/si_consent_contact_dark.svg +8 -0
- package/src/presentation/assets/svg/si_consent_device.svg +12 -0
- package/src/presentation/assets/svg/si_consent_device_dark.svg +12 -0
- package/src/presentation/assets/svg/si_consent_personal.svg +6 -0
- package/src/presentation/assets/svg/si_consent_personal_dark.svg +6 -0
- package/src/presentation/assets/svg/si_expand_more.svg +3 -0
- package/src/presentation/assets/svg/si_plus.svg +4 -0
- package/src/presentation/assets/svg/si_smile_consent_icon.svg +4 -0
- package/src/presentation/assets/svg/svg_strings.ts +158 -0
- package/src/presentation/components/__tests__/capture_instruction_animation_spec.test.ts +49 -0
- package/src/presentation/components/__tests__/enhanced_smart_selfie_animation_frames.test.ts +91 -0
- package/src/presentation/components/__tests__/use_smile_id_capture_content.test.tsx +348 -0
- package/src/presentation/components/__tests__/use_smile_id_confirmation_buttons.test.tsx +131 -0
- package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_clip.test.tsx +252 -0
- package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_direction_animation.test.tsx +138 -0
- package/src/presentation/components/__tests__/use_smile_id_face_overlay.test.tsx +211 -0
- package/src/presentation/components/__tests__/use_smile_id_guideline_thumbnail.test.tsx +79 -0
- package/src/presentation/components/__tests__/use_smile_id_instructions_hero.test.tsx +79 -0
- package/src/presentation/components/__tests__/use_smile_id_loading_indicator.test.tsx +45 -0
- package/src/presentation/components/__tests__/use_smile_id_oval_border_palette.test.ts +101 -0
- package/src/presentation/components/face_oval_defaults.ts +51 -0
- package/src/presentation/components/helpers/__tests__/scaled_oval_geometry.test.ts +69 -0
- package/src/presentation/components/helpers/animated_lottie_view.ts +9 -0
- package/src/presentation/components/helpers/capture_instruction_animation_spec.ts +77 -0
- package/src/presentation/components/helpers/enhanced_smart_selfie_animation_frames.ts +70 -0
- package/src/presentation/components/helpers/scaled_oval_geometry.ts +44 -0
- package/src/presentation/components/icons/index.tsx +287 -0
- package/src/presentation/components/status_indicator_state.ts +21 -0
- package/src/presentation/components/use_smile_id_attribution.tsx +48 -0
- package/src/presentation/components/use_smile_id_back_button.tsx +59 -0
- package/src/presentation/components/use_smile_id_button.tsx +93 -0
- package/src/presentation/components/use_smile_id_capture_content.tsx +344 -0
- package/src/presentation/components/use_smile_id_capture_instruction_animation.tsx +84 -0
- package/src/presentation/components/use_smile_id_capture_spinner.tsx +63 -0
- package/src/presentation/components/use_smile_id_captured_document_image.tsx +86 -0
- package/src/presentation/components/use_smile_id_captured_image_oval.tsx +151 -0
- package/src/presentation/components/use_smile_id_card_surface.tsx +54 -0
- package/src/presentation/components/use_smile_id_confirmation_buttons.tsx +123 -0
- package/src/presentation/components/use_smile_id_consent_row.tsx +58 -0
- package/src/presentation/components/use_smile_id_content_card.tsx +65 -0
- package/src/presentation/components/use_smile_id_document_capture_controls.tsx +155 -0
- package/src/presentation/components/use_smile_id_document_frame_glyph.tsx +162 -0
- package/src/presentation/components/use_smile_id_document_overlay.tsx +245 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_clip.tsx +152 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.tsx +46 -0
- package/src/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.tsx +29 -0
- package/src/presentation/components/use_smile_id_expandable_icon.tsx +102 -0
- package/src/presentation/components/use_smile_id_face_oval_image.tsx +90 -0
- package/src/presentation/components/use_smile_id_face_overlay.tsx +387 -0
- package/src/presentation/components/use_smile_id_face_silhouette_overlay.tsx +27 -0
- package/src/presentation/components/use_smile_id_failed_content.tsx +94 -0
- package/src/presentation/components/use_smile_id_guideline_thumbnail.tsx +134 -0
- package/src/presentation/components/use_smile_id_instructions_hero.tsx +245 -0
- package/src/presentation/components/use_smile_id_learn_more_content.tsx +115 -0
- package/src/presentation/components/use_smile_id_loading_content.tsx +54 -0
- package/src/presentation/components/use_smile_id_loading_indicator.tsx +81 -0
- package/src/presentation/components/use_smile_id_oval_border_palette.ts +60 -0
- package/src/presentation/components/use_smile_id_partner_icon.tsx +56 -0
- package/src/presentation/components/use_smile_id_processing_center_indicator.tsx +77 -0
- package/src/presentation/components/use_smile_id_rounded_checkbox.tsx +67 -0
- package/src/presentation/components/use_smile_id_status_indicator.tsx +44 -0
- package/src/presentation/components/use_smile_id_success_content.tsx +76 -0
- package/src/presentation/flow/__tests__/document_flow_navigation.test.ts +285 -0
- package/src/presentation/flow/__tests__/flow_navigation_manager.test.ts +1163 -0
- package/src/presentation/flow/analytics/__tests__/use_smile_id_analytics_event.test.ts +105 -0
- package/src/presentation/flow/analytics/use_smile_id_analytics_event.ts +83 -0
- package/src/presentation/flow/config/flow_configuration.ts +12 -0
- package/src/presentation/flow/dsl/builder/__tests__/ml_builder.test.ts +161 -0
- package/src/presentation/flow/dsl/builder/__tests__/theme_builder.test.ts +102 -0
- package/src/presentation/flow/dsl/builder/config_builder.ts +22 -0
- package/src/presentation/flow/dsl/builder/ml_builder.ts +201 -0
- package/src/presentation/flow/dsl/builder/screens_builder.ts +180 -0
- package/src/presentation/flow/dsl/builder/theme_builder.ts +102 -0
- package/src/presentation/flow/dsl/flow_build_result.ts +37 -0
- package/src/presentation/flow/dsl/use_smile_id_builder.tsx +123 -0
- package/src/presentation/flow/dsl/use_smile_id_flow_builder.ts +402 -0
- package/src/presentation/flow/flow_navigation_context.tsx +50 -0
- package/src/presentation/flow/flow_navigation_manager.ts +985 -0
- package/src/presentation/flow/graph/screen_renderer.tsx +35 -0
- package/src/presentation/flow/job_submission_state.ts +17 -0
- package/src/presentation/flow/model/instruction_guideline.ts +15 -0
- package/src/presentation/flow/model/instructions_defaults.ts +120 -0
- package/src/presentation/flow/screen/helpers/__tests__/face_session_config.test.ts +115 -0
- package/src/presentation/flow/screen/helpers/face_session_config.ts +77 -0
- package/src/presentation/flow/screen/orchestrated_capture_screen.tsx +296 -0
- package/src/presentation/flow/screen/orchestrated_consent_screen.tsx +66 -0
- package/src/presentation/flow/screen/orchestrated_instructions_screen.tsx +102 -0
- package/src/presentation/flow/screen/orchestrated_preview_screen.tsx +72 -0
- package/src/presentation/flow/screen/orchestrated_processing_screen.tsx +111 -0
- package/src/presentation/flow/screen/use_smile_id_orchestrated_screen_host.tsx +39 -0
- package/src/presentation/flow/screen/validation_error_screen.tsx +147 -0
- package/src/presentation/flow/use_smile_id_flow.tsx +338 -0
- package/src/presentation/flow/validation/__tests__/flow_validator.test.ts +398 -0
- package/src/presentation/flow/validation/__tests__/job_type_validator.test.ts +704 -0
- package/src/presentation/flow/validation/flow_validator.ts +433 -0
- package/src/presentation/flow/validation/job_type_validator.ts +645 -0
- package/src/presentation/flow/validation/validation_state.ts +65 -0
- package/src/presentation/screen/__tests__/capture_screen_helpers.test.ts +112 -0
- package/src/presentation/screen/__tests__/capture_ui_state.test.ts +379 -0
- package/src/presentation/screen/__tests__/consent_screen_helpers.test.ts +63 -0
- package/src/presentation/screen/__tests__/ess_turn_haptics.test.ts +78 -0
- package/src/presentation/screen/__tests__/feedback_debouncer.test.ts +111 -0
- package/src/presentation/screen/__tests__/instructions_screen_helpers.test.ts +142 -0
- package/src/presentation/screen/__tests__/preview_screen_helpers.test.ts +53 -0
- package/src/presentation/screen/__tests__/processing_screen_helpers.test.ts +39 -0
- package/src/presentation/screen/__tests__/scan_state_to_overlay_state.test.ts +203 -0
- package/src/presentation/screen/__tests__/use_smile_id_capture_screen.test.tsx +616 -0
- package/src/presentation/screen/__tests__/use_smile_id_consent_screen.test.tsx +288 -0
- package/src/presentation/screen/__tests__/use_smile_id_document_back_instructions.test.tsx +136 -0
- package/src/presentation/screen/__tests__/use_smile_id_instructions_screen.test.tsx +245 -0
- package/src/presentation/screen/__tests__/use_smile_id_preview_screen.test.tsx +223 -0
- package/src/presentation/screen/__tests__/use_smile_id_processing_screen.test.tsx +333 -0
- package/src/presentation/screen/helpers/capture_screen_helpers.ts +151 -0
- package/src/presentation/screen/helpers/capture_ui_state.ts +298 -0
- package/src/presentation/screen/helpers/consent_screen_helpers.ts +106 -0
- package/src/presentation/screen/helpers/ess_turn_haptics.ts +67 -0
- package/src/presentation/screen/helpers/feedback_debouncer.ts +89 -0
- package/src/presentation/screen/helpers/instructions_screen_helpers.ts +108 -0
- package/src/presentation/screen/helpers/preview_screen_helpers.ts +41 -0
- package/src/presentation/screen/helpers/processing_screen_helpers.ts +27 -0
- package/src/presentation/screen/helpers/scan_state_to_overlay_state.ts +128 -0
- package/src/presentation/screen/helpers/use_capture_orientation_lock.ts +46 -0
- package/src/presentation/screen/helpers/use_debounced_feedback_key.ts +52 -0
- package/src/presentation/screen/use_smile_id_capture_screen.tsx +635 -0
- package/src/presentation/screen/use_smile_id_consent_screen.tsx +382 -0
- package/src/presentation/screen/use_smile_id_document_back_instructions.tsx +134 -0
- package/src/presentation/screen/use_smile_id_document_preview_screen.tsx +142 -0
- package/src/presentation/screen/use_smile_id_instructions_screen.tsx +194 -0
- package/src/presentation/screen/use_smile_id_permission_screen.tsx +52 -0
- package/src/presentation/screen/use_smile_id_preview_screen.tsx +159 -0
- package/src/presentation/screen/use_smile_id_processing_screen.tsx +223 -0
- package/src/presentation/state/__tests__/use_smile_id_overlay_state.test.ts +30 -0
- package/src/presentation/state/processing_state.ts +19 -0
- package/src/presentation/state/use_smile_id_overlay_state.ts +70 -0
- package/src/presentation/theme/theme.ts +399 -0
- package/src/presentation/theme/theme_context.tsx +45 -0
- package/src/presentation/theme/use_smile_id_motion.ts +12 -0
- package/src/presentation/theme/use_use_smile_id_fonts.ts +71 -0
- package/src/presentation/utils/__tests__/force_max_brightness.test.tsx +237 -0
- package/src/presentation/utils/__tests__/locale_utils.test.ts +37 -0
- package/src/presentation/utils/force_max_brightness.tsx +113 -0
- package/src/presentation/utils/locale_utils.ts +71 -0
- package/src/presentation/utils/use_reduced_motion.ts +26 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_document_orientation_lock.js","sourceRoot":"","sources":["../../../../src/presentation/screen/helpers/use_document_orientation_lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,0BAA0B,CACxC,WAA4C;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,KAAK,SAAS;YAAE,OAAO;QAEtC,MAAM,MAAM,GACV,WAAW,KAAK,WAAW;YACzB,CAAC,CAAC,iBAAiB,CAAC,eAAe,CAAC,SAAS;YAC7C,CAAC,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC;QACpD,KAAK,eAAe,CAAC,MAAM,CAAC,CAAC;QAE7B,OAAO,GAAG,EAAE;YACV,KAAK,eAAe,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACtE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,0EAA0E;AAC1E,KAAK,UAAU,eAAe,CAC5B,MAAyC;IAEzC,IAAI,CAAC;QACH,MAAM,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wBAAwB,CAAC,gBAAgB,CACvC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { DocumentAnalyzer, FaceAnalyzer } from "@smileid/usesmileid_platform_interface";
|
|
3
|
+
import type { CaptureReadyEvent, ScanState } from "@smileid/usesmileid_bridge";
|
|
4
|
+
import { DocumentSide } from "@smileid/usesmileid_bridge";
|
|
5
|
+
import { CaptureType } from "../../core/models/ml_config";
|
|
6
|
+
import type { DocumentCaptureMode } from "../../core/models/document_capture_mode";
|
|
7
|
+
import { type UseSmileIDTheme } from "../theme/theme";
|
|
8
|
+
import { DocumentImageOrigin } from "../../metadata/document_image_origin";
|
|
9
|
+
export type UseSmileIDCaptureScreenProps = {
|
|
10
|
+
readonly captureType: CaptureType;
|
|
11
|
+
/**
|
|
12
|
+
* Per-frame analyzer driving the state machine. Lifecycle is the
|
|
13
|
+
* partner's responsibility (the orchestrated wrapper handles
|
|
14
|
+
* configure/close for DSL-built flows).
|
|
15
|
+
*/
|
|
16
|
+
readonly analyzer: FaceAnalyzer | DocumentAnalyzer;
|
|
17
|
+
/** Fires on Start tap; frames begin streaming to the analyzer after. */
|
|
18
|
+
readonly onStartCapture?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Fires when the state machine reaches `finished` and `flush()` has
|
|
21
|
+
* settled, with every `CaptureReadyEvent` of the session (one
|
|
22
|
+
* `"selfie"` + N `"liveness"` for face, one `"document"` for document).
|
|
23
|
+
*/
|
|
24
|
+
readonly onCaptureComplete?: (events: readonly CaptureReadyEvent[]) => void;
|
|
25
|
+
/** Records how a document side was produced (auto/manual/gallery), fired just before delivery. */
|
|
26
|
+
readonly onDocumentOrigin?: (origin: DocumentImageOrigin) => void;
|
|
27
|
+
/** Fires when the state machine reaches `"timeout"`; the screen stops streaming. */
|
|
28
|
+
readonly onCaptureTimeout?: (state: ScanState) => void;
|
|
29
|
+
readonly onBack?: () => void;
|
|
30
|
+
readonly showAttribution?: boolean;
|
|
31
|
+
/** Keeps the oval rim neutral through CAPTURING/PROCESSING — ESS has no green oval treatment. */
|
|
32
|
+
readonly enableEnhancedLiveness?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Document aspect ratio (width / height) for the document capture
|
|
35
|
+
* guide cutout. Ignored for selfie capture. Omitted ⇒ the overlay's
|
|
36
|
+
* default ID-1 ratio.
|
|
37
|
+
*/
|
|
38
|
+
readonly knownIdAspectRatio?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Document capture mode. `manualCapture` surfaces the shutter immediately;
|
|
41
|
+
* `autoCaptureWithManualFallback` surfaces it after `activateManualAfterMs`;
|
|
42
|
+
* `autoCapture` never surfaces it. Ignored for selfie capture.
|
|
43
|
+
*/
|
|
44
|
+
readonly captureMode?: DocumentCaptureMode;
|
|
45
|
+
/** Show the gallery-upload control (document capture). Ignored for selfie. */
|
|
46
|
+
readonly allowGalleryUpload?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Active document side — names the imported (manual / gallery) artifact
|
|
49
|
+
* `document_front.jpg` / `document_back.jpg`. Ignored for selfie capture.
|
|
50
|
+
*/
|
|
51
|
+
readonly documentSide?: DocumentSide;
|
|
52
|
+
/** Close/cancel the whole flow (document capture chrome — top-right X). */
|
|
53
|
+
readonly onClose?: () => void;
|
|
54
|
+
readonly startButton?: (props: {
|
|
55
|
+
onClick: () => void;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
}) => ReactNode;
|
|
58
|
+
readonly theme?: UseSmileIDTheme;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Capture route — owns the camera session, frame streaming, analyzer
|
|
62
|
+
* results, and effects; derives an immutable `UseSmileIDCaptureContentState`
|
|
63
|
+
* per scan-state update and delegates rendering to the stateless
|
|
64
|
+
* `UseSmileIDCaptureContent` (camera preview injected through its slot).
|
|
65
|
+
*
|
|
66
|
+
* Flow: Start → frame processor runs the native plugin per frame
|
|
67
|
+
* (`useSmileIDFrameStream` validates results) → on `finished`, `flush()`
|
|
68
|
+
* then `onCaptureComplete`; on `timeout`, `onCaptureTimeout`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function UseSmileIDCaptureScreen(props: UseSmileIDCaptureScreenProps): import("react").JSX.Element;
|
|
71
|
+
//# sourceMappingURL=use_smile_id_capture_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_smile_id_capture_screen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screen/use_smile_id_capture_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAEL,YAAY,EAEb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AASzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAe3E,MAAM,MAAM,4BAA4B,G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;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,+BA0f1E"}
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
3
|
+
import { StatusBar, StyleSheet, View } from "react-native";
|
|
4
|
+
import { Camera, useCameraDevice, useCameraFormat, useCameraPermission, useFrameProcessor, VisionCameraProxy, } from "react-native-vision-camera";
|
|
5
|
+
import { Worklets } from "react-native-worklets-core";
|
|
6
|
+
import * as ImagePicker from "expo-image-picker";
|
|
7
|
+
import { FrameProcessorPluginNotRegisteredException } from "@smileid/usesmileid_bridge";
|
|
8
|
+
import { CaptureReadyEventKind, DocumentSide, ScanStateType, } from "@smileid/usesmileid_bridge";
|
|
9
|
+
import { CaptureType } from "../../core/models/ml_config";
|
|
10
|
+
import { resampleImportedDocument } from "../../camera/document_image_pipeline";
|
|
11
|
+
import { defaultLightTheme } from "../theme/theme";
|
|
12
|
+
import { UseSmileIDCaptureContent, } from "../components/use_smile_id_capture_content";
|
|
13
|
+
import { UseSmileIDCrashReporting } from "@smileid/usesmileid_bridge";
|
|
14
|
+
import { ForceMaxBrightness } from "../utils/force_max_brightness";
|
|
15
|
+
import { CameraDefaults } from "../../camera/camera_defaults";
|
|
16
|
+
import { DocumentImageOrigin } from "../../metadata/document_image_origin";
|
|
17
|
+
import { useSmileIDFrameStream } from "../../camera/use_smile_id_frame_stream";
|
|
18
|
+
import { orientationToDegrees } from "../../camera/orientation_degrees";
|
|
19
|
+
import { isSessionBoundary, mapCaptureUiState, preCaptureUiState, } from "./helpers/capture_ui_state";
|
|
20
|
+
import { useDebouncedFeedbackKey } from "./helpers/use_debounced_feedback_key";
|
|
21
|
+
import { essTurnHaptic, triggerEssTurnHaptic, } from "./helpers/ess_turn_haptics";
|
|
22
|
+
/**
|
|
23
|
+
* Capture route — owns the camera session, frame streaming, analyzer
|
|
24
|
+
* results, and effects; derives an immutable `UseSmileIDCaptureContentState`
|
|
25
|
+
* per scan-state update and delegates rendering to the stateless
|
|
26
|
+
* `UseSmileIDCaptureContent` (camera preview injected through its slot).
|
|
27
|
+
*
|
|
28
|
+
* Flow: Start → frame processor runs the native plugin per frame
|
|
29
|
+
* (`useSmileIDFrameStream` validates results) → on `finished`, `flush()`
|
|
30
|
+
* then `onCaptureComplete`; on `timeout`, `onCaptureTimeout`.
|
|
31
|
+
*/
|
|
32
|
+
export function UseSmileIDCaptureScreen(props) {
|
|
33
|
+
const theme = props.theme ?? defaultLightTheme;
|
|
34
|
+
const showAttribution = props.showAttribution ?? true;
|
|
35
|
+
const enableEnhancedLiveness = props.enableEnhancedLiveness ?? false;
|
|
36
|
+
// Literal union — useCameraDevice takes the lowercase string directly.
|
|
37
|
+
const cameraFacing = props.captureType === CaptureType.selfie ? "front" : "back";
|
|
38
|
+
const { hasPermission, requestPermission } = useCameraPermission();
|
|
39
|
+
const device = useCameraDevice(cameraFacing);
|
|
40
|
+
// Still-capture handle for the document manual shutter (`takePhoto()`).
|
|
41
|
+
const cameraRef = useRef(null);
|
|
42
|
+
// Pin an explicit format: the "highest supported" heuristic can pick 4K,
|
|
43
|
+
// stalling the frame-processor thread and stuttering the pipeline.
|
|
44
|
+
const format = useCameraFormat(device, [
|
|
45
|
+
// 4:3 first: geometry checks + smile heuristic are calibrated on 4:3;
|
|
46
|
+
// 16:9 skews normalized landmark ratios and shifts every threshold.
|
|
47
|
+
{ videoAspectRatio: 4 / 3 },
|
|
48
|
+
{
|
|
49
|
+
videoResolution: {
|
|
50
|
+
width: CameraDefaults.analysisTargetResolution.width,
|
|
51
|
+
height: CameraDefaults.analysisTargetResolution.height,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{ fps: CameraDefaults.analysisTargetFps },
|
|
55
|
+
]);
|
|
56
|
+
const requestedRef = useRef(false);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!hasPermission && !requestedRef.current) {
|
|
59
|
+
requestedRef.current = true;
|
|
60
|
+
void requestPermission();
|
|
61
|
+
}
|
|
62
|
+
}, [hasPermission, requestPermission]);
|
|
63
|
+
// Per-frame scan state drives the overlay + feedback bubble.
|
|
64
|
+
const [scanState, setScanState] = useState({
|
|
65
|
+
type: ScanStateType.Initial,
|
|
66
|
+
});
|
|
67
|
+
const [streaming, setStreaming] = useState(false);
|
|
68
|
+
// Bumped on every Start tap to reset the feedback debouncer.
|
|
69
|
+
const [sessionEpoch, setSessionEpoch] = useState(0);
|
|
70
|
+
// Overlay stays IDLE (gray) until the first analyzed frame — eagerly
|
|
71
|
+
// forcing INSTRUCTION here causes a green flash.
|
|
72
|
+
const [hasAnalyzedFrame, setHasAnalyzedFrame] = useState(false);
|
|
73
|
+
// Fallback shutter, revealed after activateManualAfterMs. Resets per mount.
|
|
74
|
+
const [manualShutterRevealed, setManualShutterRevealed] = useState(false);
|
|
75
|
+
// True while a manual/gallery delivery is in flight — disables the controls.
|
|
76
|
+
const [deliveringDocument, setDeliveringDocument] = useState(false);
|
|
77
|
+
// Transient gallery-import error; overrides the live chip, self-clears so the user can re-pick.
|
|
78
|
+
const [galleryErrorKey, setGalleryErrorKey] = useState(null);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (galleryErrorKey === null)
|
|
81
|
+
return;
|
|
82
|
+
const timer = setTimeout(() => setGalleryErrorKey(null), 3000);
|
|
83
|
+
return () => clearTimeout(timer);
|
|
84
|
+
}, [galleryErrorKey]);
|
|
85
|
+
// Accumulate events across frames in a ref (not state) so an event
|
|
86
|
+
// arrival never triggers a re-render; the final onCaptureComplete
|
|
87
|
+
// payload then carries every event the session emitted.
|
|
88
|
+
const capturedEventsRef = useRef([]);
|
|
89
|
+
// Exactly-once latch: a frame can land while flush() is in flight, so
|
|
90
|
+
// this keeps flush()/onCaptureComplete from firing twice per session.
|
|
91
|
+
const completedRef = useRef(false);
|
|
92
|
+
// Raw (not committed) frame state for the session-boundary check, so
|
|
93
|
+
// transitions the 1% bucketing skips committing are still seen.
|
|
94
|
+
const previousScanStateRef = useRef(null);
|
|
95
|
+
const onStartCapture = props.onStartCapture;
|
|
96
|
+
const handleStart = useCallback(() => {
|
|
97
|
+
if (streaming || completedRef.current)
|
|
98
|
+
return;
|
|
99
|
+
onStartCapture?.();
|
|
100
|
+
setSessionEpoch((epoch) => epoch + 1);
|
|
101
|
+
// A new session must not compare against the old session's last state.
|
|
102
|
+
previousScanStateRef.current = null;
|
|
103
|
+
setStreaming(true);
|
|
104
|
+
}, [streaming, onStartCapture]);
|
|
105
|
+
const analyzer = props.analyzer;
|
|
106
|
+
const onCaptureComplete = props.onCaptureComplete;
|
|
107
|
+
const onDocumentOrigin = props.onDocumentOrigin;
|
|
108
|
+
const onCaptureTimeout = props.onCaptureTimeout;
|
|
109
|
+
const captureMode = props.captureMode;
|
|
110
|
+
const allowGalleryUpload = props.allowGalleryUpload ?? false;
|
|
111
|
+
const documentSide = props.documentSide ?? DocumentSide.Front;
|
|
112
|
+
const isDocumentCapture = props.captureType === CaptureType.document;
|
|
113
|
+
// Reveal the fallback shutter after the delay once streaming begins.
|
|
114
|
+
// Bound to `streaming`: any capture clears it, tearing this effect down
|
|
115
|
+
// and clearing the timer, so it can't fire post-capture or leak.
|
|
116
|
+
const fallbackDelayMs = captureMode?.kind === "autoCaptureWithManualFallback"
|
|
117
|
+
? captureMode.activateManualAfterMs
|
|
118
|
+
: null;
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (!streaming || fallbackDelayMs === null)
|
|
121
|
+
return;
|
|
122
|
+
const timer = setTimeout(() => {
|
|
123
|
+
setManualShutterRevealed(true);
|
|
124
|
+
}, fallbackDelayMs);
|
|
125
|
+
return () => clearTimeout(timer);
|
|
126
|
+
}, [streaming, fallbackDelayMs]);
|
|
127
|
+
// Manual shutter: capture a still and deliver via the SAME
|
|
128
|
+
// onCaptureComplete path as auto-capture. completedRef is claimed before
|
|
129
|
+
// the async work so a concurrent auto-capture is dropped — exactly one delivery.
|
|
130
|
+
const handleManualShutter = useCallback(() => {
|
|
131
|
+
if (completedRef.current)
|
|
132
|
+
return;
|
|
133
|
+
const camera = cameraRef.current;
|
|
134
|
+
if (camera === null)
|
|
135
|
+
return;
|
|
136
|
+
completedRef.current = true;
|
|
137
|
+
setStreaming(false);
|
|
138
|
+
setDeliveringDocument(true);
|
|
139
|
+
void (async () => {
|
|
140
|
+
try {
|
|
141
|
+
const photo = await camera.takePhoto();
|
|
142
|
+
const sourceUri = photo.path.startsWith("file://")
|
|
143
|
+
? photo.path
|
|
144
|
+
: `file://${photo.path}`;
|
|
145
|
+
const processedUri = await resampleImportedDocument({ uri: sourceUri, width: photo.width, height: photo.height }, documentSide);
|
|
146
|
+
onDocumentOrigin?.(DocumentImageOrigin.CameraManualCapture);
|
|
147
|
+
onCaptureComplete?.([
|
|
148
|
+
{
|
|
149
|
+
kind: CaptureReadyEventKind.Document,
|
|
150
|
+
captureIndex: 0,
|
|
151
|
+
url: processedUri,
|
|
152
|
+
},
|
|
153
|
+
]);
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
UseSmileIDCrashReporting.captureException(error instanceof Error ? error : new Error(String(error)));
|
|
157
|
+
// Release the gate so the user can retry, and resume auto-capture.
|
|
158
|
+
completedRef.current = false;
|
|
159
|
+
setDeliveringDocument(false);
|
|
160
|
+
setStreaming(true);
|
|
161
|
+
}
|
|
162
|
+
})();
|
|
163
|
+
}, [onCaptureComplete, onDocumentOrigin, documentSide]);
|
|
164
|
+
// Gallery upload: pause auto-capture while the picker is open (so it can't
|
|
165
|
+
// settle behind the modal), import via the same resample + delivery path.
|
|
166
|
+
// Cancel / permission-denial resumes auto-capture.
|
|
167
|
+
const handleGalleryPick = useCallback(() => {
|
|
168
|
+
if (completedRef.current)
|
|
169
|
+
return;
|
|
170
|
+
setStreaming(false);
|
|
171
|
+
setDeliveringDocument(true);
|
|
172
|
+
void (async () => {
|
|
173
|
+
try {
|
|
174
|
+
const permission = await ImagePicker.requestMediaLibraryPermissionsAsync();
|
|
175
|
+
if (!permission.granted) {
|
|
176
|
+
setDeliveringDocument(false);
|
|
177
|
+
// Don't resume if a concurrent auto-capture already claimed delivery.
|
|
178
|
+
if (!completedRef.current)
|
|
179
|
+
setStreaming(true);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const result = await ImagePicker.launchImageLibraryAsync({
|
|
183
|
+
mediaTypes: ["images"],
|
|
184
|
+
allowsMultipleSelection: false,
|
|
185
|
+
quality: 1,
|
|
186
|
+
});
|
|
187
|
+
const asset = result.canceled ? undefined : result.assets[0];
|
|
188
|
+
if (asset === undefined) {
|
|
189
|
+
setDeliveringDocument(false);
|
|
190
|
+
// Don't resume if a concurrent auto-capture already claimed delivery.
|
|
191
|
+
if (!completedRef.current)
|
|
192
|
+
setStreaming(true);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
// Reject too-small images before claiming the latch — upscaling them
|
|
196
|
+
// yields unreadable documents. Show a chip and resume auto-capture.
|
|
197
|
+
if (asset.width !== undefined &&
|
|
198
|
+
asset.height !== undefined &&
|
|
199
|
+
Math.min(asset.width, asset.height) <
|
|
200
|
+
CameraDefaults.minGalleryDocumentDimensionPx) {
|
|
201
|
+
setGalleryErrorKey("si_document_gallery_image_too_small");
|
|
202
|
+
setDeliveringDocument(false);
|
|
203
|
+
// Don't resume if a concurrent auto-capture already claimed delivery.
|
|
204
|
+
if (!completedRef.current)
|
|
205
|
+
setStreaming(true);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (completedRef.current)
|
|
209
|
+
return; // auto-capture won the race
|
|
210
|
+
completedRef.current = true;
|
|
211
|
+
const processedUri = await resampleImportedDocument({ uri: asset.uri, width: asset.width, height: asset.height }, documentSide);
|
|
212
|
+
onDocumentOrigin?.(DocumentImageOrigin.Gallery);
|
|
213
|
+
onCaptureComplete?.([
|
|
214
|
+
{
|
|
215
|
+
kind: CaptureReadyEventKind.Document,
|
|
216
|
+
captureIndex: 0,
|
|
217
|
+
url: processedUri,
|
|
218
|
+
},
|
|
219
|
+
]);
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
UseSmileIDCrashReporting.captureException(error instanceof Error ? error : new Error(String(error)));
|
|
223
|
+
setGalleryErrorKey("si_document_gallery_image_failed");
|
|
224
|
+
completedRef.current = false;
|
|
225
|
+
setDeliveringDocument(false);
|
|
226
|
+
setStreaming(true);
|
|
227
|
+
}
|
|
228
|
+
})();
|
|
229
|
+
}, [onCaptureComplete, onDocumentOrigin, documentSide]);
|
|
230
|
+
// Auto-start document capture (document idle has no Start button; selfie
|
|
231
|
+
// keeps its). Fires once per mount, so each side / retake auto-starts.
|
|
232
|
+
const autoStartedRef = useRef(false);
|
|
233
|
+
// Latest-ref so a new `handleStart` identity (it depends on `streaming`)
|
|
234
|
+
// doesn't re-run this effect; auto-start fires once per mount.
|
|
235
|
+
const handleStartRef = useRef(handleStart);
|
|
236
|
+
handleStartRef.current = handleStart;
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (!isDocumentCapture || autoStartedRef.current || completedRef.current) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
autoStartedRef.current = true;
|
|
242
|
+
handleStartRef.current();
|
|
243
|
+
}, [isDocumentCapture]);
|
|
244
|
+
// useSmileIDFrameStream overloads on FaceAnalyzer vs DocumentAnalyzer;
|
|
245
|
+
// the cast routes through the FaceAnalyzer overload — sound because the
|
|
246
|
+
// DocumentAnalyzer shape produces an identical wire surface, and the
|
|
247
|
+
// runtime pairing is guaranteed by captureType.
|
|
248
|
+
const frameStream = useSmileIDFrameStream((streaming ? analyzer : null), (result) => {
|
|
249
|
+
// A session boundary resets the debouncer so suppressed guidance can re-surface.
|
|
250
|
+
const previousScanState = previousScanStateRef.current;
|
|
251
|
+
if (previousScanState !== null &&
|
|
252
|
+
isSessionBoundary(previousScanState, result.state)) {
|
|
253
|
+
setSessionEpoch((epoch) => epoch + 1);
|
|
254
|
+
}
|
|
255
|
+
// Haptic on a completed head turn (light between, success on the
|
|
256
|
+
// final, never on reset). Driven off the raw per-frame transition
|
|
257
|
+
// so 1% bucketing can't drop it; fired imperatively (no re-render).
|
|
258
|
+
if (previousScanState !== null) {
|
|
259
|
+
const haptic = essTurnHaptic(previousScanState, result.state);
|
|
260
|
+
if (haptic !== null)
|
|
261
|
+
triggerEssTurnHaptic(haptic);
|
|
262
|
+
}
|
|
263
|
+
previousScanStateRef.current = result.state;
|
|
264
|
+
// Unsatisfied = native session reset; drop accumulated events so it
|
|
265
|
+
// can't leak stale liveness frames. `else` so a reset frame can't
|
|
266
|
+
// re-add its own stale events on the same pass.
|
|
267
|
+
if (result.state.type === ScanStateType.Unsatisfied) {
|
|
268
|
+
capturedEventsRef.current = [];
|
|
269
|
+
}
|
|
270
|
+
else if (result.capturedEvents.length > 0) {
|
|
271
|
+
capturedEventsRef.current = [
|
|
272
|
+
...capturedEventsRef.current,
|
|
273
|
+
...result.capturedEvents,
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
// Camera-rate results are mostly identical — commit only
|
|
277
|
+
// render-relevant changes, progress bucketed to 1% for smooth fill.
|
|
278
|
+
setScanState((previous) => previous.type === result.state.type &&
|
|
279
|
+
previous.feedback === result.state.feedback &&
|
|
280
|
+
previous.reason === result.state.reason &&
|
|
281
|
+
previous.currentDirection === result.state.currentDirection &&
|
|
282
|
+
(previous.poseMatched ?? false) ===
|
|
283
|
+
(result.state.poseMatched ?? false) &&
|
|
284
|
+
Math.round((previous.captureProgress ?? 0) * 100) ===
|
|
285
|
+
Math.round((result.state.captureProgress ?? 0) * 100)
|
|
286
|
+
? previous
|
|
287
|
+
: result.state);
|
|
288
|
+
setHasAnalyzedFrame(true);
|
|
289
|
+
// Terminal states: finished → flush + complete; timeout → failure
|
|
290
|
+
// without flushing (no captured artifacts to wait on).
|
|
291
|
+
if (result.state.type === ScanStateType.Finished) {
|
|
292
|
+
if (completedRef.current)
|
|
293
|
+
return;
|
|
294
|
+
completedRef.current = true;
|
|
295
|
+
setStreaming(false);
|
|
296
|
+
// flush() waits for every emitted JPG to land on disk before we
|
|
297
|
+
// hand URLs to the partner, so onCaptureComplete never returns a
|
|
298
|
+
// partial-write path.
|
|
299
|
+
void analyzer
|
|
300
|
+
.flush()
|
|
301
|
+
.catch((error) => {
|
|
302
|
+
UseSmileIDCrashReporting.captureException(error);
|
|
303
|
+
})
|
|
304
|
+
.finally(() => {
|
|
305
|
+
// No-op for selfie (callback unset).
|
|
306
|
+
onDocumentOrigin?.(DocumentImageOrigin.CameraAutoCapture);
|
|
307
|
+
onCaptureComplete?.(capturedEventsRef.current);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
else if (result.state.type === ScanStateType.Timeout) {
|
|
311
|
+
if (completedRef.current)
|
|
312
|
+
return;
|
|
313
|
+
completedRef.current = true;
|
|
314
|
+
setStreaming(false);
|
|
315
|
+
onCaptureTimeout?.(result.state);
|
|
316
|
+
}
|
|
317
|
+
}, {
|
|
318
|
+
onError: (error) => {
|
|
319
|
+
// Native analyzer errors (model load, decode). Reported, but not
|
|
320
|
+
// terminal — the next frame is still attempted.
|
|
321
|
+
UseSmileIDCrashReporting.captureException(error);
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
const uiState = hasAnalyzedFrame
|
|
325
|
+
? mapCaptureUiState(scanState, props.captureType, enableEnhancedLiveness)
|
|
326
|
+
: preCaptureUiState(props.captureType, enableEnhancedLiveness);
|
|
327
|
+
// Only the guidance copy is debounced; rim, fill, and direction stay real-time.
|
|
328
|
+
const settledFeedbackKey = useDebouncedFeedbackKey(uiState.feedbackKey, sessionEpoch);
|
|
329
|
+
const isInstructionState = scanState.type === ScanStateType.Initial && !streaming;
|
|
330
|
+
const canStart = !streaming && !completedRef.current;
|
|
331
|
+
const previewReady = hasPermission && device != null;
|
|
332
|
+
// Resolve the native frame processor plugin once per name.
|
|
333
|
+
const plugin = useMemo(() => VisionCameraProxy.initFrameProcessorPlugin(analyzer.frameProcessorPluginName, {}) ?? null, [analyzer.frameProcessorPluginName]);
|
|
334
|
+
// A missing plugin means no frame ever produces a result — report once
|
|
335
|
+
// on capture start rather than sitting silently on the initial state.
|
|
336
|
+
const pluginErrorReportedRef = useRef(false);
|
|
337
|
+
useEffect(() => {
|
|
338
|
+
if (!streaming || plugin !== null || pluginErrorReportedRef.current) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
pluginErrorReportedRef.current = true;
|
|
342
|
+
UseSmileIDCrashReporting.captureException(new FrameProcessorPluginNotRegisteredException({
|
|
343
|
+
pluginName: analyzer.frameProcessorPluginName,
|
|
344
|
+
}));
|
|
345
|
+
}, [streaming, plugin, analyzer.frameProcessorPluginName]);
|
|
346
|
+
// Posts results to JS without blocking the worklet. Backpressure is
|
|
347
|
+
// native: the plugin blocks the frame-processor thread per scan, so
|
|
348
|
+
// mid-scan frames are dropped before reaching JS.
|
|
349
|
+
const onFrameResult = frameStream.onFrameResult;
|
|
350
|
+
const onFrameResultRunOnJS = useMemo(() => {
|
|
351
|
+
return Worklets.createRunOnJS((rawResult) => {
|
|
352
|
+
onFrameResult(rawResult);
|
|
353
|
+
});
|
|
354
|
+
}, [onFrameResult]);
|
|
355
|
+
// Physical device tilt (0 = upright portrait) for the native
|
|
356
|
+
// session's upright validator and head-pose math; gravity-sourced,
|
|
357
|
+
// never derived from `frame.orientation` (fixed sensor mounting).
|
|
358
|
+
const [deviceOrientationDegrees, setDeviceOrientationDegrees] = useState(0);
|
|
359
|
+
const frameProcessor = useFrameProcessor((frame) => {
|
|
360
|
+
"worklet";
|
|
361
|
+
if (!plugin)
|
|
362
|
+
return;
|
|
363
|
+
const rawResult = plugin.call(frame, {
|
|
364
|
+
rotation: deviceOrientationDegrees,
|
|
365
|
+
});
|
|
366
|
+
onFrameResultRunOnJS(rawResult);
|
|
367
|
+
}, [plugin, onFrameResultRunOnJS, deviceOrientationDegrees]);
|
|
368
|
+
// Document controls — live capture only (after Start). Manual shutter
|
|
369
|
+
// follows the capture mode + fallback timer; gallery follows
|
|
370
|
+
// allowGalleryUpload. Renderer also hides both during CAPTURING/PROCESSING.
|
|
371
|
+
const manualShutterAvailable = isDocumentCapture &&
|
|
372
|
+
streaming &&
|
|
373
|
+
(captureMode?.kind === "manualCapture" ||
|
|
374
|
+
(captureMode?.kind === "autoCaptureWithManualFallback" &&
|
|
375
|
+
manualShutterRevealed));
|
|
376
|
+
const galleryAvailable = isDocumentCapture && streaming && allowGalleryUpload;
|
|
377
|
+
// Deps are scalar fields (mapCaptureUiState returns a fresh object per
|
|
378
|
+
// render). captureProgress intentionally stays a separate per-frame prop.
|
|
379
|
+
const contentState = useMemo(() => ({
|
|
380
|
+
captureType: props.captureType,
|
|
381
|
+
overlayState: uiState.overlayState,
|
|
382
|
+
enableEnhancedLiveness,
|
|
383
|
+
animationDirection: uiState.animationDirection,
|
|
384
|
+
poseMatched: uiState.poseMatched,
|
|
385
|
+
// A transient gallery-import error preempts the live feedback chip.
|
|
386
|
+
feedbackKey: galleryErrorKey ?? settledFeedbackKey,
|
|
387
|
+
// Documents auto-start (no Start button); selfie keeps its.
|
|
388
|
+
showCaptureButton: isInstructionState && !isDocumentCapture,
|
|
389
|
+
showManualShutter: manualShutterAvailable,
|
|
390
|
+
showGalleryUpload: galleryAvailable,
|
|
391
|
+
...(props.knownIdAspectRatio !== undefined
|
|
392
|
+
? { knownIdAspectRatio: props.knownIdAspectRatio }
|
|
393
|
+
: {}),
|
|
394
|
+
}), [
|
|
395
|
+
props.captureType,
|
|
396
|
+
uiState.overlayState,
|
|
397
|
+
enableEnhancedLiveness,
|
|
398
|
+
uiState.animationDirection,
|
|
399
|
+
uiState.poseMatched,
|
|
400
|
+
settledFeedbackKey,
|
|
401
|
+
galleryErrorKey,
|
|
402
|
+
isInstructionState,
|
|
403
|
+
isDocumentCapture,
|
|
404
|
+
manualShutterAvailable,
|
|
405
|
+
galleryAvailable,
|
|
406
|
+
props.knownIdAspectRatio,
|
|
407
|
+
]);
|
|
408
|
+
// Stable element so the camera tree survives unrelated state updates.
|
|
409
|
+
const cameraPreview = useMemo(() => (_jsxs(_Fragment, { children: [_jsx(ForceMaxBrightness, { enabled: props.captureType === CaptureType.selfie }), previewReady ? (_jsx(Camera, { ref: cameraRef, style: StyleSheet.absoluteFill, device: device, isActive: true, ...(format ? { format } : {}), ...(props.captureType === CaptureType.document
|
|
410
|
+
? { photo: true }
|
|
411
|
+
: {}),
|
|
412
|
+
// Gravity-based — keeps reporting tilt even when UI orientation is locked to portrait.
|
|
413
|
+
outputOrientation: "device", onOutputOrientationChanged: (orientation) => {
|
|
414
|
+
setDeviceOrientationDegrees(orientationToDegrees(orientation));
|
|
415
|
+
}, ...(streaming ? { frameProcessor } : {}), testID: "si_capture_camera_preview" })) : (_jsx(View, { style: [
|
|
416
|
+
StyleSheet.absoluteFill,
|
|
417
|
+
{ backgroundColor: theme.colors.offBlack },
|
|
418
|
+
], testID: "si_capture_camera_placeholder" }))] })),
|
|
419
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- setDeviceOrientationDegrees is a state setter (stable)
|
|
420
|
+
[
|
|
421
|
+
props.captureType,
|
|
422
|
+
previewReady,
|
|
423
|
+
device,
|
|
424
|
+
format,
|
|
425
|
+
streaming,
|
|
426
|
+
frameProcessor,
|
|
427
|
+
theme.colors.offBlack,
|
|
428
|
+
]);
|
|
429
|
+
return (_jsxs(_Fragment, { children: [_jsx(StatusBar, { translucent: true, backgroundColor: "transparent" }), _jsx(UseSmileIDCaptureContent, { state: contentState, captureProgress: uiState.captureProgress, cameraPreview: cameraPreview, onStartCapture: handleStart, startCaptureEnabled: canStart, onBack: props.onBack, showAttribution: showAttribution, startButton: props.startButton, ...(isDocumentCapture
|
|
430
|
+
? {
|
|
431
|
+
onManualShutter: handleManualShutter,
|
|
432
|
+
onGalleryUpload: handleGalleryPick,
|
|
433
|
+
documentControlsEnabled: !deliveringDocument,
|
|
434
|
+
...(props.onClose ? { onClose: props.onClose } : {}),
|
|
435
|
+
}
|
|
436
|
+
: {}), theme: theme })] }));
|
|
437
|
+
}
|
|
438
|
+
//# sourceMappingURL=use_smile_id_capture_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_smile_id_capture_screen.js","sourceRoot":"","sources":["../../../src/presentation/screen/use_smile_id_capture_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,MAAM,EACN,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,0CAA0C,EAAE,MAAM,4BAA4B,CAAC;AAMxF,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,wBAAwB,GAEzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,C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MAAM,EACpB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,KAAK,CAAC,WAAW,KAC1B,CAAC,iBAAiB;oBACpB,CAAC,CAAC;wBACE,eAAe,EAAE,mBAAmB;wBACpC,eAAe,EAAE,iBAAiB;wBAClC,uBAAuB,EAAE,CAAC,kBAAkB;wBAC5C,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBACrD;oBACH,CAAC,CAAC,EAAE,CAAC,EACP,KAAK,EAAE,KAAK,GACZ,IACD,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ConsentInformation } from "../../core/models/params";
|
|
3
|
+
import type { UseSmileIDTheme } from "../theme/theme";
|
|
4
|
+
export type UseSmileIDConsentScreenProps = {
|
|
5
|
+
readonly partnerName: string;
|
|
6
|
+
/** Partner brand mark rendered at the top of the consent screen. */
|
|
7
|
+
readonly partnerIcon?: ReactNode;
|
|
8
|
+
readonly partnerPrivacyPolicyUrl?: string;
|
|
9
|
+
readonly showAttribution?: boolean;
|
|
10
|
+
readonly onAllow?: (info: ConsentInformation) => void;
|
|
11
|
+
readonly onDeny?: () => void;
|
|
12
|
+
readonly theme?: UseSmileIDTheme;
|
|
13
|
+
/**
|
|
14
|
+
* Render the bottom-pinned Allow button via a partner-supplied
|
|
15
|
+
* slot. Receives the bound `onClick` and an `enabled` flag that
|
|
16
|
+
* tracks the consent checkbox. When omitted, renders the canonical
|
|
17
|
+
* primary `<UseSmileIDButton>` with the localized "Allow" label.
|
|
18
|
+
*/
|
|
19
|
+
readonly allowButton?: (props: {
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
}) => ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Render the bottom-pinned Deny button via a partner-supplied
|
|
25
|
+
* slot. Receives the bound `onClick`. When omitted, renders the
|
|
26
|
+
* canonical secondary `<UseSmileIDButton>` with the localized
|
|
27
|
+
* "Deny" label.
|
|
28
|
+
*/
|
|
29
|
+
readonly denyButton?: (props: {
|
|
30
|
+
onClick: () => void;
|
|
31
|
+
}) => ReactNode;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Consent screen — collects user consent before biometric capture.
|
|
35
|
+
*
|
|
36
|
+
* - Top: partner icon + plus glyph + Smile ID brand mark, centered
|
|
37
|
+
* - Title (`cardTitle`, `titleText`) tokenised with the partner name
|
|
38
|
+
* - Subtitle (`cardSubTitle`, `cardText`) with bold spans for
|
|
39
|
+
* `{allow}`, `{smile_id}`, and `{partner}` tokens
|
|
40
|
+
* - "This may include processing:" label
|
|
41
|
+
* - Four consent rows (Contact / Personal / Biometric / Device)
|
|
42
|
+
* - Rounded checkbox + "I consent…" gate (Allow disabled when
|
|
43
|
+
* unchecked); the checkbox initial state is locale-aware via
|
|
44
|
+
* `getDefaultConsentState()` — unticked in EU member-state locales
|
|
45
|
+
* for GDPR opt-in compliance, ticked elsewhere
|
|
46
|
+
* - "Learn more" toggle that animates a privacy + DSAR explainer
|
|
47
|
+
* - Allow + Deny buttons (slot-overridable) plus an optional
|
|
48
|
+
* attribution line — pinned to the bottom on short content,
|
|
49
|
+
* scrolling with it when "Learn more" expands
|
|
50
|
+
*
|
|
51
|
+
* Every padding, gap, and inter-section space resolves through
|
|
52
|
+
* `theme.spacing.*` so partners reskinning via the theme builder see
|
|
53
|
+
* the layout reflow without code edits.
|
|
54
|
+
*/
|
|
55
|
+
export declare function UseSmileIDConsentScreen(props: UseSmileIDConsentScreenProps): import("react").JSX.Element;
|
|
56
|
+
//# sourceMappingURL=use_smile_id_consent_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_smile_id_consent_screen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screen/use_smile_id_consent_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA2CtD,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,EAAE,OAAO,CAAC;KAClB,KAAK,SAAS,CAAC;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC;CACrE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,+BA0P1E"}
|