react-router 0.0.0-experimental-e0b6ce9 → 0.0.0-experimental-de3b900

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 (76) hide show
  1. package/CHANGELOG.md +105 -0
  2. package/dist/development/browser-B4aBBnx8.d.ts +310 -0
  3. package/dist/development/browser-CN2w9Cbu.d.mts +310 -0
  4. package/dist/development/{chunk-4FI4BC6Y.mjs → chunk-5VDQAMOM.mjs} +181 -873
  5. package/dist/development/chunk-JEIV2ESS.js +1308 -0
  6. package/dist/development/{chunk-INO4IHBF.js → chunk-K3XLKYJI.js} +892 -409
  7. package/dist/development/{chunk-F6CT5MEB.mjs → chunk-OVO62ONG.mjs} +31 -314
  8. package/dist/development/chunk-UPBUMW2M.js +188 -0
  9. package/dist/development/dom-export.d.mts +51 -61
  10. package/dist/development/dom-export.d.ts +51 -60
  11. package/dist/development/dom-export.js +705 -23
  12. package/dist/development/dom-export.mjs +689 -14
  13. package/dist/{production/index-react-server-client-CYIi6gi0.d.mts → development/index-react-server-client-BOJoTiaG.d.ts} +76 -140
  14. package/dist/development/{index-react-server-client-CYIi6gi0.d.mts → index-react-server-client-CuQLmpku.d.mts} +76 -140
  15. package/dist/development/index-react-server-client.d.mts +2 -3
  16. package/dist/development/index-react-server-client.d.ts +2 -3
  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 +1 -90
  20. package/dist/development/index-react-server.d.ts +1 -90
  21. package/dist/development/index-react-server.js +9 -188
  22. package/dist/development/index-react-server.mjs +9 -188
  23. package/dist/development/index.d.mts +21 -320
  24. package/dist/development/index.d.ts +21 -364
  25. package/dist/development/index.js +131 -977
  26. package/dist/development/index.mjs +5 -9
  27. package/dist/development/lib/types/internal.d.mts +2 -3
  28. package/dist/development/lib/types/internal.d.ts +2 -3
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/{production/register-DiOIlEq5.d.mts → development/register-BblEgJPm.d.mts} +7 -1
  32. package/dist/development/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
  33. package/dist/development/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
  34. package/dist/development/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
  35. package/dist/production/browser-B4aBBnx8.d.ts +310 -0
  36. package/dist/production/browser-CN2w9Cbu.d.mts +310 -0
  37. package/dist/production/{chunk-K7VXYOZD.js → chunk-63YB5VLY.js} +892 -409
  38. package/dist/production/chunk-IE722GR6.js +188 -0
  39. package/dist/production/{chunk-LKSLGWXX.mjs → chunk-U25H5FTL.mjs} +31 -314
  40. package/dist/production/chunk-VX4OHTGR.js +1308 -0
  41. package/dist/production/{chunk-52MYED7O.mjs → chunk-XOCFS75J.mjs} +181 -873
  42. package/dist/production/dom-export.d.mts +51 -61
  43. package/dist/production/dom-export.d.ts +51 -60
  44. package/dist/production/dom-export.js +705 -23
  45. package/dist/production/dom-export.mjs +689 -14
  46. package/dist/production/{index-react-server-client-ChBGplLn.d.ts → index-react-server-client-BOJoTiaG.d.ts} +76 -140
  47. package/dist/{development/index-react-server-client-ChBGplLn.d.ts → production/index-react-server-client-CuQLmpku.d.mts} +76 -140
  48. package/dist/production/index-react-server-client.d.mts +2 -3
  49. package/dist/production/index-react-server-client.d.ts +2 -3
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +1 -90
  53. package/dist/production/index-react-server.d.ts +1 -90
  54. package/dist/production/index-react-server.js +9 -188
  55. package/dist/production/index-react-server.mjs +9 -188
  56. package/dist/production/index.d.mts +21 -320
  57. package/dist/production/index.d.ts +21 -364
  58. package/dist/production/index.js +131 -977
  59. package/dist/production/index.mjs +5 -9
  60. package/dist/production/lib/types/internal.d.mts +2 -3
  61. package/dist/production/lib/types/internal.d.ts +2 -3
  62. package/dist/production/lib/types/internal.js +1 -1
  63. package/dist/production/lib/types/internal.mjs +1 -1
  64. package/dist/{development/register-DiOIlEq5.d.mts → production/register-BblEgJPm.d.mts} +7 -1
  65. package/dist/production/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
  66. package/dist/production/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
  67. package/dist/production/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
  68. package/package.json +1 -1
  69. package/dist/development/browser-z32v5KVN.d.mts +0 -46
  70. package/dist/development/chunk-ITZFCV4J.js +0 -2092
  71. package/dist/development/instrumentation-BGrNA7uj.d.ts +0 -1122
  72. package/dist/development/routeModules-Cy4Xsfoi.d.mts +0 -483
  73. package/dist/production/browser-z32v5KVN.d.mts +0 -46
  74. package/dist/production/chunk-DASXXYNZ.js +0 -2092
  75. package/dist/production/instrumentation-BGrNA7uj.d.ts +0 -1122
  76. package/dist/production/routeModules-Cy4Xsfoi.d.mts +0 -483
