react-router 0.0.0-experimental-a2c4d7fad → 0.0.0-experimental-004e483a8
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/{chunk-O7PZGOV2.mjs → chunk-VZXENIAS.mjs} +26 -22
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +8 -8
- package/dist/development/dom-export.mjs +2 -2
- package/dist/{production/fog-of-war-DhdpvlSf.d.mts → development/fog-of-war-Cb_zl3s5.d.mts} +1 -1
- package/dist/development/{fog-of-war-DstSnxnE.d.ts → fog-of-war-DedGgQYl.d.ts} +1 -1
- package/dist/development/index.d.mts +4 -4
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +27 -22
- package/dist/development/index.mjs +4 -2
- package/dist/development/lib/types/route-module.d.mts +3 -1
- package/dist/development/lib/types/route-module.d.ts +3 -1
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/development/{route-data-Cceggzl6.d.mts → route-data-C9TPjece.d.mts} +12 -1
- package/dist/{production/route-data-Cceggzl6.d.mts → development/route-data-C9TPjece.d.ts} +12 -1
- package/dist/production/{chunk-EAHMQJZV.mjs → chunk-F4BNNTOO.mjs} +26 -22
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +8 -8
- package/dist/production/dom-export.mjs +2 -2
- package/dist/{development/fog-of-war-DhdpvlSf.d.mts → production/fog-of-war-Cb_zl3s5.d.mts} +1 -1
- package/dist/production/{fog-of-war-DstSnxnE.d.ts → fog-of-war-DedGgQYl.d.ts} +1 -1
- package/dist/production/index.d.mts +4 -4
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +27 -22
- package/dist/production/index.mjs +4 -2
- package/dist/production/lib/types/route-module.d.mts +3 -1
- package/dist/production/lib/types/route-module.d.ts +3 -1
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/production/{route-data-Cceggzl6.d.ts → route-data-C9TPjece.d.mts} +12 -1
- package/dist/{development/route-data-Cceggzl6.d.ts → production/route-data-C9TPjece.d.ts} +12 -1
- package/package.json +1 -9
- package/dist/development/lib/types/index.d.mts +0 -73
- package/dist/development/lib/types/index.d.ts +0 -73
- package/dist/development/lib/types/index.js +0 -28
- package/dist/development/lib/types/index.mjs +0 -10
- package/dist/production/lib/types/index.d.mts +0 -73
- package/dist/production/lib/types/index.d.ts +0 -73
- package/dist/production/lib/types/index.js +0 -28
- package/dist/production/lib/types/index.mjs +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-004e483a8
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -154,13 +154,13 @@ function createHashHistory(options = {}) {
|
|
|
154
154
|
}
|
|
155
155
|
function createHashHref(window2, to) {
|
|
156
156
|
let base = window2.document.querySelector("base");
|
|
157
|
-
let
|
|
157
|
+
let href2 = "";
|
|
158
158
|
if (base && base.getAttribute("href")) {
|
|
159
159
|
let url = window2.location.href;
|
|
160
160
|
let hashIndex = url.indexOf("#");
|
|
161
|
-
|
|
161
|
+
href2 = hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return href2 + "#" + (typeof to === "string" ? to : createPath(to));
|
|
164
164
|
}
|
|
165
165
|
function validateHashLocation(location, to) {
|
|
166
166
|
warning(
|
|
@@ -302,13 +302,13 @@ function getUrlBasedHistory(getLocation, createHref2, validateLocation, options
|
|
|
302
302
|
}
|
|
303
303
|
function createURL(to) {
|
|
304
304
|
let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
|
|
305
|
-
let
|
|
306
|
-
|
|
305
|
+
let href2 = typeof to === "string" ? to : createPath(to);
|
|
306
|
+
href2 = href2.replace(/ $/, "%20");
|
|
307
307
|
invariant(
|
|
308
308
|
base,
|
|
309
|
-
`No window.location.(origin|href) available to create URL for href: ${
|
|
309
|
+
`No window.location.(origin|href) available to create URL for href: ${href2}`
|
|
310
310
|
);
|
|
311
|
-
return new URL(
|
|
311
|
+
return new URL(href2, base);
|
|
312
312
|
}
|
|
313
313
|
let history = {
|
|
314
314
|
get action() {
|
|
@@ -840,6 +840,9 @@ var ErrorResponseImpl = class {
|
|
|
840
840
|
function isRouteErrorResponse(error) {
|
|
841
841
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
842
842
|
}
|
|
843
|
+
function href(path, ...args) {
|
|
844
|
+
return "";
|
|
845
|
+
}
|
|
843
846
|
|
|
844
847
|
// lib/router/router.ts
|
|
845
848
|
var validMutationMethodsArr = [
|
|
@@ -1710,7 +1713,7 @@ function createRouter(init) {
|
|
|
1710
1713
|
});
|
|
1711
1714
|
return new Map(state.fetchers);
|
|
1712
1715
|
}
|
|
1713
|
-
async function fetch2(key, routeId,
|
|
1716
|
+
async function fetch2(key, routeId, href2, opts) {
|
|
1714
1717
|
abortFetcher(key);
|
|
1715
1718
|
let flushSync = (opts && opts.flushSync) === true;
|
|
1716
1719
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
@@ -1718,7 +1721,7 @@ function createRouter(init) {
|
|
|
1718
1721
|
state.location,
|
|
1719
1722
|
state.matches,
|
|
1720
1723
|
basename,
|
|
1721
|
-
|
|
1724
|
+
href2,
|
|
1722
1725
|
routeId,
|
|
1723
1726
|
opts?.relative
|
|
1724
1727
|
);
|
|
@@ -5356,7 +5359,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
|
5356
5359
|
let module = routeModules[match.route.id];
|
|
5357
5360
|
let route = manifest.routes[match.route.id];
|
|
5358
5361
|
return [
|
|
5359
|
-
route && route.css ? route.css.map((
|
|
5362
|
+
route && route.css ? route.css.map((href2) => ({ rel: "stylesheet", href: href2 })) : [],
|
|
5360
5363
|
module?.links?.() || []
|
|
5361
5364
|
];
|
|
5362
5365
|
}).flat(2);
|
|
@@ -5365,7 +5368,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
|
5365
5368
|
}
|
|
5366
5369
|
function getRouteCssDescriptors(route) {
|
|
5367
5370
|
if (!route.css) return [];
|
|
5368
|
-
return route.css.map((
|
|
5371
|
+
return route.css.map((href2) => ({ rel: "stylesheet", href: href2 }));
|
|
5369
5372
|
}
|
|
5370
5373
|
async function prefetchRouteCss(route) {
|
|
5371
5374
|
if (!route.css) return;
|
|
@@ -6847,7 +6850,7 @@ function PrefetchPageLinksImpl({
|
|
|
6847
6850
|
[newMatchesForAssets, manifest]
|
|
6848
6851
|
);
|
|
6849
6852
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
6850
|
-
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, dataHrefs.map((
|
|
6853
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, dataHrefs.map((href2) => /* @__PURE__ */ React9.createElement("link", { key: href2, rel: "prefetch", as: "fetch", href: href2, ...linkProps })), moduleHrefs.map((href2) => /* @__PURE__ */ React9.createElement("link", { key: href2, rel: "modulepreload", href: href2, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
|
|
6851
6854
|
// these don't spread `linkProps` because they are full link descriptors
|
|
6852
6855
|
// already with their own props
|
|
6853
6856
|
/* @__PURE__ */ React9.createElement("link", { key, ...link })
|
|
@@ -7087,7 +7090,7 @@ function mergeRefs(...refs) {
|
|
|
7087
7090
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7088
7091
|
try {
|
|
7089
7092
|
if (isBrowser) {
|
|
7090
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7093
|
+
window.__reactRouterVersion = "0.0.0-experimental-004e483a8";
|
|
7091
7094
|
}
|
|
7092
7095
|
} catch (e) {
|
|
7093
7096
|
}
|
|
@@ -7290,7 +7293,7 @@ var Link = React10.forwardRef(
|
|
|
7290
7293
|
}
|
|
7291
7294
|
}
|
|
7292
7295
|
}
|
|
7293
|
-
let
|
|
7296
|
+
let href2 = useHref(to, { relative });
|
|
7294
7297
|
let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
|
|
7295
7298
|
prefetch,
|
|
7296
7299
|
rest
|
|
@@ -7316,7 +7319,7 @@ var Link = React10.forwardRef(
|
|
|
7316
7319
|
{
|
|
7317
7320
|
...rest,
|
|
7318
7321
|
...prefetchHandlers,
|
|
7319
|
-
href: absoluteHref ||
|
|
7322
|
+
href: absoluteHref || href2,
|
|
7320
7323
|
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
7321
7324
|
ref: mergeRefs(forwardedRef, prefetchRef),
|
|
7322
7325
|
target,
|
|
@@ -7324,7 +7327,7 @@ var Link = React10.forwardRef(
|
|
|
7324
7327
|
}
|
|
7325
7328
|
)
|
|
7326
7329
|
);
|
|
7327
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page:
|
|
7330
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href2 })) : link;
|
|
7328
7331
|
}
|
|
7329
7332
|
);
|
|
7330
7333
|
Link.displayName = "Link";
|
|
@@ -7680,9 +7683,9 @@ function useFetcher({
|
|
|
7680
7683
|
return () => router.deleteFetcher(fetcherKey);
|
|
7681
7684
|
}, [router, fetcherKey]);
|
|
7682
7685
|
let load = React10.useCallback(
|
|
7683
|
-
async (
|
|
7686
|
+
async (href2, opts) => {
|
|
7684
7687
|
invariant(routeId, "No routeId available for fetcher.load()");
|
|
7685
|
-
await router.fetch(fetcherKey, routeId,
|
|
7688
|
+
await router.fetch(fetcherKey, routeId, href2, opts);
|
|
7686
7689
|
},
|
|
7687
7690
|
[fetcherKey, routeId, router]
|
|
7688
7691
|
);
|
|
@@ -8139,9 +8142,9 @@ function createHref(to) {
|
|
|
8139
8142
|
return typeof to === "string" ? to : createPath(to);
|
|
8140
8143
|
}
|
|
8141
8144
|
function encodeLocation(to) {
|
|
8142
|
-
let
|
|
8143
|
-
|
|
8144
|
-
let encoded = ABSOLUTE_URL_REGEX3.test(
|
|
8145
|
+
let href2 = typeof to === "string" ? to : createPath(to);
|
|
8146
|
+
href2 = href2.replace(/ $/, "%20");
|
|
8147
|
+
let encoded = ABSOLUTE_URL_REGEX3.test(href2) ? new URL(href2) : new URL(href2, "http://localhost");
|
|
8145
8148
|
return {
|
|
8146
8149
|
pathname: encoded.pathname,
|
|
8147
8150
|
search: encoded.search,
|
|
@@ -9639,6 +9642,7 @@ export {
|
|
|
9639
9642
|
replace,
|
|
9640
9643
|
ErrorResponseImpl,
|
|
9641
9644
|
isRouteErrorResponse,
|
|
9645
|
+
href,
|
|
9642
9646
|
IDLE_NAVIGATION,
|
|
9643
9647
|
IDLE_FETCHER,
|
|
9644
9648
|
IDLE_BLOCKER,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-Cb_zl3s5.mjs';
|
|
3
|
+
import './route-data-C9TPjece.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-DedGgQYl.js';
|
|
3
|
+
import './route-data-C9TPjece.js';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-004e483a8
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -197,13 +197,13 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options =
|
|
|
197
197
|
}
|
|
198
198
|
function createURL(to) {
|
|
199
199
|
let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
|
|
200
|
-
let
|
|
201
|
-
|
|
200
|
+
let href2 = typeof to === "string" ? to : createPath(to);
|
|
201
|
+
href2 = href2.replace(/ $/, "%20");
|
|
202
202
|
invariant(
|
|
203
203
|
base,
|
|
204
|
-
`No window.location.(origin|href) available to create URL for href: ${
|
|
204
|
+
`No window.location.(origin|href) available to create URL for href: ${href2}`
|
|
205
205
|
);
|
|
206
|
-
return new URL(
|
|
206
|
+
return new URL(href2, base);
|
|
207
207
|
}
|
|
208
208
|
let history = {
|
|
209
209
|
get action() {
|
|
@@ -1567,7 +1567,7 @@ function createRouter(init) {
|
|
|
1567
1567
|
});
|
|
1568
1568
|
return new Map(state.fetchers);
|
|
1569
1569
|
}
|
|
1570
|
-
async function fetch2(key, routeId,
|
|
1570
|
+
async function fetch2(key, routeId, href2, opts) {
|
|
1571
1571
|
abortFetcher(key);
|
|
1572
1572
|
let flushSync2 = (opts && opts.flushSync) === true;
|
|
1573
1573
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
@@ -1575,7 +1575,7 @@ function createRouter(init) {
|
|
|
1575
1575
|
state.location,
|
|
1576
1576
|
state.matches,
|
|
1577
1577
|
basename,
|
|
1578
|
-
|
|
1578
|
+
href2,
|
|
1579
1579
|
routeId,
|
|
1580
1580
|
opts?.relative
|
|
1581
1581
|
);
|
|
@@ -4228,7 +4228,7 @@ async function loadRouteModule(route, routeModulesCache) {
|
|
|
4228
4228
|
// lib/dom/ssr/links.ts
|
|
4229
4229
|
function getRouteCssDescriptors(route) {
|
|
4230
4230
|
if (!route.css) return [];
|
|
4231
|
-
return route.css.map((
|
|
4231
|
+
return route.css.map((href2) => ({ rel: "stylesheet", href: href2 }));
|
|
4232
4232
|
}
|
|
4233
4233
|
async function prefetchRouteCss(route) {
|
|
4234
4234
|
if (!route.css) return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-004e483a8
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
matchRoutes,
|
|
26
26
|
shouldHydrateRouteLoader,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VZXENIAS.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction,
|
|
2
|
+
import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-C9TPjece.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction,
|
|
2
|
+
import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-C9TPjece.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-
|
|
2
|
-
export {
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-C9TPjece.mjs';
|
|
2
|
+
export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-C9TPjece.mjs';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-Cb_zl3s5.mjs';
|
|
4
|
+
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-Cb_zl3s5.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-
|
|
2
|
-
export {
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-C9TPjece.js';
|
|
2
|
+
export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-C9TPjece.js';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DedGgQYl.js';
|
|
4
|
+
export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-DedGgQYl.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-004e483a8
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -108,6 +108,7 @@ __export(react_router_exports, {
|
|
|
108
108
|
createStaticRouter: () => createStaticRouter,
|
|
109
109
|
data: () => data,
|
|
110
110
|
generatePath: () => generatePath,
|
|
111
|
+
href: () => href,
|
|
111
112
|
isCookie: () => isCookie,
|
|
112
113
|
isRouteErrorResponse: () => isRouteErrorResponse,
|
|
113
114
|
isSession: () => isSession,
|
|
@@ -299,13 +300,13 @@ function createHashHistory(options = {}) {
|
|
|
299
300
|
}
|
|
300
301
|
function createHashHref(window2, to) {
|
|
301
302
|
let base = window2.document.querySelector("base");
|
|
302
|
-
let
|
|
303
|
+
let href2 = "";
|
|
303
304
|
if (base && base.getAttribute("href")) {
|
|
304
305
|
let url = window2.location.href;
|
|
305
306
|
let hashIndex = url.indexOf("#");
|
|
306
|
-
|
|
307
|
+
href2 = hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
307
308
|
}
|
|
308
|
-
return
|
|
309
|
+
return href2 + "#" + (typeof to === "string" ? to : createPath(to));
|
|
309
310
|
}
|
|
310
311
|
function validateHashLocation(location, to) {
|
|
311
312
|
warning(
|
|
@@ -447,13 +448,13 @@ function getUrlBasedHistory(getLocation, createHref2, validateLocation, options
|
|
|
447
448
|
}
|
|
448
449
|
function createURL(to) {
|
|
449
450
|
let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
|
|
450
|
-
let
|
|
451
|
-
|
|
451
|
+
let href2 = typeof to === "string" ? to : createPath(to);
|
|
452
|
+
href2 = href2.replace(/ $/, "%20");
|
|
452
453
|
invariant(
|
|
453
454
|
base,
|
|
454
|
-
`No window.location.(origin|href) available to create URL for href: ${
|
|
455
|
+
`No window.location.(origin|href) available to create URL for href: ${href2}`
|
|
455
456
|
);
|
|
456
|
-
return new URL(
|
|
457
|
+
return new URL(href2, base);
|
|
457
458
|
}
|
|
458
459
|
let history = {
|
|
459
460
|
get action() {
|
|
@@ -985,6 +986,9 @@ var ErrorResponseImpl = class {
|
|
|
985
986
|
function isRouteErrorResponse(error) {
|
|
986
987
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
987
988
|
}
|
|
989
|
+
function href(path, ...args) {
|
|
990
|
+
return "";
|
|
991
|
+
}
|
|
988
992
|
|
|
989
993
|
// lib/router/router.ts
|
|
990
994
|
var validMutationMethodsArr = [
|
|
@@ -1855,7 +1859,7 @@ function createRouter(init) {
|
|
|
1855
1859
|
});
|
|
1856
1860
|
return new Map(state.fetchers);
|
|
1857
1861
|
}
|
|
1858
|
-
async function fetch2(key, routeId,
|
|
1862
|
+
async function fetch2(key, routeId, href2, opts) {
|
|
1859
1863
|
abortFetcher(key);
|
|
1860
1864
|
let flushSync = (opts && opts.flushSync) === true;
|
|
1861
1865
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
@@ -1863,7 +1867,7 @@ function createRouter(init) {
|
|
|
1863
1867
|
state.location,
|
|
1864
1868
|
state.matches,
|
|
1865
1869
|
basename,
|
|
1866
|
-
|
|
1870
|
+
href2,
|
|
1867
1871
|
routeId,
|
|
1868
1872
|
opts?.relative
|
|
1869
1873
|
);
|
|
@@ -5501,7 +5505,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
|
5501
5505
|
let module2 = routeModules[match.route.id];
|
|
5502
5506
|
let route = manifest.routes[match.route.id];
|
|
5503
5507
|
return [
|
|
5504
|
-
route && route.css ? route.css.map((
|
|
5508
|
+
route && route.css ? route.css.map((href2) => ({ rel: "stylesheet", href: href2 })) : [],
|
|
5505
5509
|
module2?.links?.() || []
|
|
5506
5510
|
];
|
|
5507
5511
|
}).flat(2);
|
|
@@ -5510,7 +5514,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
|
|
|
5510
5514
|
}
|
|
5511
5515
|
function getRouteCssDescriptors(route) {
|
|
5512
5516
|
if (!route.css) return [];
|
|
5513
|
-
return route.css.map((
|
|
5517
|
+
return route.css.map((href2) => ({ rel: "stylesheet", href: href2 }));
|
|
5514
5518
|
}
|
|
5515
5519
|
async function prefetchRouteCss(route) {
|
|
5516
5520
|
if (!route.css) return;
|
|
@@ -6992,7 +6996,7 @@ function PrefetchPageLinksImpl({
|
|
|
6992
6996
|
[newMatchesForAssets, manifest]
|
|
6993
6997
|
);
|
|
6994
6998
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
6995
|
-
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, dataHrefs.map((
|
|
6999
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, dataHrefs.map((href2) => /* @__PURE__ */ React9.createElement("link", { key: href2, rel: "prefetch", as: "fetch", href: href2, ...linkProps })), moduleHrefs.map((href2) => /* @__PURE__ */ React9.createElement("link", { key: href2, rel: "modulepreload", href: href2, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
|
|
6996
7000
|
// these don't spread `linkProps` because they are full link descriptors
|
|
6997
7001
|
// already with their own props
|
|
6998
7002
|
/* @__PURE__ */ React9.createElement("link", { key, ...link })
|
|
@@ -7232,7 +7236,7 @@ function mergeRefs(...refs) {
|
|
|
7232
7236
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7233
7237
|
try {
|
|
7234
7238
|
if (isBrowser) {
|
|
7235
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7239
|
+
window.__reactRouterVersion = "0.0.0-experimental-004e483a8";
|
|
7236
7240
|
}
|
|
7237
7241
|
} catch (e) {
|
|
7238
7242
|
}
|
|
@@ -7435,7 +7439,7 @@ var Link = React10.forwardRef(
|
|
|
7435
7439
|
}
|
|
7436
7440
|
}
|
|
7437
7441
|
}
|
|
7438
|
-
let
|
|
7442
|
+
let href2 = useHref(to, { relative });
|
|
7439
7443
|
let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
|
|
7440
7444
|
prefetch,
|
|
7441
7445
|
rest
|
|
@@ -7461,7 +7465,7 @@ var Link = React10.forwardRef(
|
|
|
7461
7465
|
{
|
|
7462
7466
|
...rest,
|
|
7463
7467
|
...prefetchHandlers,
|
|
7464
|
-
href: absoluteHref ||
|
|
7468
|
+
href: absoluteHref || href2,
|
|
7465
7469
|
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
7466
7470
|
ref: mergeRefs(forwardedRef, prefetchRef),
|
|
7467
7471
|
target,
|
|
@@ -7469,7 +7473,7 @@ var Link = React10.forwardRef(
|
|
|
7469
7473
|
}
|
|
7470
7474
|
)
|
|
7471
7475
|
);
|
|
7472
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page:
|
|
7476
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href2 })) : link;
|
|
7473
7477
|
}
|
|
7474
7478
|
);
|
|
7475
7479
|
Link.displayName = "Link";
|
|
@@ -7825,9 +7829,9 @@ function useFetcher({
|
|
|
7825
7829
|
return () => router.deleteFetcher(fetcherKey);
|
|
7826
7830
|
}, [router, fetcherKey]);
|
|
7827
7831
|
let load = React10.useCallback(
|
|
7828
|
-
async (
|
|
7832
|
+
async (href2, opts) => {
|
|
7829
7833
|
invariant(routeId, "No routeId available for fetcher.load()");
|
|
7830
|
-
await router.fetch(fetcherKey, routeId,
|
|
7834
|
+
await router.fetch(fetcherKey, routeId, href2, opts);
|
|
7831
7835
|
},
|
|
7832
7836
|
[fetcherKey, routeId, router]
|
|
7833
7837
|
);
|
|
@@ -8284,9 +8288,9 @@ function createHref(to) {
|
|
|
8284
8288
|
return typeof to === "string" ? to : createPath(to);
|
|
8285
8289
|
}
|
|
8286
8290
|
function encodeLocation(to) {
|
|
8287
|
-
let
|
|
8288
|
-
|
|
8289
|
-
let encoded = ABSOLUTE_URL_REGEX3.test(
|
|
8291
|
+
let href2 = typeof to === "string" ? to : createPath(to);
|
|
8292
|
+
href2 = href2.replace(/ $/, "%20");
|
|
8293
|
+
let encoded = ABSOLUTE_URL_REGEX3.test(href2) ? new URL(href2) : new URL(href2, "http://localhost");
|
|
8290
8294
|
return {
|
|
8291
8295
|
pathname: encoded.pathname,
|
|
8292
8296
|
search: encoded.search,
|
|
@@ -9837,6 +9841,7 @@ function deserializeErrors2(errors) {
|
|
|
9837
9841
|
createStaticRouter,
|
|
9838
9842
|
data,
|
|
9839
9843
|
generatePath,
|
|
9844
|
+
href,
|
|
9840
9845
|
isCookie,
|
|
9841
9846
|
isRouteErrorResponse,
|
|
9842
9847
|
isSession,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-004e483a8
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -73,6 +73,7 @@ import {
|
|
|
73
73
|
generatePath,
|
|
74
74
|
getPatchRoutesOnNavigationFunction,
|
|
75
75
|
getSingleFetchDataStrategy,
|
|
76
|
+
href,
|
|
76
77
|
invariant,
|
|
77
78
|
isCookie,
|
|
78
79
|
isRouteErrorResponse,
|
|
@@ -120,7 +121,7 @@ import {
|
|
|
120
121
|
useSearchParams,
|
|
121
122
|
useSubmit,
|
|
122
123
|
useViewTransitionState
|
|
123
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-VZXENIAS.mjs";
|
|
124
125
|
export {
|
|
125
126
|
Await,
|
|
126
127
|
BrowserRouter,
|
|
@@ -190,6 +191,7 @@ export {
|
|
|
190
191
|
createStaticRouter,
|
|
191
192
|
data,
|
|
192
193
|
generatePath,
|
|
194
|
+
href,
|
|
193
195
|
isCookie,
|
|
194
196
|
isRouteErrorResponse,
|
|
195
197
|
isSession,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-C9TPjece.mjs';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -21,6 +21,8 @@ type RouteInfo = {
|
|
|
21
21
|
parents: RouteInfo[];
|
|
22
22
|
module: RouteModule;
|
|
23
23
|
id: unknown;
|
|
24
|
+
file: string;
|
|
25
|
+
path: string;
|
|
24
26
|
params: unknown;
|
|
25
27
|
loaderData: unknown;
|
|
26
28
|
actionData: unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-C9TPjece.js';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -21,6 +21,8 @@ type RouteInfo = {
|
|
|
21
21
|
parents: RouteInfo[];
|
|
22
22
|
module: RouteModule;
|
|
23
23
|
id: unknown;
|
|
24
|
+
file: string;
|
|
25
|
+
path: string;
|
|
24
26
|
params: unknown;
|
|
25
27
|
loaderData: unknown;
|
|
26
28
|
actionData: unknown;
|
|
@@ -206,6 +206,9 @@ type UrlHistoryOptions = {
|
|
|
206
206
|
v5Compat?: boolean;
|
|
207
207
|
};
|
|
208
208
|
|
|
209
|
+
interface Register {
|
|
210
|
+
}
|
|
211
|
+
|
|
209
212
|
/**
|
|
210
213
|
* Map of routeId -> data returned from a loader/action/error
|
|
211
214
|
*/
|
|
@@ -605,6 +608,14 @@ declare class ErrorResponseImpl implements ErrorResponse {
|
|
|
605
608
|
* @category Utils
|
|
606
609
|
*/
|
|
607
610
|
declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
|
611
|
+
type AnyParams = Record<string, Record<string, string | undefined>>;
|
|
612
|
+
type HrefParams = Register extends {
|
|
613
|
+
params: infer TParams extends AnyParams;
|
|
614
|
+
} ? TParams : AnyParams;
|
|
615
|
+
type HrefArgs = {
|
|
616
|
+
[K in keyof HrefParams]: [HrefParams[K]] | (Partial<HrefParams[K]> extends HrefParams[K] ? [] : never);
|
|
617
|
+
};
|
|
618
|
+
declare function href<Path extends keyof HrefArgs>(path: Path, ...args: HrefArgs[Path]): string;
|
|
608
619
|
|
|
609
620
|
/**
|
|
610
621
|
* A Router instance manages all navigation and data loading/mutations
|
|
@@ -1576,4 +1587,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1576
1587
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1577
1588
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1578
1589
|
|
|
1579
|
-
export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9,
|
|
1590
|
+
export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, type Register as aA, createBrowserHistory as aB, invariant as aC, createRouter as aD, ErrorResponseImpl as aE, DataRouterContext as aF, DataRouterStateContext as aG, FetchersContext as aH, LocationContext as aI, NavigationContext as aJ, RouteContext as aK, ViewTransitionContext as aL, type RouteModule as aM, type History as aN, type ServerDataFrom as aO, type ClientDataFrom as aP, type Func as aQ, type Equal as aR, type Pretty as aS, generatePath as aa, href as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
|