@incodetech/web 0.0.0-dev-20260218-e020e1c → 0.0.0-dev-20260219-f9d9707

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.
@@ -4,7 +4,7 @@ import "../vendor-preact-CjD4WiuC.js";
4
4
  import "@incodetech/core";
5
5
  import { P as m } from "../baseTutorial-B9sBivde.js";
6
6
  import { I as p } from "../incodeComponent-3T8Qyjnt.js";
7
- import { T as c, C as f } from "../tutorial-DBlXpMh-.js";
7
+ import { T as c, C as f } from "../tutorial-DOCCLz7v.js";
8
8
  const d = ({
9
9
  config: r,
10
10
  authHint: s,
@@ -235,6 +235,9 @@
235
235
  width: 100%;
236
236
  height: 100%;
237
237
  position: absolute;
238
+ }
239
+
240
+ .IncodeCaptureContainer .IncodeCaptureVideoElement.IncodeCaptureVideoMirrored {
238
241
  transform: scaleX(-1);
239
242
  }
240
243
 
@@ -5,7 +5,7 @@ import "@incodetech/core";
5
5
  import { P as l } from "../baseTutorial-B9sBivde.js";
6
6
  import { I as m } from "../incodeComponent-3T8Qyjnt.js";
7
7
  import { P as f } from "../processing-us1m6bZt.js";
8
- import { T as p, C as c } from "../tutorial-DBlXpMh-.js";
8
+ import { T as p, C as c } from "../tutorial-DOCCLz7v.js";
9
9
  const d = ({
10
10
  config: e,
11
11
  onFinish: s,
@@ -234,6 +234,9 @@
234
234
  width: 100%;
235
235
  height: 100%;
236
236
  position: absolute;
237
+ }
238
+
239
+ .IncodeCaptureContainer .IncodeCaptureVideoElement.IncodeCaptureVideoMirrored {
237
240
  transform: scaleX(-1);
238
241
  }
239
242
 
@@ -1,18 +1,18 @@
1
- import { u as t, S as a, B as h, c as m, L as I } from "./incodeModule-DPTWfWvu.js";
2
- import { g as L, d as R, k as g, A as D, y as T } from "./vendor-preact-CjD4WiuC.js";
3
- import { u as d, S, T as v } from "./spinner-BERSXem_.js";
4
- import { S as A } from "./successIcon-DV200b2L.js";
5
- import { P as u } from "./incodeComponent-3T8Qyjnt.js";
1
+ import { u as t, S as a, B as h, c as I, L } from "./incodeModule-DPTWfWvu.js";
2
+ import { g as D, d as R, k as _, A as S, y as O } from "./vendor-preact-CjD4WiuC.js";
3
+ import { u as d, S as v, T as A } from "./spinner-BERSXem_.js";
4
+ import { S as M } from "./successIcon-DV200b2L.js";
5
+ import { P as p } from "./incodeComponent-3T8Qyjnt.js";
6
6
  import "./instance-B-q0ZREN.js";
7
- import { B as M } from "./baseTutorial-B9sBivde.js";
8
- const O = ({
7
+ import { B as w } from "./baseTutorial-B9sBivde.js";
8
+ const m = ({
9
9
  title: i,
10
10
  description: e,
11
11
  attemptsText: n,
12
12
  buttonText: o,
13
13
  icon: r,
14
14
  onButtonClick: s
15
- }) => /* @__PURE__ */ t("div", { class: "IncodeErrorModalContent", children: /* @__PURE__ */ t(u, { "data-testid": "face-capture-error-modal", children: /* @__PURE__ */ t("div", { class: "IncodeErrorModalContentContainer", children: [
15
+ }) => /* @__PURE__ */ t("div", { class: "IncodeErrorModalContent", children: /* @__PURE__ */ t(p, { "data-testid": "face-capture-error-modal", children: /* @__PURE__ */ t("div", { class: "IncodeErrorModalContentContainer", children: [
16
16
  /* @__PURE__ */ t("div", { class: "IncodeErrorModalContentIconContainer", children: [
17
17
  r,
18
18
  /* @__PURE__ */ t(a, { size: 24 }),
@@ -25,7 +25,7 @@ const O = ({
25
25
  /* @__PURE__ */ t(a, { size: 24 }),
26
26
  /* @__PURE__ */ t(h, { onClick: s, children: o })
27
27
  ] })
28
- ] }) }) }), w = () => /* @__PURE__ */ t(
28
+ ] }) }) }), N = () => /* @__PURE__ */ t(
29
29
  "svg",
30
30
  {
31
31
  xmlns: "http://www.w3.org/2000/svg",
@@ -44,23 +44,23 @@ const O = ({
44
44
  )
45
45
  ]
46
46
  }
47
- ), N = ({
47
+ ), B = ({
48
48
  title: i,
49
49
  onContinue: e
50
50
  }) => {
51
51
  const { t: n } = d();
52
52
  return /* @__PURE__ */ t(
53
- O,
53
+ m,
54
54
  {
55
55
  title: i,
56
56
  description: n("notifications.selfieCaptureFailedDescription"),
57
57
  attemptsText: n("notifications.noAttemptsRemaining") ?? "No attempts remaining",
58
58
  buttonText: n("common.continue") ?? "Continue",
59
- icon: /* @__PURE__ */ t(w, {}),
59
+ icon: /* @__PURE__ */ t(N, {}),
60
60
  onButtonClick: e
61
61
  }
62
62
  );
63
- }, B = () => /* @__PURE__ */ t(
63
+ }, y = () => /* @__PURE__ */ t(
64
64
  "svg",
65
65
  {
66
66
  xmlns: "http://www.w3.org/2000/svg",
@@ -80,7 +80,7 @@ const O = ({
80
80
  /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", { id: "clip0", children: /* @__PURE__ */ t("rect", { width: "32", height: "32", fill: "white" }) }) })
81
81
  ]
82
82
  }
83
- ), y = ({
83
+ ), F = ({
84
84
  title: i,
85
85
  description: e,
86
86
  attemptsRemaining: n,
@@ -88,20 +88,20 @@ const O = ({
88
88
  }) => {
89
89
  const { t: r } = d();
90
90
  return /* @__PURE__ */ t(
91
- O,
91
+ m,
92
92
  {
93
93
  title: i,
94
94
  description: r(e),
95
95
  attemptsText: r("common.attemptsRemaining", { count: n }) ?? `Attempts remaining: ${n}`,
96
96
  buttonText: r("common.tryAgain") ?? "Try Again",
97
- icon: /* @__PURE__ */ t(B, {}),
97
+ icon: /* @__PURE__ */ t(y, {}),
98
98
  onButtonClick: o
99
99
  }
100
100
  );
101
101
  }, l = {
102
102
  title: "Something went wrong",
103
103
  description: "Please try again later"
104
- }, F = {
104
+ }, x = {
105
105
  MASK_ERROR: {
106
106
  title: "notifications.mask",
107
107
  description: "notifications.maskDescription"
@@ -189,7 +189,7 @@ const O = ({
189
189
  title: "notifications.selfieImageLowQuality",
190
190
  description: "notifications.selfieImageLowQualityDescription"
191
191
  }
192
- }, x = [
192
+ }, V = [
193
193
  "LIVENESS_ERROR",
194
194
  "BRIGHTNESS_ERROR",
195
195
  "LENSES_ERROR",
@@ -223,11 +223,11 @@ const O = ({
223
223
  return "BAD_REQUEST";
224
224
  if (e.includes("HTTP 500") || e.includes("SERVER_ERROR"))
225
225
  return "SERVER_ERROR";
226
- for (const n of x)
226
+ for (const n of V)
227
227
  if (e.includes(n))
228
228
  return n;
229
229
  return null;
230
- }, _ = ({
230
+ }, T = ({
231
231
  error: i,
232
232
  attemptsRemaining: e,
233
233
  onTryAgain: n,
@@ -235,17 +235,17 @@ const O = ({
235
235
  }) => {
236
236
  const { t: r } = d();
237
237
  if (!i) return null;
238
- const C = P(i) ?? i, { title: c, description: f } = F[C] ?? l, p = e <= 0, E = r(c) ?? c;
239
- return p ? /* @__PURE__ */ t(N, { title: E, onContinue: o }) : /* @__PURE__ */ t(
240
- y,
238
+ const C = P(i) ?? i, { title: c, description: f } = x[C] ?? l, E = e <= 0, u = r(c) ?? c;
239
+ return E ? /* @__PURE__ */ t(B, { title: u, onContinue: o }) : /* @__PURE__ */ t(
240
+ F,
241
241
  {
242
- title: E,
242
+ title: u,
243
243
  description: f,
244
244
  attemptsRemaining: e,
245
245
  onTryAgain: n
246
246
  }
247
247
  );
248
- }, V = () => /* @__PURE__ */ t(
248
+ }, U = () => /* @__PURE__ */ t(
249
249
  "svg",
250
250
  {
251
251
  width: "292",
@@ -266,7 +266,7 @@ const O = ({
266
266
  )
267
267
  ]
268
268
  }
269
- ), U = (i) => {
269
+ ), H = (i) => {
270
270
  switch (i) {
271
271
  case "success":
272
272
  case "capturing":
@@ -278,14 +278,14 @@ const O = ({
278
278
  case "idle":
279
279
  return "var(--surface-neutral-100)";
280
280
  }
281
- }, H = ({
281
+ }, b = ({
282
282
  borderState: i = "idle"
283
283
  }) => {
284
- const e = L(), n = i === "loading" || i === "capturing", o = U(i), r = n ? `url(#${e})` : o;
284
+ const e = D(), n = i === "loading" || i === "capturing", o = H(i), r = n ? `url(#${e})` : o;
285
285
  return /* @__PURE__ */ t(
286
286
  "div",
287
287
  {
288
- class: m("IncodeLoadingBorder", {
288
+ class: I("IncodeLoadingBorder", {
289
289
  IncodeLoadingBorderSpinning: n
290
290
  }),
291
291
  children: /* @__PURE__ */ t(
@@ -383,7 +383,7 @@ const O = ({
383
383
  }
384
384
  ) })
385
385
  ] });
386
- }, b = ({ detectionState: i }) => {
386
+ }, z = ({ detectionState: i }) => {
387
387
  const { t: e } = d(), o = {
388
388
  noFace: e("notifications.faceNotFound"),
389
389
  tooManyFaces: e("notifications.tooManyFaces"),
@@ -400,57 +400,58 @@ const O = ({
400
400
  getReady: e("notifications.getReady")
401
401
  }[i];
402
402
  return o ? /* @__PURE__ */ t("div", { class: "IncodeNotification", children: /* @__PURE__ */ t("p", { class: "IncodeNotificationText", children: o }) }) : null;
403
- }, J = ({ manager: i, state: e, onFinish: n }) => {
403
+ }, tt = ({ manager: i, state: e, onFinish: n }) => {
404
404
  const {
405
405
  captureStatus: o,
406
406
  stream: r,
407
407
  detectionStatus: s,
408
408
  attemptsRemaining: C,
409
- uploadError: c
410
- } = e, [f, p] = R(!1), { t: E } = d();
409
+ uploadError: c,
410
+ assistedOnboarding: f
411
+ } = e, [E, u] = R(!1), { t: g } = d();
411
412
  return o === "initializing" ? /* @__PURE__ */ t(
412
- S,
413
+ v,
413
414
  {
414
415
  fullScreen: !0,
415
- title: E("v2.selfie.camera.loading"),
416
+ title: g("v2.selfie.camera.loading"),
416
417
  className: "IncodeCameraLoading"
417
418
  }
418
- ) : o === "detecting" ? s === "offline" ? /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t("div", { class: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ t("p", { class: "text-text-body-primary", children: "No internet connection" }) }) }) : /* @__PURE__ */ t(u, { "data-testid": "capture-container", children: [
419
+ ) : o === "detecting" ? s === "offline" ? /* @__PURE__ */ t(p, { children: /* @__PURE__ */ t("div", { class: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ t("p", { class: "text-text-body-primary", children: "No internet connection" }) }) }) : /* @__PURE__ */ t(p, { "data-testid": "capture-container", children: [
419
420
  /* @__PURE__ */ t(a, { size: 48 }),
420
421
  /* @__PURE__ */ t("div", { class: "IncodeCaptureContainer", children: [
421
- /* @__PURE__ */ t(H, { borderState: f ? "capturing" : s === "detecting" ? "idle" : s === "getReady" ? "loading" : s === "success" ? "success" : s === "error" ? "error" : "idle" }),
422
- /* @__PURE__ */ t("div", { class: "IncodeCaptureFrame", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureVideoWrapper", children: r ? /* @__PURE__ */ t(g, { children: [
423
- /* @__PURE__ */ t(z, { stream: r }),
424
- /* @__PURE__ */ t("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ t(V, {}) })
422
+ /* @__PURE__ */ t(b, { borderState: E ? "capturing" : s === "detecting" ? "idle" : s === "getReady" ? "loading" : s === "success" ? "success" : s === "error" ? "error" : "idle" }),
423
+ /* @__PURE__ */ t("div", { class: "IncodeCaptureFrame", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureVideoWrapper", children: r ? /* @__PURE__ */ t(_, { children: [
424
+ /* @__PURE__ */ t(Q, { stream: r, mirrored: !f }),
425
+ /* @__PURE__ */ t("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ t(U, {}) })
425
426
  ] }) : null }) }),
426
427
  /* @__PURE__ */ t(a, { size: 48 }),
427
- s ? /* @__PURE__ */ t(g, { children: [
428
- /* @__PURE__ */ t(b, { detectionState: s }),
428
+ s ? /* @__PURE__ */ t(_, { children: [
429
+ /* @__PURE__ */ t(z, { detectionState: s }),
429
430
  /* @__PURE__ */ t(a, { size: 24 })
430
431
  ] }) : null,
431
432
  s === "manualCapture" ? /* @__PURE__ */ t(
432
433
  Z,
433
434
  {
434
435
  onClick: () => {
435
- p(!0), i.capture();
436
+ u(!0), i.capture();
436
437
  },
437
- disabled: f
438
+ disabled: E
438
439
  }
439
440
  ) : null
440
441
  ] }),
441
442
  c ? /* @__PURE__ */ t(
442
- _,
443
+ T,
443
444
  {
444
445
  error: c,
445
446
  attemptsRemaining: C,
446
447
  onTryAgain: () => {
447
- i.retryCapture(), p(!1);
448
+ i.retryCapture(), u(!1);
448
449
  },
449
450
  onContinue: n
450
451
  }
451
452
  ) : null
452
453
  ] }) : o === "capturing" ? /* @__PURE__ */ t(
453
- u,
454
+ p,
454
455
  {
455
456
  className: "IncodeCaptureCapturingPage",
456
457
  title: "Capturing",
@@ -467,47 +468,47 @@ const O = ({
467
468
  }
468
469
  )
469
470
  }
470
- ) : o === "uploading" ? /* @__PURE__ */ t(Q, {}) : o === "uploadError" ? /* @__PURE__ */ t(
471
- _,
471
+ ) : o === "uploading" ? /* @__PURE__ */ t(Y, {}) : o === "uploadError" ? /* @__PURE__ */ t(
472
+ T,
472
473
  {
473
474
  error: c,
474
475
  attemptsRemaining: C,
475
476
  onTryAgain: () => {
476
- i.retryCapture(), p(!1);
477
+ i.retryCapture(), u(!1);
477
478
  },
478
479
  onContinue: n
479
480
  }
480
- ) : o === "success" ? /* @__PURE__ */ t(u, { className: "IncodeCaptureSuccessPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureSuccessContainer", children: [
481
+ ) : o === "success" ? /* @__PURE__ */ t(p, { className: "IncodeCaptureSuccessPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureSuccessContainer", children: [
481
482
  /* @__PURE__ */ t(a, { size: 160 }),
482
- /* @__PURE__ */ t(A, { size: 64 }),
483
+ /* @__PURE__ */ t(M, { size: 64 }),
483
484
  /* @__PURE__ */ t(a, { size: 16 }),
484
- /* @__PURE__ */ t(v, { children: E("idv2.capture.processing.success") })
485
+ /* @__PURE__ */ t(A, { children: g("idv2.capture.processing.success") })
485
486
  ] }) }) : null;
486
- }, z = ({ stream: i }) => {
487
- const e = D(null);
488
- return T(() => {
489
- e.current && i && (e.current.srcObject = i);
487
+ }, Q = ({ stream: i, mirrored: e }) => {
488
+ const n = S(null);
489
+ return O(() => {
490
+ n.current && i && (n.current.srcObject = i);
490
491
  }, [i]), /* @__PURE__ */ t(
491
492
  "video",
492
493
  {
493
- ref: e,
494
+ ref: n,
494
495
  autoplay: !0,
495
496
  playsInline: !0,
496
497
  muted: !0,
497
- class: "IncodeCaptureVideoElement"
498
+ class: e ? "IncodeCaptureVideoElement IncodeCaptureVideoMirrored" : "IncodeCaptureVideoElement"
498
499
  }
499
500
  );
500
- }, Q = () => {
501
+ }, Y = () => {
501
502
  const { t: i } = d();
502
- return /* @__PURE__ */ t(u, { className: "IncodeCaptureUploadingPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingContainer", children: [
503
+ return /* @__PURE__ */ t(p, { className: "IncodeCaptureUploadingPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingContainer", children: [
503
504
  /* @__PURE__ */ t(a, { size: 160 }),
504
- /* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingIconContainer", children: /* @__PURE__ */ t(I, { size: 64 }) }),
505
+ /* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingIconContainer", children: /* @__PURE__ */ t(L, { size: 64 }) }),
505
506
  /* @__PURE__ */ t(a, { size: 16 }),
506
507
  /* @__PURE__ */ t("h2", { class: "IncodeCaptureUploadingTitle", children: i("idv2.capture.processing.uploading") })
507
508
  ] }) });
508
- }, tt = ({ manager: i }) => {
509
+ }, et = ({ manager: i }) => {
509
510
  const { t: e } = d(), [n, o] = R(!1), [r, s] = R(null);
510
- T(() => {
511
+ O(() => {
511
512
  import("./selfieTutorial-Dm_p0ke9.js").then((c) => {
512
513
  s(c.default);
513
514
  });
@@ -516,7 +517,7 @@ const O = ({
516
517
  o(!0), i.nextStep();
517
518
  };
518
519
  return r ? /* @__PURE__ */ t(
519
- M,
520
+ w,
520
521
  {
521
522
  animationData: r,
522
523
  title: e("face.tutorial.title"),
@@ -530,6 +531,6 @@ const O = ({
530
531
  ) : null;
531
532
  };
532
533
  export {
533
- J as C,
534
- tt as T
534
+ tt as C,
535
+ et as T
535
536
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260218-e020e1c",
3
+ "version": "0.0.0-dev-20260219-f9d9707",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -79,7 +79,7 @@
79
79
  "libphonenumber-js": "^1.11.0",
80
80
  "preact-custom-element": "^4.6.0",
81
81
  "tailwindcss": "^4.1.17",
82
- "@incodetech/core": "0.0.0-dev-20260218-e020e1c"
82
+ "@incodetech/core": "0.0.0-dev-20260219-f9d9707"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@microsoft/api-extractor": "^7.53.3",