sibujs 4.14.0 → 4.15.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.
Files changed (93) hide show
  1. package/dist/browser.cjs +297 -45
  2. package/dist/browser.js +6 -7
  3. package/dist/build.cjs +2189 -573
  4. package/dist/build.js +16 -15
  5. package/dist/cdn.dev.global.js +13 -12
  6. package/dist/cdn.full.dev.global.js +14 -13
  7. package/dist/cdn.full.global.js +12 -12
  8. package/dist/cdn.global.js +12 -12
  9. package/dist/{chunk-RVR5NPFL.js → chunk-2VKTFA7C.js} +1 -1
  10. package/dist/{chunk-7ILEHTVX.js → chunk-4AEFGRYW.js} +1 -1
  11. package/dist/{chunk-4TQDTWWN.js → chunk-6IV5ZRG6.js} +5 -7
  12. package/dist/{chunk-GVAMIU6K.js → chunk-75EAQH3U.js} +2 -2
  13. package/dist/{chunk-TLS4NVIB.js → chunk-7JO7DPSS.js} +4 -4
  14. package/dist/{chunk-SVULV7O4.js → chunk-AQH7WDSE.js} +6 -8
  15. package/dist/{chunk-S37PZD6I.js → chunk-BF3WBJJQ.js} +60 -10
  16. package/dist/{chunk-LJMX4SQ7.js → chunk-BG4BP44S.js} +3 -3
  17. package/dist/{chunk-N7A6FKWW.js → chunk-D44TAGCT.js} +2 -2
  18. package/dist/{chunk-CCKUNHVU.js → chunk-DAEXQJQA.js} +1 -1
  19. package/dist/chunk-DNCQDFJJ.js +22 -0
  20. package/dist/{chunk-BKZ5N6NK.js → chunk-DNCT2UXB.js} +4 -4
  21. package/dist/{chunk-BOYKGGVD.js → chunk-DRWOD7RZ.js} +4 -4
  22. package/dist/chunk-DS5V2PRE.js +64 -0
  23. package/dist/{chunk-VM2U5LEL.js → chunk-EHSJESRN.js} +595 -123
  24. package/dist/{chunk-MIRKTVH4.js → chunk-GFM5WWPU.js} +252 -5
  25. package/dist/{chunk-52XFPGSN.js → chunk-HTPOIAAL.js} +1 -1
  26. package/dist/{chunk-3HEX6QJQ.js → chunk-I2R5QALY.js} +2 -4
  27. package/dist/{chunk-4FJSAUKB.js → chunk-IUBV5WO5.js} +1 -1
  28. package/dist/{chunk-A454RAEK.js → chunk-KIDETDMU.js} +5 -7
  29. package/dist/{chunk-JTFQ7IL4.js → chunk-KPAXG5IR.js} +7 -9
  30. package/dist/{chunk-AE32RGWX.js → chunk-LGUXYHTZ.js} +3 -3
  31. package/dist/{chunk-Y4LUM2XS.js → chunk-LQWLPQOK.js} +6 -8
  32. package/dist/{chunk-CNPT6NKV.js → chunk-MINLMJUY.js} +48 -9
  33. package/dist/{chunk-BNXRWZZV.js → chunk-OURTGOJT.js} +8 -10
  34. package/dist/{chunk-F67F77IA.js → chunk-TQ24Y3IV.js} +2 -2
  35. package/dist/{chunk-2TTRW2TE.js → chunk-UM3M5PXS.js} +8 -8
  36. package/dist/{chunk-CJ7KS3DF.js → chunk-VSTX3XSX.js} +205 -15
  37. package/dist/{chunk-HQIAL7F2.js → chunk-XPDZ2LDR.js} +2 -2
  38. package/dist/{chunk-UUIKJJIK.js → chunk-Y7JM7GY2.js} +5 -7
  39. package/dist/{chunk-QS6GMWDD.js → chunk-YAFITBOK.js} +1269 -162
  40. package/dist/data.cjs +285 -33
  41. package/dist/data.js +6 -7
  42. package/dist/devtools.cjs +289 -39
  43. package/dist/devtools.js +5 -6
  44. package/dist/{dispose-EIHHHDC7.js → dispose-3WDBYJMH.js} +3 -1
  45. package/dist/ecosystem.cjs +345 -61
  46. package/dist/ecosystem.d.cts +1 -1
  47. package/dist/ecosystem.d.ts +1 -1
  48. package/dist/ecosystem.js +10 -10
  49. package/dist/extras.cjs +568 -248
  50. package/dist/extras.d.cts +1 -1
  51. package/dist/extras.d.ts +1 -1
  52. package/dist/extras.js +27 -27
  53. package/dist/index.cjs +2134 -515
  54. package/dist/index.d.cts +628 -211
  55. package/dist/index.d.ts +628 -211
  56. package/dist/index.js +22 -15
  57. package/dist/motion.cjs +286 -30
  58. package/dist/motion.js +4 -4
  59. package/dist/patterns.cjs +301 -43
  60. package/dist/patterns.js +6 -6
  61. package/dist/performance.cjs +286 -36
  62. package/dist/performance.js +9 -9
  63. package/dist/plugins.cjs +1237 -291
  64. package/dist/plugins.d.cts +3 -1
  65. package/dist/plugins.d.ts +3 -1
  66. package/dist/plugins.js +20 -19
  67. package/dist/{renderRoute-fxgsm2Ir.d.ts → renderRoute-B84MONaO.d.cts} +2 -2
  68. package/dist/{renderRoute-DP20XwMS.d.cts → renderRoute-_yxPuEQY.d.ts} +2 -2
  69. package/dist/{routeHead-CE9SV-cH.d.cts → routeHead-DLxlq15W.d.cts} +94 -0
  70. package/dist/{routeHead-DzVxPviY.d.ts → routeHead-w8nANZ3M.d.ts} +94 -0
  71. package/dist/{ssr-NECEU4X4.js → ssr-EF3IUHTE.js} +6 -6
  72. package/dist/ssr-dom.cjs +64 -9
  73. package/dist/ssr-dom.d.cts +2 -0
  74. package/dist/ssr-dom.d.ts +2 -0
  75. package/dist/ssr-dom.js +2 -1
  76. package/dist/ssr.cjs +850 -170
  77. package/dist/ssr.d.cts +5 -3
  78. package/dist/ssr.d.ts +5 -3
  79. package/dist/ssr.js +16 -15
  80. package/dist/{tagFactory-DkytnJws.d.cts → tagFactory-BfEh69VF.d.cts} +7 -0
  81. package/dist/{tagFactory-Bnd_Nph9.d.ts → tagFactory-pSYiLYyh.d.ts} +7 -0
  82. package/dist/testing.cjs +817 -132
  83. package/dist/testing.d.cts +4 -2
  84. package/dist/testing.d.ts +4 -2
  85. package/dist/testing.js +18 -17
  86. package/dist/track-core-0edROAF5.d.ts +187 -0
  87. package/dist/track-core-DN5fYLWi.d.cts +187 -0
  88. package/dist/ui.cjs +293 -43
  89. package/dist/ui.js +10 -12
  90. package/dist/widgets.cjs +285 -27
  91. package/dist/widgets.js +7 -7
  92. package/package.json +1 -1
  93. package/dist/chunk-7ZHH77QA.js +0 -9
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ import {
29
29
  html,
30
30
  lazy,
31
31
  lazyIsland,
32
+ lifecycleScope,
32
33
  longPress,
33
34
  match,
34
35
  mount,
@@ -37,12 +38,14 @@ import {
37
38
  onCleanup,
38
39
  onMount,
39
40
  onUnmount,
41
+ pendingContent,
40
42
  reactiveArray,
41
43
  ref,
42
44
  registerAction,
43
45
  registerComponent,
44
46
  registerIsland,
45
47
  resolveComponent,
48
+ scopeOwner,
46
49
  setGlobalErrorHandler,
47
50
  show,
48
51
  store,
@@ -55,7 +58,8 @@ import {
55
58
  unregisterIsland,
56
59
  when,
57
60
  writable
58
- } from "./chunk-QS6GMWDD.js";
61
+ } from "./chunk-YAFITBOK.js";
62
+ import "./chunk-DS5V2PRE.js";
59
63
  import {
60
64
  a,
61
65
  abbr,
@@ -193,37 +197,37 @@ import {
193
197
  use,
194
198
  var_,
195
199
  video
196
- } from "./chunk-7ILEHTVX.js";
200
+ } from "./chunk-4AEFGRYW.js";
197
201
  import {
198
202
  trustHTML
199
- } from "./chunk-BOYKGGVD.js";
200
- import "./chunk-CNPT6NKV.js";
201
- import "./chunk-LJMX4SQ7.js";
203
+ } from "./chunk-DRWOD7RZ.js";
204
+ import "./chunk-MINLMJUY.js";
205
+ import "./chunk-BG4BP44S.js";
202
206
  import {
203
207
  watch
204
- } from "./chunk-RVR5NPFL.js";
208
+ } from "./chunk-2VKTFA7C.js";
205
209
  import {
206
210
  __resetIdCounter,
207
211
  createId
208
- } from "./chunk-CCKUNHVU.js";
212
+ } from "./chunk-DAEXQJQA.js";
209
213
  import "./chunk-3HZOSMPX.js";
