@incodetech/web 0.0.0-dev-20260309-3ae0dc2 → 0.0.0-dev-20260309-8c96b8e

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 (2) hide show
  1. package/dist/id/id.es.js +38 -41
  2. package/package.json +2 -2
package/dist/id/id.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import { u as e, b as u, S as p, B, c as w, r as U, I as N, a as O } from "../incodeModule-Cep-QgBA.js";
1
+ import { u as e, b as C, S as p, B, c as w, r as z, I as N, a as O } from "../incodeModule-Cep-QgBA.js";
2
2
  import { createIdCaptureManager as G } from "@incodetech/core/id";
3
- import { d as m, y as v, k as K, D as Q, A as Z, q as j } from "../vendor-preact-DP-hbKuj.js";
3
+ import { d as m, y as v, k as K, D as Q, A as Z, q as $ } from "../vendor-preact-DP-hbKuj.js";
4
4
  import "@incodetech/core";
5
- import { L as E, B as q, P as W } from "../baseTutorial-Bn4o165G.js";
6
- import { P as $ } from "../processing-BivHhXrQ.js";
5
+ import { L as E, B as j, P as q } from "../baseTutorial-Bn4o165G.js";
6
+ import { P as W } from "../processing-BivHhXrQ.js";
7
7
  import "../uiConfig-B8PUPgHY.js";
8
8
  import { L as J, P as X, a as Y, b as e1, c as t1, C as i1, d as n1 } from "../captureFooter-I1T3jXYf.js";
9
9
  import { P as M } from "../page-ws5_se-Y.js";
@@ -191,7 +191,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
191
191
  onClose: n,
192
192
  onTakeManually: t
193
193
  }) => {
194
- const { t: i } = u(), r = () => {
194
+ const { t: i } = C(), r = () => {
195
195
  t(), n();
196
196
  };
197
197
  return /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModal", children: /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModalContent", children: [
@@ -277,7 +277,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
277
277
  bottomContent: s,
278
278
  overlayContent: c
279
279
  }) => {
280
- const { t: l } = u();
280
+ const { t: l } = C();
281
281
  return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
282
282
  o && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: o }),
283
283
  /* @__PURE__ */ e(
@@ -307,13 +307,13 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
307
307
  s
308
308
  ] })
309
309
  ] }) }) });
