@olonjs/core 1.1.7 → 1.1.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/dist/index.d.ts +24 -0
- package/dist/olonjs-core-runtime.js +200 -195
- package/dist/olonjs-core.js +3115 -3044
- package/dist/olonjs-core.umd.cjs +35 -35
- package/dist/runtime.d.ts +24 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Tt, { useContext as
|
|
1
|
+
import Tt, { useContext as Re, createContext as Ae, Component as rt, useMemo as ze, useState as ot, useEffect as oe, forwardRef as nt, createElement as Ne, useRef as Be, useLayoutEffect as Rt } from "react";
|
|
2
2
|
import { Link as At, createRoutesFromElements as _t, createBrowserRouter as Ot, RouterProvider as Pt, ScrollRestoration as zt, Outlet as Nt, useLocation as It, Route as ye } from "react-router-dom";
|
|
3
3
|
import { z as I } from "zod";
|
|
4
4
|
var xe = { exports: {} }, le = {};
|
|
@@ -282,7 +282,7 @@ var u = Mt();
|
|
|
282
282
|
function fe(e) {
|
|
283
283
|
return typeof e == "object" && e !== null;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Ce(e) {
|
|
286
286
|
if (!fe(e)) return !1;
|
|
287
287
|
const t = Object.getPrototypeOf(e);
|
|
288
288
|
return t === Object.prototype || t === null;
|
|
@@ -334,7 +334,7 @@ function Bt(e, t) {
|
|
|
334
334
|
return s && r.add(s), Array.from(r);
|
|
335
335
|
}
|
|
336
336
|
function me(e) {
|
|
337
|
-
return Array.isArray(e) ? e.map((t) => me(t)) :
|
|
337
|
+
return Array.isArray(e) ? e.map((t) => me(t)) : Ce(e) ? Object.fromEntries(
|
|
338
338
|
Object.entries(e).map(([t, r]) => [t, me(r)])
|
|
339
339
|
) : e;
|
|
340
340
|
}
|
|
@@ -381,7 +381,7 @@ function Gt(e, t, r) {
|
|
|
381
381
|
function re(e, t, r) {
|
|
382
382
|
if (Array.isArray(e))
|
|
383
383
|
return e.map((o) => re(o, t, r));
|
|
384
|
-
if (!
|
|
384
|
+
if (!Ce(e))
|
|
385
385
|
return e;
|
|
386
386
|
if (Dt(e)) {
|
|
387
387
|
const o = `${ie(t)}::${e.$ref}`;
|
|
@@ -393,7 +393,7 @@ function re(e, t, r) {
|
|
|
393
393
|
const b = Object.fromEntries(
|
|
394
394
|
m.map(([h, y]) => [h, re(y, t, r)])
|
|
395
395
|
);
|
|
396
|
-
return
|
|
396
|
+
return Ce(l) ? { ...l, ...b } : l;
|
|
397
397
|
}
|
|
398
398
|
const n = Gt(e.$ref, t, r);
|
|
399
399
|
if (!n)
|
|
@@ -408,7 +408,7 @@ function re(e, t, r) {
|
|
|
408
408
|
const c = Object.fromEntries(
|
|
409
409
|
a.map(([l, m]) => [l, re(m, t, r)])
|
|
410
410
|
);
|
|
411
|
-
return
|
|
411
|
+
return Ce(s) ? { ...s, ...c } : s;
|
|
412
412
|
}
|
|
413
413
|
return Object.fromEntries(
|
|
414
414
|
Object.entries(e).map(([o, n]) => [o, re(n, t, r)])
|
|
@@ -429,12 +429,10 @@ function Jt(e) {
|
|
|
429
429
|
const t = e.menu;
|
|
430
430
|
return Array.isArray(t) && t.every(Vt) ? t : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (e.type === "header")
|
|
437
|
-
return Yt(e.data, t);
|
|
432
|
+
function we(e, t) {
|
|
433
|
+
const r = Jt(e.data);
|
|
434
|
+
if (r) return r;
|
|
435
|
+
if (e.type === "header") return Array.isArray(t) ? t : [];
|
|
438
436
|
}
|
|
439
437
|
function st(e) {
|
|
440
438
|
const t = Ut(e);
|
|
@@ -450,7 +448,7 @@ function st(e) {
|
|
|
450
448
|
menuConfig: ve(e.menuConfig, "config/menu.json", t)
|
|
451
449
|
};
|
|
452
450
|
}
|
|
453
|
-
function
|
|
451
|
+
function Yt() {
|
|
454
452
|
if (typeof window > "u") return null;
|
|
455
453
|
const e = window;
|
|
456
454
|
return e.__olonWebMcpTools__ || (e.__olonWebMcpTools__ = /* @__PURE__ */ new Map()), e.__olonWebMcpTools__;
|
|
@@ -480,12 +478,12 @@ async function Ye(e) {
|
|
|
480
478
|
}
|
|
481
479
|
throw new Error(`Unsupported URI scheme: ${e}`);
|
|
482
480
|
}
|
|
483
|
-
function
|
|
481
|
+
function Ht() {
|
|
484
482
|
var r;
|
|
485
483
|
if (typeof window > "u" || typeof navigator > "u") return;
|
|
486
484
|
const e = navigator;
|
|
487
485
|
if (typeof ((r = e.modelContext) == null ? void 0 : r.registerTool) == "function") return;
|
|
488
|
-
const t =
|
|
486
|
+
const t = Yt();
|
|
489
487
|
t && (e.modelContext || (e.modelContext = {}), e.modelContext.registerTool = (o, n) => {
|
|
490
488
|
var s;
|
|
491
489
|
t.set(o.name, o), (s = n == null ? void 0 : n.signal) == null || s.addEventListener("abort", () => {
|
|
@@ -505,13 +503,13 @@ function qt() {
|
|
|
505
503
|
readResource: async (o) => JSON.stringify(await Ye(o))
|
|
506
504
|
});
|
|
507
505
|
}
|
|
508
|
-
function
|
|
506
|
+
function qt(e) {
|
|
509
507
|
return `/schemas/${e}.schema.json`;
|
|
510
508
|
}
|
|
511
|
-
function
|
|
509
|
+
function Xt(e) {
|
|
512
510
|
return `/mcp-manifests/${e}.json`;
|
|
513
511
|
}
|
|
514
|
-
const
|
|
512
|
+
const Zt = () => /* @__PURE__ */ u.jsxs(
|
|
515
513
|
"div",
|
|
516
514
|
{
|
|
517
515
|
style: {
|
|
@@ -535,7 +533,7 @@ const Kt = () => /* @__PURE__ */ u.jsxs(
|
|
|
535
533
|
)
|
|
536
534
|
]
|
|
537
535
|
}
|
|
538
|
-
), at =
|
|
536
|
+
), at = Ae(void 0), Kt = ({ config: e, children: t }) => /* @__PURE__ */ u.jsx(
|
|
539
537
|
at.Provider,
|
|
540
538
|
{
|
|
541
539
|
value: {
|
|
@@ -549,19 +547,19 @@ const Kt = () => /* @__PURE__ */ u.jsxs(
|
|
|
549
547
|
children: t
|
|
550
548
|
}
|
|
551
549
|
);
|
|
552
|
-
function
|
|
553
|
-
const e =
|
|
550
|
+
function Qt() {
|
|
551
|
+
const e = Re(at);
|
|
554
552
|
if (e === void 0)
|
|
555
553
|
throw new Error("useConfig must be used within ConfigProvider");
|
|
556
554
|
return e;
|
|
557
555
|
}
|
|
558
556
|
const Oe = /* @__PURE__ */ new Set();
|
|
559
|
-
function
|
|
557
|
+
function er(e) {
|
|
560
558
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
561
559
|
}
|
|
562
560
|
function it(e, t = [], r = {}) {
|
|
563
561
|
return Object.entries(e).forEach(([o, n]) => {
|
|
564
|
-
const s = [...t,
|
|
562
|
+
const s = [...t, er(o)];
|
|
565
563
|
if (typeof n == "string" || typeof n == "number") {
|
|
566
564
|
r[`--theme-${s.join("-")}`] = String(n);
|
|
567
565
|
return;
|
|
@@ -572,7 +570,7 @@ function it(e, t = [], r = {}) {
|
|
|
572
570
|
function U(e, t, r, o) {
|
|
573
571
|
o && (e[t] = `var(${r})`);
|
|
574
572
|
}
|
|
575
|
-
function
|
|
573
|
+
function tr(e) {
|
|
576
574
|
const t = it(e.tokens), r = { ...t };
|
|
577
575
|
return U(r, "--theme-primary", "--theme-colors-primary", t["--theme-colors-primary"]), U(r, "--theme-secondary", "--theme-colors-secondary", t["--theme-colors-secondary"]), U(r, "--theme-accent", "--theme-colors-accent", t["--theme-colors-accent"]), U(r, "--theme-background", "--theme-colors-background", t["--theme-colors-background"]), U(r, "--theme-surface", "--theme-colors-surface", t["--theme-colors-surface"]), U(r, "--theme-surface-alt", "--theme-colors-surface-alt", t["--theme-colors-surface-alt"]), U(r, "--theme-text", "--theme-colors-text", t["--theme-colors-text"]), U(r, "--theme-text-muted", "--theme-colors-text-muted", t["--theme-colors-text-muted"]), U(r, "--theme-border", "--theme-colors-border", t["--theme-colors-border"]), U(
|
|
578
576
|
r,
|
|
@@ -593,31 +591,31 @@ function rr(e) {
|
|
|
593
591
|
}
|
|
594
592
|
const lt = {
|
|
595
593
|
setTheme: (e) => {
|
|
596
|
-
const t = document.documentElement, r =
|
|
594
|
+
const t = document.documentElement, r = tr(e);
|
|
597
595
|
Oe.forEach((o) => {
|
|
598
596
|
t.style.removeProperty(o);
|
|
599
597
|
}), Oe.clear(), Object.entries(r).forEach(([o, n]) => {
|
|
600
598
|
t.style.setProperty(o, n), Oe.add(o);
|
|
601
599
|
});
|
|
602
600
|
}
|
|
603
|
-
},
|
|
601
|
+
}, rr = /^[a-zA-Z][a-zA-Z\d+\-.]*:/;
|
|
604
602
|
function Ie(e) {
|
|
605
603
|
const t = typeof e == "string" ? e.trim() : "";
|
|
606
604
|
if (!t || t === "/") return "/";
|
|
607
605
|
const o = (t.startsWith("/") ? t : `/${t}`).replace(/\/+$/, "");
|
|
608
606
|
return o.length > 0 ? `${o}/` : "/";
|
|
609
607
|
}
|
|
610
|
-
function
|
|
608
|
+
function ke(e, t) {
|
|
611
609
|
const r = e.trim();
|
|
612
610
|
if (!r) return Ie(t);
|
|
613
|
-
if (
|
|
611
|
+
if (rr.test(r) || r.startsWith("#")) return r;
|
|
614
612
|
const o = Ie(t), n = r.startsWith("/") ? r : `/${r}`;
|
|
615
613
|
if (o === "/") return n;
|
|
616
614
|
const s = n.replace(/^\/+/, "");
|
|
617
615
|
return `${o}${s}`;
|
|
618
616
|
}
|
|
619
|
-
const ct =
|
|
620
|
-
class
|
|
617
|
+
const ct = Ae({}), Ro = () => Re(ct);
|
|
618
|
+
class or extends rt {
|
|
621
619
|
constructor(t) {
|
|
622
620
|
super(t), this.state = { hasError: !1, error: null };
|
|
623
621
|
}
|
|
@@ -664,13 +662,13 @@ class nr extends rt {
|
|
|
664
662
|
) : this.props.children;
|
|
665
663
|
}
|
|
666
664
|
}
|
|
667
|
-
function
|
|
665
|
+
function nr() {
|
|
668
666
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
669
667
|
/* @__PURE__ */ u.jsx(zt, {}),
|
|
670
668
|
/* @__PURE__ */ u.jsx(Nt, {})
|
|
671
669
|
] });
|
|
672
670
|
}
|
|
673
|
-
function
|
|
671
|
+
function sr({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
674
672
|
var d, S, J, Y, V, X, Z;
|
|
675
673
|
const {
|
|
676
674
|
registry: o = {},
|
|
@@ -683,7 +681,7 @@ function ar({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
|
683
681
|
refDocuments: b,
|
|
684
682
|
themeCss: h,
|
|
685
683
|
addSection: y,
|
|
686
|
-
NotFoundComponent: w =
|
|
684
|
+
NotFoundComponent: w = Zt
|
|
687
685
|
} = e, A = (y == null ? void 0 : y.addableSectionTypes) ?? Object.keys(n).filter((D) => D !== "header" && D !== "footer"), j = {
|
|
688
686
|
saveToFile: (d = e.persistence) == null ? void 0 : d.saveToFile,
|
|
689
687
|
hotSave: (S = e.persistence) == null ? void 0 : S.hotSave,
|
|
@@ -708,7 +706,7 @@ function ar({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
|
708
706
|
} catch (G) {
|
|
709
707
|
console.warn("[JsonPages] setTheme failed", G);
|
|
710
708
|
}
|
|
711
|
-
(B = e.webmcp) != null && B.enabled &&
|
|
709
|
+
(B = e.webmcp) != null && B.enabled && Ht(), O(!0);
|
|
712
710
|
}, [W.themeConfig, (Z = e.webmcp) == null ? void 0 : Z.enabled]);
|
|
713
711
|
const T = {
|
|
714
712
|
registry: o,
|
|
@@ -751,8 +749,8 @@ function ar({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
|
751
749
|
e.webmcp,
|
|
752
750
|
t
|
|
753
751
|
]);
|
|
754
|
-
return E ? /* @__PURE__ */ u.jsx(
|
|
755
|
-
|
|
752
|
+
return E ? /* @__PURE__ */ u.jsx(or, { children: /* @__PURE__ */ u.jsx(ct.Provider, { value: e.iconRegistry ?? {}, children: /* @__PURE__ */ u.jsx(
|
|
753
|
+
Kt,
|
|
756
754
|
{
|
|
757
755
|
config: {
|
|
758
756
|
registry: o,
|
|
@@ -781,7 +779,7 @@ function ar({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
|
781
779
|
}
|
|
782
780
|
);
|
|
783
781
|
}
|
|
784
|
-
const dt =
|
|
782
|
+
const dt = Ae(void 0), ar = ({ mode: e, children: t }) => (oe(() => {
|
|
785
783
|
if (e !== "studio") return;
|
|
786
784
|
const r = new MutationObserver((o) => {
|
|
787
785
|
o.forEach((n) => {
|
|
@@ -791,13 +789,13 @@ const dt = Re(void 0), ir = ({ mode: e, children: t }) => (oe(() => {
|
|
|
791
789
|
});
|
|
792
790
|
});
|
|
793
791
|
return r.observe(document.body, { childList: !0 }), () => r.disconnect();
|
|
794
|
-
}, [e]), /* @__PURE__ */ u.jsx(dt.Provider, { value: { mode: e }, children: t })),
|
|
795
|
-
const e =
|
|
792
|
+
}, [e]), /* @__PURE__ */ u.jsx(dt.Provider, { value: { mode: e }, children: t })), ir = () => {
|
|
793
|
+
const e = Re(dt);
|
|
796
794
|
if (e === void 0)
|
|
797
795
|
throw new Error("useStudio must be used within a StudioProvider");
|
|
798
796
|
return e;
|
|
799
797
|
};
|
|
800
|
-
function
|
|
798
|
+
function lr(e, t) {
|
|
801
799
|
return t.header != null && e["global-header"] !== !1;
|
|
802
800
|
}
|
|
803
801
|
/**
|
|
@@ -806,14 +804,14 @@ function cr(e, t) {
|
|
|
806
804
|
* This source code is licensed under the ISC license.
|
|
807
805
|
* See the LICENSE file in the root directory of this source tree.
|
|
808
806
|
*/
|
|
809
|
-
const
|
|
807
|
+
const cr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ut = (...e) => e.filter((t, r, o) => !!t && t.trim() !== "" && o.indexOf(t) === r).join(" ").trim();
|
|
810
808
|
/**
|
|
811
809
|
* @license lucide-react v0.474.0 - ISC
|
|
812
810
|
*
|
|
813
811
|
* This source code is licensed under the ISC license.
|
|
814
812
|
* See the LICENSE file in the root directory of this source tree.
|
|
815
813
|
*/
|
|
816
|
-
var
|
|
814
|
+
var dr = {
|
|
817
815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
818
816
|
width: 24,
|
|
819
817
|
height: 24,
|
|
@@ -830,7 +828,7 @@ var ur = {
|
|
|
830
828
|
* This source code is licensed under the ISC license.
|
|
831
829
|
* See the LICENSE file in the root directory of this source tree.
|
|
832
830
|
*/
|
|
833
|
-
const
|
|
831
|
+
const ur = nt(
|
|
834
832
|
({
|
|
835
833
|
color: e = "currentColor",
|
|
836
834
|
size: t = 24,
|
|
@@ -844,7 +842,7 @@ const mr = nt(
|
|
|
844
842
|
"svg",
|
|
845
843
|
{
|
|
846
844
|
ref: l,
|
|
847
|
-
...
|
|
845
|
+
...dr,
|
|
848
846
|
width: t,
|
|
849
847
|
height: t,
|
|
850
848
|
stroke: e,
|
|
@@ -866,10 +864,10 @@ const mr = nt(
|
|
|
866
864
|
*/
|
|
867
865
|
const De = (e, t) => {
|
|
868
866
|
const r = nt(
|
|
869
|
-
({ className: o, ...n }, s) => Ne(
|
|
867
|
+
({ className: o, ...n }, s) => Ne(ur, {
|
|
870
868
|
ref: s,
|
|
871
869
|
iconNode: t,
|
|
872
|
-
className: ut(`lucide-${
|
|
870
|
+
className: ut(`lucide-${cr(e)}`, o),
|
|
873
871
|
...n
|
|
874
872
|
})
|
|
875
873
|
);
|
|
@@ -881,21 +879,21 @@ const De = (e, t) => {
|
|
|
881
879
|
* This source code is licensed under the ISC license.
|
|
882
880
|
* See the LICENSE file in the root directory of this source tree.
|
|
883
881
|
*/
|
|
884
|
-
const
|
|
882
|
+
const mr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], fr = De("ChevronDown", mr);
|
|
885
883
|
/**
|
|
886
884
|
* @license lucide-react v0.474.0 - ISC
|
|
887
885
|
*
|
|
888
886
|
* This source code is licensed under the ISC license.
|
|
889
887
|
* See the LICENSE file in the root directory of this source tree.
|
|
890
888
|
*/
|
|
891
|
-
const
|
|
889
|
+
const pr = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], br = De("ChevronUp", pr);
|
|
892
890
|
/**
|
|
893
891
|
* @license lucide-react v0.474.0 - ISC
|
|
894
892
|
*
|
|
895
893
|
* This source code is licensed under the ISC license.
|
|
896
894
|
* See the LICENSE file in the root directory of this source tree.
|
|
897
895
|
*/
|
|
898
|
-
const
|
|
896
|
+
const hr = [
|
|
899
897
|
[
|
|
900
898
|
"path",
|
|
901
899
|
{
|
|
@@ -905,7 +903,7 @@ const gr = [
|
|
|
905
903
|
],
|
|
906
904
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
907
905
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
908
|
-
],
|
|
906
|
+
], gr = De("TriangleAlert", hr);
|
|
909
907
|
function mt(e) {
|
|
910
908
|
var t, r, o = "";
|
|
911
909
|
if (typeof e == "string" || typeof e == "number") o += e;
|
|
@@ -915,40 +913,40 @@ function mt(e) {
|
|
|
915
913
|
} else for (r in e) e[r] && (o && (o += " "), o += r);
|
|
916
914
|
return o;
|
|
917
915
|
}
|
|
918
|
-
function
|
|
916
|
+
function yr() {
|
|
919
917
|
for (var e, t, r = 0, o = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = mt(e)) && (o && (o += " "), o += t);
|
|
920
918
|
return o;
|
|
921
919
|
}
|
|
922
|
-
const
|
|
920
|
+
const xr = (e, t) => {
|
|
923
921
|
const r = new Array(e.length + t.length);
|
|
924
922
|
for (let o = 0; o < e.length; o++)
|
|
925
923
|
r[o] = e[o];
|
|
926
924
|
for (let o = 0; o < t.length; o++)
|
|
927
925
|
r[e.length + o] = t[o];
|
|
928
926
|
return r;
|
|
929
|
-
},
|
|
927
|
+
}, vr = (e, t) => ({
|
|
930
928
|
classGroupId: e,
|
|
931
929
|
validator: t
|
|
932
930
|
}), ft = (e = /* @__PURE__ */ new Map(), t = null, r) => ({
|
|
933
931
|
nextPart: e,
|
|
934
932
|
validators: t,
|
|
935
933
|
classGroupId: r
|
|
936
|
-
}),
|
|
937
|
-
const t =
|
|
934
|
+
}), Te = "-", He = [], wr = "arbitrary..", kr = (e) => {
|
|
935
|
+
const t = Er(e), {
|
|
938
936
|
conflictingClassGroups: r,
|
|
939
937
|
conflictingClassGroupModifiers: o
|
|
940
938
|
} = e;
|
|
941
939
|
return {
|
|
942
940
|
getClassGroupId: (a) => {
|
|
943
941
|
if (a.startsWith("[") && a.endsWith("]"))
|
|
944
|
-
return
|
|
945
|
-
const c = a.split(
|
|
942
|
+
return jr(a);
|
|
943
|
+
const c = a.split(Te), l = c[0] === "" && c.length > 1 ? 1 : 0;
|
|
946
944
|
return pt(c, l, t);
|
|
947
945
|
},
|
|
948
946
|
getConflictingClassGroupIds: (a, c) => {
|
|
949
947
|
if (c) {
|
|
950
948
|
const l = o[a], m = r[a];
|
|
951
|
-
return l ? m ?
|
|
949
|
+
return l ? m ? xr(m, l) : l : m || He;
|
|
952
950
|
}
|
|
953
951
|
return r[a] || He;
|
|
954
952
|
}
|
|
@@ -964,22 +962,22 @@ const vr = (e, t) => {
|
|
|
964
962
|
const a = r.validators;
|
|
965
963
|
if (a === null)
|
|
966
964
|
return;
|
|
967
|
-
const c = t === 0 ? e.join(
|
|
965
|
+
const c = t === 0 ? e.join(Te) : e.slice(t).join(Te), l = a.length;
|
|
968
966
|
for (let m = 0; m < l; m++) {
|
|
969
967
|
const b = a[m];
|
|
970
968
|
if (b.validator(c))
|
|
971
969
|
return b.classGroupId;
|
|
972
970
|
}
|
|
973
|
-
},
|
|
971
|
+
}, jr = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
974
972
|
const t = e.slice(1, -1), r = t.indexOf(":"), o = t.slice(0, r);
|
|
975
|
-
return o ?
|
|
976
|
-
})(),
|
|
973
|
+
return o ? wr + o : void 0;
|
|
974
|
+
})(), Er = (e) => {
|
|
977
975
|
const {
|
|
978
976
|
theme: t,
|
|
979
977
|
classGroups: r
|
|
980
978
|
} = e;
|
|
981
|
-
return
|
|
982
|
-
},
|
|
979
|
+
return Sr(r, t);
|
|
980
|
+
}, Sr = (e, t) => {
|
|
983
981
|
const r = ft();
|
|
984
982
|
for (const o in e) {
|
|
985
983
|
const n = e[o];
|
|
@@ -990,28 +988,28 @@ const vr = (e, t) => {
|
|
|
990
988
|
const n = e.length;
|
|
991
989
|
for (let s = 0; s < n; s++) {
|
|
992
990
|
const a = e[s];
|
|
993
|
-
|
|
991
|
+
Cr(a, t, r, o);
|
|
994
992
|
}
|
|
995
|
-
},
|
|
993
|
+
}, Cr = (e, t, r, o) => {
|
|
996
994
|
if (typeof e == "string") {
|
|
997
|
-
|
|
995
|
+
Tr(e, t, r);
|
|
998
996
|
return;
|
|
999
997
|
}
|
|
1000
998
|
if (typeof e == "function") {
|
|
1001
|
-
|
|
999
|
+
Rr(e, t, r, o);
|
|
1002
1000
|
return;
|
|
1003
1001
|
}
|
|
1004
|
-
|
|
1005
|
-
},
|
|
1002
|
+
Ar(e, t, r, o);
|
|
1003
|
+
}, Tr = (e, t, r) => {
|
|
1006
1004
|
const o = e === "" ? t : bt(t, e);
|
|
1007
1005
|
o.classGroupId = r;
|
|
1008
|
-
},
|
|
1009
|
-
if (
|
|
1006
|
+
}, Rr = (e, t, r, o) => {
|
|
1007
|
+
if (_r(e)) {
|
|
1010
1008
|
Fe(e(o), t, r, o);
|
|
1011
1009
|
return;
|
|
1012
1010
|
}
|
|
1013
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
1014
|
-
},
|
|
1011
|
+
t.validators === null && (t.validators = []), t.validators.push(vr(r, e));
|
|
1012
|
+
}, Ar = (e, t, r, o) => {
|
|
1015
1013
|
const n = Object.entries(e), s = n.length;
|
|
1016
1014
|
for (let a = 0; a < s; a++) {
|
|
1017
1015
|
const [c, l] = n[a];
|
|
@@ -1019,14 +1017,14 @@ const vr = (e, t) => {
|
|
|
1019
1017
|
}
|
|
1020
1018
|
}, bt = (e, t) => {
|
|
1021
1019
|
let r = e;
|
|
1022
|
-
const o = t.split(
|
|
1020
|
+
const o = t.split(Te), n = o.length;
|
|
1023
1021
|
for (let s = 0; s < n; s++) {
|
|
1024
1022
|
const a = o[s];
|
|
1025
1023
|
let c = r.nextPart.get(a);
|
|
1026
1024
|
c || (c = ft(), r.nextPart.set(a, c)), r = c;
|
|
1027
1025
|
}
|
|
1028
1026
|
return r;
|
|
1029
|
-
},
|
|
1027
|
+
}, _r = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Or = (e) => {
|
|
1030
1028
|
if (e < 1)
|
|
1031
1029
|
return {
|
|
1032
1030
|
get: () => {
|
|
@@ -1050,13 +1048,13 @@ const vr = (e, t) => {
|
|
|
1050
1048
|
s in r ? r[s] = a : n(s, a);
|
|
1051
1049
|
}
|
|
1052
1050
|
};
|
|
1053
|
-
}, $e = "!", qe = ":",
|
|
1051
|
+
}, $e = "!", qe = ":", Pr = [], Xe = (e, t, r, o, n) => ({
|
|
1054
1052
|
modifiers: e,
|
|
1055
1053
|
hasImportantModifier: t,
|
|
1056
1054
|
baseClassName: r,
|
|
1057
1055
|
maybePostfixModifierPosition: o,
|
|
1058
1056
|
isExternal: n
|
|
1059
|
-
}),
|
|
1057
|
+
}), zr = (e) => {
|
|
1060
1058
|
const {
|
|
1061
1059
|
prefix: t,
|
|
1062
1060
|
experimentalParseClassName: r
|
|
@@ -1093,7 +1091,7 @@ const vr = (e, t) => {
|
|
|
1093
1091
|
};
|
|
1094
1092
|
if (t) {
|
|
1095
1093
|
const n = t + qe, s = o;
|
|
1096
|
-
o = (a) => a.startsWith(n) ? s(a.slice(n.length)) : Xe(
|
|
1094
|
+
o = (a) => a.startsWith(n) ? s(a.slice(n.length)) : Xe(Pr, !1, a, void 0, !0);
|
|
1097
1095
|
}
|
|
1098
1096
|
if (r) {
|
|
1099
1097
|
const n = o;
|
|
@@ -1103,7 +1101,7 @@ const vr = (e, t) => {
|
|
|
1103
1101
|
});
|
|
1104
1102
|
}
|
|
1105
1103
|
return o;
|
|
1106
|
-
},
|
|
1104
|
+
}, Nr = (e) => {
|
|
1107
1105
|
const t = /* @__PURE__ */ new Map();
|
|
1108
1106
|
return e.orderSensitiveModifiers.forEach((r, o) => {
|
|
1109
1107
|
t.set(r, 1e6 + o);
|
|
@@ -1116,18 +1114,18 @@ const vr = (e, t) => {
|
|
|
1116
1114
|
}
|
|
1117
1115
|
return n.length > 0 && (n.sort(), o.push(...n)), o;
|
|
1118
1116
|
};
|
|
1119
|
-
},
|
|
1120
|
-
cache:
|
|
1121
|
-
parseClassName:
|
|
1122
|
-
sortModifiers:
|
|
1123
|
-
...
|
|
1124
|
-
}),
|
|
1117
|
+
}, Ir = (e) => ({
|
|
1118
|
+
cache: Or(e.cacheSize),
|
|
1119
|
+
parseClassName: zr(e),
|
|
1120
|
+
sortModifiers: Nr(e),
|
|
1121
|
+
...kr(e)
|
|
1122
|
+
}), $r = /\s+/, Lr = (e, t) => {
|
|
1125
1123
|
const {
|
|
1126
1124
|
parseClassName: r,
|
|
1127
1125
|
getClassGroupId: o,
|
|
1128
1126
|
getConflictingClassGroupIds: n,
|
|
1129
1127
|
sortModifiers: s
|
|
1130
|
-
} = t, a = [], c = e.trim().split(
|
|
1128
|
+
} = t, a = [], c = e.trim().split($r);
|
|
1131
1129
|
let l = "";
|
|
1132
1130
|
for (let m = c.length - 1; m >= 0; m -= 1) {
|
|
1133
1131
|
const b = c[m], {
|
|
@@ -1165,7 +1163,7 @@ const vr = (e, t) => {
|
|
|
1165
1163
|
l = b + (l.length > 0 ? " " + l : l);
|
|
1166
1164
|
}
|
|
1167
1165
|
return l;
|
|
1168
|
-
},
|
|
1166
|
+
}, Mr = (...e) => {
|
|
1169
1167
|
let t = 0, r, o, n = "";
|
|
1170
1168
|
for (; t < e.length; )
|
|
1171
1169
|
(r = e[t++]) && (o = ht(r)) && (n && (n += " "), n += o);
|
|
@@ -1177,34 +1175,34 @@ const vr = (e, t) => {
|
|
|
1177
1175
|
for (let o = 0; o < e.length; o++)
|
|
1178
1176
|
e[o] && (t = ht(e[o])) && (r && (r += " "), r += t);
|
|
1179
1177
|
return r;
|
|
1180
|
-
},
|
|
1178
|
+
}, Dr = (e, ...t) => {
|
|
1181
1179
|
let r, o, n, s;
|
|
1182
1180
|
const a = (l) => {
|
|
1183
1181
|
const m = t.reduce((b, h) => h(b), e());
|
|
1184
|
-
return r =
|
|
1182
|
+
return r = Ir(m), o = r.cache.get, n = r.cache.set, s = c, c(l);
|
|
1185
1183
|
}, c = (l) => {
|
|
1186
1184
|
const m = o(l);
|
|
1187
1185
|
if (m)
|
|
1188
1186
|
return m;
|
|
1189
|
-
const b =
|
|
1187
|
+
const b = Lr(l, r);
|
|
1190
1188
|
return n(l, b), b;
|
|
1191
1189
|
};
|
|
1192
|
-
return s = a, (...l) => s(
|
|
1193
|
-
},
|
|
1194
|
-
const t = (r) => r[e] ||
|
|
1190
|
+
return s = a, (...l) => s(Mr(...l));
|
|
1191
|
+
}, Fr = [], L = (e) => {
|
|
1192
|
+
const t = (r) => r[e] || Fr;
|
|
1195
1193
|
return t.isThemeGetter = !0, t;
|
|
1196
|
-
}, gt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i,
|
|
1194
|
+
}, gt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Wr = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Br = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ur = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Gr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Vr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Jr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, K = (e) => Wr.test(e), v = (e) => !!e && !Number.isNaN(Number(e)), Q = (e) => !!e && Number.isInteger(Number(e)), Pe = (e) => e.endsWith("%") && v(e.slice(0, -1)), q = (e) => Br.test(e), xt = () => !0, Yr = (e) => (
|
|
1197
1195
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1198
1196
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1199
1197
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1200
|
-
|
|
1201
|
-
), We = () => !1,
|
|
1198
|
+
Ur.test(e) && !Gr.test(e)
|
|
1199
|
+
), We = () => !1, Hr = (e) => Vr.test(e), qr = (e) => Jr.test(e), Xr = (e) => !f(e) && !p(e), Zr = (e) => ee(e, kt, We), f = (e) => gt.test(e), te = (e) => ee(e, jt, Yr), Ze = (e) => ee(e, so, v), Kr = (e) => ee(e, St, xt), Qr = (e) => ee(e, Et, We), Ke = (e) => ee(e, vt, We), eo = (e) => ee(e, wt, qr), je = (e) => ee(e, Ct, Hr), p = (e) => yt.test(e), ue = (e) => ne(e, jt), to = (e) => ne(e, Et), Qe = (e) => ne(e, vt), ro = (e) => ne(e, kt), oo = (e) => ne(e, wt), Ee = (e) => ne(e, Ct, !0), no = (e) => ne(e, St, !0), ee = (e, t, r) => {
|
|
1202
1200
|
const o = gt.exec(e);
|
|
1203
1201
|
return o ? o[1] ? t(o[1]) : r(o[2]) : !1;
|
|
1204
1202
|
}, ne = (e, t, r = !1) => {
|
|
1205
1203
|
const o = yt.exec(e);
|
|
1206
1204
|
return o ? o[1] ? t(o[1]) : r : !1;
|
|
1207
|
-
}, vt = (e) => e === "position" || e === "percentage", wt = (e) => e === "image" || e === "url", kt = (e) => e === "length" || e === "size" || e === "bg-size", jt = (e) => e === "length",
|
|
1205
|
+
}, vt = (e) => e === "position" || e === "percentage", wt = (e) => e === "image" || e === "url", kt = (e) => e === "length" || e === "size" || e === "bg-size", jt = (e) => e === "length", so = (e) => e === "number", Et = (e) => e === "family-name", St = (e) => e === "number" || e === "weight", Ct = (e) => e === "shadow", ao = () => {
|
|
1208
1206
|
const e = L("color"), t = L("font"), r = L("text"), o = L("font-weight"), n = L("tracking"), s = L("leading"), a = L("breakpoint"), c = L("container"), l = L("spacing"), m = L("radius"), b = L("shadow"), h = L("inset-shadow"), y = L("text-shadow"), w = L("drop-shadow"), A = L("blur"), j = L("perspective"), C = L("aspect"), F = L("ease"), W = L("animate"), E = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], O = () => [
|
|
1209
1207
|
"center",
|
|
1210
1208
|
"top",
|
|
@@ -1229,7 +1227,7 @@ const vr = (e, t) => {
|
|
|
1229
1227
|
position: [p, f]
|
|
1230
1228
|
}], x = () => ["no-repeat", {
|
|
1231
1229
|
repeat: ["", "x", "y", "space", "round"]
|
|
1232
|
-
}], R = () => ["auto", "cover", "contain",
|
|
1230
|
+
}], R = () => ["auto", "cover", "contain", ro, Zr, {
|
|
1233
1231
|
size: [p, f]
|
|
1234
1232
|
}], P = () => [Pe, ue, te], N = () => [
|
|
1235
1233
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -1246,7 +1244,7 @@ const vr = (e, t) => {
|
|
|
1246
1244
|
A,
|
|
1247
1245
|
p,
|
|
1248
1246
|
f
|
|
1249
|
-
], be = () => ["none", v, p, f], he = () => ["none", v, p, f],
|
|
1247
|
+
], be = () => ["none", v, p, f], he = () => ["none", v, p, f], _e = () => [v, p, f], ge = () => [K, "full", ...d()];
|
|
1250
1248
|
return {
|
|
1251
1249
|
cacheSize: 500,
|
|
1252
1250
|
theme: {
|
|
@@ -1258,7 +1256,7 @@ const vr = (e, t) => {
|
|
|
1258
1256
|
container: [q],
|
|
1259
1257
|
"drop-shadow": [q],
|
|
1260
1258
|
ease: ["in", "out", "in-out"],
|
|
1261
|
-
font: [
|
|
1259
|
+
font: [Xr],
|
|
1262
1260
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
1263
1261
|
"inset-shadow": [q],
|
|
1264
1262
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -2052,7 +2050,7 @@ const vr = (e, t) => {
|
|
|
2052
2050
|
* @see https://tailwindcss.com/docs/font-weight
|
|
2053
2051
|
*/
|
|
2054
2052
|
"font-weight": [{
|
|
2055
|
-
font: [o,
|
|
2053
|
+
font: [o, no, Kr]
|
|
2056
2054
|
}],
|
|
2057
2055
|
/**
|
|
2058
2056
|
* Font Stretch
|
|
@@ -2066,7 +2064,7 @@ const vr = (e, t) => {
|
|
|
2066
2064
|
* @see https://tailwindcss.com/docs/font-family
|
|
2067
2065
|
*/
|
|
2068
2066
|
"font-family": [{
|
|
2069
|
-
font: [
|
|
2067
|
+
font: [to, Qr, t]
|
|
2070
2068
|
}],
|
|
2071
2069
|
/**
|
|
2072
2070
|
* Font Feature Settings
|
|
@@ -2328,7 +2326,7 @@ const vr = (e, t) => {
|
|
|
2328
2326
|
}, Q, p, f],
|
|
2329
2327
|
radial: ["", p, f],
|
|
2330
2328
|
conic: [Q, p, f]
|
|
2331
|
-
},
|
|
2329
|
+
}, oo, eo]
|
|
2332
2330
|
}],
|
|
2333
2331
|
/**
|
|
2334
2332
|
* Background Color
|
|
@@ -2727,8 +2725,8 @@ const vr = (e, t) => {
|
|
|
2727
2725
|
"",
|
|
2728
2726
|
"none",
|
|
2729
2727
|
b,
|
|
2730
|
-
|
|
2731
|
-
|
|
2728
|
+
Ee,
|
|
2729
|
+
je
|
|
2732
2730
|
]
|
|
2733
2731
|
}],
|
|
2734
2732
|
/**
|
|
@@ -2743,7 +2741,7 @@ const vr = (e, t) => {
|
|
|
2743
2741
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2744
2742
|
*/
|
|
2745
2743
|
"inset-shadow": [{
|
|
2746
|
-
"inset-shadow": ["none", h,
|
|
2744
|
+
"inset-shadow": ["none", h, Ee, je]
|
|
2747
2745
|
}],
|
|
2748
2746
|
/**
|
|
2749
2747
|
* Inset Box Shadow Color
|
|
@@ -2810,7 +2808,7 @@ const vr = (e, t) => {
|
|
|
2810
2808
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
2811
2809
|
*/
|
|
2812
2810
|
"text-shadow": [{
|
|
2813
|
-
"text-shadow": ["none", y,
|
|
2811
|
+
"text-shadow": ["none", y, Ee, je]
|
|
2814
2812
|
}],
|
|
2815
2813
|
/**
|
|
2816
2814
|
* Text Shadow Color
|
|
@@ -3083,8 +3081,8 @@ const vr = (e, t) => {
|
|
|
3083
3081
|
"",
|
|
3084
3082
|
"none",
|
|
3085
3083
|
w,
|
|
3086
|
-
|
|
3087
|
-
|
|
3084
|
+
Ee,
|
|
3085
|
+
je
|
|
3088
3086
|
]
|
|
3089
3087
|
}],
|
|
3090
3088
|
/**
|
|
@@ -3385,21 +3383,21 @@ const vr = (e, t) => {
|
|
|
3385
3383
|
* @see https://tailwindcss.com/docs/skew
|
|
3386
3384
|
*/
|
|
3387
3385
|
skew: [{
|
|
3388
|
-
skew:
|
|
3386
|
+
skew: _e()
|
|
3389
3387
|
}],
|
|
3390
3388
|
/**
|
|
3391
3389
|
* Skew X
|
|
3392
3390
|
* @see https://tailwindcss.com/docs/skew
|
|
3393
3391
|
*/
|
|
3394
3392
|
"skew-x": [{
|
|
3395
|
-
"skew-x":
|
|
3393
|
+
"skew-x": _e()
|
|
3396
3394
|
}],
|
|
3397
3395
|
/**
|
|
3398
3396
|
* Skew Y
|
|
3399
3397
|
* @see https://tailwindcss.com/docs/skew
|
|
3400
3398
|
*/
|
|
3401
3399
|
"skew-y": [{
|
|
3402
|
-
"skew-y":
|
|
3400
|
+
"skew-y": _e()
|
|
3403
3401
|
}],
|
|
3404
3402
|
/**
|
|
3405
3403
|
* Transform
|
|
@@ -3833,11 +3831,11 @@ const vr = (e, t) => {
|
|
|
3833
3831
|
},
|
|
3834
3832
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
3835
3833
|
};
|
|
3836
|
-
},
|
|
3834
|
+
}, io = /* @__PURE__ */ Dr(ao);
|
|
3837
3835
|
function Le(...e) {
|
|
3838
|
-
return
|
|
3836
|
+
return io(yr(e));
|
|
3839
3837
|
}
|
|
3840
|
-
class
|
|
3838
|
+
class lo extends rt {
|
|
3841
3839
|
constructor(t) {
|
|
3842
3840
|
super(t), this.state = { hasError: !1 };
|
|
3843
3841
|
}
|
|
@@ -3849,7 +3847,7 @@ class co extends rt {
|
|
|
3849
3847
|
}
|
|
3850
3848
|
render() {
|
|
3851
3849
|
return this.state.hasError ? /* @__PURE__ */ u.jsxs("div", { className: "p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3", children: [
|
|
3852
|
-
/* @__PURE__ */ u.jsx(
|
|
3850
|
+
/* @__PURE__ */ u.jsx(gr, { className: "text-amber-500", size: 32 }),
|
|
3853
3851
|
/* @__PURE__ */ u.jsxs("div", { className: "space-y-1", children: [
|
|
3854
3852
|
/* @__PURE__ */ u.jsx("h4", { className: "text-sm font-bold text-amber-200 uppercase tracking-tight", children: "Component Error" }),
|
|
3855
3853
|
/* @__PURE__ */ u.jsxs("p", { className: "text-xs text-amber-500/70 font-mono", children: [
|
|
@@ -3861,7 +3859,7 @@ class co extends rt {
|
|
|
3861
3859
|
] }) : this.props.children;
|
|
3862
3860
|
}
|
|
3863
3861
|
}
|
|
3864
|
-
const
|
|
3862
|
+
const co = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n = 0, totalSections: s = 0, onReorder: a }) => {
|
|
3865
3863
|
const c = typeof n == "number" && n > 0 && a, l = typeof n == "number" && n < s - 1 && a;
|
|
3866
3864
|
return /* @__PURE__ */ u.jsx(
|
|
3867
3865
|
"div",
|
|
@@ -3894,7 +3892,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3894
3892
|
className: "inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",
|
|
3895
3893
|
title: "Move section up",
|
|
3896
3894
|
"aria-label": "Move section up",
|
|
3897
|
-
children: /* @__PURE__ */ u.jsx(
|
|
3895
|
+
children: /* @__PURE__ */ u.jsx(br, { size: 12, strokeWidth: 2.5 })
|
|
3898
3896
|
}
|
|
3899
3897
|
),
|
|
3900
3898
|
/* @__PURE__ */ u.jsx(
|
|
@@ -3908,7 +3906,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3908
3906
|
className: "inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",
|
|
3909
3907
|
title: "Move section down",
|
|
3910
3908
|
"aria-label": "Move section down",
|
|
3911
|
-
children: /* @__PURE__ */ u.jsx(
|
|
3909
|
+
children: /* @__PURE__ */ u.jsx(fr, { size: 12, strokeWidth: 2.5 })
|
|
3912
3910
|
}
|
|
3913
3911
|
)
|
|
3914
3912
|
] }),
|
|
@@ -3920,7 +3918,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3920
3918
|
)
|
|
3921
3919
|
}
|
|
3922
3920
|
);
|
|
3923
|
-
},
|
|
3921
|
+
}, Se = ({
|
|
3924
3922
|
section: e,
|
|
3925
3923
|
menu: t,
|
|
3926
3924
|
selectedId: r,
|
|
@@ -3929,7 +3927,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3929
3927
|
totalSections: s,
|
|
3930
3928
|
onReorder: a
|
|
3931
3929
|
}) => {
|
|
3932
|
-
const { mode: c } =
|
|
3930
|
+
const { mode: c } = ir(), { registry: l, overlayDisabledSectionTypes: m } = Qt(), b = c === "studio", h = b && r === e.id, y = l[e.type], w = e.type === "header" || e.type === "footer" ? "global" : "local", A = Array.isArray(m) ? m.includes(e.type) : !1, j = e.type === "header" && typeof e.settings == "object" && e.settings !== null && "sticky" in e.settings && !!e.settings.sticky;
|
|
3933
3931
|
if (!y)
|
|
3934
3932
|
return /* @__PURE__ */ u.jsxs("div", { className: "p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono", children: [
|
|
3935
3933
|
/* @__PURE__ */ u.jsx("strong", { children: "Missing Component:" }),
|
|
@@ -3938,7 +3936,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3938
3936
|
] });
|
|
3939
3937
|
const C = () => {
|
|
3940
3938
|
const W = y;
|
|
3941
|
-
return
|
|
3939
|
+
return t ? /* @__PURE__ */ u.jsx(W, { data: e.data, settings: e.settings, menu: t }) : /* @__PURE__ */ u.jsx(W, { data: e.data, settings: e.settings });
|
|
3942
3940
|
}, F = typeof e.data == "object" && e.data !== null && "anchorId" in e.data ? String(e.data.anchorId ?? "") : void 0;
|
|
3943
3941
|
return /* @__PURE__ */ u.jsxs(
|
|
3944
3942
|
"div",
|
|
@@ -3955,9 +3953,9 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3955
3953
|
h && "z-[70]"
|
|
3956
3954
|
),
|
|
3957
3955
|
children: [
|
|
3958
|
-
/* @__PURE__ */ u.jsx("div", { className: e.type === "header" ? "relative" : "relative z-0", children: /* @__PURE__ */ u.jsx(
|
|
3956
|
+
/* @__PURE__ */ u.jsx("div", { className: e.type === "header" ? "relative" : "relative z-0", children: /* @__PURE__ */ u.jsx(lo, { type: e.type, children: C() }) }),
|
|
3959
3957
|
b && !A && /* @__PURE__ */ u.jsx(
|
|
3960
|
-
|
|
3958
|
+
co,
|
|
3961
3959
|
{
|
|
3962
3960
|
type: e.type,
|
|
3963
3961
|
scope: w,
|
|
@@ -3971,13 +3969,13 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3971
3969
|
]
|
|
3972
3970
|
}
|
|
3973
3971
|
);
|
|
3974
|
-
},
|
|
3972
|
+
}, uo = (e) => {
|
|
3975
3973
|
oe(() => {
|
|
3976
3974
|
document.title = e.title;
|
|
3977
3975
|
let t = document.querySelector('meta[name="description"]');
|
|
3978
3976
|
t || (t = document.createElement("meta"), t.setAttribute("name", "description"), document.head.appendChild(t)), t.setAttribute("content", e.description);
|
|
3979
3977
|
}, [e.title, e.description]);
|
|
3980
|
-
},
|
|
3978
|
+
}, mo = "application/json", fo = ({
|
|
3981
3979
|
pageConfig: e,
|
|
3982
3980
|
siteConfig: t,
|
|
3983
3981
|
menuConfig: r,
|
|
@@ -3986,10 +3984,10 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
3986
3984
|
scrollToSectionId: s,
|
|
3987
3985
|
onActiveSectionChange: a
|
|
3988
3986
|
}) => {
|
|
3989
|
-
|
|
3987
|
+
uo(e.meta);
|
|
3990
3988
|
const [c, l] = ot(null), m = Be({}), b = Be(a);
|
|
3991
3989
|
b.current = a;
|
|
3992
|
-
const h =
|
|
3990
|
+
const h = lr(e, t), y = h ? t.header ?? null : null, w = t.footer ?? null, A = (E) => {
|
|
3993
3991
|
var O;
|
|
3994
3992
|
(O = b.current) == null || O.call(b, E);
|
|
3995
3993
|
};
|
|
@@ -4033,7 +4031,7 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
4033
4031
|
}, F = (E, O) => {
|
|
4034
4032
|
if (E.preventDefault(), l(null), !!n)
|
|
4035
4033
|
try {
|
|
4036
|
-
const k = E.dataTransfer.getData(
|
|
4034
|
+
const k = E.dataTransfer.getData(mo), { sectionId: T } = JSON.parse(k);
|
|
4037
4035
|
typeof T == "string" && n(T, O);
|
|
4038
4036
|
} catch {
|
|
4039
4037
|
}
|
|
@@ -4071,10 +4069,10 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
4071
4069
|
}
|
|
4072
4070
|
),
|
|
4073
4071
|
/* @__PURE__ */ u.jsx(
|
|
4074
|
-
|
|
4072
|
+
Se,
|
|
4075
4073
|
{
|
|
4076
4074
|
section: k,
|
|
4077
|
-
menu:
|
|
4075
|
+
menu: we(k, r.main ?? []),
|
|
4078
4076
|
selectedId: o,
|
|
4079
4077
|
reorderable: !0,
|
|
4080
4078
|
sectionIndex: T,
|
|
@@ -4094,10 +4092,10 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
4094
4092
|
"data-section-id": k.id,
|
|
4095
4093
|
onMouseEnter: () => A(k.id),
|
|
4096
4094
|
children: /* @__PURE__ */ u.jsx(
|
|
4097
|
-
|
|
4095
|
+
Se,
|
|
4098
4096
|
{
|
|
4099
4097
|
section: k,
|
|
4100
|
-
menu:
|
|
4098
|
+
menu: we(k, r.main ?? []),
|
|
4101
4099
|
selectedId: o
|
|
4102
4100
|
}
|
|
4103
4101
|
)
|
|
@@ -4143,10 +4141,10 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
4143
4141
|
"data-section-id": y.id,
|
|
4144
4142
|
onMouseEnter: () => A(y.id),
|
|
4145
4143
|
children: /* @__PURE__ */ u.jsx(
|
|
4146
|
-
|
|
4144
|
+
Se,
|
|
4147
4145
|
{
|
|
4148
4146
|
section: y,
|
|
4149
|
-
menu:
|
|
4147
|
+
menu: we(y, r.main ?? []),
|
|
4150
4148
|
selectedId: o
|
|
4151
4149
|
}
|
|
4152
4150
|
)
|
|
@@ -4161,11 +4159,18 @@ const uo = ({ type: e, scope: t, isSelected: r, sectionId: o, sectionIndex: n =
|
|
|
4161
4159
|
},
|
|
4162
4160
|
"data-section-id": w.id,
|
|
4163
4161
|
onMouseEnter: () => A(w.id),
|
|
4164
|
-
children: /* @__PURE__ */ u.jsx(
|
|
4162
|
+
children: /* @__PURE__ */ u.jsx(
|
|
4163
|
+
Se,
|
|
4164
|
+
{
|
|
4165
|
+
section: w,
|
|
4166
|
+
menu: we(w, r.main ?? []),
|
|
4167
|
+
selectedId: o
|
|
4168
|
+
}
|
|
4169
|
+
)
|
|
4165
4170
|
}
|
|
4166
4171
|
)
|
|
4167
4172
|
] });
|
|
4168
|
-
},
|
|
4173
|
+
}, po = ({ mode: e, tenantCss: t, adminCss: r, children: o }) => (Rt(() => {
|
|
4169
4174
|
const n = `jp-theme-${e}`, s = e === "tenant" ? t : r;
|
|
4170
4175
|
if (!document.getElementById(n) && s) {
|
|
4171
4176
|
const a = document.createElement("style");
|
|
@@ -4182,7 +4187,7 @@ function et(e, t) {
|
|
|
4182
4187
|
let o = document.head.querySelector(r);
|
|
4183
4188
|
o || (o = document.createElement("link"), o.rel = e, document.head.appendChild(o)), o.href = t;
|
|
4184
4189
|
}
|
|
4185
|
-
function
|
|
4190
|
+
function bo(e, t, r) {
|
|
4186
4191
|
if (typeof document > "u") return;
|
|
4187
4192
|
const o = "olonjs-webmcp-jsonld";
|
|
4188
4193
|
let n = document.getElementById(o);
|
|
@@ -4202,7 +4207,7 @@ function ho(e, t, r) {
|
|
|
4202
4207
|
function Me(e) {
|
|
4203
4208
|
return e.split("/").map((t) => t.trim()).filter(Boolean).join("/");
|
|
4204
4209
|
}
|
|
4205
|
-
function
|
|
4210
|
+
function ho(e, t = "") {
|
|
4206
4211
|
const r = Me(t);
|
|
4207
4212
|
let n = e.replace(/\/+/g, "/");
|
|
4208
4213
|
if (r) {
|
|
@@ -4211,7 +4216,7 @@ function go(e, t = "") {
|
|
|
4211
4216
|
}
|
|
4212
4217
|
return Me(n) || "home";
|
|
4213
4218
|
}
|
|
4214
|
-
function
|
|
4219
|
+
function go(e, t) {
|
|
4215
4220
|
const r = Me(t) || "home";
|
|
4216
4221
|
return e[r];
|
|
4217
4222
|
}
|
|
@@ -4225,7 +4230,7 @@ const tt = ({
|
|
|
4225
4230
|
adminCss: a,
|
|
4226
4231
|
NotFoundComponent: c
|
|
4227
4232
|
}) => {
|
|
4228
|
-
const l = It(), m =
|
|
4233
|
+
const l = It(), m = ho(l.pathname), b = ze(
|
|
4229
4234
|
() => st({
|
|
4230
4235
|
pages: e,
|
|
4231
4236
|
siteConfig: t,
|
|
@@ -4234,7 +4239,7 @@ const tt = ({
|
|
|
4234
4239
|
refDocuments: n
|
|
4235
4240
|
}),
|
|
4236
4241
|
[e, t, o, r, n]
|
|
4237
|
-
), h =
|
|
4242
|
+
), h = go(b.pages, m);
|
|
4238
4243
|
return oe(() => {
|
|
4239
4244
|
var y;
|
|
4240
4245
|
try {
|
|
@@ -4246,9 +4251,9 @@ const tt = ({
|
|
|
4246
4251
|
var A, j;
|
|
4247
4252
|
if (!h) return;
|
|
4248
4253
|
const y = typeof ((A = h.meta) == null ? void 0 : A.title) == "string" ? h.meta.title : m, w = typeof ((j = h.meta) == null ? void 0 : j.description) == "string" ? h.meta.description : "";
|
|
4249
|
-
et("mcp-manifest",
|
|
4250
|
-
}, [h, m]), h ? /* @__PURE__ */ u.jsx(
|
|
4251
|
-
|
|
4254
|
+
et("mcp-manifest", Xt(m)), et("olon-contract", qt(m)), bo(y, w, m === "home" ? "/" : `/${m}`);
|
|
4255
|
+
}, [h, m]), h ? /* @__PURE__ */ u.jsx(po, { mode: "tenant", tenantCss: s, adminCss: a, children: /* @__PURE__ */ u.jsx(ar, { mode: "visitor", children: /* @__PURE__ */ u.jsx(
|
|
4256
|
+
fo,
|
|
4252
4257
|
{
|
|
4253
4258
|
pageConfig: h,
|
|
4254
4259
|
siteConfig: b.siteConfig,
|
|
@@ -4256,7 +4261,7 @@ const tt = ({
|
|
|
4256
4261
|
}
|
|
4257
4262
|
) }) }) : /* @__PURE__ */ u.jsx(c, {});
|
|
4258
4263
|
};
|
|
4259
|
-
function
|
|
4264
|
+
function yo(e) {
|
|
4260
4265
|
const t = {
|
|
4261
4266
|
pageRegistry: e.pageRegistry,
|
|
4262
4267
|
siteConfig: e.siteConfig,
|
|
@@ -4268,26 +4273,26 @@ function xo(e) {
|
|
|
4268
4273
|
// empty string at the Core level for runtime; ignored by ThemeLoader in tenant mode
|
|
4269
4274
|
NotFoundComponent: e.NotFoundComponent
|
|
4270
4275
|
};
|
|
4271
|
-
return /* @__PURE__ */ u.jsxs(ye, { element: /* @__PURE__ */ u.jsx(
|
|
4276
|
+
return /* @__PURE__ */ u.jsxs(ye, { element: /* @__PURE__ */ u.jsx(nr, {}), children: [
|
|
4272
4277
|
/* @__PURE__ */ u.jsx(ye, { path: "/", element: /* @__PURE__ */ u.jsx(tt, { ...t }) }),
|
|
4273
4278
|
/* @__PURE__ */ u.jsx(ye, { path: "/*", element: /* @__PURE__ */ u.jsx(tt, { ...t }) }),
|
|
4274
4279
|
/* @__PURE__ */ u.jsx(ye, { path: "*", element: /* @__PURE__ */ u.jsx(e.NotFoundComponent, {}) })
|
|
4275
4280
|
] });
|
|
4276
4281
|
}
|
|
4277
|
-
function
|
|
4278
|
-
return /* @__PURE__ */ u.jsx(
|
|
4282
|
+
function Ao({ config: e }) {
|
|
4283
|
+
return /* @__PURE__ */ u.jsx(sr, { config: e, routesBuilder: yo });
|
|
4279
4284
|
}
|
|
4280
|
-
const
|
|
4285
|
+
const xo = /\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i, vo = /^[a-zA-Z][a-zA-Z\d+\-.]*:/, wo = (e) => vo.test(e), _o = (e, t = "default", r = "/") => {
|
|
4281
4286
|
const o = e.trim();
|
|
4282
|
-
if (!o ||
|
|
4287
|
+
if (!o || wo(o) || o.startsWith("#"))
|
|
4283
4288
|
return o;
|
|
4284
|
-
if (o.startsWith("/assets/") || o.startsWith("/uploaded-assets/")) return
|
|
4285
|
-
if (o.startsWith("assets/")) return
|
|
4286
|
-
if (!
|
|
4287
|
-
return
|
|
4289
|
+
if (o.startsWith("/assets/") || o.startsWith("/uploaded-assets/")) return ke(o, r);
|
|
4290
|
+
if (o.startsWith("assets/")) return ke(`/${o}`, r);
|
|
4291
|
+
if (!xo.test(o))
|
|
4292
|
+
return ke(o.startsWith("/") ? o : `/${o}`, r);
|
|
4288
4293
|
const s = o.replace(/^\//, "");
|
|
4289
|
-
return
|
|
4290
|
-
},
|
|
4294
|
+
return ke(`/assets/${t}/${s}`, r);
|
|
4295
|
+
}, Oo = {
|
|
4291
4296
|
UPDATE_DRAFTS: "jsonpages:update-drafts",
|
|
4292
4297
|
SYNC_SELECTION: "jsonpages:sync-selection",
|
|
4293
4298
|
SECTION_SELECT: "jsonpages:section-select",
|
|
@@ -4299,28 +4304,28 @@ const vo = /\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i, wo = /^[a-zA-Z][a
|
|
|
4299
4304
|
STAGE_READY: "jsonpages:stage-ready",
|
|
4300
4305
|
WEBMCP_TOOL_CALL: "olonjs:webmcp:tool-call",
|
|
4301
4306
|
WEBMCP_TOOL_RESULT: "olonjs:webmcp:tool-result"
|
|
4302
|
-
},
|
|
4307
|
+
}, Po = I.object({
|
|
4303
4308
|
url: I.string(),
|
|
4304
4309
|
alt: I.string().optional()
|
|
4305
|
-
}).describe("ui:image-picker"),
|
|
4310
|
+
}).describe("ui:image-picker"), zo = I.object({
|
|
4306
4311
|
id: I.string().optional(),
|
|
4307
4312
|
anchorId: I.string().optional().describe("ui:text")
|
|
4308
|
-
}),
|
|
4313
|
+
}), No = I.object({
|
|
4309
4314
|
id: I.string().optional()
|
|
4310
|
-
}),
|
|
4315
|
+
}), Io = I.object({
|
|
4311
4316
|
paddingTop: I.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("md").describe("ui:select"),
|
|
4312
4317
|
paddingBottom: I.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("md").describe("ui:select"),
|
|
4313
4318
|
theme: I.enum(["dark", "light", "accent"]).default("dark").describe("ui:select"),
|
|
4314
4319
|
container: I.enum(["boxed", "fluid"]).default("boxed").describe("ui:select")
|
|
4315
|
-
}),
|
|
4320
|
+
}), $o = I.object({
|
|
4316
4321
|
id: I.string().optional(),
|
|
4317
4322
|
label: I.string().describe("ui:text"),
|
|
4318
4323
|
href: I.string().describe("ui:text"),
|
|
4319
4324
|
variant: I.enum(["primary", "secondary", "accent"]).default("primary").describe("ui:select")
|
|
4320
|
-
}),
|
|
4325
|
+
}), Lo = I.object({
|
|
4321
4326
|
recipientEmail: I.string().optional().describe("ui:text")
|
|
4322
4327
|
});
|
|
4323
|
-
function
|
|
4328
|
+
function ko(e) {
|
|
4324
4329
|
const t = e.split(`
|
|
4325
4330
|
`).map((n) => n.trimEnd()).filter((n) => n.length > 0);
|
|
4326
4331
|
if (t.length === 0) return null;
|
|
@@ -4336,7 +4341,7 @@ function jo(e) {
|
|
|
4336
4341
|
return { event: r, data: o.join(`
|
|
4337
4342
|
`) };
|
|
4338
4343
|
}
|
|
4339
|
-
async function
|
|
4344
|
+
async function Mo(e) {
|
|
4340
4345
|
var a;
|
|
4341
4346
|
const t = await fetch(`${e.apiBaseUrl}/save-stream`, {
|
|
4342
4347
|
method: "POST",
|
|
@@ -4365,7 +4370,7 @@ async function Do(e) {
|
|
|
4365
4370
|
`);
|
|
4366
4371
|
n = l ? "" : m.pop() ?? "";
|
|
4367
4372
|
for (const b of m) {
|
|
4368
|
-
const h =
|
|
4373
|
+
const h = ko(b);
|
|
4369
4374
|
if (h && h.data) {
|
|
4370
4375
|
if (h.event === "step") {
|
|
4371
4376
|
const y = JSON.parse(h.data);
|
|
@@ -4387,7 +4392,7 @@ async function Do(e) {
|
|
|
4387
4392
|
if (!s)
|
|
4388
4393
|
throw new Error("Cloud save stream ended before completion.");
|
|
4389
4394
|
}
|
|
4390
|
-
const
|
|
4395
|
+
const Do = [
|
|
4391
4396
|
{
|
|
4392
4397
|
id: "commit",
|
|
4393
4398
|
label: "Commit",
|
|
@@ -4424,38 +4429,38 @@ const Fo = [
|
|
|
4424
4429
|
glyph: "✦",
|
|
4425
4430
|
duration: 1600
|
|
4426
4431
|
}
|
|
4427
|
-
],
|
|
4428
|
-
function
|
|
4429
|
-
return
|
|
4432
|
+
], jo = { status: "idle", message: "" }, Eo = Ae({});
|
|
4433
|
+
function Fo(e) {
|
|
4434
|
+
return Re(Eo)[e] ?? jo;
|
|
4430
4435
|
}
|
|
4431
4436
|
export {
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4437
|
+
No as BaseArrayItem,
|
|
4438
|
+
zo as BaseSectionData,
|
|
4439
|
+
Io as BaseSectionSettingsSchema,
|
|
4440
|
+
Kt as ConfigProvider,
|
|
4441
|
+
$o as CtaSchema,
|
|
4442
|
+
Do as DEPLOY_STEPS,
|
|
4443
|
+
Zt as DefaultNotFound,
|
|
4439
4444
|
ct as IconRegistryContext,
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4445
|
+
Po as ImageSelectionSchema,
|
|
4446
|
+
Eo as OlonFormsContext,
|
|
4447
|
+
Ao as OlonJSEngine,
|
|
4448
|
+
fo as PageRenderer,
|
|
4449
|
+
Oo as STUDIO_EVENTS,
|
|
4450
|
+
Se as SectionRenderer,
|
|
4451
|
+
ar as StudioProvider,
|
|
4452
|
+
po as ThemeLoader,
|
|
4453
|
+
Lo as WithFormRecipient,
|
|
4454
|
+
tr as buildThemeVariableMap,
|
|
4450
4455
|
Le as cn,
|
|
4451
4456
|
Ie as normalizeBasePath,
|
|
4452
|
-
|
|
4457
|
+
_o as resolveAssetUrl,
|
|
4453
4458
|
st as resolveRuntimeConfig,
|
|
4454
|
-
|
|
4459
|
+
Mo as startCloudSaveStream,
|
|
4455
4460
|
lt as themeManager,
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
+
Qt as useConfig,
|
|
4462
|
+
Fo as useFormState,
|
|
4463
|
+
Ro as useIconRegistry,
|
|
4464
|
+
ir as useStudio,
|
|
4465
|
+
ke as withBasePath
|
|
4461
4466
|
};
|