sibujs 4.14.1 → 4.15.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 (91) hide show
  1. package/dist/browser.cjs +297 -45
  2. package/dist/browser.js +6 -7
  3. package/dist/build.cjs +2189 -573
  4. package/dist/build.js +16 -15
  5. package/dist/cdn.dev.global.js +13 -12
  6. package/dist/cdn.full.dev.global.js +14 -13
  7. package/dist/cdn.full.global.js +12 -12
  8. package/dist/cdn.global.js +12 -12
  9. package/dist/{chunk-4XCWNGRY.js → chunk-2VKTFA7C.js} +1 -1
  10. package/dist/{chunk-YPLQQTWS.js → chunk-4AEFGRYW.js} +1 -1
  11. package/dist/{chunk-VIAVYBNQ.js → chunk-6IV5ZRG6.js} +5 -7
  12. package/dist/{chunk-KTJC7QPA.js → chunk-75EAQH3U.js} +2 -2
  13. package/dist/{chunk-LJ2LR5P4.js → chunk-7JO7DPSS.js} +4 -4
  14. package/dist/{chunk-B2NLNZ3E.js → chunk-AQH7WDSE.js} +6 -8
  15. package/dist/{chunk-S37PZD6I.js → chunk-BF3WBJJQ.js} +60 -10
  16. package/dist/{chunk-LJMX4SQ7.js → chunk-BG4BP44S.js} +3 -3
  17. package/dist/{chunk-ZYK4NZZA.js → chunk-D44TAGCT.js} +2 -2
  18. package/dist/{chunk-OPRQW4LI.js → chunk-DAEXQJQA.js} +1 -1
  19. package/dist/chunk-DNCQDFJJ.js +22 -0
  20. package/dist/{chunk-WFMMSMA5.js → chunk-DNCT2UXB.js} +4 -4
  21. package/dist/{chunk-TOV4PN3P.js → chunk-DRWOD7RZ.js} +4 -4
  22. package/dist/chunk-DS5V2PRE.js +64 -0
  23. package/dist/{chunk-L2IPKGUJ.js → chunk-EHSJESRN.js} +595 -123
  24. package/dist/{chunk-LAHX7XFG.js → chunk-GFM5WWPU.js} +252 -5
  25. package/dist/{chunk-52XFPGSN.js → chunk-HTPOIAAL.js} +1 -1
  26. package/dist/{chunk-3HEX6QJQ.js → chunk-I2R5QALY.js} +2 -4
  27. package/dist/{chunk-FCWOMATN.js → chunk-IUBV5WO5.js} +1 -1
  28. package/dist/{chunk-TZNR6E6D.js → chunk-KIDETDMU.js} +5 -7
  29. package/dist/{chunk-TS6JDK7Y.js → chunk-KPAXG5IR.js} +7 -9
  30. package/dist/{chunk-FFXZ6ELZ.js → chunk-LGUXYHTZ.js} +3 -3
  31. package/dist/{chunk-NIHGSXOX.js → chunk-LQWLPQOK.js} +6 -8
  32. package/dist/{chunk-YIXMS546.js → chunk-MINLMJUY.js} +5 -8
  33. package/dist/{chunk-OLMZF4RU.js → chunk-OURTGOJT.js} +8 -10
  34. package/dist/{chunk-55TAOW5M.js → chunk-TQ24Y3IV.js} +2 -2
  35. package/dist/{chunk-LUZXFMKH.js → chunk-UM3M5PXS.js} +8 -8
  36. package/dist/{chunk-ZKI4SDZ2.js → chunk-VSTX3XSX.js} +205 -15
  37. package/dist/{chunk-3T7TWMSD.js → chunk-XPDZ2LDR.js} +2 -2
  38. package/dist/{chunk-RBRITLFL.js → chunk-Y7JM7GY2.js} +5 -7
  39. package/dist/{chunk-LZKKMDQF.js → chunk-YAFITBOK.js} +1269 -162
  40. package/dist/data.cjs +285 -33
  41. package/dist/data.js +6 -7
  42. package/dist/devtools.cjs +289 -39
  43. package/dist/devtools.js +5 -6
  44. package/dist/{dispose-EIHHHDC7.js → dispose-3WDBYJMH.js} +3 -1
  45. package/dist/ecosystem.cjs +345 -61
  46. package/dist/ecosystem.d.cts +1 -1
  47. package/dist/ecosystem.d.ts +1 -1
  48. package/dist/ecosystem.js +10 -10
  49. package/dist/extras.cjs +525 -247
  50. package/dist/extras.d.cts +1 -1
  51. package/dist/extras.d.ts +1 -1
  52. package/dist/extras.js +27 -27
  53. package/dist/index.cjs +2134 -515
  54. package/dist/index.d.cts +628 -211
  55. package/dist/index.d.ts +628 -211
  56. package/dist/index.js +22 -15
  57. package/dist/motion.cjs +286 -30
  58. package/dist/motion.js +4 -4
  59. package/dist/patterns.cjs +301 -43
  60. package/dist/patterns.js +6 -6
  61. package/dist/performance.cjs +286 -36
  62. package/dist/performance.js +9 -9
  63. package/dist/plugins.cjs +1194 -290
  64. package/dist/plugins.d.cts +3 -1
  65. package/dist/plugins.d.ts +3 -1
  66. package/dist/plugins.js +20 -19
  67. package/dist/{renderRoute-fxgsm2Ir.d.ts → renderRoute-B84MONaO.d.cts} +2 -2
  68. package/dist/{renderRoute-DP20XwMS.d.cts → renderRoute-_yxPuEQY.d.ts} +2 -2
  69. package/dist/{routeHead-CE9SV-cH.d.cts → routeHead-DLxlq15W.d.cts} +94 -0
  70. package/dist/{routeHead-DzVxPviY.d.ts → routeHead-w8nANZ3M.d.ts} +94 -0
  71. package/dist/{ssr-HHU3DAD2.js → ssr-EF3IUHTE.js} +6 -6
  72. package/dist/ssr-dom.cjs +21 -8
  73. package/dist/ssr-dom.js +2 -1
  74. package/dist/ssr.cjs +807 -169
  75. package/dist/ssr.d.cts +5 -3
  76. package/dist/ssr.d.ts +5 -3
  77. package/dist/ssr.js +16 -15
  78. package/dist/{tagFactory-DkytnJws.d.cts → tagFactory-BfEh69VF.d.cts} +7 -0
  79. package/dist/{tagFactory-Bnd_Nph9.d.ts → tagFactory-pSYiLYyh.d.ts} +7 -0
  80. package/dist/testing.cjs +774 -131
  81. package/dist/testing.d.cts +4 -2
  82. package/dist/testing.d.ts +4 -2
  83. package/dist/testing.js +18 -17
  84. package/dist/track-core-0edROAF5.d.ts +187 -0
  85. package/dist/track-core-DN5fYLWi.d.cts +187 -0
  86. package/dist/ui.cjs +293 -43
  87. package/dist/ui.js +10 -12
  88. package/dist/widgets.cjs +285 -27
  89. package/dist/widgets.js +7 -7
  90. package/package.json +1 -1
  91. package/dist/chunk-7ZHH77QA.js +0 -9
