@tanstack/router-devtools 0.0.1-beta.133 → 0.0.1-beta.135

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/router-devtools",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.133",
4
+ "version": "0.0.1-beta.135",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router/",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@babel/runtime": "^7.16.7",
44
44
  "date-fns": "^2.29.1",
45
- "@tanstack/router": "0.0.1-beta.133"
45
+ "@tanstack/router": "0.0.1-beta.135"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "rollup --config rollup.config.js"
package/src/devtools.tsx CHANGED
@@ -507,7 +507,6 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
507
507
 
508
508
  const routerContextValue = React.useContext(routerContext)
509
509
  const router = userRouter ?? routerContextValue
510
- const routerState = useRouterState()
511
510
 
512
511
  invariant(
513
512
  router,
@@ -527,13 +526,13 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
527
526
  )
528
527
 
529
528
  const allMatches: RouteMatch[] = React.useMemo(
530
- () => [...Object.values(routerState.matches)],
531
- [routerState.matches],
529
+ () => [...Object.values(router.state.matches)],
530
+ [router.state.matches],
532
531
  )
533
532
 
534
533
  const activeMatch = allMatches?.find((d) => d.routeId === activeRouteId)
535
534
 
536
- const hasSearch = Object.keys(routerState.location.search || {}).length
535
+ const hasSearch = Object.keys(router.state.location.search || {}).length
537
536
 
538
537
  return (
539
538
  <ThemeProvider theme={theme}>
@@ -726,7 +725,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
726
725
  />
727
726
  ) : (
728
727
  <div>
729
- {routerState.matches.map((match, i) => {
728
+ {router.state.matches.map((match, i) => {
730
729
  return (
731
730
  <div
732
731
  key={match.routeId || i}
@@ -908,9 +907,9 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
908
907
  }}
909
908
  >
910
909
  <Explorer
911
- value={routerState.location.search || {}}
910
+ value={router.state.location.search || {}}
912
911
  defaultExpanded={Object.keys(
913
- (routerState.location.search as {}) || {},
912
+ (router.state.location.search as {}) || {},
914
913
  ).reduce((obj: any, next) => {
915
914
  obj[next] = {}
916
915
  return obj