@tanstack/router-devtools 0.0.1-beta.175 → 0.0.1-beta.177

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.175",
4
+ "version": "0.0.1-beta.177",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router/",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7.16.7",
43
43
  "date-fns": "^2.29.1",
44
- "@tanstack/react-router": "0.0.1-beta.175"
44
+ "@tanstack/react-router": "0.0.1-beta.177"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "rollup --config rollup.config.js"
package/src/devtools.tsx CHANGED
@@ -461,7 +461,7 @@ function RouteComp({
461
461
  fontWeight: 'bold',
462
462
  borderRadius: '100%',
463
463
  transition: 'all .2s ease-out',
464
- background: getRouteStatusColor(matches, route, theme, router),
464
+ background: getRouteStatusColor(matches, route, theme),
465
465
  opacity: match ? 1 : 0.3,
466
466
  }}
467
467
  />
@@ -798,7 +798,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
798
798
  width: '1.3rem',
799
799
  height: '1.3rem',
800
800
  marginLeft: '.25rem',
801
- background: getStatusColor(match, theme, router),
801
+ background: getStatusColor(match, theme),
802
802
  alignItems: 'center',
803
803
  justifyContent: 'center',
804
804
  fontWeight: 'bold',
@@ -871,7 +871,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
871
871
  width: '1.3rem',
872
872
  height: '1.3rem',
873
873
  marginLeft: '.25rem',
874
- background: getStatusColor(match, theme, router),
874
+ background: getStatusColor(match, theme),
875
875
  alignItems: 'center',
876
876
  justifyContent: 'center',
877
877
  fontWeight: 'bold',
package/src/utils.ts CHANGED
@@ -31,11 +31,7 @@ type StyledComponent<T> = T extends 'button'
31
31
  ? React.HTMLAttributes<HTMLElementTagNameMap[T]>
32
32
  : never
33
33
 
34
- export function getStatusColor(
35
- match: AnyRouteMatch,
36
- theme: Theme,
37
- router: AnyRouter,
38
- ) {
34
+ export function getStatusColor(match: AnyRouteMatch, theme: Theme) {
39
35
  return match.status === 'pending' || match.isFetching
40
36
  ? theme.active
41
37
  : isMatchInvalid(match)
@@ -51,11 +47,10 @@ export function getRouteStatusColor(
51
47
  matches: AnyRouteMatch[],
52
48
  route: AnyRoute | AnyRootRoute,
53
49
  theme: Theme,
54
- router: AnyRouter,
55
50
  ) {
56
51
  const found = matches.find((d) => d.routeId === route.id)
57
52
  if (!found) return theme.gray
58
- return getStatusColor(found, theme, router)
53
+ return getStatusColor(found, theme)
59
54
  }
60
55
 
61
56
  type Styles =