react-router 7.10.1 → 7.11.0-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 (68) hide show
  1. package/CHANGELOG.md +29 -11
  2. package/dist/development/{browser-BpxEZgZC.d.ts → browser-Cv4JZyZ5.d.mts} +4 -3
  3. package/dist/{production/browser-BpxEZgZC.d.ts → development/browser-o-qhcuhA.d.ts} +4 -3
  4. package/dist/{production/chunk-B3F6YMOF.js → development/chunk-JKMHOZYW.js} +111 -121
  5. package/dist/development/{chunk-WWGJGFF6.mjs → chunk-KRMLYMWA.mjs} +231 -74
  6. package/dist/{production/chunk-YO5R3LGQ.js → development/chunk-OVG6YSZ5.js} +7 -7
  7. package/dist/development/{chunk-PMGK554W.mjs → chunk-QMKP6CC3.mjs} +147 -38
  8. package/dist/development/{chunk-RBZI3ZHD.js → chunk-UO7KGW2U.js} +279 -110
  9. package/dist/development/dom-export.d.mts +11 -10
  10. package/dist/development/dom-export.d.ts +12 -11
  11. package/dist/development/dom-export.js +30 -31
  12. package/dist/development/dom-export.mjs +6 -7
  13. package/dist/{production/index-react-server-client-CCjKYJTH.d.ts → development/index-react-server-client-Cv5Q9lf0.d.ts} +60 -14
  14. package/dist/development/{index-react-server-client-CipGfVBI.d.mts → index-react-server-client-P7VgYu6T.d.mts} +60 -14
  15. package/dist/development/index-react-server-client.d.mts +2 -2
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +4 -2
  20. package/dist/development/index-react-server.d.ts +4 -2
  21. package/dist/development/index-react-server.js +72 -19
  22. package/dist/development/index-react-server.mjs +72 -19
  23. package/dist/development/index.d.mts +17 -16
  24. package/dist/development/index.d.ts +17 -16
  25. package/dist/development/index.js +220 -111
  26. package/dist/development/index.mjs +3 -3
  27. package/dist/{production/instrumentation-BB0wRuqz.d.ts → development/instrumentation-BlrVzjbg.d.ts} +30 -15
  28. package/dist/development/lib/types/internal.d.mts +2 -2
  29. package/dist/development/lib/types/internal.d.ts +2 -2
  30. package/dist/development/lib/types/internal.js +1 -1
  31. package/dist/development/lib/types/internal.mjs +1 -1
  32. package/dist/development/{register-ODDAAYlf.d.ts → register-BGQUMCK4.d.ts} +1 -1
  33. package/dist/development/{register-C1RwVJAt.d.mts → register-DTJJbt1o.d.mts} +1 -1
  34. package/dist/development/{router-CwNp5l9u.d.mts → router-5fbeEIMQ.d.mts} +30 -15
  35. package/dist/{development/browser-C5z6FZmz.d.mts → production/browser-Cv4JZyZ5.d.mts} +4 -3
  36. package/dist/production/{browser-C5z6FZmz.d.mts → browser-o-qhcuhA.d.ts} +4 -3
  37. package/dist/production/{chunk-UQPBOMFP.js → chunk-AO22ZXHI.js} +279 -110
  38. package/dist/production/{chunk-ANIOYBQK.mjs → chunk-IDHO4Q57.mjs} +231 -74
  39. package/dist/production/{chunk-TDCOAFPJ.mjs → chunk-J4JITZ76.mjs} +147 -38
  40. package/dist/{development/chunk-HMTWJNYB.js → production/chunk-M5W3Q3T5.js} +111 -121
  41. package/dist/{development/chunk-FKYGG5Z2.js → production/chunk-YGB3JEIP.js} +7 -7
  42. package/dist/production/dom-export.d.mts +11 -10
  43. package/dist/production/dom-export.d.ts +12 -11
  44. package/dist/production/dom-export.js +30 -31
  45. package/dist/production/dom-export.mjs +6 -7
  46. package/dist/{development/index-react-server-client-CCjKYJTH.d.ts → production/index-react-server-client-Cv5Q9lf0.d.ts} +60 -14
  47. package/dist/production/{index-react-server-client-CipGfVBI.d.mts → index-react-server-client-P7VgYu6T.d.mts} +60 -14
  48. package/dist/production/index-react-server-client.d.mts +2 -2
  49. package/dist/production/index-react-server-client.d.ts +2 -2
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +4 -2
  53. package/dist/production/index-react-server.d.ts +4 -2
  54. package/dist/production/index-react-server.js +72 -19
  55. package/dist/production/index-react-server.mjs +72 -19
  56. package/dist/production/index.d.mts +17 -16
  57. package/dist/production/index.d.ts +17 -16
  58. package/dist/production/index.js +220 -111
  59. package/dist/production/index.mjs +3 -3
  60. package/dist/{development/instrumentation-BB0wRuqz.d.ts → production/instrumentation-BlrVzjbg.d.ts} +30 -15
  61. package/dist/production/lib/types/internal.d.mts +2 -2
  62. package/dist/production/lib/types/internal.d.ts +2 -2
  63. package/dist/production/lib/types/internal.js +1 -1
  64. package/dist/production/lib/types/internal.mjs +1 -1
  65. package/dist/production/{register-ODDAAYlf.d.ts → register-BGQUMCK4.d.ts} +1 -1
  66. package/dist/production/{register-C1RwVJAt.d.mts → register-DTJJbt1o.d.mts} +1 -1
  67. package/dist/production/{router-CwNp5l9u.d.mts → router-5fbeEIMQ.d.mts} +30 -15
  68. package/package.json +5 -4
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { f as RouterProviderProps$1, e as RouterInit, u as unstable_ClientInstrumentation, g as unstable_ClientOnErrorFunction } from './router-CwNp5l9u.mjs';
3
- export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-C5z6FZmz.mjs';
2
+ import { f as RouterProviderProps$1, e as RouterInit, u as unstable_ClientInstrumentation, g as ClientOnErrorFunction } from './router-5fbeEIMQ.mjs';
3
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-Cv4JZyZ5.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -71,9 +71,9 @@ interface HydratedRouterProps {
71
71
  */
72
72
  unstable_instrumentations?: unstable_ClientInstrumentation[];
73
73
  /**
74
- * An error handler function that will be called for any loader/action/render
75
- * errors that are encountered in your application. This is useful for
76
- * logging or reporting errors instead of the `ErrorBoundary` because it's not
74
+ * An error handler function that will be called for any middleware, loader, action,
75
+ * or render errors that are encountered in your application. This is useful for
76
+ * logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
77
77
  * subject to re-rendering and will only run one time per error.
78
78
  *
79
79
  * The `errorInfo` parameter is passed along from
@@ -81,13 +81,14 @@ interface HydratedRouterProps {
81
81
  * and is only present for render errors.
82
82
  *
83
83
  * ```tsx
84
- * <HydratedRouter unstable_onError={(error, errorInfo) => {
85
- * console.error(error, errorInfo);
86
- * reportToErrorService(error, errorInfo);
84
+ * <HydratedRouter onError=(error, info) => {
85
+ * let { location, params, unstable_pattern, errorInfo } = info;
86
+ * console.error(error, location, errorInfo);
87
+ * reportToErrorService(error, location, errorInfo);
87
88
  * }} />
88
89
  * ```
89
90
  */
90
- unstable_onError?: unstable_ClientOnErrorFunction;
91
+ onError?: ClientOnErrorFunction;
91
92
  /**
92
93
  * Control whether router state updates are internally wrapped in
93
94
  * [`React.startTransition`](https://react.dev/reference/react/startTransition).
@@ -117,7 +118,7 @@ interface HydratedRouterProps {
117
118
  * @mode framework
118
119
  * @param props Props
119
120
  * @param {dom.HydratedRouterProps.getContext} props.getContext n/a
120
- * @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
121
+ * @param {dom.HydratedRouterProps.onError} props.onError n/a
121
122
  * @returns A React element that represents the hydrated application.
122
123
  */
123
124
  declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { RouterProviderProps as RouterProviderProps$1, RouterInit, unstable_ClientOnErrorFunction } from 'react-router';
3
- import { u as unstable_ClientInstrumentation } from './instrumentation-BB0wRuqz.js';
4
- export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-BpxEZgZC.js';
2
+ import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
3
+ import { u as unstable_ClientInstrumentation } from './instrumentation-BlrVzjbg.js';
4
+ export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-o-qhcuhA.js';
5
5
 
6
6
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
7
7
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -72,9 +72,9 @@ interface HydratedRouterProps {
72
72
  */
73
73
  unstable_instrumentations?: unstable_ClientInstrumentation[];
74
74
  /**
75
- * An error handler function that will be called for any loader/action/render
76
- * errors that are encountered in your application. This is useful for
77
- * logging or reporting errors instead of the `ErrorBoundary` because it's not
75
+ * An error handler function that will be called for any middleware, loader, action,
76
+ * or render errors that are encountered in your application. This is useful for
77
+ * logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
78
78
  * subject to re-rendering and will only run one time per error.
79
79
  *
80
80
  * The `errorInfo` parameter is passed along from
@@ -82,13 +82,14 @@ interface HydratedRouterProps {
82
82
  * and is only present for render errors.
83
83
  *
84
84
  * ```tsx
85
- * <HydratedRouter unstable_onError={(error, errorInfo) => {
86
- * console.error(error, errorInfo);
87
- * reportToErrorService(error, errorInfo);
85
+ * <HydratedRouter onError=(error, info) => {
86
+ * let { location, params, unstable_pattern, errorInfo } = info;
87
+ * console.error(error, location, errorInfo);
88
+ * reportToErrorService(error, location, errorInfo);
88
89
  * }} />
89
90
  * ```
90
91
  */
91
- unstable_onError?: unstable_ClientOnErrorFunction;
92
+ onError?: ClientOnErrorFunction;
92
93
  /**
93
94
  * Control whether router state updates are internally wrapped in
94
95
  * [`React.startTransition`](https://react.dev/reference/react/startTransition).
@@ -118,7 +119,7 @@ interface HydratedRouterProps {
118
119
  * @mode framework
119
120
  * @param props Props
120
121
  * @param {dom.HydratedRouterProps.getContext} props.getContext n/a
121
- * @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
122
+ * @param {dom.HydratedRouterProps.onError} props.onError n/a
122
123
  * @returns A React element that represents the hydrated application.
123
124
  */
124
125
  declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
@@ -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.1
2
+ * react-router v7.11.0-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 _chunkFKYGG5Z2js = require('./chunk-FKYGG5Z2.js');
16
+ var _chunkOVG6YSZ5js = require('./chunk-OVG6YSZ5.js');
17
17
 
18
18
 
19
19
 
@@ -32,7 +32,7 @@ var _chunkFKYGG5Z2js = require('./chunk-FKYGG5Z2.js');
32
32
 
33
33
 
34
34
 
35
- var _chunkRBZI3ZHDjs = require('./chunk-RBZI3ZHD.js');
35
+ var _chunkUO7KGW2Ujs = require('./chunk-UO7KGW2U.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(`[${_chunkRBZI3ZHDjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
207
+ document.querySelectorAll(`[${_chunkUO7KGW2Ujs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
208
208
  }
209
209
  }, [criticalCss]);
210
210
  let [location2, setLocation] = React2.useState(router.state.location);
@@ -253,7 +253,7 @@ function HydratedRouter(props) {
253
253
  {
254
254
  router,
255
255
  unstable_useTransitions: props.unstable_useTransitions,
256
- unstable_onError: props.unstable_onError
256
+ onError: props.onError
257
257
  }
258
258
  ))
259
259
  ), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
@@ -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
- _chunkFKYGG5Z2js.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
379
+ _chunkOVG6YSZ5js.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
- _chunkRBZI3ZHDjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
382
+ _chunkUO7KGW2Ujs.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 = _chunkRBZI3ZHDjs.createRouter.call(void 0, {
404
+ globalVar.__reactRouterDataRouter = _chunkUO7KGW2Ujs.createRouter.call(void 0, {
405
405
  routes,
406
406
  getContext,
407
407
  basename: payload.basename,
408
- history: _chunkRBZI3ZHDjs.createBrowserHistory.call(void 0, ),
409
- hydrationData: _chunkFKYGG5Z2js.getHydrationData.call(void 0, {
408
+ history: _chunkUO7KGW2Ujs.createBrowserHistory.call(void 0, ),
409
+ hydrationData: _chunkOVG6YSZ5js.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
- _chunkRBZI3ZHDjs.invariant.call(void 0, match, "Route not found in payload");
418
+ _chunkUO7KGW2Ujs.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 = _chunkRBZI3ZHDjs.createContext.call(void 0, );
516
+ var renderedRoutesContext = _chunkUO7KGW2Ujs.createContext.call(void 0, );
517
517
  function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
518
- let dataStrategy = _chunkRBZI3ZHDjs.getSingleFetchDataStrategyImpl.call(void 0,
518
+ let dataStrategy = _chunkUO7KGW2Ujs.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 = _chunkRBZI3ZHDjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
574
+ let url = _chunkUO7KGW2Ujs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
575
575
  if (request.method === "GET") {
576
- url = _chunkRBZI3ZHDjs.stripIndexParam.call(void 0, url);
576
+ url = _chunkUO7KGW2Ujs.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 _chunkRBZI3ZHDjs.createRequestInit.call(void 0, request))
582
+ new Request(url, await _chunkUO7KGW2Ujs.createRequestInit.call(void 0, request))
583
583
  );
584
584
  if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
585
- throw new (0, _chunkRBZI3ZHDjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
585
+ throw new (0, _chunkUO7KGW2Ujs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
586
586
  }
587
- _chunkRBZI3ZHDjs.invariant.call(void 0, res.body, "No response body to decode");
587
+ _chunkUO7KGW2Ujs.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 = _chunkRBZI3ZHDjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
611
+ const dataKey = _chunkUO7KGW2Ujs.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
- _chunkRBZI3ZHDjs.setIsHydrated.call(void 0, );
644
+ _chunkUO7KGW2Ujs.setIsHydrated.call(void 0, );
645
645
  }, []);
646
646
  React3.useLayoutEffect(() => {
647
647
  const globalVar = window;
@@ -743,12 +743,11 @@ function RSCHydratedRouter({
743
743
  routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
744
744
  routeModules
745
745
  };
746
- return /* @__PURE__ */ React3.createElement(_chunkRBZI3ZHDjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkFKYGG5Z2js.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkRBZI3ZHDjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
747
- _chunkRBZI3ZHDjs.RouterProvider,
746
+ return /* @__PURE__ */ React3.createElement(_chunkUO7KGW2Ujs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkOVG6YSZ5js.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkUO7KGW2Ujs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
747
+ _chunkUO7KGW2Ujs.RouterProvider,
748
748
  {
749
749
  router: transitionEnabledRouter,
750
- flushSync: ReactDOM2.flushSync,
751
- unstable_useTransitions: true
750
+ flushSync: ReactDOM2.flushSync
752
751
  }
753
752
  ))));
754
753
  }
@@ -761,8 +760,8 @@ function createRouteFromServerManifest(match, payload) {
761
760
  // the server loader flow regardless of whether the client loader calls
762
761
  // `serverLoader` or not, otherwise we'll have nothing to render.
763
762
  match.hasComponent && !match.element;
764
- _chunkRBZI3ZHDjs.invariant.call(void 0, window.__reactRouterRouteModules);
765
- _chunkFKYGG5Z2js.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
763
+ _chunkUO7KGW2Ujs.invariant.call(void 0, window.__reactRouterRouteModules);
764
+ _chunkOVG6YSZ5js.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
766
765
  let dataRoute = {
767
766
  id: match.id,
768
767
  element: match.element,
@@ -812,7 +811,7 @@ function createRouteFromServerManifest(match, payload) {
812
811
  return await callSingleFetch(singleFetch);
813
812
  }
814
813
  }) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
815
- throw _chunkRBZI3ZHDjs.noActionDefinedError.call(void 0, "action", match.id);
814
+ throw _chunkUO7KGW2Ujs.noActionDefinedError.call(void 0, "action", match.id);
816
815
  },
817
816
  path: match.path,
818
817
  shouldRevalidate: match.shouldRevalidate,
@@ -825,7 +824,7 @@ function createRouteFromServerManifest(match, payload) {
825
824
  hasShouldRevalidate: match.shouldRevalidate != null
826
825
  };
827
826
  if (typeof dataRoute.loader === "function") {
828
- dataRoute.loader.hydrate = _chunkRBZI3ZHDjs.shouldHydrateRouteLoader.call(void 0,
827
+ dataRoute.loader.hydrate = _chunkUO7KGW2Ujs.shouldHydrateRouteLoader.call(void 0,
829
828
  match.id,
830
829
  match.clientLoader,
831
830
  match.hasLoader,
@@ -835,7 +834,7 @@ function createRouteFromServerManifest(match, payload) {
835
834
  return dataRoute;
836
835
  }
837
836
  function callSingleFetch(singleFetch) {
838
- _chunkRBZI3ZHDjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
837
+ _chunkUO7KGW2Ujs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
839
838
  return singleFetch();
840
839
  }
841
840
  function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
@@ -843,7 +842,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
843
842
  let fn = type === "action" ? "serverAction()" : "serverLoader()";
844
843
  let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
845
844
  console.error(msg);
846
- throw new (0, _chunkRBZI3ZHDjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
845
+ throw new (0, _chunkUO7KGW2Ujs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
847
846
  }
848
847
  }
849
848
  var nextPaths = /* @__PURE__ */ new Set();
@@ -898,7 +897,7 @@ async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fet
898
897
  function addToFifoQueue(path, queue) {
899
898
  if (queue.size >= discoveredPathsMaxSize) {
900
899
  let first = queue.values().next().value;
901
- queue.delete(first);
900
+ if (typeof first === "string") queue.delete(first);
902
901
  }
903
902
  queue.add(path);
904
903
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.10.1
2
+ * react-router v7.11.0-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-PMGK554W.mjs";
17
+ } from "./chunk-QMKP6CC3.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-WWGJGFF6.mjs";
45
+ } from "./chunk-KRMLYMWA.mjs";
46
46
 
47
47
  // lib/dom-export/dom-router-provider.tsx
48
48
  import * as React from "react";
@@ -245,7 +245,7 @@ function HydratedRouter(props) {
245
245
  {
246
246
  router,
247
247
  unstable_useTransitions: props.unstable_useTransitions,
248
- unstable_onError: props.unstable_onError
248
+ onError: props.onError
249
249
  }
250
250
  ))
251
251
  ), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
@@ -739,8 +739,7 @@ function RSCHydratedRouter({
739
739
  RouterProvider,
740
740
  {
741
741
  router: transitionEnabledRouter,
742
- flushSync: ReactDOM2.flushSync,
743
- unstable_useTransitions: true
742
+ flushSync: ReactDOM2.flushSync
744
743
  }
745
744
  ))));
746
745
  }
@@ -890,7 +889,7 @@ async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fet
890
889
  function addToFifoQueue(path, queue) {
891
890
  if (queue.size >= discoveredPathsMaxSize) {
892
891
  let first = queue.values().next().value;
893
- queue.delete(first);
892
+ if (typeof first === "string") queue.delete(first);
894
893
  }
895
894
  queue.add(path);
896
895
  }
@@ -1,4 +1,4 @@
1
- import { bE as RouteManifest, o as RouteModules, Q as HydrationState, a1 as DataRouteObject, a as ClientLoaderFunction, a5 as StaticHandlerContext, bF as ServerRouteModule, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, al as LoaderFunctionArgs, ac as ActionFunctionArgs, au as unstable_ServerInstrumentation, aj as HTMLFormMethod, ah as FormEncType, w as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bG as History, a4 as GetScrollRestorationKeyFunction, e as RouterInit, bH as FutureConfig$1, u as unstable_ClientInstrumentation, p as DataStrategyFunction, a0 as PatchRoutesOnNavigationFunction, s as NavigateOptions, a6 as Fetcher, K as RouteObject, n as Router, v as SerializeFrom, B as BlockerFunction, L as Location, bI as CreateStaticHandlerOptions$1, a2 as StaticHandler } from './instrumentation-BB0wRuqz.js';
1
+ import { bE as RouteManifest, o as RouteModules, Q as HydrationState, a1 as DataRouteObject, a as ClientLoaderFunction, a5 as StaticHandlerContext, bF as ServerRouteModule, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, al as LoaderFunctionArgs, ac as ActionFunctionArgs, au as unstable_ServerInstrumentation, aj as HTMLFormMethod, ah as FormEncType, w as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bG as History, a4 as GetScrollRestorationKeyFunction, e as RouterInit, bH as FutureConfig$1, u as unstable_ClientInstrumentation, p as DataStrategyFunction, a0 as PatchRoutesOnNavigationFunction, s as NavigateOptions, a6 as Fetcher, K as RouteObject, n as Router, v as SerializeFrom, B as BlockerFunction, L as Location, bI as CreateStaticHandlerOptions$1, a2 as StaticHandler } from './instrumentation-BlrVzjbg.js';
2
2
  import * as React from 'react';
3
3
 
4
4
  interface Route {
@@ -215,6 +215,18 @@ interface SharedSubmitOptions {
215
215
  * Enable flushSync for this submission's state updates
216
216
  */
217
217
  flushSync?: boolean;
218
+ /**
219
+ * Specify the default revalidation behavior after this submission
220
+ *
221
+ * If no `shouldRevalidate` functions are present on the active routes, then this
222
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
223
+ * so the route can make the final determination on revalidation. This can be
224
+ * useful when updating search params and you don't want to trigger a revalidation.
225
+ *
226
+ * By default (when not specified), loaders will revalidate according to the routers
227
+ * standard revalidation behavior.
228
+ */
229
+ unstable_defaultShouldRevalidate?: boolean;
218
230
  }
219
231
  /**
220
232
  * Submit options available to fetchers
@@ -251,7 +263,8 @@ interface SubmitOptions extends FetcherSubmitOptions {
251
263
 
252
264
  declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;
253
265
  /**
254
- * Defines the discovery behavior of the link:
266
+ * Defines the [lazy route discovery](../../explanation/lazy-route-discovery)
267
+ * behavior of the link/form:
255
268
  *
256
269
  * - "render" - default, discover the route when the link renders
257
270
  * - "none" - don't eagerly discover, only discover if the link is clicked
@@ -1112,16 +1125,16 @@ declare namespace HistoryRouter {
1112
1125
  */
1113
1126
  interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
1114
1127
  /**
1115
- * Defines the link discovery behavior
1128
+ * Defines the link [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
1129
+ *
1130
+ * - **render** — default, discover the route when the link renders
1131
+ * - **none** — don't eagerly discover, only discover if the link is clicked
1116
1132
  *
1117
1133
  * ```tsx
1118
1134
  * <Link /> // default ("render")
1119
1135
  * <Link discover="render" />
1120
1136
  * <Link discover="none" />
1121
1137
  * ```
1122
- *
1123
- * - **render** — default, discover the route when the link renders
1124
- * - **none** — don't eagerly discover, only discover if the link is clicked
1125
1138
  */
1126
1139
  discover?: DiscoverBehavior;
1127
1140
  /**
@@ -1266,6 +1279,22 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
1266
1279
  * To apply specific styles for the transition, see {@link useViewTransitionState}
1267
1280
  */
1268
1281
  viewTransition?: boolean;
1282
+ /**
1283
+ * Specify the default revalidation behavior for the navigation.
1284
+ *
1285
+ * ```tsx
1286
+ * <Link to="/some/path" unstable_defaultShouldRevalidate={false} />
1287
+ * ```
1288
+ *
1289
+ * If no `shouldRevalidate` functions are present on the active routes, then this
1290
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
1291
+ * so the route can make the final determination on revalidation. This can be
1292
+ * useful when updating search params and you don't want to trigger a revalidation.
1293
+ *
1294
+ * By default (when not specified), loaders will revalidate according to the routers
1295
+ * standard revalidation behavior.
1296
+ */
1297
+ unstable_defaultShouldRevalidate?: boolean;
1269
1298
  }
1270
1299
  /**
1271
1300
  * A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
@@ -1295,6 +1324,7 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
1295
1324
  * @param {LinkProps.state} props.state n/a
1296
1325
  * @param {LinkProps.to} props.to n/a
1297
1326
  * @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
1327
+ * @param {LinkProps.unstable_defaultShouldRevalidate} props.unstable_defaultShouldRevalidate n/a
1298
1328
  */
1299
1329
  declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
1300
1330
  /**
@@ -1524,6 +1554,18 @@ interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
1524
1554
  * then this form will not do anything.
1525
1555
  */
1526
1556
  onSubmit?: React.FormEventHandler<HTMLFormElement>;
1557
+ /**
1558
+ * Specify the default revalidation behavior after this submission
1559
+ *
1560
+ * If no `shouldRevalidate` functions are present on the active routes, then this
1561
+ * value will be used directly. Otherwise it will be passed into `shouldRevalidate`
1562
+ * so the route can make the final determination on revalidation. This can be
1563
+ * useful when updating search params and you don't want to trigger a revalidation.
1564
+ *
1565
+ * By default (when not specified), loaders will revalidate according to the routers
1566
+ * standard revalidation behavior.
1567
+ */
1568
+ unstable_defaultShouldRevalidate?: boolean;
1527
1569
  }
1528
1570
  /**
1529
1571
  * Form props available to fetchers
@@ -1537,16 +1579,16 @@ interface FetcherFormProps extends SharedFormProps {
1537
1579
  */
1538
1580
  interface FormProps extends SharedFormProps {
1539
1581
  /**
1540
- * Defines the link discovery behavior. See {@link DiscoverBehavior}.
1582
+ * Defines the form [lazy route discovery](../../explanation/lazy-route-discovery) behavior.
1583
+ *
1584
+ * - **render** — default, discover the route when the form renders
1585
+ * - **none** — don't eagerly discover, only discover if the form is submitted
1541
1586
  *
1542
1587
  * ```tsx
1543
- * <Link /> // default ("render")
1544
- * <Link discover="render" />
1545
- * <Link discover="none" />
1588
+ * <Form /> // default ("render")
1589
+ * <Form discover="render" />
1590
+ * <Form discover="none" />
1546
1591
  * ```
1547
- *
1548
- * - **render** — default, discover the route when the link renders
1549
- * - **none** — don't eagerly discover, only discover if the link is clicked
1550
1592
  */
1551
1593
  discover?: DiscoverBehavior;
1552
1594
  /**
@@ -1631,6 +1673,7 @@ interface FormProps extends SharedFormProps {
1631
1673
  * @param {FormProps.replace} replace n/a
1632
1674
  * @param {FormProps.state} state n/a
1633
1675
  * @param {FormProps.viewTransition} viewTransition n/a
1676
+ * @param {FormProps.unstable_defaultShouldRevalidate} unstable_defaultShouldRevalidate n/a
1634
1677
  * @returns A progressively enhanced [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) component
1635
1678
  */
1636
1679
  declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
@@ -1721,18 +1764,21 @@ declare namespace ScrollRestoration {
1721
1764
  * @param options.viewTransition Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)
1722
1765
  * for this navigation. To apply specific styles during the transition, see
1723
1766
  * {@link useViewTransitionState}. Defaults to `false`.
1767
+ * @param options.unstable_defaultShouldRevalidate Specify the default revalidation
1768
+ * behavior for the navigation. Defaults to `true`.
1724
1769
  * @param options.unstable_useTransitions Wraps the navigation in
1725
1770
  * [`React.startTransition`](https://react.dev/reference/react/startTransition)
1726
1771
  * for concurrent rendering. Defaults to `false`.
1727
1772
  * @returns A click handler function that can be used in a custom {@link Link} component.
1728
1773
  */
1729
- declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_useTransitions, }?: {
1774
+ declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
1730
1775
  target?: React.HTMLAttributeAnchorTarget;
1731
1776
  replace?: boolean;
1732
1777
  state?: any;
1733
1778
  preventScrollReset?: boolean;
1734
1779
  relative?: RelativeRoutingType;
1735
1780
  viewTransition?: boolean;
1781
+ unstable_defaultShouldRevalidate?: boolean;
1736
1782
  unstable_useTransitions?: boolean;
1737
1783
  }): (event: React.MouseEvent<E, MouseEvent>) => void;
1738
1784
  /**