@tanstack/router-devtools-core 1.20.3-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/cjs/AgeTicker.cjs +47 -0
  4. package/dist/cjs/AgeTicker.cjs.map +1 -0
  5. package/dist/cjs/AgeTicker.d.cts +6 -0
  6. package/dist/cjs/BaseTanStackRouterDevtoolsPanel.cjs +602 -0
  7. package/dist/cjs/BaseTanStackRouterDevtoolsPanel.cjs.map +1 -0
  8. package/dist/cjs/BaseTanStackRouterDevtoolsPanel.d.cts +35 -0
  9. package/dist/cjs/Explorer.cjs +307 -0
  10. package/dist/cjs/Explorer.cjs.map +1 -0
  11. package/dist/cjs/Explorer.d.cts +43 -0
  12. package/dist/cjs/FloatingTanStackRouterDevtools.cjs +204 -0
  13. package/dist/cjs/FloatingTanStackRouterDevtools.cjs.map +1 -0
  14. package/dist/cjs/FloatingTanStackRouterDevtools.d.cts +48 -0
  15. package/dist/cjs/NavigateButton.cjs +30 -0
  16. package/dist/cjs/NavigateButton.cjs.map +1 -0
  17. package/dist/cjs/NavigateButton.d.cts +7 -0
  18. package/dist/cjs/TanStackRouterDevtoolsCore.cjs +107 -0
  19. package/dist/cjs/TanStackRouterDevtoolsCore.cjs.map +1 -0
  20. package/dist/cjs/TanStackRouterDevtoolsCore.d.cts +55 -0
  21. package/dist/cjs/TanStackRouterDevtoolsPanelCore.cjs +107 -0
  22. package/dist/cjs/TanStackRouterDevtoolsPanelCore.cjs.map +1 -0
  23. package/dist/cjs/TanStackRouterDevtoolsPanelCore.d.cts +43 -0
  24. package/dist/cjs/context.cjs +20 -0
  25. package/dist/cjs/context.cjs.map +1 -0
  26. package/dist/cjs/context.d.cts +13 -0
  27. package/dist/cjs/index.cjs +7 -0
  28. package/dist/cjs/index.cjs.map +1 -0
  29. package/dist/cjs/index.d.cts +2 -0
  30. package/dist/cjs/logo.cjs +92 -0
  31. package/dist/cjs/logo.cjs.map +1 -0
  32. package/dist/cjs/logo.d.cts +1 -0
  33. package/dist/cjs/theme.d.cts +34 -0
  34. package/dist/cjs/tokens.cjs +201 -0
  35. package/dist/cjs/tokens.cjs.map +1 -0
  36. package/dist/cjs/tokens.d.cts +298 -0
  37. package/dist/cjs/useLocalStorage.cjs +42 -0
  38. package/dist/cjs/useLocalStorage.cjs.map +1 -0
  39. package/dist/cjs/useLocalStorage.d.cts +2 -0
  40. package/dist/cjs/useMediaQuery.d.cts +2 -0
  41. package/dist/cjs/useStyles.cjs +607 -0
  42. package/dist/cjs/useStyles.cjs.map +1 -0
  43. package/dist/cjs/useStyles.d.cts +55 -0
  44. package/dist/cjs/utils.cjs +63 -0
  45. package/dist/cjs/utils.cjs.map +1 -0
  46. package/dist/cjs/utils.d.cts +25 -0
  47. package/dist/esm/AgeTicker.d.ts +6 -0
  48. package/dist/esm/AgeTicker.js +47 -0
  49. package/dist/esm/AgeTicker.js.map +1 -0
  50. package/dist/esm/BaseTanStackRouterDevtoolsPanel.d.ts +35 -0
  51. package/dist/esm/BaseTanStackRouterDevtoolsPanel.js +602 -0
  52. package/dist/esm/BaseTanStackRouterDevtoolsPanel.js.map +1 -0
  53. package/dist/esm/Explorer.d.ts +43 -0
  54. package/dist/esm/Explorer.js +290 -0
  55. package/dist/esm/Explorer.js.map +1 -0
  56. package/dist/esm/FloatingTanStackRouterDevtools.d.ts +48 -0
  57. package/dist/esm/FloatingTanStackRouterDevtools.js +204 -0
  58. package/dist/esm/FloatingTanStackRouterDevtools.js.map +1 -0
  59. package/dist/esm/NavigateButton.d.ts +7 -0
  60. package/dist/esm/NavigateButton.js +30 -0
  61. package/dist/esm/NavigateButton.js.map +1 -0
  62. package/dist/esm/TanStackRouterDevtoolsCore.d.ts +55 -0
  63. package/dist/esm/TanStackRouterDevtoolsCore.js +107 -0
  64. package/dist/esm/TanStackRouterDevtoolsCore.js.map +1 -0
  65. package/dist/esm/TanStackRouterDevtoolsPanelCore.d.ts +43 -0
  66. package/dist/esm/TanStackRouterDevtoolsPanelCore.js +107 -0
  67. package/dist/esm/TanStackRouterDevtoolsPanelCore.js.map +1 -0
  68. package/dist/esm/context.d.ts +13 -0
  69. package/dist/esm/context.js +20 -0
  70. package/dist/esm/context.js.map +1 -0
  71. package/dist/esm/index.d.ts +2 -0
  72. package/dist/esm/index.js +7 -0
  73. package/dist/esm/index.js.map +1 -0
  74. package/dist/esm/logo.d.ts +1 -0
  75. package/dist/esm/logo.js +92 -0
  76. package/dist/esm/logo.js.map +1 -0
  77. package/dist/esm/theme.d.ts +34 -0
  78. package/dist/esm/tokens.d.ts +298 -0
  79. package/dist/esm/tokens.js +201 -0
  80. package/dist/esm/tokens.js.map +1 -0
  81. package/dist/esm/useLocalStorage.d.ts +2 -0
  82. package/dist/esm/useLocalStorage.js +43 -0
  83. package/dist/esm/useLocalStorage.js.map +1 -0
  84. package/dist/esm/useMediaQuery.d.ts +2 -0
  85. package/dist/esm/useStyles.d.ts +55 -0
  86. package/dist/esm/useStyles.js +590 -0
  87. package/dist/esm/useStyles.js.map +1 -0
  88. package/dist/esm/utils.d.ts +25 -0
  89. package/dist/esm/utils.js +63 -0
  90. package/dist/esm/utils.js.map +1 -0
  91. package/package.json +71 -0
  92. package/src/AgeTicker.tsx +59 -0
  93. package/src/BaseTanStackRouterDevtoolsPanel.tsx +632 -0
  94. package/src/Explorer.tsx +339 -0
  95. package/src/FloatingTanStackRouterDevtools.tsx +290 -0
  96. package/src/NavigateButton.tsx +25 -0
  97. package/src/TanStackRouterDevtoolsCore.tsx +152 -0
  98. package/src/TanStackRouterDevtoolsPanelCore.tsx +131 -0
  99. package/src/context.ts +24 -0
  100. package/src/index.tsx +2 -0
  101. package/src/logo.tsx +817 -0
  102. package/src/theme.tsx +36 -0
  103. package/src/tokens.ts +305 -0
  104. package/src/useLocalStorage.ts +52 -0
  105. package/src/useMediaQuery.ts +44 -0
  106. package/src/useStyles.tsx +614 -0
  107. package/src/utils.tsx +185 -0
