@sanctum-key/react-native-sdk 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +3 -3
  2. package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/generated/source/buildConfig/debug/kyc/{transfergratis → SanctumKey}/com/BuildConfig.java +2 -2
  4. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
  6. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  7. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  8. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
  9. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/SanctumKey/com/BuildConfig.class +0 -0
  10. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +1 -1
  11. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
  12. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  13. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
  14. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  15. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  16. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  17. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  18. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  19. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  20. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  21. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  22. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  23. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  24. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  25. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  48. package/android/build/outputs/logs/manifest-merger-debug-report.txt +1 -1
  49. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  50. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
  51. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
  52. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class} +0 -0
  53. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class} +0 -0
  54. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class} +0 -0
  55. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class} +0 -0
  56. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class} +0 -0
  57. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class} +0 -0
  58. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class} +0 -0
  59. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class} +0 -0
  60. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class} +0 -0
  61. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class} +0 -0
  62. package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  63. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class} +0 -0
  64. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class} +0 -0
  65. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule.class → SanctumKey/com/SanctumKeySdkModule.class} +0 -0
  66. package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkView.class → SanctumKey/com/SanctumKeySdkView.class} +0 -0
  67. package/android/build.gradle +2 -2
  68. package/android/src/main/AndroidManifest.xml +1 -1
  69. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +6 -6
  70. package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +2 -2
  71. package/build/package.json +9 -7
  72. package/build/src/App.d.ts +2 -2
  73. package/build/src/App.d.ts.map +1 -1
  74. package/build/src/App.js +2 -2
  75. package/build/src/App.js.map +1 -1
  76. package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
  77. package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
  78. package/build/src/SanctumKeySdk.types.js +2 -0
  79. package/build/src/SanctumKeySdk.types.js.map +1 -0
  80. package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
  81. package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
  82. package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
  83. package/build/src/SanctumKeySdkModule.js.map +1 -0
  84. package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
  85. package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
  86. package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
  87. package/build/src/SanctumKeySdkModule.web.js.map +1 -0
  88. package/build/src/SanctumKeySdkView.d.ts +4 -0
  89. package/build/src/SanctumKeySdkView.d.ts.map +1 -0
  90. package/build/src/SanctumKeySdkView.js +7 -0
  91. package/build/src/SanctumKeySdkView.js.map +1 -0
  92. package/build/src/SanctumKeySdkView.web.d.ts +4 -0
  93. package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
  94. package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
  95. package/build/src/SanctumKeySdkView.web.js.map +1 -0
  96. package/build/src/api/axios.js +2 -2
  97. package/build/src/api/axios.js.map +1 -1
  98. package/build/src/components/EnhancedCameraView.d.ts.map +1 -1
  99. package/build/src/components/EnhancedCameraView.js +66 -338
  100. package/build/src/components/EnhancedCameraView.js.map +1 -1
  101. package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
  102. package/build/src/components/KYCElements/EmailVerificationTemplate.js +93 -15
  103. package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
  104. package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
  105. package/build/src/components/KYCElements/IDCardCapture.js +167 -695
  106. package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
  107. package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
  108. package/build/src/components/KYCElements/PhoneVerificationTemplate.js +269 -40
  109. package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
  110. package/build/src/components/KYCElements/SelfieCapture.d.ts +1 -1
  111. package/build/src/components/KYCElements/SelfieCapture.d.ts.map +1 -1
  112. package/build/src/components/KYCElements/SelfieCapture.js +130 -192
  113. package/build/src/components/KYCElements/SelfieCapture.js.map +1 -1
  114. package/build/src/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
  115. package/build/src/components/KYCElements/SelfieCaptureTemplate.js +131 -433
  116. package/build/src/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
  117. package/build/src/components/NativeCameraView.js +1 -1
  118. package/build/src/components/NativeCameraView.js.map +1 -1
  119. package/build/src/components/OverLay/IdCard.d.ts +3 -2
  120. package/build/src/components/OverLay/IdCard.d.ts.map +1 -1
  121. package/build/src/components/OverLay/IdCard.js +149 -141
  122. package/build/src/components/OverLay/IdCard.js.map +1 -1
  123. package/build/src/components/OverLay/SelfieOverlay.d.ts +2 -1
  124. package/build/src/components/OverLay/SelfieOverlay.d.ts.map +1 -1
  125. package/build/src/components/OverLay/SelfieOverlay.js +37 -95
  126. package/build/src/components/OverLay/SelfieOverlay.js.map +1 -1
  127. package/build/src/components/OverLay/type.d.ts +1 -0
  128. package/build/src/components/OverLay/type.d.ts.map +1 -1
  129. package/build/src/components/OverLay/type.js.map +1 -1
  130. package/build/src/components/Svgs/scanningLine.d.ts +2 -1
  131. package/build/src/components/Svgs/scanningLine.d.ts.map +1 -1
  132. package/build/src/components/Svgs/scanningLine.js +55 -51
  133. package/build/src/components/Svgs/scanningLine.js.map +1 -1
  134. package/build/src/config/KYCConfig.js +1 -1
  135. package/build/src/config/KYCConfig.js.map +1 -1
  136. package/build/src/config/allowedDomains.js +6 -6
  137. package/build/src/config/allowedDomains.js.map +1 -1
  138. package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
  139. package/build/src/hooks/useTemplateKYCFlow.js +37 -38
  140. package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
  141. package/build/src/index.d.ts +3 -3
  142. package/build/src/index.d.ts.map +1 -1
  143. package/build/src/index.js +3 -3
  144. package/build/src/index.js.map +1 -1
  145. package/build/src/modules/api/CardAuthentification.d.ts +0 -5
  146. package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
  147. package/build/src/modules/api/CardAuthentification.js +114 -116
  148. package/build/src/modules/api/CardAuthentification.js.map +1 -1
  149. package/build/src/modules/api/KYCService.d.ts +11 -1
  150. package/build/src/modules/api/KYCService.d.ts.map +1 -1
  151. package/build/src/modules/api/KYCService.js +101 -38
  152. package/build/src/modules/api/KYCService.js.map +1 -1
  153. package/build/src/modules/camera/NativeCameraModule.js +17 -17
  154. package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
  155. package/expo-module.config.json +2 -2
  156. package/ios/TransfergratisSdk.podspec +2 -2
  157. package/ios/TransfergratisSdkModule.swift +12 -12
  158. package/package.json +9 -7
  159. package/src/App.tsx +2 -2
  160. package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
  161. package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
  162. package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
  163. package/src/SanctumKeySdkView.tsx +11 -0
  164. package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
  165. package/src/api/axios.ts +2 -2
  166. package/src/components/EnhancedCameraView.tsx +81 -400
  167. package/src/components/KYCElements/EmailVerificationTemplate.tsx +115 -26
  168. package/src/components/KYCElements/IDCardCapture.tsx +228 -868
  169. package/src/components/KYCElements/PhoneVerificationTemplate.tsx +328 -60
  170. package/src/components/KYCElements/SelfieCapture.tsx +184 -213
  171. package/src/components/KYCElements/SelfieCaptureTemplate.tsx +330 -662
  172. package/src/components/NativeCameraView.tsx +1 -1
  173. package/src/components/OverLay/IdCard.tsx +218 -217
  174. package/src/components/OverLay/SelfieOverlay.tsx +56 -134
  175. package/src/components/OverLay/type.ts +1 -0
  176. package/src/components/Svgs/scanningLine.tsx +71 -72
  177. package/src/config/KYCConfig.ts +1 -1
  178. package/src/config/allowedDomains.ts +6 -6
  179. package/src/hooks/useTemplateKYCFlow.tsx +45 -39
  180. package/src/i18n/README.md +1 -1
  181. package/src/index.ts +3 -3
  182. package/src/modules/api/CardAuthentification.ts +202 -200
  183. package/src/modules/api/KYCService.ts +168 -53
  184. package/src/modules/camera/NativeCameraModule.ts +17 -17
  185. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
  188. package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
  189. package/build/src/TransfergratisSdk.types.js +0 -2
  190. package/build/src/TransfergratisSdk.types.js.map +0 -1
  191. package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
  192. package/build/src/TransfergratisSdkModule.js.map +0 -1
  193. package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
  194. package/build/src/TransfergratisSdkModule.web.js.map +0 -1
  195. package/build/src/TransfergratisSdkView.d.ts +0 -4
  196. package/build/src/TransfergratisSdkView.d.ts.map +0 -1
  197. package/build/src/TransfergratisSdkView.js +0 -7
  198. package/build/src/TransfergratisSdkView.js.map +0 -1
  199. package/build/src/TransfergratisSdkView.web.d.ts +0 -4
  200. package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
  201. package/build/src/TransfergratisSdkView.web.js.map +0 -1
  202. package/src/TransfergratisSdkView.tsx +0 -11
  203. /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/results.bin +0 -0
  204. /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/transformed/classes/classes_dex/classes.dex +0 -0
  205. /package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/results.bin +0 -0
  206. /package/android/build/{intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class → tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0} +0 -0
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
- import { View, Text, StyleSheet, ScrollView, Image, TouchableOpacity } from 'react-native';
2
+ import { View, Text, StyleSheet, ScrollView, Image, TouchableOpacity, ActivityIndicator, Platform } from 'react-native';
3
3
  import { showAlert } from '../../utils/platformAlert';
