react-router 0.0.0-experimental-c19b79d → 0.0.0-experimental-31a822c5f

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 (70) 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-LUB73E44.js → chunk-CZ7KRWQZ.js} +827 -64
  5. package/dist/development/{chunk-AGOH44BE.mjs → chunk-FXUONXY4.mjs} +132 -808
  6. package/dist/development/chunk-SE36CWVW.js +1308 -0
  7. package/dist/development/chunk-T5RKBXBV.js +188 -0
  8. package/dist/development/{chunk-IMKEG5CI.mjs → chunk-WTUOISGV.mjs} +2 -2
  9. package/dist/development/dom-export.d.mts +48 -3
  10. package/dist/development/dom-export.d.ts +48 -1
  11. package/dist/development/dom-export.js +703 -18
  12. package/dist/development/dom-export.mjs +687 -9
  13. package/dist/development/{index-react-server-client-DKvU8YRr.d.ts → index-react-server-client-BOJoTiaG.d.ts} +134 -134
  14. package/dist/{production/index-react-server-client-2EDmGlsZ.d.mts → development/index-react-server-client-CuQLmpku.d.mts} +1 -2
  15. package/dist/development/index-react-server-client.d.mts +2 -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.js +1 -1
  20. package/dist/development/index-react-server.mjs +1 -1
  21. package/dist/development/index.d.mts +9 -316
  22. package/dist/development/index.d.ts +9 -358
  23. package/dist/development/index.js +82 -914
  24. package/dist/development/index.mjs +3 -9
  25. package/dist/development/lib/types/internal.d.mts +2 -3
  26. package/dist/development/lib/types/internal.d.ts +2 -2
  27. package/dist/development/lib/types/internal.js +1 -1
  28. package/dist/development/lib/types/internal.mjs +1 -1
  29. package/dist/{production/register-BrVEYTED.d.mts → development/register-BblEgJPm.d.mts} +1 -1
  30. package/dist/development/{register-D8NQoPsO.d.ts → register-D18raRVf.d.ts} +1 -1
  31. package/dist/development/{context-BqL5Eckq.d.mts → route-data-nQS6GSUI.d.mts} +472 -2
  32. package/dist/development/{routeModules-BmVo7q9e.d.ts → routeModules-9wlxglVk.d.ts} +12 -12
  33. package/dist/production/browser-B4aBBnx8.d.ts +310 -0
  34. package/dist/production/browser-CN2w9Cbu.d.mts +310 -0
  35. package/dist/production/{chunk-2L5AG5Y5.js → chunk-DRKUM6HW.js} +827 -64
  36. package/dist/production/{chunk-AODJW4D3.mjs → chunk-IGF74WUC.mjs} +132 -808
  37. package/dist/production/{chunk-UOQCOPF6.mjs → chunk-RUSRTUHT.mjs} +2 -2
  38. package/dist/production/chunk-UU3LJMU6.js +188 -0
  39. package/dist/production/chunk-YVVCGSEG.js +1308 -0
  40. package/dist/production/dom-export.d.mts +48 -3
  41. package/dist/production/dom-export.d.ts +48 -1
  42. package/dist/production/dom-export.js +703 -18
  43. package/dist/production/dom-export.mjs +687 -9
  44. package/dist/production/{index-react-server-client-DKvU8YRr.d.ts → index-react-server-client-BOJoTiaG.d.ts} +134 -134
  45. package/dist/{development/index-react-server-client-2EDmGlsZ.d.mts → production/index-react-server-client-CuQLmpku.d.mts} +1 -2
  46. package/dist/production/index-react-server-client.d.mts +2 -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.js +1 -1
  51. package/dist/production/index-react-server.mjs +1 -1
  52. package/dist/production/index.d.mts +9 -316
  53. package/dist/production/index.d.ts +9 -358
  54. package/dist/production/index.js +82 -914
  55. package/dist/production/index.mjs +3 -9
  56. package/dist/production/lib/types/internal.d.mts +2 -3
  57. package/dist/production/lib/types/internal.d.ts +2 -2
  58. package/dist/production/lib/types/internal.js +1 -1
  59. package/dist/production/lib/types/internal.mjs +1 -1
  60. package/dist/{development/register-BrVEYTED.d.mts → production/register-BblEgJPm.d.mts} +1 -1
  61. package/dist/production/{register-D8NQoPsO.d.ts → register-D18raRVf.d.ts} +1 -1
  62. package/dist/production/{context-BqL5Eckq.d.mts → route-data-nQS6GSUI.d.mts} +472 -2
  63. package/dist/production/{routeModules-BmVo7q9e.d.ts → routeModules-9wlxglVk.d.ts} +12 -12
  64. package/package.json +1 -1
  65. package/dist/development/browser-z32v5KVN.d.mts +0 -46
  66. package/dist/development/chunk-2G2U5HGB.js +0 -2089
  67. package/dist/development/route-data-CDwqkzPE.d.mts +0 -473
  68. package/dist/production/browser-z32v5KVN.d.mts +0 -46
  69. package/dist/production/chunk-FGRCWJDI.js +0 -2089
  70. package/dist/production/route-data-CDwqkzPE.d.mts +0 -473
