@tanstack/router-devtools-core 1.132.47 → 1.132.51

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