@tanstack/react-router 0.0.1-beta.167 → 0.0.1-beta.169

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.
@@ -12,649 +12,53 @@
12
12
 
13
13
  Object.defineProperty(exports, '__esModule', { value: true });
14
14
 
15
- var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
16
- var React = require('react');
17
15
  var reactStore = require('@tanstack/react-store');
18
- var invariant = require('tiny-invariant');
19
- var warning = require('tiny-warning');
20
16
  var routerCore = require('@tanstack/router-core');
17
+ var react = require('./react.js');
21
18
  var scrollRestoration = require('./scroll-restoration.js');
22
- var deferred = require('./deferred.js');
19
+ var awaited = require('./awaited.js');
23
20
 
24
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
21
 
26
- function _interopNamespace(e) {
27
- if (e && e.__esModule) return e;
28
- var n = Object.create(null);
29
- if (e) {
30
- Object.keys(e).forEach(function (k) {
31
- if (k !== 'default') {
32
- var d = Object.getOwnPropertyDescriptor(e, k);
33
- Object.defineProperty(n, k, d.get ? d : {
34
- enumerable: true,
35
- get: function () { return e[k]; }
36
- });
37
- }
38
- });
39
- }
40
- n["default"] = e;
41
- return Object.freeze(n);
42
- }
43
-
44
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
45
- var invariant__default = /*#__PURE__*/_interopDefaultLegacy(invariant);
46
- var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
47
-
48
- routerCore.Route.__onInit = route => {
49
- Object.assign(route, {
50
- useMatch: (opts = {}) => {
51
- return useMatch({
52
- ...opts,
53
- from: route.id
54
- });
55
- },
56
- useLoader: (opts = {}) => {
57
- return useLoader({
58
- ...opts,
59
- from: route.id
60
- });
61
- },
62
- useContext: (opts = {}) => {
63
- return useMatch({
64
- ...opts,
65
- from: route.id,
66
- select: d => opts?.select?.(d.context) ?? d.context
67
- });
68
- },
69
- useRouteContext: (opts = {}) => {
70
- return useMatch({
71
- ...opts,
72
- from: route.id,
73
- select: d => opts?.select?.(d.routeContext) ?? d.routeContext
74
- });
75
- },
76
- useSearch: (opts = {}) => {
77
- return useSearch({
78
- ...opts,
79
- from: route.id
80
- });
81
- },
82
- useParams: (opts = {}) => {
83
- return useParams({
84
- ...opts,
85
- from: route.id
86
- });
87
- }
88
- });
89
- };
90
-
91
- //
92
-
93
- function lazyRouteComponent(importer, exportName) {
94
- let loadPromise;
95
- const load = () => {
96
- if (!loadPromise) {
97
- loadPromise = importer();
98
- }
99
- return loadPromise;
100
- };
101
- const lazyComp = /*#__PURE__*/React__namespace.lazy(async () => {
102
- const moduleExports = await load();
103
- const comp = moduleExports[exportName ?? 'default'];
104
- return {
105
- default: comp
106
- };
107
- });
108
- lazyComp.preload = load;
109
- return lazyComp;
110
- }
111
- //
112
-
113
- function useLinkProps(options) {
114
- const router = useRouter();
115
- const {
116
- // custom props
117
- type,
118
- children,
119
- target,
120
- activeProps = () => ({
121
- className: 'active'
122
- }),
123
- inactiveProps = () => ({}),
124
- activeOptions,
125
- disabled,
126
- // fromCurrent,
127
- hash,
128
- search,
129
- params,
130
- to = '.',
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.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
- const hasPendingComponent = state.pendingMatches.some(d => {
251
- const route = router.getRoute(d.routeId);
252
- return !!route?.options.pendingComponent;
253
- });
254
- if (hasPendingComponent) {
255
- return state.pendingMatchIds;
256
- }
257
- return state.matchIds;
258
- }
259
- });
260
- return /*#__PURE__*/React__namespace.createElement(matchIdsContext.Provider, {
261
- value: [undefined, ...matchIds]
262
- }, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
263
- errorComponent: ErrorComponent,
264
- route: router.getRoute(routerCore.rootRouteId),
265
- onCatch: () => {
266
- warning__default["default"](false, `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`);
267
- }
268
- }, /*#__PURE__*/React__namespace.createElement(Outlet, null)));
269
- }
270
- function useRouter() {
271
- const value = React__namespace.useContext(routerContext);
272
- warning__default["default"](value, 'useRouter must be used inside a <Router> component!');
273
- return value;
274
- }
275
- function useMatches(opts) {
276
- const matchIds = React__namespace.useContext(matchIdsContext);
277
- return useRouterState({
278
- select: state => {
279
- const matches = state.matches.slice(state.matches.findIndex(d => d.id === matchIds[0]));
280
- return opts?.select?.(matches) ?? matches;
281
- }
282
- });
283
- }
284
- function useMatch(opts) {
285
- const router = useRouter();
286
- const nearestMatchId = React__namespace.useContext(matchIdsContext)[0];
287
- const nearestMatchRouteId = router.getRouteMatch(nearestMatchId)?.routeId;
288
- const matchRouteId = useRouterState({
289
- select: state => {
290
- const matches = state.matches;
291
- const match = opts?.from ? matches.find(d => d.routeId === opts?.from) : matches.find(d => d.id === nearestMatchId);
292
- return match.routeId;
293
- }
294
- });
295
- if (opts?.strict ?? true) {
296
- 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?`);
297
- }
298
- const match = useRouterState({
299
- select: state => {
300
- const matches = state.matches;
301
- const match = opts?.from ? matches.find(d => d.routeId === opts?.from) : matches.find(d => d.id === nearestMatchId);
302
- invariant__default["default"](match, `Could not find ${opts?.from ? `an active match from "${opts.from}"` : 'a nearest match!'}`);
303
- return opts?.select?.(match) ?? match;
304
- }
305
- });
306
- return match;
307
- }
308
- function useLoader(opts) {
309
- return useMatch({
310
- ...opts,
311
- select: match => opts?.select?.(match.loaderData) ?? match.loaderData
312
- });
313
- }
314
- function useRouterContext(opts) {
315
- return useMatch({
316
- ...opts,
317
- select: match => opts?.select?.(match.context) ?? match.context
318
- });
319
- }
320
- function useRouteContext(opts) {
321
- return useMatch({
322
- ...opts,
323
- select: match => opts?.select?.(match.routeContext) ?? match.routeContext
324
- });
325
- }
326
- function useSearch(opts) {
327
- return useMatch({
328
- ...opts,
329
- select: match => {
330
- return opts?.select?.(match.search) ?? match.search;
331
- }
332
- });
333
- }
334
- function useParams(opts) {
335
- return useRouterState({
336
- select: state => {
337
- const params = routerCore.last(state.matches)?.params;
338
- return opts?.select?.(params) ?? params;
339
- }
340
- });
341
- }
342
- function useNavigate(defaultOpts) {
343
- const router = useRouter();
344
- return React__namespace.useCallback(opts => {
345
- return router.navigate({
346
- ...defaultOpts,
347
- ...opts
348
- });
349
- }, []);
350
- }
351
- function useMatchRoute() {
352
- const router = useRouter();
353
- return React__namespace.useCallback(opts => {
354
- const {
355
- pending,
356
- caseSensitive,
357
- ...rest
358
- } = opts;
359
- return router.matchRoute(rest, {
360
- pending,
361
- caseSensitive
362
- });
363
- }, []);
364
- }
365
- function MatchRoute(props) {
366
- const matchRoute = useMatchRoute();
367
- const params = matchRoute(props);
368
- if (typeof props.children === 'function') {
369
- return props.children(params);
370
- }
371
- return !!params ? props.children : null;
372
- }
373
- function Outlet() {
374
- const matchIds = React__namespace.useContext(matchIdsContext).slice(1);
375
- if (!matchIds[0]) {
376
- return null;
377
- }
378
- return /*#__PURE__*/React__namespace.createElement(Match, {
379
- matchIds: matchIds
380
- });
381
- }
382
- const defaultPending = () => null;
383
- function Match({
384
- matchIds
385
- }) {
386
- const router = useRouter();
387
- const matchId = matchIds[0];
388
- const routeId = router.getRouteMatch(matchId).routeId;
389
- const route = router.getRoute(routeId);
390
- const PendingComponent = route.options.pendingComponent ?? router.options.defaultPendingComponent ?? defaultPending;
391
- const errorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent ?? ErrorComponent;
392
- const ResolvedSuspenseBoundary = route.options.wrapInSuspense ?? !route.isRoot ? React__namespace.Suspense : SafeFragment;
393
- const ResolvedCatchBoundary = !!errorComponent ? CatchBoundary : SafeFragment;
394
- return /*#__PURE__*/React__namespace.createElement(matchIdsContext.Provider, {
395
- value: matchIds
396
- }, /*#__PURE__*/React__namespace.createElement(ResolvedSuspenseBoundary, {
397
- fallback: /*#__PURE__*/React__namespace.createElement(PendingComponent, {
398
- useMatch: route.useMatch,
399
- useContext: route.useContext,
400
- useRouteContext: route.useRouteContext,
401
- useSearch: route.useSearch,
402
- useParams: route.useParams
403
- })
404
- }, /*#__PURE__*/React__namespace.createElement(ResolvedCatchBoundary, {
405
- key: route.id,
406
- errorComponent: errorComponent,
407
- route: route,
408
- onCatch: () => {
409
- warning__default["default"](false, `Error in route match: ${matchId}`);
410
- }
411
- }, /*#__PURE__*/React__namespace.createElement(MatchInner, {
412
- matchId: matchId,
413
- PendingComponent: PendingComponent
414
- }))));
415
- }
416
- function MatchInner({
417
- matchId,
418
- PendingComponent
419
- }) {
420
- const router = useRouter();
421
- const match = useRouterState({
422
- select: d => {
423
- const match = d.matchesById[matchId];
424
- return routerCore.pick(match, ['status', 'loadPromise', 'routeId', 'error']);
425
- }
426
- });
427
- const route = router.getRoute(match.routeId);
428
- if (match.status === 'error') {
429
- throw match.error;
430
- }
431
- if (match.status === 'pending') {
432
- return /*#__PURE__*/React__namespace.createElement(PendingComponent, {
433
- useLoader: route.useLoader,
434
- useMatch: route.useMatch,
435
- useContext: route.useContext,
436
- useRouteContext: route.useRouteContext,
437
- useSearch: route.useSearch,
438
- useParams: route.useParams
439
- });
440
- }
441
- if (match.status === 'success') {
442
- let comp = route.options.component ?? router.options.defaultComponent;
443
- if (comp) {
444
- return /*#__PURE__*/React__namespace.createElement(comp, {
445
- useLoader: route.useLoader,
446
- useMatch: route.useMatch,
447
- useContext: route.useContext,
448
- useRouteContext: route.useRouteContext,
449
- useSearch: route.useSearch,
450
- useParams: route.useParams
451
- });
452
- }
453
- return /*#__PURE__*/React__namespace.createElement(Outlet, null);
454
- }
455
- invariant__default["default"](false, 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!');
456
- }
457
- function SafeFragment(props) {
458
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, props.children);
459
- }
460
- function useInjectHtml() {
461
- const router = useRouter();
462
- return React__namespace.useCallback(html => {
463
- router.injectHtml(html);
464
- }, []);
465
- }
466
- function useDehydrate() {
467
- const router = useRouter();
468
- return React__namespace.useCallback(function dehydrate(key, data) {
469
- return router.dehydrateData(key, data);
470
- }, []);
471
- }
472
- function useHydrate() {
473
- const router = useRouter();
474
- return function hydrate(key) {
475
- return router.hydrateData(key);
476
- };
477
- }
478
-
479
- // This is the messiest thing ever... I'm either seriously tired (likely) or
480
- // there has to be a better way to reset error boundaries when the
481
- // router's location key changes.
482
-
483
- class CatchBoundary extends React__namespace.Component {
484
- state = {
485
- error: false,
486
- info: undefined
487
- };
488
- componentDidCatch(error, info) {
489
- this.props.onCatch(error, info);
490
- this.setState({
491
- error,
492
- info
493
- });
494
- }
495
- render() {
496
- return /*#__PURE__*/React__namespace.createElement(CatchBoundaryInner, _rollupPluginBabelHelpers["extends"]({}, this.props, {
497
- errorState: this.state,
498
- reset: () => this.setState({})
499
- }));
500
- }
501
- }
502
- function CatchBoundaryInner(props) {
503
- const locationKey = useRouterState({
504
- select: d => d.resolvedLocation.key
505
- });
506
- const [activeErrorState, setActiveErrorState] = React__namespace.useState(props.errorState);
507
- const errorComponent = props.errorComponent ?? ErrorComponent;
508
- const prevKeyRef = React__namespace.useRef('');
509
- React__namespace.useEffect(() => {
510
- if (activeErrorState) {
511
- if (locationKey !== prevKeyRef.current) {
512
- setActiveErrorState({});
513
- }
514
- }
515
- prevKeyRef.current = locationKey;
516
- }, [activeErrorState, locationKey]);
517
- React__namespace.useEffect(() => {
518
- if (props.errorState.error) {
519
- setActiveErrorState(props.errorState);
520
- }
521
- // props.reset()
522
- }, [props.errorState.error]);
523
- if (props.errorState.error && activeErrorState.error) {
524
- return /*#__PURE__*/React__namespace.createElement(errorComponent, {
525
- ...activeErrorState,
526
- useMatch: props.route.useMatch,
527
- useContext: props.route.useContext,
528
- useRouteContext: props.route.useRouteContext,
529
- useSearch: props.route.useSearch,
530
- useParams: props.route.useParams
531
- });
532
- }
533
- return props.children;
534
- }
535
- function ErrorComponent({
536
- error
537
- }) {
538
- const [show, setShow] = React__namespace.useState(process.env.NODE_ENV !== 'production');
539
- return /*#__PURE__*/React__namespace.createElement("div", {
540
- style: {
541
- padding: '.5rem',
542
- maxWidth: '100%'
543
- }
544
- }, /*#__PURE__*/React__namespace.createElement("div", {
545
- style: {
546
- display: 'flex',
547
- alignItems: 'center',
548
- gap: '.5rem'
549
- }
550
- }, /*#__PURE__*/React__namespace.createElement("strong", {
551
- style: {
552
- fontSize: '1rem'
553
- }
554
- }, "Something went wrong!"), /*#__PURE__*/React__namespace.createElement("button", {
555
- style: {
556
- appearance: 'none',
557
- fontSize: '.6em',
558
- border: '1px solid currentColor',
559
- padding: '.1rem .2rem',
560
- fontWeight: 'bold',
561
- borderRadius: '.25rem'
562
- },
563
- onClick: () => setShow(d => !d)
564
- }, show ? 'Hide Error' : 'Show Error')), /*#__PURE__*/React__namespace.createElement("div", {
565
- style: {
566
- height: '.25rem'
567
- }
568
- }), show ? /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("pre", {
569
- style: {
570
- fontSize: '.7em',
571
- border: '1px solid red',
572
- borderRadius: '.25rem',
573
- padding: '.3rem',
574
- color: 'red',
575
- overflow: 'auto'
576
- }
577
- }, error.message ? /*#__PURE__*/React__namespace.createElement("code", null, error.message) : null)) : null);
578
- }
579
- function useBlocker(message, condition = true) {
580
- const router = useRouter();
581
- React__namespace.useEffect(() => {
582
- if (!condition) return;
583
- let unblock = router.history.block((retry, cancel) => {
584
- if (window.confirm(message)) {
585
- unblock();
586
- retry();
587
- }
588
- });
589
- return unblock;
590
- });
591
- }
592
- function Block({
593
- message,
594
- condition,
595
- children
596
- }) {
597
- useBlocker(message, condition);
598
- return children ?? null;
599
- }
600
- function shallow(objA, objB) {
601
- if (Object.is(objA, objB)) {
602
- return true;
603
- }
604
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
605
- return false;
606
- }
607
- const keysA = Object.keys(objA);
608
- if (keysA.length !== Object.keys(objB).length) {
609
- return false;
610
- }
611
- for (let i = 0; i < keysA.length; i++) {
612
- if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
613
- return false;
614
- }
615
- }
616
- return true;
617
- }
618
22
 
619
23
  Object.defineProperty(exports, 'useStore', {
620
- enumerable: true,
621
- get: function () { return reactStore.useStore; }
24
+ enumerable: true,
25
+ get: function () { return reactStore.useStore; }
622
26
  });
27
+ exports.Block = react.Block;
28
+ exports.ErrorComponent = react.ErrorComponent;
29
+ exports.Link = react.Link;
30
+ exports.MatchRoute = react.MatchRoute;
31
+ exports.Navigate = react.Navigate;
32
+ exports.Outlet = react.Outlet;
33
+ exports.RouterProvider = react.RouterProvider;
34
+ exports.lazyRouteComponent = react.lazyRouteComponent;
35
+ exports.matchIdsContext = react.matchIdsContext;
36
+ exports.routerContext = react.routerContext;
37
+ exports.shallow = react.shallow;
38
+ exports.useBlocker = react.useBlocker;
39
+ exports.useDehydrate = react.useDehydrate;
40
+ exports.useHydrate = react.useHydrate;
41
+ exports.useInjectHtml = react.useInjectHtml;
42
+ exports.useLinkProps = react.useLinkProps;
43
+ exports.useLoader = react.useLoader;
44
+ exports.useMatch = react.useMatch;
45
+ exports.useMatchRoute = react.useMatchRoute;
46
+ exports.useMatches = react.useMatches;
47
+ exports.useNavigate = react.useNavigate;
48
+ exports.useParams = react.useParams;
49
+ exports.useRouteContext = react.useRouteContext;
50
+ exports.useRouter = react.useRouter;
51
+ exports.useRouterContext = react.useRouterContext;
52
+ exports.useRouterState = react.useRouterState;
53
+ exports.useSearch = react.useSearch;
623
54
  exports.ScrollRestoration = scrollRestoration.ScrollRestoration;
624
55
  exports.useScrollRestoration = scrollRestoration.useScrollRestoration;
625
- exports.Deferred = deferred.Deferred;
626
- exports.useDeferred = deferred.useDeferred;
627
- exports.Block = Block;
628
- exports.ErrorComponent = ErrorComponent;
629
- exports.Link = Link;
630
- exports.MatchRoute = MatchRoute;
631
- exports.Navigate = Navigate;
632
- exports.Outlet = Outlet;
633
- exports.RouterProvider = RouterProvider;
634
- exports.lazyRouteComponent = lazyRouteComponent;
635
- exports.matchIdsContext = matchIdsContext;
636
- exports.routerContext = routerContext;
637
- exports.shallow = shallow;
638
- exports.useBlocker = useBlocker;
639
- exports.useDehydrate = useDehydrate;
640
- exports.useHydrate = useHydrate;
641
- exports.useInjectHtml = useInjectHtml;
642
- exports.useLinkProps = useLinkProps;
643
- exports.useLoader = useLoader;
644
- exports.useMatch = useMatch;
645
- exports.useMatchRoute = useMatchRoute;
646
- exports.useMatches = useMatches;
647
- exports.useNavigate = useNavigate;
648
- exports.useParams = useParams;
649
- exports.useRouteContext = useRouteContext;
650
- exports.useRouter = useRouter;
651
- exports.useRouterContext = useRouterContext;
652
- exports.useRouterState = useRouterState;
653
- exports.useSearch = useSearch;
56
+ exports.Await = awaited.Await;
57
+ exports.useAwaited = awaited.useAwaited;
654
58
  Object.keys(routerCore).forEach(function (k) {
655
- if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
656
- enumerable: true,
657
- get: function () { return routerCore[k]; }
658
- });
59
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
60
+ enumerable: true,
61
+ get: function () { return routerCore[k]; }
62
+ });
659
63
  });
660
64
  //# sourceMappingURL=index.js.map