@tanstack/react-router 1.22.7 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.22.7",
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.6"
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
@@ -115,5 +115,5 @@ function AwaitInner<T>(
115
115
  },
116
116
  ) {
117
117
  const awaited = useAwaited(props)
118
- return props.children(...awaited)
118
+ return props.children(...awaited) as React.JSX.Element
119
119
  }
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 Link(props, ref) {
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.ReactNode
143
- InnerWrap?: (props: { children: any }) => React.ReactNode
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.