@@ -0,0 +1,188 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
2
+ * react-router v0.0.0-experimental-de3b900
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkK3XLKYJIjs = require('./chunk-K3XLKYJI.js');
18
+
19
+ // lib/dom/ssr/hydration.tsx
20
+ function getHydrationData({
21
+ state,
22
+ routes,
23
+ getRouteInfo,
24
+ location,
25
+ basename,
26
+ isSpaMode
27
+ }) {
28
+ let hydrationData = {
29
+ ...state,
30
+ loaderData: { ...state.loaderData }
31
+ };
32
+ let initialMatches = _chunkK3XLKYJIjs.matchRoutes.call(void 0, routes, location, basename);
33
+ if (initialMatches) {
34
+ for (let match of initialMatches) {
35
+ let routeId = match.route.id;
36
+ let routeInfo = getRouteInfo(routeId);
37
+ if (_chunkK3XLKYJIjs.shouldHydrateRouteLoader.call(void 0,
38
+ routeId,
39
+ routeInfo.clientLoader,
40
+ routeInfo.hasLoader,
41
+ isSpaMode
42
+ ) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
43
+ delete hydrationData.loaderData[routeId];
44
+ } else if (!routeInfo.hasLoader) {
45
+ hydrationData.loaderData[routeId] = null;
46
+ }
47
+ }
48
+ }
49
+ return hydrationData;
50
+ }
51
+
52
+ // lib/rsc/errorBoundaries.tsx
53
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
54
+ var RSCRouterGlobalErrorBoundary = class extends _react2.default.Component {
55
+ constructor(props) {
56
+ super(props);
57
+ this.state = { error: null, location: props.location };
58
+ }
59
+ static getDerivedStateFromError(error) {
60
+ return { error };
61
+ }
62
+ static getDerivedStateFromProps(props, state) {
63
+ if (state.location !== props.location) {
64
+ return { error: null, location: props.location };
65
+ }
66
+ return { error: state.error, location: state.location };
67
+ }
68
+ render() {
69
+ if (this.state.error) {
70
+ return /* @__PURE__ */ _react2.default.createElement(
71
+ RSCDefaultRootErrorBoundaryImpl,
72
+ {
73
+ error: this.state.error,
74
+ renderAppShell: true
75
+ }
76
+ );
77
+ } else {
78
+ return this.props.children;
79
+ }
80
+ }
81
+ };
82
+ function ErrorWrapper({
83
+ renderAppShell,
84
+ title,
85
+ children
86
+ }) {
87
+ if (!renderAppShell) {
88
+ return children;
89
+ }
90
+ return /* @__PURE__ */ _react2.default.createElement("html", { lang: "en" }, /* @__PURE__ */ _react2.default.createElement("head", null, /* @__PURE__ */ _react2.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _react2.default.createElement(
91
+ "meta",
92
+ {
93
+ name: "viewport",
94
+ content: "width=device-width,initial-scale=1,viewport-fit=cover"
95
+ }
96
+ ), /* @__PURE__ */ _react2.default.createElement("title", null, title)), /* @__PURE__ */ _react2.default.createElement("body", null, /* @__PURE__ */ _react2.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
97
+ }
98
+ function RSCDefaultRootErrorBoundaryImpl({
99
+ error,
100
+ renderAppShell
101
+ }) {
102
+ console.error(error);
103
+ let heyDeveloper = /* @__PURE__ */ _react2.default.createElement(
104
+ "script",
105
+ {
106
+ dangerouslySetInnerHTML: {
107
+ __html: `
108
+ console.log(
109
+ "\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
110
+ );
111
+ `
112
+ }
113
+ }
114
+ );
115
+ if (_chunkK3XLKYJIjs.isRouteErrorResponse.call(void 0, error)) {
116
+ return /* @__PURE__ */ _react2.default.createElement(
117
+ ErrorWrapper,
118
+ {
119
+ renderAppShell,
120
+ title: "Unhandled Thrown Response!"
121
+ },
122
+ /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
123
+ _chunkK3XLKYJIjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
124
+ );
125
+ }
126
+ let errorInstance;
127
+ if (error instanceof Error) {
128
+ errorInstance = error;
129
+ } else {
130
+ let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
131
+ errorInstance = new Error(errorString);
132
+ }
133
+ return /* @__PURE__ */ _react2.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _react2.default.createElement(
134
+ "pre",
135
+ {
136
+ style: {
137
+ padding: "2rem",
138
+ background: "hsla(10, 50%, 50%, 0.1)",
139
+ color: "red",
140
+ overflow: "auto"
141
+ }
142
+ },
143
+ errorInstance.stack
144
+ ), heyDeveloper);
145
+ }
146
+ function RSCDefaultRootErrorBoundary({
147
+ hasRootLayout
148
+ }) {
149
+ let error = _chunkK3XLKYJIjs.useRouteError.call(void 0, );
150
+ if (hasRootLayout === void 0) {
151
+ throw new Error("Missing 'hasRootLayout' prop");
152
+ }
153
+ return /* @__PURE__ */ _react2.default.createElement(
154
+ RSCDefaultRootErrorBoundaryImpl,
155
+ {
156
+ renderAppShell: !hasRootLayout,
157
+ error
158
+ }
159
+ );
160
+ }
161
+
162
+ // lib/rsc/route-modules.ts
163
+ function createRSCRouteModules(payload) {
164
+ const routeModules = {};
165
+ for (const match of payload.matches) {
166
+ populateRSCRouteModules(routeModules, match);
167
+ }
168
+ return routeModules;
169
+ }
170
+ function populateRSCRouteModules(routeModules, matches) {
171
+ matches = Array.isArray(matches) ? matches : [matches];
172
+ for (const match of matches) {
173
+ routeModules[match.id] = {
174
+ links: match.links,
175
+ meta: match.meta,
176
+ default: noopComponent
177
+ };
178
+ }
179
+ }
180
+ var noopComponent = () => null;
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ exports.getHydrationData = getHydrationData; exports.RSCRouterGlobalErrorBoundary = RSCRouterGlobalErrorBoundary; exports.RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.createRSCRouteModules = createRSCRouteModules; exports.populateRSCRouteModules = populateRSCRouteModules;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1, a as RouterInit, u as unstable_ClientInstrumentation, b as unstable_ClientOnErrorFunction } from './router-DWv6Clt-.mjs';
3
- import './browser-z32v5KVN.mjs';
2
+ import { f as RouterProviderProps$1, e as RouterInit, u as unstable_ClientOnErrorFunction } from './route-data-nQS6GSUI.mjs';
3
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-CN2w9Cbu.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -12,67 +12,12 @@ declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">):
12
12
  */
