@incodetech/web 0.0.0-dev-20260508-192a29f → 0.0.0-dev-20260508-9f627e9

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.
@@ -484,6 +484,16 @@
484
484
  font-weight: var(--typography-button-m-underlined-weight);
485
485
  line-height: var(--typography-button-m-underlined-line-height);
486
486
  letter-spacing: var(--typography-button-m-underlined-letter-spacing);
487
+ font-family: var(--typography-button-family);
488
+ font-size: var(--typography-button-m-underlined-size);
489
+ font-weight: var(--typography-button-m-underlined-weight);
490
+ line-height: var(--typography-button-m-underlined-line-height);
491
+ letter-spacing: var(--typography-button-m-underlined-letter-spacing);
492
+ font-family: var(--typography-button-family);
493
+ font-size: var(--typography-button-m-underlined-size);
494
+ font-weight: var(--typography-button-m-underlined-weight);
495
+ line-height: var(--typography-button-m-underlined-line-height);
496
+ letter-spacing: var(--typography-button-m-underlined-letter-spacing);
487
497
  text-decoration-line: underline;
488
498
  text-decoration-style: solid;
489
499
  text-decoration-thickness: auto;
@@ -3887,6 +3897,166 @@
3887
3897
  display: flex;
3888
3898
  }
3889
3899
 
