sibujs 3.3.1 → 3.3.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/browser.cjs +41 -18
- package/dist/browser.js +5 -5
- package/dist/build.cjs +57 -22
- package/dist/build.js +14 -14
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-MHBCEJQO.js → chunk-23VT3KZB.js} +2 -2
- package/dist/{chunk-WL7BIR6O.js → chunk-25LY5SRH.js} +31 -24
- package/dist/{chunk-37BUKSLH.js → chunk-5K6RVA2S.js} +1 -1
- package/dist/{chunk-AMIKDMLP.js → chunk-5Y34FWED.js} +17 -6
- package/dist/chunk-7ZHH77QA.js +9 -0
- package/dist/chunk-CCSJMTRN.js +15 -0
- package/dist/{chunk-R3QEDXFS.js → chunk-EX77FXTT.js} +1 -1
- package/dist/{chunk-WW6DAGGR.js → chunk-F3HO2MP7.js} +1 -1
- package/dist/{chunk-ZUVLC7TM.js → chunk-F7HW2NI5.js} +2 -4
- package/dist/{chunk-ULLTNDRA.js → chunk-IEYFHN5V.js} +72 -25
- package/dist/{chunk-Z37APKBV.js → chunk-IQN5W7GE.js} +73 -16
- package/dist/{chunk-WZG2SZOT.js → chunk-IWFE4AHO.js} +1 -1
- package/dist/{chunk-IKLYI3RF.js → chunk-MYXEBADX.js} +53 -23
- package/dist/{chunk-6LTFHJQG.js → chunk-QCQQ2N5H.js} +41 -20
- package/dist/{chunk-VOVVTOEA.js → chunk-QTOOBABV.js} +22 -5
- package/dist/{chunk-LU2MQXQQ.js → chunk-RZKGMHH4.js} +6 -6
- package/dist/{chunk-GOJMFRBL.js → chunk-S3NFJO6L.js} +20 -14
- package/dist/{chunk-NHKQKKZU.js → chunk-SBPUXWCE.js} +1 -1
- package/dist/{chunk-SLMFA3ZZ.js → chunk-TBDTU7UO.js} +2 -2
- package/dist/{chunk-4UUMSLSL.js → chunk-TVCCXPU2.js} +5 -5
- package/dist/{chunk-TEFZT5PJ.js → chunk-UOMYIAG6.js} +1 -1
- package/dist/{chunk-XH2RTYEQ.js → chunk-WFUUT6TG.js} +15 -8
- package/dist/{chunk-M5KBNOSJ.js → chunk-WTFMV2RU.js} +70 -59
- package/dist/{chunk-3JHCYHWN.js → chunk-WWV3SJ3L.js} +19 -13
- package/dist/{chunk-RYMOSG5B.js → chunk-Y35NQNLG.js} +90 -60
- package/dist/{chunk-F7FXQ3QS.js → chunk-ZXCZWMZT.js} +1 -1
- package/dist/data.cjs +36 -16
- package/dist/data.js +8 -7
- package/dist/devtools.cjs +91 -35
- package/dist/devtools.d.cts +12 -5
- package/dist/devtools.d.ts +12 -5
- package/dist/devtools.js +7 -6
- package/dist/ecosystem.cjs +31 -16
- package/dist/ecosystem.js +11 -10
- package/dist/extras.cjs +485 -280
- package/dist/extras.d.cts +1 -1
- package/dist/extras.d.ts +1 -1
- package/dist/extras.js +28 -24
- package/dist/index.cjs +59 -22
- package/dist/index.d.cts +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +25 -21
- package/dist/motion.cjs +223 -204
- package/dist/motion.d.cts +8 -1
- package/dist/motion.d.ts +8 -1
- package/dist/motion.js +6 -3
- package/dist/patterns.cjs +33 -20
- package/dist/patterns.d.cts +4 -1
- package/dist/patterns.d.ts +4 -1
- package/dist/patterns.js +6 -6
- package/dist/performance.cjs +90 -70
- package/dist/performance.js +8 -7
- package/dist/plugins.cjs +207 -144
- package/dist/plugins.d.cts +2 -1
- package/dist/plugins.d.ts +2 -1
- package/dist/plugins.js +178 -124
- package/dist/{ssr-6D67RAVB.js → ssr-2PPULEK2.js} +2 -2
- package/dist/ssr.cjs +132 -105
- package/dist/ssr.d.cts +8 -1
- package/dist/ssr.d.ts +8 -1
- package/dist/ssr.js +11 -10
- package/dist/testing.cjs +38 -18
- package/dist/testing.js +19 -8
- package/dist/ui.cjs +337 -294
- package/dist/ui.d.cts +0 -20
- package/dist/ui.d.ts +0 -20
- package/dist/ui.js +30 -24
- package/dist/widgets.cjs +95 -27
- package/dist/widgets.d.cts +6 -1
- package/dist/widgets.d.ts +6 -1
- package/dist/widgets.js +8 -7
- package/package.json +1 -1
- package/dist/chunk-YT6HQ6AM.js +0 -14
package/dist/devtools.cjs
CHANGED
|
@@ -609,7 +609,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
609
609
|
|
|
610
610
|
// src/reactivity/track.ts
|
|
611
611
|
var _isDev3 = isDev();
|
|
612
|
-
var _runtimeVersion =
|
|
612
|
+
var _runtimeVersion = true ? "3.3.3" : "dev";
|
|
613
613
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
614
614
|
function resolveReactiveApi() {
|
|
615
615
|
const g = globalThis;
|
|
@@ -785,6 +785,12 @@ function signal(initial, options) {
|
|
|
785
785
|
return [get, set];
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
+
// src/utils/globalSingleton.ts
|
|
789
|
+
function globalSingleton(key, create) {
|
|
790
|
+
const g = globalThis;
|
|
791
|
+
return g[key] ?? (g[key] = create());
|
|
792
|
+
}
|
|
793
|
+
|
|
788
794
|
// src/utils/sanitize.ts
|
|
789
795
|
function stripHtml(html) {
|
|
790
796
|
const input = String(html);
|
|
@@ -822,10 +828,50 @@ function createGlobalHook() {
|
|
|
822
828
|
listeners.set(event, set);
|
|
823
829
|
}
|
|
824
830
|
set.add(fn);
|
|
831
|
+
return () => {
|
|
832
|
+
set?.delete(fn);
|
|
833
|
+
};
|
|
825
834
|
},
|
|
826
835
|
off(event, fn) {
|
|
827
836
|
listeners.get(event)?.delete(fn);
|
|
828
837
|
},
|
|
838
|
+
getSignalNodes() {
|
|
839
|
+
const out = [];
|
|
840
|
+
for (const [, node] of nodes) {
|
|
841
|
+
let value = "";
|
|
842
|
+
try {
|
|
843
|
+
const ref = node.ref;
|
|
844
|
+
let raw;
|
|
845
|
+
if (node.type === "effect") {
|
|
846
|
+
raw = void 0;
|
|
847
|
+
} else if (node.type === "computed" && ref) {
|
|
848
|
+
raw = ref._v;
|
|
849
|
+
} else if (ref && "value" in ref) {
|
|
850
|
+
raw = ref.value;
|
|
851
|
+
}
|
|
852
|
+
if (raw === void 0) value = "undefined";
|
|
853
|
+
else if (raw === null) value = "null";
|
|
854
|
+
else if (typeof raw === "object") value = JSON.stringify(raw);
|
|
855
|
+
else value = String(raw);
|
|
856
|
+
} catch {
|
|
857
|
+
value = "?";
|
|
858
|
+
}
|
|
859
|
+
if (value.length > 200) value = `${value.slice(0, 200)}...`;
|
|
860
|
+
out.push({
|
|
861
|
+
id: String(node.id),
|
|
862
|
+
name: node.name || null,
|
|
863
|
+
kind: node.type === "computed" ? "derived" : node.type,
|
|
864
|
+
value,
|
|
865
|
+
// Edge identities aren't tracked by this registry (only a subscriber
|
|
866
|
+
// count, via node.ref.__sc) — left empty until the core exposes the
|
|
867
|
+
// dependency graph. The node inventory itself is real.
|
|
868
|
+
subscribers: [],
|
|
869
|
+
dependencies: [],
|
|
870
|
+
evalCount: 0
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
return out;
|
|
874
|
+
},
|
|
829
875
|
emit(event, payload) {
|
|
830
876
|
events.push({ event, payload, ts: Date.now() });
|
|
831
877
|
if (events.length > 2e3) events.splice(0, events.length - 2e3);
|
|
@@ -851,34 +897,38 @@ function getOrCreateHook() {
|
|
|
851
897
|
}
|
|
852
898
|
return g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
853
899
|
}
|
|
854
|
-
var
|
|
855
|
-
|
|
856
|
-
|
|
900
|
+
var _dt = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.devtools.state.v1"), () => ({
|
|
901
|
+
active: null,
|
|
902
|
+
nextNodeId: 0,
|
|
903
|
+
// Gate for inferName(): only `true` while devtools are initialized AND in dev
|
|
904
|
+
// mode — otherwise skip the Error-stack walk so prod hot paths don't allocate.
|
|
905
|
+
inferNameArmed: false
|
|
906
|
+
}));
|
|
857
907
|
function getActiveDevTools() {
|
|
858
|
-
return
|
|
908
|
+
return _dt.active;
|
|
859
909
|
}
|
|
860
910
|
function initDevTools(config) {
|
|
861
911
|
const maxEvents = config?.maxEvents ?? 1e3;
|
|
862
912
|
const enabled = config?.enabled ?? isDev();
|
|
863
913
|
const expose = config?.expose ?? isDev();
|
|
864
914
|
if (!enabled) return createNoopApi();
|
|
865
|
-
inferNameArmed = true;
|
|
915
|
+
_dt.inferNameArmed = true;
|
|
866
916
|
const hook = getOrCreateHook();
|
|
867
|
-
nextNodeId = 0;
|
|
917
|
+
_dt.nextNodeId = 0;
|
|
868
918
|
const eventLog = [];
|
|
869
919
|
hook.on("signal:create", (payload) => {
|
|
870
920
|
const p = payload;
|
|
871
|
-
nextNodeId++;
|
|
921
|
+
_dt.nextNodeId++;
|
|
872
922
|
const name = inferName();
|
|
873
923
|
const node = {
|
|
874
|
-
id: nextNodeId,
|
|
924
|
+
id: _dt.nextNodeId,
|
|
875
925
|
type: "signal",
|
|
876
926
|
name,
|
|
877
927
|
ref: p.signal,
|
|
878
928
|
getter: p.getter,
|
|
879
929
|
createdAt: Date.now()
|
|
880
930
|
};
|
|
881
|
-
hook.nodes.set(nextNodeId, node);
|
|
931
|
+
hook.nodes.set(_dt.nextNodeId, node);
|
|
882
932
|
emit();
|
|
883
933
|
});
|
|
884
934
|
hook.on("signal:update", (payload) => {
|
|
@@ -898,17 +948,17 @@ function initDevTools(config) {
|
|
|
898
948
|
});
|
|
899
949
|
hook.on("computed:create", (payload) => {
|
|
900
950
|
const p = payload;
|
|
901
|
-
nextNodeId++;
|
|
951
|
+
_dt.nextNodeId++;
|
|
902
952
|
const name = inferName();
|
|
903
953
|
const node = {
|
|
904
|
-
id: nextNodeId,
|
|
954
|
+
id: _dt.nextNodeId,
|
|
905
955
|
type: "computed",
|
|
906
956
|
name,
|
|
907
957
|
ref: p.signal,
|
|
908
958
|
getter: p.getter,
|
|
909
959
|
createdAt: Date.now()
|
|
910
960
|
};
|
|
911
|
-
hook.nodes.set(nextNodeId, node);
|
|
961
|
+
hook.nodes.set(_dt.nextNodeId, node);
|
|
912
962
|
emit();
|
|
913
963
|
});
|
|
914
964
|
hook.on("computed:update", (payload) => {
|
|
@@ -925,11 +975,11 @@ function initDevTools(config) {
|
|
|
925
975
|
emit();
|
|
926
976
|
});
|
|
927
977
|
hook.on("effect:create", (payload) => {
|
|
928
|
-
nextNodeId++;
|
|
978
|
+
_dt.nextNodeId++;
|
|
929
979
|
const name = inferName();
|
|
930
980
|
const p = payload;
|
|
931
|
-
const node = { id: nextNodeId, type: "effect", name, ref: p.effectFn, createdAt: Date.now() };
|
|
932
|
-
hook.nodes.set(nextNodeId, node);
|
|
981
|
+
const node = { id: _dt.nextNodeId, type: "effect", name, ref: p.effectFn, createdAt: Date.now() };
|
|
982
|
+
hook.nodes.set(_dt.nextNodeId, node);
|
|
933
983
|
emit();
|
|
934
984
|
});
|
|
935
985
|
hook.on("effect:run", (payload) => {
|
|
@@ -1086,8 +1136,8 @@ function initDevTools(config) {
|
|
|
1086
1136
|
hook.components.clear();
|
|
1087
1137
|
hook.events.length = 0;
|
|
1088
1138
|
isActive = false;
|
|
1089
|
-
inferNameArmed = false;
|
|
1090
|
-
|
|
1139
|
+
_dt.inferNameArmed = false;
|
|
1140
|
+
_dt.active = null;
|
|
1091
1141
|
const g = globalThis;
|
|
1092
1142
|
if (g.__SIBU__) {
|
|
1093
1143
|
delete g.__SIBU__.devtools;
|
|
@@ -1255,7 +1305,7 @@ function initDevTools(config) {
|
|
|
1255
1305
|
w.__SIBU_DEVTOOLS_VERSION__ = () => changeVersion;
|
|
1256
1306
|
w.__SIBU_DEVTOOLS_DATA__ = buildData;
|
|
1257
1307
|
}
|
|
1258
|
-
|
|
1308
|
+
_dt.active = api;
|
|
1259
1309
|
if (typeof document !== "undefined") {
|
|
1260
1310
|
domObserver = new MutationObserver((mutations) => {
|
|
1261
1311
|
let changed = false;
|
|
@@ -1331,7 +1381,7 @@ function initDevTools(config) {
|
|
|
1331
1381
|
return api;
|
|
1332
1382
|
}
|
|
1333
1383
|
function inferName() {
|
|
1334
|
-
if (!inferNameArmed || !isDev()) return "anonymous";
|
|
1384
|
+
if (!_dt.inferNameArmed || !isDev()) return "anonymous";
|
|
1335
1385
|
try {
|
|
1336
1386
|
const stack = new Error().stack || "";
|
|
1337
1387
|
for (const line of stack.split("\n")) {
|
|
@@ -1412,7 +1462,7 @@ function devState(name, initial) {
|
|
|
1412
1462
|
const oldValue = get();
|
|
1413
1463
|
set(next);
|
|
1414
1464
|
const newValue = get();
|
|
1415
|
-
const dt =
|
|
1465
|
+
const dt = _dt.active;
|
|
1416
1466
|
if (dt?.isEnabled() && !Object.is(oldValue, newValue)) {
|
|
1417
1467
|
dt.record({ type: "state-change", component, key, oldValue, newValue, timestamp: Date.now() });
|
|
1418
1468
|
}
|
|
@@ -1767,23 +1817,29 @@ function formatError(error, context, seen = /* @__PURE__ */ new Set([error])) {
|
|
|
1767
1817
|
}
|
|
1768
1818
|
|
|
1769
1819
|
// src/core/ssr-context.ts
|
|
1770
|
-
var
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1820
|
+
var SSR_KEY = /* @__PURE__ */ Symbol.for("sibujs.ssr.v1");
|
|
1821
|
+
function detectSSRShared() {
|
|
1822
|
+
let detected = null;
|
|
1823
|
+
try {
|
|
1824
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
1825
|
+
let mod = null;
|
|
1826
|
+
const getBuiltin = process.getBuiltinModule;
|
|
1827
|
+
if (typeof getBuiltin === "function") {
|
|
1828
|
+
mod = getBuiltin("node:async_hooks");
|
|
1829
|
+
} else {
|
|
1830
|
+
const req = Function("return typeof require==='function'?require:null")();
|
|
1831
|
+
if (req) mod = req("node:async_hooks");
|
|
1832
|
+
}
|
|
1833
|
+
if (mod) detected = new mod.AsyncLocalStorage();
|
|
1780
1834
|
}
|
|
1781
|
-
|
|
1835
|
+
} catch {
|
|
1836
|
+
detected = null;
|
|
1782
1837
|
}
|
|
1783
|
-
|
|
1784
|
-
als = null;
|
|
1838
|
+
return { als: detected, fallbackStore: { ssr: false, suspenseIdCounter: 0 } };
|
|
1785
1839
|
}
|
|
1786
|
-
var
|
|
1840
|
+
var _shared = globalThis[SSR_KEY] ?? (globalThis[SSR_KEY] = detectSSRShared());
|
|
1841
|
+
var als = _shared.als;
|
|
1842
|
+
var fallbackStore = _shared.fallbackStore;
|
|
1787
1843
|
function getSSRStore() {
|
|
1788
1844
|
if (als) {
|
|
1789
1845
|
const s = als.getStore();
|
package/dist/devtools.d.cts
CHANGED
|
@@ -24,12 +24,19 @@ interface SignalGraphSnapshot {
|
|
|
24
24
|
edgeCount: number;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Capture a synchronous snapshot of the reactive graph
|
|
28
|
-
*
|
|
29
|
-
* layer populates; this function walks it and produces a serializable
|
|
30
|
-
* view with dependency counts.
|
|
27
|
+
* Capture a synchronous snapshot of the reactive graph from the devtools hook's
|
|
28
|
+
* `getSignalNodes()`, producing a serializable view.
|
|
31
29
|
*
|
|
32
|
-
* Returns an empty snapshot when devtools are not enabled
|
|
30
|
+
* Returns an empty snapshot when devtools are not enabled (`initDevTools()` has
|
|
31
|
+
* not run, so no hook / node registry exists).
|
|
32
|
+
*
|
|
33
|
+
* Coverage note: the default devtools hook reports the live node **inventory**
|
|
34
|
+
* (id / name / kind / current value) — useful for inspecting state and for
|
|
35
|
+
* leak-detection (how many signals/effects are alive). It does not yet report
|
|
36
|
+
* the dependency **edges**: the lightweight registry tracks only a subscriber
|
|
37
|
+
* *count*, not subscriber/dependency identities, so `subscribers`/`dependencies`
|
|
38
|
+
* are empty and `edgeCount` is 0 unless a richer hook supplies them. Wiring real
|
|
39
|
+
* edges requires the reactive core to expose its dependency sets.
|
|
33
40
|
*/
|
|
34
41
|
declare function captureSignalGraph(): SignalGraphSnapshot;
|
|
35
42
|
/**
|
package/dist/devtools.d.ts
CHANGED
|
@@ -24,12 +24,19 @@ interface SignalGraphSnapshot {
|
|
|
24
24
|
edgeCount: number;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Capture a synchronous snapshot of the reactive graph
|
|
28
|
-
*
|
|
29
|
-
* layer populates; this function walks it and produces a serializable
|
|
30
|
-
* view with dependency counts.
|
|
27
|
+
* Capture a synchronous snapshot of the reactive graph from the devtools hook's
|
|
28
|
+
* `getSignalNodes()`, producing a serializable view.
|
|
31
29
|
*
|
|
32
|
-
* Returns an empty snapshot when devtools are not enabled
|
|
30
|
+
* Returns an empty snapshot when devtools are not enabled (`initDevTools()` has
|
|
31
|
+
* not run, so no hook / node registry exists).
|
|
32
|
+
*
|
|
33
|
+
* Coverage note: the default devtools hook reports the live node **inventory**
|
|
34
|
+
* (id / name / kind / current value) — useful for inspecting state and for
|
|
35
|
+
* leak-detection (how many signals/effects are alive). It does not yet report
|
|
36
|
+
* the dependency **edges**: the lightweight registry tracks only a subscriber
|
|
37
|
+
* *count*, not subscriber/dependency identities, so `subscribers`/`dependencies`
|
|
38
|
+
* are empty and `edgeCount` is 0 unless a richer hook supplies them. Wiring real
|
|
39
|
+
* edges requires the reactive core to expose its dependency sets.
|
|
33
40
|
*/
|
|
34
41
|
declare function captureSignalGraph(): SignalGraphSnapshot;
|
|
35
42
|
/**
|
package/dist/devtools.js
CHANGED
|
@@ -35,13 +35,14 @@ import {
|
|
|
35
35
|
trackCleanup,
|
|
36
36
|
walkDependencyGraph,
|
|
37
37
|
withErrorTracking
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-IEYFHN5V.js";
|
|
39
|
+
import "./chunk-7ZHH77QA.js";
|
|
40
40
|
import "./chunk-L3GAGWCC.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-23VT3KZB.js";
|
|
42
|
+
import "./chunk-S3NFJO6L.js";
|
|
43
|
+
import "./chunk-5VGSK6D2.js";
|
|
44
|
+
import "./chunk-IWFE4AHO.js";
|
|
45
|
+
import "./chunk-UOMYIAG6.js";
|
|
45
46
|
import {
|
|
46
47
|
isDev
|
|
47
48
|
} from "./chunk-COY6PUD2.js";
|
package/dist/ecosystem.cjs
CHANGED
|
@@ -469,7 +469,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
469
469
|
|
|
470
470
|
// src/reactivity/track.ts
|
|
471
471
|
var _isDev3 = isDev();
|
|
472
|
-
var _runtimeVersion =
|
|
472
|
+
var _runtimeVersion = true ? "3.3.3" : "dev";
|
|
473
473
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
474
474
|
function resolveReactiveApi() {
|
|
475
475
|
const g = globalThis;
|
|
@@ -526,23 +526,29 @@ var getSubscriberDeps2 = API.getSubscriberDeps;
|
|
|
526
526
|
var forEachSubscriber2 = API.forEachSubscriber;
|
|
527
527
|
|
|
528
528
|
// src/core/ssr-context.ts
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
529
|
+
var SSR_KEY = /* @__PURE__ */ Symbol.for("sibujs.ssr.v1");
|
|
530
|
+
function detectSSRShared() {
|
|
531
|
+
let detected = null;
|
|
532
|
+
try {
|
|
533
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
534
|
+
let mod = null;
|
|
535
|
+
const getBuiltin = process.getBuiltinModule;
|
|
536
|
+
if (typeof getBuiltin === "function") {
|
|
537
|
+
mod = getBuiltin("node:async_hooks");
|
|
538
|
+
} else {
|
|
539
|
+
const req = Function("return typeof require==='function'?require:null")();
|
|
540
|
+
if (req) mod = req("node:async_hooks");
|
|
541
|
+
}
|
|
542
|
+
if (mod) detected = new mod.AsyncLocalStorage();
|
|
539
543
|
}
|
|
540
|
-
|
|
544
|
+
} catch {
|
|
545
|
+
detected = null;
|
|
541
546
|
}
|
|
542
|
-
|
|
543
|
-
als = null;
|
|
547
|
+
return { als: detected, fallbackStore: { ssr: false, suspenseIdCounter: 0 } };
|
|
544
548
|
}
|
|
545
|
-
var
|
|
549
|
+
var _shared = globalThis[SSR_KEY] ?? (globalThis[SSR_KEY] = detectSSRShared());
|
|
550
|
+
var als = _shared.als;
|
|
551
|
+
var fallbackStore = _shared.fallbackStore;
|
|
546
552
|
function getSSRStore() {
|
|
547
553
|
if (als) {
|
|
548
554
|
const s = als.getStore();
|
|
@@ -795,6 +801,12 @@ function signal(initial, options) {
|
|
|
795
801
|
return [get, set];
|
|
796
802
|
}
|
|
797
803
|
|
|
804
|
+
// src/utils/globalSingleton.ts
|
|
805
|
+
function globalSingleton(key, create) {
|
|
806
|
+
const g = globalThis;
|
|
807
|
+
return g[key] ?? (g[key] = create());
|
|
808
|
+
}
|
|
809
|
+
|
|
798
810
|
// src/plugins/plugin.ts
|
|
799
811
|
function createPluginRegistry() {
|
|
800
812
|
const installedPlugins = /* @__PURE__ */ new Set();
|
|
@@ -874,7 +886,10 @@ function createPluginRegistry() {
|
|
|
874
886
|
};
|
|
875
887
|
return registry;
|
|
876
888
|
}
|
|
877
|
-
var
|
|
889
|
+
var _defaults = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.plugins.defaultRegistry.v1"), () => ({
|
|
890
|
+
registry: createPluginRegistry(),
|
|
891
|
+
touched: false
|
|
892
|
+
}));
|
|
878
893
|
function createPlugin(name, install) {
|
|
879
894
|
return { name, install };
|
|
880
895
|
}
|
package/dist/ecosystem.js
CHANGED
|
@@ -7,17 +7,18 @@ import {
|
|
|
7
7
|
mobXAdapter,
|
|
8
8
|
reduxAdapter,
|
|
9
9
|
zustandAdapter
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-TVCCXPU2.js";
|
|
11
|
+
import "./chunk-WWV3SJ3L.js";
|
|
12
|
+
import "./chunk-7ZHH77QA.js";
|
|
13
|
+
import "./chunk-RZKGMHH4.js";
|
|
14
|
+
import "./chunk-SBPUXWCE.js";
|
|
15
|
+
import "./chunk-F3HO2MP7.js";
|
|
16
16
|
import "./chunk-L3GAGWCC.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-23VT3KZB.js";
|
|
18
|
+
import "./chunk-S3NFJO6L.js";
|
|
19
|
+
import "./chunk-5VGSK6D2.js";
|
|
20
|
+
import "./chunk-IWFE4AHO.js";
|
|
21
|
+
import "./chunk-UOMYIAG6.js";
|
|
21
22
|
import "./chunk-COY6PUD2.js";
|
|
22
23
|
export {
|
|
23
24
|
antdAdapter,
|