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/widgets.cjs CHANGED
@@ -215,13 +215,26 @@ function reportError(error, context) {
215
215
  });
216
216
  }
217
217
 
218
+ // src/utils/globalSingleton.ts
219
+ function globalSingleton(key, create) {
220
+ const g = globalThis;
221
+ return g[key] ?? (g[key] = create());
222
+ }
223
+
218
224
  // src/core/rendering/dispose.ts
225
+ var state2 = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.disposers.v1"), () => ({
226
+ disposers: /* @__PURE__ */ new WeakMap(),
227
+ captures: [],
228
+ bindings: { count: 0 }
229
+ }));
230
+ var elementDisposers = state2.disposers;
231
+ var bindings = state2.bindings;
219
232
  function resolveCapture(capture) {
220
233
  let frame = capture;
221
234
  while (frame?.closed) frame = frame.forwardTo;
222
235
  return frame ?? null;
223
236
  }
224
- var registrationCaptures = [];
237
+ var registrationCaptures = state2.captures;
225
238
  function currentDisposerCapture() {
226
239
  return resolveCapture(registrationCaptures[registrationCaptures.length - 1]);
227
240
  }
@@ -397,6 +410,201 @@ function bindOwnerScope(fn) {
397
410
  return (...args) => runWithOwnerScope(scope, () => fn(...args));
398
411
  }
399
412
  var currentStructOwner = null;