310
- }, u1 = ({
310
+ }, C1 = ({
311
311
  imageUrl: n,
312
312
  progress: t,
313
313
  orientation: i,
314
314
  mode: r
315
315
  }) => {
316
- const { t: o } = u(), s = i !== "vertical" || r === "passport", [c, l] = m(null);
316
+ const { t: o } = C(), s = i !== "vertical" || r === "passport", [c, l] = m(null);
317
317
  return v(() => {
318
318
  s ? import("../id-laser-h-BBV3r3rz.js").then((d) => {
319
319
  l(d.default);
@@ -341,7 +341,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
341
341
  ) : null
342
342
  }
343
343
  );
344
- }, C1 = ({ className: n }) => /* @__PURE__ */ e(
344
+ }, u1 = ({ className: n }) => /* @__PURE__ */ e(
345
345
  "svg",
346
346
  {
347
347
  class: n,
@@ -386,7 +386,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
386
386
  onButtonClick: l,
387
387
  attemptsRemaining: d
388
388
  }) => {
389
- const { t: a } = u();
389
+ const { t: a } = C();
390
390
  return /* @__PURE__ */ e(
391
391
  V,
392
392
  {
@@ -395,7 +395,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
395
395
  mode: r,
396
396
  borderState: n,
397
397
  topContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultContent", children: [
398
- n === "success" ? /* @__PURE__ */ e(C1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(A, { className: "IncodeIdProcessingResultIcon" }),
398
+ n === "success" ? /* @__PURE__ */ e(u1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(A, { className: "IncodeIdProcessingResultIcon" }),
399
399
  /* @__PURE__ */ e(p, { size: 16 }),
400
400
  o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
401
401
  s && /* @__PURE__ */ e(K, { children: [
@@ -412,7 +412,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
412
412
  }
413
413
  );
414
414
  }, p1 = ({ manager: n, state: t }) => {
415
- const { t: i } = u();
415
+ const { t: i } = C();
416
416
  if (!t.previewImageUrl)
417
417
  return null;
418
418
  const r = t.currentMode === "passport" ? "passport" : "id", o = () => t.needsBackCapture ? i("v2.idSuccess.subtitle") : t.needsFrontCapture ? i("idv2.capture.processing.successBackSubtitleScanFront") : i("v2.idSuccess.subtitleBack"), s = () => t.needsBackCapture ? i("idv2.capture.processing.scanBack") : t.needsFrontCapture ? i("idv2.capture.processing.scanFront") : i("idv2.capturePreview.continue");
@@ -430,7 +430,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
430
430
  }
431
431
  );
432
432
  }, R = ({ manager: n, state: t, ...i }) => {
433
- const { t: r } = u();
433
+ const { t: r } = C();
434
434
  if (t.status === "error")
435
435
  return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
436
436
  /* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children: t.error }),
@@ -452,7 +452,7 @@ const r1 = ({ className: n }) => /* @__PURE__ */ e(
452
452
  }
453
453
  ) : null;
454
454
  }, h1 = ({ manager: n }) => {
455
- const { t } = u(), i = () => {
455
+ const { t } = C(), i = () => {
456
456
  n.retryCapture();
457
457
  };
458
458
  return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
@@ -474,7 +474,7 @@ const x = {
474
474
  front: () => import("../frontdevicelottie-KhKxT5n9.js"),
475
475
  back: () => import("../backdevicelottie-B4NgyWmX.js")
476
476
  };
477
- function z(n) {
477
+ function U(n) {
478
478
  k || (k = !0, Promise.all([
479
479
  x.blur(),
480
480
  x.glare(),
@@ -487,7 +487,7 @@ function z(n) {
487
487
  }));
488
488
  }
489
489
  function f1() {
490
- z();
490
+ U();
491
491
  }
492
492
  function I1() {
493
493
  v(() => {
@@ -495,9 +495,9 @@ function I1() {
495
495
  }, []);
496
496
  }
497
497
  function m1(n, t) {
498
- const { t: i } = u(), [, r] = m(0);
498
+ const { t: i } = C(), [, r] = m(0);
499
499
  if (v(() => {
500
- z(() => r((o) => o + 1));
500
+ U(() => r((o) => o + 1));
501
501
  }, []), n === "blur")
502
502
  return {
503
503
  title: i("idv2.capture.notifications.blur.title"),
@@ -550,7 +550,7 @@ const v1 = ({
550
550
  onCapture: c,
551
551
  onOpenHelp: l
552
552
  }, d) => {
553
- const { t: a } = u();
553
+ const { t: a } = C();
554
554
  I1();
555
555
  const L = i === "detecting" || i === "idNotDetected" || i === "manualCapture", b = () => o || i === "capturing" ? "capturing" : i === "blur" || i === "glare" || i === "wrongSide" || i === "farAway" ? "error" : "idle", h = () => {
556
556
  if (o || i === "capturing")
@@ -572,7 +572,7 @@ const v1 = ({
572
572
  };
573
573
  }
574
574
  return null;
575
- }, P = b(), y = h(), C = n === "passport", I = t !== "vertical" || C, g = I ? "horizontal" : "vertical";
575
+ }, P = b(), y = h(), u = n === "passport", I = t !== "vertical" || u, g = I ? "horizontal" : "vertical";
576
576
  return /* @__PURE__ */ e(
577
577
  i1,
578
578
  {
@@ -599,7 +599,7 @@ const v1 = ({
599
599
  variant: "locked",
600
600
  orientation: g,
601
601
  frameState: P,
602
- className: w(C && "IncodeCaptureFramePassport"),
602
+ className: w(u && "IncodeCaptureFramePassport"),
603
603
  children: o && r > 0 && /* @__PURE__ */ e("div", { class: "IncodeCaptureCounter", children: r })
604
604
  }
605
605
  ),
@@ -620,16 +620,13 @@ const v1 = ({
620
620
  );
621
621
  }
622
622
  ), w1 = ({ manager: n, state: t }) => {
623
- const { t: i } = u();
623
+ const { t: i } = C();
624
624
  if (t.captureStatus === "initializing")
625
- return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
626
- /* @__PURE__ */ e(D, { size: "large" }),
627
- /* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: i("idv2.capture.initializing") })
628
- ] }) });
625
+ return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(D, { size: "large", title: `${i("webcam.loading")}...` }) });
629
626
  if (t.captureStatus === "uploading" && t.previewImageUrl) {
630
627
  const r = t.currentMode === "passport" ? "passport" : "id";
631
628
  return /* @__PURE__ */ e(
632
- u1,
629
+ C1,
633
630
  {
634
631
  imageUrl: t.previewImageUrl,
635
632
  progress: t.uploadProgress ?? 0,
@@ -642,17 +639,17 @@ const v1 = ({
642
639
  }, L1 = ({ manager: n, state: t }) => {
643
640
  const i = Z(null), r = Z(null), [o, s] = m(!1), [c, l] = m(!1);
644
641
  v(() => {
645
- const C = i.current;
646
- if (!C || !t.stream) {
642
+ const u = i.current;
643
+ if (!u || !t.stream) {
647
644
  l(!1);
648
645
  return;
649
646
  }
650
647
  l(!1);
651
648
  const I = () => l(!0);
652
- return C.addEventListener("playing", I), C.srcObject = t.stream, C.play().catch(() => {
653
- }), () => C.removeEventListener("playing", I);
649
+ return u.addEventListener("playing", I), u.srcObject = t.stream, u.play().catch(() => {
650
+ }), () => u.removeEventListener("playing", I);
654
651
  }, [t.stream]), v(() => {
655
- const C = () => {
652
+ const u = () => {
656
653
  const I = r.current;
657
654
  if (!I)
658
655
  return;
@@ -664,7 +661,7 @@ const v1 = ({
664
661
  height: g.height
665
662
  });
666
663
  };
667
- return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
664
+ return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
668
665
  }, [n, t.orientation, c]);
669
666
  const d = t.captureStatus === "capturing" || t.detectionStatus === "capturing", a = t.detectionStatus, L = a === "manualCapture" || t.showCaptureButtonInAuto && t.captureStatus === "detecting" && a !== "capturing", b = () => {
670
667
  s(!0);
@@ -1257,7 +1254,7 @@ const v1 = ({
1257
1254
  ]
1258
1255
  }
1259
1256
  ), M1 = ({ manager: n }) => {
1260
- const { t } = u(), i = () => {
1257
+ const { t } = C(), i = () => {
1261
1258
  n.selectDocument("id");
1262
1259
  }, r = () => {
1263
1260
  n.selectDocument("passport");
@@ -1298,13 +1295,13 @@ const v1 = ({
1298
1295
  manager: n,
1299
1296
  direction: t
1300
1297
  }) => {
1301
- const [i, r] = m(null), [o, s] = m(!1), { t: c } = u();
1298
+ const [i, r] = m(null), [o, s] = m(!1), { t: c } = C();
1302
1299
  v(() => {
1303
1300
  import("../flip-animation-COR596wy.js").then((a) => {
1304
1301
  r(a.default);
1305
1302
  });
1306
1303
  }, []);
1307
- const l = j(async () => {
1304
+ const l = $(async () => {
1308
1305
  await new Promise((a) => setTimeout(a, 1e3)), t === "toBack" ? n.continueToBack() : n.continueToFront(), s(!0);
1309
1306
  }, [t, n]);
1310
1307
  return o ? /* @__PURE__ */ e(D, { size: "large" }) : i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
@@ -1320,7 +1317,7 @@ const v1 = ({
1320
1317
  )
1321
1318
  ] }) : null;
1322
1319
  }, b1 = ({ manager: n, state: t }) => {
1323
- const { t: i } = u(), [r, o] = m(!1), [s, c] = m(null), l = t.selectedDocumentType === "passport", d = t.currentMode === "back";
1320
+ const { t: i } = C(), [r, o] = m(!1), [s, c] = m(null), l = t.selectedDocumentType === "passport", d = t.currentMode === "back";
1324
1321
  if (v(() => {
1325
1322
  l ? import("../passport-tutorial-CaYBFTqt.js").then((h) => {
1326
1323
  c(h.default);
@@ -1333,7 +1330,7 @@ const v1 = ({
1333
1330
  return null;
1334
1331
  const a = i(l ? "idv2.capture.passport.title" : d ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), L = i(l ? "idv2.capture.passport.subtitle" : d ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
1335
1332
  return /* @__PURE__ */ e(
1336
- q,
1333
+ j,
1337
1334
  {
1338
1335
  animationData: s,
1339
1336
  title: a,
@@ -1353,14 +1350,14 @@ const v1 = ({
1353
1350
  }, P1 = ({ config: n, onFinish: t, onError: i }) => {
1354
1351
  const [r, o] = O(() => G({ config: n }));
1355
1352
  return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(M1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(b1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
1356
- W,
1353
+ q,
1357
1354
  {
1358
1355
  manager: o,
1359
1356
  permissionStatus: r.permissionStatus
1360
1357
  }
1361
- ) : r.status === "frontFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(w1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e($, {}) : r.status === "expired" ? /* @__PURE__ */ e(h1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(R, { manager: o, state: r, onError: i }) : null;
1358
+ ) : r.status === "frontFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(w1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e(W, {}) : r.status === "expired" ? /* @__PURE__ */ e(h1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(R, { manager: o, state: r, onError: i }) : null;
1362
1359
  }, _1 = ({ config: n, onFinish: t, onError: i }) => /* @__PURE__ */ e(N, { children: n ? /* @__PURE__ */ e(P1, { config: n, onFinish: t, onError: i }) : null });
1363
- U(_1, "incode-id");
1360
+ z(_1, "incode-id");
1364
1361
  export {
1365
1362
  _1 as Id
1366
1363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260309-3ae0dc2",
3
+ "version": "0.0.0-dev-20260309-8c96b8e",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -107,7 +107,7 @@
107
107
  "libphonenumber-js": "^1.11.0",
108
108
  "preact-custom-element": "^4.6.0",
109
109
  "tailwindcss": "^4.1.17",
110
- "@incodetech/core": "0.0.0-dev-20260309-3ae0dc2"
110
+ "@incodetech/core": "0.0.0-dev-20260309-8c96b8e"
111
111
  },
112
112
  "devDependencies": {
113
113
  "@microsoft/api-extractor": "^7.53.3",