@tanstack/router-devtools 0.0.1-beta.223 → 0.0.1-beta.225
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/Explorer.js +5 -6
- package/build/cjs/Explorer.js.map +1 -1
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -3
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/build/cjs/devtools.js +68 -74
- package/build/cjs/devtools.js.map +1 -1
- package/build/cjs/index.js +0 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/styledComponents.js +0 -3
- package/build/cjs/styledComponents.js.map +1 -1
- package/build/cjs/theme.js +3 -9
- package/build/cjs/theme.js.map +1 -1
- package/build/cjs/useLocalStorage.js +4 -8
- package/build/cjs/useLocalStorage.js.map +1 -1
- package/build/cjs/useMediaQuery.js +3 -7
- package/build/cjs/useMediaQuery.js.map +1 -1
- package/build/cjs/utils.js +8 -14
- package/build/cjs/utils.js.map +1 -1
- package/build/esm/index.js +0 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +3494 -2700
- package/build/stats-react.json +149 -132
- package/build/types/Explorer.d.ts +3 -3
- package/build/types/styledComponents.d.ts +3 -3
- package/build/types/theme.d.ts +1 -1
- package/build/umd/index.development.js +113 -90
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -3
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TanStackRouterDevtools = {}, global.React));
|
|
15
15
|
})(this, (function (exports, React) { 'use strict';
|
|
16
16
|
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
function _interopNamespace(e) {
|
|
20
|
-
if (e && e.__esModule) return e;
|
|
17
|
+
function _interopNamespaceDefault(e) {
|
|
21
18
|
var n = Object.create(null);
|
|
22
19
|
if (e) {
|
|
23
20
|
Object.keys(e).forEach(function (k) {
|
|
@@ -30,12 +27,11 @@
|
|
|
30
27
|
}
|
|
31
28
|
});
|
|
32
29
|
}
|
|
33
|
-
n
|
|
30
|
+
n.default = e;
|
|
34
31
|
return Object.freeze(n);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
var React__namespace = /*#__PURE__*/
|
|
38
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
39
35
|
|
|
40
36
|
function _extends() {
|
|
41
37
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -52,18 +48,23 @@
|
|
|
52
48
|
return _extends.apply(this, arguments);
|
|
53
49
|
}
|
|
54
50
|
|
|
51
|
+
var isProduction$1 = "development" === 'production';
|
|
55
52
|
var prefix = 'Invariant failed';
|
|
56
53
|
function invariant(condition, message) {
|
|
57
54
|
if (condition) {
|
|
58
55
|
return;
|
|
59
56
|
}
|
|
57
|
+
if (isProduction$1) {
|
|
58
|
+
throw new Error(prefix);
|
|
59
|
+
}
|
|
60
60
|
var provided = typeof message === 'function' ? message() : message;
|
|
61
61
|
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
62
62
|
throw new Error(value);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
var isProduction = "development" === 'production';
|
|
65
66
|
function warning(condition, message) {
|
|
66
|
-
{
|
|
67
|
+
if (!isProduction) {
|
|
67
68
|
if (condition) {
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
@@ -100,6 +101,31 @@
|
|
|
100
101
|
return trimPathRight(trimPathLeft(path));
|
|
101
102
|
}
|
|
102
103
|
|
|
104
|
+
// export type RouterContext<
|
|
105
|
+
// TRouteTree extends AnyRoute,
|
|
106
|
+
// // TDehydrated extends Record<string, any>,
|
|
107
|
+
// > = {
|
|
108
|
+
// buildLink: BuildLinkFn<TRouteTree>
|
|
109
|
+
// state: RouterState<TRouteTree>
|
|
110
|
+
// navigate: NavigateFn<TRouteTree>
|
|
111
|
+
// matchRoute: MatchRouteFn<TRouteTree>
|
|
112
|
+
// routeTree: TRouteTree
|
|
113
|
+
// routesById: RoutesById<TRouteTree>
|
|
114
|
+
// options: RouterOptions<TRouteTree>
|
|
115
|
+
// history: RouterHistory
|
|
116
|
+
// load: LoadFn
|
|
117
|
+
// buildLocation: BuildLocationFn<TRouteTree>
|
|
118
|
+
// subscribe: Router<TRouteTree>['subscribe']
|
|
119
|
+
// resetNextScrollRef: React.MutableRefObject<boolean>
|
|
120
|
+
// injectedHtmlRef: React.MutableRefObject<InjectedHtmlEntry[]>
|
|
121
|
+
// injectHtml: (entry: InjectedHtmlEntry) => void
|
|
122
|
+
// dehydrateData: <T>(
|
|
123
|
+
// key: any,
|
|
124
|
+
// getData: T | (() => Promise<T> | T),
|
|
125
|
+
// ) => () => void
|
|
126
|
+
// hydrateData: <T>(key: any) => T | undefined
|
|
127
|
+
// }
|
|
128
|
+
|
|
103
129
|
const routerContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
104
130
|
if (typeof document !== 'undefined') {
|
|
105
131
|
window.__TSR_ROUTER_CONTEXT__ = routerContext;
|
|
@@ -123,8 +149,8 @@
|
|
|
123
149
|
}
|
|
124
150
|
};
|
|
125
151
|
function useLocalStorage(key, defaultValue) {
|
|
126
|
-
const [value, setValue] =
|
|
127
|
-
|
|
152
|
+
const [value, setValue] = React.useState();
|
|
153
|
+
React.useEffect(() => {
|
|
128
154
|
const initialValue = getItem(key);
|
|
129
155
|
if (typeof initialValue === 'undefined' || initialValue === null) {
|
|
130
156
|
setValue(typeof defaultValue === 'function' ? defaultValue() : defaultValue);
|
|
@@ -132,7 +158,7 @@
|
|
|
132
158
|
setValue(initialValue);
|
|
133
159
|
}
|
|
134
160
|
}, [defaultValue, key]);
|
|
135
|
-
const setter =
|
|
161
|
+
const setter = React.useCallback(updater => {
|
|
136
162
|
setValue(old => {
|
|
137
163
|
let newVal = updater;
|
|
138
164
|
if (typeof updater == 'function') {
|
|
@@ -160,22 +186,22 @@
|
|
|
160
186
|
active: '#006bff',
|
|
161
187
|
warning: '#ffb200'
|
|
162
188
|
};
|
|
163
|
-
const ThemeContext = /*#__PURE__*/
|
|
189
|
+
const ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
|
|
164
190
|
function ThemeProvider({
|
|
165
191
|
theme,
|
|
166
192
|
...rest
|
|
167
193
|
}) {
|
|
168
|
-
return /*#__PURE__*/
|
|
194
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Provider, _extends({
|
|
169
195
|
value: theme
|
|
170
196
|
}, rest));
|
|
171
197
|
}
|
|
172
198
|
function useTheme() {
|
|
173
|
-
return
|
|
199
|
+
return React.useContext(ThemeContext);
|
|
174
200
|
}
|
|
175
201
|
|
|
176
202
|
function useMediaQuery(query) {
|
|
177
203
|
// Keep track of the preference in state, start with the current match
|
|
178
|
-
const [isMatch, setIsMatch] =
|
|
204
|
+
const [isMatch, setIsMatch] = React.useState(() => {
|
|
179
205
|
if (typeof window !== 'undefined') {
|
|
180
206
|
return window.matchMedia && window.matchMedia(query).matches;
|
|
181
207
|
}
|
|
@@ -183,7 +209,7 @@
|
|
|
183
209
|
});
|
|
184
210
|
|
|
185
211
|
// Watch for changes
|
|
186
|
-
|
|
212
|
+
React.useEffect(() => {
|
|
187
213
|
if (typeof window !== 'undefined') {
|
|
188
214
|
if (!window.matchMedia) {
|
|
189
215
|
return;
|
|
@@ -219,7 +245,7 @@
|
|
|
219
245
|
return getStatusColor(found, theme);
|
|
220
246
|
}
|
|
221
247
|
function styled(type, newStyles, queries = {}) {
|
|
222
|
-
return /*#__PURE__*/
|
|
248
|
+
return /*#__PURE__*/React.forwardRef(({
|
|
223
249
|
style,
|
|
224
250
|
...rest
|
|
225
251
|
}, ref) => {
|
|
@@ -231,7 +257,7 @@
|
|
|
231
257
|
...(typeof value === 'function' ? value(rest, theme) : value)
|
|
232
258
|
} : current;
|
|
233
259
|
}, {});
|
|
234
|
-
return /*#__PURE__*/
|
|
260
|
+
return /*#__PURE__*/React.createElement(type, {
|
|
235
261
|
...rest,
|
|
236
262
|
style: {
|
|
237
263
|
...(typeof newStyles === 'function' ? newStyles(rest, theme) : newStyles),
|
|
@@ -243,9 +269,9 @@
|
|
|
243
269
|
});
|
|
244
270
|
}
|
|
245
271
|
function useIsMounted() {
|
|
246
|
-
const mountedRef =
|
|
247
|
-
const isMounted =
|
|
248
|
-
|
|
272
|
+
const mountedRef = React.useRef(false);
|
|
273
|
+
const isMounted = React.useCallback(() => mountedRef.current, []);
|
|
274
|
+
React[isServer$1 ? 'useEffect' : 'useLayoutEffect'](() => {
|
|
249
275
|
mountedRef.current = true;
|
|
250
276
|
return () => {
|
|
251
277
|
mountedRef.current = false;
|
|
@@ -271,8 +297,8 @@
|
|
|
271
297
|
*/
|
|
272
298
|
function useSafeState(initialState) {
|
|
273
299
|
const isMounted = useIsMounted();
|
|
274
|
-
const [state, setState] =
|
|
275
|
-
const safeSetState =
|
|
300
|
+
const [state, setState] = React.useState(initialState);
|
|
301
|
+
const safeSetState = React.useCallback(value => {
|
|
276
302
|
scheduleMicrotask(() => {
|
|
277
303
|
if (isMounted()) {
|
|
278
304
|
setState(value);
|
|
@@ -307,7 +333,6 @@
|
|
|
307
333
|
// flexDirection: 'column',
|
|
308
334
|
}
|
|
309
335
|
});
|
|
310
|
-
|
|
311
336
|
const ActivePanel = styled('div', () => ({
|
|
312
337
|
flex: '1 1 500px',
|
|
313
338
|
display: 'flex',
|
|
@@ -521,7 +546,7 @@
|
|
|
521
546
|
|
|
522
547
|
const isServer = typeof window === 'undefined';
|
|
523
548
|
function Logo(props) {
|
|
524
|
-
return /*#__PURE__*/
|
|
549
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
525
550
|
style: {
|
|
526
551
|
...(props.style ?? {}),
|
|
527
552
|
display: 'flex',
|
|
@@ -531,11 +556,11 @@
|
|
|
531
556
|
fontWeight: 'bolder',
|
|
532
557
|
lineHeight: '1'
|
|
533
558
|
}
|
|
534
|
-
}), /*#__PURE__*/
|
|
559
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
535
560
|
style: {
|
|
536
561
|
letterSpacing: '-0.05rem'
|
|
537
562
|
}
|
|
538
|
-
}, "TANSTACK"), /*#__PURE__*/
|
|
563
|
+
}, "TANSTACK"), /*#__PURE__*/React.createElement("div", {
|
|
539
564
|
style: {
|
|
540
565
|
backgroundImage: 'linear-gradient(to right, var(--tw-gradient-stops))',
|
|
541
566
|
// @ts-ignore
|
|
@@ -558,8 +583,8 @@
|
|
|
558
583
|
containerElement: Container = 'footer',
|
|
559
584
|
router
|
|
560
585
|
}) {
|
|
561
|
-
const rootRef =
|
|
562
|
-
const panelRef =
|
|
586
|
+
const rootRef = React.useRef(null);
|
|
587
|
+
const panelRef = React.useRef(null);
|
|
563
588
|
const [isOpen, setIsOpen] = useLocalStorage('tanstackRouterDevtoolsOpen', initialIsOpen);
|
|
564
589
|
const [devtoolsHeight, setDevtoolsHeight] = useLocalStorage('tanstackRouterDevtoolsHeight', null);
|
|
565
590
|
const [isResolvedOpen, setIsResolvedOpen] = useSafeState(false);
|
|
@@ -591,13 +616,13 @@
|
|
|
591
616
|
document.addEventListener('mousemove', run);
|
|
592
617
|
document.addEventListener('mouseup', unsub);
|
|
593
618
|
};
|
|
594
|
-
|
|
619
|
+
React.useEffect(() => {
|
|
595
620
|
setIsResolvedOpen(isOpen ?? false);
|
|
596
621
|
}, [isOpen, isResolvedOpen, setIsResolvedOpen]);
|
|
597
622
|
|
|
598
623
|
// Toggle panel visibility before/after transition (depending on direction).
|
|
599
624
|
// Prevents focusing in a closed panel.
|
|
600
|
-
|
|
625
|
+
React.useEffect(() => {
|
|
601
626
|
const ref = panelRef.current;
|
|
602
627
|
if (ref) {
|
|
603
628
|
const handlePanelTransitionStart = () => {
|
|
@@ -619,7 +644,7 @@
|
|
|
619
644
|
}
|
|
620
645
|
return;
|
|
621
646
|
}, [isResolvedOpen]);
|
|
622
|
-
|
|
647
|
+
React[isServer ? 'useEffect' : 'useLayoutEffect'](() => {
|
|
623
648
|
if (isResolvedOpen) {
|
|
624
649
|
const previousValue = rootRef.current?.parentElement?.style.paddingBottom;
|
|
625
650
|
const run = () => {
|
|
@@ -658,12 +683,12 @@
|
|
|
658
683
|
|
|
659
684
|
// Do not render on the server
|
|
660
685
|
if (!isMounted()) return null;
|
|
661
|
-
return /*#__PURE__*/
|
|
686
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
662
687
|
ref: rootRef,
|
|
663
688
|
className: "TanStackRouterDevtools"
|
|
664
|
-
}, /*#__PURE__*/
|
|
689
|
+
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
665
690
|
theme: defaultTheme
|
|
666
|
-
}, /*#__PURE__*/
|
|
691
|
+
}, /*#__PURE__*/React.createElement(TanStackRouterDevtoolsPanel, _extends({
|
|
667
692
|
ref: panelRef
|
|
668
693
|
}, otherPanelProps, {
|
|
669
694
|
router: router,
|
|
@@ -699,7 +724,7 @@
|
|
|
699
724
|
isOpen: isResolvedOpen,
|
|
700
725
|
setIsOpen: setIsOpen,
|
|
701
726
|
handleDragStart: e => handleDragStart(panelRef.current, e)
|
|
702
|
-
})), isResolvedOpen ? /*#__PURE__*/
|
|
727
|
+
})), isResolvedOpen ? /*#__PURE__*/React.createElement(Button, _extends({
|
|
703
728
|
type: "button",
|
|
704
729
|
"aria-label": "Close TanStack Router Devtools"
|
|
705
730
|
}, otherCloseButtonProps, {
|
|
@@ -723,7 +748,7 @@
|
|
|
723
748
|
}),
|
|
724
749
|
...closeButtonStyle
|
|
725
750
|
}
|
|
726
|
-
}), "Close") : null), !isResolvedOpen ? /*#__PURE__*/
|
|
751
|
+
}), "Close") : null), !isResolvedOpen ? /*#__PURE__*/React.createElement("button", _extends({
|
|
727
752
|
type: "button"
|
|
728
753
|
}, otherToggleButtonProps, {
|
|
729
754
|
"aria-label": "Open TanStack Router Devtools",
|
|
@@ -758,7 +783,7 @@
|
|
|
758
783
|
}),
|
|
759
784
|
...toggleButtonStyle
|
|
760
785
|
}
|
|
761
|
-
}), /*#__PURE__*/
|
|
786
|
+
}), /*#__PURE__*/React.createElement(Logo, {
|
|
762
787
|
"aria-hidden": true
|
|
763
788
|
})) : null);
|
|
764
789
|
}
|
|
@@ -771,7 +796,7 @@
|
|
|
771
796
|
const router = useRouter();
|
|
772
797
|
const matches = router.state.status === 'pending' ? router.state.pendingMatches : router.state.matches;
|
|
773
798
|
const match = router.state.matches.find(d => d.routeId === route.id);
|
|
774
|
-
return /*#__PURE__*/
|
|
799
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
775
800
|
role: "button",
|
|
776
801
|
"aria-label": `Open match details for ${route.id}`,
|
|
777
802
|
onClick: () => {
|
|
@@ -786,7 +811,7 @@
|
|
|
786
811
|
alignItems: 'center',
|
|
787
812
|
background: route.id === activeRouteId ? 'rgba(255,255,255,.1)' : undefined
|
|
788
813
|
}
|
|
789
|
-
}, isRoot ? null : /*#__PURE__*/
|
|
814
|
+
}, isRoot ? null : /*#__PURE__*/React.createElement("div", {
|
|
790
815
|
style: {
|
|
791
816
|
flex: '0 0 auto',
|
|
792
817
|
width: '.7rem',
|
|
@@ -800,7 +825,7 @@
|
|
|
800
825
|
background: getRouteStatusColor(matches, route, defaultTheme),
|
|
801
826
|
opacity: match ? 1 : 0.3
|
|
802
827
|
}
|
|
803
|
-
}), /*#__PURE__*/
|
|
828
|
+
}), /*#__PURE__*/React.createElement(Code, {
|
|
804
829
|
style: {
|
|
805
830
|
flex: '1 0 auto',
|
|
806
831
|
display: 'flex',
|
|
@@ -810,25 +835,25 @@
|
|
|
810
835
|
opacity: match ? 1 : 0.7,
|
|
811
836
|
fontSize: '0.7rem'
|
|
812
837
|
}
|
|
813
|
-
}, /*#__PURE__*/
|
|
838
|
+
}, /*#__PURE__*/React.createElement("span", null, route.path || trimPath(route.id), " "), match ? /*#__PURE__*/React.createElement("span", {
|
|
814
839
|
style: {
|
|
815
840
|
opacity: 0.3
|
|
816
841
|
}
|
|
817
|
-
}, match.id) : null)), route.children?.length ? /*#__PURE__*/
|
|
842
|
+
}, match.id) : null)), route.children?.length ? /*#__PURE__*/React.createElement("div", {
|
|
818
843
|
style: {
|
|
819
844
|
marginLeft: isRoot ? 0 : '1rem',
|
|
820
845
|
borderLeft: isRoot ? '' : `solid 1px ${defaultTheme.grayAlt}`
|
|
821
846
|
}
|
|
822
847
|
}, [...route.children].sort((a, b) => {
|
|
823
848
|
return a.rank - b.rank;
|
|
824
|
-
}).map(r => /*#__PURE__*/
|
|
849
|
+
}).map(r => /*#__PURE__*/React.createElement(RouteComp, {
|
|
825
850
|
key: r.id,
|
|
826
851
|
route: r,
|
|
827
852
|
activeRouteId: activeRouteId,
|
|
828
853
|
setActiveRouteId: setActiveRouteId
|
|
829
854
|
}))) : null);
|
|
830
855
|
}
|
|
831
|
-
const TanStackRouterDevtoolsPanel = /*#__PURE__*/
|
|
856
|
+
const TanStackRouterDevtoolsPanel = /*#__PURE__*/React.forwardRef(function TanStackRouterDevtoolsPanel(props, ref) {
|
|
832
857
|
const {
|
|
833
858
|
isOpen = true,
|
|
834
859
|
setIsOpen,
|
|
@@ -844,7 +869,7 @@
|
|
|
844
869
|
|
|
845
870
|
const [showMatches, setShowMatches] = useLocalStorage('tanstackRouterDevtoolsShowMatches', true);
|
|
846
871
|
const [activeRouteId, setActiveRouteId] = useLocalStorage('tanstackRouterDevtoolsActiveRouteId', '');
|
|
847
|
-
const activeMatch =
|
|
872
|
+
const activeMatch = React.useMemo(() => matches.find(d => d.routeId === activeRouteId), [matches, activeRouteId]);
|
|
848
873
|
const hasSearch = Object.keys(router.state.location.search || {}).length;
|
|
849
874
|
|
|
850
875
|
// const preloadMatches = matches.filter((match) => {
|
|
@@ -862,12 +887,12 @@
|
|
|
862
887
|
// return () => clearInterval(interval)
|
|
863
888
|
// }, [router])
|
|
864
889
|
|
|
865
|
-
return /*#__PURE__*/
|
|
890
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
866
891
|
theme: defaultTheme
|
|
867
|
-
}, /*#__PURE__*/
|
|
892
|
+
}, /*#__PURE__*/React.createElement(Panel, _extends({
|
|
868
893
|
ref: ref,
|
|
869
894
|
className: "TanStackRouterDevtoolsPanel"
|
|
870
|
-
}, panelProps), /*#__PURE__*/
|
|
895
|
+
}, panelProps), /*#__PURE__*/React.createElement("style", {
|
|
871
896
|
dangerouslySetInnerHTML: {
|
|
872
897
|
__html: `
|
|
873
898
|
|
|
@@ -913,7 +938,7 @@
|
|
|
913
938
|
|
|
914
939
|
`
|
|
915
940
|
}
|
|
916
|
-
}), /*#__PURE__*/
|
|
941
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
917
942
|
style: {
|
|
918
943
|
position: 'absolute',
|
|
919
944
|
left: 0,
|
|
@@ -925,7 +950,7 @@
|
|
|
925
950
|
zIndex: 100000
|
|
926
951
|
},
|
|
927
952
|
onMouseDown: handleDragStart
|
|
928
|
-
}), /*#__PURE__*/
|
|
953
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
929
954
|
style: {
|
|
930
955
|
flex: '1 1 500px',
|
|
931
956
|
minHeight: '40%',
|
|
@@ -935,7 +960,7 @@
|
|
|
935
960
|
display: 'flex',
|
|
936
961
|
flexDirection: 'column'
|
|
937
962
|
}
|
|
938
|
-
}, /*#__PURE__*/
|
|
963
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
939
964
|
style: {
|
|
940
965
|
display: 'flex',
|
|
941
966
|
justifyContent: 'start',
|
|
@@ -944,27 +969,27 @@
|
|
|
944
969
|
alignItems: 'center',
|
|
945
970
|
background: defaultTheme.backgroundAlt
|
|
946
971
|
}
|
|
947
|
-
}, /*#__PURE__*/
|
|
972
|
+
}, /*#__PURE__*/React.createElement(Logo, {
|
|
948
973
|
"aria-hidden": true
|
|
949
|
-
}), /*#__PURE__*/
|
|
974
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
950
975
|
style: {
|
|
951
976
|
fontSize: 'clamp(.8rem, 2vw, 1.3rem)',
|
|
952
977
|
fontWeight: 'bold'
|
|
953
978
|
}
|
|
954
|
-
}, /*#__PURE__*/
|
|
979
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
955
980
|
style: {
|
|
956
981
|
fontWeight: 100
|
|
957
982
|
}
|
|
958
|
-
}, "Devtools"))), /*#__PURE__*/
|
|
983
|
+
}, "Devtools"))), /*#__PURE__*/React.createElement("div", {
|
|
959
984
|
style: {
|
|
960
985
|
overflowY: 'auto',
|
|
961
986
|
flex: '1'
|
|
962
987
|
}
|
|
963
|
-
}, /*#__PURE__*/
|
|
988
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
964
989
|
style: {
|
|
965
990
|
padding: '.5em'
|
|
966
991
|
}
|
|
967
|
-
}, /*#__PURE__*/
|
|
992
|
+
}, /*#__PURE__*/React.createElement(Explorer, {
|
|
968
993
|
label: "Router",
|
|
969
994
|
value: router,
|
|
970
995
|
defaultExpanded: {
|
|
@@ -974,7 +999,7 @@
|
|
|
974
999
|
filterSubEntries: subEntries => {
|
|
975
1000
|
return subEntries.filter(d => typeof d.value !== 'function');
|
|
976
1001
|
}
|
|
977
|
-
})))), /*#__PURE__*/
|
|
1002
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
978
1003
|
style: {
|
|
979
1004
|
flex: '1 1 500px',
|
|
980
1005
|
minHeight: '40%',
|
|
@@ -984,12 +1009,12 @@
|
|
|
984
1009
|
display: 'flex',
|
|
985
1010
|
flexDirection: 'column'
|
|
986
1011
|
}
|
|
987
|
-
}, /*#__PURE__*/
|
|
1012
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
988
1013
|
style: {
|
|
989
1014
|
flex: '1 1 auto',
|
|
990
1015
|
overflowY: 'auto'
|
|
991
1016
|
}
|
|
992
|
-
}, /*#__PURE__*/
|
|
1017
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
993
1018
|
style: {
|
|
994
1019
|
padding: '.5em',
|
|
995
1020
|
background: defaultTheme.backgroundAlt,
|
|
@@ -1001,30 +1026,30 @@
|
|
|
1001
1026
|
gap: '.5rem',
|
|
1002
1027
|
fontWeight: 'bold'
|
|
1003
1028
|
}
|
|
1004
|
-
}, "Pathname", ' ', router.state.location.maskedLocation ? /*#__PURE__*/
|
|
1029
|
+
}, "Pathname", ' ', router.state.location.maskedLocation ? /*#__PURE__*/React.createElement("div", {
|
|
1005
1030
|
style: {
|
|
1006
1031
|
padding: '.1rem .5rem',
|
|
1007
1032
|
background: defaultTheme.warning,
|
|
1008
1033
|
color: 'black',
|
|
1009
1034
|
borderRadius: '.5rem'
|
|
1010
1035
|
}
|
|
1011
|
-
}, "Masked") : null), /*#__PURE__*/
|
|
1036
|
+
}, "Masked") : null), /*#__PURE__*/React.createElement("div", {
|
|
1012
1037
|
style: {
|
|
1013
1038
|
padding: '.5rem',
|
|
1014
1039
|
display: 'flex',
|
|
1015
1040
|
gap: '.5rem',
|
|
1016
1041
|
alignItems: 'center'
|
|
1017
1042
|
}
|
|
1018
|
-
}, /*#__PURE__*/
|
|
1043
|
+
}, /*#__PURE__*/React.createElement("code", {
|
|
1019
1044
|
style: {
|
|
1020
1045
|
opacity: 0.6
|
|
1021
1046
|
}
|
|
1022
|
-
}, router.state.location.pathname), router.state.location.maskedLocation ? /*#__PURE__*/
|
|
1047
|
+
}, router.state.location.pathname), router.state.location.maskedLocation ? /*#__PURE__*/React.createElement("code", {
|
|
1023
1048
|
style: {
|
|
1024
1049
|
color: defaultTheme.warning,
|
|
1025
1050
|
fontWeight: 'bold'
|
|
1026
1051
|
}
|
|
1027
|
-
}, router.state.location.maskedLocation.pathname) : null), /*#__PURE__*/
|
|
1052
|
+
}, router.state.location.maskedLocation.pathname) : null), /*#__PURE__*/React.createElement("div", {
|
|
1028
1053
|
style: {
|
|
1029
1054
|
padding: '.5em',
|
|
1030
1055
|
background: defaultTheme.backgroundAlt,
|
|
@@ -1036,7 +1061,7 @@
|
|
|
1036
1061
|
gap: '.5rem',
|
|
1037
1062
|
fontWeight: 'bold'
|
|
1038
1063
|
}
|
|
1039
|
-
}, /*#__PURE__*/
|
|
1064
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1040
1065
|
type: "button",
|
|
1041
1066
|
onClick: () => {
|
|
1042
1067
|
setShowMatches(false);
|
|
@@ -1050,7 +1075,7 @@
|
|
|
1050
1075
|
color: 'inherit',
|
|
1051
1076
|
cursor: 'pointer'
|
|
1052
1077
|
}
|
|
1053
|
-
}, "Routes"), "/", /*#__PURE__*/
|
|
1078
|
+
}, "Routes"), "/", /*#__PURE__*/React.createElement("button", {
|
|
1054
1079
|
type: "button",
|
|
1055
1080
|
onClick: () => {
|
|
1056
1081
|
setShowMatches(true);
|
|
@@ -1064,13 +1089,13 @@
|
|
|
1064
1089
|
color: 'inherit',
|
|
1065
1090
|
cursor: 'pointer'
|
|
1066
1091
|
}
|
|
1067
|
-
}, "Matches")), !showMatches ? /*#__PURE__*/
|
|
1092
|
+
}, "Matches")), !showMatches ? /*#__PURE__*/React.createElement(RouteComp, {
|
|
1068
1093
|
route: router.routeTree,
|
|
1069
1094
|
isRoot: true,
|
|
1070
1095
|
activeRouteId: activeRouteId,
|
|
1071
1096
|
setActiveRouteId: setActiveRouteId
|
|
1072
|
-
}) : /*#__PURE__*/
|
|
1073
|
-
return /*#__PURE__*/
|
|
1097
|
+
}) : /*#__PURE__*/React.createElement("div", null, (router.state.status === 'pending' ? router.state.pendingMatches : router.state.matches).map((match, i) => {
|
|
1098
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1074
1099
|
key: match.routeId || i,
|
|
1075
1100
|
role: "button",
|
|
1076
1101
|
"aria-label": `Open match details for ${match.routeId}`,
|
|
@@ -1082,7 +1107,7 @@
|
|
|
1082
1107
|
alignItems: 'center',
|
|
1083
1108
|
background: match === activeMatch ? 'rgba(255,255,255,.1)' : undefined
|
|
1084
1109
|
}
|
|
1085
|
-
}, /*#__PURE__*/
|
|
1110
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1086
1111
|
style: {
|
|
1087
1112
|
flex: '0 0 auto',
|
|
1088
1113
|
width: '1.3rem',
|
|
@@ -1095,13 +1120,13 @@
|
|
|
1095
1120
|
borderRadius: '.25rem',
|
|
1096
1121
|
transition: 'all .2s ease-out'
|
|
1097
1122
|
}
|
|
1098
|
-
}), /*#__PURE__*/
|
|
1123
|
+
}), /*#__PURE__*/React.createElement(Code, {
|
|
1099
1124
|
style: {
|
|
1100
1125
|
padding: '.5em',
|
|
1101
1126
|
fontSize: '0.7rem'
|
|
1102
1127
|
}
|
|
1103
1128
|
}, `${match.id}`));
|
|
1104
|
-
})))), activeMatch ? /*#__PURE__*/
|
|
1129
|
+
})))), activeMatch ? /*#__PURE__*/React.createElement(ActivePanel, null, /*#__PURE__*/React.createElement("div", {
|
|
1105
1130
|
style: {
|
|
1106
1131
|
padding: '.5em',
|
|
1107
1132
|
background: defaultTheme.backgroundAlt,
|
|
@@ -1110,23 +1135,23 @@
|
|
|
1110
1135
|
bottom: 0,
|
|
1111
1136
|
zIndex: 1
|
|
1112
1137
|
}
|
|
1113
|
-
}, "Match Details"), /*#__PURE__*/
|
|
1138
|
+
}, "Match Details"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
1114
1139
|
style: {
|
|
1115
1140
|
opacity: '.5'
|
|
1116
1141
|
}
|
|
1117
|
-
}, "ID"), /*#__PURE__*/
|
|
1142
|
+
}, "ID"), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Code, {
|
|
1118
1143
|
style: {
|
|
1119
1144
|
lineHeight: '1.8em'
|
|
1120
1145
|
}
|
|
1121
|
-
}, JSON.stringify(activeMatch.id, null, 2)))), /*#__PURE__*/
|
|
1146
|
+
}, JSON.stringify(activeMatch.id, null, 2)))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
1122
1147
|
style: {
|
|
1123
1148
|
opacity: '.5'
|
|
1124
1149
|
}
|
|
1125
|
-
}, "Status"), /*#__PURE__*/
|
|
1150
|
+
}, "Status"), /*#__PURE__*/React.createElement("td", null, activeMatch.status)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
1126
1151
|
style: {
|
|
1127
1152
|
opacity: '.5'
|
|
1128
1153
|
}
|
|
1129
|
-
}, "Last Updated"), /*#__PURE__*/
|
|
1154
|
+
}, "Last Updated"), /*#__PURE__*/React.createElement("td", null, activeMatch.updatedAt ? new Date(activeMatch.updatedAt).toLocaleTimeString() : 'N/A'))))), activeMatch.loaderData ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1130
1155
|
style: {
|
|
1131
1156
|
background: defaultTheme.backgroundAlt,
|
|
1132
1157
|
padding: '.5em',
|
|
@@ -1135,15 +1160,15 @@
|
|
|
1135
1160
|
bottom: 0,
|
|
1136
1161
|
zIndex: 1
|
|
1137
1162
|
}
|
|
1138
|
-
}, "Loader Data"), /*#__PURE__*/
|
|
1163
|
+
}, "Loader Data"), /*#__PURE__*/React.createElement("div", {
|
|
1139
1164
|
style: {
|
|
1140
1165
|
padding: '.5em'
|
|
1141
1166
|
}
|
|
1142
|
-
}, /*#__PURE__*/
|
|
1167
|
+
}, /*#__PURE__*/React.createElement(Explorer, {
|
|
1143
1168
|
label: "loaderData",
|
|
1144
1169
|
value: activeMatch.loaderData,
|
|
1145
1170
|
defaultExpanded: {}
|
|
1146
|
-
}))) : null, /*#__PURE__*/
|
|
1171
|
+
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
1147
1172
|
style: {
|
|
1148
1173
|
background: defaultTheme.backgroundAlt,
|
|
1149
1174
|
padding: '.5em',
|
|
@@ -1152,15 +1177,15 @@
|
|
|
1152
1177
|
bottom: 0,
|
|
1153
1178
|
zIndex: 1
|
|
1154
1179
|
}
|
|
1155
|
-
}, "Explorer"), /*#__PURE__*/
|
|
1180
|
+
}, "Explorer"), /*#__PURE__*/React.createElement("div", {
|
|
1156
1181
|
style: {
|
|
1157
1182
|
padding: '.5em'
|
|
1158
1183
|
}
|
|
1159
|
-
}, /*#__PURE__*/
|
|
1184
|
+
}, /*#__PURE__*/React.createElement(Explorer, {
|
|
1160
1185
|
label: "Match",
|
|
1161
1186
|
value: activeMatch,
|
|
1162
1187
|
defaultExpanded: {}
|
|
1163
|
-
}))) : null, hasSearch ? /*#__PURE__*/
|
|
1188
|
+
}))) : null, hasSearch ? /*#__PURE__*/React.createElement("div", {
|
|
1164
1189
|
style: {
|
|
1165
1190
|
flex: '1 1 500px',
|
|
1166
1191
|
minHeight: '40%',
|
|
@@ -1170,7 +1195,7 @@
|
|
|
1170
1195
|
display: 'flex',
|
|
1171
1196
|
flexDirection: 'column'
|
|
1172
1197
|
}
|
|
1173
|
-
}, /*#__PURE__*/
|
|
1198
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1174
1199
|
style: {
|
|
1175
1200
|
padding: '.5em',
|
|
1176
1201
|
background: defaultTheme.backgroundAlt,
|
|
@@ -1180,11 +1205,11 @@
|
|
|
1180
1205
|
zIndex: 1,
|
|
1181
1206
|
fontWeight: 'bold'
|
|
1182
1207
|
}
|
|
1183
|
-
}, "Search Params"), /*#__PURE__*/
|
|
1208
|
+
}, "Search Params"), /*#__PURE__*/React.createElement("div", {
|
|
1184
1209
|
style: {
|
|
1185
1210
|
padding: '.5em'
|
|
1186
1211
|
}
|
|
1187
|
-
}, /*#__PURE__*/
|
|
1212
|
+
}, /*#__PURE__*/React.createElement(Explorer, {
|
|
1188
1213
|
value: router.state.location.search || {},
|
|
1189
1214
|
defaultExpanded: Object.keys(router.state.location.search || {}).reduce((obj, next) => {
|
|
1190
1215
|
obj[next] = {};
|
|
@@ -1196,7 +1221,5 @@
|
|
|
1196
1221
|
exports.TanStackRouterDevtools = TanStackRouterDevtools;
|
|
1197
1222
|
exports.TanStackRouterDevtoolsPanel = TanStackRouterDevtoolsPanel;
|
|
1198
1223
|
|
|
1199
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1200
|
-
|
|
1201
1224
|
}));
|
|
1202
1225
|
//# sourceMappingURL=index.development.js.map
|