sibujs 4.13.1 → 4.14.1

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 (107) hide show
  1. package/README.md +1 -1
  2. package/dist/browser.cjs +15 -2
  3. package/dist/browser.js +9 -7
  4. package/dist/build.cjs +880 -281
  5. package/dist/build.d.cts +68 -3
  6. package/dist/build.d.ts +68 -3
  7. package/dist/build.js +88 -30
  8. package/dist/cdn.dev.global.js +12 -12
  9. package/dist/cdn.full.dev.global.js +13 -13
  10. package/dist/cdn.full.global.js +12 -12
  11. package/dist/cdn.global.js +12 -12
  12. package/dist/{chunk-J6FW5TV6.js → chunk-3HEX6QJQ.js} +5 -3
  13. package/dist/chunk-3HZOSMPX.js +90 -0
  14. package/dist/{chunk-K4LNUT5L.js → chunk-3T7TWMSD.js} +8 -6
  15. package/dist/{chunk-ADZHPN2B.js → chunk-4XCWNGRY.js} +3 -3
  16. package/dist/{chunk-2NC56RGY.js → chunk-55TAOW5M.js} +2 -2
  17. package/dist/{chunk-G3Z2FEBR.js → chunk-B2NLNZ3E.js} +119 -26
  18. package/dist/{chunk-EXXSN3BW.js → chunk-B3HOT4TK.js} +1 -1
  19. package/dist/{chunk-QKFVMIAV.js → chunk-FCWOMATN.js} +11 -3
  20. package/dist/{chunk-QC3NP47A.js → chunk-FFXZ6ELZ.js} +10 -6
  21. package/dist/{chunk-TUCPL2HB.js → chunk-GIJ33UJZ.js} +1 -1
  22. package/dist/chunk-KTJC7QPA.js +195 -0
  23. package/dist/chunk-L2IPKGUJ.js +2596 -0
  24. package/dist/{chunk-4UTGDVSA.js → chunk-LAHX7XFG.js} +7 -14
  25. package/dist/{chunk-PBJYCE2Z.js → chunk-LJ2LR5P4.js} +5 -5
  26. package/dist/{chunk-AM6DZLBM.js → chunk-LJMX4SQ7.js} +2 -2
  27. package/dist/{chunk-5RIBLY2N.js → chunk-LUZXFMKH.js} +6 -6
  28. package/dist/{chunk-VFPLWUT7.js → chunk-LZKKMDQF.js} +151 -86
  29. package/dist/{chunk-J4X7ICH4.js → chunk-NIHGSXOX.js} +8 -6
  30. package/dist/chunk-NT3ZYB5S.js +167 -0
  31. package/dist/{chunk-2O6JJCUR.js → chunk-OLMZF4RU.js} +49 -8
  32. package/dist/{chunk-22OPSWMF.js → chunk-OPRQW4LI.js} +2 -2
  33. package/dist/chunk-R5U7XKVJ.js +16 -0
  34. package/dist/{chunk-KC62VURU.js → chunk-RBRITLFL.js} +10 -8
  35. package/dist/{chunk-F2UWOZ6J.js → chunk-RVWJGWCL.js} +2 -2
  36. package/dist/{chunk-NYNYSPK7.js → chunk-S37PZD6I.js} +30 -45
  37. package/dist/chunk-TOV4PN3P.js +2015 -0
  38. package/dist/{chunk-C73VBPEF.js → chunk-TS6JDK7Y.js} +8 -8
  39. package/dist/{chunk-EU7T7EB3.js → chunk-TZNR6E6D.js} +4 -4
  40. package/dist/chunk-UYTYNCMZ.js +199 -0
  41. package/dist/{chunk-OIKD7YDY.js → chunk-VIAVYBNQ.js} +6 -5
  42. package/dist/{chunk-QZ47OZ25.js → chunk-WFMMSMA5.js} +8 -6
  43. package/dist/chunk-YIXMS546.js +1901 -0
  44. package/dist/{chunk-5XUGJM3J.js → chunk-YPLQQTWS.js} +1 -1
  45. package/dist/{chunk-CPQKWCJ2.js → chunk-ZKI4SDZ2.js} +16 -10
  46. package/dist/{chunk-YFTBCCVH.js → chunk-ZYK4NZZA.js} +5 -3
  47. package/dist/data.cjs +265 -35
  48. package/dist/data.d.cts +31 -1
  49. package/dist/data.d.ts +31 -1
  50. package/dist/data.js +16 -10
  51. package/dist/devtools.cjs +15 -2
  52. package/dist/devtools.js +9 -7
  53. package/dist/{dispose-GEIG2KOF.js → dispose-EIHHHDC7.js} +3 -1
  54. package/dist/ecosystem.cjs +62 -23
  55. package/dist/ecosystem.js +14 -12
  56. package/dist/extras.cjs +3562 -270
  57. package/dist/extras.d.cts +3 -3
  58. package/dist/extras.d.ts +3 -3
  59. package/dist/extras.js +39 -29
  60. package/dist/index.cjs +442 -253
  61. package/dist/index.d.cts +93 -283
  62. package/dist/index.d.ts +93 -283
  63. package/dist/index.js +26 -16
  64. package/dist/motion.cjs +12 -1
  65. package/dist/motion.js +6 -4
  66. package/dist/patterns.cjs +15 -2
  67. package/dist/patterns.js +10 -8
  68. package/dist/performance.cjs +36 -2
  69. package/dist/performance.d.cts +2 -2
  70. package/dist/performance.d.ts +2 -2
  71. package/dist/performance.js +14 -10
  72. package/dist/plugins.cjs +5267 -1807
  73. package/dist/plugins.d.cts +8 -834
  74. package/dist/plugins.d.ts +8 -834
  75. package/dist/plugins.js +64 -2329
  76. package/dist/prerenderServer-MXJEVWA3.js +350 -0
  77. package/dist/renderRoute-DP20XwMS.d.cts +86 -0
  78. package/dist/renderRoute-fxgsm2Ir.d.ts +86 -0
  79. package/dist/routeHead-CE9SV-cH.d.cts +995 -0
  80. package/dist/routeHead-DzVxPviY.d.ts +995 -0
  81. package/dist/{routeMiddleware-B1sp4P7a.d.ts → routeMiddleware-BySbueoE.d.ts} +0 -25
  82. package/dist/{routeMiddleware-CedQTsLK.d.cts → routeMiddleware-CijZD5eW.d.cts} +0 -25
  83. package/dist/{ssr-VBM6J5SJ.js → ssr-HHU3DAD2.js} +15 -6
  84. package/dist/ssr-JpGpHnpC.d.cts +841 -0
  85. package/dist/ssr-JpGpHnpC.d.ts +841 -0
  86. package/dist/ssr-dom.cjs +1904 -0
  87. package/dist/ssr-dom.d.cts +343 -0
  88. package/dist/ssr-dom.d.ts +343 -0
  89. package/dist/ssr-dom.js +19 -0
  90. package/dist/ssr.cjs +7677 -2069
  91. package/dist/ssr.d.cts +63 -5
  92. package/dist/ssr.d.ts +63 -5
  93. package/dist/ssr.js +136 -14
  94. package/dist/testing.cjs +6585 -87
  95. package/dist/testing.d.cts +80 -1
  96. package/dist/testing.d.ts +80 -1
  97. package/dist/testing.js +117 -4
  98. package/dist/ui.cjs +36 -2
  99. package/dist/ui.js +17 -14
  100. package/dist/widgets.cjs +14 -1
  101. package/dist/widgets.js +11 -9
  102. package/package.json +9 -2
  103. package/dist/chunk-2F4PSJ5Z.js +0 -765
  104. package/dist/chunk-7XHATCIH.js +0 -121
  105. package/dist/chunk-B36ADEIR.js +0 -21
  106. package/dist/ssr-Db0Sgdu3.d.cts +0 -245
  107. package/dist/ssr-Db0Sgdu3.d.ts +0 -245
