@tanstack/router-devtools 0.0.1-beta.134 → 0.0.1-beta.136

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.
@@ -7,57 +7,57 @@
7
7
  "name": "index.production.js",
8
8
  "children": [
9
9
  {
10
- "uid": "2231-183",
10
+ "uid": "2f48-183",
11
11
  "name": "\u0000rollupPluginBabelHelpers.js"
12
12
  },
13
13
  {
14
14
  "name": "node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
15
- "uid": "2231-185"
15
+ "uid": "2f48-185"
16
16
  },
17
17
  {
18
18
  "name": "packages",
19
19
  "children": [
20
20
  {
21
21
  "name": "react-store/build/esm/index.js",
22
- "uid": "2231-187"
22
+ "uid": "2f48-187"
23
23
  },
24
24
  {
25
25
  "name": "router/build/esm/index.js",
26
- "uid": "2231-189"
26
+ "uid": "2f48-189"
27
27
  },
28
28
  {
29
29
  "name": "router-devtools/src",
30
30
  "children": [
31
31
  {
32
- "uid": "2231-191",
32
+ "uid": "2f48-191",
33
33
  "name": "useLocalStorage.ts"
34
34
  },
35
35
  {
36
- "uid": "2231-193",
36
+ "uid": "2f48-193",
37
37
  "name": "theme.tsx"
38
38
  },
39
39
  {
40
- "uid": "2231-195",
40
+ "uid": "2f48-195",
41
41
  "name": "useMediaQuery.ts"
42
42
  },
43
43
  {
44
- "uid": "2231-197",
44
+ "uid": "2f48-197",
45
45
  "name": "utils.ts"
46
46
  },
47
47
  {
48
- "uid": "2231-199",
48
+ "uid": "2f48-199",
49
49
  "name": "styledComponents.ts"
50
50
  },
51
51
  {
52
- "uid": "2231-201",
52
+ "uid": "2f48-201",
53
53
  "name": "Explorer.tsx"
54
54
  },
55
55
  {
56
- "uid": "2231-203",
56
+ "uid": "2f48-203",
57
57
  "name": "devtools.tsx"
58
58
  },
59
59
  {
60
- "uid": "2231-205",
60
+ "uid": "2f48-205",
61
61
  "name": "index.tsx"
62
62
  }
63
63
  ]
@@ -70,381 +70,381 @@
70
70
  "isRoot": true
71
71
  },
72
72
  "nodeParts": {
73
- "2231-183": {
73
+ "2f48-183": {
74
74
  "renderedLength": 429,
75
75
  "gzipLength": 238,
76
76
  "brotliLength": 0,
77
- "mainUid": "2231-182"
77
+ "mainUid": "2f48-182"
78
78
  },
79
- "2231-185": {
79
+ "2f48-185": {
80
80
  "renderedLength": 181,
81
81
  "gzipLength": 129,
82
82
  "brotliLength": 0,
83
- "mainUid": "2231-184"
83
+ "mainUid": "2f48-184"
84
84
  },
85
- "2231-187": {
85
+ "2f48-187": {
86
86
  "renderedLength": 1002,
87
87
  "gzipLength": 474,
88
88
  "brotliLength": 0,
89
- "mainUid": "2231-186"
89
+ "mainUid": "2f48-186"
90
90
  },
91
- "2231-189": {
92
- "renderedLength": 820,
93
- "gzipLength": 388,
91
+ "2f48-189": {
92
+ "renderedLength": 590,
93
+ "gzipLength": 317,
94
94
  "brotliLength": 0,
95
- "mainUid": "2231-188"
95
+ "mainUid": "2f48-188"
96
96
  },
97
- "2231-191": {
97
+ "2f48-191": {
98
98
  "renderedLength": 1083,
99
99
  "gzipLength": 410,
100
100
  "brotliLength": 0,
101
- "mainUid": "2231-190"
101
+ "mainUid": "2f48-190"
102
102
  },
103
- "2231-193": {
103
+ "2f48-193": {
104
104
  "renderedLength": 686,
105
105
  "gzipLength": 344,
106
106
  "brotliLength": 0,
107
- "mainUid": "2231-192"
107
+ "mainUid": "2f48-192"
108
108
  },
109
- "2231-195": {
109
+ "2f48-195": {
110
110
  "renderedLength": 970,
111
111
  "gzipLength": 386,
112
112
  "brotliLength": 0,
113
- "mainUid": "2231-194"
113
+ "mainUid": "2f48-194"
114
114
  },
115
- "2231-197": {
115
+ "2f48-197": {
116
116
  "renderedLength": 2972,
117
117
  "gzipLength": 1112,
118
118
  "brotliLength": 0,
119
- "mainUid": "2231-196"
119
+ "mainUid": "2f48-196"
120
120
  },
121
- "2231-199": {
121
+ "2f48-199": {
122
122
  "renderedLength": 1378,
123
123
  "gzipLength": 576,
124
124
  "brotliLength": 0,
125
- "mainUid": "2231-198"
125
+ "mainUid": "2f48-198"
126
126
  },
127
- "2231-201": {
127
+ "2f48-201": {
128
128
  "renderedLength": 6243,
129
129
  "gzipLength": 1853,
130
130
  "brotliLength": 0,
131
- "mainUid": "2231-200"
131
+ "mainUid": "2f48-200"
132
132
  },
133
- "2231-203": {
134
- "renderedLength": 20992,
135
- "gzipLength": 4170,
133
+ "2f48-203": {
134
+ "renderedLength": 20956,
135
+ "gzipLength": 4163,
136
136
  "brotliLength": 0,
137
- "mainUid": "2231-202"
137
+ "mainUid": "2f48-202"
138
138
  },
139
- "2231-205": {
139
+ "2f48-205": {
140
140
  "renderedLength": 0,
141
141
  "gzipLength": 0,
142
142
  "brotliLength": 0,
143
- "mainUid": "2231-204"
143
+ "mainUid": "2f48-204"
144
144
  }
145
145
  },
146
146
  "nodeMetas": {
147
- "2231-182": {
147
+ "2f48-182": {
148
148
  "id": "\u0000rollupPluginBabelHelpers.js",
149
149
  "moduleParts": {
150
- "index.production.js": "2231-183"
150
+ "index.production.js": "2f48-183"
151
151
  },
152
152
  "imported": [],
153
153
  "importedBy": [
154
154
  {
155
- "uid": "2231-202"
155
+ "uid": "2f48-202"
156
156
  },
157
157
  {
158
- "uid": "2231-192"
158
+ "uid": "2f48-192"
159
159
  },
160
160
  {
161
- "uid": "2231-200"
161
+ "uid": "2f48-200"
162
162
  }
163
163
  ]
164
164
  },
165
- "2231-184": {
165
+ "2f48-184": {
166
166
  "id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
167
167
  "moduleParts": {
168
- "index.production.js": "2231-185"
168
+ "index.production.js": "2f48-185"
169
169
  },
170
170
  "imported": [],
171
171
  "importedBy": [
172
172
  {
173
- "uid": "2231-188"
173
+ "uid": "2f48-188"
174
174
  }
175
175
  ]
176
176
  },
177
- "2231-186": {
177
+ "2f48-186": {
178
178
  "id": "/packages/react-store/build/esm/index.js",
179
179
  "moduleParts": {
180
- "index.production.js": "2231-187"
180
+ "index.production.js": "2f48-187"
181
181
  },
182
182
  "imported": [
183
183
  {
184
- "uid": "2231-208"
184
+ "uid": "2f48-208"
185
185
  },
186
186
  {
187
- "uid": "2231-209"
187
+ "uid": "2f48-209"
188
188
  }
189
189
  ],
190
190
  "importedBy": [
191
191
  {
192
- "uid": "2231-188"
192
+ "uid": "2f48-188"
193
193
  }
194
194
  ]
195
195
  },
196
- "2231-188": {
196
+ "2f48-188": {
197
197
  "id": "/packages/router/build/esm/index.js",
198
198
  "moduleParts": {
199
- "index.production.js": "2231-189"
199
+ "index.production.js": "2f48-189"
200
200
  },
201
201
  "imported": [
202
202
  {
203
- "uid": "2231-184"
203
+ "uid": "2f48-184"
204
204
  },
205
205
  {
206
- "uid": "2231-207"
206
+ "uid": "2f48-207"
207
207
  },
208
208
  {
209
- "uid": "2231-206"
209
+ "uid": "2f48-206"
210
210
  },
211
211
  {
212
- "uid": "2231-186"
212
+ "uid": "2f48-186"
213
213
  }
214
214
  ],
215
215
  "importedBy": [
216
216
  {
217
- "uid": "2231-202"
217
+ "uid": "2f48-202"
218
218
  }
219
219
  ]
220
220
  },
221
- "2231-190": {
221
+ "2f48-190": {
222
222
  "id": "/packages/router-devtools/src/useLocalStorage.ts",
223
223
  "moduleParts": {
224
- "index.production.js": "2231-191"
224
+ "index.production.js": "2f48-191"
225
225
  },
226
226
  "imported": [
227
227
  {
228
- "uid": "2231-206"
228
+ "uid": "2f48-206"
229
229
  }
230
230
  ],
231
231
  "importedBy": [
232
232
  {
233
- "uid": "2231-202"
233
+ "uid": "2f48-202"
234
234
  }
235
235
  ]
236
236
  },
237
- "2231-192": {
237
+ "2f48-192": {
238
238
  "id": "/packages/router-devtools/src/theme.tsx",
239
239
  "moduleParts": {
240
- "index.production.js": "2231-193"
240
+ "index.production.js": "2f48-193"
241
241
  },
242
242
  "imported": [
243
243
  {
244
- "uid": "2231-182"
244
+ "uid": "2f48-182"
245
245
  },
246
246
  {
247
- "uid": "2231-206"
247
+ "uid": "2f48-206"
248
248
  }
249
249
  ],
250
250
  "importedBy": [
251
251
  {
252
- "uid": "2231-202"
252
+ "uid": "2f48-202"
253
253
  },
254
254
  {
255
- "uid": "2231-196"
255
+ "uid": "2f48-196"
256
256
  }
257
257
  ]
258
258
  },
259
- "2231-194": {
259
+ "2f48-194": {
260
260
  "id": "/packages/router-devtools/src/useMediaQuery.ts",
261
261
  "moduleParts": {
262
- "index.production.js": "2231-195"
262
+ "index.production.js": "2f48-195"
263
263
  },
264
264
  "imported": [
265
265
  {
266
- "uid": "2231-206"
266
+ "uid": "2f48-206"
267
267
  }
268
268
  ],
269
269
  "importedBy": [
270
270
  {
271
- "uid": "2231-196"
271
+ "uid": "2f48-196"
272
272
  }
273
273
  ]
274
274
  },
275
- "2231-196": {
275
+ "2f48-196": {
276
276
  "id": "/packages/router-devtools/src/utils.ts",
277
277
  "moduleParts": {
278
- "index.production.js": "2231-197"
278
+ "index.production.js": "2f48-197"
279
279
  },
280
280
  "imported": [
281
281
  {
282
- "uid": "2231-206"
282
+ "uid": "2f48-206"
283
283
  },
284
284
  {
285
- "uid": "2231-192"
285
+ "uid": "2f48-192"
286
286
  },
287
287
  {
288
- "uid": "2231-194"
288
+ "uid": "2f48-194"
289
289
  }
290
290
  ],
291
291
  "importedBy": [
292
292
  {
293
- "uid": "2231-202"
293
+ "uid": "2f48-202"
294
294
  },
295
295
  {
296
- "uid": "2231-198"
296
+ "uid": "2f48-198"
297
297
  },
298
298
  {
299
- "uid": "2231-200"
299
+ "uid": "2f48-200"
300
300
  }
301
301
  ]
302
302
  },
303
- "2231-198": {
303
+ "2f48-198": {
304
304
  "id": "/packages/router-devtools/src/styledComponents.ts",
305
305
  "moduleParts": {
306
- "index.production.js": "2231-199"
306
+ "index.production.js": "2f48-199"
307
307
  },
308
308
  "imported": [
309
309
  {
310
- "uid": "2231-196"
310
+ "uid": "2f48-196"
311
311
  }
312
312
  ],
313
313
  "importedBy": [
314
314
  {
315
- "uid": "2231-202"
315
+ "uid": "2f48-202"
316
316
  }
317
317
  ]
318
318
  },
319
- "2231-200": {
319
+ "2f48-200": {
320
320
  "id": "/packages/router-devtools/src/Explorer.tsx",
321
321
  "moduleParts": {
322
- "index.production.js": "2231-201"
322
+ "index.production.js": "2f48-201"
323
323
  },
324
324
  "imported": [
325
325
  {
326
- "uid": "2231-182"
326
+ "uid": "2f48-182"
327
327
  },
328
328
  {
329
- "uid": "2231-206"
329
+ "uid": "2f48-206"
330
330
  },
331
331
  {
332
- "uid": "2231-196"
332
+ "uid": "2f48-196"
333
333
  }
334
334
  ],
335
335
  "importedBy": [
336
336
  {
337
- "uid": "2231-202"
337
+ "uid": "2f48-202"
338
338
  }
339
339
  ]
340
340
  },
341
- "2231-202": {
341
+ "2f48-202": {
342
342
  "id": "/packages/router-devtools/src/devtools.tsx",
343
343
  "moduleParts": {
344
- "index.production.js": "2231-203"
344
+ "index.production.js": "2f48-203"
345
345
  },
346
346
  "imported": [
347
347
  {
348
- "uid": "2231-182"
348
+ "uid": "2f48-182"
349
349
  },
350
350
  {
351
- "uid": "2231-206"
351
+ "uid": "2f48-206"
352
352
  },
353
353
  {
354
- "uid": "2231-188"
354
+ "uid": "2f48-188"
355
355
  },
356
356
  {
357
- "uid": "2231-190"
357
+ "uid": "2f48-190"
358
358
  },
359
359
  {
360
- "uid": "2231-196"
360
+ "uid": "2f48-196"
361
361
  },
362
362
  {
363
- "uid": "2231-198"
363
+ "uid": "2f48-198"
364
364
  },
365
365
  {
366
- "uid": "2231-192"
366
+ "uid": "2f48-192"
367
367
  },
368
368
  {
369
- "uid": "2231-200"
369
+ "uid": "2f48-200"
370
370
  }
371
371
  ],
372
372
  "importedBy": [
373
373
  {
374
- "uid": "2231-204"
374
+ "uid": "2f48-204"
375
375
  }
376
376
  ]
377
377
  },
378
- "2231-204": {
378
+ "2f48-204": {
379
379
  "id": "/packages/router-devtools/src/index.tsx",
380
380
  "moduleParts": {
381
- "index.production.js": "2231-205"
381
+ "index.production.js": "2f48-205"
382
382
  },
383
383
  "imported": [
384
384
  {
385
- "uid": "2231-202"
385
+ "uid": "2f48-202"
386
386
  }
387
387
  ],
388
388
  "importedBy": [],
389
389
  "isEntry": true
390
390
  },
391
- "2231-206": {
391
+ "2f48-206": {
392
392
  "id": "react",
393
393
  "moduleParts": {},
394
394
  "imported": [],
395
395
  "importedBy": [
396
396
  {
397
- "uid": "2231-202"
397
+ "uid": "2f48-202"
398
398
  },
399
399
  {
400
- "uid": "2231-188"
400
+ "uid": "2f48-188"
401
401
  },
402
402
  {
403
- "uid": "2231-190"
403
+ "uid": "2f48-190"
404
404
  },
405
405
  {
406
- "uid": "2231-196"
406
+ "uid": "2f48-196"
407
407
  },
408
408
  {
409
- "uid": "2231-192"
409
+ "uid": "2f48-192"
410
410
  },
411
411
  {
412
- "uid": "2231-200"
412
+ "uid": "2f48-200"
413
413
  },
414
414
  {
415
- "uid": "2231-194"
415
+ "uid": "2f48-194"
416
416
  }
417
417
  ],
418
418
  "isExternal": true
419
419
  },
420
- "2231-207": {
420
+ "2f48-207": {
421
421
  "id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
422
422
  "moduleParts": {},
423
423
  "imported": [],
424
424
  "importedBy": [
425
425
  {
426
- "uid": "2231-188"
426
+ "uid": "2f48-188"
427
427
  }
428
428
  ]
429
429
  },
430
- "2231-208": {
430
+ "2f48-208": {
431
431
  "id": "use-sync-external-store/shim/with-selector",
432
432
  "moduleParts": {},
433
433
  "imported": [],
434
434
  "importedBy": [
435
435
  {
436
- "uid": "2231-186"
436
+ "uid": "2f48-186"
437
437
  }
438
438
  ],
439
439
  "isExternal": true
440
440
  },
441
- "2231-209": {
441
+ "2f48-209": {
442
442
  "id": "/packages/store/build/esm/index.js",
443
443
  "moduleParts": {},
444
444
  "imported": [],
445
445
  "importedBy": [
446
446
  {
447
- "uid": "2231-186"
447
+ "uid": "2f48-186"
448
448
  }
449
449
  ]
450
450
  }
@@ -62,24 +62,6 @@
62
62
  throw new Error(value);
63
63
  }
64
64
 
65
- function warning(condition, message) {
66
- {
67
- if (condition) {
68
- return;
69
- }
70
-
71
- var text = "Warning: " + message;
72
-
73
- if (typeof console !== 'undefined') {
74
- console.warn(text);
75
- }
76
-
77
- try {
78
- throw Error(text);
79
- } catch (x) {}
80
- }
81
- }
82
-
83
65
  /**
84
66
  * @tanstack/react-store/src/index.tsx
85
67
  *
@@ -134,15 +116,6 @@
134
116
  return trimPathRight(trimPathLeft(path));
135
117
  }
136
118
  const routerContext = /*#__PURE__*/React__namespace.createContext(null);
137
- function useRouterState(opts) {
138
- const router = useRouter();
139
- return useStore(router.__store, opts?.select);
140
- }
141
- function useRouter() {
142
- const value = React__namespace.useContext(routerContext);
143
- warning(value, 'useRouter must be used inside a <Router> component!');
144
- return value;
145
- }
146
119
 
147
120
  const getItem = key => {
148
121
  try {
@@ -860,14 +833,13 @@
860
833
  } = props;
861
834
  const routerContextValue = React__default["default"].useContext(routerContext);
862
835
  const router = userRouter ?? routerContextValue;
863
- const routerState = useRouterState();
864
836
  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.');
865
837
  useStore(router.__store);
866
838
  const [showMatches, setShowMatches] = useLocalStorage('tanstackRouterDevtoolsShowMatches', true);
867
839
  const [activeRouteId, setActiveRouteId] = useLocalStorage('tanstackRouterDevtoolsActiveRouteId', '');
868
- const allMatches = React__default["default"].useMemo(() => [...Object.values(routerState.matches)], [routerState.matches]);
840
+ const allMatches = React__default["default"].useMemo(() => [...Object.values(router.state.matches)], [router.state.matches]);
869
841
  const activeMatch = allMatches?.find(d => d.routeId === activeRouteId);
870
- const hasSearch = Object.keys(routerState.location.search || {}).length;
842
+ const hasSearch = Object.keys(router.state.location.search || {}).length;
871
843
  return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
872
844
  theme: defaultTheme
873
845
  }, /*#__PURE__*/React__default["default"].createElement(Panel, _extends({
@@ -1035,7 +1007,7 @@
1035
1007
  matches: allMatches,
1036
1008
  activeRouteId: activeRouteId,
1037
1009
  setActiveRouteId: setActiveRouteId
1038
- }) : /*#__PURE__*/React__default["default"].createElement("div", null, routerState.matches.map((match, i) => {
1010
+ }) : /*#__PURE__*/React__default["default"].createElement("div", null, router.state.matches.map((match, i) => {
1039
1011
  return /*#__PURE__*/React__default["default"].createElement("div", {
1040
1012
  key: match.routeId || i,
1041
1013
  role: "button",
@@ -1132,8 +1104,8 @@
1132
1104
  padding: '.5em'
1133
1105
  }
1134
1106
  }, /*#__PURE__*/React__default["default"].createElement(Explorer, {
1135
- value: routerState.location.search || {},
1136
- defaultExpanded: Object.keys(routerState.location.search || {}).reduce((obj, next) => {
1107
+ value: router.state.location.search || {},
1108
+ defaultExpanded: Object.keys(router.state.location.search || {}).reduce((obj, next) => {
1137
1109
  obj[next] = {};
1138
1110
  return obj;
1139
1111
  }, {})