@tanstack/router-devtools 1.16.5 → 1.17.0

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 (49) hide show
  1. package/dist/cjs/Explorer.cjs +146 -92
  2. package/dist/cjs/Explorer.cjs.map +1 -1
  3. package/dist/cjs/Explorer.d.cts +0 -7
  4. package/dist/cjs/devtools.cjs +901 -894
  5. package/dist/cjs/devtools.cjs.map +1 -1
  6. package/dist/cjs/logo.cjs +1012 -0
  7. package/dist/cjs/logo.cjs.map +1 -0
  8. package/dist/cjs/logo.d.cts +2 -0
  9. package/dist/cjs/tokens.cjs +302 -0
  10. package/dist/cjs/tokens.cjs.map +1 -0
  11. package/dist/cjs/tokens.d.cts +298 -0
  12. package/dist/cjs/utils.cjs +5 -33
  13. package/dist/cjs/utils.cjs.map +1 -1
  14. package/dist/cjs/utils.d.cts +2 -2
  15. package/dist/esm/Explorer.d.ts +0 -7
  16. package/dist/esm/Explorer.js +147 -93
  17. package/dist/esm/Explorer.js.map +1 -1
  18. package/dist/esm/devtools.js +901 -894
  19. package/dist/esm/devtools.js.map +1 -1
  20. package/dist/esm/logo.d.ts +2 -0
  21. package/dist/esm/logo.js +1012 -0
  22. package/dist/esm/logo.js.map +1 -0
  23. package/dist/esm/tokens.d.ts +298 -0
  24. package/dist/esm/tokens.js +302 -0
  25. package/dist/esm/tokens.js.map +1 -0
  26. package/dist/esm/utils.d.ts +2 -2
  27. package/dist/esm/utils.js +5 -33
  28. package/dist/esm/utils.js.map +1 -1
  29. package/package.json +4 -2
  30. package/src/Explorer.tsx +148 -93
  31. package/src/devtools.tsx +956 -851
  32. package/src/logo.tsx +817 -0
  33. package/src/tokens.ts +305 -0
  34. package/src/utils.ts +12 -11
  35. package/dist/cjs/styledComponents.cjs +0 -93
  36. package/dist/cjs/styledComponents.cjs.map +0 -1
  37. package/dist/cjs/styledComponents.d.cts +0 -7
  38. package/dist/cjs/theme.cjs +0 -28
  39. package/dist/cjs/theme.cjs.map +0 -1
  40. package/dist/cjs/useMediaQuery.cjs +0 -27
  41. package/dist/cjs/useMediaQuery.cjs.map +0 -1
  42. package/dist/esm/styledComponents.d.ts +0 -7
  43. package/dist/esm/styledComponents.js +0 -93
  44. package/dist/esm/styledComponents.js.map +0 -1
  45. package/dist/esm/theme.js +0 -28
  46. package/dist/esm/theme.js.map +0 -1
  47. package/dist/esm/useMediaQuery.js +0 -28
  48. package/dist/esm/useMediaQuery.js.map +0 -1
  49. package/src/styledComponents.ts +0 -106
@@ -5,55 +5,29 @@ const React = require("react");
5
5
  const reactRouter = require("@tanstack/react-router");
6
6
  const useLocalStorage = require("./useLocalStorage.cjs");
7
7
  const utils = require("./utils.cjs");
8
- const styledComponents = require("./styledComponents.cjs");
9
- const theme = require("./theme.cjs");
8
+ const goober = require("goober");
9
+ const clsx = require("clsx");
10
10
  const Explorer = require("./Explorer.cjs");
11
+ const tokens = require("./tokens.cjs");
12
+ const logo = require("./logo.cjs");
11
13
  const isServer = typeof window === "undefined";
12
14
  function Logo(props) {
13
- return /* @__PURE__ */ jsxRuntime.jsxs(
14
- "div",
15
- {
16
- ...props,
17
- style: {
18
- ...props.style ?? {},
19
- display: "flex",
20
- alignItems: "center",
21
- flexDirection: "column",
22
- fontSize: "0.8rem",
23
- fontWeight: "bolder",
24
- lineHeight: "1"
25
- },
26
- children: [
27
- /* @__PURE__ */ jsxRuntime.jsx(
28
- "div",
29
- {
30
- style: {
31
- letterSpacing: "-0.05rem"
32
- },
33
- children: "TANSTACK"
34
- }
35
- ),
36
- /* @__PURE__ */ jsxRuntime.jsx(
37
- "div",
38
- {
39
- style: {
40
- backgroundImage: "linear-gradient(to right, var(--tw-gradient-stops))",
41
- // @ts-ignore
42
- "--tw-gradient-from": "#84cc16",
43
- "--tw-gradient-stops": "var(--tw-gradient-from), var(--tw-gradient-to)",
44
- "--tw-gradient-to": "#10b981",
45
- WebkitBackgroundClip: "text",
46
- color: "transparent",
47
- letterSpacing: "0.1rem",
48
- marginRight: "-0.2rem"
49
- },
50
- children: "ROUTER"
51
- }
52
- )
53
- ]
54
- }
55
- );
15
+ const { className, ...rest } = props;
16
+ return /* @__PURE__ */ jsxRuntime.jsxs("button", { ...rest, className: clsx.clsx(styles.logo, className), children: [
17
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.tanstackLogo, children: "TANSTACK" }),
18
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.routerLogo, children: "React Router v1" })
19
+ ] });
56
20
  }