413
+ var frozenOwners = 0;
414
+ var ACTIVE = 0;
415
+ var PAUSED = 1;
416
+ var ENDED = 2;
417
+ var NOOP = () => {
418
+ };
419
+ var skippedWhileHeld = /* @__PURE__ */ new Set();
420
+ var waiters = /* @__PURE__ */ new Set();
421
+ var heldRoots = /* @__PURE__ */ new Set();
422
+ function ownerState(tok) {
423
+ let state3 = ACTIVE;
424
+ for (let t = tok; t !== null; ) {
425
+ const o = t.sub;
426
+ if (o === null) return ENDED;
427
+ if (o._frozen === true) state3 = PAUSED;
428
+ t = o._owner ?? null;
429
+ }
430
+ return state3;
431
+ }
432
+ var endWatchers = /* @__PURE__ */ new Set();
433
+ var stateWatchers = /* @__PURE__ */ new Set();
434
+ var stateCheckQueued = false;
435
+ function queueStateCheck() {
436
+ if (stateCheckQueued || stateWatchers.size === 0) return;
437
+ stateCheckQueued = true;
438
+ queueMicrotask(() => {
439
+ stateCheckQueued = false;
440
+ for (const watcher of [...stateWatchers]) {
441
+ if (!stateWatchers.has(watcher)) continue;
442
+ const state3 = watcher.check.state();
443
+ if (state3 === ENDED) stateWatchers.delete(watcher);
444
+ if (state3 === ENDED || state3 === watcher.last) continue;
445
+ watcher.last = state3;
446
+ try {
447
+ watcher.listener(state3);
448
+ } catch (err) {
449
+ reportError(err, { phase: "effect" });
450
+ }
451
+ }
452
+ });
453
+ }
454
+ var ALWAYS_ACTIVE = Object.assign(() => false, {
455
+ state: () => ACTIVE,
456
+ wait: (onActive) => {
457
+ onActive();
458
+ return NOOP;
459
+ },
460
+ onEnd: () => NOOP,
461
+ run: (fn) => fn(),
462
+ onChange: () => NOOP,
463
+ within: () => false
464
+ });
465
+ function captureFrozen() {
466
+ const tok = currentStructOwner;
467
+ if (tok === null) return ALWAYS_ACTIVE;
468
+ const state3 = () => ownerState(tok);
469
+ const check = Object.assign(() => state3() !== ACTIVE, {
470
+ state: state3,
471
+ wait: (onActive, onEnd) => {
472
+ const now = state3();
473
+ if (now !== PAUSED) {
474
+ (now === ACTIVE ? onActive : onEnd)();
475
+ return NOOP;
476
+ }
477
+ const waiter = { check, onActive, onEnd };
478
+ waiters.add(waiter);
479
+ return () => {
480
+ waiters.delete(waiter);
481
+ };
482
+ },
483
+ onEnd: (onEnd) => {
484
+ if (state3() === ENDED) {
485
+ onEnd();
486
+ return NOOP;
487
+ }
488
+ const watcher = { check, onActive: NOOP, onEnd };
489
+ endWatchers.add(watcher);
490
+ return () => {
491
+ endWatchers.delete(watcher);
492
+ };
493
+ },
494
+ run: (fn) => {
495
+ const prev = currentStructOwner;
496
+ currentStructOwner = tok.sub === null ? null : tok;
497
+ try {
498
+ return fn();
499
+ } finally {
500
+ currentStructOwner = prev;
501
+ }
502
+ },
503
+ onChange: (listener) => {
504
+ const last = state3();
505
+ if (last === ENDED) return NOOP;
506
+ const watcher = { check, last, listener };
507
+ stateWatchers.add(watcher);
508
+ return () => {
509
+ stateWatchers.delete(watcher);
510
+ };
511
+ },
512
+ within: (owner) => {
513
+ const target = owner.run(() => currentStructOwner);
514
+ if (target === null) return false;
515
+ for (let t = tok; t !== null; ) {
516
+ if (t === target) return true;
517
+ const o = t.sub;
518
+ if (o === null) return false;
519
+ t = o._owner ?? null;
520
+ }
521
+ return false;
522
+ }
523
+ });
524
+ return check;
525
+ }
526
+ function holdSubtree(root) {
527
+ heldRoots.add(root);
528
+ return () => {
529
+ if (heldRoots.delete(root)) settleHeld();
530
+ };
531
+ }
532
+ function isHeld(sub) {
533
+ if (frozenOwners !== 0 && hasFrozenOwner(sub)) return true;
534
+ if (heldRoots.size !== 0) {
535
+ const node = sub._errorNode;
536
+ if (node != null) {
537
+ for (const root of heldRoots) if (root.contains(node)) return true;
538
+ }
539
+ }
540
+ return false;
541
+ }
542
+ function notifyEnded() {
543
+ for (const watcher of stateWatchers) if (watcher.check.state() === ENDED) stateWatchers.delete(watcher);
544
+ let ended = null;
545
+ for (const watcher of endWatchers) {
546
+ if (watcher.check.state() !== ENDED) continue;
547
+ endWatchers.delete(watcher);
548
+ (ended ?? (ended = [])).push(watcher);
549
+ }
550
+ if (ended === null) return;
551
+ for (const watcher of ended) {
552
+ try {
553
+ watcher.onEnd();
554
+ } catch (err) {
555
+ reportError(err, { phase: "cleanup" });
556
+ }
557
+ }
558
+ }
559
+ function dropReleasedSkipped() {
560
+ for (const sub of skippedWhileHeld) {
561
+ if (sub._disposed === true || sub.depsHead == null) skippedWhileHeld.delete(sub);
562
+ }
563
+ }
564
+ function settleHeld() {
565
+ for (const sub of skippedWhileHeld) {
566
+ if (sub._disposed === true) skippedWhileHeld.delete(sub);
567
+ else if (!isHeld(sub)) {
568
+ skippedWhileHeld.delete(sub);
569
+ if (!pendingSet.has(sub)) {
570
+ pendingSet.add(sub);
571
+ pendingQueue.push(sub);
572
+ }
573
+ }
574
+ }
575
+ if (frozenOwners === 0 && heldRoots.size === 0) skippedWhileHeld.clear();
576
+ let ready = null;
577
+ for (const waiter of waiters) {
578
+ if (waiter.check.state() === PAUSED) continue;
579
+ waiters.delete(waiter);
580
+ (ready ?? (ready = [])).push(waiter);
581
+ }
582
+ if (ready !== null) {
583
+ const settle = ready;
584
+ queueMicrotask(() => {
585
+ for (const waiter of settle) {
586
+ const state3 = waiter.check.state();
587
+ if (state3 === PAUSED) waiters.add(waiter);
588
+ else
589
+ try {
590
+ (state3 === ACTIVE ? waiter.onActive : waiter.onEnd)();
591
+ } catch (err) {
592
+ reportError(err, { phase: "effect" });
593
+ }
594
+ }
595
+ });
596
+ }
597
+ if (pendingQueue.length > 0) drainNotificationQueue();
598
+ }
599
+ function hasFrozenOwner(sub) {
600
+ for (let t = sub._owner ?? null; t !== null; ) {
601
+ const o = t.sub;
602
+ if (o === null) return false;
603
+ if (o._frozen === true) return true;
604
+ t = o._owner ?? null;
605
+ }
606
+ return false;
607
+ }
400
608
  var subscriberEpochCounter = 0;
