@incodetech/web 0.0.0-dev-20260506-135ee70 → 0.0.0-dev-20260507-e005279

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.
@@ -8,14 +8,15 @@ import { t as c } from "../transitionSpinner-DHelnP9m.js";
8
8
  import { t as l } from "../incodeModule-D_r2n18O.js";
9
9
  import { a as u, h as d, i as f, o as p, p as m, t as h } from "../useModuleLoader-Wx57i1Nv.js";
10
10
  import { resolveWasmConfig as g, warmupWasm as _ } from "@incodetech/core/wasm";
11
- import { QrValidationError as v, refreshQrUrlUuid as y } from "@incodetech/core/session";
12
- import { createWorkflowManager as b } from "@incodetech/core/workflow";
11
+ import { getDeviceClass as v } from "@incodetech/core/device";
12
+ import { QrValidationError as y, refreshQrUrlUuid as b } from "@incodetech/core/session";
13
+ import { createWorkflowManager as x } from "@incodetech/core/workflow";
13
14
  //#region src/modules/workflow/workflowInit.ts
14
- var x = {
15
+ var S = {
15
16
  ...p,
16
17
  REDIRECT_TO_MOBILE: () => import("../redirectToMobile-B34StIWz.js").then((e) => e.RedirectToMobile)
17
18
  };
18
- async function S() {
19
+ async function C() {
19
20
  try {
20
21
  let e = await d();
21
22
  return {
@@ -29,14 +30,14 @@ async function S() {
29
30
  return {};
30
31
  }
31
32
  }
32
- function C(e = {}) {
33
- return b({
33
+ function w(e = {}) {
34
+ return x({
34
35
  customModuleCallback: e.customModuleCallback,
35
36
  interviewId: e.interviewId,
36
- isDesktop: e.isDesktop
37
+ isDesktop: e.isDesktop ?? v() === "desktop"
37
38
  });
38
39
  }
39
- function w(e) {
40
+ function T(e) {
40
41
  e !== !1 && _(g({
41
42
  ...e,
42
43
  pipelines: e?.pipelines ?? ["selfie", "idCapture"]
@@ -46,9 +47,9 @@ function w(e) {
46
47
  }
47
48
  //#endregion
48
49
  //#region src/modules/workflow/useWorkflowInitialization.ts
49
- function T(e) {
50
- let { token: i, lang: o, disableDashboardTheme: s, wasmConfig: c, customModuleCallback: l, interviewId: u, isDesktop: d, urlUuid: f, onError: p, onUrlUuidRefreshed: h } = e, g = n(null), [_, b] = r(() => {
51
- let e = C({
50
+ function E(e) {
51
+ let { token: i, lang: o, disableDashboardTheme: s, wasmConfig: c, customModuleCallback: l, interviewId: u, isDesktop: d, urlUuid: f, onError: p, onUrlUuidRefreshed: h } = e, g = n(null), [_, v] = r(() => {
52
+ let e = w({
52
53
  customModuleCallback: l,
53
54
  interviewId: u,
54
55
  isDesktop: d
@@ -67,22 +68,22 @@ function T(e) {
67
68
  await m({
68
69
  token: i,
69
70
  lang: o
70
- }), f && await y({
71
+ }), f && await b({
71
72
  urlUuid: f,
72
73
  onboardingId: null,
73
74
  onRefreshed: h
74
75
  }, n);
75
- let t = s ? Promise.resolve() : S().then((e) => {
76
+ let t = s ? Promise.resolve() : C().then((e) => {
76
77
  e.uiConfig && a(e.uiConfig);
77
78
  });
78
- w(c), e.load(), await t, b({
79
+ T(c), e.load(), await t, v({
79
80
  status: "ready",
80
81
  workflowManager: e
81
82
  });
82
83
  } catch (t) {
83
84
  if (n.aborted) return;
84
- let r = t instanceof Error ? t.message : "Failed to initialize SDK", i = t instanceof v ? t.status : void 0;
85
- b({
85
+ let r = t instanceof Error ? t.message : "Failed to initialize SDK", i = t instanceof y ? t.status : void 0;
86
+ v({
86
87
  status: "error",
87
88
  error: r,
88
89
  errorCode: i,
@@ -104,7 +105,7 @@ function T(e) {
104
105
  }
105
106
  //#endregion
106
107
  //#region src/modules/workflow/workflow.tsx
107
- function E(e) {
108
+ function D(e) {
108
109
  let { moduleKey: t, config: n, workflowId: r, authHint: i, lang: a, mergeSessionRecordings: o, ageAssurance: s } = e;
109
110
  switch (t) {
110
111
  case "AUTHENTICATION": return {
@@ -144,8 +145,8 @@ function E(e) {
144
145
  default: return n;
145
146
  }
146
147
  }
147
- var D = ({ config: r, onFinish: a, onError: s }) => {
148
- let { i18n: l } = e(), d = T({
148
+ var O = ({ config: r, onFinish: a, onError: s }) => {
149
+ let { i18n: l } = e(), d = E({
149
150
  token: r.token,
150
151
  lang: r.lang,
151
152
  disableDashboardTheme: r.disableDashboardTheme,
@@ -158,7 +159,7 @@ var D = ({ config: r, onFinish: a, onError: s }) => {
158
159
  onUrlUuidRefreshed: r.onUrlUuidRefreshed
159
160
  }), [p, m] = o(() => d.workflowManager, { autoLoad: !1 }), g = h({
160
161
  moduleKey: p?.status === "ready" ? p.currentNode.moduleKey : void 0,
161
- modules: x,
162
+ modules: S,
162
163
  headlessModuleKeys: f,
163
164
  onModuleLoading: r.onModuleLoading,
164
165
  onModuleLoaded: r.onModuleLoaded,
@@ -202,7 +203,7 @@ var D = ({ config: r, onFinish: a, onError: s }) => {
202
203
  return /* @__PURE__ */ i("div", {
203
204
  class: "IncodeWorkflow",
204
205
  children: /* @__PURE__ */ i(b, {
205
- config: E({
206
+ config: D({
206
207
  moduleKey: p.currentNode.moduleKey,
207
208
  config: p.config,
208
209
  workflowId: p.workflowConfig.id,
@@ -216,11 +217,11 @@ var D = ({ config: r, onFinish: a, onError: s }) => {
216
217
  ...p.currentNode.moduleKey === "REDIRECT_TO_MOBILE" ? { onContinue: () => m.completeModule() } : {}
217
218
  }, p.currentNode.id)
218
219
  });
219
- }, O = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ i(s, { children: e ? /* @__PURE__ */ i(D, {
220
+ }, k = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ i(s, { children: e ? /* @__PURE__ */ i(O, {
220
221
  config: e,
221
222
  onFinish: t,
222
223
  onError: n
223
224
  }) : null });
224
- l(O, "incode-workflow");
225
+ l(k, "incode-workflow");
225
226
  //#endregion
226
- export { O as IncodeWorkflow };
227
+ export { k as IncodeWorkflow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260506-135ee70",
3
+ "version": "0.0.0-dev-20260507-e005279",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -239,7 +239,7 @@
239
239
  "qrcode": "^1.5.4",
240
240
  "signature_pad": "^5.1.3",
241
241
  "tailwindcss": "^4.1.17",
242
- "@incodetech/core": "0.0.0-dev-20260506-135ee70"
242
+ "@incodetech/core": "0.0.0-dev-20260507-e005279"
243
243
  },
244
244
  "devDependencies": {
245
245
  "@microsoft/api-extractor": "^7.53.3",