react-router 7.7.1 → 7.8.0-pre.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +81 -5
  2. package/dist/development/browser-z32v5KVN.d.mts +46 -0
  3. package/dist/{production/chunk-K3SBCRK4.mjs → development/chunk-HSC5IU24.mjs} +177 -134
  4. package/dist/development/{chunk-K7YFBME3.js → chunk-IW6UADHO.js} +250 -187
  5. package/dist/development/{chunk-C37GKA54.mjs → chunk-SC4OUYO4.mjs} +232 -169
  6. package/dist/development/{chunk-R73PQUJU.js → chunk-Z4NNCWGU.js} +130 -130
  7. package/dist/development/{components-CjQijYga.d.mts → components-uUh0svuC.d.mts} +33 -21
  8. package/dist/{production/route-data-CqEmXQub.d.mts → development/context-DZWGFcKX.d.mts} +312 -524
  9. package/dist/development/dom-export.d.mts +16 -12
  10. package/dist/development/dom-export.d.ts +13 -8
  11. package/dist/development/dom-export.js +3 -3
  12. package/dist/development/dom-export.mjs +3 -3
  13. package/dist/{production/index-react-server-client-KLg-U4nr.d.mts → development/index-react-server-client-BUK-oRcG.d.mts} +327 -200
  14. package/dist/development/{index-react-server-client-Bi_fx8qz.d.ts → index-react-server-client-DSU6bZil.d.ts} +357 -219
  15. package/dist/development/index-react-server-client.d.mts +4 -3
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +291 -70
  20. package/dist/development/index-react-server.d.ts +291 -70
  21. package/dist/development/index-react-server.js +174 -180
  22. package/dist/development/index-react-server.mjs +174 -180
  23. package/dist/development/index.d.mts +294 -86
  24. package/dist/development/index.d.ts +136 -105
  25. package/dist/development/index.js +258 -215
  26. package/dist/development/index.mjs +3 -3
  27. package/dist/development/lib/types/internal.d.mts +13 -2
  28. package/dist/development/lib/types/internal.d.ts +12 -2
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/development/route-data-UTmTa8an.d.mts +473 -0
  32. package/dist/{production/routeModules-BR2FO0ix.d.ts → development/routeModules-D5bppTB2.d.ts} +325 -67
  33. package/dist/production/browser-z32v5KVN.d.mts +46 -0
  34. package/dist/production/{chunk-4DGLNKXF.js → chunk-BCLZG6QW.js} +130 -130
  35. package/dist/{development/chunk-KIUJAIYX.mjs → production/chunk-KQ5567DT.mjs} +177 -134
  36. package/dist/production/{chunk-IZ57JD2V.mjs → chunk-X2NPJMV2.mjs} +232 -169
  37. package/dist/production/{chunk-7OQROU2D.js → chunk-YC2ENCM3.js} +250 -187
  38. package/dist/production/{components-CjQijYga.d.mts → components-uUh0svuC.d.mts} +33 -21
  39. package/dist/{development/route-data-CqEmXQub.d.mts → production/context-DZWGFcKX.d.mts} +312 -524
  40. package/dist/production/dom-export.d.mts +16 -12
  41. package/dist/production/dom-export.d.ts +13 -8
  42. package/dist/production/dom-export.js +3 -3
  43. package/dist/production/dom-export.mjs +3 -3
  44. package/dist/{development/index-react-server-client-KLg-U4nr.d.mts → production/index-react-server-client-BUK-oRcG.d.mts} +327 -200
  45. package/dist/production/{index-react-server-client-Bi_fx8qz.d.ts → index-react-server-client-DSU6bZil.d.ts} +357 -219
  46. package/dist/production/index-react-server-client.d.mts +4 -3
  47. package/dist/production/index-react-server-client.d.ts +2 -2
  48. package/dist/production/index-react-server-client.js +4 -4
  49. package/dist/production/index-react-server-client.mjs +2 -2
  50. package/dist/production/index-react-server.d.mts +291 -70
  51. package/dist/production/index-react-server.d.ts +291 -70
  52. package/dist/production/index-react-server.js +174 -180
  53. package/dist/production/index-react-server.mjs +174 -180
  54. package/dist/production/index.d.mts +294 -86
  55. package/dist/production/index.d.ts +136 -105
  56. package/dist/production/index.js +258 -215
  57. package/dist/production/index.mjs +3 -3
  58. package/dist/production/lib/types/internal.d.mts +13 -2
  59. package/dist/production/lib/types/internal.d.ts +12 -2
  60. package/dist/production/lib/types/internal.js +1 -1
  61. package/dist/production/lib/types/internal.mjs +1 -1
  62. package/dist/production/route-data-UTmTa8an.d.mts +473 -0
  63. package/dist/{development/routeModules-BR2FO0ix.d.ts → production/routeModules-D5bppTB2.d.ts} +325 -67
  64. package/package.json +1 -1
  65. package/dist/development/browser-7LYX59NK.d.mts +0 -226
  66. 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-CjQijYga.mjs';
3
- import './browser-7LYX59NK.mjs';
4
- import { e as RouterInit } from './route-data-CqEmXQub.mjs';
5
- import 'node:async_hooks';
2
+ import { R as RouterProviderProps$1 } from './components-uUh0svuC.mjs';
3
+ import './browser-z32v5KVN.mjs';
4
+ import { e as RouterInit } from './context-DZWGFcKX.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 `createBrowserRouter` and made available
13
- * to `clientLoader`/`clientActon` functions
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 to hydrate a router from a
19
- * `ServerRouter`. See [`entry.client.tsx`](../api/framework-conventions/entry.client.tsx).
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 Context object to passed through to
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 `createBrowserRouter` and made available
10
- * to `clientLoader`/`clientActon` functions
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 to hydrate a router from a
16
- * `ServerRouter`. See [`entry.client.tsx`](../api/framework-conventions/entry.client.tsx).
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 Context object to passed through to
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.7.1
2
+ * react-router v7.8.0-pre.0
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 _chunk7OQROU2Djs = require('./chunk-7OQROU2D.js');
14
+ var _chunkYC2ENCM3js = require('./chunk-YC2ENCM3.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(`[${_chunk7OQROU2Djs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
183
+ document.querySelectorAll(`[${_chunkYC2ENCM3js.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.7.1
2
+ * react-router v7.8.0-pre.0
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-K3SBCRK4.mjs";
15
+ } from "./chunk-KQ5567DT.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-IZ57JD2V.mjs";
32
+ } from "./chunk-X2NPJMV2.mjs";
33
33
 
34
34
  // lib/dom-export/dom-router-provider.tsx
35
35
  import * as React from "react";