sibujs 4.13.0 → 4.14.0
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/README.md +1 -1
- package/dist/browser.cjs +15 -2
- package/dist/browser.js +9 -7
- package/dist/build.cjs +880 -281
- package/dist/build.d.cts +68 -3
- package/dist/build.d.ts +68 -3
- package/dist/build.js +88 -30
- package/dist/cdn.dev.global.js +12 -12
- package/dist/cdn.full.dev.global.js +13 -13
- package/dist/cdn.full.global.js +12 -12
- package/dist/cdn.global.js +12 -12
- package/dist/{chunk-7K7W4AA5.js → chunk-2TTRW2TE.js} +6 -6
- package/dist/{chunk-J6FW5TV6.js → chunk-3HEX6QJQ.js} +5 -3
- package/dist/chunk-3HZOSMPX.js +90 -0
- package/dist/{chunk-GNSRXK34.js → chunk-4FJSAUKB.js} +11 -3
- package/dist/{chunk-IV74C2YX.js → chunk-4TQDTWWN.js} +6 -5
- package/dist/{chunk-L3QHS4O4.js → chunk-7ILEHTVX.js} +1 -1
- package/dist/{chunk-CK5F2IR5.js → chunk-A454RAEK.js} +4 -4
- package/dist/{chunk-BRRRVLHQ.js → chunk-AE32RGWX.js} +10 -6
- package/dist/{chunk-EXXSN3BW.js → chunk-B3HOT4TK.js} +1 -1
- package/dist/{chunk-F4W7WYXY.js → chunk-BKZ5N6NK.js} +8 -6
- package/dist/{chunk-MNEITZ27.js → chunk-BNXRWZZV.js} +49 -8
- package/dist/chunk-BOYKGGVD.js +2015 -0
- package/dist/{chunk-G6366I2A.js → chunk-CCKUNHVU.js} +2 -2
- package/dist/{chunk-346BYZL2.js → chunk-CJ7KS3DF.js} +16 -10
- package/dist/chunk-CNPT6NKV.js +1859 -0
- package/dist/{chunk-ENFRHCMK.js → chunk-F67F77IA.js} +2 -2
- package/dist/{chunk-TUCPL2HB.js → chunk-GIJ33UJZ.js} +1 -1
- package/dist/chunk-GVAMIU6K.js +195 -0
- package/dist/{chunk-HDKDBC6V.js → chunk-HQIAL7F2.js} +8 -6
- package/dist/{chunk-ZE5LF44R.js → chunk-JTFQ7IL4.js} +8 -8
- package/dist/{chunk-AM6DZLBM.js → chunk-LJMX4SQ7.js} +2 -2
- package/dist/{chunk-HVVRXRGO.js → chunk-MIRKTVH4.js} +7 -14
- package/dist/{chunk-YJ57VR6Y.js → chunk-N7A6FKWW.js} +5 -3
- package/dist/chunk-NT3ZYB5S.js +167 -0
- package/dist/{chunk-Z3EZX6DZ.js → chunk-QS6GMWDD.js} +151 -86
- package/dist/chunk-R5U7XKVJ.js +16 -0
- package/dist/{chunk-3C56VNCK.js → chunk-RVR5NPFL.js} +3 -3
- package/dist/{chunk-F2UWOZ6J.js → chunk-RVWJGWCL.js} +2 -2
- package/dist/{chunk-NYNYSPK7.js → chunk-S37PZD6I.js} +30 -45
- package/dist/{chunk-QV5WEOFD.js → chunk-SVULV7O4.js} +119 -26
- package/dist/{chunk-C2FAO6VQ.js → chunk-TLS4NVIB.js} +5 -5
- package/dist/{chunk-M25RIH6Y.js → chunk-UUIKJJIK.js} +10 -8
- package/dist/chunk-UYTYNCMZ.js +199 -0
- package/dist/chunk-VM2U5LEL.js +2596 -0
- package/dist/{chunk-24L5RDPS.js → chunk-Y4LUM2XS.js} +8 -6
- package/dist/data.cjs +265 -35
- package/dist/data.d.cts +31 -1
- package/dist/data.d.ts +31 -1
- package/dist/data.js +16 -10
- package/dist/devtools.cjs +15 -2
- package/dist/devtools.js +9 -7
- package/dist/{dispose-GEIG2KOF.js → dispose-EIHHHDC7.js} +3 -1
- package/dist/ecosystem.cjs +62 -23
- package/dist/ecosystem.js +14 -12
- package/dist/extras.cjs +3520 -270
- package/dist/extras.d.cts +3 -3
- package/dist/extras.d.ts +3 -3
- package/dist/extras.js +39 -29
- package/dist/index.cjs +442 -253
- package/dist/index.d.cts +93 -283
- package/dist/index.d.ts +93 -283
- package/dist/index.js +26 -16
- package/dist/motion.cjs +12 -1
- package/dist/motion.js +6 -4
- package/dist/patterns.cjs +15 -2
- package/dist/patterns.js +10 -8
- package/dist/performance.cjs +36 -2
- package/dist/performance.d.cts +2 -2
- package/dist/performance.d.ts +2 -2
- package/dist/performance.js +14 -10
- package/dist/plugins.cjs +5225 -1807
- package/dist/plugins.d.cts +8 -834
- package/dist/plugins.d.ts +8 -834
- package/dist/plugins.js +64 -2329
- package/dist/prerenderServer-MXJEVWA3.js +350 -0
- package/dist/renderRoute-DP20XwMS.d.cts +86 -0
- package/dist/renderRoute-fxgsm2Ir.d.ts +86 -0
- package/dist/routeHead-CE9SV-cH.d.cts +995 -0
- package/dist/routeHead-DzVxPviY.d.ts +995 -0
- package/dist/{routeMiddleware-B1sp4P7a.d.ts → routeMiddleware-BySbueoE.d.ts} +0 -25
- package/dist/{routeMiddleware-CedQTsLK.d.cts → routeMiddleware-CijZD5eW.d.cts} +0 -25
- package/dist/ssr-JpGpHnpC.d.cts +841 -0
- package/dist/ssr-JpGpHnpC.d.ts +841 -0
- package/dist/{ssr-VBM6J5SJ.js → ssr-NECEU4X4.js} +15 -6
- package/dist/ssr-dom.cjs +1862 -0
- package/dist/ssr-dom.d.cts +341 -0
- package/dist/ssr-dom.d.ts +341 -0
- package/dist/ssr-dom.js +19 -0
- package/dist/ssr.cjs +7630 -2064
- package/dist/ssr.d.cts +63 -5
- package/dist/ssr.d.ts +63 -5
- package/dist/ssr.js +136 -14
- package/dist/testing.cjs +6543 -87
- package/dist/testing.d.cts +80 -1
- package/dist/testing.d.ts +80 -1
- package/dist/testing.js +117 -4
- package/dist/ui.cjs +36 -2
- package/dist/ui.js +17 -14
- package/dist/widgets.cjs +14 -1
- package/dist/widgets.js +11 -9
- package/package.json +9 -2
- package/dist/chunk-2F4PSJ5Z.js +0 -765
- package/dist/chunk-7XHATCIH.js +0 -121
- package/dist/chunk-B36ADEIR.js +0 -21
- package/dist/ssr-Db0Sgdu3.d.cts +0 -245
- package/dist/ssr-Db0Sgdu3.d.ts +0 -245
package/dist/patterns.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
optimisticList,
|
|
6
6
|
persisted,
|
|
7
7
|
timeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BKZ5N6NK.js";
|
|
9
9
|
import {
|
|
10
10
|
RenderProp,
|
|
11
11
|
assertType,
|
|
@@ -21,14 +21,16 @@ import {
|
|
|
21
21
|
withDefaults,
|
|
22
22
|
withProps,
|
|
23
23
|
withWrapper
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GIJ33UJZ.js";
|
|
25
25
|
import "./chunk-62BDYGAG.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-N7A6FKWW.js";
|
|
27
|
+
import "./chunk-AE32RGWX.js";
|
|
28
|
+
import "./chunk-UYTYNCMZ.js";
|
|
29
|
+
import "./chunk-4FJSAUKB.js";
|
|
30
|
+
import "./chunk-MIRKTVH4.js";
|
|
31
|
+
import "./chunk-S37PZD6I.js";
|
|
32
|
+
import "./chunk-NT3ZYB5S.js";
|
|
33
|
+
import "./chunk-R5U7XKVJ.js";
|
|
32
34
|
export {
|
|
33
35
|
RenderProp,
|
|
34
36
|
assertType,
|
package/dist/performance.cjs
CHANGED
|
@@ -122,10 +122,21 @@ function defaultReport(error, context) {
|
|
|
122
122
|
if (typeof console === "undefined") return;
|
|
123
123
|
console.error(`[SibuJS] Uncaught error during ${describe(context)}: ${error.message}`, error);
|
|
124
124
|
}
|
|
125
|
+
function requestErrorSink() {
|
|
126
|
+
const shared = globalThis[/* @__PURE__ */ Symbol.for("sibujs.ssr.v1")];
|
|
127
|
+
if (!shared) return void 0;
|
|
128
|
+
const store = shared.als ? shared.als.getStore() : shared.fallbackDepth > 0 ? shared.fallbackStore : void 0;
|
|
129
|
+
return store?.errors;
|
|
130
|
+
}
|
|
125
131
|
function reportError(error, context) {
|
|
126
132
|
const err = normalizeError(error);
|
|
127
133
|
untrackedRun(() => {
|
|
128
134
|
if (claimedByBoundary(err, context)) return;
|
|
135
|
+
const sink = requestErrorSink();
|
|
136
|
+
if (sink) {
|
|
137
|
+
sink.push({ error: err, context });
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
129
140
|
const s = state();
|
|
130
141
|
const handler = s.handler;
|
|
131
142
|
if (handler && s.handlerDepth === 0) {
|
|
@@ -337,6 +348,13 @@ function devWarn(message) {
|
|
|
337
348
|
}
|
|
338
349
|
}
|
|
339
350
|
|
|
351
|
+
// src/core/rendering/hydrationHooks.ts
|
|
352
|
+
var _a;
|
|
353
|
+
var slot = globalThis[_a = /* @__PURE__ */ Symbol.for("sibujs.hydration.v2")] ?? (globalThis[_a] = { a: /* @__PURE__ */ new Set(), c: null });
|
|
354
|
+
function isHydrating() {
|
|
355
|
+
return slot.a.size > 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
340
358
|
// src/core/rendering/dispose.ts
|
|
341
359
|
var elementDisposers = /* @__PURE__ */ new WeakMap();
|
|
342
360
|
var MAX_DRAIN_TEARDOWNS = 1e4;
|
|
@@ -421,6 +439,20 @@ function disposeNodeOwn(node) {
|
|
|
421
439
|
}
|
|
422
440
|
}
|
|
423
441
|
function replaceChildrenSafely(parent, ...next) {
|
|
442
|
+
if (isHydrating() && next.length > 0 && next[0] === parent.firstChild) {
|
|
443
|
+
let ok = true;
|
|
444
|
+
for (let i = 1; i < next.length && ok; i++) ok = next[i - 1].nextSibling === next[i];
|
|
445
|
+
if (ok) {
|
|
446
|
+
let rest = next[next.length - 1].nextSibling;
|
|
447
|
+
while (rest) {
|
|
448
|
+
const following = rest.nextSibling;
|
|
449
|
+
dispose(rest);
|
|
450
|
+
parent.removeChild(rest);
|
|
451
|
+
rest = following;
|
|
452
|
+
}
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
424
456
|
for (let i = 0; i < next.length; i++) {
|
|
425
457
|
const node = next[i];
|
|
426
458
|
node.parentNode?.removeChild(node);
|
|
@@ -1000,7 +1032,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1000
1032
|
}
|
|
1001
1033
|
|
|
1002
1034
|
// src/reactivity/track.ts
|
|
1003
|
-
var _runtimeVersion = true ? "4.
|
|
1035
|
+
var _runtimeVersion = true ? "4.14.0" : "dev";
|
|
1004
1036
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1005
1037
|
function resolveReactiveApi() {
|
|
1006
1038
|
const g = globalThis;
|
|
@@ -1087,6 +1119,8 @@ function detectSSRShared() {
|
|
|
1087
1119
|
}
|
|
1088
1120
|
if (mod) detected = new mod.AsyncLocalStorage();
|
|
1089
1121
|
}
|
|
1122
|
+
const globalAls = globalThis.AsyncLocalStorage;
|
|
1123
|
+
if (!detected && typeof globalAls === "function") detected = new globalAls();
|
|
1090
1124
|
} catch {
|
|
1091
1125
|
detected = null;
|
|
1092
1126
|
}
|
|
@@ -1175,7 +1209,7 @@ function disposeEffect(ctx) {
|
|
|
1175
1209
|
}
|
|
1176
1210
|
function effect(effectFn, options) {
|
|
1177
1211
|
devAssert(typeof effectFn === "function", "effect: argument must be a function.");
|
|
1178
|
-
if (isSSR()) return () => {
|
|
1212
|
+
if (isSSR() && !options?.server) return () => {
|
|
1179
1213
|
};
|
|
1180
1214
|
const ctx = {
|
|
1181
1215
|
fn: effectFn,
|
package/dist/performance.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TrustedHTML } from './ssr-
|
|
2
|
-
export {
|
|
1
|
+
import { T as TrustedHTML } from './ssr-JpGpHnpC.cjs';
|
|
2
|
+
export { u as trustHTML } from './ssr-JpGpHnpC.cjs';
|
|
3
3
|
|
|
4
4
|
declare const Priority: {
|
|
5
5
|
readonly IMMEDIATE: 0;
|
package/dist/performance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TrustedHTML } from './ssr-
|
|
2
|
-
export {
|
|
1
|
+
import { T as TrustedHTML } from './ssr-JpGpHnpC.js';
|
|
2
|
+
export { u as trustHTML } from './ssr-JpGpHnpC.js';
|
|
3
3
|
|
|
4
4
|
declare const Priority: {
|
|
5
5
|
readonly IMMEDIATE: 0;
|
package/dist/performance.js
CHANGED
|
@@ -33,20 +33,24 @@ import {
|
|
|
33
33
|
transitionState,
|
|
34
34
|
uniqueId,
|
|
35
35
|
yieldToMain
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UUIKJJIK.js";
|
|
37
37
|
import {
|
|
38
38
|
trustHTML
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-BOYKGGVD.js";
|
|
40
|
+
import "./chunk-CNPT6NKV.js";
|
|
41
|
+
import "./chunk-LJMX4SQ7.js";
|
|
42
|
+
import "./chunk-3HZOSMPX.js";
|
|
41
43
|
import "./chunk-62BDYGAG.js";
|
|
42
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-RVWJGWCL.js";
|
|
43
45
|
import "./chunk-7ZHH77QA.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-AE32RGWX.js";
|
|
47
|
+
import "./chunk-B3HOT4TK.js";
|
|
48
|
+
import "./chunk-UYTYNCMZ.js";
|
|
49
|
+
import "./chunk-4FJSAUKB.js";
|
|
50
|
+
import "./chunk-MIRKTVH4.js";
|
|
51
|
+
import "./chunk-S37PZD6I.js";
|
|
52
|
+
import "./chunk-NT3ZYB5S.js";
|
|
53
|
+
import "./chunk-R5U7XKVJ.js";
|
|
50
54
|
export {
|
|
51
55
|
DOMPool,
|
|
52
56
|
Features,
|