21
+ const DevtoolsOnCloseContext = React.createContext(void 0);
22
+ const useDevtoolsOnClose = () => {
23
+ const context = React.useContext(DevtoolsOnCloseContext);
24
+ if (!context) {
25
+ throw new Error(
26
+ "useDevtoolsOnClose must be used within a TanStackRouterDevtools component"
27
+ );
28
+ }
29
+ return context;
30
+ };
57
31
  function TanStackRouterDevtools({
58
32
  initialIsOpen,
59
33
  panelProps = {},
@@ -102,31 +76,10 @@ function TanStackRouterDevtools({
102
76
  document.addEventListener("mousemove", run);
103
77
  document.addEventListener("mouseup", unsub);
104
78
  };
79
+ const isButtonClosed = isOpen ?? false;
105
80
  React.useEffect(() => {
106
81
  setIsResolvedOpen(isOpen ?? false);
107
82
  }, [isOpen, isResolvedOpen, setIsResolvedOpen]);
108
- React.useEffect(() => {
109
- const ref = panelRef.current;
110
- if (ref) {
111
- const handlePanelTransitionStart = () => {
112
- if (ref && isResolvedOpen) {
113
- ref.style.visibility = "visible";
114
- }
115
- };
116
- const handlePanelTransitionEnd = () => {
117
- if (ref && !isResolvedOpen) {
118
- ref.style.visibility = "hidden";
119
- }
120
- };
121
- ref.addEventListener("transitionstart", handlePanelTransitionStart);
122
- ref.addEventListener("transitionend", handlePanelTransitionEnd);
123
- return () => {
124
- ref.removeEventListener("transitionstart", handlePanelTransitionStart);
125
- ref.removeEventListener("transitionend", handlePanelTransitionEnd);
126
- };
127
- }
128
- return;
129
- }, [isResolvedOpen]);
130
83
  React[isServer ? "useEffect" : "useLayoutEffect"](() => {
131
84
  var _a, _b;
132
85
  if (isResolvedOpen) {
@@ -152,6 +105,13 @@ function TanStackRouterDevtools({
152
105
  }
153
106
  return;
154
107
  }, [isResolvedOpen]);
108
+ React[isServer ? "useEffect" : "useLayoutEffect"](() => {
109
+ if (rootRef.current) {
110
+ const el = rootRef.current;
111
+ const fontSize = getComputedStyle(el).fontSize;
112
+ el.style.setProperty("--tsrd-font-size", fontSize);
113
+ }
114
+ }, [rootRef.current]);
155
115
  const { style: panelStyle = {}, ...otherPanelProps } = panelProps;
156
116
  const {
157
117
  style: closeButtonStyle = {},
@@ -165,78 +125,42 @@ function TanStackRouterDevtools({
165
125
  } = toggleButtonProps;
166
126
  if (!isMounted())
167
127
  return null;
128
+ const resolvedHeight = devtoolsHeight ?? 500;
168
129
  return /* @__PURE__ */ jsxRuntime.jsxs(Container, { ref: rootRef, className: "TanStackRouterDevtools", children: [
169
- /* @__PURE__ */ jsxRuntime.jsxs(theme.ThemeProvider, { theme: theme.defaultTheme, children: [
170
- /* @__PURE__ */ jsxRuntime.jsx(
171
- TanStackRouterDevtoolsPanel,
172
- {
173
- ref: panelRef,
174
- ...otherPanelProps,
175
- router,
176
- style: {
177
- direction: "ltr",
178
- position: "fixed",
179
- bottom: "0",
180
- right: "0",
181
- zIndex: 99999,
182
- width: "100%",
183
- height: devtoolsHeight ?? 500,
184
- maxHeight: "90%",
185
- boxShadow: "0 0 20px rgba(0,0,0,.3)",
186
- borderTop: `1px solid ${theme.defaultTheme.gray}`,
187
- transformOrigin: "top",
188
- // visibility will be toggled after transitions, but set initial state here
189
- visibility: isOpen ? "visible" : "hidden",
190
- ...panelStyle,
191
- ...isResizing ? {
192
- transition: `none`
193
- } : { transition: `all .2s ease` },
194
- ...isResolvedOpen ? {
195
- opacity: 1,
196
- pointerEvents: "all",
197
- transform: `translateY(0) scale(1)`
198
- } : {
199
- opacity: 0,
200
- pointerEvents: "none",
201
- transform: `translateY(15px) scale(1.02)`
202
- }
203
- },
204
- isOpen: isResolvedOpen,
205
- setIsOpen,
206
- handleDragStart: (e) => handleDragStart(panelRef.current, e)
207
- }
208
- ),
209
- isResolvedOpen ? /* @__PURE__ */ jsxRuntime.jsx(
210
- styledComponents.Button,
211
- {
212
- type: "button",
213
- "aria-label": "Close TanStack Router Devtools",
214
- ...otherCloseButtonProps,
215
- onClick: (e) => {
216
- setIsOpen(false);
217
- onCloseClick && onCloseClick(e);
218
- },
219
- style: {
220
- position: "fixed",
221
- zIndex: 99999,
222
- margin: ".5em",
223
- bottom: 0,
224
- ...position === "top-right" ? {
225
- right: "0"
226
- } : position === "top-left" ? {
227
- left: "0"
228
- } : position === "bottom-right" ? {
229
- right: "0"
230
- } : {
231
- left: "0"
130
+ /* @__PURE__ */ jsxRuntime.jsx(
131
+ DevtoolsOnCloseContext.Provider,
132
+ {
133
+ value: {
134
+ onCloseClick: onCloseClick ?? (() => {
135
+ })
136
+ },
137
+ children: /* @__PURE__ */ jsxRuntime.jsx(
138
+ TanStackRouterDevtoolsPanel,
139
+ {
140
+ ref: panelRef,
141
+ ...otherPanelProps,
142
+ router,
143
+ className: clsx.clsx(
144
+ styles.devtoolsPanelContainer,
145
+ styles.devtoolsPanelContainerVisibility(!!isOpen),
146
+ styles.devtoolsPanelContainerResizing(isResizing),
147
+ styles.devtoolsPanelContainerAnimation(
148
+ isResolvedOpen,
149
+ resolvedHeight + 16
150
+ )
151
+ ),
152
+ style: {
153
+ height: resolvedHeight,
154
+ ...panelStyle
232
155
  },
233
- ...closeButtonStyle
234
- },
235
- children: "Close"
236
- }
237
- ) : null
238
- ] }),
239
- !isResolvedOpen ? /* @__PURE__ */ jsxRuntime.jsx(
156
+ isOpen: isResolvedOpen,
157
+ setIsOpen,
158
+ handleDragStart: (e) => handleDragStart(panelRef.current, e)
159
+ }
160
+ )
161
+ }
162
+ ),
163
+ /* @__PURE__ */ jsxRuntime.jsxs(
240
164
  "button",
241
165
  {
242
166
  type: "button",
@@ -246,36 +170,21 @@ function TanStackRouterDevtools({
246
170
  setIsOpen(true);
247
171
  onToggleClick && onToggleClick(e);
248
172
  },
249
- style: {
250
- appearance: "none",
251
- background: "none",
252
- border: 0,
253
- padding: 0,
254
- position: "fixed",
255
- zIndex: 99999,
256
- display: "inline-flex",
257
- fontSize: "1.5em",
258
- margin: ".5em",
259
- cursor: "pointer",
260
- width: "fit-content",
261
- ...position === "top-right" ? {
262
- top: "0",
263
- right: "0"
264
- } : position === "top-left" ? {
265
- top: "0",
266
- left: "0"
267
- } : position === "bottom-right" ? {
268
- bottom: "0",
269
- right: "0"
270
- } : {
271
- bottom: "0",
272
- left: "0"
273
- },
274
- ...toggleButtonStyle
275
- },
276
- children: /* @__PURE__ */ jsxRuntime.jsx(Logo, { "aria-hidden": true })
173
+ className: clsx.clsx(
174
+ styles.mainCloseBtn,
175
+ styles.mainCloseBtnPosition(position),
176
+ styles.mainCloseBtnAnimation(!isButtonClosed)
177
+ ),
178
+ children: [
179
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.mainCloseBtnIconContainer, children: [
180
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.mainCloseBtnIconOuter, children: /* @__PURE__ */ jsxRuntime.jsx(logo.TanStackLogo, {}) }),
181
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.mainCloseBtnIconInner, children: /* @__PURE__ */ jsxRuntime.jsx(logo.TanStackLogo, {}) })
182
+ ] }),
183
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.mainCloseBtnDivider, children: "-" }),
184
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.routerLogoCloseButton, children: "React Router" })
185
+ ]
277
186
  }
278
- ) : null
187
+ )
279
188
  ] });
280
189
  }
281
190
  function RouteComp({
@@ -288,6 +197,23 @@ function RouteComp({
288
197
  const routerState = reactRouter.useRouterState();
289
198
  const matches = routerState.status === "pending" ? routerState.pendingMatches ?? [] : routerState.matches;
290
199
  const match = routerState.matches.find((d) => d.routeId === route.id);
200
+ const param = React.useMemo(() => {
201
+ try {
202
+ if (match == null ? void 0 : match.params) {
203
+ const p = match.params;
204
+ const r = route.path || reactRouter.trimPath(route.id);
205
+ if (r.startsWith("$")) {
206
+ const trimmed = r.slice(1);
207
+ if (p[trimmed]) {
208
+ return `(${p[trimmed]})`;
209
+ }
210
+ }
211
+ }
212
+ return "";
213
+ } catch (error) {
214
+ return "";
215
+ }
216
+ }, [match, route]);
291
217
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
292
218
  /* @__PURE__ */ jsxRuntime.jsxs(
293
219
  "div",
@@ -299,90 +225,42 @@ function RouteComp({
299
225
  setActiveId(activeId === route.id ? "" : route.id);
300
226
  }
301
227
  },
302
- style: {
303
- display: "flex",
304
- borderBottom: `solid 1px ${theme.defaultTheme.grayAlt}`,
305
- cursor: match ? "pointer" : "default",
306
- alignItems: "center",
307
- background: route.id === activeId ? "rgba(255,255,255,.1)" : void 0,
308
- padding: ".25rem .5rem",
309
- gap: ".5rem"
310
- },
228
+ className: clsx.clsx(
229
+ styles.routesRowContainer(route.id === activeId, !!match)
230
+ ),
311
231
  children: [
312
- isRoot ? null : /* @__PURE__ */ jsxRuntime.jsx(
232
+ /* @__PURE__ */ jsxRuntime.jsx(
313
233
  "div",
314
234
  {
315
- style: {
316
- flex: "0 0 auto",
317
- width: ".7rem",
318
- height: ".7rem",
319
- alignItems: "center",
320
- justifyContent: "center",
321
- fontWeight: "bold",
322
- borderRadius: "100%",
323
- transition: "all .2s ease-out",
324
- background: utils.getRouteStatusColor(matches, route, theme.defaultTheme),
325
- opacity: match ? 1 : 0.3
326
- }
235
+ className: clsx.clsx(
236
+ styles.matchIndicator(utils.getRouteStatusColor(matches, route))
237
+ )
327
238
  }
328
239
  ),
329
- /* @__PURE__ */ jsxRuntime.jsxs(
330
- "div",
331
- {
332
- style: {
333
- flex: "1 0 auto",
334
- display: "flex",
335
- justifyContent: "space-between",
336
- alignItems: "center",
337
- padding: isRoot ? "0 .25rem" : 0,
338
- opacity: match ? 1 : 0.7,
339
- fontSize: "0.7rem"
340
- },
341
- children: [
342
- /* @__PURE__ */ jsxRuntime.jsxs(styledComponents.Code, { children: [
343
- route.path || reactRouter.trimPath(route.id),
344
- " "
345
- ] }),
346
- /* @__PURE__ */ jsxRuntime.jsxs(
347
- "div",
348
- {
349
- style: {
350
- display: "flex",
351
- alignItems: "center",
352
- gap: ".5rem"
353
- },
354
- children: [
355
- match ? /* @__PURE__ */ jsxRuntime.jsx(styledComponents.Code, { style: { opacity: 0.3 }, children: match.id }) : null,
356
- /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match })
357
- ]
358
- }
359
- )
360
- ]
361
- }
362
- )
240
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(styles.routesRow(!!match)), children: [
241
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
242
+ /* @__PURE__ */ jsxRuntime.jsxs("code", { className: styles.code, children: [
243
+ isRoot ? "__root__" : route.path || reactRouter.trimPath(route.id),
244
+ " "
245
+ ] }),
246
+ /* @__PURE__ */ jsxRuntime.jsx("code", { className: styles.routeParamInfo, children: param })
247
+ ] }),
248
+ /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match })
249
+ ] })
363
250
  ]
