react-router 7.10.0 → 7.10.1-pre.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 +6 -0
  2. package/dist/development/{chunk-54KWOGSJ.js → chunk-BFZIIKOS.js} +3 -2
  3. package/dist/{production/chunk-J25F7BL4.js → development/chunk-NUGUL5OD.js} +94 -94
  4. package/dist/development/{chunk-FGUA77HG.mjs → chunk-SC4UA6B4.mjs} +4 -3
  5. package/dist/development/{chunk-26EFLBGX.js → chunk-VPK5G3S4.js} +7 -7
  6. package/dist/development/{chunk-INCZGKXY.mjs → chunk-X3LLUSK4.mjs} +2 -2
  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 +76 -76
  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-SKXBY33F.js → chunk-322RSYEJ.js} +3 -2
  18. package/dist/production/{chunk-EKXDIDQN.js → chunk-3WZYQEC5.js} +7 -7
  19. package/dist/{development/chunk-AWUYHSQU.js → production/chunk-7NETFFGG.js} +94 -94
  20. package/dist/production/{chunk-RNH4J7KQ.mjs → chunk-FI4GMOFC.mjs} +4 -3
  21. package/dist/production/{chunk-MFC2CGJA.mjs → chunk-KT4GS4WF.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 +76 -76
  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
  /**
2
- * react-router v7.10.0
2
+ * react-router v7.10.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -49,7 +49,7 @@ import {
49
49
  withComponentProps,
50
50
  withErrorBoundaryProps,
51
51
  withHydrateFallbackProps
52
- } from "./chunk-RNH4J7KQ.mjs";
52
+ } from "./chunk-FI4GMOFC.mjs";
53
53
 
54
54
  // lib/dom/ssr/server.tsx
55
55
  import * as React from "react";
@@ -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.10.0
2
+ * react-router v7.10.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunkEKXDIDQNjs = require('./chunk-EKXDIDQN.js');
16
+ var _chunk3WZYQEC5js = require('./chunk-3WZYQEC5.js');
17
17
 
18
18
 
19
19
 
@@ -32,7 +32,7 @@ var _chunkEKXDIDQNjs = require('./chunk-EKXDIDQN.js');
32
32
 
33
33
 
34
34
 
35
- var _chunkSKXBY33Fjs = require('./chunk-SKXBY33F.js');
35
+ var _chunk322RSYEJjs = require('./chunk-322RSYEJ.js');
36
36
 
37
37
  // lib/dom-export/dom-router-provider.tsx
38
38
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
@@ -204,7 +204,7 @@ function HydratedRouter(props) {
204
204
  }, []);
205
205
  React2.useEffect(() => {
206
206
  if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
207
- document.querySelectorAll(`[${_chunkSKXBY33Fjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
207
+ document.querySelectorAll(`[${_chunk322RSYEJjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
208
208
  }
209
209
  }, [criticalCss]);
210
210
  let [location2, setLocation] = React2.useState(router.state.location);
@@ -376,10 +376,10 @@ function createRouterFromPayload({
376
376
  };
377
377
  if (payload.type !== "render") throw new Error("Invalid payload type");
378
378
  globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
379
- _chunkEKXDIDQNjs.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
379
+ _chunk3WZYQEC5js.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
380
380
  let patches = /* @__PURE__ */ new Map();
381
381
  _optionalChain([payload, 'access', _22 => _22.patches, 'optionalAccess', _23 => _23.forEach, 'call', _24 => _24((patch) => {
382
- _chunkSKXBY33Fjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
382
+ _chunk322RSYEJjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
383
383
  if (!patches.has(patch.parentId)) {
384
384
  patches.set(patch.parentId, []);
385
385
  }
@@ -401,12 +401,12 @@ function createRouterFromPayload({
401
401
  }
402
402
  return [route];
403
403
  }, []);
404
- globalVar.__reactRouterDataRouter = _chunkSKXBY33Fjs.createRouter.call(void 0, {
404
+ globalVar.__reactRouterDataRouter = _chunk322RSYEJjs.createRouter.call(void 0, {
405
405
  routes,
406
406
  getContext,
407
407
  basename: payload.basename,
408
- history: _chunkSKXBY33Fjs.createBrowserHistory.call(void 0, ),
409
- hydrationData: _chunkEKXDIDQNjs.getHydrationData.call(void 0, {
408
+ history: _chunk322RSYEJjs.createBrowserHistory.call(void 0, ),
409
+ hydrationData: _chunk3WZYQEC5js.getHydrationData.call(void 0, {
410
410
  state: {
411
411
  loaderData: payload.loaderData,
412
412
  actionData: payload.actionData,
@@ -415,7 +415,7 @@ function createRouterFromPayload({
415
415
  routes,
416
416
  getRouteInfo: (routeId) => {
417
417
  let match = payload.matches.find((m) => m.id === routeId);
418
- _chunkSKXBY33Fjs.invariant.call(void 0, match, "Route not found in payload");
418
+ _chunk322RSYEJjs.invariant.call(void 0, match, "Route not found in payload");
419
419
  return {
420
420
  clientLoader: match.clientLoader,
421
421
  hasLoader: match.hasLoader,
@@ -513,9 +513,9 @@ function createRouterFromPayload({
513
513
  routeModules: globalVar.__reactRouterRouteModules
514
514
  };
515
515
  }
516
- var renderedRoutesContext = _chunkSKXBY33Fjs.createContext.call(void 0, );
516
+ var renderedRoutesContext = _chunk322RSYEJjs.createContext.call(void 0, );
517
517
  function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
518
- let dataStrategy = _chunkSKXBY33Fjs.getSingleFetchDataStrategyImpl.call(void 0,
518
+ let dataStrategy = _chunk322RSYEJjs.getSingleFetchDataStrategyImpl.call(void 0,
519
519
  getRouter,
520
520
  (match) => {
521
521
  let M = match;
@@ -571,20 +571,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
571
571
  function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
572
572
  return async (args, basename, targetRoutes) => {
573
573
  let { request, context } = args;
574
- let url = _chunkSKXBY33Fjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
574
+ let url = _chunk322RSYEJjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
575
575
  if (request.method === "GET") {
576
- url = _chunkSKXBY33Fjs.stripIndexParam.call(void 0, url);
576
+ url = _chunk322RSYEJjs.stripIndexParam.call(void 0, url);
577
577
  if (targetRoutes) {
578
578
  url.searchParams.set("_routes", targetRoutes.join(","));
579
579
  }
580
580
  }
581
581
  let res = await fetchImplementation(
582
- new Request(url, await _chunkSKXBY33Fjs.createRequestInit.call(void 0, request))
582
+ new Request(url, await _chunk322RSYEJjs.createRequestInit.call(void 0, request))
583
583
  );
584
584
  if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
585
- throw new (0, _chunkSKXBY33Fjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
585
+ throw new (0, _chunk322RSYEJjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
586
586
  }
587
- _chunkSKXBY33Fjs.invariant.call(void 0, res.body, "No response body to decode");
587
+ _chunk322RSYEJjs.invariant.call(void 0, res.body, "No response body to decode");
588
588
  try {
589
589
  const payload = await createFromReadableStream(res.body, {
590
590
  temporaryReferences: void 0
@@ -608,7 +608,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
608
608
  }
609
609
  context.get(renderedRoutesContext).push(...payload.matches);
610
610
  let results = { routes: {} };
611
- const dataKey = _chunkSKXBY33Fjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
611
+ const dataKey = _chunk322RSYEJjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
612
612
  for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
613
613
  results.routes[routeId] = { data };
614
614
  }
@@ -641,7 +641,7 @@ function RSCHydratedRouter({
641
641
  [createFromReadableStream, payload, fetchImplementation, getContext]
642
642
  );
643
643
  React3.useEffect(() => {
644
- _chunkSKXBY33Fjs.setIsHydrated.call(void 0, );
644
+ _chunk322RSYEJjs.setIsHydrated.call(void 0, );
645
645
  }, []);
646
646
  React3.useLayoutEffect(() => {
647
647
  const globalVar = window;
@@ -743,8 +743,8 @@ function RSCHydratedRouter({
743
743
  routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
744
744
  routeModules
745
745
  };
746
- return /* @__PURE__ */ React3.createElement(_chunkSKXBY33Fjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkEKXDIDQNjs.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkSKXBY33Fjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
747
- _chunkSKXBY33Fjs.RouterProvider,
746
+ return /* @__PURE__ */ React3.createElement(_chunk322RSYEJjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunk3WZYQEC5js.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunk322RSYEJjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
747
+ _chunk322RSYEJjs.RouterProvider,
748
748
  {
749
749
  router: transitionEnabledRouter,
750
750
  flushSync: ReactDOM2.flushSync,
@@ -761,8 +761,8 @@ function createRouteFromServerManifest(match, payload) {
761
761
  // the server loader flow regardless of whether the client loader calls
762
762
  // `serverLoader` or not, otherwise we'll have nothing to render.
763
763
  match.hasComponent && !match.element;
764
- _chunkSKXBY33Fjs.invariant.call(void 0, window.__reactRouterRouteModules);
765
- _chunkEKXDIDQNjs.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
764
+ _chunk322RSYEJjs.invariant.call(void 0, window.__reactRouterRouteModules);
765
+ _chunk3WZYQEC5js.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
766
766
  let dataRoute = {
767
767
  id: match.id,
768
768
  element: match.element,
@@ -812,7 +812,7 @@ function createRouteFromServerManifest(match, payload) {
812
812
  return await callSingleFetch(singleFetch);
813
813
  }
814
814
  }) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
815
- throw _chunkSKXBY33Fjs.noActionDefinedError.call(void 0, "action", match.id);
815
+ throw _chunk322RSYEJjs.noActionDefinedError.call(void 0, "action", match.id);
816
816
  },
817
817
  path: match.path,
818
818
  shouldRevalidate: match.shouldRevalidate,
@@ -825,7 +825,7 @@ function createRouteFromServerManifest(match, payload) {
825
825
  hasShouldRevalidate: match.shouldRevalidate != null
826
826
  };
827
827
  if (typeof dataRoute.loader === "function") {
828
- dataRoute.loader.hydrate = _chunkSKXBY33Fjs.shouldHydrateRouteLoader.call(void 0,
828
+ dataRoute.loader.hydrate = _chunk322RSYEJjs.shouldHydrateRouteLoader.call(void 0,
829
829
  match.id,
830
830
  match.clientLoader,
831
831
  match.hasLoader,
@@ -835,7 +835,7 @@ function createRouteFromServerManifest(match, payload) {
835
835
  return dataRoute;
836
836
  }
837
837
  function callSingleFetch(singleFetch) {
838
- _chunkSKXBY33Fjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
838
+ _chunk322RSYEJjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
839
839
  return singleFetch();
840
840
  }
841
841
  function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
@@ -843,7 +843,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
843
843
  let fn = type === "action" ? "serverAction()" : "serverLoader()";
844
844
  let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
845
845
  console.error(msg);
846
- throw new (0, _chunkSKXBY33Fjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
846
+ throw new (0, _chunk322RSYEJjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
847
847
  }
848
848
  }
849
849
  var nextPaths = /* @__PURE__ */ new Set();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.10.0
2
+ * react-router v7.10.1-pre.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-MFC2CGJA.mjs";
17
+ } from "./chunk-KT4GS4WF.mjs";
18
18
  import {
19
19
  CRITICAL_CSS_DATA_ATTRIBUTE,
20
20
  ErrorResponseImpl,
@@ -42,7 +42,7 @@ import {
42
42
  singleFetchUrl,
43
43
  stripIndexParam,
44
44
  useFogOFWarDiscovery
45
- } from "./chunk-RNH4J7KQ.mjs";
45
+ } from "./chunk-FI4GMOFC.mjs";
46
46
 
47
47
  // lib/dom-export/dom-router-provider.tsx
48
48
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.10.0
2
+ * react-router v7.10.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkJ25F7BL4js = require('./chunk-J25F7BL4.js');
22
+ var _chunk7NETFFGGjs = require('./chunk-7NETFFGG.js');
23
23
 
24
24
 
25
25
 
@@ -34,7 +34,7 @@ var _chunkJ25F7BL4js = require('./chunk-J25F7BL4.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkSKXBY33Fjs = require('./chunk-SKXBY33F.js');
37
+ var _chunk322RSYEJjs = require('./chunk-322RSYEJ.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkSKXBY33Fjs = require('./chunk-SKXBY33F.js');
58
58
 
59
59
 
60
60
 
61
- exports.BrowserRouter = _chunkJ25F7BL4js.BrowserRouter; exports.Form = _chunkJ25F7BL4js.Form; exports.HashRouter = _chunkJ25F7BL4js.HashRouter; exports.Link = _chunkJ25F7BL4js.Link; exports.Links = _chunkSKXBY33Fjs.Links; exports.MemoryRouter = _chunkSKXBY33Fjs.MemoryRouter; exports.Meta = _chunkSKXBY33Fjs.Meta; exports.NavLink = _chunkJ25F7BL4js.NavLink; exports.Navigate = _chunkSKXBY33Fjs.Navigate; exports.Outlet = _chunkSKXBY33Fjs.Outlet; exports.Route = _chunkSKXBY33Fjs.Route; exports.Router = _chunkSKXBY33Fjs.Router; exports.RouterProvider = _chunkSKXBY33Fjs.RouterProvider; exports.Routes = _chunkSKXBY33Fjs.Routes; exports.ScrollRestoration = _chunkJ25F7BL4js.ScrollRestoration; exports.StaticRouter = _chunkJ25F7BL4js.StaticRouter; exports.StaticRouterProvider = _chunkJ25F7BL4js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkSKXBY33Fjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkSKXBY33Fjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkSKXBY33Fjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkSKXBY33Fjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkJ25F7BL4js.HistoryRouter;
61
+ exports.BrowserRouter = _chunk7NETFFGGjs.BrowserRouter; exports.Form = _chunk7NETFFGGjs.Form; exports.HashRouter = _chunk7NETFFGGjs.HashRouter; exports.Link = _chunk7NETFFGGjs.Link; exports.Links = _chunk322RSYEJjs.Links; exports.MemoryRouter = _chunk322RSYEJjs.MemoryRouter; exports.Meta = _chunk322RSYEJjs.Meta; exports.NavLink = _chunk7NETFFGGjs.NavLink; exports.Navigate = _chunk322RSYEJjs.Navigate; exports.Outlet = _chunk322RSYEJjs.Outlet; exports.Route = _chunk322RSYEJjs.Route; exports.Router = _chunk322RSYEJjs.Router; exports.RouterProvider = _chunk322RSYEJjs.RouterProvider; exports.Routes = _chunk322RSYEJjs.Routes; exports.ScrollRestoration = _chunk7NETFFGGjs.ScrollRestoration; exports.StaticRouter = _chunk7NETFFGGjs.StaticRouter; exports.StaticRouterProvider = _chunk7NETFFGGjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk322RSYEJjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk322RSYEJjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk322RSYEJjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk322RSYEJjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk7NETFFGGjs.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.10.0
2
+ * react-router v7.10.1-pre.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-RNH4J7KQ.mjs";
35
+ } from "./chunk-FI4GMOFC.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.10.0
30
+ * react-router v7.10.1-pre.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.10.0
9
+ * react-router v7.10.1-pre.0
10
10
  *
11
11
  * Copyright (c) Remix Software Inc.
12
12
  *