react-router 7.10.0-pre.0 → 7.10.0
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 +9 -2
- package/dist/development/{browser-eL-tAN4R.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/development/{browser-BHySFrZ2.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/development/{chunk-Z4R76DXJ.js → chunk-26EFLBGX.js} +7 -7
- package/dist/development/{chunk-M4WLV5HP.js → chunk-54KWOGSJ.js} +1 -1
- package/dist/{production/chunk-5DTJHKF7.js → development/chunk-AWUYHSQU.js} +94 -94
- package/dist/development/{chunk-4BTFPFZR.mjs → chunk-FGUA77HG.mjs} +2 -2
- package/dist/development/{chunk-CECIHG5K.mjs → chunk-INCZGKXY.mjs} +2 -2
- package/dist/development/dom-export.d.mts +10 -10
- package/dist/development/dom-export.d.ts +10 -10
- package/dist/development/dom-export.js +27 -27
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-CNrKUHDv.d.ts → development/index-react-server-client-CCjKYJTH.d.ts} +17 -174
- package/dist/development/{index-react-server-client-DYtvZPLT.d.mts → index-react-server-client-CipGfVBI.d.mts} +17 -174
- package/dist/development/index-react-server-client.d.mts +2 -2
- 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.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.d.mts +8 -8
- package/dist/development/index.d.ts +8 -8
- package/dist/development/index.js +76 -76
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Dwf-sTWa.d.ts → development/instrumentation-BB0wRuqz.d.ts} +27 -3
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-C97Jz2jB.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/development/{register-BnQsYkwj.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/development/{router-Dgz_Mh9m.d.mts → router-CwNp5l9u.d.mts} +27 -3
- package/dist/production/{browser-eL-tAN4R.d.ts → browser-BpxEZgZC.d.ts} +1 -1
- package/dist/production/{browser-BHySFrZ2.d.mts → browser-C5z6FZmz.d.mts} +1 -1
- package/dist/production/{chunk-SGCRBGEM.js → chunk-EKXDIDQN.js} +7 -7
- package/dist/{development/chunk-2VILFZWG.js → production/chunk-J25F7BL4.js} +94 -94
- package/dist/production/{chunk-QKAGOFED.mjs → chunk-MFC2CGJA.mjs} +2 -2
- package/dist/production/{chunk-KJ5676BZ.mjs → chunk-RNH4J7KQ.mjs} +2 -2
- package/dist/production/{chunk-55FFLVQP.js → chunk-SKXBY33F.js} +1 -1
- package/dist/production/dom-export.d.mts +10 -10
- package/dist/production/dom-export.d.ts +10 -10
- package/dist/production/dom-export.js +27 -27
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-CNrKUHDv.d.ts → production/index-react-server-client-CCjKYJTH.d.ts} +17 -174
- package/dist/production/{index-react-server-client-DYtvZPLT.d.mts → index-react-server-client-CipGfVBI.d.mts} +17 -174
- package/dist/production/index-react-server-client.d.mts +2 -2
- 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.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.d.mts +8 -8
- package/dist/production/index.d.ts +8 -8
- package/dist/production/index.js +76 -76
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Dwf-sTWa.d.ts → production/instrumentation-BB0wRuqz.d.ts} +27 -3
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-C97Jz2jB.d.mts → register-C1RwVJAt.d.mts} +1 -1
- package/dist/production/{register-BnQsYkwj.d.ts → register-ODDAAYlf.d.ts} +1 -1
- package/dist/production/{router-Dgz_Mh9m.d.mts → router-CwNp5l9u.d.mts} +27 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-
|
|
2
|
-
import { R as RouteFiles, P as Pages } from '../../register-
|
|
1
|
+
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-BB0wRuqz.js';
|
|
2
|
+
import { R as RouteFiles, P as Pages } from '../../register-ODDAAYlf.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RouteModule } from './instrumentation-
|
|
1
|
+
import { R as RouteModule } from './instrumentation-BB0wRuqz.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
|
|
@@ -1112,7 +1112,7 @@ interface MemoryRouterOpts {
|
|
|
1112
1112
|
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
|
1113
1113
|
* mostly useful for observability such as wrapping navigations, fetches,
|
|
1114
1114
|
* as well as route loaders/actions/middlewares with logging and/or performance
|
|
1115
|
-
* tracing.
|
|
1115
|
+
* tracing. See the [docs](../../how-to/instrumentation) for more information.
|
|
1116
1116
|
*
|
|
1117
1117
|
* ```tsx
|
|
1118
1118
|
* let router = createBrowserRouter(routes, {
|
|
@@ -1156,8 +1156,32 @@ interface MemoryRouterOpts {
|
|
|
1156
1156
|
*/
|
|
1157
1157
|
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
|
1158
1158
|
/**
|
|
1159
|
-
* Override the default data strategy of
|
|
1160
|
-
*
|
|
1159
|
+
* Override the default data strategy of running loaders in parallel -
|
|
1160
|
+
* see the [docs](../../how-to/data-strategy) for more information.
|
|
1161
|
+
*
|
|
1162
|
+
* ```tsx
|
|
1163
|
+
* let router = createBrowserRouter(routes, {
|
|
1164
|
+
* async dataStrategy({
|
|
1165
|
+
* matches,
|
|
1166
|
+
* request,
|
|
1167
|
+
* runClientMiddleware,
|
|
1168
|
+
* }) {
|
|
1169
|
+
* const matchesToLoad = matches.filter((m) =>
|
|
1170
|
+
* m.shouldCallHandler(),
|
|
1171
|
+
* );
|
|
1172
|
+
*
|
|
1173
|
+
* const results: Record<string, DataStrategyResult> = {};
|
|
1174
|
+
* await runClientMiddleware(() =>
|
|
1175
|
+
* Promise.all(
|
|
1176
|
+
* matchesToLoad.map(async (match) => {
|
|
1177
|
+
* results[match.route.id] = await match.resolve();
|
|
1178
|
+
* }),
|
|
1179
|
+
* ),
|
|
1180
|
+
* );
|
|
1181
|
+
* return results;
|
|
1182
|
+
* },
|
|
1183
|
+
* });
|
|
1184
|
+
* ```
|
|
1161
1185
|
*/
|
|
1162
1186
|
dataStrategy?: DataStrategyFunction;
|
|
1163
1187
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-
|
|
2
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-BB0wRuqz.js';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-
|
|
2
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-CwNp5l9u.mjs';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.10.0
|
|
2
|
+
* react-router v7.10.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkSKXBY33Fjs = require('./chunk-SKXBY33F.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkSKXBY33Fjs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkSKXBY33Fjs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkSKXBY33Fjs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkSKXBY33Fjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkSKXBY33Fjs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|