@tanstack/react-router 0.0.1-beta.150 → 0.0.1-beta.151
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/build/cjs/index.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +59 -59
- package/build/types/index.d.ts +4 -4
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +7 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.151",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "tanstack/router",
|
|
7
7
|
"homepage": "https://tanstack.com/router",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tiny-invariant": "^1.3.1",
|
|
44
44
|
"tiny-warning": "^1.0.3",
|
|
45
45
|
"@gisatcz/cross-package-react-context": "^0.2.0",
|
|
46
|
-
"@tanstack/router-core": "0.0.1-beta.
|
|
47
|
-
"@tanstack/react-store": "0.0.1-beta.
|
|
46
|
+
"@tanstack/router-core": "0.0.1-beta.151",
|
|
47
|
+
"@tanstack/react-store": "0.0.1-beta.151"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup --config rollup.config.js"
|
package/src/index.tsx
CHANGED
|
@@ -385,19 +385,18 @@ export function useLinkProps<
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
export interface
|
|
389
|
-
TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/',
|
|
390
|
-
TDefaultTo extends string = '',
|
|
391
|
-
> {
|
|
388
|
+
export interface LinkComponent<TProps extends Record<string, any> = {}> {
|
|
392
389
|
<
|
|
393
|
-
TFrom extends RegisteredRoutesInfo['routePaths'] =
|
|
394
|
-
TTo extends string =
|
|
390
|
+
TFrom extends RegisteredRoutesInfo['routePaths'] = '/',
|
|
391
|
+
TTo extends string = '',
|
|
395
392
|
>(
|
|
396
|
-
props: MakeLinkOptions<TFrom, TTo> &
|
|
393
|
+
props: MakeLinkOptions<TFrom, TTo> &
|
|
394
|
+
TProps &
|
|
395
|
+
React.RefAttributes<HTMLAnchorElement>,
|
|
397
396
|
): ReactNode
|
|
398
397
|
}
|
|
399
398
|
|
|
400
|
-
export const Link:
|
|
399
|
+
export const Link: LinkComponent = React.forwardRef((props: any, ref) => {
|
|
401
400
|
const linkProps = useLinkProps(props)
|
|
402
401
|
|
|
403
402
|
return (
|