364
251
  }
365
252
  ),
366
- ((_a = route.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(
367
- "div",
253
+ ((_a = route.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.nestedRouteRow(!!isRoot), children: [...route.children].sort((a, b) => {
254
+ return a.rank - b.rank;
255
+ }).map((r) => /* @__PURE__ */ jsxRuntime.jsx(
256
+ RouteComp,
368
257
  {
369
- style: {
370
- marginLeft: isRoot ? 0 : "1rem",
371
- borderLeft: isRoot ? "" : `solid 1px ${theme.defaultTheme.grayAlt}`
372
- },
373
- children: [...route.children].sort((a, b) => {
374
- return a.rank - b.rank;
375
- }).map((r) => /* @__PURE__ */ jsxRuntime.jsx(
376
- RouteComp,
377
- {
378
- route: r,
379
- activeId,
380
- setActiveId
381
- },
382
- r.id
383
- ))
384
- }
385
- ) : null
258
+ route: r,
259
+ activeId,
260
+ setActiveId
261
+ },
262
+ r.id
263
+ )) }) : null
386
264
  ] });
387
265
  }
388
266
  const TanStackRouterDevtoolsPanel = React.forwardRef(function TanStackRouterDevtoolsPanel2(props, ref) {
@@ -394,6 +272,8 @@ const TanStackRouterDevtoolsPanel = React.forwardRef(function TanStackRouterDevt
394
272
  router: userRouter,
395
273
  ...panelProps
396
274
  } = props;
275
+ const { onCloseClick } = useDevtoolsOnClose();
276
+ const { className, ...otherPanelProps } = panelProps;
397
277
  const contextRouter = reactRouter.useRouter({ warn: false });
398
278
  const router = userRouter ?? contextRouter;
399
279
  const routerState = reactRouter.useRouterState({
@@ -425,670 +305,274 @@ const TanStackRouterDevtoolsPanel = React.forwardRef(function TanStackRouterDevt
425
305
  ...router,
426
306
  state: router.state
427
307
  };
428
- return /* @__PURE__ */ jsxRuntime.jsx(theme.ThemeProvider, { theme: theme.defaultTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(styledComponents.Panel, { ref, className: "TanStackRouterDevtoolsPanel", ...panelProps, children: [
429
- /* @__PURE__ */ jsxRuntime.jsx(
430
- "style",
431
- {
432
- dangerouslySetInnerHTML: {
433
- __html: `
434
-
435
- .TanStackRouterDevtoolsPanel * {
436
- scrollbar-color: ${theme.defaultTheme.backgroundAlt} ${theme.defaultTheme.gray};
437
- }
438
-
439
- .TanStackRouterDevtoolsPanel *::-webkit-scrollbar, .TanStackRouterDevtoolsPanel scrollbar {
440
- width: 1em;
441
- height: 1em;
442
- }
443
-
444
- .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-track, .TanStackRouterDevtoolsPanel scrollbar-track {
445
- background: ${theme.defaultTheme.backgroundAlt};
446
- }
447
-
448
- .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-thumb, .TanStackRouterDevtoolsPanel scrollbar-thumb {
449
- background: ${theme.defaultTheme.gray};
450
- border-radius: .5em;
451
- border: 3px solid ${theme.defaultTheme.backgroundAlt};
452
- }
453
-
454
- .TanStackRouterDevtoolsPanel table {
455
- width: 100%;
456
- }
457
-
458
- .TanStackRouterDevtoolsPanel table tr {
459
- border-bottom: 2px dotted rgba(255, 255, 255, .2);
460
- }
461
-
462
- .TanStackRouterDevtoolsPanel table tr:last-child {
463
- border-bottom: none
464
- }
465
-
466
- .TanStackRouterDevtoolsPanel table td {
467
- padding: .25rem .5rem;
468
- border-right: 2px dotted rgba(255, 255, 255, .05);
469
- }
470
-
471
- .TanStackRouterDevtoolsPanel table td:last-child {
472
- border-right: none
473
- }
474
-
475
- `
476
- }
477
- }
478
- ),
479
- handleDragStart ? /* @__PURE__ */ jsxRuntime.jsx(
480
- "div",
481
- {
482
- style: {
483
- position: "absolute",
484
- left: 0,
485
- top: 0,
486
- width: "100%",
487
- height: "4px",
488
- marginBottom: "-4px",
489
- cursor: "row-resize",
490
- zIndex: 1e5
491
- },
492
- onMouseDown: handleDragStart
493
- }
494
- ) : null,
495
- /* @__PURE__ */ jsxRuntime.jsxs(
496
- "div",
497
- {
498
- style: {
499
- flex: "1 1 500px",
500
- minHeight: "40%",
501
- maxHeight: "100%",
502
- overflow: "auto",
503
- borderRight: `1px solid ${theme.defaultTheme.grayAlt}`,
504
- display: "flex",
505
- flexDirection: "column"
506
- },
507
- children: [
508
- /* @__PURE__ */ jsxRuntime.jsxs(
509
- "div",
510
- {
511
- style: {
512
- display: "flex",
513
- justifyContent: "start",
514
- gap: "1rem",
515
- padding: "1rem",
516
- alignItems: "center",
517
- background: theme.defaultTheme.backgroundAlt
518
- },
519
- children: [
520
- /* @__PURE__ */ jsxRuntime.jsx(Logo, { "aria-hidden": true }),
521
- /* @__PURE__ */ jsxRuntime.jsx(
522
- "div",
308
+ return /* @__PURE__ */ jsxRuntime.jsxs(
309
+ "div",
310
+ {
311
+ ref,
312
+ className: clsx.clsx(
313
+ styles.devtoolsPanel,
314
+ "TanStackRouterDevtoolsPanel",
315
+ className
316
+ ),
317
+ ...otherPanelProps,
318
+ children: [
319
+ handleDragStart ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.dragHandle, onMouseDown: handleDragStart }) : null,
320
+ /* @__PURE__ */ jsxRuntime.jsx(
321
+ "button",
322
+ {
323
+ className: styles.panelCloseBtn,
324
+ onClick: (e) => {
325
+ setIsOpen(false);
326
+ onCloseClick(e);
327
+ },
328
+ children: /* @__PURE__ */ jsxRuntime.jsx(
329
+ "svg",
330
+ {
331
+ xmlns: "http://www.w3.org/2000/svg",
332
+ width: "10",
333
+ height: "6",
334
+ fill: "none",
335
+ viewBox: "0 0 10 6",
336
+ className: styles.panelCloseBtnIcon,
337
+ children: /* @__PURE__ */ jsxRuntime.jsx(
338
+ "path",
523
339
  {
524
- style: {
525
- fontSize: "clamp(.8rem, 2vw, 1.3rem)",
526
- fontWeight: "bold"
527
- },
528
- children: /* @__PURE__ */ jsxRuntime.jsx(
529
- "span",
530
- {
531
- style: {
532
- fontWeight: 100
533
- },
534
- children: "Devtools"
535
- }
536
- )
340
+ stroke: "currentColor",
341
+ strokeLinecap: "round",
342
+ strokeLinejoin: "round",
343
+ strokeWidth: "1.667",
344
+ d: "M1 1l4 4 4-4"
537
345
  }
538
346
  )
539
- ]
540
- }
541
- ),
542
- /* @__PURE__ */ jsxRuntime.jsx(
543
- "div",
347
+ }
348
+ )
349
+ }
350
+ ),
351
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.firstContainer, children: [
352
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.row, children: /* @__PURE__ */ jsxRuntime.jsx(
353
+ Logo,
544
354
  {
545
- style: {
546
- overflowY: "auto",
547
- flex: "1"
548
- },
549
- children: /* @__PURE__ */ jsxRuntime.jsx(
550
- "div",
551
- {
552
- style: {
553
- padding: ".5em"
554
- },
555
- children: /* @__PURE__ */ jsxRuntime.jsx(
556
- Explorer.default,
557
- {
558
- label: "Router",
559
- value: Object.fromEntries(
560
- utils.multiSortBy(
561
- Object.keys(explorerState),
562
- [
563
- "state",
564
- "routesById",
565
- "routesByPath",
566
- "flatRoutes",
567
- "options"
568
- ].map((d) => (dd) => dd !== d)
569
- ).map((key) => [key, explorerState[key]]).filter(
570
- (d) => typeof d[1] !== "function" && ![
571
- "__store",
572
- "basepath",
573
- "injectedHtml",
574
- "subscribers",
575
- "latestLoadPromise",
576
- "navigateTimeout",
577
- "resetNextScroll",
578
- "tempLocationKey",
579
- "latestLocation",
580
- "routeTree",
581
- "history"
582
- ].includes(d[0])
583
- )
584
- ),
585
- defaultExpanded: {
586
- state: {},
587
- context: {},
588
- options: {}
589
- },
590
- filterSubEntries: (subEntries) => {
591
- return subEntries.filter((d) => typeof d.value !== "function");
592
- }
593
- }
594
- )
595
- }
596
- )
355
+ "aria-hidden": true,
356
+ onClick: (e) => {
357
+ setIsOpen(false);
358
+ onCloseClick(e);
359
+ }
597
360
  }
598
- )
599
- ]
600
- }
601
- ),
602
- /* @__PURE__ */ jsxRuntime.jsxs(
603
- "div",
604
- {
605
- style: {
606
- flex: "1 1 500px",
607
- minHeight: "40%",
608
- maxHeight: "100%",
609
- overflow: "auto",
610
- borderRight: `1px solid ${theme.defaultTheme.grayAlt}`,
611
- display: "flex",
612
- flexDirection: "column"
613
- },
614
- children: [
615
- /* @__PURE__ */ jsxRuntime.jsxs(
616
- "div",
361
+ ) }),
362
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.routerExplorerContainer, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.routerExplorer, children: /* @__PURE__ */ jsxRuntime.jsx(
363
+ Explorer.default,
617
364
  {
618
- style: {
619
- flex: "1 1 auto",
620
- overflowY: "auto"
365
+ label: "Router",
366
+ value: Object.fromEntries(
367
+ utils.multiSortBy(
368
+ Object.keys(explorerState),
369
+ [
370
+ "state",
371
+ "routesById",
372
+ "routesByPath",
373
+ "flatRoutes",
374
+ "options"
375
+ ].map((d) => (dd) => dd !== d)
376
+ ).map((key) => [key, explorerState[key]]).filter(
377
+ (d) => typeof d[1] !== "function" && ![
378
+ "__store",
379
+ "basepath",
380
+ "injectedHtml",
381
+ "subscribers",
382
+ "latestLoadPromise",
383
+ "navigateTimeout",
384
+ "resetNextScroll",
385
+ "tempLocationKey",
386
+ "latestLocation",
387
+ "routeTree",
388
+ "history"
389
+ ].includes(d[0])
390
+ )
391
+ ),
392
+ defaultExpanded: {
393
+ state: {},
394
+ context: {},
395
+ options: {}
621
396
  },
622
- children: [
623
- /* @__PURE__ */ jsxRuntime.jsxs(
624
- "div",
625
- {
626
- style: {
627
- padding: ".5em",
628
- background: theme.defaultTheme.backgroundAlt,
629
- position: "sticky",
630
- top: 0,
631
- zIndex: 1,
632
- display: "flex",
633
- alignItems: "center",
634
- gap: ".5rem",
635
- fontWeight: "bold"
636
- },
637
- children: [
638
- "Pathname",
639
- " ",
640
- routerState.location.maskedLocation ? /* @__PURE__ */ jsxRuntime.jsx(
641
- "div",
642
- {
643
- style: {
644
- padding: ".1rem .5rem",
645
- background: theme.defaultTheme.warning,
646
- color: "black",
647
- borderRadius: ".5rem"
648
- },
649
- children: "Masked"
650
- }
651
- ) : null
652
- ]
653
- }
654
- ),
655
- /* @__PURE__ */ jsxRuntime.jsxs(
656
- "div",
657
- {
658
- style: {
659
- padding: ".5rem",
660
- display: "flex",
661
- gap: ".5rem",
662
- alignItems: "center"
663
- },
664
- children: [
665
- /* @__PURE__ */ jsxRuntime.jsx(
666
- "code",
667
- {
668
- style: {
669
- opacity: 0.6
670
- },
671
- children: routerState.location.pathname
672
- }
673
- ),
674
- routerState.location.maskedLocation ? /* @__PURE__ */ jsxRuntime.jsx(
675
- "code",
676
- {
677
- style: {
678
- color: theme.defaultTheme.warning,
679
- fontWeight: "bold"
680
- },
681
- children: routerState.location.maskedLocation.pathname
682
- }
683
- ) : null
684
- ]
685
- }
686
- ),
687
- /* @__PURE__ */ jsxRuntime.jsxs(
688
- "div",
397
+ filterSubEntries: (subEntries) => {
398
+ return subEntries.filter((d) => typeof d.value !== "function");
399
+ }
400
+ }
401
+ ) }) })
402
+ ] }),
403
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.secondContainer, children: [
404
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.matchesContainer, children: [
405
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.detailsHeader, children: [
406
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Pathname" }),
407
+ routerState.location.maskedLocation ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.maskedBadgeContainer, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.maskedBadge, children: "masked" }) }) : null
408
+ ] }),
409
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.detailsContent, children: [
410
+ /* @__PURE__ */ jsxRuntime.jsx("code", { children: routerState.location.pathname }),
411
+ routerState.location.maskedLocation ? /* @__PURE__ */ jsxRuntime.jsx("code", { className: styles.maskedLocation, children: routerState.location.maskedLocation.pathname }) : null
412
+ ] }),
413
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.detailsHeader, children: [
414
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.routeMatchesToggle, children: [
415
+ /* @__PURE__ */ jsxRuntime.jsx(
416
+ "button",
689
417
  {
690
- style: {
691
- padding: ".5em",
692
- background: theme.defaultTheme.backgroundAlt,
693
- position: "sticky",
694
- top: 0,
695
- zIndex: 1,
696
- display: "flex",
697
- alignItems: "center",
698
- justifyContent: "space-between",
699
- gap: ".5rem",
700
- fontWeight: "bold"
418
+ type: "button",
419
+ onClick: () => {
420
+ setShowMatches(false);
701
421
  },
702
- children: [
703
- /* @__PURE__ */ jsxRuntime.jsxs(
704
- "div",
705
- {
706
- style: {
707
- display: "flex",
708
- alignItems: "center",
709
- gap: ".5rem"
710
- },
711
- children: [
712
- /* @__PURE__ */ jsxRuntime.jsx(
713
- "button",
714
- {
715
- type: "button",
716
- onClick: () => {
717
- setShowMatches(false);
718
- },
719
- disabled: !showMatches,
720
- style: {
721
- appearance: "none",
722
- opacity: showMatches ? 0.5 : 1,
723
- border: 0,
724
- background: "transparent",
725
- color: "inherit",
726
- cursor: "pointer"
727
- },
728
- children: "Routes"
729
- }
730
- ),
731
- "/",
732
- /* @__PURE__ */ jsxRuntime.jsx(
733
- "button",
734
- {
735
- type: "button",
736
- onClick: () => {
737
- setShowMatches(true);
738
- },
739
- disabled: showMatches,
740
- style: {
741
- appearance: "none",
742
- opacity: !showMatches ? 0.5 : 1,
743
- border: 0,
744
- background: "transparent",
745
- color: "inherit",
746
- cursor: "pointer"
747
- },
748
- children: "Matches"
749
- }
750
- )
751
- ]
752
- }
753
- ),
754
- /* @__PURE__ */ jsxRuntime.jsx(
755
- "div",
756
- {
757
- style: {
758
- opacity: 0.3,
759
- fontSize: "0.7rem",
760
- fontWeight: "normal"
761
- },
762
- children: "age / staleTime / gcTime"
763
- }
764
- )
765
- ]
422
+ disabled: !showMatches,
423
+ className: clsx.clsx(styles.routeMatchesToggleBtn(!showMatches, true)),
424
+ children: "Routes"
766
425
  }
767
426
  ),
768
- !showMatches ? /* @__PURE__ */ jsxRuntime.jsx(
769
- RouteComp,
770
- {
771
- route: router.routeTree,
772
- isRoot: true,
773
- activeId,
774
- setActiveId
775
- }
776
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: (routerState.status === "pending" ? routerState.pendingMatches ?? [] : routerState.matches).map((match, i) => {
777
- return /* @__PURE__ */ jsxRuntime.jsxs(
778
- "div",
779
- {
780
- role: "button",
781
- "aria-label": `Open match details for ${match.id}`,
782
- onClick: () => setActiveId(activeId === match.id ? "" : match.id),
783
- style: {
784
- display: "flex",
785
- borderBottom: `solid 1px ${theme.defaultTheme.grayAlt}`,
786
- cursor: "pointer",
787
- alignItems: "center",
788
- background: match === activeMatch ? "rgba(255,255,255,.1)" : void 0
789
- },
790
- children: [
791
- /* @__PURE__ */ jsxRuntime.jsx(
792
- "div",
793
- {
794
- style: {
795
- flex: "0 0 auto",
796
- width: "1.3rem",
797
- height: "1.3rem",
798
- marginLeft: ".25rem",
799
- background: utils.getStatusColor(match, theme.defaultTheme),
800
- alignItems: "center",
801
- justifyContent: "center",
802
- fontWeight: "bold",
803
- borderRadius: ".25rem",
804
- transition: "all .2s ease-out"
805
- }
806
- }
807
- ),
808
- /* @__PURE__ */ jsxRuntime.jsx(
809
- styledComponents.Code,
810
- {
811
- style: {
812
- padding: ".5em",
813
- fontSize: "0.7rem"
814
- },
815
- children: `${match.id}`
816
- }
817
- ),
818
- /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match })
819
- ]
820
- },
821
- match.id || i
822
- );
823
- }) })
824
- ]
825
- }
826
- ),
827
- ((_a = routerState.cachedMatches) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsxs(
828
- "div",
829
- {
830
- style: {
831
- flex: "1 1 auto",
832
- overflowY: "auto",
833
- maxHeight: "50%"
834
- },
835
- children: [
836
- /* @__PURE__ */ jsxRuntime.jsxs(
837
- "div",
427
+ /* @__PURE__ */ jsxRuntime.jsx(
428
+ "button",
838
429
  {
839
- style: {
840
- padding: ".5em",
841
- background: theme.defaultTheme.backgroundAlt,
842
- position: "sticky",
843
- top: 0,
844
- zIndex: 1,
845
- display: "flex",
846
- alignItems: "center",
847
- justifyContent: "space-between",
848
- gap: ".5rem",
849
- fontWeight: "bold"
430
+ type: "button",
431
+ onClick: () => {
432
+ setShowMatches(true);
850
433
  },
851
- children: [
852
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Cached Matches" }),
853
- /* @__PURE__ */ jsxRuntime.jsx(
854
- "div",
855
- {
856
- style: {
857
- opacity: 0.3,
858
- fontSize: "0.7rem",
859
- fontWeight: "normal"
860
- },
861
- children: "age / staleTime / gcTime"
862
- }
863
- )
864
- ]
434
+ disabled: showMatches,
435
+ className: clsx.clsx(
436
+ styles.routeMatchesToggleBtn(!!showMatches, false)
437
+ ),
438
+ children: "Matches"
865
439
  }
866
- ),
867
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: routerState.cachedMatches.map((match) => {
868
- return /* @__PURE__ */ jsxRuntime.jsxs(
869
- "div",
870
- {
871
- role: "button",
872
- "aria-label": `Open match details for ${match.id}`,
873
- onClick: () => setActiveId(activeId === match.id ? "" : match.id),
874
- style: {
875
- display: "flex",
876
- borderBottom: `solid 1px ${theme.defaultTheme.grayAlt}`,
877
- cursor: "pointer",
878
- alignItems: "center",
879
- background: match === activeMatch ? "rgba(255,255,255,.1)" : void 0,
880
- fontSize: "0.7rem"
881
- },
882
- children: [
883
- /* @__PURE__ */ jsxRuntime.jsx(
884
- "div",
885
- {
886
- style: {
887
- flex: "0 0 auto",
888
- width: ".75rem",
889
- height: ".75rem",
890
- marginLeft: ".25rem",
891
- background: utils.getStatusColor(match, theme.defaultTheme),
892
- alignItems: "center",
893
- justifyContent: "center",
894
- fontWeight: "bold",
895
- borderRadius: "100%",
896
- transition: "all 1s ease-out"
897
- }
898
- }
899
- ),
900
- /* @__PURE__ */ jsxRuntime.jsx(
901
- styledComponents.Code,
902
- {
903
- style: {
904
- padding: ".5em"
905
- },
906
- children: `${match.id}`
907
- }
908
- ),
909
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match }) })
910
- ]
911
- },
912
- match.id
913
- );
914
- }) })
915
- ]
916
- }
917
- ) : null
918
- ]
919
- }
920
- ),
921
- activeMatch ? /* @__PURE__ */ jsxRuntime.jsxs(styledComponents.ActivePanel, { children: [
922
- /* @__PURE__ */ jsxRuntime.jsx(
923
- "div",
924
- {
925
- style: {
926
- padding: ".5em",
927
- background: theme.defaultTheme.backgroundAlt,
928
- position: "sticky",
929
- top: 0,
930
- bottom: 0,
931
- zIndex: 1
932
- },
933
- children: "Match Details"
934
- }
935
- ),
936
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
937
- "table",
938
- {
939
- style: {
940
- fontSize: "0.8rem"
941
- },
942
- children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
943
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
944
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { opacity: ".5" }, children: "ID" }),
945
- /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx(
946
- styledComponents.Code,
440
+ )
441
+ ] }),
442
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeaderInfo, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: "age / staleTime / gcTime" }) })
443
+ ] }),
444
+ !showMatches ? /* @__PURE__ */ jsxRuntime.jsx(
445
+ RouteComp,
446
+ {
447
+ route: router.routeTree,
448
+ isRoot: true,
449
+ activeId,
450
+ setActiveId
451
+ }
452
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: (routerState.status === "pending" ? routerState.pendingMatches ?? [] : routerState.matches).map((match, i) => {
453
+ return /* @__PURE__ */ jsxRuntime.jsxs(
454
+ "div",
947
455
  {
948
- style: {
949
- lineHeight: "1.8em"
950
- },
951
- children: JSON.stringify(activeMatch.id, null, 2)
952
- }
953
- ) })
456
+ role: "button",
457
+ "aria-label": `Open match details for ${match.id}`,
458
+ onClick: () => setActiveId(activeId === match.id ? "" : match.id),
459
+ className: clsx.clsx(styles.matchRow(match === activeMatch)),
460
+ children: [
461
+ /* @__PURE__ */ jsxRuntime.jsx(
462
+ "div",
463
+ {
464
+ className: clsx.clsx(
465
+ styles.matchIndicator(utils.getStatusColor(match))
466
+ )
467
+ }
468
+ ),
469
+ /* @__PURE__ */ jsxRuntime.jsx(
470
+ "code",
471
+ {
472
+ className: styles.matchID,
473
+ children: `${match.routeId === "__root__" ? "__root__" : match.pathname}`
474
+ }
475
+ ),
476
+ /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match })
477
+ ]
478
+ },
479
+ match.id || i
480
+ );
481
+ }) })
482
+ ] }),
483
+ ((_a = routerState.cachedMatches) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.cachedMatchesContainer, children: [
484
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.detailsHeader, children: [
485
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Cached Matches" }),
486
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeaderInfo, children: "age / staleTime / gcTime" })
954
487
  ] }),
