react-router 7.7.0-pre.1 → 7.7.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 (58) hide show
  1. package/CHANGELOG.md +9 -7
  2. package/dist/development/{browser-BSrXyLft.d.mts → browser-CcxeZJcQ.d.mts} +3 -30
  3. package/dist/development/{chunk-6ZHKKNZG.js → chunk-4ADB4KIO.js} +170 -140
  4. package/dist/development/{chunk-YNUF36W5.mjs → chunk-EF7DTUVF.mjs} +52 -22
  5. package/dist/{production/chunk-KZZC37RO.mjs → development/chunk-T3VM44WY.mjs} +31 -26
  6. package/dist/development/{chunk-Z7T4GLA7.js → chunk-V6PEDDZI.js} +1 -1
  7. package/dist/development/components-DzqPLVI1.d.mts +464 -0
  8. package/dist/development/dom-export.d.mts +3 -3
  9. package/dist/development/dom-export.js +3 -3
  10. package/dist/development/dom-export.mjs +3 -3
  11. package/dist/{production/index-react-server-client-DOK8MfYF.d.mts → development/index-react-server-client-CUidsuu_.d.mts} +2 -2
  12. package/dist/development/{index-react-server-client-LrDNRnlX.d.ts → index-react-server-client-kY8DvDF3.d.ts} +177 -529
  13. package/dist/development/index-react-server-client.d.mts +3 -3
  14. package/dist/development/index-react-server-client.d.ts +2 -2
  15. package/dist/development/index-react-server-client.js +10 -4
  16. package/dist/development/index-react-server-client.mjs +9 -3
  17. package/dist/development/index-react-server.js +20 -6
  18. package/dist/development/index-react-server.mjs +21 -6
  19. package/dist/development/index.d.mts +396 -9
  20. package/dist/development/index.d.ts +372 -12
  21. package/dist/development/index.js +131 -120
  22. package/dist/development/index.mjs +9 -3
  23. package/dist/development/lib/types/internal.d.mts +1 -1
  24. package/dist/development/lib/types/internal.d.ts +1 -1
  25. package/dist/development/lib/types/internal.js +1 -1
  26. package/dist/development/lib/types/internal.mjs +1 -1
  27. package/dist/{production/route-data-DAw7Esur.d.mts → development/route-data-DjzmHYNR.d.mts} +1 -1
  28. package/dist/{production/route-data-7aXBQ4I3.d.ts → development/routeModules-g5PTiDfO.d.ts} +156 -156
  29. package/dist/production/{browser-BSrXyLft.d.mts → browser-CcxeZJcQ.d.mts} +3 -30
  30. package/dist/production/{chunk-W77PDD2Y.js → chunk-2TYFPE3B.js} +170 -140
  31. package/dist/production/{chunk-SH44XSL4.js → chunk-5KHO4FML.js} +1 -1
  32. package/dist/{development/chunk-YP7CIEHK.mjs → production/chunk-GNZILI6H.mjs} +31 -26
  33. package/dist/production/{chunk-4FKAWASN.mjs → chunk-WPPIQDYG.mjs} +52 -22
  34. package/dist/production/components-DzqPLVI1.d.mts +464 -0
  35. package/dist/production/dom-export.d.mts +3 -3
  36. package/dist/production/dom-export.js +3 -3
  37. package/dist/production/dom-export.mjs +3 -3
  38. package/dist/{development/index-react-server-client-DOK8MfYF.d.mts → production/index-react-server-client-CUidsuu_.d.mts} +2 -2
  39. package/dist/production/{index-react-server-client-LrDNRnlX.d.ts → index-react-server-client-kY8DvDF3.d.ts} +177 -529
  40. package/dist/production/index-react-server-client.d.mts +3 -3
  41. package/dist/production/index-react-server-client.d.ts +2 -2
  42. package/dist/production/index-react-server-client.js +10 -4
  43. package/dist/production/index-react-server-client.mjs +9 -3
  44. package/dist/production/index-react-server.js +20 -6
  45. package/dist/production/index-react-server.mjs +21 -6
  46. package/dist/production/index.d.mts +396 -9
  47. package/dist/production/index.d.ts +372 -12
  48. package/dist/production/index.js +131 -120
  49. package/dist/production/index.mjs +9 -3
  50. package/dist/production/lib/types/internal.d.mts +1 -1
  51. package/dist/production/lib/types/internal.d.ts +1 -1
  52. package/dist/production/lib/types/internal.js +1 -1
  53. package/dist/production/lib/types/internal.mjs +1 -1
  54. package/dist/{development/route-data-DAw7Esur.d.mts → production/route-data-DjzmHYNR.d.mts} +1 -1
  55. package/dist/{development/route-data-7aXBQ4I3.d.ts → production/routeModules-g5PTiDfO.d.ts} +156 -156
  56. package/package.json +1 -1
  57. package/dist/development/components-IaVqGBuO.d.mts +0 -816
  58. package/dist/production/components-IaVqGBuO.d.mts +0 -816
