@incodetech/web 0.0.0-dev-20260604-0577f678 → 0.0.0-dev-20260604-659ac57f
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.
package/dist/flow/flow.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { c as u } from "../hooks-MxHtZWTS.js";
|
|
|
5
5
|
import { t as d } from "../incodeComponent-BoFhgK7G.js";
|
|
6
6
|
import { t as f } from "../transitionSpinner-Di3bOyOu.js";
|
|
7
7
|
import { t as p } from "../incodeModule-BiCoAJ5k.js";
|
|
8
|
-
import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-
|
|
8
|
+
import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-CvivqHRm.js";
|
|
9
9
|
import { getDeviceClass as A } from "@incodetech/core/device";
|
|
10
10
|
import { getRequiredWasmPipelines as j } from "@incodetech/core/flow";
|
|
11
11
|
import { bootstrapSession as M, refreshQrUrlUuid as N } from "@incodetech/core/session";
|
|
@@ -183,8 +183,10 @@ function G(e) {
|
|
|
183
183
|
onboardingId: null,
|
|
184
184
|
onRefreshed: e.onUrlUuidRefreshed
|
|
185
185
|
}, a);
|
|
186
|
-
else if (L(e))
|
|
187
|
-
|
|
186
|
+
else if (L(e)) {
|
|
187
|
+
let t = await F(e, a);
|
|
188
|
+
n = t.token, f.flowManager.setEndScreenTexts(t.endScreenTitle ?? null, t.endScreenText ?? null);
|
|
189
|
+
} else throw Error("Flow requires token, or configurationId with apiKey or clientId");
|
|
188
190
|
await v({
|
|
189
191
|
token: n,
|
|
190
192
|
lang: t,
|
|
@@ -4,10 +4,10 @@ import { t as c } from "./uiConfig-CwpQ-IM6.js";
|
|
|
4
4
|
import { t as l } from "./page-C1yT4DLb.js";
|
|
5
5
|
import { t as u } from "./button-DcCUEn2n.js";
|
|
6
6
|
import { t as d } from "./errorIcon-DpHzAoAo.js";
|
|
7
|
-
import { initializeWasmUtil as f, resolveWasmConfig as p, setWasmConfig as m, upgradeToWasmHttpClient as
|
|
8
|
-
import { getDeviceClass as
|
|
9
|
-
import { createOrchestratedFlowManager as
|
|
10
|
-
import { initializeSession as
|
|
7
|
+
import { initializeWasmUtil as f, resolveWasmConfig as p, setWasmConfig as m, upgradeToWasmHttpClient as ee, warmupWasm as h } from "@incodetech/core/wasm";
|
|
8
|
+
import { getDeviceClass as g } from "@incodetech/core/device";
|
|
9
|
+
import { createOrchestratedFlowManager as te, getFlow as ne, getRequiredWasmPipelines as _ } from "@incodetech/core/flow";
|
|
10
|
+
import { getFinishStatus as v, initializeSession as y } from "@incodetech/core/session";
|
|
11
11
|
import { api as b } from "@incodetech/core/http";
|
|
12
12
|
//#region src/shared/terminalErrorPage/terminalErrorPage.tsx
|
|
13
13
|
var x = ({ message: e, onRetry: t }) => {
|
|
@@ -54,7 +54,7 @@ var x = ({ message: e, onRetry: t }) => {
|
|
|
54
54
|
};
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/styles/generatePalette.ts
|
|
57
|
-
function
|
|
57
|
+
function S(e) {
|
|
58
58
|
let t = e.replace("#", "");
|
|
59
59
|
t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
|
|
60
60
|
let n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
@@ -80,7 +80,7 @@ function ne(e) {
|
|
|
80
80
|
l: u * 100
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function C(e, t, n) {
|
|
84
84
|
let r = e / 360, i = t / 100, a = n / 100, o, s, c;
|
|
85
85
|
if (i === 0) o = s = c = a;
|
|
86
86
|
else {
|
|
@@ -93,24 +93,24 @@ function S(e, t, n) {
|
|
|
93
93
|
};
|
|
94
94
|
return `#${l(o)}${l(s)}${l(c)}`;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
let t =
|
|
96
|
+
function re(e) {
|
|
97
|
+
let t = S(e);
|
|
98
98
|
if (!t) throw Error(`Invalid color format: ${e}`);
|
|
99
99
|
return {
|
|
100
|
-
50:
|
|
101
|
-
200:
|
|
102
|
-
300:
|
|
103
|
-
400:
|
|
100
|
+
50: C(t.h, t.s, 95),
|
|
101
|
+
200: C(t.h, t.s, 80),
|
|
102
|
+
300: C(t.h, t.s, 65),
|
|
103
|
+
400: C(t.h, t.s, Math.min(100, t.l + 10)),
|
|
104
104
|
500: e,
|
|
105
|
-
600:
|
|
106
|
-
900:
|
|
105
|
+
600: C(t.h, t.s, Math.max(0, t.l - 10)),
|
|
106
|
+
900: C(t.h, t.s, 20)
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/styles/applyTheme.ts
|
|
111
|
-
function
|
|
111
|
+
function ie(e, t) {
|
|
112
112
|
if (typeof document > "u") return;
|
|
113
|
-
let n =
|
|
113
|
+
let n = re(e), r = document.getElementById("incode-theme");
|
|
114
114
|
r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
|
|
115
115
|
let i = t || "#ffffff", a = `
|
|
116
116
|
:root,
|
|
@@ -129,11 +129,11 @@ function re(e, t) {
|
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region src/styles/fetchTheme.ts
|
|
132
|
-
async function
|
|
132
|
+
async function ae() {
|
|
133
133
|
return (await b.get("/omni/asset/fetch-all")).data;
|
|
134
134
|
}
|
|
135
135
|
var w = /* @__PURE__ */ new Map();
|
|
136
|
-
async function
|
|
136
|
+
async function oe(e) {
|
|
137
137
|
if (e.startsWith("data:")) return e;
|
|
138
138
|
let t = w.get(e);
|
|
139
139
|
if (t) return t;
|
|
@@ -144,7 +144,7 @@ async function ae(e) {
|
|
|
144
144
|
return w.set(e, r), r;
|
|
145
145
|
}
|
|
146
146
|
async function T() {
|
|
147
|
-
let e = await
|
|
147
|
+
let e = await ae();
|
|
148
148
|
if (!e.theme) throw Error("Theme URL not found in assets response");
|
|
149
149
|
let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
|
|
150
150
|
if (n) {
|
|
@@ -153,14 +153,14 @@ async function T() {
|
|
|
153
153
|
r = await e.json();
|
|
154
154
|
} else r = (await b.get(t)).data;
|
|
155
155
|
let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
|
|
156
|
-
return i && (a = await
|
|
156
|
+
return i && (a = await oe(i)), {
|
|
157
157
|
...r,
|
|
158
158
|
logo: a
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
async function E() {
|
|
162
162
|
let e = await T();
|
|
163
|
-
return e.main &&
|
|
163
|
+
return e.main && ie(e.main, e.buttonColor), e;
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region src/modules/flow/flowInit.ts
|
|
@@ -259,22 +259,34 @@ function L() {
|
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function R(e = {}) {
|
|
262
|
-
let t = {}, n = e.isDesktop ??
|
|
263
|
-
|
|
262
|
+
let t = {}, n = e.isDesktop ?? g() === "desktop", { enableHome: r, ...i } = e, a = {
|
|
263
|
+
endScreenTitle: null,
|
|
264
|
+
endScreenText: null
|
|
265
|
+
}, o = te({
|
|
264
266
|
enableHome: r,
|
|
265
267
|
getFlow: async (e) => {
|
|
266
|
-
let r = await
|
|
268
|
+
let r = await ne(e, {
|
|
267
269
|
...i,
|
|
268
270
|
isDesktop: n
|
|
269
271
|
}), a = M(r.flowModules ?? []);
|
|
270
272
|
for (let e of Object.keys(t)) delete t[e];
|
|
271
273
|
return Object.assign(t, a), r;
|
|
272
274
|
},
|
|
275
|
+
getFinishStatus: async (e, t) => ({
|
|
276
|
+
...await v(e, t),
|
|
277
|
+
...a
|
|
278
|
+
}),
|
|
273
279
|
lazyModules: t
|
|
274
280
|
});
|
|
281
|
+
return Object.assign(o, { setEndScreenTexts(e, t) {
|
|
282
|
+
a = {
|
|
283
|
+
endScreenTitle: e,
|
|
284
|
+
endScreenText: t
|
|
285
|
+
};
|
|
286
|
+
} });
|
|
275
287
|
}
|
|
276
288
|
async function z(n) {
|
|
277
|
-
await
|
|
289
|
+
await y({ token: n.token }), !r() && t(e(n.lang ? { lang: n.lang } : void 0));
|
|
278
290
|
}
|
|
279
291
|
async function B(e) {
|
|
280
292
|
let { token: t, lang: n, flowManager: r } = e;
|
|
@@ -300,7 +312,7 @@ async function V() {
|
|
|
300
312
|
}
|
|
301
313
|
function H(e, t) {
|
|
302
314
|
if (e.currentStep === "REDIRECT_TO_MOBILE") return;
|
|
303
|
-
let n =
|
|
315
|
+
let n = _(e.flow);
|
|
304
316
|
if (n.length > 0) {
|
|
305
317
|
let e = p({
|
|
306
318
|
...t ?? {},
|
|
@@ -309,7 +321,7 @@ function H(e, t) {
|
|
|
309
321
|
...e,
|
|
310
322
|
pipelines: e.pipelines ? [...e.pipelines] : void 0
|
|
311
323
|
};
|
|
312
|
-
m(r),
|
|
324
|
+
m(r), h(e).then(() => f(r)).then(() => ee(r)).catch((e) => {
|
|
313
325
|
console.error("WASM warmup failed:", e);
|
|
314
326
|
});
|
|
315
327
|
}
|
|
@@ -323,7 +335,7 @@ function U(e) {
|
|
|
323
335
|
}
|
|
324
336
|
//#endregion
|
|
325
337
|
//#region src/modules/flow/unsupportedModule.tsx
|
|
326
|
-
var
|
|
338
|
+
var se = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ s("section", {
|
|
327
339
|
class: "IncodeUnsupportedModule",
|
|
328
340
|
"aria-live": "polite",
|
|
329
341
|
children: /* @__PURE__ */ s("div", {
|
|
@@ -352,7 +364,7 @@ var W = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ s("section", {
|
|
|
352
364
|
});
|
|
353
365
|
//#endregion
|
|
354
366
|
//#region src/modules/flow/extractIncodeStatus.ts
|
|
355
|
-
function
|
|
367
|
+
function W(e) {
|
|
356
368
|
if (typeof e == "object" && e && "status" in e && typeof e.status == "number") return e.status;
|
|
357
369
|
}
|
|
358
370
|
//#endregion
|
|
@@ -365,46 +377,46 @@ async function K(e) {
|
|
|
365
377
|
if (!t) throw Error("SHA-1 is not available in this environment");
|
|
366
378
|
return G(await t.digest("SHA-1", new TextEncoder().encode(e)));
|
|
367
379
|
}
|
|
368
|
-
async function
|
|
380
|
+
async function ce(e) {
|
|
369
381
|
if (typeof e.apiKey == "string") return e.apiKey;
|
|
370
382
|
if (typeof e.clientId == "string") return K(e.clientId);
|
|
371
383
|
throw Error("Self-loading mode requires apiKey or clientId");
|
|
372
384
|
}
|
|
373
385
|
//#endregion
|
|
374
386
|
//#region src/modules/flow/headlessModule.ts
|
|
375
|
-
var
|
|
387
|
+
var le = () => null, ue = () => Promise.resolve(le), de = new Set(["IDENTITY_SEARCH"]);
|
|
376
388
|
//#endregion
|
|
377
389
|
//#region src/modules/flow/useModuleLoader.ts
|
|
378
|
-
function
|
|
390
|
+
function fe(e, t) {
|
|
379
391
|
return e instanceof Error ? e.message : t;
|
|
380
392
|
}
|
|
381
|
-
var
|
|
382
|
-
function
|
|
393
|
+
var q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap();
|
|
394
|
+
function Y(e) {
|
|
383
395
|
return e;
|
|
384
396
|
}
|
|
385
|
-
function
|
|
386
|
-
if (e) return
|
|
397
|
+
function X(e) {
|
|
398
|
+
if (e) return q.get(Y(e));
|
|
387
399
|
}
|
|
388
|
-
function
|
|
389
|
-
let t =
|
|
400
|
+
function Z(e) {
|
|
401
|
+
let t = Y(e), n = q.get(t);
|
|
390
402
|
if (n) return Promise.resolve(n);
|
|
391
|
-
let r =
|
|
403
|
+
let r = J.get(t);
|
|
392
404
|
if (r) return r;
|
|
393
|
-
let i = e().then((e) => (
|
|
394
|
-
throw
|
|
405
|
+
let i = e().then((e) => (q.set(t, e), J.delete(t), e)).catch((e) => {
|
|
406
|
+
throw J.delete(t), e;
|
|
395
407
|
});
|
|
396
|
-
return
|
|
408
|
+
return J.set(t, i), i;
|
|
397
409
|
}
|
|
398
410
|
function Q(e) {
|
|
399
411
|
if (!e) return { status: "idle" };
|
|
400
|
-
let t =
|
|
412
|
+
let t = X(e);
|
|
401
413
|
return t ? {
|
|
402
414
|
status: "loaded",
|
|
403
415
|
Component: t
|
|
404
416
|
} : { status: "loading" };
|
|
405
417
|
}
|
|
406
|
-
function
|
|
407
|
-
if (e) return t[e] ?? (n?.has(e) ?
|
|
418
|
+
function pe(e, t, n) {
|
|
419
|
+
if (e) return t[e] ?? (n?.has(e) ? ue : void 0);
|
|
408
420
|
}
|
|
409
421
|
function $(e) {
|
|
410
422
|
let { loader: t, onLoading: n, onLoaded: r, onError: s } = e, [c, l] = o(() => Q(t)), u = a(t), d = a(n), f = a(r), p = a(s);
|
|
@@ -416,20 +428,20 @@ function $(e) {
|
|
|
416
428
|
s
|
|
417
429
|
]), u.current !== t && (u.current = t, l(Q(t))), i(() => {
|
|
418
430
|
if (!t) return;
|
|
419
|
-
if (
|
|
431
|
+
if (X(t)) {
|
|
420
432
|
f.current?.();
|
|
421
433
|
return;
|
|
422
434
|
}
|
|
423
435
|
d.current?.();
|
|
424
436
|
let e = !1;
|
|
425
|
-
return
|
|
437
|
+
return Z(t).then((t) => {
|
|
426
438
|
e || (l({
|
|
427
439
|
status: "loaded",
|
|
428
440
|
Component: t
|
|
429
441
|
}), f.current?.());
|
|
430
442
|
}).catch((t) => {
|
|
431
443
|
if (!e) {
|
|
432
|
-
let e =
|
|
444
|
+
let e = fe(t, "Failed to load component");
|
|
433
445
|
l({
|
|
434
446
|
status: "error",
|
|
435
447
|
error: e
|
|
@@ -440,8 +452,8 @@ function $(e) {
|
|
|
440
452
|
};
|
|
441
453
|
}, [t]), c;
|
|
442
454
|
}
|
|
443
|
-
function
|
|
444
|
-
let { moduleKey: t, modules: n, headlessModuleKeys: r, onModuleLoading: a, onModuleLoaded: s, onError: c } = e, [l, u] = o(void 0), d =
|
|
455
|
+
function me(e) {
|
|
456
|
+
let { moduleKey: t, modules: n, headlessModuleKeys: r, onModuleLoading: a, onModuleLoaded: s, onError: c } = e, [l, u] = o(void 0), d = pe(t, n, r), f = $({
|
|
445
457
|
loader: d,
|
|
446
458
|
onLoading: t ? () => a?.(t) : void 0,
|
|
447
459
|
onLoaded: t ? () => s?.(t) : void 0,
|
|
@@ -469,16 +481,16 @@ function pe(e) {
|
|
|
469
481
|
Component: f.Component
|
|
470
482
|
} : { status: "idle" };
|
|
471
483
|
}
|
|
472
|
-
function
|
|
484
|
+
function he(e) {
|
|
473
485
|
let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = $({ loader: r });
|
|
474
486
|
return r != null && i.status === "loaded";
|
|
475
487
|
}
|
|
476
|
-
function
|
|
488
|
+
function ge(e) {
|
|
477
489
|
typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
|
|
478
490
|
e();
|
|
479
491
|
}) : setTimeout(e, 0);
|
|
480
492
|
}
|
|
481
|
-
function
|
|
493
|
+
function _e(e, t, n, r) {
|
|
482
494
|
let o = a(/* @__PURE__ */ new Set());
|
|
483
495
|
i(() => {
|
|
484
496
|
if (r && t < e.length - 1) {
|
|
@@ -486,7 +498,7 @@ function ge(e, t, n, r) {
|
|
|
486
498
|
if (r && !o.current.has(r)) {
|
|
487
499
|
o.current.add(r);
|
|
488
500
|
let e = n[r];
|
|
489
|
-
e &&
|
|
501
|
+
e && ge(() => {
|
|
490
502
|
e().catch(() => {
|
|
491
503
|
o.current.delete(r);
|
|
492
504
|
});
|
|
@@ -501,4 +513,4 @@ function ge(e, t, n, r) {
|
|
|
501
513
|
]);
|
|
502
514
|
}
|
|
503
515
|
//#endregion
|
|
504
|
-
export { H as _,
|
|
516
|
+
export { H as _, ce as a, A as c, V as d, B as f, z as g, L as h, de as i, N as l, F as m, he as n, W as o, U as p, _e as r, se as s, me as t, R as u, E as v, x as y };
|
|
@@ -5,7 +5,7 @@ import { c as l } from "../hooks-MxHtZWTS.js";
|
|
|
5
5
|
import { t as u } from "../incodeComponent-BoFhgK7G.js";
|
|
6
6
|
import { t as d } from "../transitionSpinner-Di3bOyOu.js";
|
|
7
7
|
import { t as f } from "../incodeModule-BiCoAJ5k.js";
|
|
8
|
-
import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-
|
|
8
|
+
import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-CvivqHRm.js";
|
|
9
9
|
import { resolveWasmConfig as S, upgradeToWasmHttpClient as C, warmupWasm as w } from "@incodetech/core/wasm";
|
|
10
10
|
import { getDeviceClass as T } from "@incodetech/core/device";
|
|
11
11
|
import { bootstrapSession as E, refreshQrUrlUuid as D } from "@incodetech/core/session";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-20260604-
|
|
3
|
+
"version": "0.0.0-dev-20260604-659ac57f",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"qrcode": "^1.5.4",
|
|
256
256
|
"signature_pad": "^5.1.3",
|
|
257
257
|
"tailwindcss": "^4.1.17",
|
|
258
|
-
"@incodetech/core": "0.0.0-dev-20260604-
|
|
258
|
+
"@incodetech/core": "0.0.0-dev-20260604-659ac57f"
|
|
259
259
|
},
|
|
260
260
|
"devDependencies": {
|
|
261
261
|
"@microsoft/api-extractor": "^7.53.3",
|