react-router 7.7.1 → 7.8.0-pre.1
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 +87 -5
- package/dist/development/browser-z32v5KVN.d.mts +46 -0
- package/dist/development/{chunk-R73PQUJU.js → chunk-4EVDZJGM.js} +130 -130
- package/dist/{production/chunk-K3SBCRK4.mjs → development/chunk-I22FVTOY.mjs} +177 -134
- package/dist/development/{chunk-K7YFBME3.js → chunk-NGF2R4G7.js} +285 -189
- package/dist/development/{chunk-C37GKA54.mjs → chunk-XFFANEXU.mjs} +266 -170
- package/dist/development/{components-CjQijYga.d.mts → components-CuPfnyiZ.d.mts} +33 -21
- package/dist/{production/route-data-CqEmXQub.d.mts → development/context-DohQKLID.d.mts} +312 -525
- package/dist/development/dom-export.d.mts +16 -12
- package/dist/development/dom-export.d.ts +13 -8
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-Bi_fx8qz.d.ts → index-react-server-client-BzBbJLAD.d.ts} +357 -219
- package/dist/{production/index-react-server-client-KLg-U4nr.d.mts → development/index-react-server-client-CuajY2vy.d.mts} +327 -200
- package/dist/development/index-react-server-client.d.mts +4 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- 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 +291 -71
- package/dist/development/index-react-server.d.ts +291 -71
- package/dist/development/index-react-server.js +209 -182
- package/dist/development/index-react-server.mjs +209 -182
- package/dist/development/index.d.mts +294 -86
- package/dist/development/index.d.ts +136 -105
- package/dist/development/index.js +258 -215
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +13 -2
- package/dist/development/lib/types/internal.d.ts +12 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/route-data-CpB5xtMm.d.mts +473 -0
- package/dist/{production/routeModules-BR2FO0ix.d.ts → development/routeModules-qBivMBjd.d.ts} +325 -68
- package/dist/production/browser-z32v5KVN.d.mts +46 -0
- package/dist/production/{chunk-4DGLNKXF.js → chunk-4PESVXQ2.js} +130 -130
- package/dist/{development/chunk-KIUJAIYX.mjs → production/chunk-JJOMWYJ4.mjs} +177 -134
- package/dist/production/{chunk-IZ57JD2V.mjs → chunk-P2ZJHOXZ.mjs} +266 -170
- package/dist/production/{chunk-7OQROU2D.js → chunk-RLJ23MYZ.js} +285 -189
- package/dist/production/{components-CjQijYga.d.mts → components-CuPfnyiZ.d.mts} +33 -21
- package/dist/{development/route-data-CqEmXQub.d.mts → production/context-DohQKLID.d.mts} +312 -525
- package/dist/production/dom-export.d.mts +16 -12
- package/dist/production/dom-export.d.ts +13 -8
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-Bi_fx8qz.d.ts → index-react-server-client-BzBbJLAD.d.ts} +357 -219
- package/dist/{development/index-react-server-client-KLg-U4nr.d.mts → production/index-react-server-client-CuajY2vy.d.mts} +327 -200
- package/dist/production/index-react-server-client.d.mts +4 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- 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 +291 -71
- package/dist/production/index-react-server.d.ts +291 -71
- package/dist/production/index-react-server.js +209 -182
- package/dist/production/index-react-server.mjs +209 -182
- package/dist/production/index.d.mts +294 -86
- package/dist/production/index.d.ts +136 -105
- package/dist/production/index.js +258 -215
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +13 -2
- package/dist/production/lib/types/internal.d.ts +12 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/route-data-CpB5xtMm.d.mts +473 -0
- package/dist/{development/routeModules-BR2FO0ix.d.ts → production/routeModules-qBivMBjd.d.ts} +325 -68
- package/package.json +1 -1
- package/dist/development/browser-7LYX59NK.d.mts +0 -226
- package/dist/production/browser-7LYX59NK.d.mts +0 -226
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './components-
|
|
3
|
-
import './browser-
|
|
4
|
-
import { e as RouterInit } from './
|
|
5
|
-
import 'node:async_hooks';
|
|
2
|
+
import { R as RouterProviderProps$1 } from './components-CuPfnyiZ.mjs';
|
|
3
|
+
import './browser-z32v5KVN.mjs';
|
|
4
|
+
import { e as RouterInit } from './context-DohQKLID.mjs';
|
|
6
5
|
|
|
7
6
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
8
7
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
9
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Props for the {@link dom.HydratedRouter} component.
|
|
11
|
+
*
|
|
12
|
+
* @category Types
|
|
13
|
+
*/
|
|
10
14
|
interface HydratedRouterProps {
|
|
11
15
|
/**
|
|
12
|
-
* Context object to passed through to
|
|
13
|
-
* to
|
|
16
|
+
* Context object to be passed through to {@link createBrowserRouter} and made
|
|
17
|
+
* available to
|
|
18
|
+
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
|
19
|
+
* functions
|
|
14
20
|
*/
|
|
15
21
|
unstable_getContext?: RouterInit["unstable_getContext"];
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
|
-
* Framework-mode router component to be used to
|
|
19
|
-
*
|
|
24
|
+
* Framework-mode router component to be used to hydrate a router from a
|
|
25
|
+
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
|
20
26
|
*
|
|
21
27
|
* @public
|
|
22
28
|
* @category Framework Routers
|
|
23
29
|
* @mode framework
|
|
24
30
|
* @param props Props
|
|
25
|
-
* @param props.unstable_getContext
|
|
26
|
-
* {@link createBrowserRouter} and made available to `clientLoader`/`clientAction`
|
|
27
|
-
* functions
|
|
31
|
+
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
|
|
28
32
|
* @returns A React element that represents the hydrated application.
|
|
29
33
|
*/
|
|
30
34
|
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
|
31
35
|
|
|
32
|
-
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
|
36
|
+
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };
|
|
@@ -4,26 +4,31 @@ import { RouterProviderProps as RouterProviderProps$1, RouterInit } from 'react-
|
|
|
4
4
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
5
5
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Props for the {@link dom.HydratedRouter} component.
|
|
9
|
+
*
|
|
10
|
+
* @category Types
|
|
11
|
+
*/
|
|
7
12
|
interface HydratedRouterProps {
|
|
8
13
|
/**
|
|
9
|
-
* Context object to passed through to
|
|
10
|
-
* to
|
|
14
|
+
* Context object to be passed through to {@link createBrowserRouter} and made
|
|
15
|
+
* available to
|
|
16
|
+
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
|
17
|
+
* functions
|
|
11
18
|
*/
|
|
12
19
|
unstable_getContext?: RouterInit["unstable_getContext"];
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
|
-
* Framework-mode router component to be used to
|
|
16
|
-
*
|
|
22
|
+
* Framework-mode router component to be used to hydrate a router from a
|
|
23
|
+
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
|
17
24
|
*
|
|
18
25
|
* @public
|
|
19
26
|
* @category Framework Routers
|
|
20
27
|
* @mode framework
|
|
21
28
|
* @param props Props
|
|
22
|
-
* @param props.unstable_getContext
|
|
23
|
-
* {@link createBrowserRouter} and made available to `clientLoader`/`clientAction`
|
|
24
|
-
* functions
|
|
29
|
+
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
|
|
25
30
|
* @returns A React element that represents the hydrated application.
|
|
26
31
|
*/
|
|
27
32
|
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
|
28
33
|
|
|
29
|
-
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
|
34
|
+
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };
|
|
@@ -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 _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 v7.
|
|
2
|
+
* react-router v7.8.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"use client";
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkNGF2R4G7js = require('./chunk-NGF2R4G7.js');
|
|
15
15
|
|
|
16
16
|
// lib/dom-export/dom-router-provider.tsx
|
|
17
17
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
|
|
@@ -180,7 +180,7 @@ function HydratedRouter(props) {
|
|
|
180
180
|
}, []);
|
|
181
181
|
React2.useEffect(() => {
|
|
182
182
|
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
|
183
|
-
document.querySelectorAll(`[${
|
|
183
|
+
document.querySelectorAll(`[${_chunkNGF2R4G7js.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
|
184
184
|
}
|
|
185
185
|
}, [criticalCss]);
|
|
186
186
|
let [location, setLocation] = React2.useState(router.state.location);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.8.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import {
|
|
13
13
|
deserializeErrors,
|
|
14
14
|
getHydrationData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-I22FVTOY.mjs";
|
|
16
16
|
import {
|
|
17
17
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
18
18
|
FrameworkContext,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
invariant,
|
|
30
30
|
mapRouteProperties,
|
|
31
31
|
useFogOFWarDiscovery
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XFFANEXU.mjs";
|
|
33
33
|
|
|
34
34
|
// lib/dom-export/dom-router-provider.tsx
|
|
35
35
|
import * as React from "react";
|