@levo-so/site-runtime 0.3.19 → 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.
Files changed (55) hide show
  1. package/BillingStep-ByiYjJ0S.js +251 -0
  2. package/BookingCard-DdwLHVGw.js +816 -0
  3. package/CollectionLabel-CmUFfc_7.js +35 -0
  4. package/DateTimeWidget-Bk2tk_CT.js +254 -0
  5. package/{KBChatWidget-GRi6sLpp.js → KBChatWidget-BXRRgelS.js} +223 -223
  6. package/PhoneWidget-FWE3jD_L.js +97 -0
  7. package/{Popover-C29yJ7rz.js → Popover-MSrVDAzg.js} +7 -7
  8. package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
  9. package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
  10. package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
  11. package/{RichTextWidget-DfakML79.js → RichTextWidget-KnIKESAD.js} +189 -190
  12. package/{RteThemeProvider-BQmfSXSl.js → RteThemeProvider-DtTXGcCT.js} +2 -3
  13. package/Sonner-BsE4Y_t4.js +21 -0
  14. package/blog-content.js +71 -72
  15. package/dist-BVFCdirT.js +4471 -0
  16. package/dist-DEXGyFeH.js +376 -0
  17. package/index.d.ts +21 -11
  18. package/index.js +1702 -1390
  19. package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
  20. package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
  21. package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
  22. package/{kbChat-a2dXSeRc.js → kbChat-eFsau7hG.js} +27 -27
  23. package/package.json +23 -23
  24. package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
  25. package/popups.js +1 -1
  26. package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
  27. package/script.esm-D4nvz3-k.js +62 -0
  28. package/script.esm-uVCZU25S.js +62 -0
  29. package/start.js +1 -1
  30. package/styles.css +1 -1
  31. package/theme.cssm-iXnQwMCp.js +238 -0
  32. package/CollectionField-C-6a1ud4.js +0 -270
  33. package/CollectionInput-BJ__qcbk.js +0 -147
  34. package/DateTimeWidget-U3lD0q1q.js +0 -255
  35. package/Dialog-dT7y641z.js +0 -130
  36. package/LevoProvider-Bsjkcwc8.js +0 -20
  37. package/PhoneWidget-DQQa4bL6.js +0 -99
  38. package/PopupBody-BI-MJqmd-DgTQEzda.js +0 -159
  39. package/PopupRenderer-D66Gx63H-Cd9xJv33.js +0 -388
  40. package/ThemeProvider-DutrjSTF.js +0 -116
  41. package/Tooltip-CQB0LyxK.js +0 -67
  42. package/VerifyButton-BUT70lgz.js +0 -192
  43. package/createThemeExtension-4AUn51iJ.js +0 -15
  44. package/dist-6AIgW_iB.js +0 -79
  45. package/dist-CEdznbFW.js +0 -3668
  46. package/inlineBaseTheme-BB9e6h5f.js +0 -9
  47. package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
  48. package/react-B9yvlbH0.js +0 -74
  49. package/theme.cssm-DUzmx76l.js +0 -4
  50. package/usePopupRedirect-CAAdcpaW-Ddjyf4KK.js +0 -82
  51. /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
  52. /package/{es-ByBbirnH.js → es-CK20DkgT.js} +0 -0
  53. /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
  54. /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
  55. /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
@@ -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 };
@@ -1,4 +0,0 @@
1
- //#region ../../libraries/levocn/dist/styles/theme/theme.cssm.js
2
- var e = "_1bi3v3x0";
3
- //#endregion
4
- export { e as t };
@@ -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 { jsx as a } from "react/jsx-runtime";
4
- import { createRuntimeFn as o } from "@vanilla-extract/recipes/createRuntimeFn";
5
- import { createContext as s, useContext as c } from "react";
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 = o({
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 = o({
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 = s(null), _ = (e) => {
41
- let t = i(8), { popup: n, callbacks: r, client: o, preview: s, children: c } = e, l;
42
- t[0] !== r || t[1] !== o || t[2] !== n || t[3] !== s ? (l = {
43
- popup: n,
44
- callbacks: r,
45
- client: o,
46
- preview: s
47
- }, t[0] = r, t[1] = o, t[2] = n, t[3] = s, t[4] = l) : l = t[4];
48
- let u;
49
- return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ a(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 = c(g);
55
- if (!e) throw Error("usePopupContext must be used within a PopupProvider");
56
- return e;
57
- }, y = () => c(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