react-router 0.0.0-experimental-1b459f580 → 0.0.0-experimental-d4ee0faac

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 (32) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/development/{chunk-L4LRRCSD.mjs → chunk-AXZ7XWJM.mjs} +18 -3
  3. package/dist/development/{chunk-RZCZIS3B.js → chunk-BYMLG5RB.js} +2129 -3933
  4. package/dist/development/{chunk-4VIKRD7L.mjs → chunk-ECP3BYMQ.mjs} +2 -2
  5. package/dist/development/chunk-TYXIL3CH.js +1898 -0
  6. package/dist/development/dom-export.js +9 -2
  7. package/dist/development/dom-export.mjs +9 -3
  8. package/dist/development/index-react-server-client.js +5 -4
  9. package/dist/development/index-react-server-client.mjs +2 -2
  10. package/dist/development/index-react-server.js +11 -9
  11. package/dist/development/index-react-server.mjs +11 -9
  12. package/dist/development/index.js +98 -97
  13. package/dist/development/index.mjs +3 -3
  14. package/dist/development/lib/types/internal.js +1 -1
  15. package/dist/development/lib/types/internal.mjs +1 -1
  16. package/dist/production/chunk-EATVYSE3.js +1898 -0
  17. package/dist/production/{chunk-SFXFO2NO.mjs → chunk-RB7EVRHX.mjs} +18 -3
  18. package/dist/production/{chunk-PFSXYEQ3.mjs → chunk-SSVNUOFF.mjs} +2 -2
  19. package/dist/production/{chunk-6P3A53A7.js → chunk-XHN2I73S.js} +2129 -3933
  20. package/dist/production/dom-export.js +9 -2
  21. package/dist/production/dom-export.mjs +9 -3
  22. package/dist/production/index-react-server-client.js +5 -4
  23. package/dist/production/index-react-server-client.mjs +2 -2
  24. package/dist/production/index-react-server.js +11 -9
  25. package/dist/production/index-react-server.mjs +11 -9
  26. package/dist/production/index.js +98 -97
  27. package/dist/production/index.mjs +3 -3
  28. package/dist/production/lib/types/internal.js +1 -1
  29. package/dist/production/lib/types/internal.mjs +1 -1
  30. package/package.json +1 -1
  31. package/dist/development/chunk-OLOTDUGY.js +0 -21
  32. package/dist/production/chunk-OLOTDUGY.js +0 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.7.0-pre.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add unstable RSC support ([#13700](https://github.com/remix-run/react-router/pull/13700))
8
+
9
+ For more information, see the [RSC documentation](https://reactrouter.com/start/rsc/installation).
10
+
11
+ ### Patch Changes
12
+
13
+ - Handle `InvalidCharacterError` when validating cookie signature ([#13847](https://github.com/remix-run/react-router/pull/13847))
14
+ - 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))
15
+ - Support invalid `Date` in `turbo-stream` v2 fork ([#13684](https://github.com/remix-run/react-router/pull/13684))
16
+ - In Framework Mode, clear critical CSS in development after initial render ([#13872](https://github.com/remix-run/react-router/pull/13872))
17
+ - Strip search parameters from `patchRoutesOnNavigation` `path` param for fetcher calls ([#13911](https://github.com/remix-run/react-router/pull/13911))
18
+ - Skip scroll restoration on useRevalidator() calls because they're not new locations ([#13671](https://github.com/remix-run/react-router/pull/13671))
19
+ - Support unencoded UTF-8 routes in prerender config with `ssr` set to `false` ([#13699](https://github.com/remix-run/react-router/pull/13699))
20
+ - Do not throw if the url hash is not a valid URI component ([#13247](https://github.com/remix-run/react-router/pull/13247))
21
+ - Fix a regression in `createRoutesStub` introduced with the middleware feature. ([#13946](https://github.com/remix-run/react-router/pull/13946))
22
+
23
+ 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.
24
+
25
+ We've reverted this change and re-implemented it in such a way that both sets of users can leverage it.
26
+
27
+ ```tsx
28
+ // If you have not opted into middleware, the old API should work again
29
+ let context: AppLoadContext = {
30
+ /*...*/
31
+ };
32
+ let Stub = createRoutesStub(routes, context);
33
+
34
+ // If you have opted into middleware, you should now pass an instantiated `unstable_routerContextProvider` instead of a `getContext` factory function.
35
+ let context = new unstable_RouterContextProvider();
36
+ context.set(SomeContext, someValue);
37
+ let Stub = createRoutesStub(routes, context);
38
+ ```
39
+
40
+ ⚠️ This may be a breaking bug for if you have adopted the unstable Middleware feature and are using `createRoutesStub` with the updated API.
41
+
42
+ - Remove `Content-Length` header from Single Fetch responses ([#13902](https://github.com/remix-run/react-router/pull/13902))
43
+
3
44
  ## 7.6.3
4
45
 
5
46
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-1b459f580
2
+ * react-router v0.0.0-experimental-d4ee0faac
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8299,6 +8299,7 @@ function getActiveMatches(matches, errors, isSpaMode) {
8299
8299
  }
8300
8300
  return matches;
8301
8301
  }
8302
+ var CRITICAL_CSS_DATA_ATTRIBUTE = "data-react-router-critical-css";
8302
8303
  function Links() {
8303
8304
  let { isSpaMode, manifest, routeModules, criticalCss } = useFrameworkContext();
8304
8305
  let { errors, matches: routerMatches } = useDataRouterStateContext();
@@ -8307,7 +8308,20 @@ function Links() {
8307
8308
  () => getKeyedLinksForMatches(matches, routeModules, manifest),
8308
8309
  [matches, routeModules, manifest]
8309
8310
  );
8310
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof criticalCss === "string" ? /* @__PURE__ */ React8.createElement("style", { dangerouslySetInnerHTML: { __html: criticalCss } }) : null, typeof criticalCss === "object" ? /* @__PURE__ */ React8.createElement("link", { rel: "stylesheet", href: criticalCss.href }) : null, keyedLinks.map(
8311
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof criticalCss === "string" ? /* @__PURE__ */ React8.createElement(
8312
+ "style",
8313
+ {
8314
+ ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: "" },
8315
+ dangerouslySetInnerHTML: { __html: criticalCss }
8316
+ }
8317
+ ) : null, typeof criticalCss === "object" ? /* @__PURE__ */ React8.createElement(
8318
+ "link",
8319
+ {
8320
+ ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: "" },
8321
+ rel: "stylesheet",
8322
+ href: criticalCss.href
8323
+ }
8324
+ ) : null, keyedLinks.map(
8311
8325
  ({ key, link }) => isPageLinkDescriptor(link) ? /* @__PURE__ */ React8.createElement(PrefetchPageLinks, { key, ...link }) : /* @__PURE__ */ React8.createElement("link", { key, ...link })
8312
8326
  ));
8313
8327
  }
@@ -8801,7 +8815,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
8801
8815
  try {
8802
8816
  if (isBrowser) {
8803
8817
  window.__reactRouterVersion = // @ts-expect-error
8804
- "0.0.0-experimental-1b459f580";
8818
+ "0.0.0-experimental-d4ee0faac";
8805
8819
  }
8806
8820
  } catch (e) {
8807
8821
  }
@@ -9993,6 +10007,7 @@ export {
9993
10007
  useFogOFWarDiscovery,
9994
10008
  getManifestPath,
9995
10009
  FrameworkContext,
10010
+ CRITICAL_CSS_DATA_ATTRIBUTE,
9996
10011
  Links,
9997
10012
  PrefetchPageLinks,
9998
10013
  Meta,