@olonjs/core 1.1.2 → 1.1.4
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.
|
@@ -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,
|
package/dist/olonjs-core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as ne } from "zod";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import be, { forwardRef as wi, createElement as Yo, Component as us, useEffect as Q, useState as re, useRef as me, useMemo as ve, useLayoutEffect as yi, useCallback as se,
|
|
3
|
+
import be, { forwardRef as wi, createElement as Yo, Component as us, useEffect as Q, useState as re, useRef as me, useMemo as ve, useLayoutEffect as yi, useCallback as se, memo as wd, useReducer as yd, useContext as yt, createContext as br, cloneElement as kd, useDeferredValue as Sd } from "react";
|
|
4
4
|
import { useConfig as fs, ConfigProvider as ps } from "./olonjs-core-runtime.js";
|
|
5
5
|
import { ConfigProvider as ix, useConfig as ax } from "./olonjs-core-runtime.js";
|
|
6
6
|
import { useStudio as ms, StudioProvider as ki } from "./olonjs-core-runtime.js";
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olonjs/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/olonjs-core.umd.cjs",
|
|
7
7
|
"module": "./dist/olonjs-core.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"build": "node scripts/build-dual.mjs",
|
|
43
44
|
"prepack": "node scripts/sync-peers-from-stack.js",
|
|
44
45
|
"test": "vitest run",
|
|
45
|
-
"test:boundary": "node scripts/check-runtime-decoupling.mjs",
|
|
46
|
+
"test:boundary": "node scripts/check-runtime-decoupling.mjs && node scripts/check-singleton-modules.mjs",
|
|
46
47
|
"test:all": "npm run test:boundary && npm test"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|