sibujs 2.2.0 → 3.1.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 (49) hide show
  1. package/dist/browser.js +4 -4
  2. package/dist/build.cjs +48 -7
  3. package/dist/build.js +10 -10
  4. package/dist/cdn.global.js +7 -7
  5. package/dist/{chunk-VSNLICTS.js → chunk-2HAGQWDV.js} +1 -1
  6. package/dist/{chunk-L52H775O.js → chunk-2N2UL7O4.js} +4 -4
  7. package/dist/{chunk-UKMXT5T6.js → chunk-2ZJ7TSW4.js} +4 -5
  8. package/dist/{chunk-NEWH4O5U.js → chunk-3DJH25UO.js} +1 -1
  9. package/dist/{chunk-XDKP4T7G.js → chunk-3DYB5B3S.js} +2 -2
  10. package/dist/{chunk-L4DAT4WU.js → chunk-3U4ZVXVD.js} +24 -1
  11. package/dist/{chunk-J63GPPCJ.js → chunk-CR4MXPHB.js} +14 -11
  12. package/dist/{chunk-YMOIAHWA.js → chunk-EFOAE5NC.js} +1 -1
  13. package/dist/{chunk-4YTVESDX.js → chunk-GQ7RRFPU.js} +1 -1
  14. package/dist/{chunk-2KM2724A.js → chunk-IVOUCSZL.js} +2 -2
  15. package/dist/{chunk-KZA7ANXP.js → chunk-KB3BA2XK.js} +3 -3
  16. package/dist/{chunk-2JQUV4Y3.js → chunk-PMSDFTK3.js} +4 -4
  17. package/dist/{chunk-KH4OE6WY.js → chunk-QNQY5DUS.js} +5 -5
  18. package/dist/{chunk-6QZO7MMG.js → chunk-RK4BQG25.js} +1 -1
  19. package/dist/{chunk-DF3GTP4Q.js → chunk-SC437AMI.js} +1 -1
  20. package/dist/{chunk-XVYB3J6C.js → chunk-SVVAUX7J.js} +3 -3
  21. package/dist/{chunk-V65KTDZW.js → chunk-UYX2NDOH.js} +3 -3
  22. package/dist/{chunk-STFTTMO2.js → chunk-WKUXSE7V.js} +21 -3
  23. package/dist/{chunk-RJIRT46U.js → chunk-WYU7CYJ3.js} +4 -4
  24. package/dist/{chunk-5WD7BYTZ.js → chunk-ZIBE2SAT.js} +1 -1
  25. package/dist/data.cjs +23 -1
  26. package/dist/data.js +6 -6
  27. package/dist/devtools.js +4 -4
  28. package/dist/ecosystem.cjs +42 -4
  29. package/dist/ecosystem.js +7 -7
  30. package/dist/extras.cjs +42 -4
  31. package/dist/extras.js +19 -19
  32. package/dist/index.cjs +48 -7
  33. package/dist/index.d.cts +13 -14
  34. package/dist/index.d.ts +13 -14
  35. package/dist/index.js +10 -10
  36. package/dist/motion.js +3 -3
  37. package/dist/patterns.cjs +23 -1
  38. package/dist/patterns.js +5 -5
  39. package/dist/performance.js +4 -4
  40. package/dist/plugins.cjs +42 -4
  41. package/dist/plugins.js +6 -6
  42. package/dist/ssr.cjs +42 -4
  43. package/dist/ssr.js +7 -7
  44. package/dist/testing.js +2 -2
  45. package/dist/ui.cjs +24 -3
  46. package/dist/ui.js +6 -6
  47. package/dist/widgets.cjs +23 -1
  48. package/dist/widgets.js +6 -6
  49. package/package.json +1 -1
package/dist/ssr.cjs CHANGED
@@ -808,7 +808,7 @@ function retrack(effectFn, subscriber) {
808
808
  }
809
809
  }