@@ -1,9 +1,11 @@
1
1
  export { L as LazyModule, M as Migration, a as MigrationStorageError, P as PackageExportTarget, S as SemVer, V as VERSION, b as bundlerMetadata, c as checkCompatibility, d as compareSemVer, e as createBootSequence, f as createBundle, g as createMigrationRunner, h as createModuleRegistry, i as createSSRCache, j as createTestHarness, k as deferNonCritical, l as env, m as healthCheck, n as lazyModule, p as packageInfo, o as parseSemVer, q as preloadCritical, r as prerenderRoutes, s as satisfies } from './startup-BLfSeL15.cjs';
2
2
  import { A as Accessor } from './signal-EotCj4hS.cjs';
3
3
  export { P as PluginContext, a as PluginInstallCancelledError, b as PluginRegistry, S as SibuPlugin, c as createPlugin, d as createPluginRegistry, i as inject, e as isPluginInstallCancelledError, p as plugin, r as resetPlugins, s as setDefaultPluginRegistry, t as triggerPluginError, f as triggerPluginMount, g as triggerPluginUnmount } from './plugin-DVgSnTfK.cjs';
4
- export { A as AsyncComponent, b as AsyncRoute, C as Component, c as ComponentRoute, G as Guard, d as GuardResult, J as JsonLd, K as KeepAliveRoute, L as LazyComponent, e as LazyRoute, N as NavigationFailure, f as NavigationFailureReason, g as NavigationGuard, h as NavigationNext, i as NavigationQuery, j as NavigationResult, k as NavigationTarget, O as Outlet, P as Params, Q as QueryValues, l as RedirectRoute, m as ResolvedHeadTag, n as ResolvedRouteHead, o as Route, p as RouteBase, q as RouteContext, a as RouteDef, r as RouteHead, s as RouteHeadAlternate, t as RouteHeadOpenGraph, u as RouteHeadTwitter, v as RouteHeadValue, w as RouteMeta, x as RouteTransitionOptions, y as RouterHeadOptions, z as RouterLink, R as RouterOptions, B as RouterPlugin, S as ScrollBehavior, D as ScrollPosition, E as SibuRouter, F as Suspense, _ as __getNavigationEpoch, H as __removeRouterPagehideHandler, I as addRoute, M as afterEach, T as back, U as beforeEach, V as beforeResolve, W as buildURL, X as createMemoryRouter, Y as createRouter, Z as destroyRouter, $ as forward, a0 as getRouteInfo, a1 as getRouteTransition, a2 as go, a3 as hasRoute, a4 as jsonLdScript, a5 as lazy, a6 as navigate, a7 as preloadRoute, a8 as push, a9 as removeRoute, aa as replace, ab as resolveRouteHead, ac as route, ad as routeHeadToHTML, ae as router, af as routerPlugin, ag as routerReady, ah as routerState, ai as serializeJsonLd, aj as setRouteTransition, ak as setRoutes } from './routeHead-CE9SV-cH.cjs';
4
+ export { A as AsyncComponent, b as AsyncRoute, C as Component, c as ComponentRoute, G as Guard, d as GuardResult, J as JsonLd, K as KeepAliveRoute, L as LazyComponent, e as LazyRoute, N as NavigationFailure, f as NavigationFailureReason, g as NavigationGuard, h as NavigationNext, i as NavigationQuery, j as NavigationResult, k as NavigationTarget, O as Outlet, P as Params, Q as QueryValues, l as RedirectRoute, m as ResolvedHeadTag, n as ResolvedRouteHead, o as Route, p as RouteBase, q as RouteContext, a as RouteDef, r as RouteHead, s as RouteHeadAlternate, t as RouteHeadOpenGraph, u as RouteHeadTwitter, v as RouteHeadValue, w as RouteMeta, x as RouteTransitionOptions, y as RouterHeadOptions, z as RouterLink, R as RouterOptions, B as RouterPlugin, S as ScrollBehavior, D as ScrollPosition, E as SibuRouter, F as Suspense, _ as __getNavigationEpoch, H as __removeRouterPagehideHandler, I as addRoute, M as afterEach, T as back, U as beforeEach, V as beforeResolve, W as buildURL, X as createMemoryRouter, Y as createRouter, Z as destroyRouter, $ as forward, a0 as getRouteInfo, a1 as getRouteTransition, a2 as go, a3 as hasRoute, a4 as jsonLdScript, a5 as lazy, a6 as navigate, a7 as preloadRoute, a8 as push, a9 as removeRoute, aa as replace, ab as resolveRouteHead, ac as route, ad as routeHeadToHTML, ae as router, af as routerPlugin, ag as routerReady, ah as routerState, ai as serializeJsonLd, aj as setRouteTransition, ak as setRoutes } from './routeHead-DLxlq15W.cjs';
5
5
  import { T as TrustedHTML } from './ssr-JpGpHnpC.cjs';
