@tanstack/router-devtools 0.0.1-alpha.1 → 0.0.1-beta.84

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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/build/cjs/{packages/react-router-devtools/src/Explorer.js → Explorer.js} +52 -81
  4. package/build/cjs/Explorer.js.map +1 -0
  5. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -19
  6. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
  7. package/build/cjs/devtools.js +583 -0
  8. package/build/cjs/devtools.js.map +1 -0
  9. package/build/cjs/{packages/react-router-devtools/src/index.js → index.js} +1 -1
  10. package/build/cjs/{packages/react-router-devtools/src/styledComponents.js → styledComponents.js} +10 -38
  11. package/build/cjs/styledComponents.js.map +1 -0
  12. package/build/cjs/{packages/react-router-devtools/src/theme.js → theme.js} +6 -9
  13. package/build/cjs/theme.js.map +1 -0
  14. package/build/cjs/{packages/react-router-devtools/src/useLocalStorage.js → useLocalStorage.js} +3 -10
  15. package/build/cjs/useLocalStorage.js.map +1 -0
  16. package/build/cjs/{packages/react-router-devtools/src/useMediaQuery.js → useMediaQuery.js} +13 -12
  17. package/build/cjs/useMediaQuery.js.map +1 -0
  18. package/build/cjs/{packages/react-router-devtools/src/utils.js → utils.js} +25 -35
  19. package/build/cjs/utils.js.map +1 -0
  20. package/build/esm/index.js +308 -1337
  21. package/build/esm/index.js.map +1 -1
  22. package/build/stats-html.html +59 -49
  23. package/build/stats-react.json +223 -9444
  24. package/build/types/index.d.ts +6 -5
  25. package/build/umd/index.development.js +347 -1316
  26. package/build/umd/index.development.js.map +1 -1
  27. package/build/umd/index.production.js +22 -2
  28. package/build/umd/index.production.js.map +1 -1
  29. package/package.json +9 -11
  30. package/src/Explorer.tsx +14 -12
  31. package/src/devtools.tsx +263 -240
  32. package/src/useLocalStorage.ts +5 -5
  33. package/src/useMediaQuery.ts +3 -0
  34. package/src/utils.ts +35 -17
  35. package/build/cjs/packages/react-router-devtools/src/Explorer.js.map +0 -1
  36. package/build/cjs/packages/react-router-devtools/src/Logo.js +0 -73
  37. package/build/cjs/packages/react-router-devtools/src/Logo.js.map +0 -1
  38. package/build/cjs/packages/react-router-devtools/src/devtools.js +0 -654
  39. package/build/cjs/packages/react-router-devtools/src/devtools.js.map +0 -1
  40. package/build/cjs/packages/react-router-devtools/src/styledComponents.js.map +0 -1
  41. package/build/cjs/packages/react-router-devtools/src/theme.js.map +0 -1
  42. package/build/cjs/packages/react-router-devtools/src/useLocalStorage.js.map +0 -1
  43. package/build/cjs/packages/react-router-devtools/src/useMediaQuery.js.map +0 -1
  44. package/build/cjs/packages/react-router-devtools/src/utils.js.map +0 -1
  45. package/src/Logo.tsx +0 -37
  46. /package/build/cjs/{packages/react-router-devtools/src/index.js.map → index.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router-devtools
2
+ * router-devtools
3
3
  *
4
4
  * Copyright (c) TanStack
5
5
  *
@@ -9,8 +9,9 @@
9
9
  * @license MIT
10
10
  */
11
11
  import React from 'react';
12
+ import { AnyRouter } from '@tanstack/router';
12
13
 
13
- declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
14
+ type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
14
15
  interface DevtoolsOptions {
15
16
  /**
16
17
  * Set this true if you want the dev tools to default to being open
@@ -42,7 +43,7 @@ interface DevtoolsOptions {
42
43
  /**
43
44
  * A boolean variable indicating if the "lite" version of the library is being used
44
45
  */
45
- useRouter?: () => unknown;
46
+ router?: AnyRouter;
46
47
  }
47
48
  interface DevtoolsPanelOptions {
48
49
  /**
@@ -68,9 +69,9 @@ interface DevtoolsPanelOptions {
68
69
  /**
69
70
  * A boolean variable indicating if the "lite" version of the library is being used
70
71
  */
71
- useRouter: () => unknown;
72
+ router?: AnyRouter;
72
73
  }
73
- declare function TanStackRouterDevtools({ initialIsOpen, panelProps, closeButtonProps, toggleButtonProps, position, containerElement: Container, useRouter: useRouterImpl, }: DevtoolsOptions): React.ReactElement | null;
74
+ declare function TanStackRouterDevtools({ initialIsOpen, panelProps, closeButtonProps, toggleButtonProps, position, containerElement: Container, router, }: DevtoolsOptions): React.ReactElement | null;
74
75
  declare const TanStackRouterDevtoolsPanel: React.ForwardRefExoticComponent<DevtoolsPanelOptions & React.RefAttributes<HTMLDivElement>>;
75
76
 
76
77
  export { PartialKeys, TanStackRouterDevtools, TanStackRouterDevtoolsPanel };