react-router
Advanced tools
Comparing version 0.0.0-experimental-c0856287f to 0.0.0-experimental-c5cae38f3
# `react-router` | ||
## 6.23.1 | ||
### Patch Changes | ||
- allow undefined to be resolved with `<Await>` ([#11513](https://github.com/remix-run/react-router/pull/11513)) | ||
- Updated dependencies: | ||
- `@remix-run/router@1.16.1` | ||
## 6.23.0 | ||
@@ -4,0 +12,0 @@ |
@@ -1,5 +0,5 @@ | ||
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"; | ||
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath, UNSAFE_ErrorResponseImpl } from "./lib/router"; | ||
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, unstable_AgnosticPatchRoutesOnMissFunction } from "@remix-run/router"; | ||
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from "@remix-run/router"; | ||
import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components"; | ||
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches, createMemoryRouter, mapRouteProperties } from "./lib/components"; | ||
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components"; | ||
import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context"; | ||
@@ -9,6 +9,2 @@ import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context"; | ||
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"; | ||
declare global { | ||
const __DEV__: boolean; | ||
} | ||
export {}; | ||
type Hash = string; | ||
@@ -18,32 +14,18 @@ type Pathname = string; | ||
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, }; | ||
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, }; | ||
export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, StaticHandler, TrackedPromise, UNSAFE_DeferredData, } from "./lib/router"; | ||
export { getStaticContextFromError, stripBasename, UNSAFE_DEFERRED_SYMBOL, UNSAFE_convertRoutesToDataRoutes, } from "./lib/router"; | ||
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, StaticHandlerContext, V7_FormMethod, } from "./lib/router"; | ||
export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, } from "./lib/dom/lib"; | ||
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"; | ||
export type { ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, } from "./lib/dom/dom"; | ||
export { createSearchParams } from "./lib/dom/dom"; | ||
export type { StaticRouterProps, StaticRouterProviderProps, } from "./lib/dom/server"; | ||
export { createStaticHandler, createStaticRouter, StaticRouter, StaticRouterProvider, } from "./lib/dom/server"; | ||
export { HydratedRouter } from "./lib/dom/ssr/browser"; | ||
export { Meta, Links, Scripts, PrefetchPageLinks, } from "./lib/dom/ssr/components"; | ||
export type { HtmlLinkDescriptor } from "./lib/dom/ssr/links"; | ||
export type { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, MetaArgs, MetaDescriptor, MetaFunction, } from "./lib/dom/ssr/routeModules"; | ||
export type { RemixServerProps } from "./lib/dom/ssr/server"; | ||
export { RemixServer } from "./lib/dom/ssr/server"; | ||
export type { RemixStubProps } from "./lib/dom/ssr/create-remix-stub"; | ||
export { createRemixStub } from "./lib/dom/ssr/create-remix-stub"; | ||
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, }; | ||
declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & { | ||
hasErrorBoundary: boolean; | ||
}; | ||
export interface unstable_PatchRoutesOnMissFunction extends unstable_AgnosticPatchRoutesOnMissFunction<RouteMatch> { | ||
} | ||
export declare function createMemoryRouter(routes: RouteObject[], opts?: { | ||
basename?: string; | ||
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>; | ||
hydrationData?: HydrationState; | ||
initialEntries?: InitialEntry[]; | ||
initialIndex?: number; | ||
unstable_dataStrategy?: unstable_DataStrategyFunction; | ||
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction; | ||
}): RemixRouter; | ||
/** @internal */ | ||
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, }; | ||
/** @internal */ | ||
export { RemixContext as UNSAFE_RemixContext } from "./lib/dom/ssr/components"; | ||
/** @internal */ | ||
export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules"; | ||
/** @internal */ | ||
export type { FutureConfig as UNSAFE_FutureConfig, AssetsManifest as UNSAFE_AssetsManifest, RemixContextObject as UNSAFE_RemixContextObject, } from "./lib/dom/ssr/entry"; | ||
/** @internal */ | ||
export type { EntryRoute as UNSAFE_EntryRoute, RouteManifest as UNSAFE_RouteManifest, } from "./lib/dom/ssr/routes"; | ||
/** @internal */ | ||
export type { SingleFetchRedirectResult as UNSAFE_SingleFetchRedirectResult, SingleFetchResult as UNSAFE_SingleFetchResult, SingleFetchResults as UNSAFE_SingleFetchResults, } from "./lib/dom/ssr/single-fetch"; | ||
export { decodeViaTurboStream as UNSAFE_decodeViaTurboStream, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, } from "./lib/dom/ssr/single-fetch"; | ||
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, }; |
@@ -1,3 +0,3 @@ | ||
import type { FutureConfig as RouterFutureConfig, HydrationState, InitialEntry, LazyRouteFunction, Location, RelativeRoutingType, Router as RemixRouter, To, TrackedPromise, unstable_DataStrategyFunction } from "./router"; | ||
import { Action as NavigationType } from "./router"; | ||
import type { InitialEntry, LazyRouteFunction, Location, RelativeRoutingType, Router as RemixRouter, To, TrackedPromise } from "@remix-run/router"; | ||
import { Action as NavigationType } from "@remix-run/router"; | ||
import * as React from "react"; | ||
@@ -9,13 +9,2 @@ import type { IndexRouteObject, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./context"; | ||
} | ||
export declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & { | ||
hasErrorBoundary: boolean; | ||
}; | ||
export declare function createMemoryRouter(routes: RouteObject[], opts?: { | ||
basename?: string; | ||
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>; | ||
hydrationData?: HydrationState; | ||
initialEntries?: InitialEntry[]; | ||
initialIndex?: number; | ||
unstable_dataStrategy?: unstable_DataStrategyFunction; | ||
}): RemixRouter; | ||
export interface RouterProviderProps { | ||
@@ -22,0 +11,0 @@ fallbackElement?: React.ReactNode; |
import * as React from "react"; | ||
import type { AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, History, LazyRouteFunction, Location, Action as NavigationType, RelativeRoutingType, Router, StaticHandlerContext, To, TrackedPromise } from "./router"; | ||
import type { AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, History, LazyRouteFunction, Location, Action as NavigationType, RelativeRoutingType, Router, StaticHandlerContext, To, TrackedPromise } from "@remix-run/router"; | ||
export interface IndexRouteObject { | ||
@@ -55,3 +55,3 @@ caseSensitive?: AgnosticIndexRouteObject["caseSensitive"]; | ||
export declare const DataRouterContext: React.Context<DataRouterContextObject | null>; | ||
export declare const DataRouterStateContext: React.Context<import("./router").RouterState | null>; | ||
export declare const DataRouterStateContext: React.Context<import("@remix-run/router").RouterState | null>; | ||
export declare const AwaitContext: React.Context<TrackedPromise | null>; | ||
@@ -58,0 +58,0 @@ export interface NavigateOptions { |
import * as React from "react"; | ||
import type { Blocker, BlockerFunction, Location, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, Router as RemixRouter, RevalidationState, To, UIMatch } from "./router"; | ||
import { Action as NavigationType } from "./router"; | ||
import type { Blocker, BlockerFunction, Location, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, Router as RemixRouter, RevalidationState, To, UIMatch } from "@remix-run/router"; | ||
import { Action as NavigationType } from "@remix-run/router"; | ||
import type { NavigateOptions, RouteContextObject, RouteMatch, RouteObject } from "./context"; | ||
@@ -134,3 +134,3 @@ /** | ||
*/ | ||
export declare function useNavigation(): import("./router").Navigation; | ||
export declare function useNavigation(): import("@remix-run/router").Navigation; | ||
/** | ||
@@ -137,0 +137,0 @@ * Returns a revalidate function for manually triggering revalidation, as well |
/** | ||
* React Router v0.0.0-experimental-c0856287f | ||
* React Router v0.0.0-experimental-c5cae38f3 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
{ | ||
"name": "react-router", | ||
"version": "0.0.0-experimental-c0856287f", | ||
"version": "0.0.0-experimental-c5cae38f3", | ||
"description": "Declarative routing for React", | ||
@@ -26,17 +26,11 @@ "keywords": [ | ||
"dependencies": { | ||
"turbo-stream": "^2.0.0" | ||
"@remix-run/router": "0.0.0-experimental-c5cae38f3" | ||
}, | ||
"devDependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
"react-router-dom": "0.0.0-experimental-c5cae38f3" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.8", | ||
"react-dom": ">=16.8" | ||
"react": ">=16.8" | ||
}, | ||
"peerDependenciesMeta": { | ||
"react-dom": { | ||
"optional": true | ||
} | ||
}, | ||
"files": [ | ||
@@ -43,0 +37,0 @@ "dist/", |
# React Router | ||
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all the core functionality. | ||
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all | ||
the core functionality for both | ||
[`react-router-dom`](https://github.com/remix-run/react-router/tree/main/packages/react-router-dom) | ||
and | ||
[`react-router-native`](https://github.com/remix-run/react-router/tree/main/packages/react-router-native). | ||
If you're using React Router, you should never `import` anything directly from | ||
the `react-router` package, but you should have everything you need in either | ||
`react-router-dom` or `react-router-native`. Both of those packages re-export | ||
everything from `react-router`. | ||
If you'd like to extend React Router and you know what you're doing, you should | ||
add `react-router` **as a peer dependency, not a regular dependency** in your | ||
package. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
2
17
41
1
813012
19
4907
+ Added@remix-run/router@0.0.0-experimental-c5cae38f3(transitive)
- Removedturbo-stream@^2.0.0
- Removedreact-dom@18.3.1(transitive)
- Removedscheduler@0.23.2(transitive)
- Removedturbo-stream@2.4.1(transitive)