6
6
  import './types-CJFViL6Q.cjs';
7
+ import './track-core-DN5fYLWi.cjs';
8
+ import './signal-BnWpq6WB.cjs';
7
9
 
8
10
  type Translations = Record<string, string>;
9
11
  /**
package/dist/plugins.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  export { L as LazyModule, M as Migration, a as MigrationStorageError, P as PackageExportTarget, S as SemVer, V as VERSION, b as bundlerMetadata, c as checkCompatibility, d as compareSemVer, e as createBootSequence, f as createBundle, g as createMigrationRunner, h as createModuleRegistry, i as createSSRCache, j as createTestHarness, k as deferNonCritical, l as env, m as healthCheck, n as lazyModule, p as packageInfo, o as parseSemVer, q as preloadCritical, r as prerenderRoutes, s as satisfies } from './startup-BLfSeL15.js';
2
2
  import { A as Accessor } from './signal-EotCj4hS.js';
3
3
  export { P as PluginContext, a as PluginInstallCancelledError, b as PluginRegistry, S as SibuPlugin, c as createPlugin, d as createPluginRegistry, i as inject, e as isPluginInstallCancelledError, p as plugin, r as resetPlugins, s as setDefaultPluginRegistry, t as triggerPluginError, f as triggerPluginMount, g as triggerPluginUnmount } from './plugin-DVgSnTfK.js';
4
- export { A as AsyncComponent, b as AsyncRoute, C as Component, c as ComponentRoute, G as Guard, d as GuardResult, J as JsonLd, K as KeepAliveRoute, L as LazyComponent, e as LazyRoute, N as NavigationFailure, f as NavigationFailureReason, g as NavigationGuard, h as NavigationNext, i as NavigationQuery, j as NavigationResult, k as NavigationTarget, O as Outlet, P as Params, Q as QueryValues, l as RedirectRoute, m as ResolvedHeadTag, n as ResolvedRouteHead, o as Route, p as RouteBase, q as RouteContext, a as RouteDef, r as RouteHead, s as RouteHeadAlternate, t as RouteHeadOpenGraph, u as RouteHeadTwitter, v as RouteHeadValue, w as RouteMeta, x as RouteTransitionOptions, y as RouterHeadOptions, z as RouterLink, R as RouterOptions, B as RouterPlugin, S as ScrollBehavior, D as ScrollPosition, E as SibuRouter, F as Suspense, _ as __getNavigationEpoch, H as __removeRouterPagehideHandler, I as addRoute, M as afterEach, T as back, U as beforeEach, V as beforeResolve, W as buildURL, X as createMemoryRouter, Y as createRouter, Z as destroyRouter, $ as forward, a0 as getRouteInfo, a1 as getRouteTransition, a2 as go, a3 as hasRoute, a4 as jsonLdScript, a5 as lazy, a6 as navigate, a7 as preloadRoute, a8 as push, a9 as removeRoute, aa as replace, ab as resolveRouteHead, ac as route, ad as routeHeadToHTML, ae as router, af as routerPlugin, ag as routerReady, ah as routerState, ai as serializeJsonLd, aj as setRouteTransition, ak as setRoutes } from './routeHead-DzVxPviY.js';
4
+ export { A as AsyncComponent, b as AsyncRoute, C as Component, c as ComponentRoute, G as Guard, d as GuardResult, J as JsonLd, K as KeepAliveRoute, L as LazyComponent, e as LazyRoute, N as NavigationFailure, f as NavigationFailureReason, g as NavigationGuard, h as NavigationNext, i as NavigationQuery, j as NavigationResult, k as NavigationTarget, O as Outlet, P as Params, Q as QueryValues, l as RedirectRoute, m as ResolvedHeadTag, n as ResolvedRouteHead, o as Route, p as RouteBase, q as RouteContext, a as RouteDef, r as RouteHead, s as RouteHeadAlternate, t as RouteHeadOpenGraph, u as RouteHeadTwitter, v as RouteHeadValue, w as RouteMeta, x as RouteTransitionOptions, y as RouterHeadOptions, z as RouterLink, R as RouterOptions, B as RouterPlugin, S as ScrollBehavior, D as ScrollPosition, E as SibuRouter, F as Suspense, _ as __getNavigationEpoch, H as __removeRouterPagehideHandler, I as addRoute, M as afterEach, T as back, U as beforeEach, V as beforeResolve, W as buildURL, X as createMemoryRouter, Y as createRouter, Z as destroyRouter, $ as forward, a0 as getRouteInfo, a1 as getRouteTransition, a2 as go, a3 as hasRoute, a4 as jsonLdScript, a5 as lazy, a6 as navigate, a7 as preloadRoute, a8 as push, a9 as removeRoute, aa as replace, ab as resolveRouteHead, ac as route, ad as routeHeadToHTML, ae as router, af as routerPlugin, ag as routerReady, ah as routerState, ai as serializeJsonLd, aj as setRouteTransition, ak as setRoutes } from './routeHead-w8nANZ3M.js';
5
5
  import { T as TrustedHTML } from './ssr-JpGpHnpC.js';
6
6
  import './types-CJFViL6Q.js';
7
+ import './track-core-0edROAF5.js';
8
+ import './signal-BnWpq6WB.js';
7
9
 
8
10
  type Translations = Record<string, string>;
9
11
  /**
package/dist/plugins.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  serializeJsonLd,
39
39
  setRouteTransition,
40
40
  setRoutes
41
- } from "./chunk-L2IPKGUJ.js";
41
+ } from "./chunk-EHSJESRN.js";
42
42
  import {
43
43
  MigrationStorageError,
44
44
  VERSION,
@@ -60,8 +60,8 @@ import {
60
60
  preloadCritical,
61
61
  prerenderRoutes,
62
62
  satisfies
63
- } from "./chunk-VIAVYBNQ.js";
64
- import "./chunk-52XFPGSN.js";
63
+ } from "./chunk-6IV5ZRG6.js";
64
+ import "./chunk-HTPOIAAL.js";
65
65
  import {
66
66
  PluginInstallCancelledError,
67
67
  createPlugin,
@@ -74,29 +74,28 @@ import {
74
74
  triggerPluginError,
75
75
  triggerPluginMount,
76
76
  triggerPluginUnmount
77
- } from "./chunk-3HEX6QJQ.js";
77
+ } from "./chunk-I2R5QALY.js";
78
+ import "./chunk-DS5V2PRE.js";
78
79
  import {
79
80
  span
80
- } from "./chunk-YPLQQTWS.js";
81
+ } from "./chunk-4AEFGRYW.js";
81
82
  import {
82
83
  escapeScriptJson,
83
84
  renderToString,
84
85
  serializeHeadEntry
85
- } from "./chunk-TOV4PN3P.js";
86
- import "./chunk-YIXMS546.js";
87
- import "./chunk-LJMX4SQ7.js";
86
+ } from "./chunk-DRWOD7RZ.js";
87
+ import "./chunk-MINLMJUY.js";
88
+ import "./chunk-BG4BP44S.js";
88
89
  import "./chunk-3HZOSMPX.js";
89
90
  import {
90
91
  isUnsafeKey,
91
92
  readOwnGlobal
92
93
  } from "./chunk-62BDYGAG.js";
93
- import "./chunk-ZKI4SDZ2.js";
94
- import "./chunk-3T7TWMSD.js";
94
+ import "./chunk-VSTX3XSX.js";
95
+ import "./chunk-DNCQDFJJ.js";
96
+ import "./chunk-XPDZ2LDR.js";
95
97
  import "./chunk-RVWJGWCL.js";
96
- import {
97
- globalSingleton
98
- } from "./chunk-7ZHH77QA.js";
99
- import "./chunk-FFXZ6ELZ.js";
98
+ import "./chunk-LGUXYHTZ.js";
100
99
  import {
101
100
  sanitizeUrl
102
101
  } from "./chunk-B3HOT4TK.js";
@@ -106,9 +105,11 @@ import {
106
105
  import "./chunk-5HZXGZ6T.js";
107
106
  import {
108
107
  signal
109
- } from "./chunk-FCWOMATN.js";
110
- import "./chunk-LAHX7XFG.js";
111
- import "./chunk-S37PZD6I.js";
108
+ } from "./chunk-IUBV5WO5.js";
109
+ import "./chunk-GFM5WWPU.js";
110
+ import {
111
+ globalSingleton
112
+ } from "./chunk-BF3WBJJQ.js";
112
113
  import "./chunk-NT3ZYB5S.js";
113
114
  import "./chunk-R5U7XKVJ.js";
114
115
 
@@ -430,8 +431,8 @@ function hydrateRouter(routes, options) {
430
431
  const liveUrl = `${window.location.pathname}${window.location.search}${window.location.hash}`;
431
432
  const resolved = resolveServerRoute(liveUrl, routes);
432
433
  const bootstrapEpoch = __getNavigationEpoch();
433
- import("./ssr-HHU3DAD2.js").then(async ({ hydrate }) => {
434
- const { replaceChildrenSafely } = await import("./dispose-EIHHHDC7.js");
434
+ import("./ssr-EF3IUHTE.js").then(async ({ hydrate }) => {
435
+ const { replaceChildrenSafely } = await import("./dispose-3WDBYJMH.js");
435
436
  if (__getNavigationEpoch() !== bootstrapEpoch) return;
436
437
  if (resolved.component) {
437
438
  hydrate(resolved.component, container);
@@ -1,5 +1,5 @@
1
- import { R as RouterOptions, a as RouteDef } from './routeHead-DzVxPviY.js';
2
- import { A as AsyncRenderOptions, D as DocumentOptions, R as RenderResult } from './ssr-JpGpHnpC.js';
1
+ import { R as RouterOptions, a as RouteDef } from './routeHead-DLxlq15W.cjs';
2
+ import { A as AsyncRenderOptions, D as DocumentOptions, R as RenderResult } from './ssr-JpGpHnpC.cjs';
3
3
 
4
4
  /** How a route is treated by server renders (see `RouteBase.render`); `"default"` when no record declares one. */
