react-router 0.0.0-experimental-2d7ec82d5 → 0.0.0-experimental-232861bd9
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-JPPIU5KG.mjs → chunk-6AEC5MNZ.mjs} +28 -16
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.d.mts +3 -3
- package/dist/development/index.d.ts +3 -3
- package/dist/development/index.js +28 -16
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/development/rsc-export.js +1 -1
- package/dist/development/rsc-export.mjs +1 -1
- package/dist/production/{chunk-O34M5LIX.mjs → chunk-22PMV7NU.mjs} +28 -16
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.d.mts +3 -3
- package/dist/production/index.d.ts +3 -3
- package/dist/production/index.js +28 -16
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/production/rsc-export.js +1 -1
- package/dist/production/rsc-export.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-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -7722,7 +7722,7 @@ function PrefetchPageLinksImpl({
|
|
|
7722
7722
|
if (routesParams.size === 0) {
|
|
7723
7723
|
return [];
|
|
7724
7724
|
}
|
|
7725
|
-
let url = singleFetchUrl(page, basename, "
|
|
7725
|
+
let url = singleFetchUrl(page, basename, "data");
|
|
7726
7726
|
if (foundOptOutRoute && routesParams.size > 0) {
|
|
7727
7727
|
url.searchParams.set(
|
|
7728
7728
|
"_routes",
|
|
@@ -8013,7 +8013,7 @@ function mergeRefs(...refs) {
|
|
|
8013
8013
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8014
8014
|
try {
|
|
8015
8015
|
if (isBrowser) {
|
|
8016
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8016
|
+
window.__reactRouterVersion = "0.0.0-experimental-232861bd9";
|
|
8017
8017
|
}
|
|
8018
8018
|
} catch (e) {
|
|
8019
8019
|
}
|
|
@@ -11202,29 +11202,41 @@ async function routeRSCServerRequest(request, requestServer, decode2, renderHTML
|
|
|
11202
11202
|
if (!serverResponseB.body) {
|
|
11203
11203
|
throw new Error("Failed to clone server response");
|
|
11204
11204
|
}
|
|
11205
|
-
const
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
});
|
|
11213
|
-
}
|
|
11214
|
-
const html = await renderHTML(payload);
|
|
11205
|
+
const body = serverResponse.body;
|
|
11206
|
+
let payloadPromise;
|
|
11207
|
+
const getPayload = async () => {
|
|
11208
|
+
if (payloadPromise) return payloadPromise;
|
|
11209
|
+
payloadPromise = decode2(body);
|
|
11210
|
+
return payloadPromise;
|
|
11211
|
+
};
|
|
11215
11212
|
try {
|
|
11216
|
-
const
|
|
11213
|
+
const html = await renderHTML(getPayload);
|
|
11214
|
+
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
11217
11215
|
const headers = new Headers(serverResponse.headers);
|
|
11218
11216
|
headers.set("Content-Type", "text/html");
|
|
11219
|
-
return new Response(
|
|
11217
|
+
return new Response(body2, {
|
|
11220
11218
|
status: serverResponse.status,
|
|
11221
11219
|
headers
|
|
11222
11220
|
});
|
|
11223
11221
|
} catch (reason) {
|
|
11222
|
+
if (reason instanceof Response) {
|
|
11223
|
+
return reason;
|
|
11224
|
+
}
|
|
11224
11225
|
throw reason;
|
|
11225
11226
|
}
|
|
11226
11227
|
}
|
|
11227
|
-
function RSCStaticRouter({
|
|
11228
|
+
function RSCStaticRouter({
|
|
11229
|
+
getPayload
|
|
11230
|
+
}) {
|
|
11231
|
+
const payload = React15.use(getPayload());
|
|
11232
|
+
if (payload.type === "redirect") {
|
|
11233
|
+
throw new Response(null, {
|
|
11234
|
+
status: payload.status,
|
|
11235
|
+
headers: {
|
|
11236
|
+
Location: payload.location
|
|
11237
|
+
}
|
|
11238
|
+
});
|
|
11239
|
+
}
|
|
11228
11240
|
if (payload.type !== "render") return null;
|
|
11229
11241
|
const context = {
|
|
11230
11242
|
actionData: payload.actionData,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6AEC5MNZ.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -814,9 +814,9 @@ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [
|
|
|
814
814
|
*/
|
|
815
815
|
declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
|
|
816
816
|
|
|
817
|
-
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (
|
|
818
|
-
declare function RSCStaticRouter({
|
|
819
|
-
|
|
817
|
+
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
818
|
+
declare function RSCStaticRouter({ getPayload, }: {
|
|
819
|
+
getPayload: () => Promise<ServerPayload>;
|
|
820
820
|
}): React.JSX.Element | null;
|
|
821
821
|
|
|
822
822
|
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
|
|
@@ -814,9 +814,9 @@ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [
|
|
|
814
814
|
*/
|
|
815
815
|
declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
|
|
816
816
|
|
|
817
|
-
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (
|
|
818
|
-
declare function RSCStaticRouter({
|
|
819
|
-
|
|
817
|
+
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
818
|
+
declare function RSCStaticRouter({ getPayload, }: {
|
|
819
|
+
getPayload: () => Promise<ServerPayload>;
|
|
820
820
|
}): React.JSX.Element | null;
|
|
821
821
|
|
|
822
822
|
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -7881,7 +7881,7 @@ function PrefetchPageLinksImpl({
|
|
|
7881
7881
|
if (routesParams.size === 0) {
|
|
7882
7882
|
return [];
|
|
7883
7883
|
}
|
|
7884
|
-
let url = singleFetchUrl(page, basename, "
|
|
7884
|
+
let url = singleFetchUrl(page, basename, "data");
|
|
7885
7885
|
if (foundOptOutRoute && routesParams.size > 0) {
|
|
7886
7886
|
url.searchParams.set(
|
|
7887
7887
|
"_routes",
|
|
@@ -8172,7 +8172,7 @@ function mergeRefs(...refs) {
|
|
|
8172
8172
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8173
8173
|
try {
|
|
8174
8174
|
if (isBrowser) {
|
|
8175
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8175
|
+
window.__reactRouterVersion = "0.0.0-experimental-232861bd9";
|
|
8176
8176
|
}
|
|
8177
8177
|
} catch (e) {
|
|
8178
8178
|
}
|
|
@@ -11361,29 +11361,41 @@ async function routeRSCServerRequest(request, requestServer, decode2, renderHTML
|
|
|
11361
11361
|
if (!serverResponseB.body) {
|
|
11362
11362
|
throw new Error("Failed to clone server response");
|
|
11363
11363
|
}
|
|
11364
|
-
const
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
});
|
|
11372
|
-
}
|
|
11373
|
-
const html = await renderHTML(payload);
|
|
11364
|
+
const body = serverResponse.body;
|
|
11365
|
+
let payloadPromise;
|
|
11366
|
+
const getPayload = async () => {
|
|
11367
|
+
if (payloadPromise) return payloadPromise;
|
|
11368
|
+
payloadPromise = decode2(body);
|
|
11369
|
+
return payloadPromise;
|
|
11370
|
+
};
|
|
11374
11371
|
try {
|
|
11375
|
-
const
|
|
11372
|
+
const html = await renderHTML(getPayload);
|
|
11373
|
+
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
11376
11374
|
const headers = new Headers(serverResponse.headers);
|
|
11377
11375
|
headers.set("Content-Type", "text/html");
|
|
11378
|
-
return new Response(
|
|
11376
|
+
return new Response(body2, {
|
|
11379
11377
|
status: serverResponse.status,
|
|
11380
11378
|
headers
|
|
11381
11379
|
});
|
|
11382
11380
|
} catch (reason) {
|
|
11381
|
+
if (reason instanceof Response) {
|
|
11382
|
+
return reason;
|
|
11383
|
+
}
|
|
11383
11384
|
throw reason;
|
|
11384
11385
|
}
|
|
11385
11386
|
}
|
|
11386
|
-
function RSCStaticRouter({
|
|
11387
|
+
function RSCStaticRouter({
|
|
11388
|
+
getPayload
|
|
11389
|
+
}) {
|
|
11390
|
+
const payload = React15.use(getPayload());
|
|
11391
|
+
if (payload.type === "redirect") {
|
|
11392
|
+
throw new Response(null, {
|
|
11393
|
+
status: payload.status,
|
|
11394
|
+
headers: {
|
|
11395
|
+
Location: payload.location
|
|
11396
|
+
}
|
|
11397
|
+
});
|
|
11398
|
+
}
|
|
11387
11399
|
if (payload.type !== "render") return null;
|
|
11388
11400
|
const context = {
|
|
11389
11401
|
actionData: payload.actionData,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
useSearchParams,
|
|
135
135
|
useSubmit,
|
|
136
136
|
useViewTransitionState
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-6AEC5MNZ.mjs";
|
|
138
138
|
export {
|
|
139
139
|
Await,
|
|
140
140
|
BrowserRouter,
|
|
@@ -4,7 +4,7 @@ import { splitCookiesString } from 'set-cookie-parser';
|
|
|
4
4
|
import { UNSAFE_WithRouteComponentProps, UNSAFE_WithErrorBoundaryProps, UNSAFE_WithHydrateFallbackProps } from 'react-router';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* react-router v0.0.0-experimental-
|
|
7
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
8
8
|
*
|
|
9
9
|
* Copyright (c) Remix Software Inc.
|
|
10
10
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -7722,7 +7722,7 @@ function PrefetchPageLinksImpl({
|
|
|
7722
7722
|
if (routesParams.size === 0) {
|
|
7723
7723
|
return [];
|
|
7724
7724
|
}
|
|
7725
|
-
let url = singleFetchUrl(page, basename, "
|
|
7725
|
+
let url = singleFetchUrl(page, basename, "data");
|
|
7726
7726
|
if (foundOptOutRoute && routesParams.size > 0) {
|
|
7727
7727
|
url.searchParams.set(
|
|
7728
7728
|
"_routes",
|
|
@@ -8013,7 +8013,7 @@ function mergeRefs(...refs) {
|
|
|
8013
8013
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8014
8014
|
try {
|
|
8015
8015
|
if (isBrowser) {
|
|
8016
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8016
|
+
window.__reactRouterVersion = "0.0.0-experimental-232861bd9";
|
|
8017
8017
|
}
|
|
8018
8018
|
} catch (e) {
|
|
8019
8019
|
}
|
|
@@ -11202,29 +11202,41 @@ async function routeRSCServerRequest(request, requestServer, decode2, renderHTML
|
|
|
11202
11202
|
if (!serverResponseB.body) {
|
|
11203
11203
|
throw new Error("Failed to clone server response");
|
|
11204
11204
|
}
|
|
11205
|
-
const
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
});
|
|
11213
|
-
}
|
|
11214
|
-
const html = await renderHTML(payload);
|
|
11205
|
+
const body = serverResponse.body;
|
|
11206
|
+
let payloadPromise;
|
|
11207
|
+
const getPayload = async () => {
|
|
11208
|
+
if (payloadPromise) return payloadPromise;
|
|
11209
|
+
payloadPromise = decode2(body);
|
|
11210
|
+
return payloadPromise;
|
|
11211
|
+
};
|
|
11215
11212
|
try {
|
|
11216
|
-
const
|
|
11213
|
+
const html = await renderHTML(getPayload);
|
|
11214
|
+
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
11217
11215
|
const headers = new Headers(serverResponse.headers);
|
|
11218
11216
|
headers.set("Content-Type", "text/html");
|
|
11219
|
-
return new Response(
|
|
11217
|
+
return new Response(body2, {
|
|
11220
11218
|
status: serverResponse.status,
|
|
11221
11219
|
headers
|
|
11222
11220
|
});
|
|
11223
11221
|
} catch (reason) {
|
|
11222
|
+
if (reason instanceof Response) {
|
|
11223
|
+
return reason;
|
|
11224
|
+
}
|
|
11224
11225
|
throw reason;
|
|
11225
11226
|
}
|
|
11226
11227
|
}
|
|
11227
|
-
function RSCStaticRouter({
|
|
11228
|
+
function RSCStaticRouter({
|
|
11229
|
+
getPayload
|
|
11230
|
+
}) {
|
|
11231
|
+
const payload = React15.use(getPayload());
|
|
11232
|
+
if (payload.type === "redirect") {
|
|
11233
|
+
throw new Response(null, {
|
|
11234
|
+
status: payload.status,
|
|
11235
|
+
headers: {
|
|
11236
|
+
Location: payload.location
|
|
11237
|
+
}
|
|
11238
|
+
});
|
|
11239
|
+
}
|
|
11228
11240
|
if (payload.type !== "render") return null;
|
|
11229
11241
|
const context = {
|
|
11230
11242
|
actionData: payload.actionData,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-22PMV7NU.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -814,9 +814,9 @@ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [
|
|
|
814
814
|
*/
|
|
815
815
|
declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
|
|
816
816
|
|
|
817
|
-
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (
|
|
818
|
-
declare function RSCStaticRouter({
|
|
819
|
-
|
|
817
|
+
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
818
|
+
declare function RSCStaticRouter({ getPayload, }: {
|
|
819
|
+
getPayload: () => Promise<ServerPayload>;
|
|
820
820
|
}): React.JSX.Element | null;
|
|
821
821
|
|
|
822
822
|
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
|
|
@@ -814,9 +814,9 @@ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [
|
|
|
814
814
|
*/
|
|
815
815
|
declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
|
|
816
816
|
|
|
817
|
-
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (
|
|
818
|
-
declare function RSCStaticRouter({
|
|
819
|
-
|
|
817
|
+
declare function routeRSCServerRequest(request: Request, requestServer: (request: Request) => Promise<Response>, decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>, renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>): Promise<Response>;
|
|
818
|
+
declare function RSCStaticRouter({ getPayload, }: {
|
|
819
|
+
getPayload: () => Promise<ServerPayload>;
|
|
820
820
|
}): React.JSX.Element | null;
|
|
821
821
|
|
|
822
822
|
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
|
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -7881,7 +7881,7 @@ function PrefetchPageLinksImpl({
|
|
|
7881
7881
|
if (routesParams.size === 0) {
|
|
7882
7882
|
return [];
|
|
7883
7883
|
}
|
|
7884
|
-
let url = singleFetchUrl(page, basename, "
|
|
7884
|
+
let url = singleFetchUrl(page, basename, "data");
|
|
7885
7885
|
if (foundOptOutRoute && routesParams.size > 0) {
|
|
7886
7886
|
url.searchParams.set(
|
|
7887
7887
|
"_routes",
|
|
@@ -8172,7 +8172,7 @@ function mergeRefs(...refs) {
|
|
|
8172
8172
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8173
8173
|
try {
|
|
8174
8174
|
if (isBrowser) {
|
|
8175
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8175
|
+
window.__reactRouterVersion = "0.0.0-experimental-232861bd9";
|
|
8176
8176
|
}
|
|
8177
8177
|
} catch (e) {
|
|
8178
8178
|
}
|
|
@@ -11361,29 +11361,41 @@ async function routeRSCServerRequest(request, requestServer, decode2, renderHTML
|
|
|
11361
11361
|
if (!serverResponseB.body) {
|
|
11362
11362
|
throw new Error("Failed to clone server response");
|
|
11363
11363
|
}
|
|
11364
|
-
const
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
});
|
|
11372
|
-
}
|
|
11373
|
-
const html = await renderHTML(payload);
|
|
11364
|
+
const body = serverResponse.body;
|
|
11365
|
+
let payloadPromise;
|
|
11366
|
+
const getPayload = async () => {
|
|
11367
|
+
if (payloadPromise) return payloadPromise;
|
|
11368
|
+
payloadPromise = decode2(body);
|
|
11369
|
+
return payloadPromise;
|
|
11370
|
+
};
|
|
11374
11371
|
try {
|
|
11375
|
-
const
|
|
11372
|
+
const html = await renderHTML(getPayload);
|
|
11373
|
+
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
11376
11374
|
const headers = new Headers(serverResponse.headers);
|
|
11377
11375
|
headers.set("Content-Type", "text/html");
|
|
11378
|
-
return new Response(
|
|
11376
|
+
return new Response(body2, {
|
|
11379
11377
|
status: serverResponse.status,
|
|
11380
11378
|
headers
|
|
11381
11379
|
});
|
|
11382
11380
|
} catch (reason) {
|
|
11381
|
+
if (reason instanceof Response) {
|
|
11382
|
+
return reason;
|
|
11383
|
+
}
|
|
11383
11384
|
throw reason;
|
|
11384
11385
|
}
|
|
11385
11386
|
}
|
|
11386
|
-
function RSCStaticRouter({
|
|
11387
|
+
function RSCStaticRouter({
|
|
11388
|
+
getPayload
|
|
11389
|
+
}) {
|
|
11390
|
+
const payload = React15.use(getPayload());
|
|
11391
|
+
if (payload.type === "redirect") {
|
|
11392
|
+
throw new Response(null, {
|
|
11393
|
+
status: payload.status,
|
|
11394
|
+
headers: {
|
|
11395
|
+
Location: payload.location
|
|
11396
|
+
}
|
|
11397
|
+
});
|
|
11398
|
+
}
|
|
11387
11399
|
if (payload.type !== "render") return null;
|
|
11388
11400
|
const context = {
|
|
11389
11401
|
actionData: payload.actionData,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
useSearchParams,
|
|
135
135
|
useSubmit,
|
|
136
136
|
useViewTransitionState
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-22PMV7NU.mjs";
|
|
138
138
|
export {
|
|
139
139
|
Await,
|
|
140
140
|
BrowserRouter,
|
|
@@ -4,7 +4,7 @@ import { splitCookiesString } from 'set-cookie-parser';
|
|
|
4
4
|
import { UNSAFE_WithRouteComponentProps, UNSAFE_WithErrorBoundaryProps, UNSAFE_WithHydrateFallbackProps } from 'react-router';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* react-router v0.0.0-experimental-
|
|
7
|
+
* react-router v0.0.0-experimental-232861bd9
|
|
8
8
|
*
|
|
9
9
|
* Copyright (c) Remix Software Inc.
|
|
10
10
|
*
|