@tanstack/react-router 0.0.1-beta.166 → 0.0.1-beta.168

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