13
13
  interface HydratedRouterProps {
14
14
  /**
15
- * Context factory function to be passed through to {@link createBrowserRouter}.
16
- * This function will be called to create a fresh `context` instance on each
17
- * navigation/fetch and made available to
15
+ * Context object to be passed through to {@link createBrowserRouter} and made
16
+ * available to
18
17
  * [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
19
- * functions.
18
+ * functions
20
19
  */
21
20
  getContext?: RouterInit["getContext"];
22
- /**
23
- * Array of instrumentation objects allowing you to instrument the router and
24
- * individual routes prior to router initialization (and on any subsequently
25
- * added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
26
- * mostly useful for observability such as wrapping navigations, fetches,
27
- * as well as route loaders/actions/middlewares with logging and/or performance
28
- * tracing.
29
- *
30
- * ```tsx
31
- * startTransition(() => {
32
- * hydrateRoot(
33
- * document,
34
- * <HydratedRouter unstable_instrumentations={[logging]} />
35
- * );
36
- * });
37
- *
38
- * const logging = {
39
- * router({ instrument }) {
40
- * instrument({
41
- * navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
42
- * fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
43
- * });
44
- * },
45
- * route({ instrument, id }) {
46
- * instrument({
47
- * middleware: (impl, { request }) => logExecution(
48
- * `middleware ${request.url} (route ${id})`,
49
- * impl
50
- * ),
51
- * loader: (impl, { request }) => logExecution(
52
- * `loader ${request.url} (route ${id})`,
53
- * impl
54
- * ),
55
- * action: (impl, { request }) => logExecution(
56
- * `action ${request.url} (route ${id})`,
57
- * impl
58
- * ),
59
- * })
60
- * }
61
- * };
62
- *
63
- * async function logExecution(label: string, impl: () => Promise<void>) {
64
- * let start = performance.now();
65
- * console.log(`start ${label}`);
66
- * try {
67
- * await impl();
68
- * } finally {
69
- * let end = performance.now();
70
- * console.log(`end ${label} (${Math.round(end - start)}ms)`);
71
- * }
72
- * }
73
- * ```
74
- */
75
- unstable_instrumentations?: unstable_ClientInstrumentation[];
76
21
  /**
77
22
  * An error handler function that will be called for any loader/action/render
78
23
  * errors that are encountered in your application. This is useful for
@@ -106,4 +51,49 @@ interface HydratedRouterProps {
106
51
  */
107
52
  declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
108
53
 
109
- export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };
54
+ declare global {
55
+ interface Window {
56
+ __FLIGHT_DATA: any[];
57
+ }
58
+ }
59
+ /**
60
+ * Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
61
+ * stream for hydration. Usually passed directly to your
62
+ * `react-server-dom-xyz/client`'s `createFromReadableStream`.
63
+ *
64
+ * @example
65
+ * import { startTransition, StrictMode } from "react";
66
+ * import { hydrateRoot } from "react-dom/client";
67
+ * import {
68
+ * unstable_getRSCStream as getRSCStream,
69
+ * unstable_RSCHydratedRouter as RSCHydratedRouter,
70
+ * } from "react-router";
71
+ * import type { unstable_RSCPayload as RSCPayload } from "react-router";
72
+ *
73
+ * createFromReadableStream(getRSCStream()).then(
74
+ * (payload: RSCServerPayload) => {
75
+ * startTransition(async () => {
76
+ * hydrateRoot(
77
+ * document,
78
+ * <StrictMode>
79
+ * <RSCHydratedRouter {...props} />
80
+ * </StrictMode>,
81
+ * {
82
+ * // Options
83
+ * }
84
+ * );
85
+ * });
86
+ * }
87
+ * );
88
+ *
89
+ * @name unstable_getRSCStream
90
+ * @public
91
+ * @category RSC
92
+ * @mode data
93
+ * @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
94
+ * that contains the [RSC](https://react.dev/reference/rsc/server-components)
95
+ * data for hydration.
96
+ */
97
+ declare function getRSCStream(): ReadableStream;
98
+
99
+ export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { RouterProviderProps as RouterProviderProps$1, RouterInit, unstable_ClientOnErrorFunction } from 'react-router';
3
- import { u as unstable_ClientInstrumentation } from './instrumentation-BGrNA7uj.js';
3
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-B4aBBnx8.js';
4
+ import './routeModules-9wlxglVk.js';
4
5
 
