@tanstack/react-router 0.0.1-beta.19 → 0.0.1-beta.190

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.
@@ -0,0 +1,653 @@
1
+ /**
2
+ * @tanstack/react-router/src/index.tsx
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ 'use strict';
12
+
13
+ Object.defineProperty(exports, '__esModule', { value: true });
14
+
15
+ var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
16
+ var React = require('react');
17
+ var reactStore = require('@tanstack/react-store');
18
+ var invariant = require('tiny-invariant');
19
+ var warning = require('tiny-warning');
20
+ var routerCore = require('@tanstack/router-core');
21
+
22
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
+
24
+ function _interopNamespace(e) {
25
+ if (e && e.__esModule) return e;
26
+ var n = Object.create(null);
27
+ if (e) {
28
+ Object.keys(e).forEach(function (k) {
29
+ if (k !== 'default') {
30
+ var d = Object.getOwnPropertyDescriptor(e, k);
31
+ Object.defineProperty(n, k, d.get ? d : {
32
+ enumerable: true,
33
+ get: function () { return e[k]; }
34
+ });
35
+ }
36
+ });
37
+ }
38
+ n["default"] = e;
39
+ return Object.freeze(n);
40
+ }
41
+
42
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
43
+ var invariant__default = /*#__PURE__*/_interopDefaultLegacy(invariant);
44
+ var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
45
+
46
+ routerCore.Route.__onInit = route => {
47
+ Object.assign(route, {
48
+ useMatch: (opts = {}) => {
49
+ return useMatch({
50
+ ...opts,
51
+ from: route.id
52
+ });
53
+ },
54
+ useLoader: (opts = {}) => {
55
+ return useLoader({
56
+ ...opts,
57
+ from: route.id
58
+ });
59
+ },
60
+ useContext: (opts = {}) => {
61
+ return useMatch({
62
+ ...opts,
63
+ from: route.id,
64
+ select: d => opts?.select ? opts.select(d.context) : d.context
65
+ });
66
+ },
67
+ useRouteContext: (opts = {}) => {
68
+ return useMatch({
69
+ ...opts,
70
+ from: route.id,
71
+ select: d => opts?.select ? opts.select(d.routeContext) : d.routeContext
72
+ });
73
+ },
74
+ useSearch: (opts = {}) => {
75
+ return useSearch({
76
+ ...opts,
77
+ from: route.id
78
+ });
79
+ },
80
+ useParams: (opts = {}) => {
81
+ return useParams({
82
+ ...opts,
83
+ from: route.id
84
+ });
85
+ }
86
+ });
87
+ };
88
+
89
+ //
90
+
91
+ function lazyRouteComponent(importer, exportName) {
92
+ let loadPromise;
93
+ const load = () => {
94
+ if (!loadPromise) {
95
+ loadPromise = importer();
96
+ }
97
+ return loadPromise;
98
+ };
99
+ const lazyComp = /*#__PURE__*/React__namespace.lazy(async () => {
100
+ const moduleExports = await load();
101
+ const comp = moduleExports[exportName ?? 'default'];
102
+ return {
103
+ default: comp
104
+ };
105
+ });
106
+ lazyComp.preload = load;
107
+ return lazyComp;
108
+ }
109
+ //
110
+
111
+ function useLinkProps(options) {
112
+ const router = useRouter();
113
+ const {
114
+ // custom props
115
+ type,
116
+ children,
117
+ target,
118
+ activeProps = () => ({
119
+ className: 'active'
120
+ }),
121
+ inactiveProps = () => ({}),
122
+ activeOptions,
123
+ disabled,
124
+ // fromCurrent,
125
+ hash,
126
+ search,
127
+ params,
128
+ to = '.',
129
+ state,
130
+ mask,
131
+ preload,
132
+ preloadDelay,
133
+ replace,
134
+ // element props
135
+ style,
136
+ className,
137
+ onClick,
138
+ onFocus,
139
+ onMouseEnter,
140
+ onMouseLeave,
141
+ onTouchStart,
142
+ ...rest
143
+ } = options;
144
+ const linkInfo = router.buildLink(options);
145
+ if (linkInfo.type === 'external') {
146
+ const {
147
+ href
148
+ } = linkInfo;
149
+ return {
150
+ href
151
+ };
152
+ }
153
+ const {
154
+ handleClick,
155
+ handleFocus,
156
+ handleEnter,
157
+ handleLeave,
158
+ handleTouchStart,
159
+ isActive,
160
+ next
161
+ } = linkInfo;
162
+ const handleReactClick = e => {
163
+ if (options.startTransition ?? true) {
164
+ (React__namespace.startTransition || (d => d))(() => {
165
+ handleClick(e);
166
+ });
167
+ }
168
+ };
169
+ const composeHandlers = handlers => e => {
170
+ if (e.persist) e.persist();
171
+ handlers.filter(Boolean).forEach(handler => {
172
+ if (e.defaultPrevented) return;
173
+ handler(e);
174
+ });
175
+ };
176
+
177
+ // Get the active props
178
+ const resolvedActiveProps = isActive ? routerCore.functionalUpdate(activeProps, {}) ?? {} : {};
179
+
180
+ // Get the inactive props
181
+ const resolvedInactiveProps = isActive ? {} : routerCore.functionalUpdate(inactiveProps, {}) ?? {};
182
+ return {
183
+ ...resolvedActiveProps,
184
+ ...resolvedInactiveProps,
185
+ ...rest,
186
+ href: disabled ? undefined : next.maskedLocation ? next.maskedLocation.href : next.href,
187
+ onClick: composeHandlers([onClick, handleReactClick]),
188
+ onFocus: composeHandlers([onFocus, handleFocus]),
189
+ onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),
190
+ onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
191
+ onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
192
+ target,
193
+ style: {
194
+ ...style,
195
+ ...resolvedActiveProps.style,
196
+ ...resolvedInactiveProps.style
197
+ },
198
+ className: [className, resolvedActiveProps.className, resolvedInactiveProps.className].filter(Boolean).join(' ') || undefined,
199
+ ...(disabled ? {
200
+ role: 'link',
201
+ 'aria-disabled': true
202
+ } : undefined),
203
+ ['data-status']: isActive ? 'active' : undefined
204
+ };
205
+ }
206
+ const Link = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
207
+ const linkProps = useLinkProps(props);
208
+ return /*#__PURE__*/React__namespace.createElement("a", _rollupPluginBabelHelpers["extends"]({
209
+ ref: ref
210
+ }, linkProps, {
211
+ children: typeof props.children === 'function' ? props.children({
212
+ isActive: linkProps['data-status'] === 'active'
213
+ }) : props.children
214
+ }));
215
+ });
216
+ function Navigate(props) {
217
+ const router = useRouter();
218
+ React__namespace.useLayoutEffect(() => {
219
+ router.navigate(props);
220
+ }, []);
221
+ return null;
222
+ }
223
+ const matchIdsContext = /*#__PURE__*/React__namespace.createContext(null);
224
+ const routerContext = /*#__PURE__*/React__namespace.createContext(null);
225
+ function useRouterState(opts) {
226
+ const router = useRouter();
227
+ return reactStore.useStore(router.__store, opts?.select);
228
+ }
229
+ function RouterProvider({
230
+ router,
231
+ ...rest
232
+ }) {
233
+ router.update(rest);
234
+ React__namespace.useEffect(() => {
235
+ let unsub;
236
+ React__namespace.startTransition(() => {
237
+ unsub = router.mount();
238
+ });
239
+ return unsub;
240
+ }, [router]);
241
+ const Wrap = router.options.Wrap || React__namespace.Fragment;
242
+ return /*#__PURE__*/React__namespace.createElement(Wrap, null, /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
243
+ value: router
244
+ }, /*#__PURE__*/React__namespace.createElement(Matches, null)));
245
+ }
246
+ function Matches() {
247
+ const router = useRouter();
248
+ const matchIds = useRouterState({
249
+ select: state => {
250
+ return state.renderedMatchIds;
251
+ }
252
+ });
253
+ const locationKey = useRouterState({
254
+ select: d => d.resolvedLocation.state?.key
255
+ });
256
+ const route = router.getRoute(routerCore.rootRouteId);
257
+ const errorComponent = React__namespace.useCallback(props => {
258
+ return /*#__PURE__*/React__namespace.createElement(ErrorComponent, {
259
+ ...props,
260
+ useMatch: route.useMatch,
261
+ useContext: route.useContext,
262
+ useRouteContext: route.useRouteContext,
263
+ useSearch: route.useSearch,
264
+ useParams: route.useParams
265
+ });
266
+ }, [route]);
267
+ return /*#__PURE__*/React__namespace.createElement(matchIdsContext.Provider, {
268
+ value: [undefined, ...matchIds]
269
+ }, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
270
+ resetKey: locationKey,
271
+ errorComponent: errorComponent,
272
+ onCatch: () => {
273
+ warning__default["default"](false, `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`);
274
+ }
275
+ }, /*#__PURE__*/React__namespace.createElement(Outlet, null)));
276
+ }
277
+ function useRouter() {
278
+ const value = React__namespace.useContext(routerContext);
279
+ warning__default["default"](value, 'useRouter must be used inside a <Router> component!');
280
+ return value;
281
+ }
282
+ function useMatches(opts) {
283
+ const matchIds = React__namespace.useContext(matchIdsContext);
284
+ return useRouterState({
285
+ select: state => {
286
+ const matches = state.renderedMatches.slice(state.renderedMatches.findIndex(d => d.id === matchIds[0]));
287
+ return opts?.select ? opts.select(matches) : matches;
288
+ }
289
+ });
290
+ }
291
+ function useMatch(opts) {
292
+ const router = useRouter();
293
+ const nearestMatchId = React__namespace.useContext(matchIdsContext)[0];
294
+ const nearestMatchRouteId = router.getRouteMatch(nearestMatchId)?.routeId;
295
+ const matchRouteId = useRouterState({
296
+ select: state => {
297
+ const match = opts?.from ? state.renderedMatches.find(d => d.routeId === opts?.from) : state.renderedMatches.find(d => d.id === nearestMatchId);
298
+ return match.routeId;
299
+ }
300
+ });
301
+ if (opts?.strict ?? true) {
302
+ invariant__default["default"](nearestMatchRouteId == matchRouteId, `useMatch("${matchRouteId}") is being called in a component that is meant to render the '${nearestMatchRouteId}' route. Did you mean to 'useMatch("${matchRouteId}", { strict: false })' or 'useRoute("${matchRouteId}")' instead?`);
303
+ }
304
+ const matchSelection = useRouterState({
305
+ select: state => {
306
+ const match = opts?.from ? state.renderedMatches.find(d => d.routeId === opts?.from) : state.renderedMatches.find(d => d.id === nearestMatchId);
307
+ invariant__default["default"](match, `Could not find ${opts?.from ? `an active match from "${opts.from}"` : 'a nearest match!'}`);
308
+ return opts?.select ? opts.select(match) : match;
309
+ }
310
+ });
311
+ return matchSelection;
312
+ }
313
+ function useLoader(opts) {
314
+ return useMatch({
315
+ ...opts,
316
+ select: match => opts?.select ? opts?.select(match.loaderData) : match.loaderData
317
+ });
318
+ }
319
+ function useRouterContext(opts) {
320
+ return useMatch({
321
+ ...opts,
322
+ select: match => opts?.select ? opts.select(match.context) : match.context
323
+ });
324
+ }
325
+ function useRouteContext(opts) {
326
+ return useMatch({
327
+ ...opts,
328
+ select: match => opts?.select ? opts.select(match.routeContext) : match.routeContext
329
+ });
330
+ }
331
+ function useSearch(opts) {
332
+ return useMatch({
333
+ ...opts,
334
+ select: match => {
335
+ return opts?.select ? opts.select(match.search) : match.search;
336
+ }
337
+ });
338
+ }
339
+ function useParams(opts) {
340
+ return useRouterState({
341
+ select: state => {
342
+ const params = routerCore.last(state.renderedMatches)?.params;
343
+ return opts?.select ? opts.select(params) : params;
344
+ }
345
+ });
346
+ }
347
+ function useNavigate(defaultOpts) {
348
+ const router = useRouter();
349
+ return React__namespace.useCallback(opts => {
350
+ return router.navigate({
351
+ ...defaultOpts,
352
+ ...opts
353
+ });
354
+ }, []);
355
+ }
356
+ function useMatchRoute() {
357
+ const router = useRouter();
358
+ return React__namespace.useCallback(opts => {
359
+ const {
360
+ pending,
361
+ caseSensitive,
362
+ ...rest
363
+ } = opts;
364
+ return router.matchRoute(rest, {
365
+ pending,
366
+ caseSensitive
367
+ });
368
+ }, []);
369
+ }
370
+ function MatchRoute(props) {
371
+ const matchRoute = useMatchRoute();
372
+ const params = matchRoute(props);
373
+ if (typeof props.children === 'function') {
374
+ return props.children(params);
375
+ }
376
+ return !!params ? props.children : null;
377
+ }
378
+ function Outlet() {
379
+ const matchIds = React__namespace.useContext(matchIdsContext).slice(1);
380
+ if (!matchIds[0]) {
381
+ return null;
382
+ }
383
+ return /*#__PURE__*/React__namespace.createElement(Match, {
384
+ matchIds: matchIds
385
+ });
386
+ }
387
+ const defaultPending = () => null;
388
+ function Match({
389
+ matchIds
390
+ }) {
391
+ const router = useRouter();
392
+ const matchId = matchIds[0];
393
+ const routeId = router.getRouteMatch(matchId).routeId;
394
+ const route = router.getRoute(routeId);
395
+ const locationKey = useRouterState({
396
+ select: s => s.resolvedLocation.state?.key
397
+ });
398
+ const PendingComponent = route.options.pendingComponent ?? router.options.defaultPendingComponent ?? defaultPending;
399
+ const routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent ?? ErrorComponent;
400
+ const ResolvedSuspenseBoundary = route.options.wrapInSuspense ?? !route.isRoot ? React__namespace.Suspense : SafeFragment;
401
+ const ResolvedCatchBoundary = !!routeErrorComponent ? CatchBoundary : SafeFragment;
402
+ const errorComponent = React__namespace.useCallback(props => {
403
+ return /*#__PURE__*/React__namespace.createElement(routeErrorComponent, {
404
+ ...props,
405
+ useMatch: route.useMatch,
406
+ useContext: route.useContext,
407
+ useRouteContext: route.useRouteContext,
408
+ useSearch: route.useSearch,
409
+ useParams: route.useParams
410
+ });
411
+ }, [route]);
412
+ return /*#__PURE__*/React__namespace.createElement(matchIdsContext.Provider, {
413
+ value: matchIds
414
+ }, /*#__PURE__*/React__namespace.createElement(ResolvedSuspenseBoundary, {
415
+ fallback: /*#__PURE__*/React__namespace.createElement(PendingComponent, {
416
+ useMatch: route.useMatch,
417
+ useContext: route.useContext,
418
+ useRouteContext: route.useRouteContext,
419
+ useSearch: route.useSearch,
420
+ useParams: route.useParams
421
+ })
422
+ }, /*#__PURE__*/React__namespace.createElement(ResolvedCatchBoundary, {
423
+ resetKey: locationKey,
424
+ errorComponent: errorComponent,
425
+ onCatch: () => {
426
+ warning__default["default"](false, `Error in route match: ${matchId}`);
427
+ }
428
+ }, /*#__PURE__*/React__namespace.createElement(MatchInner, {
429
+ matchId: matchId,
430
+ PendingComponent: PendingComponent
431
+ }))));
432
+ }
433
+ function MatchInner({
434
+ matchId,
435
+ PendingComponent
436
+ }) {
437
+ const router = useRouter();
438
+ const match = useRouterState({
439
+ select: d => {
440
+ const match = d.matchesById[matchId];
441
+ return routerCore.pick(match, ['status', 'loadPromise', 'routeId', 'error']);
442
+ }
443
+ });
444
+ const route = router.getRoute(match.routeId);
445
+ if (match.status === 'error') {
446
+ throw match.error;
447
+ }
448
+ if (match.status === 'pending') {
449
+ return /*#__PURE__*/React__namespace.createElement(PendingComponent, {
450
+ useLoader: route.useLoader,
451
+ useMatch: route.useMatch,
452
+ useContext: route.useContext,
453
+ useRouteContext: route.useRouteContext,
454
+ useSearch: route.useSearch,
455
+ useParams: route.useParams
456
+ });
457
+ }
458
+ if (match.status === 'success') {
459
+ let comp = route.options.component ?? router.options.defaultComponent;
460
+ if (comp) {
461
+ return /*#__PURE__*/React__namespace.createElement(comp, {
462
+ useLoader: route.useLoader,
463
+ useMatch: route.useMatch,
464
+ useContext: route.useContext,
465
+ useRouteContext: route.useRouteContext,
466
+ useSearch: route.useSearch,
467
+ useParams: route.useParams
468
+ });
469
+ }
470
+ return /*#__PURE__*/React__namespace.createElement(Outlet, null);
471
+ }
472
+ invariant__default["default"](false, 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!');
473
+ }
474
+ function SafeFragment(props) {
475
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, props.children);
476
+ }
477
+ function useInjectHtml() {
478
+ const router = useRouter();
479
+ return React__namespace.useCallback(html => {
480
+ router.injectHtml(html);
481
+ }, []);
482
+ }
483
+ function useDehydrate() {
484
+ const router = useRouter();
485
+ return React__namespace.useCallback(function dehydrate(key, data) {
486
+ return router.dehydrateData(key, data);
487
+ }, []);
488
+ }
489
+ function useHydrate() {
490
+ const router = useRouter();
491
+ return function hydrate(key) {
492
+ return router.hydrateData(key);
493
+ };
494
+ }
495
+
496
+ // This is the messiest thing ever... I'm either seriously tired (likely) or
497
+ // there has to be a better way to reset error boundaries when the
498
+ // router's location key changes.
499
+
500
+ function CatchBoundary(props) {
501
+ const errorComponent = props.errorComponent ?? ErrorComponent;
502
+ return /*#__PURE__*/React__namespace.createElement(CatchBoundaryImpl, {
503
+ resetKey: props.resetKey,
504
+ onCatch: props.onCatch,
505
+ children: ({
506
+ error
507
+ }) => {
508
+ if (error) {
509
+ return /*#__PURE__*/React__namespace.createElement(errorComponent, {
510
+ error
511
+ });
512
+ }
513
+ return props.children;
514
+ }
515
+ });
516
+ }
517
+ class CatchBoundaryImpl extends React__namespace.Component {
518
+ state = {
519
+ error: null
520
+ };
521
+ static getDerivedStateFromError(error) {
522
+ return {
523
+ error
524
+ };
525
+ }
526
+ componentDidUpdate(prevProps, prevState) {
527
+ if (prevState.error && prevProps.resetKey !== this.props.resetKey) {
528
+ this.setState({
529
+ error: null
530
+ });
531
+ }
532
+ }
533
+ componentDidCatch(error) {
534
+ this.props.onCatch?.(error);
535
+ }
536
+ render() {
537
+ return this.props.children(this.state);
538
+ }
539
+ }
540
+ function ErrorComponent({
541
+ error
542
+ }) {
543
+ const [show, setShow] = React__namespace.useState(process.env.NODE_ENV !== 'production');
544
+ return /*#__PURE__*/React__namespace.createElement("div", {
545
+ style: {
546
+ padding: '.5rem',
547
+ maxWidth: '100%'
548
+ }
549
+ }, /*#__PURE__*/React__namespace.createElement("div", {
550
+ style: {
551
+ display: 'flex',
552
+ alignItems: 'center',
553
+ gap: '.5rem'
554
+ }
555
+ }, /*#__PURE__*/React__namespace.createElement("strong", {
556
+ style: {
557
+ fontSize: '1rem'
558
+ }
559
+ }, "Something went wrong!"), /*#__PURE__*/React__namespace.createElement("button", {
560
+ style: {
561
+ appearance: 'none',
562
+ fontSize: '.6em',
563
+ border: '1px solid currentColor',
564
+ padding: '.1rem .2rem',
565
+ fontWeight: 'bold',
566
+ borderRadius: '.25rem'
567
+ },
568
+ onClick: () => setShow(d => !d)
569
+ }, show ? 'Hide Error' : 'Show Error')), /*#__PURE__*/React__namespace.createElement("div", {
570
+ style: {
571
+ height: '.25rem'
572
+ }
573
+ }), show ? /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("pre", {
574
+ style: {
575
+ fontSize: '.7em',
576
+ border: '1px solid red',
577
+ borderRadius: '.25rem',
578
+ padding: '.3rem',
579
+ color: 'red',
580
+ overflow: 'auto'
581
+ }
582
+ }, error.message ? /*#__PURE__*/React__namespace.createElement("code", null, error.message) : null)) : null);
583
+ }
584
+ function useBlocker(message, condition = true) {
585
+ const router = useRouter();
586
+ React__namespace.useEffect(() => {
587
+ if (!condition) return;
588
+ let unblock = router.history.block((retry, cancel) => {
589
+ if (window.confirm(message)) {
590
+ unblock();
591
+ retry();
592
+ }
593
+ });
594
+ return unblock;
595
+ });
596
+ }
597
+ function Block({
598
+ message,
599
+ condition,
600
+ children
601
+ }) {
602
+ useBlocker(message, condition);
603
+ return children ?? null;
604
+ }
605
+ function shallow(objA, objB) {
606
+ if (Object.is(objA, objB)) {
607
+ return true;
608
+ }
609
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
610
+ return false;
611
+ }
612
+ const keysA = Object.keys(objA);
613
+ if (keysA.length !== Object.keys(objB).length) {
614
+ return false;
615
+ }
616
+ for (let i = 0; i < keysA.length; i++) {
617
+ if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
618
+ return false;
619
+ }
620
+ }
621
+ return true;
622
+ }
623
+
624
+ exports.Block = Block;
625
+ exports.CatchBoundary = CatchBoundary;
626
+ exports.CatchBoundaryImpl = CatchBoundaryImpl;
627
+ exports.ErrorComponent = ErrorComponent;
628
+ exports.Link = Link;
629
+ exports.MatchRoute = MatchRoute;
630
+ exports.Navigate = Navigate;
631
+ exports.Outlet = Outlet;
632
+ exports.RouterProvider = RouterProvider;
633
+ exports.lazyRouteComponent = lazyRouteComponent;
634
+ exports.matchIdsContext = matchIdsContext;
635
+ exports.routerContext = routerContext;
636
+ exports.shallow = shallow;
637
+ exports.useBlocker = useBlocker;
638
+ exports.useDehydrate = useDehydrate;
639
+ exports.useHydrate = useHydrate;
640
+ exports.useInjectHtml = useInjectHtml;
641
+ exports.useLinkProps = useLinkProps;
642
+ exports.useLoader = useLoader;
643
+ exports.useMatch = useMatch;
644
+ exports.useMatchRoute = useMatchRoute;
645
+ exports.useMatches = useMatches;
646
+ exports.useNavigate = useNavigate;
647
+ exports.useParams = useParams;
648
+ exports.useRouteContext = useRouteContext;
649
+ exports.useRouter = useRouter;
650
+ exports.useRouterContext = useRouterContext;
651
+ exports.useRouterState = useRouterState;
652
+ exports.useSearch = useSearch;
653
+ //# sourceMappingURL=react.js.map