react-router 7.8.2-pre.0 → 7.8.2-pre.1
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 +11 -0
- package/dist/{production/chunk-4HHN5NDL.mjs → development/chunk-7QFLQWWN.mjs} +2 -2
- package/dist/{production/chunk-3PSRBVDP.js → development/chunk-IVOVRAK2.js} +131 -131
- package/dist/development/{chunk-5LNVHL6T.mjs → chunk-ZVD2KUIM.mjs} +4 -5
- package/dist/development/{chunk-KUJAVZYD.js → chunk-ZVMYUFGA.js} +3 -4
- package/dist/development/{context-D5hQ2yCL.d.mts → context-jKip1TFB.d.mts} +3 -2
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-C4AMmMi3.d.ts → development/index-react-server-client-BKpa2trA.d.ts} +1 -1
- package/dist/{production/index-react-server-client-DgVbd8DS.d.mts → development/index-react-server-client-DRhjXpk2.d.mts} +2 -2
- package/dist/development/index-react-server-client.d.mts +3 -3
- 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 +3 -2
- package/dist/development/index-react-server.d.ts +3 -2
- package/dist/development/index-react-server.js +24 -9
- package/dist/development/index-react-server.mjs +24 -9
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +95 -95
- 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-B3sNokxM.d.mts → route-data-DAVP2QQ0.d.mts} +2 -2
- package/dist/development/{routeModules-DRWHoPcT.d.ts → routeModules-rOzWJJ9x.d.ts} +4 -3
- package/dist/production/{chunk-NCRSBAFG.js → chunk-5WPGWA23.js} +3 -4
- package/dist/{development/chunk-UMVNFWBW.js → production/chunk-IK7IYG3O.js} +131 -131
- package/dist/{development/chunk-RVSOEW4N.mjs → production/chunk-LR4OTIMG.mjs} +2 -2
- package/dist/production/{chunk-O46NJYOA.mjs → chunk-VHBXOG2Z.mjs} +4 -5
- package/dist/production/{context-D5hQ2yCL.d.mts → context-jKip1TFB.d.mts} +3 -2
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-C4AMmMi3.d.ts → production/index-react-server-client-BKpa2trA.d.ts} +1 -1
- package/dist/{development/index-react-server-client-DgVbd8DS.d.mts → production/index-react-server-client-DRhjXpk2.d.mts} +2 -2
- package/dist/production/index-react-server-client.d.mts +3 -3
- 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 +3 -2
- package/dist/production/index-react-server.d.ts +3 -2
- package/dist/production/index-react-server.js +24 -9
- package/dist/production/index-react-server.mjs +24 -9
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +95 -95
- 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-B3sNokxM.d.mts → route-data-DAVP2QQ0.d.mts} +2 -2
- package/dist/production/{routeModules-DRWHoPcT.d.ts → routeModules-rOzWJJ9x.d.ts} +4 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.8.2-pre.
|
|
2
|
+
* react-router v7.8.2-pre.1
|
|
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-7QFLQWWN.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-ZVD2KUIM.mjs";
|
|
144
144
|
export {
|
|
145
145
|
Await,
|
|
146
146
|
BrowserRouter,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteModule, L as LinkDescriptor, F as Func, 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 { L as Location, b as unstable_MiddlewareNextFunction, D as DataStrategyResult } from '../../context-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, F as Func, 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-DAVP2QQ0.mjs';
|
|
2
|
+
import { L as Location, b as unstable_MiddlewareNextFunction, D as DataStrategyResult } from '../../context-jKip1TFB.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, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, D as DataStrategyResult, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-
|
|
1
|
+
import { R as RouteModule, L as LinkDescriptor, a as Location, F as Func, P as Pretty, M as MetaDescriptor, G as GetLoaderData, S as ServerDataFunctionArgs, u as unstable_MiddlewareNextFunction, C as ClientDataFunctionArgs, D as DataStrategyResult, b as ServerDataFrom, N as Normalize, c as GetActionData } from '../../routeModules-rOzWJJ9x.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 { A as ActionFunctionArgs, c as LoaderFunctionArgs, d as ActionFunction, e as LoaderFunction, P as Params, L as Location, f as DataRouteMatch, g as unstable_MiddlewareFunction, S as ShouldRevalidateFunction, h as unstable_RouterContextProvider, i as DataWithResponseInit, M as MiddlewareEnabled } from './context-
|
|
2
|
+
import { A as ActionFunctionArgs, c as LoaderFunctionArgs, d as ActionFunction, e as LoaderFunction, P as Params, L as Location, f as DataRouteMatch, g as unstable_MiddlewareFunction, D as DataStrategyResult, S as ShouldRevalidateFunction, h as unstable_RouterContextProvider, i as DataWithResponseInit, M as MiddlewareEnabled } from './context-jKip1TFB.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* An object of unknown type for route loaders and actions provided by the
|
|
@@ -130,7 +130,7 @@ interface RouteModules {
|
|
|
130
130
|
interface RouteModule$1 {
|
|
131
131
|
clientAction?: ClientActionFunction;
|
|
132
132
|
clientLoader?: ClientLoaderFunction;
|
|
133
|
-
unstable_clientMiddleware?: unstable_MiddlewareFunction<
|
|
133
|
+
unstable_clientMiddleware?: unstable_MiddlewareFunction<Record<string, DataStrategyResult>>[];
|
|
134
134
|
ErrorBoundary?: ErrorBoundaryComponent;
|
|
135
135
|
HydrateFallback?: HydrateFallbackComponent;
|
|
136
136
|
Layout?: LayoutComponent;
|
|
@@ -1300,7 +1300,6 @@ type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "e
|
|
|
1300
1300
|
* Future flags to toggle new feature behavior
|
|
1301
1301
|
*/
|
|
1302
1302
|
interface FutureConfig {
|
|
1303
|
-
unstable_middleware: boolean;
|
|
1304
1303
|
}
|
|
1305
1304
|
/**
|
|
1306
1305
|
* Initialization options for createRouter
|
|
@@ -1344,7 +1343,9 @@ interface StaticHandler {
|
|
|
1344
1343
|
skipLoaderErrorBubbling?: boolean;
|
|
1345
1344
|
skipRevalidation?: boolean;
|
|
1346
1345
|
dataStrategy?: DataStrategyFunction<unknown>;
|
|
1347
|
-
unstable_generateMiddlewareResponse?: (query: (r: Request
|
|
1346
|
+
unstable_generateMiddlewareResponse?: (query: (r: Request, args?: {
|
|
1347
|
+
filterMatchesToLoad?: (match: AgnosticDataRouteMatch) => boolean;
|
|
1348
|
+
}) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
|
|
1348
1349
|
}): Promise<StaticHandlerContext | Response>;
|
|
1349
1350
|
queryRoute(request: Request, opts?: {
|
|
1350
1351
|
routeId?: string;
|
|
@@ -2809,7 +2810,7 @@ interface RouteModules {
|
|
|
2809
2810
|
interface RouteModule {
|
|
2810
2811
|
clientAction?: ClientActionFunction;
|
|
2811
2812
|
clientLoader?: ClientLoaderFunction;
|
|
2812
|
-
unstable_clientMiddleware?: unstable_MiddlewareFunction<
|
|
2813
|
+
unstable_clientMiddleware?: unstable_MiddlewareFunction<Record<string, DataStrategyResult>>[];
|
|
2813
2814
|
ErrorBoundary?: ErrorBoundaryComponent;
|
|
2814
2815
|
HydrateFallback?: HydrateFallbackComponent;
|
|
2815
2816
|
Layout?: LayoutComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.8.2-pre.
|
|
2
|
+
* react-router v7.8.2-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1009,7 +1009,6 @@ function createRouter(init) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
let dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware;
|
|
1011
1011
|
let future = {
|
|
1012
|
-
unstable_middleware: false,
|
|
1013
1012
|
...init.future
|
|
1014
1013
|
};
|
|
1015
1014
|
let unlistenHistory = null;
|
|
@@ -2827,7 +2826,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2827
2826
|
},
|
|
2828
2827
|
async () => {
|
|
2829
2828
|
let res = await generateMiddlewareResponse(
|
|
2830
|
-
async (revalidationRequest) => {
|
|
2829
|
+
async (revalidationRequest, opts2 = {}) => {
|
|
2831
2830
|
let result2 = await queryImpl(
|
|
2832
2831
|
revalidationRequest,
|
|
2833
2832
|
location,
|
|
@@ -2836,7 +2835,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2836
2835
|
dataStrategy || null,
|
|
2837
2836
|
skipLoaderErrorBubbling === true,
|
|
2838
2837
|
null,
|
|
2839
|
-
filterMatchesToLoad
|
|
2838
|
+
"filterMatchesToLoad" in opts2 ? _nullishCoalesce(opts2.filterMatchesToLoad, () => ( null)) : null,
|
|
2840
2839
|
skipRevalidation === true
|
|
2841
2840
|
);
|
|
2842
2841
|
if (isResponse(result2)) {
|