@velion-la/onboarding-sdk-react-native 1.0.0-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/commonjs/camera/DocumentCapture.js +78 -29
  2. package/lib/commonjs/camera/DocumentCapture.js.map +1 -1
  3. package/lib/commonjs/camera/LivenessCamera.js +18 -3
  4. package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
  5. package/lib/commonjs/camera/MapAddressPicker.js +12 -22
  6. package/lib/commonjs/camera/MapAddressPicker.js.map +1 -1
  7. package/lib/commonjs/i18n/strings/en.js +3 -2
  8. package/lib/commonjs/i18n/strings/en.js.map +1 -1
  9. package/lib/commonjs/i18n/strings/es.js +3 -2
  10. package/lib/commonjs/i18n/strings/es.js.map +1 -1
  11. package/lib/commonjs/steps/DocumentsOcrStep.js +121 -23
  12. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -1
  13. package/lib/commonjs/steps/PhoneContactStep.js +10 -4
  14. package/lib/commonjs/steps/PhoneContactStep.js.map +1 -1
  15. package/lib/commonjs/steps/PhoneOtpStep.js +17 -6
  16. package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -1
  17. package/lib/commonjs/ui/StepShell.js +134 -9
  18. package/lib/commonjs/ui/StepShell.js.map +1 -1
  19. package/lib/commonjs/ui/VelionOnboardingScreen.js +52 -13
  20. package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -1
  21. package/lib/commonjs/ui/overlays/ProgressBar.js +8 -2
  22. package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -1
  23. package/lib/commonjs/utils/documentCrop.js +115 -0
  24. package/lib/commonjs/utils/documentCrop.js.map +1 -0
  25. package/lib/commonjs/utils/useSafeAreaInsets.js +41 -0
  26. package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
  27. package/lib/module/camera/DocumentCapture.js +78 -29
  28. package/lib/module/camera/DocumentCapture.js.map +1 -1
  29. package/lib/module/camera/LivenessCamera.js +18 -3
  30. package/lib/module/camera/LivenessCamera.js.map +1 -1
  31. package/lib/module/camera/MapAddressPicker.js +12 -23
  32. package/lib/module/camera/MapAddressPicker.js.map +1 -1
  33. package/lib/module/i18n/strings/en.js +3 -2
  34. package/lib/module/i18n/strings/en.js.map +1 -1
  35. package/lib/module/i18n/strings/es.js +3 -2
  36. package/lib/module/i18n/strings/es.js.map +1 -1
  37. package/lib/module/steps/DocumentsOcrStep.js +121 -23
  38. package/lib/module/steps/DocumentsOcrStep.js.map +1 -1
  39. package/lib/module/steps/PhoneContactStep.js +10 -4
  40. package/lib/module/steps/PhoneContactStep.js.map +1 -1
  41. package/lib/module/steps/PhoneOtpStep.js +17 -6
  42. package/lib/module/steps/PhoneOtpStep.js.map +1 -1
  43. package/lib/module/ui/StepShell.js +134 -10
  44. package/lib/module/ui/StepShell.js.map +1 -1
  45. package/lib/module/ui/VelionOnboardingScreen.js +55 -14
  46. package/lib/module/ui/VelionOnboardingScreen.js.map +1 -1
  47. package/lib/module/ui/overlays/ProgressBar.js +8 -1
  48. package/lib/module/ui/overlays/ProgressBar.js.map +1 -1
  49. package/lib/module/utils/documentCrop.js +109 -0
  50. package/lib/module/utils/documentCrop.js.map +1 -0
  51. package/lib/module/utils/useSafeAreaInsets.js +37 -0
  52. package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
  53. package/lib/typescript/camera/DocumentCapture.d.ts +20 -8
  54. package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -1
  55. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -1
  56. package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -1
  57. package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
  58. package/lib/typescript/i18n/strings/es.d.ts +1 -0
  59. package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
  60. package/lib/typescript/steps/DocumentsOcrStep.d.ts +8 -6
  61. package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -1
  62. package/lib/typescript/ui/StepShell.d.ts.map +1 -1
  63. package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -1
  64. package/lib/typescript/ui/overlays/ProgressBar.d.ts +6 -0
  65. package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -1
  66. package/lib/typescript/utils/documentCrop.d.ts +62 -0
  67. package/lib/typescript/utils/documentCrop.d.ts.map +1 -0
  68. package/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
  69. package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
  70. package/package.json +2 -1
  71. package/src/camera/DocumentCapture.tsx +78 -28
  72. package/src/camera/LivenessCamera.tsx +10 -3
  73. package/src/camera/MapAddressPicker.tsx +12 -18
  74. package/src/i18n/strings/en.ts +3 -2
  75. package/src/i18n/strings/es.ts +3 -2
  76. package/src/steps/DocumentsOcrStep.tsx +145 -24
  77. package/src/steps/PhoneContactStep.tsx +9 -3
  78. package/src/steps/PhoneOtpStep.tsx +14 -4
  79. package/src/ui/StepShell.tsx +129 -10
  80. package/src/ui/VelionOnboardingScreen.tsx +53 -13
  81. package/src/ui/overlays/ProgressBar.tsx +8 -1
  82. package/src/utils/documentCrop.ts +138 -0
  83. package/src/utils/useSafeAreaInsets.ts +37 -0