5
5
  type RouteRenderMode = "ssr" | "prerender" | "client" | "default";
@@ -1,5 +1,5 @@
1
- import { R as RouterOptions, a as RouteDef } from './routeHead-CE9SV-cH.cjs';
2
- import { A as AsyncRenderOptions, D as DocumentOptions, R as RenderResult } from './ssr-JpGpHnpC.cjs';
1
+ import { R as RouterOptions, a as RouteDef } from './routeHead-w8nANZ3M.js';
2
+ import { A as AsyncRenderOptions, D as DocumentOptions, R as RenderResult } from './ssr-JpGpHnpC.js';
3
3
 
4
4
  /** How a route is treated by server renders (see `RouteBase.render`); `"default"` when no record declares one. */
5
5
  type RouteRenderMode = "ssr" | "prerender" | "client" | "default";
@@ -1,4 +1,5 @@
1
1
  import { C as Component$1, N as NodeChildren } from './types-CJFViL6Q.cjs';
2
+ import { H as HeldCheck, S as StructuralBinding } from './track-core-DN5fYLWi.cjs';
2
3
 
3
4
  /**
4
5
  * Creation scopes for adopting hydration (see docs/architecture/hydration-adopt.md).
@@ -363,12 +364,24 @@ declare class SibuRouter {
363
364
  private handleLocationChange;
364
365
  private getCurrentPath;
365
366
  private createRouteContext;
367
+ /**
368
+ * Once no navigation is in flight: if the route is still the placeholder
369
+ * the router started with — every navigation that could have replaced it
370
+ * was cancelled by a guard, failed, or was a duplicate — that IS the
371
+ * outcome, and the outlets that rendered nothing for it settle (see
372
+ * `settleEmpty`). Checked when a navigation has definitively completed,
373
+ * never from `isReady` (set before the guards run). A navigation still
374
+ * pending — a newer one, or a guard that never resolves — keeps them
375
+ * pending; an outlet's enter is bounded by its own deadline then.
376
+ */
377
+ private settleBootstrap;
366
378
  navigate(to: NavigationTarget, options?: {
367
379
  replace?: boolean;
368
380
  state?: unknown;
369
381
  skipHistory?: boolean;
370
382
  initialResolution?: boolean;
371
383
  }): Promise<NavigationResult>;
