@tanstack/react-router 1.22.6 → 1.22.8
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/awaited.cjs.map +1 -1
- package/dist/cjs/link.cjs +2 -2
- package/dist/cjs/link.cjs.map +1 -1
- package/dist/cjs/link.d.cts +1 -1
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +2 -2
- package/dist/esm/awaited.js.map +1 -1
- package/dist/esm/link.d.ts +1 -1
- package/dist/esm/link.js +2 -2
- package/dist/esm/link.js.map +1 -1
- package/dist/esm/router.d.ts +2 -2
- package/dist/esm/router.js +1 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +5 -5
- package/src/awaited.tsx +1 -1
- package/src/link.tsx +2 -2
- package/src/router.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@tanstack/react-store": "^0.2.1",
|
|
53
53
|
"tiny-invariant": "^1.3.1",
|
|
54
54
|
"tiny-warning": "^1.0.3",
|
|
55
|
-
"@tanstack/history": "1.22.
|
|
55
|
+
"@tanstack/history": "1.22.8"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@vitejs/plugin-react": "^4.2.1",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"zod": "^3.22.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"react": ">=16",
|
|
65
|
-
"react-dom": ">=16"
|
|
64
|
+
"react": ">=16.8",
|
|
65
|
+
"react-dom": ">=16.8"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"clean": "rimraf ./dist && rimraf ./coverage",
|
|
69
69
|
"test:eslint": "eslint --ext .ts,.tsx ./src",
|
|
70
|
-
"test:types": "tsc",
|
|
70
|
+
"test:types": "tsc --noEmit",
|
|
71
71
|
"test:lib": "vitest --typecheck",
|
|
72
72
|
"test:lib:dev": "pnpm run test:lib --watch",
|
|
73
73
|
"test:build": "publint --strict",
|
package/src/awaited.tsx
CHANGED
package/src/link.tsx
CHANGED
|
@@ -625,7 +625,7 @@ export type LinkProps<
|
|
|
625
625
|
| ((state: { isActive: boolean }) => React.ReactNode)
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
type LinkComponent<TComp> = <
|
|
628
|
+
export type LinkComponent<TComp> = <
|
|
629
629
|
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
630
630
|
TFrom extends RoutePaths<TRouteTree> | string = string,
|
|
631
631
|
TTo extends string = '',
|
|
@@ -652,7 +652,7 @@ type LinkComponent<TComp> = <
|
|
|
652
652
|
) => React.ReactElement
|
|
653
653
|
|
|
654
654
|
export function createLink<const TComp>(Comp: TComp): LinkComponent<TComp> {
|
|
655
|
-
return React.forwardRef(function
|
|
655
|
+
return React.forwardRef(function CreatedLink(props, ref) {
|
|
656
656
|
return <Link {...(props as any)} _asChild={Comp} ref={ref} />
|
|
657
657
|
}) as any
|
|
658
658
|
}
|
package/src/router.ts
CHANGED
|
@@ -139,8 +139,8 @@ export interface RouterOptions<
|
|
|
139
139
|
hydrate?: (dehydrated: TDehydrated) => void
|
|
140
140
|
routeMasks?: Array<RouteMask<TRouteTree>>
|
|
141
141
|
unmaskOnReload?: boolean
|
|
142
|
-
Wrap?: (props: { children: any }) => React.
|
|
143
|
-
InnerWrap?: (props: { children: any }) => React.
|
|
142
|
+
Wrap?: (props: { children: any }) => React.JSX.Element
|
|
143
|
+
InnerWrap?: (props: { children: any }) => React.JSX.Element
|
|
144
144
|
/**
|
|
145
145
|
* @deprecated
|
|
146
146
|
* Use `notFoundComponent` instead.
|
|
@@ -1506,6 +1506,7 @@ export class Router<
|
|
|
1506
1506
|
|
|
1507
1507
|
const shouldPending =
|
|
1508
1508
|
!preload &&
|
|
1509
|
+
route.options.loader &&
|
|
1509
1510
|
typeof pendingMs === 'number' &&
|
|
1510
1511
|
(route.options.pendingComponent ??
|
|
1511
1512
|
this.options.defaultPendingComponent)
|