@incodetech/web 0.0.0-dev-20260330-e91ed6b → 0.0.0-dev-20260331-55774da
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/email/email.es.js +36 -36
- package/dist/id/id.es.js +23 -16
- package/dist/phone/phone.es.js +57 -57
- package/dist/selfie/selfie.es.js +21 -14
- package/package.json +3 -2
package/dist/email/email.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b
|
|
1
|
+
import { b, u as e, I as O, a as C, S as w, B as y } from "../button-B2Ewo0rX.js";
|
|
2
2
|
import { createEmailManager as P } from "@incodetech/core/email";
|
|
3
|
-
import { d as
|
|
3
|
+
import { d as h, y as V } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { O as
|
|
6
|
-
import { P as
|
|
5
|
+
import { O as S } from "../otpInput-CGlYkmvB.js";
|
|
6
|
+
import { P as I } from "../page-DiscPBzz.js";
|
|
7
7
|
import { r as k } from "../incodeModule-C4XIllao.js";
|
|
8
8
|
import "../uiConfig-DmIn-g8M.js";
|
|
9
9
|
import "../typography-zMrvftfB.js";
|
|
@@ -15,7 +15,7 @@ import "../captureOverlay-CB8lyLgp.js";
|
|
|
15
15
|
import "../manualCaptureButton-CUq6VXLb.js";
|
|
16
16
|
import "../captureFooter-B_3eu8kq.js";
|
|
17
17
|
import "../countries-DfLkrF0x.js";
|
|
18
|
-
const
|
|
18
|
+
const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
19
19
|
prefilledEmail: i,
|
|
20
20
|
emailError: s,
|
|
21
21
|
label: m,
|
|
@@ -23,35 +23,35 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
23
23
|
required: n = !1,
|
|
24
24
|
onEmailChange: t
|
|
25
25
|
}) => {
|
|
26
|
-
const { t:
|
|
27
|
-
|
|
26
|
+
const { t: r } = b(), [E, p] = h("");
|
|
27
|
+
V(() => {
|
|
28
28
|
if (i) {
|
|
29
29
|
p(i);
|
|
30
|
-
const a =
|
|
30
|
+
const a = v.test(i.trim());
|
|
31
31
|
t(i.trim(), a);
|
|
32
32
|
}
|
|
33
33
|
}, [i, t]);
|
|
34
|
-
const
|
|
34
|
+
const f = (a) => {
|
|
35
35
|
const d = a.target.value;
|
|
36
36
|
p(d);
|
|
37
|
-
const
|
|
38
|
-
t(
|
|
39
|
-
},
|
|
37
|
+
const l = d.trim(), g = l.length > 0 && v.test(l);
|
|
38
|
+
t(l, g);
|
|
39
|
+
}, o = s ? "email-error" : void 0;
|
|
40
40
|
return /* @__PURE__ */ e("div", { class: "IncodeEmailInput", children: /* @__PURE__ */ e("div", { class: "IncodeEmailInputContainer", children: /* @__PURE__ */ e(
|
|
41
41
|
L,
|
|
42
42
|
{
|
|
43
43
|
id: "email-input",
|
|
44
44
|
type: "email",
|
|
45
|
-
value:
|
|
46
|
-
onInput:
|
|
47
|
-
placeholder:
|
|
45
|
+
value: E,
|
|
46
|
+
onInput: f,
|
|
47
|
+
placeholder: r("email.placeholder"),
|
|
48
48
|
disabled: u,
|
|
49
49
|
required: n,
|
|
50
50
|
label: m,
|
|
51
51
|
"data-testid": "email-input",
|
|
52
52
|
"aria-label": m ? void 0 : "Email address",
|
|
53
53
|
"aria-invalid": s ? "true" : void 0,
|
|
54
|
-
"aria-describedby":
|
|
54
|
+
"aria-describedby": o || void 0,
|
|
55
55
|
autocomplete: "email",
|
|
56
56
|
error: s,
|
|
57
57
|
showErrorIcon: !0
|
|
@@ -63,7 +63,7 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
63
63
|
onFinish: m,
|
|
64
64
|
onError: u
|
|
65
65
|
}) => {
|
|
66
|
-
const { t: n } =
|
|
66
|
+
const { t: n } = b(), [t, r] = C(
|
|
67
67
|
() => {
|
|
68
68
|
if (s) return s;
|
|
69
69
|
if (!i)
|
|
@@ -71,24 +71,24 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
71
71
|
return P({ config: i });
|
|
72
72
|
},
|
|
73
73
|
{ manageLifecycle: !s }
|
|
74
|
-
), [
|
|
74
|
+
), [E, p] = h(!1);
|
|
75
75
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
76
|
-
const
|
|
76
|
+
const o = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.prefilledEmail : void 0, c = t.status === "inputting" && t.emailError ? n(t.emailError) : void 0, d = t.status === "inputting" ? t.otpVerification ?? !1 : !1;
|
|
77
77
|
return /* @__PURE__ */ e(
|
|
78
|
-
|
|
78
|
+
I,
|
|
79
79
|
{
|
|
80
80
|
className: "IncodeEmailPage",
|
|
81
81
|
title: n("otp.enterCodeEmail"),
|
|
82
|
-
subtitle:
|
|
82
|
+
subtitle: d ? n("email.willSendCode") : void 0,
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
85
|
R,
|
|
86
86
|
{
|
|
87
87
|
prefilledEmail: a,
|
|
88
88
|
emailError: c,
|
|
89
|
-
disabled:
|
|
90
|
-
onEmailChange: (
|
|
91
|
-
|
|
89
|
+
disabled: o,
|
|
90
|
+
onEmailChange: (l, g) => {
|
|
91
|
+
r.setEmail(l, g), p(g);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
@@ -96,9 +96,9 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
96
96
|
/* @__PURE__ */ e(
|
|
97
97
|
y,
|
|
98
98
|
{
|
|
99
|
-
onClick: () =>
|
|
100
|
-
disabled: !
|
|
101
|
-
isLoading:
|
|
99
|
+
onClick: () => r.submit(),
|
|
100
|
+
disabled: !E,
|
|
101
|
+
isLoading: o,
|
|
102
102
|
"data-testid": "email-submit",
|
|
103
103
|
children: n("common.continue")
|
|
104
104
|
}
|
|
@@ -108,23 +108,23 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
111
|
-
const
|
|
111
|
+
const o = t.status === "verifyingOtp", a = t.status === "otpError", c = t.status === "awaitingOtp", d = t.status === "resendingOtp";
|
|
112
112
|
return /* @__PURE__ */ e(
|
|
113
|
-
|
|
113
|
+
I,
|
|
114
114
|
{
|
|
115
115
|
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
116
116
|
title: n("otp.enterCodeEmail"),
|
|
117
117
|
children: /* @__PURE__ */ e(
|
|
118
|
-
|
|
118
|
+
S,
|
|
119
119
|
{
|
|
120
120
|
resendTimer: c || a ? t.resendTimer : 0,
|
|
121
121
|
canResend: c || a ? t.canResend : !1,
|
|
122
122
|
error: a ? n(t.otpError) : void 0,
|
|
123
|
-
isLoading:
|
|
124
|
-
disabled: d ||
|
|
125
|
-
onSubmit: (
|
|
126
|
-
onResend: () =>
|
|
127
|
-
onBack: () =>
|
|
123
|
+
isLoading: o,
|
|
124
|
+
disabled: d || o,
|
|
125
|
+
onSubmit: (l) => r.submitOtp(l),
|
|
126
|
+
onResend: () => r.resendOtp(),
|
|
127
|
+
onBack: () => r.back(),
|
|
128
128
|
backLinkText: "otp.changeEmail"
|
|
129
129
|
}
|
|
130
130
|
)
|
|
@@ -137,7 +137,7 @@ const I = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
137
137
|
manager: s,
|
|
138
138
|
onFinish: m,
|
|
139
139
|
onError: u
|
|
140
|
-
}) => /* @__PURE__ */ e(O, { children: i ? /* @__PURE__ */ e(
|
|
140
|
+
}) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
|
|
141
141
|
T,
|
|
142
142
|
{
|
|
143
143
|
config: i,
|
package/dist/id/id.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { u as r, I as u, a as
|
|
2
|
-
import { createIdCaptureManager as
|
|
3
|
-
import { z as c, P as
|
|
1
|
+
import { u as r, I as u, a as d } from "../button-B2Ewo0rX.js";
|
|
2
|
+
import { createIdCaptureManager as m } from "@incodetech/core/id";
|
|
3
|
+
import { z as c, P as p } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { P as
|
|
6
|
-
import { r as
|
|
7
|
-
import { P as
|
|
8
|
-
import { b as
|
|
5
|
+
import { P as f } from "../permissions-DbPRF91z.js";
|
|
6
|
+
import { r as l } from "../incodeModule-C4XIllao.js";
|
|
7
|
+
import { P as h } from "../processing-De8XWnFp.js";
|
|
8
|
+
import { b as C, T as I, F as a, C as g, c as y, I as F } from "../flipAnimation-l8x6CJ9Q.js";
|
|
9
9
|
import "../captureOverlay-CB8lyLgp.js";
|
|
10
10
|
import "../uiConfig-DmIn-g8M.js";
|
|
11
11
|
import "../typography-zMrvftfB.js";
|
|
@@ -19,25 +19,32 @@ const M = c(
|
|
|
19
19
|
onFinish: o,
|
|
20
20
|
onError: i
|
|
21
21
|
}) => {
|
|
22
|
-
const [t, n] =
|
|
23
|
-
() =>
|
|
22
|
+
const [t, n] = d(
|
|
23
|
+
() => {
|
|
24
|
+
if (e) return e;
|
|
25
|
+
if (!s)
|
|
26
|
+
throw new Error(
|
|
27
|
+
"ID capture config is required when no manager is provided"
|
|
28
|
+
);
|
|
29
|
+
return m({ config: s });
|
|
30
|
+
},
|
|
24
31
|
{ manageLifecycle: !e }
|
|
25
32
|
);
|
|
26
|
-
return t.status === "idle" || t.status === "loading" ? null : t.status === "chooser" ? /* @__PURE__ */ r(
|
|
27
|
-
|
|
33
|
+
return t.status === "idle" || t.status === "loading" ? null : t.status === "chooser" ? /* @__PURE__ */ r(C, { manager: n, state: t }) : t.status === "tutorial" ? /* @__PURE__ */ r(I, { manager: n, state: t }) : t.status === "permissions" ? /* @__PURE__ */ r(
|
|
34
|
+
f,
|
|
28
35
|
{
|
|
29
36
|
manager: n,
|
|
30
37
|
permissionStatus: t.permissionStatus
|
|
31
38
|
}
|
|
32
|
-
) : t.status === "frontFinished" ? /* @__PURE__ */ r(a, { manager: n, direction: "toBack" }) : t.status === "backFinished" ? /* @__PURE__ */ r(a, { manager: n, direction: "toFront" }) : t.status === "capture" ? /* @__PURE__ */ r(
|
|
39
|
+
) : t.status === "frontFinished" ? /* @__PURE__ */ r(a, { manager: n, direction: "toBack" }) : t.status === "backFinished" ? /* @__PURE__ */ r(a, { manager: n, direction: "toFront" }) : t.status === "capture" ? /* @__PURE__ */ r(g, { manager: n, state: t, onFinish: () => o?.() }) : t.status === "mandatoryConsent" ? /* @__PURE__ */ r(p, { fallback: null, children: /* @__PURE__ */ r(
|
|
33
40
|
M,
|
|
34
41
|
{
|
|
35
42
|
config: { consentType: t.regulationType },
|
|
36
43
|
onFinish: () => n.acceptMandatoryConsent(),
|
|
37
44
|
onError: () => n.cancelMandatoryConsent()
|
|
38
45
|
}
|
|
39
|
-
) }) : t.status === "processing" ? /* @__PURE__ */ r(
|
|
40
|
-
},
|
|
46
|
+
) }) : t.status === "processing" ? /* @__PURE__ */ r(h, {}) : t.status === "expired" ? /* @__PURE__ */ r(y, { manager: n }) : t.status === "finished" ? (o?.(), null) : t.status === "closed" ? (i?.(void 0), null) : t.status === "error" ? /* @__PURE__ */ r(F, { manager: n, state: t, onError: i }) : null;
|
|
47
|
+
}, E = ({ config: s, manager: e, onFinish: o, onError: i }) => /* @__PURE__ */ r(u, { children: s || e ? /* @__PURE__ */ r(
|
|
41
48
|
P,
|
|
42
49
|
{
|
|
43
50
|
config: s,
|
|
@@ -46,7 +53,7 @@ const M = c(
|
|
|
46
53
|
onError: i
|
|
47
54
|
}
|
|
48
55
|
) : null });
|
|
49
|
-
|
|
56
|
+
l(E, "incode-id");
|
|
50
57
|
export {
|
|
51
|
-
|
|
58
|
+
E as Id
|
|
52
59
|
};
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { u as e, I, b, a as
|
|
2
|
-
import { createPhoneManager as
|
|
3
|
-
import { d as
|
|
1
|
+
import { u as e, I as O, b as C, a as E, S as f, B as v } from "../button-B2Ewo0rX.js";
|
|
2
|
+
import { createPhoneManager as S } from "@incodetech/core/phone";
|
|
3
|
+
import { d as w } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "../uiConfig-DmIn-g8M.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
|
-
import { C as
|
|
7
|
-
import { O as
|
|
6
|
+
import { C as y } from "../checkbox-CXnQVsbJ.js";
|
|
7
|
+
import { O as k } from "../otpInput-CGlYkmvB.js";
|
|
8
8
|
import { P as g } from "../page-DiscPBzz.js";
|
|
9
|
-
import { P as
|
|
10
|
-
import { r as
|
|
11
|
-
const
|
|
12
|
-
config:
|
|
13
|
-
manager:
|
|
14
|
-
onFinish:
|
|
15
|
-
onError:
|
|
9
|
+
import { P as R } from "../phoneInputComposed-Dsf9ZDTj.js";
|
|
10
|
+
import { r as V } from "../incodeModule-C4XIllao.js";
|
|
11
|
+
const B = ({
|
|
12
|
+
config: i,
|
|
13
|
+
manager: s,
|
|
14
|
+
onFinish: d,
|
|
15
|
+
onError: p
|
|
16
16
|
}) => {
|
|
17
|
-
const { t:
|
|
17
|
+
const { t: n } = C(), [t, o] = E(
|
|
18
18
|
() => {
|
|
19
|
-
if (
|
|
20
|
-
if (!
|
|
19
|
+
if (s) return s;
|
|
20
|
+
if (!i)
|
|
21
21
|
throw new Error("Phone config is required");
|
|
22
|
-
return
|
|
22
|
+
return S({ config: i });
|
|
23
23
|
},
|
|
24
|
-
{ manageLifecycle: !
|
|
25
|
-
), [
|
|
24
|
+
{ manageLifecycle: !s }
|
|
25
|
+
), [P, b] = w(!1);
|
|
26
26
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
27
|
-
const r = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US",
|
|
27
|
+
const r = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", u = t.status === "inputting" ? t.prefilledPhone : void 0, l = t.status === "inputting" && t.phoneError ? n(t.phoneError) : void 0, c = t.status === "inputting" ? t.otpVerification ?? !1 : !1, I = t.status === "inputting" ? t.optinEnabled ?? !1 : !1;
|
|
28
28
|
return /* @__PURE__ */ e(
|
|
29
29
|
g,
|
|
30
30
|
{
|
|
31
31
|
className: "IncodePhonePage",
|
|
32
|
-
title:
|
|
33
|
-
subtitle:
|
|
32
|
+
title: n("phone.verify"),
|
|
33
|
+
subtitle: c ? n("email.willSendCode") : void 0,
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ e("div", { class: "IncodePhoneInputContainer", children: [
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
R,
|
|
38
38
|
{
|
|
39
39
|
id: "phone",
|
|
40
40
|
countryCode: a,
|
|
41
|
-
value:
|
|
42
|
-
error:
|
|
41
|
+
value: u,
|
|
42
|
+
error: l,
|
|
43
43
|
disabled: r,
|
|
44
|
-
onChange: (
|
|
45
|
-
o.setPhoneNumber(
|
|
44
|
+
onChange: (m, h) => {
|
|
45
|
+
o.setPhoneNumber(m, h), b(h);
|
|
46
46
|
},
|
|
47
47
|
"data-testid": "phone-input",
|
|
48
48
|
showErrorIcon: !0
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
/* @__PURE__ */ e(f, { size: 16 }),
|
|
52
|
+
I && /* @__PURE__ */ e(
|
|
53
|
+
y,
|
|
54
54
|
{
|
|
55
55
|
id: "phone-optin",
|
|
56
|
-
label:
|
|
56
|
+
label: n("phone.optIn"),
|
|
57
57
|
size: "s",
|
|
58
|
-
onChange: (
|
|
58
|
+
onChange: (m) => o.setOptInGranted(m.target.checked)
|
|
59
59
|
}
|
|
60
60
|
)
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(f, {}),
|
|
63
63
|
/* @__PURE__ */ e(
|
|
64
|
-
|
|
64
|
+
v,
|
|
65
65
|
{
|
|
66
66
|
onClick: () => o.submit(),
|
|
67
|
-
disabled: !
|
|
67
|
+
disabled: !P,
|
|
68
68
|
isLoading: r,
|
|
69
69
|
"data-testid": "phone-submit",
|
|
70
|
-
children:
|
|
70
|
+
children: n("common.continue")
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
]
|
|
@@ -75,37 +75,37 @@ const R = ({
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
78
|
-
const r = t.status === "verifyingOtp", a = t.status === "otpError",
|
|
79
|
-
return /* @__PURE__ */ e(g, { className: "IncodePhonePage", title:
|
|
80
|
-
|
|
78
|
+
const r = t.status === "verifyingOtp", a = t.status === "otpError", u = t.status === "awaitingOtp", l = t.status === "resendingOtp";
|
|
79
|
+
return /* @__PURE__ */ e(g, { className: "IncodePhonePage", title: n("otp.enterCodeSMS"), children: /* @__PURE__ */ e(
|
|
80
|
+
k,
|
|
81
81
|
{
|
|
82
|
-
resendTimer:
|
|
83
|
-
canResend:
|
|
82
|
+
resendTimer: u || a ? t.resendTimer : 0,
|
|
83
|
+
canResend: u || a ? t.canResend : !1,
|
|
84
84
|
isLoading: r,
|
|
85
|
-
disabled:
|
|
86
|
-
error: a ?
|
|
87
|
-
onSubmit: (
|
|
85
|
+
disabled: l || r,
|
|
86
|
+
error: a ? n(t.otpError) : void 0,
|
|
87
|
+
onSubmit: (c) => o.submitOtp(c),
|
|
88
88
|
onResend: () => o.resendOtp(),
|
|
89
89
|
onBack: () => o.back()
|
|
90
90
|
}
|
|
91
91
|
) });
|
|
92
92
|
}
|
|
93
|
-
return t.status === "finished" ? (
|
|
94
|
-
},
|
|
95
|
-
config:
|
|
96
|
-
manager:
|
|
97
|
-
onFinish:
|
|
98
|
-
onError:
|
|
99
|
-
}) => /* @__PURE__ */ e(
|
|
100
|
-
|
|
93
|
+
return t.status === "finished" ? (d?.(), null) : (t.status === "error" && p?.(t.error), null);
|
|
94
|
+
}, L = ({
|
|
95
|
+
config: i,
|
|
96
|
+
manager: s,
|
|
97
|
+
onFinish: d,
|
|
98
|
+
onError: p
|
|
99
|
+
}) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
|
|
100
|
+
B,
|
|
101
101
|
{
|
|
102
|
-
config:
|
|
103
|
-
manager:
|
|
104
|
-
onFinish:
|
|
105
|
-
onError:
|
|
102
|
+
config: i,
|
|
103
|
+
manager: s,
|
|
104
|
+
onFinish: d,
|
|
105
|
+
onError: p
|
|
106
106
|
}
|
|
107
107
|
) : null });
|
|
108
|
-
|
|
108
|
+
V(L, "incode-phone");
|
|
109
109
|
export {
|
|
110
|
-
|
|
110
|
+
L as Phone
|
|
111
111
|
};
|
package/dist/selfie/selfie.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as
|
|
1
|
+
import { u as e, I as u, a } from "../button-B2Ewo0rX.js";
|
|
2
2
|
import { createSelfieManager as l } from "@incodetech/core/selfie";
|
|
3
3
|
import "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "@incodetech/core";
|
|
@@ -7,32 +7,39 @@ import { r as f } from "../incodeModule-C4XIllao.js";
|
|
|
7
7
|
import { P as p } from "../processing-De8XWnFp.js";
|
|
8
8
|
import { T as c, C as d } from "../tutorial-BnO6iyLI.js";
|
|
9
9
|
const g = ({
|
|
10
|
-
config:
|
|
11
|
-
manager:
|
|
10
|
+
config: s,
|
|
11
|
+
manager: t,
|
|
12
12
|
onFinish: n,
|
|
13
13
|
onError: i
|
|
14
14
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
() =>
|
|
17
|
-
|
|
15
|
+
const [r, o] = a(
|
|
16
|
+
() => {
|
|
17
|
+
if (t) return t;
|
|
18
|
+
if (!s)
|
|
19
|
+
throw new Error(
|
|
20
|
+
"Selfie config is required when no manager is provided"
|
|
21
|
+
);
|
|
22
|
+
return l({ config: s });
|
|
23
|
+
},
|
|
24
|
+
{ manageLifecycle: !t }
|
|
18
25
|
);
|
|
19
|
-
return
|
|
26
|
+
return r.status === "idle" || r.status === "loading" ? null : r.status === "tutorial" ? /* @__PURE__ */ e(c, { manager: o }) : r.status === "permissions" ? /* @__PURE__ */ e(
|
|
20
27
|
m,
|
|
21
28
|
{
|
|
22
29
|
manager: o,
|
|
23
|
-
permissionStatus:
|
|
30
|
+
permissionStatus: r.permissionStatus
|
|
24
31
|
}
|
|
25
|
-
) :
|
|
32
|
+
) : r.status === "capture" ? /* @__PURE__ */ e(d, { manager: o, state: r }) : r.status === "processing" ? /* @__PURE__ */ e(p, {}) : r.status === "finished" ? (n?.(), null) : r.status === "closed" ? (i?.(void 0), null) : (r.status === "error" && i?.(r.error), null);
|
|
26
33
|
}, S = ({
|
|
27
|
-
config:
|
|
28
|
-
manager:
|
|
34
|
+
config: s,
|
|
35
|
+
manager: t,
|
|
29
36
|
onFinish: n,
|
|
30
37
|
onError: i
|
|
31
|
-
}) => /* @__PURE__ */
|
|
38
|
+
}) => /* @__PURE__ */ e(u, { children: s || t ? /* @__PURE__ */ e(
|
|
32
39
|
g,
|
|
33
40
|
{
|
|
34
|
-
config:
|
|
35
|
-
manager:
|
|
41
|
+
config: s,
|
|
42
|
+
manager: t,
|
|
36
43
|
onFinish: n,
|
|
37
44
|
onError: i
|
|
38
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260331-55774da",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"preact-markup": "^2.1.1",
|
|
137
137
|
"qrcode": "^1.5.4",
|
|
138
138
|
"tailwindcss": "^4.1.17",
|
|
139
|
-
"@incodetech/core": "0.0.0-dev-
|
|
139
|
+
"@incodetech/core": "0.0.0-dev-20260331-55774da"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@microsoft/api-extractor": "^7.53.3",
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
},
|
|
168
168
|
"scripts": {
|
|
169
169
|
"dev": "vite --host",
|
|
170
|
+
"dev:http": "VITE_DEV_HTTPS=false vite --host",
|
|
170
171
|
"dev:debug": "vite --host --no-open",
|
|
171
172
|
"build:dev": "vite build --watch",
|
|
172
173
|
"build": "vite build",
|