210
214
  import "./chunk-62BDYGAG.js";
211
215
  import {
212
216
  SVG_NS,
213
217
  tagFactory
214
- } from "./chunk-CJ7KS3DF.js";
218
+ } from "./chunk-VSTX3XSX.js";
219
+ import "./chunk-DNCQDFJJ.js";
215
220
  import {
216
221
  bindDynamic
217
- } from "./chunk-HQIAL7F2.js";
222
+ } from "./chunk-XPDZ2LDR.js";
218
223
  import "./chunk-RVWJGWCL.js";
219
224
  import {
220
225
  derived
221
- } from "./chunk-N7A6FKWW.js";
222
- import "./chunk-7ZHH77QA.js";
226
+ } from "./chunk-D44TAGCT.js";
223
227
  import {
224
228
  effect,
225
229
  on
226
- } from "./chunk-AE32RGWX.js";
230
+ } from "./chunk-LGUXYHTZ.js";
227
231
  import "./chunk-B3HOT4TK.js";
228
232
  import {
229
233
  disableSSR,
@@ -243,12 +247,12 @@ import {
243
247
  external,
244
248
  isBatching,
245
249
  signal
246
- } from "./chunk-4FJSAUKB.js";
250
+ } from "./chunk-IUBV5WO5.js";
247
251
  import {
248
252
  retrack,
249
253
  setMaxDrainIterations,
250
254
  untracked
251
- } from "./chunk-MIRKTVH4.js";
255
+ } from "./chunk-GFM5WWPU.js";
252
256
  import {
253
257
  MAX_DRAIN_TEARDOWNS,
254
258
  checkLeaks,
@@ -260,7 +264,7 @@ import {
260
264
  reportError,
261
265
  setRuntimeErrorHandler,
262
266
  unregisterDisposer
263
- } from "./chunk-S37PZD6I.js";
267
+ } from "./chunk-BF3WBJJQ.js";
264
268
  import "./chunk-NT3ZYB5S.js";
