react-router 7.7.0-pre.1 → 7.7.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 -7
- package/dist/development/{browser-BSrXyLft.d.mts → browser-CcxeZJcQ.d.mts} +3 -30
- package/dist/development/{chunk-6ZHKKNZG.js → chunk-4ADB4KIO.js} +170 -140
- package/dist/development/{chunk-YNUF36W5.mjs → chunk-EF7DTUVF.mjs} +52 -22
- package/dist/{production/chunk-KZZC37RO.mjs → development/chunk-T3VM44WY.mjs} +31 -26
- package/dist/development/{chunk-Z7T4GLA7.js → chunk-V6PEDDZI.js} +1 -1
- package/dist/development/components-DzqPLVI1.d.mts +464 -0
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-DOK8MfYF.d.mts → development/index-react-server-client-CUidsuu_.d.mts} +2 -2
- package/dist/development/{index-react-server-client-LrDNRnlX.d.ts → index-react-server-client-kY8DvDF3.d.ts} +177 -529
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +10 -4
- package/dist/development/index-react-server-client.mjs +9 -3
- package/dist/development/index-react-server.js +20 -6
- package/dist/development/index-react-server.mjs +21 -6
- package/dist/development/index.d.mts +396 -9
- package/dist/development/index.d.ts +372 -12
- package/dist/development/index.js +131 -120
- package/dist/development/index.mjs +9 -3
- package/dist/development/lib/types/internal.d.mts +1 -1
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/route-data-DAw7Esur.d.mts → development/route-data-DjzmHYNR.d.mts} +1 -1
- package/dist/{production/route-data-7aXBQ4I3.d.ts → development/routeModules-g5PTiDfO.d.ts} +156 -156
- package/dist/production/{browser-BSrXyLft.d.mts → browser-CcxeZJcQ.d.mts} +3 -30
- package/dist/production/{chunk-W77PDD2Y.js → chunk-2TYFPE3B.js} +170 -140
- package/dist/production/{chunk-SH44XSL4.js → chunk-5KHO4FML.js} +1 -1
- package/dist/{development/chunk-YP7CIEHK.mjs → production/chunk-GNZILI6H.mjs} +31 -26
- package/dist/production/{chunk-4FKAWASN.mjs → chunk-WPPIQDYG.mjs} +52 -22
- package/dist/production/components-DzqPLVI1.d.mts +464 -0
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-DOK8MfYF.d.mts → production/index-react-server-client-CUidsuu_.d.mts} +2 -2
- package/dist/production/{index-react-server-client-LrDNRnlX.d.ts → index-react-server-client-kY8DvDF3.d.ts} +177 -529
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +10 -4
- package/dist/production/index-react-server-client.mjs +9 -3
- package/dist/production/index-react-server.js +20 -6
- package/dist/production/index-react-server.mjs +21 -6
- package/dist/production/index.d.mts +396 -9
- package/dist/production/index.d.ts +372 -12
- package/dist/production/index.js +131 -120
- package/dist/production/index.mjs +9 -3
- package/dist/production/lib/types/internal.d.mts +1 -1
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/route-data-DAw7Esur.d.mts → production/route-data-DjzmHYNR.d.mts} +1 -1
- package/dist/{development/route-data-7aXBQ4I3.d.ts → production/routeModules-g5PTiDfO.d.ts} +156 -156
- package/package.json +1 -1
- package/dist/development/components-IaVqGBuO.d.mts +0 -816
- package/dist/production/components-IaVqGBuO.d.mts +0 -816
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes } from './components-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
3
|
-
import './route-data-
|
|
1
|
+
export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps } from './components-DzqPLVI1.mjs';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-CUidsuu_.mjs';
|
|
3
|
+
import './route-data-DjzmHYNR.mjs';
|
|
4
4
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { h as Await,
|
|
2
|
-
import './
|
|
1
|
+
export { h as Await, V as BrowserRouter, _ as Form, W as HashRouter, X as Link, am as Links, i as MemoryRouter, al as Meta, Z as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, $ as ScrollRestoration, aj as StaticRouter, ak as StaticRouterProvider, aw as UNSAFE_WithComponentProps, aA as UNSAFE_WithErrorBoundaryProps, ay as UNSAFE_WithHydrateFallbackProps, Y as unstable_HistoryRouter } from './index-react-server-client-kY8DvDF3.js';
|
|
2
|
+
import './routeModules-g5PTiDfO.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.7.0
|
|
2
|
+
* react-router v7.7.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var _chunk6ZHKKNZGjs = require('./chunk-6ZHKKNZG.js');
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
var
|
|
33
|
+
var _chunk4ADB4KIOjs = require('./chunk-4ADB4KIO.js');
|
|
35
34
|
|
|
36
35
|
|
|
37
36
|
|
|
37
|
+
var _chunkV6PEDDZIjs = require('./chunk-V6PEDDZI.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -52,4 +52,10 @@ var _chunkZ7T4GLA7js = require('./chunk-Z7T4GLA7.js');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
exports.Await = _chunk4ADB4KIOjs.Await; exports.BrowserRouter = _chunk4ADB4KIOjs.BrowserRouter; exports.Form = _chunk4ADB4KIOjs.Form; exports.HashRouter = _chunk4ADB4KIOjs.HashRouter; exports.Link = _chunk4ADB4KIOjs.Link; exports.Links = _chunkV6PEDDZIjs.Links; exports.MemoryRouter = _chunk4ADB4KIOjs.MemoryRouter; exports.Meta = _chunkV6PEDDZIjs.Meta; exports.NavLink = _chunk4ADB4KIOjs.NavLink; exports.Navigate = _chunk4ADB4KIOjs.Navigate; exports.Outlet = _chunk4ADB4KIOjs.Outlet; exports.Route = _chunk4ADB4KIOjs.Route; exports.Router = _chunk4ADB4KIOjs.Router; exports.RouterProvider = _chunk4ADB4KIOjs.RouterProvider; exports.Routes = _chunk4ADB4KIOjs.Routes; exports.ScrollRestoration = _chunk4ADB4KIOjs.ScrollRestoration; exports.StaticRouter = _chunk4ADB4KIOjs.StaticRouter; exports.StaticRouterProvider = _chunk4ADB4KIOjs.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunk4ADB4KIOjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4ADB4KIOjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4ADB4KIOjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk4ADB4KIOjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.7.0
|
|
2
|
+
* react-router v7.7.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -28,8 +28,11 @@ import {
|
|
|
28
28
|
Routes,
|
|
29
29
|
ScrollRestoration,
|
|
30
30
|
StaticRouter,
|
|
31
|
-
StaticRouterProvider
|
|
32
|
-
|
|
31
|
+
StaticRouterProvider,
|
|
32
|
+
WithComponentProps,
|
|
33
|
+
WithErrorBoundaryProps,
|
|
34
|
+
WithHydrateFallbackProps
|
|
35
|
+
} from "./chunk-EF7DTUVF.mjs";
|
|
33
36
|
export {
|
|
34
37
|
Await,
|
|
35
38
|
BrowserRouter,
|
|
@@ -49,5 +52,8 @@ export {
|
|
|
49
52
|
ScrollRestoration,
|
|
50
53
|
StaticRouter,
|
|
51
54
|
StaticRouterProvider,
|
|
55
|
+
WithComponentProps as UNSAFE_WithComponentProps,
|
|
56
|
+
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
|
57
|
+
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
|
52
58
|
HistoryRouter as unstable_HistoryRouter
|
|
53
59
|
};
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.7.0
|
|
30
|
+
* react-router v7.7.0
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -2130,8 +2130,9 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
}
|
|
2132
2132
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2133
|
-
|
|
2134
|
-
|
|
2133
|
+
var WithComponentProps = reactServerClient.UNSAFE_WithComponentProps;
|
|
2134
|
+
var WithErrorBoundaryProps = reactServerClient.UNSAFE_WithErrorBoundaryProps;
|
|
2135
|
+
var WithHydrateFallbackProps = reactServerClient.UNSAFE_WithHydrateFallbackProps;
|
|
2135
2136
|
var globalVar = typeof globalThis !== "undefined" ? globalThis : global;
|
|
2136
2137
|
var ServerStorage = globalVar.___reactRouterServerStorage___ ?? (globalVar.___reactRouterServerStorage___ = new node_async_hooks.AsyncLocalStorage());
|
|
2137
2138
|
var redirect2 = (...args) => {
|
|
@@ -2629,7 +2630,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2629
2630
|
const element = Component && shouldRenderComponent ? React2__namespace.createElement(
|
|
2630
2631
|
Layout,
|
|
2631
2632
|
null,
|
|
2632
|
-
React2__namespace.createElement(
|
|
2633
|
+
isClientReference(Component) ? React2__namespace.createElement(WithComponentProps, {
|
|
2634
|
+
children: React2__namespace.createElement(Component)
|
|
2635
|
+
}) : React2__namespace.createElement(Component, {
|
|
2633
2636
|
loaderData,
|
|
2634
2637
|
actionData,
|
|
2635
2638
|
params,
|
|
@@ -2648,7 +2651,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2648
2651
|
const errorElement = ErrorBoundary ? React2__namespace.createElement(
|
|
2649
2652
|
Layout,
|
|
2650
2653
|
null,
|
|
2651
|
-
React2__namespace.createElement(
|
|
2654
|
+
isClientReference(ErrorBoundary) ? React2__namespace.createElement(WithErrorBoundaryProps, {
|
|
2655
|
+
children: React2__namespace.createElement(ErrorBoundary)
|
|
2656
|
+
}) : React2__namespace.createElement(ErrorBoundary, {
|
|
2652
2657
|
loaderData,
|
|
2653
2658
|
actionData,
|
|
2654
2659
|
params,
|
|
@@ -2658,7 +2663,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2658
2663
|
const hydrateFallbackElement = HydrateFallback ? React2__namespace.createElement(
|
|
2659
2664
|
Layout,
|
|
2660
2665
|
null,
|
|
2661
|
-
React2__namespace.createElement(
|
|
2666
|
+
isClientReference(HydrateFallback) ? React2__namespace.createElement(WithHydrateFallbackProps, {
|
|
2667
|
+
children: React2__namespace.createElement(HydrateFallback)
|
|
2668
|
+
}) : React2__namespace.createElement(HydrateFallback, {
|
|
2662
2669
|
loaderData,
|
|
2663
2670
|
actionData,
|
|
2664
2671
|
params
|
|
@@ -2770,6 +2777,13 @@ function isReactServerRequest(url) {
|
|
|
2770
2777
|
function isManifestRequest(url) {
|
|
2771
2778
|
return url.pathname.endsWith(".manifest");
|
|
2772
2779
|
}
|
|
2780
|
+
function isClientReference(x) {
|
|
2781
|
+
try {
|
|
2782
|
+
return x.$$typeof === Symbol.for("react.client.reference");
|
|
2783
|
+
} catch {
|
|
2784
|
+
return false;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2773
2787
|
function canDecodeWithFormData(contentType) {
|
|
2774
2788
|
if (!contentType) return false;
|
|
2775
2789
|
return contentType.match(/\bapplication\/x-www-form-urlencoded\b/) || contentType.match(/\bmultipart\/form-data\b/);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import * as React2 from 'react';
|
|
3
3
|
import { splitCookiesString } from 'set-cookie-parser';
|
|
4
|
+
import { UNSAFE_WithComponentProps, UNSAFE_WithErrorBoundaryProps, UNSAFE_WithHydrateFallbackProps } from 'react-router/internal/react-server-client';
|
|
4
5
|
export { Await, BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Outlet, Route, Router, RouterProvider, Routes, ScrollRestoration, StaticRouter, StaticRouterProvider, unstable_HistoryRouter } from 'react-router/internal/react-server-client';
|
|
5
6
|
import { serialize, parse } from 'cookie';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
|
-
* react-router v7.7.0
|
|
9
|
+
* react-router v7.7.0
|
|
9
10
|
*
|
|
10
11
|
* Copyright (c) Remix Software Inc.
|
|
11
12
|
*
|
|
@@ -2108,8 +2109,9 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2108
2109
|
}
|
|
2109
2110
|
}
|
|
2110
2111
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2111
|
-
|
|
2112
|
-
|
|
2112
|
+
var WithComponentProps = UNSAFE_WithComponentProps;
|
|
2113
|
+
var WithErrorBoundaryProps = UNSAFE_WithErrorBoundaryProps;
|
|
2114
|
+
var WithHydrateFallbackProps = UNSAFE_WithHydrateFallbackProps;
|
|
2113
2115
|
var globalVar = typeof globalThis !== "undefined" ? globalThis : global;
|
|
2114
2116
|
var ServerStorage = globalVar.___reactRouterServerStorage___ ?? (globalVar.___reactRouterServerStorage___ = new AsyncLocalStorage());
|
|
2115
2117
|
var redirect2 = (...args) => {
|
|
@@ -2607,7 +2609,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2607
2609
|
const element = Component && shouldRenderComponent ? React2.createElement(
|
|
2608
2610
|
Layout,
|
|
2609
2611
|
null,
|
|
2610
|
-
React2.createElement(
|
|
2612
|
+
isClientReference(Component) ? React2.createElement(WithComponentProps, {
|
|
2613
|
+
children: React2.createElement(Component)
|
|
2614
|
+
}) : React2.createElement(Component, {
|
|
2611
2615
|
loaderData,
|
|
2612
2616
|
actionData,
|
|
2613
2617
|
params,
|
|
@@ -2626,7 +2630,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2626
2630
|
const errorElement = ErrorBoundary ? React2.createElement(
|
|
2627
2631
|
Layout,
|
|
2628
2632
|
null,
|
|
2629
|
-
React2.createElement(
|
|
2633
|
+
isClientReference(ErrorBoundary) ? React2.createElement(WithErrorBoundaryProps, {
|
|
2634
|
+
children: React2.createElement(ErrorBoundary)
|
|
2635
|
+
}) : React2.createElement(ErrorBoundary, {
|
|
2630
2636
|
loaderData,
|
|
2631
2637
|
actionData,
|
|
2632
2638
|
params,
|
|
@@ -2636,7 +2642,9 @@ async function getRSCRouteMatch(staticContext, match, shouldRenderComponent, par
|
|
|
2636
2642
|
const hydrateFallbackElement = HydrateFallback ? React2.createElement(
|
|
2637
2643
|
Layout,
|
|
2638
2644
|
null,
|
|
2639
|
-
React2.createElement(
|
|
2645
|
+
isClientReference(HydrateFallback) ? React2.createElement(WithHydrateFallbackProps, {
|
|
2646
|
+
children: React2.createElement(HydrateFallback)
|
|
2647
|
+
}) : React2.createElement(HydrateFallback, {
|
|
2640
2648
|
loaderData,
|
|
2641
2649
|
actionData,
|
|
2642
2650
|
params
|
|
@@ -2748,6 +2756,13 @@ function isReactServerRequest(url) {
|
|
|
2748
2756
|
function isManifestRequest(url) {
|
|
2749
2757
|
return url.pathname.endsWith(".manifest");
|
|
2750
2758
|
}
|
|
2759
|
+
function isClientReference(x) {
|
|
2760
|
+
try {
|
|
2761
|
+
return x.$$typeof === Symbol.for("react.client.reference");
|
|
2762
|
+
} catch {
|
|
2763
|
+
return false;
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2751
2766
|
function canDecodeWithFormData(contentType) {
|
|
2752
2767
|
if (!contentType) return false;
|
|
2753
2768
|
return contentType.match(/\bapplication\/x-www-form-urlencoded\b/) || contentType.match(/\bmultipart\/form-data\b/);
|