401
609
  function retrack(effectFn, subscriber) {
402
610
  const prev = currentSubscriber;
@@ -504,6 +712,20 @@ function structuralBinding(commit, ownerNode) {
504
712
  } finally {
505
713
  currentStructOwner = prev;
506
714
  }
715
+ },
716
+ freeze: () => {
717
+ const s = sub;
718
+ if (s._disposed || s._frozen) return;
719
+ s._frozen = true;
720
+ frozenOwners++;
721
+ queueStateCheck();
722
+ },
723
+ thaw: () => {
724
+ if (!sub._frozen) return;
725
+ sub._frozen = false;
726
+ frozenOwners--;
727
+ queueStateCheck();
728
+ settleHeld();
507
729
  }
508
730
  };
509
731
  }
@@ -532,20 +754,34 @@ function createBinding(commit, ownerNode, structural) {
532
754
  subscriber._errorNode = ownerNode;
533
755
  subscriber._tok = null;
534
756
  subscriber._owner = null;
757
+ subscriber._frozen = false;
535
758
  if (structural) subscriber._tok = { sub: subscriber };
536
759
  try {
537
760
  run();
538
761
  } catch (err) {
539
762
  subscriber._disposed = true;
540
763
  subscriber._errorNode = void 0;
541
- if (subscriber._tok != null) subscriber._tok.sub = null;
764
+ if (subscriber._tok != null) {
765
+ subscriber._tok.sub = null;
766
+ if (endWatchers.size !== 0 || stateWatchers.size !== 0) notifyEnded();
767
+ }
542
768
  cleanup(subscriber);
543
769
  throw err;
544
770
  }
545
771
  subscriber._dispose = () => {
546
772
  subscriber._disposed = true;
773
+ const wasFrozen = subscriber._frozen === true;
774
+ if (wasFrozen) {
775
+ subscriber._frozen = false;
776
+ frozenOwners--;
777
+ }
547
778
  subscriber._errorNode = void 0;
548
- if (subscriber._tok != null) subscriber._tok.sub = null;
779
+ if (subscriber._tok != null) {
780
+ subscriber._tok.sub = null;
781
+ if (endWatchers.size !== 0 || stateWatchers.size !== 0) notifyEnded();
782
+ if (skippedWhileHeld.size !== 0) dropReleasedSkipped();
783
+ if (wasFrozen || waiters.size !== 0) settleHeld();
784
+ }
549
785
  cleanup(subscriber);
550
786
  };
551
787
  return subscriber;
@@ -655,6 +891,10 @@ function runPendingOwners(sub) {
655
891
  }
656
892
  }