810
810
  function track(effectFn, subscriber) {
811
- if (!subscriber) subscriber = effectFn;
811
+ if (!subscriber) return reactiveBinding(effectFn);
812
812
  cleanup(subscriber);
813
813
  const prev = currentSubscriber;
814
814
  currentSubscriber = subscriber;
@@ -826,6 +826,28 @@ function track(effectFn, subscriber) {
826
826
  const sub2 = subscriber;
827
827
  return sub2._dispose ?? (sub2._dispose = () => cleanup(subscriber));
828
828
  }
829
+ function reactiveBinding(commit) {
830
+ const run = () => {
831
+ const s2 = subscriber;
832
+ if (s2._reentrant) return;
833
+ s2._reentrant = true;
834
+ try {
835
+ retrack(commit, subscriber);
836
+ } finally {
837
+ s2._reentrant = false;
838
+ }
839
+ };
840
+ const subscriber = run;
841
+ subscriber.depsHead = null;
842
+ subscriber.depsTail = null;
843
+ subscriber._epoch = 0;
844
+ subscriber._structDirty = false;
845
+ subscriber._runEpoch = 0;
846
+ subscriber._runs = 0;
847
+ subscriber._reentrant = false;
848
+ run();
849
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
850
+ }
829
851
  function recordDependency(signal2) {
830
852
  if (!currentSubscriber) return;
831
853
  const sub2 = currentSubscriber;
@@ -1566,8 +1588,7 @@ function bindAttribute(el, attr, getter) {
1566
1588
  el.setAttribute(attr, isUrlAttribute(attr) ? sanitizeUrl(str) : str);
1567
1589
  }
1568
1590
  }
1569
- const teardown = track(commit);
1570
- return teardown;
1591
+ return reactiveBinding(commit);
1571
1592
  }
1572
1593
 
1573
1594
  // src/reactivity/bindChildNode.ts
@@ -1641,7 +1662,7 @@ function bindChildNode(placeholder, getter) {
1641
1662
  }
1642
1663
  lastNodes = newNodes;
1643
1664
  }
1644
- return track(commit);
1665
+ return reactiveBinding(commit);
1645
1666
  }
1646
1667
 
1647
1668
  // src/core/rendering/dispose.ts
@@ -1684,6 +1705,18 @@ var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
1684
1705
  function setProp2(el, key, val) {
1685
1706
  el[key] = val;
1686
1707
  }
1708
+ function looksLikeClassList(s2) {
1709
+ const t = s2.trim();
1710
+ if (!t) return false;
1711
+ const tokens = t.split(/\s+/);
1712
+ let sawClassish = false;
1713
+ for (let i2 = 0; i2 < tokens.length; i2++) {
1714
+ const tok = tokens[i2];
1715
+ if (!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(tok)) return false;
1716
+ if (/[-:/0-9]/.test(tok)) sawClassish = true;
1717
+ }
1718
+ return sawClassish;
1719
+ }
1687
1720
  var kebabCache = /* @__PURE__ */ new Map();
1688
1721
  function toKebab(prop) {
1689
1722
  let cached = kebabCache.get(prop);
@@ -1819,6 +1852,11 @@ var tagFactory = (tag, ns) => {
1819
1852
  appendChildren(el, second);
1820
1853
  return el;
1821
1854
  }
1855
+ if (_isDev8 && looksLikeClassList(first)) {
1856
+ devWarn(
1857
+ `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.`
1858
+ );
1859
+ }
1822
1860
  el.textContent = first;
1823
1861
  return el;
1824
1862
  }