package/CHANGELOG.md CHANGED
@@ -1,12 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.7.0-pre.1
4
-
5
- ### Patch Changes
6
-
7
- - [REMOVE] (continuation of #13872) In Framework Mode, remove leftover critical CSS elements in development after initial render if there's a hydration mismatch ([#13995](https://github.com/remix-run/react-router/pull/13995))
8
-
9
- ## 7.7.0-pre.0
3
+ ## 7.7.0
10
4
 
11
5
  ### Minor Changes
12
6
 
@@ -17,13 +11,21 @@
17
11
  ### Patch Changes
18
12
 
19
13
  - Handle `InvalidCharacterError` when validating cookie signature ([#13847](https://github.com/remix-run/react-router/pull/13847))
14
+
20
15
  - Pass a copy of `searchParams` to the `setSearchParams` callback function to avoid muations of the internal `searchParams` instance. This was an issue when navigations were blocked because the internal instance be out of sync with `useLocation().search`. ([#12784](https://github.com/remix-run/react-router/pull/12784))
16
+
21
17
  - Support invalid `Date` in `turbo-stream` v2 fork ([#13684](https://github.com/remix-run/react-router/pull/13684))
18
+
22
19
  - In Framework Mode, clear critical CSS in development after initial render ([#13872](https://github.com/remix-run/react-router/pull/13872))
20
+
23
21
  - Strip search parameters from `patchRoutesOnNavigation` `path` param for fetcher calls ([#13911](https://github.com/remix-run/react-router/pull/13911))
22
+
24
23
  - Skip scroll restoration on useRevalidator() calls because they're not new locations ([#13671](https://github.com/remix-run/react-router/pull/13671))
24
+
25
25
  - Support unencoded UTF-8 routes in prerender config with `ssr` set to `false` ([#13699](https://github.com/remix-run/react-router/pull/13699))
26
+
26
27
  - Do not throw if the url hash is not a valid URI component ([#13247](https://github.com/remix-run/react-router/pull/13247))
28
+
27
29
  - Fix a regression in `createRoutesStub` introduced with the middleware feature. ([#13946](https://github.com/remix-run/react-router/pull/13946))
28
30
 
29
31
  As part of that work we altered the signature to align with the new middleware APIs without making it backwards compatible with the prior `AppLoadContext` API. This permitted `createRoutesStub` to work if you were opting into middleware and the updated `context` typings, but broke `createRoutesStub` for users not yet opting into middleware.
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { u as unstable_RouterContextProvider, p as ActionFunction, C as ClientActionFunction, q as ClientLoaderFunction, r as HeadersFunction, s as LinksFunction, t as LoaderFunction, M as MetaFunction, v as ShouldRevalidateFunction, L as Location, g as Params, h as Router, R as RouterInit } from './route-data-DAw7Esur.mjs';
3
1
  import { AsyncLocalStorage } from 'node:async_hooks';
2
+ import * as React from 'react';
3
+ import { u as unstable_RouterContextProvider, i as ActionFunction, C as ClientActionFunction, j as ClientLoaderFunction, k as HeadersFunction, l as LinksFunction, m as LoaderFunction, M as MetaFunction, S as ShouldRevalidateFunction, c as Location, h as Params } from './route-data-DjzmHYNR.mjs';
4
4
 
5
5
  type ServerContext = {
6
6
  redirect?: Response;
@@ -120,33 +120,6 @@ declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename,
120
120
  }) => Response;
121
121
  }): Promise<Response>;
122
122
 
123
- type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
124
- temporaryReferences: unknown;
125
- }) => Promise<unknown>;
126
- type EncodeReplyFunction = (args: unknown[], options: {
127
- temporaryReferences: unknown;
128
- }) => Promise<BodyInit>;
129
- declare global {
130
- interface Window {
131
- __router: Router;
132
- __routerInitialized: boolean;
133
- __routerActionID: number;
134
- }
135
- }
136
- declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
137
- createFromReadableStream: BrowserCreateFromReadableStreamFunction;
138
- createTemporaryReferenceSet: () => unknown;
139
- encodeReply: EncodeReplyFunction;
140
- fetch?: (request: Request) => Promise<Response>;
141
- }): (id: string, args: unknown[]) => Promise<unknown>;
142
- declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, unstable_getContext, }: {
143
- createFromReadableStream: BrowserCreateFromReadableStreamFunction;
144
- fetch?: (request: Request) => Promise<Response>;
145
- payload: RSCPayload;
146
- routeDiscovery?: "eager" | "lazy";
147
- unstable_getContext?: RouterInit["unstable_getContext"];
148
- }): React.JSX.Element;
149
-
150
123
  declare global {
151
124
  interface Window {
152
125
  __FLIGHT_DATA: any[];
@@ -154,4 +127,4 @@ declare global {
154
127
  }
155
128
  declare function getRSCStream(): ReadableStream<any>;
156
129
 
157
- export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, type RSCPayload as R, RSCHydratedRouter as a, type DecodeFormStateFunction as b, createCallServer as c, type DecodeReplyFunction as d, type RSCManifestPayload as e, type RSCMatch as f, getRSCStream as g, type RSCRenderPayload as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
130
+ export { type DecodeActionFunction as D, type LoadServerActionFunction as L, type RSCPayload as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, type RSCManifestPayload as c, type RSCMatch as d, type RSCRenderPayload as e, type RSCRouteManifest as f, getRSCStream as g, type RSCRouteMatch as h, type RSCRouteConfigEntry as i, type RSCRouteConfig as j, matchRSCServerRequest as m };