955
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
956
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { opacity: ".5" }, children: "Status" }),
957
- /* @__PURE__ */ jsxRuntime.jsxs("td", { children: [
958
- ((_b = routerState.pendingMatches) == null ? void 0 : _b.find(
959
- (d) => d.id === activeMatch.id
960
- )) ? "Pending" : ((_c = routerState.matches) == null ? void 0 : _c.find(
961
- (d) => d.id === activeMatch.id
962
- )) ? "Active" : "Cached",
963
- " ",
964
- "- ",
965
- activeMatch.status
966
- ] })
488
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: routerState.cachedMatches.map((match) => {
489
+ return /* @__PURE__ */ jsxRuntime.jsxs(
490
+ "div",
491
+ {
492
+ role: "button",
493
+ "aria-label": `Open match details for ${match.id}`,
494
+ onClick: () => setActiveId(activeId === match.id ? "" : match.id),
495
+ className: clsx.clsx(styles.matchRow(match === activeMatch)),
496
+ children: [
497
+ /* @__PURE__ */ jsxRuntime.jsx(
498
+ "div",
499
+ {
500
+ className: clsx.clsx(
501
+ styles.matchIndicator(utils.getStatusColor(match))
502
+ )
503
+ }
504
+ ),
505
+ /* @__PURE__ */ jsxRuntime.jsx("code", { className: styles.matchID, children: `${match.id}` }),
506
+ /* @__PURE__ */ jsxRuntime.jsx(AgeTicker, { match })
507
+ ]
508
+ },
509
+ match.id
510
+ );
511
+ }) })
512
+ ] }) : null
513
+ ] }),
514
+ activeMatch ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.thirdContainer, children: [
515
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeader, children: "Match Details" }),
516
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.matchDetails, children: [
517
+ /* @__PURE__ */ jsxRuntime.jsx(
518
+ "div",
519
+ {
520
+ className: styles.matchStatus(
521
+ activeMatch.status,
522
+ activeMatch.isFetching
523
+ ),
524
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: activeMatch.status === "success" && activeMatch.isFetching ? "fetching" : activeMatch.status })
525
+ }
526
+ ),
527
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
528
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "ID:" }),
529
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.matchDetailsInfo, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: activeMatch.id }) })
530
+ ] }),
531
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "State:" }),
533
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.matchDetailsInfo, children: ((_b = routerState.pendingMatches) == null ? void 0 : _b.find(
534
+ (d) => d.id === activeMatch.id
535
+ )) ? "Pending" : ((_c = routerState.matches) == null ? void 0 : _c.find((d) => d.id === activeMatch.id)) ? "Active" : "Cached" })
967
536
  ] }),