265
269
  import "./chunk-R5U7XKVJ.js";
266
270
  export {
@@ -379,6 +383,7 @@ export {
379
383
  lazyIsland,
380
384
  legend,
381
385
  li,
386
+ lifecycleScope,
382
387
  line,
383
388
  linearGradient,
384
389
  link,
@@ -412,6 +417,7 @@ export {
412
417
  param,
413
418
  path,
414
419
  pattern,
420
+ pendingContent,
415
421
  picture,
416
422
  polygon,
417
423
  polyline,
@@ -438,6 +444,7 @@ export {
438
444
  runInSSRContext,
439
445
  s,
440
446
  samp,
447
+ scopeOwner,
441
448
  script,
442
449
  section,
443
450
  select,
package/dist/motion.cjs CHANGED
@@ -143,6 +143,12 @@ function reportError(error, context) {
143
143
  });
144
144
  }
145
145
 
146
+ // src/utils/globalSingleton.ts
147
+ function globalSingleton(key, create) {
148
+ const g = globalThis;
149
+ return g[key] ?? (g[key] = create());
150
+ }
151
+
146
152
  // src/core/dev.ts
147
153
  var DEV = typeof __SIBU_DEV__ !== "undefined" ? !!__SIBU_DEV__ : typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
148
154
  // safe default: off in browser, on in test/dev Node
@@ -155,14 +161,19 @@ function devWarn(message) {
155
161
  }
156
162
 
157
163
  // src/core/rendering/dispose.ts
158
- var elementDisposers = /* @__PURE__ */ new WeakMap();
159
- var activeBindingCount = 0;
164
+ var state2 = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.disposers.v1"), () => ({
165
+ disposers: /* @__PURE__ */ new WeakMap(),
166
+ captures: [],
167
+ bindings: { count: 0 }
168
+ }));
169
+ var elementDisposers = state2.disposers;
170
+ var bindings = state2.bindings;
160
171
  function resolveCapture(capture) {
161
172
  let frame = capture;
162
173
  while (frame?.closed) frame = frame.forwardTo;
163
174
  return frame ?? null;
164
175
  }