@@ -0,0 +1,602 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const web = require("solid-js/web");
4
+ const clsx = require("clsx");
5
+ const invariant = require("tiny-invariant");
6
+ const routerCore = require("@tanstack/router-core");
7
+ const solidJs = require("solid-js");
8
+ const context = require("./context.cjs");
9
+ const useStyles = require("./useStyles.cjs");
10
+ const useLocalStorage = require("./useLocalStorage.cjs");
11
+ const Explorer = require("./Explorer.cjs");
12
+ const utils = require("./utils.cjs");
13
+ const AgeTicker = require("./AgeTicker.cjs");
14
+ const NavigateButton = require("./NavigateButton.cjs");
15
+ var _tmpl$ = /* @__PURE__ */ web.template(`<button><div>TANSTACK</div><div>TanStack Router v1`), _tmpl$2 = /* @__PURE__ */ web.template(`<div><div>`), _tmpl$3 = /* @__PURE__ */ web.template(`<code> `), _tmpl$4 = /* @__PURE__ */ web.template(`<code>`), _tmpl$5 = /* @__PURE__ */ web.template(`<div><div role=button><div>`), _tmpl$6 = /* @__PURE__ */ web.template(`<div>`), _tmpl$7 = /* @__PURE__ */ web.template(`<div><button><svg xmlns=http://www.w3.org/2000/svg width=10 height=6 fill=none viewBox="0 0 10 6"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.667 d="M1 1l4 4 4-4"></path></svg></button><div><div></div><div><div></div></div></div><div><div><div><span>Pathname</span></div><div><code></code></div><div><div><button type=button>Routes</button><button type=button>Matches</button></div><div><div>age / staleTime / gcTime</div></div></div><div>`), _tmpl$8 = /* @__PURE__ */ web.template(`<div><span>masked`), _tmpl$9 = /* @__PURE__ */ web.template(`<div role=button><div>`), _tmpl$10 = /* @__PURE__ */ web.template(`<div><div><div>Cached Matches</div><div>age / staleTime / gcTime</div></div><div>`), _tmpl$11 = /* @__PURE__ */ web.template(`<div><div>Match Details</div><div><div><div><div></div></div><div><div>ID:</div><div><code></code></div></div><div><div>State:</div><div></div></div><div><div>Last Updated:</div><div></div></div></div></div><div>Explorer</div><div>`), _tmpl$12 = /* @__PURE__ */ web.template(`<div>Loader Data`), _tmpl$13 = /* @__PURE__ */ web.template(`<div><div>Search Params</div><div>`);
16
+ function Logo(props) {
17
+ const {
18
+ className,
19
+ ...rest
20
+ } = props;
21
+ const styles = useStyles.useStyles();
22
+ return (() => {
23
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
24
+ web.spread(_el$, web.mergeProps(rest, {
25
+ get ["class"]() {
26
+ return clsx.clsx(styles().logo, className ? className() : "");
27
+ }
28
+ }), false, true);
29
+ web.effect((_p$) => {
30
+ var _v$ = styles().tanstackLogo, _v$2 = styles().routerLogo;
31
+ _v$ !== _p$.e && web.className(_el$2, _p$.e = _v$);
32
+ _v$2 !== _p$.t && web.className(_el$3, _p$.t = _v$2);
33
+ return _p$;
34
+ }, {
35
+ e: void 0,
36
+ t: void 0
37
+ });
38
+ return _el$;
39
+ })();
40
+ }
41
+ function NavigateLink(props) {
42
+ return (() => {
43
+ var _el$4 = _tmpl$2(), _el$5 = _el$4.firstChild;
44
+ _el$4.style.setProperty("display", "flex");
45
+ _el$4.style.setProperty("align-items", "center");
46
+ _el$4.style.setProperty("width", "100%");
47
+ web.insert(_el$4, () => props.left, _el$5);
48
+ _el$5.style.setProperty("flex-grow", "1");
49
+ _el$5.style.setProperty("min-width", "0");
50
+ web.insert(_el$5, () => props.children);
51
+ web.insert(_el$4, () => props.right, null);
52
+ web.effect(() => web.className(_el$4, props.class));
53
+ return _el$4;
54
+ })();
55
+ }
56
+ function RouteComp({
57
+ routerState,
58
+ router,
59
+ route,
60
+ isRoot,
61
+ activeId,
62
+ setActiveId
63
+ }) {
64
+ const styles = useStyles.useStyles();
65
+ const matches = solidJs.createMemo(() => routerState().pendingMatches || routerState().matches);
66
+ const match = solidJs.createMemo(() => routerState().matches.find((d) => d.routeId === route.id));
67
+ const param = solidJs.createMemo(() => {
68
+ var _a, _b;
69
+ try {
70
+ if ((_a = match()) == null ? void 0 : _a.params) {
71
+ const p = (_b = match()) == null ? void 0 : _b.params;
72
+ const r = route.path || routerCore.trimPath(route.id);
73
+ if (r.startsWith("$")) {
74
+ const trimmed = r.slice(1);
75
+ if (p[trimmed]) {
76
+ return `(${p[trimmed]})`;
77
+ }
78
+ }
79
+ }
80
+ return "";
81
+ } catch (error) {
82
+ return "";
83
+ }
84
+ });
85
+ const navigationTarget = solidJs.createMemo(() => {
86
+ if (isRoot) return void 0;
87
+ if (!route.path) return void 0;
88
+ const allParams = Object.assign({}, ...matches().map((m) => m.params));
89
+ const interpolated = routerCore.interpolatePath({
90
+ path: route.fullPath,
91
+ params: allParams,
92
+ leaveWildcards: false,
93
+ leaveParams: false,
94
+ decodeCharMap: router().pathParamsDecodeCharMap
95
+ });
96
+ return !interpolated.isMissingParams ? interpolated.interpolatedPath : void 0;
97
+ });
98
+ return (() => {
99
+ var _el$6 = _tmpl$5(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
100
+ _el$7.$$click = () => {
101
+ if (match()) {
102
+ setActiveId(activeId() === route.id ? "" : route.id);
103
+ }
104
+ };
105
+ web.insert(_el$7, web.createComponent(NavigateLink, {
106
+ get ["class"]() {
107
+ return clsx.clsx(styles().routesRow(!!match()));
108
+ },
109
+ get left() {
110
+ return web.createComponent(solidJs.Show, {
111
+ get when() {
112
+ return navigationTarget();
113
+ },
114
+ children: (navigate) => web.createComponent(NavigateButton.NavigateButton, {
115
+ get to() {
116
+ return navigate();
117
+ },
118
+ router
119
+ })
120
+ });
121
+ },
122
+ get right() {
123
+ return web.createComponent(AgeTicker.AgeTicker, {
124
+ get match() {
125
+ return match();
126
+ },
127
+ router
128
+ });
129
+ },
130
+ get children() {
131
+ return [(() => {
132
+ var _el$9 = _tmpl$3(), _el$10 = _el$9.firstChild;
133
+ web.insert(_el$9, () => isRoot ? routerCore.rootRouteId : route.path || routerCore.trimPath(route.id), _el$10);
134
+ web.effect(() => web.className(_el$9, styles().code));
135
+ return _el$9;
136
+ })(), (() => {
137
+ var _el$11 = _tmpl$4();
138
+ web.insert(_el$11, param);
139
+ web.effect(() => web.className(_el$11, styles().routeParamInfo));
140
+ return _el$11;
141
+ })()];
142
+ }
143
+ }), null);
144
+ web.insert(_el$6, (() => {
145
+ var _c$ = web.memo(() => {
146
+ var _a;
147
+ return !!((_a = route.children) == null ? void 0 : _a.length);
148
+ });
149
+ return () => _c$() ? (() => {
150
+ var _el$12 = _tmpl$6();
151
+ web.insert(_el$12, () => [...route.children].sort((a, b) => {
152
+ return a.rank - b.rank;
153
+ }).map((r) => web.createComponent(RouteComp, {
154
+ routerState,
155
+ router,
156
+ route: r,
157
+ activeId,
158
+ setActiveId
159
+ })));
160
+ web.effect(() => web.className(_el$12, styles().nestedRouteRow(!!isRoot)));
161
+ return _el$12;
162
+ })() : null;
163
+ })(), null);
164
+ web.effect((_p$) => {
165
+ var _v$3 = `Open match details for ${route.id}`, _v$4 = clsx.clsx(styles().routesRowContainer(route.id === activeId(), !!match())), _v$5 = clsx.clsx(styles().matchIndicator(utils.getRouteStatusColor(matches(), route)));
166
+ _v$3 !== _p$.e && web.setAttribute(_el$7, "aria-label", _p$.e = _v$3);
167
+ _v$4 !== _p$.t && web.className(_el$7, _p$.t = _v$4);
168
+ _v$5 !== _p$.a && web.className(_el$8, _p$.a = _v$5);
169
+ return _p$;
170
+ }, {
171
+ e: void 0,
172
+ t: void 0,
173
+ a: void 0
174
+ });
175
+ return _el$6;
176
+ })();
177
+ }
178
+ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel2({
179
+ ...props
180
+ }) {
181
+ const {
182
+ isOpen = true,
183
+ setIsOpen,
184
+ handleDragStart,
185
+ router,
186
+ routerState,
187
+ shadowDOMTarget,
188
+ ...panelProps
189
+ } = props;
190
+ const {
191
+ onCloseClick
192
+ } = context.useDevtoolsOnClose();
193
+ const styles = useStyles.useStyles();
194
+ const {
195
+ className,
196
+ style,
197
+ ...otherPanelProps
198
+ } = panelProps;
199
+ invariant(router, "No router was found for the TanStack Router Devtools. Please place the devtools in the <RouterProvider> component tree or pass the router instance to the devtools manually.");
200
+ const [showMatches, setShowMatches] = useLocalStorage("tanstackRouterDevtoolsShowMatches", true);
201
+ const [activeId, setActiveId] = useLocalStorage("tanstackRouterDevtoolsActiveRouteId", "");
202
+ const activeMatch = solidJs.createMemo(() => {
203
+ const matches = [...routerState().pendingMatches ?? [], ...routerState().matches, ...routerState().cachedMatches];
204
+ return matches.find((d) => d.routeId === activeId() || d.id === activeId());
205
+ });
206
+ const hasSearch = solidJs.createMemo(() => Object.keys(routerState().location.search).length);
207
+ const explorerState = solidJs.createMemo(() => {
208
+ return {
209
+ ...router(),
210
+ state: routerState()
211
+ };
212
+ });
213
+ const routerExplorerValue = solidJs.createMemo(() => Object.fromEntries(utils.multiSortBy(Object.keys(explorerState()), ["state", "routesById", "routesByPath", "flatRoutes", "options", "manifest"].map((d) => (dd) => dd !== d)).map((key) => [key, explorerState()[key]]).filter((d) => typeof d[1] !== "function" && !["__store", "basepath", "injectedHtml", "subscribers", "latestLoadPromise", "navigateTimeout", "resetNextScroll", "tempLocationKey", "latestLocation", "routeTree", "history"].includes(d[0]))));
214
+ const activeMatchLoaderData = solidJs.createMemo(() => {
215
+ var _a;
216
+ return (_a = activeMatch()) == null ? void 0 : _a.loaderData;
217
+ });
218
+ const activeMatchValue = solidJs.createMemo(() => activeMatch());
219
+ const locationSearchValue = solidJs.createMemo(() => routerState().location.search);
220
+ return (() => {
221
+ var _el$13 = _tmpl$7(), _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$14.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$16.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild;
222
+ _el$22.firstChild;
223
+ var _el$24 = _el$22.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$24.nextSibling, _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$27.nextSibling, _el$31 = _el$26.nextSibling;
224
+ web.spread(_el$13, web.mergeProps({
225
+ get ["class"]() {
226
+ return clsx.clsx(styles().devtoolsPanel, "TanStackRouterDevtoolsPanel", className ? className() : "");
227
+ },
228
+ get style() {
229
+ return style ? style() : "";
230
+ }
231
+ }, otherPanelProps), false, true);
232
+ web.insert(_el$13, handleDragStart ? (() => {
233
+ var _el$32 = _tmpl$6();
234
+ web.addEventListener(_el$32, "mousedown", handleDragStart, true);
235
+ web.effect(() => web.className(_el$32, styles().dragHandle));
236
+ return _el$32;
237
+ })() : null, _el$14);
238
+ _el$14.$$click = (e) => {
239
+ if (setIsOpen) {
240
+ setIsOpen(false);
241
+ }
242
+ onCloseClick(e);
243
+ };
244
+ web.insert(_el$17, web.createComponent(Logo, {
245
+ "aria-hidden": true,
246
+ onClick: (e) => {
247
+ if (setIsOpen) {
248
+ setIsOpen(false);
249
+ }
250
+ onCloseClick(e);
251
+ }
252
+ }));
253
+ web.insert(_el$19, web.createComponent(Explorer.Explorer, {
254
+ label: "Router",
255
+ value: routerExplorerValue,
256
+ defaultExpanded: {
257
+ state: {},
258
+ context: {},
259
+ options: {}
260
+ },
261
+ filterSubEntries: (subEntries) => {
262
+ return subEntries.filter((d) => typeof d.value() !== "function");
263
+ }
264
+ }));
265
+ web.insert(_el$22, (() => {
266
+ var _c$2 = web.memo(() => !!routerState().location.maskedLocation);
267
+ return () => _c$2() ? (() => {
268
+ var _el$33 = _tmpl$8(), _el$34 = _el$33.firstChild;
269
+ web.effect((_p$) => {
270
+ var _v$24 = styles().maskedBadgeContainer, _v$25 = styles().maskedBadge;
271
+ _v$24 !== _p$.e && web.className(_el$33, _p$.e = _v$24);
272
+ _v$25 !== _p$.t && web.className(_el$34, _p$.t = _v$25);
273
+ return _p$;
274
+ }, {
275
+ e: void 0,
276
+ t: void 0
277
+ });
278
+ return _el$33;
279
+ })() : null;
280
+ })(), null);
281
+ web.insert(_el$25, () => routerState().location.pathname);
282
+ web.insert(_el$24, (() => {
283
+ var _c$3 = web.memo(() => !!routerState().location.maskedLocation);
284
+ return () => _c$3() ? (() => {
285
+ var _el$35 = _tmpl$4();
286
+ web.insert(_el$35, () => {
287
+ var _a;
288
+ return (_a = routerState().location.maskedLocation) == null ? void 0 : _a.pathname;
289
+ });
290
+ web.effect(() => web.className(_el$35, styles().maskedLocation));
291
+ return _el$35;
292
+ })() : null;
293
+ })(), null);
294
+ _el$28.$$click = () => {
295
+ setShowMatches(false);
296
+ };
297
+ _el$29.$$click = () => {
298
+ setShowMatches(true);
299
+ };
300
+ web.insert(_el$31, (() => {
301
+ var _c$4 = web.memo(() => !!!showMatches());
302
+ return () => _c$4() ? web.createComponent(RouteComp, {
303
+ routerState,
304
+ router,
305
+ get route() {
306
+ return router().routeTree;
307
+ },
308
+ isRoot: true,
309
+ activeId,
310
+ setActiveId
311
+ }) : (() => {
312
+ var _el$36 = _tmpl$6();
313
+ web.insert(_el$36, () => {
314
+ var _a, _b;
315
+ return (_b = ((_a = routerState().pendingMatches) == null ? void 0 : _a.length) ? routerState().pendingMatches : routerState().matches) == null ? void 0 : _b.map((match, _i) => {
316
+ return (() => {
317
+ var _el$37 = _tmpl$9(), _el$38 = _el$37.firstChild;
318
+ _el$37.$$click = () => setActiveId(activeId() === match.id ? "" : match.id);
319
+ web.insert(_el$37, web.createComponent(NavigateLink, {
320
+ get left() {
321
+ return web.createComponent(NavigateButton.NavigateButton, {
322
+ get to() {
323
+ return match.pathname;
324
+ },
325
+ get params() {
326
+ return match.params;
327
+ },
328
+ get search() {
329
+ return match.search;
330
+ },
331
+ router
332
+ });
333
+ },
334
+ get right() {
335
+ return web.createComponent(AgeTicker.AgeTicker, {
336
+ match,
337
+ router
338
+ });
339
+ },
340
+ get children() {
341
+ var _el$39 = _tmpl$4();
342
+ web.insert(_el$39, () => `${match.routeId === routerCore.rootRouteId ? routerCore.rootRouteId : match.pathname}`);
343
+ web.effect(() => web.className(_el$39, styles().matchID));
344
+ return _el$39;
345
+ }
346
+ }), null);
347
+ web.effect((_p$) => {
348
+ var _v$26 = `Open match details for ${match.id}`, _v$27 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$28 = clsx.clsx(styles().matchIndicator(utils.getStatusColor(match)));
349
+ _v$26 !== _p$.e && web.setAttribute(_el$37, "aria-label", _p$.e = _v$26);
350
+ _v$27 !== _p$.t && web.className(_el$37, _p$.t = _v$27);
351
+ _v$28 !== _p$.a && web.className(_el$38, _p$.a = _v$28);
352
+ return _p$;
353
+ }, {
354
+ e: void 0,
355
+ t: void 0,
356
+ a: void 0
357
+ });
358
+ return _el$37;
359
+ })();
360
+ });
361
+ });
362
+ return _el$36;
363
+ })();
364
+ })());
365
+ web.insert(_el$20, (() => {
366
+ var _c$5 = web.memo(() => !!routerState().cachedMatches.length);
367
+ return () => _c$5() ? (() => {
368
+ var _el$40 = _tmpl$10(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling, _el$44 = _el$41.nextSibling;
369
+ web.insert(_el$44, () => routerState().cachedMatches.map((match) => {
370
+ return (() => {
371
+ var _el$45 = _tmpl$9(), _el$46 = _el$45.firstChild;
372
+ _el$45.$$click = () => setActiveId(activeId() === match.id ? "" : match.id);
373
+ web.insert(_el$45, web.createComponent(NavigateLink, {
374
+ get left() {
375
+ return web.createComponent(NavigateButton.NavigateButton, {
376
+ get to() {
377
+ return match.pathname;
378
+ },
379
+ get params() {
380
+ return match.params;
381
+ },
382
+ get search() {
383
+ return match.search;
384
+ },
385
+ router
386
+ });
387
+ },
388
+ get right() {
389
+ return web.createComponent(AgeTicker.AgeTicker, {
390
+ match,
391
+ router
392
+ });
393
+ },
394
+ get children() {
395
+ var _el$47 = _tmpl$4();
396
+ web.insert(_el$47, () => `${match.id}`);
397
+ web.effect(() => web.className(_el$47, styles().matchID));
398
+ return _el$47;
399
+ }
400
+ }), null);
401
+ web.effect((_p$) => {
402
+ var _v$32 = `Open match details for ${match.id}`, _v$33 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$34 = clsx.clsx(styles().matchIndicator(utils.getStatusColor(match)));
403
+ _v$32 !== _p$.e && web.setAttribute(_el$45, "aria-label", _p$.e = _v$32);
404
+ _v$33 !== _p$.t && web.className(_el$45, _p$.t = _v$33);
405
+ _v$34 !== _p$.a && web.className(_el$46, _p$.a = _v$34);
406
+ return _p$;
407
+ }, {
408
+ e: void 0,
409
+ t: void 0,
410
+ a: void 0
411
+ });
412
+ return _el$45;
413
+ })();
414
+ }));
415
+ web.effect((_p$) => {
416
+ var _v$29 = styles().cachedMatchesContainer, _v$30 = styles().detailsHeader, _v$31 = styles().detailsHeaderInfo;
417
+ _v$29 !== _p$.e && web.className(_el$40, _p$.e = _v$29);
418
+ _v$30 !== _p$.t && web.className(_el$41, _p$.t = _v$30);
419
+ _v$31 !== _p$.a && web.className(_el$43, _p$.a = _v$31);
420
+ return _p$;
421
+ }, {
422
+ e: void 0,
423
+ t: void 0,
424
+ a: void 0
425
+ });
426
+ return _el$40;
427
+ })() : null;
428
+ })(), null);
429
+ web.insert(_el$13, (() => {
430
+ var _c$6 = web.memo(() => {
431
+ var _a;
432
+ return !!(activeMatch() && ((_a = activeMatch()) == null ? void 0 : _a.status));
433
+ });
434
+ return () => _c$6() ? (() => {
435
+ var _el$48 = _tmpl$11(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling, _el$51 = _el$50.firstChild, _el$52 = _el$51.firstChild, _el$53 = _el$52.firstChild, _el$54 = _el$52.nextSibling, _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$54.nextSibling, _el$59 = _el$58.firstChild, _el$60 = _el$59.nextSibling, _el$61 = _el$58.nextSibling, _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$50.nextSibling, _el$65 = _el$64.nextSibling;
436
+ web.insert(_el$53, (() => {
437
+ var _c$8 = web.memo(() => {
438
+ var _a, _b;
439
+ return !!(((_a = activeMatch()) == null ? void 0 : _a.status) === "success" && ((_b = activeMatch()) == null ? void 0 : _b.isFetching));
440
+ });
441
+ return () => {
442
+ var _a;
443
+ return _c$8() ? "fetching" : (_a = activeMatch()) == null ? void 0 : _a.status;
444
+ };
445
+ })());
446
+ web.insert(_el$57, () => {
447
+ var _a;
448
+ return (_a = activeMatch()) == null ? void 0 : _a.id;
449
+ });
450
+ web.insert(_el$60, (() => {
451
+ var _c$9 = web.memo(() => {
452
+ var _a;
453
+ return !!((_a = routerState().pendingMatches) == null ? void 0 : _a.find((d) => {
454
+ var _a2;
455
+ return d.id === ((_a2 = activeMatch()) == null ? void 0 : _a2.id);
456
+ }));
457
+ });
458
+ return () => _c$9() ? "Pending" : routerState().matches.find((d) => {
459
+ var _a;
460
+ return d.id === ((_a = activeMatch()) == null ? void 0 : _a.id);
461
+ }) ? "Active" : "Cached";
462
+ })());
463
+ web.insert(_el$63, (() => {
464
+ var _c$10 = web.memo(() => {
465
+ var _a;
466
+ return !!((_a = activeMatch()) == null ? void 0 : _a.updatedAt);
467
+ });
468
+ return () => {
469
+ var _a;
470
+ return _c$10() ? new Date((_a = activeMatch()) == null ? void 0 : _a.updatedAt).toLocaleTimeString() : "N/A";
471
+ };
472
+ })());
473
+ web.insert(_el$48, (() => {
474
+ var _c$11 = web.memo(() => !!activeMatchLoaderData());
475
+ return () => _c$11() ? [(() => {
476
+ var _el$66 = _tmpl$12();
477
+ web.effect(() => web.className(_el$66, styles().detailsHeader));
478
+ return _el$66;
479
+ })(), (() => {
480
+ var _el$67 = _tmpl$6();
481
+ web.insert(_el$67, web.createComponent(Explorer.Explorer, {
482
+ label: "loaderData",
483
+ value: activeMatchLoaderData,
484
+ defaultExpanded: {}
485
+ }));
486
+ web.effect(() => web.className(_el$67, styles().detailsContent));
487
+ return _el$67;
488
+ })()] : null;
489
+ })(), _el$64);
490
+ web.insert(_el$65, web.createComponent(Explorer.Explorer, {
491
+ label: "Match",
492
+ value: activeMatchValue,
493
+ defaultExpanded: {}
494
+ }));
495
+ web.effect((_p$) => {
496
+ var _a, _b;
497
+ var _v$35 = styles().thirdContainer, _v$36 = styles().detailsHeader, _v$37 = styles().matchDetails, _v$38 = styles().matchStatus((_a = activeMatch()) == null ? void 0 : _a.status, (_b = activeMatch()) == null ? void 0 : _b.isFetching), _v$39 = styles().matchDetailsInfoLabel, _v$40 = styles().matchDetailsInfo, _v$41 = styles().matchDetailsInfoLabel, _v$42 = styles().matchDetailsInfo, _v$43 = styles().matchDetailsInfoLabel, _v$44 = styles().matchDetailsInfo, _v$45 = styles().detailsHeader, _v$46 = styles().detailsContent;
498
+ _v$35 !== _p$.e && web.className(_el$48, _p$.e = _v$35);
499
+ _v$36 !== _p$.t && web.className(_el$49, _p$.t = _v$36);
500
+ _v$37 !== _p$.a && web.className(_el$51, _p$.a = _v$37);
501
+ _v$38 !== _p$.o && web.className(_el$52, _p$.o = _v$38);
502
+ _v$39 !== _p$.i && web.className(_el$54, _p$.i = _v$39);
503
+ _v$40 !== _p$.n && web.className(_el$56, _p$.n = _v$40);
504
+ _v$41 !== _p$.s && web.className(_el$58, _p$.s = _v$41);
505
+ _v$42 !== _p$.h && web.className(_el$60, _p$.h = _v$42);
506
+ _v$43 !== _p$.r && web.className(_el$61, _p$.r = _v$43);
507
+ _v$44 !== _p$.d && web.className(_el$63, _p$.d = _v$44);
508
+ _v$45 !== _p$.l && web.className(_el$64, _p$.l = _v$45);
509
+ _v$46 !== _p$.u && web.className(_el$65, _p$.u = _v$46);
510
+ return _p$;
511
+ }, {
512
+ e: void 0,
513
+ t: void 0,
514
+ a: void 0,
515
+ o: void 0,
516
+ i: void 0,
517
+ n: void 0,
518
+ s: void 0,
519
+ h: void 0,
520
+ r: void 0,
521
+ d: void 0,
522
+ l: void 0,
523
+ u: void 0
524
+ });
525
+ return _el$48;
526
+ })() : null;
527
+ })(), null);
528
+ web.insert(_el$13, (() => {
529
+ var _c$7 = web.memo(() => !!hasSearch());
530
+ return () => _c$7() ? (() => {
531
+ var _el$68 = _tmpl$13(), _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
532
+ web.insert(_el$70, web.createComponent(Explorer.Explorer, {
533
+ value: locationSearchValue,
534
+ get defaultExpanded() {
535
+ return Object.keys(routerState().location.search).reduce((obj, next) => {
536
+ obj[next] = {};
537
+ return obj;
538
+ }, {});
539
+ }
540
+ }));
541
+ web.effect((_p$) => {
542
+ var _v$47 = styles().fourthContainer, _v$48 = styles().detailsHeader, _v$49 = styles().detailsContent;
543
+ _v$47 !== _p$.e && web.className(_el$68, _p$.e = _v$47);
544
+ _v$48 !== _p$.t && web.className(_el$69, _p$.t = _v$48);
545
+ _v$49 !== _p$.a && web.className(_el$70, _p$.a = _v$49);
546
+ return _p$;
547
+ }, {
548
+ e: void 0,
549
+ t: void 0,
550
+ a: void 0
551
+ });
552
+ return _el$68;
553
+ })() : null;
554
+ })(), null);
555
+ web.effect((_p$) => {
556
+ var _v$6 = styles().panelCloseBtn, _v$7 = styles().panelCloseBtnIcon, _v$8 = styles().firstContainer, _v$9 = styles().row, _v$10 = styles().routerExplorerContainer, _v$11 = styles().routerExplorer, _v$12 = styles().secondContainer, _v$13 = styles().matchesContainer, _v$14 = styles().detailsHeader, _v$15 = styles().detailsContent, _v$16 = styles().detailsHeader, _v$17 = styles().routeMatchesToggle, _v$18 = !showMatches(), _v$19 = clsx.clsx(styles().routeMatchesToggleBtn(!showMatches(), true)), _v$20 = showMatches(), _v$21 = clsx.clsx(styles().routeMatchesToggleBtn(!!showMatches(), false)), _v$22 = styles().detailsHeaderInfo, _v$23 = clsx.clsx(styles().routesContainer);
557
+ _v$6 !== _p$.e && web.className(_el$14, _p$.e = _v$6);
558
+ _v$7 !== _p$.t && web.setAttribute(_el$15, "class", _p$.t = _v$7);
559
+ _v$8 !== _p$.a && web.className(_el$16, _p$.a = _v$8);
560
+ _v$9 !== _p$.o && web.className(_el$17, _p$.o = _v$9);
561
+ _v$10 !== _p$.i && web.className(_el$18, _p$.i = _v$10);
562
+ _v$11 !== _p$.n && web.className(_el$19, _p$.n = _v$11);
563
+ _v$12 !== _p$.s && web.className(_el$20, _p$.s = _v$12);
564
+ _v$13 !== _p$.h && web.className(_el$21, _p$.h = _v$13);
565
+ _v$14 !== _p$.r && web.className(_el$22, _p$.r = _v$14);
566
+ _v$15 !== _p$.d && web.className(_el$24, _p$.d = _v$15);
567
+ _v$16 !== _p$.l && web.className(_el$26, _p$.l = _v$16);
568
+ _v$17 !== _p$.u && web.className(_el$27, _p$.u = _v$17);
569
+ _v$18 !== _p$.c && (_el$28.disabled = _p$.c = _v$18);
570
+ _v$19 !== _p$.w && web.className(_el$28, _p$.w = _v$19);
571
+ _v$20 !== _p$.m && (_el$29.disabled = _p$.m = _v$20);
572
+ _v$21 !== _p$.f && web.className(_el$29, _p$.f = _v$21);
573
+ _v$22 !== _p$.y && web.className(_el$30, _p$.y = _v$22);
574
+ _v$23 !== _p$.g && web.className(_el$31, _p$.g = _v$23);
575
+ return _p$;
576
+ }, {
577
+ e: void 0,
578
+ t: void 0,
579
+ a: void 0,
580
+ o: void 0,
581
+ i: void 0,
582
+ n: void 0,
583
+ s: void 0,
584
+ h: void 0,
585
+ r: void 0,
586
+ d: void 0,
587
+ l: void 0,
588
+ u: void 0,
589
+ c: void 0,
590
+ w: void 0,
591
+ m: void 0,
592
+ f: void 0,
593
+ y: void 0,
594
+ g: void 0
595
+ });
596
+ return _el$13;
597
+ })();
598
+ };
599
+ web.delegateEvents(["click", "mousedown"]);
600
+ exports.BaseTanStackRouterDevtoolsPanel = BaseTanStackRouterDevtoolsPanel;
601
+ exports.default = BaseTanStackRouterDevtoolsPanel;
602
+ //# sourceMappingURL=BaseTanStackRouterDevtoolsPanel.cjs.map