@tanstack/react-router 0.0.1-beta.27 → 0.0.1-beta.29
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.
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -5
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/build/cjs/{react-router/src/index.js → index.js} +66 -126
- package/build/cjs/index.js.map +1 -0
- package/build/esm/index.js +79 -2603
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +59 -49
- package/build/stats-react.json +115 -33
- package/build/types/index.d.ts +10 -19
- package/build/umd/index.development.js +207 -391
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +61 -51
- package/build/cjs/react-router/src/index.js.map +0 -1
- package/build/cjs/router-core/build/esm/index.js +0 -2530
- package/build/cjs/router-core/build/esm/index.js.map +0 -1
|
@@ -16,31 +16,26 @@ function _extends() {
|
|
|
16
16
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
17
17
|
for (var i = 1; i < arguments.length; i++) {
|
|
18
18
|
var source = arguments[i];
|
|
19
|
-
|
|
20
19
|
for (var key in source) {
|
|
21
20
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
22
21
|
target[key] = source[key];
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
return target;
|
|
28
26
|
};
|
|
29
27
|
return _extends.apply(this, arguments);
|
|
30
28
|
}
|
|
31
|
-
|
|
32
29
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
30
|
if (source == null) return {};
|
|
34
31
|
var target = {};
|
|
35
32
|
var sourceKeys = Object.keys(source);
|
|
36
33
|
var key, i;
|
|
37
|
-
|
|
38
34
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
39
35
|
key = sourceKeys[i];
|
|
40
36
|
if (excluded.indexOf(key) >= 0) continue;
|
|
41
37
|
target[key] = source[key];
|
|
42
38
|
}
|
|
43
|
-
|
|
44
39
|
return target;
|
|
45
40
|
}
|
|
46
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14
14
|
|
|
15
|
-
var _rollupPluginBabelHelpers = require('
|
|
15
|
+
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js');
|
|
16
16
|
var React = require('react');
|
|
17
17
|
var shim = require('use-sync-external-store/shim');
|
|
18
|
-
var
|
|
18
|
+
var routerCore = require('@tanstack/router-core');
|
|
19
19
|
|
|
20
20
|
function _interopNamespace(e) {
|
|
21
21
|
if (e && e.__esModule) return e;
|
|
@@ -38,8 +38,8 @@ function _interopNamespace(e) {
|
|
|
38
38
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
39
39
|
|
|
40
40
|
const _excluded = ["type", "children", "target", "activeProps", "inactiveProps", "activeOptions", "disabled", "hash", "search", "params", "to", "preload", "preloadDelay", "preloadMaxAge", "replace", "style", "className", "onClick", "onFocus", "onMouseEnter", "onMouseLeave", "onTouchStart", "onTouchEnd"],
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
_excluded2 = ["pending", "caseSensitive", "children"],
|
|
42
|
+
_excluded3 = ["router"];
|
|
43
43
|
function lazy(importer) {
|
|
44
44
|
const lazyComp = /*#__PURE__*/React__namespace.lazy(importer);
|
|
45
45
|
let promise;
|
|
@@ -51,7 +51,6 @@ function lazy(importer) {
|
|
|
51
51
|
} : {}, props));
|
|
52
52
|
});
|
|
53
53
|
const finalComp = forwardedComp;
|
|
54
|
-
|
|
55
54
|
finalComp.preload = () => {
|
|
56
55
|
if (!promise) {
|
|
57
56
|
promise = importer().then(module => {
|
|
@@ -59,13 +58,12 @@ function lazy(importer) {
|
|
|
59
58
|
return resolvedComp;
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
|
-
|
|
63
61
|
return promise;
|
|
64
62
|
};
|
|
65
|
-
|
|
66
63
|
return finalComp;
|
|
67
64
|
}
|
|
68
65
|
//
|
|
66
|
+
|
|
69
67
|
function Link(props) {
|
|
70
68
|
const router = useRouter();
|
|
71
69
|
return /*#__PURE__*/React__namespace.createElement(router.Link, props);
|
|
@@ -75,11 +73,9 @@ const routerContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
|
75
73
|
function MatchesProvider(props) {
|
|
76
74
|
return /*#__PURE__*/React__namespace.createElement(matchesContext.Provider, props);
|
|
77
75
|
}
|
|
78
|
-
|
|
79
76
|
const useRouterSubscription = router => {
|
|
80
77
|
shim.useSyncExternalStore(cb => router.subscribe(() => cb()), () => router.state, () => router.state);
|
|
81
78
|
};
|
|
82
|
-
|
|
83
79
|
function createReactRouter(opts) {
|
|
84
80
|
const makeRouteExt = (route, router) => {
|
|
85
81
|
return {
|
|
@@ -87,36 +83,33 @@ function createReactRouter(opts) {
|
|
|
87
83
|
if (subRouteId === void 0) {
|
|
88
84
|
subRouteId = '.';
|
|
89
85
|
}
|
|
90
|
-
|
|
91
86
|
const resolvedRouteId = router.resolvePath(route.routeId, subRouteId);
|
|
92
87
|
const resolvedRoute = router.getRoute(resolvedRouteId);
|
|
93
88
|
useRouterSubscription(router);
|
|
94
|
-
|
|
89
|
+
routerCore.invariant(resolvedRoute, "Could not find a route for route \"" + resolvedRouteId + "\"! Did you forget to add it to your route config?");
|
|
95
90
|
return resolvedRoute;
|
|
96
91
|
},
|
|
97
92
|
linkProps: options => {
|
|
98
93
|
var _functionalUpdate, _functionalUpdate2;
|
|
99
|
-
|
|
100
94
|
const {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
// custom props
|
|
96
|
+
|
|
97
|
+
target,
|
|
98
|
+
activeProps = () => ({
|
|
99
|
+
className: 'active'
|
|
100
|
+
}),
|
|
101
|
+
inactiveProps = () => ({}),
|
|
102
|
+
disabled,
|
|
103
|
+
// element props
|
|
104
|
+
style,
|
|
105
|
+
className,
|
|
106
|
+
onClick,
|
|
107
|
+
onFocus,
|
|
108
|
+
onMouseEnter,
|
|
109
|
+
onMouseLeave
|
|
110
|
+
} = options,
|
|
111
|
+
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(options, _excluded);
|
|
118
112
|
const linkInfo = route.buildLink(options);
|
|
119
|
-
|
|
120
113
|
if (linkInfo.type === 'external') {
|
|
121
114
|
const {
|
|
122
115
|
href
|
|
@@ -125,7 +118,6 @@ function createReactRouter(opts) {
|
|
|
125
118
|
href
|
|
126
119
|
};
|
|
127
120
|
}
|
|
128
|
-
|
|
129
121
|
const {
|
|
130
122
|
handleClick,
|
|
131
123
|
handleFocus,
|
|
@@ -134,24 +126,25 @@ function createReactRouter(opts) {
|
|
|
134
126
|
isActive,
|
|
135
127
|
next
|
|
136
128
|
} = linkInfo;
|
|
137
|
-
|
|
138
129
|
const reactHandleClick = e => {
|
|
139
|
-
React__namespace.startTransition
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
if (React__namespace.startTransition)
|
|
131
|
+
// This is a hack for react < 18
|
|
132
|
+
React__namespace.startTransition(() => {
|
|
133
|
+
handleClick(e);
|
|
134
|
+
});else handleClick(e);
|
|
142
135
|
};
|
|
143
|
-
|
|
144
136
|
const composeHandlers = handlers => e => {
|
|
145
137
|
e.persist();
|
|
146
138
|
handlers.forEach(handler => {
|
|
147
139
|
if (handler) handler(e);
|
|
148
140
|
});
|
|
149
|
-
};
|
|
150
|
-
|
|
141
|
+
};
|
|
151
142
|
|
|
152
|
-
|
|
143
|
+
// Get the active props
|
|
144
|
+
const resolvedActiveProps = isActive ? (_functionalUpdate = routerCore.functionalUpdate(activeProps, {})) != null ? _functionalUpdate : {} : {};
|
|
153
145
|
|
|
154
|
-
|
|
146
|
+
// Get the inactive props
|
|
147
|
+
const resolvedInactiveProps = isActive ? {} : (_functionalUpdate2 = routerCore.functionalUpdate(inactiveProps, {})) != null ? _functionalUpdate2 : {};
|
|
155
148
|
return _rollupPluginBabelHelpers["extends"]({}, resolvedActiveProps, resolvedInactiveProps, rest, {
|
|
156
149
|
href: disabled ? undefined : next.href,
|
|
157
150
|
onClick: composeHandlers([reactHandleClick, onClick]),
|
|
@@ -181,26 +174,22 @@ function createReactRouter(opts) {
|
|
|
181
174
|
}),
|
|
182
175
|
MatchRoute: opts => {
|
|
183
176
|
const {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
pending,
|
|
178
|
+
caseSensitive
|
|
179
|
+
} = opts,
|
|
180
|
+
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(opts, _excluded2);
|
|
189
181
|
const params = route.matchRoute(rest, {
|
|
190
182
|
pending,
|
|
191
183
|
caseSensitive
|
|
192
184
|
});
|
|
193
|
-
|
|
194
185
|
if (!params) {
|
|
195
186
|
return null;
|
|
196
187
|
}
|
|
197
|
-
|
|
198
188
|
return typeof opts.children === 'function' ? opts.children(params) : opts.children;
|
|
199
189
|
}
|
|
200
190
|
};
|
|
201
191
|
};
|
|
202
|
-
|
|
203
|
-
const coreRouter = index.createRouter(_rollupPluginBabelHelpers["extends"]({}, opts, {
|
|
192
|
+
const coreRouter = routerCore.createRouter(_rollupPluginBabelHelpers["extends"]({}, opts, {
|
|
204
193
|
createRouter: router => {
|
|
205
194
|
const routerExt = {
|
|
206
195
|
useState: () => {
|
|
@@ -208,22 +197,19 @@ function createReactRouter(opts) {
|
|
|
208
197
|
return router.state;
|
|
209
198
|
},
|
|
210
199
|
useMatch: (routeId, opts) => {
|
|
211
|
-
var
|
|
212
|
-
|
|
200
|
+
var _opts$strict;
|
|
213
201
|
useRouterSubscription(router);
|
|
214
|
-
|
|
215
|
-
const
|
|
202
|
+
routerCore.invariant(routeId !== routerCore.rootRouteId, "\"" + routerCore.rootRouteId + "\" cannot be used with useMatch! Did you mean to useRoute(\"" + routerCore.rootRouteId + "\")?");
|
|
203
|
+
const nearestMatch = useNearestMatch();
|
|
216
204
|
const match = router.state.matches.find(d => d.routeId === routeId);
|
|
217
|
-
|
|
218
205
|
if ((_opts$strict = opts == null ? void 0 : opts.strict) != null ? _opts$strict : true) {
|
|
219
|
-
|
|
220
|
-
|
|
206
|
+
routerCore.invariant(match, "Could not find an active match for \"" + routeId + "\"!");
|
|
207
|
+
routerCore.invariant(nearestMatch.routeId == (match == null ? void 0 : match.routeId), "useMatch(\"" + (match == null ? void 0 : match.routeId) + "\") is being called in a component that is meant to render the '" + nearestMatch.routeId + "' route. Did you mean to 'useMatch(\"" + (match == null ? void 0 : match.routeId) + "\", { strict: false })' or 'useRoute(\"" + (match == null ? void 0 : match.routeId) + "\")' instead?");
|
|
221
208
|
}
|
|
222
|
-
|
|
223
209
|
return match;
|
|
224
210
|
}
|
|
225
211
|
};
|
|
226
|
-
const routeExt = makeRouteExt(router.getRoute(
|
|
212
|
+
const routeExt = makeRouteExt(router.getRoute(routerCore.rootRouteId), router);
|
|
227
213
|
Object.assign(router, routerExt, routeExt);
|
|
228
214
|
},
|
|
229
215
|
createRoute: _ref => {
|
|
@@ -236,7 +222,8 @@ function createReactRouter(opts) {
|
|
|
236
222
|
},
|
|
237
223
|
loadComponent: async component => {
|
|
238
224
|
if (component.preload && typeof document !== 'undefined') {
|
|
239
|
-
component.preload();
|
|
225
|
+
component.preload();
|
|
226
|
+
// return await component.preload()
|
|
240
227
|
}
|
|
241
228
|
|
|
242
229
|
return component;
|
|
@@ -245,33 +232,26 @@ function createReactRouter(opts) {
|
|
|
245
232
|
return coreRouter;
|
|
246
233
|
}
|
|
247
234
|
function RouterProvider(_ref2) {
|
|
248
|
-
var _router$options$useCo;
|
|
249
|
-
|
|
250
235
|
let {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(_ref2, _excluded3);
|
|
255
|
-
|
|
236
|
+
router
|
|
237
|
+
} = _ref2,
|
|
238
|
+
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(_ref2, _excluded3);
|
|
256
239
|
router.update(rest);
|
|
257
|
-
const defaultRouterContext = React__namespace.useRef({});
|
|
258
|
-
const userContext = (_router$options$useCo = router.options.useContext == null ? void 0 : router.options.useContext()) != null ? _router$options$useCo : defaultRouterContext.current;
|
|
259
|
-
router.context = userContext;
|
|
260
240
|
useRouterSubscription(router);
|
|
261
241
|
React__namespace.useEffect(() => {
|
|
262
242
|
return router.mount();
|
|
263
243
|
}, [router]);
|
|
264
|
-
return /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
|
|
244
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
|
|
265
245
|
value: {
|
|
266
246
|
router: router
|
|
267
247
|
}
|
|
268
248
|
}, /*#__PURE__*/React__namespace.createElement(MatchesProvider, {
|
|
269
|
-
value: router.state.matches
|
|
270
|
-
},
|
|
249
|
+
value: [undefined, ...router.state.matches]
|
|
250
|
+
}, /*#__PURE__*/React__namespace.createElement(Outlet, null))));
|
|
271
251
|
}
|
|
272
252
|
function useRouter() {
|
|
273
253
|
const value = React__namespace.useContext(routerContext);
|
|
274
|
-
|
|
254
|
+
routerCore.warning(!value, 'useRouter must be used inside a <Router> component!');
|
|
275
255
|
useRouterSubscription(value.router);
|
|
276
256
|
return value.router;
|
|
277
257
|
}
|
|
@@ -283,10 +263,8 @@ function useMatch(routeId, opts) {
|
|
|
283
263
|
return router.useMatch(routeId, opts);
|
|
284
264
|
}
|
|
285
265
|
function useNearestMatch() {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const runtimeMatch = (_useMatches2 = useMatches()) == null ? void 0 : _useMatches2[0];
|
|
289
|
-
index.invariant(runtimeMatch, "Could not find a nearest match!");
|
|
266
|
+
const runtimeMatch = useMatches()[0];
|
|
267
|
+
routerCore.invariant(runtimeMatch, "Could not find a nearest match!");
|
|
290
268
|
return runtimeMatch;
|
|
291
269
|
}
|
|
292
270
|
function useRoute(routeId) {
|
|
@@ -306,16 +284,13 @@ function MatchRoute(props) {
|
|
|
306
284
|
}
|
|
307
285
|
function Outlet() {
|
|
308
286
|
var _ref3, _match$__$pendingComp, _match$__$errorCompon;
|
|
309
|
-
|
|
310
287
|
const router = useRouter();
|
|
311
288
|
const matches = useMatches().slice(1);
|
|
312
289
|
const match = matches[0];
|
|
313
290
|
const defaultPending = React__namespace.useCallback(() => null, []);
|
|
314
|
-
|
|
315
291
|
if (!match) {
|
|
316
292
|
return null;
|
|
317
293
|
}
|
|
318
|
-
|
|
319
294
|
const PendingComponent = (_ref3 = (_match$__$pendingComp = match.__.pendingComponent) != null ? _match$__$pendingComp : router.options.defaultPendingComponent) != null ? _ref3 : defaultPending;
|
|
320
295
|
const errorComponent = (_match$__$errorCompon = match.__.errorComponent) != null ? _match$__$errorCompon : router.options.defaultErrorComponent;
|
|
321
296
|
return /*#__PURE__*/React__namespace.createElement(MatchesProvider, {
|
|
@@ -323,23 +298,20 @@ function Outlet() {
|
|
|
323
298
|
}, /*#__PURE__*/React__namespace.createElement(React__namespace.Suspense, {
|
|
324
299
|
fallback: /*#__PURE__*/React__namespace.createElement(PendingComponent, null)
|
|
325
300
|
}, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
301
|
+
key: match.routeId,
|
|
326
302
|
errorComponent: errorComponent,
|
|
327
|
-
|
|
303
|
+
match: match
|
|
328
304
|
}, (() => {
|
|
329
305
|
if (match.status === 'error') {
|
|
330
306
|
throw match.error;
|
|
331
307
|
}
|
|
332
|
-
|
|
333
308
|
if (match.status === 'success') {
|
|
334
309
|
var _ref4, _ref5;
|
|
335
|
-
|
|
336
310
|
return /*#__PURE__*/React__namespace.createElement((_ref4 = (_ref5 = match.__.component) != null ? _ref5 : router.options.defaultComponent) != null ? _ref4 : Outlet);
|
|
337
311
|
}
|
|
338
|
-
|
|
339
312
|
throw match.__.loadPromise;
|
|
340
313
|
})())));
|
|
341
314
|
}
|
|
342
|
-
|
|
343
315
|
class CatchBoundary extends React__namespace.Component {
|
|
344
316
|
constructor() {
|
|
345
317
|
super(...arguments);
|
|
@@ -348,30 +320,27 @@ class CatchBoundary extends React__namespace.Component {
|
|
|
348
320
|
info: undefined
|
|
349
321
|
};
|
|
350
322
|
}
|
|
351
|
-
|
|
352
323
|
componentDidCatch(error, info) {
|
|
324
|
+
console.error("Error in route match: " + this.props.match.matchId);
|
|
353
325
|
console.error(error);
|
|
354
326
|
this.setState({
|
|
355
327
|
error,
|
|
356
328
|
info
|
|
357
329
|
});
|
|
358
330
|
}
|
|
359
|
-
|
|
360
331
|
render() {
|
|
361
332
|
return /*#__PURE__*/React__namespace.createElement(CatchBoundaryInner, _rollupPluginBabelHelpers["extends"]({}, this.props, {
|
|
362
333
|
errorState: this.state,
|
|
363
334
|
reset: () => this.setState({})
|
|
364
335
|
}));
|
|
365
336
|
}
|
|
337
|
+
}
|
|
366
338
|
|
|
367
|
-
|
|
339
|
+
// This is the messiest thing ever... I'm either seriously tired (likely) or
|
|
368
340
|
// there has to be a better way to reset error boundaries when the
|
|
369
341
|
// router's location key changes.
|
|
370
|
-
|
|
371
|
-
|
|
372
342
|
function CatchBoundaryInner(props) {
|
|
373
343
|
var _props$errorComponent;
|
|
374
|
-
|
|
375
344
|
const [activeErrorState, setActiveErrorState] = React__namespace.useState(props.errorState);
|
|
376
345
|
const router = useRouter();
|
|
377
346
|
const errorComponent = (_props$errorComponent = props.errorComponent) != null ? _props$errorComponent : DefaultErrorBoundary;
|
|
@@ -385,24 +354,19 @@ function CatchBoundaryInner(props) {
|
|
|
385
354
|
}
|
|
386
355
|
});
|
|
387
356
|
}
|
|
388
|
-
|
|
389
357
|
return;
|
|
390
358
|
}, [activeErrorState]);
|
|
391
359
|
React__namespace.useEffect(() => {
|
|
392
360
|
if (props.errorState.error) {
|
|
393
361
|
setActiveErrorState(props.errorState);
|
|
394
362
|
}
|
|
395
|
-
|
|
396
363
|
props.reset();
|
|
397
364
|
}, [props.errorState.error]);
|
|
398
|
-
|
|
399
365
|
if (activeErrorState.error) {
|
|
400
366
|
return /*#__PURE__*/React__namespace.createElement(errorComponent, activeErrorState);
|
|
401
367
|
}
|
|
402
|
-
|
|
403
368
|
return props.children;
|
|
404
369
|
}
|
|
405
|
-
|
|
406
370
|
function DefaultErrorBoundary(_ref6) {
|
|
407
371
|
let {
|
|
408
372
|
error
|
|
@@ -455,36 +419,6 @@ function Prompt(_ref7) {
|
|
|
455
419
|
return children != null ? children : null;
|
|
456
420
|
}
|
|
457
421
|
|
|
458
|
-
exports.cleanPath = index.cleanPath;
|
|
459
|
-
exports.createBrowserHistory = index.createBrowserHistory;
|
|
460
|
-
exports.createHashHistory = index.createHashHistory;
|
|
461
|
-
exports.createMemoryHistory = index.createMemoryHistory;
|
|
462
|
-
exports.createRoute = index.createRoute;
|
|
463
|
-
exports.createRouteConfig = index.createRouteConfig;
|
|
464
|
-
exports.createRouteMatch = index.createRouteMatch;
|
|
465
|
-
exports.createRouter = index.createRouter;
|
|
466
|
-
exports.decode = index.decode;
|
|
467
|
-
exports.defaultParseSearch = index.defaultParseSearch;
|
|
468
|
-
exports.defaultStringifySearch = index.defaultStringifySearch;
|
|
469
|
-
exports.encode = index.encode;
|
|
470
|
-
exports.functionalUpdate = index.functionalUpdate;
|
|
471
|
-
exports.interpolatePath = index.interpolatePath;
|
|
472
|
-
exports.invariant = index.invariant;
|
|
473
|
-
exports.joinPaths = index.joinPaths;
|
|
474
|
-
exports.last = index.last;
|
|
475
|
-
exports.matchByPath = index.matchByPath;
|
|
476
|
-
exports.matchPathname = index.matchPathname;
|
|
477
|
-
exports.parsePathname = index.parsePathname;
|
|
478
|
-
exports.parseSearchWith = index.parseSearchWith;
|
|
479
|
-
exports.pick = index.pick;
|
|
480
|
-
exports.replaceEqualDeep = index.replaceEqualDeep;
|
|
481
|
-
exports.resolvePath = index.resolvePath;
|
|
482
|
-
exports.rootRouteId = index.rootRouteId;
|
|
483
|
-
exports.stringifySearchWith = index.stringifySearchWith;
|
|
484
|
-
exports.trimPath = index.trimPath;
|
|
485
|
-
exports.trimPathLeft = index.trimPathLeft;
|
|
486
|
-
exports.trimPathRight = index.trimPathRight;
|
|
487
|
-
exports.warning = index.warning;
|
|
488
422
|
exports.DefaultErrorBoundary = DefaultErrorBoundary;
|
|
489
423
|
exports.Link = Link;
|
|
490
424
|
exports.MatchRoute = MatchRoute;
|
|
@@ -504,4 +438,10 @@ exports.usePrompt = usePrompt;
|
|
|
504
438
|
exports.useRoute = useRoute;
|
|
505
439
|
exports.useRouter = useRouter;
|
|
506
440
|
exports.useSearch = useSearch;
|
|
441
|
+
Object.keys(routerCore).forEach(function (k) {
|
|
442
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
443
|
+
enumerable: true,
|
|
444
|
+
get: function () { return routerCore[k]; }
|
|
445
|
+
});
|
|
446
|
+
});
|
|
507
447
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { useSyncExternalStore } from 'use-sync-external-store/shim'\n\nimport {\n AnyRoute,\n CheckId,\n rootRouteId,\n Route,\n RegisteredAllRouteInfo,\n RegisteredRouter,\n RouterState,\n ToIdOption,\n} from '@tanstack/router-core'\nimport {\n warning,\n RouterOptions,\n RouteMatch,\n MatchRouteOptions,\n RouteConfig,\n AnyRouteConfig,\n AnyAllRouteInfo,\n DefaultAllRouteInfo,\n functionalUpdate,\n createRouter,\n AnyRouteInfo,\n AllRouteInfo,\n RouteInfo,\n ValidFromPath,\n LinkOptions,\n RouteInfoByPath,\n ResolveRelativePath,\n NoInfer,\n ToOptions,\n invariant,\n Router,\n} from '@tanstack/router-core'\n\nexport * from '@tanstack/router-core'\n\nexport type SyncRouteComponent<TProps = {}> = (\n props: TProps,\n) => JSX.Element | React.ReactNode\n\nexport type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {\n preload?: () => Promise<SyncRouteComponent<TProps>>\n}\n\nexport function lazy(\n importer: () => Promise<{ default: SyncRouteComponent }>,\n): RouteComponent {\n const lazyComp = React.lazy(importer as any)\n let promise: Promise<SyncRouteComponent>\n let resolvedComp: SyncRouteComponent\n\n const forwardedComp = React.forwardRef((props, ref) => {\n const resolvedCompRef = React.useRef(resolvedComp || lazyComp)\n return React.createElement(\n resolvedCompRef.current as any,\n { ...(ref ? { ref } : {}), ...props } as any,\n )\n })\n\n const finalComp = forwardedComp as unknown as RouteComponent\n\n finalComp.preload = () => {\n if (!promise) {\n promise = importer().then((module) => {\n resolvedComp = module.default\n return resolvedComp\n })\n }\n\n return promise\n }\n\n return finalComp\n}\n\ntype LinkPropsOptions<\n TAllRouteInfo extends AnyAllRouteInfo,\n TFrom extends ValidFromPath<TAllRouteInfo>,\n TTo extends string,\n> = LinkOptions<TAllRouteInfo, TFrom, TTo> & {\n // A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n activeProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n // A function that returns additional props for the `inactive` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n inactiveProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n}\n\ntype MakeMatchRouteOptions<\n TAllRouteInfo extends AnyAllRouteInfo,\n TFrom extends ValidFromPath<TAllRouteInfo>,\n TTo extends string,\n> = ToOptions<TAllRouteInfo, TFrom, TTo> &\n MatchRouteOptions & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | React.ReactNode\n | ((\n params: RouteInfoByPath<\n TAllRouteInfo,\n ResolveRelativePath<TFrom, NoInfer<TTo>>\n >['allParams'],\n ) => React.ReactNode)\n }\n\ntype MakeLinkPropsOptions<\n TAllRouteInfo extends AnyAllRouteInfo,\n TFrom extends ValidFromPath<TAllRouteInfo>,\n TTo extends string,\n> = LinkPropsOptions<TAllRouteInfo, TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>\n\ntype MakeLinkOptions<\n TAllRouteInfo extends AnyAllRouteInfo,\n TFrom extends ValidFromPath<TAllRouteInfo>,\n TTo extends string,\n> = LinkPropsOptions<TAllRouteInfo, TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement> &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | React.ReactNode\n | ((state: { isActive: boolean }) => React.ReactNode)\n }\n\ndeclare module '@tanstack/router-core' {\n interface FrameworkGenerics {\n Component: RouteComponent\n ErrorComponent: RouteComponent<{\n error: unknown\n info: { componentStack: string }\n }>\n }\n\n interface RouterOptions<TRouteConfig, TRouterContext> {\n // ssrFooter?: () => JSX.Element | React.ReactNode\n }\n\n interface Router<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = AllRouteInfo<TRouteConfig>,\n > {\n useState: () => RouterState\n useRoute: <TId extends keyof TAllRouteInfo['routeInfoById']>(\n routeId: TId,\n ) => Route<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]>\n useNearestMatch: () => RouteMatch<TAllRouteInfo, RouteInfo>\n useMatch: <\n TId extends keyof TAllRouteInfo['routeInfoById'],\n TStrict extends boolean = true,\n >(\n routeId: TId,\n opts?: { strict?: TStrict },\n ) => TStrict extends true\n ? RouteMatch<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]>\n :\n | RouteMatch<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]>\n | undefined\n linkProps: <TTo extends string = '.'>(\n props: MakeLinkPropsOptions<TAllRouteInfo, '/', TTo>,\n ) => React.AnchorHTMLAttributes<HTMLAnchorElement>\n Link: <TTo extends string = '.'>(\n props: MakeLinkOptions<TAllRouteInfo, '/', TTo>,\n ) => JSX.Element\n MatchRoute: <TTo extends string = '.'>(\n props: MakeMatchRouteOptions<TAllRouteInfo, '/', TTo>,\n ) => JSX.Element\n }\n\n interface Route<\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\n TRouteInfo extends AnyRouteInfo = RouteInfo,\n > {\n useRoute: <\n TTo extends string = '.',\n TResolved extends string = ResolveRelativePath<\n TRouteInfo['id'],\n NoInfer<TTo>\n >,\n >(\n routeId: CheckId<\n TAllRouteInfo,\n TResolved,\n ToIdOption<TAllRouteInfo, TRouteInfo['id'], TTo>\n >,\n opts?: { strict?: boolean },\n ) => Route<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TResolved]>\n linkProps: <TTo extends string = '.'>(\n props: MakeLinkPropsOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>,\n ) => React.AnchorHTMLAttributes<HTMLAnchorElement>\n Link: <TTo extends string = '.'>(\n props: MakeLinkOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>,\n ) => JSX.Element\n MatchRoute: <TTo extends string = '.'>(\n props: MakeMatchRouteOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>,\n ) => JSX.Element\n }\n}\n\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: React.ReactNode\n}\n\n//\n\nexport function Link<TTo extends string = '.'>(\n props: MakeLinkOptions<RegisteredAllRouteInfo, '/', TTo>,\n): JSX.Element {\n const router = useRouter()\n return <router.Link {...(props as any)} />\n}\n\ntype MatchesContextValue = RouteMatch[]\n\nexport const matchesContext = React.createContext<MatchesContextValue>(null!)\nexport const routerContext = React.createContext<{ router: RegisteredRouter }>(\n null!,\n)\n\nexport type MatchesProviderProps = {\n value: MatchesContextValue\n children: React.ReactNode\n}\n\nexport function MatchesProvider(props: MatchesProviderProps) {\n return <matchesContext.Provider {...props} />\n}\n\nconst useRouterSubscription = (router: Router<any, any, any>) => {\n useSyncExternalStore(\n (cb) => router.subscribe(() => cb()),\n () => router.state,\n () => router.state,\n )\n}\n\nexport function createReactRouter<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = AllRouteInfo<TRouteConfig>,\n TRouterContext = unknown,\n>(\n opts: RouterOptions<TRouteConfig, TRouterContext>,\n): Router<TRouteConfig, TAllRouteInfo, TRouterContext> {\n const makeRouteExt = (\n route: AnyRoute,\n router: Router<any, any, any>,\n ): Pick<AnyRoute, 'useRoute' | 'linkProps' | 'Link' | 'MatchRoute'> => {\n return {\n useRoute: (subRouteId = '.' as any) => {\n const resolvedRouteId = router.resolvePath(\n route.routeId,\n subRouteId as string,\n )\n const resolvedRoute = router.getRoute(resolvedRouteId)\n useRouterSubscription(router)\n invariant(\n resolvedRoute,\n `Could not find a route for route \"${\n resolvedRouteId as string\n }\"! Did you forget to add it to your route config?`,\n )\n return resolvedRoute\n },\n linkProps: (options) => {\n const {\n // custom props\n type,\n children,\n target,\n activeProps = () => ({ className: 'active' }),\n inactiveProps = () => ({}),\n activeOptions,\n disabled,\n // fromCurrent,\n hash,\n search,\n params,\n to,\n preload,\n preloadDelay,\n preloadMaxAge,\n replace,\n // element props\n style,\n className,\n onClick,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n onTouchEnd,\n ...rest\n } = options\n\n const linkInfo = route.buildLink(options as any)\n\n if (linkInfo.type === 'external') {\n const { href } = linkInfo\n return { href }\n }\n\n const {\n handleClick,\n handleFocus,\n handleEnter,\n handleLeave,\n isActive,\n next,\n } = linkInfo\n\n const reactHandleClick = (e: Event) => {\n if (React.startTransition)\n // This is a hack for react < 18\n React.startTransition(() => {\n handleClick(e)\n })\n else handleClick(e)\n }\n\n const composeHandlers =\n (handlers: (undefined | ((e: any) => void))[]) =>\n (e: React.SyntheticEvent) => {\n e.persist()\n handlers.forEach((handler) => {\n if (handler) handler(e)\n })\n }\n\n // Get the active props\n const resolvedActiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? functionalUpdate(activeProps, {}) ?? {} : {}\n\n // Get the inactive props\n const resolvedInactiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? {} : functionalUpdate(inactiveProps, {}) ?? {}\n\n return {\n ...resolvedActiveProps,\n ...resolvedInactiveProps,\n ...rest,\n href: disabled ? undefined : next.href,\n onClick: composeHandlers([reactHandleClick, onClick]),\n onFocus: composeHandlers([handleFocus, onFocus]),\n onMouseEnter: composeHandlers([handleEnter, onMouseEnter]),\n onMouseLeave: composeHandlers([handleLeave, onMouseLeave]),\n target,\n style: {\n ...style,\n ...resolvedActiveProps.style,\n ...resolvedInactiveProps.style,\n },\n className:\n [\n className,\n resolvedActiveProps.className,\n resolvedInactiveProps.className,\n ]\n .filter(Boolean)\n .join(' ') || undefined,\n ...(disabled\n ? {\n role: 'link',\n 'aria-disabled': true,\n }\n : undefined),\n ['data-status']: isActive ? 'active' : undefined,\n }\n },\n Link: React.forwardRef((props: any, ref) => {\n const linkProps = route.linkProps(props)\n\n useRouterSubscription(router)\n\n return (\n <a\n {...{\n ref: ref as any,\n ...linkProps,\n children:\n typeof props.children === 'function'\n ? props.children({\n isActive: (linkProps as any)['data-status'] === 'active',\n })\n : props.children,\n }}\n />\n )\n }) as any,\n MatchRoute: (opts) => {\n const { pending, caseSensitive, children, ...rest } = opts\n\n const params = route.matchRoute(rest as any, {\n pending,\n caseSensitive,\n })\n\n if (!params) {\n return null\n }\n\n return typeof opts.children === 'function'\n ? opts.children(params as any)\n : (opts.children as any)\n },\n }\n }\n\n const coreRouter = createRouter<TRouteConfig>({\n ...opts,\n createRouter: (router) => {\n const routerExt: Pick<Router<any, any, any>, 'useMatch' | 'useState'> = {\n useState: () => {\n useRouterSubscription(router)\n return router.state\n },\n useMatch: (routeId, opts) => {\n useRouterSubscription(router)\n\n invariant(\n routeId !== rootRouteId,\n `\"${rootRouteId}\" cannot be used with useMatch! Did you mean to useRoute(\"${rootRouteId}\")?`,\n )\n\n const nearestMatch = useNearestMatch()\n const match = router.state.matches.find((d) => d.routeId === routeId)\n\n if (opts?.strict ?? true) {\n invariant(\n match,\n `Could not find an active match for \"${routeId as string}\"!`,\n )\n\n invariant(\n nearestMatch.routeId == match?.routeId,\n `useMatch(\"${\n match?.routeId as string\n }\") is being called in a component that is meant to render the '${\n nearestMatch.routeId\n }' route. Did you mean to 'useMatch(\"${\n match?.routeId as string\n }\", { strict: false })' or 'useRoute(\"${\n match?.routeId as string\n }\")' instead?`,\n )\n }\n\n return match as any\n },\n }\n\n const routeExt = makeRouteExt(router.getRoute(rootRouteId), router)\n\n Object.assign(router, routerExt, routeExt)\n },\n createRoute: ({ router, route }) => {\n const routeExt = makeRouteExt(route, router)\n\n Object.assign(route, routeExt)\n },\n loadComponent: async (component) => {\n if (component.preload && typeof document !== 'undefined') {\n component.preload()\n // return await component.preload()\n }\n\n return component as any\n },\n })\n\n return coreRouter as any\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\n TRouterContext = unknown,\n> = RouterOptions<TRouteConfig, TRouterContext> & {\n router: Router<TRouteConfig, TAllRouteInfo, TRouterContext>\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\n TRouterContext = unknown,\n>({\n router,\n ...rest\n}: RouterProps<TRouteConfig, TAllRouteInfo, TRouterContext>) {\n router.update(rest)\n\n useRouterSubscription(router)\n React.useEffect(() => {\n return router.mount()\n }, [router])\n\n return (\n <>\n <routerContext.Provider value={{ router: router as any }}>\n <MatchesProvider value={[undefined!, ...router.state.matches]}>\n <Outlet />\n </MatchesProvider>\n </routerContext.Provider>\n </>\n )\n}\n\nexport function useRouter(): RegisteredRouter {\n const value = React.useContext(routerContext)\n warning(!value, 'useRouter must be used inside a <Router> component!')\n\n useRouterSubscription(value.router)\n\n return value.router\n}\n\nexport function useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\nexport function useMatch<\n TId extends keyof RegisteredAllRouteInfo['routeInfoById'],\n TStrict extends boolean = true,\n>(\n routeId: TId,\n opts?: { strict?: TStrict },\n): TStrict extends true\n ? RouteMatch<\n RegisteredAllRouteInfo,\n RegisteredAllRouteInfo['routeInfoById'][TId]\n >\n :\n | RouteMatch<\n RegisteredAllRouteInfo,\n RegisteredAllRouteInfo['routeInfoById'][TId]\n >\n | undefined {\n const router = useRouter()\n return router.useMatch(routeId as any, opts) as any\n}\n\nexport function useNearestMatch(): RouteMatch<\n RegisteredAllRouteInfo,\n RouteInfo\n> {\n const runtimeMatch = useMatches()[0]\n\n invariant(runtimeMatch, `Could not find a nearest match!`)\n\n return runtimeMatch as any\n}\n\nexport function useRoute<\n TId extends keyof RegisteredAllRouteInfo['routeInfoById'],\n>(\n routeId: TId,\n): Route<RegisteredAllRouteInfo, RegisteredAllRouteInfo['routeInfoById'][TId]> {\n const router = useRouter()\n return router.useRoute(routeId as any) as any\n}\n\nexport function useSearch<\n TId extends keyof RegisteredAllRouteInfo['routeInfoById'] = keyof RegisteredAllRouteInfo['routeInfoById'],\n>(_routeId?: TId): RegisteredAllRouteInfo['fullSearchSchema'] {\n return useRouter().state.location.search\n}\n\nexport function linkProps<TTo extends string = '.'>(\n props: MakeLinkPropsOptions<RegisteredAllRouteInfo, '/', TTo>,\n): React.AnchorHTMLAttributes<HTMLAnchorElement> {\n const router = useRouter()\n return router.linkProps(props as any)\n}\n\nexport function MatchRoute<TTo extends string = '.'>(\n props: MakeMatchRouteOptions<RegisteredAllRouteInfo, '/', TTo>,\n): JSX.Element {\n const router = useRouter()\n return React.createElement(router.MatchRoute, props as any)\n}\n\nexport function Outlet() {\n const router = useRouter()\n const matches = useMatches().slice(1)\n const match = matches[0]\n\n const defaultPending = React.useCallback(() => null, [])\n\n if (!match) {\n return null\n }\n\n const PendingComponent = (match.__.pendingComponent ??\n router.options.defaultPendingComponent ??\n defaultPending) as any\n\n const errorComponent =\n match.__.errorComponent ?? router.options.defaultErrorComponent\n\n return (\n <MatchesProvider value={matches}>\n <React.Suspense fallback={<PendingComponent />}>\n <CatchBoundary\n key={match.routeId}\n errorComponent={errorComponent}\n match={match as any}\n >\n {\n ((): React.ReactNode => {\n if (match.status === 'error') {\n throw match.error\n }\n\n if (match.status === 'success') {\n return React.createElement(\n (match.__.component as any) ??\n router.options.defaultComponent ??\n Outlet,\n )\n }\n throw match.__.loadPromise\n })() as JSX.Element\n }\n </CatchBoundary>\n </React.Suspense>\n {/* Provide a suffix suspense boundary to make sure the router is\n ready to be dehydrated on the server */}\n {/* {router.options.ssrFooter && match.matchId === rootRouteId ? (\n <React.Suspense fallback={null}>\n {(() => {\n if (router.state.pending) {\n throw router.navigationPromise\n }\n\n return router.options.ssrFooter()\n })()}\n </React.Suspense>\n ) : null} */}\n </MatchesProvider>\n )\n}\n\nclass CatchBoundary extends React.Component<{\n children: any\n errorComponent: any\n match: RouteMatch\n}> {\n state = {\n error: false,\n info: undefined,\n }\n\n componentDidCatch(error: any, info: any) {\n console.error(`Error in route match: ${this.props.match.matchId}`)\n console.error(error)\n\n this.setState({\n error,\n info,\n })\n }\n\n render() {\n return (\n <CatchBoundaryInner\n {...this.props}\n errorState={this.state}\n reset={() => this.setState({})}\n />\n )\n }\n}\n\n// This is the messiest thing ever... I'm either seriously tired (likely) or\n// there has to be a better way to reset error boundaries when the\n// router's location key changes.\nfunction CatchBoundaryInner(props: {\n children: any\n errorComponent: any\n errorState: { error: unknown; info: any }\n reset: () => void\n}) {\n const [activeErrorState, setActiveErrorState] = React.useState(\n props.errorState,\n )\n const router = useRouter()\n const errorComponent = props.errorComponent ?? DefaultErrorBoundary\n\n React.useEffect(() => {\n if (activeErrorState) {\n let prevKey = router.state.location.key\n return router.subscribe(() => {\n if (router.state.location.key !== prevKey) {\n prevKey = router.state.location.key\n setActiveErrorState({} as any)\n }\n })\n }\n\n return\n }, [activeErrorState])\n\n React.useEffect(() => {\n if (props.errorState.error) {\n setActiveErrorState(props.errorState)\n }\n props.reset()\n }, [props.errorState.error])\n\n if (activeErrorState.error) {\n return React.createElement(errorComponent, activeErrorState)\n }\n\n return props.children\n}\n\nexport function DefaultErrorBoundary({ error }: { error: any }) {\n return (\n <div style={{ padding: '.5rem', maxWidth: '100%' }}>\n <strong style={{ fontSize: '1.2rem' }}>Something went wrong!</strong>\n <div style={{ height: '.5rem' }} />\n <div>\n <pre>\n {error.message ? (\n <code\n style={{\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.5rem',\n color: 'red',\n }}\n >\n {error.message}\n </code>\n ) : null}\n </pre>\n </div>\n </div>\n )\n}\n\nexport function usePrompt(message: string, when: boolean | any): void {\n const router = useRouter()\n\n React.useEffect(() => {\n if (!when) return\n\n let unblock = router.history.block((transition) => {\n if (window.confirm(message)) {\n unblock()\n transition.retry()\n } else {\n router.location.pathname = window.location.pathname\n }\n })\n\n return unblock\n }, [when, location, message])\n}\n\nexport function Prompt({ message, when, children }: PromptProps) {\n usePrompt(message, when ?? true)\n return (children ?? null) as React.ReactNode\n}\n"],"names":["lazy","importer","lazyComp","React","promise","resolvedComp","forwardedComp","forwardRef","props","ref","resolvedCompRef","useRef","createElement","current","finalComp","preload","then","module","default","Link","router","useRouter","matchesContext","createContext","routerContext","MatchesProvider","useRouterSubscription","useSyncExternalStore","cb","subscribe","state","createReactRouter","opts","makeRouteExt","route","useRoute","subRouteId","resolvedRouteId","resolvePath","routeId","resolvedRoute","getRoute","invariant","linkProps","options","target","activeProps","className","inactiveProps","disabled","style","onClick","onFocus","onMouseEnter","onMouseLeave","rest","linkInfo","buildLink","type","href","handleClick","handleFocus","handleEnter","handleLeave","isActive","next","reactHandleClick","e","startTransition","composeHandlers","handlers","persist","forEach","handler","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","_extends","undefined","filter","Boolean","join","role","children","MatchRoute","pending","caseSensitive","params","matchRoute","coreRouter","createRouter","routerExt","useState","useMatch","rootRouteId","nearestMatch","useNearestMatch","match","matches","find","d","strict","routeExt","Object","assign","createRoute","loadComponent","component","document","RouterProvider","_objectWithoutPropertiesLoose","update","useEffect","mount","value","useContext","warning","useMatches","runtimeMatch","useSearch","_routeId","location","search","Outlet","slice","defaultPending","useCallback","PendingComponent","__","pendingComponent","defaultPendingComponent","errorComponent","defaultErrorComponent","status","error","defaultComponent","loadPromise","CatchBoundary","Component","info","componentDidCatch","console","matchId","setState","render","CatchBoundaryInner","activeErrorState","setActiveErrorState","errorState","DefaultErrorBoundary","prevKey","key","reset","padding","maxWidth","fontSize","height","message","border","borderRadius","color","usePrompt","when","unblock","history","block","transition","window","confirm","retry","pathname","Prompt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,SAASA,IAAI,CAClBC,QAAwD,EACxC;AAChB,EAAA,MAAMC,QAAQ,gBAAGC,gBAAK,CAACH,IAAI,CAACC,QAAQ,CAAQ,CAAA;AAC5C,EAAA,IAAIG,OAAoC,CAAA;AACxC,EAAA,IAAIC,YAAgC,CAAA;EAEpC,MAAMC,aAAa,gBAAGH,gBAAK,CAACI,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;IACrD,MAAMC,eAAe,GAAGP,gBAAK,CAACQ,MAAM,CAACN,YAAY,IAAIH,Q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