package/README.md CHANGED
@@ -191,7 +191,7 @@ Accessible `Combobox`, `Tabs`, `Accordion`, `Popover`, `Select`, `Tooltip`, `Fil
191
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
- `renderToString` (HTML, SVG and MathML; needs a server DOM such as happy-dom or jsdom), `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.
194
+ `renderToStringAsync` / `renderToDocumentAsync` (one `await` until the page — data, lazy chunks, route loads — has settled), `renderRoute` (a URL through the router, with the HTTP status), a built-in server DOM (`sibujs/ssr/dom`, no happy-dom or jsdom needed), `hydrate` (replace, or opt-in `strategy: "adopt"` that binds to the server nodes), automatic data transfer, out-of-order streaming `Suspense`, component islands, `head` management, `renderToString`, static site generation, route actions/middleware, scroll restoration, service worker & web/wasm workers, and microfrontend helpers. Build-time pre-rendering for static backends is `sibuVitePlugin({ prerender })` in `sibujs/build`.
195
195
 
196
196
  ### `sibujs/performance` — Scheduling & optimization
197
197
  Concurrent rendering (`startTransition`, `scheduleUpdate`), cooperative `scheduler`, `domRecycler`, `compiled` templates, `chunkLoader`, `bundleOptimize`, and `normalize`.
