react-router
Advanced tools
Comparing version 7.0.1 to 7.0.2-pre.0
# `react-router` | ||
## 7.0.2-pre.0 | ||
### Patch Changes | ||
- temporarily only use one build in export map so packages can have a peer dependency on react router ([#12437](https://github.com/remix-run/react-router/pull/12437)) | ||
- Generate wide `matches` and `params` types for child routes ([#12397](https://github.com/remix-run/react-router/pull/12397)) | ||
At runtime, `matches` includes child route matches and `params` include child route path parameters. | ||
But previously, we only generated types for parent routes and the current route in `matches` and `params`. | ||
To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information. | ||
## 7.0.1 | ||
@@ -22,3 +33,3 @@ | ||
- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) | ||
- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) | ||
@@ -25,0 +36,0 @@ - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391)) |
import * as React from 'react'; | ||
import { R as RouterProviderProps$1 } from './fog-of-war-CbNQuoo8.js'; | ||
import { R as RouterProviderProps$1 } from './fog-of-war-DU_DzpDb.js'; | ||
import './route-data-DuV3tXo2.js'; | ||
@@ -4,0 +4,0 @@ |
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-DuV3tXo2.js'; | ||
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-DuV3tXo2.js'; | ||
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CbNQuoo8.js'; | ||
export { f as Await, b as AwaitProps, G as BrowserRouter, B as BrowserRouterProps, u as FetcherFormProps, y as FetcherSubmitFunction, a3 as FetcherSubmitOptions, z as FetcherWithComponents, U as Form, v as FormProps, J as HashRouter, H as HashRouterProps, p as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, K as Link, q as LinkProps, aa as Links, g as MemoryRouter, M as MemoryRouterProps, a9 as Meta, T as NavLink, s as NavLinkProps, t as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a4 as ParamKeyValuePair, P as PathRouteProps, ac 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, ab as Scripts, ad as ScriptsProps, V as ScrollRestoration, S as ScrollRestorationProps, w as SetURLSearchParams, x as SubmitFunction, a5 as SubmitOptions, a7 as SubmitTarget, af as UNSAFE_FrameworkContext, ai as UNSAFE_createClientRoutes, aj as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ag as UNSAFE_getPatchRoutesOnNavigationFunction, ae as UNSAFE_mapRouteProperties, ak as UNSAFE_shouldHydrateRouteLoader, ah as UNSAFE_useFogOFWarDiscovery, al as UNSAFE_useScrollRestoration, a6 as URLSearchParamsInit, C as createBrowserRouter, D as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, o as createRoutesFromElements, a8 as createSearchParams, r as renderMatches, Q as unstable_HistoryRouter, a1 as unstable_usePrompt, a0 as useBeforeUnload, _ as useFetcher, $ as useFetchers, Z as useFormAction, W as useLinkClickHandler, X as useSearchParams, Y as useSubmit, a2 as useViewTransitionState } from './fog-of-war-CbNQuoo8.js'; | ||
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DU_DzpDb.js'; | ||
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-DU_DzpDb.js'; | ||
import * as React from 'react'; | ||
@@ -6,0 +6,0 @@ import { ReactElement } from 'react'; |
@@ -37,3 +37,3 @@ import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-DuV3tXo2.js'; | ||
}>; | ||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : []; | ||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : MetaMatch<RouteInfo>[]; | ||
type CreateMetaArgs<T extends RouteInfo> = { | ||
@@ -96,3 +96,3 @@ location: Location; | ||
}>; | ||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : []; | ||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Match<RouteInfo>[]; | ||
type CreateComponentProps<T extends RouteInfo> = { | ||
@@ -99,0 +99,0 @@ params: T["params"]; |
/** | ||
* react-router v7.0.1 | ||
* react-router v7.0.2-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
import * as React from 'react'; | ||
import { R as RouterProviderProps$1 } from './fog-of-war-CbNQuoo8.js'; | ||
import { R as RouterProviderProps$1 } from './fog-of-war-DU_DzpDb.js'; | ||
import './route-data-DuV3tXo2.js'; | ||
@@ -4,0 +4,0 @@ |
import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-DuV3tXo2.js'; | ||
export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-DuV3tXo2.js'; | ||
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CbNQuoo8.js'; | ||
export { f as Await, b as AwaitProps, G as BrowserRouter, B as BrowserRouterProps, u as FetcherFormProps, y as FetcherSubmitFunction, a3 as FetcherSubmitOptions, z as FetcherWithComponents, U as Form, v as FormProps, J as HashRouter, H as HashRouterProps, p as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, K as Link, q as LinkProps, aa as Links, g as MemoryRouter, M as MemoryRouterProps, a9 as Meta, T as NavLink, s as NavLinkProps, t as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a4 as ParamKeyValuePair, P as PathRouteProps, ac 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, ab as Scripts, ad as ScriptsProps, V as ScrollRestoration, S as ScrollRestorationProps, w as SetURLSearchParams, x as SubmitFunction, a5 as SubmitOptions, a7 as SubmitTarget, af as UNSAFE_FrameworkContext, ai as UNSAFE_createClientRoutes, aj as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ag as UNSAFE_getPatchRoutesOnNavigationFunction, ae as UNSAFE_mapRouteProperties, ak as UNSAFE_shouldHydrateRouteLoader, ah as UNSAFE_useFogOFWarDiscovery, al as UNSAFE_useScrollRestoration, a6 as URLSearchParamsInit, C as createBrowserRouter, D as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, o as createRoutesFromElements, a8 as createSearchParams, r as renderMatches, Q as unstable_HistoryRouter, a1 as unstable_usePrompt, a0 as useBeforeUnload, _ as useFetcher, $ as useFetchers, Z as useFormAction, W as useLinkClickHandler, X as useSearchParams, Y as useSubmit, a2 as useViewTransitionState } from './fog-of-war-CbNQuoo8.js'; | ||
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DU_DzpDb.js'; | ||
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-DU_DzpDb.js'; | ||
import * as React from 'react'; | ||
@@ -6,0 +6,0 @@ import { ReactElement } from 'react'; |
@@ -37,3 +37,3 @@ import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-DuV3tXo2.js'; | ||
}>; | ||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : []; | ||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : MetaMatch<RouteInfo>[]; | ||
type CreateMetaArgs<T extends RouteInfo> = { | ||
@@ -96,3 +96,3 @@ location: Location; | ||
}>; | ||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : []; | ||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Match<RouteInfo>[]; | ||
type CreateComponentProps<T extends RouteInfo> = { | ||
@@ -99,0 +99,0 @@ params: T["params"]; |
/** | ||
* react-router v7.0.1 | ||
* react-router v7.0.2-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
{ | ||
"name": "react-router", | ||
"version": "7.0.1", | ||
"version": "7.0.2-pre.0", | ||
"description": "Declarative routing for React", | ||
@@ -21,25 +21,19 @@ "keywords": [ | ||
"sideEffects": false, | ||
"types": "./dist/production/index.d.ts", | ||
"main": "./dist/production/index.js", | ||
"module": "./dist/production/index.mjs", | ||
"types": "./dist/development/index.d.ts", | ||
"main": "./dist/development/index.js", | ||
"module": "./dist/development/index.mjs", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"types": "./dist/production/index.d.ts", | ||
"development": { | ||
"module-sync": "./dist/development/index.mjs", | ||
"default": "./dist/development/index.js" | ||
}, | ||
"module-sync": "./dist/production/index.mjs", | ||
"default": "./dist/production/index.js" | ||
"types": "./dist/development/index.d.ts", | ||
"module-sync": "./dist/development/index.mjs", | ||
"default": "./dist/development/index.js" | ||
}, | ||
"import": { | ||
"types": "./dist/production/index.d.mts", | ||
"development": "./dist/development/index.mjs", | ||
"default": "./dist/production/index.mjs" | ||
"types": "./dist/development/index.d.mts", | ||
"default": "./dist/development/index.mjs" | ||
}, | ||
"default": { | ||
"types": "./dist/production/index.d.ts", | ||
"development": "./dist/development/index.js", | ||
"default": "./dist/production/index.js" | ||
"types": "./dist/development/index.d.ts", | ||
"default": "./dist/development/index.js" | ||
} | ||
@@ -49,6 +43,6 @@ }, | ||
"import": { | ||
"types": "./dist/production/lib/types/route-module.d.mts" | ||
"types": "./dist/development/lib/types/route-module.d.mts" | ||
}, | ||
"default": { | ||
"types": "./dist/production/lib/types/route-module.d.ts" | ||
"types": "./dist/development/lib/types/route-module.d.ts" | ||
} | ||
@@ -58,19 +52,13 @@ }, | ||
"node": { | ||
"types": "./dist/production/dom-export.d.ts", | ||
"development": { | ||
"module-sync": "./dist/development/dom-export.mjs", | ||
"default": "./dist/development/dom-export.js" | ||
}, | ||
"module-sync": "./dist/production/dom-export.mjs", | ||
"default": "./dist/production/dom-export.js" | ||
"types": "./dist/development/dom-export.d.ts", | ||
"module-sync": "./dist/development/dom-export.mjs", | ||
"default": "./dist/development/dom-export.js" | ||
}, | ||
"import": { | ||
"types": "./dist/production/dom-export.d.mts", | ||
"development": "./dist/development/dom-export.mjs", | ||
"default": "./dist/production/dom-export.mjs" | ||
"types": "./dist/development/dom-export.d.mts", | ||
"default": "./dist/development/dom-export.mjs" | ||
}, | ||
"default": { | ||
"types": "./dist/production/dom-export.d.ts", | ||
"development": "./dist/development/dom-export.js", | ||
"default": "./dist/production/dom-export.js" | ||
"types": "./dist/development/dom-export.d.ts", | ||
"default": "./dist/development/dom-export.js" | ||
} | ||
@@ -77,0 +65,0 @@ }, |
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 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 not supported yet
Sorry, the diff of this file is not supported yet
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 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 not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
2270318
58288
2