@@ -1 +1 @@
1
- {"version":3,"file":"MapAddressPicker.d.ts","sourceRoot":"","sources":["../../../src/camera/MapAddressPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAsE/C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE;QACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAC9B,GAAG,SAAS,CAAC;IACd,wEAAwE;IACxE,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,SAAS,EAAE,CACT,MAAM,EAAE,mBAAmB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAClE,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,qBAgN7B"}
1
+ {"version":3,"file":"MapAddressPicker.d.ts","sourceRoot":"","sources":["../../../src/camera/MapAddressPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AA0D/C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE;QACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAC9B,GAAG,SAAS,CAAC;IACd,wEAAwE;IACxE,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,SAAS,EAAE,CACT,MAAM,EAAE,mBAAmB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAClE,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,qBAsN7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,eAAO,MAAM,EAAE,EAAE,YA4UhB,CAAC"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,eAAO,MAAM,EAAE,EAAE,YA6UhB,CAAC"}
@@ -201,6 +201,7 @@ export declare const ES: {
201
201
  confirmBtn: string;
202
202
  confirmFront: string;
203
203
  confirmBack: string;
204
+ processing: string;
204
205
  initializing: string;
205
206
  uploadingFront: string;
206
207
  uploadingBack: string;
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/es.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyUd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/es.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Ud,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,EAAE,CAAC"}
@@ -5,13 +5,15 @@
5
5
  * intro → captureFront → reviewFront → captureBack → reviewBack →
6
6
  * POST /documents-init → PUT image/jpeg × 2 → POST /documents-verify → done.
7
7
  *
8
- * No edge detection / OpenCV port (intentional MVP scope per the brief). The
9
- * camera shows the ID-1 frame guide and the user fills it; the backend OCR
10
- * pipeline handles cropping.
8
+ * Crop: on capture we receive the on-screen guide rectangle and crop the photo
9
+ * to it (OSDKR-2) — a geometric crop to the visible ID-1 frame, NOT edge
10
+ * detection / OpenCV. This trims the camera background, improves OCR framing
11
+ * and shrinks the upload. The backend's Document AI still runs OCR + its own
12
+ * face crop on top, so we keep a safety margin around the guide.
11
13
  *
12
- * Compression: vision-camera writes a high-quality JPEG. We re-compress with
13
- * `expo-image-manipulator` before upload so we keep the payload under the
14
- * 5 MB ceiling Velion's storage layer expects.
14
+ * Compression: vision-camera writes a high-quality JPEG. After cropping we
15
+ * resize + re-compress with `expo-image-manipulator` before upload so we keep
16
+ * the payload under the 5 MB ceiling Velion's storage layer expects.
15
17
  */
16
18
  import type { StepDeps, StepModule } from './types';
17
19
  export declare class DocumentsOcrStep implements StepModule {
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentsOcrStep.d.ts","sourceRoot":"","sources":["../../../src/steps/DocumentsOcrStep.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiCH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAsBpD,qBAAa,gBAAiB,YAAW,UAAU;IAKrC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEG,IAAI,EAAE,QAAQ;IAE3C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BpB,OAAO,IAAI,IAAI;CAIhB"}
1
+ {"version":3,"file":"DocumentsOcrStep.d.ts","sourceRoot":"","sources":["../../../src/steps/DocumentsOcrStep.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAkCH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAsBpD,qBAAa,gBAAiB,YAAW,UAAU;IAKrC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEG,IAAI,EAAE,QAAQ;IAE3C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BpB,OAAO,IAAI,IAAI;CAIhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"StepShell.d.ts","sourceRoot":"","sources":["../../../src/ui/StepShell.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAClC,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,kFAAkF;IAClF,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAoB,EACpB,MAAM,EACN,SAAmB,EACnB,YAAoB,GACrB,EAAE,cAAc,+BAsDhB"}
1
+ {"version":3,"file":"StepShell.d.ts","sourceRoot":"","sources":["../../../src/ui/StepShell.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBvC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,kFAAkF;IAClF,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAClC,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,kFAAkF;IAClF,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAoB,EACpB,MAAM,EACN,SAAmB,EACnB,YAAoB,GACrB,EAAE,cAAc,+BA2IhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"VelionOnboardingScreen.d.ts","sourceRoot":"","sources":["../../../src/ui/VelionOnboardingScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACT,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC9D,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACvD;AAmBD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,UAAU,EACV,MAAM,EACN,MAAM,GACP,EAAE,2BAA2B,qBAc7B;AA6KD,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"VelionOnboardingScreen.d.ts","sourceRoot":"","sources":["../../../src/ui/VelionOnboardingScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACT,MAAM,UAAU,CAAC;AA+BlB,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC9D,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACvD;AAmBD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,UAAU,EACV,MAAM,EACN,MAAM,GACP,EAAE,2BAA2B,qBAgB7B;AA8LD,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -6,6 +6,12 @@
6
6
  * Animated with `Animated.timing` (driver: native) so we don't pull in
7
7
  * Reanimated yet; respects `useReducedMotion()`.
8
8
  */
9
+ /**
10
+ * Height of the progress track, in px. Exported so layout-aware chrome (e.g.
11
+ * `StepShell`'s fixed back-button strip) can sit flush below the bar without
12
+ * duplicating the magic number.
13
+ */
14
+ export declare const PROGRESS_BAR_HEIGHT = 4;
9
15
  export interface ProgressBarProps {
10
16
  /** 0–100. Components compute the trickling logic externally and pass it in. */
11
17
  value: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlays/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAc,EAAE,EAAE,gBAAgB,+BA+CtE;AAKD;;;;GAIG;AACH,eAAO,MAAM,YAAY;kBACT,MAAM,GAAG,MAAM;gBAGjB,MAAM;aAGT,MAAM;CAGhB,CAAC"}
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../../src/ui/overlays/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAc,EAAE,EAAE,gBAAgB,+BA+CtE;AAKD;;;;GAIG;AACH,eAAO,MAAM,YAAY;kBACT,MAAM,GAAG,MAAM;gBAGjB,MAAM;aAGT,MAAM;CAGhB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @fileoverview Geometry for the document capture guide + crop.
3
+ *
4
+ * Two pure helpers, shared between the camera overlay and the post-capture
5
+ * crop so the pixels we keep are *exactly* the rectangle the user framed:
6
+ *
7
+ * - `computeCutout` — the on-screen ID-1 guide rectangle (screen px).
8
+ * - `computeGuideCropRect` — maps that guide rectangle into the captured
9
+ * photo's pixel space, compensating for the camera preview's `cover` fit
10
+ * (the preview center-crops the sensor frame to the screen aspect ratio).
11
+ *
12
+ * This is a *geometric* crop to a fixed guide, NOT edge detection / OpenCV —
13
+ * we never inspect pixels. The backend's Document AI still runs OCR and its
14
+ * own face crop on top, so we keep a safety margin around the guide to avoid
15
+ * clipping the document (or the portrait the backend needs).
16
+ */
17
+ import type { DocumentOrientation } from '../types';
18
+ export interface CutoutRect {
19
+ left: number;
20
+ top: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+ export interface PixelRect {
25
+ x: number;
26
+ y: number;
27
+ width: number;
28
+ height: number;
29
+ }
30
+ /** Default crop margin: expand each side of the guide by this fraction of the
31
+ * guide size, so a document slightly overflowing the frame isn't clipped. */
32
+ export declare const DEFAULT_CROP_MARGIN = 0.07;
33
+ /**
34
+ * The on-screen guide rectangle, in screen pixels. Mirrors what the mask
35
+ * overlay draws so the crop matches the visible cutout exactly.
36
+ */
37
+ export declare function computeCutout(screenW: number, screenH: number, orientation: DocumentOrientation): CutoutRect;
38
+ /**
39
+ * Map the on-screen guide rectangle into the captured photo's pixel space.
40
+ *
41
+ * The preview renders the photo with `cover` fit: the sensor frame is scaled
42
+ * up until it fills the screen and the overflow is center-cropped. So a screen
43
+ * point `(sx, sy)` maps to photo pixel `((W_img - W_screen/s)/2 + sx/s, …)`,
44
+ * where `s = max(W_screen/W_img, H_screen/H_img)`.
45
+ *
46
+ * `imageW`/`imageH` MUST be the photo's *display* (orientation-normalized)
47
+ * dimensions — i.e. portrait when the device is portrait — not the raw sensor
48
+ * dimensions, which are often landscape with an EXIF rotation flag.
49
+ *
50
+ * The result is expanded by `margin` (fraction of the mapped guide) and
51
+ * clamped to the image bounds, then rounded to integers (the manipulator
52
+ * rejects fractional crop rects).
53
+ */
54
+ export declare function computeGuideCropRect(params: {
55
+ screenW: number;
56
+ screenH: number;
57
+ imageW: number;
58
+ imageH: number;
59
+ cutout: CutoutRect;
60
+ margin?: number;
61
+ }): PixelRect;
62
+ //# sourceMappingURL=documentCrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentCrop.d.ts","sourceRoot":"","sources":["../../../src/utils/documentCrop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAYD;8EAC8E;AAC9E,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,mBAAmB,GAC/B,UAAU,CAiBZ;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,SAAS,CAwCZ"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @fileoverview Shared safe-area inset hook with a dynamic, fail-safe loader.
3
+ *
4
+ * `react-native-safe-area-context` is a transitive peer of Expo SDK 54+ (and is
5
+ * declared as a peerDependency of this SDK), but we never import it statically:
6
+ * hosts that strip optional native deps, or render the SDK outside a
7
+ * `SafeAreaProvider`, must still get a usable layout. So the hook is loaded with
8
+ * a `require` inside a try/catch and falls back to zero insets.
9
+ *
10
+ * The `require` result is deterministic for the lifetime of the bundle (the
11
+ * module is either installed or not), so the conditional hook call below does
12
+ * not change across renders — it does not violate the rules of hooks. Callers
13
+ * MUST still invoke this hook unconditionally (before any early return).
14
+ *
15
+ * Insets are applied to UI chrome (headers, CTAs, camera controls) — never to
16
+ * the full-bleed `<Camera>` / `<MapView>` preview, which must keep covering the
17
+ * whole screen so OCR / liveness framing is not cropped.
18
+ */
19
+ export interface EdgeInsets {
20
+ top: number;
21
+ bottom: number;
22
+ left: number;
23
+ right: number;
24
+ }
25
+ export declare function useSafeAreaInsets(): EdgeInsets;
26
+ //# sourceMappingURL=useSafeAreaInsets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSafeAreaInsets.d.ts","sourceRoot":"","sources":["../../../src/utils/useSafeAreaInsets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAID,wBAAgB,iBAAiB,IAAI,UAAU,CAQ9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velion-la/onboarding-sdk-react-native",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0",
4
4
  "description": "Native React Native SDK for the Velion Onboarding (KYC) flow: ID document OCR, passive + active liveness, device fingerprint, OTP verification, address picker, and personal / legal information forms.",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -74,6 +74,7 @@
74
74
  "react": ">=19.0.0",
75
75
  "react-native": ">=0.81.0",
76
76
  "react-native-maps": ">=1.20.0",
77
+ "react-native-safe-area-context": ">=4.0.0",
77
78
  "react-native-svg": ">=15.0.0",
78
79
  "react-native-vision-camera": ">=4.6.0"
79
80
  },
@@ -5,12 +5,12 @@
5
5
  * triggers `takePhoto()` with `qualityPrioritization: 'balanced'`; the file
6
6
  * URI is returned to the caller via `onCaptured`.
7
7
  *
8
- * Visual: dark scrim with a transparent rectangular cutout (ID-1 16:10 ratio
9
- * by default). The cutout is the visible-only guide — we do NOT crop the
10
- * image client-side because the server's OCR pipeline rejects soft crops.
11
- * The user is asked to fill the frame; the backend handles edge detection.
12
- *
13
- * No edge detection / OpenCV port (intentional MVP scope per the brief).
8
+ * Visual: dark scrim with a transparent rectangular cutout (ID-1 ratio). The
9
+ * cutout is both the visible guide AND the crop region: on capture we hand the
10
+ * caller the guide rectangle so the photo can be cropped to exactly what the
11
+ * user framed (OSDKR-2). This is a geometric crop to a fixed guide — NOT edge
12
+ * detection / OpenCV; we never inspect pixels. The backend's Document AI still
13
+ * runs OCR and its own face crop on top.
14
14
  */
15
15
 
16
16
  import { useCallback, useEffect, useRef, useState } from 'react';
@@ -32,6 +32,18 @@ import {
32
32
  import type { DocumentOrientation, DocumentSide } from '../types';
33
33
  import { useTheme, withAlpha } from '../ui/theme';
34
34
  import { Button } from '../ui/primitives/Button';
35
+ import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
36
+ import { computeCutout, type CutoutRect } from '../utils/documentCrop';
37
+
38
+ /**
39
+ * Geometry of the on-screen guide at capture time, handed to `onCaptured` so
40
+ * the photo can be cropped to exactly what the user framed.
41
+ */
42
+ export interface CaptureGuide {
43
+ cutout: CutoutRect;
44
+ screenW: number;
45
+ screenH: number;
46
+ }
35
47
 
36
48
  export interface DocumentCaptureProps {
37
49
  side: DocumentSide;
@@ -46,7 +58,13 @@ export interface DocumentCaptureProps {
46
58
  retryLabel: string;
47
59
  /** Localized "Cancel" / back label. */
48
60
  cancelLabel: string;
49
- onCaptured: (photo: PhotoFile, side: DocumentSide) => void;
61
+ /** Localized label shown over the camera while the shot is processed. */
62
+ processingLabel: string;
63
+ onCaptured: (
64
+ photo: PhotoFile,
65
+ side: DocumentSide,
66
+ guide: CaptureGuide,
67
+ ) => void | Promise<void>;
50
68
  onCancel: () => void;
51
69
  }
52
70
 
@@ -58,10 +76,13 @@ export function DocumentCapture({
58
76
  permissionDeniedLabel,
59
77
  retryLabel,
60
78
  cancelLabel,
79
+ processingLabel,
61
80
  onCaptured,
62
81
  onCancel,
63
82
  }: DocumentCaptureProps) {
64
83
  const theme = useTheme();
84
+ const insets = useSafeAreaInsets();
85
+ const { width: screenW, height: screenH } = useWindowDimensions();
65
86
  const cameraRef = useRef<Camera>(null);
66
87
  // Cross-platform back-camera selection.
67
88
  //
@@ -155,13 +176,19 @@ export function DocumentCapture({
155
176
  flash: 'off',
156
177
  enableShutterSound: false,
157
178
  });
158
- onCaptured(photo, side);
179
+ // Await the caller's crop/compress so the processing overlay stays up
180
+ // for the whole capture→preview gap (a few seconds), giving the user
181
+ // feedback instead of an idle camera. On success the parent flips phase
182
+ // and this component unmounts; on failure / "stay on capture" the finally
183
+ // re-enables the shutter.
184
+ const cutout = computeCutout(screenW, screenH, orientation);
185
+ await onCaptured(photo, side, { cutout, screenW, screenH });
159
186
  } catch (err) {
160
187
  setError(err instanceof Error ? err.message : String(err));
161
188
  } finally {
162
189
  setShooting(false);
163
190
  }
164
- }, [onCaptured, side, shooting]);
191
+ }, [onCaptured, side, shooting, orientation, screenW, screenH]);
165
192
 
166
193
  if (!hasPermission) {
167
194
  return (
@@ -225,6 +252,11 @@ export function DocumentCapture({
225
252
  device={device}
226
253
  photo
227
254
  photoQualityBalance="quality"
255
+ // Explicit `cover`: the guide-crop math in `computeGuideCropRect`
256
+ // assumes the preview center-crops the sensor frame to the screen
257
+ // aspect ratio. `cover` is vision-camera's default, but we pin it so
258
+ // the crop never silently drifts if that default changes.
259
+ resizeMode="cover"
228
260
  enableZoomGesture={false}
229
261
  isActive
230
262
  />
@@ -249,15 +281,22 @@ export function DocumentCapture({
249
281
  ]}
250
282
  />
251
283
  ) : null}
252
- <View style={styles.topBar}>
284
+ {/* The <Camera> above stays full-bleed (absoluteFill) so OCR framing is
285
+ never cropped; only the chrome below is offset by the safe-area
286
+ insets so the ✕ clears the top notch and the shutter clears the
287
+ bottom navigation bar / gesture area. */}
288
+ <View style={[styles.topBar, { top: insets.top + 12 }]}>
253
289
  <Pressable onPress={onCancel} style={styles.iconBtn} accessibilityLabel={cancelLabel}>
254
290
  <Text style={styles.iconBtnText}>✕</Text>
255
291
  </Pressable>
256
292
  </View>
257
- <View style={styles.instructions} pointerEvents="none">
293
+ <View
294
+ style={[styles.instructions, { top: insets.top + 60 }]}
295
+ pointerEvents="none"
296
+ >
258
297
  <Text style={styles.instructionsText}>{instructions}</Text>
259
298
  </View>
260
- <View style={styles.bottomBar}>
299
+ <View style={[styles.bottomBar, { bottom: insets.bottom + 32 }]}>
261
300
  {error ? <Text style={styles.errorText}>{error}</Text> : null}
262
301
  <Pressable
263
302
  accessibilityRole="button"
@@ -276,6 +315,12 @@ export function DocumentCapture({
276
315
  />
277
316
  </Pressable>
278
317
  </View>
318
+ {shooting ? (
319
+ <View style={styles.processingOverlay}>
320
+ <ActivityIndicator color="#FFFFFF" size="large" />
321
+ <Text style={styles.processingText}>{processingLabel}</Text>
322
+ </View>
323
+ ) : null}
279
324
  </View>
280
325
  );
281
326
  }
@@ -286,8 +331,6 @@ interface MaskProps {
286
331
  orientation: DocumentOrientation;
287
332
  }
288
333
 
289
- const CUTOUT_WIDTH_RATIO = 0.85; // 85% of screen width
290
- const CUTOUT_MAX_HEIGHT_RATIO = 0.62; // never taller than 62% of screen height
291
334
  const CORNER_LENGTH = 28;
292
335
  const CORNER_THICKNESS = 3;
293
336
  /**
@@ -300,20 +343,14 @@ const DIM_COLOR = 'rgba(0,0,0,0.55)';
300
343
 
301
344
  function DocumentMaskOverlay({ orientation }: MaskProps) {
302
345
  const { width: screenW, height: screenH } = useWindowDimensions();
303
- const aspectRatio = orientation === 'portrait' ? 0.625 : 1.586;
304
-
305
- // Compute the cutout proportionally. Width is the primary dimension; if
306
- // the resulting height would overflow the screen budget (mostly portrait
307
- // ID-1 = 0.625 aspect on tall phones), shrink it back to fit.
308
- let cutoutW = screenW * CUTOUT_WIDTH_RATIO;
309
- let cutoutH = cutoutW / aspectRatio;
310
- const maxH = screenH * CUTOUT_MAX_HEIGHT_RATIO;
311
- if (cutoutH > maxH) {
312
- cutoutH = maxH;
313
- cutoutW = cutoutH * aspectRatio;
314
- }
315
- const left = (screenW - cutoutW) / 2;
316
- const top = (screenH - cutoutH) / 2;
346
+ // Shared with the post-capture crop (`computeGuideCropRect`) so the dimmed
347
+ // cutout the user sees and the pixels we keep are the exact same rectangle.
348
+ const {
349
+ left,
350
+ top,
351
+ width: cutoutW,
352
+ height: cutoutH,
353
+ } = computeCutout(screenW, screenH, orientation);
317
354
  const R = CUTOUT_RADIUS;
318
355
 
319
356
  // SVG mask: opaque outer rect minus a rounded inner rect. The mask paints
@@ -502,4 +539,17 @@ const styles = StyleSheet.create({
502
539
  borderColor: '#FFFFFF',
503
540
  backgroundColor: 'transparent',
504
541
  },
542
+ processingOverlay: {
543
+ ...StyleSheet.absoluteFillObject,
544
+ alignItems: 'center',
545
+ justifyContent: 'center',
546
+ gap: 14,
547
+ backgroundColor: 'rgba(0,0,0,0.6)',
548
+ },
549
+ processingText: {
550
+ color: '#FFFFFF',
551
+ fontSize: 15,
552
+ fontWeight: '600',
553
+ textAlign: 'center',
554
+ },
505
555
  });
@@ -42,6 +42,7 @@ import {
42
42
  } from 'react-native-vision-camera';
43
43
  import { Button } from '../ui/primitives/Button';
44
44
  import { useTheme, withAlpha } from '../ui/theme';
45
+ import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
45
46
 
46
47
  export interface LivenessCameraHandle {
47
48
  takeFrame: () => Promise<PhotoFile | null>;
@@ -95,6 +96,7 @@ export interface LivenessCameraProps {
95
96
  export const LivenessCamera = forwardRef<LivenessCameraHandle, LivenessCameraProps>(
96
97
  function LivenessCamera(props, ref) {
97
98
  const theme = useTheme();
99
+ const insets = useSafeAreaInsets();
98
100
  const cameraRef = useRef<Camera>(null);
99
101
  const device = useCameraDevice('front');
100
102
  // Pick a 720p / 30-fps format so the recorded mp4 stays a few MB instead
@@ -301,7 +303,7 @@ export const LivenessCamera = forwardRef<LivenessCameraHandle, LivenessCameraPro
301
303
  />
302
304
  ) : null}
303
305
  {props.statusText ? (
304
- <View style={styles.statusPill}>
306
+ <View style={[styles.statusPill, { top: insets.top + 130 }]}>
305
307
  <ActivityIndicator color="#FFFFFF" size="small" />
306
308
  <Text style={styles.statusText}>{props.statusText}</Text>
307
309
  </View>
@@ -310,6 +312,7 @@ export const LivenessCamera = forwardRef<LivenessCameraHandle, LivenessCameraPro
310
312
  <View
311
313
  style={[
312
314
  styles.toast,
315
+ { bottom: insets.bottom + 100 },
313
316
  {
314
317
  backgroundColor:
315
318
  props.toast.kind === 'success'
@@ -347,6 +350,8 @@ interface ProgressBarProps {
347
350
  * so the user can tell the system is still listening.
348
351
  */
349
352
  function ProgressBar({ progress, color }: ProgressBarProps) {
353
+ const insets = useSafeAreaInsets();
354
+ const trackBottom = insets.bottom + 60;
350
355
  const clamped = Math.max(0, Math.min(1, progress));
351
356
  const isIndeterminate = clamped < 0.05;
352
357
 
@@ -376,7 +381,7 @@ function ProgressBar({ progress, color }: ProgressBarProps) {
376
381
  outputRange: ['-30%', '100%'],
377
382
  });
378
383
  return (
379
- <View style={styles.progressTrack}>
384
+ <View style={[styles.progressTrack, { bottom: trackBottom }]}>
380
385
  <Animated.View
381
386
  style={[
382
387
  styles.progressShimmer,
@@ -388,7 +393,7 @@ function ProgressBar({ progress, color }: ProgressBarProps) {
388
393
  }
389
394
 
390
395
  return (
391
- <View style={styles.progressTrack}>
396
+ <View style={[styles.progressTrack, { bottom: trackBottom }]}>
392
397
  <View
393
398
  style={[
394
399
  styles.progressBar,
@@ -421,6 +426,7 @@ interface ChallengeBannerProps {
421
426
  * line / icon if needed without changing the call site.
422
427
  */
423
428
  function ChallengeBanner({ text, tint: _tint }: ChallengeBannerProps) {
429
+ const insets = useSafeAreaInsets();
424
430
  const opacity = useRef(new Animated.Value(0)).current;
425
431
  const scale = useRef(new Animated.Value(0.85)).current;
426
432
 
@@ -451,6 +457,7 @@ function ChallengeBanner({ text, tint: _tint }: ChallengeBannerProps) {
451
457
  pointerEvents="none"
452
458
  style={[
453
459
  styles.challengeBanner,
460
+ { top: insets.top + 76 },
454
461
  {
455
462
  opacity,
456
463
  transform: [{ scale }],
@@ -47,21 +47,9 @@ import {
47
47
  type ParsedAddressFields,
48
48
  } from '../utils/parseGoogleAddressComponents';
49
49
  import { log } from '../utils/log';
50
+ import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
50
51
  import { AddressSearchBar, type AddressSuggestion } from './AddressSearchBar';
51
52
 
52
- // `react-native-safe-area-context` is a transitive peer of Expo SDK 54+, but
53
- // not a direct dep of this SDK. Load it dynamically with a safe fallback so
54
- // hosts that strip optional deps still get reasonable inset values.
55
- function useSafeAreaInsets(): { top: number; bottom: number; left: number; right: number } {
56
- try {
57
- // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
58
- const mod = require('react-native-safe-area-context');
59
- return mod.useSafeAreaInsets();
60
- } catch {
61
- return { top: 0, bottom: 0, left: 0, right: 0 };
62
- }
63
- }
64
-
65
53
  const floatingShadow = {
66
54
  shadowColor: '#000',
67
55
  shadowOffset: { width: 0, height: 2 },
@@ -148,6 +136,15 @@ export function MapAddressPicker(
148
136
  props: MapAddressPickerProps,
149
137
  ) {
150
138
  const theme = useTheme();
139
+ // Hooks must run unconditionally — call this before the `!modules.MapView`
140
+ // early return below.
141
+ const insets = useSafeAreaInsets();
142
+ const topInset = Math.max(insets.top, Platform.OS === 'ios' ? 44 : 16);
143
+ const bottomInset = Math.max(insets.bottom, 16);
144
+ // Lift the floating "Next" button a notch above the safe-area inset so it
145
+ // doesn't sit flush against the iOS home indicator / Android gesture bar,
146
+ // which made it look clipped by the screen edge.
147
+ const buttonBottom = bottomInset + 12;
151
148
  const modules = useRef<NativeModules>(loadNativeModules()).current;
152
149
 
153
150
  const [coord, setCoord] = useState<{ latitude: number; longitude: number } | null>(
@@ -274,9 +271,6 @@ export function MapAddressPicker(
274
271
  }
275
272
 
276
273
  const { MapView, Marker, PROVIDER_GOOGLE } = modules;
277
- const insets = useSafeAreaInsets();
278
- const topInset = Math.max(insets.top, Platform.OS === 'ios' ? 44 : 16);
279
- const bottomInset = Math.max(insets.bottom, 16);
280
274
 
281
275
  return (
282
276
  <View style={styles.root}>
@@ -333,7 +327,7 @@ export function MapAddressPicker(
333
327
  {/* Floating banners stack above the bottom button. */}
334
328
  <View
335
329
  pointerEvents="box-none"
336
- style={[styles.floatNotes, { bottom: bottomInset + 76 }]}
330
+ style={[styles.floatNotes, { bottom: buttonBottom + 76 }]}
337
331
  >
338
332
  {permissionDenied ? (
339
333
  <Banner variant="warning" message={props.locationDenied} />
@@ -349,7 +343,7 @@ export function MapAddressPicker(
349
343
  disabled={
350
344
  !parsed || !isAddressSelectionComplete(parsed, props.requiredFields)
351
345
  }
352
- style={[styles.floatBottom, { bottom: bottomInset }, floatingShadow]}
346
+ style={[styles.floatBottom, { bottom: buttonBottom }, floatingShadow]}
353
347
  />
354
348
  </View>
355
349
  );
@@ -22,7 +22,7 @@ export const EN: StringsTable = {
22
22
  human_basic_info: {
23
23
  title: 'Personal information',
24
24
  subtitle:
25
- 'Enter your name and ID exactly as shown on your official identification.',
25
+ 'Enter your name and ID exactly as shown on your identification.',
26
26
  givenNames: 'Given name(s)',
27
27
  familyNames: 'Family name(s)',
28
28
  idType: 'ID type',
@@ -78,7 +78,7 @@ export const EN: StringsTable = {
78
78
  tax_info: {
79
79
  title: 'Tax information',
80
80
  subtitle:
81
- 'Enter your taxpayer category and tax ID as registered with ARCA or the equivalent authority.',
81
+ 'Complete your tax information to help us get to know you better.',
82
82
  taxpayerType: 'Taxpayer category',
83
83
  taxpayerIdType: 'Tax identification type',
84
84
  taxpayerId: 'Identification number',
@@ -216,6 +216,7 @@ export const EN: StringsTable = {
216
216
  confirmBtn: 'Confirm',
217
217
  confirmFront: 'Confirm front',
218
218
  confirmBack: 'Confirm back',
219
+ processing: 'Processing image…',
219
220
  initializing: 'Preparing capture…',
220
221
  uploadingFront: 'Uploading front…',
221
222
  uploadingBack: 'Uploading back…',
@@ -25,7 +25,7 @@ export const ES = {
25
25
  human_basic_info: {
26
26
  title: 'Datos personales',
27
27
  subtitle:
28
- 'Ingresá tu nombre y documento tal como figuran en tu identificación oficial.',
28
+ 'Ingresá tu nombre y documento tal como figuran en tu identificación.',
29
29
  givenNames: 'Nombre(s)',
30
30
  familyNames: 'Apellido(s)',
31
31
  idType: 'Tipo de documento',
@@ -81,7 +81,7 @@ export const ES = {
81
81
  tax_info: {
82
82
  title: 'Información fiscal',
83
83
  subtitle:
84
- 'Indicá tu categoría e identificación tributaria según conste en ARCA u organismo equivalente.',
84
+ 'Completá tu información fiscal para ayudarnos a conocerte mejor.',
85
85
  taxpayerType: 'Categoría fiscal',
86
86
  taxpayerIdType: 'Tipo de identificación fiscal',
87
87
  taxpayerId: 'Número de identificación',
@@ -219,6 +219,7 @@ export const ES = {
219
219
  confirmBtn: 'Confirmar',
220
220
  confirmFront: 'Confirmar frente',
221
221
  confirmBack: 'Confirmar dorso',
222
+ processing: 'Procesando imagen…',
222
223
  initializing: 'Preparando captura…',
223
224
  uploadingFront: 'Subiendo frente…',
224
225
  uploadingBack: 'Subiendo dorso…',