384
+ private attemptNavigation;
372
385
  private static readonly MAX_REDIRECT_DEPTH;
373
386
  private performNavigation;
374
387
  private updateHead;
@@ -403,6 +416,13 @@ declare class SibuRouter {
403
416
  /**
404
417
  * Create exactly one real instance from an already-resolved plan. With a
405
418
  * `scope`, the factory runs in it (see `RouteScope`).
419
+ *
420
+ * When the scope belongs to an outlet whose branch is paused (playing a
421
+ * leave it may still be taken back from), a lazy module that resolves does
422
+ * not run its factory yet: the promise stays pending and continues once the
423
+ * branch resumes. If the branch ends, or the outlet's pass was superseded
424
+ * meanwhile, it rejects with a `DOMException` named `"AbortError"`. Genuine
425
+ * loader and component failures reject with their own error, as before.
406
426
  */
407
427
  instantiateComponent(plan: RoutePlan, route: RouteDef, routePath: string, scope?: RouteScope): Promise<Element>;
408
428
  /** Resolve a route's module/factory without creating any component instance. */
@@ -480,6 +500,21 @@ declare function setRoutes(routes: RouteDef[]): void;
480
500
  declare class RouteScope {
481
501
  /** Creation scope the instance is built in (adopting hydration); see `adoptScope`. */
482
502
  adopt: AdoptScope | null;
503
+ /**
504
+ * The outlet's pause gate: while the branch holding the outlet is paused (it
505
+ * began a leave and may still be taken back), a lazy module that resolves
506
+ * does not get its factory invoked yet; instantiation waits for the branch
507
+ * to resume, and is cancelled if it ends.
508
+ */
509
+ gate: PauseGate | null;
510
+ /** Whether the outlet pass this instance is for is still the current one. */
511
+ current: (() => boolean) | null;
512
+ /**
513
+ * The instance's structural owner, nested under the outlet's: its factory
514
+ * runs as it, so what it creates is paused with the branch holding the
515
+ * outlet, and ends (`lifecycleScope()` work included) with the instance.
516
+ */
517
+ owner: StructuralBinding | null;
483
518
  private readonly get;
484
519
  private readonly set;
485
520
  private released;
@@ -497,6 +532,28 @@ declare class RouteScope {
497
532
  */
498
533
  release(): void;
499
534
  }
535
+ /**
536
+ * Async work an outlet does on behalf of the branch holding it, gated on that
537
+ * branch's lifecycle (see `captureFrozen`): `until()` resolves `true` once the
538
+ * branch is active, `false` once it ended or the outlet was torn down
539
+ * (`close`). Driven by the runtime's resume / end notifications — no polling.
540
+ */
541
+ interface PauseGate {
542
+ /** The branch is paused or ended: gated work must not run now. */
543
+ held(): boolean;
544
+ until(): Promise<boolean>;
545
+ /** The error an instantiation cancelled by this gate rejects with. */
546
+ cancellation(): DOMException;
547
+ close(): void;
548
+ /** Run `fn` as the branch's structural owner (see `HeldCheck.run`). */
549
+ run<T>(fn: () => T): T;
550
+ /** The branch's lifecycle. */
551
+ frozen: HeldCheck;
552
+ /** Whether `close()` was called. */
553
+ closed(): boolean;
554
+ /** Call `fn` on `close()`, unless the returned function was called first. */
555
+ onClose(fn: () => void): () => void;
556
+ }
500
557
  /**
501
558
  * Read the current route as a plain snapshot.
502
559
  *
@@ -660,6 +717,41 @@ declare function Route(): Node;
660
717
  * | excluded by `include` | never cached; disposed on navigation away |
661
718
  * | outlet disposed | whole cache disposed and cleared |
662
719
  *
720
+ * ## Inactive pages: live by default, suspended on request
721
+ *
722
+ * By default a cached page stays live while it is hidden: its bindings,
723
+ * effects and async work keep running against the current state. With
724
+ * `suspendInactive: true` a page is PAUSED when it is cached and resumed when
725
+ * it is shown again — the same pause a leaving `when()` branch gets:
726
+ *
727
+ * - its DOM, local state, form values and route context are kept as they are
728
+ * (nothing is disposed or rebuilt);
729
+ * - its bindings, effects created while it rendered, and `lifecycleScope()`
730
+ * work do not run; what changed meanwhile is caught up in ONE run when it
731
+ * is shown, against the current state and the route it is shown for;
732
+ * - async work it owns (a `Suspense` result, a nested outlet's page, a core
733
+ * `lazy()` component) is held, not committed, until then;
734
+ * - a page shown inside a branch that is itself paused stays paused until
735
+ * that branch resumes;
736
+ * - eviction and outlet disposal end a suspended page without a catch-up run
737
+ * for what the page owns: its DOM bindings, `lifecycleScope()` work, and
738
+ * effects whose disposal is tied to the page (`scope.effect()`, an effect
739
+ * whose stop is registered on one of its nodes).
740
+ *
741
+ * A plain `effect()` created while the page rendered pauses with it, but
742
+ * nothing disposes it: the page never returned its stop function to anyone.
743
+ * When the page is evicted it is no longer paused, so it runs ONE catch-up
744
+ * against the current state and stays subscribed, re-running on later
745
+ * changes like any unowned effect (as it would have kept doing without
746
+ * `suspendInactive`). Create such work with `scope.effect()`, or register its
747
+ * stop on a node of the page, when eviction must end it.
748
+ *
749
+ * Only the framework's reactive work pauses. Timers, sockets, media and
750
+ * requests keep going unless the page stops them: capture a
751
+ * `lifecycleScope()` while it renders and use `scope.onPause()` /
752
+ * `scope.onResume()` (called in the page's own route context). Pages that
753
+ * are not cached are disposed as before.
754
+ *
663
755
  * ## Cache identity is not async ownership
664
756
  *
665
757
  * The cache key answers *"which cached view is this?"*. It never answers *"may
@@ -686,6 +778,8 @@ declare function Route(): Node;
686
778
  declare function KeepAliveRoute(options?: {
687
779
  max?: number;
688
780
  include?: string[];
781
+ /** Pause a cached page while it is hidden (see above). Default `false`. */
782
+ suspendInactive?: boolean;
689
783
  }): Node;
