@tanstack/router-devtools 0.0.1-beta.134 → 0.0.1-beta.136
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/devtools.js +5 -6
- package/build/cjs/devtools.js.map +1 -1
- package/build/esm/index.js +6 -7
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +120 -120
- package/build/umd/index.development.js +5 -33
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +5 -6
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +6 -7
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.
|
|
4
|
+
"version": "0.0.1-beta.136",
|
|
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.
|
|
45
|
+
"@tanstack/router": "0.0.1-beta.136"
|
|
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(
|
|
531
|
-
[
|
|
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(
|
|
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
|
-
{
|
|
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={
|
|
910
|
+
value={router.state.location.search || {}}
|
|
912
911
|
defaultExpanded={Object.keys(
|
|
913
|
-
(
|
|
912
|
+
(router.state.location.search as {}) || {},
|
|
914
913
|
).reduce((obj: any, next) => {
|
|
915
914
|
obj[next] = {}
|
|
916
915
|
return obj
|