@tanstack/react-router-devtools 0.0.1-beta.29 → 0.0.1-beta.36

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/react-router-devtools",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.29",
4
+ "version": "0.0.1-beta.36",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router/",
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "sideEffects": false,
38
38
  "peerDependencies": {
39
- "@tanstack/react-router": "0.0.1-beta.29",
39
+ "@tanstack/react-router": "0.0.1-beta.36",
40
40
  "react": ">=16",
41
41
  "react-dom": ">=16"
42
42
  },
package/src/devtools.tsx CHANGED
@@ -449,7 +449,8 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
449
449
  const activeMatch =
450
450
  Object.values(router.matchCache)?.find(
451
451
  (d) => d.match.matchId === activeMatchId,
452
- )?.match ?? router.state.matches?.find((d) => d.routeId === activeRouteId)
452
+ )?.match ??
453
+ router.state.currentMatches?.find((d) => d.routeId === activeRouteId)
453
454
 
454
455
  const matchCacheValues = multiSortBy(
455
456
  Object.keys(router.matchCache)
@@ -598,7 +599,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
598
599
  >
599
600
  Active Matches
600
601
  </div>
601
- {router.state.matches.map((match, i) => {
602
+ {router.state.currentMatches.map((match, i) => {
602
603
  return (
603
604
  <div
604
605
  key={match.routeId || i}
@@ -643,7 +644,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
643
644
  </div>
644
645
  )
645
646
  })}
646
- {router.state.pending?.matches.length ? (
647
+ {router.state.pendingMatches?.length ? (
647
648
  <>
648
649
  <div
649
650
  style={{
@@ -657,7 +658,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
657
658
  >
658
659
  Pending Matches
659
660
  </div>
660
- {router.state.pending?.matches.map((match, i) => {
661
+ {router.state.pendingMatches?.map((match, i) => {
661
662
  return (
662
663
  <div
663
664
  key={match.routeId || i}
@@ -947,12 +948,12 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
947
948
  padding: '.5em',
948
949
  }}
949
950
  >
950
- {Object.keys(last(router.state.matches)?.loaderData || {})
951
+ {Object.keys(last(router.state.currentMatches)?.loaderData || {})
951
952
  .length ? (
952
953
  <Explorer
953
- value={last(router.state.matches)?.loaderData || {}}
954
+ value={last(router.state.currentMatches)?.loaderData || {}}
954
955
  defaultExpanded={Object.keys(
955
- (last(router.state.matches)?.loaderData as {}) || {},
956
+ (last(router.state.currentMatches)?.loaderData as {}) || {},
956
957
  ).reduce((obj: any, next) => {
957
958
  obj[next] = {}
958
959
  return obj
@@ -979,11 +980,12 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
979
980
  padding: '.5em',
980
981
  }}
981
982
  >
982
- {Object.keys(last(router.state.matches)?.search || {}).length ? (
983
+ {Object.keys(last(router.state.currentMatches)?.search || {})
984
+ .length ? (
983
985
  <Explorer
984
- value={last(router.state.matches)?.search || {}}
986
+ value={last(router.state.currentMatches)?.search || {}}
985
987
  defaultExpanded={Object.keys(
986
- (last(router.state.matches)?.search as {}) || {},
988
+ (last(router.state.currentMatches)?.search as {}) || {},
987
989
  ).reduce((obj: any, next) => {
988
990
  obj[next] = {}
989
991
  return obj