@rangojs/router 0.0.0-experimental.cb54cbba → 0.0.0-experimental.f788c642
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.
- package/AGENTS.md +4 -0
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/src/browser/navigation-bridge.ts +6 -2
package/AGENTS.md
CHANGED
|
@@ -3,3 +3,7 @@
|
|
|
3
3
|
A file-system based React Server Components router.
|
|
4
4
|
|
|
5
5
|
Run `/rango` to understand the API. Detailed guides for each feature are in the `skills/` directory (e.g. `node_modules/@rangojs/router/skills/loader`, `skills/caching`, `skills/middleware`, etc.).
|
|
6
|
+
|
|
7
|
+
## Development rules
|
|
8
|
+
|
|
9
|
+
- Always commit generated files (e.g. `*.gen.ts`) alongside the source changes that produced them.
|
package/dist/vite/index.js
CHANGED
|
@@ -1745,7 +1745,7 @@ import { resolve } from "node:path";
|
|
|
1745
1745
|
// package.json
|
|
1746
1746
|
var package_default = {
|
|
1747
1747
|
name: "@rangojs/router",
|
|
1748
|
-
version: "0.0.0-experimental.
|
|
1748
|
+
version: "0.0.0-experimental.f788c642",
|
|
1749
1749
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1750
1750
|
keywords: [
|
|
1751
1751
|
"react",
|
package/package.json
CHANGED
|
@@ -485,8 +485,12 @@ export function createNavigationBridge(
|
|
|
485
485
|
onUpdate(popstateUpdate);
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
// Restore scroll position for back/forward navigation
|
|
489
|
-
|
|
488
|
+
// Restore scroll position for back/forward navigation.
|
|
489
|
+
// Defer to rAF so React has committed the cached content to the DOM
|
|
490
|
+
// before we measure scrollHeight and restore the scroll position.
|
|
491
|
+
requestAnimationFrame(() => {
|
|
492
|
+
handleNavigationEnd({ restore: true, isStreaming });
|
|
493
|
+
});
|
|
490
494
|
|
|
491
495
|
// SWR: If stale, trigger background revalidation
|
|
492
496
|
if (isStale) {
|