react-router 0.0.0-experimental-1a4134895 → 0.0.0-experimental-266dc7f4c
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/dist/development/{browser-CVt-AVEw.d.ts → browser-B_cSiTzl.d.ts} +1 -1
- package/dist/development/{browser-DMZL55jm.d.mts → browser-CF64kHM3.d.mts} +1 -1
- package/dist/development/{chunk-U3QH42RN.mjs → chunk-L7HK2N5V.mjs} +2 -2
- package/dist/development/{chunk-UW2GWJ4V.js → chunk-LGVZC6TW.js} +107 -105
- package/dist/{production/chunk-7KUYQ25T.js → development/chunk-O6W43AVK.js} +7 -7
- package/dist/development/{chunk-SMU6VCE5.js → chunk-XEPCUBAA.js} +36 -43
- package/dist/development/{chunk-RSETISCY.mjs → chunk-Y34I2Y6E.mjs} +47 -52
- package/dist/development/dom-export.d.mts +7 -5
- package/dist/development/dom-export.d.ts +7 -5
- package/dist/development/dom-export.js +27 -27
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-C_xKAMFL.d.ts → index-react-server-client-BGKp8dBC.d.ts} +21 -33
- package/dist/{production/index-react-server-client-MZL1faqV.d.mts → development/index-react-server-client-BrW7HxPD.d.mts} +21 -33
- 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 +1 -0
- package/dist/development/index-react-server.d.ts +1 -0
- package/dist/development/index-react-server.js +8 -8
- package/dist/development/index-react-server.mjs +8 -8
- package/dist/development/index.d.mts +8 -8
- package/dist/development/index.d.ts +8 -8
- package/dist/development/index.js +76 -76
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Clr86Wt0.d.ts → development/instrumentation-CsA9ptJN.d.ts} +13 -13
- 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-B9kmG_ck.d.ts → register-BqtSiCTJ.d.ts} +1 -1
- package/dist/development/{register-BQNO5hHg.d.mts → register-Dgw6ZxPU.d.mts} +1 -1
- package/dist/development/{router-CvHJZoz6.d.mts → router-BHYS1hpt.d.mts} +13 -13
- package/dist/production/{browser-CVt-AVEw.d.ts → browser-B_cSiTzl.d.ts} +1 -1
- package/dist/production/{browser-DMZL55jm.d.mts → browser-CF64kHM3.d.mts} +1 -1
- package/dist/production/{chunk-5LAWJKMP.js → chunk-4GZMGPON.js} +36 -43
- package/dist/production/{chunk-2LYV46AY.js → chunk-KIE5RTMH.js} +107 -105
- package/dist/production/{chunk-5SOZPEMG.mjs → chunk-PH5PSTPS.mjs} +2 -2
- package/dist/{development/chunk-FSS7BSX5.js → production/chunk-ULZPJR4W.js} +7 -7
- package/dist/production/{chunk-DRFH75GK.mjs → chunk-VLRUHWDK.mjs} +47 -52
- package/dist/production/dom-export.d.mts +7 -5
- package/dist/production/dom-export.d.ts +7 -5
- package/dist/production/dom-export.js +27 -27
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-C_xKAMFL.d.ts → index-react-server-client-BGKp8dBC.d.ts} +21 -33
- package/dist/{development/index-react-server-client-MZL1faqV.d.mts → production/index-react-server-client-BrW7HxPD.d.mts} +21 -33
- 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 +1 -0
- package/dist/production/index-react-server.d.ts +1 -0
- package/dist/production/index-react-server.js +8 -8
- package/dist/production/index-react-server.mjs +8 -8
- package/dist/production/index.d.mts +8 -8
- package/dist/production/index.d.ts +8 -8
- package/dist/production/index.js +76 -76
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Clr86Wt0.d.ts → production/instrumentation-CsA9ptJN.d.ts} +13 -13
- 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-B9kmG_ck.d.ts → register-BqtSiCTJ.d.ts} +1 -1
- package/dist/production/{register-BQNO5hHg.d.mts → register-Dgw6ZxPU.d.mts} +1 -1
- package/dist/production/{router-CvHJZoz6.d.mts → router-BHYS1hpt.d.mts} +13 -13
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-
|
|
2
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-CsA9ptJN.js';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-
|
|
2
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-BHYS1hpt.mjs';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-266dc7f4c
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
withComponentProps,
|
|
50
50
|
withErrorBoundaryProps,
|
|
51
51
|
withHydrateFallbackProps
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-Y34I2Y6E.mjs";
|
|
53
53
|
|
|
54
54
|
// lib/dom/ssr/server.tsx
|
|
55
55
|
import * as React from "react";
|
|
@@ -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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-266dc7f4c
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkXEPCUBAAjs = require('./chunk-XEPCUBAA.js');
|
|
52
52
|
|
|
53
53
|
// lib/dom/dom.ts
|
|
54
54
|
var defaultMethod = "get";
|
|
@@ -119,7 +119,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
|
|
|
119
119
|
]);
|
|
120
120
|
function getFormEncType(encType) {
|
|
121
121
|
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
122
|
-
|
|
122
|
+
_chunkXEPCUBAAjs.warning.call(void 0,
|
|
123
123
|
false,
|
|
124
124
|
`"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
|
|
125
125
|
);
|
|
@@ -135,7 +135,7 @@ function getFormSubmissionInfo(target, basename) {
|
|
|
135
135
|
let body;
|
|
136
136
|
if (isFormElement(target)) {
|
|
137
137
|
let attr = target.getAttribute("action");
|
|
138
|
-
action = attr ?
|
|
138
|
+
action = attr ? _chunkXEPCUBAAjs.stripBasename.call(void 0, attr, basename) : null;
|
|
139
139
|
method = target.getAttribute("method") || defaultMethod;
|
|
140
140
|
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
141
141
|
formData = new FormData(target);
|
|
@@ -147,7 +147,7 @@ function getFormSubmissionInfo(target, basename) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
150
|
-
action = attr ?
|
|
150
|
+
action = attr ? _chunkXEPCUBAAjs.stripBasename.call(void 0, attr, basename) : null;
|
|
151
151
|
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
152
152
|
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
153
153
|
formData = new FormData(form, target);
|
|
@@ -184,20 +184,20 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
184
184
|
try {
|
|
185
185
|
if (isBrowser) {
|
|
186
186
|
window.__reactRouterVersion = // @ts-expect-error
|
|
187
|
-
"0.0.0-experimental-
|
|
187
|
+
"0.0.0-experimental-266dc7f4c";
|
|
188
188
|
}
|
|
189
189
|
} catch (e) {
|
|
190
190
|
}
|
|
191
191
|
function createBrowserRouter(routes, opts) {
|
|
192
|
-
return
|
|
192
|
+
return _chunkXEPCUBAAjs.createRouter.call(void 0, {
|
|
193
193
|
basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
|
|
194
194
|
getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.getContext]),
|
|
195
195
|
future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
|
|
196
|
-
history:
|
|
196
|
+
history: _chunkXEPCUBAAjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
|
|
197
197
|
hydrationData: _optionalChain([opts, 'optionalAccess', _6 => _6.hydrationData]) || parseHydrationData(),
|
|
198
198
|
routes,
|
|
199
|
-
mapRouteProperties:
|
|
200
|
-
hydrationRouteProperties:
|
|
199
|
+
mapRouteProperties: _chunkXEPCUBAAjs.mapRouteProperties,
|
|
200
|
+
hydrationRouteProperties: _chunkXEPCUBAAjs.hydrationRouteProperties,
|
|
201
201
|
dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
|
|
202
202
|
patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
|
|
203
203
|
window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
|
|
@@ -205,15 +205,15 @@ function createBrowserRouter(routes, opts) {
|
|
|
205
205
|
}).initialize();
|
|
206
206
|
}
|
|
207
207
|
function createHashRouter(routes, opts) {
|
|
208
|
-
return
|
|
208
|
+
return _chunkXEPCUBAAjs.createRouter.call(void 0, {
|
|
209
209
|
basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
|
|
210
210
|
getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
|
|
211
211
|
future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
|
|
212
|
-
history:
|
|
212
|
+
history: _chunkXEPCUBAAjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
|
|
213
213
|
hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
|
|
214
214
|
routes,
|
|
215
|
-
mapRouteProperties:
|
|
216
|
-
hydrationRouteProperties:
|
|
215
|
+
mapRouteProperties: _chunkXEPCUBAAjs.mapRouteProperties,
|
|
216
|
+
hydrationRouteProperties: _chunkXEPCUBAAjs.hydrationRouteProperties,
|
|
217
217
|
dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
|
|
218
218
|
patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
|
|
219
219
|
window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
|
|
@@ -236,7 +236,7 @@ function deserializeErrors(errors) {
|
|
|
236
236
|
let serialized = {};
|
|
237
237
|
for (let [key, val] of entries) {
|
|
238
238
|
if (val && val.__type === "RouteErrorResponse") {
|
|
239
|
-
serialized[key] = new (0,
|
|
239
|
+
serialized[key] = new (0, _chunkXEPCUBAAjs.ErrorResponseImpl)(
|
|
240
240
|
val.status,
|
|
241
241
|
val.statusText,
|
|
242
242
|
val.data,
|
|
@@ -273,7 +273,7 @@ function BrowserRouter({
|
|
|
273
273
|
}) {
|
|
274
274
|
let historyRef = React.useRef();
|
|
275
275
|
if (historyRef.current == null) {
|
|
276
|
-
historyRef.current =
|
|
276
|
+
historyRef.current = _chunkXEPCUBAAjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
|
|
277
277
|
}
|
|
278
278
|
let history = historyRef.current;
|
|
279
279
|
let [state, setStateImpl] = React.useState({
|
|
@@ -292,7 +292,7 @@ function BrowserRouter({
|
|
|
292
292
|
);
|
|
293
293
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
294
294
|
return /* @__PURE__ */ React.createElement(
|
|
295
|
-
|
|
295
|
+
_chunkXEPCUBAAjs.Router,
|
|
296
296
|
{
|
|
297
297
|
basename,
|
|
298
298
|
children,
|
|
@@ -311,7 +311,7 @@ function HashRouter({
|
|
|
311
311
|
}) {
|
|
312
312
|
let historyRef = React.useRef();
|
|
313
313
|
if (historyRef.current == null) {
|
|
314
|
-
historyRef.current =
|
|
314
|
+
historyRef.current = _chunkXEPCUBAAjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
|
|
315
315
|
}
|
|
316
316
|
let history = historyRef.current;
|
|
317
317
|
let [state, setStateImpl] = React.useState({
|
|
@@ -330,7 +330,7 @@ function HashRouter({
|
|
|
330
330
|
);
|
|
331
331
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
332
332
|
return /* @__PURE__ */ React.createElement(
|
|
333
|
-
|
|
333
|
+
_chunkXEPCUBAAjs.Router,
|
|
334
334
|
{
|
|
335
335
|
basename,
|
|
336
336
|
children,
|
|
@@ -363,7 +363,7 @@ function HistoryRouter({
|
|
|
363
363
|
);
|
|
364
364
|
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
365
365
|
return /* @__PURE__ */ React.createElement(
|
|
366
|
-
|
|
366
|
+
_chunkXEPCUBAAjs.Router,
|
|
367
367
|
{
|
|
368
368
|
basename,
|
|
369
369
|
children,
|
|
@@ -391,7 +391,7 @@ var Link = React.forwardRef(
|
|
|
391
391
|
viewTransition,
|
|
392
392
|
...rest
|
|
393
393
|
}, forwardedRef) {
|
|
394
|
-
let { basename, unstable_useTransitions } = React.useContext(
|
|
394
|
+
let { basename, unstable_useTransitions } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
395
395
|
let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
|
|
396
396
|
let absoluteHref;
|
|
397
397
|
let isExternal = false;
|
|
@@ -401,22 +401,22 @@ var Link = React.forwardRef(
|
|
|
401
401
|
try {
|
|
402
402
|
let currentUrl = new URL(window.location.href);
|
|
403
403
|
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
404
|
-
let path =
|
|
404
|
+
let path = _chunkXEPCUBAAjs.stripBasename.call(void 0, targetUrl.pathname, basename);
|
|
405
405
|
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
406
406
|
to = path + targetUrl.search + targetUrl.hash;
|
|
407
407
|
} else {
|
|
408
408
|
isExternal = true;
|
|
409
409
|
}
|
|
410
410
|
} catch (e) {
|
|
411
|
-
|
|
411
|
+
_chunkXEPCUBAAjs.warning.call(void 0,
|
|
412
412
|
false,
|
|
413
413
|
`<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
let href =
|
|
419
|
-
let [shouldPrefetch, prefetchRef, prefetchHandlers] =
|
|
418
|
+
let href = _chunkXEPCUBAAjs.useHref.call(void 0, to, { relative });
|
|
419
|
+
let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkXEPCUBAAjs.usePrefetchBehavior.call(void 0,
|
|
420
420
|
prefetch,
|
|
421
421
|
rest
|
|
422
422
|
);
|
|
@@ -444,13 +444,13 @@ var Link = React.forwardRef(
|
|
|
444
444
|
...prefetchHandlers,
|
|
445
445
|
href: absoluteHref || href,
|
|
446
446
|
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
447
|
-
ref:
|
|
447
|
+
ref: _chunkXEPCUBAAjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
|
|
448
448
|
target,
|
|
449
449
|
"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
);
|
|
453
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(
|
|
453
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkXEPCUBAAjs.PrefetchPageLinks, { page: href })) : link;
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
456
|
Link.displayName = "Link";
|
|
@@ -466,10 +466,10 @@ var NavLink = React.forwardRef(
|
|
|
466
466
|
children,
|
|
467
467
|
...rest
|
|
468
468
|
}, ref) {
|
|
469
|
-
let path =
|
|
470
|
-
let location =
|
|
471
|
-
let routerState = React.useContext(
|
|
472
|
-
let { navigator, basename } = React.useContext(
|
|
469
|
+
let path = _chunkXEPCUBAAjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
|
|
470
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
471
|
+
let routerState = React.useContext(_chunkXEPCUBAAjs.DataRouterStateContext);
|
|
472
|
+
let { navigator, basename } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
473
473
|
let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
|
|
474
474
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
475
475
|
useViewTransitionState(path) && viewTransition === true;
|
|
@@ -482,7 +482,7 @@ var NavLink = React.forwardRef(
|
|
|
482
482
|
toPathname = toPathname.toLowerCase();
|
|
483
483
|
}
|
|
484
484
|
if (nextLocationPathname && basename) {
|
|
485
|
-
nextLocationPathname =
|
|
485
|
+
nextLocationPathname = _chunkXEPCUBAAjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
|
|
486
486
|
}
|
|
487
487
|
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
488
488
|
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
@@ -537,7 +537,7 @@ var Form = React.forwardRef(
|
|
|
537
537
|
viewTransition,
|
|
538
538
|
...props
|
|
539
539
|
}, forwardedRef) => {
|
|
540
|
-
let { unstable_useTransitions } = React.useContext(
|
|
540
|
+
let { unstable_useTransitions } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
541
541
|
let submit = useSubmit();
|
|
542
542
|
let formAction = useFormAction(action, { relative });
|
|
543
543
|
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
@@ -583,10 +583,10 @@ function ScrollRestoration({
|
|
|
583
583
|
storageKey,
|
|
584
584
|
...props
|
|
585
585
|
}) {
|
|
586
|
-
let remixContext = React.useContext(
|
|
587
|
-
let { basename } = React.useContext(
|
|
588
|
-
let location =
|
|
589
|
-
let matches =
|
|
586
|
+
let remixContext = React.useContext(_chunkXEPCUBAAjs.FrameworkContext);
|
|
587
|
+
let { basename } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
588
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
589
|
+
let matches = _chunkXEPCUBAAjs.useMatches.call(void 0, );
|
|
590
590
|
useScrollRestoration({ getKey, storageKey });
|
|
591
591
|
let ssrKey = React.useMemo(
|
|
592
592
|
() => {
|
|
@@ -640,13 +640,13 @@ function getDataRouterConsoleError(hookName) {
|
|
|
640
640
|
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
641
641
|
}
|
|
642
642
|
function useDataRouterContext(hookName) {
|
|
643
|
-
let ctx = React.useContext(
|
|
644
|
-
|
|
643
|
+
let ctx = React.useContext(_chunkXEPCUBAAjs.DataRouterContext);
|
|
644
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
|
|
645
645
|
return ctx;
|
|
646
646
|
}
|
|
647
647
|
function useDataRouterState(hookName) {
|
|
648
|
-
let state = React.useContext(
|
|
649
|
-
|
|
648
|
+
let state = React.useContext(_chunkXEPCUBAAjs.DataRouterStateContext);
|
|
649
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
|
|
650
650
|
return state;
|
|
651
651
|
}
|
|
652
652
|
function useLinkClickHandler(to, {
|
|
@@ -658,14 +658,14 @@ function useLinkClickHandler(to, {
|
|
|
658
658
|
viewTransition,
|
|
659
659
|
unstable_useTransitions
|
|
660
660
|
} = {}) {
|
|
661
|
-
let navigate =
|
|
662
|
-
let location =
|
|
663
|
-
let path =
|
|
661
|
+
let navigate = _chunkXEPCUBAAjs.useNavigate.call(void 0, );
|
|
662
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
663
|
+
let path = _chunkXEPCUBAAjs.useResolvedPath.call(void 0, to, { relative });
|
|
664
664
|
return React.useCallback(
|
|
665
665
|
(event) => {
|
|
666
666
|
if (shouldProcessLinkClick(event, target)) {
|
|
667
667
|
event.preventDefault();
|
|
668
|
-
let replace = replaceProp !== void 0 ? replaceProp :
|
|
668
|
+
let replace = replaceProp !== void 0 ? replaceProp : _chunkXEPCUBAAjs.createPath.call(void 0, location) === _chunkXEPCUBAAjs.createPath.call(void 0, path);
|
|
669
669
|
let doNavigate = () => navigate(to, {
|
|
670
670
|
replace,
|
|
671
671
|
state,
|
|
@@ -696,13 +696,13 @@ function useLinkClickHandler(to, {
|
|
|
696
696
|
);
|
|
697
697
|
}
|
|
698
698
|
function useSearchParams(defaultInit) {
|
|
699
|
-
|
|
699
|
+
_chunkXEPCUBAAjs.warning.call(void 0,
|
|
700
700
|
typeof URLSearchParams !== "undefined",
|
|
701
701
|
`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.`
|
|
702
702
|
);
|
|
703
703
|
let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
|
|
704
704
|
let hasSetSearchParamsRef = React.useRef(false);
|
|
705
|
-
let location =
|
|
705
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
706
706
|
let searchParams = React.useMemo(
|
|
707
707
|
() => (
|
|
708
708
|
// Only merge in the defaults if we haven't yet called setSearchParams.
|
|
@@ -715,7 +715,7 @@ function useSearchParams(defaultInit) {
|
|
|
715
715
|
),
|
|
716
716
|
[location.search]
|
|
717
717
|
);
|
|
718
|
-
let navigate =
|
|
718
|
+
let navigate = _chunkXEPCUBAAjs.useNavigate.call(void 0, );
|
|
719
719
|
let setSearchParams = React.useCallback(
|
|
720
720
|
(nextInit, navigateOptions) => {
|
|
721
721
|
const newSearchParams = createSearchParams(
|
|
@@ -731,11 +731,11 @@ function useSearchParams(defaultInit) {
|
|
|
731
731
|
var fetcherId = 0;
|
|
732
732
|
var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
|
|
733
733
|
function useSubmit() {
|
|
734
|
-
let {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
let
|
|
738
|
-
let
|
|
734
|
+
let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
|
|
735
|
+
let { basename } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
736
|
+
let currentRouteId = _chunkXEPCUBAAjs.useRouteId.call(void 0, );
|
|
737
|
+
let routerFetch = router.fetch;
|
|
738
|
+
let routerNavigate = router.navigate;
|
|
739
739
|
return React.useCallback(
|
|
740
740
|
async (target, options = {}) => {
|
|
741
741
|
let { action, method, encType, formData, body } = getFormSubmissionInfo(
|
|
@@ -753,7 +753,7 @@ function useSubmit() {
|
|
|
753
753
|
flushSync: options.flushSync
|
|
754
754
|
});
|
|
755
755
|
} else {
|
|
756
|
-
await
|
|
756
|
+
await routerNavigate(options.action || action, {
|
|
757
757
|
preventScrollReset: options.preventScrollReset,
|
|
758
758
|
formData,
|
|
759
759
|
body,
|
|
@@ -767,16 +767,16 @@ function useSubmit() {
|
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
|
-
[routerFetch,
|
|
770
|
+
[routerFetch, routerNavigate, basename, currentRouteId]
|
|
771
771
|
);
|
|
772
772
|
}
|
|
773
773
|
function useFormAction(action, { relative } = {}) {
|
|
774
|
-
let { basename } = React.useContext(
|
|
775
|
-
let routeContext = React.useContext(
|
|
776
|
-
|
|
774
|
+
let { basename } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
775
|
+
let routeContext = React.useContext(_chunkXEPCUBAAjs.RouteContext);
|
|
776
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
|
|
777
777
|
let [match] = routeContext.matches.slice(-1);
|
|
778
|
-
let path = { ...
|
|
779
|
-
let location =
|
|
778
|
+
let path = { ..._chunkXEPCUBAAjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
|
|
779
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
780
780
|
if (action == null) {
|
|
781
781
|
path.search = location.search;
|
|
782
782
|
let params = new URLSearchParams(path.search);
|
|
@@ -793,23 +793,21 @@ function useFormAction(action, { relative } = {}) {
|
|
|
793
793
|
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
794
794
|
}
|
|
795
795
|
if (basename !== "/") {
|
|
796
|
-
path.pathname = path.pathname === "/" ? basename :
|
|
796
|
+
path.pathname = path.pathname === "/" ? basename : _chunkXEPCUBAAjs.joinPaths.call(void 0, [basename, path.pathname]);
|
|
797
797
|
}
|
|
798
|
-
return
|
|
798
|
+
return _chunkXEPCUBAAjs.createPath.call(void 0, path);
|
|
799
799
|
}
|
|
800
800
|
function useFetcher({
|
|
801
801
|
key
|
|
802
802
|
} = {}) {
|
|
803
|
-
let {
|
|
804
|
-
router: { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch }
|
|
805
|
-
} = useDataRouterContext("useFetcher" /* UseFetcher */);
|
|
803
|
+
let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
|
|
806
804
|
let state = useDataRouterState("useFetcher" /* UseFetcher */);
|
|
807
|
-
let fetcherData = React.useContext(
|
|
808
|
-
let route = React.useContext(
|
|
805
|
+
let fetcherData = React.useContext(_chunkXEPCUBAAjs.FetchersContext);
|
|
806
|
+
let route = React.useContext(_chunkXEPCUBAAjs.RouteContext);
|
|
809
807
|
let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
808
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
|
|
809
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
|
|
810
|
+
_chunkXEPCUBAAjs.invariant.call(void 0,
|
|
813
811
|
routeId != null,
|
|
814
812
|
`useFetcher can only be used on routes that contain a unique "id"`
|
|
815
813
|
);
|
|
@@ -818,13 +816,14 @@ function useFetcher({
|
|
|
818
816
|
if (key && key !== fetcherKey) {
|
|
819
817
|
setFetcherKey(key);
|
|
820
818
|
}
|
|
819
|
+
let { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;
|
|
821
820
|
React.useEffect(() => {
|
|
822
821
|
getFetcher(fetcherKey);
|
|
823
822
|
return () => deleteFetcher(fetcherKey);
|
|
824
823
|
}, [deleteFetcher, getFetcher, fetcherKey]);
|
|
825
824
|
let load = React.useCallback(
|
|
826
825
|
async (href, opts) => {
|
|
827
|
-
|
|
826
|
+
_chunkXEPCUBAAjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
|
|
828
827
|
await routerFetch(fetcherKey, routeId, href, opts);
|
|
829
828
|
},
|
|
830
829
|
[fetcherKey, routeId, routerFetch]
|
|
@@ -840,7 +839,10 @@ function useFetcher({
|
|
|
840
839
|
},
|
|
841
840
|
[fetcherKey, submitImpl]
|
|
842
841
|
);
|
|
843
|
-
let
|
|
842
|
+
let reset = React.useCallback(
|
|
843
|
+
(opts) => resetFetcher(fetcherKey, opts),
|
|
844
|
+
[resetFetcher, fetcherKey]
|
|
845
|
+
);
|
|
844
846
|
let FetcherForm = React.useMemo(() => {
|
|
845
847
|
let FetcherForm2 = React.forwardRef(
|
|
846
848
|
(props, ref) => {
|
|
@@ -850,18 +852,18 @@ function useFetcher({
|
|
|
850
852
|
FetcherForm2.displayName = "fetcher.Form";
|
|
851
853
|
return FetcherForm2;
|
|
852
854
|
}, [fetcherKey]);
|
|
853
|
-
let fetcher = state.fetchers.get(fetcherKey) ||
|
|
855
|
+
let fetcher = state.fetchers.get(fetcherKey) || _chunkXEPCUBAAjs.IDLE_FETCHER;
|
|
854
856
|
let data = fetcherData.get(fetcherKey);
|
|
855
857
|
let fetcherWithComponents = React.useMemo(
|
|
856
858
|
() => ({
|
|
857
859
|
Form: FetcherForm,
|
|
858
860
|
submit,
|
|
859
861
|
load,
|
|
860
|
-
|
|
862
|
+
reset,
|
|
861
863
|
...fetcher,
|
|
862
864
|
data
|
|
863
865
|
}),
|
|
864
|
-
[FetcherForm, submit, load,
|
|
866
|
+
[FetcherForm, submit, load, reset, fetcher, data]
|
|
865
867
|
);
|
|
866
868
|
return fetcherWithComponents;
|
|
867
869
|
}
|
|
@@ -881,7 +883,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
|
|
|
881
883
|
key = getKey(
|
|
882
884
|
{
|
|
883
885
|
...location,
|
|
884
|
-
pathname:
|
|
886
|
+
pathname: _chunkXEPCUBAAjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
|
|
885
887
|
},
|
|
886
888
|
matches
|
|
887
889
|
);
|
|
@@ -902,10 +904,10 @@ function useScrollRestoration({
|
|
|
902
904
|
let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
|
|
903
905
|
"useScrollRestoration" /* UseScrollRestoration */
|
|
904
906
|
);
|
|
905
|
-
let { basename } = React.useContext(
|
|
906
|
-
let location =
|
|
907
|
-
let matches =
|
|
908
|
-
let navigation =
|
|
907
|
+
let { basename } = React.useContext(_chunkXEPCUBAAjs.NavigationContext);
|
|
908
|
+
let location = _chunkXEPCUBAAjs.useLocation.call(void 0, );
|
|
909
|
+
let matches = _chunkXEPCUBAAjs.useMatches.call(void 0, );
|
|
910
|
+
let navigation = _chunkXEPCUBAAjs.useNavigation.call(void 0, );
|
|
909
911
|
React.useEffect(() => {
|
|
910
912
|
window.history.scrollRestoration = "manual";
|
|
911
913
|
return () => {
|
|
@@ -924,7 +926,7 @@ function useScrollRestoration({
|
|
|
924
926
|
JSON.stringify(savedScrollPositions)
|
|
925
927
|
);
|
|
926
928
|
} catch (error) {
|
|
927
|
-
|
|
929
|
+
_chunkXEPCUBAAjs.warning.call(void 0,
|
|
928
930
|
false,
|
|
929
931
|
`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
|
|
930
932
|
);
|
|
@@ -971,7 +973,7 @@ function useScrollRestoration({
|
|
|
971
973
|
}
|
|
972
974
|
}
|
|
973
975
|
} catch (e2) {
|
|
974
|
-
|
|
976
|
+
_chunkXEPCUBAAjs.warning.call(void 0,
|
|
975
977
|
false,
|
|
976
978
|
`"${location.hash.slice(
|
|
977
979
|
1
|
|
@@ -1009,7 +1011,7 @@ function usePrompt({
|
|
|
1009
1011
|
when,
|
|
1010
1012
|
message
|
|
1011
1013
|
}) {
|
|
1012
|
-
let blocker =
|
|
1014
|
+
let blocker = _chunkXEPCUBAAjs.useBlocker.call(void 0, when);
|
|
1013
1015
|
React.useEffect(() => {
|
|
1014
1016
|
if (blocker.state === "blocked") {
|
|
1015
1017
|
let proceed = window.confirm(message);
|
|
@@ -1027,21 +1029,21 @@ function usePrompt({
|
|
|
1027
1029
|
}, [blocker, when]);
|
|
1028
1030
|
}
|
|
1029
1031
|
function useViewTransitionState(to, { relative } = {}) {
|
|
1030
|
-
let vtContext = React.useContext(
|
|
1031
|
-
|
|
1032
|
+
let vtContext = React.useContext(_chunkXEPCUBAAjs.ViewTransitionContext);
|
|
1033
|
+
_chunkXEPCUBAAjs.invariant.call(void 0,
|
|
1032
1034
|
vtContext != null,
|
|
1033
1035
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1034
1036
|
);
|
|
1035
1037
|
let { basename } = useDataRouterContext(
|
|
1036
1038
|
"useViewTransitionState" /* useViewTransitionState */
|
|
1037
1039
|
);
|
|
1038
|
-
let path =
|
|
1040
|
+
let path = _chunkXEPCUBAAjs.useResolvedPath.call(void 0, to, { relative });
|
|
1039
1041
|
if (!vtContext.isTransitioning) {
|
|
1040
1042
|
return false;
|
|
1041
1043
|
}
|
|
1042
|
-
let currentPath =
|
|
1043
|
-
let nextPath =
|
|
1044
|
-
return
|
|
1044
|
+
let currentPath = _chunkXEPCUBAAjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
1045
|
+
let nextPath = _chunkXEPCUBAAjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
1046
|
+
return _chunkXEPCUBAAjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkXEPCUBAAjs.matchPath.call(void 0, path.pathname, currentPath) != null;
|
|
1045
1047
|
}
|
|
1046
1048
|
|
|
1047
1049
|
// lib/dom/server.tsx
|
|
@@ -1052,7 +1054,7 @@ function StaticRouter({
|
|
|
1052
1054
|
location: locationProp = "/"
|
|
1053
1055
|
}) {
|
|
1054
1056
|
if (typeof locationProp === "string") {
|
|
1055
|
-
locationProp =
|
|
1057
|
+
locationProp = _chunkXEPCUBAAjs.parsePath.call(void 0, locationProp);
|
|
1056
1058
|
}
|
|
1057
1059
|
let action = "POP" /* Pop */;
|
|
1058
1060
|
let location = {
|
|
@@ -1064,7 +1066,7 @@ function StaticRouter({
|
|
|
1064
1066
|
};
|
|
1065
1067
|
let staticNavigator = getStatelessNavigator();
|
|
1066
1068
|
return /* @__PURE__ */ React2.createElement(
|
|
1067
|
-
|
|
1069
|
+
_chunkXEPCUBAAjs.Router,
|
|
1068
1070
|
{
|
|
1069
1071
|
basename,
|
|
1070
1072
|
children,
|
|
@@ -1082,7 +1084,7 @@ function StaticRouterProvider({
|
|
|
1082
1084
|
hydrate = true,
|
|
1083
1085
|
nonce
|
|
1084
1086
|
}) {
|
|
1085
|
-
|
|
1087
|
+
_chunkXEPCUBAAjs.invariant.call(void 0,
|
|
1086
1088
|
router && context,
|
|
1087
1089
|
"You must provide `router` and `context` to <StaticRouterProvider>"
|
|
1088
1090
|
);
|
|
@@ -1105,8 +1107,8 @@ function StaticRouterProvider({
|
|
|
1105
1107
|
hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
|
|
1106
1108
|
}
|
|
1107
1109
|
let { state } = dataRouterContext.router;
|
|
1108
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
1109
|
-
|
|
1110
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkXEPCUBAAjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkXEPCUBAAjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkXEPCUBAAjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkXEPCUBAAjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
|
|
1111
|
+
_chunkXEPCUBAAjs.Router,
|
|
1110
1112
|
{
|
|
1111
1113
|
basename: dataRouterContext.basename,
|
|
1112
1114
|
location: state.location,
|
|
@@ -1137,14 +1139,14 @@ function DataRoutes({
|
|
|
1137
1139
|
future,
|
|
1138
1140
|
state
|
|
1139
1141
|
}) {
|
|
1140
|
-
return
|
|
1142
|
+
return _chunkXEPCUBAAjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
|
|
1141
1143
|
}
|
|
1142
1144
|
function serializeErrors(errors) {
|
|
1143
1145
|
if (!errors) return null;
|
|
1144
1146
|
let entries = Object.entries(errors);
|
|
1145
1147
|
let serialized = {};
|
|
1146
1148
|
for (let [key, val] of entries) {
|
|
1147
|
-
if (
|
|
1149
|
+
if (_chunkXEPCUBAAjs.isRouteErrorResponse.call(void 0, val)) {
|
|
1148
1150
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
1149
1151
|
} else if (val instanceof Error) {
|
|
1150
1152
|
serialized[key] = {
|
|
@@ -1194,16 +1196,16 @@ function getStatelessNavigator() {
|
|
|
1194
1196
|
};
|
|
1195
1197
|
}
|
|
1196
1198
|
function createStaticHandler2(routes, opts) {
|
|
1197
|
-
return
|
|
1199
|
+
return _chunkXEPCUBAAjs.createStaticHandler.call(void 0, routes, {
|
|
1198
1200
|
...opts,
|
|
1199
|
-
mapRouteProperties:
|
|
1201
|
+
mapRouteProperties: _chunkXEPCUBAAjs.mapRouteProperties
|
|
1200
1202
|
});
|
|
1201
1203
|
}
|
|
1202
1204
|
function createStaticRouter(routes, context, opts = {}) {
|
|
1203
1205
|
let manifest = {};
|
|
1204
|
-
let dataRoutes =
|
|
1206
|
+
let dataRoutes = _chunkXEPCUBAAjs.convertRoutesToDataRoutes.call(void 0,
|
|
1205
1207
|
routes,
|
|
1206
|
-
|
|
1208
|
+
_chunkXEPCUBAAjs.mapRouteProperties,
|
|
1207
1209
|
void 0,
|
|
1208
1210
|
manifest
|
|
1209
1211
|
);
|
|
@@ -1234,7 +1236,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1234
1236
|
actionData: context.actionData,
|
|
1235
1237
|
errors: context.errors,
|
|
1236
1238
|
initialized: true,
|
|
1237
|
-
navigation:
|
|
1239
|
+
navigation: _chunkXEPCUBAAjs.IDLE_NAVIGATION,
|
|
1238
1240
|
restoreScrollPosition: null,
|
|
1239
1241
|
preventScrollReset: false,
|
|
1240
1242
|
revalidation: "idle",
|
|
@@ -1269,7 +1271,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1269
1271
|
createHref,
|
|
1270
1272
|
encodeLocation,
|
|
1271
1273
|
getFetcher() {
|
|
1272
|
-
return
|
|
1274
|
+
return _chunkXEPCUBAAjs.IDLE_FETCHER;
|
|
1273
1275
|
},
|
|
1274
1276
|
deleteFetcher() {
|
|
1275
1277
|
throw msg("deleteFetcher");
|
|
@@ -1281,7 +1283,7 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1281
1283
|
throw msg("dispose");
|
|
1282
1284
|
},
|
|
1283
1285
|
getBlocker() {
|
|
1284
|
-
return
|
|
1286
|
+
return _chunkXEPCUBAAjs.IDLE_BLOCKER;
|
|
1285
1287
|
},
|
|
1286
1288
|
deleteBlocker() {
|
|
1287
1289
|
throw msg("deleteBlocker");
|
|
@@ -1299,10 +1301,10 @@ function createStaticRouter(routes, context, opts = {}) {
|
|
|
1299
1301
|
};
|
|
1300
1302
|
}
|
|
1301
1303
|
function createHref(to) {
|
|
1302
|
-
return typeof to === "string" ? to :
|
|
1304
|
+
return typeof to === "string" ? to : _chunkXEPCUBAAjs.createPath.call(void 0, to);
|
|
1303
1305
|
}
|
|
1304
1306
|
function encodeLocation(to) {
|
|
1305
|
-
let href = typeof to === "string" ? to :
|
|
1307
|
+
let href = typeof to === "string" ? to : _chunkXEPCUBAAjs.createPath.call(void 0, to);
|
|
1306
1308
|
href = href.replace(/ $/, "%20");
|
|
1307
1309
|
let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
|
|
1308
1310
|
return {
|