165
- var registrationCaptures = [];
176
+ var registrationCaptures = state2.captures;
166
177
  function currentDisposerCapture() {
167
178
  return resolveCapture(registrationCaptures[registrationCaptures.length - 1]);
168
179
  }
@@ -181,7 +192,7 @@ function registerDisposer(node, teardown) {
181
192
  elementDisposers.set(node, disposers);
182
193
  }
183
194
  disposers.push(teardown);
184
- if (DEV) activeBindingCount++;
195
+ if (DEV) bindings.count++;
185
196
  const capture = resolveCapture(registrationCaptures[registrationCaptures.length - 1]);
186
197
  if (capture) capture.entries.push([node, teardown]);
187
198
  }
@@ -444,6 +455,201 @@ function bindOwnerScope(fn) {
444
455
  return (...args) => runWithOwnerScope(scope, () => fn(...args));
445
456
  }
446
457
  var currentStructOwner = null;
458
+ var frozenOwners = 0;
459
+ var ACTIVE = 0;
460
+ var PAUSED = 1;
461
+ var ENDED = 2;
462
+ var NOOP = () => {
463
+ };
464
+ var skippedWhileHeld = /* @__PURE__ */ new Set();
465
+ var waiters = /* @__PURE__ */ new Set();
466
+ var heldRoots = /* @__PURE__ */ new Set();
467
+ function ownerState(tok) {
468
+ let state3 = ACTIVE;
469
+ for (let t = tok; t !== null; ) {
470
+ const o = t.sub;
471
+ if (o === null) return ENDED;
472
+ if (o._frozen === true) state3 = PAUSED;
473
+ t = o._owner ?? null;
474
+ }
475
+ return state3;
476
+ }
477
+ var endWatchers = /* @__PURE__ */ new Set();
478
+ var stateWatchers = /* @__PURE__ */ new Set();
479
+ var stateCheckQueued = false;
480
+ function queueStateCheck() {
481
+ if (stateCheckQueued || stateWatchers.size === 0) return;
482
+ stateCheckQueued = true;
483
+ queueMicrotask(() => {
484
+ stateCheckQueued = false;
485
+ for (const watcher of [...stateWatchers]) {
486
+ if (!stateWatchers.has(watcher)) continue;
487
+ const state3 = watcher.check.state();
488
+ if (state3 === ENDED) stateWatchers.delete(watcher);
489
+ if (state3 === ENDED || state3 === watcher.last) continue;
490
+ watcher.last = state3;
491
+ try {
492
+ watcher.listener(state3);
493
+ } catch (err) {
494
+ reportError(err, { phase: "effect" });
495
+ }
496
+ }
497
+ });
498
+ }
499
+ var ALWAYS_ACTIVE = Object.assign(() => false, {
500
+ state: () => ACTIVE,
501
+ wait: (onActive) => {
502
+ onActive();
503
+ return NOOP;
504
+ },
505
+ onEnd: () => NOOP,
506
+ run: (fn) => fn(),
507
+ onChange: () => NOOP,
508
+ within: () => false
509
+ });
510
+ function captureFrozen() {
511
+ const tok = currentStructOwner;
512
+ if (tok === null) return ALWAYS_ACTIVE;
513
+ const state3 = () => ownerState(tok);
514
+ const check = Object.assign(() => state3() !== ACTIVE, {
515
+ state: state3,
516
+ wait: (onActive, onEnd) => {
517
+ const now = state3();
518
+ if (now !== PAUSED) {
519
+ (now === ACTIVE ? onActive : onEnd)();
520
+ return NOOP;
521
+ }
522
+ const waiter = { check, onActive, onEnd };
523
+ waiters.add(waiter);
524
+ return () => {
525
+ waiters.delete(waiter);
526
+ };
527
+ },
528
+ onEnd: (onEnd) => {
529
+ if (state3() === ENDED) {
530
+ onEnd();
531
+ return NOOP;
532
+ }
533
+ const watcher = { check, onActive: NOOP, onEnd };
534
+ endWatchers.add(watcher);
535
+ return () => {
536
+ endWatchers.delete(watcher);
537
+ };
538
+ },
539
+ run: (fn) => {
540
+ const prev = currentStructOwner;
541
+ currentStructOwner = tok.sub === null ? null : tok;
542
+ try {
543
+ return fn();
544
+ } finally {
545
+ currentStructOwner = prev;
546
+ }
547
+ },
548
+ onChange: (listener) => {
549
+ const last = state3();
550
+ if (last === ENDED) return NOOP;
551
+ const watcher = { check, last, listener };
552
+ stateWatchers.add(watcher);
553
+ return () => {
554
+ stateWatchers.delete(watcher);
555
+ };
556
+ },
557
+ within: (owner) => {
558
+ const target = owner.run(() => currentStructOwner);
559
+ if (target === null) return false;
560
+ for (let t = tok; t !== null; ) {
561
+ if (t === target) return true;
562
+ const o = t.sub;
563
+ if (o === null) return false;
564
+ t = o._owner ?? null;
565
+ }
566
+ return false;
567
+ }
568
+ });
569
+ return check;
570
+ }
571
+ function holdSubtree(root) {
572
+ heldRoots.add(root);
573
+ return () => {
574
+ if (heldRoots.delete(root)) settleHeld();
575
+ };
576
+ }
577
+ function isHeld(sub) {
578
+ if (frozenOwners !== 0 && hasFrozenOwner(sub)) return true;
579
+ if (heldRoots.size !== 0) {
580
+ const node = sub._errorNode;
581
+ if (node != null) {
582
+ for (const root of heldRoots) if (root.contains(node)) return true;
583
+ }
584
+ }
585
+ return false;
586
+ }
587
+ function notifyEnded() {
588
+ for (const watcher of stateWatchers) if (watcher.check.state() === ENDED) stateWatchers.delete(watcher);
589
+ let ended = null;
590
+ for (const watcher of endWatchers) {
591
+ if (watcher.check.state() !== ENDED) continue;
592
+ endWatchers.delete(watcher);
593
+ (ended ?? (ended = [])).push(watcher);
594
+ }
595
+ if (ended === null) return;
596
+ for (const watcher of ended) {
597
+ try {
598
+ watcher.onEnd();
599
+ } catch (err) {
600
+ reportError(err, { phase: "cleanup" });
601
+ }
602
+ }
603
+ }
604
+ function dropReleasedSkipped() {
605
+ for (const sub of skippedWhileHeld) {
606
+ if (sub._disposed === true || sub.depsHead == null) skippedWhileHeld.delete(sub);
607
+ }
608
+ }
609
+ function settleHeld() {
610
+ for (const sub of skippedWhileHeld) {
611
+ if (sub._disposed === true) skippedWhileHeld.delete(sub);
612
+ else if (!isHeld(sub)) {
613
+ skippedWhileHeld.delete(sub);
614
+ if (!pendingSet.has(sub)) {
615
+ pendingSet.add(sub);
616
+ pendingQueue.push(sub);
617
+ }
618
+ }
619
+ }
620
+ if (frozenOwners === 0 && heldRoots.size === 0) skippedWhileHeld.clear();
621
+ let ready = null;
622
+ for (const waiter of waiters) {
623
+ if (waiter.check.state() === PAUSED) continue;
624
+ waiters.delete(waiter);
625
+ (ready ?? (ready = [])).push(waiter);
626
+ }
627
+ if (ready !== null) {
628
+ const settle = ready;
629
+ queueMicrotask(() => {
630
+ for (const waiter of settle) {
631
+ const state3 = waiter.check.state();
632
+ if (state3 === PAUSED) waiters.add(waiter);
633
+ else
634
+ try {
635
+ (state3 === ACTIVE ? waiter.onActive : waiter.onEnd)();
636
+ } catch (err) {
637
+ reportError(err, { phase: "effect" });
638
+ }
639
+ }
640
+ });
641
+ }
642
+ if (pendingQueue.length > 0) drainNotificationQueue();
643
+ }
644
+ function hasFrozenOwner(sub) {
645
+ for (let t = sub._owner ?? null; t !== null; ) {
646
+ const o = t.sub;
647
+ if (o === null) return false;
648
+ if (o._frozen === true) return true;
649
+ t = o._owner ?? null;
650
+ }
651
+ return false;
652
+ }
447
653
  var subscriberEpochCounter = 0;