4
4
  import { EnhancedCameraView } from '../EnhancedCameraView';
5
5
  import { Button } from '../ui/Button';
@@ -8,10 +8,8 @@ import { useI18n } from '../../hooks/useI18n';
8
8
  import SelfieOverlay from '../OverLay/SelfieOverlay';
9
9
  import selfieVerification from '../../modules/api/SelfieVerification';
10
10
  import pathToBase64 from '../../utils/pathToBase64';
11
- import { truncateFields } from '../../modules/api/KYCService';
12
11
  export const SelfieCaptureTemplate = ({ component, value, onValueChange, error, language, }) => {
13
12
  const { t } = useI18n();
14
- // const config = component.config as SelfieConfig;
15
13
  const orientations = (['center', 'left', 'right']);
16
14
  const { actions, state, env } = useTemplateKYCFlowContext();
17
15
  const [silentCaptureResult, setSilentCaptureResult] = useState({ success: false, isAnalyzing: false });
@@ -23,7 +21,6 @@ export const SelfieCaptureTemplate = ({ component, value, onValueChange, error,
23
21
  const getLocalizedText = (text) => {
24
22
  if (!text)
25
23
  return '';
26
- // If text is a nested record (e.g., per theme/device), try to pick a default then localize
27
24
  const maybeNested = text;
28
25
  if (maybeNested && typeof maybeNested === 'object' && 'en' in maybeNested === false && 'fr' in maybeNested === false) {
29
26
  const firstKey = Object.keys(maybeNested)[0];
@@ -33,100 +30,49 @@ export const SelfieCaptureTemplate = ({ component, value, onValueChange, error,
33
30
  const loc = text;
34
31
  return loc[language] || loc.en || '';
35
32
  };
36
- const getOrientationInstructions = (orientation) => {
37
- switch (orientation) {
38
- case 'center':
39
- return state.currentLanguage === "en" ? "Take a selfie of face, look straight ahead you" : "Prenez un selfie de face, regardez droit devant vous";
40
- case 'left':
41
- return state.currentLanguage === "en" ? "Turn your head to the left, keep your shoulders straight" : "Tournez votre tête vers la gauche, gardez les épaules droites";
42
- case 'right':
43
- return state.currentLanguage === "en" ? "Turn your head to the right, keep your shoulders straight" : "Tournez votre tête vers la droite, gardez les épaules droites";
44
- default:
45
- return getLocalizedText(component.instructions);
46
- }
47
- };
48
33
  useEffect(() => {
49
34
  actions.showCustomStepper(!showCamera);
50
35
  }, [showCamera]);
51
36
  const getOrientationLabel = (orientation) => {
52
37
  switch (orientation) {
53
- case 'center':
54
- return state.currentLanguage === "en" ? "Front Profile Selfie" : "Selfie de face";
55
- case 'left':
56
- return state.currentLanguage === "en" ? "Left Profile Selfie" : "Selfie profil gauche";
57
- case 'right':
58
- return state.currentLanguage === "en" ? "Right Profile Selfie" : "Selfie profil droit";
59
- default:
60
- return getLocalizedText(component.labels);
38
+ case 'center': return state.currentLanguage === "en" ? "Front Profile Selfie" : "Selfie de face";
39
+ case 'left': return state.currentLanguage === "en" ? "Left Profile Selfie" : "Selfie profil gauche";
40
+ case 'right': return state.currentLanguage === "en" ? "Right Profile Selfie" : "Selfie profil droit";
41
+ default: return getLocalizedText(component.labels);
61
42
  }
62
43
  };
63
44
  const getOrientationOpposite = (orientation) => {
64
45
  switch (orientation) {
65
- case 'center':
66
- return 'center';
67
- case 'left':
68
- return 'left';
69
- case 'right':
70
- return 'right';
71
- default:
72
- return orientation;
46
+ case 'center': return 'center';
47
+ case 'left': return 'left';
48
+ case 'right': return 'right';
49
+ default: return orientation;
73
50
  }
74
51
  };
75
- // const countryData = useMemo(() => {
76
- // const geCountryID = Object.keys(state.componentData).find((c: string) => c === "6");
77
- // if (geCountryID) {
78
- // const countryMapping = state.componentData[geCountryID];
79
- // return countryMapping?.code;
80
- // }
81
- // return null;
82
- // }, [state.componentData]);
83
52
  const getInstructions = (orientation) => {
84
53
  const lang = state.currentLanguage;
85
54
  switch (orientation) {
86
- case 'center':
87
- return {
88
- title: lang === "en" ? 'Center your face' : 'Mettez votre face au centre',
89
- subtitle: lang === "en"
90
- ? 'Align your face to the center of the selfie area and then take a photo'
91
- : 'Alignez votre visage au centre de la zone selfie puis prenez une photo'
92
- };
93
- case 'left':
94
- return {
95
- title: lang === 'en'
96
- ? 'Turn your head left'
97
- : 'Tournez la tête vers la gauche',
98
- subtitle: lang === 'en'
99
- ? 'Slowly turn your head to the left while keeping your face in the selfie area'
100
- : 'Tournez lentement la tête vers la gauche en gardant votre visage dans la zone selfie'
101
- };
102
- case 'right':
103
- return {
104
- title: lang === 'en'
105
- ? 'Turn your head right'
106
- : 'Tournez la tête vers la droite',
107
- subtitle: lang === 'en'
108
- ? 'Slowly turn your head to the right while keeping your face in the selfie area'
109
- : 'Tournez lentement la tête vers la droite en gardant votre visage dans la zone selfie'
110
- };
111
- default:
112
- return { title: getLocalizedText(component.labels), subtitle: getLocalizedText(component.instructions) };
55
+ case 'center': return { title: lang === "en" ? 'Center your face' : 'Mettez votre face au centre', subtitle: lang === "en" ? 'Align your face to the center of the selfie area and then take a photo' : 'Alignez votre visage au centre de la zone selfie puis prenez une photo' };
56
+ case 'left': return { title: lang === 'en' ? 'Turn your head left' : 'Tournez la tête vers la gauche', subtitle: lang === 'en' ? 'Slowly turn your head to the left while keeping your face in the selfie area' : 'Tournez lentement la tête vers la gauche en gardant votre visage dans la zone selfie' };
57
+ case 'right': return { title: lang === 'en' ? 'Turn your head right' : 'Tournez la tête vers la droite', subtitle: lang === 'en' ? 'Slowly turn your head to the right while keeping your face in the selfie area' : 'Tournez lentement la tête vers la droite en gardant votre visage dans la zone selfie' };
58
+ default: return { title: getLocalizedText(component.labels), subtitle: getLocalizedText(component.instructions) };
113
59
  }
114
60
  };
61
+ // 🚨 THE CRITICAL FIX: The AI automatically triggers the preview!
115
62
  const handleSilentCapture = (result) => {
116
- if (silentCaptureResult.isAnalyzing) {
63
+ if (silentCaptureResult.isAnalyzing)
117
64
  return;
118
- }
119
65
  if (result.success && result.path) {
120
66
  setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: true, success: false, error: '' }));
121
67
  selfieVerification(result.path, env).then((response) => {
122
68
  if (response.length > 0) {
123
69
  const res = response[0];
124
- // In SANDBOX mode, always accept the result regardless of orientation
125
- if (env === 'SANDBOX' && res?.capture) {
126
- setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: true, error: '', path: result.path }));
127
- }
128
- else if (res?.orientation_direction === getOrientationOpposite(currentOrientation) && res?.capture) {
70
+ if ((env === 'SANDBOX' && res?.capture) || (res?.orientation_direction === getOrientationOpposite(currentOrientation) && res?.capture)) {
71
+ // 🎯 PERFECT MATCH! Skip the manual button and AUTO CAPTURE instantly
129
72
  setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: true, error: '', path: result.path }));
73
+ setPreviewImagePath(result.path ?? null);
74
+ setShowCamera(false);
75
+ setShowPreview(true);
130
76
  }
131
77
  else {
132
78
  setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: 'Le selfie n\'est pas correct' }));
@@ -140,24 +86,11 @@ export const SelfieCaptureTemplate = ({ component, value, onValueChange, error,
140
86
  });
141
87
  }
