react-router 0.0.0-experimental-56b72276e → 0.0.0-experimental-567b27f71
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.
- package/CHANGELOG.md +68 -0
- package/dist/development/{browser-Cloic07w.d.ts → browser-BUb__T3u.d.mts} +2 -1
- package/dist/{production/browser-Cloic07w.d.ts → development/browser-Bfn3xw9E.d.ts} +2 -1
- package/dist/{production/chunk-DEXURW6G.js → development/chunk-3KQWMVH5.js} +106 -109
- package/dist/development/{chunk-AEFPRTVA.js → chunk-FITK2GBN.js} +7 -7
- package/dist/development/{chunk-C35YGSX6.mjs → chunk-MFSTD5J4.mjs} +301 -187
- package/dist/{production/chunk-N2N4A2FL.mjs → development/chunk-T2TDL4ZI.mjs} +86 -50
- package/dist/development/{chunk-PUKCNFVJ.js → chunk-XLC5DWBP.js} +357 -240
- package/dist/development/context-kw54iBKW.d.mts +1713 -0
- package/dist/development/dom-export.d.mts +3 -2
- package/dist/development/dom-export.d.ts +3 -2
- package/dist/development/dom-export.js +38 -29
- package/dist/development/dom-export.mjs +14 -5
- package/dist/development/{index-react-server-client--SGjRgyj.d.mts → index-react-server-client-CmqQRyrG.d.mts} +3 -1
- package/dist/{production/index-react-server-client-Y7cd_xTA.d.ts → development/index-react-server-client-CtQKvWuW.d.ts} +1066 -9
- package/dist/development/index-react-server-client.d.mts +3 -2
- package/dist/development/index-react-server-client.d.ts +3 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +297 -246
- package/dist/development/index-react-server.d.ts +297 -246
- package/dist/development/index-react-server.js +97 -21
- package/dist/development/index-react-server.mjs +97 -21
- package/dist/development/index.d.mts +12 -10
- package/dist/development/index.d.ts +12 -10
- package/dist/development/index.js +179 -143
- package/dist/development/index.mjs +3 -3
- package/dist/development/instrumentation-BYr6ff5D.d.ts +657 -0
- package/dist/development/lib/types/internal.d.mts +4 -4
- package/dist/development/lib/types/internal.d.ts +4 -4
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-B86pZKib.d.ts → register-CTxsJBKQ.d.mts} +1 -1
- package/dist/development/{register-DA0Mb5jF.d.mts → register-CkcGwv27.d.ts} +1 -1
- package/dist/development/routeModules-BRrCYrSL.d.mts +1693 -0
- package/dist/development/routeModules-CA7kSxJJ.d.ts +1693 -0
- package/dist/{development/browser-JuMzyCK4.d.mts → production/browser-BUb__T3u.d.mts} +2 -1
- package/dist/production/{browser-JuMzyCK4.d.mts → browser-Bfn3xw9E.d.ts} +2 -1
- package/dist/production/{chunk-KDSQNTYZ.js → chunk-7CRO7VK3.js} +357 -240
- package/dist/production/{chunk-WUU6KOE6.mjs → chunk-JCFT2HBB.mjs} +301 -187
- package/dist/production/{chunk-CYERTBD4.js → chunk-ONKPUZLV.js} +7 -7
- package/dist/{development/chunk-66UV33R5.mjs → production/chunk-OZOQN5MO.mjs} +86 -50
- package/dist/{development/chunk-63U7QHOO.js → production/chunk-Y4BW72NR.js} +106 -109
- package/dist/production/context-kw54iBKW.d.mts +1713 -0
- package/dist/production/dom-export.d.mts +3 -2
- package/dist/production/dom-export.d.ts +3 -2
- package/dist/production/dom-export.js +38 -29
- package/dist/production/dom-export.mjs +14 -5
- package/dist/{development/index-react-server-client-Y7cd_xTA.d.ts → production/index-react-server-client-CmqQRyrG.d.mts} +3 -1
- package/dist/production/{index-react-server-client--SGjRgyj.d.mts → index-react-server-client-CtQKvWuW.d.ts} +1066 -9
- package/dist/production/index-react-server-client.d.mts +3 -2
- package/dist/production/index-react-server-client.d.ts +3 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +297 -246
- package/dist/production/index-react-server.d.ts +297 -246
- package/dist/production/index-react-server.js +97 -21
- package/dist/production/index-react-server.mjs +97 -21
- package/dist/production/index.d.mts +12 -10
- package/dist/production/index.d.ts +12 -10
- package/dist/production/index.js +179 -143
- package/dist/production/index.mjs +3 -3
- package/dist/production/instrumentation-BYr6ff5D.d.ts +657 -0
- package/dist/production/lib/types/internal.d.mts +4 -4
- package/dist/production/lib/types/internal.d.ts +4 -4
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-B86pZKib.d.ts → register-CTxsJBKQ.d.mts} +1 -1
- package/dist/production/{register-DA0Mb5jF.d.mts → register-CkcGwv27.d.ts} +1 -1
- package/dist/production/routeModules-BRrCYrSL.d.mts +1693 -0
- package/dist/production/routeModules-CA7kSxJJ.d.ts +1693 -0
- package/package.json +1 -1
- package/dist/development/instrumentation-C7Lh_MjH.d.ts +0 -3340
- package/dist/development/router-CFkT48p_.d.mts +0 -3340
- package/dist/production/instrumentation-C7Lh_MjH.d.ts +0 -3340
- package/dist/production/router-CFkT48p_.d.mts +0 -3340
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix null reference exception in bad codepath leading to invalid route tree comparisons ([#14780](https://github.com/remix-run/react-router/pull/14780))
|
|
8
|
+
|
|
9
|
+
- fix: clear timeout when turbo-stream encoding completes ([#14810](https://github.com/remix-run/react-router/pull/14810))
|
|
10
|
+
|
|
11
|
+
- Improve error message when Origin header is invalid ([#14743](https://github.com/remix-run/react-router/pull/14743))
|
|
12
|
+
|
|
13
|
+
- Fix matchPath optional params matching without a "/" separator. ([#14689](https://github.com/remix-run/react-router/pull/14689))
|
|
14
|
+
- matchPath("/users/:id?", "/usersblah") now returns null.
|
|
15
|
+
- matchPath("/test_route/:part?", "/test_route_more") now returns null.
|
|
16
|
+
|
|
17
|
+
- add RSC unstable_getRequest ([#14758](https://github.com/remix-run/react-router/pull/14758))
|
|
18
|
+
|
|
19
|
+
- Fix `HydrateFallback` rendering during initial lazy route discovery with matching splat route ([#14740](https://github.com/remix-run/react-router/pull/14740))
|
|
20
|
+
|
|
21
|
+
- \[UNSTABLE] Add support for `<Link unstable_mask>` in Data Mode which allows users to navigate to a URL in the router but "mask" the URL displayed in the browser. This is useful for contextual routing usages such as displaying an image in a model on top of a gallery, but displaying a browser URL directly to the image that can be shared and loaded without the contextual gallery in the background. ([#14716](https://github.com/remix-run/react-router/pull/14716))
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
// routes/gallery.tsx
|
|
25
|
+
export function clientLoader({ request }: Route.LoaderArgs) {
|
|
26
|
+
let sp = new URL(request.url).searchParams;
|
|
27
|
+
return {
|
|
28
|
+
images: getImages(),
|
|
29
|
+
// When the router location has the image param, load the modal data
|
|
30
|
+
modalImage: sp.has("image") ? getImage(sp.get("image")!) : null,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default function Gallery({ loaderData }: Route.ComponentProps) {
|
|
35
|
+
return (
|
|
36
|
+
<>
|
|
37
|
+
<GalleryGrid>
|
|
38
|
+
{loaderData.images.map((image) => (
|
|
39
|
+
<Link
|
|
40
|
+
key={image.id}
|
|
41
|
+
{/* Navigate the router to /galley?image=N */}}
|
|
42
|
+
to={`/gallery?image=${image.id}`}
|
|
43
|
+
{/* But display /images/N in the URL bar */}}
|
|
44
|
+
unstable_mask={`/images/${image.id}`}
|
|
45
|
+
>
|
|
46
|
+
<img src={image.url} alt={image.alt} />
|
|
47
|
+
</Link>
|
|
48
|
+
))}
|
|
49
|
+
</GalleryGrid>
|
|
50
|
+
|
|
51
|
+
{/* When the modal data exists, display the modal */}
|
|
52
|
+
{data.modalImage ? (
|
|
53
|
+
<dialog open>
|
|
54
|
+
<img src={data.modalImage.url} alt={data.modalImage.alt} />
|
|
55
|
+
</dialog>
|
|
56
|
+
) : null}
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Notes:
|
|
63
|
+
- The masked location, if present, will be available on `useLocation().unstable_mask` so you can detect whether you are currently masked or not.
|
|
64
|
+
- Masked URLs only work for SPA use cases, and will be removed from `history.state` during SSR.
|
|
65
|
+
- This provides a first-class API to mask URLs in Data Mode to achieve the same behavior you could do in Declarative Mode via [manual `backgroundLocation` management](https://github.com/remix-run/react-router/tree/main/examples/modal).
|
|
66
|
+
|
|
67
|
+
- RSC: Update failed origin checks to return a 400 status and appropriate UI instead of a generic 500 ([#14755](https://github.com/remix-run/react-router/pull/14755))
|
|
68
|
+
|
|
69
|
+
- Preserve query parameters and hash on manifest version mismatch reload ([#14813](https://github.com/remix-run/react-router/pull/14813))
|
|
70
|
+
|
|
3
71
|
## 7.13.0
|
|
4
72
|
|
|
5
73
|
### Minor Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { R as RouterInit } from './context-kw54iBKW.mjs';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-BRrCYrSL.mjs';
|
|
3
4
|
|
|
4
5
|
declare function getRequest(): Request;
|
|
5
6
|
type RSCRouteConfigEntryBase = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { R as RouterInit } from './instrumentation-BYr6ff5D.js';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-CA7kSxJJ.js';
|
|
3
4
|
|
|
4
5
|
declare function getRequest(): Request;
|
|
5
6
|
type RSCRouteConfigEntryBase = {
|