react-router 0.0.0-experimental-795b50c5b → 0.0.0-experimental-ae6d61df4
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/development/{chunk-7T5JZQAV.mjs → chunk-2ZZVVNV4.mjs} +4 -4
- package/dist/development/{chunk-VNH3JIG2.js → chunk-IRJNXLFF.js} +3 -3
- package/dist/development/{chunk-KHKNSFUT.mjs → chunk-RID2P5US.mjs} +22 -13
- package/dist/{production/chunk-LWO6LYIZ.js → development/chunk-Y3HHG2TB.js} +131 -131
- package/dist/development/dom-export.js +10 -10
- package/dist/development/dom-export.mjs +10 -10
- 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 +35 -1
- package/dist/development/index-react-server.d.ts +35 -1
- package/dist/development/index-react-server.js +31 -4
- package/dist/development/index-react-server.mjs +31 -5
- package/dist/development/index.d.mts +16 -9
- package/dist/development/index.d.ts +16 -9
- package/dist/development/index.js +115 -106
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +37 -12
- package/dist/development/lib/types/internal.d.ts +37 -12
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-XHECLLLG.mjs → chunk-RDSEQDXA.mjs} +22 -13
- package/dist/production/{chunk-RNMWSLFV.mjs → chunk-SBKYKNWV.mjs} +4 -4
- package/dist/{development/chunk-F3UYON6A.js → production/chunk-TUJHIUWZ.js} +131 -131
- package/dist/production/{chunk-GBRGDNKH.js → chunk-UKH567WH.js} +3 -3
- package/dist/production/dom-export.js +10 -10
- package/dist/production/dom-export.mjs +10 -10
- 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 +35 -1
- package/dist/production/index-react-server.d.ts +35 -1
- package/dist/production/index-react-server.js +31 -4
- package/dist/production/index-react-server.mjs +31 -5
- package/dist/production/index.d.mts +16 -9
- package/dist/production/index.d.ts +16 -9
- package/dist/production/index.js +115 -106
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +37 -12
- package/dist/production/lib/types/internal.d.ts +37 -12
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- 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-ae6d61df4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2835,7 +2835,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2835
2835
|
dataStrategy || null,
|
|
2836
2836
|
skipLoaderErrorBubbling === true,
|
|
2837
2837
|
null,
|
|
2838
|
-
"filterMatchesToLoad" in opts2 ? opts2.filterMatchesToLoad ?? null : null,
|
|
2838
|
+
"filterMatchesToLoad" in opts2 ? opts2.filterMatchesToLoad ?? null : filterMatchesToLoad ?? null,
|
|
2839
2839
|
skipRevalidation === true
|
|
2840
2840
|
);
|
|
2841
2841
|
if (isResponse(result2)) {
|
|
@@ -8265,7 +8265,7 @@ function getManifestPath(_manifestPath, basename) {
|
|
|
8265
8265
|
var MANIFEST_VERSION_STORAGE_KEY = "react-router-manifest-version";
|
|
8266
8266
|
async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {
|
|
8267
8267
|
const searchParams = new URLSearchParams();
|
|
8268
|
-
paths.sort().
|
|
8268
|
+
searchParams.set("paths", paths.sort().join(","));
|
|
8269
8269
|
searchParams.set("version", manifest.version);
|
|
8270
8270
|
let url = new URL(
|
|
8271
8271
|
getManifestPath(manifestPath, basename),
|
|
@@ -8967,7 +8967,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
|
|
|
8967
8967
|
try {
|
|
8968
8968
|
if (isBrowser) {
|
|
8969
8969
|
window.__reactRouterVersion = // @ts-expect-error
|
|
8970
|
-
"0.0.0-experimental-
|
|
8970
|
+
"0.0.0-experimental-ae6d61df4";
|
|
8971
8971
|
}
|
|
8972
8972
|
} catch (e) {
|
|
8973
8973
|
}
|
|
@@ -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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-ae6d61df4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2835,7 +2835,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2835
2835
|
dataStrategy || null,
|
|
2836
2836
|
skipLoaderErrorBubbling === true,
|
|
2837
2837
|
null,
|
|
2838
|
-
"filterMatchesToLoad" in opts2 ? _nullishCoalesce(opts2.filterMatchesToLoad, () => ( null)) : null,
|
|
2838
|
+
"filterMatchesToLoad" in opts2 ? _nullishCoalesce(opts2.filterMatchesToLoad, () => ( null)) : _nullishCoalesce(filterMatchesToLoad, () => ( null)),
|
|
2839
2839
|
skipRevalidation === true
|
|
2840
2840
|
);
|
|
2841
2841
|
if (isResponse(result2)) {
|
|
@@ -7502,7 +7502,7 @@ function getManifestPath(_manifestPath, basename) {
|
|
|
7502
7502
|
var MANIFEST_VERSION_STORAGE_KEY = "react-router-manifest-version";
|
|
7503
7503
|
async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {
|
|
7504
7504
|
const searchParams = new URLSearchParams();
|
|
7505
|
-
paths.sort().
|
|
7505
|
+
searchParams.set("paths", paths.sort().join(","));
|
|
7506
7506
|
searchParams.set("version", manifest.version);
|
|
7507
7507
|
let url = new URL(
|
|
7508
7508
|
getManifestPath(manifestPath, basename),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-ae6d61df4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
withComponentProps,
|
|
59
59
|
withErrorBoundaryProps,
|
|
60
60
|
withHydrateFallbackProps
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-2ZZVVNV4.mjs";
|
|
62
62
|
|
|
63
63
|
// lib/dom/ssr/server.tsx
|
|
64
64
|
import * as React from "react";
|
|
@@ -1246,9 +1246,11 @@ async function handleManifestRequest(build, routes, url) {
|
|
|
1246
1246
|
});
|
|
1247
1247
|
}
|
|
1248
1248
|
let patches = {};
|
|
1249
|
-
if (url.searchParams.has("
|
|
1249
|
+
if (url.searchParams.has("paths")) {
|
|
1250
1250
|
let paths = /* @__PURE__ */ new Set();
|
|
1251
|
-
url.searchParams.
|
|
1251
|
+
let pathParam = url.searchParams.get("paths") || "";
|
|
1252
|
+
let requestedPaths = pathParam.split(",").filter(Boolean);
|
|
1253
|
+
requestedPaths.forEach((path) => {
|
|
1252
1254
|
if (!path.startsWith("/")) {
|
|
1253
1255
|
path = `/${path}`;
|
|
1254
1256
|
}
|
|
@@ -1686,7 +1688,14 @@ import * as React4 from "react";
|
|
|
1686
1688
|
import * as ReactDOM from "react-dom";
|
|
1687
1689
|
|
|
1688
1690
|
// lib/dom/ssr/hydration.tsx
|
|
1689
|
-
function getHydrationData(
|
|
1691
|
+
function getHydrationData({
|
|
1692
|
+
state,
|
|
1693
|
+
routes,
|
|
1694
|
+
getRouteInfo,
|
|
1695
|
+
location: location2,
|
|
1696
|
+
basename,
|
|
1697
|
+
isSpaMode
|
|
1698
|
+
}) {
|
|
1690
1699
|
let hydrationData = {
|
|
1691
1700
|
...state,
|
|
1692
1701
|
loaderData: { ...state.loaderData }
|
|
@@ -1979,14 +1988,14 @@ function createRouterFromPayload({
|
|
|
1979
1988
|
getContext,
|
|
1980
1989
|
basename: payload.basename,
|
|
1981
1990
|
history: createBrowserHistory(),
|
|
1982
|
-
hydrationData: getHydrationData(
|
|
1983
|
-
{
|
|
1991
|
+
hydrationData: getHydrationData({
|
|
1992
|
+
state: {
|
|
1984
1993
|
loaderData: payload.loaderData,
|
|
1985
1994
|
actionData: payload.actionData,
|
|
1986
1995
|
errors: payload.errors
|
|
1987
1996
|
},
|
|
1988
1997
|
routes,
|
|
1989
|
-
(routeId) => {
|
|
1998
|
+
getRouteInfo: (routeId) => {
|
|
1990
1999
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
1991
2000
|
invariant(match, "Route not found in payload");
|
|
1992
2001
|
return {
|
|
@@ -1995,10 +2004,10 @@ function createRouterFromPayload({
|
|
|
1995
2004
|
hasHydrateFallback: match.hydrateFallbackElement != null
|
|
1996
2005
|
};
|
|
1997
2006
|
},
|
|
1998
|
-
payload.location,
|
|
1999
|
-
|
|
2000
|
-
false
|
|
2001
|
-
),
|
|
2007
|
+
location: payload.location,
|
|
2008
|
+
basename: payload.basename,
|
|
2009
|
+
isSpaMode: false
|
|
2010
|
+
}),
|
|
2002
2011
|
async patchRoutesOnNavigation({ path, signal }) {
|
|
2003
2012
|
if (discoveredPaths.has(path)) {
|
|
2004
2013
|
return;
|
|
@@ -2412,7 +2421,7 @@ function getManifestUrl(paths) {
|
|
|
2412
2421
|
""
|
|
2413
2422
|
);
|
|
2414
2423
|
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
2415
|
-
|
|
2424
|
+
url.searchParams.set("paths", paths.sort().join(","));
|
|
2416
2425
|
return url;
|
|
2417
2426
|
}
|
|
2418
2427
|
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|