690
784
  declare function RouterLink(props: {
691
785
  to: NavigationTarget;
@@ -1,4 +1,5 @@
1
1
  import { C as Component$1, N as NodeChildren } from './types-CJFViL6Q.js';
2
+ import { H as HeldCheck, S as StructuralBinding } from './track-core-0edROAF5.js';
2
3
 
3
4
  /**
4
5
  * Creation scopes for adopting hydration (see docs/architecture/hydration-adopt.md).
@@ -363,12 +364,24 @@ declare class SibuRouter {
363
364
  private handleLocationChange;
364
365
  private getCurrentPath;
365
366
  private createRouteContext;
367
+ /**
368
+ * Once no navigation is in flight: if the route is still the placeholder
369
+ * the router started with — every navigation that could have replaced it
370
+ * was cancelled by a guard, failed, or was a duplicate — that IS the
371
+ * outcome, and the outlets that rendered nothing for it settle (see
372
+ * `settleEmpty`). Checked when a navigation has definitively completed,
373
+ * never from `isReady` (set before the guards run). A navigation still
374
+ * pending — a newer one, or a guard that never resolves — keeps them
375
+ * pending; an outlet's enter is bounded by its own deadline then.
376
+ */
377
+ private settleBootstrap;
366
378
  navigate(to: NavigationTarget, options?: {
367
379
  replace?: boolean;
368
380
  state?: unknown;
369
381
  skipHistory?: boolean;
370
382
  initialResolution?: boolean;
371
383
  }): Promise<NavigationResult>;
384
+ private attemptNavigation;
372
385
  private static readonly MAX_REDIRECT_DEPTH;
373
386
  private performNavigation;
374
387
  private updateHead;
@@ -403,6 +416,13 @@ declare class SibuRouter {
403
416
  /**
404
417
  * Create exactly one real instance from an already-resolved plan. With a
405
418
  * `scope`, the factory runs in it (see `RouteScope`).
419
+ *
420
+ * When the scope belongs to an outlet whose branch is paused (playing a
421
+ * leave it may still be taken back from), a lazy module that resolves does
422
+ * not run its factory yet: the promise stays pending and continues once the
423
+ * branch resumes. If the branch ends, or the outlet's pass was superseded
424
+ * meanwhile, it rejects with a `DOMException` named `"AbortError"`. Genuine
425
+ * loader and component failures reject with their own error, as before.
406
426
  */
407
427
  instantiateComponent(plan: RoutePlan, route: RouteDef, routePath: string, scope?: RouteScope): Promise<Element>;
408
428
  /** Resolve a route's module/factory without creating any component instance. */
@@ -480,6 +500,21 @@ declare function setRoutes(routes: RouteDef[]): void;
480
500
  declare class RouteScope {
481
501
  /** Creation scope the instance is built in (adopting hydration); see `adoptScope`. */
482
502
  adopt: AdoptScope | null;
503
+ /**
504
+ * The outlet's pause gate: while the branch holding the outlet is paused (it
505
+ * began a leave and may still be taken back), a lazy module that resolves
506
+ * does not get its factory invoked yet; instantiation waits for the branch
507
+ * to resume, and is cancelled if it ends.
508
+ */
509
+ gate: PauseGate | null;
510
+ /** Whether the outlet pass this instance is for is still the current one. */
511
+ current: (() => boolean) | null;
512
+ /**
513
+ * The instance's structural owner, nested under the outlet's: its factory
514
+ * runs as it, so what it creates is paused with the branch holding the
515
+ * outlet, and ends (`lifecycleScope()` work included) with the instance.
516
+ */
517
+ owner: StructuralBinding | null;
483
518
  private readonly get;
484
519
  private readonly set;
485
520
  private released;
@@ -497,6 +532,28 @@ declare class RouteScope {
497
532
  */
498
533
  release(): void;
499
534
  }
535
+ /**
536
+ * Async work an outlet does on behalf of the branch holding it, gated on that
537
+ * branch's lifecycle (see `captureFrozen`): `until()` resolves `true` once the
538
+ * branch is active, `false` once it ended or the outlet was torn down
539
+ * (`close`). Driven by the runtime's resume / end notifications — no polling.
540
+ */
541
+ interface PauseGate {
542
+ /** The branch is paused or ended: gated work must not run now. */
543
+ held(): boolean;
544
+ until(): Promise<boolean>;
545
+ /** The error an instantiation cancelled by this gate rejects with. */
546
+ cancellation(): DOMException;
547
+ close(): void;
548
+ /** Run `fn` as the branch's structural owner (see `HeldCheck.run`). */
549
+ run<T>(fn: () => T): T;
550
+ /** The branch's lifecycle. */
551
+ frozen: HeldCheck;
552
+ /** Whether `close()` was called. */
553
+ closed(): boolean;
554
+ /** Call `fn` on `close()`, unless the returned function was called first. */
555
+ onClose(fn: () => void): () => void;
556
+ }
500
557
  /**
501
558
  * Read the current route as a plain snapshot.
502
559
  *
@@ -660,6 +717,41 @@ declare function Route(): Node;
660
717
  * | excluded by `include` | never cached; disposed on navigation away |
661
718
  * | outlet disposed | whole cache disposed and cleared |
662
719
  *
720
+ * ## Inactive pages: live by default, suspended on request
721
+ *
722
+ * By default a cached page stays live while it is hidden: its bindings,
723
+ * effects and async work keep running against the current state. With
724
+ * `suspendInactive: true` a page is PAUSED when it is cached and resumed when
725
+ * it is shown again — the same pause a leaving `when()` branch gets:
726
+ *
727
+ * - its DOM, local state, form values and route context are kept as they are
728
+ * (nothing is disposed or rebuilt);
729
+ * - its bindings, effects created while it rendered, and `lifecycleScope()`
730
+ * work do not run; what changed meanwhile is caught up in ONE run when it
731
+ * is shown, against the current state and the route it is shown for;
732
+ * - async work it owns (a `Suspense` result, a nested outlet's page, a core
733
+ * `lazy()` component) is held, not committed, until then;
734
+ * - a page shown inside a branch that is itself paused stays paused until
735
+ * that branch resumes;
736
+ * - eviction and outlet disposal end a suspended page without a catch-up run
737
+ * for what the page owns: its DOM bindings, `lifecycleScope()` work, and
738
+ * effects whose disposal is tied to the page (`scope.effect()`, an effect
739
+ * whose stop is registered on one of its nodes).
740
+ *
741
+ * A plain `effect()` created while the page rendered pauses with it, but
742
+ * nothing disposes it: the page never returned its stop function to anyone.
743
+ * When the page is evicted it is no longer paused, so it runs ONE catch-up
744
+ * against the current state and stays subscribed, re-running on later
745
+ * changes like any unowned effect (as it would have kept doing without
746
+ * `suspendInactive`). Create such work with `scope.effect()`, or register its
747
+ * stop on a node of the page, when eviction must end it.
748
+ *
749
+ * Only the framework's reactive work pauses. Timers, sockets, media and
750
+ * requests keep going unless the page stops them: capture a
751
+ * `lifecycleScope()` while it renders and use `scope.onPause()` /
752
+ * `scope.onResume()` (called in the page's own route context). Pages that
753
+ * are not cached are disposed as before.
754
+ *
663
755
  * ## Cache identity is not async ownership
664
756
  *
665
757
  * The cache key answers *"which cached view is this?"*. It never answers *"may
@@ -686,6 +778,8 @@ declare function Route(): Node;
686
778
  declare function KeepAliveRoute(options?: {
687
779
  max?: number;
688
780
  include?: string[];
781
+ /** Pause a cached page while it is hidden (see above). Default `false`. */
782
+ suspendInactive?: boolean;
689
783
  }): Node;
690
784
  declare function RouterLink(props: {
691
785
  to: NavigationTarget;
@@ -19,17 +19,17 @@ import {
19
19
  ssrSuspense,
20
20
  suspenseSwapScript,
21
21
  trustHTML
22
- } from "./chunk-TOV4PN3P.js";
23
- import "./chunk-YIXMS546.js";
24
- import "./chunk-LJMX4SQ7.js";
22
+ } from "./chunk-DRWOD7RZ.js";
23
+ import "./chunk-MINLMJUY.js";
24
+ import "./chunk-BG4BP44S.js";
25
25
  import "./chunk-3HZOSMPX.js";
26
26
  import "./chunk-62BDYGAG.js";
27
+ import "./chunk-DNCQDFJJ.js";
27
28
  import "./chunk-RVWJGWCL.js";
28
- import "./chunk-7ZHH77QA.js";
29
29
  import "./chunk-B3HOT4TK.js";
30
30
  import "./chunk-UYTYNCMZ.js";
31
- import "./chunk-LAHX7XFG.js";
32
- import "./chunk-S37PZD6I.js";
31
+ import "./chunk-GFM5WWPU.js";
32
+ import "./chunk-BF3WBJJQ.js";
33
33
  import "./chunk-NT3ZYB5S.js";
34
34
  import "./chunk-R5U7XKVJ.js";
35
35
  export {
package/dist/ssr-dom.cjs CHANGED
@@ -77,6 +77,25 @@ function requestSlot(name, create) {
77
77
  return slots.get(name);
78
78
  }
79
79
 
80
+ // src/utils/styleKey.ts
81
+ var EXCEPTIONS = { cssFloat: "float" };
82
+ var VENDOR_PREFIX = /^(webkit|moz|ms|o)-/;
83
+ var cache = /* @__PURE__ */ new Map();
84
+ var CACHE_MAX = 1e3;
85
+ function styleKeyToProperty(key) {
86
+ let name = cache.get(key);
87
+ if (name !== void 0) return name;
88
+ if (key.startsWith("--")) name = key;
89
+ else if (Object.hasOwn(EXCEPTIONS, key)) name = EXCEPTIONS[key];
90
+ else {
91
+ name = key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
92
+ if (VENDOR_PREFIX.test(name)) name = `-${name}`;
93
+ }
94
+ if (cache.size >= CACHE_MAX) cache.clear();
95
+ cache.set(key, name);
96
+ return name;
97
+ }
98
+
80
99
  // src/platform/serverDom.ts
81
100
  var HTML_NS = "http://www.w3.org/1999/xhtml";
82
101
  var SVG_NS = "http://www.w3.org/2000/svg";
@@ -752,12 +771,6 @@ function splitDeclarations(text) {
752
771
  out.push(text.slice(start));
753
772
  return out;
754
773
  }
755
- var CAMEL_EXCEPTIONS = { cssFloat: "float" };
756
- function toKebab(prop) {
757
- if (prop.startsWith("--")) return prop;
758
- if (Object.hasOwn(CAMEL_EXCEPTIONS, prop)) return CAMEL_EXCEPTIONS[prop];
759
- return prop.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`).replace(/^(webkit|moz|ms)-/, "-$1-");
760
- }
761
774
  var ServerStyle = class {
762
775
  constructor(el) {
763
776
  this.el = el;
@@ -852,13 +865,13 @@ function styleProxy(style) {
852
865
  get(target, key, receiver) {
853
866
  if (typeof key === "string" && !(key in target)) {
854
867
  if (/^\d+$/.test(key)) return target.item(Number(key));
855
- return target.getPropertyValue(toKebab(key));
868
+ return target.getPropertyValue(styleKeyToProperty(key));
856
869
  }
857
870
  return Reflect.get(target, key, receiver);
858
871
  },
859
872
  set(target, key, value, receiver) {
860
873
  if (typeof key === "string" && !(key in target)) {
861
- target.setProperty(toKebab(key), value == null ? "" : String(value));
874
+ target.setProperty(styleKeyToProperty(key), value == null ? "" : String(value));
862
875
  return true;
863
876
  }
864
877
  return Reflect.set(target, key, value, receiver);
package/dist/ssr-dom.js CHANGED
@@ -5,7 +5,8 @@ import {
5
5
  createServerDocument,
6
6
  installServerDom,
7
7
  isServerDom
8
- } from "./chunk-YIXMS546.js";
8
+ } from "./chunk-MINLMJUY.js";
9
+ import "./chunk-DNCQDFJJ.js";
9
10
  import "./chunk-UYTYNCMZ.js";
10
11
  import "./chunk-NT3ZYB5S.js";
11
12
  import "./chunk-R5U7XKVJ.js";