142
88
  };
143
- // Capture manuelle - affiche le preview
144
- const handleCapture = async (result) => {
145
- console.log("handleCapture called", result, silentCaptureResult);
146
- // Priorité 1: Si la capture silencieuse a réussi, utiliser ce path
147
- if (silentCaptureResult.success && silentCaptureResult.path) {
148
- setPreviewImagePath(silentCaptureResult.path);
149
- setShowCamera(false);
150
- setShowPreview(true);
151
- return;
152
- }
153
- // Priorité 2: Capture manuelle normale
154
- if (result.success && result.path) {
155
- setPreviewImagePath(result.path);
156
- setShowCamera(false);
157
- setShowPreview(true);
158
- }
89
+ // Legacy manual capture removed. Error handler kept.
90
+ const handleError = (event) => {
91
+ showAlert('Erreur', event.message);
92
+ setShowCamera(false);
159
93
  };
160
- // Confirmer la capture depuis le preview
161
94
  const handleConfirmCapture = async () => {
162
95
  if (!previewImagePath)
163
96
  return;
@@ -172,22 +105,18 @@ export const SelfieCaptureTemplate = ({ component, value, onValueChange, error,
172
105
  setShowPreview(false);
173
106
  setPreviewImagePath(null);
174
107
  setSilentCaptureResult({ success: false, isAnalyzing: false });
175
- // Passer à l'orientation suivante si disponible
176
108
  const currentIndex = orientations.indexOf(currentOrientation);
177
109
  if (currentIndex < orientations.length - 1) {
178
110
  const nextOrientation = orientations[currentIndex + 1];
179
111
  setCurrentOrientation(nextOrientation);
180
- // Rouvrir automatiquement la caméra pour la prochaine orientation
181
112
  setShowCamera(true);
182
113
  }
183
- // Si toutes les orientations sont complétées, on reste sur la vue principale
184
114
  }
185
115
  catch (e) {
186
116
  console.error("Error confirming capture", e);
187
117
  showAlert('Erreur', 'Erreur lors de la sauvegarde de l\'image');
188
118
  }
189
119
  };
190
- // Reprendre la photo depuis le preview
191
120
  const handleRetakeFromPreview = () => {
192
121
  setShowPreview(false);
193
122
  setPreviewImagePath(null);
@@ -199,370 +128,139 @@ export const SelfieCaptureTemplate = ({ component, value, onValueChange, error,
199
128
  if (idCardID) {
200
129
  const _idCardData = state.componentData[idCardID];
201
130
  const documentType = _idCardData?.documentType;
202
- // Map national_id to identity_card for selfie capture
203
131
  const mappedDocumentType = documentType === 'national_id' ? 'identity_card' : documentType;
204
- return {
205
- country: _idCardData?.country,
206
- documentType: mappedDocumentType
207
- };
132
+ return { country: _idCardData?.country, documentType: mappedDocumentType };
208
133
  }
209
134
  return null;
210
135
  }, [state.componentData]);
211
- console.log("idCardData", truncateFields(idCardData), JSON.stringify(truncateFields(state.componentData), null, 2));
212
- const handleError = (event) => {
213
- showAlert('Erreur', event.message);
214
- setShowCamera(false);
215
- };
216
- const isOrientationCompleted = (orientation) => {
217
- return !!capturedImages[orientation];
218
- };
219
- const isAllOrientationsCompleted = () => {
220
- return orientations.every(orientation => isOrientationCompleted(orientation));
221
- };
222
- console.log("Current Orientation", currentOrientation);
223
- // Vue Preview
136
+ const isOrientationCompleted = (orientation) => { return !!capturedImages[orientation]; };
137
+ const isAllOrientationsCompleted = () => { return orientations.every(orientation => isOrientationCompleted(orientation)); };
138
+ // --- PREVIEW RENDER ---
224
139
  if (showPreview && previewImagePath) {
225
- return (<View style={styles.containerCamera}>
226
- <View style={styles.previewContainer}>
227
- <View style={styles.previewHeader}>
228
- <TouchableOpacity onPress={handleRetakeFromPreview} style={styles.backButton}>
229
- <Text style={styles.backButtonText}>←</Text>
230
- </TouchableOpacity>
231
- <Text style={styles.previewTitle}>
232
- {state.currentLanguage === "en" ? "Preview" : "Aperçu"}
233
- </Text>
234
- <View style={{ width: 40 }}/>
235
- </View>
236
-
237
- <View style={styles.previewImageContainer}>
238
- <Image source={{ uri: previewImagePath }} style={styles.previewImage} resizeMode="contain"/>
239
- </View>
240
-
241
- <Text style={styles.previewInstructions}>
242
- {state.currentLanguage === "en"
243
- ? "Is your face clearly visible?"
244
- : "Votre visage est-il clairement visible ?"}
245
- </Text>
246
-
247
- <View style={styles.previewButtonsContainer}>
248
- <TouchableOpacity style={styles.retakeButton} onPress={handleRetakeFromPreview}>
249
- <Text style={styles.retakeButtonText}>
250
- {state.currentLanguage === "en" ? "Retake" : "Reprendre"}
251
- </Text>
252
- </TouchableOpacity>
253
-
254
- <TouchableOpacity style={styles.confirmButton} onPress={handleConfirmCapture}>
255
- <Text style={styles.confirmButtonText}>
256
- {state.currentLanguage === "en" ? "Use Photo" : "Utiliser"}
257
- </Text>
258
- </TouchableOpacity>
259
- </View>
260
- </View>
140
+ return (<View style={styles.containerCamera}>
141
+ <View style={styles.previewContainer}>
142
+ <View style={styles.previewHeader}>
143
+ <TouchableOpacity onPress={handleRetakeFromPreview} style={styles.backButton}>
144
+ <Text style={styles.backButtonText}>←</Text>
145
+ </TouchableOpacity>
146
+ <Text style={styles.previewTitle}>{state.currentLanguage === "en" ? "Preview" : "Aperçu"}</Text>
147
+ <View style={{ width: 40 }}/>
148
+ </View>
149
+ <View style={styles.previewImageContainer}>
150
+ <Image source={{ uri: previewImagePath }} style={styles.previewImage} resizeMode="contain"/>
151
+ </View>
152
+ <Text style={styles.previewInstructions}>
153
+ {state.currentLanguage === "en" ? "Is your face clearly visible?" : "Votre visage est-il clairement visible ?"}
154
+ </Text>
155
+ <View style={styles.previewButtonsContainer}>
156
+ <TouchableOpacity style={styles.retakeButton} onPress={handleRetakeFromPreview}>
157
+ <Text style={styles.retakeButtonText}>{state.currentLanguage === "en" ? "Retake" : "Reprendre"}</Text>
158
+ </TouchableOpacity>
159
+ <TouchableOpacity style={styles.confirmButton} onPress={handleConfirmCapture}>
160
+ <Text style={styles.confirmButtonText}>{state.currentLanguage === "en" ? "Use Photo" : "Utiliser"}</Text>
161
+ </TouchableOpacity>
162
+ </View>
163
+ </View>
261
164
  </View>);
262
165
  }
263
- // Vue Camera
166
+ // --- CAMERA RENDER ---
264
167
  if (showCamera) {
265
- return (<View style={styles.containerCamera}>
266
- <EnhancedCameraView instructions={getOrientationInstructions(currentOrientation)} showCamera={true} cameraType="front" style={styles.camera} onCapture={handleCapture} onError={handleError} onClose={() => setShowCamera(false)} quality="high" showCaptureButton={true} showSwitchCamera={false} enableFlash={false} silentCaptureResult={silentCaptureResult} onSilentCapture={handleSilentCapture} overlayComponent={<SelfieOverlay xMin={20} yMin={140} xMax={370} yMax={340} cornerOpacity={1} instructions={""} language={state.currentLanguage} orientation={currentOrientation} instructionsTile={getInstructions(currentOrientation).title} instructionsSubtitle={getInstructions(currentOrientation).subtitle} stepperProps={{
267
- back: () => {
268
- setShowCamera(false);
269
- },
168
+ return (<View style={styles.containerCamera}>
169
+ <EnhancedCameraView key={currentOrientation} // Forces complete reset when direction changes
170
+ showCamera={true} cameraType="front" style={styles.camera} onError={handleError} onClose={() => setShowCamera(false)} quality="high" silentCaptureResult={silentCaptureResult} onSilentCapture={handleSilentCapture} overlayComponent={<>
171
+ {/* Subtle AI processing pill */}
172
+ {silentCaptureResult.isAnalyzing && (<View style={styles.topAnalyzingPillContainer}>
173
+ <View style={styles.topAnalyzingPill}>
174
+ <ActivityIndicator size="small" color="white"/>
175
+ <Text style={styles.analyzingPillText}>
176
+ {state.currentLanguage === 'en' ? 'Verifying position...' : 'Vérification...'}
177
+ </Text>
178
+ </View>
179
+ </View>)}
180
+
181
+ <SelfieOverlay xMin={20} yMin={140} xMax={370} yMax={340} cornerOpacity={1} instructions={""} language={state.currentLanguage} orientation={currentOrientation} instructionsTile={getInstructions(currentOrientation).title} instructionsSubtitle={getInstructions(currentOrientation).subtitle} stepperProps={{
182
+ back: () => setShowCamera(false),
270
183
  selectedDocumentType: "Selfie",
271
184
  step: state.currentComponentIndex + 1,
272
185
  totalSteps: state.template.components.length,
273
186
  side: currentOrientation,
274
- }}/>}/>
187
+ }}/>
188
+ </>}/>
275
189
  </View>);
276
190
  }
277
- return (<View style={[{
278
- maxWidth: 760,
279
- width: '100%',
280
- height: '100%',
281
- }]}>
282
- <View style={styles.container}>
283
- <Text style={styles.title}>{getLocalizedText(component.labels)}</Text>
284
- <Text style={styles.description}>{getLocalizedText(component.instructions)}</Text>
285
-
286
- <ScrollView style={styles.orientationsContainer} showsVerticalScrollIndicator={false}>
287
- <View style={{ flexDirection: 'column', alignItems: 'center', gap: 10 }}>
288
-
289
- {orientations.map((orientation, key) => (<View key={orientation} style={{
290
- backgroundColor: '#F3F4F6',
291
- borderRadius: 12,
292
- flexDirection: 'row',
293
- alignItems: 'center',
294
- gap: 10,
295
- width: '100%',
296
- paddingVertical: 10,
297
- paddingHorizontal: 10,
298
- }}>
299
- <View style={{
300
- flexDirection: 'row',
301
- alignItems: 'center',
302
- justifyContent: 'center',
303
- backgroundColor: isOrientationCompleted(orientation) ? '#2DBE60' : '#D1D5DB',
304
- borderRadius: 100,
305
- width: 30,
306
- height: 30,
307
- }}>
308
- <Text style={{ color: 'white', fontSize: 16, fontWeight: 'bold' }}>{key + 1}</Text>
309
- </View>
310
-
311
-
312
- <Text style={styles.orientationTitle}>
313
- {getOrientationLabel(orientation)}
314
- </Text>
315
-
316
-
317
-
318
- </View>))}
319
- <View style={{ backgroundColor: "#F6CB0D1A", width: "100%", padding: 10, borderRadius: 10 }}>
320
- <Text style={{ color: '#997E06', fontSize: 16, fontWeight: 'bold' }}>
321
- {state.currentLanguage === "en"
322
- ? "Tips for a good selfie:"
323
- : "Conseils pour une bonne photo selfie :"}
324
- </Text>
325
- <View style={{ paddingLeft: 10, paddingTop: 4 }}>
326
- <Text style={{ color: '#997E06', fontSize: 14, fontWeight: 'bold' }}>
191
+ return (<View style={[{ maxWidth: 760, width: '100%', height: '100%' }]}>
192
+ <View style={styles.container}>
193
+ <Text style={styles.title}>{getLocalizedText(component.labels)}</Text>
194
+ <Text style={styles.description}>{getLocalizedText(component.instructions)}</Text>
195
+ <ScrollView style={styles.orientationsContainer} showsVerticalScrollIndicator={false}>
196
+ <View style={{ flexDirection: 'column', alignItems: 'center', gap: 10 }}>
197
+ {orientations.map((orientation, key) => (<View key={orientation} style={styles.orientationListItem}>
198
+ <View style={[styles.orientationListCircle, { backgroundColor: isOrientationCompleted(orientation) ? '#2DBE60' : '#D1D5DB' }]}>
199
+ <Text style={{ color: 'white', fontSize: 16, fontWeight: 'bold' }}>{key + 1}</Text>
200
+ </View>
201
+ <Text style={styles.orientationTitle}>{getOrientationLabel(orientation)}</Text>
202
+ </View>))}
203
+ <View style={styles.tipsContainer}>
204
+ <Text style={styles.tipsHeader}>
205
+ {state.currentLanguage === "en" ? "Tips for a good selfie:" : "Conseils pour une bonne photo selfie :"}
206
+ </Text>
207
+ <View style={{ paddingLeft: 10, paddingTop: 4 }}>
208
+ <Text style={styles.tipsBody}>
327
209
  {state.currentLanguage === "en"
328
210
  ? `• Remove glasses and hat \n• Look directly at the camera \n• Ensure good lighting \n`
329
- : `• Retirez vos lunettes et votre chapeau \n• Regardez directement la caméra \n• Assurez-vous d'une bonne luminosité \n`}
330
- </Text>
331
- </View>
332
- </View>
333
- <View style={{ height: 10 }}/>
334
- {isAllOrientationsCompleted() ? <>
335
- <Button title={t('common.continue')} fullWidth style={{ paddingVertical: 20, paddingTop: 12 }} onPress={async () => {
211
+ : `• Retirez vos lunettes et votre chapeau \n• Regardez directement la caméra \n• Assurez-vous d'une bonne luminosité \n`}
212
+ </Text>
213
+ </View>
214
+ </View>
215
+ <View style={{ height: 10 }}/>
216
+ {isAllOrientationsCompleted() ? (<Button title={t('common.continue')} fullWidth style={{ paddingVertical: 20, paddingTop: 12 }} onPress={async () => {
336
217
  const value = {
337
218
  ...capturedImages,
338
219
  ...(idCardData?.country ? { country: idCardData.country } : {}),
339
220
  ...(idCardData?.documentType ? { documentType: idCardData.documentType } : {}),
340
221
  };
341
- console.log("value", JSON.stringify(truncateFields(value), null, 2));
342
222
  onValueChange(value);
343
223
  actions.nextComponent();
344
- }}/>
345
- </> : (<Button title={t('kyc.selfieCapture.captureButton')} fullWidth style={{ paddingVertical: 20, paddingTop: 12 }} onPress={() => {
346
- if (isAllOrientationsCompleted()) {
347
- actions.nextComponent();
348
- }
349
- else {
350
- setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: '' }));
351
- setShowCamera(true);
352
- }
353
- }}/>)}
354
-
355
- </View>
356
- </ScrollView>
357
-
358
- {error && (<Text style={styles.errorText}>{error}</Text>)}
359
- </View>
224
+ }}/>) : (<Button title={t('kyc.selfieCapture.captureButton')} fullWidth style={{ paddingVertical: 20, paddingTop: 12 }} onPress={() => {
225
+ setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: '' }));
226
+ setShowCamera(true);
227
+ }}/>)}
228
+ </View>
229
+ </ScrollView>
230
+ {error && <Text style={styles.errorText}>{error}</Text>}
231
+ </View>
360
232
  </View>);