package/dist/browser.cjs CHANGED
@@ -140,10 +140,21 @@ function defaultReport(error, context) {
140
140
  if (typeof console === "undefined") return;
141
141
  console.error(`[SibuJS] Uncaught error during ${describe(context)}: ${error.message}`, error);
142
142
  }
143
+ function requestErrorSink() {
144
+ const shared = globalThis[/* @__PURE__ */ Symbol.for("sibujs.ssr.v1")];
145
+ if (!shared) return void 0;
146
+ const store = shared.als ? shared.als.getStore() : shared.fallbackDepth > 0 ? shared.fallbackStore : void 0;
147
+ return store?.errors;
148
+ }
143
149
  function reportError(error, context) {
144
150
  const err = normalizeError(error);
145
151
  untrackedRun(() => {
146
152
  if (claimedByBoundary(err, context)) return;
153
+ const sink = requestErrorSink();
154
+ if (sink) {
155
+ sink.push({ error: err, context });
156
+ return;
157
+ }
147
158
  const s = state();
148
159
  const handler = s.handler;
149
160
  if (handler && s.handlerDepth === 0) {
@@ -751,7 +762,7 @@ function forEachSubscriber(signal2, visit) {
751
762
  }
752
763
 
753
764
  // src/reactivity/track.ts
754
- var _runtimeVersion = true ? "4.13.1" : "dev";
765
+ var _runtimeVersion = true ? "4.14.1" : "dev";
755
766
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
756
767
  function resolveReactiveApi() {
757
768
  const g = globalThis;
@@ -978,6 +989,8 @@ function detectSSRShared() {
978
989
  }
979
990
  if (mod) detected = new mod.AsyncLocalStorage();
980
991
  }
992
+ const globalAls = globalThis.AsyncLocalStorage;
993
+ if (!detected && typeof globalAls === "function") detected = new globalAls();
981
994
  } catch {
982
995
  detected = null;
983
996
  }
@@ -1066,7 +1079,7 @@ function disposeEffect(ctx) {
1066
1079
  }
1067
1080
  function effect(effectFn, options) {
1068
1081
  devAssert(typeof effectFn === "function", "effect: argument must be a function.");
1069
- if (isSSR()) return () => {
1082
+ if (isSSR() && !options?.server) return () => {
1070
1083
  };
1071
1084
  const ctx = {
1072
1085
  fn: effectFn,
package/dist/browser.js CHANGED
@@ -36,16 +36,18 @@ import {
36
36
  visibility,
37
37
  wakeLock,
38
38
  windowSize
39
- } from "./chunk-EU7T7EB3.js";
39
+ } from "./chunk-TZNR6E6D.js";
40
40
  import "./chunk-52XFPGSN.js";
41
41
  import "./chunk-62BDYGAG.js";
42
42
  import "./chunk-7ZHH77QA.js";
43
- import "./chunk-QC3NP47A.js";
44
- import "./chunk-EXXSN3BW.js";
45
- import "./chunk-7XHATCIH.js";
46
- import "./chunk-QKFVMIAV.js";
47
- import "./chunk-4UTGDVSA.js";
48
- import "./chunk-NYNYSPK7.js";
43
+ import "./chunk-FFXZ6ELZ.js";
44
+ import "./chunk-B3HOT4TK.js";
45
+ import "./chunk-UYTYNCMZ.js";
46
+ import "./chunk-FCWOMATN.js";
47
+ import "./chunk-LAHX7XFG.js";
48
+ import "./chunk-S37PZD6I.js";
49
+ import "./chunk-NT3ZYB5S.js";
50
+ import "./chunk-R5U7XKVJ.js";
49
51
  export {
50
52
  __resetSpeechCoordinator,
51
53
  animationFrame,