448
654
  function retrack(effectFn, subscriber) {
449
655
  const prev = currentSubscriber;
@@ -551,6 +757,20 @@ function structuralBinding(commit, ownerNode) {
551
757
  } finally {
552
758
  currentStructOwner = prev;
553
759
  }
760
+ },
761
+ freeze: () => {
762
+ const s = sub;
763
+ if (s._disposed || s._frozen) return;
764
+ s._frozen = true;
765
+ frozenOwners++;
766
+ queueStateCheck();
767
+ },
768
+ thaw: () => {
769
+ if (!sub._frozen) return;
770
+ sub._frozen = false;
771
+ frozenOwners--;
772
+ queueStateCheck();
773
+ settleHeld();
554
774
  }
555
775
  };
556
776
  }
@@ -579,20 +799,34 @@ function createBinding(commit, ownerNode, structural) {
579
799
  subscriber._errorNode = ownerNode;
580
800
  subscriber._tok = null;
581
801
  subscriber._owner = null;
802
+ subscriber._frozen = false;
582
803
  if (structural) subscriber._tok = { sub: subscriber };
583
804
  try {
584
805
  run();
585
806
  } catch (err) {
586
807
  subscriber._disposed = true;
587
808
  subscriber._errorNode = void 0;
588
- if (subscriber._tok != null) subscriber._tok.sub = null;
809
+ if (subscriber._tok != null) {
810
+ subscriber._tok.sub = null;
811
+ if (endWatchers.size !== 0 || stateWatchers.size !== 0) notifyEnded();
812
+ }
589
813
  cleanup(subscriber);
590
814
  throw err;
591
815
  }
592
816
  subscriber._dispose = () => {
593
817
  subscriber._disposed = true;
818
+ const wasFrozen = subscriber._frozen === true;
819
+ if (wasFrozen) {
820
+ subscriber._frozen = false;
821
+ frozenOwners--;
822
+ }
594
823
  subscriber._errorNode = void 0;
595
- if (subscriber._tok != null) subscriber._tok.sub = null;
824
+ if (subscriber._tok != null) {
825
+ subscriber._tok.sub = null;
826
+ if (endWatchers.size !== 0 || stateWatchers.size !== 0) notifyEnded();
827
+ if (skippedWhileHeld.size !== 0) dropReleasedSkipped();
828
+ if (wasFrozen || waiters.size !== 0) settleHeld();
829
+ }
596
830
  cleanup(subscriber);
597
831
  };
598
832
  return subscriber;
@@ -702,6 +936,10 @@ function runPendingOwners(sub) {
702
936
  }
703
937
  }
