@tanstack/router-devtools 0.0.1-beta.139 → 0.0.1-beta.141
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 +14 -7
- package/build/cjs/devtools.js.map +1 -1
- package/build/esm/index.js +14 -7
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +118 -118
- package/build/umd/index.development.js +14 -7
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +13 -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.141",
|
|
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.141"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "rollup --config rollup.config.js"
|
package/src/devtools.tsx
CHANGED
|
@@ -422,7 +422,7 @@ function RouteComp({
|
|
|
422
422
|
activeRouteId: string | undefined
|
|
423
423
|
setActiveRouteId: (id: string) => void
|
|
424
424
|
}) {
|
|
425
|
-
const
|
|
425
|
+
const match = matches.find((d) => d.routeId === route.id)
|
|
426
426
|
|
|
427
427
|
return (
|
|
428
428
|
<div>
|
|
@@ -430,13 +430,13 @@ function RouteComp({
|
|
|
430
430
|
role="button"
|
|
431
431
|
aria-label={`Open match details for ${route.id}`}
|
|
432
432
|
onClick={() => {
|
|
433
|
-
if (
|
|
433
|
+
if (match)
|
|
434
434
|
setActiveRouteId(activeRouteId === route.id ? '' : route.id)
|
|
435
435
|
}}
|
|
436
436
|
style={{
|
|
437
437
|
display: 'flex',
|
|
438
438
|
borderBottom: `solid 1px ${theme.grayAlt}`,
|
|
439
|
-
cursor:
|
|
439
|
+
cursor: match ? 'pointer' : 'default',
|
|
440
440
|
alignItems: 'center',
|
|
441
441
|
background:
|
|
442
442
|
route.id === activeRouteId ? 'rgba(255,255,255,.1)' : undefined,
|
|
@@ -455,17 +455,23 @@ function RouteComp({
|
|
|
455
455
|
borderRadius: '100%',
|
|
456
456
|
transition: 'all .2s ease-out',
|
|
457
457
|
background: getRouteStatusColor(matches, route, theme),
|
|
458
|
-
opacity:
|
|
458
|
+
opacity: match ? 1 : 0.3,
|
|
459
459
|
}}
|
|
460
460
|
/>
|
|
461
461
|
)}
|
|
462
462
|
<Code
|
|
463
463
|
style={{
|
|
464
|
-
|
|
464
|
+
flex: '1 0 auto',
|
|
465
|
+
display: 'flex',
|
|
466
|
+
justifyContent: 'space-between',
|
|
467
|
+
padding: '.25rem .5rem .25rem 0',
|
|
465
468
|
paddingLeft: isRoot ? '.5rem' : 0,
|
|
466
|
-
opacity:
|
|
469
|
+
opacity: match ? 1 : 0.7,
|
|
467
470
|
}}
|
|
468
|
-
>
|
|
471
|
+
>
|
|
472
|
+
<span>{route.path || trimPath(route.id)} </span>
|
|
473
|
+
{match ? <span style={{ opacity: 0.3 }}>{match.id}</span> : null}
|
|
474
|
+
</Code>
|
|
469
475
|
</div>
|
|
470
476
|
{(route.children as Route[])?.length ? (
|
|
471
477
|
<div
|