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
|
/**
|