968
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
969
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { opacity: ".5" }, children: "Last Updated" }),
970
- /* @__PURE__ */ jsxRuntime.jsx("td", { children: activeMatch.updatedAt ? new Date(
537
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
538
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Last Updated:" }),
539
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.matchDetailsInfo, children: activeMatch.updatedAt ? new Date(
971
540
  activeMatch.updatedAt
972
541
  ).toLocaleTimeString() : "N/A" })
973
542
  ] })
974
- ] })
975
- }
976
- ) }),
977
- activeMatch.loaderData ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
978
- /* @__PURE__ */ jsxRuntime.jsx(
979
- "div",
980
- {
981
- style: {
982
- background: theme.defaultTheme.backgroundAlt,
983
- padding: ".5em",
984
- position: "sticky",
985
- top: 0,
986
- bottom: 0,
987
- zIndex: 1
988
- },
989
- children: "Loader Data"
990
- }
991
- ),
992
- /* @__PURE__ */ jsxRuntime.jsx(
993
- "div",
994
- {
995
- style: {
996
- padding: ".5em"
997
- },
998
- children: /* @__PURE__ */ jsxRuntime.jsx(
543
+ ] }) }),
544
+ activeMatch.loaderData ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
545
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeader, children: "Loader Data" }),
546
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsxRuntime.jsx(
999
547
  Explorer.default,
1000
548
  {
1001
549
  label: "loaderData",
1002
550
  value: activeMatch.loaderData,
1003
551
  defaultExpanded: {}
1004
552
  }
1005
- )
1006
- }
1007
- )
1008
- ] }) : null,
1009
- /* @__PURE__ */ jsxRuntime.jsx(
1010
- "div",
1011
- {
1012
- style: {
1013
- background: theme.defaultTheme.backgroundAlt,
1014
- padding: ".5em",
1015
- position: "sticky",
1016
- top: 0,
1017
- bottom: 0,
1018
- zIndex: 1
1019
- },
1020
- children: "Explorer"
1021
- }
1022
- ),
1023
- /* @__PURE__ */ jsxRuntime.jsx(
1024
- "div",
1025
- {
1026
- style: {
1027
- padding: ".5em"
1028
- },
1029
- children: /* @__PURE__ */ jsxRuntime.jsx(
553
+ ) })
554
+ ] }) : null,
555
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeader, children: "Explorer" }),
556
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsxRuntime.jsx(Explorer.default, { label: "Match", value: activeMatch, defaultExpanded: {} }) })
557
+ ] }) : null,
558
+ hasSearch ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.fourthContainer, children: [
559
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsHeader, children: "Search Params" }),
560
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsxRuntime.jsx(
1030
561
  Explorer.default,
1031
562
  {
1032
- label: "Match",
1033
- value: activeMatch,
1034
- defaultExpanded: {}
563
+ value: routerState.location.search || {},
564
+ defaultExpanded: Object.keys(
565
+ routerState.location.search || {}
566
+ ).reduce((obj, next) => {
567
+ obj[next] = {};
568
+ return obj;
569
+ }, {})
1035
570
  }
1036
- )
1037
- }
1038
- )
1039
- ] }) : null,
1040
- hasSearch ? /* @__PURE__ */ jsxRuntime.jsxs(
1041
- "div",
1042
- {
1043
- style: {
1044
- flex: "1 1 500px",
1045
- minHeight: "40%",
1046
- maxHeight: "100%",
1047
- overflow: "auto",
1048
- borderRight: `1px solid ${theme.defaultTheme.grayAlt}`,
1049
- display: "flex",
1050
- flexDirection: "column"
1051
- },
1052
- children: [
1053
- /* @__PURE__ */ jsxRuntime.jsx(
1054
- "div",
1055
- {
1056
- style: {
1057
- padding: ".5em",
1058
- background: theme.defaultTheme.backgroundAlt,
1059
- position: "sticky",
1060
- top: 0,
1061
- bottom: 0,
1062
- zIndex: 1,
1063
- fontWeight: "bold"
1064
- },
1065
- children: "Search Params"
1066
- }
1067
- ),
1068
- /* @__PURE__ */ jsxRuntime.jsx(
1069
- "div",
1070
- {
1071
- style: {
1072
- padding: ".5em"
1073
- },
1074
- children: /* @__PURE__ */ jsxRuntime.jsx(
1075
- Explorer.default,
1076
- {
1077
- value: routerState.location.search || {},
1078
- defaultExpanded: Object.keys(
1079
- routerState.location.search || {}
1080
- ).reduce((obj, next) => {
1081
- obj[next] = {};
1082
- return obj;
1083
- }, {})
1084
- }
1085
- )
1086
- }
1087
- )
1088
- ]
1089
- }
1090
- ) : null
1091
- ] }) });
571
+ ) })
572
+ ] }) : null
573
+ ]
574
+ }
575
+ );
1092
576
  });
