react-router 0.0.0-experimental-4e44d47 → 0.0.0-experimental-3df673e
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/dist/{production/chunk-IZVJSKMU.mjs → development/chunk-27W3PGKT.mjs} +3 -3
- package/dist/development/{chunk-XVVWTPHF.mjs → chunk-5FNKA3AJ.mjs} +20 -18
- package/dist/{production/chunk-UNIYMJFU.js → development/chunk-HMTR6AB3.js} +134 -134
- package/dist/development/{chunk-7B7CUJYE.js → chunk-OAO2BCWA.js} +19 -17
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.d.ts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-83aVZHgI.d.ts → index-react-server-client-CCykjjOv.d.ts} +2 -2
- package/dist/{production/index-react-server-client-BDG19ZQl.d.mts → development/index-react-server-client-vPxdwQO-.d.mts} +2 -2
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +3 -3
- 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 -3
- package/dist/development/index-react-server.d.ts +3 -3
- package/dist/development/index-react-server.js +11 -11
- package/dist/development/index-react-server.mjs +11 -11
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +99 -99
- package/dist/development/index.mjs +3 -3
- package/dist/development/{instrumentation-XYmrzhe3.d.ts → instrumentation-BsMyG4uF.d.ts} +2 -2
- 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/{production/routeModules-Bu1JamQV.d.ts → development/routeModules-BsBQDHG4.d.ts} +3 -3
- package/dist/development/{routeModules-CtCOLGtG.d.mts → routeModules-DSpLybMz.d.mts} +3 -3
- package/dist/development/{router-2BoB34m1.d.mts → router-B02dMGKy.d.mts} +2 -2
- package/dist/{development/chunk-MTLWRICG.js → production/chunk-BJWGLTLV.js} +134 -134
- package/dist/{development/chunk-PSQFTIPQ.mjs → production/chunk-IFXZKZUN.mjs} +3 -3
- package/dist/production/{chunk-OXRQQZPR.js → chunk-NZTFTCSL.js} +19 -17
- package/dist/production/{chunk-GSSVRQ6M.mjs → chunk-XWLYGPB7.mjs} +20 -18
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.d.ts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-83aVZHgI.d.ts → index-react-server-client-CCykjjOv.d.ts} +2 -2
- package/dist/{development/index-react-server-client-BDG19ZQl.d.mts → production/index-react-server-client-vPxdwQO-.d.mts} +2 -2
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +3 -3
- 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 -3
- package/dist/production/index-react-server.d.ts +3 -3
- package/dist/production/index-react-server.js +11 -11
- package/dist/production/index-react-server.mjs +11 -11
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +99 -99
- package/dist/production/index.mjs +3 -3
- package/dist/production/{instrumentation-XYmrzhe3.d.ts → instrumentation-BsMyG4uF.d.ts} +2 -2
- 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/{development/routeModules-Bu1JamQV.d.ts → production/routeModules-BsBQDHG4.d.ts} +3 -3
- package/dist/production/{routeModules-CtCOLGtG.d.mts → routeModules-DSpLybMz.d.mts} +3 -3
- package/dist/production/{router-2BoB34m1.d.mts → router-B02dMGKy.d.mts} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-3df673e
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
withComponentProps,
|
|
62
62
|
withErrorBoundaryProps,
|
|
63
63
|
withHydrateFallbackProps
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-5FNKA3AJ.mjs";
|
|
65
65
|
|
|
66
66
|
// lib/dom/ssr/server.tsx
|
|
67
67
|
import * as React from "react";
|
|
@@ -519,7 +519,7 @@ async function callRouteHandler(handler, args) {
|
|
|
519
519
|
request: stripRoutesParam(stripIndexParam2(args.request)),
|
|
520
520
|
params: args.params,
|
|
521
521
|
context: args.context,
|
|
522
|
-
|
|
522
|
+
unstable_pattern: args.unstable_pattern
|
|
523
523
|
});
|
|
524
524
|
if (isDataWithResponseInit(result) && result.init && result.init.status && isRedirectStatusCode(result.init.status)) {
|
|
525
525
|
throw new Response(null, result.init);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-3df673e
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -985,7 +985,7 @@ async function recurseRight(impls, info, handler, index) {
|
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
987
|
function getInstrumentationInfo(args) {
|
|
988
|
-
let { request, context, params,
|
|
988
|
+
let { request, context, params, unstable_pattern } = args;
|
|
989
989
|
return {
|
|
990
990
|
// pseudo "Request" with the info they may want to read from
|
|
991
991
|
request: {
|
|
@@ -997,7 +997,7 @@ function getInstrumentationInfo(args) {
|
|
|
997
997
|
}
|
|
998
998
|
},
|
|
999
999
|
params: { ...params },
|
|
1000
|
-
|
|
1000
|
+
unstable_pattern,
|
|
1001
1001
|
context: {
|
|
1002
1002
|
get: (...args2) => context.get(...args2)
|
|
1003
1003
|
}
|
|
@@ -3095,7 +3095,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3095
3095
|
let response = await runServerMiddlewarePipeline(
|
|
3096
3096
|
{
|
|
3097
3097
|
request,
|
|
3098
|
-
|
|
3098
|
+
unstable_pattern: getRoutePattern(matches.map((m) => m.route.path)),
|
|
3099
3099
|
matches,
|
|
3100
3100
|
params: matches[0].params,
|
|
3101
3101
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -3241,7 +3241,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3241
3241
|
let response = await runServerMiddlewarePipeline(
|
|
3242
3242
|
{
|
|
3243
3243
|
request,
|
|
3244
|
-
|
|
3244
|
+
unstable_pattern: getRoutePattern(matches.map((m) => m.route.path)),
|
|
3245
3245
|
matches,
|
|
3246
3246
|
params: matches[0].params,
|
|
3247
3247
|
// If we're calling middleware then it must be enabled so we can cast
|
|
@@ -3815,6 +3815,8 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
|
|
|
3815
3815
|
actionResult,
|
|
3816
3816
|
actionStatus
|
|
3817
3817
|
};
|
|
3818
|
+
let pattern = getRoutePattern(matches.map((m) => m.route.path));
|
|
3819
|
+
console.log(pattern, matches);
|
|
3818
3820
|
let dsMatches = matches.map((match, index) => {
|
|
3819
3821
|
let { route } = match;
|
|
3820
3822
|
let forceShouldLoad = null;
|
|
@@ -3838,7 +3840,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
|
|
|
3838
3840
|
mapRouteProperties2,
|
|
3839
3841
|
manifest,
|
|
3840
3842
|
request,
|
|
3841
|
-
|
|
3843
|
+
pattern,
|
|
3842
3844
|
match,
|
|
3843
3845
|
lazyRoutePropertiesToSkip,
|
|
3844
3846
|
scopedContext,
|
|
@@ -3859,7 +3861,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
|
|
|
3859
3861
|
mapRouteProperties2,
|
|
3860
3862
|
manifest,
|
|
3861
3863
|
request,
|
|
3862
|
-
|
|
3864
|
+
pattern,
|
|
3863
3865
|
match,
|
|
3864
3866
|
lazyRoutePropertiesToSkip,
|
|
3865
3867
|
scopedContext,
|
|
@@ -4322,7 +4324,7 @@ async function runMiddlewarePipeline(args, handler, processResult, isResult, err
|
|
|
4322
4324
|
request,
|
|
4323
4325
|
params,
|
|
4324
4326
|
context,
|
|
4325
|
-
|
|
4327
|
+
unstable_pattern: getRoutePattern(matches.map((m) => m.route.path))
|
|
4326
4328
|
},
|
|
4327
4329
|
tuples,
|
|
4328
4330
|
handler,
|
|
@@ -4401,7 +4403,7 @@ function getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request
|
|
|
4401
4403
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
4402
4404
|
};
|
|
4403
4405
|
}
|
|
4404
|
-
function getDataStrategyMatch(mapRouteProperties2, manifest, request,
|
|
4406
|
+
function getDataStrategyMatch(mapRouteProperties2, manifest, request, unstable_pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, unstable_shouldRevalidateArgs = null) {
|
|
4405
4407
|
let isUsingNewApi = false;
|
|
4406
4408
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
4407
4409
|
mapRouteProperties2,
|
|
@@ -4435,7 +4437,7 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, pattern, m
|
|
|
4435
4437
|
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
4436
4438
|
return callLoaderOrAction({
|
|
4437
4439
|
request,
|
|
4438
|
-
|
|
4440
|
+
unstable_pattern,
|
|
4439
4441
|
match,
|
|
4440
4442
|
lazyHandlerPromise: _lazyPromises?.handler,
|
|
4441
4443
|
lazyRoutePromise: _lazyPromises?.route,
|
|
@@ -4484,7 +4486,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4484
4486
|
}
|
|
4485
4487
|
let dataStrategyArgs = {
|
|
4486
4488
|
request,
|
|
4487
|
-
|
|
4489
|
+
unstable_pattern: getRoutePattern(matches.map((m) => m.route.path)),
|
|
4488
4490
|
params: matches[0].params,
|
|
4489
4491
|
context: scopedContext,
|
|
4490
4492
|
matches
|
|
@@ -4525,7 +4527,7 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
|
|
|
4525
4527
|
}
|
|
4526
4528
|
async function callLoaderOrAction({
|
|
4527
4529
|
request,
|
|
4528
|
-
|
|
4530
|
+
unstable_pattern,
|
|
4529
4531
|
match,
|
|
4530
4532
|
lazyHandlerPromise,
|
|
4531
4533
|
lazyRoutePromise,
|
|
@@ -4552,7 +4554,7 @@ async function callLoaderOrAction({
|
|
|
4552
4554
|
return handler(
|
|
4553
4555
|
{
|
|
4554
4556
|
request,
|
|
4555
|
-
|
|
4557
|
+
unstable_pattern,
|
|
4556
4558
|
params: match.params,
|
|
4557
4559
|
context: scopedContext
|
|
4558
4560
|
},
|
|
@@ -8336,7 +8338,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8336
8338
|
let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
|
|
8337
8339
|
let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;
|
|
8338
8340
|
let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);
|
|
8339
|
-
dataRoute.loader = async ({ request, params, context,
|
|
8341
|
+
dataRoute.loader = async ({ request, params, context, unstable_pattern }, singleFetch) => {
|
|
8340
8342
|
try {
|
|
8341
8343
|
let result = await prefetchStylesAndCallHandler(async () => {
|
|
8342
8344
|
invariant2(
|
|
@@ -8350,7 +8352,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8350
8352
|
request,
|
|
8351
8353
|
params,
|
|
8352
8354
|
context,
|
|
8353
|
-
|
|
8355
|
+
unstable_pattern,
|
|
8354
8356
|
async serverLoader() {
|
|
8355
8357
|
preventInvalidServerHandlerCall("loader", route);
|
|
8356
8358
|
if (isHydrationRequest) {
|
|
@@ -8376,7 +8378,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8376
8378
|
route.hasLoader,
|
|
8377
8379
|
isSpaMode
|
|
8378
8380
|
);
|
|
8379
|
-
dataRoute.action = ({ request, params, context,
|
|
8381
|
+
dataRoute.action = ({ request, params, context, unstable_pattern }, singleFetch) => {
|
|
8380
8382
|
return prefetchStylesAndCallHandler(async () => {
|
|
8381
8383
|
invariant2(
|
|
8382
8384
|
routeModule,
|
|
@@ -8392,7 +8394,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
8392
8394
|
request,
|
|
8393
8395
|
params,
|
|
8394
8396
|
context,
|
|
8395
|
-
|
|
8397
|
+
unstable_pattern,
|
|
8396
8398
|
async serverAction() {
|
|
8397
8399
|
preventInvalidServerHandlerCall("action", route);
|
|
8398
8400
|
return fetchServerAction(singleFetch);
|
|
@@ -9402,7 +9404,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
9402
9404
|
try {
|
|
9403
9405
|
if (isBrowser) {
|
|
9404
9406
|
window.__reactRouterVersion = // @ts-expect-error
|
|
9405
|
-
"0.0.0-experimental-
|
|
9407
|
+
"0.0.0-experimental-3df673e";
|
|
9406
9408
|
}
|
|
9407
9409
|
} catch (e) {
|
|
9408
9410
|
}
|