react-router 0.0.0-experimental-42a5853ef → 0.0.0-experimental-3be88c6fb
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 +7 -0
- package/README.md +10 -1
- package/dist/index.d.ts +29 -74
- package/dist/index.js +1467 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/components.d.ts +34 -249
- package/dist/lib/context.d.ts +5 -18
- package/dist/lib/hooks.d.ts +55 -284
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +1143 -12315
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +2 -2
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +1267 -12523
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +2 -2
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +6 -35
- package/dist/dom-export.d.ts +0 -3
- package/dist/dom-export.mjs +0 -205
- package/dist/dom-export.mjs.map +0 -1
- package/dist/index.mjs +0 -11575
- package/dist/index.mjs.map +0 -1
- package/dist/lib/dom/dom.d.ts +0 -123
- package/dist/lib/dom/global.d.ts +0 -40
- package/dist/lib/dom/lib.d.ts +0 -940
- package/dist/lib/dom/server.d.ts +0 -41
- package/dist/lib/dom/ssr/components.d.ts +0 -123
- package/dist/lib/dom/ssr/data.d.ts +0 -7
- package/dist/lib/dom/ssr/entry.d.ts +0 -47
- package/dist/lib/dom/ssr/errorBoundaries.d.ts +0 -36
- package/dist/lib/dom/ssr/errors.d.ts +0 -2
- package/dist/lib/dom/ssr/fallback.d.ts +0 -2
- package/dist/lib/dom/ssr/fog-of-war.d.ts +0 -28
- package/dist/lib/dom/ssr/invariant.d.ts +0 -2
- package/dist/lib/dom/ssr/links.d.ts +0 -25
- package/dist/lib/dom/ssr/markup.d.ts +0 -5
- package/dist/lib/dom/ssr/routeModules.d.ts +0 -141
- package/dist/lib/dom/ssr/routes-test-stub.d.ts +0 -59
- package/dist/lib/dom/ssr/routes.d.ts +0 -32
- package/dist/lib/dom/ssr/server.d.ts +0 -16
- package/dist/lib/dom/ssr/single-fetch.d.ts +0 -37
- package/dist/lib/dom-export/dom-router-provider.d.ts +0 -5
- package/dist/lib/dom-export/hydrated-router.d.ts +0 -5
- package/dist/lib/dom-export.d.ts +0 -3
- package/dist/lib/router/history.d.ts +0 -253
- package/dist/lib/router/links.d.ts +0 -104
- package/dist/lib/router/router.d.ts +0 -540
- package/dist/lib/router/utils.d.ts +0 -505
- package/dist/lib/server-runtime/build.d.ts +0 -38
- package/dist/lib/server-runtime/cookies.d.ts +0 -62
- package/dist/lib/server-runtime/crypto.d.ts +0 -2
- package/dist/lib/server-runtime/data.d.ts +0 -28
- package/dist/lib/server-runtime/dev.d.ts +0 -8
- package/dist/lib/server-runtime/entry.d.ts +0 -3
- package/dist/lib/server-runtime/errors.d.ts +0 -51
- package/dist/lib/server-runtime/headers.d.ts +0 -3
- package/dist/lib/server-runtime/invariant.d.ts +0 -2
- package/dist/lib/server-runtime/jsonify.d.ts +0 -33
- package/dist/lib/server-runtime/markup.d.ts +0 -1
- package/dist/lib/server-runtime/mode.d.ts +0 -9
- package/dist/lib/server-runtime/responses.d.ts +0 -37
- package/dist/lib/server-runtime/routeMatching.d.ts +0 -8
- package/dist/lib/server-runtime/routeModules.d.ts +0 -212
- package/dist/lib/server-runtime/routes.d.ts +0 -31
- package/dist/lib/server-runtime/server.d.ts +0 -5
- package/dist/lib/server-runtime/serverHandoff.d.ts +0 -11
- package/dist/lib/server-runtime/sessions/cookieStorage.d.ts +0 -19
- package/dist/lib/server-runtime/sessions/memoryStorage.d.ts +0 -17
- package/dist/lib/server-runtime/sessions.d.ts +0 -140
- package/dist/lib/server-runtime/single-fetch.d.ts +0 -30
- package/dist/lib/server-runtime/typecheck.d.ts +0 -4
- package/dist/lib/server-runtime/warnings.d.ts +0 -1
- package/dist/lib/types.d.ts +0 -71
- package/dist/lib/types.mjs +0 -10
- package/dist/main-dom-export.js +0 -19
- package/dist/react-router-dom.development.js +0 -199
- package/dist/react-router-dom.development.js.map +0 -1
- package/dist/react-router-dom.production.min.js +0 -12
- package/dist/react-router-dom.production.min.js.map +0 -1
- package/dist/umd/react-router-dom.development.js +0 -241
- package/dist/umd/react-router-dom.development.js.map +0 -1
- package/dist/umd/react-router-dom.production.min.js +0 -12
- package/dist/umd/react-router-dom.production.min.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# React Router
|
|
2
2
|
|
|
3
|
-
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all
|
|
3
|
+
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all
|
|
4
|
+
the core functionality for both
|
|
5
|
+
[`react-router-dom`](https://github.com/remix-run/react-router/tree/main/packages/react-router-dom)
|
|
6
|
+
and
|
|
7
|
+
[`react-router-native`](https://github.com/remix-run/react-router/tree/main/packages/react-router-native).
|
|
8
|
+
|
|
9
|
+
If you're using React Router, you should never `import` anything directly from
|
|
10
|
+
the `react-router` package, but you should have everything you need in either
|
|
11
|
+
`react-router-dom` or `react-router-native`. Both of those packages re-export
|
|
12
|
+
everything from `react-router`.
|
|
4
13
|
|
|
5
14
|
If you'd like to extend React Router and you know what you're doing, you should
|
|
6
15
|
add `react-router` **as a peer dependency, not a regular dependency** in your
|
package/dist/index.d.ts
CHANGED
|
@@ -1,74 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export type {
|
|
13
|
-
export {
|
|
14
|
-
export type
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
export { createMemorySessionStorage } from "./lib/server-runtime/sessions/memoryStorage";
|
|
31
|
-
export { setDevServerHooks as unstable_setDevServerHooks } from "./lib/server-runtime/dev";
|
|
32
|
-
export type { IsCookieFunction } from "./lib/server-runtime/cookies";
|
|
33
|
-
export type { CreateRequestHandlerFunction } from "./lib/server-runtime/server";
|
|
34
|
-
export type { IsSessionFunction } from "./lib/server-runtime/sessions";
|
|
35
|
-
export type { HandleDataRequestFunction, HandleDocumentRequestFunction, HandleErrorFunction, ServerBuild, ServerEntryModule, } from "./lib/server-runtime/build";
|
|
36
|
-
export type { Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, } from "./lib/server-runtime/cookies";
|
|
37
|
-
export type { AppLoadContext } from "./lib/server-runtime/data";
|
|
38
|
-
export type { PageLinkDescriptor, HtmlLinkDescriptor, LinkDescriptor, } from "./lib/router/links";
|
|
39
|
-
export type { TypedResponse } from "./lib/server-runtime/responses";
|
|
40
|
-
export type { DataFunctionArgs, HeadersArgs, HeadersFunction, } from "./lib/server-runtime/routeModules";
|
|
41
|
-
export type { RequestHandler } from "./lib/server-runtime/server";
|
|
42
|
-
export type { Session, SessionData, SessionIdStorageStrategy, SessionStorage, FlashSessionData, } from "./lib/server-runtime/sessions";
|
|
43
|
-
/** @internal */
|
|
44
|
-
export { createBrowserHistory as UNSAFE_createBrowserHistory, invariant as UNSAFE_invariant, } from "./lib/router/history";
|
|
45
|
-
/** @internal */
|
|
46
|
-
export { createRouter as UNSAFE_createRouter } from "./lib/router/router";
|
|
47
|
-
/** @internal */
|
|
48
|
-
export { ErrorResponseImpl as UNSAFE_ErrorResponseImpl } from "./lib/router/utils";
|
|
49
|
-
/** @internal */
|
|
50
|
-
export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, FetchersContext as UNSAFE_FetchersContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, } from "./lib/context";
|
|
51
|
-
/** @internal */
|
|
52
|
-
export { mapRouteProperties as UNSAFE_mapRouteProperties } from "./lib/components";
|
|
53
|
-
/** @internal */
|
|
54
|
-
export { FrameworkContext as UNSAFE_FrameworkContext } from "./lib/dom/ssr/components";
|
|
55
|
-
/** @internal */
|
|
56
|
-
export type { AssetsManifest as UNSAFE_AssetsManifest } from "./lib/dom/ssr/entry";
|
|
57
|
-
/** @internal */
|
|
58
|
-
export { deserializeErrors as UNSAFE_deserializeErrors } from "./lib/dom/ssr/errors";
|
|
59
|
-
/** @internal */
|
|
60
|
-
export { RemixErrorBoundary as UNSAFE_RemixErrorBoundary } from "./lib/dom/ssr/errorBoundaries";
|
|
61
|
-
/** @internal */
|
|
62
|
-
export { getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, } from "./lib/dom/ssr/fog-of-war";
|
|
63
|
-
/** @internal */
|
|
64
|
-
export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules";
|
|
65
|
-
/** @internal */
|
|
66
|
-
export { createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, } from "./lib/dom/ssr/routes";
|
|
67
|
-
/** @internal */
|
|
68
|
-
export { getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy } from "./lib/dom/ssr/single-fetch";
|
|
69
|
-
/** @internal */
|
|
70
|
-
export { decodeViaTurboStream as UNSAFE_decodeViaTurboStream, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, } from "./lib/dom/ssr/single-fetch";
|
|
71
|
-
/** @internal */
|
|
72
|
-
export { ServerMode as UNSAFE_ServerMode } from "./lib/server-runtime/mode";
|
|
73
|
-
/** @internal */
|
|
74
|
-
export { useScrollRestoration as UNSAFE_useScrollRestoration } from "./lib/dom/lib";
|
|
1
|
+
import type { ActionFunction, ActionFunctionArgs, AgnosticPatchRoutesOnNavigationFunction, AgnosticPatchRoutesOnNavigationFunctionArgs, Blocker, BlockerFunction, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch } from "@remix-run/router";
|
|
2
|
+
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from "@remix-run/router";
|
|
3
|
+
import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
|
|
4
|
+
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components";
|
|
5
|
+
import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context";
|
|
6
|
+
import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context";
|
|
7
|
+
import type { NavigateFunction } from "./lib/hooks";
|
|
8
|
+
import { useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteId, useRouteLoaderData, useRoutes, useRoutesImpl } from "./lib/hooks";
|
|
9
|
+
type Hash = string;
|
|
10
|
+
type Pathname = string;
|
|
11
|
+
type Search = string;
|
|
12
|
+
export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, Blocker, BlockerFunction, };
|
|
13
|
+
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
|
|
14
|
+
export type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
|
|
15
|
+
export type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
|
|
16
|
+
declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
|
|
17
|
+
hasErrorBoundary: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare function createMemoryRouter(routes: RouteObject[], opts?: {
|
|
20
|
+
basename?: string;
|
|
21
|
+
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
|
|
22
|
+
hydrationData?: HydrationState;
|
|
23
|
+
initialEntries?: InitialEntry[];
|
|
24
|
+
initialIndex?: number;
|
|
25
|
+
dataStrategy?: DataStrategyFunction;
|
|
26
|
+
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
|
|
27
|
+
}): RemixRouter;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, };
|