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

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 (48) hide show
  1. package/lib/commonjs/camera/LivenessCamera.js +85 -6
  2. package/lib/commonjs/camera/LivenessCamera.js.map +1 -1
  3. package/lib/commonjs/core/VelionOnboarding.js +3 -0
  4. package/lib/commonjs/core/VelionOnboarding.js.map +1 -1
  5. package/lib/commonjs/i18n/strings/en.js +1 -0
  6. package/lib/commonjs/i18n/strings/en.js.map +1 -1
  7. package/lib/commonjs/i18n/strings/es.js +1 -0
  8. package/lib/commonjs/i18n/strings/es.js.map +1 -1
  9. package/lib/commonjs/steps/DocumentsOcrStep.js +8 -4
  10. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -1
  11. package/lib/commonjs/steps/LivenessMatchStep.js +493 -16
  12. package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -1
  13. package/lib/commonjs/types/index.js +16 -0
  14. package/lib/commonjs/types/index.js.map +1 -1
  15. package/lib/module/camera/LivenessCamera.js +86 -7
  16. package/lib/module/camera/LivenessCamera.js.map +1 -1
  17. package/lib/module/core/VelionOnboarding.js +3 -0
  18. package/lib/module/core/VelionOnboarding.js.map +1 -1
  19. package/lib/module/i18n/strings/en.js +1 -0
  20. package/lib/module/i18n/strings/en.js.map +1 -1
  21. package/lib/module/i18n/strings/es.js +1 -0
  22. package/lib/module/i18n/strings/es.js.map +1 -1
  23. package/lib/module/steps/DocumentsOcrStep.js +9 -5
  24. package/lib/module/steps/DocumentsOcrStep.js.map +1 -1
  25. package/lib/module/steps/LivenessMatchStep.js +492 -16
  26. package/lib/module/steps/LivenessMatchStep.js.map +1 -1
  27. package/lib/module/types/index.js +19 -0
  28. package/lib/module/types/index.js.map +1 -1
  29. package/lib/typescript/camera/LivenessCamera.d.ts +18 -1
  30. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -1
  31. package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -1
  32. package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
  33. package/lib/typescript/i18n/strings/es.d.ts +1 -0
  34. package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
  35. package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -1
  36. package/lib/typescript/steps/types.d.ts +7 -1
  37. package/lib/typescript/steps/types.d.ts.map +1 -1
  38. package/lib/typescript/types/index.d.ts +57 -0
  39. package/lib/typescript/types/index.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/camera/LivenessCamera.tsx +100 -3
  42. package/src/core/VelionOnboarding.ts +3 -0
  43. package/src/i18n/strings/en.ts +1 -0
  44. package/src/i18n/strings/es.ts +1 -0
  45. package/src/steps/DocumentsOcrStep.tsx +7 -3
  46. package/src/steps/LivenessMatchStep.tsx +522 -17
  47. package/src/steps/types.ts +7 -1
  48. package/src/types/index.ts +61 -0
@@ -237,6 +237,7 @@ export const ES = {
237
237
  centerFace: 'Centrá tu rostro dentro del óvalo',
238
238
  positioningReady: 'Listo, ya estás bien posicionado — empezamos',
239
239
  getReady: 'Atento — empezamos',
240
+ repositioning: 'Pausemos un segundo — centrá tu rostro y mejorá la luz. Reintentamos el mismo paso',
240
241
  finalizing: 'Procesando tu video…',
241
242
  analyzingHeadline: 'Analizando tu video',
242
243
  analyzingCaption: 'Estamos verificando la prueba de vida. Tardará solo unos segundos.',
@@ -14,7 +14,7 @@
14
14
  * 5 MB ceiling Velion's storage layer expects.
15
15
  */
16
16
 
17
- import { useCallback, useMemo, useState } from 'react';
17
+ import { useCallback, useEffect, useMemo, useState } from 'react';
18
18
  import {
19
19
  Image,
20
20
  Platform,
@@ -135,8 +135,12 @@ function DocumentsOcrView({
135
135
  );
136
136
  // File-picker mode is not supported in this port yet — we always go to the
137
137
  // camera. The captureMode is captured for future iterations (e.g. fallback
138
- // when the user rejects camera permission).
139
- log.info('[DocumentsOCR] captureMode resolved', { captureMode });
138
+ // when the user rejects camera permission). Logged inside an effect because
139
+ // the top-level call ran on every render (≈10× per step on Android),
140
+ // serialising a JSON payload and a logcat write on the JS thread each time.
141
+ useEffect(() => {
142
+ log.info('[DocumentsOCR] captureMode resolved', { captureMode });
143
+ }, [captureMode]);
140
144
 
141
145
  const [phase, setPhase] = useState<Phase>('intro');
142
146
  const [front, setFront] = useState<CapturedSide | null>(null);