package/dist/ssr.js CHANGED
@@ -22,8 +22,8 @@ import {
22
22
  wasm,
23
23
  worker,
24
24
  workerFn
25
- } from "./chunk-V65KTDZW.js";
26
- import "./chunk-VSNLICTS.js";
25
+ } from "./chunk-UYX2NDOH.js";
26
+ import "./chunk-2HAGQWDV.js";
27
27
  import {
28
28
  collectStream,
29
29
  deserializeState,
@@ -43,14 +43,14 @@ import {
43
43
  suspenseSwapScript,
44
44
  trustHTML
45
45
  } from "./chunk-JYD2PWXH.js";
46
- import "./chunk-STFTTMO2.js";
47
- import "./chunk-UKMXT5T6.js";
46
+ import "./chunk-WKUXSE7V.js";
47
+ import "./chunk-2ZJ7TSW4.js";
48
48
  import "./chunk-2UPRY23K.js";
49
49
  import "./chunk-UCS6AMJ7.js";
50
- import "./chunk-5WD7BYTZ.js";
50
+ import "./chunk-ZIBE2SAT.js";
51
51
  import "./chunk-2RA7SHDA.js";
52
- import "./chunk-6QZO7MMG.js";
53
- import "./chunk-L4DAT4WU.js";
52
+ import "./chunk-RK4BQG25.js";
53
+ import "./chunk-3U4ZVXVD.js";
54
54
  import "./chunk-LMLD24FC.js";
55
55
  export {
56
56
  Head,
package/dist/testing.js CHANGED
@@ -3,9 +3,9 @@ import {
3
3
  } from "./chunk-2UPRY23K.js";
4
4
  import {
5
5
  effect
6
- } from "./chunk-5WD7BYTZ.js";
6
+ } from "./chunk-ZIBE2SAT.js";
7
7
  import "./chunk-2RA7SHDA.js";
8
- import "./chunk-L4DAT4WU.js";
8
+ import "./chunk-3U4ZVXVD.js";
9
9
  import "./chunk-LMLD24FC.js";
10
10
 
11
11
  // src/testing/a11y.ts
package/dist/ui.cjs CHANGED
@@ -230,7 +230,7 @@ function retrack(effectFn, subscriber) {
230
230
  }
231
231
  }
232
232
  function track(effectFn, subscriber) {
233
- if (!subscriber) subscriber = effectFn;
233
+ if (!subscriber) return reactiveBinding(effectFn);
234
234
  cleanup(subscriber);
235
235
  const prev = currentSubscriber;
236
236
  currentSubscriber = subscriber;
@@ -248,6 +248,28 @@ function track(effectFn, subscriber) {
248
248
  const sub = subscriber;
249
249
  return sub._dispose ?? (sub._dispose = () => cleanup(subscriber));
250
250
  }
251
+ function reactiveBinding(commit) {
252
+ const run = () => {
253
+ const s = subscriber;
254
+ if (s._reentrant) return;
255
+ s._reentrant = true;
256
+ try {
257
+ retrack(commit, subscriber);
258
+ } finally {
259
+ s._reentrant = false;
260
+ }
261
+ };
262
+ const subscriber = run;
263
+ subscriber.depsHead = null;
264
+ subscriber.depsTail = null;
265
+ subscriber._epoch = 0;
266
+ subscriber._structDirty = false;
267
+ subscriber._runEpoch = 0;
268
+ subscriber._runs = 0;
269
+ subscriber._reentrant = false;
270
+ run();
271
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
272
+ }
251
273
  function recordDependency(signal2) {
252
274
  if (!currentSubscriber) return;
253
275
  const sub = currentSubscriber;
@@ -1760,8 +1782,7 @@ function bindAttribute(el, attr, getter) {
1760
1782
  el.setAttribute(attr, isUrlAttribute(attr) ? sanitizeUrl(str) : str);
1761
1783
  }
1762
1784
  }
1763
- const teardown = track(commit);
1764
- return teardown;
1785
+ return reactiveBinding(commit);
1765
1786
  }
1766
1787
 
1767
1788
  // src/ui/reactiveAttr.ts
package/dist/ui.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  toast,
39
39
  withScopedStyle,
40
40
  zipMask
