@olonjs/core 1.1.1 → 1.1.3
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/olonjs-core-runtime.js +9 -8
- package/dist/olonjs-core.js +2371 -2440
- package/dist/olonjs-core.umd.cjs +38 -38
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Tt, {
|
|
1
|
+
import Tt, { useContext as Te, createContext as Re, 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 = {};
|
|
@@ -531,7 +531,7 @@ const Kt = () => /* @__PURE__ */ u.jsxs(
|
|
|
531
531
|
)
|
|
532
532
|
]
|
|
533
533
|
}
|
|
534
|
-
), at =
|
|
534
|
+
), at = Re(void 0), Qt = ({ config: e, children: t }) => /* @__PURE__ */ u.jsx(
|
|
535
535
|
at.Provider,
|
|
536
536
|
{
|
|
537
537
|
value: {
|
|
@@ -546,7 +546,7 @@ const Kt = () => /* @__PURE__ */ u.jsxs(
|
|
|
546
546
|
}
|
|
547
547
|
);
|
|
548
548
|
function er() {
|
|
549
|
-
const e =
|
|
549
|
+
const e = Te(at);
|
|
550
550
|
if (e === void 0)
|
|
551
551
|
throw new Error("useConfig must be used within ConfigProvider");
|
|
552
552
|
return e;
|
|
@@ -612,7 +612,7 @@ function we(e, t) {
|
|
|
612
612
|
const s = n.replace(/^\/+/, "");
|
|
613
613
|
return `${o}${s}`;
|
|
614
614
|
}
|
|
615
|
-
const ct =
|
|
615
|
+
const ct = Re({}), Ao = () => Te(ct);
|
|
616
616
|
class nr extends rt {
|
|
617
617
|
constructor(t) {
|
|
618
618
|
super(t), this.state = { hasError: !1, error: null };
|
|
@@ -777,7 +777,7 @@ function ar({ config: e, routesBuilder: t, adminCss: r = "" }) {
|
|
|
777
777
|
}
|
|
778
778
|
);
|
|
779
779
|
}
|
|
780
|
-
const dt =
|
|
780
|
+
const dt = Re(void 0), ir = ({ mode: e, children: t }) => (oe(() => {
|
|
781
781
|
if (e !== "studio") return;
|
|
782
782
|
const r = new MutationObserver((o) => {
|
|
783
783
|
o.forEach((n) => {
|
|
@@ -788,7 +788,7 @@ const dt = Te(void 0), ir = ({ mode: e, children: t }) => (oe(() => {
|
|
|
788
788
|
});
|
|
789
789
|
return r.observe(document.body, { childList: !0 }), () => r.disconnect();
|
|
790
790
|
}, [e]), /* @__PURE__ */ u.jsx(dt.Provider, { value: { mode: e }, children: t })), lr = () => {
|
|
791
|
-
const e =
|
|
791
|
+
const e = Te(dt);
|
|
792
792
|
if (e === void 0)
|
|
793
793
|
throw new Error("useStudio must be used within a StudioProvider");
|
|
794
794
|
return e;
|
|
@@ -4415,9 +4415,9 @@ const Fo = [
|
|
|
4415
4415
|
glyph: "✦",
|
|
4416
4416
|
duration: 1600
|
|
4417
4417
|
}
|
|
4418
|
-
], Eo = { status: "idle", message: "" }, So =
|
|
4418
|
+
], Eo = { status: "idle", message: "" }, So = Re({});
|
|
4419
4419
|
function Wo(e) {
|
|
4420
|
-
return
|
|
4420
|
+
return Te(So)[e] ?? Eo;
|
|
4421
4421
|
}
|
|
4422
4422
|
export {
|
|
4423
4423
|
Io as BaseArrayItem,
|
|
@@ -4437,6 +4437,7 @@ export {
|
|
|
4437
4437
|
ir as StudioProvider,
|
|
4438
4438
|
bo as ThemeLoader,
|
|
4439
4439
|
Lo as WithFormRecipient,
|
|
4440
|
+
rr as buildThemeVariableMap,
|
|
4440
4441
|
Me as cn,
|
|
4441
4442
|
Ie as normalizeBasePath,
|
|
4442
4443
|
Oo as resolveAssetUrl,
|