@levo-so/studio 0.3.4 → 0.3.5
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/index.js +107 -93
- package/package.json +3 -3
- package/studio.css +1 -1
package/index.js
CHANGED
|
@@ -10244,7 +10244,15 @@ var rd = {
|
|
|
10244
10244
|
o,
|
|
10245
10245
|
e
|
|
10246
10246
|
]), null;
|
|
10247
|
-
}, sf = 200, cf =
|
|
10247
|
+
}, sf = 200, cf = () => {
|
|
10248
|
+
let [e, t] = V(null);
|
|
10249
|
+
return R(() => {
|
|
10250
|
+
let e = typeof window > "u" ? null : window.visualViewport;
|
|
10251
|
+
if (!e) return;
|
|
10252
|
+
let n = () => t(e.height);
|
|
10253
|
+
return n(), e.addEventListener("resize", n), () => e.removeEventListener("resize", n);
|
|
10254
|
+
}, []), e;
|
|
10255
|
+
}, lf = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),summary,[tabindex]:not([tabindex=\"-1\"])", uf = (e) => {
|
|
10248
10256
|
R(() => {
|
|
10249
10257
|
if (!e || typeof document > "u") return;
|
|
10250
10258
|
let { body: t } = document, n = window.scrollY, r = {
|
|
@@ -10257,19 +10265,19 @@ var rd = {
|
|
|
10257
10265
|
t.style.position = r.position, t.style.top = r.top, t.style.width = r.width, t.style.overflow = r.overflow, window.scrollTo(0, n);
|
|
10258
10266
|
};
|
|
10259
10267
|
}, [e]);
|
|
10260
|
-
},
|
|
10261
|
-
let u = Fe(), d = B(null),
|
|
10262
|
-
|
|
10263
|
-
let
|
|
10264
|
-
|
|
10268
|
+
}, df = ({ title: e, when: t, priceLabel: n, isFree: r, isClosing: i, onClose: a, onSubmit: o, footer: s, wide: c, children: l }) => {
|
|
10269
|
+
let u = Fe(), d = B(null), f = cf(), [p, m] = V(!1);
|
|
10270
|
+
uf(!0);
|
|
10271
|
+
let h = B(a);
|
|
10272
|
+
h.current = a, R(() => {
|
|
10265
10273
|
let e = document.activeElement, t = (e) => {
|
|
10266
10274
|
if (document.querySelector("[data-radix-popper-content-wrapper]")) return;
|
|
10267
10275
|
if (e.key === "Escape") {
|
|
10268
|
-
e.stopPropagation(),
|
|
10276
|
+
e.stopPropagation(), h.current();
|
|
10269
10277
|
return;
|
|
10270
10278
|
}
|
|
10271
10279
|
if (e.key !== "Tab" || !d.current) return;
|
|
10272
|
-
let t = Array.from(d.current.querySelectorAll(
|
|
10280
|
+
let t = Array.from(d.current.querySelectorAll(lf)).filter((e) => e.offsetParent !== null);
|
|
10273
10281
|
if (t.length === 0) return;
|
|
10274
10282
|
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
10275
10283
|
e.shiftKey && (i === n || !d.current.contains(i)) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
@@ -10278,16 +10286,19 @@ var rd = {
|
|
|
10278
10286
|
document.removeEventListener("keydown", t), e?.focus?.();
|
|
10279
10287
|
};
|
|
10280
10288
|
}, []);
|
|
10281
|
-
let
|
|
10282
|
-
onScroll: (e) =>
|
|
10289
|
+
let g = /* @__PURE__ */ U("div", {
|
|
10290
|
+
onScroll: (e) => m(e.currentTarget.scrollTop > 2),
|
|
10283
10291
|
className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain",
|
|
10284
|
-
children:
|
|
10285
|
-
className: "
|
|
10286
|
-
children:
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10292
|
+
children: /* @__PURE__ */ W("div", {
|
|
10293
|
+
className: "flex min-h-full flex-col",
|
|
10294
|
+
children: [/* @__PURE__ */ U("div", {
|
|
10295
|
+
className: "px-5 pt-4 pb-3",
|
|
10296
|
+
children: l
|
|
10297
|
+
}), s && /* @__PURE__ */ U("div", {
|
|
10298
|
+
className: "mt-auto border-t bg-page px-5 pt-3 pb-[max(env(safe-area-inset-bottom),16px)] [border-color:var(--color-border)] sm:sticky sm:bottom-0 sm:z-10",
|
|
10299
|
+
children: s
|
|
10300
|
+
})]
|
|
10301
|
+
})
|
|
10291
10302
|
});
|
|
10292
10303
|
return /* @__PURE__ */ U(zn.Root, { children: /* @__PURE__ */ U("div", {
|
|
10293
10304
|
className: M("fixed inset-0 z-[2147483000] flex items-end justify-center bg-black/40 fill-mode-forwards sm:items-start", "sm:backdrop-blur-[3px]", i ? "fade-out-0 pointer-events-none animate-out ease-out" : "fade-in-0 animate-in ease-out"),
|
|
@@ -10300,10 +10311,13 @@ var rd = {
|
|
|
10300
10311
|
role: "dialog",
|
|
10301
10312
|
"aria-modal": "true",
|
|
10302
10313
|
"aria-labelledby": u,
|
|
10303
|
-
className: M("relative flex h-
|
|
10304
|
-
style: {
|
|
10314
|
+
className: M("relative flex h-[var(--sheet-height)] max-h-[var(--sheet-height)] w-full flex-col overflow-hidden bg-page will-change-transform", "sm:mt-[6vh] sm:h-auto sm:max-h-[88dvh] sm:rounded-2xl sm:border sm:shadow-2xl sm:[border-color:var(--color-border)]", "fill-mode-forwards ease-out", i ? "slide-out-to-bottom-4 fade-out-0 sm:slide-out-to-bottom-2 animate-out" : "slide-in-from-bottom-4 fade-in-0 sm:slide-in-from-bottom-2 animate-in", c ? "sm:max-w-[540px]" : "sm:max-w-[460px]"),
|
|
10315
|
+
style: {
|
|
10316
|
+
animationDuration: `${i ? 160 : sf}ms`,
|
|
10317
|
+
"--sheet-height": f ? `${f}px` : "100dvh"
|
|
10318
|
+
},
|
|
10305
10319
|
children: [/* @__PURE__ */ W("div", {
|
|
10306
|
-
className: M("sticky top-0 z-10 shrink-0 border-b bg-page px-5 pt-[max(env(safe-area-inset-top),16px)] pb-3.5 transition-colors",
|
|
10320
|
+
className: M("sticky top-0 z-10 shrink-0 border-b bg-page px-5 pt-[max(env(safe-area-inset-top),16px)] pb-3.5 transition-colors", p ? "[border-color:var(--color-border)]" : "border-transparent"),
|
|
10307
10321
|
children: [/* @__PURE__ */ W("div", {
|
|
10308
10322
|
className: "mb-2.5 flex items-center justify-between gap-3",
|
|
10309
10323
|
children: [/* @__PURE__ */ U("h2", {
|
|
@@ -10339,11 +10353,11 @@ var rd = {
|
|
|
10339
10353
|
}), o ? /* @__PURE__ */ U("form", {
|
|
10340
10354
|
onSubmit: o,
|
|
10341
10355
|
className: "flex min-h-0 flex-1 flex-col",
|
|
10342
|
-
children:
|
|
10343
|
-
}) :
|
|
10356
|
+
children: g
|
|
10357
|
+
}) : g]
|
|
10344
10358
|
})
|
|
10345
10359
|
}) });
|
|
10346
|
-
},
|
|
10360
|
+
}, ff = "\n@keyframes levo-reg-draw { to { stroke-dashoffset: 0; } }\n@keyframes levo-reg-sweep { to { transform: translateX(240%); } }\n@media (prefers-reduced-motion: reduce) {\n [data-levo-reg-check] { stroke-dashoffset: 0 !important; animation: none !important; }\n [data-levo-reg-sweep] { display: none !important; }\n}\n", pf = ({ email: e, eventTitle: t, startsAt: n, endsAt: r, eventUrl: i, when: a, bookingRef: o, qrImageUrl: s, invoiceUrl: c, onClose: l, onRegisterAnother: u }) => {
|
|
10347
10361
|
let d = Yd({
|
|
10348
10362
|
title: t,
|
|
10349
10363
|
startsAt: n,
|
|
@@ -10355,7 +10369,7 @@ var rd = {
|
|
|
10355
10369
|
}, []), /* @__PURE__ */ W("div", {
|
|
10356
10370
|
className: "flex flex-1 flex-col items-center justify-center px-6 py-9 text-center",
|
|
10357
10371
|
children: [
|
|
10358
|
-
/* @__PURE__ */ U("style", { dangerouslySetInnerHTML: { __html:
|
|
10372
|
+
/* @__PURE__ */ U("style", { dangerouslySetInnerHTML: { __html: ff } }),
|
|
10359
10373
|
/* @__PURE__ */ U("div", {
|
|
10360
10374
|
className: "zoom-in-50 fade-in-0 flex size-[68px] animate-in items-center justify-center rounded-full bg-green-500/10 text-green-700 duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]",
|
|
10361
10375
|
children: /* @__PURE__ */ W("svg", {
|
|
@@ -10500,7 +10514,7 @@ var rd = {
|
|
|
10500
10514
|
})
|
|
10501
10515
|
]
|
|
10502
10516
|
});
|
|
10503
|
-
},
|
|
10517
|
+
}, mf = ({ tickets: e, selectedTicket: t, onSelect: n, error: r }) => {
|
|
10504
10518
|
let [i, a] = V(!t);
|
|
10505
10519
|
return /* @__PURE__ */ W("fieldset", {
|
|
10506
10520
|
className: "flex flex-col gap-2",
|
|
@@ -10577,7 +10591,7 @@ var rd = {
|
|
|
10577
10591
|
})
|
|
10578
10592
|
]
|
|
10579
10593
|
});
|
|
10580
|
-
},
|
|
10594
|
+
}, hf = {
|
|
10581
10595
|
name: "",
|
|
10582
10596
|
email: "",
|
|
10583
10597
|
designation: "",
|
|
@@ -10596,11 +10610,11 @@ var rd = {
|
|
|
10596
10610
|
country: ""
|
|
10597
10611
|
}
|
|
10598
10612
|
}
|
|
10599
|
-
},
|
|
10613
|
+
}, gf = (e) => {
|
|
10600
10614
|
let t = {};
|
|
10601
10615
|
return e.name.trim() || (t.name = "Please enter your name"), e.email.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.email.trim()) || (t.email = "That email address doesn't look right") : t.email = "Please enter your email", e.phone.national && !ir(Td(e.phone)) && (t.phone = "That doesn't look like a valid phone number"), t;
|
|
10602
|
-
},
|
|
10603
|
-
let [t, n] = V(
|
|
10616
|
+
}, _f = (e) => {
|
|
10617
|
+
let [t, n] = V(hf), [r, i] = V({}), [a, o] = V(!1), s = B(!1);
|
|
10604
10618
|
R(() => {
|
|
10605
10619
|
s.current || !e || (s.current = !0, n((t) => ({
|
|
10606
10620
|
...t,
|
|
@@ -10608,14 +10622,14 @@ var rd = {
|
|
|
10608
10622
|
email: t.email || e.email || ""
|
|
10609
10623
|
})));
|
|
10610
10624
|
}, [e]);
|
|
10611
|
-
let c =
|
|
10625
|
+
let c = gf(t), l = L((e, t) => n((n) => ({
|
|
10612
10626
|
...n,
|
|
10613
10627
|
[e]: t
|
|
10614
10628
|
})), []), u = L((e) => i((t) => ({
|
|
10615
10629
|
...t,
|
|
10616
10630
|
[e]: !0
|
|
10617
10631
|
})), []), d = L(() => {
|
|
10618
|
-
n(
|
|
10632
|
+
n(hf), i({}), o(!1), s.current = !0;
|
|
10619
10633
|
}, []), f = L(() => {
|
|
10620
10634
|
i({}), o(!1);
|
|
10621
10635
|
}, []);
|
|
@@ -10636,7 +10650,7 @@ var rd = {
|
|
|
10636
10650
|
} : r,
|
|
10637
10651
|
fieldError: (e) => a || r[e] ? c[e] : void 0
|
|
10638
10652
|
};
|
|
10639
|
-
},
|
|
10653
|
+
}, vf = ({ eventID: e, workspaceId: t, selectedTicket: n, enabled: r }) => {
|
|
10640
10654
|
let i = P(), [a, o] = V(""), [s, c] = V(null), [l, u] = V(!1), [d, f] = V(null), [p, m] = V([]);
|
|
10641
10655
|
return R(() => {
|
|
10642
10656
|
!r || !e || i?.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.options({ headers: { Origin: t || "" } })?.get().json().then((e) => {
|
|
@@ -10689,13 +10703,13 @@ var rd = {
|
|
|
10689
10703
|
o(""), c(null), f(null);
|
|
10690
10704
|
}, [])
|
|
10691
10705
|
};
|
|
10692
|
-
},
|
|
10706
|
+
}, yf = async (e, t, n) => {
|
|
10693
10707
|
let r = new URLSearchParams();
|
|
10694
10708
|
return r.append("query", JSON.stringify({ where: { status: "active" } })), (await e.fetch?.url(`/v1/event/event/${t}/ticket/query?${r.toString()}`).options({ headers: { Origin: n || "" } }).get().json())?.content?.data ?? [];
|
|
10695
|
-
},
|
|
10709
|
+
}, bf = ({ eventID: e, external: t, workspaceId: n }) => {
|
|
10696
10710
|
let r = P(), [i, a] = V([]), [o, s] = V(!t), [c, l] = V(!1), [u, d] = V(null);
|
|
10697
10711
|
return R(() => {
|
|
10698
|
-
t || !e || (s(!0),
|
|
10712
|
+
t || !e || (s(!0), yf(r, e, n ?? "").then((e) => {
|
|
10699
10713
|
a(e), e.length === 1 && d(e[0] ?? null);
|
|
10700
10714
|
}).catch((e) => {
|
|
10701
10715
|
l(!0), r?.logger?.error("Failed to load event tickets", { exception: G(e) });
|
|
@@ -10711,20 +10725,20 @@ var rd = {
|
|
|
10711
10725
|
selectedTicket: u,
|
|
10712
10726
|
selectTicket: d
|
|
10713
10727
|
};
|
|
10714
|
-
},
|
|
10728
|
+
}, xf = "register", Sf = () => {
|
|
10715
10729
|
if (typeof window > "u") return !1;
|
|
10716
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
10730
|
+
let e = new URLSearchParams(window.location.search).get(xf);
|
|
10717
10731
|
return e !== null && e !== "0" && e !== "false";
|
|
10718
|
-
},
|
|
10732
|
+
}, Cf = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, wf = ({ canAutoOpen: e, onClosed: t }) => {
|
|
10719
10733
|
let [n, r] = V(!1), [i, a] = V(!1), o = B(null), s = B(!1), c = B(t);
|
|
10720
10734
|
c.current = t;
|
|
10721
10735
|
let l = L(() => r(!0), []), u = L(() => {
|
|
10722
10736
|
o.current === null && (a(!0), o.current = window.setTimeout(() => {
|
|
10723
10737
|
o.current = null, a(!1), r(!1), c.current();
|
|
10724
|
-
},
|
|
10738
|
+
}, Cf() ? 0 : 160));
|
|
10725
10739
|
}, []);
|
|
10726
10740
|
return R(() => {
|
|
10727
|
-
s.current || !e || !
|
|
10741
|
+
s.current || !e || !Sf() || (s.current = !0, r(!0));
|
|
10728
10742
|
}, [e]), R(() => () => {
|
|
10729
10743
|
o.current !== null && window.clearTimeout(o.current);
|
|
10730
10744
|
}, []), {
|
|
@@ -10733,22 +10747,22 @@ var rd = {
|
|
|
10733
10747
|
open: l,
|
|
10734
10748
|
close: u
|
|
10735
10749
|
};
|
|
10736
|
-
},
|
|
10737
|
-
let c = P(), { workspace: l, account: u } = A(), d =
|
|
10750
|
+
}, Tf = "We took the payment but could not confirm your booking. Please contact the organiser.", Ef = ({ eventID: e, title: t, external: n, buttonText: r = "Register Now", additionalFields: i = [], startsAt: a, endsAt: o, eventUrl: s }) => {
|
|
10751
|
+
let c = P(), { workspace: l, account: u } = A(), d = bf({
|
|
10738
10752
|
eventID: e,
|
|
10739
10753
|
external: n,
|
|
10740
10754
|
workspaceId: l?.id
|
|
10741
|
-
}), f =
|
|
10755
|
+
}), f = _f(u), p = Vd(d.selectedTicket, null)?.isFree === !1, [m, h] = V(!1), [g, _] = V(null), [v, y] = V(null), [b, x] = V(null);
|
|
10742
10756
|
R(() => {
|
|
10743
10757
|
let t = Zd(e);
|
|
10744
10758
|
t && x({ email: t.email });
|
|
10745
10759
|
}, [e]);
|
|
10746
|
-
let [S, w] = V(null), T = B(null), E =
|
|
10760
|
+
let [S, w] = V(null), T = B(null), E = wf({
|
|
10747
10761
|
canAutoOpen: !n && !d.isLoading && d.tickets.length > 0 && !b,
|
|
10748
10762
|
onClosed: L(() => {
|
|
10749
10763
|
_(null), w(null), f.resetValidationDisplay();
|
|
10750
10764
|
}, [f.resetValidationDisplay])
|
|
10751
|
-
}), D =
|
|
10765
|
+
}), D = vf({
|
|
10752
10766
|
eventID: e,
|
|
10753
10767
|
workspaceId: l?.id,
|
|
10754
10768
|
selectedTicket: d.selectedTicket,
|
|
@@ -10767,9 +10781,9 @@ var rd = {
|
|
|
10767
10781
|
}, [e, f.values.email]), fe = L(async (e, t) => {
|
|
10768
10782
|
try {
|
|
10769
10783
|
let n = await c?.fetch?.url(`/v1/event/booking/${e}/confirm-booking`)?.options({ headers: { Origin: l?.id || "" } })?.post(t)?.json();
|
|
10770
|
-
n?.content?.data ? de(n.content.data) : _(
|
|
10784
|
+
n?.content?.data ? de(n.content.data) : _(Tf);
|
|
10771
10785
|
} catch (e) {
|
|
10772
|
-
c?.logger?.error("Failed to confirm booking after payment", { exception: G(e) }), _(
|
|
10786
|
+
c?.logger?.error("Failed to confirm booking after payment", { exception: G(e) }), _(Tf);
|
|
10773
10787
|
}
|
|
10774
10788
|
}, [
|
|
10775
10789
|
c,
|
|
@@ -10891,7 +10905,7 @@ var rd = {
|
|
|
10891
10905
|
children: r
|
|
10892
10906
|
})
|
|
10893
10907
|
}),
|
|
10894
|
-
E.isOpen && /* @__PURE__ */ U(
|
|
10908
|
+
E.isOpen && /* @__PURE__ */ U(df, {
|
|
10895
10909
|
title: v ? se : `Register for ${se}`,
|
|
10896
10910
|
when: oe,
|
|
10897
10911
|
priceLabel: v || !j ? void 0 : Id({
|
|
@@ -10919,7 +10933,7 @@ var rd = {
|
|
|
10919
10933
|
children: ie ? "Secure payment · confirmation sent to your email" : "No card needed · joining link sent to your email"
|
|
10920
10934
|
})
|
|
10921
10935
|
] }),
|
|
10922
|
-
children: v ? /* @__PURE__ */ U(
|
|
10936
|
+
children: v ? /* @__PURE__ */ U(pf, {
|
|
10923
10937
|
email: f.values.email.trim(),
|
|
10924
10938
|
eventTitle: se,
|
|
10925
10939
|
startsAt: a,
|
|
@@ -10934,7 +10948,7 @@ var rd = {
|
|
|
10934
10948
|
}) : /* @__PURE__ */ W("div", {
|
|
10935
10949
|
className: "flex flex-col gap-4",
|
|
10936
10950
|
children: [
|
|
10937
|
-
ae && /* @__PURE__ */ U(
|
|
10951
|
+
ae && /* @__PURE__ */ U(mf, {
|
|
10938
10952
|
tickets: d.tickets,
|
|
10939
10953
|
selectedTicket: d.selectedTicket,
|
|
10940
10954
|
onSelect: le,
|
|
@@ -11001,7 +11015,7 @@ var rd = {
|
|
|
11001
11015
|
onComplete: he
|
|
11002
11016
|
})
|
|
11003
11017
|
] });
|
|
11004
|
-
},
|
|
11018
|
+
}, Df = ({ blockInstance: e, blocks: t, theme: n }) => {
|
|
11005
11019
|
let r = Fe(), i = B(null), a = Co({
|
|
11006
11020
|
pageTheme: n ?? ho,
|
|
11007
11021
|
blocks: [e],
|
|
@@ -11025,7 +11039,7 @@ var rd = {
|
|
|
11025
11039
|
workspace_id: "devtools"
|
|
11026
11040
|
})
|
|
11027
11041
|
})] });
|
|
11028
|
-
},
|
|
11042
|
+
}, Of = 300, kf = ({ label: e, value: t, onChange: n }) => {
|
|
11029
11043
|
let [r, i] = V(() => JSON.stringify(t, null, 2)), [a, o] = V(null), s = B(null), c = B(JSON.stringify(t, null, 2));
|
|
11030
11044
|
R(() => {
|
|
11031
11045
|
let e = JSON.stringify(t, null, 2);
|
|
@@ -11040,7 +11054,7 @@ var rd = {
|
|
|
11040
11054
|
} catch (e) {
|
|
11041
11055
|
o(e.message);
|
|
11042
11056
|
}
|
|
11043
|
-
},
|
|
11057
|
+
}, Of);
|
|
11044
11058
|
}, [n]);
|
|
11045
11059
|
return R(() => () => {
|
|
11046
11060
|
s.current && clearTimeout(s.current);
|
|
@@ -11093,7 +11107,7 @@ var rd = {
|
|
|
11093
11107
|
})
|
|
11094
11108
|
]
|
|
11095
11109
|
});
|
|
11096
|
-
},
|
|
11110
|
+
}, Af = (e, t = 0) => {
|
|
11097
11111
|
let n = e.layouts[t];
|
|
11098
11112
|
if (!n) throw Error(`Layout index ${t} not found on block "${e.key}". Available: ${e.layouts.length}`);
|
|
11099
11113
|
let r = n.content && Object.keys(n.content).length > 0 ? n.content : Yr(e.content_schema), i = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -11122,7 +11136,7 @@ var rd = {
|
|
|
11122
11136
|
deleted_at: null,
|
|
11123
11137
|
site_version: "v2"
|
|
11124
11138
|
};
|
|
11125
|
-
},
|
|
11139
|
+
}, jf = [
|
|
11126
11140
|
{
|
|
11127
11141
|
key: "content",
|
|
11128
11142
|
label: "Content"
|
|
@@ -11135,8 +11149,8 @@ var rd = {
|
|
|
11135
11149
|
key: "config",
|
|
11136
11150
|
label: "Config"
|
|
11137
11151
|
}
|
|
11138
|
-
],
|
|
11139
|
-
let [i, a] = V(r), [o, s] = V("content"), [c, l] = V(!0), u = z(() =>
|
|
11152
|
+
], Mf = ({ schema: e, component: t, theme: n, defaultLayoutIndex: r = 0 }) => {
|
|
11153
|
+
let [i, a] = V(r), [o, s] = V("content"), [c, l] = V(!0), u = z(() => Af(e, i), [e, i]), [d, f] = V(u.content), [p, m] = V(u.styles), [h, g] = V(u.config), _ = z(() => ({
|
|
11140
11154
|
...u,
|
|
11141
11155
|
content: d,
|
|
11142
11156
|
styles: p,
|
|
@@ -11153,18 +11167,18 @@ var rd = {
|
|
|
11153
11167
|
]), y = L((t) => {
|
|
11154
11168
|
let n = Number(t.target.value);
|
|
11155
11169
|
a(n);
|
|
11156
|
-
let r =
|
|
11170
|
+
let r = Af(e, n);
|
|
11157
11171
|
f(r.content), m(r.styles), g(r.config);
|
|
11158
11172
|
}, [e]), b = L(() => {
|
|
11159
|
-
let t =
|
|
11173
|
+
let t = Af(e, i);
|
|
11160
11174
|
f(t.content), m(t.styles), g(t.config);
|
|
11161
11175
|
}, [e, i]);
|
|
11162
11176
|
return /* @__PURE__ */ W("div", {
|
|
11163
|
-
style:
|
|
11177
|
+
style: Nf,
|
|
11164
11178
|
children: [
|
|
11165
11179
|
/* @__PURE__ */ U("div", {
|
|
11166
|
-
style:
|
|
11167
|
-
children: /* @__PURE__ */ U(
|
|
11180
|
+
style: Pf,
|
|
11181
|
+
children: /* @__PURE__ */ U(Df, {
|
|
11168
11182
|
blockInstance: _,
|
|
11169
11183
|
blocks: v,
|
|
11170
11184
|
theme: n
|
|
@@ -11173,7 +11187,7 @@ var rd = {
|
|
|
11173
11187
|
!c && /* @__PURE__ */ U("button", {
|
|
11174
11188
|
type: "button",
|
|
11175
11189
|
onClick: () => l(!0),
|
|
11176
|
-
style:
|
|
11190
|
+
style: Ff,
|
|
11177
11191
|
title: "Open DevTools",
|
|
11178
11192
|
children: /* @__PURE__ */ W("svg", {
|
|
11179
11193
|
width: "18",
|
|
@@ -11188,10 +11202,10 @@ var rd = {
|
|
|
11188
11202
|
})
|
|
11189
11203
|
}),
|
|
11190
11204
|
c && /* @__PURE__ */ W("div", {
|
|
11191
|
-
style:
|
|
11205
|
+
style: If,
|
|
11192
11206
|
children: [
|
|
11193
11207
|
/* @__PURE__ */ W("div", {
|
|
11194
|
-
style:
|
|
11208
|
+
style: Lf,
|
|
11195
11209
|
children: [/* @__PURE__ */ W("div", {
|
|
11196
11210
|
style: {
|
|
11197
11211
|
display: "flex",
|
|
@@ -11199,10 +11213,10 @@ var rd = {
|
|
|
11199
11213
|
gap: 8
|
|
11200
11214
|
},
|
|
11201
11215
|
children: [/* @__PURE__ */ U("span", {
|
|
11202
|
-
style:
|
|
11216
|
+
style: Rf,
|
|
11203
11217
|
children: e.title
|
|
11204
11218
|
}), /* @__PURE__ */ W("span", {
|
|
11205
|
-
style:
|
|
11219
|
+
style: zf,
|
|
11206
11220
|
children: [
|
|
11207
11221
|
e.key,
|
|
11208
11222
|
":",
|
|
@@ -11219,7 +11233,7 @@ var rd = {
|
|
|
11219
11233
|
e.layouts.length > 1 && /* @__PURE__ */ U("select", {
|
|
11220
11234
|
value: i,
|
|
11221
11235
|
onChange: y,
|
|
11222
|
-
style:
|
|
11236
|
+
style: Bf,
|
|
11223
11237
|
children: e.layouts.map((e, t) => /* @__PURE__ */ U("option", {
|
|
11224
11238
|
value: t,
|
|
11225
11239
|
children: e.title || e.key
|
|
@@ -11228,13 +11242,13 @@ var rd = {
|
|
|
11228
11242
|
/* @__PURE__ */ U("button", {
|
|
11229
11243
|
type: "button",
|
|
11230
11244
|
onClick: b,
|
|
11231
|
-
style:
|
|
11245
|
+
style: Vf,
|
|
11232
11246
|
children: "Reset"
|
|
11233
11247
|
}),
|
|
11234
11248
|
/* @__PURE__ */ U("button", {
|
|
11235
11249
|
type: "button",
|
|
11236
11250
|
onClick: () => l(!1),
|
|
11237
|
-
style:
|
|
11251
|
+
style: Hf,
|
|
11238
11252
|
title: "Collapse DevTools",
|
|
11239
11253
|
children: /* @__PURE__ */ W("svg", {
|
|
11240
11254
|
width: "14",
|
|
@@ -11262,13 +11276,13 @@ var rd = {
|
|
|
11262
11276
|
})]
|
|
11263
11277
|
}),
|
|
11264
11278
|
/* @__PURE__ */ U("div", {
|
|
11265
|
-
style:
|
|
11266
|
-
children:
|
|
11279
|
+
style: Uf,
|
|
11280
|
+
children: jf.map((e) => /* @__PURE__ */ U("button", {
|
|
11267
11281
|
type: "button",
|
|
11268
11282
|
onClick: () => s(e.key),
|
|
11269
11283
|
style: {
|
|
11270
|
-
...
|
|
11271
|
-
...o === e.key ?
|
|
11284
|
+
...Wf,
|
|
11285
|
+
...o === e.key ? Gf : {}
|
|
11272
11286
|
},
|
|
11273
11287
|
children: e.label
|
|
11274
11288
|
}, e.key))
|
|
@@ -11281,7 +11295,7 @@ var rd = {
|
|
|
11281
11295
|
display: o === "content" ? "flex" : "none",
|
|
11282
11296
|
flexDirection: "column"
|
|
11283
11297
|
},
|
|
11284
|
-
children: /* @__PURE__ */ U(
|
|
11298
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11285
11299
|
label: "content",
|
|
11286
11300
|
value: d,
|
|
11287
11301
|
onChange: f
|
|
@@ -11295,7 +11309,7 @@ var rd = {
|
|
|
11295
11309
|
display: o === "styles" ? "flex" : "none",
|
|
11296
11310
|
flexDirection: "column"
|
|
11297
11311
|
},
|
|
11298
|
-
children: /* @__PURE__ */ U(
|
|
11312
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11299
11313
|
label: "styles",
|
|
11300
11314
|
value: p,
|
|
11301
11315
|
onChange: m
|
|
@@ -11309,7 +11323,7 @@ var rd = {
|
|
|
11309
11323
|
display: o === "config" ? "flex" : "none",
|
|
11310
11324
|
flexDirection: "column"
|
|
11311
11325
|
},
|
|
11312
|
-
children: /* @__PURE__ */ U(
|
|
11326
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11313
11327
|
label: "config",
|
|
11314
11328
|
value: h,
|
|
11315
11329
|
onChange: g
|
|
@@ -11319,16 +11333,16 @@ var rd = {
|
|
|
11319
11333
|
})
|
|
11320
11334
|
]
|
|
11321
11335
|
});
|
|
11322
|
-
},
|
|
11336
|
+
}, Nf = {
|
|
11323
11337
|
position: "relative",
|
|
11324
11338
|
width: "100%",
|
|
11325
11339
|
minHeight: "100vh",
|
|
11326
11340
|
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
11327
11341
|
color: "#1a1a1a"
|
|
11328
|
-
},
|
|
11342
|
+
}, Pf = {
|
|
11329
11343
|
width: "100%",
|
|
11330
11344
|
minHeight: "100vh"
|
|
11331
|
-
},
|
|
11345
|
+
}, Ff = {
|
|
11332
11346
|
position: "fixed",
|
|
11333
11347
|
bottom: 20,
|
|
11334
11348
|
right: 20,
|
|
@@ -11346,7 +11360,7 @@ var rd = {
|
|
|
11346
11360
|
justifyContent: "center",
|
|
11347
11361
|
color: "#374151",
|
|
11348
11362
|
transition: "transform 0.15s ease, box-shadow 0.15s ease"
|
|
11349
|
-
},
|
|
11363
|
+
}, If = {
|
|
11350
11364
|
position: "fixed",
|
|
11351
11365
|
top: 12,
|
|
11352
11366
|
right: 12,
|
|
@@ -11362,38 +11376,38 @@ var rd = {
|
|
|
11362
11376
|
boxShadow: "0 8px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",
|
|
11363
11377
|
overflow: "hidden",
|
|
11364
11378
|
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
|
|
11365
|
-
},
|
|
11379
|
+
}, Lf = {
|
|
11366
11380
|
display: "flex",
|
|
11367
11381
|
alignItems: "center",
|
|
11368
11382
|
justifyContent: "space-between",
|
|
11369
11383
|
padding: "10px 12px",
|
|
11370
11384
|
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
11371
11385
|
flexShrink: 0
|
|
11372
|
-
},
|
|
11386
|
+
}, Rf = {
|
|
11373
11387
|
fontSize: 13,
|
|
11374
11388
|
fontWeight: 600
|
|
11375
|
-
},
|
|
11389
|
+
}, zf = {
|
|
11376
11390
|
fontSize: 10,
|
|
11377
11391
|
fontFamily: "monospace",
|
|
11378
11392
|
color: "#6b7280",
|
|
11379
11393
|
backgroundColor: "#f3f4f6",
|
|
11380
11394
|
padding: "2px 5px",
|
|
11381
11395
|
borderRadius: 4
|
|
11382
|
-
},
|
|
11396
|
+
}, Bf = {
|
|
11383
11397
|
fontSize: 12,
|
|
11384
11398
|
padding: "3px 6px",
|
|
11385
11399
|
border: "1px solid #d1d5db",
|
|
11386
11400
|
borderRadius: 4,
|
|
11387
11401
|
backgroundColor: "#fff",
|
|
11388
11402
|
cursor: "pointer"
|
|
11389
|
-
},
|
|
11403
|
+
}, Vf = {
|
|
11390
11404
|
fontSize: 12,
|
|
11391
11405
|
padding: "3px 8px",
|
|
11392
11406
|
border: "1px solid #d1d5db",
|
|
11393
11407
|
borderRadius: 4,
|
|
11394
11408
|
backgroundColor: "#fff",
|
|
11395
11409
|
cursor: "pointer"
|
|
11396
|
-
},
|
|
11410
|
+
}, Hf = {
|
|
11397
11411
|
display: "flex",
|
|
11398
11412
|
alignItems: "center",
|
|
11399
11413
|
justifyContent: "center",
|
|
@@ -11404,11 +11418,11 @@ var rd = {
|
|
|
11404
11418
|
backgroundColor: "transparent",
|
|
11405
11419
|
cursor: "pointer",
|
|
11406
11420
|
color: "#6b7280"
|
|
11407
|
-
},
|
|
11421
|
+
}, Uf = {
|
|
11408
11422
|
display: "flex",
|
|
11409
11423
|
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
11410
11424
|
flexShrink: 0
|
|
11411
|
-
},
|
|
11425
|
+
}, Wf = {
|
|
11412
11426
|
fontSize: 12,
|
|
11413
11427
|
padding: "7px 14px",
|
|
11414
11428
|
border: "none",
|
|
@@ -11416,11 +11430,11 @@ var rd = {
|
|
|
11416
11430
|
backgroundColor: "transparent",
|
|
11417
11431
|
cursor: "pointer",
|
|
11418
11432
|
color: "#6b7280"
|
|
11419
|
-
},
|
|
11433
|
+
}, Gf = {
|
|
11420
11434
|
color: "#1a1a1a",
|
|
11421
11435
|
borderBottomColor: "#1a1a1a",
|
|
11422
11436
|
fontWeight: 500
|
|
11423
|
-
},
|
|
11437
|
+
}, Kf = ["element", "group"], qf = /* @__PURE__ */ "BoxWidget.ButtonWidget.LayoutWidget.HeadingWidget.IframeWidget.ImageWidget.IconWidget.MediaWidget.TypographyWidget.BlogContentWidget.CarouselWidget.FormWidget.ContainerWidget.UserMenuWidget.TabsListWidget.TabsTriggerWidget.TabsContentWidget.NavMenuWidget.CardWidget.TitleWidget.TextWidget.NumberWidget.URLWidget.ImageUploadWidget.MultiImageUploadWidget.TextareaWidget.RichTextWidget.DropdownWidget.SwitchWidget.DateWidget.ArrayWidget.RecordWidget".split("."), Jf = qf.reduce((e, t) => (e[t] = t, e), {}), Yf = [
|
|
11424
11438
|
"collection",
|
|
11425
11439
|
"event",
|
|
11426
11440
|
"blog",
|
|
@@ -11430,7 +11444,7 @@ var rd = {
|
|
|
11430
11444
|
"blog_author",
|
|
11431
11445
|
"blog_category",
|
|
11432
11446
|
"blog_tag"
|
|
11433
|
-
],
|
|
11447
|
+
], Xf = [
|
|
11434
11448
|
"linkedin",
|
|
11435
11449
|
"google",
|
|
11436
11450
|
"oauth",
|
|
@@ -11441,4 +11455,4 @@ var rd = {
|
|
|
11441
11455
|
"password"
|
|
11442
11456
|
];
|
|
11443
11457
|
//#endregion
|
|
11444
|
-
export { Ce as ALTERNATE_METHOD_VALUES, ye as ALTERNATIVE_AUTH_METHODS, Os as AccordionContent, Es as AccordionItem, Ts as AccordionRoot, Ds as AccordionTrigger, ne as AuthProvider, xe as AuthenticationOptions, Wu as Avatar, Yu as AvatarBadge, qu as AvatarFallback, Ju as AvatarFallbackV2, Xu as AvatarGroup, Zu as AvatarGroupCount, Gu as AvatarImage, Ku as AvatarImageV2, lu as BUILT_IN_PRESETS, Eu as BackgroundEffects, dc as BaseBlogContent, O as BaseButton, Dc as BaseContainer, Yl as BaseHeading, fd as BaseLanguageSwitcher, Du as BaseSection, Lu as BaseTypography, zu as BaseUserMenu, v as BlockProvider,
|
|
11458
|
+
export { Ce as ALTERNATE_METHOD_VALUES, ye as ALTERNATIVE_AUTH_METHODS, Os as AccordionContent, Es as AccordionItem, Ts as AccordionRoot, Ds as AccordionTrigger, ne as AuthProvider, xe as AuthenticationOptions, Wu as Avatar, Yu as AvatarBadge, qu as AvatarFallback, Ju as AvatarFallbackV2, Xu as AvatarGroup, Zu as AvatarGroupCount, Gu as AvatarImage, Ku as AvatarImageV2, lu as BUILT_IN_PRESETS, Eu as BackgroundEffects, dc as BaseBlogContent, O as BaseButton, Dc as BaseContainer, Yl as BaseHeading, fd as BaseLanguageSwitcher, Du as BaseSection, Lu as BaseTypography, zu as BaseUserMenu, v as BlockProvider, Yf as BlockSourceModuleList, Go as BlocksRegistry, fc as BlogContent, Vu as BookingConfirmation, Uu as BookingModal, Hu as BookingSummary, hc as Box, C as Button, ed as Calendar, Ec as Carousel, bc as CarouselContent, wc as CarouselDotButton, Tc as CarouselDots, xc as CarouselItem, Cc as CarouselNext, Sc as CarouselPrevious, Fc as CategoryFilter, _l as CommentStatusBadge, Fl as Comments, Wl as CommentsRestrictionOverlay, Oc as Container, Ll as CreateForumPost, J as DATA_ATTRIBUTES, sa as DATE_DISPLAYS, ca as DATE_FORMATS, da as DATE_HOUR12_VALUES, ua as DATE_LOCALES, la as DATE_STYLES, fa as DEFAULT_DATE_SPEC, _ as DEFAULT_FROM_STATE, ho as DEFAULT_THEME, T as DEFAULT_TRANSITION, S as DEFAULT_VIEWPORT, y as DEFAULT_VISIBLE_STATE, Mf as DevTools, Df as DevToolsPreview, Ac as EditForm, Pc as Form, Cl as FormInput, nd as FormTextarea, Bl as ForumPost, Lc as ForumProvider, cd as GlobalSearch, Xl as Heading, Xf as IMembershipAuthenticationMethods, E as Icon, Ql as Iframe, iu as Image, vl as Input, xd as IntegrationFilters, Hl as JoinRequestForm, kf as JsonEditor, Yo as KBChat, Qu as Kbd, $u as KbdGroup, Kf as KindList, pd as LanguageSwitcher, zo as LazyMotionProvider, Zo as LevoBlock, ls as LevoPage, ou as Link, Y as MESSAGE_TYPES, es as MadeWithLevo, cu as Media, _e as PENDING_APPROVAL_ERROR_CODE, uu as PRESET_CATEGORIES, du as PRESET_MAP, he as PRIMARY_AUTH_METHODS, be as PRIMARY_METHOD_VALUES, Gl as PendingRequestState, Zc as PopoverContent, qc as PopoverRoot, Xc as PopoverTrigger, m as PopupLoader, ol as PostActions, tl as PostCategory, rl as PostContent, cl as PostGallery, el as PostHeader, sl as PostLink, Vl as PostLinkWrapper, pl as PostPoll, hl as PostStatusBadge, nl as PostTitle, ql as PostsRestrictionOverlay, Mi as PreviewHighlighter, Ef as RegisterModal, Ul as SampleCommentSkeleton, Kl as SamplePostSkeleton, Jl as SearchInput, Ou as Section, Wc as SimpleTooltipWrapper, Q as Skeleton, il as StatContainer, _s as StudioPreview, qf as StudioWidgetList, Jf as StudioWidgetMap, Fu as TabsContent, Nu as TabsList, ku as TabsRoot, Pu as TabsTrigger, Bc as Tooltip, Uc as TooltipContent, Hc as TooltipPortal, zc as TooltipProvider, Vc as TooltipTrigger, Ru as Typography, Bu as UserMenu, La as VARIABLE_SINGLE_TOKEN_REGEX, Ia as VARIABLE_TOKEN_REGEX, Ma as VARIABLE_TRANSFORMS, Ko as blocksRegistry, ud as buildLocalizedHref, Zi as clearContentCache, Xa as colorOptions, lc as convertHtmlToJSON, Kr as convertKeysToPascalCase, no as cssOptionsMap, _a as dateSpecToArgs, Fa as evaluateVariableToken, ko as fetchCollectionSchema, Oo as fetchSource, vs as findFieldSchema, ys as flattenVariableMatches, Ja as generateAccentColor, Ni as generateBodyContent, Yr as generateDefaultContent, Vr as generateSchemaFromJSX, So as generateThemeStyles, yo as generateThemeVariables, p as generateVariantClasses, pu as getAvailableCategories, gu as getEffectConfigFromPresetId, Lo as getInitialPageContent, $i as getKeysWithValue, w as getNestedValue, Ro as getPageData, Po as getPageSource, fu as getPresetsByCategory, qa as getWcagContrast, Ua as hexToOKLCH, Se as isAlternateMethod, D as isConfigWithVariants, ge as isPendingApprovalError, ve as isPrimaryMethod, Ha as isValidOKLCH, _o as normalizeColorName, vo as normalizeFontName, Va as oklchStringToRGBA, Ka as oklchToHex, Ga as oklchToRGBA, X as oklchToString, ga as parseDateSpec, h as parseGroupContext, Wa as parseOKLCHString, ia as parseVariableToken, Fo as parseVariablesFromResolvedSource, go as processFonts, Co as processTheme, Qi as resetContentCache, No as resolveStyles, Mo as resolveVariables, za as rgbaToOKLCH, Ba as rgbaToOKLCHString, vu as sanitizeBackgroundEffectConfig, x as sanitizeElementKey, Xi as schemaCache, Af as schemaToBlockInstance, xa as snapDateStyle, Yi as sourceCache, ba as stylesFor, A as useAuth, f as useBlockContext, k as useCommonProps, Bo as useContentEngine, Vo as useContextEngine, vc as useDotButton, Rc as useForumContext, g as useGeneratedClassName, ee as useLanguageVariants, fe as useLogin, Ho as usePageContext, Uo as usePageMeta, pe as useStripePayment, aa as variableTokenToString };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/studio",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo Studio components and utilities for building block-based pages",
|
|
6
6
|
"type": "module",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"react": ">=19",
|
|
120
120
|
"next": ">=14",
|
|
121
121
|
"react-dom": ">=19",
|
|
122
|
-
"@levo-so/
|
|
122
|
+
"@levo-so/core": "0.2.1",
|
|
123
123
|
"@levo-so/react": "0.2.1",
|
|
124
|
-
"@levo-so/
|
|
124
|
+
"@levo-so/insights": "0.2.1"
|
|
125
125
|
}
|
|
126
126
|
}
|