3900
+ .IncodeHome {
3901
+ background-color: var(--color-surface-neutral-0, var(--surface-neutral-0));
3902
+ width: 100%;
3903
+ height: 100%;
3904
+ padding-inline: var(--spacing-24, var(--spacing-24, 24px));
3905
+ padding-top: var(--spacing-20, var(--spacing-20, 20px));
3906
+ padding-bottom: var(--spacing-32, var(--spacing-32, 32px));
3907
+ flex-direction: column;
3908
+ display: flex;
3909
+ }
3910
+
3911
+ .IncodeHome .IncodeHomeContent {
3912
+ flex-direction: column;
3913
+ width: 100%;
3914
+ height: 100%;
3915
+ display: flex;
3916
+ }
3917
+
3918
+ .IncodeHome .IncodeHomeHeader {
3919
+ justify-content: space-between;
3920
+ align-items: flex-start;
3921
+ gap: var(--spacing-16, var(--spacing-16, 16px));
3922
+ display: flex;
3923
+ }
3924
+
3925
+ .IncodeHome .IncodeHomeLanguage {
3926
+ flex-direction: column;
3927
+ display: flex;
3928
+ }
3929
+
3930
+ .IncodeHome .IncodeHomeLanguageLabel {
3931
+ margin: var(--spacing-0, var(--spacing-none, 0px));
3932
+ font-family: var(--typography-label-family);
3933
+ font-size: var(--typography-label-m-size);
3934
+ font-weight: var(--typography-label-m-weight);
3935
+ line-height: var(--typography-label-m-line-height);
3936
+ letter-spacing: var(--typography-label-m-letter-spacing);
3937
+ color: var(--color-text-body-primary, var(--text-body-800-primary));
3938
+ }
3939
+
3940
+ .IncodeHome .IncodeHomeLanguageValue {
3941
+ margin: var(--spacing-0, var(--spacing-none, 0px));
3942
+ font-family: var(--typography-body-family);
3943
+ font-size: var(--typography-body-m-regular-size);
3944
+ font-weight: var(--typography-body-m-regular-weight);
3945
+ line-height: var(--typography-body-m-regular-line-height);
3946
+ letter-spacing: var(--typography-body-m-regular-letter-spacing);
3947
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
3948
+ }
3949
+
3950
+ .IncodeHome .IncodeHomeSettingsButton {
3951
+ border-style: var(--tw-border-style);
3952
+ border-width: var(--border-width-none, var(--primitive-border-width-0));
3953
+ --tw-border-style: none;
3954
+ padding: var(--spacing-0, var(--spacing-none, 0px));
3955
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
3956
+ background-color: #0000;
3957
+ border-style: none;
3958
+ justify-content: center;
3959
+ align-items: center;
3960
+ display: flex;
3961
+ }
3962
+
3963
+ .IncodeHome .IncodeHomeSettingsButton:focus-visible {
3964
+ outline: var(--focus-outline-width) solid var(--border-status-focus);
3965
+ outline-offset: var(--focus-outline-offset);
3966
+ }
3967
+
3968
+ .IncodeHome .IncodeHomeCenterSection {
3969
+ text-align: center;
3970
+ flex-direction: column;
3971
+ flex: 1;
3972
+ justify-content: center;
3973
+ align-items: center;
3974
+ display: flex;
3975
+ }
3976
+
3977
+ .IncodeHome .IncodeHomeLogoContainer {
3978
+ width: 100%;
3979
+ max-width: var(--home-logo-container-max-width);
3980
+ justify-content: center;
3981
+ align-items: center;
3982
+ display: flex;
3983
+ }
3984
+
3985
+ .IncodeHome .IncodeHomeLogo {
3986
+ object-fit: contain;
3987
+ width: 100%;
3988
+ max-width: 100%;
3989
+ height: auto;
3990
+ max-height: var(--home-logo-max-height);
3991
+ }
3992
+
3993
+ .IncodeHome .IncodeHomeSubtitle {
3994
+ margin-top: var(--spacing-12, var(--spacing-12, 12px));
3995
+ font-family: var(--typography-headline-family);
3996
+ font-size: var(--typography-headline-h4-size);
3997
+ font-weight: var(--typography-headline-h4-weight);
3998
+ line-height: var(--typography-headline-h4-line-height);
3999
+ letter-spacing: var(--typography-headline-h4-letter-spacing);
4000
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
4001
+ --tw-outline-style: none;
4002
+ outline-style: none;
4003
+ }
4004
+
4005
+ .IncodeHome .IncodeHomeStartButton {
4006
+ margin-top: auto;
4007
+ }
4008
+
4009
+ .IncodeHomeSettingsModal.IncodeModalRoot .IncodeModalDialog {
4010
+ max-width: none;
4011
+ height: 100%;
4012
+ max-height: 100%;
4013
+ }
4014
+
4015
+ .IncodeHomeSettingsModal.IncodeModalRoot .IncodeModalContent {
4016
+ border-radius: var(--radius-none, var(--border-radius-none));
4017
+ max-width: none;
4018
+ height: 100%;
4019
+ padding-inline: var(--spacing-24, var(--spacing-24, 24px));
4020
+ padding-block: var(--spacing-32, var(--spacing-32, 32px));
4021
+ align-items: stretch;
4022
+ }
4023
+
4024
+ .IncodeHomeSettingsModal .IncodeHomeSettingsContainer {
4025
+ flex-direction: column;
4026
+ flex: 1;
4027
+ width: 100%;
4028
+ display: flex;
4029
+ }
4030
+
4031
+ .IncodeHomeSettingsModal .IncodeHomeSettingsBody {
4032
+ flex-direction: column;
4033
+ flex: 1;
4034
+ display: flex;
4035
+ }
4036
+
4037
+ .IncodeHomeSettingsModal .IncodeHomeSettingsTitle {
4038
+ margin: var(--spacing-0, var(--spacing-none, 0px));
4039
+ font-family: var(--typography-headline-family);
4040
+ font-size: var(--typography-headline-h2-size);
4041
+ font-weight: var(--typography-headline-h2-weight);
4042
+ line-height: var(--typography-headline-h2-line-height);
4043
+ letter-spacing: var(--typography-headline-h2-letter-spacing);
4044
+ color: var(--color-text-body-primary, var(--text-body-800-primary));
4045
+ --tw-outline-style: none;
4046
+ outline-style: none;
4047
+ }
4048
+
4049
+ .IncodeHomeSettingsModal .IncodeHomeSettingsFooter {
4050
+ margin-top: var(--spacing-24, var(--spacing-24, 24px));
4051
+ }
4052
+
4053
+ .IncodeHomeSettingsModal .IncodeHomeSettingsBodyContent {
4054
+ flex-direction: row;
4055
+ justify-content: center;
4056
+ align-items: center;
4057
+ display: flex;
4058
+ }
4059
+
3890
4060
  .IncodeVerificationResult .IncodePageContent {
3891
4061
  gap: var(--spacing-16, var(--spacing-16, 16px));
3892
4062
  padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
@@ -1,24 +1,24 @@
1
1
  import { n as e } from "../i18n-D6pCC7RL.js";
2
- import { _ as t, l as n, p as r, v as i } from "../vendor-preact-D6SntenC.js";
3
- import { t as a } from "../uiConfig-CwpQ-IM6.js";
4
- import { o } from "../hooks-BVnGysT7.js";
5
- import { t as s } from "../incodeComponent-BRtpx7iO.js";
2
+ import { _ as t, c as n, l as r, o as i, p as a, v as o } from "../vendor-preact-D6SntenC.js";
3
+ import { t as s } from "../uiConfig-CwpQ-IM6.js";
4
+ import { o as c } from "../hooks-BVnGysT7.js";
5
+ import { t as l } from "../incodeComponent-BRtpx7iO.js";
6
6
  import "../spinner-B4dcie2T.js";
7
- import { t as c } from "../transitionSpinner-DHelnP9m.js";
8
- import { t as l } from "../incodeModule-grHfB1zI.js";
9
- import { a as u, h as d, i as f, o as p, p as m, t as h } from "../useModuleLoader-DR_UitYZ.js";
10
- import { resolveWasmConfig as g, upgradeToWasmHttpClient as _, warmupWasm as v } from "@incodetech/core/wasm";
11
- import { getDeviceClass as y } from "@incodetech/core/device";
12
- import { QrValidationError as b, refreshQrUrlUuid as x } from "@incodetech/core/session";
13
- import { createWorkflowManager as S } from "@incodetech/core/workflow";
7
+ import { t as u } from "../transitionSpinner-DHelnP9m.js";
8
+ import { t as d } from "../incodeModule-grHfB1zI.js";
9
+ import { a as f, h as p, i as m, o as h, p as g, t as _ } from "../useModuleLoader-DR_UitYZ.js";
10
+ import { resolveWasmConfig as v, upgradeToWasmHttpClient as y, warmupWasm as b } from "@incodetech/core/wasm";
11
+ import { getDeviceClass as x } from "@incodetech/core/device";
12
+ import { QrValidationError as S, refreshQrUrlUuid as C } from "@incodetech/core/session";
13
+ import { createWorkflowManager as w } from "@incodetech/core/workflow";
14
14
  //#region src/modules/workflow/workflowInit.ts
15
- var C = {
16
- ...p,
15
+ var T = {
16
+ ...h,
17
17
  REDIRECT_TO_MOBILE: () => import("../redirectToMobile-CDqR2ADA.js").then((e) => e.RedirectToMobile)
18
18
  };
19
- async function w() {
19
+ async function E() {
20
20
  try {
21
- let e = await d();
21
+ let e = await p();
22
22
  return {
23
23
  theme: e,
24
24
  uiConfig: {
@@ -30,87 +30,88 @@ async function w() {
30
30
  return {};
31
31
  }
32
32
  }
33
- function T(e = {}) {
34
- return S({
33
+ function D(e = {}) {
34
+ return w({
35
35
  customModuleCallback: e.customModuleCallback,
36
36
  interviewId: e.interviewId,
37
- isDesktop: e.isDesktop ?? y() === "desktop"
37
+ isDesktop: e.isDesktop ?? x() === "desktop"
38
38
  });
39
39
  }
40
- function E(e) {
40
+ function O(e) {
41
41
  if (e === !1) return;
42
- let t = g({
42
+ let t = v({
43
43
  ...e,
44
44
  pipelines: e?.pipelines ?? ["selfie", "idCapture"]
45
45
  }), n = {
46
46
  ...t,
47
47
  pipelines: t.pipelines ? [...t.pipelines] : void 0
48
48
  };
49
- v(t).then(() => _(n)).catch((e) => {
49
+ b(t).then(() => y(n)).catch((e) => {
50
50
  console.error("Workflow WASM warmup failed:", e);
51
51
  });
52
52
  }
53
53
  //#endregion
54
54
  //#region src/modules/workflow/useWorkflowInitialization.ts
55
- function D(e) {
56
- 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(() => {
57
- let e = T({
55
+ function k(e) {
56
+ let { token: n, lang: i, disableDashboardTheme: o, wasmConfig: c, customModuleCallback: l, interviewId: u, isDesktop: d, urlUuid: f, onError: p, onUrlUuidRefreshed: m } = e, h = r(null), [_, v] = a(() => {
57
+ let e = D({
58
58
  customModuleCallback: l,
59
59
  interviewId: u,
60
60
  isDesktop: d
61
61
  });
62
- return g.current = e, {
62
+ return h.current = e, {
63
63
  status: "initializing",
64
64
  workflowManager: e
65
65
  };
66
- }), y = n(!1);
66
+ }), y = r(!1);
67
67
  return t(() => {
68
68
  if (_.status !== "initializing" || y.current) return;
69
69
  y.current = !0;
70
- let e = g.current, t = new AbortController(), { signal: n } = t;
70
+ let e = h.current, t = new AbortController(), { signal: r } = t;
71
71
  return (async () => {
72
72
  try {
73
- await m({
74
- token: i,
75
- lang: o
76
- }), f && await x({
73
+ await g({
74
+ token: n,
75
+ lang: i
76
+ }), f && await C({
77
77
  urlUuid: f,
78
78
  onboardingId: null,
79
- onRefreshed: h
80
- }, n);
81
- let t = s ? Promise.resolve() : w().then((e) => {
82
- e.uiConfig && a(e.uiConfig);
79
+ onRefreshed: m
80
+ }, r);
81
+ let t = o ? Promise.resolve() : E().then((e) => {
82
+ e.uiConfig && s(e.uiConfig);
83
83
  });
84
- E(c), e.load(), await t, v({
84
+ O(c), e.load(), await t, v({
85
85
  status: "ready",
86
86
  workflowManager: e
87
87
  });
88
88
  } catch (t) {
89
- if (n.aborted) return;
90
- let r = t instanceof Error ? t.message : "Failed to initialize SDK", i = t instanceof b ? t.status : void 0;
89
+ if (r.aborted) return;
90
+ let n = t instanceof Error ? t.message : "Failed to initialize SDK", i = t instanceof S ? t.status : void 0;
91
91
  v({
92
92
  status: "error",
93
- error: r,
93
+ error: n,
94
94
  errorCode: i,
95
95
  workflowManager: e
96
- }), p?.(r, i);
96
+ }), p?.(n, i);
97
97
  }
98
98
  })(), () => {
99
99
  t.abort(), e?.stop();
100
100
  };
101
101
  }, [
102
+ n,
102
103
  i,
103
104
  o,
104
- s,
105
105
  c,
106
106
  f,
107
107
  p,
108
- h
108
+ m
109
109
  ]), _;
110
110
  }
111
111
  //#endregion
112
112
  //#region src/modules/workflow/workflow.tsx
113
- function O(e) {
113
+ var A = n(() => import("../homeScreen-CmsrGndM.js").then((e) => ({ default: e.HomeScreen })));
114
+ function j(e) {
114
115
  let { moduleKey: t, config: n, workflowId: r, authHint: i, lang: a, mergeSessionRecordings: o, ageAssurance: s } = e;
115
116
  switch (t) {
116
117
  case "AUTHENTICATION": return {
@@ -150,32 +151,32 @@ function O(e) {
150
151
  default: return n;
151
152
  }
152
153
  }
153
- var k = ({ config: r, onFinish: a, onError: s }) => {
154
- let { i18n: l } = e(), d = D({
155
- token: r.token,
156
- lang: r.lang,
157
- disableDashboardTheme: r.disableDashboardTheme,
158
- wasmConfig: r.wasmConfig,
159
- customModuleCallback: r.customModuleCallback,
160
- interviewId: r.interviewId,
161
- isDesktop: r.isDesktop,
162
- urlUuid: r.urlUuid,
154
+ var M = ({ config: n, onFinish: a, onError: s }) => {
155
+ let { i18n: l } = e(), d = k({
156
+ token: n.token,
157
+ lang: n.lang,
158
+ disableDashboardTheme: n.disableDashboardTheme,
159
+ wasmConfig: n.wasmConfig,
160
+ customModuleCallback: n.customModuleCallback,
161
+ interviewId: n.interviewId,
162
+ isDesktop: n.isDesktop,
163
+ urlUuid: n.urlUuid,
163
164
  onError: s,
164
- onUrlUuidRefreshed: r.onUrlUuidRefreshed
165
- }), [p, m] = o(() => d.workflowManager, { autoLoad: !1 }), g = h({
165
+ onUrlUuidRefreshed: n.onUrlUuidRefreshed
166
+ }), [p, h] = c(() => d.workflowManager, { autoLoad: !1 }), g = _({
166
167
  moduleKey: p?.status === "ready" ? p.currentNode.moduleKey : void 0,
167
- modules: C,
168
- headlessModuleKeys: f,
169
- onModuleLoading: r.onModuleLoading,
170
- onModuleLoaded: r.onModuleLoaded,
168
+ modules: T,
169
+ headlessModuleKeys: m,
170
+ onModuleLoading: n.onModuleLoading,
171
+ onModuleLoaded: n.onModuleLoaded,
171
172
  onError: s
172
173
  });
173
174
  t(() => {
174
- r.lang && l.language !== r.lang && l.changeLanguage(r.lang);
175
- }, [r.lang, l]);
176
- let _ = n(!1);
175
+ n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
176
+ }, [n.lang, l]);
177
+ let v = r(!1);
177
178
  t(() => {
178
- _.current || (p?.status === "finished" ? (_.current = !0, a?.(p.finishStatus)) : p?.status === "asyncResolution" && (_.current = !0, a?.()));
179
+ v.current || (p?.status === "finished" ? (v.current = !0, a?.(p.finishStatus)) : p?.status === "asyncResolution" && (v.current = !0, a?.()));
179
180
  }, [
180
181
  p?.status,
181
182
  a,
@@ -187,49 +188,60 @@ var k = ({ config: r, onFinish: a, onError: s }) => {
187
188
  s,
188
189
  p
189
190
  ]);
190
- let v = !(r.spinnerConfig?.title || r.spinnerConfig?.subtitle), y = () => /* @__PURE__ */ i("div", {
191
+ let y = !(n.spinnerConfig?.title || n.spinnerConfig?.subtitle), b = () => /* @__PURE__ */ o("div", {
191
192
  class: "IncodeWorkflow",
192
- children: /* @__PURE__ */ i(c, {
193
- spinnerConfig: r.spinnerConfig,
194
- hideText: v
193
+ children: /* @__PURE__ */ o(u, {
194
+ spinnerConfig: n.spinnerConfig,
195
+ hideText: y
195
196
  })
196
- }), b = (e) => {
197
- m.errorModule(e ?? "Module error"), s?.(e ?? "Module error");
197
+ }), x = (e) => {
198
+ h.errorModule(e ?? "Module error"), s?.(e ?? "Module error");
198
199
  };
199
200
  if (d.status === "error") return null;
200
- if (d.status === "initializing" || !p || p.status === "idle" || p.status === "loading") return y();
201
+ if (d.status === "initializing") return b();
202
+ if (p && "homeScreen" in p && p.homeScreen.visible) return /* @__PURE__ */ o("div", {
203
+ class: "IncodeWorkflow",
204
+ children: /* @__PURE__ */ o(i, {
205
+ fallback: null,
206
+ children: /* @__PURE__ */ o(A, {
207
+ isContinueLoading: p.homeScreen.isContinueLoading,
208
+ onContinue: () => h.continueFromHome()
209
+ })
210
+ })
211
+ });
212
+ if (!p || p.status === "idle" || p.status === "loading") return b();
201
213
  if (p.status === "finished" || p.status === "error" || p.status === "asyncResolution" || p.status === "closed") return null;
202
- if (g.status === "unsupported") return /* @__PURE__ */ i("div", {
214
+ if (g.status === "unsupported") return /* @__PURE__ */ o("div", {
203
215
  class: "IncodeWorkflow",
204
- children: /* @__PURE__ */ i(u, {
216
+ children: /* @__PURE__ */ o(f, {
205
217
  moduleKey: p.currentNode.moduleKey,
206
- onNext: () => m.completeModule()
218
+ onNext: () => h.completeModule()
207
219
  })
208
220
  });
209
- if (g.status === "idle" || g.status === "loading" || g.status === "error") return y();
210
- let { Component: x } = g;
211
- return /* @__PURE__ */ i("div", {
221
+ if (g.status === "idle" || g.status === "loading" || g.status === "error") return b();
222
+ let { Component: S } = g;
223
+ return /* @__PURE__ */ o("div", {
212
224
  class: "IncodeWorkflow",
213
- children: /* @__PURE__ */ i(x, {
214
- config: O({
225
+ children: /* @__PURE__ */ o(S, {
226
+ config: j({
215
227
  moduleKey: p.currentNode.moduleKey,
216
228
  config: p.config,
217
229
  workflowId: p.workflowConfig.id,
218
- authHint: r.authHint,
219
- lang: r.lang,
230
+ authHint: n.authHint,
231
+ lang: n.lang,
220
232
  mergeSessionRecordings: p.workflowConfig.mergeSessionRecordings,
221
233
  ageAssurance: p.workflowConfig.ageAssurance
222
234
  }),
223
- onFinish: () => m.completeModule(),
224
- onError: b,
225
- ...p.currentNode.moduleKey === "REDIRECT_TO_MOBILE" ? { onContinue: () => m.completeModule() } : {}
235
+ onFinish: () => h.completeModule(),
236
+ onError: x,
237
+ ...p.currentNode.moduleKey === "REDIRECT_TO_MOBILE" ? { onContinue: () => h.completeModule() } : {}
226
238
  }, p.currentNode.id)
227
239
  });
228
- }, A = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ i(s, { children: e ? /* @__PURE__ */ i(k, {
240
+ }, N = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(M, {
229
241
  config: e,
230
242
  onFinish: t,
231
243
  onError: n
232
244
  }) : null });
233
- l(A, "incode-workflow");
245
+ d(N, "incode-workflow");
234
246
  //#endregion
235
- export { A as IncodeWorkflow };
247
+ export { N as IncodeWorkflow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260508-192a29f",
3
+ "version": "0.0.0-dev-20260508-9f627e9",
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-20260508-192a29f"
242
+ "@incodetech/core": "0.0.0-dev-20260508-9f627e9"
243
243
  },
244
244
  "devDependencies": {
245
245
  "@microsoft/api-extractor": "^7.53.3",