@tanstack/react-router-devtools 0.0.1-alpha.1
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/README.md +3 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +49 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/Explorer.js +245 -0
- package/build/cjs/packages/react-router-devtools/src/Explorer.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/Logo.js +73 -0
- package/build/cjs/packages/react-router-devtools/src/Logo.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/devtools.js +654 -0
- package/build/cjs/packages/react-router-devtools/src/devtools.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/index.js +21 -0
- package/build/cjs/packages/react-router-devtools/src/index.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/styledComponents.js +107 -0
- package/build/cjs/packages/react-router-devtools/src/styledComponents.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/theme.js +54 -0
- package/build/cjs/packages/react-router-devtools/src/theme.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/useLocalStorage.js +65 -0
- package/build/cjs/packages/react-router-devtools/src/useLocalStorage.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/useMediaQuery.js +57 -0
- package/build/cjs/packages/react-router-devtools/src/useMediaQuery.js.map +1 -0
- package/build/cjs/packages/react-router-devtools/src/utils.js +117 -0
- package/build/cjs/packages/react-router-devtools/src/utils.js.map +1 -0
- package/build/esm/index.js +2013 -0
- package/build/esm/index.js.map +1 -0
- package/build/stats-html.html +4034 -0
- package/build/stats-react.json +9681 -0
- package/build/types/index.d.ts +76 -0
- package/build/umd/index.development.js +2043 -0
- package/build/umd/index.development.js.map +1 -0
- package/build/umd/index.production.js +12 -0
- package/build/umd/index.production.js.map +1 -0
- package/package.json +49 -0
- package/src/Explorer.tsx +288 -0
- package/src/Logo.tsx +37 -0
- package/src/devtools.tsx +960 -0
- package/src/index.tsx +1 -0
- package/src/styledComponents.ts +106 -0
- package/src/theme.tsx +31 -0
- package/src/useLocalStorage.ts +52 -0
- package/src/useMediaQuery.ts +36 -0
- package/src/utils.ts +151 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-router-devtools
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) TanStack
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
13
|
+
declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
14
|
+
interface DevtoolsOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Set this true if you want the dev tools to default to being open
|
|
17
|
+
*/
|
|
18
|
+
initialIsOpen?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Use this to add props to the panel. For example, you can add className, style (merge and override default style), etc.
|
|
21
|
+
*/
|
|
22
|
+
panelProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
23
|
+
/**
|
|
24
|
+
* Use this to add props to the close button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
|
|
25
|
+
*/
|
|
26
|
+
closeButtonProps?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
27
|
+
/**
|
|
28
|
+
* Use this to add props to the toggle button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
|
|
29
|
+
*/
|
|
30
|
+
toggleButtonProps?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
31
|
+
/**
|
|
32
|
+
* The position of the TanStack Router logo to open and close the devtools panel.
|
|
33
|
+
* Defaults to 'bottom-left'.
|
|
34
|
+
*/
|
|
35
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
36
|
+
/**
|
|
37
|
+
* Use this to render the devtools inside a different type of container element for a11y purposes.
|
|
38
|
+
* Any string which corresponds to a valid intrinsic JSX element is allowed.
|
|
39
|
+
* Defaults to 'footer'.
|
|
40
|
+
*/
|
|
41
|
+
containerElement?: string | any;
|
|
42
|
+
/**
|
|
43
|
+
* A boolean variable indicating if the "lite" version of the library is being used
|
|
44
|
+
*/
|
|
45
|
+
useRouter?: () => unknown;
|
|
46
|
+
}
|
|
47
|
+
interface DevtoolsPanelOptions {
|
|
48
|
+
/**
|
|
49
|
+
* The standard React style object used to style a component with inline styles
|
|
50
|
+
*/
|
|
51
|
+
style?: React.CSSProperties;
|
|
52
|
+
/**
|
|
53
|
+
* The standard React className property used to style a component with classes
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
56
|
+
/**
|
|
57
|
+
* A boolean variable indicating whether the panel is open or closed
|
|
58
|
+
*/
|
|
59
|
+
isOpen?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* A function that toggles the open and close state of the panel
|
|
62
|
+
*/
|
|
63
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Handles the opening and closing the devtools panel
|
|
66
|
+
*/
|
|
67
|
+
handleDragStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
68
|
+
/**
|
|
69
|
+
* A boolean variable indicating if the "lite" version of the library is being used
|
|
70
|
+
*/
|
|
71
|
+
useRouter: () => unknown;
|
|
72
|
+
}
|
|
73
|
+
declare function TanStackRouterDevtools({ initialIsOpen, panelProps, closeButtonProps, toggleButtonProps, position, containerElement: Container, useRouter: useRouterImpl, }: DevtoolsOptions): React.ReactElement | null;
|
|
74
|
+
declare const TanStackRouterDevtoolsPanel: React.ForwardRefExoticComponent<DevtoolsPanelOptions & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
|
|
76
|
+
export { PartialKeys, TanStackRouterDevtools, TanStackRouterDevtoolsPanel };
|