sibujs 4.6.0 → 4.7.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 +1 -1
  2. package/dist/browser.cjs +18 -5
  3. package/dist/browser.js +4 -4
  4. package/dist/build.cjs +1956 -1007
  5. package/dist/build.d.cts +133 -44
  6. package/dist/build.d.ts +133 -44
  7. package/dist/build.js +1368 -569
  8. package/dist/cdn.dev.global.js +12 -12
  9. package/dist/cdn.full.dev.global.js +11 -11
  10. package/dist/cdn.full.global.js +10 -10
  11. package/dist/cdn.global.js +12 -12
  12. package/dist/{chunk-SXXVZMKZ.js → chunk-2BPG2XDA.js} +5 -5
  13. package/dist/{chunk-BAAG6ZTI.js → chunk-3QWBSL5R.js} +4 -4
  14. package/dist/{chunk-5MT6SJ3P.js → chunk-4AWA2PVD.js} +2 -2
  15. package/dist/{chunk-JSXPZCET.js → chunk-7LUJQAOJ.js} +1 -1
  16. package/dist/{chunk-3ISI6ACU.js → chunk-BC2SECJD.js} +1 -1
  17. package/dist/{chunk-DKGBBKOF.js → chunk-BSY63EM6.js} +2 -2
  18. package/dist/{chunk-7NCARGJW.js → chunk-DKXRACVN.js} +3 -3
  19. package/dist/{chunk-47M47FOM.js → chunk-FNJXNGYZ.js} +1 -1
  20. package/dist/{chunk-D33YTSX5.js → chunk-FQRUXCEE.js} +5 -4
  21. package/dist/{chunk-5Q4R7HCL.js → chunk-JWKYU5GV.js} +11 -2
  22. package/dist/{chunk-QE4TTDU3.js → chunk-RUSSKG6G.js} +12 -11
  23. package/dist/{chunk-UZQ6ALFS.js → chunk-SLM3IA34.js} +1 -1
  24. package/dist/{chunk-XRRZKZYX.js → chunk-UNWRJRKC.js} +1 -1
  25. package/dist/{chunk-VVWPJ543.js → chunk-UOL2ECCS.js} +40 -11
  26. package/dist/{chunk-ORMZXBKQ.js → chunk-VZSG24LS.js} +3 -3
  27. package/dist/{chunk-XC4MEKGA.js → chunk-WEQ3DMVL.js} +8 -2
  28. package/dist/{chunk-PK6FK2G2.js → chunk-WOLJZUFQ.js} +176 -27
  29. package/dist/{chunk-7GQCWFOE.js → chunk-XYV3EDB7.js} +143 -74
  30. package/dist/{chunk-AIF3Z2T7.js → chunk-XZR4PXRE.js} +3 -3
  31. package/dist/{chunk-HYXDKS4N.js → chunk-Z3OHK6QT.js} +4 -4
  32. package/dist/{chunk-OXUY2A6L.js → chunk-ZVL7TY4K.js} +2 -2
  33. package/dist/{contracts-DRIuclVT.d.ts → contracts-CLqzJnOV.d.ts} +28 -17
  34. package/dist/{contracts-DRIuclVT.d.cts → contracts-CTOJXu-x.d.cts} +28 -17
  35. package/dist/data.cjs +198 -39
  36. package/dist/data.d.cts +119 -3
  37. package/dist/data.d.ts +119 -3
  38. package/dist/data.js +5 -5
  39. package/dist/devtools.cjs +18 -5
  40. package/dist/devtools.js +4 -4
  41. package/dist/ecosystem.cjs +64 -23
  42. package/dist/ecosystem.d.cts +2 -1
  43. package/dist/ecosystem.d.ts +2 -1
  44. package/dist/ecosystem.js +7 -7
  45. package/dist/extras.cjs +236 -49
  46. package/dist/extras.d.cts +3 -2
  47. package/dist/extras.d.ts +3 -2
  48. package/dist/extras.js +20 -20
  49. package/dist/index.cjs +259 -108
  50. package/dist/index.d.cts +193 -168
  51. package/dist/index.d.ts +193 -168
  52. package/dist/index.js +10 -10
  53. package/dist/motion.cjs +12 -4
  54. package/dist/motion.js +3 -3
  55. package/dist/patterns.cjs +28 -15
  56. package/dist/patterns.d.cts +2 -1
  57. package/dist/patterns.d.ts +2 -1
  58. package/dist/patterns.js +5 -5
  59. package/dist/performance.cjs +18 -5
  60. package/dist/performance.js +4 -4
  61. package/dist/plugins.cjs +118 -34
  62. package/dist/plugins.d.cts +124 -11
  63. package/dist/plugins.d.ts +124 -11
  64. package/dist/plugins.js +68 -26
  65. package/dist/ssr.cjs +54 -13
  66. package/dist/ssr.js +7 -7
  67. package/dist/{tagFactory-DFstCLQV.d.cts → tagFactory-8qL9LCIx.d.cts} +58 -19
  68. package/dist/{tagFactory-DkaNVUNV.d.ts → tagFactory-BL2fymez.d.ts} +58 -19
  69. package/dist/testing.cjs +15 -2
  70. package/dist/testing.js +2 -2
  71. package/dist/types-CJFViL6Q.d.cts +26 -0
  72. package/dist/types-CJFViL6Q.d.ts +26 -0
  73. package/dist/ui.cjs +28 -15
  74. package/dist/ui.d.cts +2 -1
  75. package/dist/ui.d.ts +2 -1
  76. package/dist/ui.js +7 -7
  77. package/dist/widgets.cjs +22 -14
  78. package/dist/widgets.js +6 -6
  79. package/package.json +4 -2
