react-router 0.0.0-experimental-13d6d438f → 0.0.0-experimental-52e9b8eb3

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +10 -1
  3. package/dist/index.d.ts +16 -33
  4. package/dist/index.js +1113 -9433
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/components.d.ts +19 -189
  7. package/dist/lib/context.d.ts +4 -4
  8. package/dist/lib/hooks.d.ts +17 -46
  9. package/dist/main.js +1 -1
  10. package/dist/react-router.development.js +1151 -10304
  11. package/dist/react-router.development.js.map +1 -1
  12. package/dist/react-router.production.min.js +2 -2
  13. package/dist/react-router.production.min.js.map +1 -1
  14. package/dist/umd/react-router.development.js +1226 -10441
  15. package/dist/umd/react-router.development.js.map +1 -1
  16. package/dist/umd/react-router.production.min.js +2 -2
  17. package/dist/umd/react-router.production.min.js.map +1 -1
  18. package/package.json +4 -10
  19. package/dist/lib/dom/dom.d.ts +0 -104
  20. package/dist/lib/dom/global.d.ts +0 -36
  21. package/dist/lib/dom/lib.d.ts +0 -572
  22. package/dist/lib/dom/server.d.ts +0 -32
  23. package/dist/lib/dom/ssr/browser.d.ts +0 -3
  24. package/dist/lib/dom/ssr/components.d.ts +0 -94
  25. package/dist/lib/dom/ssr/create-remix-stub.d.ts +0 -56
  26. package/dist/lib/dom/ssr/data.d.ts +0 -7
  27. package/dist/lib/dom/ssr/errorBoundaries.d.ts +0 -33
  28. package/dist/lib/dom/ssr/errors.d.ts +0 -2
  29. package/dist/lib/dom/ssr/fallback.d.ts +0 -2
  30. package/dist/lib/dom/ssr/invariant.d.ts +0 -2
  31. package/dist/lib/dom/ssr/links.d.ts +0 -126
  32. package/dist/lib/dom/ssr/markup.d.ts +0 -5
  33. package/dist/lib/dom/ssr/routeModules.d.ts +0 -141
  34. package/dist/lib/dom/ssr/routes.d.ts +0 -32
  35. package/dist/lib/dom/ssr/server.d.ts +0 -13
  36. package/dist/lib/dom/ssr/single-fetch.d.ts +0 -36
  37. package/dist/lib/router/history.d.ts +0 -249
  38. package/dist/lib/router/index.d.ts +0 -9
  39. package/dist/lib/router/router.d.ts +0 -521
  40. package/dist/lib/router/utils.d.ts +0 -520
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # `react-router`
2
2
 
3
+ ## 6.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - allow undefined to be resolved with `<Await>` ([#11513](https://github.com/remix-run/react-router/pull/11513))
8
+ - Updated dependencies:
9
+ - `@remix-run/router@1.16.1`
10
+
3
11
  ## 6.23.0
4
12
 
5
13
  ### Minor Changes
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 the core functionality.
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,7 +1,7 @@
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";
1
+ import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, 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, unstable_HandlerResult } from "@remix-run/router";
2
+ import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from "@remix-run/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, createMemoryRouter, mapRouteProperties } from "./lib/components";
4
+ import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } 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";
@@ -10,34 +10,17 @@ type Hash = string;
10
10
  type Pathname = string;
11
11
  type Search = string;
12
12
  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, 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, };
14
- export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, StaticHandler, TrackedPromise, UNSAFE_DeferredData, } from "./lib/router";
15
- export { getStaticContextFromError, stripBasename, UNSAFE_DEFERRED_SYMBOL, UNSAFE_convertRoutesToDataRoutes, } from "./lib/router";
16
- export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, StaticHandlerContext, V7_FormMethod, } from "./lib/router";
17
- export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, NavLinkRenderProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, } from "./lib/dom/lib";
18
- 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";
19
- export type { ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, } from "./lib/dom/dom";
20
- export { createSearchParams } from "./lib/dom/dom";
21
- export type { StaticRouterProps, StaticRouterProviderProps, } from "./lib/dom/server";
22
- export { createStaticHandler, createStaticRouter, StaticRouter, StaticRouterProvider, } from "./lib/dom/server";
23
- export { HydratedRouter } from "./lib/dom/ssr/browser";
24
- export { Meta, Links, Scripts, PrefetchPageLinks, } from "./lib/dom/ssr/components";
25
- export type { HtmlLinkDescriptor, LinkDescriptor, PrefetchPageDescriptor, } from "./lib/dom/ssr/links";
26
- export type { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, MetaArgs, MetaDescriptor, MetaFunction, LinksFunction, } from "./lib/dom/ssr/routeModules";
27
- export type { RemixServerProps } from "./lib/dom/ssr/server";
28
- export { RemixServer } from "./lib/dom/ssr/server";
29
- export type { RemixStubProps } from "./lib/dom/ssr/create-remix-stub";
30
- export { createRemixStub } from "./lib/dom/ssr/create-remix-stub";
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
+ declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
15
+ hasErrorBoundary: boolean;
16
+ };
17
+ export declare function createMemoryRouter(routes: RouteObject[], opts?: {
18
+ basename?: string;
19
+ future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
20
+ hydrationData?: HydrationState;
21
+ initialEntries?: InitialEntry[];
22
+ initialIndex?: number;
23
+ unstable_dataStrategy?: unstable_DataStrategyFunction;
24
+ }): RemixRouter;
31
25
  /** @internal */
32
- 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, };
33
- /** @internal */
34
- export { RemixContext as UNSAFE_RemixContext } from "./lib/dom/ssr/components";
35
- /** @internal */
36
- export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules";
37
- /** @internal */
38
- export type { FutureConfig as UNSAFE_FutureConfig, AssetsManifest as UNSAFE_AssetsManifest, RemixContextObject as UNSAFE_RemixContextObject, } from "./lib/dom/ssr/entry";
39
- /** @internal */
40
- export type { EntryRoute as UNSAFE_EntryRoute, RouteManifest as UNSAFE_RouteManifest, } from "./lib/dom/ssr/routes";
41
- /** @internal */
42
- export type { SingleFetchRedirectResult as UNSAFE_SingleFetchRedirectResult, SingleFetchResult as UNSAFE_SingleFetchResult, SingleFetchResults as UNSAFE_SingleFetchResults, } from "./lib/dom/ssr/single-fetch";
43
- export { decodeViaTurboStream as UNSAFE_decodeViaTurboStream, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, } from "./lib/dom/ssr/single-fetch";
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, };