react-router 0.0.0-experimental-3f68c7c20 → 0.0.0-experimental-e87ed2fd4

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 (39) hide show
  1. package/dist/development/{browser-BenyQgT4.d.mts → browser-C9OqCpRB.d.mts} +537 -136
  2. package/dist/development/{chunk-APN7PBP2.mjs → chunk-PVJCBITV.mjs} +65 -53
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.js +1 -1
  5. package/dist/development/dom-export.mjs +2 -2
  6. package/dist/development/index.d.mts +10 -390
  7. package/dist/development/index.d.ts +729 -708
  8. package/dist/development/index.js +68 -53
  9. package/dist/development/index.mjs +9 -3
  10. package/dist/development/lib/types/internal.d.mts +1 -1
  11. package/dist/development/lib/types/internal.d.ts +1 -1
  12. package/dist/development/lib/types/internal.js +1 -1
  13. package/dist/development/lib/types/internal.mjs +1 -1
  14. package/dist/{production/register-D3Ithcl4.d.ts → development/register-zy84znbA.d.ts} +1 -1
  15. package/dist/{production/route-data-CBHO1x2o.d.mts → development/route-data-C-cmsWVs.d.mts} +1 -1
  16. package/dist/development/rsc-export.d.mts +12 -1
  17. package/dist/development/rsc-export.d.ts +12 -1
  18. package/dist/development/rsc-export.js +209 -173
  19. package/dist/development/rsc-export.mjs +209 -174
  20. package/dist/production/{browser-BenyQgT4.d.mts → browser-C9OqCpRB.d.mts} +537 -136
  21. package/dist/production/{chunk-SAZGQ73S.mjs → chunk-FJS6IVQF.mjs} +65 -53
  22. package/dist/production/dom-export.d.mts +2 -2
  23. package/dist/production/dom-export.js +1 -1
  24. package/dist/production/dom-export.mjs +2 -2
  25. package/dist/production/index.d.mts +10 -390
  26. package/dist/production/index.d.ts +729 -708
  27. package/dist/production/index.js +68 -53
  28. package/dist/production/index.mjs +9 -3
  29. package/dist/production/lib/types/internal.d.mts +1 -1
  30. package/dist/production/lib/types/internal.d.ts +1 -1
  31. package/dist/production/lib/types/internal.js +1 -1
  32. package/dist/production/lib/types/internal.mjs +1 -1
  33. package/dist/{development/register-D3Ithcl4.d.ts → production/register-zy84znbA.d.ts} +1 -1
  34. package/dist/{development/route-data-CBHO1x2o.d.mts → production/route-data-C-cmsWVs.d.mts} +1 -1
  35. package/dist/production/rsc-export.d.mts +12 -1
  36. package/dist/production/rsc-export.d.ts +12 -1
  37. package/dist/production/rsc-export.js +209 -173
  38. package/dist/production/rsc-export.mjs +209 -174
  39. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-3f68c7c20