1093
577
  function AgeTicker({ match }) {
1094
578
  const router = reactRouter.useRouter();
@@ -1114,24 +598,13 @@ function AgeTicker({ match }) {
1114
598
  const age = Date.now() - (match == null ? void 0 : match.updatedAt);
1115
599
  const staleTime = route.options.staleTime ?? router.options.defaultStaleTime ?? 0;
1116
600
  const gcTime = route.options.gcTime ?? router.options.defaultGcTime ?? 30 * 60 * 1e3;
1117
- return /* @__PURE__ */ jsxRuntime.jsxs(
1118
- "div",
1119
- {
1120
- style: {
1121
- display: "inline-flex",
1122
- alignItems: "center",
1123
- gap: ".25rem",
1124
- color: age > staleTime ? theme.defaultTheme.warning : void 0
1125
- },
1126
- children: [
1127
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: {}, children: formatTime(age) }),
1128
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "/" }),
1129
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTime(staleTime) }),
1130
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: "/" }),
1131
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTime(gcTime) })
1132
- ]
1133
- }
1134
- );
601
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(styles.ageTicker(age > staleTime)), children: [
602
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTime(age) }),
603
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "/" }),
604
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTime(staleTime) }),
605
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "/" }),
606
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: formatTime(gcTime) })
607
+ ] });
1135
608
  }
1136
609
  function formatTime(ms) {
1137
610
  const units = ["s", "min", "h", "d"];
@@ -1149,6 +622,540 @@ function formatTime(ms) {
1149
622
  });
1150
623
  return formatter.format(values[chosenUnitIndex]) + units[chosenUnitIndex];
1151
624
  }
