react-router 0.0.0-experimental-c7dd3d3a → 0.0.0-experimental-e53172d16
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 +13 -0
- package/README.md +1 -10
- package/dist/index.d.ts +37 -16
- package/dist/index.js +9809 -1087
- package/dist/index.js.map +1 -1
- package/dist/lib/components.d.ts +13 -2
- package/dist/lib/context.d.ts +2 -2
- package/dist/lib/dom/dom.d.ts +104 -0
- package/dist/lib/dom/global.d.ts +36 -0
- package/dist/lib/dom/lib.d.ts +304 -0
- package/dist/lib/dom/server.d.ts +32 -0
- package/dist/lib/dom/ssr/browser.d.ts +3 -0
- package/dist/lib/dom/ssr/components.d.ts +61 -0
- package/dist/lib/dom/ssr/create-remix-stub.d.ts +56 -0
- package/dist/lib/dom/ssr/data.d.ts +16 -0
- package/dist/lib/dom/ssr/errorBoundaries.d.ts +33 -0
- package/dist/lib/dom/ssr/errors.d.ts +2 -0
- package/dist/lib/dom/ssr/fallback.d.ts +2 -0
- package/dist/lib/dom/ssr/invariant.d.ts +2 -0
- package/dist/lib/dom/ssr/links.d.ts +127 -0
- package/dist/lib/dom/ssr/markup.d.ts +5 -0
- package/dist/lib/dom/ssr/routeModules.d.ts +141 -0
- package/dist/lib/dom/ssr/routes.d.ts +32 -0
- package/dist/lib/dom/ssr/server.d.ts +13 -0
- package/dist/lib/dom/ssr/single-fetch.d.ts +36 -0
- package/dist/lib/hooks.d.ts +3 -3
- package/dist/lib/router/history.d.ts +250 -0
- package/dist/lib/router/index.d.ts +9 -0
- package/dist/lib/router/router.d.ts +512 -0
- package/dist/lib/router/utils.d.ts +520 -0
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +10495 -1126
- 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 +10876 -1287
- 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 +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 6.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
|
|
8
|
+
- This option allows Data Router applications to take control over the approach for executing route loaders and actions
|
|
9
|
+
- The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies:
|
|
14
|
+
- `@remix-run/router@1.16.0`
|
|
15
|
+
|
|
3
16
|
## 6.22.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
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
|
|
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`.
|
|
3
|
+
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all the core functionality.
|
|
13
4
|
|
|
14
5
|
If you'd like to extend React Router and you know what you're doing, you should
|
|
15
6
|
add `react-router` **as a peer dependency, not a regular dependency** in your
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,47 @@
|
|
|
1
|
-
import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher,
|
|
2
|
-
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from "
|
|
1
|
+
import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult } from "./lib/router";
|
|
2
|
+
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath, UNSAFE_ErrorResponseImpl } from "./lib/router";
|
|
3
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";
|
|
4
|
+
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches, createMemoryRouter, mapRouteProperties } from "./lib/components";
|
|
5
5
|
import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context";
|
|
6
6
|
import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context";
|
|
7
7
|
import type { NavigateFunction } from "./lib/hooks";
|
|
8
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
|
+
declare global {
|
|
10
|
+
const __DEV__: boolean;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
9
13
|
type Hash = string;
|
|
10
14
|
type Pathname = string;
|
|
11
15
|
type Search = string;
|
|
12
16
|
export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, 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, unstable_HandlerResult, };
|
|
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, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
17
|
+
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
|
|
18
|
+
export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, StaticHandler, TrackedPromise, UNSAFE_DeferredData, } from "./lib/router";
|
|
19
|
+
export { getStaticContextFromError, stripBasename, UNSAFE_DEFERRED_SYMBOL, UNSAFE_convertRoutesToDataRoutes, } from "./lib/router";
|
|
20
|
+
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, StaticHandlerContext, V7_FormMethod, } from "./lib/router";
|
|
21
|
+
export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, } from "./lib/dom/lib";
|
|
22
|
+
export { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, UNSAFE_ViewTransitionContext, UNSAFE_FetchersContext, unstable_HistoryRouter, NavLink, Form, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, UNSAFE_useScrollRestoration, useBeforeUnload, unstable_usePrompt, unstable_useViewTransitionState, } from "./lib/dom/lib";
|
|
23
|
+
export type { ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, } from "./lib/dom/dom";
|
|
24
|
+
export { createSearchParams } from "./lib/dom/dom";
|
|
25
|
+
export type { StaticRouterProps, StaticRouterProviderProps, } from "./lib/dom/server";
|
|
26
|
+
export { createStaticHandler, createStaticRouter, StaticRouter, StaticRouterProvider, } from "./lib/dom/server";
|
|
27
|
+
export { HydratedRouter } from "./lib/dom/ssr/browser";
|
|
28
|
+
export { Meta, Links, Scripts, PrefetchPageLinks, } from "./lib/dom/ssr/components";
|
|
29
|
+
export type { HtmlLinkDescriptor } from "./lib/dom/ssr/links";
|
|
30
|
+
export type { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, MetaArgs, MetaDescriptor, MetaFunction, } from "./lib/dom/ssr/routeModules";
|
|
31
|
+
export type { RemixServerProps } from "./lib/dom/ssr/server";
|
|
32
|
+
export { RemixServer } from "./lib/dom/ssr/server";
|
|
33
|
+
export type { RemixStubProps } from "./lib/dom/ssr/create-remix-stub";
|
|
34
|
+
export { createRemixStub } from "./lib/dom/ssr/create-remix-stub";
|
|
25
35
|
/** @internal */
|
|
26
|
-
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, };
|
|
36
|
+
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, UNSAFE_ErrorResponseImpl, };
|
|
37
|
+
/** @internal */
|
|
38
|
+
export { RemixContext as UNSAFE_RemixContext } from "./lib/dom/ssr/components";
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules";
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type { FutureConfig as UNSAFE_FutureConfig, AssetsManifest as UNSAFE_AssetsManifest, RemixContextObject as UNSAFE_RemixContextObject, } from "./lib/dom/ssr/entry";
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type { EntryRoute as UNSAFE_EntryRoute, RouteManifest as UNSAFE_RouteManifest, } from "./lib/dom/ssr/routes";
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type { SingleFetchRedirectResult as UNSAFE_SingleFetchRedirectResult, SingleFetchResult as UNSAFE_SingleFetchResult, SingleFetchResults as UNSAFE_SingleFetchResults, } from "./lib/dom/ssr/single-fetch";
|
|
47
|
+
export { decodeViaTurboStream as UNSAFE_decodeViaTurboStream, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, } from "./lib/dom/ssr/single-fetch";
|