@levo-so/site-runtime 0.3.19 → 0.3.20
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-DCAXOmBN.js +270 -0
- package/DateTimeWidget-I0LvR-tO.js +255 -0
- package/{Dialog-dT7y641z.js → Dialog-D-vRkU9N.js} +1 -1
- package/{KBChatWidget-GRi6sLpp.js → KBChatWidget-BMuZ-VI3.js} +222 -222
- package/{LevoProvider-Bsjkcwc8.js → LevoProvider-BkbKrvrI.js} +8 -8
- package/PhoneWidget-DPECohGT.js +99 -0
- package/{Popover-C29yJ7rz.js → Popover-Cr0-X_ch.js} +1 -1
- package/{PopupBody-BI-MJqmd-DgTQEzda.js → PopupBody-BI-MJqmd-a-l3CaKZ.js} +23 -23
- package/{PopupRenderer-D66Gx63H-Cd9xJv33.js → PopupRenderer-D66Gx63H-DpcNpbtU.js} +47 -47
- package/{RichTextWidget-DfakML79.js → RichTextWidget-C1QECDcg.js} +127 -127
- package/{RteThemeProvider-BQmfSXSl.js → RteThemeProvider-CMbSaFRQ.js} +1 -1
- package/{ThemeProvider-DutrjSTF.js → ThemeProvider-DlFehjh1.js} +30 -30
- package/{Tooltip-CQB0LyxK.js → Tooltip-BKQ5rIDh.js} +1 -1
- package/{VerifyButton-BUT70lgz.js → VerifyButton-D0cj9Z5Q.js} +38 -38
- package/blog-content.js +67 -67
- package/{dist-CEdznbFW.js → dist-IxiGbP-3.js} +1254 -1139
- package/{dist-6AIgW_iB.js → dist-_lwl0kZw.js} +10 -10
- package/index.d.ts +21 -11
- package/index.js +1698 -1385
- package/{kbChat-a2dXSeRc.js → kbChat-DtZ4vuCZ.js} +26 -26
- package/package.json +3 -3
- package/popups.js +1 -1
- package/script.esm-wR2d7rrv.js +62 -0
- package/{usePopupRedirect-CAAdcpaW-Ddjyf4KK.js → usePopupRedirect-CAAdcpaW-BDa44PXN.js} +14 -14
- package/CollectionField-C-6a1ud4.js +0 -270
- package/DateTimeWidget-U3lD0q1q.js +0 -255
- package/PhoneWidget-DQQa4bL6.js +0 -99
- /package/{es-ByBbirnH.js → es-CGQflL9T.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
-
import { t } from "./LevoProvider-
|
|
2
|
+
import { t } from "./LevoProvider-BkbKrvrI.js";
|
|
3
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
4
|
import { t as l } from "./react-B9yvlbH0.js";
|
|
5
5
|
import { c as u } from "react/compiler-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
8
|
import { $isIdentityContextReady as _ } from "@levo-so/insights/stores";
|
|
9
9
|
//#region ../../libraries/popups/dist/index.js
|
|
10
10
|
var v = /* @__PURE__ */ e({
|
|
@@ -14,12 +14,12 @@ var v = /* @__PURE__ */ e({
|
|
|
14
14
|
}), y = async (e, t) => {
|
|
15
15
|
let n = {};
|
|
16
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 =
|
|
18
|
-
let n = u(9), { siteId: r, pageId: i } = e, { fetch: a, logger: s } = t(), [c, l] =
|
|
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
19
|
if (n[0] !== a || n[1] !== s || n[2] !== r ? (v = () => {
|
|
20
|
-
if (
|
|
20
|
+
if (f.current) return;
|
|
21
21
|
let e = () => {
|
|
22
|
-
|
|
22
|
+
f.current || (f.current = !0, y(a, r ? { site_id: r } : void 0).then((e) => {
|
|
23
23
|
o(e), l(e);
|
|
24
24
|
}).catch((e) => {
|
|
25
25
|
s?.error("Failed to fetch popups", { exception: e }), o([]), l([]);
|
|
@@ -37,16 +37,16 @@ var v = /* @__PURE__ */ e({
|
|
|
37
37
|
a,
|
|
38
38
|
s,
|
|
39
39
|
r
|
|
40
|
-
], n[0] = a, n[1] = s, n[2] = r, n[3] = v, n[4] = x) : (v = n[3], x = n[4]),
|
|
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
41
|
let C;
|
|
42
42
|
n[5] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
43
43
|
position: "relative",
|
|
44
44
|
zIndex: 99999
|
|
45
45
|
}, n[5] = C) : C = n[5];
|
|
46
46
|
let w;
|
|
47
|
-
return n[6] !== i || n[7] !== c ? (w = /* @__PURE__ */
|
|
47
|
+
return n[6] !== i || n[7] !== c ? (w = /* @__PURE__ */ g("div", {
|
|
48
48
|
style: C,
|
|
49
|
-
children: /* @__PURE__ */ d
|
|
49
|
+
children: /* @__PURE__ */ g(d, { children: /* @__PURE__ */ g(b, {
|
|
50
50
|
popups: c,
|
|
51
51
|
pageId: i
|
|
52
52
|
}) })
|
package/index.d.ts
CHANGED
|
@@ -635,6 +635,21 @@ export declare interface ILevoEntryFormProps {
|
|
|
635
635
|
className?: string;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
+
declare interface ILevoEventRegisterProps {
|
|
639
|
+
/** Event id (or slug the single-event endpoint resolves). */
|
|
640
|
+
eventID: string;
|
|
641
|
+
/** Event name, shown in the sheet header and on the calendar entry. */
|
|
642
|
+
title?: string;
|
|
643
|
+
/** External ticketing URL — when set, renders a link out instead of the sheet. */
|
|
644
|
+
external?: string;
|
|
645
|
+
buttonText?: string;
|
|
646
|
+
/** Event start/end (`starts_at` / `ends_at`), shown in the viewer's own timezone and used for the calendar entry. */
|
|
647
|
+
startsAt?: string | Date | null;
|
|
648
|
+
endsAt?: string | Date | null;
|
|
649
|
+
/** Joining link (`url`), attached to the calendar entry so it is one tap away at start time. */
|
|
650
|
+
eventUrl?: string | null;
|
|
651
|
+
}
|
|
652
|
+
|
|
638
653
|
/**
|
|
639
654
|
* A form binding — the fields + submit for a collection. `LevoForm` renders it (the schema
|
|
640
655
|
* drives which inputs appear); submissions go to the collection. Forms only bind to
|
|
@@ -1709,23 +1724,18 @@ export declare const LevoEntryForm: React.FC<ILevoEntryFormProps>;
|
|
|
1709
1724
|
|
|
1710
1725
|
/**
|
|
1711
1726
|
* Self-contained event registration widget for generated Studio v3 sites — ticket
|
|
1712
|
-
*
|
|
1713
|
-
* Checkout when the booking API returns `provider: "stripe"`), and
|
|
1727
|
+
* choice, coupons, attendee details, payment (Razorpay by default; Stripe Embedded
|
|
1728
|
+
* Checkout when the booking API returns `provider: "stripe"`), and the confirmation, all
|
|
1729
|
+
* on one sheet that stays open from the first tap to "You're in".
|
|
1714
1730
|
*
|
|
1715
1731
|
* The AI drops this onto an event page and NEVER rebuilds the flow: it owns the entire
|
|
1716
1732
|
* booking + payment path against the Levo event API. The site client (`useLevoClient`)
|
|
1717
1733
|
* auto-stamps the workspace on every request, so no auth/workspace wiring is needed.
|
|
1718
1734
|
* `external` turns it into a plain link out to a third-party ticketing URL.
|
|
1735
|
+
*
|
|
1736
|
+
* `?register=1` on the page URL opens the sheet on load, for campaign links and second CTAs.
|
|
1719
1737
|
*/
|
|
1720
|
-
export declare const LevoEventRegister: ({ eventID, title, external, buttonText, }:
|
|
1721
|
-
/** Event id (or slug the single-event endpoint resolves). */
|
|
1722
|
-
eventID: string;
|
|
1723
|
-
/** Event name, shown in the modal header. */
|
|
1724
|
-
title?: string;
|
|
1725
|
-
/** External ticketing URL — when set, renders a link out instead of the modal flow. */
|
|
1726
|
-
external?: string;
|
|
1727
|
-
buttonText?: string;
|
|
1728
|
-
}) => JSX.Element;
|
|
1738
|
+
export declare const LevoEventRegister: ({ eventID, title, external, buttonText, startsAt, endsAt, eventUrl, }: ILevoEventRegisterProps) => JSX.Element;
|
|
1729
1739
|
|
|
1730
1740
|
/**
|
|
1731
1741
|
* A collection-backed form for generated Studio v3 sites — renders the collection's fields
|