@levo-so/site-runtime 0.3.1 → 0.3.8
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/CollectionField-C-6a1ud4.js +270 -0
- package/{CollectionInput-B1qV4QEH.js → CollectionInput-BJ__qcbk.js} +40 -40
- package/DateTimeWidget-hFjcn3o6.js +255 -0
- package/Dialog-dT7y641z.js +130 -0
- package/KBChatWidget-ClHFDgJ5.js +1026 -0
- package/LevoProvider-Bsjkcwc8.js +20 -0
- package/PhoneWidget-BmBO-kvA.js +99 -0
- package/{Popover-q5dL7y0W.js → Popover-3N88sRp4.js} +20 -20
- package/{PopupRenderer-Bncp54gB-DuCULkBK.js → PopupBody-DZVwDLkg-Cfy3lWGs.js} +201 -910
- package/PopupRenderer-BjW1jg70-W2y-PEPH.js +387 -0
- package/{RichTextWidget-D-mGlES0.js → RichTextWidget-DkKHEq4j.js} +142 -141
- package/ThemeProvider-DutrjSTF.js +116 -0
- package/{Tooltip-BIgrpetu.js → Tooltip-CQB0LyxK.js} +20 -20
- package/VerifyButton-BUT70lgz.js +192 -0
- package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-4AUn51iJ.js} +2 -2
- package/dist-CRDgdAkQ.js +3631 -0
- package/dist-DPmVG7VB.js +79 -0
- package/index.d.ts +575 -3
- package/index.js +1217 -722
- package/inlineBaseTheme-BB9e6h5f.js +9 -0
- package/inlineCollectionTheme-CWcMCUti.js +19 -0
- package/{kbChat-AUJxjURc.js → kbChat-C00LVlxP.js} +53 -48
- package/{nodeAlignment-Cn6xNtOP.js → nodeAlignment-BnJljFlw.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-CV3jf2mc.js +74 -0
- package/rteTheme.cssm-xg0gJ28J.js +4 -0
- package/styles.css +1 -1
- package/theme.cssm-DUzmx76l.js +4 -0
- package/{inlineCollectionTheme-D2w17LHX.js → themeVars.cssm-ByhhC2Jm.js} +18 -33
- package/usePopupRedirect-BThP_YPW-COUseDik.js +80 -0
- package/CollectionField-CzS-34zx.js +0 -270
- package/DateTimeWidget-C1jHOtz7.js +0 -255
- package/Dialog-CzVhHLEY.js +0 -145
- package/KBChatWidget-D7F9LRwI.js +0 -1078
- package/PhoneWidget-_nw97rkI.js +0 -99
- package/ThemeProvider-BQmIB5tr.js +0 -116
- package/VerifyButton-BkP98H17.js +0 -191
- package/dist-CJknSbJK.js +0 -80
- package/dist-DBbiX2ST.js +0 -3556
- package/inlineBaseTheme-DS-AfUHi.js +0 -9
- package/pillChrome-AhXOWXIb.js +0 -20
- /package/{es-iCqKQf1c.js → es-CztjLuNy.js} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
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 };
|