2
+ * react-router v0.0.0-experimental-e87ed2fd4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -101,6 +101,9 @@ __export(react_router_exports, {
101
101
  UNSAFE_shouldHydrateRouteLoader: () => shouldHydrateRouteLoader,
102
102
  UNSAFE_useFogOFWarDiscovery: () => useFogOFWarDiscovery,
103
103
  UNSAFE_useScrollRestoration: () => useScrollRestoration,
104
+ UNSAFE_withComponentProps: () => withComponentProps,
105
+ UNSAFE_withErrorBoundaryProps: () => withErrorBoundaryProps,
106
+ UNSAFE_withHydrateFallbackProps: () => withHydrateFallbackProps,
104
107
  createBrowserRouter: () => createBrowserRouter,
105
108
  createCallServer: () => createCallServer,
106
109
  createCookie: () => createCookie,
@@ -5186,7 +5189,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
5186
5189
  // router loaded. We can help them understand how to avoid that.
5187
5190
  `useRoutes() may be used only in the context of a <Router> component.`
5188
5191
  );
5189
- let { navigator, static: isStatic } = React2.useContext(NavigationContext);
5192
+ let { navigator } = React2.useContext(NavigationContext);
5190
5193
  let { matches: parentMatches } = React2.useContext(RouteContext);
5191
5194
  let routeMatch = parentMatches[parentMatches.length - 1];
5192
5195
  let parentParams = routeMatch ? routeMatch.params : {};
@@ -5222,7 +5225,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
5222
5225
  let segments = pathname.replace(/^\//, "").split("/");
5223
5226
  remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
5224
5227
  }
5225
- let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, { pathname: remainingPathname });
5228
+ let matches = matchRoutes(routes, { pathname: remainingPathname });
5226
5229
  if (ENABLE_DEV_WARNINGS) {
5227
5230
  warning(
5228
5231
  parentRoute || matches != null,
@@ -6152,6 +6155,38 @@ var createRoutesFromElements = createRoutesFromChildren;
6152
6155
  function renderMatches(matches) {
6153
6156
  return _renderMatches(matches);
6154
6157
  }
6158
+ function withComponentProps(Component4) {
6159
+ return function WithComponentProps() {
6160
+ const props = {
6161
+ params: useParams(),
6162
+ loaderData: useLoaderData(),
6163
+ actionData: useActionData(),
6164
+ matches: useMatches()
6165
+ };
6166
+ return React3.createElement(Component4, props);
6167
+ };
6168
+ }
6169
+ function withHydrateFallbackProps(HydrateFallback) {
6170
+ return function WithHydrateFallbackProps() {
6171
+ const props = {
6172
+ params: useParams(),
6173
+ loaderData: useLoaderData(),
6174
+ actionData: useActionData()
6175
+ };
6176
+ return React3.createElement(HydrateFallback, props);
6177
+ };
6178
+ }
6179
+ function withErrorBoundaryProps(ErrorBoundary) {
6180
+ return function WithErrorBoundaryProps() {
6181
+ const props = {
6182
+ params: useParams(),
6183
+ loaderData: useLoaderData(),
6184
+ actionData: useActionData(),
6185
+ error: useRouteError()
6186
+ };
6187
+ return React3.createElement(ErrorBoundary, props);
6188
+ };
6189
+ }
6155
6190
 
6156
6191
  // lib/dom/lib.tsx
6157
6192
  var React10 = __toESM(require("react"));
@@ -8917,7 +8952,7 @@ function mergeRefs(...refs) {
8917
8952
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8918
8953
  try {
8919
8954
  if (isBrowser) {
8920
- window.__reactRouterVersion = "0.0.0-experimental-3f68c7c20";
8955
+ window.__reactRouterVersion = "0.0.0-experimental-e87ed2fd4";
8921
8956
  }
8922
8957
  } catch (e) {
8923
8958
  }
@@ -10114,37 +10149,6 @@ function createRoutesStub(routes, unstable_getContext) {
10114
10149
  return /* @__PURE__ */ React13.createElement(FrameworkContext.Provider, { value: remixContextRef.current }, /* @__PURE__ */ React13.createElement(RouterProvider, { router: routerRef.current }));
10115
10150
  };
10116
10151
  }
10117
- function withComponentProps(Component4) {
10118
- return function Wrapped() {
10119
- return React13.createElement(Component4, {
10120
- params: useParams(),
10121
- loaderData: useLoaderData(),
10122
- actionData: useActionData(),
10123
- matches: useMatches()
10124
- });
10125
- };
10126
- }
10127
- function withHydrateFallbackProps(HydrateFallback) {
10128
- return function Wrapped() {
10129
- const props = {
10130
- params: useParams(),
10131
- loaderData: useLoaderData(),
10132
- actionData: useActionData()
10133
- };
10134
- return React13.createElement(HydrateFallback, props);
10135
- };
10136
- }
10137
- function withErrorBoundaryProps(ErrorBoundary) {
10138
- return function Wrapped() {
10139
- const props = {
10140
- params: useParams(),
10141
- loaderData: useLoaderData(),
10142
- actionData: useActionData(),
10143
- error: useRouteError()
10144
- };
10145
- return React13.createElement(ErrorBoundary, props);
10146
- };
10147
- }
10148
10152
  function processRoutes(routes, manifest, routeModules, parentId) {
10149
10153
  return routes.map((route) => {
10150
10154
  if (!route.id) {
@@ -10662,7 +10666,14 @@ function createServerHandoffString(serverHandoff) {
10662
10666
 
10663
10667
  // lib/server-runtime/headers.ts
10664
10668
  var import_set_cookie_parser = require("set-cookie-parser");
10665
- function getDocumentHeaders(context, getRouteHeadersFn) {
10669
+ function getDocumentHeaders(context, build) {
10670
+ return getDocumentHeadersImpl(context, (m) => {
10671
+ let route = build.routes[m.route.id];
10672
+ invariant3(route, `Route with id "${m.route.id}" not found in build`);
10673
+ return route.module.headers;
10674
+ });
10675
+ }
10676
+ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
10666
10677
  let boundaryIdx = context.errors ? context.matches.findIndex((m) => context.errors[m.route.id]) : -1;
10667
10678
  let matches = boundaryIdx >= 0 ? context.matches.slice(0, boundaryIdx + 1) : context.matches;
10668
10679
  let errorHeaders;
@@ -10732,10 +10743,7 @@ var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
10732
10743
  async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
10733
10744
  try {
10734
10745
  let respond2 = function(context) {
10735
- let headers = getDocumentHeaders(
10736
- context,
10737
- (m) => build.routes[m.route.id]?.module.headers
10738
- );
10746
+ let headers = getDocumentHeaders(context, build);
10739
10747
  if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
10740
10748
  return generateSingleFetchResponse(request, build, serverMode, {
10741
10749
  result: getSingleFetchRedirect(
@@ -10810,10 +10818,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
10810
10818
  async function singleFetchLoaders(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
10811
10819
  try {
10812
10820
  let respond2 = function(context) {
10813
- let headers = getDocumentHeaders(
10814
- context,
10815
- (m) => build.routes[m.route.id]?.module.headers
10816
- );
10821
+ let headers = getDocumentHeaders(context, build);
10817
10822
  if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
10818
10823
  return generateSingleFetchResponse(request, build, serverMode, {
10819
10824
  result: {
@@ -11280,10 +11285,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
11280
11285
  if (isResponse(context)) {
11281
11286
  return context;
11282
11287
  }
11283
- let headers = getDocumentHeaders(
11284
- context,
11285
- (m) => build.routes[m.route.id]?.module.headers
11286
- );
11288
+ let headers = getDocumentHeaders(context, build);
11287
11289
  if (SERVER_NO_BODY_STATUS_CODES.has(context.statusCode)) {
11288
11290
  return new Response(null, { status: context.statusCode, headers });
11289
11291
  }
@@ -12130,7 +12132,8 @@ async function routeRSCServerRequest({
12130
12132
  request,
12131
12133
  callServer,
12132
12134
  decode: decode2,
12133
- renderHTML
12135
+ renderHTML,
12136
+ hydrate: hydrate2 = true
12134
12137
  }) {
12135
12138
  const url = new URL(request.url);
12136
12139
  let serverRequest = request;
@@ -12156,9 +12159,9 @@ async function routeRSCServerRequest({
12156
12159
  if (!serverResponse.body) {
12157
12160
  throw new Error("Missing body in server response");
12158
12161
  }
12159
- const serverResponseB = serverResponse.clone();
12160
- if (!serverResponseB.body) {
12161
- throw new Error("Failed to clone server response");
12162
+ let serverResponseB = null;
12163
+ if (hydrate2) {
12164
+ serverResponseB = serverResponse.clone();
12162
12165
  }
12163
12166
  const body = serverResponse.body;
12164
12167
  let payloadPromise;
@@ -12169,9 +12172,18 @@ async function routeRSCServerRequest({
12169
12172
  };
12170
12173
  try {
12171
12174
  const html = await renderHTML(getPayload);
12172
- const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
12173
12175
  const headers = new Headers(serverResponse.headers);
12174
12176
  headers.set("Content-Type", "text/html");
12177
+ if (!hydrate2) {
12178
+ return new Response(html, {
12179
+ status: serverResponse.status,
12180
+ headers
12181
+ });
12182
+ }
12183
+ if (!serverResponseB?.body) {
12184
+ throw new Error("Failed to clone server response");
12185
+ }
12186
+ const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
12175
12187
  return new Response(body2, {
12176
12188
  status: serverResponse.status,
12177
12189
  headers
@@ -12409,6 +12421,9 @@ function deserializeErrors2(errors) {
12409
12421
  UNSAFE_shouldHydrateRouteLoader,
12410
12422
  UNSAFE_useFogOFWarDiscovery,
12411
12423
  UNSAFE_useScrollRestoration,
12424
+ UNSAFE_withComponentProps,
12425
+ UNSAFE_withErrorBoundaryProps,
12426
+ UNSAFE_withHydrateFallbackProps,
12412
12427
  createBrowserRouter,
12413
12428
  createCallServer,
12414
12429
  createCookie,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-3f68c7c20
2
+ * react-router v0.0.0-experimental-e87ed2fd4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -130,8 +130,11 @@ import {
130
130
  useScrollRestoration,
131
131
  useSearchParams,
132
132
  useSubmit,
133
- useViewTransitionState
134
- } from "./chunk-APN7PBP2.mjs";
133
+ useViewTransitionState,
134
+ withComponentProps,
135
+ withErrorBoundaryProps,
136
+ withHydrateFallbackProps
137
+ } from "./chunk-PVJCBITV.mjs";
135
138
  export {
136
139
  Await,
137
140
  BrowserRouter,
@@ -187,6 +190,9 @@ export {
187
190
  shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
188
191
  useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
189
192
  useScrollRestoration as UNSAFE_useScrollRestoration,
193
+ withComponentProps as UNSAFE_withComponentProps,
194
+ withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
195
+ withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
190
196
  createBrowserRouter,
191
197
  createCallServer,
192
198
  createCookie,
@@ -1,4 +1,4 @@
1
- import { aE as LinkDescriptor, aV as RouteModule, L as Location, aB as MetaDescriptor, aW as unstable_MiddlewareNextFunction, aX as ServerDataFrom, ac as unstable_RouterContextProvider, r as MiddlewareEnabled, s as AppLoadContext, aY as Pretty, aZ as GetLoaderData, a_ as Normalize, a$ as GetActionData } from '../../route-data-CBHO1x2o.mjs';
1
+ import { aD as LinkDescriptor, aV as RouteModule, L as Location, aA as MetaDescriptor, aW as unstable_MiddlewareNextFunction, aX as ServerDataFrom, a9 as unstable_RouterContextProvider, h as MiddlewareEnabled, i as AppLoadContext, aY as Pretty, aZ as GetLoaderData, a_ as Normalize, a$ as GetActionData } from '../../route-data-C-cmsWVs.mjs';
2
2
  import { a as RouteFiles, P as Pages } from '../../register-DeIo2iHO.mjs';
3
3
  import 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- import { aI as LinkDescriptor, aX as RouteModule, e as Location, aG as MetaDescriptor, aY as unstable_MiddlewareNextFunction, aZ as ServerDataFrom, u as unstable_RouterContextProvider, M as MiddlewareEnabled, i as AppLoadContext, a_ as Pretty, a$ as GetLoaderData, b0 as RouteFiles, b1 as Normalize, _ as Pages, b2 as GetActionData } from '../../register-D3Ithcl4.js';
1
+ import { aI as LinkDescriptor, aX as RouteModule, g as Location, aG as MetaDescriptor, aY as unstable_MiddlewareNextFunction, aZ as ServerDataFrom, u as unstable_RouterContextProvider, M as MiddlewareEnabled, A as AppLoadContext, a_ as Pretty, a$ as GetLoaderData, b0 as RouteFiles, b1 as Normalize, _ as Pages, b2 as GetActionData } from '../../register-zy84znbA.js';
2
2
  import 'react';
3
3
 
4
4
  type MaybePromise<T> = T | Promise<T>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-3f68c7c20
2
+ * react-router v0.0.0-experimental-e87ed2fd4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-3f68c7c20
2
+ * react-router v0.0.0-experimental-e87ed2fd4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1824,4 +1824,4 @@ type RouteFiles = Register extends {
1824
1824
  routeFiles: infer Registered extends AnyRouteFiles;
1825
1825
  } ? Registered : AnyRouteFiles;
1826
1826
 
1827
- export { type Equal as $, Action as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataStrategyFunction as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type InitialEntry as I, type GetScrollRestorationKeyFunction as J, type Fetcher as K, type LazyRouteFunction as L, type MiddlewareEnabled as M, type NonIndexRouteObject as N, type StaticHandler as O, type PatchRoutesOnNavigationFunction as P, type CreateStaticHandlerOptions as Q, type RouteObject as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type unstable_InitialContext as V, type LoaderFunction as W, type ActionFunction as X, type MetaFunction as Y, type LinksFunction as Z, type Pages as _, type RouterInit as a, type GetLoaderData as a$, type ClientActionFunction as a0, type ShouldRevalidateFunction as a1, type RouterState as a2, type GetScrollPositionFunction as a3, type NavigationStates as a4, type RouterSubscriber as a5, type RouterNavigateOptions as a6, type RouterFetchOptions as a7, type RevalidationState as a8, type DataStrategyFunctionArgs as a9, type PatchRoutesOnNavigationFunctionArgs as aA, type ClientActionFunctionArgs as aB, type ClientLoaderFunctionArgs as aC, type HeadersArgs as aD, type HeadersFunction as aE, type MetaArgs as aF, type MetaDescriptor as aG, type HtmlLinkDescriptor as aH, type LinkDescriptor as aI, type Future as aJ, type unstable_SerializesTo as aK, type Register as aL, createBrowserHistory as aM, invariant as aN, createRouter as aO, ErrorResponseImpl as aP, DataRouterContext as aQ, DataRouterStateContext as aR, FetchersContext as aS, LocationContext as aT, NavigationContext as aU, RouteContext as aV, ViewTransitionContext as aW, type RouteModule as aX, type unstable_MiddlewareNextFunction as aY, type ServerDataFrom as aZ, type Pretty as a_, type DataStrategyMatch as aa, type DataStrategyResult as ab, DataWithResponseInit as ac, type ErrorResponse as ad, type FormMethod as ae, type unstable_MiddlewareFunction as af, type PathParam as ag, type RedirectFunction as ah, type unstable_RouterContext as ai, type ShouldRevalidateFunctionArgs as aj, unstable_createContext as ak, createPath as al, parsePath as am, IDLE_NAVIGATION as an, IDLE_FETCHER as ao, IDLE_BLOCKER as ap, data as aq, generatePath as ar, isRouteErrorResponse as as, matchPath as at, matchRoutes as au, redirect as av, redirectDocument as aw, replace as ax, resolvePath as ay, type DataRouteMatch as az, type Router as b, type RouteFiles as b0, type Normalize as b1, type GetActionData as b2, type RelativeRoutingType as c, type IndexRouteObject as d, type Location as e, type Navigator as f, type RouteMatch as g, type RouteManifest as h, type AppLoadContext as i, type LoaderFunctionArgs as j, type ActionFunctionArgs as k, type StaticHandlerContext as l, type RouteModules as m, type DataRouteObject as n, type ParamParseKey as o, type Path as p, type PathPattern as q, type PathMatch as r, type NavigateOptions as s, type Params as t, unstable_RouterContextProvider as u, type Navigation as v, type SerializeFrom as w, type Blocker as x, type HTMLFormMethod as y, type FormEncType as z };
1827
+ export { type Equal as $, type AppLoadContext as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataRouteObject as D, type PageLinkDescriptor as E, type FutureConfig as F, type History as G, type HydrationState as H, type InitialEntry as I, type GetScrollRestorationKeyFunction as J, type Fetcher as K, type LoaderFunctionArgs as L, type MiddlewareEnabled as M, type NavigateOptions as N, type StaticHandler as O, type ParamParseKey as P, type CreateStaticHandlerOptions as Q, type RouteManifest as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type unstable_InitialContext as V, type LoaderFunction as W, type ActionFunction as X, type MetaFunction as Y, type LinksFunction as Z, type Pages as _, type ActionFunctionArgs as a, type GetLoaderData as a$, type ClientActionFunction as a0, type ShouldRevalidateFunction as a1, type RouterState as a2, type GetScrollPositionFunction as a3, type NavigationStates as a4, type RouterSubscriber as a5, type RouterNavigateOptions as a6, type RouterFetchOptions as a7, type RevalidationState as a8, type DataStrategyFunctionArgs as a9, type PatchRoutesOnNavigationFunctionArgs as aA, type ClientActionFunctionArgs as aB, type ClientLoaderFunctionArgs as aC, type HeadersArgs as aD, type HeadersFunction as aE, type MetaArgs as aF, type MetaDescriptor as aG, type HtmlLinkDescriptor as aH, type LinkDescriptor as aI, type Future as aJ, type unstable_SerializesTo as aK, type Register as aL, createBrowserHistory as aM, invariant as aN, createRouter as aO, ErrorResponseImpl as aP, DataRouterContext as aQ, DataRouterStateContext as aR, FetchersContext as aS, LocationContext as aT, NavigationContext as aU, RouteContext as aV, ViewTransitionContext as aW, type RouteModule as aX, type unstable_MiddlewareNextFunction as aY, type ServerDataFrom as aZ, type Pretty as a_, type DataStrategyMatch as aa, type DataStrategyResult as ab, DataWithResponseInit as ac, type ErrorResponse as ad, type FormMethod as ae, type unstable_MiddlewareFunction as af, type PathParam as ag, type RedirectFunction as ah, type unstable_RouterContext as ai, type ShouldRevalidateFunctionArgs as aj, unstable_createContext as ak, createPath as al, parsePath as am, IDLE_NAVIGATION as an, IDLE_FETCHER as ao, IDLE_BLOCKER as ap, data as aq, generatePath as ar, isRouteErrorResponse as as, matchPath as at, matchRoutes as au, redirect as av, redirectDocument as aw, replace as ax, resolvePath as ay, type DataRouteMatch as az, type StaticHandlerContext as b, type RouteFiles as b0, type Normalize as b1, type GetActionData as b2, type RouteModules as c, type Router as d, type DataStrategyFunction as e, type RelativeRoutingType as f, type Location as g, Action as h, type Path as i, type PathPattern as j, type PathMatch as k, type Params as l, type RouteObject as m, type Navigation as n, type SerializeFrom as o, type Blocker as p, type RouterInit as q, type PatchRoutesOnNavigationFunction as r, type NonIndexRouteObject as s, type LazyRouteFunction as t, unstable_RouterContextProvider as u, type IndexRouteObject as v, type Navigator as w, type RouteMatch as x, type HTMLFormMethod as y, type FormEncType as z };
@@ -1801,4 +1801,4 @@ type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
1801
1801
  IsDefined<ClientActionData>
1802
1802
  ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
1803
1803
 
1804
- export { type ErrorResponse as $, Action as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type NavigationStates as J, type RouterSubscriber as K, type Location as L, type MetaFunction as M, type NavigateOptions as N, type RouterNavigateOptions as O, type ParamParseKey as P, type RouterFetchOptions as Q, type RouterInit as R, type SerializeFrom as S, type To as T, type UIMatch as U, type RevalidationState as V, type ActionFunctionArgs as W, type DataStrategyFunctionArgs as X, type DataStrategyMatch as Y, type DataStrategyResult as Z, DataWithResponseInit as _, type Router as a, type GetActionData as a$, type FormEncType as a0, type FormMethod as a1, type HTMLFormMethod as a2, type LazyRouteFunction as a3, type LoaderFunctionArgs as a4, type unstable_MiddlewareFunction as a5, type PathParam as a6, type RedirectFunction as a7, type unstable_RouterContext as a8, type ShouldRevalidateFunction as a9, type MetaArgs as aA, type MetaDescriptor as aB, type PageLinkDescriptor as aC, type HtmlLinkDescriptor as aD, type LinkDescriptor as aE, type Future as aF, type unstable_SerializesTo as aG, createBrowserHistory as aH, invariant as aI, createRouter as aJ, ErrorResponseImpl as aK, DataRouterContext as aL, DataRouterStateContext as aM, FetchersContext as aN, LocationContext as aO, NavigationContext as aP, RouteContext as aQ, ViewTransitionContext as aR, type RouteManifest as aS, type ServerRouteModule as aT, type History as aU, type RouteModule as aV, type unstable_MiddlewareNextFunction as aW, type ServerDataFrom as aX, type Pretty as aY, type GetLoaderData as aZ, type Normalize as a_, type ShouldRevalidateFunctionArgs as aa, unstable_createContext as ab, unstable_RouterContextProvider as ac, createPath as ad, parsePath as ae, IDLE_NAVIGATION as af, IDLE_FETCHER as ag, IDLE_BLOCKER as ah, data as ai, generatePath as aj, isRouteErrorResponse as ak, matchPath as al, matchRoutes as am, redirect as an, redirectDocument as ao, replace as ap, resolvePath as aq, type DataRouteMatch as ar, type Navigator as as, type PatchRoutesOnNavigationFunctionArgs as at, type RouteMatch as au, type ClientActionFunction as av, type ClientActionFunctionArgs as aw, type ClientLoaderFunctionArgs as ax, type HeadersArgs as ay, type HeadersFunction as az, type RouteModules as b, type RelativeRoutingType as c, type Path as d, type PathPattern as e, type PathMatch as f, type Params as g, type RouteObject as h, type Navigation as i, type Blocker as j, type StaticHandlerContext as k, type StaticHandler as l, type IndexRouteObject as m, type NonIndexRouteObject as n, type LoaderFunction as o, type ActionFunction as p, type LinksFunction as q, type MiddlewareEnabled as r, type AppLoadContext as s, type RouterState as t, type unstable_InitialContext as u, type PatchRoutesOnNavigationFunction as v, type DataRouteObject as w, type ClientLoaderFunction as x, type GetScrollRestorationKeyFunction as y, type Fetcher as z };
1804
+ export { type Params as $, type ActionFunction as A, type Blocker as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type DataStrategyMatch as J, type DataStrategyResult as K, type Location as L, type MetaFunction as M, type NonIndexRouteObject as N, DataWithResponseInit as O, type PatchRoutesOnNavigationFunction as P, type ErrorResponse as Q, type RouterInit as R, type StaticHandlerContext as S, type To as T, type FormEncType as U, type FormMethod as V, type HTMLFormMethod as W, type LazyRouteFunction as X, type LoaderFunctionArgs as Y, type unstable_MiddlewareFunction as Z, type ParamParseKey as _, type Router as a, type GetActionData as a$, type PathMatch as a0, type PathParam as a1, type PathPattern as a2, type RedirectFunction as a3, type unstable_RouterContext as a4, type ShouldRevalidateFunction as a5, type ShouldRevalidateFunctionArgs as a6, type UIMatch as a7, unstable_createContext as a8, unstable_RouterContextProvider as a9, type MetaDescriptor as aA, type PageLinkDescriptor as aB, type HtmlLinkDescriptor as aC, type LinkDescriptor as aD, type Future as aE, type unstable_SerializesTo as aF, createBrowserHistory as aG, invariant as aH, createRouter as aI, ErrorResponseImpl as aJ, DataRouterContext as aK, DataRouterStateContext as aL, FetchersContext as aM, LocationContext as aN, NavigationContext as aO, RouteContext as aP, ViewTransitionContext as aQ, type RouteManifest as aR, type ServerRouteModule as aS, type SerializeFrom as aT, type History as aU, type RouteModule as aV, type unstable_MiddlewareNextFunction as aW, type ServerDataFrom as aX, type Pretty as aY, type GetLoaderData as aZ, type Normalize as a_, Action as aa, createPath as ab, parsePath as ac, IDLE_NAVIGATION as ad, IDLE_FETCHER as ae, IDLE_BLOCKER as af, data as ag, generatePath as ah, isRouteErrorResponse as ai, matchPath as aj, matchRoutes as ak, redirect as al, redirectDocument as am, replace as an, resolvePath as ao, type DataRouteMatch as ap, type NavigateOptions as aq, type Navigator as ar, type PatchRoutesOnNavigationFunctionArgs as as, type RouteMatch as at, type ClientActionFunction as au, type ClientActionFunctionArgs as av, type ClientLoaderFunctionArgs as aw, type HeadersArgs as ax, type HeadersFunction as ay, type MetaArgs as az, type RouteModules as b, type RouteObject as c, type StaticHandler as d, type IndexRouteObject as e, type LoaderFunction as f, type LinksFunction as g, type MiddlewareEnabled as h, type AppLoadContext as i, type RouterState as j, type DataRouteObject as k, type ClientLoaderFunction as l, type Path as m, type GetScrollRestorationKeyFunction as n, type Fetcher as o, type Navigation as p, type NavigationStates as q, type RelativeRoutingType as r, type BlockerFunction as s, type RouterSubscriber as t, type unstable_InitialContext as u, type RouterNavigateOptions as v, type RouterFetchOptions as w, type RevalidationState as x, type ActionFunctionArgs as y, type DataStrategyFunctionArgs as z };
@@ -229,6 +229,17 @@ type Submission = {
229
229
  interface unstable_RouterContext<T = unknown> {
230
230
  defaultValue?: T;
231
231
  }
232
+ /**
233
+ * Creates a context object that may be used to store and retrieve arbitrary values.
234
+ *
235
+ * If a `defaultValue` is provided, it will be returned from `context.get()` when no value has been
236
+ * set for the context. Otherwise reading this context when no value has been set will throw an
237
+ * error.
238
+ *
239
+ * @param defaultValue The default value for the context
240
+ * @returns A context object
241
+ */
242
+ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterContext<T>;
232
243
  /**
233
244
  * A Map of RouterContext objects to their initial values - used to populate a
234
245
  * fresh `context` value per request/navigation/fetch
@@ -1784,4 +1795,4 @@ declare function matchRSCServerRequest({ decodeCallServer, decodeFormAction, onE
1784
1795
  generateResponse: (match: ServerMatch) => Response;
1785
1796
  }): Promise<Response>;
1786
1797
 
1787
- export { type Cookie, type CookieOptions, type CookieSignatureOptions, type DecodeCallServerFunction, type DecodeFormActionFunction, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type ServerManifestPayload, type ServerMatch, type ServerPayload, type ServerRenderPayload, type RenderedRoute as ServerRouteManifest, type ServerRouteMatch, type ServerRouteObject, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRSCServerRequest, matchRoutes, redirect, redirectDocument, replace };
1798
+ export { type Cookie, type CookieOptions, type CookieSignatureOptions, type DecodeCallServerFunction, type DecodeFormActionFunction, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type ServerManifestPayload, type ServerMatch, type ServerPayload, type ServerRenderPayload, type RenderedRoute as ServerRouteManifest, type ServerRouteMatch, type ServerRouteObject, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRSCServerRequest, matchRoutes, redirect, redirectDocument, replace, type unstable_MiddlewareFunction, type unstable_MiddlewareNextFunction, type unstable_RouterContext, unstable_RouterContextProvider, unstable_createContext };
@@ -229,6 +229,17 @@ type Submission = {
229
229
  interface unstable_RouterContext<T = unknown> {
230
230
  defaultValue?: T;
231
231
  }
232
+ /**
233
+ * Creates a context object that may be used to store and retrieve arbitrary values.
234
+ *
235
+ * If a `defaultValue` is provided, it will be returned from `context.get()` when no value has been
236
+ * set for the context. Otherwise reading this context when no value has been set will throw an
237
+ * error.
238
+ *
239
+ * @param defaultValue The default value for the context
240
+ * @returns A context object
241
+ */
242
+ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterContext<T>;
232
243
  /**
233
244
  * A Map of RouterContext objects to their initial values - used to populate a
234
245
  * fresh `context` value per request/navigation/fetch
@@ -1784,4 +1795,4 @@ declare function matchRSCServerRequest({ decodeCallServer, decodeFormAction, onE
1784
1795
  generateResponse: (match: ServerMatch) => Response;
1785
1796
  }): Promise<Response>;
1786
1797
 
1787
- export { type Cookie, type CookieOptions, type CookieSignatureOptions, type DecodeCallServerFunction, type DecodeFormActionFunction, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type ServerManifestPayload, type ServerMatch, type ServerPayload, type ServerRenderPayload, type RenderedRoute as ServerRouteManifest, type ServerRouteMatch, type ServerRouteObject, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRSCServerRequest, matchRoutes, redirect, redirectDocument, replace };
1798
+ export { type Cookie, type CookieOptions, type CookieSignatureOptions, type DecodeCallServerFunction, type DecodeFormActionFunction, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type ServerManifestPayload, type ServerMatch, type ServerPayload, type ServerRenderPayload, type RenderedRoute as ServerRouteManifest, type ServerRouteMatch, type ServerRouteObject, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRSCServerRequest, matchRoutes, redirect, redirectDocument, replace, type unstable_MiddlewareFunction, type unstable_MiddlewareNextFunction, type unstable_RouterContext, unstable_RouterContextProvider, unstable_createContext };