@real-router/preact 0.18.31 → 0.18.32

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.
@@ -350,9 +350,11 @@ interface UseRouteEnterOptions {
350
350
  * ```tsx
351
351
  * useRouteEnter(({ route }) => {
352
352
  * // route.transition: TransitionMeta — populated by core for every state
353
- * if (route.transition.redirected) {
354
- * showToast(`Redirected from ${route.transition.from}`);
355
- * }
353
+ * // ⚠ NOT `transition.redirected` — the router never sets it (it only ever
354
+ * // carries what a caller passed as `{ redirected: true }`), so branching on
355
+ * // it here is silently dead for a `forwardTo` or a guard redirect.
356
+ * // `from` needs no check: this hook does not fire without one.
357
+ * showToast(`Arrived from ${route.transition.from}`);
356
358
  * if (route.transition.segments.activated.includes("products")) {
357
359
  * // products subtree just became active (could be products or
358
360
  * // products.detail). Useful for subtree-scoped side effects.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/components/RouteView/types.ts","../../src/components/RouteView/components.tsx","../../src/components/RouteView/RouteView.tsx","../../src/types.ts","../../src/components/Link.tsx","../../src/components/RouterErrorBoundary.tsx","../../src/hooks/useRouter.tsx","../../src/hooks/useNavigator.tsx","../../src/hooks/useRouteUtils.tsx","../../src/hooks/useRoute.tsx","../../src/hooks/useRouteNode.tsx","../../src/hooks/useRouterTransition.tsx","../../src/hooks/useRouteExit.tsx","../../src/hooks/useRouteEnter.tsx","../../../../shared/dom-utils/route-announcer.ts","../../../../shared/dom-utils/scroll-restore.ts","../../../../shared/dom-utils/scroll-spy.ts","../../src/RouterProvider.tsx","../../src/context.ts"],"mappings":";;;;;UAEiB;WACN;WACA,UAAU;;UAGJ;WACN;WACA;WACA,WAAW;WACX,UAAU;;UAGJ;;WAEN,WAAW;;WAEX,UAAU;;UAGJ;WACN,UAAU;;;;iBCpBL,MAAM,QAAQ;kBAAd;MAAA;;iBAMA,KAAK,QAAQ;kBAAb;MAAA;;iBAMA,SAAS,QAAQ;k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;;;iBAoFc,cACd,SAAS,mBACT,UAAU;;;UCnGK;EACf;EACA,uBAAuB,OAAO;;;;KCqBpB;UAEK;EACf,OAAO;EACP;EACA,yBAAyB;;;;;;;;;;;;;EAazB,WAAW;;;;;;;;EAQX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UChBe;;;;;;EAMf;;;;;;EAOA;;;;;;;;;;EAWA,yBAAyB;;;;UC7CV;EACf,QAAQ;EACR,UAAU;EACV,+BAA+B;EAC/B,oBAAoB;EACpB,YAAY;EACZ;;cAGW,gBAAgB,kBAAkB;;;cCvBlC,cAAY,QAAA;cAEZ,eAAa,QAAA;cAEb,kBAAgB,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/components/RouteView/types.ts","../../src/components/RouteView/components.tsx","../../src/components/RouteView/RouteView.tsx","../../src/types.ts","../../src/components/Link.tsx","../../src/components/RouterErrorBoundary.tsx","../../src/hooks/useRouter.tsx","../../src/hooks/useNavigator.tsx","../../src/hooks/useRouteUtils.tsx","../../src/hooks/useRoute.tsx","../../src/hooks/useRouteNode.tsx","../../src/hooks/useRouterTransition.tsx","../../src/hooks/useRouteExit.tsx","../../src/hooks/useRouteEnter.tsx","../../../../shared/dom-utils/route-announcer.ts","../../../../shared/dom-utils/scroll-restore.ts","../../../../shared/dom-utils/scroll-spy.ts","../../src/RouterProvider.tsx","../../src/context.ts"],"mappings":";;;;;UAEiB;WACN;WACA,UAAU;;UAGJ;WACN;WACA;WACA,WAAW;WACX,UAAU;;UAGJ;;WAEN,WAAW;;WAEX,UAAU;;UAGJ;WACN,UAAU;;;;iBCpBL,MAAM,QAAQ;kBAAd;MAAA;;iBAMA,KAAK,QAAQ;kBAAb;MAAA;;iBAMA,SAAS,QAAQ;kBAAjB;MAAA;;;;iBCLP,gBACP,UACA,YACC,SAAS,kBAAkB;kBAHrB;MAAA;;cAoCI,kBAAS;;;;;;;UCnCL,WAAW,UAAU,SAAS;EAC7C,OAAO,MA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