@@ -1600,6 +1600,16 @@ interface CreateStaticHandlerOptions {
1600
1600
  future?: {};
1601
1601
  }
1602
1602
 
1603
+ /**
1604
+ * An object of unknown type for route loaders and actions provided by the
1605
+ * server's `getLoadContext()` function. This is defined as an empty interface
1606
+ * specifically so apps can leverage declaration merging to augment this type
1607
+ * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
1608
+ */
1609
+ interface AppLoadContext {
1610
+ [key: string]: unknown;
1611
+ }
1612
+
1603
1613
  declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
1604
1614
  hasErrorBoundary: boolean;
1605
1615
  };
@@ -2179,7 +2189,7 @@ interface RoutesProps {
2179
2189
  * <Routes>
2180
2190
  * <Route index element={<StepOne />} />
2181
2191
  * <Route path="step-2" element={<StepTwo />} />
2182
- * <Route path="step-3" element={<StepThree />}>
2192
+ * <Route path="step-3" element={<StepThree />} />
2183
2193
  * </Routes>
2184
2194
  *
2185
2195
  * @public
@@ -2676,16 +2686,6 @@ interface PageLinkDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "
2676
2686
  }
2677
2687
  type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
2678
2688
 
2679
- /**
2680
- * An object of unknown type for route loaders and actions provided by the
2681
- * server's `getLoadContext()` function. This is defined as an empty interface
2682
- * specifically so apps can leverage declaration merging to augment this type
2683
- * globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
2684
- */
2685
- interface AppLoadContext {
2686
- [key: string]: unknown;
2687
- }
2688
-
2689
2689
  type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
2690
2690
  [key: PropertyKey]: Serializable;
2691
2691
  } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
@@ -3035,4 +3035,4 @@ type RouteComponent = ComponentType<{}>;
3035
3035
  */
3036
3036
  type RouteHandle = unknown;
3037
3037
 
