react-router 7.11.0 → 7.12.0-pre.0
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/CHANGELOG.md +46 -13
- package/dist/development/{browser-Cv4JZyZ5.d.mts → browser-BEPxnEBW.d.mts} +4 -2
- package/dist/{production/browser-Cv4JZyZ5.d.mts → development/browser-CJ9_du-U.d.ts} +4 -2
- package/dist/development/{chunk-YNUBSHFH.mjs → chunk-2RQJSHF5.mjs} +111 -11
- package/dist/development/{chunk-2JY4UAJA.js → chunk-AUGQXA25.js} +98 -108
- package/dist/{production/chunk-BEXOWXJO.js → development/chunk-JBLDGBX7.js} +7 -7
- package/dist/development/{chunk-JMJ3UQ3L.mjs → chunk-KYKH2NCS.mjs} +122 -50
- package/dist/development/{chunk-SZQUWNVJ.js → chunk-MNTWZBMV.js} +117 -35
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +35 -30
- package/dist/development/dom-export.mjs +12 -7
- package/dist/development/{index-react-server-client-P7VgYu6T.d.mts → index-react-server-client-IoJGLOqV.d.mts} +3 -1
- package/dist/{production/index-react-server-client-Cv5Q9lf0.d.ts → development/index-react-server-client-gGyf-7Xp.d.ts} +3 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +3 -1
- package/dist/development/index-react-server.d.ts +3 -1
- package/dist/development/index-react-server.js +92 -7
- package/dist/development/index-react-server.mjs +92 -7
- package/dist/development/index.d.mts +9 -9
- package/dist/development/index.d.ts +9 -9
- package/dist/development/index.js +205 -101
- package/dist/development/index.mjs +7 -3
- package/dist/{production/instrumentation-BlrVzjbg.d.ts → development/instrumentation-DvHY1sgY.d.ts} +45 -1
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-BGQUMCK4.d.ts → register-Bm80E9qL.d.ts} +1 -1
- package/dist/development/{register-DTJJbt1o.d.mts → register-CS_tiXsm.d.mts} +1 -1
- package/dist/development/{router-5fbeEIMQ.d.mts → router-5iOvts3c.d.mts} +45 -1
- package/dist/{development/browser-o-qhcuhA.d.ts → production/browser-BEPxnEBW.d.mts} +4 -2
- package/dist/production/{browser-o-qhcuhA.d.ts → browser-CJ9_du-U.d.ts} +4 -2
- package/dist/production/{chunk-TINMVEA2.mjs → chunk-HFQUWXEK.mjs} +122 -50
- package/dist/production/{chunk-E6GYEQUT.mjs → chunk-ILRYJQTC.mjs} +111 -11
- package/dist/{development/chunk-GNDLROV6.js → production/chunk-O6YLM5NB.js} +7 -7
- package/dist/production/{chunk-ZMYPVUNZ.js → chunk-QWJQISZK.js} +98 -108
- package/dist/production/{chunk-2HFJAX7U.js → chunk-ZR2NIBH2.js} +117 -35
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +35 -30
- package/dist/production/dom-export.mjs +12 -7
- package/dist/production/{index-react-server-client-P7VgYu6T.d.mts → index-react-server-client-IoJGLOqV.d.mts} +3 -1
- package/dist/{development/index-react-server-client-Cv5Q9lf0.d.ts → production/index-react-server-client-gGyf-7Xp.d.ts} +3 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +3 -1
- package/dist/production/index-react-server.d.ts +3 -1
- package/dist/production/index-react-server.js +92 -7
- package/dist/production/index-react-server.mjs +92 -7
- package/dist/production/index.d.mts +9 -9
- package/dist/production/index.d.ts +9 -9
- package/dist/production/index.js +205 -101
- package/dist/production/index.mjs +7 -3
- package/dist/{development/instrumentation-BlrVzjbg.d.ts → production/instrumentation-DvHY1sgY.d.ts} +45 -1
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-BGQUMCK4.d.ts → register-Bm80E9qL.d.ts} +1 -1
- package/dist/production/{register-DTJJbt1o.d.mts → register-CS_tiXsm.d.mts} +1 -1
- package/dist/production/{router-5fbeEIMQ.d.mts → router-5iOvts3c.d.mts} +45 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.12.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
var _chunkMNTWZBMVjs = require('./chunk-MNTWZBMV.js');
|
|
53
54
|
|
|
54
55
|
// lib/dom/dom.ts
|
|
55
56
|
var defaultMethod = "get";
|
|
@@ -120,7 +121,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
|
|
|
120
121
|
]);
|
|
121
122
|
function getFormEncType(encType) {
|
|
122
123
|
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
123
|
-
|
|
124
|
+
_chunkMNTWZBMVjs.warning.call(void 0,
|
|
124
125
|
false,
|
|
125
126
|
`"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
|
|
126
127
|
);
|
|
@@ -136,7 +137,7 @@ function getFormSubmissionInfo(target, basename) {
|
|
|
136
137
|
let body;
|
|
137
138
|
if (isFormElement(target)) {
|
|
138
139
|
let attr = target.getAttribute("action");
|
|
139
|
-
action = attr ?
|
|
140
|
+
action = attr ? _chunkMNTWZBMVjs.stripBasename.call(void 0, attr, basename) : null;
|
|
140
141
|
method = target.getAttribute("method") || defaultMethod;
|
|
141
142
|
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
142
143
|
formData = new FormData(target);
|
|
@@ -148,7 +149,7 @@ function getFormSubmissionInfo(target, basename) {
|
|
|
148
149
|
);
|
|
149
150
|
}
|
|
150
151
|
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
151
|
-
action = attr ?
|
|
152
|
+
action = attr ? _chunkMNTWZBMVjs.stripBasename.call(void 0, attr, basename) : null;
|
|
152
153
|
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
153
154
|
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
154
155
|
formData = new FormData(form, target);
|
|
@@ -185,20 +186,20 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
185
186
|
try {
|
|
186
187
|
if (isBrowser) {
|
|
187
188
|
window.__reactRouterVersion = // @ts-expect-error
|
|
188
|
-
"7.
|
|
189
|
+
"7.12.0-pre.0";
|
|
189
190
|
}
|
|
190
191
|
} catch (e) {
|
|
191
192
|
}
|
|
192
193
|
function createBrowserRouter(routes, opts) {
|
|
193
|
-
return
|
|
194
|
+
return _chunkMNTWZBMVjs.createRouter.call(void 0, {
|
|
194
195
|
basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
|
|
195
196
|
getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.getContext]),
|
|
196
197
|
future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
|
|
197
|
-
history:
|
|
198
|
+
history: _chunkMNTWZBMVjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
|
|
198
199
|
hydrationData: _optionalChain([opts, 'optionalAccess', _6 => _6.hydrationData]) || parseHydrationData(),
|
|
199
200
|
routes,
|
|
200
|
-
mapRouteProperties:
|
|
201
|
-
hydrationRouteProperties:
|
|
201
|
+
mapRouteProperties: _chunkMNTWZBMVjs.mapRouteProperties,
|
|
202
|
+
hydrationRouteProperties: _chunkMNTWZBMVjs.hydrationRouteProperties,
|
|
202
203
|
dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
|
|
203
204
|
patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
|
|
204
205
|
window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
|
|
@@ -206,15 +207,15 @@ function createBrowserRouter(routes, opts) {
|
|
|
206
207
|
}).initialize();
|
|
207
208
|
}
|
|
208
209
|
function createHashRouter(routes, opts) {
|
|
209
|
-
return
|
|
210
|
+
return _chunkMNTWZBMVjs.createRouter.call(void 0, {
|
|
210
211
|
basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
|
|
211
212
|
getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
|
|
212
213
|
future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
|
|
213
|
-
history:
|
|
214
|
+
history: _chunkMNTWZBMVjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
|
|
214
215
|
hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
|
|
215
216
|
routes,
|
|
216
|
-
mapRouteProperties:
|
|
217
|
-
hydrationRouteProperties:
|
|
217
|
+
mapRouteProperties: _chunkMNTWZBMVjs.mapRouteProperties,
|
|
218
|
+
hydrationRouteProperties: _chunkMNTWZBMVjs.hydrationRouteProperties,
|
|
218
219
|
dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
|
|
219
220
|
patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
|
|
220
221
|
window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
|
|
@@ -237,7 +238,7 @@ function deserializeErrors(errors) {
|
|
|
237
238
|
let serialized = {};
|
|
238
239
|
for (let [key, val] of entries) {
|
|
239
240
|
if (val && val.__type === "RouteErrorResponse") {
|
|
240
|
-
serialized[key] = new (0,
|
|
241
|
+
serialized[key] = new (0, _chunkMNTWZBMVjs.ErrorResponseImpl)(
|
|
241
242
|
val.status,
|
|
242
243
|
val.statusText,
|
|
243
244
|
val.data,
|
|
@@ -274,7 +275,7 @@ function BrowserRouter({
|
|
|
274
275
|
}) {
|
|
275
276
|
let historyRef = React.useRef();
|
|
276
277
|
if (historyRef.current == null) {
|
|
277
|
-
historyRef.current =
|
|
278
|
+
historyRef.current = _chunkMNTWZBMVjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
|
|
278
279
|
}
|
|
279
280
|
let history = historyRef.current;
|
|
280
281
|
let [state, setStateImpl] = React.useState({
|
|
@@ -293,7 +294,7 @@ function BrowserRouter({
|
|
|
293
294
|
);
|
|
294
295
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
295
296
|
return /* @__PURE__ */ React.createElement(
|
|
296
|
-
|
|
297
|
+
_chunkMNTWZBMVjs.Router,
|
|
297
298
|
{
|
|
298
299
|
basename,
|
|
299
300
|
children,
|
|
@@ -312,7 +313,7 @@ function HashRouter({
|
|
|
312
313
|
}) {
|
|
313
314
|
let historyRef = React.useRef();
|
|
314
315
|
if (historyRef.current == null) {
|
|
315
|
-
historyRef.current =
|
|
316
|
+
historyRef.current = _chunkMNTWZBMVjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
|
|
316
317
|
}
|
|
317
318
|
let history = historyRef.current;
|
|
318
319
|
let [state, setStateImpl] = React.useState({
|
|
@@ -331,7 +332,7 @@ function HashRouter({
|
|
|
331
332
|
);
|
|
332
333
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
333
334
|
return /* @__PURE__ */ React.createElement(
|
|
334
|
-
|
|
335
|
+
_chunkMNTWZBMVjs.Router,
|
|
335
336
|
{
|
|
336
337
|
basename,
|
|
337
338
|
children,
|
|
@@ -364,7 +365,7 @@ function HistoryRouter({
|
|
|
364
365
|
);
|
|
365
366
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
366
367
|
return /* @__PURE__ */ React.createElement(
|
|
367
|
-
|
|
368
|
+
_chunkMNTWZBMVjs.Router,
|
|
368
369
|
{
|
|
369
370
|
basename,
|
|
370
371
|
children,
|
|
@@ -393,12 +394,12 @@ var Link = React.forwardRef(
|
|
|
393
394
|
unstable_defaultShouldRevalidate,
|
|
394
395
|
...rest
|
|
395
396
|
}, forwardedRef) {
|
|
396
|
-
let { basename, unstable_useTransitions } = React.useContext(
|
|
397
|
+
let { basename, unstable_useTransitions } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
397
398
|
let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
|
|
398
|
-
let parsed =
|
|
399
|
+
let parsed = _chunkMNTWZBMVjs.parseToInfo.call(void 0, to, basename);
|
|
399
400
|
to = parsed.to;
|
|
400
|
-
let href =
|
|
401
|
-
let [shouldPrefetch, prefetchRef, prefetchHandlers] =
|
|
401
|
+
let href = _chunkMNTWZBMVjs.useHref.call(void 0, to, { relative });
|
|
402
|
+
let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkMNTWZBMVjs.usePrefetchBehavior.call(void 0,
|
|
402
403
|
prefetch,
|
|
403
404
|
rest
|
|
404
405
|
);
|
|
@@ -427,13 +428,13 @@ var Link = React.forwardRef(
|
|
|
427
428
|
...prefetchHandlers,
|
|
428
429
|
href: parsed.absoluteURL || href,
|
|
429
430
|
onClick: parsed.isExternal || reloadDocument ? onClick : handleClick,
|
|
430
|
-
ref:
|
|
431
|
+
ref: _chunkMNTWZBMVjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
|
|
431
432
|
target,
|
|
432
433
|
"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
|
|
433
434
|
}
|
|
434
435
|
)
|
|
435
436
|
);
|
|
436
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(
|
|
437
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkMNTWZBMVjs.PrefetchPageLinks, { page: href })) : link;
|
|
437
438
|
}
|
|
438
439
|
);
|
|
439
440
|
Link.displayName = "Link";
|
|
@@ -449,10 +450,10 @@ var NavLink = React.forwardRef(
|
|
|
449
450
|
children,
|
|
450
451
|
...rest
|
|
451
452
|
}, ref) {
|
|
452
|
-
let path =
|
|
453
|
-
let location =
|
|
454
|
-
let routerState = React.useContext(
|
|
455
|
-
let { navigator, basename } = React.useContext(
|
|
453
|
+
let path = _chunkMNTWZBMVjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
|
|
454
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
455
|
+
let routerState = React.useContext(_chunkMNTWZBMVjs.DataRouterStateContext);
|
|
456
|
+
let { navigator, basename } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
456
457
|
let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
|
|
457
458
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
458
459
|
useViewTransitionState(path) && viewTransition === true;
|
|
@@ -465,7 +466,7 @@ var NavLink = React.forwardRef(
|
|
|
465
466
|
toPathname = toPathname.toLowerCase();
|
|
466
467
|
}
|
|
467
468
|
if (nextLocationPathname && basename) {
|
|
468
|
-
nextLocationPathname =
|
|
469
|
+
nextLocationPathname = _chunkMNTWZBMVjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
|
|
469
470
|
}
|
|
470
471
|
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
471
472
|
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
@@ -521,7 +522,7 @@ var Form = React.forwardRef(
|
|
|
521
522
|
unstable_defaultShouldRevalidate,
|
|
522
523
|
...props
|
|
523
524
|
}, forwardedRef) => {
|
|
524
|
-
let { unstable_useTransitions } = React.useContext(
|
|
525
|
+
let { unstable_useTransitions } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
525
526
|
let submit = useSubmit();
|
|
526
527
|
let formAction = useFormAction(action, { relative });
|
|
527
528
|
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
@@ -568,10 +569,10 @@ function ScrollRestoration({
|
|
|
568
569
|
storageKey,
|
|
569
570
|
...props
|
|
570
571
|
}) {
|
|
571
|
-
let remixContext = React.useContext(
|
|
572
|
-
let { basename } = React.useContext(
|
|
573
|
-
let location =
|
|
574
|
-
let matches =
|
|
572
|
+
let remixContext = React.useContext(_chunkMNTWZBMVjs.FrameworkContext);
|
|
573
|
+
let { basename } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
574
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
575
|
+
let matches = _chunkMNTWZBMVjs.useMatches.call(void 0, );
|
|
575
576
|
useScrollRestoration({ getKey, storageKey });
|
|
576
577
|
let ssrKey = React.useMemo(
|
|
577
578
|
() => {
|
|
@@ -613,9 +614,9 @@ function ScrollRestoration({
|
|
|
613
614
|
...props,
|
|
614
615
|
suppressHydrationWarning: true,
|
|
615
616
|
dangerouslySetInnerHTML: {
|
|
616
|
-
__html: `(${restoreScroll})(${
|
|
617
|
-
storageKey || SCROLL_RESTORATION_STORAGE_KEY
|
|
618
|
-
)}, ${JSON.stringify(ssrKey)})`
|
|
617
|
+
__html: `(${restoreScroll})(${_chunkMNTWZBMVjs.escapeHtml.call(void 0,
|
|
618
|
+
JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY)
|
|
619
|
+
)}, ${_chunkMNTWZBMVjs.escapeHtml.call(void 0, JSON.stringify(ssrKey))})`
|
|
619
620
|
}
|
|
620
621
|
}
|
|
621
622
|
);
|
|
@@ -625,13 +626,13 @@ function getDataRouterConsoleError(hookName) {
|
|
|
625
626
|
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
626
627
|
}
|
|
627
628
|
function useDataRouterContext(hookName) {
|
|
628
|
-
let ctx = React.useContext(
|
|
629
|
-
|
|
629
|
+
let ctx = React.useContext(_chunkMNTWZBMVjs.DataRouterContext);
|
|
630
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
|
|
630
631
|
return ctx;
|
|
631
632
|
}
|
|
632
633
|
function useDataRouterState(hookName) {
|
|
633
|
-
let state = React.useContext(
|
|
634
|
-
|
|
634
|
+
let state = React.useContext(_chunkMNTWZBMVjs.DataRouterStateContext);
|
|
635
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
|
|
635
636
|
return state;
|
|
636
637
|
}
|
|
637
638
|
function useLinkClickHandler(to, {
|
|
@@ -644,14 +645,14 @@ function useLinkClickHandler(to, {
|
|
|
644
645
|
unstable_defaultShouldRevalidate,
|
|
645
646
|
unstable_useTransitions
|
|
646
647
|
} = {}) {
|
|
647
|
-
let navigate =
|
|
648
|
-
let location =
|
|
649
|
-
let path =
|
|
648
|
+
let navigate = _chunkMNTWZBMVjs.useNavigate.call(void 0, );
|
|
649
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
650
|
+
let path = _chunkMNTWZBMVjs.useResolvedPath.call(void 0, to, { relative });
|
|
650
651
|
return React.useCallback(
|
|
651
652
|
(event) => {
|
|
652
653
|
if (shouldProcessLinkClick(event, target)) {
|
|
653
654
|
event.preventDefault();
|
|
654
|
-
let replace = replaceProp !== void 0 ? replaceProp :
|
|
655
|
+
let replace = replaceProp !== void 0 ? replaceProp : _chunkMNTWZBMVjs.createPath.call(void 0, location) === _chunkMNTWZBMVjs.createPath.call(void 0, path);
|
|
655
656
|
let doNavigate = () => navigate(to, {
|
|
656
657
|
replace,
|
|
657
658
|
state,
|
|
@@ -684,13 +685,13 @@ function useLinkClickHandler(to, {
|
|
|
684
685
|
);
|
|
685
686
|
}
|
|
686
687
|
function useSearchParams(defaultInit) {
|
|
687
|
-
|
|
688
|
+
_chunkMNTWZBMVjs.warning.call(void 0,
|
|
688
689
|
typeof URLSearchParams !== "undefined",
|
|
689
690
|
`You cannot use the \`useSearchParams\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`
|
|
690
691
|
);
|
|
691
692
|
let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
|
|
692
693
|
let hasSetSearchParamsRef = React.useRef(false);
|
|
693
|
-
let location =
|
|
694
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
694
695
|
let searchParams = React.useMemo(
|
|
695
696
|
() => (
|
|
696
697
|
// Only merge in the defaults if we haven't yet called setSearchParams.
|
|
@@ -703,7 +704,7 @@ function useSearchParams(defaultInit) {
|
|
|
703
704
|
),
|
|
704
705
|
[location.search]
|
|
705
706
|
);
|
|
706
|
-
let navigate =
|
|
707
|
+
let navigate = _chunkMNTWZBMVjs.useNavigate.call(void 0, );
|
|
707
708
|
let setSearchParams = React.useCallback(
|
|
708
709
|
(nextInit, navigateOptions) => {
|
|
709
710
|
const newSearchParams = createSearchParams(
|
|
@@ -720,8 +721,8 @@ var fetcherId = 0;
|
|
|
720
721
|
var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
|
|
721
722
|
function useSubmit() {
|
|
722
723
|
let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
|
|
723
|
-
let { basename } = React.useContext(
|
|
724
|
-
let currentRouteId =
|
|
724
|
+
let { basename } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
725
|
+
let currentRouteId = _chunkMNTWZBMVjs.useRouteId.call(void 0, );
|
|
725
726
|
let routerFetch = router.fetch;
|
|
726
727
|
let routerNavigate = router.navigate;
|
|
727
728
|
return React.useCallback(
|
|
@@ -761,12 +762,12 @@ function useSubmit() {
|
|
|
761
762
|
);
|
|
762
763
|
}
|
|
763
764
|
function useFormAction(action, { relative } = {}) {
|
|
764
|
-
let { basename } = React.useContext(
|
|
765
|
-
let routeContext = React.useContext(
|
|
766
|
-
|
|
765
|
+
let { basename } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
766
|
+
let routeContext = React.useContext(_chunkMNTWZBMVjs.RouteContext);
|
|
767
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
|
|
767
768
|
let [match] = routeContext.matches.slice(-1);
|
|
768
|
-
let path = { ...
|
|
769
|
-
let location =
|
|
769
|
+
let path = { ..._chunkMNTWZBMVjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
|
|
770
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
770
771
|
if (action == null) {
|
|
771
772
|
path.search = location.search;
|
|
772
773
|
let params = new URLSearchParams(path.search);
|
|
@@ -783,21 +784,21 @@ function useFormAction(action, { relative } = {}) {
|
|
|
783
784
|
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
784
785
|
}
|
|
785
786
|
if (basename !== "/") {
|
|
786
|
-
path.pathname = path.pathname === "/" ? basename :
|
|
787
|
+
path.pathname = path.pathname === "/" ? basename : _chunkMNTWZBMVjs.joinPaths.call(void 0, [basename, path.pathname]);
|
|
787
788
|
}
|
|
788
|
-
return
|
|
789
|
+
return _chunkMNTWZBMVjs.createPath.call(void 0, path);
|
|
789
790
|
}
|
|
790
791
|
function useFetcher({
|
|
791
792
|
key
|
|
792
793
|
} = {}) {
|
|
793
794
|
let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
|
|
794
795
|
let state = useDataRouterState("useFetcher" /* UseFetcher */);
|
|
795
|
-
let fetcherData = React.useContext(
|
|
796
|
-
let route = React.useContext(
|
|
796
|
+
let fetcherData = React.useContext(_chunkMNTWZBMVjs.FetchersContext);
|
|
797
|
+
let route = React.useContext(_chunkMNTWZBMVjs.RouteContext);
|
|
797
798
|
let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
799
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
|
|
800
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
|
|
801
|
+
_chunkMNTWZBMVjs.invariant.call(void 0,
|
|
801
802
|
routeId != null,
|
|
802
803
|
`useFetcher can only be used on routes that contain a unique "id"`
|
|
803
804
|
);
|
|
@@ -813,7 +814,7 @@ function useFetcher({
|
|
|
813
814
|
}, [deleteFetcher, getFetcher, fetcherKey]);
|
|
814
815
|
let load = React.useCallback(
|
|
815
816
|
async (href, opts) => {
|
|
816
|
-
|
|
817
|
+
_chunkMNTWZBMVjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
|
|
817
818
|
await routerFetch(fetcherKey, routeId, href, opts);
|
|
818
819
|
},
|
|
819
820
|
[fetcherKey, routeId, routerFetch]
|
|
@@ -842,7 +843,7 @@ function useFetcher({
|
|
|
842
843
|
FetcherForm2.displayName = "fetcher.Form";
|
|
843
844
|
return FetcherForm2;
|
|
844
845
|
}, [fetcherKey]);
|
|
845
|
-
let fetcher = state.fetchers.get(fetcherKey) ||
|
|
846
|
+
let fetcher = state.fetchers.get(fetcherKey) || _chunkMNTWZBMVjs.IDLE_FETCHER;
|
|
846
847
|
let data = fetcherData.get(fetcherKey);
|
|
847
848
|
let fetcherWithComponents = React.useMemo(
|
|
848
849
|
() => ({
|
|
@@ -873,7 +874,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
|
|
|
873
874
|
key = getKey(
|
|
874
875
|
{
|
|
875
876
|
...location,
|
|
876
|
-
pathname:
|
|
877
|
+
pathname: _chunkMNTWZBMVjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
|
|
877
878
|
},
|
|
878
879
|
matches
|
|
879
880
|
);
|
|
@@ -894,10 +895,10 @@ function useScrollRestoration({
|
|
|
894
895
|
let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
|
|
895
896
|
"useScrollRestoration" /* UseScrollRestoration */
|
|
896
897
|
);
|
|
897
|
-
let { basename } = React.useContext(
|
|
898
|
-
let location =
|
|
899
|
-
let matches =
|
|
900
|
-
let navigation =
|
|
898
|
+
let { basename } = React.useContext(_chunkMNTWZBMVjs.NavigationContext);
|
|
899
|
+
let location = _chunkMNTWZBMVjs.useLocation.call(void 0, );
|
|
900
|
+
let matches = _chunkMNTWZBMVjs.useMatches.call(void 0, );
|
|
901
|
+
let navigation = _chunkMNTWZBMVjs.useNavigation.call(void 0, );
|
|
901
902
|
React.useEffect(() => {
|
|
902
903
|
window.history.scrollRestoration = "manual";
|
|
903
904
|
return () => {
|
|
@@ -916,7 +917,7 @@ function useScrollRestoration({
|
|
|
916
917
|
JSON.stringify(savedScrollPositions)
|
|
917
918
|
);
|
|
918
919
|
} catch (error) {
|
|
919
|
-
|
|
920
|
+
_chunkMNTWZBMVjs.warning.call(void 0,
|
|
920
921
|
false,
|
|
921
922
|
`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
|
|
922
923
|
);
|
|
@@ -963,7 +964,7 @@ function useScrollRestoration({
|
|
|
963
964
|
}
|
|
964
965
|
}
|
|
965
966
|
} catch (e2) {
|
|
966
|
-
|
|
967
|
+
_chunkMNTWZBMVjs.warning.call(void 0,
|
|
967
968
|
false,
|
|
968
969
|
`"${location.hash.slice(
|
|
969
970
|
1
|
|
@@ -1001,7 +1002,7 @@ function usePrompt({
|
|
|
1001
1002
|
when,
|
|
1002
1003
|
message
|
|
1003
1004
|
}) {
|
|
1004
|
-
let blocker =
|
|
1005
|
+
let blocker = _chunkMNTWZBMVjs.useBlocker.call(void 0, when);
|
|
1005
1006
|
React.useEffect(() => {
|
|
1006
1007
|
if (blocker.state === "blocked") {
|
|
1007
1008
|
let proceed = window.confirm(message);
|
|
@@ -1019,21 +1020,21 @@ function usePrompt({
|
|
|
1019
1020
|
}, [blocker, when]);
|
|
1020
1021
|
}
|
|
1021
1022
|
function useViewTransitionState(to, { relative } = {}) {
|
|
1022
|
-
let vtContext = React.useContext(
|
|
1023
|
-
|
|
1023
|
+
let vtContext = React.useContext(_chunkMNTWZBMVjs.ViewTransitionContext);
|
|
1024
|
+
_chunkMNTWZBMVjs.invariant.call(void 0,
|
|
1024
1025
|
vtContext != null,
|
|
1025
1026
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1026
1027
|
);
|
|
1027
1028
|
let { basename } = useDataRouterContext(
|
|
1028
1029
|
"useViewTransitionState" /* useViewTransitionState */
|
|
1029
1030
|
);
|
|
1030
|
-
let path =
|
|
1031
|
+
let path = _chunkMNTWZBMVjs.useResolvedPath.call(void 0, to, { relative });
|
|
1031
1032
|
if (!vtContext.isTransitioning) {
|
|
1032
1033
|
return false;
|
|
1033
1034
|
}
|
|
1034
|
-
let currentPath =
|
|
1035
|
-
let nextPath =
|
|
1036
|
-
return
|
|
1035
|
+
let currentPath = _chunkMNTWZBMVjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
1036
|
+
let nextPath = _chunkMNTWZBMVjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
1037
|
+
return _chunkMNTWZBMVjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkMNTWZBMVjs.matchPath.call(void 0, path.pathname, currentPath) != null;
|
|
1037
1038
|
}
|
|
1038
1039
|
|
|
1039
1040
|
// lib/dom/server.tsx
|
|
@@ -1044,7 +1045,7 @@ function StaticRouter({
|
|
|
1044
1045
|
location: locationProp = "/"
|
|
1045
1046
|
}) {
|
|
1046
1047
|
if (typeof locationProp === "string") {
|
|
1047
|
-
locationProp =
|
|
1048
|
+
locationProp = _chunkMNTWZBMVjs.parsePath.call(void 0, locationProp);
|
|
1048
1049
|
}
|
|
1049
1050
|
let action = "POP" /* Pop */;
|
|
1050
1051
|
let location = {
|
|
@@ -1056,7 +1057,7 @@ function StaticRouter({
|
|
|
1056
1057
|
};
|
|
1057
1058
|
let staticNavigator = getStatelessNavigator();
|
|
1058
1059
|
return /* @__PURE__ */ React2.createElement(
|
|
1059
|
-
|
|
1060
|
+
_chunkMNTWZBMVjs.Router,
|
|
1060
1061
|
{
|
|
1061
1062
|
basename,
|
|
1062
1063
|
children,
|
|
@@ -1074,7 +1075,7 @@ function StaticRouterProvider({
|
|
|
1074
1075
|
hydrate = true,
|
|
1075
1076
|
nonce
|
|
1076
1077
|
}) {
|
|
1077
|
-
|
|
1078
|
+
_chunkMNTWZBMVjs.invariant.call(void 0,
|
|
1078
1079
|
router && context,
|
|
1079
1080
|
"You must provide `router` and `context` to <StaticRouterProvider>"
|
|
1080
1081
|
);
|
|
@@ -1093,12 +1094,12 @@ function StaticRouterProvider({
|
|
|
1093
1094
|
actionData: context.actionData,
|
|
1094
1095
|
errors: serializeErrors(context.errors)
|
|
1095
1096
|
};
|
|
1096
|
-
let json =
|
|
1097
|
+
let json = _chunkMNTWZBMVjs.escapeHtml.call(void 0, JSON.stringify(JSON.stringify(data)));
|
|
1097
1098
|
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
|
|
1098
1099
|
}
|
|
1099
1100
|
let { state } = dataRouterContext.router;
|
|
1100
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
1101
|
-
|
|
1101
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkMNTWZBMVjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkMNTWZBMVjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkMNTWZBMVjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkMNTWZBMVjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
|
|
1102
|
+
_chunkMNTWZBMVjs.Router,
|
|
1102
1103
|
{
|
|
1103
1104
|
basename: dataRouterContext.basename,
|
|
1104
1105
|
location: state.location,
|
|
@@ -1129,14 +1130,14 @@ function DataRoutes({
|
|
|
1129
1130
|
future,
|
|
1130
1131
|
state
|
|
1131
1132
|
}) {
|
|
1132
|
-
return
|
|
1133
|
+
return _chunkMNTWZBMVjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
|
|
1133
1134
|
}
|
|
1134
1135
|
function serializeErrors(errors) {
|
|
1135
1136
|
if (!errors) return null;
|
|
1136
1137
|
let entries = Object.entries(errors);
|
|
1137
1138
|
let serialized = {};
|
|
1138
1139
|
for (let [key, val] of entries) {
|
|
1139
|
-
if (
|
|
1140
|
+
if (_chunkMNTWZBMVjs.isRouteErrorResponse.call(void 0, val)) {
|
|
1140
1141
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
1141
1142
|
} else if (val instanceof Error) {
|
|
1142
1143
|
serialized[key] = {
|
|
@@ -1186,16 +1187,16 @@ function getStatelessNavigator() {
|
|
|
1186
1187
|
};
|
|
1187
1188
|
}
|
|
1188
1189
|
function createStaticHandler2(routes, opts) {
|
|
1189
|
-
return
|
|
1190
|
+
return _chunkMNTWZBMVjs.createStaticHandler.call(void 0, routes, {
|
|
1190
1191
|
...opts,
|
|
1191
|
-
mapRouteProperties:
|
|
1192
|
+
mapRouteProperties: _chunkMNTWZBMVjs.mapRouteProperties
|
|
1192
1193
|
});
|
|
1193
1194
|
}
|
|
1194
1195
|
function createStaticRouter(routes, context, opts = {}) {
|
|
1195
1196
|
let manifest = {};
|
|
1196
|
-
let dataRoutes =
|
|
1197
|
+
let dataRoutes = _chunkMNTWZBMVjs.convertRoutesToDataRoutes.call(void 0,
|
|
1197
1198
|
routes,
|
|
1198
|
-
|
|
1199
|
+
_chunkMNTWZBMVjs.mapRouteProperties,
|
|
1199
1200
|
void 0,
|
|
1200
1201
|
manifest
|
|
1201
1202
|
);
|
|
@@ -1226,7 +1227,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1226
1227
|
actionData: context.actionData,
|
|
1227
1228
|
errors: context.errors,
|
|
1228
1229
|
initialized: true,
|
|
1229
|
-
navigation:
|
|
1230
|
+
navigation: _chunkMNTWZBMVjs.IDLE_NAVIGATION,
|
|
1230
1231
|
restoreScrollPosition: null,
|
|
1231
1232
|
preventScrollReset: false,
|
|
1232
1233
|
revalidation: "idle",
|
|
@@ -1261,7 +1262,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1261
1262
|
createHref,
|
|
1262
1263
|
encodeLocation,
|
|
1263
1264
|
getFetcher() {
|
|
1264
|
-
return
|
|
1265
|
+
return _chunkMNTWZBMVjs.IDLE_FETCHER;
|
|
1265
1266
|
},
|
|
1266
1267
|
deleteFetcher() {
|
|
1267
1268
|
throw msg("deleteFetcher");
|
|
@@ -1273,7 +1274,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1273
1274
|
throw msg("dispose");
|
|
1274
1275
|
},
|
|
1275
1276
|
getBlocker() {
|
|
1276
|
-
return
|
|
1277
|
+
return _chunkMNTWZBMVjs.IDLE_BLOCKER;
|
|
1277
1278
|
},
|
|
1278
1279
|
deleteBlocker() {
|
|
1279
1280
|
throw msg("deleteBlocker");
|
|
@@ -1291,10 +1292,10 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1291
1292
|
};
|
|
1292
1293
|
}
|
|
1293
1294
|
function createHref(to) {
|
|
1294
|
-
return typeof to === "string" ? to :
|
|
1295
|
+
return typeof to === "string" ? to : _chunkMNTWZBMVjs.createPath.call(void 0, to);
|
|
1295
1296
|
}
|
|
1296
1297
|
function encodeLocation(to) {
|
|
1297
|
-
let href = typeof to === "string" ? to :
|
|
1298
|
+
let href = typeof to === "string" ? to : _chunkMNTWZBMVjs.createPath.call(void 0, to);
|
|
1298
1299
|
href = href.replace(/ $/, "%20");
|
|
1299
1300
|
let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
|
|
1300
1301
|
return {
|
|
@@ -1304,17 +1305,6 @@ function encodeLocation(to) {
|
|
|
1304
1305
|
};
|
|
1305
1306
|
}
|
|
1306
1307
|
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
1307
|
-
var ESCAPE_LOOKUP = {
|
|
1308
|
-
"&": "\\u0026",
|
|
1309
|
-
">": "\\u003e",
|
|
1310
|
-
"<": "\\u003c",
|
|
1311
|
-
"\u2028": "\\u2028",
|
|
1312
|
-
"\u2029": "\\u2029"
|
|
1313
|
-
};
|
|
1314
|
-
var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
1315
|
-
function htmlEscape(str) {
|
|
1316
|
-
return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
1317
|
-
}
|
|
1318
1308
|
|
|
1319
1309
|
|
|
1320
1310
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.12.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkMNTWZBMVjs = require('./chunk-MNTWZBMV.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkMNTWZBMVjs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkMNTWZBMVjs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkMNTWZBMVjs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkMNTWZBMVjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkMNTWZBMVjs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|