@tanstack/router-devtools 0.0.1-beta.107 → 0.0.1-beta.108

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.107",
4
+ "version": "0.0.1-beta.108",
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.107"
45
+ "@tanstack/router": "0.0.1-beta.108"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "rollup --config rollup.config.js"
package/src/devtools.tsx CHANGED
@@ -520,17 +520,14 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
520
520
  )
521
521
 
522
522
  const allMatches: RouteMatch[] = React.useMemo(
523
- () => [
524
- ...Object.values(router.state.currentMatches),
525
- ...Object.values(router.state.pendingMatches ?? []),
526
- ],
527
- [router.state.currentMatches, router.state.pendingMatches],
523
+ () => [...Object.values(router.state.matches)],
524
+ [router.state.matches],
528
525
  )
529
526
 
530
527
  const activeMatch = allMatches?.find((d) => d.route.id === activeRouteId)
531
528
 
532
529
  const hasSearch = Object.keys(
533
- last(router.state.currentMatches)?.state.search || {},
530
+ last(router.state.matches)?.state.search || {},
534
531
  ).length
535
532
 
536
533
  return (
@@ -707,7 +704,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
707
704
  />
708
705
  ) : (
709
706
  <div>
710
- {router.state.currentMatches.map((match, i) => {
707
+ {router.state.matches.map((match, i) => {
711
708
  return (
712
709
  <div
713
710
  key={match.route.id || i}
@@ -754,70 +751,6 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
754
751
  </div>
755
752
  )
756
753
  })}
757
- {router.state.pendingMatches?.length ? (
758
- <>
759
- <div
760
- style={{
761
- marginTop: '2rem',
762
- padding: '.5em',
763
- background: theme.backgroundAlt,
764
- position: 'sticky',
765
- top: 0,
766
- zIndex: 1,
767
- }}
768
- >
769
- Pending Matches
770
- </div>
771
- {router.state.pendingMatches?.map((match, i) => {
772
- return (
773
- <div
774
- key={match.route.id || i}
775
- role="button"
776
- aria-label={`Open match details for ${match.route.id}`}
777
- onClick={() =>
778
- setActiveRouteId(
779
- activeRouteId === match.route.id
780
- ? ''
781
- : match.route.id,
782
- )
783
- }
784
- style={{
785
- display: 'flex',
786
- borderBottom: `solid 1px ${theme.grayAlt}`,
787
- cursor: 'pointer',
788
- background:
789
- match === activeMatch
790
- ? 'rgba(255,255,255,.1)'
791
- : undefined,
792
- }}
793
- >
794
- <div
795
- style={{
796
- flex: '0 0 auto',
797
- width: '1.3rem',
798
- height: '1.3rem',
799
- marginLeft: '.25rem',
800
- background: getStatusColor(match, theme),
801
- alignItems: 'center',
802
- justifyContent: 'center',
803
- fontWeight: 'bold',
804
- borderRadius: '.25rem',
805
- transition: 'all .2s ease-out',
806
- }}
807
- />
808
-
809
- <Code
810
- style={{
811
- padding: '.5em',
812
- }}
813
- >
814
- {`${match.id}`}
815
- </Code>
816
- </div>
817
- )
818
- })}
819
- </>
820
- ) : null}
821
754
  </div>
822
755
  )}
823
756
  </div>
@@ -953,9 +886,9 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
953
886
  }}
954
887
  >
955
888
  <Explorer
956
- value={last(router.state.currentMatches)?.state.search || {}}
889
+ value={last(router.state.matches)?.state.search || {}}
957
890
  defaultExpanded={Object.keys(
958
- (last(router.state.currentMatches)?.state.search as {}) || {},
891
+ (last(router.state.matches)?.state.search as {}) || {},
959
892
  ).reduce((obj: any, next) => {
960
893
  obj[next] = {}
961
894
  return obj