@tanstack/router-devtools 1.17.0 → 1.17.2

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.
@@ -8,12 +8,11 @@ import { clsx } from "clsx";
8
8
  import Explorer from "./Explorer.js";
9
9
  import { tokens } from "./tokens.js";
10
10
  import { TanStackLogo } from "./logo.js";
11
- const isServer = typeof window === "undefined";
12
11
  function Logo(props) {
13
12
  const { className, ...rest } = props;
14
- return /* @__PURE__ */ jsxs("button", { ...rest, className: clsx(styles.logo, className), children: [
15
- /* @__PURE__ */ jsx("div", { className: styles.tanstackLogo, children: "TANSTACK" }),
16
- /* @__PURE__ */ jsx("div", { className: styles.routerLogo, children: "React Router v1" })
13
+ return /* @__PURE__ */ jsxs("button", { ...rest, className: clsx(getStyles().logo, className), children: [
14
+ /* @__PURE__ */ jsx("div", { className: getStyles().tanstackLogo, children: "TANSTACK" }),
15
+ /* @__PURE__ */ jsx("div", { className: getStyles().routerLogo, children: "React Router v1" })
17
16
  ] });
18
17
  }
19
18
  const DevtoolsOnCloseContext = React__default.createContext(void 0);
@@ -35,7 +34,7 @@ function TanStackRouterDevtools({
35
34
  containerElement: Container = "footer",
36
35
  router
37
36
  }) {
38
- const rootRef = React__default.useRef(null);
37
+ const [rootEl, setRootEl] = React__default.useState(null);
39
38
  const panelRef = React__default.useRef(null);
40
39
  const [isOpen, setIsOpen] = useLocalStorage(
41
40
  "tanstackRouterDevtoolsOpen",
@@ -78,38 +77,37 @@ function TanStackRouterDevtools({
78
77
  React__default.useEffect(() => {
79
78
  setIsResolvedOpen(isOpen ?? false);
80
79
  }, [isOpen, isResolvedOpen, setIsResolvedOpen]);
81
- React__default[isServer ? "useEffect" : "useLayoutEffect"](() => {
82
- var _a, _b;
80
+ React__default.useEffect(() => {
81
+ var _a;
83
82
  if (isResolvedOpen) {
84
- const previousValue = (_b = (_a = rootRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.style.paddingBottom;
83
+ const previousValue = (_a = rootEl == null ? void 0 : rootEl.parentElement) == null ? void 0 : _a.style.paddingBottom;
85
84
  const run = () => {
86
- var _a2, _b2;
85
+ var _a2;
87
86
  const containerHeight = (_a2 = panelRef.current) == null ? void 0 : _a2.getBoundingClientRect().height;
88
- if ((_b2 = rootRef.current) == null ? void 0 : _b2.parentElement) {
89
- rootRef.current.parentElement.style.paddingBottom = `${containerHeight}px`;
87
+ if (rootEl == null ? void 0 : rootEl.parentElement) {
88
+ rootEl.parentElement.style.paddingBottom = `${containerHeight}px`;
90
89
  }
91
90
  };
92
91
  run();
93
92
  if (typeof window !== "undefined") {
94
93
  window.addEventListener("resize", run);
95
94
  return () => {
96
- var _a2;
97
95
  window.removeEventListener("resize", run);
98
- if (((_a2 = rootRef.current) == null ? void 0 : _a2.parentElement) && typeof previousValue === "string") {
99
- rootRef.current.parentElement.style.paddingBottom = previousValue;
96
+ if ((rootEl == null ? void 0 : rootEl.parentElement) && typeof previousValue === "string") {
97
+ rootEl.parentElement.style.paddingBottom = previousValue;
100
98
  }
101
99
  };
102
100
  }
103
101
  }
104
102
  return;
105
103
  }, [isResolvedOpen]);
106
- React__default[isServer ? "useEffect" : "useLayoutEffect"](() => {
107
- if (rootRef.current) {
108
- const el = rootRef.current;
104
+ React__default.useEffect(() => {
105
+ if (rootEl) {
106
+ const el = rootEl;
109
107
  const fontSize = getComputedStyle(el).fontSize;
110
108
  el.style.setProperty("--tsrd-font-size", fontSize);
111
109
  }
112
- }, [rootRef.current]);
110
+ }, [rootEl]);
113
111
  const { style: panelStyle = {}, ...otherPanelProps } = panelProps;
114
112
  const {
115
113
  style: closeButtonStyle = {},
@@ -124,7 +122,7 @@ function TanStackRouterDevtools({
124
122
  if (!isMounted())
125
123
  return null;
126
124
  const resolvedHeight = devtoolsHeight ?? 500;
127
- return /* @__PURE__ */ jsxs(Container, { ref: rootRef, className: "TanStackRouterDevtools", children: [
125
+ return /* @__PURE__ */ jsxs(Container, { ref: setRootEl, className: "TanStackRouterDevtools", children: [
128
126
  /* @__PURE__ */ jsx(
129
127
  DevtoolsOnCloseContext.Provider,
130
128
  {
@@ -139,10 +137,10 @@ function TanStackRouterDevtools({
139
137
  ...otherPanelProps,
140
138
  router,
141
139
  className: clsx(
142
- styles.devtoolsPanelContainer,
143
- styles.devtoolsPanelContainerVisibility(!!isOpen),
144
- styles.devtoolsPanelContainerResizing(isResizing),
145
- styles.devtoolsPanelContainerAnimation(
140
+ getStyles().devtoolsPanelContainer,
141
+ getStyles().devtoolsPanelContainerVisibility(!!isOpen),
142
+ getStyles().devtoolsPanelContainerResizing(isResizing),
143
+ getStyles().devtoolsPanelContainerAnimation(
146
144
  isResolvedOpen,
147
145
  resolvedHeight + 16
148
146
  )
@@ -169,17 +167,17 @@ function TanStackRouterDevtools({
169
167
  onToggleClick && onToggleClick(e);
170
168
  },
171
169
  className: clsx(
172
- styles.mainCloseBtn,
173
- styles.mainCloseBtnPosition(position),
174
- styles.mainCloseBtnAnimation(!isButtonClosed)
170
+ getStyles().mainCloseBtn,
171
+ getStyles().mainCloseBtnPosition(position),
172
+ getStyles().mainCloseBtnAnimation(!isButtonClosed)
175
173
  ),
176
174
  children: [
177
- /* @__PURE__ */ jsxs("div", { className: styles.mainCloseBtnIconContainer, children: [
178
- /* @__PURE__ */ jsx("div", { className: styles.mainCloseBtnIconOuter, children: /* @__PURE__ */ jsx(TanStackLogo, {}) }),
179
- /* @__PURE__ */ jsx("div", { className: styles.mainCloseBtnIconInner, children: /* @__PURE__ */ jsx(TanStackLogo, {}) })
175
+ /* @__PURE__ */ jsxs("div", { className: getStyles().mainCloseBtnIconContainer, children: [
176
+ /* @__PURE__ */ jsx("div", { className: getStyles().mainCloseBtnIconOuter, children: /* @__PURE__ */ jsx(TanStackLogo, {}) }),
177
+ /* @__PURE__ */ jsx("div", { className: getStyles().mainCloseBtnIconInner, children: /* @__PURE__ */ jsx(TanStackLogo, {}) })
180
178
  ] }),
181
- /* @__PURE__ */ jsx("div", { className: styles.mainCloseBtnDivider, children: "-" }),
182
- /* @__PURE__ */ jsx("div", { className: styles.routerLogoCloseButton, children: "React Router" })
179
+ /* @__PURE__ */ jsx("div", { className: getStyles().mainCloseBtnDivider, children: "-" }),
180
+ /* @__PURE__ */ jsx("div", { className: getStyles().routerLogoCloseButton, children: "React Router" })
183
181
  ]
184
182
  }
185
183
  )
@@ -224,31 +222,31 @@ function RouteComp({
224
222
  }
225
223
  },
226
224
  className: clsx(
227
- styles.routesRowContainer(route.id === activeId, !!match)
225
+ getStyles().routesRowContainer(route.id === activeId, !!match)
228
226
  ),
229
227
  children: [
230
228
  /* @__PURE__ */ jsx(
231
229
  "div",
232
230
  {
233
231
  className: clsx(
234
- styles.matchIndicator(getRouteStatusColor(matches, route))
232
+ getStyles().matchIndicator(getRouteStatusColor(matches, route))
235
233
  )
236
234
  }
237
235
  ),
238
- /* @__PURE__ */ jsxs("div", { className: clsx(styles.routesRow(!!match)), children: [
236
+ /* @__PURE__ */ jsxs("div", { className: clsx(getStyles().routesRow(!!match)), children: [
239
237
  /* @__PURE__ */ jsxs("div", { children: [
240
- /* @__PURE__ */ jsxs("code", { className: styles.code, children: [
238
+ /* @__PURE__ */ jsxs("code", { className: getStyles().code, children: [
241
239
  isRoot ? "__root__" : route.path || trimPath(route.id),
242
240
  " "
243
241
  ] }),
244
- /* @__PURE__ */ jsx("code", { className: styles.routeParamInfo, children: param })
242
+ /* @__PURE__ */ jsx("code", { className: getStyles().routeParamInfo, children: param })
245
243
  ] }),
246
244
  /* @__PURE__ */ jsx(AgeTicker, { match })
247
245
  ] })
248
246
  ]
249
247
  }
250
248
  ),
251
- ((_a = route.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx("div", { className: styles.nestedRouteRow(!!isRoot), children: [...route.children].sort((a, b) => {
249
+ ((_a = route.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx("div", { className: getStyles().nestedRouteRow(!!isRoot), children: [...route.children].sort((a, b) => {
252
250
  return a.rank - b.rank;
253
251
  }).map((r) => /* @__PURE__ */ jsx(
254
252
  RouteComp,
@@ -308,17 +306,23 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
308
306
  {
309
307
  ref,
310
308
  className: clsx(
311
- styles.devtoolsPanel,
309
+ getStyles().devtoolsPanel,
312
310
  "TanStackRouterDevtoolsPanel",
313
311
  className
314
312
  ),
315
313
  ...otherPanelProps,
316
314
  children: [
317
- handleDragStart ? /* @__PURE__ */ jsx("div", { className: styles.dragHandle, onMouseDown: handleDragStart }) : null,
315
+ handleDragStart ? /* @__PURE__ */ jsx(
316
+ "div",
317
+ {
318
+ className: getStyles().dragHandle,
319
+ onMouseDown: handleDragStart
320
+ }
321
+ ) : null,
318
322
  /* @__PURE__ */ jsx(
319
323
  "button",
320
324
  {
321
- className: styles.panelCloseBtn,
325
+ className: getStyles().panelCloseBtn,
322
326
  onClick: (e) => {
323
327
  setIsOpen(false);
324
328
  onCloseClick(e);
@@ -331,7 +335,7 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
331
335
  height: "6",
332
336
  fill: "none",
333
337
  viewBox: "0 0 10 6",
334
- className: styles.panelCloseBtnIcon,
338
+ className: getStyles().panelCloseBtnIcon,
335
339
  children: /* @__PURE__ */ jsx(
336
340
  "path",
337
341
  {
@@ -346,8 +350,8 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
346
350
  )
347
351
  }
348
352
  ),
349
- /* @__PURE__ */ jsxs("div", { className: styles.firstContainer, children: [
350
- /* @__PURE__ */ jsx("div", { className: styles.row, children: /* @__PURE__ */ jsx(
353
+ /* @__PURE__ */ jsxs("div", { className: getStyles().firstContainer, children: [
354
+ /* @__PURE__ */ jsx("div", { className: getStyles().row, children: /* @__PURE__ */ jsx(
351
355
  Logo,
352
356
  {
353
357
  "aria-hidden": true,
@@ -357,7 +361,7 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
357
361
  }
358
362
  }
359
363
  ) }),
360
- /* @__PURE__ */ jsx("div", { className: styles.routerExplorerContainer, children: /* @__PURE__ */ jsx("div", { className: styles.routerExplorer, children: /* @__PURE__ */ jsx(
364
+ /* @__PURE__ */ jsx("div", { className: getStyles().routerExplorerContainer, children: /* @__PURE__ */ jsx("div", { className: getStyles().routerExplorer, children: /* @__PURE__ */ jsx(
361
365
  Explorer,
362
366
  {
363
367
  label: "Router",
@@ -398,18 +402,18 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
398
402
  }
399
403
  ) }) })
400
404
  ] }),
401
- /* @__PURE__ */ jsxs("div", { className: styles.secondContainer, children: [
402
- /* @__PURE__ */ jsxs("div", { className: styles.matchesContainer, children: [
403
- /* @__PURE__ */ jsxs("div", { className: styles.detailsHeader, children: [
405
+ /* @__PURE__ */ jsxs("div", { className: getStyles().secondContainer, children: [
406
+ /* @__PURE__ */ jsxs("div", { className: getStyles().matchesContainer, children: [
407
+ /* @__PURE__ */ jsxs("div", { className: getStyles().detailsHeader, children: [
404
408
  /* @__PURE__ */ jsx("span", { children: "Pathname" }),
405
- routerState.location.maskedLocation ? /* @__PURE__ */ jsx("div", { className: styles.maskedBadgeContainer, children: /* @__PURE__ */ jsx("span", { className: styles.maskedBadge, children: "masked" }) }) : null
409
+ routerState.location.maskedLocation ? /* @__PURE__ */ jsx("div", { className: getStyles().maskedBadgeContainer, children: /* @__PURE__ */ jsx("span", { className: getStyles().maskedBadge, children: "masked" }) }) : null
406
410
  ] }),
407
- /* @__PURE__ */ jsxs("div", { className: styles.detailsContent, children: [
411
+ /* @__PURE__ */ jsxs("div", { className: getStyles().detailsContent, children: [
408
412
  /* @__PURE__ */ jsx("code", { children: routerState.location.pathname }),
409
- routerState.location.maskedLocation ? /* @__PURE__ */ jsx("code", { className: styles.maskedLocation, children: routerState.location.maskedLocation.pathname }) : null
413
+ routerState.location.maskedLocation ? /* @__PURE__ */ jsx("code", { className: getStyles().maskedLocation, children: routerState.location.maskedLocation.pathname }) : null
410
414
  ] }),
411
- /* @__PURE__ */ jsxs("div", { className: styles.detailsHeader, children: [
412
- /* @__PURE__ */ jsxs("div", { className: styles.routeMatchesToggle, children: [
415
+ /* @__PURE__ */ jsxs("div", { className: getStyles().detailsHeader, children: [
416
+ /* @__PURE__ */ jsxs("div", { className: getStyles().routeMatchesToggle, children: [
413
417
  /* @__PURE__ */ jsx(
414
418
  "button",
415
419
  {
@@ -418,7 +422,9 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
418
422
  setShowMatches(false);
419
423
  },
420
424
  disabled: !showMatches,
421
- className: clsx(styles.routeMatchesToggleBtn(!showMatches, true)),
425
+ className: clsx(
426
+ getStyles().routeMatchesToggleBtn(!showMatches, true)
427
+ ),
422
428
  children: "Routes"
423
429
  }
424
430
  ),
@@ -431,13 +437,13 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
431
437
  },
432
438
  disabled: showMatches,
433
439
  className: clsx(
434
- styles.routeMatchesToggleBtn(!!showMatches, false)
440
+ getStyles().routeMatchesToggleBtn(!!showMatches, false)
435
441
  ),
436
442
  children: "Matches"
437
443
  }
438
444
  )
439
445
  ] }),
440
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeaderInfo, children: /* @__PURE__ */ jsx("div", { children: "age / staleTime / gcTime" }) })
446
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeaderInfo, children: /* @__PURE__ */ jsx("div", { children: "age / staleTime / gcTime" }) })
441
447
  ] }),
442
448
  !showMatches ? /* @__PURE__ */ jsx(
443
449
  RouteComp,
@@ -454,20 +460,20 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
454
460
  role: "button",
455
461
  "aria-label": `Open match details for ${match.id}`,
456
462
  onClick: () => setActiveId(activeId === match.id ? "" : match.id),
457
- className: clsx(styles.matchRow(match === activeMatch)),
463
+ className: clsx(getStyles().matchRow(match === activeMatch)),
458
464
  children: [
459
465
  /* @__PURE__ */ jsx(
460
466
  "div",
461
467
  {
462
468
  className: clsx(
463
- styles.matchIndicator(getStatusColor(match))
469
+ getStyles().matchIndicator(getStatusColor(match))
464
470
  )
465
471
  }
466
472
  ),
467
473
  /* @__PURE__ */ jsx(
468
474
  "code",
469
475
  {
470
- className: styles.matchID,
476
+ className: getStyles().matchID,
471
477
  children: `${match.routeId === "__root__" ? "__root__" : match.pathname}`
472
478
  }
473
479
  ),
@@ -478,10 +484,10 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
478
484
  );
479
485
  }) })
480
486
  ] }),
481
- ((_a = routerState.cachedMatches) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxs("div", { className: styles.cachedMatchesContainer, children: [
482
- /* @__PURE__ */ jsxs("div", { className: styles.detailsHeader, children: [
487
+ ((_a = routerState.cachedMatches) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxs("div", { className: getStyles().cachedMatchesContainer, children: [
488
+ /* @__PURE__ */ jsxs("div", { className: getStyles().detailsHeader, children: [
483
489
  /* @__PURE__ */ jsx("div", { children: "Cached Matches" }),
484
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeaderInfo, children: "age / staleTime / gcTime" })
490
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeaderInfo, children: "age / staleTime / gcTime" })
485
491
  ] }),
486
492
  /* @__PURE__ */ jsx("div", { children: routerState.cachedMatches.map((match) => {
487
493
  return /* @__PURE__ */ jsxs(
@@ -490,17 +496,17 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
490
496
  role: "button",
491
497
  "aria-label": `Open match details for ${match.id}`,
492
498
  onClick: () => setActiveId(activeId === match.id ? "" : match.id),
493
- className: clsx(styles.matchRow(match === activeMatch)),
499
+ className: clsx(getStyles().matchRow(match === activeMatch)),
494
500
  children: [
495
501
  /* @__PURE__ */ jsx(
496
502
  "div",
497
503
  {
498
504
  className: clsx(
499
- styles.matchIndicator(getStatusColor(match))
505
+ getStyles().matchIndicator(getStatusColor(match))
500
506
  )
501
507
  }
502
508
  ),
503
- /* @__PURE__ */ jsx("code", { className: styles.matchID, children: `${match.id}` }),
509
+ /* @__PURE__ */ jsx("code", { className: getStyles().matchID, children: `${match.id}` }),
504
510
  /* @__PURE__ */ jsx(AgeTicker, { match })
505
511
  ]
506
512
  },
@@ -509,39 +515,39 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
509
515
  }) })
510
516
  ] }) : null
511
517
  ] }),
512
- activeMatch ? /* @__PURE__ */ jsxs("div", { className: styles.thirdContainer, children: [
513
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeader, children: "Match Details" }),
514
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.matchDetails, children: [
518
+ activeMatch ? /* @__PURE__ */ jsxs("div", { className: getStyles().thirdContainer, children: [
519
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeader, children: "Match Details" }),
520
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: getStyles().matchDetails, children: [
515
521
  /* @__PURE__ */ jsx(
516
522
  "div",
517
523
  {
518
- className: styles.matchStatus(
524
+ className: getStyles().matchStatus(
519
525
  activeMatch.status,
520
526
  activeMatch.isFetching
521
527
  ),
522
528
  children: /* @__PURE__ */ jsx("div", { children: activeMatch.status === "success" && activeMatch.isFetching ? "fetching" : activeMatch.status })
523
529
  }
524
530
  ),
525
- /* @__PURE__ */ jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
531
+ /* @__PURE__ */ jsxs("div", { className: getStyles().matchDetailsInfoLabel, children: [
526
532
  /* @__PURE__ */ jsx("div", { children: "ID:" }),
527
- /* @__PURE__ */ jsx("div", { className: styles.matchDetailsInfo, children: /* @__PURE__ */ jsx("code", { children: activeMatch.id }) })
533
+ /* @__PURE__ */ jsx("div", { className: getStyles().matchDetailsInfo, children: /* @__PURE__ */ jsx("code", { children: activeMatch.id }) })
528
534
  ] }),
529
- /* @__PURE__ */ jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
535
+ /* @__PURE__ */ jsxs("div", { className: getStyles().matchDetailsInfoLabel, children: [
530
536
  /* @__PURE__ */ jsx("div", { children: "State:" }),
531
- /* @__PURE__ */ jsx("div", { className: styles.matchDetailsInfo, children: ((_b = routerState.pendingMatches) == null ? void 0 : _b.find(
537
+ /* @__PURE__ */ jsx("div", { className: getStyles().matchDetailsInfo, children: ((_b = routerState.pendingMatches) == null ? void 0 : _b.find(
532
538
  (d) => d.id === activeMatch.id
533
539
  )) ? "Pending" : ((_c = routerState.matches) == null ? void 0 : _c.find((d) => d.id === activeMatch.id)) ? "Active" : "Cached" })
534
540
  ] }),
535
- /* @__PURE__ */ jsxs("div", { className: styles.matchDetailsInfoLabel, children: [
541
+ /* @__PURE__ */ jsxs("div", { className: getStyles().matchDetailsInfoLabel, children: [
536
542
  /* @__PURE__ */ jsx("div", { children: "Last Updated:" }),
537
- /* @__PURE__ */ jsx("div", { className: styles.matchDetailsInfo, children: activeMatch.updatedAt ? new Date(
543
+ /* @__PURE__ */ jsx("div", { className: getStyles().matchDetailsInfo, children: activeMatch.updatedAt ? new Date(
538
544
  activeMatch.updatedAt
539
545
  ).toLocaleTimeString() : "N/A" })
540
546
  ] })
541
547
  ] }) }),
542
548
  activeMatch.loaderData ? /* @__PURE__ */ jsxs(Fragment, { children: [
543
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeader, children: "Loader Data" }),
544
- /* @__PURE__ */ jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsx(
549
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeader, children: "Loader Data" }),
550
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsContent, children: /* @__PURE__ */ jsx(
545
551
  Explorer,
546
552
  {
547
553
  label: "loaderData",
@@ -550,12 +556,12 @@ const TanStackRouterDevtoolsPanel = React__default.forwardRef(function TanStackR
550
556
  }
551
557
  ) })
552
558
  ] }) : null,
553
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeader, children: "Explorer" }),
554
- /* @__PURE__ */ jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsx(Explorer, { label: "Match", value: activeMatch, defaultExpanded: {} }) })
559
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeader, children: "Explorer" }),
560
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsContent, children: /* @__PURE__ */ jsx(Explorer, { label: "Match", value: activeMatch, defaultExpanded: {} }) })
555
561
  ] }) : null,
556
- hasSearch ? /* @__PURE__ */ jsxs("div", { className: styles.fourthContainer, children: [
557
- /* @__PURE__ */ jsx("div", { className: styles.detailsHeader, children: "Search Params" }),
558
- /* @__PURE__ */ jsx("div", { className: styles.detailsContent, children: /* @__PURE__ */ jsx(
562
+ hasSearch ? /* @__PURE__ */ jsxs("div", { className: getStyles().fourthContainer, children: [
563
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsHeader, children: "Search Params" }),
564
+ /* @__PURE__ */ jsx("div", { className: getStyles().detailsContent, children: /* @__PURE__ */ jsx(
559
565
  Explorer,
560
566
  {
561
567
  value: routerState.location.search || {},
@@ -596,7 +602,7 @@ function AgeTicker({ match }) {
596
602
  const age = Date.now() - (match == null ? void 0 : match.updatedAt);
597
603
  const staleTime = route.options.staleTime ?? router.options.defaultStaleTime ?? 0;
598
604
  const gcTime = route.options.gcTime ?? router.options.defaultGcTime ?? 30 * 60 * 1e3;
599
- return /* @__PURE__ */ jsxs("div", { className: clsx(styles.ageTicker(age > staleTime)), children: [
605
+ return /* @__PURE__ */ jsxs("div", { className: clsx(getStyles().ageTicker(age > staleTime)), children: [
600
606
  /* @__PURE__ */ jsx("div", { children: formatTime(age) }),
601
607
  /* @__PURE__ */ jsx("div", { children: "/" }),
602
608
  /* @__PURE__ */ jsx("div", { children: formatTime(staleTime) }),
@@ -1153,7 +1159,13 @@ const stylesFactory = () => {
1153
1159
  `
1154
1160
  };
1155
1161
  };
1156
- const styles = stylesFactory();
1162
+ let _styles = null;
1163
+ function getStyles() {
1164
+ if (_styles)
1165
+ return _styles;
1166
+ _styles = stylesFactory();
1167
+ return _styles;
1168
+ }
1157
1169
  export {
1158
1170
  TanStackRouterDevtools,
1159
1171
  TanStackRouterDevtoolsPanel