3038
- export { type PatchRoutesOnNavigationFunction as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyResult as D, type ErrorBoundaryType as E, type Func as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type AppLoadContext as J, RouterContextProvider as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type MiddlewareEnabled as O, type Pretty as P, type Equal as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type ClientActionFunction as V, type ClientLoaderFunction as W, type HeadersFunction as X, type ShouldRevalidateFunction as Y, type RouterInit as Z, type RouterState as _, type Location as a, Route as a$, type DataRouteObject as a0, type StaticHandler as a1, type GetScrollPositionFunction as a2, type GetScrollRestorationKeyFunction as a3, type StaticHandlerContext as a4, type Fetcher as a5, type NavigationStates as a6, type RouterSubscriber as a7, type RouterNavigateOptions as a8, type RouterFetchOptions as a9, matchRoutes as aA, redirect as aB, redirectDocument as aC, replace as aD, resolvePath as aE, type DataRouteMatch as aF, type Navigator as aG, type PatchRoutesOnNavigationFunctionArgs as aH, type RouteMatch as aI, AwaitContextProvider as aJ, type AwaitProps as aK, type IndexRouteProps as aL, type unstable_ClientOnErrorFunction as aM, type LayoutRouteProps as aN, type MemoryRouterOpts as aO, type MemoryRouterProps as aP, type NavigateProps as aQ, type OutletProps as aR, type PathRouteProps as aS, type RouteProps as aT, type RouterProps as aU, type RouterProviderProps as aV, type RoutesProps as aW, Await as aX, MemoryRouter as aY, Navigate as aZ, Outlet as a_, type RevalidationState as aa, type ActionFunctionArgs as ab, type DataStrategyFunctionArgs as ac, type DataStrategyMatch as ad, DataWithResponseInit as ae, type ErrorResponse as af, type FormEncType as ag, type FormMethod as ah, type HTMLFormMethod as ai, type LazyRouteFunction as aj, type LoaderFunctionArgs as ak, type MiddlewareFunction as al, type PathParam as am, type RedirectFunction as an, type RouterContext as ao, type ShouldRevalidateFunctionArgs as ap, createContext as aq, createPath as ar, parsePath as as, IDLE_NAVIGATION as at, IDLE_FETCHER as au, IDLE_BLOCKER as av, data as aw, generatePath as ax, isRouteErrorResponse as ay, matchPath as az, type MiddlewareNextFunction as b, Router as b0, RouterProvider as b1, Routes as b2, createMemoryRouter as b3, createRoutesFromChildren as b4, createRoutesFromElements as b5, renderMatches as b6, type ClientActionFunctionArgs as b7, type ClientLoaderFunctionArgs as b8, type HeadersArgs as b9, type History as bA, type FutureConfig as bB, type CreateStaticHandlerOptions as bC, type MetaArgs as ba, type PageLinkDescriptor as bb, type HtmlLinkDescriptor as bc, type Future as bd, type unstable_SerializesTo as be, createBrowserHistory as bf, invariant as bg, createRouter as bh, ErrorResponseImpl as bi, DataRouterContext as bj, DataRouterStateContext as bk, FetchersContext as bl, LocationContext as bm, NavigationContext as bn, RouteContext as bo, ViewTransitionContext as bp, hydrationRouteProperties as bq, mapRouteProperties as br, WithComponentProps as bs, withComponentProps as bt, WithHydrateFallbackProps as bu, withHydrateFallbackProps as bv, WithErrorBoundaryProps as bw, withErrorBoundaryProps as bx, type RouteManifest as by, type ServerRouteModule as bz, type ServerDataFrom as c, type GetActionData as d, type Router$1 as e, type RouteModules as f, type DataStrategyFunction as g, type NavigateOptions as h, type Blocker as i, type SerializeFrom as j, type RelativeRoutingType as k, type ParamParseKey as l, type Path as m, type PathPattern as n, type PathMatch as o, type Navigation as p, type Params as q, type RouteObject as r, type IndexRouteObject as s, type RouteComponentType as t, type HydrateFallbackType as u, type LoaderFunction as v, type ActionFunction as w, type MetaFunction as x, type LinksFunction as y, type NonIndexRouteObject as z };
3038
+ export { type PatchRoutesOnNavigationFunction as $, type ActionFunction as A, type BlockerFunction as B, type ClientActionFunction as C, type DataStrategyResult as D, type RouteObject as E, type Func as F, type GetLoaderData as G, type HeadersFunction as H, type InitialEntry as I, type HydrationState as J, type IndexRouteObject as K, type Location as L, type MetaFunction as M, type Normalize as N, type RouteComponentType as O, type Params as P, type HydrateFallbackType as Q, type RouteModule$1 as R, type ShouldRevalidateFunction as S, type To as T, type UIMatch as U, type ErrorBoundaryType as V, type NonIndexRouteObject as W, type AppLoadContext as X, type MiddlewareEnabled as Y, type Equal as Z, type RouterState as _, type ClientLoaderFunction as a, Route as a$, type DataRouteObject as a0, type StaticHandler as a1, type GetScrollPositionFunction as a2, type GetScrollRestorationKeyFunction as a3, type StaticHandlerContext as a4, type Fetcher as a5, type NavigationStates as a6, type RouterSubscriber as a7, type RouterNavigateOptions as a8, type RouterFetchOptions as a9, matchRoutes as aA, redirect as aB, redirectDocument as aC, replace as aD, resolvePath as aE, type DataRouteMatch as aF, type Navigator as aG, type PatchRoutesOnNavigationFunctionArgs as aH, type RouteMatch as aI, AwaitContextProvider as aJ, type AwaitProps as aK, type IndexRouteProps as aL, type unstable_ClientOnErrorFunction as aM, type LayoutRouteProps as aN, type MemoryRouterOpts as aO, type MemoryRouterProps as aP, type NavigateProps as aQ, type OutletProps as aR, type PathRouteProps as aS, type RouteProps as aT, type RouterProps as aU, type RouterProviderProps as aV, type RoutesProps as aW, Await as aX, MemoryRouter as aY, Navigate as aZ, Outlet as a_, type RevalidationState as aa, type ActionFunctionArgs as ab, type DataStrategyFunctionArgs as ac, type DataStrategyMatch as ad, DataWithResponseInit as ae, type ErrorResponse as af, type FormEncType as ag, type FormMethod as ah, type HTMLFormMethod as ai, type LazyRouteFunction as aj, type LoaderFunctionArgs as ak, type MiddlewareFunction as al, type PathParam as am, type RedirectFunction as an, type RouterContext as ao, type ShouldRevalidateFunctionArgs as ap, createContext as aq, createPath as ar, parsePath as as, IDLE_NAVIGATION as at, IDLE_FETCHER as au, IDLE_BLOCKER as av, data as aw, generatePath as ax, isRouteErrorResponse as ay, matchPath as az, type LinksFunction as b, Router as b0, RouterProvider as b1, Routes as b2, createMemoryRouter as b3, createRoutesFromChildren as b4, createRoutesFromElements as b5, renderMatches as b6, type ClientActionFunctionArgs as b7, type ClientLoaderFunctionArgs as b8, type HeadersArgs as b9, type History as bA, type FutureConfig as bB, type CreateStaticHandlerOptions as bC, type MetaArgs as ba, type PageLinkDescriptor as bb, type HtmlLinkDescriptor as bc, type Future as bd, type unstable_SerializesTo as be, createBrowserHistory as bf, invariant as bg, createRouter as bh, ErrorResponseImpl as bi, DataRouterContext as bj, DataRouterStateContext as bk, FetchersContext as bl, LocationContext as bm, NavigationContext as bn, RouteContext as bo, ViewTransitionContext as bp, hydrationRouteProperties as bq, mapRouteProperties as br, WithComponentProps as bs, withComponentProps as bt, WithHydrateFallbackProps as bu, withHydrateFallbackProps as bv, WithErrorBoundaryProps as bw, withErrorBoundaryProps as bx, type RouteManifest as by, type ServerRouteModule as bz, RouterContextProvider as c, type LoaderFunction as d, type RouterInit as e, type LinkDescriptor as f, type Pretty as g, type MetaDescriptor as h, type ServerDataFunctionArgs as i, type MiddlewareNextFunction as j, type ClientDataFunctionArgs as k, type ServerDataFrom as l, type GetActionData as m, type Router$1 as n, type RouteModules as o, type DataStrategyFunction as p, type NavigateOptions as q, type Blocker as r, type SerializeFrom as s, type RelativeRoutingType as t, type ParamParseKey as u, type Path as v, type PathPattern as w, type PathMatch as x, type Navigation as y, Action as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "0.0.0-experimental-c19b79d",
3
+ "version": "0.0.0-experimental-31a822c5f",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",
@@ -1,46 +0,0 @@
1
- declare global {
2
- interface Window {
3
- __FLIGHT_DATA: any[];
4
- }
5
- }
6
- /**
7
- * Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
8
- * stream for hydration. Usually passed directly to your
9
- * `react-server-dom-xyz/client`'s `createFromReadableStream`.
10
- *
11
- * @example
12
- * import { startTransition, StrictMode } from "react";
13
- * import { hydrateRoot } from "react-dom/client";
14
- * import {
15
- * unstable_getRSCStream as getRSCStream,
16
- * unstable_RSCHydratedRouter as RSCHydratedRouter,
17
- * } from "react-router";
18
- * import type { unstable_RSCPayload as RSCPayload } from "react-router";
19
- *
20
- * createFromReadableStream(getRSCStream()).then(
21
- * (payload: RSCServerPayload) => {
22
- * startTransition(async () => {
23
- * hydrateRoot(
24
- * document,
25
- * <StrictMode>
26
- * <RSCHydratedRouter {...props} />
27
- * </StrictMode>,
28
- * {
29
- * // Options
30
- * }
31
- * );
32
- * });
33
- * }
34
- * );
35
- *
36
- * @name unstable_getRSCStream
37
- * @public
38
- * @category RSC
39
- * @mode data
40
- * @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
41
- * that contains the [RSC](https://react.dev/reference/rsc/server-components)
42
- * data for hydration.
43
- */
44
- declare function getRSCStream(): ReadableStream;
45
-
46
- export { getRSCStream as g };