@tanstack/router-devtools 0.0.1-beta.111 → 0.0.1-beta.113
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 +4 -2
- package/build/cjs/devtools.js.map +1 -1
- package/build/esm/index.js +5 -3
- 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 +13 -2
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +15 -10
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.113",
|
|
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.113"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "rollup --config rollup.config.js"
|
package/src/devtools.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AnyRoute,
|
|
10
10
|
AnyRootRoute,
|
|
11
11
|
RouteMatch,
|
|
12
|
+
trimPath,
|
|
12
13
|
} from '@tanstack/router'
|
|
13
14
|
|
|
14
15
|
import useLocalStorage from './useLocalStorage'
|
|
@@ -463,7 +464,7 @@ function RouteComp({
|
|
|
463
464
|
paddingLeft: isRoot ? '.5rem' : 0,
|
|
464
465
|
opacity: isActive ? 1 : 0.7,
|
|
465
466
|
}}
|
|
466
|
-
>{`${route.id}`}</Code>
|
|
467
|
+
>{`${route.path || trimPath(route.id)}`}</Code>
|
|
467
468
|
</div>
|
|
468
469
|
{(route.children as Route[])?.length ? (
|
|
469
470
|
<div
|
|
@@ -472,15 +473,19 @@ function RouteComp({
|
|
|
472
473
|
borderLeft: isRoot ? '' : `solid 1px ${theme.grayAlt}`,
|
|
473
474
|
}}
|
|
474
475
|
>
|
|
475
|
-
{(route.children as Route[])
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
476
|
+
{[...(route.children as Route[])]
|
|
477
|
+
.sort((a, b) => {
|
|
478
|
+
return a.rank - b.rank
|
|
479
|
+
})
|
|
480
|
+
.map((r) => (
|
|
481
|
+
<RouteComp
|
|
482
|
+
key={r.id}
|
|
483
|
+
route={r}
|
|
484
|
+
matches={matches}
|
|
485
|
+
activeRouteId={activeRouteId}
|
|
486
|
+
setActiveRouteId={setActiveRouteId}
|
|
487
|
+
/>
|
|
488
|
+
))}
|
|
484
489
|
</div>
|
|
485
490
|
) : null}
|
|
486
491
|
</div>
|