@tanstack/react-router 0.0.1-beta.9 → 1.0.1
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/LICENSE +21 -0
- package/build/cjs/CatchBoundary.js +128 -0
- package/build/cjs/CatchBoundary.js.map +1 -0
- package/build/cjs/Matches.js +233 -0
- package/build/cjs/Matches.js.map +1 -0
- package/build/cjs/RouterProvider.js +172 -0
- package/build/cjs/RouterProvider.js.map +1 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +2 -22
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/build/cjs/awaited.js +43 -0
- package/build/cjs/awaited.js.map +1 -0
- package/build/cjs/defer.js +37 -0
- package/build/cjs/defer.js.map +1 -0
- package/build/cjs/fileRoute.js +27 -0
- package/build/cjs/fileRoute.js.map +1 -0
- package/build/cjs/index.js +130 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/lazyRouteComponent.js +54 -0
- package/build/cjs/lazyRouteComponent.js.map +1 -0
- package/build/cjs/link.js +223 -0
- package/build/cjs/link.js.map +1 -0
- package/build/cjs/path.js +214 -0
- package/build/cjs/path.js.map +1 -0
- package/build/cjs/qss.js +63 -0
- package/build/cjs/qss.js.map +1 -0
- package/build/cjs/redirects.js +28 -0
- package/build/cjs/redirects.js.map +1 -0
- package/build/cjs/route.js +191 -0
- package/build/cjs/route.js.map +1 -0
- package/build/cjs/router.js +1085 -0
- package/build/cjs/router.js.map +1 -0
- package/build/cjs/scroll-restoration.js +202 -0
- package/build/cjs/scroll-restoration.js.map +1 -0
- package/build/cjs/searchParams.js +81 -0
- package/build/cjs/searchParams.js.map +1 -0
- package/build/cjs/useBlocker.js +55 -0
- package/build/cjs/useBlocker.js.map +1 -0
- package/build/cjs/useNavigate.js +86 -0
- package/build/cjs/useNavigate.js.map +1 -0
- package/build/cjs/useParams.js +26 -0
- package/build/cjs/useParams.js.map +1 -0
- package/build/cjs/useSearch.js +25 -0
- package/build/cjs/useSearch.js.map +1 -0
- package/build/cjs/utils.js +241 -0
- package/build/cjs/utils.js.map +1 -0
- package/build/esm/index.js +2302 -2534
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +3498 -2694
- package/build/stats-react.json +1204 -44
- package/build/types/CatchBoundary.d.ts +36 -0
- package/build/types/Matches.d.ts +64 -0
- package/build/types/RouterProvider.d.ts +35 -0
- package/build/types/awaited.d.ts +9 -0
- package/build/types/defer.d.ts +19 -0
- package/build/types/fileRoute.d.ts +38 -0
- package/build/types/history.d.ts +7 -0
- package/build/types/index.d.ts +27 -74
- package/build/types/lazyRouteComponent.d.ts +2 -0
- package/build/types/link.d.ts +93 -0
- package/build/types/location.d.ts +12 -0
- package/build/types/path.d.ts +17 -0
- package/build/types/qss.d.ts +2 -0
- package/build/types/redirects.d.ts +11 -0
- package/build/types/route.d.ts +283 -0
- package/build/types/routeInfo.d.ts +31 -0
- package/build/types/router.d.ts +186 -0
- package/build/types/scroll-restoration.d.ts +18 -0
- package/build/types/searchParams.d.ts +7 -0
- package/build/types/useBlocker.d.ts +9 -0
- package/build/types/useNavigate.d.ts +19 -0
- package/build/types/useParams.d.ts +7 -0
- package/build/types/useSearch.d.ts +7 -0
- package/build/types/utils.d.ts +69 -0
- package/build/umd/index.development.js +2899 -2493
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +4 -4
- package/build/umd/index.production.js.map +1 -1
- package/package.json +12 -10
- package/src/CatchBoundary.tsx +101 -0
- package/src/Matches.tsx +423 -0
- package/src/RouterProvider.tsx +254 -0
- package/src/awaited.tsx +40 -0
- package/src/defer.ts +55 -0
- package/src/fileRoute.ts +152 -0
- package/src/history.ts +8 -0
- package/src/index.tsx +28 -619
- package/src/lazyRouteComponent.tsx +33 -0
- package/src/link.tsx +603 -0
- package/src/location.ts +13 -0
- package/src/path.ts +261 -0
- package/src/qss.ts +53 -0
- package/src/redirects.ts +39 -0
- package/src/route.ts +882 -0
- package/src/routeInfo.ts +84 -0
- package/src/router.ts +1671 -0
- package/src/scroll-restoration.tsx +230 -0
- package/src/searchParams.ts +79 -0
- package/src/useBlocker.tsx +27 -0
- package/src/useNavigate.tsx +111 -0
- package/src/useParams.tsx +25 -0
- package/src/useSearch.tsx +25 -0
- package/src/utils.ts +360 -0
- package/build/cjs/react-router/src/index.js +0 -458
- package/build/cjs/react-router/src/index.js.map +0 -1
- package/build/cjs/router-core/build/esm/index.js +0 -2524
- package/build/cjs/router-core/build/esm/index.js.map +0 -1
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* react-router
|
|
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 shim = require('use-sync-external-store/shim');
|
|
18
|
-
var index = require('../../router-core/build/esm/index.js');
|
|
19
|
-
|
|
20
|
-
function _interopNamespace(e) {
|
|
21
|
-
if (e && e.__esModule) return e;
|
|
22
|
-
var n = Object.create(null);
|
|
23
|
-
if (e) {
|
|
24
|
-
Object.keys(e).forEach(function (k) {
|
|
25
|
-
if (k !== 'default') {
|
|
26
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
27
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return e[k]; }
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
n["default"] = e;
|
|
35
|
-
return Object.freeze(n);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
39
|
-
|
|
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
|
-
_excluded2 = ["pending", "caseSensitive", "children"],
|
|
42
|
-
_excluded3 = ["children", "router"];
|
|
43
|
-
//
|
|
44
|
-
const matchesContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
45
|
-
const routerContext = /*#__PURE__*/React__namespace.createContext(null); // Detect if we're in the DOM
|
|
46
|
-
|
|
47
|
-
const isDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
48
|
-
const useLayoutEffect = isDOM ? React__namespace.useLayoutEffect : React__namespace.useEffect;
|
|
49
|
-
function MatchesProvider(props) {
|
|
50
|
-
return /*#__PURE__*/React__namespace.createElement(matchesContext.Provider, props);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const useRouterSubscription = router => {
|
|
54
|
-
shim.useSyncExternalStore(cb => router.subscribe(() => cb()), () => router.state, () => router.state);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
function createReactRouter(opts) {
|
|
58
|
-
const makeRouteExt = (route, router) => {
|
|
59
|
-
return {
|
|
60
|
-
useRoute: function useRoute(subRouteId) {
|
|
61
|
-
if (subRouteId === void 0) {
|
|
62
|
-
subRouteId = '.';
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const resolvedRouteId = router.resolvePath(route.routeId, subRouteId);
|
|
66
|
-
const resolvedRoute = router.getRoute(resolvedRouteId);
|
|
67
|
-
useRouterSubscription(router);
|
|
68
|
-
index.invariant(resolvedRoute, "Could not find a route for route \"" + resolvedRouteId + "\"! Did you forget to add it to your route config?");
|
|
69
|
-
return resolvedRoute;
|
|
70
|
-
},
|
|
71
|
-
linkProps: options => {
|
|
72
|
-
var _functionalUpdate, _functionalUpdate2;
|
|
73
|
-
|
|
74
|
-
const {
|
|
75
|
-
// custom props
|
|
76
|
-
target,
|
|
77
|
-
activeProps = () => ({
|
|
78
|
-
className: 'active'
|
|
79
|
-
}),
|
|
80
|
-
inactiveProps = () => ({}),
|
|
81
|
-
disabled,
|
|
82
|
-
// element props
|
|
83
|
-
style,
|
|
84
|
-
className,
|
|
85
|
-
onClick,
|
|
86
|
-
onFocus,
|
|
87
|
-
onMouseEnter,
|
|
88
|
-
onMouseLeave
|
|
89
|
-
} = options,
|
|
90
|
-
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(options, _excluded);
|
|
91
|
-
|
|
92
|
-
const linkInfo = route.buildLink(options);
|
|
93
|
-
|
|
94
|
-
if (linkInfo.type === 'external') {
|
|
95
|
-
const {
|
|
96
|
-
href
|
|
97
|
-
} = linkInfo;
|
|
98
|
-
return {
|
|
99
|
-
href
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const {
|
|
104
|
-
handleClick,
|
|
105
|
-
handleFocus,
|
|
106
|
-
handleEnter,
|
|
107
|
-
handleLeave,
|
|
108
|
-
isActive,
|
|
109
|
-
next
|
|
110
|
-
} = linkInfo;
|
|
111
|
-
|
|
112
|
-
const composeHandlers = handlers => e => {
|
|
113
|
-
e.persist();
|
|
114
|
-
handlers.forEach(handler => {
|
|
115
|
-
if (handler) handler(e);
|
|
116
|
-
});
|
|
117
|
-
}; // Get the active props
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const resolvedActiveProps = isActive ? (_functionalUpdate = index.functionalUpdate(activeProps, {})) != null ? _functionalUpdate : {} : {}; // Get the inactive props
|
|
121
|
-
|
|
122
|
-
const resolvedInactiveProps = isActive ? {} : (_functionalUpdate2 = index.functionalUpdate(inactiveProps, {})) != null ? _functionalUpdate2 : {};
|
|
123
|
-
return _rollupPluginBabelHelpers["extends"]({}, resolvedActiveProps, resolvedInactiveProps, rest, {
|
|
124
|
-
href: disabled ? undefined : next.href,
|
|
125
|
-
onClick: composeHandlers([handleClick, onClick]),
|
|
126
|
-
onFocus: composeHandlers([handleFocus, onFocus]),
|
|
127
|
-
onMouseEnter: composeHandlers([handleEnter, onMouseEnter]),
|
|
128
|
-
onMouseLeave: composeHandlers([handleLeave, onMouseLeave]),
|
|
129
|
-
target,
|
|
130
|
-
style: _rollupPluginBabelHelpers["extends"]({}, style, resolvedActiveProps.style, resolvedInactiveProps.style),
|
|
131
|
-
className: [className, resolvedActiveProps.className, resolvedInactiveProps.className].filter(Boolean).join(' ') || undefined
|
|
132
|
-
}, disabled ? {
|
|
133
|
-
role: 'link',
|
|
134
|
-
'aria-disabled': true
|
|
135
|
-
} : undefined, {
|
|
136
|
-
['data-status']: isActive ? 'active' : undefined
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
Link: /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
140
|
-
const linkProps = route.linkProps(props);
|
|
141
|
-
useRouterSubscription(router);
|
|
142
|
-
return /*#__PURE__*/React__namespace.createElement("a", _rollupPluginBabelHelpers["extends"]({
|
|
143
|
-
ref: ref
|
|
144
|
-
}, linkProps, {
|
|
145
|
-
children: typeof props.children === 'function' ? props.children({
|
|
146
|
-
isActive: linkProps['data-status'] === 'active'
|
|
147
|
-
}) : props.children
|
|
148
|
-
}));
|
|
149
|
-
}),
|
|
150
|
-
MatchRoute: opts => {
|
|
151
|
-
const {
|
|
152
|
-
pending,
|
|
153
|
-
caseSensitive
|
|
154
|
-
} = opts,
|
|
155
|
-
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(opts, _excluded2);
|
|
156
|
-
|
|
157
|
-
const params = route.matchRoute(rest, {
|
|
158
|
-
pending,
|
|
159
|
-
caseSensitive
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
if (!params) {
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return typeof opts.children === 'function' ? opts.children(params) : opts.children;
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const coreRouter = index.createRouter(_rollupPluginBabelHelpers["extends"]({}, opts, {
|
|
172
|
-
createRouter: router => {
|
|
173
|
-
const routerExt = {
|
|
174
|
-
useState: () => {
|
|
175
|
-
useRouterSubscription(router);
|
|
176
|
-
return router.state;
|
|
177
|
-
},
|
|
178
|
-
useMatch: routeId => {
|
|
179
|
-
useRouterSubscription(router);
|
|
180
|
-
index.invariant(routeId !== index.rootRouteId, "\"" + index.rootRouteId + "\" cannot be used with useMatch! Did you mean to useRoute(\"" + index.rootRouteId + "\")?");
|
|
181
|
-
|
|
182
|
-
const runtimeMatch = _useMatch();
|
|
183
|
-
|
|
184
|
-
const match = router.state.matches.find(d => d.routeId === routeId);
|
|
185
|
-
index.invariant(match, "Could not find a match for route \"" + routeId + "\" being rendered in this component!");
|
|
186
|
-
index.invariant(runtimeMatch.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 '" + runtimeMatch.routeId + "' route. Did you mean to 'useRoute(" + (match == null ? void 0 : match.routeId) + ")' instead?");
|
|
187
|
-
|
|
188
|
-
if (!match) {
|
|
189
|
-
index.invariant('Match not found!');
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return match;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
const routeExt = makeRouteExt(router.getRoute('/'), router);
|
|
196
|
-
Object.assign(router, routerExt, routeExt);
|
|
197
|
-
},
|
|
198
|
-
createRoute: _ref => {
|
|
199
|
-
let {
|
|
200
|
-
router,
|
|
201
|
-
route
|
|
202
|
-
} = _ref;
|
|
203
|
-
const routeExt = makeRouteExt(route, router);
|
|
204
|
-
Object.assign(route, routeExt);
|
|
205
|
-
},
|
|
206
|
-
createElement: async element => {
|
|
207
|
-
if (typeof element === 'function') {
|
|
208
|
-
const res = await element(); // Support direct import() calls
|
|
209
|
-
|
|
210
|
-
if (typeof res === 'object' && res.default) {
|
|
211
|
-
return /*#__PURE__*/React__namespace.createElement(res.default);
|
|
212
|
-
} else {
|
|
213
|
-
return res;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return element;
|
|
218
|
-
}
|
|
219
|
-
}));
|
|
220
|
-
return coreRouter;
|
|
221
|
-
}
|
|
222
|
-
function RouterProvider(_ref2) {
|
|
223
|
-
let {
|
|
224
|
-
children,
|
|
225
|
-
router
|
|
226
|
-
} = _ref2,
|
|
227
|
-
rest = _rollupPluginBabelHelpers.objectWithoutPropertiesLoose(_ref2, _excluded3);
|
|
228
|
-
|
|
229
|
-
router.update(rest);
|
|
230
|
-
useRouterSubscription(router);
|
|
231
|
-
useLayoutEffect(() => {
|
|
232
|
-
return router.mount();
|
|
233
|
-
}, [router]);
|
|
234
|
-
return /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
|
|
235
|
-
value: {
|
|
236
|
-
router
|
|
237
|
-
}
|
|
238
|
-
}, /*#__PURE__*/React__namespace.createElement(MatchesProvider, {
|
|
239
|
-
value: router.state.matches
|
|
240
|
-
}, children != null ? children : /*#__PURE__*/React__namespace.createElement(Outlet, null)));
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
function useRouter() {
|
|
244
|
-
const value = React__namespace.useContext(routerContext);
|
|
245
|
-
index.warning(!value, 'useRouter must be used inside a <Router> component!');
|
|
246
|
-
useRouterSubscription(value.router);
|
|
247
|
-
return value.router;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function useMatches() {
|
|
251
|
-
return React__namespace.useContext(matchesContext);
|
|
252
|
-
} // function useParentMatches(): RouteMatch[] {
|
|
253
|
-
// const router = useRouter()
|
|
254
|
-
// const match = useMatch()
|
|
255
|
-
// const matches = router.state.matches
|
|
256
|
-
// return matches.slice(
|
|
257
|
-
// 0,
|
|
258
|
-
// matches.findIndex((d) => d.matchId === match.matchId) - 1,
|
|
259
|
-
// )
|
|
260
|
-
// }
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
function _useMatch() {
|
|
264
|
-
var _useMatches;
|
|
265
|
-
|
|
266
|
-
return (_useMatches = useMatches()) == null ? void 0 : _useMatches[0];
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function Outlet() {
|
|
270
|
-
var _childMatch$options$c;
|
|
271
|
-
|
|
272
|
-
const router = useRouter();
|
|
273
|
-
const [, ...matches] = useMatches();
|
|
274
|
-
const childMatch = matches[0];
|
|
275
|
-
if (!childMatch) return null;
|
|
276
|
-
|
|
277
|
-
const element = (() => {
|
|
278
|
-
var _childMatch$__$errorE, _ref4;
|
|
279
|
-
|
|
280
|
-
if (!childMatch) {
|
|
281
|
-
return null;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
const errorElement = (_childMatch$__$errorE = childMatch.__.errorElement) != null ? _childMatch$__$errorE : router.options.defaultErrorElement;
|
|
285
|
-
|
|
286
|
-
if (childMatch.status === 'error') {
|
|
287
|
-
if (errorElement) {
|
|
288
|
-
return errorElement;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (childMatch.options.useErrorBoundary || router.options.useErrorBoundary) {
|
|
292
|
-
throw childMatch.error;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
return /*#__PURE__*/React__namespace.createElement(DefaultErrorBoundary, {
|
|
296
|
-
error: childMatch.error
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
if (childMatch.status === 'loading' || childMatch.status === 'idle') {
|
|
301
|
-
if (childMatch.isPending) {
|
|
302
|
-
var _childMatch$__$pendin;
|
|
303
|
-
|
|
304
|
-
const pendingElement = (_childMatch$__$pendin = childMatch.__.pendingElement) != null ? _childMatch$__$pendin : router.options.defaultPendingElement;
|
|
305
|
-
|
|
306
|
-
if (childMatch.options.pendingMs || pendingElement) {
|
|
307
|
-
var _ref3;
|
|
308
|
-
|
|
309
|
-
return (_ref3 = pendingElement) != null ? _ref3 : null;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return null;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
return (_ref4 = childMatch.__.element) != null ? _ref4 : router.options.defaultElement;
|
|
317
|
-
})();
|
|
318
|
-
|
|
319
|
-
const catchElement = (_childMatch$options$c = childMatch == null ? void 0 : childMatch.options.catchElement) != null ? _childMatch$options$c : router.options.defaultCatchElement;
|
|
320
|
-
return /*#__PURE__*/React__namespace.createElement(MatchesProvider, {
|
|
321
|
-
value: matches,
|
|
322
|
-
key: childMatch.matchId
|
|
323
|
-
}, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
324
|
-
catchElement: catchElement
|
|
325
|
-
}, element));
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
class CatchBoundary extends React__namespace.Component {
|
|
329
|
-
constructor() {
|
|
330
|
-
super(...arguments);
|
|
331
|
-
this.state = {
|
|
332
|
-
error: false
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
componentDidCatch(error, info) {
|
|
337
|
-
console.error(error);
|
|
338
|
-
this.setState({
|
|
339
|
-
error,
|
|
340
|
-
info
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
render() {
|
|
345
|
-
var _this$props$catchElem;
|
|
346
|
-
|
|
347
|
-
const catchElement = (_this$props$catchElem = this.props.catchElement) != null ? _this$props$catchElem : DefaultErrorBoundary;
|
|
348
|
-
|
|
349
|
-
if (this.state.error) {
|
|
350
|
-
return typeof catchElement === 'function' ? catchElement(this.state) : catchElement;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
return this.props.children;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
function DefaultErrorBoundary(_ref5) {
|
|
359
|
-
let {
|
|
360
|
-
error
|
|
361
|
-
} = _ref5;
|
|
362
|
-
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
363
|
-
style: {
|
|
364
|
-
padding: '.5rem',
|
|
365
|
-
maxWidth: '100%'
|
|
366
|
-
}
|
|
367
|
-
}, /*#__PURE__*/React__namespace.createElement("strong", {
|
|
368
|
-
style: {
|
|
369
|
-
fontSize: '1.2rem'
|
|
370
|
-
}
|
|
371
|
-
}, "Something went wrong!"), /*#__PURE__*/React__namespace.createElement("div", {
|
|
372
|
-
style: {
|
|
373
|
-
height: '.5rem'
|
|
374
|
-
}
|
|
375
|
-
}), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("pre", null, error.message ? /*#__PURE__*/React__namespace.createElement("code", {
|
|
376
|
-
style: {
|
|
377
|
-
fontSize: '.7em',
|
|
378
|
-
border: '1px solid red',
|
|
379
|
-
borderRadius: '.25rem',
|
|
380
|
-
padding: '.5rem',
|
|
381
|
-
color: 'red'
|
|
382
|
-
}
|
|
383
|
-
}, error.message) : null)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
384
|
-
style: {
|
|
385
|
-
height: '1rem'
|
|
386
|
-
}
|
|
387
|
-
}), /*#__PURE__*/React__namespace.createElement("div", {
|
|
388
|
-
style: {
|
|
389
|
-
fontSize: '.8em',
|
|
390
|
-
borderLeft: '3px solid rgba(127, 127, 127, 1)',
|
|
391
|
-
paddingLeft: '.5rem',
|
|
392
|
-
opacity: 0.5
|
|
393
|
-
}
|
|
394
|
-
}, "If you are the owner of this website, it's highly recommended that you configure your own custom Catch/Error boundaries for the router. You can optionally configure a boundary for each route."));
|
|
395
|
-
}
|
|
396
|
-
function usePrompt(message, when) {
|
|
397
|
-
const router = useRouter();
|
|
398
|
-
React__namespace.useEffect(() => {
|
|
399
|
-
if (!when) return;
|
|
400
|
-
let unblock = router.history.block(transition => {
|
|
401
|
-
if (window.confirm(message)) {
|
|
402
|
-
unblock();
|
|
403
|
-
transition.retry();
|
|
404
|
-
} else {
|
|
405
|
-
router.location.pathname = window.location.pathname;
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
return unblock;
|
|
409
|
-
}, [when, location, message]);
|
|
410
|
-
}
|
|
411
|
-
function Prompt(_ref6) {
|
|
412
|
-
let {
|
|
413
|
-
message,
|
|
414
|
-
when,
|
|
415
|
-
children
|
|
416
|
-
} = _ref6;
|
|
417
|
-
usePrompt(message, when != null ? when : true);
|
|
418
|
-
return children != null ? children : null;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
exports.cleanPath = index.cleanPath;
|
|
422
|
-
exports.createBrowserHistory = index.createBrowserHistory;
|
|
423
|
-
exports.createHashHistory = index.createHashHistory;
|
|
424
|
-
exports.createMemoryHistory = index.createMemoryHistory;
|
|
425
|
-
exports.createRoute = index.createRoute;
|
|
426
|
-
exports.createRouteConfig = index.createRouteConfig;
|
|
427
|
-
exports.createRouteMatch = index.createRouteMatch;
|
|
428
|
-
exports.createRouter = index.createRouter;
|
|
429
|
-
exports.decode = index.decode;
|
|
430
|
-
exports.defaultParseSearch = index.defaultParseSearch;
|
|
431
|
-
exports.defaultStringifySearch = index.defaultStringifySearch;
|
|
432
|
-
exports.encode = index.encode;
|
|
433
|
-
exports.functionalUpdate = index.functionalUpdate;
|
|
434
|
-
exports.interpolatePath = index.interpolatePath;
|
|
435
|
-
exports.invariant = index.invariant;
|
|
436
|
-
exports.joinPaths = index.joinPaths;
|
|
437
|
-
exports.last = index.last;
|
|
438
|
-
exports.matchByPath = index.matchByPath;
|
|
439
|
-
exports.matchPathname = index.matchPathname;
|
|
440
|
-
exports.parsePathname = index.parsePathname;
|
|
441
|
-
exports.parseSearchWith = index.parseSearchWith;
|
|
442
|
-
exports.pick = index.pick;
|
|
443
|
-
exports.replaceEqualDeep = index.replaceEqualDeep;
|
|
444
|
-
exports.resolvePath = index.resolvePath;
|
|
445
|
-
exports.rootRouteId = index.rootRouteId;
|
|
446
|
-
exports.stringifySearchWith = index.stringifySearchWith;
|
|
447
|
-
exports.trimPath = index.trimPath;
|
|
448
|
-
exports.trimPathLeft = index.trimPathLeft;
|
|
449
|
-
exports.trimPathRight = index.trimPathRight;
|
|
450
|
-
exports.warning = index.warning;
|
|
451
|
-
exports.DefaultErrorBoundary = DefaultErrorBoundary;
|
|
452
|
-
exports.MatchesProvider = MatchesProvider;
|
|
453
|
-
exports.Outlet = Outlet;
|
|
454
|
-
exports.Prompt = Prompt;
|
|
455
|
-
exports.RouterProvider = RouterProvider;
|
|
456
|
-
exports.createReactRouter = createReactRouter;
|
|
457
|
-
exports.usePrompt = usePrompt;
|
|
458
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 Router,\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} from '@tanstack/router-core'\n\nexport * from '@tanstack/router-core'\n\ndeclare module '@tanstack/router-core' {\n interface FrameworkGenerics {\n Element: React.ReactNode\n // Any is required here so import() will work without having to do import().then(d => d.default)\n SyncOrAsyncElement: React.ReactNode | (() => Promise<any>)\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 useMatch: <TId extends keyof TAllRouteInfo['routeInfoById']>(\n routeId: TId,\n ) => RouteMatch<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]>\n linkProps: <TTo extends string = '.'>(\n props: LinkPropsOptions<TAllRouteInfo, '/', TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n ) => React.AnchorHTMLAttributes<HTMLAnchorElement>\n Link: <TTo extends string = '.'>(\n props: LinkPropsOptions<TAllRouteInfo, '/', 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 ) => JSX.Element\n MatchRoute: <TTo extends string = '.'>(\n props: ToOptions<TAllRouteInfo, '/', 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<'/', NoInfer<TTo>>\n >['allParams'],\n ) => React.ReactNode)\n },\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 ) => Route<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TResolved]>\n linkProps: <TTo extends string = '.'>(\n props: LinkPropsOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n ) => React.AnchorHTMLAttributes<HTMLAnchorElement>\n Link: <TTo extends string = '.'>(\n props: LinkPropsOptions<TAllRouteInfo, TRouteInfo['fullPath'], 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 ) => JSX.Element\n MatchRoute: <TTo extends string = '.'>(\n props: ToOptions<TAllRouteInfo, TRouteInfo['fullPath'], 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<TRouteInfo['fullPath'], NoInfer<TTo>>\n >['allParams'],\n ) => React.ReactNode)\n },\n ) => JSX.Element\n }\n}\n\ntype LinkPropsOptions<\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\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\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: React.ReactNode\n}\n\n//\n\nconst matchesContext = React.createContext<RouteMatch[]>(null!)\nconst routerContext = React.createContext<{ router: Router<any, any> }>(null!)\n\n// Detect if we're in the DOM\nconst isDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement,\n)\n\nconst useLayoutEffect = isDOM ? React.useLayoutEffect : React.useEffect\n\nexport type MatchesProviderProps = {\n value: RouteMatch[]\n children: React.ReactNode\n}\n\nexport function MatchesProvider(props: MatchesProviderProps) {\n return <matchesContext.Provider {...props} />\n}\n\nconst useRouterSubscription = (router: Router<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>(opts: RouterOptions<TRouteConfig>): Router<TRouteConfig> {\n const makeRouteExt = (\n route: AnyRoute,\n router: Router<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)\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 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([handleClick, 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>, 'useMatch' | 'useState'> = {\n useState: () => {\n useRouterSubscription(router)\n return router.state\n },\n useMatch: (routeId) => {\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 runtimeMatch = useMatch()\n const match = router.state.matches.find((d) => d.routeId === routeId)\n\n invariant(\n match,\n `Could not find a match for route \"${\n routeId as string\n }\" being rendered in this component!`,\n )\n\n invariant(\n runtimeMatch.routeId == match?.routeId,\n `useMatch('${\n match?.routeId as string\n }') is being called in a component that is meant to render the '${\n runtimeMatch.routeId\n }' route. Did you mean to 'useRoute(${\n match?.routeId as string\n })' instead?`,\n )\n\n if (!match) {\n invariant('Match not found!')\n }\n\n return match\n },\n }\n\n const routeExt = makeRouteExt(router.getRoute('/'), 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 createElement: async (element) => {\n if (typeof element === 'function') {\n const res = (await element()) as any\n\n // Support direct import() calls\n if (typeof res === 'object' && res.default) {\n return React.createElement(res.default)\n } else {\n return res\n }\n }\n\n return element\n },\n })\n\n return coreRouter as any\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\n> = RouterOptions<TRouteConfig> & {\n router: Router<TRouteConfig, TAllRouteInfo>\n // Children will default to `<Outlet />` if not provided\n children?: React.ReactNode\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRouteConfig = RouteConfig,\n TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo,\n>({ children, router, ...rest }: RouterProps<TRouteConfig, TAllRouteInfo>) {\n router.update(rest)\n\n useRouterSubscription(router)\n\n useLayoutEffect(() => {\n return router.mount()\n }, [router])\n\n return (\n <routerContext.Provider value={{ router }}>\n <MatchesProvider value={router.state.matches}>\n {children ?? <Outlet />}\n </MatchesProvider>\n </routerContext.Provider>\n )\n}\n\nfunction useRouter(): Router {\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 as Router\n}\n\nfunction useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\n// function useParentMatches(): RouteMatch[] {\n// const router = useRouter()\n// const match = useMatch()\n// const matches = router.state.matches\n// return matches.slice(\n// 0,\n// matches.findIndex((d) => d.matchId === match.matchId) - 1,\n// )\n// }\n\nfunction useMatch<T>(): RouteMatch {\n return useMatches()?.[0] as RouteMatch\n}\n\nexport function Outlet() {\n const router = useRouter()\n const [, ...matches] = useMatches()\n\n const childMatch = matches[0]\n\n if (!childMatch) return null\n\n const element = ((): React.ReactNode => {\n if (!childMatch) {\n return null\n }\n\n const errorElement =\n childMatch.__.errorElement ?? router.options.defaultErrorElement\n\n if (childMatch.status === 'error') {\n if (errorElement) {\n return errorElement as any\n }\n\n if (\n childMatch.options.useErrorBoundary ||\n router.options.useErrorBoundary\n ) {\n throw childMatch.error\n }\n\n return <DefaultErrorBoundary error={childMatch.error} />\n }\n\n if (childMatch.status === 'loading' || childMatch.status === 'idle') {\n if (childMatch.isPending) {\n const pendingElement =\n childMatch.__.pendingElement ?? router.options.defaultPendingElement\n\n if (childMatch.options.pendingMs || pendingElement) {\n return (pendingElement as any) ?? null\n }\n }\n\n return null\n }\n\n return (childMatch.__.element as any) ?? router.options.defaultElement\n })() as JSX.Element\n\n const catchElement =\n childMatch?.options.catchElement ?? router.options.defaultCatchElement\n\n return (\n <MatchesProvider value={matches} key={childMatch.matchId}>\n <CatchBoundary catchElement={catchElement}>{element}</CatchBoundary>\n </MatchesProvider>\n )\n}\n\nclass CatchBoundary extends React.Component<{\n children: any\n catchElement: any\n}> {\n state = {\n error: false,\n }\n componentDidCatch(error: any, info: any) {\n console.error(error)\n\n this.setState({\n error,\n info,\n })\n }\n render() {\n const catchElement = this.props.catchElement ?? DefaultErrorBoundary\n\n if (this.state.error) {\n return typeof catchElement === 'function'\n ? catchElement(this.state)\n : catchElement\n }\n\n return this.props.children\n }\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 style={{ height: '1rem' }} />\n <div\n style={{\n fontSize: '.8em',\n borderLeft: '3px solid rgba(127, 127, 127, 1)',\n paddingLeft: '.5rem',\n opacity: 0.5,\n }}\n >\n If you are the owner of this website, it's highly recommended that you\n configure your own custom Catch/Error boundaries for the router. You can\n optionally configure a boundary for each route.\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":["matchesContext","React","createContext","routerContext","isDOM","Boolean","window","document","createElement","useLayoutEffect","useEffect","MatchesProvider","props","useRouterSubscription","router","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","composeHandlers","handlers","e","persist","forEach","handler","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","_extends","undefined","filter","join","role","Link","forwardRef","ref","children","MatchRoute","pending","caseSensitive","params","matchRoute","coreRouter","createRouter","routerExt","useState","useMatch","rootRouteId","runtimeMatch","match","matches","find","d","routeExt","Object","assign","createRoute","element","res","default","RouterProvider","_objectWithoutPropertiesLoose","update","mount","useRouter","value","useContext","warning","useMatches","Outlet","childMatch","errorElement","__","defaultErrorElement","status","useErrorBoundary","error","isPending","pendingElement","defaultPendingElement","pendingMs","defaultElement","catchElement","defaultCatchElement","matchId","CatchBoundary","Component","componentDidCatch","info","console","setState","render","DefaultErrorBoundary","padding","maxWidth","fontSize","height","message","border","borderRadius","color","borderLeft","paddingLeft","opacity","usePrompt","when","unblock","history","block","transition","confirm","retry","location","pathname","Prompt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA;AAEA,MAAMA,cAAc,gBAAGC,gBAAK,CAACC,aAAN,CAAkC,IAAlC,CAAvB,CAAA;AACA,MAAMC,aAAa,gBAAGF,gBAAK,CAACC,aAAN,CAAkD,IAAlD,CAAtB;;AAGA,MAAME,KAAK,GAAGC,OAAO,CACnB,OAAOC,MAAP,KAAkB,WAAlB,IACEA,MAAM,CAACC,QADT,IAEED,MAAM,CAACC,QAAP,CAAgBC,aAHC,CAArB,CAAA;AAMA,MAAMC,eAAe,GAAGL,KAAK,GAAGH,gBAAK,CAACQ,eAAT,GAA2BR,gBAAK,CAACS,SAA9D,CAAA;AAOO,SAASC,eAAT,CAAyBC,KAAzB,EAAsD;AAC3D,EAAA,oBAAOX,+BAAC,cAAD,CAAgB,QAAhB,EAA6BW,KAA7B,CAAP,CAAA;AACD,CAAA;;AAED,MAAMC,qBAAqB,GAAIC,MAAD,IAA8B;EAC1DC,yBAAoB,CACjBC,EAAD,IAAQF,MAAM,CAACG,SAAP,CAAiB,MAAMD,EAAE,EAAzB,CADU,EAElB,MAAMF,MAAM,CAACI,KAFK,EAGlB,MAAMJ,MAAM,CAACI,KAHK,CAApB,CAAA;AAKD,CAND,CAAA;;AAQO,SAASC,iBAAT,CAELC,IAFK,EAEoD;AACzD,EAAA,MAAMC,YAAY,GAAG,CACnBC,KADmB,EAEnBR,MAFmB,KAGkD;IACrE,OAAO;MACLS,QAAQ,EAAE,SAACC,QAAAA,CAAAA,UAAD,EAA6B;AAAA,QAAA,IAA5BA,UAA4B,KAAA,KAAA,CAAA,EAAA;AAA5BA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