react-router 7.8.0-pre.0 → 7.8.0-pre.2
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 +12 -0
- package/dist/development/{chunk-HSC5IU24.mjs → chunk-3D24XHV2.mjs} +19 -4
- package/dist/development/{chunk-IW6UADHO.js → chunk-74TFO7SN.js} +65 -32
- package/dist/{production/chunk-BCLZG6QW.js → development/chunk-HQ37R3FK.js} +130 -130
- package/dist/development/{chunk-SC4OUYO4.mjs → chunk-WSV33ENW.mjs} +45 -12
- package/dist/development/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
- package/dist/{production/context-DZWGFcKX.d.mts → development/context-DohQKLID.d.mts} +6 -7
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-DSU6bZil.d.ts → development/index-react-server-client-CMphySRb.d.ts} +19 -2
- package/dist/{production/index-react-server-client-BUK-oRcG.d.mts → development/index-react-server-client-DXb0OgpJ.d.mts} +21 -4
- package/dist/development/index-react-server-client.d.mts +4 -4
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +6 -7
- package/dist/development/index-react-server.d.ts +6 -7
- package/dist/development/index-react-server.js +82 -35
- package/dist/development/index-react-server.mjs +82 -35
- package/dist/development/index.d.mts +8 -8
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +117 -102
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
- package/dist/development/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
- package/dist/production/{chunk-YC2ENCM3.js → chunk-DDK3XFL6.js} +65 -32
- package/dist/{development/chunk-Z4NNCWGU.js → production/chunk-GSF7DANI.js} +130 -130
- package/dist/production/{chunk-X2NPJMV2.mjs → chunk-IEIDJVF4.mjs} +45 -12
- package/dist/production/{chunk-KQ5567DT.mjs → chunk-Q6IGLNPQ.mjs} +19 -4
- package/dist/production/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
- package/dist/{development/context-DZWGFcKX.d.mts → production/context-DohQKLID.d.mts} +6 -7
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-DSU6bZil.d.ts → production/index-react-server-client-CMphySRb.d.ts} +19 -2
- package/dist/{development/index-react-server-client-BUK-oRcG.d.mts → production/index-react-server-client-DXb0OgpJ.d.mts} +21 -4
- package/dist/production/index-react-server-client.d.mts +4 -4
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +6 -7
- package/dist/production/index-react-server.d.ts +6 -7
- package/dist/production/index-react-server.js +82 -35
- package/dist/production/index-react-server.mjs +82 -35
- package/dist/production/index.d.mts +8 -8
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +117 -102
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
- package/dist/production/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.8.0-pre.
|
|
2
|
+
* react-router v7.8.0-pre.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
isSession,
|
|
32
32
|
routeRSCServerRequest,
|
|
33
33
|
setDevServerHooks
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Q6IGLNPQ.mjs";
|
|
35
35
|
import {
|
|
36
36
|
Action,
|
|
37
37
|
Await,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
withComponentProps,
|
|
141
141
|
withErrorBoundaryProps,
|
|
142
142
|
withHydrateFallbackProps
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-IEIDJVF4.mjs";
|
|
144
144
|
export {
|
|
145
145
|
Await,
|
|
146
146
|
BrowserRouter,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteModule, L as LinkDescriptor, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, C as ClientDataFunctionArgs, a as ServerDataFrom, N as Normalize, b as GetActionData } from '../../route-data-
|
|
2
|
-
import { c as Location, u as unstable_MiddlewareNextFunction } from '../../context-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, C as ClientDataFunctionArgs, a as ServerDataFrom, N as Normalize, b as GetActionData } from '../../route-data-CpB5xtMm.mjs';
|
|
2
|
+
import { c as Location, u as unstable_MiddlewareNextFunction } from '../../context-DohQKLID.mjs';
|
|
3
3
|
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule, L as LinkDescriptor, a as Location, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, a as Location, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-qBivMBjd.js';
|
|
2
2
|
import { R as RouteFiles, P as Pages } from '../../register-DiOIlEq5.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactElement } from 'react';
|
|
2
|
-
import { i as ActionFunctionArgs, j as LoaderFunctionArgs, k as ActionFunction, l as LoaderFunction, h as Params, c as Location, m as DataRouteMatch, n as unstable_MiddlewareFunction, S as ShouldRevalidateFunction, o as unstable_RouterContextProvider, p as DataWithResponseInit, M as MiddlewareEnabled } from './context-
|
|
2
|
+
import { i as ActionFunctionArgs, j as LoaderFunctionArgs, k as ActionFunction, l as LoaderFunction, h as Params, c as Location, m as DataRouteMatch, n as unstable_MiddlewareFunction, S as ShouldRevalidateFunction, o as unstable_RouterContextProvider, p as DataWithResponseInit, M as MiddlewareEnabled } from './context-DohQKLID.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* An object of unknown type for route loaders and actions provided by the
|
|
@@ -281,12 +281,10 @@ interface unstable_RouterContext<T = unknown> {
|
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* Creates a type-safe {@link unstable_RouterContext} object that can be used to
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* <docs-warning>Enable this API with the `future.unstable_middleware` flag.</docs-warning>
|
|
284
|
+
* store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
|
|
285
|
+
* [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
|
|
286
|
+
* Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
|
|
287
|
+
* but specifically designed for React Router's request/response lifecycle.
|
|
290
288
|
*
|
|
291
289
|
* If a `defaultValue` is provided, it will be returned from `context.get()`
|
|
292
290
|
* when no value has been set for the context. Otherwise, reading this context
|
|
@@ -353,6 +351,7 @@ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterCon
|
|
|
353
351
|
* const userContext = unstable_createContext<User | null>(null);
|
|
354
352
|
* const contextProvider = new unstable_RouterContextProvider();
|
|
355
353
|
* contextProvider.set(userContext, getUser());
|
|
354
|
+
* // ^ Type-safe
|
|
356
355
|
* const user = contextProvider.get(userContext);
|
|
357
356
|
* // ^ User
|
|
358
357
|
*
|
|
@@ -423,7 +422,7 @@ interface DataFunctionArgs<Context> {
|
|
|
423
422
|
* middlewares from the bottom-up
|
|
424
423
|
*/
|
|
425
424
|
interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
426
|
-
():
|
|
425
|
+
(): Promise<Result>;
|
|
427
426
|
}
|
|
428
427
|
/**
|
|
429
428
|
* Route middleware function signature. Receives the same "data" arguments as a
|