@levo-so/studio 0.3.4 → 0.3.6
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 +114 -94
- package/package.json +1 -1
- package/studio.css +1 -1
package/index.js
CHANGED
|
@@ -10244,7 +10244,20 @@ 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({
|
|
10253
|
+
height: e.height,
|
|
10254
|
+
offsetTop: e.offsetTop
|
|
10255
|
+
});
|
|
10256
|
+
return n(), e.addEventListener("resize", n), e.addEventListener("scroll", n), () => {
|
|
10257
|
+
e.removeEventListener("resize", n), e.removeEventListener("scroll", n);
|
|
10258
|
+
};
|
|
10259
|
+
}, []), e;
|
|
10260
|
+
}, lf = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),summary,[tabindex]:not([tabindex=\"-1\"])", uf = (e) => {
|
|
10248
10261
|
R(() => {
|
|
10249
10262
|
if (!e || typeof document > "u") return;
|
|
10250
10263
|
let { body: t } = document, n = window.scrollY, r = {
|
|
@@ -10257,19 +10270,19 @@ var rd = {
|
|
|
10257
10270
|
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
10271
|
};
|
|
10259
10272
|
}, [e]);
|
|
10260
|
-
},
|
|
10261
|
-
let u = Fe(), d = B(null),
|
|
10262
|
-
|
|
10263
|
-
let
|
|
10264
|
-
|
|
10273
|
+
}, df = ({ title: e, when: t, priceLabel: n, isFree: r, isClosing: i, onClose: a, onSubmit: o, footer: s, wide: c, children: l }) => {
|
|
10274
|
+
let u = Fe(), d = B(null), f = cf(), [p, m] = V(!1);
|
|
10275
|
+
uf(!0);
|
|
10276
|
+
let h = B(a);
|
|
10277
|
+
h.current = a, R(() => {
|
|
10265
10278
|
let e = document.activeElement, t = (e) => {
|
|
10266
10279
|
if (document.querySelector("[data-radix-popper-content-wrapper]")) return;
|
|
10267
10280
|
if (e.key === "Escape") {
|
|
10268
|
-
e.stopPropagation(),
|
|
10281
|
+
e.stopPropagation(), h.current();
|
|
10269
10282
|
return;
|
|
10270
10283
|
}
|
|
10271
10284
|
if (e.key !== "Tab" || !d.current) return;
|
|
10272
|
-
let t = Array.from(d.current.querySelectorAll(
|
|
10285
|
+
let t = Array.from(d.current.querySelectorAll(lf)).filter((e) => e.offsetParent !== null);
|
|
10273
10286
|
if (t.length === 0) return;
|
|
10274
10287
|
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
10275
10288
|
e.shiftKey && (i === n || !d.current.contains(i)) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
@@ -10278,20 +10291,27 @@ var rd = {
|
|
|
10278
10291
|
document.removeEventListener("keydown", t), e?.focus?.();
|
|
10279
10292
|
};
|
|
10280
10293
|
}, []);
|
|
10281
|
-
let
|
|
10282
|
-
onScroll: (e) =>
|
|
10294
|
+
let g = /* @__PURE__ */ U("div", {
|
|
10295
|
+
onScroll: (e) => m(e.currentTarget.scrollTop > 2),
|
|
10283
10296
|
className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain",
|
|
10284
|
-
children:
|
|
10285
|
-
className: "
|
|
10286
|
-
children:
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10297
|
+
children: /* @__PURE__ */ W("div", {
|
|
10298
|
+
className: "flex min-h-full flex-col",
|
|
10299
|
+
children: [/* @__PURE__ */ U("div", {
|
|
10300
|
+
className: "flex flex-1 flex-col px-5 pt-4 pb-3",
|
|
10301
|
+
children: l
|
|
10302
|
+
}), s && /* @__PURE__ */ U("div", {
|
|
10303
|
+
className: "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",
|
|
10304
|
+
children: s
|
|
10305
|
+
})]
|
|
10306
|
+
})
|
|
10291
10307
|
});
|
|
10292
10308
|
return /* @__PURE__ */ U(zn.Root, { children: /* @__PURE__ */ U("div", {
|
|
10293
|
-
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"),
|
|
10294
|
-
style: {
|
|
10309
|
+
className: M("fixed inset-x-0 z-[2147483000] flex h-[var(--viewport-height)] 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"),
|
|
10310
|
+
style: {
|
|
10311
|
+
animationDuration: `${i ? 160 : sf}ms`,
|
|
10312
|
+
"--viewport-height": f ? `${f.height}px` : "100dvh",
|
|
10313
|
+
top: f ? `${f.offsetTop}px` : 0
|
|
10314
|
+
},
|
|
10295
10315
|
onMouseDown: (e) => {
|
|
10296
10316
|
e.target === e.currentTarget && a();
|
|
10297
10317
|
},
|
|
@@ -10300,10 +10320,10 @@ var rd = {
|
|
|
10300
10320
|
role: "dialog",
|
|
10301
10321
|
"aria-modal": "true",
|
|
10302
10322
|
"aria-labelledby": u,
|
|
10303
|
-
className: M("relative flex h-
|
|
10323
|
+
className: M("relative flex h-full max-h-full 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]"),
|
|
10304
10324
|
style: { animationDuration: `${i ? 160 : sf}ms` },
|
|
10305
10325
|
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",
|
|
10326
|
+
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
10327
|
children: [/* @__PURE__ */ W("div", {
|
|
10308
10328
|
className: "mb-2.5 flex items-center justify-between gap-3",
|
|
10309
10329
|
children: [/* @__PURE__ */ U("h2", {
|
|
@@ -10339,11 +10359,11 @@ var rd = {
|
|
|
10339
10359
|
}), o ? /* @__PURE__ */ U("form", {
|
|
10340
10360
|
onSubmit: o,
|
|
10341
10361
|
className: "flex min-h-0 flex-1 flex-col",
|
|
10342
|
-
children:
|
|
10343
|
-
}) :
|
|
10362
|
+
children: g
|
|
10363
|
+
}) : g]
|
|
10344
10364
|
})
|
|
10345
10365
|
}) });
|
|
10346
|
-
},
|
|
10366
|
+
}, 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
10367
|
let d = Yd({
|
|
10348
10368
|
title: t,
|
|
10349
10369
|
startsAt: n,
|
|
@@ -10355,7 +10375,7 @@ var rd = {
|
|
|
10355
10375
|
}, []), /* @__PURE__ */ W("div", {
|
|
10356
10376
|
className: "flex flex-1 flex-col items-center justify-center px-6 py-9 text-center",
|
|
10357
10377
|
children: [
|
|
10358
|
-
/* @__PURE__ */ U("style", { dangerouslySetInnerHTML: { __html:
|
|
10378
|
+
/* @__PURE__ */ U("style", { dangerouslySetInnerHTML: { __html: ff } }),
|
|
10359
10379
|
/* @__PURE__ */ U("div", {
|
|
10360
10380
|
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
10381
|
children: /* @__PURE__ */ W("svg", {
|
|
@@ -10500,7 +10520,7 @@ var rd = {
|
|
|
10500
10520
|
})
|
|
10501
10521
|
]
|
|
10502
10522
|
});
|
|
10503
|
-
},
|
|
10523
|
+
}, mf = ({ tickets: e, selectedTicket: t, onSelect: n, error: r }) => {
|
|
10504
10524
|
let [i, a] = V(!t);
|
|
10505
10525
|
return /* @__PURE__ */ W("fieldset", {
|
|
10506
10526
|
className: "flex flex-col gap-2",
|
|
@@ -10577,7 +10597,7 @@ var rd = {
|
|
|
10577
10597
|
})
|
|
10578
10598
|
]
|
|
10579
10599
|
});
|
|
10580
|
-
},
|
|
10600
|
+
}, hf = {
|
|
10581
10601
|
name: "",
|
|
10582
10602
|
email: "",
|
|
10583
10603
|
designation: "",
|
|
@@ -10596,11 +10616,11 @@ var rd = {
|
|
|
10596
10616
|
country: ""
|
|
10597
10617
|
}
|
|
10598
10618
|
}
|
|
10599
|
-
},
|
|
10619
|
+
}, gf = (e) => {
|
|
10600
10620
|
let t = {};
|
|
10601
10621
|
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(
|
|
10622
|
+
}, _f = (e) => {
|
|
10623
|
+
let [t, n] = V(hf), [r, i] = V({}), [a, o] = V(!1), s = B(!1);
|
|
10604
10624
|
R(() => {
|
|
10605
10625
|
s.current || !e || (s.current = !0, n((t) => ({
|
|
10606
10626
|
...t,
|
|
@@ -10608,14 +10628,14 @@ var rd = {
|
|
|
10608
10628
|
email: t.email || e.email || ""
|
|
10609
10629
|
})));
|
|
10610
10630
|
}, [e]);
|
|
10611
|
-
let c =
|
|
10631
|
+
let c = gf(t), l = L((e, t) => n((n) => ({
|
|
10612
10632
|
...n,
|
|
10613
10633
|
[e]: t
|
|
10614
10634
|
})), []), u = L((e) => i((t) => ({
|
|
10615
10635
|
...t,
|
|
10616
10636
|
[e]: !0
|
|
10617
10637
|
})), []), d = L(() => {
|
|
10618
|
-
n(
|
|
10638
|
+
n(hf), i({}), o(!1), s.current = !0;
|
|
10619
10639
|
}, []), f = L(() => {
|
|
10620
10640
|
i({}), o(!1);
|
|
10621
10641
|
}, []);
|
|
@@ -10636,7 +10656,7 @@ var rd = {
|
|
|
10636
10656
|
} : r,
|
|
10637
10657
|
fieldError: (e) => a || r[e] ? c[e] : void 0
|
|
10638
10658
|
};
|
|
10639
|
-
},
|
|
10659
|
+
}, vf = ({ eventID: e, workspaceId: t, selectedTicket: n, enabled: r }) => {
|
|
10640
10660
|
let i = P(), [a, o] = V(""), [s, c] = V(null), [l, u] = V(!1), [d, f] = V(null), [p, m] = V([]);
|
|
10641
10661
|
return R(() => {
|
|
10642
10662
|
!r || !e || i?.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.options({ headers: { Origin: t || "" } })?.get().json().then((e) => {
|
|
@@ -10689,13 +10709,13 @@ var rd = {
|
|
|
10689
10709
|
o(""), c(null), f(null);
|
|
10690
10710
|
}, [])
|
|
10691
10711
|
};
|
|
10692
|
-
},
|
|
10712
|
+
}, yf = async (e, t, n) => {
|
|
10693
10713
|
let r = new URLSearchParams();
|
|
10694
10714
|
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
|
-
},
|
|
10715
|
+
}, bf = ({ eventID: e, external: t, workspaceId: n }) => {
|
|
10696
10716
|
let r = P(), [i, a] = V([]), [o, s] = V(!t), [c, l] = V(!1), [u, d] = V(null);
|
|
10697
10717
|
return R(() => {
|
|
10698
|
-
t || !e || (s(!0),
|
|
10718
|
+
t || !e || (s(!0), yf(r, e, n ?? "").then((e) => {
|
|
10699
10719
|
a(e), e.length === 1 && d(e[0] ?? null);
|
|
10700
10720
|
}).catch((e) => {
|
|
10701
10721
|
l(!0), r?.logger?.error("Failed to load event tickets", { exception: G(e) });
|
|
@@ -10711,20 +10731,20 @@ var rd = {
|
|
|
10711
10731
|
selectedTicket: u,
|
|
10712
10732
|
selectTicket: d
|
|
10713
10733
|
};
|
|
10714
|
-
},
|
|
10734
|
+
}, xf = "register", Sf = () => {
|
|
10715
10735
|
if (typeof window > "u") return !1;
|
|
10716
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
10736
|
+
let e = new URLSearchParams(window.location.search).get(xf);
|
|
10717
10737
|
return e !== null && e !== "0" && e !== "false";
|
|
10718
|
-
},
|
|
10738
|
+
}, Cf = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, wf = ({ canAutoOpen: e, onClosed: t }) => {
|
|
10719
10739
|
let [n, r] = V(!1), [i, a] = V(!1), o = B(null), s = B(!1), c = B(t);
|
|
10720
10740
|
c.current = t;
|
|
10721
10741
|
let l = L(() => r(!0), []), u = L(() => {
|
|
10722
10742
|
o.current === null && (a(!0), o.current = window.setTimeout(() => {
|
|
10723
10743
|
o.current = null, a(!1), r(!1), c.current();
|
|
10724
|
-
},
|
|
10744
|
+
}, Cf() ? 0 : 160));
|
|
10725
10745
|
}, []);
|
|
10726
10746
|
return R(() => {
|
|
10727
|
-
s.current || !e || !
|
|
10747
|
+
s.current || !e || !Sf() || (s.current = !0, r(!0));
|
|
10728
10748
|
}, [e]), R(() => () => {
|
|
10729
10749
|
o.current !== null && window.clearTimeout(o.current);
|
|
10730
10750
|
}, []), {
|
|
@@ -10733,22 +10753,22 @@ var rd = {
|
|
|
10733
10753
|
open: l,
|
|
10734
10754
|
close: u
|
|
10735
10755
|
};
|
|
10736
|
-
},
|
|
10737
|
-
let c = P(), { workspace: l, account: u } = A(), d =
|
|
10756
|
+
}, 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 }) => {
|
|
10757
|
+
let c = P(), { workspace: l, account: u } = A(), d = bf({
|
|
10738
10758
|
eventID: e,
|
|
10739
10759
|
external: n,
|
|
10740
10760
|
workspaceId: l?.id
|
|
10741
|
-
}), f =
|
|
10761
|
+
}), 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
10762
|
R(() => {
|
|
10743
10763
|
let t = Zd(e);
|
|
10744
10764
|
t && x({ email: t.email });
|
|
10745
10765
|
}, [e]);
|
|
10746
|
-
let [S, w] = V(null), T = B(null), E =
|
|
10766
|
+
let [S, w] = V(null), T = B(null), E = wf({
|
|
10747
10767
|
canAutoOpen: !n && !d.isLoading && d.tickets.length > 0 && !b,
|
|
10748
10768
|
onClosed: L(() => {
|
|
10749
10769
|
_(null), w(null), f.resetValidationDisplay();
|
|
10750
10770
|
}, [f.resetValidationDisplay])
|
|
10751
|
-
}), D =
|
|
10771
|
+
}), D = vf({
|
|
10752
10772
|
eventID: e,
|
|
10753
10773
|
workspaceId: l?.id,
|
|
10754
10774
|
selectedTicket: d.selectedTicket,
|
|
@@ -10767,9 +10787,9 @@ var rd = {
|
|
|
10767
10787
|
}, [e, f.values.email]), fe = L(async (e, t) => {
|
|
10768
10788
|
try {
|
|
10769
10789
|
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) : _(
|
|
10790
|
+
n?.content?.data ? de(n.content.data) : _(Tf);
|
|
10771
10791
|
} catch (e) {
|
|
10772
|
-
c?.logger?.error("Failed to confirm booking after payment", { exception: G(e) }), _(
|
|
10792
|
+
c?.logger?.error("Failed to confirm booking after payment", { exception: G(e) }), _(Tf);
|
|
10773
10793
|
}
|
|
10774
10794
|
}, [
|
|
10775
10795
|
c,
|
|
@@ -10891,7 +10911,7 @@ var rd = {
|
|
|
10891
10911
|
children: r
|
|
10892
10912
|
})
|
|
10893
10913
|
}),
|
|
10894
|
-
E.isOpen && /* @__PURE__ */ U(
|
|
10914
|
+
E.isOpen && /* @__PURE__ */ U(df, {
|
|
10895
10915
|
title: v ? se : `Register for ${se}`,
|
|
10896
10916
|
when: oe,
|
|
10897
10917
|
priceLabel: v || !j ? void 0 : Id({
|
|
@@ -10919,7 +10939,7 @@ var rd = {
|
|
|
10919
10939
|
children: ie ? "Secure payment · confirmation sent to your email" : "No card needed · joining link sent to your email"
|
|
10920
10940
|
})
|
|
10921
10941
|
] }),
|
|
10922
|
-
children: v ? /* @__PURE__ */ U(
|
|
10942
|
+
children: v ? /* @__PURE__ */ U(pf, {
|
|
10923
10943
|
email: f.values.email.trim(),
|
|
10924
10944
|
eventTitle: se,
|
|
10925
10945
|
startsAt: a,
|
|
@@ -10934,7 +10954,7 @@ var rd = {
|
|
|
10934
10954
|
}) : /* @__PURE__ */ W("div", {
|
|
10935
10955
|
className: "flex flex-col gap-4",
|
|
10936
10956
|
children: [
|
|
10937
|
-
ae && /* @__PURE__ */ U(
|
|
10957
|
+
ae && /* @__PURE__ */ U(mf, {
|
|
10938
10958
|
tickets: d.tickets,
|
|
10939
10959
|
selectedTicket: d.selectedTicket,
|
|
10940
10960
|
onSelect: le,
|
|
@@ -11001,7 +11021,7 @@ var rd = {
|
|
|
11001
11021
|
onComplete: he
|
|
11002
11022
|
})
|
|
11003
11023
|
] });
|
|
11004
|
-
},
|
|
11024
|
+
}, Df = ({ blockInstance: e, blocks: t, theme: n }) => {
|
|
11005
11025
|
let r = Fe(), i = B(null), a = Co({
|
|
11006
11026
|
pageTheme: n ?? ho,
|
|
11007
11027
|
blocks: [e],
|
|
@@ -11025,7 +11045,7 @@ var rd = {
|
|
|
11025
11045
|
workspace_id: "devtools"
|
|
11026
11046
|
})
|
|
11027
11047
|
})] });
|
|
11028
|
-
},
|
|
11048
|
+
}, Of = 300, kf = ({ label: e, value: t, onChange: n }) => {
|
|
11029
11049
|
let [r, i] = V(() => JSON.stringify(t, null, 2)), [a, o] = V(null), s = B(null), c = B(JSON.stringify(t, null, 2));
|
|
11030
11050
|
R(() => {
|
|
11031
11051
|
let e = JSON.stringify(t, null, 2);
|
|
@@ -11040,7 +11060,7 @@ var rd = {
|
|
|
11040
11060
|
} catch (e) {
|
|
11041
11061
|
o(e.message);
|
|
11042
11062
|
}
|
|
11043
|
-
},
|
|
11063
|
+
}, Of);
|
|
11044
11064
|
}, [n]);
|
|
11045
11065
|
return R(() => () => {
|
|
11046
11066
|
s.current && clearTimeout(s.current);
|
|
@@ -11093,7 +11113,7 @@ var rd = {
|
|
|
11093
11113
|
})
|
|
11094
11114
|
]
|
|
11095
11115
|
});
|
|
11096
|
-
},
|
|
11116
|
+
}, Af = (e, t = 0) => {
|
|
11097
11117
|
let n = e.layouts[t];
|
|
11098
11118
|
if (!n) throw Error(`Layout index ${t} not found on block "${e.key}". Available: ${e.layouts.length}`);
|
|
11099
11119
|
let r = n.content && Object.keys(n.content).length > 0 ? n.content : Yr(e.content_schema), i = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -11122,7 +11142,7 @@ var rd = {
|
|
|
11122
11142
|
deleted_at: null,
|
|
11123
11143
|
site_version: "v2"
|
|
11124
11144
|
};
|
|
11125
|
-
},
|
|
11145
|
+
}, jf = [
|
|
11126
11146
|
{
|
|
11127
11147
|
key: "content",
|
|
11128
11148
|
label: "Content"
|
|
@@ -11135,8 +11155,8 @@ var rd = {
|
|
|
11135
11155
|
key: "config",
|
|
11136
11156
|
label: "Config"
|
|
11137
11157
|
}
|
|
11138
|
-
],
|
|
11139
|
-
let [i, a] = V(r), [o, s] = V("content"), [c, l] = V(!0), u = z(() =>
|
|
11158
|
+
], Mf = ({ schema: e, component: t, theme: n, defaultLayoutIndex: r = 0 }) => {
|
|
11159
|
+
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
11160
|
...u,
|
|
11141
11161
|
content: d,
|
|
11142
11162
|
styles: p,
|
|
@@ -11153,18 +11173,18 @@ var rd = {
|
|
|
11153
11173
|
]), y = L((t) => {
|
|
11154
11174
|
let n = Number(t.target.value);
|
|
11155
11175
|
a(n);
|
|
11156
|
-
let r =
|
|
11176
|
+
let r = Af(e, n);
|
|
11157
11177
|
f(r.content), m(r.styles), g(r.config);
|
|
11158
11178
|
}, [e]), b = L(() => {
|
|
11159
|
-
let t =
|
|
11179
|
+
let t = Af(e, i);
|
|
11160
11180
|
f(t.content), m(t.styles), g(t.config);
|
|
11161
11181
|
}, [e, i]);
|
|
11162
11182
|
return /* @__PURE__ */ W("div", {
|
|
11163
|
-
style:
|
|
11183
|
+
style: Nf,
|
|
11164
11184
|
children: [
|
|
11165
11185
|
/* @__PURE__ */ U("div", {
|
|
11166
|
-
style:
|
|
11167
|
-
children: /* @__PURE__ */ U(
|
|
11186
|
+
style: Pf,
|
|
11187
|
+
children: /* @__PURE__ */ U(Df, {
|
|
11168
11188
|
blockInstance: _,
|
|
11169
11189
|
blocks: v,
|
|
11170
11190
|
theme: n
|
|
@@ -11173,7 +11193,7 @@ var rd = {
|
|
|
11173
11193
|
!c && /* @__PURE__ */ U("button", {
|
|
11174
11194
|
type: "button",
|
|
11175
11195
|
onClick: () => l(!0),
|
|
11176
|
-
style:
|
|
11196
|
+
style: Ff,
|
|
11177
11197
|
title: "Open DevTools",
|
|
11178
11198
|
children: /* @__PURE__ */ W("svg", {
|
|
11179
11199
|
width: "18",
|
|
@@ -11188,10 +11208,10 @@ var rd = {
|
|
|
11188
11208
|
})
|
|
11189
11209
|
}),
|
|
11190
11210
|
c && /* @__PURE__ */ W("div", {
|
|
11191
|
-
style:
|
|
11211
|
+
style: If,
|
|
11192
11212
|
children: [
|
|
11193
11213
|
/* @__PURE__ */ W("div", {
|
|
11194
|
-
style:
|
|
11214
|
+
style: Lf,
|
|
11195
11215
|
children: [/* @__PURE__ */ W("div", {
|
|
11196
11216
|
style: {
|
|
11197
11217
|
display: "flex",
|
|
@@ -11199,10 +11219,10 @@ var rd = {
|
|
|
11199
11219
|
gap: 8
|
|
11200
11220
|
},
|
|
11201
11221
|
children: [/* @__PURE__ */ U("span", {
|
|
11202
|
-
style:
|
|
11222
|
+
style: Rf,
|
|
11203
11223
|
children: e.title
|
|
11204
11224
|
}), /* @__PURE__ */ W("span", {
|
|
11205
|
-
style:
|
|
11225
|
+
style: zf,
|
|
11206
11226
|
children: [
|
|
11207
11227
|
e.key,
|
|
11208
11228
|
":",
|
|
@@ -11219,7 +11239,7 @@ var rd = {
|
|
|
11219
11239
|
e.layouts.length > 1 && /* @__PURE__ */ U("select", {
|
|
11220
11240
|
value: i,
|
|
11221
11241
|
onChange: y,
|
|
11222
|
-
style:
|
|
11242
|
+
style: Bf,
|
|
11223
11243
|
children: e.layouts.map((e, t) => /* @__PURE__ */ U("option", {
|
|
11224
11244
|
value: t,
|
|
11225
11245
|
children: e.title || e.key
|
|
@@ -11228,13 +11248,13 @@ var rd = {
|
|
|
11228
11248
|
/* @__PURE__ */ U("button", {
|
|
11229
11249
|
type: "button",
|
|
11230
11250
|
onClick: b,
|
|
11231
|
-
style:
|
|
11251
|
+
style: Vf,
|
|
11232
11252
|
children: "Reset"
|
|
11233
11253
|
}),
|
|
11234
11254
|
/* @__PURE__ */ U("button", {
|
|
11235
11255
|
type: "button",
|
|
11236
11256
|
onClick: () => l(!1),
|
|
11237
|
-
style:
|
|
11257
|
+
style: Hf,
|
|
11238
11258
|
title: "Collapse DevTools",
|
|
11239
11259
|
children: /* @__PURE__ */ W("svg", {
|
|
11240
11260
|
width: "14",
|
|
@@ -11262,13 +11282,13 @@ var rd = {
|
|
|
11262
11282
|
})]
|
|
11263
11283
|
}),
|
|
11264
11284
|
/* @__PURE__ */ U("div", {
|
|
11265
|
-
style:
|
|
11266
|
-
children:
|
|
11285
|
+
style: Uf,
|
|
11286
|
+
children: jf.map((e) => /* @__PURE__ */ U("button", {
|
|
11267
11287
|
type: "button",
|
|
11268
11288
|
onClick: () => s(e.key),
|
|
11269
11289
|
style: {
|
|
11270
|
-
...
|
|
11271
|
-
...o === e.key ?
|
|
11290
|
+
...Wf,
|
|
11291
|
+
...o === e.key ? Gf : {}
|
|
11272
11292
|
},
|
|
11273
11293
|
children: e.label
|
|
11274
11294
|
}, e.key))
|
|
@@ -11281,7 +11301,7 @@ var rd = {
|
|
|
11281
11301
|
display: o === "content" ? "flex" : "none",
|
|
11282
11302
|
flexDirection: "column"
|
|
11283
11303
|
},
|
|
11284
|
-
children: /* @__PURE__ */ U(
|
|
11304
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11285
11305
|
label: "content",
|
|
11286
11306
|
value: d,
|
|
11287
11307
|
onChange: f
|
|
@@ -11295,7 +11315,7 @@ var rd = {
|
|
|
11295
11315
|
display: o === "styles" ? "flex" : "none",
|
|
11296
11316
|
flexDirection: "column"
|
|
11297
11317
|
},
|
|
11298
|
-
children: /* @__PURE__ */ U(
|
|
11318
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11299
11319
|
label: "styles",
|
|
11300
11320
|
value: p,
|
|
11301
11321
|
onChange: m
|
|
@@ -11309,7 +11329,7 @@ var rd = {
|
|
|
11309
11329
|
display: o === "config" ? "flex" : "none",
|
|
11310
11330
|
flexDirection: "column"
|
|
11311
11331
|
},
|
|
11312
|
-
children: /* @__PURE__ */ U(
|
|
11332
|
+
children: /* @__PURE__ */ U(kf, {
|
|
11313
11333
|
label: "config",
|
|
11314
11334
|
value: h,
|
|
11315
11335
|
onChange: g
|
|
@@ -11319,16 +11339,16 @@ var rd = {
|
|
|
11319
11339
|
})
|
|
11320
11340
|
]
|
|
11321
11341
|
});
|
|
11322
|
-
},
|
|
11342
|
+
}, Nf = {
|
|
11323
11343
|
position: "relative",
|
|
11324
11344
|
width: "100%",
|
|
11325
11345
|
minHeight: "100vh",
|
|
11326
11346
|
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
11327
11347
|
color: "#1a1a1a"
|
|
11328
|
-
},
|
|
11348
|
+
}, Pf = {
|
|
11329
11349
|
width: "100%",
|
|
11330
11350
|
minHeight: "100vh"
|
|
11331
|
-
},
|
|
11351
|
+
}, Ff = {
|
|
11332
11352
|
position: "fixed",
|
|
11333
11353
|
bottom: 20,
|
|
11334
11354
|
right: 20,
|
|
@@ -11346,7 +11366,7 @@ var rd = {
|
|
|
11346
11366
|
justifyContent: "center",
|
|
11347
11367
|
color: "#374151",
|
|
11348
11368
|
transition: "transform 0.15s ease, box-shadow 0.15s ease"
|
|
11349
|
-
},
|
|
11369
|
+
}, If = {
|
|
11350
11370
|
position: "fixed",
|
|
11351
11371
|
top: 12,
|
|
11352
11372
|
right: 12,
|
|
@@ -11362,38 +11382,38 @@ var rd = {
|
|
|
11362
11382
|
boxShadow: "0 8px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",
|
|
11363
11383
|
overflow: "hidden",
|
|
11364
11384
|
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
|
|
11365
|
-
},
|
|
11385
|
+
}, Lf = {
|
|
11366
11386
|
display: "flex",
|
|
11367
11387
|
alignItems: "center",
|
|
11368
11388
|
justifyContent: "space-between",
|
|
11369
11389
|
padding: "10px 12px",
|
|
11370
11390
|
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
11371
11391
|
flexShrink: 0
|
|
11372
|
-
},
|
|
11392
|
+
}, Rf = {
|
|
11373
11393
|
fontSize: 13,
|
|
11374
11394
|
fontWeight: 600
|
|
11375
|
-
},
|
|
11395
|
+
}, zf = {
|
|
11376
11396
|
fontSize: 10,
|
|
11377
11397
|
fontFamily: "monospace",
|
|
11378
11398
|
color: "#6b7280",
|
|
11379
11399
|
backgroundColor: "#f3f4f6",
|
|
11380
11400
|
padding: "2px 5px",
|
|
11381
11401
|
borderRadius: 4
|
|
11382
|
-
},
|
|
11402
|
+
}, Bf = {
|
|
11383
11403
|
fontSize: 12,
|
|
11384
11404
|
padding: "3px 6px",
|
|
11385
11405
|
border: "1px solid #d1d5db",
|
|
11386
11406
|
borderRadius: 4,
|
|
11387
11407
|
backgroundColor: "#fff",
|
|
11388
11408
|
cursor: "pointer"
|
|
11389
|
-
},
|
|
11409
|
+
}, Vf = {
|
|
11390
11410
|
fontSize: 12,
|
|
11391
11411
|
padding: "3px 8px",
|
|
11392
11412
|
border: "1px solid #d1d5db",
|
|
11393
11413
|
borderRadius: 4,
|
|
11394
11414
|
backgroundColor: "#fff",
|
|
11395
11415
|
cursor: "pointer"
|
|
11396
|
-
},
|
|
11416
|
+
}, Hf = {
|
|
11397
11417
|
display: "flex",
|
|
11398
11418
|
alignItems: "center",
|
|
11399
11419
|
justifyContent: "center",
|
|
@@ -11404,11 +11424,11 @@ var rd = {
|
|
|
11404
11424
|
backgroundColor: "transparent",
|
|
11405
11425
|
cursor: "pointer",
|
|
11406
11426
|
color: "#6b7280"
|
|
11407
|
-
},
|
|
11427
|
+
}, Uf = {
|
|
11408
11428
|
display: "flex",
|
|
11409
11429
|
borderBottom: "1px solid rgba(0,0,0,0.06)",
|
|
11410
11430
|
flexShrink: 0
|
|
11411
|
-
},
|
|
11431
|
+
}, Wf = {
|
|
11412
11432
|
fontSize: 12,
|
|
11413
11433
|
padding: "7px 14px",
|
|
11414
11434
|
border: "none",
|
|
@@ -11416,11 +11436,11 @@ var rd = {
|
|
|
11416
11436
|
backgroundColor: "transparent",
|
|
11417
11437
|
cursor: "pointer",
|
|
11418
11438
|
color: "#6b7280"
|
|
11419
|
-
},
|
|
11439
|
+
}, Gf = {
|
|
11420
11440
|
color: "#1a1a1a",
|
|
11421
11441
|
borderBottomColor: "#1a1a1a",
|
|
11422
11442
|
fontWeight: 500
|
|
11423
|
-
},
|
|
11443
|
+
}, 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
11444
|
"collection",
|
|
11425
11445
|
"event",
|
|
11426
11446
|
"blog",
|
|
@@ -11430,7 +11450,7 @@ var rd = {
|
|
|
11430
11450
|
"blog_author",
|
|
11431
11451
|
"blog_category",
|
|
11432
11452
|
"blog_tag"
|
|
11433
|
-
],
|
|
11453
|
+
], Xf = [
|
|
11434
11454
|
"linkedin",
|
|
11435
11455
|
"google",
|
|
11436
11456
|
"oauth",
|
|
@@ -11441,4 +11461,4 @@ var rd = {
|
|
|
11441
11461
|
"password"
|
|
11442
11462
|
];
|
|
11443
11463
|
//#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,
|
|
11464
|
+
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