625
+ const stylesFactory = () => {
626
+ const { colors, font, size, alpha, shadow, border } = tokens.tokens;
627
+ const { fontFamily, lineHeight, size: fontSize } = font;
628
+ return {
629
+ devtoolsPanelContainer: goober.css`
630
+ direction: ltr;
631
+ position: fixed;
632
+ bottom: 0;
633
+ right: 0;
634
+ z-index: 99999;
635
+ width: 100%;
636
+ max-height: 90%;
637
+ border-top: 1px solid ${colors.gray[700]};
638
+ transform-origin: top;
639
+ `,
640
+ devtoolsPanelContainerVisibility: (isOpen) => {
641
+ return goober.css`
642
+ visibility: ${isOpen ? "visible" : "hidden"};
643
+ `;
644
+ },
645
+ devtoolsPanelContainerResizing: (isResizing) => {
646
+ if (isResizing) {
647
+ return goober.css`
648
+ transition: none;
649
+ `;
650
+ }
651
+ return goober.css`
652
+ transition: all 0.4s ease;
653
+ `;
654
+ },
655
+ devtoolsPanelContainerAnimation: (isOpen, height) => {
656
+ if (isOpen) {
657
+ return goober.css`
658
+ pointer-events: auto;
659
+ transform: translateY(0);
660
+ `;
661
+ }
662
+ return goober.css`
663
+ pointer-events: none;
664
+ transform: translateY(${height}px);
665
+ `;
666
+ },
667
+ logo: goober.css`
668
+ cursor: pointer;
669
+ display: flex;
670
+ flex-direction: column;
671
+ background-color: transparent;
672
+ border: none;
673
+ font-family: ${fontFamily.sans};
674
+ gap: ${tokens.tokens.size[0.5]};
675
+ padding: 0px;
676
+ &:hover {
677
+ opacity: 0.7;
678
+ }
679
+ &:focus-visible {
680
+ outline-offset: 4px;
681
+ border-radius: ${border.radius.xs};
682
+ outline: 2px solid ${colors.blue[800]};
683
+ }
684
+ `,
685
+ tanstackLogo: goober.css`
686
+ font-size: ${font.size.md};
687
+ font-weight: ${font.weight.bold};
688
+ line-height: ${font.lineHeight.xs};
689
+ white-space: nowrap;
690
+ color: ${colors.gray[300]};
691
+ `,
692
+ routerLogo: goober.css`
693
+ font-weight: ${font.weight.semibold};
694
+ font-size: ${font.size.xs};
695
+ background: linear-gradient(to right, #84cc16, #10b981);
696
+ background-clip: text;
697
+ -webkit-background-clip: text;
698
+ line-height: 1;
699
+ -webkit-text-fill-color: transparent;
700
+ white-space: nowrap;
701
+ `,
702
+ devtoolsPanel: goober.css`
703
+ display: flex;
704
+ font-size: ${fontSize.sm};
705
+ font-family: ${fontFamily.sans};
706
+ background-color: ${colors.darkGray[700]};
707
+ color: ${colors.gray[300]};
708
+
709
+ @media (max-width: 700px) {
710
+ flex-direction: column;
711
+ }
712
+ @media (max-width: 600px) {
713
+ font-size: ${fontSize.xs};
714
+ }
715
+ `,
716
+ dragHandle: goober.css`
717
+ position: absolute;
718
+ left: 0;
719
+ top: 0;
720
+ width: 100%;
721
+ height: 4px;
722
+ cursor: row-resize;
723
+ z-index: 100000;
724
+ &:hover {
725
+ background-color: ${colors.purple[400]}${alpha[90]};
726
+ }
727
+ `,
728
+ firstContainer: goober.css`
729
+ flex: 1 1 500px;
730
+ min-height: 40%;
731
+ max-height: 100%;
732
+ overflow: auto;
733
+ border-right: 1px solid ${colors.gray[700]};
734
+ display: flex;
735
+ flex-direction: column;
736
+ `,
737
+ routerExplorerContainer: goober.css`
738
+ overflow-y: auto;
739
+ flex: 1;
740
+ `,
741
+ routerExplorer: goober.css`
742
+ padding: ${tokens.tokens.size[2]};
743
+ `,
744
+ row: goober.css`
745
+ display: flex;
746
+ align-items: center;
747
+ padding: ${tokens.tokens.size[2]} ${tokens.tokens.size[2.5]};
748
+ gap: ${tokens.tokens.size[2.5]};
749
+ border-bottom: ${colors.darkGray[500]} 1px solid;
750
+ align-items: center;
751
+ `,
752
+ detailsHeader: goober.css`
753
+ font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
754
+ position: sticky;
755
+ top: 0;
756
+ z-index: 2;
757
+ background-color: ${colors.darkGray[600]};
758
+ padding: 0px ${tokens.tokens.size[2]};
759
+ font-weight: ${font.weight.medium};
760
+ font-size: ${font.size.xs};
761
+ min-height: ${tokens.tokens.size[8]};
762
+ line-height: ${font.lineHeight.xs};
763
+ text-align: left;
764
+ display: flex;
765
+ align-items: center;
766
+ `,
767
+ maskedBadge: goober.css`
768
+ background: ${colors.yellow[900]}${alpha[70]};
769
+ color: ${colors.yellow[300]};
770
+ display: inline-block;
771
+ padding: ${tokens.tokens.size[0]} ${tokens.tokens.size[2.5]};
772
+ border-radius: ${border.radius.full};
773
+ font-size: ${font.size.xs};
774
+ font-weight: ${font.weight.normal};
775
+ border: 1px solid ${colors.yellow[300]};
776
+ `,
777
+ maskedLocation: goober.css`
778
+ color: ${colors.yellow[300]};
779
+ `,
780
+ detailsContent: goober.css`
781
+ padding: ${tokens.tokens.size[1.5]} ${tokens.tokens.size[2]};
782
+ display: flex;
783
+ align-items: center;
784
+ font-size: ${font.size.xs};
785
+ `,
786
+ routeMatchesToggle: goober.css`
787
+ display: flex;
788
+ align-items: center;
789
+ border: 1px solid ${colors.gray[500]};
790
+ border-radius: ${border.radius.sm};
791
+ overflow: hidden;
792
+ `,
793
+ routeMatchesToggleBtn: (active, showBorder) => {
794
+ const base = goober.css`
795
+ appearance: none;
796
+ border: none;
797
+ font-size: 12px;
798
+ padding: 4px 8px;
799
+ background: transparent;
800
+ cursor: pointer;
801
+ font-family: ${fontFamily.sans};
802
+ font-weight: ${font.weight.medium};
803
+ `;
804
+ const classes = [base];
805
+ if (active) {
806
+ const activeStyles = goober.css`
807
+ background: ${colors.darkGray[400]};
808
+ color: ${colors.gray[300]};
809
+ `;
810
+ classes.push(activeStyles);
811
+ } else {
812
+ const inactiveStyles = goober.css`
813
+ color: ${colors.gray[500]};
814
+ background: ${colors.darkGray[800]}${alpha[20]};
815
+ `;
816
+ classes.push(inactiveStyles);
817
+ }
818
+ if (showBorder) {
819
+ const border2 = goober.css`
820
+ border-right: 1px solid ${tokens.tokens.colors.gray[500]};
821
+ `;
822
+ classes.push(border2);
823
+ }
824
+ return classes;
825
+ },
826
+ detailsHeaderInfo: goober.css`
827
+ flex: 1;
828
+ justify-content: flex-end;
829
+ display: flex;
830
+ align-items: center;
831
+ font-weight: ${font.weight.normal};
832
+ color: ${colors.gray[400]};
833
+ `,
834
+ matchRow: (active) => {
835
+ const base = goober.css`
836
+ display: flex;
837
+ border-bottom: 1px solid ${colors.darkGray[400]};
838
+ cursor: pointer;
839
+ align-items: center;
840
+ padding: ${size[1]} ${size[2]};
841
+ gap: ${size[2]};
842
+ font-size: ${fontSize.xs};
843
+ color: ${colors.gray[300]};
844
+ `;
845
+ const classes = [base];
846
+ if (active) {
847
+ const activeStyles = goober.css`
848
+ background: ${colors.darkGray[500]};
849
+ `;
850
+ classes.push(activeStyles);
851
+ }
852
+ return classes;
853
+ },
854
+ matchIndicator: (color) => {
855
+ const base = goober.css`
856
+ flex: 0 0 auto;
857
+ width: ${size[3]};
858
+ height: ${size[3]};
859
+ background: ${colors[color][900]};
860
+ border: 1px solid ${colors[color][500]};
861
+ border-radius: ${border.radius.full};
862
+ transition: all 0.25s ease-out;
863
+ box-sizing: border-box;
864
+ `;
865
+ const classes = [base];
866
+ if (color === "gray") {
867
+ const grayStyles = goober.css`
868
+ background: ${colors.gray[700]};
869
+ border-color: ${colors.gray[400]};
870
+ `;
871
+ classes.push(grayStyles);
872
+ }
873
+ return classes;
874
+ },
875
+ matchID: goober.css`
876
+ flex: 1;
877
+ line-height: ${lineHeight["xs"]};
878
+ `,
879
+ ageTicker: (showWarning) => {
880
+ const base = goober.css`
881
+ display: flex;
882
+ gap: ${size[1]};
883
+ font-size: ${fontSize.xs};
884
+ color: ${colors.gray[400]};
885
+ font-variant-numeric: tabular-nums;
886
+ line-height: ${lineHeight["xs"]};
887
+ `;
888
+ const classes = [base];
889
+ if (showWarning) {
890
+ const warningStyles = goober.css`
891
+ color: ${colors.yellow[400]};
892
+ `;
893
+ classes.push(warningStyles);
894
+ }
895
+ return classes;
896
+ },
897
+ secondContainer: goober.css`
898
+ flex: 1 1 500px;
899
+ min-height: 40%;
900
+ max-height: 100%;
901
+ overflow: auto;
902
+ border-right: 1px solid ${colors.gray[700]};
903
+ display: flex;
904
+ flex-direction: column;
905
+ `,
906
+ thirdContainer: goober.css`
907
+ flex: 1 1 500px;
908
+ overflow: auto;
909
+ display: flex;
910
+ flex-direction: column;
911
+ height: 100%;
912
+ border-right: 1px solid ${colors.gray[700]};
913
+
914
+ @media (max-width: 700px) {
915
+ border-top: 2px solid ${colors.gray[700]};
916
+ }
917
+ `,
918
+ fourthContainer: goober.css`
919
+ flex: 1 1 500px;
920
+ min-height: 40%;
921
+ max-height: 100%;
922
+ overflow: auto;
923
+ display: flex;
924
+ flex-direction: column;
925
+ `,
926
+ routesRowContainer: (active, isMatch) => {
927
+ const base = goober.css`
928
+ display: flex;
929
+ border-bottom: 1px solid ${colors.darkGray[400]};
930
+ align-items: center;
931
+ padding: ${size[1]} ${size[2]};
932
+ gap: ${size[2]};
933
+ font-size: ${fontSize.xs};
934
+ color: ${colors.gray[300]};
935
+ cursor: ${isMatch ? "pointer" : "default"};
936
+ line-height: ${lineHeight["xs"]};
937
+ `;
938
+ const classes = [base];
939
+ if (active) {
940
+ const activeStyles = goober.css`
941
+ background: ${colors.darkGray[500]};
942
+ `;
943
+ classes.push(activeStyles);
944
+ }
945
+ return classes;
946
+ },
947
+ routesRow: (isMatch) => {
948
+ const base = goober.css`
949
+ flex: 1 0 auto;
950
+ display: flex;
951
+ justify-content: space-between;
952
+ align-items: center;
953
+ font-size: ${fontSize.xs};
954
+ line-height: ${lineHeight["xs"]};
955
+ `;
956
+ const classes = [base];
957
+ if (!isMatch) {
958
+ const matchStyles = goober.css`
959
+ color: ${colors.gray[400]};
960
+ `;
961
+ classes.push(matchStyles);
962
+ }
963
+ return classes;
964
+ },
965
+ routeParamInfo: goober.css`
966
+ color: ${colors.gray[400]};
967
+ font-size: ${fontSize.xs};
968
+ line-height: ${lineHeight["xs"]};
969
+ `,
970
+ nestedRouteRow: (isRoot) => {
971
+ const base = goober.css`
972
+ margin-left: ${isRoot ? 0 : size[3.5]};
973
+ border-left: ${isRoot ? "" : `solid 1px ${colors.gray[700]}`};
974
+ `;
975
+ return base;
976
+ },
977
+ code: goober.css`
978
+ font-size: ${fontSize.xs};
979
+ line-height: ${lineHeight["xs"]};
980
+ `,
981
+ matchesContainer: goober.css`
982
+ flex: 1 1 auto;
983
+ overflow-y: auto;
984
+ `,
985
+ cachedMatchesContainer: goober.css`
986
+ flex: 1 1 auto;
987
+ overflow-y: auto;
988
+ max-height: 50%;
989
+ `,
990
+ maskedBadgeContainer: goober.css`
991
+ flex: 1;
992
+ justify-content: flex-end;
993
+ display: flex;
994
+ `,
995
+ matchDetails: goober.css`
996
+ display: flex;
997
+ flex-direction: column;
998
+ padding: ${tokens.tokens.size[2]};
999
+ font-size: ${tokens.tokens.font.size.xs};
1000
+ color: ${tokens.tokens.colors.gray[300]};
1001
+ line-height: ${tokens.tokens.font.lineHeight.sm};
1002
+ `,
1003
+ matchStatus: (status, isFetching) => {
1004
+ const colorMap = {
1005
+ pending: "yellow",
1006
+ success: "green",
1007
+ error: "red"
1008
+ };
1009
+ const color = isFetching && status === "success" ? "blue" : colorMap[status];
1010
+ return goober.css`
1011
+ display: flex;
1012
+ justify-content: center;
1013
+ align-items: center;
1014
+ height: 40px;
1015
+ border-radius: ${tokens.tokens.border.radius.sm};
1016
+ font-weight: ${tokens.tokens.font.weight.normal};
1017
+ background-color: ${tokens.tokens.colors[color][900]}${tokens.tokens.alpha[90]};
1018
+ color: ${tokens.tokens.colors[color][300]};
1019
+ border: 1px solid ${tokens.tokens.colors[color][600]};
1020
+ margin-bottom: ${tokens.tokens.size[2]};
1021
+ transition: all 0.25s ease-out;
1022
+ `;
1023
+ },
1024
+ matchDetailsInfo: goober.css`
1025
+ display: flex;
1026
+ justify-content: flex-end;
1027
+ flex: 1;
1028
+ `,
1029
+ matchDetailsInfoLabel: goober.css`
1030
+ display: flex;
1031
+ `,
1032
+ mainCloseBtn: goober.css`
1033
+ background: ${colors.darkGray[700]};
1034
+ padding: ${size[1]} ${size[2]} ${size[1]} ${size[1.5]};
1035
+ border-radius: ${border.radius.md};
1036
+ position: fixed;
1037
+ z-index: 99999;
1038
+ display: inline-flex;
1039
+ width: fit-content;
1040
+ cursor: pointer;
1041
+ appearance: none;
1042
+ border: 0;
1043
+ gap: 8px;
1044
+ align-items: center;
1045
+ border: 1px solid ${colors.gray[500]};
1046
+ font-size: ${font.size.xs};
1047
+ cursor: pointer;
1048
+ transition: all 0.25s ease-out;
1049
+
1050
+ &:hover {
1051
+ background: ${colors.darkGray[500]};
1052
+ }
1053
+ `,
1054
+ mainCloseBtnPosition: (position) => {
1055
+ const base = goober.css`
1056
+ ${position === "top-left" ? `top: ${size[2]}; left: ${size[2]};` : ""}
1057
+ ${position === "top-right" ? `top: ${size[2]}; right: ${size[2]};` : ""}
1058
+ ${position === "bottom-left" ? `bottom: ${size[2]}; left: ${size[2]};` : ""}
1059
+ ${position === "bottom-right" ? `bottom: ${size[2]}; right: ${size[2]};` : ""}
1060
+ `;
1061
+ return base;
1062
+ },
1063
+ mainCloseBtnAnimation: (isOpen) => {
1064
+ if (isOpen) {
1065
+ return goober.css`
1066
+ opacity: 1;
1067
+ pointer-events: auto;
1068
+ visibility: visible;
1069
+ `;
1070
+ }
1071
+ return goober.css`
1072
+ opacity: 0;
1073
+ pointer-events: none;
1074
+ visibility: hidden;
1075
+ `;
1076
+ },
1077
+ routerLogoCloseButton: goober.css`
1078
+ font-weight: ${font.weight.semibold};
1079
+ font-size: ${font.size.xs};
1080
+ background: linear-gradient(to right, #98f30c, #00f4a3);
1081
+ background-clip: text;
1082
+ -webkit-background-clip: text;
1083
+ line-height: 1;
1084
+ -webkit-text-fill-color: transparent;
1085
+ white-space: nowrap;
1086
+ `,
1087
+ mainCloseBtnDivider: goober.css`
1088
+ width: 1px;
1089
+ background: ${tokens.tokens.colors.gray[600]};
1090
+ height: 100%;
1091
+ border-radius: 999999px;
1092
+ color: transparent;
1093
+ `,
1094
+ mainCloseBtnIconContainer: goober.css`
1095
+ position: relative;
1096
+ width: ${size[5]};
1097
+ height: ${size[5]};
1098
+ background: pink;
1099
+ border-radius: 999999px;
1100
+ overflow: hidden;
1101
+ `,
1102
+ mainCloseBtnIconOuter: goober.css`
1103
+ width: ${size[5]};
1104
+ height: ${size[5]};
1105
+ position: absolute;
1106
+ top: 50%;
1107
+ left: 50%;
1108
+ transform: translate(-50%, -50%);
1109
+ filter: blur(3px) saturate(1.8) contrast(2);
1110
+ `,
1111
+ mainCloseBtnIconInner: goober.css`
1112
+ width: ${size[4]};
1113
+ height: ${size[4]};
1114
+ position: absolute;
1115
+ top: 50%;
1116
+ left: 50%;
1117
+ transform: translate(-50%, -50%);
1118
+ `,
1119
+ panelCloseBtn: goober.css`
1120
+ position: absolute;
1121
+ cursor: pointer;
1122
+ z-index: 100001;
1123
+ display: flex;
1124
+ align-items: center;
1125
+ justify-content: center;
1126
+ outline: none;
1127
+ background-color: ${colors.darkGray[700]};
1128
+ &:hover {
1129
+ background-color: ${colors.darkGray[500]};
1130
+ }
1131
+
1132
+ top: 0;
1133
+ right: ${size[2]};
1134
+ transform: translate(0, -100%);
1135
+ border-right: ${colors.darkGray[300]} 1px solid;
1136
+ border-left: ${colors.darkGray[300]} 1px solid;
1137
+ border-top: ${colors.darkGray[300]} 1px solid;
1138
+ border-bottom: none;
1139
+ border-radius: ${border.radius.sm} ${border.radius.sm} 0px 0px;
1140
+ padding: ${size[1]} ${size[1.5]} ${size[0.5]} ${size[1.5]};
1141
+
1142
+ &::after {
1143
+ content: ' ';
1144
+ position: absolute;
1145
+ top: 100%;
1146
+ left: -${size[2.5]};
1147
+ height: ${size[1.5]};
1148
+ width: calc(100% + ${size[5]});
1149
+ }
1150
+ `,
1151
+ panelCloseBtnIcon: goober.css`
1152
+ color: ${colors.gray[400]};
1153
+ width: ${size[2]};
1154
+ height: ${size[2]};
1155
+ `
1156
+ };
1157
+ };
1158
+ const styles = stylesFactory();
1152
1159
  exports.TanStackRouterDevtools = TanStackRouterDevtools;
1153
1160
  exports.TanStackRouterDevtoolsPanel = TanStackRouterDevtoolsPanel;
1154
1161
  //# sourceMappingURL=devtools.cjs.map