@levo-so/site-runtime 0.3.20 → 0.3.21
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/BillingStep-ByiYjJ0S.js +251 -0
- package/BookingCard-DdwLHVGw.js +816 -0
- package/CollectionLabel-CmUFfc_7.js +35 -0
- package/DateTimeWidget-Bk2tk_CT.js +254 -0
- package/{KBChatWidget-BMuZ-VI3.js → KBChatWidget-BXRRgelS.js} +1 -1
- package/{PhoneWidget-DPECohGT.js → PhoneWidget-FWE3jD_L.js} +3 -5
- package/{Popover-Cr0-X_ch.js → Popover-MSrVDAzg.js} +7 -7
- package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
- package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
- package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
- package/{RichTextWidget-C1QECDcg.js → RichTextWidget-KnIKESAD.js} +134 -135
- package/{RteThemeProvider-CMbSaFRQ.js → RteThemeProvider-DtTXGcCT.js} +2 -3
- package/Sonner-BsE4Y_t4.js +21 -0
- package/blog-content.js +8 -9
- package/dist-BVFCdirT.js +4471 -0
- package/dist-DEXGyFeH.js +376 -0
- package/index.js +12 -13
- package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
- package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
- package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
- package/{kbChat-DtZ4vuCZ.js → kbChat-eFsau7hG.js} +2 -2
- package/package.json +23 -23
- package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
- package/popups.js +1 -1
- package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
- package/script.esm-uVCZU25S.js +62 -0
- package/start.js +1 -1
- package/styles.css +1 -1
- package/theme.cssm-iXnQwMCp.js +238 -0
- package/CollectionField-DCAXOmBN.js +0 -270
- package/CollectionInput-BJ__qcbk.js +0 -147
- package/DateTimeWidget-I0LvR-tO.js +0 -255
- package/Dialog-D-vRkU9N.js +0 -130
- package/LevoProvider-BkbKrvrI.js +0 -20
- package/PopupBody-BI-MJqmd-a-l3CaKZ.js +0 -159
- package/PopupRenderer-D66Gx63H-DpcNpbtU.js +0 -388
- package/ThemeProvider-DlFehjh1.js +0 -116
- package/Tooltip-BKQ5rIDh.js +0 -67
- package/VerifyButton-D0cj9Z5Q.js +0 -192
- package/createThemeExtension-4AUn51iJ.js +0 -15
- package/dist-IxiGbP-3.js +0 -3783
- package/dist-_lwl0kZw.js +0 -79
- package/inlineBaseTheme-BB9e6h5f.js +0 -9
- package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
- package/react-B9yvlbH0.js +0 -74
- package/theme.cssm-DUzmx76l.js +0 -4
- package/usePopupRedirect-CAAdcpaW-BDa44PXN.js +0 -82
- /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
- /package/{es-CGQflL9T.js → es-CK20DkgT.js} +0 -0
- /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
- /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
- /package/{script.esm-wR2d7rrv.js → script.esm-D4nvz3-k.js} +0 -0
package/dist-_lwl0kZw.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import { t } from "./LevoProvider-BkbKrvrI.js";
|
|
3
|
-
import { a as n, c as r, i, l as a, o, t as s, u as c } from "./popupState-JmpeKzgM-D_77LiAa.js";
|
|
4
|
-
import { t as l } from "./react-B9yvlbH0.js";
|
|
5
|
-
import { c as u } from "react/compiler-runtime";
|
|
6
|
-
import { Suspense as d, lazy as f, useEffect as p, useRef as m, useState as h } from "react";
|
|
7
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
8
|
-
import { $isIdentityContextReady as _ } from "@levo-so/insights/stores";
|
|
9
|
-
//#region ../../libraries/popups/dist/index.js
|
|
10
|
-
var v = /* @__PURE__ */ e({
|
|
11
|
-
PopupLoader: () => x,
|
|
12
|
-
fetchActivePopups: () => y,
|
|
13
|
-
usePopup: () => C
|
|
14
|
-
}), y = async (e, t) => {
|
|
15
|
-
let n = {};
|
|
16
|
-
return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
|
|
17
|
-
}, b = f(() => import("./PopupRenderer-D66Gx63H-DpcNpbtU.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), x = (e) => {
|
|
18
|
-
let n = u(9), { siteId: r, pageId: i } = e, { fetch: a, logger: s } = t(), [c, l] = h(null), f = m(!1), v, x;
|
|
19
|
-
if (n[0] !== a || n[1] !== s || n[2] !== r ? (v = () => {
|
|
20
|
-
if (f.current) return;
|
|
21
|
-
let e = () => {
|
|
22
|
-
f.current || (f.current = !0, y(a, r ? { site_id: r } : void 0).then((e) => {
|
|
23
|
-
o(e), l(e);
|
|
24
|
-
}).catch((e) => {
|
|
25
|
-
s?.error("Failed to fetch popups", { exception: e }), o([]), l([]);
|
|
26
|
-
}).finally(S));
|
|
27
|
-
};
|
|
28
|
-
if (_.get()) {
|
|
29
|
-
e();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
let t = _.listen((n) => {
|
|
33
|
-
n && (t(), e());
|
|
34
|
-
});
|
|
35
|
-
return () => t();
|
|
36
|
-
}, x = [
|
|
37
|
-
a,
|
|
38
|
-
s,
|
|
39
|
-
r
|
|
40
|
-
], n[0] = a, n[1] = s, n[2] = r, n[3] = v, n[4] = x) : (v = n[3], x = n[4]), p(v, x), !c || c.length === 0) return null;
|
|
41
|
-
let C;
|
|
42
|
-
n[5] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
43
|
-
position: "relative",
|
|
44
|
-
zIndex: 99999
|
|
45
|
-
}, n[5] = C) : C = n[5];
|
|
46
|
-
let w;
|
|
47
|
-
return n[6] !== i || n[7] !== c ? (w = /* @__PURE__ */ g("div", {
|
|
48
|
-
style: C,
|
|
49
|
-
children: /* @__PURE__ */ g(d, { children: /* @__PURE__ */ g(b, {
|
|
50
|
-
popups: c,
|
|
51
|
-
pageId: i
|
|
52
|
-
}) })
|
|
53
|
-
}), n[6] = i, n[7] = c, n[8] = w) : w = n[8], w;
|
|
54
|
-
};
|
|
55
|
-
function S() {
|
|
56
|
-
return a(!1);
|
|
57
|
-
}
|
|
58
|
-
var C = () => {
|
|
59
|
-
let e = u(3), t = l(n), r = l(c), i = w, a = T, o;
|
|
60
|
-
return e[0] !== r || e[1] !== t ? (o = {
|
|
61
|
-
popups: t,
|
|
62
|
-
isLoading: r,
|
|
63
|
-
openPopup: i,
|
|
64
|
-
closePopup: a
|
|
65
|
-
}, e[0] = r, e[1] = t, e[2] = o) : o = e[2], o;
|
|
66
|
-
};
|
|
67
|
-
function w(e) {
|
|
68
|
-
let t = n.get().find((t) => t.id === e);
|
|
69
|
-
t && s(t, {
|
|
70
|
-
force: !0,
|
|
71
|
-
trigger_type: "manual"
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function T() {
|
|
75
|
-
let e = i.get().active_popup_id;
|
|
76
|
-
e && r(e);
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
export { v as n, C as t };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./createThemeExtension-4AUn51iJ.js";
|
|
2
|
-
import { n as t, t as n } from "./themeVars.cssm-ByhhC2Jm.js";
|
|
3
|
-
//#region ../../libraries/levocn/dist/styles/inlineBaseTheme.js
|
|
4
|
-
var r = e(n), i = (e) => e ? e.radius && !e.radiusScale ? r({
|
|
5
|
-
...e,
|
|
6
|
-
radiusScale: t(e.radius)
|
|
7
|
-
}) : r(e) : {};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { i as t };
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/clean-stores/index.js
|
|
2
|
-
var e = Symbol("clean"), t = [], n = 0, r = 4, i = 0, a = (a) => {
|
|
3
|
-
let o = [], s = {
|
|
4
|
-
get() {
|
|
5
|
-
return s.lc || s.listen(() => {})(), s.value;
|
|
6
|
-
},
|
|
7
|
-
lc: 0,
|
|
8
|
-
listen(e) {
|
|
9
|
-
return s.lc = o.push(e), () => {
|
|
10
|
-
for (let i = n + r; i < t.length;) t[i] === e ? t.splice(i, r) : i += r;
|
|
11
|
-
let i = o.indexOf(e);
|
|
12
|
-
~i && (o.splice(i, 1), --s.lc || s.off());
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
notify(e, a) {
|
|
16
|
-
i++;
|
|
17
|
-
let c = !t.length;
|
|
18
|
-
for (let n of o) t.push(n, s.value, e, a);
|
|
19
|
-
if (c) {
|
|
20
|
-
for (n = 0; n < t.length; n += r) t[n](t[n + 1], t[n + 2], t[n + 3]);
|
|
21
|
-
t.length = 0;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
off() {},
|
|
25
|
-
set(e) {
|
|
26
|
-
let t = s.value;
|
|
27
|
-
t !== e && (s.value = e, s.notify(t));
|
|
28
|
-
},
|
|
29
|
-
subscribe(e) {
|
|
30
|
-
let t = s.listen(e);
|
|
31
|
-
return e(s.value), t;
|
|
32
|
-
},
|
|
33
|
-
value: a
|
|
34
|
-
};
|
|
35
|
-
return process.env.NODE_ENV !== "production" && (s[e] = () => {
|
|
36
|
-
o = [], s.lc = 0, s.off();
|
|
37
|
-
}), s;
|
|
38
|
-
}, o = 5, s = 6, c = 10, l = (e, t, n, r) => (e.events = e.events || {}, e.events[n + c] || (e.events[n + c] = r((t) => {
|
|
39
|
-
e.events[n].reduceRight((e, t) => (t(e), e), {
|
|
40
|
-
shared: {},
|
|
41
|
-
...t
|
|
42
|
-
});
|
|
43
|
-
})), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
|
|
44
|
-
let r = e.events[n], i = r.indexOf(t);
|
|
45
|
-
r.splice(i, 1), r.length || (delete e.events[n], e.events[n + c](), delete e.events[n + c]);
|
|
46
|
-
}), u = 1e3, d = (t, n) => l(t, (e) => {
|
|
47
|
-
let r = n(e);
|
|
48
|
-
r && t.events[s].push(r);
|
|
49
|
-
}, o, (n) => {
|
|
50
|
-
let r = t.listen;
|
|
51
|
-
t.listen = (...e) => (!t.lc && !t.active && (t.active = !0, n()), r(...e));
|
|
52
|
-
let i = t.off;
|
|
53
|
-
if (t.events[s] = [], t.off = () => {
|
|
54
|
-
i(), setTimeout(() => {
|
|
55
|
-
if (t.active && !t.lc) {
|
|
56
|
-
t.active = !1;
|
|
57
|
-
for (let e of t.events[s]) e();
|
|
58
|
-
t.events[s] = [];
|
|
59
|
-
}
|
|
60
|
-
}, u);
|
|
61
|
-
}, process.env.NODE_ENV !== "production") {
|
|
62
|
-
let n = t[e];
|
|
63
|
-
t[e] = () => {
|
|
64
|
-
for (let e of t.events[s]) e();
|
|
65
|
-
t.events[s] = [], t.active = !1, n();
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return () => {
|
|
69
|
-
t.listen = r, t.off = i;
|
|
70
|
-
};
|
|
71
|
-
}), f = (e, t, n) => {
|
|
72
|
-
Array.isArray(e) || (e = [e]);
|
|
73
|
-
let r, o, s = () => {
|
|
74
|
-
if (o === i) return;
|
|
75
|
-
o = i;
|
|
76
|
-
let n = e.map((e) => e.get());
|
|
77
|
-
if (!r || n.some((e, t) => e !== r[t])) {
|
|
78
|
-
r = n;
|
|
79
|
-
let e = t(...n);
|
|
80
|
-
e && e.then && e.t ? e.then((e) => {
|
|
81
|
-
r === n && c.set(e);
|
|
82
|
-
}) : (c.set(e), o = i);
|
|
83
|
-
}
|
|
84
|
-
}, c = a(void 0), l = c.get;
|
|
85
|
-
c.get = () => (s(), l());
|
|
86
|
-
let u, f = n ? () => {
|
|
87
|
-
clearTimeout(u), u = setTimeout(s);
|
|
88
|
-
} : s;
|
|
89
|
-
return d(c, () => {
|
|
90
|
-
let t = e.map((e) => e.listen(f));
|
|
91
|
-
return s(), () => {
|
|
92
|
-
for (let e of t) e();
|
|
93
|
-
};
|
|
94
|
-
}), c;
|
|
95
|
-
}, p = (e, t) => f(e, t), m = (e) => e, h = {}, g = {
|
|
96
|
-
addEventListener() {},
|
|
97
|
-
removeEventListener() {}
|
|
98
|
-
};
|
|
99
|
-
function _() {
|
|
100
|
-
try {
|
|
101
|
-
return typeof localStorage < "u";
|
|
102
|
-
} catch {
|
|
103
|
-
return !1;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
_() && (h = localStorage), typeof window < "u" && (g = {
|
|
107
|
-
addEventListener(e, t, n) {
|
|
108
|
-
window.addEventListener("storage", t), window.addEventListener("pageshow", n);
|
|
109
|
-
},
|
|
110
|
-
removeEventListener(e, t, n) {
|
|
111
|
-
window.removeEventListener("storage", t), window.removeEventListener("pageshow", n);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
function v(e, t = void 0, n = {}) {
|
|
115
|
-
let r = n.encode || m, i = n.decode || m, o = h[e], s = a(e in h ? i(o) : t), c = s.set;
|
|
116
|
-
s.set = (t) => {
|
|
117
|
-
o = r(t), o === void 0 ? delete h[e] : h[e] = o, c(t);
|
|
118
|
-
};
|
|
119
|
-
function l(n) {
|
|
120
|
-
n.key === e ? n.newValue === null ? c(t) : c(i(n.newValue)) : h[e] || c(t);
|
|
121
|
-
}
|
|
122
|
-
function u() {
|
|
123
|
-
o !== h[e] && s.set(e in h ? i(h[e]) : t);
|
|
124
|
-
}
|
|
125
|
-
return d(s, () => {
|
|
126
|
-
if (u(), n.listen !== !1) return g.addEventListener(e, l, u), () => {
|
|
127
|
-
g.removeEventListener(e, l, u);
|
|
128
|
-
};
|
|
129
|
-
}), s;
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region ../../libraries/popups/dist/popupState-JmpeKzgM.js
|
|
133
|
-
var y = 6e4, b = "lv_popups_session", x = {
|
|
134
|
-
active_popup_id: null,
|
|
135
|
-
shown_popup_ids: [],
|
|
136
|
-
last_closed_at: null
|
|
137
|
-
}, S = v("lv_popups_state", {}, {
|
|
138
|
-
encode: JSON.stringify,
|
|
139
|
-
decode: JSON.parse
|
|
140
|
-
}), C = (e) => {
|
|
141
|
-
if (!e) return x;
|
|
142
|
-
try {
|
|
143
|
-
return {
|
|
144
|
-
...JSON.parse(e),
|
|
145
|
-
active_popup_id: null
|
|
146
|
-
};
|
|
147
|
-
} catch {
|
|
148
|
-
return x;
|
|
149
|
-
}
|
|
150
|
-
}, w = a((() => {
|
|
151
|
-
if (typeof sessionStorage > "u") return x;
|
|
152
|
-
try {
|
|
153
|
-
return C(sessionStorage.getItem(b));
|
|
154
|
-
} catch {
|
|
155
|
-
return x;
|
|
156
|
-
}
|
|
157
|
-
})()), T = w.set;
|
|
158
|
-
w.set = (e) => {
|
|
159
|
-
T(e);
|
|
160
|
-
try {
|
|
161
|
-
sessionStorage.setItem(b, JSON.stringify(e));
|
|
162
|
-
} catch {}
|
|
163
|
-
};
|
|
164
|
-
var E = p([w, S], (e, t) => ({
|
|
165
|
-
active_popup_id: e.active_popup_id,
|
|
166
|
-
shown_popup_ids: e.shown_popup_ids,
|
|
167
|
-
last_closed_at: e.last_closed_at,
|
|
168
|
-
previous_popups: t
|
|
169
|
-
})), D = a([]), O = (e) => {
|
|
170
|
-
D.set(e);
|
|
171
|
-
}, k = a(!0), A = (e) => {
|
|
172
|
-
k.set(e);
|
|
173
|
-
}, j = () => E.get(), M = (e, t) => e.includes(t) ? e : [...e, t], N = "manual", P = () => N, F = null, I = () => F, L = [], R = null, z = () => {
|
|
174
|
-
if (R) return;
|
|
175
|
-
let { last_closed_at: e } = w.get();
|
|
176
|
-
if (!e) return;
|
|
177
|
-
let t = y - (Date.now() - e);
|
|
178
|
-
if (t <= 0) {
|
|
179
|
-
B();
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
R = setTimeout(() => {
|
|
183
|
-
R = null, B();
|
|
184
|
-
}, t);
|
|
185
|
-
}, B = () => {
|
|
186
|
-
let e = w.get();
|
|
187
|
-
if (!e.active_popup_id) {
|
|
188
|
-
if (e.last_closed_at && Date.now() - e.last_closed_at < 6e4) {
|
|
189
|
-
z();
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
for (; L.length > 0;) {
|
|
193
|
-
let e = L.shift();
|
|
194
|
-
if (U(e.popup, { trigger_type: e.trigger_type })) return;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}, V = (e, t) => {
|
|
198
|
-
L.some((t) => t.popup.id === e.id) || (L.push({
|
|
199
|
-
popup: e,
|
|
200
|
-
trigger_type: t
|
|
201
|
-
}), z());
|
|
202
|
-
}, H = (e, t) => {
|
|
203
|
-
let n = j();
|
|
204
|
-
if (t?.type === "always") return !n.shown_popup_ids.includes(e);
|
|
205
|
-
let r = n.previous_popups[e];
|
|
206
|
-
return r ? !t || t.type === "once" ? !1 : t.type === "interval" && t.interval_ms ? Date.now() - r.triggered_at >= t.interval_ms : !0 : !0;
|
|
207
|
-
}, U = (e, t = {}) => {
|
|
208
|
-
let { force: n = !1, trigger_type: r = "manual" } = t, i = e.id, a = e.settings?.display_frequency, o = w.get();
|
|
209
|
-
return o.active_popup_id === i ? !0 : !n && (o.active_popup_id || o.last_closed_at && Date.now() - o.last_closed_at < 6e4 || !H(i, a)) ? !1 : (R &&= (clearTimeout(R), null), N = r, F = Date.now(), w.set({
|
|
210
|
-
active_popup_id: i,
|
|
211
|
-
shown_popup_ids: M(o.shown_popup_ids, i),
|
|
212
|
-
last_closed_at: o.last_closed_at
|
|
213
|
-
}), a?.type !== "always" && S.set({
|
|
214
|
-
...S.get(),
|
|
215
|
-
[i]: { triggered_at: Date.now() }
|
|
216
|
-
}), !0);
|
|
217
|
-
}, W = (e, t = {}) => {
|
|
218
|
-
let { trigger_type: n = "manual" } = t;
|
|
219
|
-
return U(e, { trigger_type: n }) ? !0 : (H(e.id, e.settings?.display_frequency) && V(e, n), !1);
|
|
220
|
-
}, G = (e) => {
|
|
221
|
-
let t = w.get();
|
|
222
|
-
t.active_popup_id === e && (N = "manual", F = null, w.set({
|
|
223
|
-
...t,
|
|
224
|
-
active_popup_id: null,
|
|
225
|
-
last_closed_at: Date.now()
|
|
226
|
-
}), setTimeout(B, 0));
|
|
227
|
-
};
|
|
228
|
-
//#endregion
|
|
229
|
-
export { D as a, G as c, E as d, P as f, w as i, A as l, W as n, O as o, I as r, j as s, U as t, k as u };
|
package/react-B9yvlbH0.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./inlineBaseTheme-BB9e6h5f.js";
|
|
2
|
-
import { useCallback as t, useRef as n, useSyncExternalStore as r } from "react";
|
|
3
|
-
//#region ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/listen-keys/index.js
|
|
4
|
-
function i(e, t, n) {
|
|
5
|
-
let r = new Set(t).add(void 0);
|
|
6
|
-
return e.listen((e, t, i) => {
|
|
7
|
-
r.has(i) && n(e, t, i);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region ../../libraries/popups/dist/themeMapping-Bi9Rcr5G.js
|
|
12
|
-
var a = (e) => {
|
|
13
|
-
if (e == null) return;
|
|
14
|
-
if (typeof e == "string") return e;
|
|
15
|
-
if (typeof e != "object") return;
|
|
16
|
-
let t = e;
|
|
17
|
-
if (typeof t.l != "number" || typeof t.c != "number" || typeof t.h != "number") return;
|
|
18
|
-
let n = (e) => Math.round(e * 1e4) / 1e4, r = n(t.l), i = n(t.c), a = n(t.h), o = typeof t.alpha == "number" ? n(t.alpha) : 1;
|
|
19
|
-
return o < 1 ? `oklch(${r} ${i} ${a} / ${o})` : `oklch(${r} ${i} ${a})`;
|
|
20
|
-
}, o = (e) => {
|
|
21
|
-
let t = e.colors;
|
|
22
|
-
return !t || typeof t != "object" ? !1 : Object.values(t).some((e) => e != null);
|
|
23
|
-
}, s = (e) => {
|
|
24
|
-
if (!e || !o(e)) return null;
|
|
25
|
-
let t = e.colors, n = t?.brand ?? {}, r = e.fonts, i = e.sizes;
|
|
26
|
-
return {
|
|
27
|
-
colors: {
|
|
28
|
-
brand: {
|
|
29
|
-
main: a(n.main) ?? "",
|
|
30
|
-
foreground: a(n.foreground) ?? ""
|
|
31
|
-
},
|
|
32
|
-
text1: a(t.text1) ?? "",
|
|
33
|
-
text2: a(t.text2) ?? "",
|
|
34
|
-
page: a(t.page) ?? "",
|
|
35
|
-
border: a(t.border) ?? ""
|
|
36
|
-
},
|
|
37
|
-
fonts: {
|
|
38
|
-
heading: r?.heading ?? "inherit",
|
|
39
|
-
body: r?.body ?? "inherit"
|
|
40
|
-
},
|
|
41
|
-
sizes: { radius: i?.radius ?? "4px" }
|
|
42
|
-
};
|
|
43
|
-
}, c = (e) => {
|
|
44
|
-
if (e) return {
|
|
45
|
-
colors: {
|
|
46
|
-
primary: e.colors?.brand?.main,
|
|
47
|
-
primaryForeground: e.colors?.brand?.foreground,
|
|
48
|
-
foreground: e.colors?.text1,
|
|
49
|
-
text: e.colors?.text1,
|
|
50
|
-
heading: e.colors?.text1,
|
|
51
|
-
mutedForeground: e.colors?.text2,
|
|
52
|
-
background: e.colors?.page,
|
|
53
|
-
card: e.colors?.page,
|
|
54
|
-
cardForeground: e.colors?.text1,
|
|
55
|
-
popover: e.colors?.page,
|
|
56
|
-
popoverForeground: e.colors?.text1,
|
|
57
|
-
border: e.colors?.border,
|
|
58
|
-
input: e.colors?.page,
|
|
59
|
-
inputForeground: e.colors?.text1
|
|
60
|
-
},
|
|
61
|
-
fonts: e.fonts,
|
|
62
|
-
radius: e.sizes?.radius
|
|
63
|
-
};
|
|
64
|
-
}, l = (t) => e(c(t)), u = (e, t) => (n) => {
|
|
65
|
-
e.current !== n && (e.current = n, t());
|
|
66
|
-
};
|
|
67
|
-
function d(e, { keys: a, deps: o = [e, a] } = {}) {
|
|
68
|
-
let s = n();
|
|
69
|
-
s.current = e.get();
|
|
70
|
-
let c = t((t) => (u(s, t)(e.value), a?.length > 0 ? i(e, a, u(s, t)) : e.listen(u(s, t))), o), l = () => s.current;
|
|
71
|
-
return r(c, l, l);
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
export { l as n, s as r, d as t };
|
package/theme.cssm-DUzmx76l.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { c as e, f as t, r as n, s as r } from "./popupState-JmpeKzgM-D_77LiAa.js";
|
|
2
|
-
import { c as i } from "react/compiler-runtime";
|
|
3
|
-
import { createContext as a, useContext as o } from "react";
|
|
4
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
-
import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
-
//#region ../../libraries/popups/dist/rolldown-runtime-CAFD8bLK.js
|
|
7
|
-
var l = Object.defineProperty, u = (e, t) => {
|
|
8
|
-
let n = {};
|
|
9
|
-
for (var r in e) l(n, r, {
|
|
10
|
-
get: e[r],
|
|
11
|
-
enumerable: !0
|
|
12
|
-
});
|
|
13
|
-
return t || l(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
14
|
-
}, d = c({
|
|
15
|
-
defaultClassName: "_1gklknd4",
|
|
16
|
-
variantClassNames: {
|
|
17
|
-
placement: {
|
|
18
|
-
popup: "_1gklknd5",
|
|
19
|
-
slide_in: "_1gklknd6"
|
|
20
|
-
},
|
|
21
|
-
position: {
|
|
22
|
-
"top-left": "_1gklknd7",
|
|
23
|
-
"top-right": "_1gklknd8",
|
|
24
|
-
"bottom-left": "_1gklknd9",
|
|
25
|
-
"bottom-right": "_1gklknda"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: { placement: "popup" },
|
|
29
|
-
compoundVariants: []
|
|
30
|
-
}), f = "_1gklkndb", p = "_1gklkndc", m = c({
|
|
31
|
-
defaultClassName: "_1gklknde",
|
|
32
|
-
variantClassNames: { size: {
|
|
33
|
-
small: "_1gklkndf",
|
|
34
|
-
medium: "_1gklkndg",
|
|
35
|
-
large: "_1gklkndh",
|
|
36
|
-
xlarge: "_1gklkndi"
|
|
37
|
-
} },
|
|
38
|
-
defaultVariants: { size: "medium" },
|
|
39
|
-
compoundVariants: []
|
|
40
|
-
}), h = "_1gklkndn", g = a(null), _ = (e) => {
|
|
41
|
-
let t = i(8), { popup: n, callbacks: r, client: a, preview: o, children: c } = e, l;
|
|
42
|
-
t[0] !== r || t[1] !== a || t[2] !== n || t[3] !== o ? (l = {
|
|
43
|
-
popup: n,
|
|
44
|
-
callbacks: r,
|
|
45
|
-
client: a,
|
|
46
|
-
preview: o
|
|
47
|
-
}, t[0] = r, t[1] = a, t[2] = n, t[3] = o, t[4] = l) : l = t[4];
|
|
48
|
-
let u;
|
|
49
|
-
return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ s(g.Provider, {
|
|
50
|
-
value: l,
|
|
51
|
-
children: c
|
|
52
|
-
}), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
|
|
53
|
-
}, v = () => {
|
|
54
|
-
let e = o(g);
|
|
55
|
-
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
56
|
-
return e;
|
|
57
|
-
}, y = () => o(g), b = () => {
|
|
58
|
-
let a = i(2), o = y(), s;
|
|
59
|
-
return a[0] === o ? s = a[1] : (s = (i) => {
|
|
60
|
-
let a = i === void 0 ? "programmatic" : i;
|
|
61
|
-
if (!o || r().active_popup_id !== o.popup.id) return;
|
|
62
|
-
let s = n();
|
|
63
|
-
o.callbacks?.onPopupClose?.(o.popup, {
|
|
64
|
-
trigger_type: t(),
|
|
65
|
-
dismiss_reason: a,
|
|
66
|
-
time_shown_ms: s ? Date.now() - s : null
|
|
67
|
-
}), e(o.popup.id);
|
|
68
|
-
}, a[0] = o, a[1] = s), s;
|
|
69
|
-
}, x = "zv6sjd1", S = "zv6sjd2 zv6sjd1", C = "zv6sjd3", w = "zv6sjd8", T = "zv6sjd9", E = "zv6sjda", D = (e) => {
|
|
70
|
-
let t = i(6), n = y(), r = n?.callbacks?.onAction, a = b(), { action: o } = e.content, s;
|
|
71
|
-
t[0] !== o || t[1] !== a || t[2] !== n || t[3] !== r || t[4] !== e ? (s = () => {
|
|
72
|
-
o?.type === "redirect" && (!n || n.preview || (r?.(e, {
|
|
73
|
-
action_type: "redirect",
|
|
74
|
-
redirect_url: o.url,
|
|
75
|
-
open_in_new_tab: !!o.openInNewTab
|
|
76
|
-
}), a("cta_click"), o.openInNewTab ? window.open(o.url, "_blank", "noopener,noreferrer") : window.location.href = o.url));
|
|
77
|
-
}, t[0] = o, t[1] = a, t[2] = n, t[3] = r, t[4] = e, t[5] = s) : s = t[5];
|
|
78
|
-
let c = s;
|
|
79
|
-
return o?.type === "redirect" && o.url ? c : null;
|
|
80
|
-
};
|
|
81
|
-
//#endregion
|
|
82
|
-
export { S as a, w as c, f as d, h as f, u as g, D as h, E as i, d as l, v as m, C as n, _ as o, x as p, T as r, p as s, b as t, m as u };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|