sibujs 1.4.0 → 1.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.
Files changed (79) hide show
  1. package/README.md +105 -119
  2. package/dist/browser.cjs +53 -14
  3. package/dist/browser.d.cts +14 -9
  4. package/dist/browser.d.ts +14 -9
  5. package/dist/browser.js +4 -4
  6. package/dist/build.cjs +124 -42
  7. package/dist/build.d.cts +1 -1
  8. package/dist/build.d.ts +1 -1
  9. package/dist/build.js +10 -10
  10. package/dist/cdn.global.js +7 -7
  11. package/dist/chunk-5ZYQ6KDD.js +154 -0
  12. package/dist/chunk-6BMPXPUW.js +26 -0
  13. package/dist/chunk-7GRNSCFT.js +1097 -0
  14. package/dist/chunk-BGTHZHJ5.js +1016 -0
  15. package/dist/chunk-BMPL52BF.js +654 -0
  16. package/dist/chunk-GJPXRJ45.js +37 -0
  17. package/dist/chunk-JCDUJN2F.js +2779 -0
  18. package/dist/chunk-K4G4ZQNR.js +286 -0
  19. package/dist/chunk-MB6QFH3I.js +2776 -0
  20. package/dist/chunk-MYRV7VDM.js +742 -0
  21. package/dist/chunk-NZIIMDWI.js +84 -0
  22. package/dist/chunk-P3XWXJZU.js +282 -0
  23. package/dist/chunk-PDZQY43A.js +616 -0
  24. package/dist/chunk-RJ46C3CS.js +1293 -0
  25. package/dist/chunk-SFKNRVCU.js +292 -0
  26. package/dist/chunk-TDGZL5CU.js +365 -0
  27. package/dist/chunk-VAPYJN4X.js +368 -0
  28. package/dist/chunk-VQDZK23A.js +1023 -0
  29. package/dist/chunk-VQNQZCWJ.js +61 -0
  30. package/dist/chunk-XHK6BDAJ.js +76 -0
  31. package/dist/chunk-XUEEGU5O.js +409 -0
  32. package/dist/contracts-ey_Qh8ef.d.cts +239 -0
  33. package/dist/contracts-ey_Qh8ef.d.ts +239 -0
  34. package/dist/customElement-BL3Uo8dL.d.cts +318 -0
  35. package/dist/customElement-BL3Uo8dL.d.ts +318 -0
  36. package/dist/data.cjs +52 -11
  37. package/dist/data.js +6 -6
  38. package/dist/devtools.cjs +22 -24
  39. package/dist/devtools.js +26 -28
  40. package/dist/ecosystem.cjs +31 -6
  41. package/dist/ecosystem.d.cts +4 -4
  42. package/dist/ecosystem.d.ts +4 -4
  43. package/dist/ecosystem.js +7 -7
  44. package/dist/extras.cjs +304 -108
  45. package/dist/extras.d.cts +3 -3
  46. package/dist/extras.d.ts +3 -3
  47. package/dist/extras.js +19 -19
  48. package/dist/index.cjs +124 -42
  49. package/dist/index.d.cts +58 -48
  50. package/dist/index.d.ts +58 -48
  51. package/dist/index.js +10 -10
  52. package/dist/motion.cjs +13 -2
  53. package/dist/motion.d.cts +1 -1
  54. package/dist/motion.d.ts +1 -1
  55. package/dist/motion.js +3 -3
  56. package/dist/patterns.cjs +91 -24
  57. package/dist/patterns.d.cts +46 -12
  58. package/dist/patterns.d.ts +46 -12
  59. package/dist/patterns.js +5 -5
  60. package/dist/performance.cjs +97 -12
  61. package/dist/performance.d.cts +6 -1
  62. package/dist/performance.d.ts +6 -1
  63. package/dist/performance.js +5 -3
  64. package/dist/plugins.cjs +19 -13
  65. package/dist/plugins.d.cts +3 -3
  66. package/dist/plugins.d.ts +3 -3
  67. package/dist/plugins.js +16 -18
  68. package/dist/ssr.cjs +9 -0
  69. package/dist/ssr.d.cts +1 -1
  70. package/dist/ssr.d.ts +1 -1
  71. package/dist/ssr.js +7 -7
  72. package/dist/testing.js +2 -2
  73. package/dist/ui.cjs +130 -48
  74. package/dist/ui.d.cts +13 -16
  75. package/dist/ui.d.ts +13 -16
  76. package/dist/ui.js +6 -6
  77. package/dist/widgets.cjs +31 -6
  78. package/dist/widgets.js +5 -5
  79. package/package.json +1 -1