657
893
  function runQueued(sub) {
894
+ if ((frozenOwners !== 0 || heldRoots.size !== 0) && isHeld(sub)) {
895
+ skippedWhileHeld.add(sub);
896
+ return;
897
+ }
658
898
  if (quarantined.size > 0 && quarantined.has(sub)) return;
659
899
  if (sub._hasComputedDep === true && !depsChanged(sub)) return;
660
900
  if (tickRepeat(sub)) {
@@ -802,7 +1042,7 @@ function forEachSubscriber(signal2, visit) {
802
1042
  }
803
1043
 
804
1044
  // src/reactivity/track.ts
805
- var _runtimeVersion = true ? "4.14.0" : "dev";
1045
+ var _runtimeVersion = true ? "4.15.0" : "dev";
806
1046
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
807
1047
  function resolveReactiveApi() {
808
1048
  const g = globalThis;
@@ -838,6 +1078,8 @@ function resolveReactiveApi() {
838
1078
  runWithOwnerScope,
839
1079
  bindOwnerScope,
840
1080
  structuralBinding,
1081
+ captureFrozen,
1082
+ holdSubtree,
841
1083
  version: _runtimeVersion
842
1084
  };
843
1085
  g[REGISTRY_KEY] = local;
@@ -865,6 +1107,22 @@ var getOwnerScope2 = API.getOwnerScope ?? getOwnerScope;
865
1107
  var runWithOwnerScope2 = API.runWithOwnerScope ?? runWithOwnerScope;
866
1108
  var bindOwnerScope2 = API.bindOwnerScope ?? bindOwnerScope;
867
1109
  var structuralBinding2 = API.structuralBinding ?? ((commit, ownerNode) => ({ stop: API.reactiveBinding(commit, ownerNode), run: (fn) => fn() }));
1110
+ var captureFrozen2 = API.captureFrozen ?? (() => Object.assign(() => false, {
1111
+ state: () => 0,
1112
+ wait: (onActive) => {
1113
+ onActive();
1114
+ return () => {
1115
+ };
1116
+ },
1117
+ onEnd: () => () => {
1118
+ },
1119
+ run: (fn) => fn(),
1120
+ onChange: () => () => {
1121
+ },
1122
+ within: () => false
1123
+ }));
1124
+ var holdSubtree2 = API.holdSubtree ?? (() => () => {
1125
+ });
868
1126
 
869
1127
  // src/core/devtoolsHook.ts
870
1128
  function emitDevtools(hook, event, payload) {
@@ -1037,7 +1295,7 @@ var isBatching = API2.isBatching;
1037
1295
  // src/core/signals/signal.ts
1038
1296
  var _g = globalThis;
1039
1297
  function signal(initial, options) {
1040
- const state2 = {
1298
+ const state3 = {
1041
1299
  value: initial,
1042
1300
  __v: 0,
1043
1301
  __sc: 0,
@@ -1050,57 +1308,57 @@ function signal(initial, options) {
1050
1308
  };
1051
1309
  const debugName = DEV ? options?.name : void 0;
1052
1310
  const equalsFn = options?.equals;
1053
- if (debugName) state2.__name = debugName;
1311
+ if (debugName) state3.__name = debugName;
1054
1312
  function get() {
1055
- recordDependency2(state2);
1056
- return state2.value;
1313
+ recordDependency2(state3);
1314
+ return state3.value;
1057
1315
  }
1058
- get.__signal = state2;
1316
+ get.__signal = state3;
1059
1317
  if (debugName) get.__name = debugName;
1060
1318
  let set;
1061
1319
  if (equalsFn) {
1062
1320
  set = (next) => {
1063
- const prev = state2.value;
1321
+ const prev = state3.value;
1064
1322
  const newValue = typeof next === "function" ? next(prev) : next;
1065
1323
  if (equalsFn(prev, newValue)) return;
1066
- state2.value = newValue;
1067
- state2.__v++;
1324
+ state3.value = newValue;
1325
+ state3.__v++;
1068
1326
  if (DEV) {
1069
1327
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1070
- if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
1328
+ if (hook) emitDevtools(hook, "signal:update", { signal: state3, name: debugName, oldValue: prev, newValue });
1071
1329
  }
1072
- if (!enqueueBatchedSignal(state2)) {
1073
- notifySubscribers2(state2);
1330
+ if (!enqueueBatchedSignal(state3)) {
1331
+ notifySubscribers2(state3);
1074
1332
  }
1075
1333
  };
1076
1334
  } else if (DEV) {
1077
1335
  set = (next) => {
1078
- const prev = state2.value;
1336
+ const prev = state3.value;
1079
1337
  const newValue = typeof next === "function" ? next(prev) : next;
1080
1338
  if (Object.is(newValue, prev)) return;
1081
- state2.value = newValue;
1082
- state2.__v++;
1339
+ state3.value = newValue;
1340
+ state3.__v++;
1083
1341
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1084
- if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
1085
- if (!enqueueBatchedSignal(state2)) {
1086
- notifySubscribers2(state2);
1342
+ if (hook) emitDevtools(hook, "signal:update", { signal: state3, name: debugName, oldValue: prev, newValue });
1343
+ if (!enqueueBatchedSignal(state3)) {
1344
+ notifySubscribers2(state3);
1087
1345
  }
1088
1346
  };
1089
1347
  } else {
1090
1348
  set = (next) => {
1091
- const prev = state2.value;
1349
+ const prev = state3.value;
1092
1350
  const newValue = typeof next === "function" ? next(prev) : next;
1093
1351
  if (Object.is(newValue, prev)) return;
1094
- state2.value = newValue;
1095
- state2.__v++;
1096
- if (!enqueueBatchedSignal(state2)) {
1097
- notifySubscribers2(state2);
1352
+ state3.value = newValue;
1353
+ state3.__v++;
1354
+ if (!enqueueBatchedSignal(state3)) {
1355
+ notifySubscribers2(state3);
1098
1356
  }
1099
1357
  };
1100
1358
  }
1101
1359
  if (DEV) {
1102
1360
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1103
- if (hook) emitDevtools(hook, "signal:create", { signal: state2, name: debugName, getter: get, initial });
1361
+ if (hook) emitDevtools(hook, "signal:create", { signal: state3, name: debugName, getter: get, initial });
1104
1362
  }
1105
1363
  return [get, set];
1106
1364
  }
package/dist/widgets.js CHANGED
@@ -9,28 +9,28 @@ import {
9
9
  snapshotAttributes,
10
10
  tabs,
11
11
  tooltip
12
- } from "./chunk-TLS4NVIB.js";
12
+ } from "./chunk-7JO7DPSS.js";
13
13
  import {
14
14
  claimWidgetKey,
15
15
  isWidgetKeyEvent,
16
16
  widgetKeyOwner
17
17
  } from "./chunk-N5TBYXHW.js";
18
- import "./chunk-RVR5NPFL.js";
18
+ import "./chunk-2VKTFA7C.js";
19
19
  import {
20
20
  createId,
21
21
  domBinding
22
- } from "./chunk-CCKUNHVU.js";
23
- import "./chunk-N7A6FKWW.js";
22
+ } from "./chunk-DAEXQJQA.js";
23
+ import "./chunk-D44TAGCT.js";
24
24
  import "./chunk-B3HOT4TK.js";
25
25
  import "./chunk-UYTYNCMZ.js";
26
26
  import {
27
27
  batch,
28
28
  signal
29
- } from "./chunk-4FJSAUKB.js";
29
+ } from "./chunk-IUBV5WO5.js";
30
30
  import {
31
31
  untracked
32
- } from "./chunk-MIRKTVH4.js";
33
- import "./chunk-S37PZD6I.js";
32
+ } from "./chunk-GFM5WWPU.js";
33
+ import "./chunk-BF3WBJJQ.js";
34
34
  import "./chunk-NT3ZYB5S.js";
35
35
  import "./chunk-R5U7XKVJ.js";
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sibujs",
3
- "version": "4.14.0",
3
+ "version": "4.15.0",
4
4
  "description": "A function-based frontend framework with fine-grained reactivity and no virtual DOM. Tag factories return live DOM nodes you can hold and mutate, signals update only what changed, and nothing needs a compiler — it runs from a script tag or a bundler.",
5
5
  "keywords": [
6
6
  "frontend",
@@ -1,9 +0,0 @@
1
- // src/utils/globalSingleton.ts
2
- function globalSingleton(key, create) {
3
- const g = globalThis;
4
- return g[key] ?? (g[key] = create());
5
- }
6
-
7
- export {
8
- globalSingleton
9
- };