@tanstack/react-router 1.56.4 → 1.57.6
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/dist/cjs/router.cjs +5 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +1 -1
- package/dist/esm/router.d.ts +1 -1
- package/dist/esm/router.js +5 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +4 -4
- package/src/router.ts +11 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.6",
|
|
4
4
|
"description": "Modern and scalable routing for React applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@tanstack/react-store": "^0.5.5",
|
|
53
53
|
"tiny-invariant": "^1.3.3",
|
|
54
54
|
"tiny-warning": "^1.0.3",
|
|
55
|
-
"@tanstack/history": "1.
|
|
55
|
+
"@tanstack/history": "1.57.6"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@testing-library/jest-dom": "^6.4.8",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": ">=18",
|
|
68
68
|
"react-dom": ">=18",
|
|
69
|
-
"@tanstack/router-generator": "1.
|
|
69
|
+
"@tanstack/router-generator": "1.57.6"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
72
|
-
"@tanstack/react-
|
|
72
|
+
"@tanstack/react-generator": {
|
|
73
73
|
"optional": true
|
|
74
74
|
}
|
|
75
75
|
},
|
package/src/router.ts
CHANGED
|
@@ -138,6 +138,7 @@ export type InferRouterContext<TRouteTree extends AnyRoute> =
|
|
|
138
138
|
any,
|
|
139
139
|
any,
|
|
140
140
|
any,
|
|
141
|
+
any,
|
|
141
142
|
any
|
|
142
143
|
>
|
|
143
144
|
? TRouterContext
|
|
@@ -1815,12 +1816,16 @@ export class Router<
|
|
|
1815
1816
|
// Reset the view transition flag
|
|
1816
1817
|
delete this.shouldViewTransition
|
|
1817
1818
|
// Attempt to start a view transition (or just apply the changes if we can't)
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1819
|
+
if (
|
|
1820
|
+
shouldViewTransition &&
|
|
1821
|
+
typeof document !== 'undefined' &&
|
|
1822
|
+
'startViewTransition' in document &&
|
|
1823
|
+
typeof document.startViewTransition === 'function'
|
|
1824
|
+
) {
|
|
1825
|
+
document.startViewTransition(fn)
|
|
1826
|
+
} else {
|
|
1827
|
+
fn()
|
|
1828
|
+
}
|
|
1824
1829
|
}
|
|
1825
1830
|
|
|
1826
1831
|
updateMatch = (
|