@incodetech/welcome 1.85.0-20251110130324.0 → 1.85.0-20251110190315.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.
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { CaptureMode } from './capture/Manager';
3
3
 
4
+ export declare const addCameraBackEvent: () => void;
4
5
  export declare const IdFlow: FC<{
5
6
  initialMode?: CaptureMode;
6
7
  }>;
@@ -8374,7 +8374,7 @@ class MlWasmJSApi {
8374
8374
  );
8375
8375
  }
8376
8376
  }
8377
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251110130324.0";
8377
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251110190315.0";
8378
8378
  function e$2(Be, Le) {
8379
8379
  return function(Ye, tt) {
8380
8380
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -216629,7 +216629,7 @@ path {
216629
216629
  const [Ye, tt] = useState(Be), nt = () => {
216630
216630
  tt("front");
216631
216631
  }, ft = () => {
216632
- tt("flipAnimation");
216632
+ addCameraBackEvent(), tt("flipAnimation");
216633
216633
  }, ht = async () => {
216634
216634
  await sleep(1e3), tt("back");
216635
216635
  };
@@ -258383,6 +258383,20 @@ path {
258383
258383
  onClose: () => idFlowManager.onClose()
258384
258384
  }
258385
258385
  );
258386
+ }, addCameraFrontEvent = () => {
258387
+ addEvent({
258388
+ token: idFlowManager.getToken(),
258389
+ code: "cameraFrontId",
258390
+ payload: { cameraFrontId: !0 }
258391
+ });
258392
+ }, addCameraBackEvent = () => {
258393
+ addEvent({
258394
+ token: idFlowManager.getToken(),
258395
+ code: "cameraBackId",
258396
+ payload: { cameraBackId: !0 }
258397
+ });
258398
+ }, addCameraEvent = (Be) => {
258399
+ Be ? addCameraBackEvent() : addCameraFrontEvent();
258386
258400
  }, IdFlow = ({ initialMode: Be }) => {
258387
258401
  const {
258388
258402
  completeWithError: Le,
@@ -258391,27 +258405,37 @@ path {
258391
258405
  isDeepsightEnabled: nt
258392
258406
  } = useCaptureIdState(), ft = () => Ye.usSmartCapture && Be === "front" || Ye.onlyBack ? "back" : Be, [ht, gt] = useState(
258393
258407
  Ye.showTutorial ? "tutorial" : idFlowManager.getPermissionsGranted() ? "capture" : "permissions"
258394
- ), At = () => {
258408
+ ), At = useRef(!1);
258409
+ useEffect(() => {
258410
+ (ht === "permissions" || ht === "capture") && !At.current && (addCameraEvent(
258411
+ Ye.onlyBack || Ye.usSmartCapture
258412
+ ), At.current = !0);
258413
+ }, [
258414
+ ht,
258415
+ Ye.onlyBack,
258416
+ Ye.usSmartCapture
258417
+ ]);
258418
+ const xt = () => {
258395
258419
  idFlowManager.getPermissionsGranted() ? gt("capture") : gt("permissions");
258396
- }, xt = () => {
258420
+ }, Et = () => {
258397
258421
  gt("capture");
258398
258422
  };
258399
258423
  if (ht === "tutorial")
258400
- return Be === "passport" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PassportTutorial, { onContinue: At }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IdTutorial, { onContinue: At });
258424
+ return Be === "passport" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PassportTutorial, { onContinue: xt }) : /* @__PURE__ */ jsxRuntimeExports.jsx(IdTutorial, { onContinue: xt });
258401
258425
  if (ht === "permissions")
258402
258426
  if (idFlowManager.getPermissionsGranted())
258403
- xt();
258427
+ Et();
258404
258428
  else
258405
258429
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
258406
258430
  Permissions,
258407
258431
  {
258408
- onContinue: xt,
258432
+ onContinue: Et,
258409
258433
  uiConfig: tt,
258410
258434
  onClose: () => idFlowManager.onClose(),
258411
- emitError: (Et) => Le({
258412
- code: Et,
258435
+ emitError: (kt) => Le({
258436
+ code: kt,
258413
258437
  message: "Error in permissions",
258414
- error: new Error(Et)
258438
+ error: new Error(kt)
258415
258439
  }),
258416
258440
  isDeepsightEnabled: nt
258417
258441
  }
@@ -258813,6 +258837,7 @@ function SMSOTP$1({
258813
258837
  Text$7,
258814
258838
  {
258815
258839
  as: "a",
258840
+ display: "inline",
258816
258841
  color: vt ? Vt.button.tertiary.disabled : Vt.button.tertiary.text.default,
258817
258842
  fontSize: Vt.typography.fontSize.lg,
258818
258843
  onClick: Ut,
@@ -258820,12 +258845,12 @@ function SMSOTP$1({
258820
258845
  }
258821
258846
  ),
258822
258847
  nt && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
258823
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
258824
258848
  ` ${wt("otp.or")} `,
258825
258849
  /* @__PURE__ */ jsxRuntimeExports.jsx(
258826
258850
  Text$7,
258827
258851
  {
258828
258852
  as: "a",
258853
+ display: "inline",
258829
258854
  color: vt ? Vt.button.tertiary.disabled : Vt.button.tertiary.text.default,
258830
258855
  fontSize: Vt.typography.fontSize.lg,
258831
258856
  onClick: $t,