sibujs 3.3.0 → 3.3.2

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 (60) hide show
  1. package/dist/browser.cjs +230 -40
  2. package/dist/browser.js +5 -5
  3. package/dist/build.cjs +240 -108
  4. package/dist/build.js +13 -13
  5. package/dist/cdn.global.js +7 -7
  6. package/dist/{chunk-BEIKESVL.js → chunk-2ARSB7NG.js} +36 -13
  7. package/dist/{chunk-X3NHE2DK.js → chunk-4NJEAPLI.js} +83 -17
  8. package/dist/{chunk-JBXNCZSC.js → chunk-5VH3GIDX.js} +1 -1
  9. package/dist/{chunk-6G6UNHZI.js → chunk-62V653X2.js} +16 -21
  10. package/dist/{chunk-S4FHR5ZZ.js → chunk-655B7MMR.js} +3 -3
  11. package/dist/{chunk-24DBWDTK.js → chunk-6TCOWMGY.js} +1 -1
  12. package/dist/{chunk-USDR2GFV.js → chunk-A7CZH3GN.js} +3 -3
  13. package/dist/{chunk-SLCUP2EK.js → chunk-AEOLHSSQ.js} +3 -3
  14. package/dist/chunk-CCSJMTRN.js +15 -0
  15. package/dist/{chunk-R3QEDXFS.js → chunk-EX77FXTT.js} +1 -1
  16. package/dist/{chunk-ZUVLC7TM.js → chunk-FJIRS3FM.js} +1 -1
  17. package/dist/{chunk-4WXWJ4SW.js → chunk-FJO2ZL4Q.js} +4 -4
  18. package/dist/{chunk-CVMMULHO.js → chunk-G6N3LMO2.js} +4 -4
  19. package/dist/{chunk-XQ7XSGYP.js → chunk-IQJ36UTJ.js} +1 -1
  20. package/dist/{chunk-5K72I3UQ.js → chunk-JCQG2I2G.js} +21 -4
  21. package/dist/{chunk-7JHWAGRQ.js → chunk-N5TQVEKE.js} +2 -2
  22. package/dist/{chunk-IHBVTURX.js → chunk-P7C7SEJV.js} +4 -4
  23. package/dist/{chunk-M6WSIGYW.js → chunk-Q46YIQYW.js} +2 -2
  24. package/dist/{chunk-Q2ERM6NT.js → chunk-QCFBIVIQ.js} +1 -1
  25. package/dist/{chunk-F4UM7QBJ.js → chunk-RLTFJYDN.js} +2 -2
  26. package/dist/{chunk-GOJMFRBL.js → chunk-S3NFJO6L.js} +20 -14
  27. package/dist/{chunk-MWZFOIBG.js → chunk-YUBEOWII.js} +5 -5
  28. package/dist/{chunk-WVJJUFPC.js → chunk-YUR5SX7F.js} +2 -2
  29. package/dist/{chunk-NUWKIEHE.js → chunk-ZEUP4TUD.js} +2 -2
  30. package/dist/data.cjs +181 -37
  31. package/dist/data.js +7 -7
  32. package/dist/devtools.cjs +265 -45
  33. package/dist/devtools.js +5 -5
  34. package/dist/ecosystem.cjs +203 -59
  35. package/dist/ecosystem.js +8 -8
  36. package/dist/extras.cjs +216 -116
  37. package/dist/extras.js +22 -22
  38. package/dist/index.cjs +242 -108
  39. package/dist/index.d.cts +78 -14
  40. package/dist/index.d.ts +78 -14
  41. package/dist/index.js +17 -13
  42. package/dist/motion.cjs +329 -13
  43. package/dist/motion.js +3 -3
  44. package/dist/patterns.cjs +181 -37
  45. package/dist/patterns.js +6 -6
  46. package/dist/performance.cjs +278 -37
  47. package/dist/performance.js +6 -6
  48. package/dist/plugins.cjs +353 -153
  49. package/dist/plugins.js +95 -94
  50. package/dist/{ssr-6D67RAVB.js → ssr-2PPULEK2.js} +2 -2
  51. package/dist/ssr.cjs +203 -58
  52. package/dist/ssr.js +9 -9
  53. package/dist/testing.cjs +416 -19
  54. package/dist/testing.js +3 -3
  55. package/dist/ui.cjs +256 -65
  56. package/dist/ui.js +8 -8
  57. package/dist/widgets.cjs +166 -40
  58. package/dist/widgets.js +7 -7
  59. package/package.json +1 -1
  60. package/dist/chunk-YT6HQ6AM.js +0 -14