package/dist/data.cjs CHANGED
@@ -138,12 +138,21 @@ function queueSignalNotification(signal2) {
138
138
  }
139
139
  }
140
140
  }
141
+ var MAX_DRAIN_ITERATIONS = 1e3;
141
142
  function drainNotificationQueue() {
142
143
  if (notifyDepth > 0) return;
143
144
  notifyDepth++;
144
145
  try {
145
146
  let i = 0;
146
147
  while (i < pendingQueue.length) {
148
+ if (i >= MAX_DRAIN_ITERATIONS) {
149
+ if (typeof console !== "undefined") {
150
+ console.error(
151
+ `[SibuJS] Notification queue exceeded ${MAX_DRAIN_ITERATIONS} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`
152
+ );
153
+ }
154
+ break;
155
+ }
147
156
  safeInvoke(pendingQueue[i]);
148
157
  i++;
149
158
  }
@@ -310,21 +319,37 @@ function derived(getter, options) {
310
319
  cs._v = getter();
311
320
  }, markDirty);
312
321
  const hook = globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
322
+ let evaluating = false;
313
323
  function computedGetter() {
324
+ if (evaluating) {
325
+ throw new Error(
326
+ `[SibuJS] Circular dependency detected in derived${debugName ? ` "${debugName}"` : ""}. A derived signal cannot read itself (directly or through a chain).`
327
+ );
328
+ }
314
329
  if (trackingSuspended) {
315
330
  if (cs._d) {
316
- cs._d = false;
317
- cs._v = getter();
331
+ evaluating = true;
332
+ try {
333
+ cs._d = false;
334
+ cs._v = getter();
335
+ } finally {
336
+ evaluating = false;
337
+ }
318
338
  }
319
339
  return cs._v;
320
340
  }
321
341
  recordDependency(cs);
322
342
  if (cs._d) {
323
343
  const oldValue = cs._v;
324
- track(() => {
325
- cs._d = false;
326
- cs._v = getter();
327
- }, markDirty);
344
+ evaluating = true;
345
+ try {
346
+ track(() => {
347
+ cs._d = false;
348
+ cs._v = getter();
349
+ }, markDirty);
350
+ } finally {
351
+ evaluating = false;
352
+ }
328
353
  if (hook && oldValue !== cs._v) {
329
354
  hook.emit("computed:update", { signal: cs, oldValue, newValue: cs._v });
330
355
  }
@@ -480,9 +505,13 @@ async function withRetry(fn, options, onRetry, signal2) {
480
505
  const delay = calculateDelay(attempt, strategy, baseDelay, maxDelay, jitter);
481
506
  onRetry?.(error, attempt, delay);
482
507
  await new Promise((resolve, reject) => {
483
- const timer = setTimeout(resolve, delay);
508
+ let onAbort = null;
509
+ const timer = setTimeout(() => {
510
+ if (onAbort && signal2) signal2.removeEventListener("abort", onAbort);
511
+ resolve();
512
+ }, delay);
484
513
  if (signal2) {
485
- const onAbort = () => {
514
+ onAbort = () => {
486
515
  clearTimeout(timer);
487
516
  reject(new DOMException("Aborted", "AbortError"));
488
517
  };
@@ -633,9 +662,10 @@ function query(key, fetcher, options = {}) {
633
662
  }
634
663
  }
635
664
  }
665
+ const keyChanged = currentKey !== key2;
636
666
  currentKey = key2;
637
667
  const entry = getOrCreateEntry(key2, initialData);
638
- entry.subscribers++;
668
+ if (keyChanged || entry.subscribers === 0) entry.subscribers++;
639
669
  if (entry.gcTimer !== null) {
640
670
  clearTimeout(entry.gcTimer);
641
671
  entry.gcTimer = null;
@@ -749,7 +779,9 @@ function mutation(mutationFn, options = {}) {
749
779
  const [status, setStatus] = signal("idle");
750
780
  const isSuccess = derived(() => status() === "success");
751
781
  const isIdle = derived(() => status() === "idle");
782
+ let runId = 0;
752
783
  async function execute(variables) {
784
+ const myRun = ++runId;
753
785
  let context2;
754
786
  batch(() => {
755
787
  setLoading(true);
@@ -761,6 +793,7 @@ function mutation(mutationFn, options = {}) {
761
793
  context2 = await options.onMutate(variables);
762
794
  }
763
795
  const result = await withRetry(() => mutationFn(variables), options.retry);
796
+ if (myRun !== runId) return result;
764
797
  batch(() => {
765
798
  setData(result);
766
799
  setLoading(false);
@@ -771,6 +804,7 @@ function mutation(mutationFn, options = {}) {
771
804
  return result;
772
805
  } catch (err) {
773
806
  const errorObj = err instanceof Error ? err : new Error(String(err));
807
+ if (myRun !== runId) throw errorObj;
774
808
  batch(() => {
775
809
  setError(errorObj);
776
810
  setLoading(false);
@@ -782,6 +816,7 @@ function mutation(mutationFn, options = {}) {
782
816
  }
783
817
  }
784
818
  function reset() {
819
+ runId++;
785
820
  batch(() => {
786
821
  setData(void 0);
787
822
  setError(void 0);
@@ -1031,7 +1066,10 @@ function resource(sourceOrFetcher, fetcherOrOptions, maybeOptions) {
1031
1066
  options.onSuccess?.(result);
1032
1067
  } catch (err) {
1033
1068
  if (version !== fetchVersion || disposed) return;
1034
- if (err instanceof DOMException && err.name === "AbortError") return;
1069
+ if (err instanceof DOMException && err.name === "AbortError") {
1070
+ if (version === fetchVersion) setLoading(false);
1071
+ return;
1072
+ }
1035
1073
  const errorObj = err instanceof Error ? err : new Error(String(err));
1036
1074
  batch(() => {
1037
1075
  setError(errorObj);
@@ -1285,6 +1323,7 @@ function socket(url, options) {
1285
1323
  let reconnectTimer = null;
1286
1324
  let heartbeatTimer = null;
1287
1325
  let disposed = false;
1326
+ let manuallyClosed = false;
1288
1327
  function getUrl() {
1289
1328
  return typeof url === "function" ? url() : url;
1290
1329
  }
@@ -1308,12 +1347,13 @@ function socket(url, options) {
1308
1347
  ws.onclose = () => {
1309
1348
  setStatus("closed");
1310
1349
  stopHeartbeat();
1311
- if (autoReconnect && !disposed && reconnectCount < maxReconnects) {
1350
+ if (autoReconnect && !disposed && !manuallyClosed && reconnectCount < maxReconnects) {
1312
1351
  reconnectCount++;
1313
1352
  reconnectTimer = setTimeout(() => {
1314
1353
  connect();
1315
1354
  }, reconnectDelay);
1316
1355
  }
1356
+ manuallyClosed = false;
1317
1357
  };
1318
1358
  ws.onerror = () => {
1319
1359
  };
@@ -1339,6 +1379,7 @@ function socket(url, options) {
1339
1379
  }
1340
1380
  }
1341
1381
  function close() {
1382
+ manuallyClosed = true;
1342
1383
  if (reconnectTimer !== null) {
1343
1384
  clearTimeout(reconnectTimer);
1344
1385
  reconnectTimer = null;
package/dist/data.js CHANGED
@@ -19,14 +19,14 @@ import {
19
19
  syncAdapter,
20
20
  throttle,
21
21
  withRetry
22
- } from "./chunk-JAKHTMQU.js";
23
- import "./chunk-BGN5ZMP4.js";
24
- import "./chunk-NEKUBFPT.js";
22
+ } from "./chunk-BGTHZHJ5.js";
23
+ import "./chunk-6BMPXPUW.js";
24
+ import "./chunk-XHK6BDAJ.js";
25
25
  import "./chunk-CMBFNA7L.js";
26
- import "./chunk-CHF5OHIA.js";
26
+ import "./chunk-VQNQZCWJ.js";
27
27
  import "./chunk-EUZND3CB.js";
28
- import "./chunk-WZSPOOER.js";
29
- import "./chunk-ZD6OAMTH.js";
28
+ import "./chunk-NZIIMDWI.js";
29
+ import "./chunk-K4G4ZQNR.js";
30
30
  import "./chunk-5X6PP2UK.js";
31
31
  export {
32
32
  calculateDelay,
package/dist/devtools.cjs CHANGED
@@ -1473,55 +1473,53 @@ function createTraceProfiler() {
1473
1473
  }
1474
1474
  const start = typeof performance !== "undefined" ? performance.now() : Date.now();
1475
1475
  let recording = true;
1476
- const onEffectStart = (payload) => {
1476
+ function now() {
1477
+ return (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
1478
+ }
1479
+ const onEffectCreate = (payload) => {
1477
1480
  if (!recording) return;
1478
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
1479
- const label = payload.name ?? "effect";
1480
1481
  events.push({
1481
- name: label,
1482
+ name: payload.name ?? "effect",
1482
1483
  cat: "effect",
1483
- ph: "B",
1484
- ts: Math.floor(now * 1e3),
1484
+ ph: "I",
1485
+ ts: Math.floor(now() * 1e3),
1485
1486
  tid: 0,
1486
1487
  pid: 0
1487
1488
  });
1488
1489
  };
1489
- const onEffectEnd = (payload) => {
1490
+ const onEffectDestroy = (payload) => {
1490
1491
  if (!recording) return;
1491
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
1492
- const label = payload.name ?? "effect";
1493
1492
  events.push({
1494
- name: label,
1493
+ name: payload.name ?? "effect:destroy",
1495
1494
  cat: "effect",
1496
- ph: "E",
1497
- ts: Math.floor(now * 1e3),
1495
+ ph: "I",
1496
+ ts: Math.floor(now() * 1e3),
1498
1497
  tid: 0,
1499
1498
  pid: 0
1500
1499
  });
1501
1500
  };
1502
- const onSignalSet = (payload) => {
1501
+ const onSignalUpdate = (payload) => {
1503
1502
  if (!recording) return;
1504
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
1505
- const label = payload.name ?? "signal";
1503
+ const p = payload;
1506
1504
  events.push({
1507
- name: label,
1505
+ name: p.name ?? "signal",
1508
1506
  cat: "signal",
1509
1507
  ph: "I",
1510
- ts: Math.floor(now * 1e3),
1508
+ ts: Math.floor(now() * 1e3),
1511
1509
  tid: 0,
1512
1510
  pid: 0,
1513
- args: payload.args
1511
+ args: p.oldValue !== void 0 ? { oldValue: String(p.oldValue), newValue: String(p.newValue) } : void 0
1514
1512
  });
1515
1513
  };
1516
- const offStart = hook.on("effect:start", onEffectStart);
1517
- const offEnd = hook.on("effect:end", onEffectEnd);
1518
- const offSet = hook.on("signal:set", onSignalSet);
1514
+ const offCreate = hook.on("effect:create", onEffectCreate);
1515
+ const offDestroy = hook.on("effect:destroy", onEffectDestroy);
1516
+ const offUpdate = hook.on("signal:update", onSignalUpdate);
1519
1517
  function stop() {
1520
1518
  if (!recording) return events;
1521
1519
  recording = false;
1522
- offStart();
1523
- offEnd();
1524
- offSet();
1520
+ offCreate();
1521
+ offDestroy();
1522
+ offUpdate();
1525
1523
  return events;
1526
1524
  }
1527
1525
  function stopTrace() {
package/dist/devtools.js CHANGED
@@ -33,11 +33,11 @@ import {
33
33
  trackCleanup,
34
34
  walkDependencyGraph,
35
35
  withErrorTracking
36
- } from "./chunk-77L6NL3X.js";
37
- import "./chunk-CHF5OHIA.js";
36
+ } from "./chunk-7GRNSCFT.js";
37
+ import "./chunk-VQNQZCWJ.js";
38
38
  import "./chunk-EUZND3CB.js";
39
- import "./chunk-WZSPOOER.js";
40
- import "./chunk-ZD6OAMTH.js";
39
+ import "./chunk-NZIIMDWI.js";
40
+ import "./chunk-K4G4ZQNR.js";
41
41
  import {
42
42
  isDev
43
43
  } from "./chunk-5X6PP2UK.js";
@@ -100,55 +100,53 @@ function createTraceProfiler() {
100
100
  }
101
101
  const start = typeof performance !== "undefined" ? performance.now() : Date.now();
102
102
  let recording = true;
103
- const onEffectStart = (payload) => {
103
+ function now() {
104
+ return (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
105
+ }
106
+ const onEffectCreate = (payload) => {
104
107
  if (!recording) return;
105
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
106
- const label = payload.name ?? "effect";
107
108
  events.push({
108
- name: label,
109
+ name: payload.name ?? "effect",
109
110
  cat: "effect",
110
- ph: "B",
111
- ts: Math.floor(now * 1e3),
111
+ ph: "I",
112
+ ts: Math.floor(now() * 1e3),
112
113
  tid: 0,
113
114
  pid: 0
114
115
  });
115
116
  };
116
- const onEffectEnd = (payload) => {
117
+ const onEffectDestroy = (payload) => {
117
118
  if (!recording) return;
118
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
119
- const label = payload.name ?? "effect";
120
119
  events.push({
121
- name: label,
120
+ name: payload.name ?? "effect:destroy",
122
121
  cat: "effect",
123
- ph: "E",
124
- ts: Math.floor(now * 1e3),
122
+ ph: "I",
123
+ ts: Math.floor(now() * 1e3),
125
124
  tid: 0,
126
125
  pid: 0
127
126
  });
128
127
  };
129
- const onSignalSet = (payload) => {
128
+ const onSignalUpdate = (payload) => {
130
129
  if (!recording) return;
131
- const now = (typeof performance !== "undefined" ? performance.now() : Date.now()) - start;
132
- const label = payload.name ?? "signal";
130
+ const p = payload;
133
131
  events.push({
134
- name: label,
132
+ name: p.name ?? "signal",
135
133
  cat: "signal",
136
134
  ph: "I",
137
- ts: Math.floor(now * 1e3),
135
+ ts: Math.floor(now() * 1e3),
138
136
  tid: 0,
139
137
  pid: 0,
140
- args: payload.args
138
+ args: p.oldValue !== void 0 ? { oldValue: String(p.oldValue), newValue: String(p.newValue) } : void 0
141
139
  });
142
140
  };
143
- const offStart = hook.on("effect:start", onEffectStart);
144
- const offEnd = hook.on("effect:end", onEffectEnd);
145
- const offSet = hook.on("signal:set", onSignalSet);
141
+ const offCreate = hook.on("effect:create", onEffectCreate);
142
+ const offDestroy = hook.on("effect:destroy", onEffectDestroy);
143
+ const offUpdate = hook.on("signal:update", onSignalUpdate);
146
144
  function stop() {
147
145
  if (!recording) return events;
148
146
  recording = false;
149
- offStart();
150
- offEnd();
151
- offSet();
147
+ offCreate();
148
+ offDestroy();
149
+ offUpdate();
152
150
  return events;
153
151
  }
154
152
  function stopTrace() {
@@ -126,12 +126,21 @@ function queueSignalNotification(signal2) {
126
126
  }
127
127
  }
128
128
  }
129
+ var MAX_DRAIN_ITERATIONS = 1e3;
129
130
  function drainNotificationQueue() {
130
131
  if (notifyDepth > 0) return;
131
132
  notifyDepth++;
132
133
  try {
133
134
  let i = 0;
134
135
  while (i < pendingQueue.length) {
136
+ if (i >= MAX_DRAIN_ITERATIONS) {
137
+ if (typeof console !== "undefined") {
138
+ console.error(
139
+ `[SibuJS] Notification queue exceeded ${MAX_DRAIN_ITERATIONS} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`
140
+ );
141
+ }
142
+ break;
143
+ }
135
144
  safeInvoke(pendingQueue[i]);
136
145
  i++;
137
146
  }
@@ -436,21 +445,37 @@ function derived(getter, options) {
436
445
  cs._v = getter();
437
446
  }, markDirty);
438
447
  const hook = globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
448
+ let evaluating = false;
439
449
  function computedGetter() {
450
+ if (evaluating) {
451
+ throw new Error(
452
+ `[SibuJS] Circular dependency detected in derived${debugName ? ` "${debugName}"` : ""}. A derived signal cannot read itself (directly or through a chain).`
453
+ );
454
+ }
440
455
  if (trackingSuspended) {
441
456
  if (cs._d) {
442
- cs._d = false;
443
- cs._v = getter();
457
+ evaluating = true;
458
+ try {
459
+ cs._d = false;
460
+ cs._v = getter();
461
+ } finally {
462
+ evaluating = false;
463
+ }
444
464
  }
445
465
  return cs._v;
446
466
  }
447
467
  recordDependency(cs);
448
468
  if (cs._d) {
449
469
  const oldValue = cs._v;
450
- track(() => {
451
- cs._d = false;
452
- cs._v = getter();
453
- }, markDirty);
470
+ evaluating = true;
471
+ try {
472
+ track(() => {
473
+ cs._d = false;
474
+ cs._v = getter();
475
+ }, markDirty);
476
+ } finally {
477
+ evaluating = false;
478
+ }
454
479
  if (hook && oldValue !== cs._v) {
455
480
  hook.emit("computed:update", { signal: cs, oldValue, newValue: cs._v });
456
481
  }
@@ -48,7 +48,7 @@ interface MobXAdapterAPI {
48
48
  *
49
49
  * const mobx = inject<MobXAdapterAPI>("mobx");
50
50
  * const todoCount = mobx.fromMobX(() => todoStore.todos.length);
51
- * div({ nodes: () => `Todos: ${todoCount()}` });
51
+ * div(() => `Todos: ${todoCount()}`);
52
52
  * ```
53
53
  */
54
54
  declare function mobXAdapter(options: MobXAdapterOptions): SibuPlugin;
@@ -90,7 +90,7 @@ interface ReduxAdapterAPI<S = unknown> {
90
90
  *
91
91
  * const redux = inject<ReduxAdapterAPI>("redux");
92
92
  * const count = redux.useSelector(s => s.counter);
93
- * div({ nodes: () => `Count: ${count()}` });
93
+ * div(() => `Count: ${count()}`);
94
94
  * ```
95
95
  */
96
96
  declare function reduxAdapter<S>(options: ReduxAdapterOptions<S>): SibuPlugin;
@@ -133,7 +133,7 @@ interface ZustandAdapterAPI<S> {
133
133
  *
134
134
  * const zs = inject<ZustandAdapterAPI>("zustand");
135
135
  * const bears = zs.useSelector(s => s.bears);
136
- * div({ nodes: () => `Bears: ${bears()}` });
136
+ * div(() => `Bears: ${bears()}`);
137
137
  * ```
138
138
  */
139
139
  declare function zustandAdapter<S>(options: ZustandAdapterOptions<S>): SibuPlugin;
@@ -204,7 +204,7 @@ type AdaptedComponent = (props?: AdaptedComponentProps) => Element;
204
204
  * });
205
205
  *
206
206
  * const { Button } = adapter.components;
207
- * Button({ variant: "raised", nodes: "Click me" });
207
+ * Button({ variant: "raised" }, "Click me");
208
208
  * ```
209
209
  */
210
210
  declare function componentAdapter(config: AdapterConfig): {
@@ -48,7 +48,7 @@ interface MobXAdapterAPI {
48
48
  *
49
49
  * const mobx = inject<MobXAdapterAPI>("mobx");
50
50
  * const todoCount = mobx.fromMobX(() => todoStore.todos.length);
51
- * div({ nodes: () => `Todos: ${todoCount()}` });
51
+ * div(() => `Todos: ${todoCount()}`);
52
52
  * ```
53
53
  */
54
54
  declare function mobXAdapter(options: MobXAdapterOptions): SibuPlugin;
@@ -90,7 +90,7 @@ interface ReduxAdapterAPI<S = unknown> {
90
90
  *
91
91
  * const redux = inject<ReduxAdapterAPI>("redux");
92
92
  * const count = redux.useSelector(s => s.counter);
93
- * div({ nodes: () => `Count: ${count()}` });
93
+ * div(() => `Count: ${count()}`);
94
94
  * ```
95
95
  */
96
96
  declare function reduxAdapter<S>(options: ReduxAdapterOptions<S>): SibuPlugin;
@@ -133,7 +133,7 @@ interface ZustandAdapterAPI<S> {
133
133
  *
134
134
  * const zs = inject<ZustandAdapterAPI>("zustand");
135
135
  * const bears = zs.useSelector(s => s.bears);
136
- * div({ nodes: () => `Bears: ${bears()}` });
136
+ * div(() => `Bears: ${bears()}`);
137
137
  * ```
138
138
  */
139
139
  declare function zustandAdapter<S>(options: ZustandAdapterOptions<S>): SibuPlugin;
@@ -204,7 +204,7 @@ type AdaptedComponent = (props?: AdaptedComponentProps) => Element;
204
204
  * });
205
205
  *
206
206
  * const { Button } = adapter.components;
207
- * Button({ variant: "raised", nodes: "Click me" });
207
+ * Button({ variant: "raised" }, "Click me");
208
208
  * ```
209
209
  */
210
210
  declare function componentAdapter(config: AdapterConfig): {
package/dist/ecosystem.js CHANGED
@@ -7,16 +7,16 @@ import {
7
7
  mobXAdapter,
8
8
  reduxAdapter,
9
9
  zustandAdapter
10
- } from "./chunk-BTU3TJDS.js";
10
+ } from "./chunk-TDGZL5CU.js";
11
11
  import "./chunk-K5ZUMYVS.js";
12
- import "./chunk-F3FA4F32.js";
13
- import "./chunk-PTQJDMRT.js";
14
- import "./chunk-NEKUBFPT.js";
12
+ import "./chunk-SFKNRVCU.js";
13
+ import "./chunk-5ZYQ6KDD.js";
14
+ import "./chunk-XHK6BDAJ.js";
15
15
  import "./chunk-CMBFNA7L.js";
16
- import "./chunk-CHF5OHIA.js";
16
+ import "./chunk-VQNQZCWJ.js";
17
17
  import "./chunk-EUZND3CB.js";
18
- import "./chunk-WZSPOOER.js";
19
- import "./chunk-ZD6OAMTH.js";
18
+ import "./chunk-NZIIMDWI.js";
19
+ import "./chunk-K4G4ZQNR.js";
20
20
  import "./chunk-5X6PP2UK.js";
21
21
  export {
22
22
  antdAdapter,