@tanstack/react-router-devtools 0.0.1-alpha.5 → 0.0.1-alpha.6
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/build/cjs/packages/react-router-devtools/src/devtools.js +6 -7
- package/build/cjs/packages/react-router-devtools/src/devtools.js.map +1 -1
- package/build/esm/index.js +7 -8
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +2675 -2675
- package/build/types/index.d.ts +4 -3
- package/build/umd/index.development.js +6 -7
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +8 -10
package/build/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
|
+
import { Router } from '@tanstack/react-router';
|
|
12
13
|
|
|
13
14
|
declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
14
15
|
interface DevtoolsOptions {
|
|
@@ -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
|
-
|
|
46
|
+
router: Router<any, any>;
|
|
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
|
-
|
|
72
|
+
router: Router<any, any>;
|
|
72
73
|
}
|
|
73
|
-
declare function TanStackRouterDevtools({ initialIsOpen, panelProps, closeButtonProps, toggleButtonProps, position, containerElement: Container,
|
|
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 };
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
const _excluded = ["style"],
|
|
1408
1408
|
_excluded2 = ["style", "onClick"],
|
|
1409
1409
|
_excluded3 = ["style", "onClick"],
|
|
1410
|
-
_excluded4 = ["isOpen", "setIsOpen", "handleDragStart", "
|
|
1410
|
+
_excluded4 = ["isOpen", "setIsOpen", "handleDragStart", "router"],
|
|
1411
1411
|
_excluded5 = ["listeners", "buildLocation", "mount", "update", "buildNext", "navigate", "cancelMatches", "loadLocation", "cleanPreloadCache", "loadRoute", "matchRoutes", "loadMatches", "invalidateRoute", "resolvePath", "matchRoute", "buildLink", "__experimental__createSnapshot", "destroy"],
|
|
1412
1412
|
_excluded6 = ["cancel", "load", "router", "Link", "MatchRoute", "buildLink", "linkProps", "matchRoute", "navigate"];
|
|
1413
1413
|
const isServer = typeof window === 'undefined';
|
|
@@ -1419,7 +1419,7 @@
|
|
|
1419
1419
|
toggleButtonProps = {},
|
|
1420
1420
|
position = 'bottom-left',
|
|
1421
1421
|
containerElement: Container = 'footer',
|
|
1422
|
-
|
|
1422
|
+
router
|
|
1423
1423
|
} = _ref;
|
|
1424
1424
|
const rootRef = React__default["default"].useRef(null);
|
|
1425
1425
|
const panelRef = React__default["default"].useRef(null);
|
|
@@ -1555,7 +1555,7 @@
|
|
|
1555
1555
|
}, /*#__PURE__*/React__default["default"].createElement(TanStackRouterDevtoolsPanel, _extends({
|
|
1556
1556
|
ref: panelRef
|
|
1557
1557
|
}, otherPanelProps, {
|
|
1558
|
-
|
|
1558
|
+
router: router,
|
|
1559
1559
|
style: _extends({
|
|
1560
1560
|
position: 'fixed',
|
|
1561
1561
|
bottom: '0',
|
|
@@ -1650,11 +1650,10 @@
|
|
|
1650
1650
|
const {
|
|
1651
1651
|
isOpen = true,
|
|
1652
1652
|
handleDragStart,
|
|
1653
|
-
|
|
1653
|
+
router
|
|
1654
1654
|
} = props,
|
|
1655
1655
|
panelProps = _objectWithoutPropertiesLoose(props, _excluded4);
|
|
1656
1656
|
|
|
1657
|
-
const router = useRouter();
|
|
1658
1657
|
const routerExplorerValue = React__default["default"].useMemo(() => {
|
|
1659
1658
|
const rest = _objectWithoutPropertiesLoose(router, _excluded5);
|
|
1660
1659
|
|
|
@@ -1948,7 +1947,7 @@
|
|
|
1948
1947
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1949
1948
|
type: "button",
|
|
1950
1949
|
onClick: () => {
|
|
1951
|
-
|
|
1950
|
+
activeMatch.invalidate();
|
|
1952
1951
|
router.notify();
|
|
1953
1952
|
},
|
|
1954
1953
|
style: {
|
|
@@ -1957,7 +1956,7 @@
|
|
|
1957
1956
|
}
|
|
1958
1957
|
}, "Invalidate"), ' ', /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1959
1958
|
type: "button",
|
|
1960
|
-
onClick: () =>
|
|
1959
|
+
onClick: () => activeMatch.load(),
|
|
1961
1960
|
style: {
|
|
1962
1961
|
background: defaultTheme.gray
|
|
1963
1962
|
}
|