react-router 0.0.0-experimental-c1f0daeff → 0.0.0-experimental-1fcc8eb1d
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-QXUAVHMA.mjs → chunk-5QBUC2DR.mjs} +14 -2
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.js +14 -2
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/rsc-export.js +10 -1
- package/dist/development/rsc-export.mjs +10 -1
- package/dist/production/{chunk-BA2GDMEQ.mjs → chunk-JCSCMN5T.mjs} +14 -2
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.js +14 -2
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/rsc-export.js +10 -1
- package/dist/production/rsc-export.mjs +10 -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-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8794,7 +8794,7 @@ function mergeRefs(...refs) {
|
|
|
8794
8794
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8795
8795
|
try {
|
|
8796
8796
|
if (isBrowser) {
|
|
8797
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8797
|
+
window.__reactRouterVersion = "0.0.0-experimental-1fcc8eb1d";
|
|
8798
8798
|
}
|
|
8799
8799
|
} catch (e) {
|
|
8800
8800
|
}
|
|
@@ -11498,6 +11498,8 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
11498
11498
|
}
|
|
11499
11499
|
|
|
11500
11500
|
// lib/rsc/browser.tsx
|
|
11501
|
+
var neverResolvedPromise = new Promise(() => {
|
|
11502
|
+
});
|
|
11501
11503
|
function createCallServer({
|
|
11502
11504
|
decode: decode2,
|
|
11503
11505
|
encodeAction
|
|
@@ -11517,6 +11519,16 @@ function createCallServer({
|
|
|
11517
11519
|
throw new Error("No response body");
|
|
11518
11520
|
}
|
|
11519
11521
|
const payload = await decode2(response.body);
|
|
11522
|
+
if (payload.type === "redirect") {
|
|
11523
|
+
if (payload.reload) {
|
|
11524
|
+
window.location.href = payload.location;
|
|
11525
|
+
return;
|
|
11526
|
+
}
|
|
11527
|
+
window.__router.navigate(payload.location, {
|
|
11528
|
+
replace: payload.replace
|
|
11529
|
+
});
|
|
11530
|
+
return neverResolvedPromise;
|
|
11531
|
+
}
|
|
11520
11532
|
if (payload.type !== "action") {
|
|
11521
11533
|
throw new Error("Unexpected payload type");
|
|
11522
11534
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
invariant,
|
|
27
27
|
mapRouteProperties,
|
|
28
28
|
useFogOFWarDiscovery
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5QBUC2DR.mjs";
|
|
30
30
|
|
|
31
31
|
// lib/dom-export/dom-router-provider.tsx
|
|
32
32
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8953,7 +8953,7 @@ function mergeRefs(...refs) {
|
|
|
8953
8953
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8954
8954
|
try {
|
|
8955
8955
|
if (isBrowser) {
|
|
8956
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8956
|
+
window.__reactRouterVersion = "0.0.0-experimental-1fcc8eb1d";
|
|
8957
8957
|
}
|
|
8958
8958
|
} catch (e) {
|
|
8959
8959
|
}
|
|
@@ -11657,6 +11657,8 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
11657
11657
|
}
|
|
11658
11658
|
|
|
11659
11659
|
// lib/rsc/browser.tsx
|
|
11660
|
+
var neverResolvedPromise = new Promise(() => {
|
|
11661
|
+
});
|
|
11660
11662
|
function createCallServer({
|
|
11661
11663
|
decode: decode2,
|
|
11662
11664
|
encodeAction
|
|
@@ -11676,6 +11678,16 @@ function createCallServer({
|
|
|
11676
11678
|
throw new Error("No response body");
|
|
11677
11679
|
}
|
|
11678
11680
|
const payload = await decode2(response.body);
|
|
11681
|
+
if (payload.type === "redirect") {
|
|
11682
|
+
if (payload.reload) {
|
|
11683
|
+
window.location.href = payload.location;
|
|
11684
|
+
return;
|
|
11685
|
+
}
|
|
11686
|
+
window.__router.navigate(payload.location, {
|
|
11687
|
+
replace: payload.replace
|
|
11688
|
+
});
|
|
11689
|
+
return neverResolvedPromise;
|
|
11690
|
+
}
|
|
11679
11691
|
if (payload.type !== "action") {
|
|
11680
11692
|
throw new Error("Unexpected payload type");
|
|
11681
11693
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
withComponentProps,
|
|
135
135
|
withErrorBoundaryProps,
|
|
136
136
|
withHydrateFallbackProps
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-5QBUC2DR.mjs";
|
|
138
138
|
export {
|
|
139
139
|
Await,
|
|
140
140
|
BrowserRouter,
|
|
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* react-router v0.0.0-experimental-
|
|
28
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
29
29
|
*
|
|
30
30
|
* Copyright (c) Remix Software Inc.
|
|
31
31
|
*
|
|
@@ -2526,6 +2526,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2526
2526
|
try {
|
|
2527
2527
|
await actionResult;
|
|
2528
2528
|
} catch (error) {
|
|
2529
|
+
if (isResponse(error)) {
|
|
2530
|
+
return error;
|
|
2531
|
+
}
|
|
2529
2532
|
onError?.(error);
|
|
2530
2533
|
}
|
|
2531
2534
|
return {
|
|
@@ -2545,6 +2548,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2545
2548
|
try {
|
|
2546
2549
|
await action();
|
|
2547
2550
|
} catch (error) {
|
|
2551
|
+
if (isResponse(error)) {
|
|
2552
|
+
return error;
|
|
2553
|
+
}
|
|
2548
2554
|
onError?.(error);
|
|
2549
2555
|
}
|
|
2550
2556
|
return {
|
|
@@ -2581,6 +2587,9 @@ async function generateRenderResponse(request, routes, decodeCallServer, decodeF
|
|
|
2581
2587
|
decodeFormAction,
|
|
2582
2588
|
onError
|
|
2583
2589
|
);
|
|
2590
|
+
if (isResponse(result2)) {
|
|
2591
|
+
return generateRedirectResponse(statusCode, result2, generateResponse);
|
|
2592
|
+
}
|
|
2584
2593
|
actionResult = result2?.actionResult;
|
|
2585
2594
|
request = result2?.revalidationRequest ?? request;
|
|
2586
2595
|
}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { splitCookiesString } from 'set-cookie-parser';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* react-router v0.0.0-experimental-
|
|
6
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Remix Software Inc.
|
|
9
9
|
*
|
|
@@ -2504,6 +2504,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2504
2504
|
try {
|
|
2505
2505
|
await actionResult;
|
|
2506
2506
|
} catch (error) {
|
|
2507
|
+
if (isResponse(error)) {
|
|
2508
|
+
return error;
|
|
2509
|
+
}
|
|
2507
2510
|
onError?.(error);
|
|
2508
2511
|
}
|
|
2509
2512
|
return {
|
|
@@ -2523,6 +2526,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2523
2526
|
try {
|
|
2524
2527
|
await action();
|
|
2525
2528
|
} catch (error) {
|
|
2529
|
+
if (isResponse(error)) {
|
|
2530
|
+
return error;
|
|
2531
|
+
}
|
|
2526
2532
|
onError?.(error);
|
|
2527
2533
|
}
|
|
2528
2534
|
return {
|
|
@@ -2559,6 +2565,9 @@ async function generateRenderResponse(request, routes, decodeCallServer, decodeF
|
|
|
2559
2565
|
decodeFormAction,
|
|
2560
2566
|
onError
|
|
2561
2567
|
);
|
|
2568
|
+
if (isResponse(result2)) {
|
|
2569
|
+
return generateRedirectResponse(statusCode, result2, generateResponse);
|
|
2570
|
+
}
|
|
2562
2571
|
actionResult = result2?.actionResult;
|
|
2563
2572
|
request = result2?.revalidationRequest ?? request;
|
|
2564
2573
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8794,7 +8794,7 @@ function mergeRefs(...refs) {
|
|
|
8794
8794
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8795
8795
|
try {
|
|
8796
8796
|
if (isBrowser) {
|
|
8797
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8797
|
+
window.__reactRouterVersion = "0.0.0-experimental-1fcc8eb1d";
|
|
8798
8798
|
}
|
|
8799
8799
|
} catch (e) {
|
|
8800
8800
|
}
|
|
@@ -11498,6 +11498,8 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
11498
11498
|
}
|
|
11499
11499
|
|
|
11500
11500
|
// lib/rsc/browser.tsx
|
|
11501
|
+
var neverResolvedPromise = new Promise(() => {
|
|
11502
|
+
});
|
|
11501
11503
|
function createCallServer({
|
|
11502
11504
|
decode: decode2,
|
|
11503
11505
|
encodeAction
|
|
@@ -11517,6 +11519,16 @@ function createCallServer({
|
|
|
11517
11519
|
throw new Error("No response body");
|
|
11518
11520
|
}
|
|
11519
11521
|
const payload = await decode2(response.body);
|
|
11522
|
+
if (payload.type === "redirect") {
|
|
11523
|
+
if (payload.reload) {
|
|
11524
|
+
window.location.href = payload.location;
|
|
11525
|
+
return;
|
|
11526
|
+
}
|
|
11527
|
+
window.__router.navigate(payload.location, {
|
|
11528
|
+
replace: payload.replace
|
|
11529
|
+
});
|
|
11530
|
+
return neverResolvedPromise;
|
|
11531
|
+
}
|
|
11520
11532
|
if (payload.type !== "action") {
|
|
11521
11533
|
throw new Error("Unexpected payload type");
|
|
11522
11534
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
invariant,
|
|
27
27
|
mapRouteProperties,
|
|
28
28
|
useFogOFWarDiscovery
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JCSCMN5T.mjs";
|
|
30
30
|
|
|
31
31
|
// lib/dom-export/dom-router-provider.tsx
|
|
32
32
|
import * as React from "react";
|
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-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8953,7 +8953,7 @@ function mergeRefs(...refs) {
|
|
|
8953
8953
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8954
8954
|
try {
|
|
8955
8955
|
if (isBrowser) {
|
|
8956
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8956
|
+
window.__reactRouterVersion = "0.0.0-experimental-1fcc8eb1d";
|
|
8957
8957
|
}
|
|
8958
8958
|
} catch (e) {
|
|
8959
8959
|
}
|
|
@@ -11657,6 +11657,8 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
11657
11657
|
}
|
|
11658
11658
|
|
|
11659
11659
|
// lib/rsc/browser.tsx
|
|
11660
|
+
var neverResolvedPromise = new Promise(() => {
|
|
11661
|
+
});
|
|
11660
11662
|
function createCallServer({
|
|
11661
11663
|
decode: decode2,
|
|
11662
11664
|
encodeAction
|
|
@@ -11676,6 +11678,16 @@ function createCallServer({
|
|
|
11676
11678
|
throw new Error("No response body");
|
|
11677
11679
|
}
|
|
11678
11680
|
const payload = await decode2(response.body);
|
|
11681
|
+
if (payload.type === "redirect") {
|
|
11682
|
+
if (payload.reload) {
|
|
11683
|
+
window.location.href = payload.location;
|
|
11684
|
+
return;
|
|
11685
|
+
}
|
|
11686
|
+
window.__router.navigate(payload.location, {
|
|
11687
|
+
replace: payload.replace
|
|
11688
|
+
});
|
|
11689
|
+
return neverResolvedPromise;
|
|
11690
|
+
}
|
|
11679
11691
|
if (payload.type !== "action") {
|
|
11680
11692
|
throw new Error("Unexpected payload type");
|
|
11681
11693
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
withComponentProps,
|
|
135
135
|
withErrorBoundaryProps,
|
|
136
136
|
withHydrateFallbackProps
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-JCSCMN5T.mjs";
|
|
138
138
|
export {
|
|
139
139
|
Await,
|
|
140
140
|
BrowserRouter,
|
|
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* react-router v0.0.0-experimental-
|
|
28
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
29
29
|
*
|
|
30
30
|
* Copyright (c) Remix Software Inc.
|
|
31
31
|
*
|
|
@@ -2526,6 +2526,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2526
2526
|
try {
|
|
2527
2527
|
await actionResult;
|
|
2528
2528
|
} catch (error) {
|
|
2529
|
+
if (isResponse(error)) {
|
|
2530
|
+
return error;
|
|
2531
|
+
}
|
|
2529
2532
|
onError?.(error);
|
|
2530
2533
|
}
|
|
2531
2534
|
return {
|
|
@@ -2545,6 +2548,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2545
2548
|
try {
|
|
2546
2549
|
await action();
|
|
2547
2550
|
} catch (error) {
|
|
2551
|
+
if (isResponse(error)) {
|
|
2552
|
+
return error;
|
|
2553
|
+
}
|
|
2548
2554
|
onError?.(error);
|
|
2549
2555
|
}
|
|
2550
2556
|
return {
|
|
@@ -2581,6 +2587,9 @@ async function generateRenderResponse(request, routes, decodeCallServer, decodeF
|
|
|
2581
2587
|
decodeFormAction,
|
|
2582
2588
|
onError
|
|
2583
2589
|
);
|
|
2590
|
+
if (isResponse(result2)) {
|
|
2591
|
+
return generateRedirectResponse(statusCode, result2, generateResponse);
|
|
2592
|
+
}
|
|
2584
2593
|
actionResult = result2?.actionResult;
|
|
2585
2594
|
request = result2?.revalidationRequest ?? request;
|
|
2586
2595
|
}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { splitCookiesString } from 'set-cookie-parser';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* react-router v0.0.0-experimental-
|
|
6
|
+
* react-router v0.0.0-experimental-1fcc8eb1d
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Remix Software Inc.
|
|
9
9
|
*
|
|
@@ -2504,6 +2504,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2504
2504
|
try {
|
|
2505
2505
|
await actionResult;
|
|
2506
2506
|
} catch (error) {
|
|
2507
|
+
if (isResponse(error)) {
|
|
2508
|
+
return error;
|
|
2509
|
+
}
|
|
2507
2510
|
onError?.(error);
|
|
2508
2511
|
}
|
|
2509
2512
|
return {
|
|
@@ -2523,6 +2526,9 @@ async function processServerAction(request, decodeCallServer, decodeFormAction,
|
|
|
2523
2526
|
try {
|
|
2524
2527
|
await action();
|
|
2525
2528
|
} catch (error) {
|
|
2529
|
+
if (isResponse(error)) {
|
|
2530
|
+
return error;
|
|
2531
|
+
}
|
|
2526
2532
|
onError?.(error);
|
|
2527
2533
|
}
|
|
2528
2534
|
return {
|
|
@@ -2559,6 +2565,9 @@ async function generateRenderResponse(request, routes, decodeCallServer, decodeF
|
|
|
2559
2565
|
decodeFormAction,
|
|
2560
2566
|
onError
|
|
2561
2567
|
);
|
|
2568
|
+
if (isResponse(result2)) {
|
|
2569
|
+
return generateRedirectResponse(statusCode, result2, generateResponse);
|
|
2570
|
+
}
|
|
2562
2571
|
actionResult = result2?.actionResult;
|
|
2563
2572
|
request = result2?.revalidationRequest ?? request;
|
|
2564
2573
|
}
|