704
938
  function runQueued(sub) {
939
+ if ((frozenOwners !== 0 || heldRoots.size !== 0) && isHeld(sub)) {
940
+ skippedWhileHeld.add(sub);
941
+ return;
942
+ }
705
943
  if (quarantined.size > 0 && quarantined.has(sub)) return;
706
944
  if (sub._hasComputedDep === true && !depsChanged(sub)) return;
707
945
  if (tickRepeat(sub)) {
@@ -849,7 +1087,7 @@ function forEachSubscriber(signal2, visit) {
849
1087
  }
850
1088
 
851
1089
  // src/reactivity/track.ts
852
- var _runtimeVersion = true ? "4.14.0" : "dev";
1090
+ var _runtimeVersion = true ? "4.15.0" : "dev";
853
1091
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
854
1092
  function resolveReactiveApi() {
855
1093
  const g = globalThis;
@@ -885,6 +1123,8 @@ function resolveReactiveApi() {
885
1123
  runWithOwnerScope,
886
1124
  bindOwnerScope,
887
1125
  structuralBinding,
1126
+ captureFrozen,
1127
+ holdSubtree,
888
1128
  version: _runtimeVersion
889
1129
  };
890
1130
  g[REGISTRY_KEY] = local;
@@ -912,6 +1152,22 @@ var getOwnerScope2 = API.getOwnerScope ?? getOwnerScope;
912
1152
  var runWithOwnerScope2 = API.runWithOwnerScope ?? runWithOwnerScope;
913
1153
  var bindOwnerScope2 = API.bindOwnerScope ?? bindOwnerScope;
914
1154
  var structuralBinding2 = API.structuralBinding ?? ((commit, ownerNode) => ({ stop: API.reactiveBinding(commit, ownerNode), run: (fn) => fn() }));
1155
+ var captureFrozen2 = API.captureFrozen ?? (() => Object.assign(() => false, {
1156
+ state: () => 0,
1157
+ wait: (onActive) => {
1158
+ onActive();
1159
+ return () => {
1160
+ };
1161
+ },
1162
+ onEnd: () => () => {
1163
+ },
1164
+ run: (fn) => fn(),
1165
+ onChange: () => () => {
1166
+ },
1167
+ within: () => false
1168
+ }));
1169
+ var holdSubtree2 = API.holdSubtree ?? (() => () => {
1170
+ });
915
1171
 
916
1172
  // src/reactivity/batch.ts
917
1173
  var batchDepth = 0;
@@ -974,7 +1230,7 @@ function emitDevtools(hook, event, payload) {
974
1230
  // src/core/signals/signal.ts
975
1231
  var _g = globalThis;
976
1232
  function signal(initial, options) {
977
- const state2 = {
1233
+ const state3 = {
978
1234
  value: initial,
979
1235
  __v: 0,
980
1236
  __sc: 0,
@@ -987,57 +1243,57 @@ function signal(initial, options) {
987
1243
  };
988
1244
  const debugName = DEV ? options?.name : void 0;
989
1245
  const equalsFn = options?.equals;
990
- if (debugName) state2.__name = debugName;
1246
+ if (debugName) state3.__name = debugName;
991
1247
  function get() {
992
- recordDependency2(state2);
993
- return state2.value;
1248
+ recordDependency2(state3);
1249
+ return state3.value;
994
1250
  }
995
- get.__signal = state2;
1251
+ get.__signal = state3;
996
1252
  if (debugName) get.__name = debugName;
997
1253
  let set;
998
1254
  if (equalsFn) {
999
1255
  set = (next) => {
1000
- const prev = state2.value;
1256
+ const prev = state3.value;
1001
1257
  const newValue = typeof next === "function" ? next(prev) : next;
1002
1258
  if (equalsFn(prev, newValue)) return;
1003
- state2.value = newValue;
1004
- state2.__v++;
1259
+ state3.value = newValue;
1260
+ state3.__v++;
1005
1261
  if (DEV) {
1006
1262
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1007
- if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
1263
+ if (hook) emitDevtools(hook, "signal:update", { signal: state3, name: debugName, oldValue: prev, newValue });
1008
1264
  }
1009
- if (!enqueueBatchedSignal(state2)) {
1010
- notifySubscribers2(state2);
1265
+ if (!enqueueBatchedSignal(state3)) {
1266
+ notifySubscribers2(state3);
1011
1267
  }
1012
1268
  };
1013
1269
  } else if (DEV) {
1014
1270
  set = (next) => {
1015
- const prev = state2.value;
1271
+ const prev = state3.value;
1016
1272
  const newValue = typeof next === "function" ? next(prev) : next;
1017
1273
  if (Object.is(newValue, prev)) return;
1018
- state2.value = newValue;
1019
- state2.__v++;
1274
+ state3.value = newValue;
1275
+ state3.__v++;
1020
1276
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1021
- if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
1022
- if (!enqueueBatchedSignal(state2)) {
1023
- notifySubscribers2(state2);
1277
+ if (hook) emitDevtools(hook, "signal:update", { signal: state3, name: debugName, oldValue: prev, newValue });
1278
+ if (!enqueueBatchedSignal(state3)) {
1279
+ notifySubscribers2(state3);
1024
1280
  }
1025
1281
  };
1026
1282
  } else {
1027
1283
  set = (next) => {
1028
- const prev = state2.value;
1284
+ const prev = state3.value;
1029
1285
  const newValue = typeof next === "function" ? next(prev) : next;
1030
1286
  if (Object.is(newValue, prev)) return;
1031
- state2.value = newValue;
1032
- state2.__v++;
1033
- if (!enqueueBatchedSignal(state2)) {
1034
- notifySubscribers2(state2);
1287
+ state3.value = newValue;
1288
+ state3.__v++;
1289
+ if (!enqueueBatchedSignal(state3)) {
1290
+ notifySubscribers2(state3);
1035
1291
  }
1036
1292
  };
1037
1293
  }
1038
1294
  if (DEV) {
1039
1295
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1040
- if (hook) emitDevtools(hook, "signal:create", { signal: state2, name: debugName, getter: get, initial });
1296
+ if (hook) emitDevtools(hook, "signal:create", { signal: state3, name: debugName, getter: get, initial });
1041
1297
  }
1042
1298
  return [get, set];
1043
1299
  }
package/dist/motion.js CHANGED
@@ -20,11 +20,11 @@ import {
20
20
  stagger,
21
21
  transition,
22
22
  viewTransition
23
- } from "./chunk-F67F77IA.js";
23
+ } from "./chunk-TQ24Y3IV.js";
24
24
  import "./chunk-5HZXGZ6T.js";
25
- import "./chunk-4FJSAUKB.js";
26
- import "./chunk-MIRKTVH4.js";
27
- import "./chunk-S37PZD6I.js";
25
+ import "./chunk-IUBV5WO5.js";
26
+ import "./chunk-GFM5WWPU.js";
27
+ import "./chunk-BF3WBJJQ.js";
28
28
  import "./chunk-NT3ZYB5S.js";
29
29
  import "./chunk-R5U7XKVJ.js";
30
30
  export {