package/README.md CHANGED
@@ -188,7 +188,7 @@ Accessible `Combobox`, `Tabs`, `Accordion`, `Popover`, `Select`, `Tooltip`, `Fil
188
188
  `machine` (finite state machines), `persist`, `optimistic`, `timeTravel`, `globalStore`; plus `hoc`, `composable`, `componentProps`, and `contracts`.
189
189
 
190
190
  ### `sibujs/plugins` — First-party plugins
191
- **Router** — `createRouter`, `Route`/`Outlet`/`RouterLink`, nested routes, guards (`beforeEach`, `beforeResolve`, `afterEach`), programmatic navigation, `preloadRoute`, memory router, and per-route transitions. **i18n** — `setLocale`, `t`, `Trans`, `registerTranslations`, reactive locale switching. Plus the plugin system (`modular`, `ecosystem`, `versioning`, `startup`).
191
+ **Router** — `createRouter`, `Route`/`Outlet`/`RouterLink`, nested routes, guards (`beforeEach`, `beforeResolve`, `afterEach`), programmatic navigation, `preloadRoute`, memory router, and per-route transitions. **i18n** — `setLocale`, `t`, `translated`, `Trans`, `registerTranslations`, live locale switching for text and attributes. Plus the plugin system (`modular`, `ecosystem`, `versioning`, `startup`).
192
192
 
193
193
  ### `sibujs/ssr` — Server rendering
194
194
  `renderToString`, `renderToReadableStream`, `renderToDocument`, `hydrate`, streaming `Suspense`, `head` management, static site generation, incremental regeneration, route actions/middleware, scroll restoration, service worker & web/wasm workers, and microfrontend helpers.
package/dist/browser.cjs CHANGED
@@ -674,7 +674,7 @@ function forEachSubscriber(signal2, visit) {
674
674
  }
675
675
 
676
676
  // src/reactivity/track.ts
677
- var _runtimeVersion = true ? "4.6.0" : "dev";
677
+ var _runtimeVersion = true ? "4.7.0" : "dev";
678
678
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
679
679
  function resolveReactiveApi() {
680
680
  const g = globalThis;
@@ -780,6 +780,14 @@ var batch = API2.batch;
780
780
  var enqueueBatchedSignal = API2.enqueueBatchedSignal;
781
781
  var isBatching = API2.isBatching;
782
782
 
783
+ // src/core/devtoolsHook.ts
784
+ function emitDevtools(hook, event, payload) {
785
+ try {
786
+ hook.emit(event, payload);
787
+ } catch {
788
+ }
789
+ }
790
+
783
791
  // src/core/signals/signal.ts
784
792
  var _g = globalThis;
785
793
  function signal(initial, options) {
@@ -813,7 +821,7 @@ function signal(initial, options) {
813
821
  state2.__v++;
814
822
  if (DEV) {
815
823
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
816
- if (hook) hook.emit("signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
824
+ if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
817
825
  }
818
826
  if (!enqueueBatchedSignal(state2)) {
819
827
  notifySubscribers2(state2);
@@ -827,7 +835,7 @@ function signal(initial, options) {
827
835
  state2.value = newValue;
828
836
  state2.__v++;
829
837
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
830
- if (hook) hook.emit("signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
838
+ if (hook) emitDevtools(hook, "signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
831
839
  if (!enqueueBatchedSignal(state2)) {
832
840
  notifySubscribers2(state2);
833
841
  }
@@ -846,7 +854,7 @@ function signal(initial, options) {
846
854
  }
847
855
  if (DEV) {
848
856
  const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
849
- if (hook) hook.emit("signal:create", { signal: state2, name: debugName, getter: get, initial });
857
+ if (hook) emitDevtools(hook, "signal:create", { signal: state2, name: debugName, getter: get, initial });
850
858
  }
851
859
  return [get, set];
852
860
  }
@@ -1024,12 +1032,17 @@ function effect(effectFn, options) {
1024
1032
  try {
1025
1033
  retrack2(ctx.bodyFn, ctx.subscriber);
1026
1034
  if (ctx.rerunPending) drainReruns(ctx);
1035
+ } catch (err) {
1036
+ ctx.disposed = true;
1037
+ if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
1038
+ cleanup2(ctx.subscriber);
1039
+ throw err;
1027
1040
  } finally {
1028
1041
  ctx.running = false;
1029
1042
  ctx.rerunPending = false;
1030
1043
  }
1031
1044
  const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
1032
- if (hook) hook.emit("effect:create", { effectFn });
1045
+ if (hook) emitDevtools(hook, "effect:create", { effectFn });
1033
1046
  return () => disposeEffect(ctx);
1034
1047
  }
1035
1048
 
package/dist/browser.js CHANGED
@@ -36,14 +36,14 @@ import {
36
36
  visibility,
37
37
  wakeLock,
38
38
  windowSize
39
- } from "./chunk-OXUY2A6L.js";
39
+ } from "./chunk-ZVL7TY4K.js";
40
40
  import "./chunk-H3SRKIYX.js";
41
41
  import "./chunk-52XFPGSN.js";
42
42
  import "./chunk-7ZHH77QA.js";
43
- import "./chunk-XC4MEKGA.js";
43
+ import "./chunk-WEQ3DMVL.js";
44
44
  import "./chunk-7XHATCIH.js";
45
- import "./chunk-D33YTSX5.js";
46
- import "./chunk-5Q4R7HCL.js";
45
+ import "./chunk-FQRUXCEE.js";
46
+ import "./chunk-JWKYU5GV.js";
47
47
  import "./chunk-NYNYSPK7.js";
48
48
  export {
49
49
  __resetSpeechCoordinator,