361
233
  };
362
234
  const styles = StyleSheet.create({
363
- root: {
364
- flex: 1,
365
- paddingVertical: 10,
366
- },
367
- container: {
368
- backgroundColor: 'white',
369
- margin: 15,
370
- borderRadius: 20,
371
- paddingVertical: 20,
372
- paddingHorizontal: 16,
373
- shadowColor: '#000',
374
- shadowOffset: { width: 0, height: 2 },
375
- shadowOpacity: 0.35,
376
- shadowRadius: 4.84,
377
- elevation: 10,
378
- },
379
- containerCamera: {
380
- flex: 1,
381
- width: '100%',
382
- height: '100%',
383
- backgroundColor: '#000',
384
- },
385
- title: {
386
- fontSize: 24,
387
- fontWeight: 'bold',
388
- color: '#333',
389
- marginBottom: 8,
390
- textAlign: 'center',
391
- },
392
- description: {
393
- fontSize: 16,
394
- color: '#666',
395
- marginBottom: 20,
396
- lineHeight: 22,
397
- textAlign: 'center',
398
- },
399
- camera: {
400
- flex: 1,
401
- overflow: 'hidden',
402
- },
403
- attemptsText: {
404
- fontSize: 14,
405
- color: '#666',
406
- textAlign: 'center',
407
- marginBottom: 10,
408
- },
235
+ root: { flex: 1, paddingVertical: 10 },
236
+ container: { backgroundColor: 'white', margin: 15, borderRadius: 20, paddingVertical: 20, paddingHorizontal: 16, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.35, shadowRadius: 4.84, elevation: 10 },
237
+ containerCamera: { ...StyleSheet.absoluteFillObject, backgroundColor: '#000', zIndex: 999 },
238
+ title: { fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8, textAlign: 'center' },
239
+ description: { fontSize: 16, color: '#666', marginBottom: 20, lineHeight: 22, textAlign: 'center' },
240
+ camera: { flex: 1 },
409
241
  orientationsContainer: {},
410
- orientationContainer: {
411
- backgroundColor: 'white',
412
- borderRadius: 12,
413
- padding: 16,
414
- marginBottom: 16,
415
- shadowColor: '#000',
416
- shadowOffset: {
417
- width: 0,
418
- height: 2,
419
- },
420
- shadowOpacity: 0.1,
421
- shadowRadius: 3.84,
422
- elevation: 5,
423
- },
424
- orientationTitle: {
425
- fontSize: 18,
426
- fontWeight: '600',
427
- color: '#333',
428
- },
429
- capturedImageContainer: {
430
- alignItems: 'center',
431
- },
432
- capturedImage: {
433
- width: 200,
434
- height: 200,
435
- borderRadius: 12,
436
- marginBottom: 12,
437
- },
438
- captureButton: {
439
- flexDirection: 'row',
440
- alignItems: 'center',
441
- justifyContent: 'center',
442
- backgroundColor: '#2DBD60',
443
- paddingVertical: 16,
444
- paddingHorizontal: 24,
445
- borderRadius: 12,
446
- marginTop: 8,
447
- },
448
- captureIcon: {
449
- fontSize: 24,
450
- marginRight: 8,
451
- },
452
- captureText: {
453
- fontSize: 16,
454
- fontWeight: '600',
455
- color: 'white',
456
- },
457
- // Preview styles
458
- previewContainer: {
459
- flex: 1,
460
- backgroundColor: '#000',
461
- justifyContent: 'space-between',
462
- },
463
- previewHeader: {
464
- flexDirection: 'row',
465
- alignItems: 'center',
466
- justifyContent: 'space-between',
467
- paddingHorizontal: 16,
468
- paddingTop: 50,
469
- paddingBottom: 16,
470
- },
471
- backButton: {
472
- width: 40,
473
- height: 40,
474
- borderRadius: 20,
475
- backgroundColor: 'rgba(255,255,255,0.2)',
476
- justifyContent: 'center',
477
- alignItems: 'center',
478
- },
479
- backButtonText: {
480
- color: 'white',
481
- fontSize: 24,
482
- fontWeight: 'bold',
483
- },
484
- previewTitle: {
485
- color: 'white',
486
- fontSize: 18,
487
- fontWeight: '600',
488
- },
489
- previewImageContainer: {
490
- flex: 1,
491
- justifyContent: 'center',
492
- alignItems: 'center',
493
- paddingHorizontal: 20,
494
- },
495
- previewImage: {
496
- width: '100%',
497
- height: '80%',
498
- borderRadius: 16,
499
- },
500
- previewInstructions: {
501
- color: 'white',
502
- fontSize: 16,
503
- textAlign: 'center',
504
- paddingHorizontal: 20,
505
- marginBottom: 20,
506
- },
507
- previewButtonsContainer: {
508
- flexDirection: 'row',
509
- justifyContent: 'space-between',
510
- paddingHorizontal: 20,
511
- paddingBottom: 40,
512
- gap: 16,
513
- },
514
- retakeButton: {
515
- flex: 1,
516
- backgroundColor: 'rgba(255,255,255,0.2)',
517
- paddingVertical: 16,
518
- paddingHorizontal: 20,
519
- borderRadius: 12,
520
- alignItems: 'center',
521
- },
522
- retakeButtonText: {
523
- fontSize: 16,
524
- fontWeight: '600',
525
- color: 'white',
526
- },
527
- confirmButton: {
528
- flex: 1,
529
- backgroundColor: '#2DBD60',
530
- paddingVertical: 16,
531
- paddingHorizontal: 20,
532
- borderRadius: 12,
533
- alignItems: 'center',
534
- },
535
- confirmButtonText: {
536
- fontSize: 16,
537
- fontWeight: '600',
538
- color: 'white',
539
- },
540
- completionContainer: {
541
- alignItems: 'center',
542
- padding: 20,
543
- },
544
- completionText: {
545
- fontSize: 18,
546
- fontWeight: '600',
547
- color: '#2DBD60',
548
- marginBottom: 16,
549
- },
550
- retakeAllButton: {
551
- backgroundColor: '#FF6B6B',
552
- paddingVertical: 12,
553
- paddingHorizontal: 20,
554
- borderRadius: 8,
555
- },
556
- retakeAllButtonText: {
557
- fontSize: 14,
558
- fontWeight: '600',
559
- color: 'white',
560
- },
561
- errorText: {
562
- color: '#dc2626',
563
- fontSize: 14,
564
- textAlign: 'center',
565
- marginTop: 10,
566
- },
242
+ orientationListItem: { backgroundColor: '#F3F4F6', borderRadius: 12, flexDirection: 'row', alignItems: 'center', gap: 10, width: '100%', paddingVertical: 10, paddingHorizontal: 10 },
243
+ orientationListCircle: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', borderRadius: 100, width: 30, height: 30 },
244
+ orientationTitle: { fontSize: 18, fontWeight: '600', color: '#333' },
245
+ tipsContainer: { backgroundColor: "#F6CB0D1A", width: "100%", padding: 10, borderRadius: 10 },
246
+ tipsHeader: { color: '#997E06', fontSize: 16, fontWeight: 'bold' },
247
+ tipsBody: { color: '#997E06', fontSize: 14, fontWeight: 'bold' },
248
+ previewContainer: { flex: 1, backgroundColor: '#000', justifyContent: 'space-between' },
249
+ previewHeader: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 16, paddingTop: 50, paddingBottom: 16 },
250
+ backButton: { width: 40, height: 40, borderRadius: 20, backgroundColor: 'rgba(255,255,255,0.2)', justifyContent: 'center', alignItems: 'center' },
251
+ backButtonText: { color: 'white', fontSize: 24, fontWeight: 'bold' },
252
+ previewTitle: { color: 'white', fontSize: 18, fontWeight: '600' },
253
+ previewImageContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 20 },
254
+ previewImage: { width: '100%', height: '80%', borderRadius: 16 },
255
+ previewInstructions: { color: 'white', fontSize: 16, textAlign: 'center', paddingHorizontal: 20, marginBottom: 20 },
256
+ previewButtonsContainer: { flexDirection: 'row', justifyContent: 'space-between', paddingHorizontal: 20, paddingBottom: 40, gap: 16 },
257
+ retakeButton: { flex: 1, backgroundColor: 'rgba(255,255,255,0.2)', paddingVertical: 16, paddingHorizontal: 20, borderRadius: 12, alignItems: 'center' },
258
+ retakeButtonText: { fontSize: 16, fontWeight: '600', color: 'white' },
259
+ confirmButton: { flex: 1, backgroundColor: '#2DBD60', paddingVertical: 16, paddingHorizontal: 20, borderRadius: 12, alignItems: 'center' },
260
+ confirmButtonText: { fontSize: 16, fontWeight: '600', color: 'white' },
261
+ errorText: { color: '#dc2626', fontSize: 14, textAlign: 'center', marginTop: 10 },
262
+ topAnalyzingPillContainer: { position: 'absolute', top: Platform.OS === 'android' ? 60 : 50, left: 0, right: 0, alignItems: 'center', zIndex: 100 },
263
+ topAnalyzingPill: { flexDirection: 'row', alignItems: 'center', backgroundColor: 'rgba(0,0,0,0.6)', paddingVertical: 8, paddingHorizontal: 16, borderRadius: 20, gap: 8 },
264
+ analyzingPillText: { color: 'white', fontSize: 14, fontWeight: 'bold' },
567
265
  });
568
266
  //# sourceMappingURL=SelfieCaptureTemplate.js.map