sibujs 4.4.0 → 4.5.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 +11 -0
- package/dist/browser.cjs +31 -2
- package/dist/browser.d.cts +15 -2
- package/dist/browser.d.ts +15 -2
- package/dist/browser.js +4 -4
- package/dist/build.cjs +92 -13
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +9 -9
- package/dist/cdn.full.dev.global.js +10 -10
- package/dist/cdn.full.global.js +9 -9
- package/dist/cdn.global.js +9 -9
- package/dist/{chunk-XLO7SLIX.js → chunk-2DCGACUU.js} +16 -9
- package/dist/{chunk-6GSIXTWX.js → chunk-3JZ4L5TJ.js} +10 -4
- package/dist/{chunk-UCALUKB5.js → chunk-4PMLNECI.js} +4 -4
- package/dist/{chunk-RR7M3FHM.js → chunk-7LN645I6.js} +1 -1
- package/dist/{chunk-SKPTERHP.js → chunk-B3WHI2QA.js} +1 -1
- package/dist/{chunk-4Z3SPQ67.js → chunk-FTIR4QW2.js} +13 -3
- package/dist/{chunk-HFCOH2GN.js → chunk-GW3SCCZG.js} +4 -4
- package/dist/{chunk-PNIRUQ4C.js → chunk-KEISJXBU.js} +2 -2
- package/dist/{chunk-LYVUX7NT.js → chunk-OMJJM3KM.js} +2 -2
- package/dist/{chunk-VCTAEPSB.js → chunk-ONOHFDLG.js} +9 -1
- package/dist/{chunk-36S2YPP4.js → chunk-PCT43HW3.js} +1 -1
- package/dist/{chunk-W2EQ7X2L.js → chunk-RBTPLM32.js} +46 -8
- package/dist/{chunk-7GIHSAWB.js → chunk-RIXRAYIU.js} +1 -1
- package/dist/{chunk-HQSEH5F6.js → chunk-RJE2BNI4.js} +3 -3
- package/dist/{chunk-ADM46X22.js → chunk-S373NSMK.js} +18 -13
- package/dist/{chunk-M2F7TZHH.js → chunk-TBYTO6BS.js} +2 -2
- package/dist/{chunk-3BTTCZ5J.js → chunk-UGRX3S57.js} +31 -2
- package/dist/{chunk-7NBDXVHS.js → chunk-VUF4ALSW.js} +1 -1
- package/dist/{chunk-LQFGQNMV.js → chunk-VZKNK2V7.js} +9 -4
- package/dist/{chunk-NVNJH22U.js → chunk-XZZOBQAY.js} +1 -1
- package/dist/{customElement-CNZxEB9G.d.ts → customElement-OB9CIsc5.d.cts} +38 -10
- package/dist/{customElement-CNZxEB9G.d.cts → customElement-OB9CIsc5.d.ts} +38 -10
- package/dist/data.cjs +81 -9
- package/dist/data.js +6 -6
- package/dist/devtools.cjs +41 -2
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +83 -9
- package/dist/ecosystem.d.cts +13 -5
- package/dist/ecosystem.d.ts +13 -5
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +115 -14
- package/dist/extras.d.cts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +19 -19
- package/dist/index.cjs +92 -13
- package/dist/index.d.cts +24 -151
- package/dist/index.d.ts +24 -151
- package/dist/index.js +10 -10
- package/dist/motion.cjs +31 -2
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +81 -10
- package/dist/patterns.d.cts +5 -0
- package/dist/patterns.d.ts +5 -0
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +31 -2
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +39 -2
- package/dist/plugins.js +6 -6
- package/dist/ssr.cjs +39 -2
- package/dist/ssr.js +7 -7
- package/dist/tagFactory-DVoDpHye.d.cts +215 -0
- package/dist/tagFactory-DVoDpHye.d.ts +215 -0
- package/dist/testing.cjs +31 -2
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +93 -13
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +6 -6
- package/dist/widgets.cjs +75 -9
- package/dist/widgets.js +6 -6
- package/package.json +2 -2
- package/dist/tagFactory-Bzupt4Pj.d.cts +0 -55
- package/dist/tagFactory-Bzupt4Pj.d.ts +0 -55
package/dist/patterns.cjs
CHANGED
|
@@ -294,6 +294,15 @@ function untracked(fn) {
|
|
|
294
294
|
var subscriberEpochCounter = 0;
|
|
295
295
|
function retrack(effectFn, subscriber) {
|
|
296
296
|
const prev = currentSubscriber;
|
|
297
|
+
let savedDepth = 0;
|
|
298
|
+
let savedSuspendSub = null;
|
|
299
|
+
if (trackingSuspended) {
|
|
300
|
+
savedDepth = suspendDepth;
|
|
301
|
+
savedSuspendSub = suspendSavedSub;
|
|
302
|
+
suspendDepth = 0;
|
|
303
|
+
suspendSavedSub = null;
|
|
304
|
+
trackingSuspended = false;
|
|
305
|
+
}
|
|
297
306
|
currentSubscriber = subscriber;
|
|
298
307
|
const sub = subscriber;
|
|
299
308
|
const epoch = ++subscriberEpochCounter;
|
|
@@ -308,6 +317,11 @@ function retrack(effectFn, subscriber) {
|
|
|
308
317
|
effectFn();
|
|
309
318
|
} finally {
|
|
310
319
|
currentSubscriber = prev;
|
|
320
|
+
if (savedDepth !== 0) {
|
|
321
|
+
suspendDepth = savedDepth;
|
|
322
|
+
suspendSavedSub = savedSuspendSub;
|
|
323
|
+
trackingSuspended = true;
|
|
324
|
+
}
|
|
311
325
|
let node = sub.depsHead ?? null;
|
|
312
326
|
while (node !== null) {
|
|
313
327
|
const next = node.subNext;
|
|
@@ -327,11 +341,25 @@ function track(effectFn, subscriber) {
|
|
|
327
341
|
if (!subscriber) return reactiveBinding(effectFn);
|
|
328
342
|
cleanup(subscriber);
|
|
329
343
|
const prev = currentSubscriber;
|
|
344
|
+
let savedDepth = 0;
|
|
345
|
+
let savedSuspendSub = null;
|
|
346
|
+
if (trackingSuspended) {
|
|
347
|
+
savedDepth = suspendDepth;
|
|
348
|
+
savedSuspendSub = suspendSavedSub;
|
|
349
|
+
suspendDepth = 0;
|
|
350
|
+
suspendSavedSub = null;
|
|
351
|
+
trackingSuspended = false;
|
|
352
|
+
}
|
|
330
353
|
currentSubscriber = subscriber;
|
|
331
354
|
try {
|
|
332
355
|
effectFn();
|
|
333
356
|
} finally {
|
|
334
357
|
currentSubscriber = prev;
|
|
358
|
+
if (savedDepth !== 0) {
|
|
359
|
+
suspendDepth = savedDepth;
|
|
360
|
+
suspendSavedSub = savedSuspendSub;
|
|
361
|
+
trackingSuspended = true;
|
|
362
|
+
}
|
|
335
363
|
const sub2 = subscriber;
|
|
336
364
|
for (let n = sub2.depsHead ?? null; n !== null; n = n.subNext) {
|
|
337
365
|
const sig = n.sig;
|
|
@@ -502,8 +530,9 @@ function propagateDirty(sub) {
|
|
|
502
530
|
if (s._c) {
|
|
503
531
|
const nSig = s._sig;
|
|
504
532
|
if (nSig) {
|
|
505
|
-
if (!nSig._d) {
|
|
533
|
+
if (!nSig._d || nSig._f === true) {
|
|
506
534
|
nSig._d = true;
|
|
535
|
+
nSig._f = false;
|
|
507
536
|
stack.push(nSig);
|
|
508
537
|
}
|
|
509
538
|
} else {
|
|
@@ -603,7 +632,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
603
632
|
}
|
|
604
633
|
|
|
605
634
|
// src/reactivity/track.ts
|
|
606
|
-
var _runtimeVersion = true ? "4.
|
|
635
|
+
var _runtimeVersion = true ? "4.5.0" : "dev";
|
|
607
636
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
608
637
|
function resolveReactiveApi() {
|
|
609
638
|
const g = globalThis;
|
|
@@ -1390,10 +1419,14 @@ function derived(getter, options) {
|
|
|
1390
1419
|
const cs = {};
|
|
1391
1420
|
cs._d = false;
|
|
1392
1421
|
cs._init = false;
|
|
1422
|
+
cs._f = false;
|
|
1393
1423
|
cs._g = getter;
|
|
1394
1424
|
cs.__v = 0;
|
|
1425
|
+
let evaluating = false;
|
|
1426
|
+
let disposed = false;
|
|
1427
|
+
let pendingError;
|
|
1395
1428
|
const markDirty = () => {
|
|
1396
|
-
if (cs._d) return;
|
|
1429
|
+
if (cs._d || disposed) return;
|
|
1397
1430
|
cs._d = true;
|
|
1398
1431
|
};
|
|
1399
1432
|
markDirty._c = 1;
|
|
@@ -1416,33 +1449,53 @@ function derived(getter, options) {
|
|
|
1416
1449
|
}
|
|
1417
1450
|
}, markDirty);
|
|
1418
1451
|
const hook = globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
1419
|
-
let evaluating = false;
|
|
1420
1452
|
const validate = () => {
|
|
1421
|
-
if (!cs._d) return;
|
|
1453
|
+
if (!cs._d || disposed || pendingError !== void 0) return;
|
|
1422
1454
|
const oldValue = cs._v;
|
|
1423
1455
|
evaluating = true;
|
|
1424
1456
|
try {
|
|
1425
1457
|
retrack2(recompute, markDirty);
|
|
1426
1458
|
if (!Object.is(oldValue, cs._v)) cs.__v++;
|
|
1459
|
+
} catch (err) {
|
|
1460
|
+
pendingError = { error: err };
|
|
1461
|
+
cs.__v++;
|
|
1462
|
+
if (disposed) cs._d = true;
|
|
1463
|
+
else cs._f = true;
|
|
1427
1464
|
} finally {
|
|
1428
1465
|
evaluating = false;
|
|
1466
|
+
if (disposed) cleanup2(markDirty);
|
|
1429
1467
|
}
|
|
1430
|
-
if (hook && !Object.is(oldValue, cs._v)) {
|
|
1468
|
+
if (hook && !disposed && !Object.is(oldValue, cs._v)) {
|
|
1431
1469
|
hook.emit("computed:update", { signal: cs, oldValue, newValue: cs._v });
|
|
1432
1470
|
}
|
|
1433
1471
|
};
|
|
1434
1472
|
cs._validate = validate;
|
|
1473
|
+
const throwPending = () => {
|
|
1474
|
+
const { error } = pendingError;
|
|
1475
|
+
pendingError = void 0;
|
|
1476
|
+
if (disposed) cs._d = false;
|
|
1477
|
+
throw error;
|
|
1478
|
+
};
|
|
1435
1479
|
function computedGetter() {
|
|
1436
1480
|
if (evaluating) {
|
|
1437
1481
|
throw new Error(
|
|
1438
1482
|
`[SibuJS] Circular dependency detected in derived${debugName ? ` "${debugName}"` : ""}. A derived signal cannot read itself (directly or through a chain).`
|
|
1439
1483
|
);
|
|
1440
1484
|
}
|
|
1441
|
-
if (isTrackingSuspended2()) {
|
|
1442
|
-
if (cs._d)
|
|
1485
|
+
if (isTrackingSuspended2() || disposed) {
|
|
1486
|
+
if (cs._d) {
|
|
1487
|
+
validate();
|
|
1488
|
+
if (pendingError !== void 0) throwPending();
|
|
1489
|
+
}
|
|
1443
1490
|
return cs._v;
|
|
1444
1491
|
}
|
|
1445
|
-
if (cs._d)
|
|
1492
|
+
if (cs._d) {
|
|
1493
|
+
validate();
|
|
1494
|
+
if (pendingError !== void 0) {
|
|
1495
|
+
recordDependency2(cs);
|
|
1496
|
+
throwPending();
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1446
1499
|
recordDependency2(cs);
|
|
1447
1500
|
return cs._v;
|
|
1448
1501
|
}
|
|
@@ -1451,6 +1504,19 @@ function derived(getter, options) {
|
|
|
1451
1504
|
cs.__name = debugName;
|
|
1452
1505
|
}
|
|
1453
1506
|
computedGetter.__signal = cs;
|
|
1507
|
+
computedGetter.dispose = () => {
|
|
1508
|
+
if (disposed) return;
|
|
1509
|
+
disposed = true;
|
|
1510
|
+
cs._d = pendingError !== void 0;
|
|
1511
|
+
cleanup2(markDirty);
|
|
1512
|
+
const h = globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
1513
|
+
if (h) {
|
|
1514
|
+
try {
|
|
1515
|
+
h.emit("computed:destroy", { signal: cs, getter: computedGetter });
|
|
1516
|
+
} catch {
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1454
1520
|
if (hook) hook.emit("computed:create", { signal: cs, name: debugName, getter: computedGetter });
|
|
1455
1521
|
return computedGetter;
|
|
1456
1522
|
}
|
|
@@ -1503,7 +1569,12 @@ function timeline(initial, maxHistory = 100) {
|
|
|
1503
1569
|
setIndex(targetIndex);
|
|
1504
1570
|
}
|
|
1505
1571
|
}
|
|
1506
|
-
|
|
1572
|
+
function dispose() {
|
|
1573
|
+
value.dispose();
|
|
1574
|
+
canUndo.dispose();
|
|
1575
|
+
canRedo.dispose();
|
|
1576
|
+
}
|
|
1577
|
+
return { value, set, undo, redo, canUndo, canRedo, history, index, reset, jumpTo, dispose };
|
|
1507
1578
|
}
|
|
1508
1579
|
|
|
1509
1580
|
// src/patterns/globalStore.ts
|
package/dist/patterns.d.cts
CHANGED
|
@@ -202,6 +202,11 @@ interface TimeTravelReturn<T> {
|
|
|
202
202
|
index: () => number;
|
|
203
203
|
reset: () => void;
|
|
204
204
|
jumpTo: (index: number) => void;
|
|
205
|
+
/**
|
|
206
|
+
* Dispose the internal `value`, `canUndo` and `canRedo` deriveds and remove
|
|
207
|
+
* them from DevTools. Afterwards they return their last values. Idempotent.
|
|
208
|
+
*/
|
|
209
|
+
dispose: () => void;
|
|
205
210
|
}
|
|
206
211
|
/**
|
|
207
212
|
* timeline wraps a state value with undo/redo history.
|
package/dist/patterns.d.ts
CHANGED
|
@@ -202,6 +202,11 @@ interface TimeTravelReturn<T> {
|
|
|
202
202
|
index: () => number;
|
|
203
203
|
reset: () => void;
|
|
204
204
|
jumpTo: (index: number) => void;
|
|
205
|
+
/**
|
|
206
|
+
* Dispose the internal `value`, `canUndo` and `canRedo` deriveds and remove
|
|
207
|
+
* them from DevTools. Afterwards they return their last values. Idempotent.
|
|
208
|
+
*/
|
|
209
|
+
dispose: () => void;
|
|
205
210
|
}
|
|
206
211
|
/**
|
|
207
212
|
* timeline wraps a state value with undo/redo history.
|
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-VZKNK2V7.js";
|
|
9
9
|
import {
|
|
10
10
|
RenderProp,
|
|
11
11
|
assertType,
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
withWrapper
|
|
24
24
|
} from "./chunk-R25EFXXC.js";
|
|
25
25
|
import "./chunk-H3SRKIYX.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RBTPLM32.js";
|
|
27
|
+
import "./chunk-RIXRAYIU.js";
|
|
28
28
|
import "./chunk-5DXA2J44.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-XZZOBQAY.js";
|
|
30
|
+
import "./chunk-UGRX3S57.js";
|
|
31
31
|
import "./chunk-2WLZ6757.js";
|
|
32
32
|
export {
|
|
33
33
|
RenderProp,
|
package/dist/performance.cjs
CHANGED
|
@@ -481,6 +481,15 @@ function untracked(fn) {
|
|
|
481
481
|
var subscriberEpochCounter = 0;
|
|
482
482
|
function retrack(effectFn, subscriber) {
|
|
483
483
|
const prev = currentSubscriber;
|
|
484
|
+
let savedDepth = 0;
|
|
485
|
+
let savedSuspendSub = null;
|
|
486
|
+
if (trackingSuspended) {
|
|
487
|
+
savedDepth = suspendDepth;
|
|
488
|
+
savedSuspendSub = suspendSavedSub;
|
|
489
|
+
suspendDepth = 0;
|
|
490
|
+
suspendSavedSub = null;
|
|
491
|
+
trackingSuspended = false;
|
|
492
|
+
}
|
|
484
493
|
currentSubscriber = subscriber;
|
|
485
494
|
const sub = subscriber;
|
|
486
495
|
const epoch = ++subscriberEpochCounter;
|
|
@@ -495,6 +504,11 @@ function retrack(effectFn, subscriber) {
|
|
|
495
504
|
effectFn();
|
|
496
505
|
} finally {
|
|
497
506
|
currentSubscriber = prev;
|
|
507
|
+
if (savedDepth !== 0) {
|
|
508
|
+
suspendDepth = savedDepth;
|
|
509
|
+
suspendSavedSub = savedSuspendSub;
|
|
510
|
+
trackingSuspended = true;
|
|
511
|
+
}
|
|
498
512
|
let node = sub.depsHead ?? null;
|
|
499
513
|
while (node !== null) {
|
|
500
514
|
const next = node.subNext;
|
|
@@ -514,11 +528,25 @@ function track(effectFn, subscriber) {
|
|
|
514
528
|
if (!subscriber) return reactiveBinding(effectFn);
|
|
515
529
|
cleanup(subscriber);
|
|
516
530
|
const prev = currentSubscriber;
|
|
531
|
+
let savedDepth = 0;
|
|
532
|
+
let savedSuspendSub = null;
|
|
533
|
+
if (trackingSuspended) {
|
|
534
|
+
savedDepth = suspendDepth;
|
|
535
|
+
savedSuspendSub = suspendSavedSub;
|
|
536
|
+
suspendDepth = 0;
|
|
537
|
+
suspendSavedSub = null;
|
|
538
|
+
trackingSuspended = false;
|
|
539
|
+
}
|
|
517
540
|
currentSubscriber = subscriber;
|
|
518
541
|
try {
|
|
519
542
|
effectFn();
|
|
520
543
|
} finally {
|
|
521
544
|
currentSubscriber = prev;
|
|
545
|
+
if (savedDepth !== 0) {
|
|
546
|
+
suspendDepth = savedDepth;
|
|
547
|
+
suspendSavedSub = savedSuspendSub;
|
|
548
|
+
trackingSuspended = true;
|
|
549
|
+
}
|
|
522
550
|
const sub2 = subscriber;
|
|
523
551
|
for (let n = sub2.depsHead ?? null; n !== null; n = n.subNext) {
|
|
524
552
|
const sig = n.sig;
|
|
@@ -689,8 +717,9 @@ function propagateDirty(sub) {
|
|
|
689
717
|
if (s._c) {
|
|
690
718
|
const nSig = s._sig;
|
|
691
719
|
if (nSig) {
|
|
692
|
-
if (!nSig._d) {
|
|
720
|
+
if (!nSig._d || nSig._f === true) {
|
|
693
721
|
nSig._d = true;
|
|
722
|
+
nSig._f = false;
|
|
694
723
|
stack.push(nSig);
|
|
695
724
|
}
|
|
696
725
|
} else {
|
|
@@ -790,7 +819,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
790
819
|
}
|
|
791
820
|
|
|
792
821
|
// src/reactivity/track.ts
|
|
793
|
-
var _runtimeVersion = true ? "4.
|
|
822
|
+
var _runtimeVersion = true ? "4.5.0" : "dev";
|
|
794
823
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
795
824
|
function resolveReactiveApi() {
|
|
796
825
|
const g = globalThis;
|
package/dist/performance.js
CHANGED
|
@@ -33,17 +33,17 @@ import {
|
|
|
33
33
|
transitionState,
|
|
34
34
|
uniqueId,
|
|
35
35
|
yieldToMain
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TBYTO6BS.js";
|
|
37
37
|
import {
|
|
38
38
|
trustHTML
|
|
39
39
|
} from "./chunk-NIOYEGBQ.js";
|
|
40
40
|
import "./chunk-IXKSNWV5.js";
|
|
41
41
|
import "./chunk-7ZHH77QA.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-RIXRAYIU.js";
|
|
43
43
|
import "./chunk-5DXA2J44.js";
|
|
44
44
|
import "./chunk-QKRPLZ2V.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-XZZOBQAY.js";
|
|
46
|
+
import "./chunk-UGRX3S57.js";
|
|
47
47
|
import "./chunk-2WLZ6757.js";
|
|
48
48
|
export {
|
|
49
49
|
DOMPool,
|
package/dist/plugins.cjs
CHANGED
|
@@ -1402,6 +1402,14 @@ function setSafeAttribute(el, name, value, options = {}) {
|
|
|
1402
1402
|
const html2 = isHtmlElement(el);
|
|
1403
1403
|
const idlName = html2 ? name.toLowerCase() : name;
|
|
1404
1404
|
if (typeof value === "boolean") {
|
|
1405
|
+
if (name.length > 5 && name.slice(0, 5).toLowerCase() === "aria-") {
|
|
1406
|
+
const token = value ? "true" : "false";
|
|
1407
|
+
if ((ns ? el.getAttributeNS(ns, localName) : el.getAttribute(name)) !== token) {
|
|
1408
|
+
if (ns) el.setAttributeNS(ns, name, token);
|
|
1409
|
+
else el.setAttribute(name, token);
|
|
1410
|
+
}
|
|
1411
|
+
return true;
|
|
1412
|
+
}
|
|
1405
1413
|
if (html2 && BOOLEAN_IDL_ATTRS.has(idlName) && idlName in el) {
|
|
1406
1414
|
setProp(el, idlName, value);
|
|
1407
1415
|
} else if (value) {
|
|
@@ -1578,6 +1586,15 @@ function untracked(fn) {
|
|
|
1578
1586
|
var subscriberEpochCounter = 0;
|
|
1579
1587
|
function retrack(effectFn, subscriber) {
|
|
1580
1588
|
const prev = currentSubscriber;
|
|
1589
|
+
let savedDepth = 0;
|
|
1590
|
+
let savedSuspendSub = null;
|
|
1591
|
+
if (trackingSuspended) {
|
|
1592
|
+
savedDepth = suspendDepth;
|
|
1593
|
+
savedSuspendSub = suspendSavedSub;
|
|
1594
|
+
suspendDepth = 0;
|
|
1595
|
+
suspendSavedSub = null;
|
|
1596
|
+
trackingSuspended = false;
|
|
1597
|
+
}
|
|
1581
1598
|
currentSubscriber = subscriber;
|
|
1582
1599
|
const sub2 = subscriber;
|
|
1583
1600
|
const epoch = ++subscriberEpochCounter;
|
|
@@ -1592,6 +1609,11 @@ function retrack(effectFn, subscriber) {
|
|
|
1592
1609
|
effectFn();
|
|
1593
1610
|
} finally {
|
|
1594
1611
|
currentSubscriber = prev;
|
|
1612
|
+
if (savedDepth !== 0) {
|
|
1613
|
+
suspendDepth = savedDepth;
|
|
1614
|
+
suspendSavedSub = savedSuspendSub;
|
|
1615
|
+
trackingSuspended = true;
|
|
1616
|
+
}
|
|
1595
1617
|
let node = sub2.depsHead ?? null;
|
|
1596
1618
|
while (node !== null) {
|
|
1597
1619
|
const next = node.subNext;
|
|
@@ -1611,11 +1633,25 @@ function track(effectFn, subscriber) {
|
|
|
1611
1633
|
if (!subscriber) return reactiveBinding(effectFn);
|
|
1612
1634
|
cleanup(subscriber);
|
|
1613
1635
|
const prev = currentSubscriber;
|
|
1636
|
+
let savedDepth = 0;
|
|
1637
|
+
let savedSuspendSub = null;
|
|
1638
|
+
if (trackingSuspended) {
|
|
1639
|
+
savedDepth = suspendDepth;
|
|
1640
|
+
savedSuspendSub = suspendSavedSub;
|
|
1641
|
+
suspendDepth = 0;
|
|
1642
|
+
suspendSavedSub = null;
|
|
1643
|
+
trackingSuspended = false;
|
|
1644
|
+
}
|
|
1614
1645
|
currentSubscriber = subscriber;
|
|
1615
1646
|
try {
|
|
1616
1647
|
effectFn();
|
|
1617
1648
|
} finally {
|
|
1618
1649
|
currentSubscriber = prev;
|
|
1650
|
+
if (savedDepth !== 0) {
|
|
1651
|
+
suspendDepth = savedDepth;
|
|
1652
|
+
suspendSavedSub = savedSuspendSub;
|
|
1653
|
+
trackingSuspended = true;
|
|
1654
|
+
}
|
|
1619
1655
|
const sub3 = subscriber;
|
|
1620
1656
|
for (let n = sub3.depsHead ?? null; n !== null; n = n.subNext) {
|
|
1621
1657
|
const sig = n.sig;
|
|
@@ -1786,8 +1822,9 @@ function propagateDirty(sub2) {
|
|
|
1786
1822
|
if (s2._c) {
|
|
1787
1823
|
const nSig = s2._sig;
|
|
1788
1824
|
if (nSig) {
|
|
1789
|
-
if (!nSig._d) {
|
|
1825
|
+
if (!nSig._d || nSig._f === true) {
|
|
1790
1826
|
nSig._d = true;
|
|
1827
|
+
nSig._f = false;
|
|
1791
1828
|
stack.push(nSig);
|
|
1792
1829
|
}
|
|
1793
1830
|
} else {
|
|
@@ -1887,7 +1924,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1887
1924
|
}
|
|
1888
1925
|
|
|
1889
1926
|
// src/reactivity/track.ts
|
|
1890
|
-
var _runtimeVersion = true ? "4.
|
|
1927
|
+
var _runtimeVersion = true ? "4.5.0" : "dev";
|
|
1891
1928
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1892
1929
|
function resolveReactiveApi() {
|
|
1893
1930
|
const g2 = globalThis;
|
package/dist/plugins.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-WWV3SJ3L.js";
|
|
36
36
|
import {
|
|
37
37
|
span
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PCT43HW3.js";
|
|
39
39
|
import {
|
|
40
40
|
escapeScriptJson,
|
|
41
41
|
renderToString,
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
} from "./chunk-NIOYEGBQ.js";
|
|
44
44
|
import {
|
|
45
45
|
resolveClassValue
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-KEISJXBU.js";
|
|
47
|
+
import "./chunk-ONOHFDLG.js";
|
|
48
48
|
import {
|
|
49
49
|
isUrlAttribute,
|
|
50
50
|
sanitizeStyleAttribute,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
} from "./chunk-7ZHH77QA.js";
|
|
57
57
|
import {
|
|
58
58
|
effect
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-RIXRAYIU.js";
|
|
60
60
|
import {
|
|
61
61
|
getRequestStore
|
|
62
62
|
} from "./chunk-5DXA2J44.js";
|
|
@@ -66,10 +66,10 @@ import {
|
|
|
66
66
|
} from "./chunk-QKRPLZ2V.js";
|
|
67
67
|
import {
|
|
68
68
|
signal
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XZZOBQAY.js";
|
|
70
70
|
import {
|
|
71
71
|
track
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-UGRX3S57.js";
|
|
73
73
|
import {
|
|
74
74
|
devWarn,
|
|
75
75
|
isDev
|
package/dist/ssr.cjs
CHANGED
|
@@ -1332,6 +1332,15 @@ function untracked(fn) {
|
|
|
1332
1332
|
var subscriberEpochCounter = 0;
|
|
1333
1333
|
function retrack(effectFn, subscriber) {
|
|
1334
1334
|
const prev = currentSubscriber;
|
|
1335
|
+
let savedDepth = 0;
|
|
1336
|
+
let savedSuspendSub = null;
|
|
1337
|
+
if (trackingSuspended) {
|
|
1338
|
+
savedDepth = suspendDepth;
|
|
1339
|
+
savedSuspendSub = suspendSavedSub;
|
|
1340
|
+
suspendDepth = 0;
|
|
1341
|
+
suspendSavedSub = null;
|
|
1342
|
+
trackingSuspended = false;
|
|
1343
|
+
}
|
|
1335
1344
|
currentSubscriber = subscriber;
|
|
1336
1345
|
const sub2 = subscriber;
|
|
1337
1346
|
const epoch = ++subscriberEpochCounter;
|
|
@@ -1346,6 +1355,11 @@ function retrack(effectFn, subscriber) {
|
|
|
1346
1355
|
effectFn();
|
|
1347
1356
|
} finally {
|
|
1348
1357
|
currentSubscriber = prev;
|
|
1358
|
+
if (savedDepth !== 0) {
|
|
1359
|
+
suspendDepth = savedDepth;
|
|
1360
|
+
suspendSavedSub = savedSuspendSub;
|
|
1361
|
+
trackingSuspended = true;
|
|
1362
|
+
}
|
|
1349
1363
|
let node = sub2.depsHead ?? null;
|
|
1350
1364
|
while (node !== null) {
|
|
1351
1365
|
const next = node.subNext;
|
|
@@ -1365,11 +1379,25 @@ function track(effectFn, subscriber) {
|
|
|
1365
1379
|
if (!subscriber) return reactiveBinding(effectFn);
|
|
1366
1380
|
cleanup(subscriber);
|
|
1367
1381
|
const prev = currentSubscriber;
|
|
1382
|
+
let savedDepth = 0;
|
|
1383
|
+
let savedSuspendSub = null;
|
|
1384
|
+
if (trackingSuspended) {
|
|
1385
|
+
savedDepth = suspendDepth;
|
|
1386
|
+
savedSuspendSub = suspendSavedSub;
|
|
1387
|
+
suspendDepth = 0;
|
|
1388
|
+
suspendSavedSub = null;
|
|
1389
|
+
trackingSuspended = false;
|
|
1390
|
+
}
|
|
1368
1391
|
currentSubscriber = subscriber;
|
|
1369
1392
|
try {
|
|
1370
1393
|
effectFn();
|
|
1371
1394
|
} finally {
|
|
1372
1395
|
currentSubscriber = prev;
|
|
1396
|
+
if (savedDepth !== 0) {
|
|
1397
|
+
suspendDepth = savedDepth;
|
|
1398
|
+
suspendSavedSub = savedSuspendSub;
|
|
1399
|
+
trackingSuspended = true;
|
|
1400
|
+
}
|
|
1373
1401
|
const sub3 = subscriber;
|
|
1374
1402
|
for (let n = sub3.depsHead ?? null; n !== null; n = n.subNext) {
|
|
1375
1403
|
const sig = n.sig;
|
|
@@ -1540,8 +1568,9 @@ function propagateDirty(sub2) {
|
|
|
1540
1568
|
if (s2._c) {
|
|
1541
1569
|
const nSig = s2._sig;
|
|
1542
1570
|
if (nSig) {
|
|
1543
|
-
if (!nSig._d) {
|
|
1571
|
+
if (!nSig._d || nSig._f === true) {
|
|
1544
1572
|
nSig._d = true;
|
|
1573
|
+
nSig._f = false;
|
|
1545
1574
|
stack.push(nSig);
|
|
1546
1575
|
}
|
|
1547
1576
|
} else {
|
|
@@ -1641,7 +1670,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
1641
1670
|
}
|
|
1642
1671
|
|
|
1643
1672
|
// src/reactivity/track.ts
|
|
1644
|
-
var _runtimeVersion = true ? "4.
|
|
1673
|
+
var _runtimeVersion = true ? "4.5.0" : "dev";
|
|
1645
1674
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1646
1675
|
function resolveReactiveApi() {
|
|
1647
1676
|
const g2 = globalThis;
|
|
@@ -2468,6 +2497,14 @@ function setSafeAttribute(el, name, value, options = {}) {
|
|
|
2468
2497
|
const html2 = isHtmlElement(el);
|
|
2469
2498
|
const idlName = html2 ? name.toLowerCase() : name;
|
|
2470
2499
|
if (typeof value === "boolean") {
|
|
2500
|
+
if (name.length > 5 && name.slice(0, 5).toLowerCase() === "aria-") {
|
|
2501
|
+
const token = value ? "true" : "false";
|
|
2502
|
+
if ((ns ? el.getAttributeNS(ns, localName) : el.getAttribute(name)) !== token) {
|
|
2503
|
+
if (ns) el.setAttributeNS(ns, name, token);
|
|
2504
|
+
else el.setAttribute(name, token);
|
|
2505
|
+
}
|
|
2506
|
+
return true;
|
|
2507
|
+
}
|
|
2471
2508
|
if (html2 && BOOLEAN_IDL_ATTRS.has(idlName) && idlName in el) {
|
|
2472
2509
|
setProp(el, idlName, value);
|
|
2473
2510
|
} else if (value) {
|
package/dist/ssr.js
CHANGED
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
wasm,
|
|
24
24
|
worker,
|
|
25
25
|
workerFn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RJE2BNI4.js";
|
|
27
27
|
import "./chunk-52XFPGSN.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-PCT43HW3.js";
|
|
29
29
|
import {
|
|
30
30
|
collectStream,
|
|
31
31
|
deserializeState,
|
|
@@ -46,15 +46,15 @@ import {
|
|
|
46
46
|
suspenseSwapScript,
|
|
47
47
|
trustHTML
|
|
48
48
|
} from "./chunk-NIOYEGBQ.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-KEISJXBU.js";
|
|
50
|
+
import "./chunk-ONOHFDLG.js";
|
|
51
51
|
import "./chunk-IXKSNWV5.js";
|
|
52
52
|
import "./chunk-7ZHH77QA.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-RIXRAYIU.js";
|
|
54
54
|
import "./chunk-5DXA2J44.js";
|
|
55
55
|
import "./chunk-QKRPLZ2V.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-XZZOBQAY.js";
|
|
57
|
+
import "./chunk-UGRX3S57.js";
|
|
58
58
|
import "./chunk-2WLZ6757.js";
|
|
59
59
|
export {
|
|
60
60
|
Head,
|