5
6
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
7
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -12,67 +13,12 @@ declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">):
12
13
  */
13
14
  interface HydratedRouterProps {
14
15
  /**
15
- * Context factory function to be passed through to {@link createBrowserRouter}.
16
- * This function will be called to create a fresh `context` instance on each
17
- * navigation/fetch and made available to
16
+ * Context object to be passed through to {@link createBrowserRouter} and made
17
+ * available to
18
18
  * [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
19
- * functions.
19
+ * functions
20
20
  */
21
21
  getContext?: RouterInit["getContext"];
22
- /**
23
- * Array of instrumentation objects allowing you to instrument the router and
24
- * individual routes prior to router initialization (and on any subsequently
25
- * added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
26
- * mostly useful for observability such as wrapping navigations, fetches,
27
- * as well as route loaders/actions/middlewares with logging and/or performance
28
- * tracing.
29
- *
30
- * ```tsx
31
- * startTransition(() => {
32
- * hydrateRoot(
33
- * document,
34
- * <HydratedRouter unstable_instrumentations={[logging]} />
35
- * );
36
- * });
37
- *
38
- * const logging = {
39
- * router({ instrument }) {
40
- * instrument({
41
- * navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
42
- * fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
43
- * });
44
- * },
45
- * route({ instrument, id }) {
46
- * instrument({
47
- * middleware: (impl, { request }) => logExecution(
48
- * `middleware ${request.url} (route ${id})`,
49
- * impl
50
- * ),
51
- * loader: (impl, { request }) => logExecution(
52
- * `loader ${request.url} (route ${id})`,
53
- * impl
54
- * ),
55
- * action: (impl, { request }) => logExecution(
56
- * `action ${request.url} (route ${id})`,
57
- * impl
58
- * ),
59
- * })
60
- * }
61
- * };
62
- *
63
- * async function logExecution(label: string, impl: () => Promise<void>) {
64
- * let start = performance.now();
65
- * console.log(`start ${label}`);
66
- * try {
67
- * await impl();
68
- * } finally {
69
- * let end = performance.now();
70
- * console.log(`end ${label} (${Math.round(end - start)}ms)`);
71
- * }
72
- * }
73
- * ```
74
- */
75
- unstable_instrumentations?: unstable_ClientInstrumentation[];
76
22
  /**
77
23
  * An error handler function that will be called for any loader/action/render
78
24
  * errors that are encountered in your application. This is useful for
@@ -106,4 +52,49 @@ interface HydratedRouterProps {
106
52
  */
107
53
  declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
108
54
 
109
- export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps };
55
+ declare global {
56
+ interface Window {
57
+ __FLIGHT_DATA: any[];
58
+ }
59
+ }
60
+ /**
61
+ * Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
62
+ * stream for hydration. Usually passed directly to your
63
+ * `react-server-dom-xyz/client`'s `createFromReadableStream`.
64
+ *
65
+ * @example
66
+ * import { startTransition, StrictMode } from "react";
67
+ * import { hydrateRoot } from "react-dom/client";
68
+ * import {
69
+ * unstable_getRSCStream as getRSCStream,
70
+ * unstable_RSCHydratedRouter as RSCHydratedRouter,
71
+ * } from "react-router";
72
+ * import type { unstable_RSCPayload as RSCPayload } from "react-router";
73
+ *
74
+ * createFromReadableStream(getRSCStream()).then(
75
+ * (payload: RSCServerPayload) => {
76
+ * startTransition(async () => {
77
+ * hydrateRoot(
78
+ * document,
79
+ * <StrictMode>
80
+ * <RSCHydratedRouter {...props} />
81
+ * </StrictMode>,
82
+ * {
83
+ * // Options
84
+ * }
85
+ * );
86
+ * });
87
+ * }
88
+ * );
89
+ *
90
+ * @name unstable_getRSCStream
91
+ * @public
92
+ * @category RSC
93
+ * @mode data
94
+ * @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
95
+ * that contains the [RSC](https://react.dev/reference/rsc/server-components)
96
+ * data for hydration.
97
+ */
98
+ declare function getRSCStream(): ReadableStream;
99
+
100
+ export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };