react-router 7.14.0-pre.0 → 7.14.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 (32) hide show
  1. package/CHANGELOG.md +27 -11
  2. package/dist/development/{chunk-D73YQQSY.mjs → chunk-2UH5WJXA.mjs} +2 -2
  3. package/dist/development/{chunk-GE4J47XT.js → chunk-IK6APEEG.js} +1 -1
  4. package/dist/{production/chunk-QIHLB25G.js → development/chunk-NXTEWSJO.js} +99 -99
  5. package/dist/development/{chunk-47HDNIOI.mjs → chunk-QFMPRPBF.mjs} +2 -2
  6. package/dist/development/{chunk-MA52INJ5.js → chunk-WAVMRYR2.js} +7 -7
  7. package/dist/development/dom-export.js +27 -27
  8. package/dist/development/dom-export.mjs +3 -3
  9. package/dist/development/index-react-server-client.js +4 -4
  10. package/dist/development/index-react-server-client.mjs +2 -2
  11. package/dist/development/index-react-server.js +1 -1
  12. package/dist/development/index-react-server.mjs +1 -1
  13. package/dist/development/index.js +82 -82
  14. package/dist/development/index.mjs +3 -3
  15. package/dist/development/lib/types/internal.js +1 -1
  16. package/dist/development/lib/types/internal.mjs +1 -1
  17. package/dist/production/{chunk-G3YAUWGC.js → chunk-355DUZMC.js} +7 -7
  18. package/dist/production/{chunk-OBXCYSYK.js → chunk-4TJ7T2OQ.js} +1 -1
  19. package/dist/{development/chunk-KLEV7K4H.js → production/chunk-FPT5DLVJ.js} +99 -99
  20. package/dist/production/{chunk-MQKMC5YB.mjs → chunk-HZQGQD2X.mjs} +2 -2
  21. package/dist/production/{chunk-XM7AQRW7.mjs → chunk-X5LK27NZ.mjs} +2 -2
  22. package/dist/production/dom-export.js +27 -27
  23. package/dist/production/dom-export.mjs +3 -3
  24. package/dist/production/index-react-server-client.js +4 -4
  25. package/dist/production/index-react-server-client.mjs +2 -2
  26. package/dist/production/index-react-server.js +1 -1
  27. package/dist/production/index-react-server.mjs +1 -1
  28. package/dist/production/index.js +82 -82
  29. package/dist/production/index.mjs +3 -3
  30. package/dist/production/lib/types/internal.js +1 -1
  31. package/dist/production/lib/types/internal.mjs +1 -1
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
2
- * react-router v7.14.0-pre.0
2
+ * react-router v7.14.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunkMA52INJ5js = require('./chunk-MA52INJ5.js');
16
+ var _chunkWAVMRYR2js = require('./chunk-WAVMRYR2.js');
17
17
 
18
18
 
19
19
 
@@ -33,7 +33,7 @@ var _chunkMA52INJ5js = require('./chunk-MA52INJ5.js');
33
33
 
34
34
 
35
35
 
36
- var _chunkGE4J47XTjs = require('./chunk-GE4J47XT.js');
36
+ var _chunkIK6APEEGjs = require('./chunk-IK6APEEG.js');
37
37
 
38
38
  // lib/dom-export/dom-router-provider.tsx
39
39
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
@@ -213,7 +213,7 @@ function HydratedRouter(props) {
213
213
  }, []);
214
214
  React2.useEffect(() => {
215
215
  if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
216
- document.querySelectorAll(`[${_chunkGE4J47XTjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
216
+ document.querySelectorAll(`[${_chunkIK6APEEGjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
217
217
  }
218
218
  }, [criticalCss]);
219
219
  let [location2, setLocation] = React2.useState(router.state.location);
@@ -392,7 +392,7 @@ function createRouterFromPayload({
392
392
  };
393
393
  if (payload.type !== "render") throw new Error("Invalid payload type");
394
394
  globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
395
- _chunkMA52INJ5js.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
395
+ _chunkWAVMRYR2js.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
396
396
  let routes = payload.matches.reduceRight((previous, match) => {
397
397
  const route = createRouteFromServerManifest(
398
398
  match,
@@ -406,12 +406,12 @@ function createRouterFromPayload({
406
406
  return [route];
407
407
  }, []);
408
408
  let applyPatchesPromise;
409
- globalVar.__reactRouterDataRouter = _chunkGE4J47XTjs.createRouter.call(void 0, {
409
+ globalVar.__reactRouterDataRouter = _chunkIK6APEEGjs.createRouter.call(void 0, {
410
410
  routes,
411
411
  getContext,
412
412
  basename: payload.basename,
413
- history: _chunkGE4J47XTjs.createBrowserHistory.call(void 0, ),
414
- hydrationData: _chunkMA52INJ5js.getHydrationData.call(void 0, {
413
+ history: _chunkIK6APEEGjs.createBrowserHistory.call(void 0, ),
414
+ hydrationData: _chunkWAVMRYR2js.getHydrationData.call(void 0, {
415
415
  state: {
416
416
  loaderData: payload.loaderData,
417
417
  actionData: payload.actionData,
@@ -420,7 +420,7 @@ function createRouterFromPayload({
420
420
  routes,
421
421
  getRouteInfo: (routeId) => {
422
422
  let match = payload.matches.find((m) => m.id === routeId);
423
- _chunkGE4J47XTjs.invariant.call(void 0, match, "Route not found in payload");
423
+ _chunkIK6APEEGjs.invariant.call(void 0, match, "Route not found in payload");
424
424
  return {
425
425
  clientLoader: match.clientLoader,
426
426
  hasLoader: match.hasLoader,
@@ -535,9 +535,9 @@ function createRouterFromPayload({
535
535
  routeModules: globalVar.__reactRouterRouteModules
536
536
  };
537
537
  }
538
- var renderedRoutesContext = _chunkGE4J47XTjs.createContext.call(void 0, );
538
+ var renderedRoutesContext = _chunkIK6APEEGjs.createContext.call(void 0, );
539
539
  function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
540
- let dataStrategy = _chunkGE4J47XTjs.getSingleFetchDataStrategyImpl.call(void 0,
540
+ let dataStrategy = _chunkIK6APEEGjs.getSingleFetchDataStrategyImpl.call(void 0,
541
541
  getRouter,
542
542
  (match) => {
543
543
  let M = match;
@@ -595,20 +595,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
595
595
  function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
596
596
  return async (args, basename, trailingSlashAware, targetRoutes) => {
597
597
  let { request, context } = args;
598
- let url = _chunkGE4J47XTjs.singleFetchUrl.call(void 0, request.url, basename, trailingSlashAware, "rsc");
598
+ let url = _chunkIK6APEEGjs.singleFetchUrl.call(void 0, request.url, basename, trailingSlashAware, "rsc");
599
599
  if (request.method === "GET") {
600
- url = _chunkGE4J47XTjs.stripIndexParam.call(void 0, url);
600
+ url = _chunkIK6APEEGjs.stripIndexParam.call(void 0, url);
601
601
  if (targetRoutes) {
602
602
  url.searchParams.set("_routes", targetRoutes.join(","));
603
603
  }
604
604
  }
605
605
  let res = await fetchImplementation(
606
- new Request(url, await _chunkGE4J47XTjs.createRequestInit.call(void 0, request))
606
+ new Request(url, await _chunkIK6APEEGjs.createRequestInit.call(void 0, request))
607
607
  );
608
608
  if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
609
- throw new (0, _chunkGE4J47XTjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
609
+ throw new (0, _chunkIK6APEEGjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
610
610
  }
611
- _chunkGE4J47XTjs.invariant.call(void 0, res.body, "No response body to decode");
611
+ _chunkIK6APEEGjs.invariant.call(void 0, res.body, "No response body to decode");
612
612
  try {
613
613
  const payload = await createFromReadableStream(res.body, {
614
614
  temporaryReferences: void 0
@@ -632,7 +632,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
632
632
  }
633
633
  context.get(renderedRoutesContext).push(...payload.matches);
634
634
  let results = { routes: {} };
635
- const dataKey = _chunkGE4J47XTjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
635
+ const dataKey = _chunkIK6APEEGjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
636
636
  for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
637
637
  results.routes[routeId] = { data };
638
638
  }
@@ -665,7 +665,7 @@ function RSCHydratedRouter({
665
665
  [createFromReadableStream, payload, fetchImplementation, getContext]
666
666
  );
667
667
  React3.useEffect(() => {
668
- _chunkGE4J47XTjs.setIsHydrated.call(void 0, );
668
+ _chunkIK6APEEGjs.setIsHydrated.call(void 0, );
669
669
  }, []);
670
670
  React3.useLayoutEffect(() => {
671
671
  const globalVar = window;
@@ -774,8 +774,8 @@ function RSCHydratedRouter({
774
774
  },
775
775
  routeModules
776
776
  };
777
- return /* @__PURE__ */ React3.createElement(_chunkGE4J47XTjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkMA52INJ5js.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkGE4J47XTjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
778
- _chunkGE4J47XTjs.RouterProvider,
777
+ return /* @__PURE__ */ React3.createElement(_chunkIK6APEEGjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkWAVMRYR2js.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkIK6APEEGjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
778
+ _chunkIK6APEEGjs.RouterProvider,
779
779
  {
780
780
  router: transitionEnabledRouter,
781
781
  flushSync: ReactDOM2.flushSync
@@ -791,8 +791,8 @@ function createRouteFromServerManifest(match, payload) {
791
791
  // the server loader flow regardless of whether the client loader calls
792
792
  // `serverLoader` or not, otherwise we'll have nothing to render.
793
793
  match.hasComponent && !match.element;
794
- _chunkGE4J47XTjs.invariant.call(void 0, window.__reactRouterRouteModules);
795
- _chunkMA52INJ5js.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
794
+ _chunkIK6APEEGjs.invariant.call(void 0, window.__reactRouterRouteModules);
795
+ _chunkWAVMRYR2js.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
796
796
  let dataRoute = {
797
797
  id: match.id,
798
798
  element: match.element,
@@ -842,7 +842,7 @@ function createRouteFromServerManifest(match, payload) {
842
842
  return await callSingleFetch(singleFetch);
843
843
  }
844
844
  }) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
845
- throw _chunkGE4J47XTjs.noActionDefinedError.call(void 0, "action", match.id);
845
+ throw _chunkIK6APEEGjs.noActionDefinedError.call(void 0, "action", match.id);
846
846
  },
847
847
  path: match.path,
848
848
  shouldRevalidate: match.shouldRevalidate,
@@ -855,7 +855,7 @@ function createRouteFromServerManifest(match, payload) {
855
855
  hasShouldRevalidate: match.shouldRevalidate != null
856
856
  };
857
857
  if (typeof dataRoute.loader === "function") {
858
- dataRoute.loader.hydrate = _chunkGE4J47XTjs.shouldHydrateRouteLoader.call(void 0,
858
+ dataRoute.loader.hydrate = _chunkIK6APEEGjs.shouldHydrateRouteLoader.call(void 0,
859
859
  match.id,
860
860
  match.clientLoader,
861
861
  match.hasLoader,
@@ -865,7 +865,7 @@ function createRouteFromServerManifest(match, payload) {
865
865
  return dataRoute;
866
866
  }
867
867
  function callSingleFetch(singleFetch) {
868
- _chunkGE4J47XTjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
868
+ _chunkIK6APEEGjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
869
869
  return singleFetch();
870
870
  }
871
871
  function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
@@ -873,7 +873,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
873
873
  let fn = type === "action" ? "serverAction()" : "serverLoader()";
874
874
  let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
875
875
  console.error(msg);
876
- throw new (0, _chunkGE4J47XTjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
876
+ throw new (0, _chunkIK6APEEGjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
877
877
  }
878
878
  }
879
879
  var nextPaths = /* @__PURE__ */ new Set();
@@ -946,7 +946,7 @@ function isExternalLocation(location2) {
946
946
  }
947
947
  function hasInvalidProtocol(location2) {
948
948
  try {
949
- return _chunkGE4J47XTjs.invalidProtocols.includes(new URL(location2).protocol);
949
+ return _chunkIK6APEEGjs.invalidProtocols.includes(new URL(location2).protocol);
950
950
  } catch (e2) {
951
951
  return false;
952
952
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.0-pre.0
2
+ * react-router v7.14.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@ import {
14
14
  deserializeErrors,
15
15
  getHydrationData,
16
16
  populateRSCRouteModules
17
- } from "./chunk-D73YQQSY.mjs";
17
+ } from "./chunk-2UH5WJXA.mjs";
18
18
  import {
19
19
  CRITICAL_CSS_DATA_ATTRIBUTE,
20
20
  ErrorResponseImpl,
@@ -43,7 +43,7 @@ import {
43
43
  singleFetchUrl,
44
44
  stripIndexParam,
45
45
  useFogOFWarDiscovery
46
- } from "./chunk-47HDNIOI.mjs";
46
+ } from "./chunk-QFMPRPBF.mjs";
47
47
 
48
48
  // lib/dom-export/dom-router-provider.tsx
49
49
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.14.0-pre.0
2
+ * react-router v7.14.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkKLEV7K4Hjs = require('./chunk-KLEV7K4H.js');
22
+ var _chunkNXTEWSJOjs = require('./chunk-NXTEWSJO.js');
23
23
 
24
24
 
25
25
 
@@ -34,7 +34,7 @@ var _chunkKLEV7K4Hjs = require('./chunk-KLEV7K4H.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkGE4J47XTjs = require('./chunk-GE4J47XT.js');
37
+ var _chunkIK6APEEGjs = require('./chunk-IK6APEEG.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkGE4J47XTjs = require('./chunk-GE4J47XT.js');
58
58
 
59
59
 
60
60
 
61
- exports.BrowserRouter = _chunkKLEV7K4Hjs.BrowserRouter; exports.Form = _chunkKLEV7K4Hjs.Form; exports.HashRouter = _chunkKLEV7K4Hjs.HashRouter; exports.Link = _chunkKLEV7K4Hjs.Link; exports.Links = _chunkGE4J47XTjs.Links; exports.MemoryRouter = _chunkGE4J47XTjs.MemoryRouter; exports.Meta = _chunkGE4J47XTjs.Meta; exports.NavLink = _chunkKLEV7K4Hjs.NavLink; exports.Navigate = _chunkGE4J47XTjs.Navigate; exports.Outlet = _chunkGE4J47XTjs.Outlet; exports.Route = _chunkGE4J47XTjs.Route; exports.Router = _chunkGE4J47XTjs.Router; exports.RouterProvider = _chunkGE4J47XTjs.RouterProvider; exports.Routes = _chunkGE4J47XTjs.Routes; exports.ScrollRestoration = _chunkKLEV7K4Hjs.ScrollRestoration; exports.StaticRouter = _chunkKLEV7K4Hjs.StaticRouter; exports.StaticRouterProvider = _chunkKLEV7K4Hjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkGE4J47XTjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkGE4J47XTjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkGE4J47XTjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkGE4J47XTjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkKLEV7K4Hjs.HistoryRouter;
61
+ exports.BrowserRouter = _chunkNXTEWSJOjs.BrowserRouter; exports.Form = _chunkNXTEWSJOjs.Form; exports.HashRouter = _chunkNXTEWSJOjs.HashRouter; exports.Link = _chunkNXTEWSJOjs.Link; exports.Links = _chunkIK6APEEGjs.Links; exports.MemoryRouter = _chunkIK6APEEGjs.MemoryRouter; exports.Meta = _chunkIK6APEEGjs.Meta; exports.NavLink = _chunkNXTEWSJOjs.NavLink; exports.Navigate = _chunkIK6APEEGjs.Navigate; exports.Outlet = _chunkIK6APEEGjs.Outlet; exports.Route = _chunkIK6APEEGjs.Route; exports.Router = _chunkIK6APEEGjs.Router; exports.RouterProvider = _chunkIK6APEEGjs.RouterProvider; exports.Routes = _chunkIK6APEEGjs.Routes; exports.ScrollRestoration = _chunkNXTEWSJOjs.ScrollRestoration; exports.StaticRouter = _chunkNXTEWSJOjs.StaticRouter; exports.StaticRouterProvider = _chunkNXTEWSJOjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkIK6APEEGjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkIK6APEEGjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkIK6APEEGjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkIK6APEEGjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkNXTEWSJOjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.14.0-pre.0
2
+ * react-router v7.14.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -32,7 +32,7 @@ import {
32
32
  WithComponentProps,
33
33
  WithErrorBoundaryProps,
34
34
  WithHydrateFallbackProps
35
- } from "./chunk-47HDNIOI.mjs";
35
+ } from "./chunk-QFMPRPBF.mjs";
36
36
  export {
37
37
  BrowserRouter,
38
38
  Form,
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
27
27
  var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
28
28
 
29
29
  /**
30
- * react-router v7.14.0-pre.0
30
+ * react-router v7.14.0
31
31
  *
32
32
  * Copyright (c) Remix Software Inc.
33
33
  *
@@ -6,7 +6,7 @@ export { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLi
6
6
  import { serialize, parse } from 'cookie';
7
7
 
8
8
  /**
9
- * react-router v7.14.0-pre.0
9
+ * react-router v7.14.0
10
10
  *
11
11
  * Copyright (c) Remix Software Inc.
12
12
  *