package/dist/ssr.cjs CHANGED
@@ -87,23 +87,29 @@ function devWarn(message) {
87
87
  }
88
88
 
89
89
  // src/core/ssr-context.ts
90
- var als = null;
91
- try {
92
- if (typeof process !== "undefined" && process.versions && process.versions.node) {
93
- let mod = null;
94
- const getBuiltin = process.getBuiltinModule;
95
- if (typeof getBuiltin === "function") {
96
- mod = getBuiltin("node:async_hooks");
97
- } else {
98
- const req = Function("return typeof require==='function'?require:null")();
99
- if (req) mod = req("node:async_hooks");
90
+ var SSR_KEY = /* @__PURE__ */ Symbol.for("sibujs.ssr.v1");
91
+ function detectSSRShared() {
92
+ let detected = null;
93
+ try {
94
+ if (typeof process !== "undefined" && process.versions && process.versions.node) {
95
+ let mod = null;
96
+ const getBuiltin = process.getBuiltinModule;
97
+ if (typeof getBuiltin === "function") {
98
+ mod = getBuiltin("node:async_hooks");
99
+ } else {
100
+ const req = Function("return typeof require==='function'?require:null")();
101
+ if (req) mod = req("node:async_hooks");
102
+ }
103
+ if (mod) detected = new mod.AsyncLocalStorage();
100
104
  }
101
- if (mod) als = new mod.AsyncLocalStorage();
105
+ } catch {
106
+ detected = null;
102
107
  }
103
- } catch {
104
- als = null;
108
+ return { als: detected, fallbackStore: { ssr: false, suspenseIdCounter: 0 } };
105
109
  }
106
- var fallbackStore = { ssr: false, suspenseIdCounter: 0 };
110
+ var _shared = globalThis[SSR_KEY] ?? (globalThis[SSR_KEY] = detectSSRShared());
111
+ var als = _shared.als;
112
+ var fallbackStore = _shared.fallbackStore;
107
113
  function getSSRStore() {
108
114
  if (als) {
109
115
  const s2 = als.getStore();
@@ -614,7 +620,7 @@ function hydrateProgressively(container, islands, options) {
614
620
  }
615
621
  container.setAttribute("data-sibu-hydrated", "progressive");
616
622
  return () => {
617
- for (const cleanup2 of cleanups) cleanup2();
623
+ for (const cleanup3 of cleanups) cleanup3();
618
624
  };
619
625
  }
620
626
  function resetSSRState() {
@@ -707,7 +713,7 @@ function escapeAttr(str) {
707
713
  return str.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
708
714
  }
709
715
 
710
- // src/reactivity/track.ts
716
+ // src/reactivity/track-core.ts
711
717
  var _isDev3 = isDev();
712
718
  var POOL_MAX = 4096;
713
719
  var nodePool = [];
@@ -791,6 +797,7 @@ function unlinkSub(node) {
791
797
  else sub2.depsTail = prev;
792
798
  }
793
799
  var currentSubscriber = null;
800
+ var suspendSavedSub = null;
794
801
  var notifyDepth = 0;
795
802
  var pendingQueue = [];
796
803
  var pendingSet = /* @__PURE__ */ new Set();
@@ -802,6 +809,35 @@ function safeInvoke(sub2) {
802
809
  if (_isDev3) devWarn(`Subscriber threw during notification: ${err instanceof Error ? err.message : String(err)}`);
803
810
  }
804
811
  }
812
+ var suspendDepth = 0;
813
+ var trackingSuspended = false;
814
+ function suspendTracking() {
815
+ if (suspendDepth === 0) {
816
+ suspendSavedSub = currentSubscriber;
817
+ currentSubscriber = null;
818
+ trackingSuspended = true;
819
+ }
820
+ suspendDepth++;
821
+ }
822
+ function resumeTracking() {
823
+ suspendDepth--;
824
+ if (suspendDepth === 0) {
825
+ currentSubscriber = suspendSavedSub;
826
+ suspendSavedSub = null;
827
+ trackingSuspended = false;
828
+ }
829
+ }
830
+ function isTrackingSuspended() {
831
+ return trackingSuspended;
832
+ }
833
+ function untracked(fn) {
834
+ suspendTracking();
835
+ try {
836
+ return fn();
837
+ } finally {
838
+ resumeTracking();
839
+ }
840
+ }
805
841
  var subscriberEpochCounter = 0;
806
842
  function retrack(effectFn, subscriber) {
807
843
  const prev = currentSubscriber;
@@ -911,6 +947,16 @@ function cleanup(subscriber) {
911
947
  var maxSubscriberRepeats = 50;
912
948
  var maxDrainIterations = 1e6;
913
949
  var drainEpoch = 0;
950
+ function setMaxSubscriberRepeats(n) {
951
+ const prev = maxSubscriberRepeats;
952
+ if (Number.isFinite(n) && n > 0) maxSubscriberRepeats = Math.floor(n);
953
+ return prev;
954
+ }
955
+ function setMaxDrainIterations(n) {
956
+ const prev = maxDrainIterations;
957
+ if (Number.isFinite(n) && n > 0) maxDrainIterations = Math.floor(n);
958
+ return prev;
959
+ }
914
960
  function tickRepeat(sub2) {
915
961
  const s2 = sub2;
916
962
  if (s2._runEpoch !== drainEpoch) {
@@ -1059,6 +1105,85 @@ function notifySubscribers(signal2) {
1059
1105
  }
1060
1106
  }
1061
1107
  }
1108
+ function getSubscriberCount(signal2) {
1109
+ return signal2.__sc ?? 0;
1110
+ }
1111
+ function getSubscriberDeps(subscriber) {
1112
+ const sub2 = subscriber;
1113
+ const out = [];
1114
+ let node = sub2.depsHead ?? null;
1115
+ while (node) {
1116
+ if (node.sig) out.push(node.sig);
1117
+ node = node.subNext;
1118
+ }
1119
+ return out;
1120
+ }
1121
+ function forEachSubscriber(signal2, visit) {
1122
+ let node = signal2.subsHead ?? null;
1123
+ while (node) {
1124
+ const s2 = node.sub;
1125
+ if (s2) visit(s2);
1126
+ node = node.sigNext;
1127
+ }
1128
+ }
1129
+
1130
+ // src/reactivity/track.ts
1131
+ var _isDev4 = isDev();
1132
+ var _runtimeVersion = true ? "3.3.2" : "dev";
1133
+ var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
1134
+ function resolveReactiveApi() {
1135
+ const g2 = globalThis;
1136
+ const existing = g2[REGISTRY_KEY];
1137
+ if (existing) {
1138
+ if (_isDev4 && !existing.__dupWarned) {
1139
+ existing.__dupWarned = true;
1140
+ devWarn(
1141
+ `Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`
1142
+ );
1143
+ }
1144
+ return existing;
1145
+ }
1146
+ const local = {
1147
+ suspendTracking,
1148
+ resumeTracking,
1149
+ isTrackingSuspended,
1150
+ untracked,
1151
+ retrack,
1152
+ track,
1153
+ reactiveBinding,
1154
+ recordDependency,
1155
+ cleanup,
1156
+ setMaxSubscriberRepeats,
1157
+ setMaxDrainIterations,
1158
+ drainNotificationQueue,
1159
+ queueSignalNotification,
1160
+ notifySubscribers,
1161
+ getSubscriberCount,
1162
+ getSubscriberDeps,
1163
+ forEachSubscriber,
1164
+ version: _runtimeVersion
1165
+ };
1166
+ g2[REGISTRY_KEY] = local;
1167
+ return local;
1168
+ }
1169
+ var API = resolveReactiveApi();
1170
+ var suspendTracking2 = API.suspendTracking;
1171
+ var resumeTracking2 = API.resumeTracking;
1172
+ var isTrackingSuspended2 = API.isTrackingSuspended;
1173
+ var untracked2 = API.untracked;
1174
+ var retrack2 = API.retrack;
1175
+ var track2 = API.track;
1176
+ var reactiveBinding2 = API.reactiveBinding;
1177
+ var recordDependency2 = API.recordDependency;
1178
+ var cleanup2 = API.cleanup;
1179
+ var setMaxSubscriberRepeats2 = API.setMaxSubscriberRepeats;
1180
+ var setMaxDrainIterations2 = API.setMaxDrainIterations;
1181
+ var drainNotificationQueue2 = API.drainNotificationQueue;
1182
+ var queueSignalNotification2 = API.queueSignalNotification;
1183
+ var notifySubscribers2 = API.notifySubscribers;
1184
+ var getSubscriberCount2 = API.getSubscriberCount;
1185
+ var getSubscriberDeps2 = API.getSubscriberDeps;
1186
+ var forEachSubscriber2 = API.forEachSubscriber;
1062
1187
 
1063
1188
  // src/core/signals/effect.ts
1064
1189
  var _g = globalThis;
@@ -1080,7 +1205,7 @@ function drainReruns(ctx) {
1080
1205
  do {
1081
1206
  ctx.rerunPending = false;
1082
1207
  if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
1083
- retrack(ctx.bodyFn, ctx.subscriber);
1208
+ retrack2(ctx.bodyFn, ctx.subscriber);
1084
1209
  } while (ctx.rerunPending && ++reruns <= MAX_RERUNS);
1085
1210
  if (ctx.rerunPending) {
1086
1211
  ctx.rerunPending = false;
@@ -1109,7 +1234,7 @@ function disposeEffect(ctx) {
1109
1234
  }
1110
1235
  }
1111
1236
  try {
1112
- cleanup(ctx.subscriber);
1237
+ cleanup2(ctx.subscriber);
1113
1238
  } catch (err) {
1114
1239
  if (typeof console !== "undefined") {
1115
1240
  console.warn("[SibuJS effect] dispose threw:", err);
@@ -1154,7 +1279,7 @@ function effect(effectFn, options) {
1154
1279
  try {
1155
1280
  ctx.rerunPending = false;
1156
1281
  if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
1157
- retrack(ctx.bodyFn, sub2);
1282
+ retrack2(ctx.bodyFn, sub2);
1158
1283
  if (ctx.rerunPending) drainReruns(ctx);
1159
1284
  } finally {
1160
1285
  ctx.running = false;
@@ -1170,7 +1295,7 @@ function effect(effectFn, options) {
1170
1295
  ctx.subscriber = sub2;
1171
1296
  ctx.running = true;
1172
1297
  try {
1173
- retrack(ctx.bodyFn, ctx.subscriber);
1298
+ retrack2(ctx.bodyFn, ctx.subscriber);
1174
1299
  if (ctx.rerunPending) drainReruns(ctx);
1175
1300
  } finally {
1176
1301
  ctx.running = false;
@@ -1218,7 +1343,7 @@ function Head(props) {
1218
1343
  const anchor = document.createComment("sibu-head");
1219
1344
  const managedElements = [];
1220
1345
  const effectCleanups = [];
1221
- const cleanup2 = () => {
1346
+ const cleanup3 = () => {
1222
1347
  for (const el of managedElements) {
1223
1348
  if (el.parentNode) el.parentNode.removeChild(el);
1224
1349
  }
@@ -1227,7 +1352,7 @@ function Head(props) {
1227
1352
  effectCleanups.length = 0;
1228
1353
  };
1229
1354
  const apply = () => {
1230
- cleanup2();
1355
+ cleanup3();
1231
1356
  if (props.title) {
1232
1357
  if (typeof props.title === "function") {
1233
1358
  const cleanupFn = effect(() => {
@@ -1348,7 +1473,7 @@ async function generateStaticSite(options) {
1348
1473
  // src/reactivity/batch.ts
1349
1474
  var batchDepth = 0;
1350
1475
  var pendingSignals = /* @__PURE__ */ new Set();
1351
- function batch(fn) {
1476
+ function batchImpl(fn) {
1352
1477
  batchDepth++;
1353
1478
  try {
1354
1479
  return fn();
@@ -1359,25 +1484,45 @@ function batch(fn) {
1359
1484
  }
1360
1485
  }
1361
1486
  }
1362
- function enqueueBatchedSignal(signal2) {
1487
+ function enqueueBatchedSignalImpl(signal2) {
1363
1488
  if (batchDepth === 0) return false;
1364
1489
  pendingSignals.add(signal2);
1365
1490
  return true;
1366
1491
  }
1492
+ function isBatchingImpl() {
1493
+ return batchDepth > 0;
1494
+ }
1367
1495
  function flushBatch() {
1368
1496
  try {
1369
1497
  for (const signal2 of pendingSignals) {
1370
- queueSignalNotification(signal2);
1498
+ queueSignalNotification2(signal2);
1371
1499
  }
1372
1500
  } finally {
1373
1501
  pendingSignals.clear();
1374
1502
  }
1375
- drainNotificationQueue();
1503
+ drainNotificationQueue2();
1504
+ }
1505
+ var BATCH_REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.batch.v1");
1506
+ function resolveBatchApi() {
1507
+ const g2 = globalThis;
1508
+ const existing = g2[BATCH_REGISTRY_KEY];
1509
+ if (existing) return existing;
1510
+ const local = {
1511
+ batch: batchImpl,
1512
+ enqueueBatchedSignal: enqueueBatchedSignalImpl,
1513
+ isBatching: isBatchingImpl
1514
+ };
1515
+ g2[BATCH_REGISTRY_KEY] = local;
1516
+ return local;
1376
1517
  }
1518
+ var API2 = resolveBatchApi();
1519
+ var batch = API2.batch;
1520
+ var enqueueBatchedSignal = API2.enqueueBatchedSignal;
1521
+ var isBatching = API2.isBatching;
1377
1522
 
1378
1523
  // src/core/signals/signal.ts
1379
1524
  var _g2 = globalThis;
1380
- var _isDev4 = isDev();
1525
+ var _isDev5 = isDev();
1381
1526
  function signal(initial, options) {
1382
1527
  const state = {
1383
1528
  value: initial,
@@ -1388,11 +1533,11 @@ function signal(initial, options) {
1388
1533
  __activeNode: null,
1389
1534
  __name: void 0
1390
1535
  };
1391
- const debugName = _isDev4 ? options?.name : void 0;
1536
+ const debugName = _isDev5 ? options?.name : void 0;
1392
1537
  const equalsFn = options?.equals;
1393
1538
  if (debugName) state.__name = debugName;
1394
1539
  function get() {
1395
- recordDependency(state);
1540
+ recordDependency2(state);
1396
1541
  return state.value;
1397
1542
  }
1398
1543
  get.__signal = state;
@@ -1405,15 +1550,15 @@ function signal(initial, options) {
1405
1550
  if (equalsFn(prev, newValue)) return;
1406
1551
  state.value = newValue;
1407
1552
  state.__v++;
1408
- if (_isDev4) {
1553
+ if (_isDev5) {
1409
1554
  const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1410
1555
  if (hook) hook.emit("signal:update", { signal: state, name: debugName, oldValue: prev, newValue });
1411
1556
  }
1412
1557
  if (!enqueueBatchedSignal(state)) {
1413
- notifySubscribers(state);
1558
+ notifySubscribers2(state);
1414
1559
  }
1415
1560
  };
1416
- } else if (_isDev4) {
1561
+ } else if (_isDev5) {
1417
1562
  set = (next) => {
1418
1563
  const prev = state.value;
1419
1564
  const newValue = typeof next === "function" ? next(prev) : next;
@@ -1423,7 +1568,7 @@ function signal(initial, options) {
1423
1568
  const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1424
1569
  if (hook) hook.emit("signal:update", { signal: state, name: debugName, oldValue: prev, newValue });
1425
1570
  if (!enqueueBatchedSignal(state)) {
1426
- notifySubscribers(state);
1571
+ notifySubscribers2(state);
1427
1572
  }
1428
1573
  };
1429
1574
  } else {
@@ -1434,11 +1579,11 @@ function signal(initial, options) {
1434
1579
  state.value = newValue;
1435
1580
  state.__v++;
1436
1581
  if (!enqueueBatchedSignal(state)) {
1437
- notifySubscribers(state);
1582
+ notifySubscribers2(state);
1438
1583
  }
1439
1584
  };
1440
1585
  }
1441
- if (_isDev4) {
1586
+ if (_isDev5) {
1442
1587
  const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1443
1588
  if (hook) hook.emit("signal:create", { signal: state, name: debugName, getter: get, initial });
1444
1589
  }
@@ -1592,13 +1737,13 @@ function createMiddlewareChain() {
1592
1737
  }
1593
1738
 
1594
1739
  // src/reactivity/bindAttribute.ts
1595
- var _isDev5 = isDev();
1740
+ var _isDev6 = isDev();
1596
1741
  function setProp(el, key, val) {
1597
1742
  el[key] = val;
1598
1743
  }
1599
1744
  function bindAttribute(el, attr, getter) {
1600
1745
  if (isEventHandlerAttr(attr)) {
1601
- if (_isDev5)
1746
+ if (_isDev6)
1602
1747
  devWarn(
1603
1748
  `bindAttribute: refusing to bind event-handler attribute "${attr}". Use on:{ ${attr.slice(2)}: fn } instead.`
1604
1749
  );
@@ -1610,7 +1755,7 @@ function bindAttribute(el, attr, getter) {
1610
1755
  try {
1611
1756
  value = getter();
1612
1757
  } catch (err) {
1613
- if (_isDev5)
1758
+ if (_isDev6)
1614
1759
  devWarn(`bindAttribute: getter for "${attr}" threw: ${err instanceof Error ? err.message : String(err)}`);
1615
1760
  return;
1616
1761
  }
@@ -1631,12 +1776,12 @@ function bindAttribute(el, attr, getter) {
1631
1776
  el.setAttribute(attr, sanitizeAttributeString(attr, str));
1632
1777
  }
1633
1778
  }
1634
- return reactiveBinding(commit);
1779
+ return reactiveBinding2(commit);
1635
1780
  }
1636
1781
 
1637
1782
  // src/core/rendering/dispose.ts
1638
1783
  var elementDisposers = /* @__PURE__ */ new WeakMap();
1639
- var _isDev6 = isDev();
1784
+ var _isDev7 = isDev();
1640
1785
  var activeBindingCount = 0;
1641
1786
  function registerDisposer(node, teardown) {
1642
1787
  let disposers = elementDisposers.get(node);
@@ -1645,7 +1790,7 @@ function registerDisposer(node, teardown) {
1645
1790
  elementDisposers.set(node, disposers);
1646
1791
  }
1647
1792
  disposers.push(teardown);
1648
- if (_isDev6) activeBindingCount++;
1793
+ if (_isDev7) activeBindingCount++;
1649
1794
  }
1650
1795
  function dispose(node) {
1651
1796
  const stack = [node];
@@ -1664,12 +1809,12 @@ function dispose(node) {
1664
1809
  if (disposers) {
1665
1810
  const snapshot = disposers.slice();
1666
1811
  elementDisposers.delete(current);
1667
- if (_isDev6) activeBindingCount -= snapshot.length;
1812
+ if (_isDev7) activeBindingCount -= snapshot.length;
1668
1813
  for (const d of snapshot) {
1669
1814
  try {
1670
1815
  d();
1671
1816
  } catch (err) {
1672
- if (_isDev6 && typeof console !== "undefined") {
1817
+ if (_isDev7 && typeof console !== "undefined") {
1673
1818
  console.warn("[SibuJS] Disposer threw during cleanup:", err);
1674
1819
  }
1675
1820
  }
@@ -1680,12 +1825,12 @@ function dispose(node) {
1680
1825
  if (!added || added.length === 0) break;
1681
1826
  const moreSnapshot = added.slice();
1682
1827
  elementDisposers.delete(current);
1683
- if (_isDev6) activeBindingCount -= moreSnapshot.length;
1828
+ if (_isDev7) activeBindingCount -= moreSnapshot.length;
1684
1829
  for (const d of moreSnapshot) {
1685
1830
  try {
1686
1831
  d();
1687
1832
  } catch (err) {
1688
- if (_isDev6 && typeof console !== "undefined") {
1833
+ if (_isDev7 && typeof console !== "undefined") {
1689
1834
  console.warn("[SibuJS] Disposer threw during cleanup:", err);
1690
1835
  }
1691
1836
  }
@@ -1696,7 +1841,7 @@ function dispose(node) {
1696
1841
  }
1697
1842
 
1698
1843
  // src/reactivity/bindChildNode.ts
1699
- var _isDev7 = isDev();
1844
+ var _isDev8 = isDev();
1700
1845
  function bindChildNode(placeholder, getter) {
1701
1846
  let lastNodes = [];
1702
1847
  function commit() {
@@ -1704,7 +1849,7 @@ function bindChildNode(placeholder, getter) {
1704
1849
  try {
1705
1850
  result = getter();
1706
1851
  } catch (err) {
1707
- if (_isDev7) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
1852
+ if (_isDev8) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
1708
1853
  return;
1709
1854
  }
1710
1855
  if (result == null || typeof result === "boolean") {
@@ -1730,7 +1875,7 @@ function bindChildNode(placeholder, getter) {
1730
1875
  if (item == null || typeof item === "boolean") continue;
1731
1876
  const node = item instanceof Node ? item : document.createTextNode(String(item));
1732
1877
  if (seen.has(node)) {
1733
- if (_isDev7)
1878
+ if (_isDev8)
1734
1879
  devWarn("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");
1735
1880
  continue;
1736
1881
  }
@@ -1765,12 +1910,12 @@ function bindChildNode(placeholder, getter) {
1765
1910
  }
1766
1911
  lastNodes = newNodes;
1767
1912
  }
1768
- return reactiveBinding(commit);
1913
+ return reactiveBinding2(commit);
1769
1914
  }
1770
1915
 
1771
1916
  // src/core/rendering/tagFactory.ts
1772
1917
  var SVG_NS = "http://www.w3.org/2000/svg";
1773
- var _isDev8 = isDev();
1918
+ var _isDev9 = isDev();
1774
1919
  var BLOCKED_TAGS = /* @__PURE__ */ new Set(["script", "iframe", "object", "embed", "frame", "frameset"]);
1775
1920
  function isBlockedTag(tag) {
1776
1921
  return BLOCKED_TAGS.has(tag.toLowerCase());
@@ -1813,7 +1958,7 @@ function toKebab(prop) {
1813
1958
  }
1814
1959
  function applyStyle(el, style2) {
1815
1960
  if (typeof style2 === "function") {
1816
- const teardown = track(() => {
1961
+ const teardown = track2(() => {
1817
1962
  el.setAttribute("style", style2());
1818
1963
  });
1819
1964
  registerDisposer(el, teardown);
@@ -1829,7 +1974,7 @@ function applyStyle(el, style2) {
1829
1974
  const name = toKebab(prop);
1830
1975
  if (typeof val === "function") {
1831
1976
  const getter = val;
1832
- const teardown = track(() => {
1977
+ const teardown = track2(() => {
1833
1978
  htmlEl.style.setProperty(name, sanitizeCSSValue(String(getter())));
1834
1979
  });
1835
1980
  registerDisposer(el, teardown);
@@ -1844,7 +1989,7 @@ function applyClass(el, cls) {
1844
1989
  return;
1845
1990
  }
1846
1991
  if (typeof cls === "function") {
1847
- const teardown = track(() => {
1992
+ const teardown = track2(() => {
1848
1993
  el.setAttribute("class", cls());
1849
1994
  });
1850
1995
  registerDisposer(el, teardown);
@@ -1871,7 +2016,7 @@ function applyClass(el, cls) {
1871
2016
  }
1872
2017
  el.setAttribute("class", r);
1873
2018
  };
1874
- const teardown = track(update);
2019
+ const teardown = track2(update);
1875
2020
  registerDisposer(el, teardown);
1876
2021
  } else {
1877
2022
  el.setAttribute("class", result);
@@ -1941,7 +2086,7 @@ var tagFactory = (tag, ns) => {
1941
2086
  appendChildren(el, second);
1942
2087
  return el;
1943
2088
  }
1944
- if (_isDev8 && looksLikeClassList(first)) {
2089
+ if (_isDev9 && looksLikeClassList(first)) {
1945
2090
  devWarn(
1946
2091
  `tagFactory: lone string "${first}" looks like a class list but is being rendered as TEXT. For a class, use ${tag}({ class: "${first}" }) \u2014 or ${tag}("${first}", children) to set the class AND add children.`
1947
2092
  );
@@ -1962,7 +2107,7 @@ var tagFactory = (tag, ns) => {
1962
2107
  if (pClass != null) applyClass(el, pClass);
1963
2108
  const pId = props.id;
1964
2109
  if (pId != null) {
1965
- if (_isDev8 && typeof pId === "string" && CLOBBER_RISKY_IDS.has(pId.toLowerCase())) {
2110
+ if (_isDev9 && typeof pId === "string" && CLOBBER_RISKY_IDS.has(pId.toLowerCase())) {
1966
2111
  devWarn(
1967
2112
  `tagFactory: element id="${pId}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`
1968
2113
  );
@@ -1977,7 +2122,7 @@ var tagFactory = (tag, ns) => {
1977
2122
  const handler = pOn[ev];
1978
2123
  if (typeof handler === "function") {
1979
2124
  el.addEventListener(ev, handler);
1980
- } else if (_isDev8) {
2125
+ } else if (_isDev9) {
1981
2126
  devWarn(
1982
2127
  `tagFactory: on.${ev} handler is not a function (got ${typeof handler}). Event listener was not attached.`
1983
2128
  );
@@ -2090,7 +2235,7 @@ var area = tagFactory("area");
2090
2235
  var audio = tagFactory("audio");
2091
2236
  var img = tagFactory("img");
2092
2237
  var map = tagFactory("map");
2093
- var track2 = tagFactory("track");
2238
+ var track3 = tagFactory("track");
2094
2239
  var video = tagFactory("video");
2095
2240
  var embed = tagFactory("embed");
2096
2241
  var iframe = tagFactory("iframe");
package/dist/ssr.js CHANGED
@@ -22,8 +22,8 @@ import {
22
22
  wasm,
23
23
  worker,
24
24
  workerFn
25
- } from "./chunk-USDR2GFV.js";
26
- import "./chunk-24DBWDTK.js";
25
+ } from "./chunk-A7CZH3GN.js";
26
+ import "./chunk-6TCOWMGY.js";
27
27
  import {
28
28
  collectStream,
29
29
  deserializeState,
@@ -43,15 +43,15 @@ import {
43
43
  ssrSuspense,
44
44
  suspenseSwapScript,
45
45
  trustHTML
46
- } from "./chunk-R3QEDXFS.js";
47
- import "./chunk-NUWKIEHE.js";
48
- import "./chunk-Q2ERM6NT.js";
46
+ } from "./chunk-EX77FXTT.js";
47
+ import "./chunk-ZEUP4TUD.js";
48
+ import "./chunk-QCFBIVIQ.js";
49
49
  import "./chunk-5VGSK6D2.js";
50
50
  import "./chunk-L3GAGWCC.js";
51
- import "./chunk-7JHWAGRQ.js";
52
- import "./chunk-GOJMFRBL.js";
53
- import "./chunk-5K72I3UQ.js";
54
- import "./chunk-X3NHE2DK.js";
51
+ import "./chunk-N5TQVEKE.js";
52
+ import "./chunk-S3NFJO6L.js";
53
+ import "./chunk-JCQG2I2G.js";
54
+ import "./chunk-4NJEAPLI.js";
55
55
  import "./chunk-COY6PUD2.js";
56
56
  export {
57
57
  Head,