@levo-so/site-runtime 0.3.1 → 0.3.7
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/{DateTimeWidget-C1jHOtz7.js → DateTimeWidget-Cctsvcrs.js} +2 -2
- package/Dialog-DVB4WpBS.js +130 -0
- package/{KBChatWidget-D7F9LRwI.js → KBChatWidget-Cnq0DCOQ.js} +383 -435
- package/LevoProvider-nmIbMlsk.js +20 -0
- package/{PhoneWidget-_nw97rkI.js → PhoneWidget-J3VTMWJH.js} +2 -2
- package/{PopupRenderer-Bncp54gB-DuCULkBK.js → PopupBody-DZVwDLkg-yrot8Uqb.js} +201 -910
- package/PopupRenderer-BjW1jg70-Biwj2bIc.js +387 -0
- package/{RichTextWidget-D-mGlES0.js → RichTextWidget-BOrVIR2j.js} +10 -9
- package/{VerifyButton-BkP98H17.js → VerifyButton-CA1GtEZJ.js} +20 -19
- package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-DhGk81nV.js} +2 -2
- package/{dist-DBbiX2ST.js → dist-C8gLeklT.js} +601 -598
- package/{dist-CJknSbJK.js → dist-Cb6sb7nO.js} +21 -22
- package/{inlineCollectionTheme-D2w17LHX.js → generateRadiusScale-54mE9ikx.js} +4 -19
- package/index.d.ts +15 -0
- package/index.js +295 -290
- package/{inlineBaseTheme-DS-AfUHi.js → inlineBaseTheme-B6E9zzyp.js} +2 -2
- package/inlineCollectionTheme-DYYMrmcE.js +19 -0
- package/{kbChat-AUJxjURc.js → kbChat-DIb4AS7E.js} +31 -26
- package/{nodeAlignment-Cn6xNtOP.js → nodeAlignment-D70kOcui.js} +13 -13
- package/package.json +9 -9
- package/pillChrome-BAu5AfCT.js +30 -0
- package/popupState-JmpeKzgM-qhNTV79U.js +229 -0
- package/popups.js +1 -1
- package/react-6kO0cqgr.js +74 -0
- package/rteTheme.cssm-xg0gJ28J.js +4 -0
- package/styles.css +1 -1
- package/theme.cssm-mkQwezuj.js +4 -0
- package/usePopupRedirect-BThP_YPW-DoixMAB9.js +80 -0
- package/Dialog-CzVhHLEY.js +0 -145
- package/pillChrome-AhXOWXIb.js +0 -20
- /package/{CollectionField-CzS-34zx.js → CollectionField-C59pmeQw.js} +0 -0
- /package/{Popover-q5dL7y0W.js → Popover-C7zZHBIc.js} +0 -0
- /package/{es-iCqKQf1c.js → es-CztjLuNy.js} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { c as e, f as t, r as n, s as r } from "./popupState-JmpeKzgM-qhNTV79U.js";
|
|
2
|
+
import { createContext as i, useContext as a } from "react";
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import { c as s } from "react/compiler-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 = i(null), _ = (e) => {
|
|
41
|
+
let t = s(6), { popup: n, callbacks: r, children: i } = e, a;
|
|
42
|
+
t[0] !== r || t[1] !== n ? (a = {
|
|
43
|
+
popup: n,
|
|
44
|
+
callbacks: r
|
|
45
|
+
}, t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
46
|
+
let c;
|
|
47
|
+
return t[3] !== i || t[4] !== a ? (c = /* @__PURE__ */ o(g.Provider, {
|
|
48
|
+
value: a,
|
|
49
|
+
children: i
|
|
50
|
+
}), t[3] = i, t[4] = a, t[5] = c) : c = t[5], c;
|
|
51
|
+
}, v = () => {
|
|
52
|
+
let e = a(g);
|
|
53
|
+
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
54
|
+
return e;
|
|
55
|
+
}, y = () => a(g), b = () => {
|
|
56
|
+
let i = s(2), a = y(), o;
|
|
57
|
+
return i[0] === a ? o = i[1] : (o = (i) => {
|
|
58
|
+
let o = i === void 0 ? "programmatic" : i;
|
|
59
|
+
if (!a || r().active_popup_id !== a.popup.id) return;
|
|
60
|
+
let s = n();
|
|
61
|
+
a.callbacks?.onPopupClose?.(a.popup, {
|
|
62
|
+
trigger_type: t(),
|
|
63
|
+
dismiss_reason: o,
|
|
64
|
+
time_shown_ms: s ? Date.now() - s : null
|
|
65
|
+
}), e(a.popup.id);
|
|
66
|
+
}, i[0] = a, i[1] = o), o;
|
|
67
|
+
}, x = "zv6sjd1", S = "zv6sjd2 zv6sjd1", C = "zv6sjd3", w = "zv6sjd8", T = "zv6sjd9", E = "zv6sjda", D = (e) => {
|
|
68
|
+
let t = s(6), n = y(), r = n?.callbacks?.onAction, i = b(), { action: a } = e.content, o;
|
|
69
|
+
t[0] !== a || t[1] !== i || t[2] !== n || t[3] !== r || t[4] !== e ? (o = () => {
|
|
70
|
+
a?.type === "redirect" && n && (r?.(e, {
|
|
71
|
+
action_type: "redirect",
|
|
72
|
+
redirect_url: a.url,
|
|
73
|
+
open_in_new_tab: !!a.openInNewTab
|
|
74
|
+
}), i("cta_click"), a.openInNewTab ? window.open(a.url, "_blank", "noopener,noreferrer") : window.location.href = a.url);
|
|
75
|
+
}, t[0] = a, t[1] = i, t[2] = n, t[3] = r, t[4] = e, t[5] = o) : o = t[5];
|
|
76
|
+
let c = o;
|
|
77
|
+
return a?.type === "redirect" && a.url ? c : null;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { u as _, y as a, p as c, m as d, f, D as g, v as h, E as i, w as l, x as m, C as n, S as o, h as p, T as r, _ as s, b as t, d as u };
|
package/Dialog-CzVhHLEY.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { r as e, t } from "./ThemeProvider-BQmIB5tr.js";
|
|
3
|
-
import { createContext as n, useContext as r } from "react";
|
|
4
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
import { c as o } from "react/compiler-runtime";
|
|
6
|
-
import s from "clsx";
|
|
7
|
-
import { IconX as c } from "@tabler/icons-react";
|
|
8
|
-
import { Dialog as l } from "@base-ui/react/dialog";
|
|
9
|
-
//#region ../react/dist/providers/LevoProvider.js
|
|
10
|
-
var u = n({
|
|
11
|
-
client: null,
|
|
12
|
-
insights: null
|
|
13
|
-
}), d = ({ children: e, client: t, insights: n = null }) => /* @__PURE__ */ i(u.Provider, {
|
|
14
|
-
value: {
|
|
15
|
-
client: t,
|
|
16
|
-
insights: n
|
|
17
|
-
},
|
|
18
|
-
children: e
|
|
19
|
-
}), f = () => {
|
|
20
|
-
let e = r(u);
|
|
21
|
-
if (!e.client) throw Error("useLevo must be used within a LevoProvider. Please ensure you have wrapped your component tree with LevoProvider.");
|
|
22
|
-
return e.client;
|
|
23
|
-
}, p = () => r(u).client, m = () => r(u).insights, h = "ch8h0x0", g = "ch8h0x1", _ = "ch8h0x2", v = "ch8h0x3", y = "ch8h0x5", b = "ch8h0x6", x = (e) => {
|
|
24
|
-
let t = o(4), n;
|
|
25
|
-
t[0] === e ? n = t[1] : ({...n} = e, t[0] = e, t[1] = n);
|
|
26
|
-
let r;
|
|
27
|
-
return t[2] === n ? r = t[3] : (r = /* @__PURE__ */ i(l.Root, {
|
|
28
|
-
"data-slot": "dialog",
|
|
29
|
-
...n
|
|
30
|
-
}), t[2] = n, t[3] = r), r;
|
|
31
|
-
}, S = (e) => {
|
|
32
|
-
let n = o(5), r;
|
|
33
|
-
n[0] === e ? r = n[1] : ({...r} = e, n[0] = e, n[1] = r);
|
|
34
|
-
let { portalRef: a } = t(), s;
|
|
35
|
-
return n[2] !== a || n[3] !== r ? (s = /* @__PURE__ */ i(l.Portal, {
|
|
36
|
-
container: a,
|
|
37
|
-
...r
|
|
38
|
-
}), n[2] = a, n[3] = r, n[4] = s) : s = n[4], s;
|
|
39
|
-
}, C = (e) => {
|
|
40
|
-
let t = o(8), n, r;
|
|
41
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
42
|
-
let a;
|
|
43
|
-
t[3] === n ? a = t[4] : (a = s(g, n), t[3] = n, t[4] = a);
|
|
44
|
-
let c;
|
|
45
|
-
return t[5] !== r || t[6] !== a ? (c = /* @__PURE__ */ i(l.Viewport, {
|
|
46
|
-
"data-slot": "dialog-viewport",
|
|
47
|
-
className: a,
|
|
48
|
-
...r
|
|
49
|
-
}), t[5] = r, t[6] = a, t[7] = c) : c = t[7], c;
|
|
50
|
-
}, w = (t) => {
|
|
51
|
-
let n = o(10), r, a, s;
|
|
52
|
-
n[0] === t ? (r = n[1], a = n[2], s = n[3]) : ({variant: s, size: a, ...r} = t, n[0] = t, n[1] = r, n[2] = a, n[3] = s);
|
|
53
|
-
let c;
|
|
54
|
-
n[4] !== a || n[5] !== s ? (c = /* @__PURE__ */ i(e, {
|
|
55
|
-
variant: s,
|
|
56
|
-
size: a
|
|
57
|
-
}), n[4] = a, n[5] = s, n[6] = c) : c = n[6];
|
|
58
|
-
let u;
|
|
59
|
-
return n[7] !== r || n[8] !== c ? (u = /* @__PURE__ */ i(l.Close, {
|
|
60
|
-
"data-slot": "dialog-close",
|
|
61
|
-
render: c,
|
|
62
|
-
...r
|
|
63
|
-
}), n[7] = r, n[8] = c, n[9] = u) : u = n[9], u;
|
|
64
|
-
}, T = (e) => {
|
|
65
|
-
let t = o(8), n, r;
|
|
66
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
67
|
-
let a;
|
|
68
|
-
t[3] === n ? a = t[4] : (a = s(h, n), t[3] = n, t[4] = a);
|
|
69
|
-
let c;
|
|
70
|
-
return t[5] !== r || t[6] !== a ? (c = /* @__PURE__ */ i(l.Backdrop, {
|
|
71
|
-
"data-slot": "dialog-backdrop",
|
|
72
|
-
className: a,
|
|
73
|
-
...r
|
|
74
|
-
}), t[5] = r, t[6] = a, t[7] = c) : c = t[7], c;
|
|
75
|
-
}, E = (t) => {
|
|
76
|
-
let n = o(14), r, u, d, f;
|
|
77
|
-
n[0] === t ? (r = n[1], u = n[2], d = n[3], f = n[4]) : ({className: u, children: r, showCloseButton: f, ...d} = t, n[0] = t, n[1] = r, n[2] = u, n[3] = d, n[4] = f);
|
|
78
|
-
let p = f === void 0 ? !0 : f, m;
|
|
79
|
-
n[5] === u ? m = n[6] : (m = s(_, u), n[5] = u, n[6] = m);
|
|
80
|
-
let h;
|
|
81
|
-
n[7] === p ? h = n[8] : (h = p && /* @__PURE__ */ i(l.Close, {
|
|
82
|
-
"data-slot": "dialog-close",
|
|
83
|
-
render: /* @__PURE__ */ i(e, {
|
|
84
|
-
variant: "ghost",
|
|
85
|
-
size: "icon-sm",
|
|
86
|
-
className: "ch8h0x7",
|
|
87
|
-
"aria-label": "Close"
|
|
88
|
-
}),
|
|
89
|
-
children: /* @__PURE__ */ i(c, { size: 16 })
|
|
90
|
-
}), n[7] = p, n[8] = h);
|
|
91
|
-
let g;
|
|
92
|
-
return n[9] !== r || n[10] !== d || n[11] !== m || n[12] !== h ? (g = /* @__PURE__ */ a(l.Popup, {
|
|
93
|
-
"data-slot": "dialog-popup",
|
|
94
|
-
className: m,
|
|
95
|
-
...d,
|
|
96
|
-
children: [r, h]
|
|
97
|
-
}), n[9] = r, n[10] = d, n[11] = m, n[12] = h, n[13] = g) : g = n[13], g;
|
|
98
|
-
}, D = (e) => {
|
|
99
|
-
let t = o(8), n, r;
|
|
100
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
101
|
-
let a;
|
|
102
|
-
t[3] === n ? a = t[4] : (a = s(v, n), t[3] = n, t[4] = a);
|
|
103
|
-
let c;
|
|
104
|
-
return t[5] !== r || t[6] !== a ? (c = /* @__PURE__ */ i("div", {
|
|
105
|
-
"data-slot": "dialog-header",
|
|
106
|
-
className: a,
|
|
107
|
-
...r
|
|
108
|
-
}), t[5] = r, t[6] = a, t[7] = c) : c = t[7], c;
|
|
109
|
-
}, O = (e) => {
|
|
110
|
-
let t = o(8), n, r;
|
|
111
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
112
|
-
let a;
|
|
113
|
-
t[3] === n ? a = t[4] : (a = s(y, n), t[3] = n, t[4] = a);
|
|
114
|
-
let c;
|
|
115
|
-
return t[5] !== r || t[6] !== a ? (c = /* @__PURE__ */ i(l.Title, {
|
|
116
|
-
"data-slot": "dialog-title",
|
|
117
|
-
className: a,
|
|
118
|
-
...r
|
|
119
|
-
}), t[5] = r, t[6] = a, t[7] = c) : c = t[7], c;
|
|
120
|
-
}, k = (e) => {
|
|
121
|
-
let t = o(8), n, r;
|
|
122
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
123
|
-
let a;
|
|
124
|
-
t[3] === n ? a = t[4] : (a = s(b, n), t[3] = n, t[4] = a);
|
|
125
|
-
let c;
|
|
126
|
-
return t[5] !== r || t[6] !== a ? (c = /* @__PURE__ */ i(l.Description, {
|
|
127
|
-
"data-slot": "dialog-description",
|
|
128
|
-
className: a,
|
|
129
|
-
...r
|
|
130
|
-
}), t[5] = r, t[6] = a, t[7] = c) : c = t[7], c;
|
|
131
|
-
}, A = (e) => {
|
|
132
|
-
let t = o(11), n, r, s, c;
|
|
133
|
-
t[0] === e ? (n = t[1], r = t[2], s = t[3], c = t[4]) : ({className: r, children: n, showCloseButton: c, ...s} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = s, t[4] = c);
|
|
134
|
-
let l = c === void 0 ? !0 : c, u;
|
|
135
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ i(T, {}), t[5] = u) : u = t[5];
|
|
136
|
-
let d;
|
|
137
|
-
return t[6] !== n || t[7] !== r || t[8] !== s || t[9] !== l ? (d = /* @__PURE__ */ a(S, { children: [u, /* @__PURE__ */ i(C, { children: /* @__PURE__ */ i(E, {
|
|
138
|
-
className: r,
|
|
139
|
-
showCloseButton: l,
|
|
140
|
-
...s,
|
|
141
|
-
children: n
|
|
142
|
-
}) })] }), t[6] = n, t[7] = r, t[8] = s, t[9] = l, t[10] = d) : d = t[10], d;
|
|
143
|
-
};
|
|
144
|
-
//#endregion
|
|
145
|
-
export { w as a, S as c, f as d, d as f, O as i, T as l, m, A as n, x as o, p, k as r, l as s, D as t, C as u };
|
package/pillChrome-AhXOWXIb.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region ../../libraries/ai-chat/src/helpers.ts
|
|
2
|
-
var e = (e, t = {
|
|
3
|
-
hour: "numeric",
|
|
4
|
-
minute: "2-digit"
|
|
5
|
-
}) => {
|
|
6
|
-
if (!e) return "";
|
|
7
|
-
let n = e instanceof Date ? e : new Date(e);
|
|
8
|
-
return Number.isNaN(n.getTime()) ? "" : n.toLocaleTimeString([], t);
|
|
9
|
-
}, t = (e, t) => t ? `levo.site_chat.${e}.${t}` : null, n = (e, t) => {
|
|
10
|
-
e.style.height = "auto", e.style.height = t === void 0 ? `${e.scrollHeight}px` : `${Math.min(e.scrollHeight, t)}px`;
|
|
11
|
-
}, r = "w-72", i = "ai-chat-pill-gradient relative rounded-[30px] p-[2px] transition-shadow duration-300", a = "shadow-lg shadow-zinc-950/10", o = "shadow-md", s = "ai-chat-pill-surface min-h-14 w-full rounded-[28px] bg-white p-1.5", c = "ai-chat-pill-surface--stacked", l = "ai-chat-pill-input relative min-w-0", u = "ai-chat-pill-actions flex items-center gap-1.5", d = "ai-chat-pill-spark flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full text-blue-500 transition-[background-color,transform] duration-150 hover:bg-zinc-50 active:scale-95", f = "flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-[transform,box-shadow] duration-150 hover:scale-105 hover:shadow-md active:scale-95", p = "block h-6 max-h-[120px] w-full resize-none overflow-y-auto bg-transparent text-base text-zinc-900 leading-6 placeholder:text-zinc-400 focus:outline-none", m = 24, h = (e, t) => {
|
|
12
|
-
e.classList.remove(c), t.style.height = "auto";
|
|
13
|
-
let r = t.scrollHeight > m + 4;
|
|
14
|
-
return e.classList.toggle(c, r), n(t, 120), r;
|
|
15
|
-
}, g = "ai-chat-pill-label pointer-events-none absolute inset-y-0 left-0 flex max-w-full items-center truncate bg-clip-text font-semibold text-[15px] text-transparent", _ = {
|
|
16
|
-
backgroundColor: "var(--color-brand, #0a0a0a)",
|
|
17
|
-
color: "var(--color-brand-foreground, #fff)"
|
|
18
|
-
}, v = (e) => e ? `Ask ${e}` : "Ask AI";
|
|
19
|
-
//#endregion
|
|
20
|
-
export { e as _, f as a, a as c, c as d, p as f, n as g, v as h, g as i, d as l, h as m, i as n, _ as o, r as p, l as r, o as s, u as t, s as u, t as v };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|