41
- } from "./chunk-KH4OE6WY.js";
41
+ } from "./chunk-QNQY5DUS.js";
42
42
  import {
43
43
  RenderProp,
44
44
  assertType,
@@ -58,20 +58,20 @@ import {
58
58
  import {
59
59
  createId
60
60
  } from "./chunk-YT6HQ6AM.js";
61
- import "./chunk-UKMXT5T6.js";
62
- import "./chunk-DF3GTP4Q.js";
61
+ import "./chunk-2ZJ7TSW4.js";
62
+ import "./chunk-SC437AMI.js";
63
63
  import {
64
64
  registerDisposer
65
65
  } from "./chunk-2UPRY23K.js";
66
66
  import "./chunk-UCS6AMJ7.js";
67
67
  import {
68
68
  effect
69
- } from "./chunk-5WD7BYTZ.js";
69
+ } from "./chunk-ZIBE2SAT.js";
70
70
  import "./chunk-2RA7SHDA.js";
71
71
  import {
72
72
  signal
73
- } from "./chunk-6QZO7MMG.js";
74
- import "./chunk-L4DAT4WU.js";
73
+ } from "./chunk-RK4BQG25.js";
74
+ import "./chunk-3U4ZVXVD.js";
75
75
  import "./chunk-LMLD24FC.js";
76
76
 
77
77
  // src/ui/formAction.ts
package/dist/widgets.cjs CHANGED
@@ -177,7 +177,7 @@ function retrack(effectFn, subscriber) {
177
177
  }
178
178
  }
179
179
  function track(effectFn, subscriber) {
180
- if (!subscriber) subscriber = effectFn;
180
+ if (!subscriber) return reactiveBinding(effectFn);
181
181
  cleanup(subscriber);
182
182
  const prev = currentSubscriber;
183
183
  currentSubscriber = subscriber;
@@ -195,6 +195,28 @@ function track(effectFn, subscriber) {
195
195
  const sub = subscriber;
196
196
  return sub._dispose ?? (sub._dispose = () => cleanup(subscriber));
197
197
  }
198
+ function reactiveBinding(commit) {
199
+ const run = () => {
200
+ const s = subscriber;
201
+ if (s._reentrant) return;
202
+ s._reentrant = true;
203
+ try {
204
+ retrack(commit, subscriber);
205
+ } finally {
206
+ s._reentrant = false;
207
+ }
208
+ };
209
+ const subscriber = run;
210
+ subscriber.depsHead = null;
211
+ subscriber.depsTail = null;
212
+ subscriber._epoch = 0;
213
+ subscriber._structDirty = false;
214
+ subscriber._runEpoch = 0;
215
+ subscriber._runs = 0;
216
+ subscriber._reentrant = false;
217
+ run();
218
+ return subscriber._dispose ?? (subscriber._dispose = () => cleanup(subscriber));
219
+ }
198
220
  function recordDependency(signal2) {
199
221
  if (!currentSubscriber) return;
200
222
  const sub = currentSubscriber;
package/dist/widgets.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  select,
9
9
  tabs,
10
10
  tooltip
11
- } from "./chunk-RJIRT46U.js";
12
- import "./chunk-NEWH4O5U.js";
13
- import "./chunk-DF3GTP4Q.js";
11
+ } from "./chunk-WYU7CYJ3.js";
12
+ import "./chunk-3DJH25UO.js";
13
+ import "./chunk-SC437AMI.js";
14
14
  import "./chunk-UCS6AMJ7.js";
15
- import "./chunk-5WD7BYTZ.js";
15
+ import "./chunk-ZIBE2SAT.js";
16
16
  import "./chunk-2RA7SHDA.js";
17
- import "./chunk-6QZO7MMG.js";
18
- import "./chunk-L4DAT4WU.js";
17
+ import "./chunk-RK4BQG25.js";
18
+ import "./chunk-3U4ZVXVD.js";
19
19
  import "./chunk-LMLD24FC.js";
20
20
  export {
21
21
  accordion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sibujs",
3
- "version": "2.2.0",
3
+ "version": "3.1.0",
4
4
  "description": "A lightweight, function-based frontend framework that combines the best of React, Svelte, and Vue — with zero VDOM and maximum simplicity. Designed for developers who want fine-grained reactivity and full control without compilation or magic.",
5
5
  "keywords": [
6
6
  "frontend",