react-router 7.13.0 → 7.13.1

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 +69 -0
  2. package/dist/development/{browser-BEPxnEBW.d.mts → browser-DzsJABDQ.d.mts} +3 -2
  3. package/dist/{production/browser-BEPxnEBW.d.mts → development/browser-sPQ7eaK4.d.ts} +3 -2
  4. package/dist/development/{chunk-HMDR2CVH.js → chunk-2YMDXNOJ.js} +124 -107
  5. package/dist/{production/chunk-GSFLVUYQ.mjs → development/chunk-JPUPSTYD.mjs} +13 -4
  6. package/dist/{production/chunk-NGWWS4QJ.js → development/chunk-KSEWV2VO.js} +7 -7
  7. package/dist/development/{chunk-JZWAC4HX.mjs → chunk-LFPYN7LY.mjs} +153 -63
  8. package/dist/development/{chunk-WICQJKU6.js → chunk-XOLAXE2Z.js} +203 -128
  9. package/dist/development/dom-export.d.mts +2 -2
  10. package/dist/development/dom-export.d.ts +2 -2
  11. package/dist/development/dom-export.js +34 -27
  12. package/dist/development/dom-export.mjs +10 -3
  13. package/dist/development/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
  14. package/dist/development/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
  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 +12 -1
  20. package/dist/development/index-react-server.d.ts +12 -1
  21. package/dist/development/index-react-server.js +80 -44
  22. package/dist/development/index-react-server.mjs +80 -45
  23. package/dist/development/index.d.mts +11 -10
  24. package/dist/development/index.d.ts +11 -10
  25. package/dist/development/index.js +94 -85
  26. package/dist/development/index.mjs +3 -3
  27. package/dist/{production/instrumentation-DvHY1sgY.d.ts → development/instrumentation--6Pioq_G.d.ts} +14 -2
  28. package/dist/development/lib/types/internal.d.mts +4 -4
  29. package/dist/development/lib/types/internal.d.ts +4 -4
  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-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
  33. package/dist/development/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
  34. package/dist/{production/router-5iOvts3c.d.mts → development/router-cLsU7kHk.d.mts} +14 -2
  35. package/dist/{development/browser-CJ9_du-U.d.ts → production/browser-DzsJABDQ.d.mts} +3 -2
  36. package/dist/production/{browser-CJ9_du-U.d.ts → browser-sPQ7eaK4.d.ts} +3 -2
  37. package/dist/production/{chunk-QSNCZFX5.js → chunk-772H4TVR.js} +203 -128
  38. package/dist/production/{chunk-N2HZAAIG.js → chunk-B5UMK6O7.js} +124 -107
  39. package/dist/production/{chunk-Y3R63HEB.mjs → chunk-RJCJ3EYF.mjs} +153 -63
  40. package/dist/{development/chunk-4LKRSAEJ.mjs → production/chunk-TXB4YXR2.mjs} +13 -4
  41. package/dist/{development/chunk-7PAHGFS4.js → production/chunk-ZJMCM6KT.js} +7 -7
  42. package/dist/production/dom-export.d.mts +2 -2
  43. package/dist/production/dom-export.d.ts +2 -2
  44. package/dist/production/dom-export.js +34 -27
  45. package/dist/production/dom-export.mjs +10 -3
  46. package/dist/production/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
  47. package/dist/production/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
  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 +12 -1
  53. package/dist/production/index-react-server.d.ts +12 -1
  54. package/dist/production/index-react-server.js +80 -44
  55. package/dist/production/index-react-server.mjs +80 -45
  56. package/dist/production/index.d.mts +11 -10
  57. package/dist/production/index.d.ts +11 -10
  58. package/dist/production/index.js +94 -85
  59. package/dist/production/index.mjs +3 -3
  60. package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts} +14 -2
  61. package/dist/production/lib/types/internal.d.mts +4 -4
  62. package/dist/production/lib/types/internal.d.ts +4 -4
  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-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
  66. package/dist/production/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
  67. package/dist/{development/router-5iOvts3c.d.mts → production/router-cLsU7kHk.d.mts} +14 -2
  68. 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.13.0
2
+ * react-router v7.13.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -23,6 +23,9 @@ var Action = /* @__PURE__ */ ((Action2) => {
23
23
  return Action2;
24
24
  })(Action || {});
25
25
  var PopStateEventType = "popstate";
26
+ function isLocation(obj) {
27
+ return typeof obj === "object" && obj != null && "pathname" in obj && "search" in obj && "hash" in obj && "state" in obj && "key" in obj;
28
+ }
26
29
  function createMemoryHistory(options = {}) {
27
30
  let { initialEntries = ["/"], initialIndex, v5Compat = false } = options;
28
31
  let entries;
@@ -30,7 +33,8 @@ function createMemoryHistory(options = {}) {
30
33
  (entry, index2) => createMemoryLocation(
31
34
  entry,
32
35
  typeof entry === "string" ? null : entry.state,
33
- index2 === 0 ? "default" : void 0
36
+ index2 === 0 ? "default" : void 0,
37
+ typeof entry === "string" ? void 0 : entry.unstable_mask
34
38
  )
35
39
  );
36
40
  let index = clampIndex(
@@ -44,12 +48,13 @@ function createMemoryHistory(options = {}) {
44
48
  function getCurrentLocation() {
45
49
  return entries[index];
46
50
  }
47
- function createMemoryLocation(to, state = null, key) {
51
+ function createMemoryLocation(to, state = null, key, unstable_mask) {
48
52
  let location = createLocation(
49
53
  entries ? getCurrentLocation().pathname : "/",
50
54
  to,
51
55
  state,
52
- key
56
+ key,
57
+ unstable_mask
53
58
  );
54
59
  warning(
55
60
  location.pathname.charAt(0) === "/",
@@ -86,7 +91,7 @@ function createMemoryHistory(options = {}) {
86
91
  },
87
92
  push(to, state) {
88
93
  action = "PUSH" /* Push */;
89
- let nextLocation = createMemoryLocation(to, state);
94
+ let nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);
90
95
  index += 1;
91
96
  entries.splice(index, entries.length, nextLocation);
92
97
  if (v5Compat && listener) {
@@ -95,7 +100,7 @@ function createMemoryHistory(options = {}) {
95
100
  },
96
101
  replace(to, state) {
97
102
  action = "REPLACE" /* Replace */;
98
- let nextLocation = createMemoryLocation(to, state);
103
+ let nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);
99
104
  entries[index] = nextLocation;
100
105
  if (v5Compat && listener) {
101
106
  listener({ action, location: nextLocation, delta: 0 });
@@ -121,13 +126,19 @@ function createMemoryHistory(options = {}) {
121
126
  }
122
127
  function createBrowserHistory(options = {}) {
123
128
  function createBrowserLocation(window2, globalHistory) {
124
- let { pathname, search, hash } = window2.location;
129
+ let maskedLocation = _optionalChain([globalHistory, 'access', _2 => _2.state, 'optionalAccess', _3 => _3.masked]);
130
+ let { pathname, search, hash } = maskedLocation || window2.location;
125
131
  return createLocation(
126
132
  "",
127
133
  { pathname, search, hash },
128
134
  // state defaults to `null` because `window.history.state` does
129
135
  globalHistory.state && globalHistory.state.usr || null,
130
- globalHistory.state && globalHistory.state.key || "default"
136
+ globalHistory.state && globalHistory.state.key || "default",
137
+ maskedLocation ? {
138
+ pathname: window2.location.pathname,
139
+ search: window2.location.search,
140
+ hash: window2.location.hash
141
+ } : void 0
131
142
  );
132
143
  }
133
144
  function createBrowserHref(window2, to) {
@@ -204,10 +215,15 @@ function getHistoryState(location, index) {
204
215
  return {
205
216
  usr: location.state,
206
217
  key: location.key,
207
- idx: index
218
+ idx: index,
219
+ masked: location.unstable_mask ? {
220
+ pathname: location.pathname,
221
+ search: location.search,
222
+ hash: location.hash
223
+ } : void 0
208
224
  };
209
225
  }
210
- function createLocation(current, to, state = null, key) {
226
+ function createLocation(current, to, state = null, key, unstable_mask) {
211
227
  let location = {
212
228
  pathname: typeof current === "string" ? current : current.pathname,
213
229
  search: "",
@@ -218,7 +234,8 @@ function createLocation(current, to, state = null, key) {
218
234
  // full Locations now and avoid the need to run through this flow at all
219
235
  // But that's a pretty big refactor to the current test suite so going to
220
236
  // keep as is for the time being and just let any incoming keys take precedence
221
- key: to && to.key || key || createKey()
237
+ key: to && to.key || key || createKey(),
238
+ unstable_mask
222
239
  };
223
240
  return location;
224
241
  }
@@ -277,11 +294,11 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options =
277
294
  }
278
295
  function push(to, state) {
279
296
  action = "PUSH" /* Push */;
280
- let location = createLocation(history.location, to, state);
297
+ let location = isLocation(to) ? to : createLocation(history.location, to, state);
281
298
  if (validateLocation) validateLocation(location, to);
282
299
  index = getIndex() + 1;
283
300
  let historyState = getHistoryState(location, index);
284
- let url = history.createHref(location);
301
+ let url = history.createHref(location.unstable_mask || location);
285
302
  try {
286
303
  globalHistory.pushState(historyState, "", url);
287
304
  } catch (error) {
@@ -296,11 +313,11 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options =
296
313
  }
297
314
  function replace2(to, state) {
298
315
  action = "REPLACE" /* Replace */;
299
- let location = createLocation(history.location, to, state);
316
+ let location = isLocation(to) ? to : createLocation(history.location, to, state);
300
317
  if (validateLocation) validateLocation(location, to);
301
318
  index = getIndex();
302
319
  let historyState = getHistoryState(location, index);
303
- let url = history.createHref(location);
320
+ let url = history.createHref(location.unstable_mask || location);
304
321
  globalHistory.replaceState(historyState, "", url);
305
322
  if (v5Compat && listener) {
306
323
  listener({ action, location: history.location, delta: 0 });
@@ -573,7 +590,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
573
590
  });
574
591
  };
575
592
  routes.forEach((route, index) => {
576
- if (route.path === "" || !_optionalChain([route, 'access', _2 => _2.path, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4("?")])) {
593
+ if (route.path === "" || !_optionalChain([route, 'access', _4 => _4.path, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("?")])) {
577
594
  flattenRoute(route, index);
578
595
  } else {
579
596
  for (let exploded of explodeOptionalSegments(route.path)) {
@@ -765,9 +782,16 @@ function compilePath(path, caseSensitive = false, end = true) {
765
782
  let params = [];
766
783
  let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
767
784
  /\/:([\w-]+)(\?)?/g,
768
- (_, paramName, isOptional) => {
785
+ (match, paramName, isOptional, index, str) => {
769
786
  params.push({ paramName, isOptional: isOptional != null });
770
- return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
787
+ if (isOptional) {
788
+ let nextChar = str.charAt(index + match.length);
789
+ if (nextChar && nextChar !== "/") {
790
+ return "/([^\\/]*)";
791
+ }
792
+ return "(?:/([^\\/]*))?";
793
+ }
794
+ return "/([^\\/]+)";
771
795
  }
772
796
  ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
773
797
  if (path.endsWith("*")) {
@@ -1368,12 +1392,14 @@ function createRouter(init) {
1368
1392
  let initialMatchesIsFOW = false;
1369
1393
  let initialErrors = null;
1370
1394
  let initialized;
1395
+ let renderFallback;
1371
1396
  if (initialMatches == null && !init.patchRoutesOnNavigation) {
1372
1397
  let error = getInternalRouterError(404, {
1373
1398
  pathname: init.history.location.pathname
1374
1399
  });
1375
1400
  let { matches, route } = getShortCircuitMatches(dataRoutes);
1376
1401
  initialized = true;
1402
+ renderFallback = !initialized;
1377
1403
  initialMatches = matches;
1378
1404
  initialErrors = { [route.id]: error };
1379
1405
  } else {
@@ -1389,6 +1415,7 @@ function createRouter(init) {
1389
1415
  }
1390
1416
  if (!initialMatches) {
1391
1417
  initialized = false;
1418
+ renderFallback = !initialized;
1392
1419
  initialMatches = [];
1393
1420
  let fogOfWar = checkFogOfWar(
1394
1421
  null,
@@ -1401,23 +1428,26 @@ function createRouter(init) {
1401
1428
  }
1402
1429
  } else if (initialMatches.some((m) => m.route.lazy)) {
1403
1430
  initialized = false;
1431
+ renderFallback = !initialized;
1404
1432
  } else if (!initialMatches.some((m) => routeHasLoaderOrMiddleware(m.route))) {
1405
1433
  initialized = true;
1434
+ renderFallback = !initialized;
1406
1435
  } else {
1407
1436
  let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;
1408
1437
  let errors = init.hydrationData ? init.hydrationData.errors : null;
1438
+ let relevantMatches = initialMatches;
1409
1439
  if (errors) {
1410
1440
  let idx = initialMatches.findIndex(
1411
1441
  (m) => errors[m.route.id] !== void 0
1412
1442
  );
1413
- initialized = initialMatches.slice(0, idx + 1).every(
1414
- (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)
1415
- );
1416
- } else {
1417
- initialized = initialMatches.every(
1418
- (m) => !shouldLoadRouteOnHydration(m.route, loaderData, errors)
1419
- );
1443
+ relevantMatches = relevantMatches.slice(0, idx + 1);
1420
1444
  }
1445
+ renderFallback = false;
1446
+ initialized = relevantMatches.every((m) => {
1447
+ let status = getRouteHydrationStatus(m.route, loaderData, errors);
1448
+ renderFallback = renderFallback || status.renderFallback;
1449
+ return !status.shouldLoad;
1450
+ });
1421
1451
  }
1422
1452
  }
1423
1453
  let router;
@@ -1426,6 +1456,7 @@ function createRouter(init) {
1426
1456
  location: init.history.location,
1427
1457
  matches: initialMatches,
1428
1458
  initialized,
1459
+ renderFallback,
1429
1460
  navigation: IDLE_NAVIGATION,
1430
1461
  // Don't restore on initial updateState() if we were SSR'd
1431
1462
  restoreScrollPosition: init.hydrationData != null ? false : null,
@@ -1498,7 +1529,7 @@ function createRouter(init) {
1498
1529
  updateState({ blockers });
1499
1530
  }
1500
1531
  });
1501
- _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _5 => _5.resolve, 'call', _6 => _6()]);
1532
+ _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _7 => _7.resolve, 'call', _8 => _8()]);
1502
1533
  pendingPopstateNavigationDfd = null;
1503
1534
  return;
1504
1535
  }
@@ -1580,7 +1611,7 @@ function createRouter(init) {
1580
1611
  mountedFetchers.forEach((key) => state.fetchers.delete(key));
1581
1612
  }
1582
1613
  function completeNavigation(location, newState, { flushSync } = {}) {
1583
- let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && _optionalChain([location, 'access', _7 => _7.state, 'optionalAccess', _8 => _8._isRedirect]) !== true;
1614
+ let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && _optionalChain([location, 'access', _9 => _9.state, 'optionalAccess', _10 => _10._isRedirect]) !== true;
1584
1615
  let actionData;
1585
1616
  if (newState.actionData) {
1586
1617
  if (Object.keys(newState.actionData).length > 0) {
@@ -1605,7 +1636,7 @@ function createRouter(init) {
1605
1636
  blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
1606
1637
  }
1607
1638
  let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);
1608
- let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && _optionalChain([location, 'access', _9 => _9.state, 'optionalAccess', _10 => _10._isRedirect]) !== true;
1639
+ let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && _optionalChain([location, 'access', _11 => _11.state, 'optionalAccess', _12 => _12._isRedirect]) !== true;
1609
1640
  if (inFlightDataRoutes) {
1610
1641
  dataRoutes = inFlightDataRoutes;
1611
1642
  inFlightDataRoutes = void 0;
@@ -1653,6 +1684,7 @@ function createRouter(init) {
1653
1684
  historyAction: pendingAction,
1654
1685
  location,
1655
1686
  initialized: true,
1687
+ renderFallback: false,
1656
1688
  navigation: IDLE_NAVIGATION,
1657
1689
  revalidation: "idle",
1658
1690
  restoreScrollPosition,
@@ -1669,13 +1701,13 @@ function createRouter(init) {
1669
1701
  pendingViewTransitionEnabled = false;
1670
1702
  isUninterruptedRevalidation = false;
1671
1703
  isRevalidationRequired = false;
1672
- _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _11 => _11.resolve, 'call', _12 => _12()]);
1704
+ _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _13 => _13.resolve, 'call', _14 => _14()]);
1673
1705
  pendingPopstateNavigationDfd = null;
1674
- _optionalChain([pendingRevalidationDfd, 'optionalAccess', _13 => _13.resolve, 'call', _14 => _14()]);
1706
+ _optionalChain([pendingRevalidationDfd, 'optionalAccess', _15 => _15.resolve, 'call', _16 => _16()]);
1675
1707
  pendingRevalidationDfd = null;
1676
1708
  }
1677
1709
  async function navigate(to, opts) {
1678
- _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _15 => _15.resolve, 'call', _16 => _16()]);
1710
+ _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _17 => _17.resolve, 'call', _18 => _18()]);
1679
1711
  pendingPopstateNavigationDfd = null;
1680
1712
  if (typeof to === "number") {
1681
1713
  if (!pendingPopstateNavigationDfd) {
@@ -1690,16 +1722,35 @@ function createRouter(init) {
1690
1722
  state.matches,
1691
1723
  basename,
1692
1724
  to,
1693
- _optionalChain([opts, 'optionalAccess', _17 => _17.fromRouteId]),
1694
- _optionalChain([opts, 'optionalAccess', _18 => _18.relative])
1725
+ _optionalChain([opts, 'optionalAccess', _19 => _19.fromRouteId]),
1726
+ _optionalChain([opts, 'optionalAccess', _20 => _20.relative])
1695
1727
  );
1696
1728
  let { path, submission, error } = normalizeNavigateOptions(
1697
1729
  false,
1698
1730
  normalizedPath,
1699
1731
  opts
1700
1732
  );
1733
+ let maskPath;
1734
+ if (_optionalChain([opts, 'optionalAccess', _21 => _21.unstable_mask])) {
1735
+ let partialPath = typeof opts.unstable_mask === "string" ? parsePath(opts.unstable_mask) : {
1736
+ ...state.location.unstable_mask,
1737
+ ...opts.unstable_mask
1738
+ };
1739
+ maskPath = {
1740
+ pathname: "",
1741
+ search: "",
1742
+ hash: "",
1743
+ ...partialPath
1744
+ };
1745
+ }
1701
1746
  let currentLocation = state.location;
1702
- let nextLocation = createLocation(state.location, path, opts && opts.state);
1747
+ let nextLocation = createLocation(
1748
+ currentLocation,
1749
+ path,
1750
+ opts && opts.state,
1751
+ void 0,
1752
+ maskPath
1753
+ );
1703
1754
  nextLocation = {
1704
1755
  ...nextLocation,
1705
1756
  ...init.history.encodeLocation(nextLocation)
@@ -1789,7 +1840,7 @@ function createRouter(init) {
1789
1840
  pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
1790
1841
  let routesToUse = inFlightDataRoutes || dataRoutes;
1791
1842
  let loadingNavigation = opts && opts.overrideNavigation;
1792
- let matches = _optionalChain([opts, 'optionalAccess', _19 => _19.initialHydration]) && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
1843
+ let matches = _optionalChain([opts, 'optionalAccess', _22 => _22.initialHydration]) && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
1793
1844
  // `matchRoutes()` has already been called if we're in here via `router.initialize()`
1794
1845
  state.matches
1795
1846
  ) : matchRoutes(routesToUse, location, basename);
@@ -2250,7 +2301,7 @@ function createRouter(init) {
2250
2301
  basename,
2251
2302
  href,
2252
2303
  routeId,
2253
- _optionalChain([opts, 'optionalAccess', _20 => _20.relative])
2304
+ _optionalChain([opts, 'optionalAccess', _23 => _23.relative])
2254
2305
  );
2255
2306
  let matches = matchRoutes(routesToUse, normalizedPath, basename);
2256
2307
  let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);
@@ -2630,7 +2681,7 @@ function createRouter(init) {
2630
2681
  replace: replace2
2631
2682
  } = {}) {
2632
2683
  if (!isNavigation) {
2633
- _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _21 => _21.resolve, 'call', _22 => _22()]);
2684
+ _optionalChain([pendingPopstateNavigationDfd, 'optionalAccess', _24 => _24.resolve, 'call', _25 => _25()]);
2634
2685
  pendingPopstateNavigationDfd = null;
2635
2686
  }
2636
2687
  if (redirect2.response.headers.has("X-Remix-Revalidate")) {
@@ -2724,7 +2775,7 @@ function createRouter(init) {
2724
2775
  }
2725
2776
  if (!isMutationMethod(request.method)) {
2726
2777
  for (let match of matches) {
2727
- if (_optionalChain([results, 'access', _23 => _23[match.route.id], 'optionalAccess', _24 => _24.type]) === "error" /* error */) {
2778
+ if (_optionalChain([results, 'access', _26 => _26[match.route.id], 'optionalAccess', _27 => _27.type]) === "error" /* error */) {
2728
2779
  break;
2729
2780
  }
2730
2781
  if (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) {
@@ -2833,7 +2884,7 @@ function createRouter(init) {
2833
2884
  return state.fetchers.get(key) || IDLE_FETCHER;
2834
2885
  }
2835
2886
  function resetFetcher(key, opts) {
2836
- abortFetcher(key, _optionalChain([opts, 'optionalAccess', _25 => _25.reason]));
2887
+ abortFetcher(key, _optionalChain([opts, 'optionalAccess', _28 => _28.reason]));
2837
2888
  updateFetcherState(key, getDoneFetcher(null));
2838
2889
  }
2839
2890
  function deleteFetcher(key) {
@@ -3174,9 +3225,9 @@ function createStaticHandler(routes, opts) {
3174
3225
  );
3175
3226
  let manifest = {};
3176
3227
  let basename = (opts ? opts.basename : null) || "/";
3177
- let _mapRouteProperties = _optionalChain([opts, 'optionalAccess', _26 => _26.mapRouteProperties]) || defaultMapRouteProperties;
3228
+ let _mapRouteProperties = _optionalChain([opts, 'optionalAccess', _29 => _29.mapRouteProperties]) || defaultMapRouteProperties;
3178
3229
  let mapRouteProperties2 = _mapRouteProperties;
3179
- if (_optionalChain([opts, 'optionalAccess', _27 => _27.unstable_instrumentations])) {
3230
+ if (_optionalChain([opts, 'optionalAccess', _30 => _30.unstable_instrumentations])) {
3180
3231
  let instrumentations = opts.unstable_instrumentations;
3181
3232
  mapRouteProperties2 = (route) => {
3182
3233
  return {
@@ -3321,9 +3372,9 @@ function createStaticHandler(routes, opts) {
3321
3372
  } else {
3322
3373
  let boundaryRouteId = skipLoaderErrorBubbling ? routeId : findNearestBoundary(
3323
3374
  matches,
3324
- _optionalChain([matches, 'access', _28 => _28.find, 'call', _29 => _29(
3375
+ _optionalChain([matches, 'access', _31 => _31.find, 'call', _32 => _32(
3325
3376
  (m) => m.route.id === routeId || m.route.loader
3326
- ), 'optionalAccess', _30 => _30.route, 'access', _31 => _31.id]) || routeId
3377
+ ), 'optionalAccess', _33 => _33.route, 'access', _34 => _34.id]) || routeId
3327
3378
  ).route.id;
3328
3379
  let staticContext = {
3329
3380
  matches,
@@ -3656,11 +3707,11 @@ function createStaticHandler(routes, opts) {
3656
3707
  }
3657
3708
  async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {
3658
3709
  let isRouteRequest = routeMatch != null;
3659
- if (isRouteRequest && !_optionalChain([routeMatch, 'optionalAccess', _32 => _32.route, 'access', _33 => _33.loader]) && !_optionalChain([routeMatch, 'optionalAccess', _34 => _34.route, 'access', _35 => _35.lazy])) {
3710
+ if (isRouteRequest && !_optionalChain([routeMatch, 'optionalAccess', _35 => _35.route, 'access', _36 => _36.loader]) && !_optionalChain([routeMatch, 'optionalAccess', _37 => _37.route, 'access', _38 => _38.lazy])) {
3660
3711
  throw getInternalRouterError(400, {
3661
3712
  method: request.method,
3662
3713
  pathname: new URL(request.url).pathname,
3663
- routeId: _optionalChain([routeMatch, 'optionalAccess', _36 => _36.route, 'access', _37 => _37.id])
3714
+ routeId: _optionalChain([routeMatch, 'optionalAccess', _39 => _39.route, 'access', _40 => _40.id])
3664
3715
  });
3665
3716
  }
3666
3717
  let dsMatches;
@@ -3971,7 +4022,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
3971
4022
  let shouldSkipRevalidation = actionStatus && actionStatus >= 400;
3972
4023
  let baseShouldRevalidateArgs = {
3973
4024
  currentUrl,
3974
- currentParams: _optionalChain([state, 'access', _38 => _38.matches, 'access', _39 => _39[0], 'optionalAccess', _40 => _40.params]) || {},
4025
+ currentParams: _optionalChain([state, 'access', _41 => _41.matches, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.params]) || {},
3975
4026
  nextUrl,
3976
4027
  nextParams: matches[0].params,
3977
4028
  ...submission,
@@ -3989,11 +4040,12 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
3989
4040
  } else if (!routeHasLoaderOrMiddleware(route)) {
3990
4041
  forceShouldLoad = false;
3991
4042
  } else if (initialHydration) {
3992
- forceShouldLoad = shouldLoadRouteOnHydration(
4043
+ let { shouldLoad: shouldLoad2 } = getRouteHydrationStatus(
3993
4044
  route,
3994
4045
  state.loaderData,
3995
4046
  state.errors
3996
4047
  );
4048
+ forceShouldLoad = shouldLoad2;
3997
4049
  } else if (isNewLoader(state.loaderData, state.matches[index], match)) {
3998
4050
  forceShouldLoad = true;
3999
4051
  }
@@ -4141,22 +4193,23 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
4141
4193
  function routeHasLoaderOrMiddleware(route) {
4142
4194
  return route.loader != null || route.middleware != null && route.middleware.length > 0;
4143
4195
  }
4144
- function shouldLoadRouteOnHydration(route, loaderData, errors) {
4196
+ function getRouteHydrationStatus(route, loaderData, errors) {
4145
4197
  if (route.lazy) {
4146
- return true;
4198
+ return { shouldLoad: true, renderFallback: true };
4147
4199
  }
4148
4200
  if (!routeHasLoaderOrMiddleware(route)) {
4149
- return false;
4201
+ return { shouldLoad: false, renderFallback: false };
4150
4202
  }
4151
4203
  let hasData = loaderData != null && route.id in loaderData;
4152
4204
  let hasError = errors != null && errors[route.id] !== void 0;
4153
4205
  if (!hasData && hasError) {
4154
- return false;
4206
+ return { shouldLoad: false, renderFallback: false };
4155
4207
  }
4156
4208
  if (typeof route.loader === "function" && route.loader.hydrate === true) {
4157
- return true;
4209
+ return { shouldLoad: true, renderFallback: !hasData };
4158
4210
  }
4159
- return !hasData && !hasError;
4211
+ let shouldLoad = !hasData && !hasError;
4212
+ return { shouldLoad, renderFallback: shouldLoad };
4160
4213
  }
4161
4214
  function isNewLoader(currentLoaderData, currentMatch, match) {
4162
4215
  let isNew = (
@@ -4216,7 +4269,7 @@ function patchRoutesImpl(routeId, children, routesToUse, manifest, mapRoutePrope
4216
4269
  let newRoutes = convertRoutesToDataRoutes(
4217
4270
  uniqueChildren,
4218
4271
  mapRouteProperties2,
4219
- [routeId || "_", "patch", String(_optionalChain([childrenToPatch, 'optionalAccess', _41 => _41.length]) || "0")],
4272
+ [routeId || "_", "patch", String(_optionalChain([childrenToPatch, 'optionalAccess', _44 => _44.length]) || "0")],
4220
4273
  manifest
4221
4274
  );
4222
4275
  childrenToPatch.push(...newRoutes);
@@ -4252,9 +4305,9 @@ function isSameRoute(newRoute, existingRoute) {
4252
4305
  if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {
4253
4306
  return true;
4254
4307
  }
4255
- return newRoute.children.every(
4256
- (aChild, i) => _optionalChain([existingRoute, 'access', _42 => _42.children, 'optionalAccess', _43 => _43.some, 'call', _44 => _44((bChild) => isSameRoute(aChild, bChild))])
4257
- );
4308
+ return _nullishCoalesce(_optionalChain([newRoute, 'access', _45 => _45.children, 'optionalAccess', _46 => _46.every, 'call', _47 => _47(
4309
+ (aChild, i) => _optionalChain([existingRoute, 'access', _48 => _48.children, 'optionalAccess', _49 => _49.some, 'call', _50 => _50((bChild) => isSameRoute(aChild, bChild))])
4310
+ )]), () => ( false));
4258
4311
  }
4259
4312
  var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();
4260
4313
  var loadLazyRouteProperty = ({
@@ -4401,9 +4454,9 @@ function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRouteProp
4401
4454
  }
4402
4455
  let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {
4403
4456
  }) : void 0;
4404
- _optionalChain([lazyRoutePromise, 'optionalAccess', _45 => _45.catch, 'call', _46 => _46(() => {
4457
+ _optionalChain([lazyRoutePromise, 'optionalAccess', _51 => _51.catch, 'call', _52 => _52(() => {
4405
4458
  })]);
4406
- _optionalChain([lazyHandlerPromise, 'optionalAccess', _47 => _47.catch, 'call', _48 => _48(() => {
4459
+ _optionalChain([lazyHandlerPromise, 'optionalAccess', _53 => _53.catch, 'call', _54 => _54(() => {
4407
4460
  })]);
4408
4461
  return {
4409
4462
  lazyRoutePromise,
@@ -4629,8 +4682,8 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, unstable_p
4629
4682
  request,
4630
4683
  unstable_pattern,
4631
4684
  match,
4632
- lazyHandlerPromise: _optionalChain([_lazyPromises, 'optionalAccess', _49 => _49.handler]),
4633
- lazyRoutePromise: _optionalChain([_lazyPromises, 'optionalAccess', _50 => _50.route]),
4685
+ lazyHandlerPromise: _optionalChain([_lazyPromises, 'optionalAccess', _55 => _55.handler]),
4686
+ lazyRoutePromise: _optionalChain([_lazyPromises, 'optionalAccess', _56 => _56.route]),
4634
4687
  handlerOverride,
4635
4688
  scopedContext
4636
4689
  });
@@ -4671,8 +4724,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request,
4671
4724
  });
4672
4725
  }
4673
4726
  async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherKey, scopedContext, isStaticHandler) {
4674
- if (matches.some((m) => _optionalChain([m, 'access', _51 => _51._lazyPromises, 'optionalAccess', _52 => _52.middleware]))) {
4675
- await Promise.all(matches.map((m) => _optionalChain([m, 'access', _53 => _53._lazyPromises, 'optionalAccess', _54 => _54.middleware])));
4727
+ if (matches.some((m) => _optionalChain([m, 'access', _57 => _57._lazyPromises, 'optionalAccess', _58 => _58.middleware]))) {
4728
+ await Promise.all(matches.map((m) => _optionalChain([m, 'access', _59 => _59._lazyPromises, 'optionalAccess', _60 => _60.middleware])));
4676
4729
  }
4677
4730
  let dataStrategyArgs = {
4678
4731
  request,
@@ -4707,8 +4760,8 @@ async function callDataStrategyImpl(dataStrategyImpl, request, matches, fetcherK
4707
4760
  try {
4708
4761
  await Promise.all(
4709
4762
  matches.flatMap((m) => [
4710
- _optionalChain([m, 'access', _55 => _55._lazyPromises, 'optionalAccess', _56 => _56.handler]),
4711
- _optionalChain([m, 'access', _57 => _57._lazyPromises, 'optionalAccess', _58 => _58.route])
4763
+ _optionalChain([m, 'access', _61 => _61._lazyPromises, 'optionalAccess', _62 => _62.handler]),
4764
+ _optionalChain([m, 'access', _63 => _63._lazyPromises, 'optionalAccess', _64 => _64.route])
4712
4765
  ])
4713
4766
  );
4714
4767
  } catch (e) {
@@ -4853,15 +4906,15 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
4853
4906
  return {
4854
4907
  type: "error" /* error */,
4855
4908
  error: result.data,
4856
- statusCode: _optionalChain([result, 'access', _59 => _59.init, 'optionalAccess', _60 => _60.status]),
4857
- headers: _optionalChain([result, 'access', _61 => _61.init, 'optionalAccess', _62 => _62.headers]) ? new Headers(result.init.headers) : void 0
4909
+ statusCode: _optionalChain([result, 'access', _65 => _65.init, 'optionalAccess', _66 => _66.status]),
4910
+ headers: _optionalChain([result, 'access', _67 => _67.init, 'optionalAccess', _68 => _68.headers]) ? new Headers(result.init.headers) : void 0
4858
4911
  };
4859
4912
  }
4860
4913
  return {
4861
4914
  type: "error" /* error */,
4862
4915
  error: dataWithResponseInitToErrorResponse(result),
4863
4916
  statusCode: isRouteErrorResponse(result) ? result.status : void 0,
4864
- headers: _optionalChain([result, 'access', _63 => _63.init, 'optionalAccess', _64 => _64.headers]) ? new Headers(result.init.headers) : void 0
4917
+ headers: _optionalChain([result, 'access', _69 => _69.init, 'optionalAccess', _70 => _70.headers]) ? new Headers(result.init.headers) : void 0
4865
4918
  };
4866
4919
  }
4867
4920
  return {
@@ -4874,8 +4927,8 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
4874
4927
  return {
4875
4928
  type: "data" /* data */,
4876
4929
  data: result.data,
4877
- statusCode: _optionalChain([result, 'access', _65 => _65.init, 'optionalAccess', _66 => _66.status]),
4878
- headers: _optionalChain([result, 'access', _67 => _67.init, 'optionalAccess', _68 => _68.headers]) ? new Headers(result.init.headers) : void 0
4930
+ statusCode: _optionalChain([result, 'access', _71 => _71.init, 'optionalAccess', _72 => _72.status]),
4931
+ headers: _optionalChain([result, 'access', _73 => _73.init, 'optionalAccess', _74 => _74.headers]) ? new Headers(result.init.headers) : void 0
4879
4932
  };
4880
4933
  }
4881
4934
  return { type: "data" /* data */, data: result };
@@ -5047,7 +5100,7 @@ function processLoaderData(state, matches, results, pendingActionResult, revalid
5047
5100
  let result = fetcherResults[key];
5048
5101
  invariant(result, "Did not find corresponding fetcher result");
5049
5102
  if (isErrorResult(result)) {
5050
- let boundaryMatch = findNearestBoundary(state.matches, _optionalChain([match, 'optionalAccess', _69 => _69.route, 'access', _70 => _70.id]));
5103
+ let boundaryMatch = findNearestBoundary(state.matches, _optionalChain([match, 'optionalAccess', _75 => _75.route, 'access', _76 => _76.id]));
5051
5104
  if (!(errors && errors[boundaryMatch.route.id])) {
5052
5105
  errors = {
5053
5106
  ...errors,
@@ -5181,8 +5234,8 @@ function dataWithResponseInitToResponse(data2) {
5181
5234
  }
5182
5235
  function dataWithResponseInitToErrorResponse(data2) {
5183
5236
  return new ErrorResponseImpl(
5184
- _nullishCoalesce(_optionalChain([data2, 'access', _71 => _71.init, 'optionalAccess', _72 => _72.status]), () => ( 500)),
5185
- _nullishCoalesce(_optionalChain([data2, 'access', _73 => _73.init, 'optionalAccess', _74 => _74.statusText]), () => ( "Internal Server Error")),
5237
+ _nullishCoalesce(_optionalChain([data2, 'access', _77 => _77.init, 'optionalAccess', _78 => _78.status]), () => ( 500)),
5238
+ _nullishCoalesce(_optionalChain([data2, 'access', _79 => _79.init, 'optionalAccess', _80 => _80.statusText]), () => ( "Internal Server Error")),
5186
5239
  data2.data
5187
5240
  );
5188
5241
  }
@@ -5959,7 +6012,7 @@ async function decodeDeferred(reader) {
5959
6012
  }
5960
6013
  }
5961
6014
  function encode(input, options) {
5962
- const { plugins, postPlugins, signal } = _nullishCoalesce(options, () => ( {}));
6015
+ const { plugins, postPlugins, signal, onComplete } = _nullishCoalesce(options, () => ( {}));
5963
6016
  const encoder = {
5964
6017
  deferred: {},
5965
6018
  index: 0,
@@ -6085,6 +6138,7 @@ function encode(input, options) {
6085
6138
  raceDone();
6086
6139
  }
6087
6140
  await Promise.all(Object.values(encoder.deferred));
6141
+ _optionalChain([onComplete, 'optionalCall', _81 => _81()]);
6088
6142
  controller.close();
6089
6143
  }
6090
6144
  });
@@ -6214,7 +6268,7 @@ function getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules
6214
6268
  return {
6215
6269
  hasLoader: manifestRoute.hasLoader,
6216
6270
  hasClientLoader: manifestRoute.hasClientLoader,
6217
- hasShouldRevalidate: Boolean(_optionalChain([routeModule, 'optionalAccess', _75 => _75.shouldRevalidate]))
6271
+ hasShouldRevalidate: Boolean(_optionalChain([routeModule, 'optionalAccess', _82 => _82.shouldRevalidate]))
6218
6272
  };
6219
6273
  },
6220
6274
  fetchAndDecodeViaTurboStream,
@@ -6415,7 +6469,7 @@ async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams,
6415
6469
  let routeResult = fetchedData.routes[match.route.id];
6416
6470
  if ("error" in routeResult) {
6417
6471
  middlewareError = routeResult.error;
6418
- if (_optionalChain([results, 'access', _76 => _76[match.route.id], 'optionalAccess', _77 => _77.result]) == null) {
6472
+ if (_optionalChain([results, 'access', _83 => _83[match.route.id], 'optionalAccess', _84 => _84.result]) == null) {
6419
6473
  results[match.route.id] = {
6420
6474
  type: "error",
6421
6475
  result: middlewareError
@@ -6538,7 +6592,7 @@ async function fetchAndDecodeViaTurboStream(args, basename, trailingSlashAware,
6538
6592
  }
6539
6593
  } else {
6540
6594
  let typed = decoded.value;
6541
- let routeId = _optionalChain([targetRoutes, 'optionalAccess', _78 => _78[0]]);
6595
+ let routeId = _optionalChain([targetRoutes, 'optionalAccess', _85 => _85[0]]);
6542
6596
  invariant2(routeId, "No routeId found for single fetch call decoding");
6543
6597
  if ("redirect" in typed) {
6544
6598
  data2 = { redirect: typed };
@@ -6856,7 +6910,7 @@ function useResolvedPath(to, { relative } = {}) {
6856
6910
  function useRoutes(routes, locationArg) {
6857
6911
  return useRoutesImpl(routes, locationArg);
6858
6912
  }
6859
- function useRoutesImpl(routes, locationArg, dataRouterState, onError, future) {
6913
+ function useRoutesImpl(routes, locationArg, dataRouterOpts) {
6860
6914
  invariant(
6861
6915
  useInRouterContext(),
6862
6916
  // TODO: This error is probably because they somehow have 2 versions of the
@@ -6885,7 +6939,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
6885
6939
  if (locationArg) {
6886
6940
  let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
6887
6941
  invariant(
6888
- parentPathnameBase === "/" || _optionalChain([parsedLocationArg, 'access', _79 => _79.pathname, 'optionalAccess', _80 => _80.startsWith, 'call', _81 => _81(parentPathnameBase)]),
6942
+ parentPathnameBase === "/" || _optionalChain([parsedLocationArg, 'access', _86 => _86.pathname, 'optionalAccess', _87 => _87.startsWith, 'call', _88 => _88(parentPathnameBase)]),
6889
6943
  `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
6890
6944
  );
6891
6945
  location = parsedLocationArg;
@@ -6937,9 +6991,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
6937
6991
  })
6938
6992
  ),
6939
6993
  parentMatches,
6940
- dataRouterState,
6941
- onError,
6942
- future
6994
+ dataRouterOpts
6943
6995
  );
6944
6996
  if (locationArg && renderedMatches) {
6945
6997
  return /* @__PURE__ */ React3.createElement(
@@ -6952,6 +7004,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
6952
7004
  hash: "",
6953
7005
  state: null,
6954
7006
  key: "default",
7007
+ unstable_mask: void 0,
6955
7008
  ...location
6956
7009
  },
6957
7010
  navigationType: "POP" /* Pop */
@@ -7079,7 +7132,8 @@ function RenderedRoute({ routeContext, match, children }) {
7079
7132
  }
7080
7133
  return /* @__PURE__ */ React3.createElement(RouteContext.Provider, { value: routeContext }, children);
7081
7134
  }
7082
- function _renderMatches(matches, parentMatches = [], dataRouterState = null, onErrorHandler = null, future = null) {
7135
+ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
7136
+ let dataRouterState = _optionalChain([dataRouterOpts, 'optionalAccess', _89 => _89.state]);
7083
7137
  if (matches == null) {
7084
7138
  if (!dataRouterState) {
7085
7139
  return null;
@@ -7093,10 +7147,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, onE
7093
7147
  }
7094
7148
  }
7095
7149
  let renderedMatches = matches;
7096
- let errors = _optionalChain([dataRouterState, 'optionalAccess', _82 => _82.errors]);
7150
+ let errors = _optionalChain([dataRouterState, 'optionalAccess', _90 => _90.errors]);
7097
7151
  if (errors != null) {
7098
7152
  let errorIndex = renderedMatches.findIndex(
7099
- (m) => m.route.id && _optionalChain([errors, 'optionalAccess', _83 => _83[m.route.id]]) !== void 0
7153
+ (m) => m.route.id && _optionalChain([errors, 'optionalAccess', _91 => _91[m.route.id]]) !== void 0
7100
7154
  );
7101
7155
  invariant(
7102
7156
  errorIndex >= 0,
@@ -7111,7 +7165,8 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, onE
7111
7165
  }
7112
7166
  let renderFallback = false;
7113
7167
  let fallbackIndex = -1;
7114
- if (dataRouterState) {
7168
+ if (dataRouterOpts && dataRouterState) {
7169
+ renderFallback = dataRouterState.renderFallback;
7115
7170
  for (let i = 0; i < renderedMatches.length; i++) {
7116
7171
  let match = renderedMatches[i];
7117
7172
  if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {
@@ -7121,7 +7176,9 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, onE
7121
7176
  let { loaderData, errors: errors2 } = dataRouterState;
7122
7177
  let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);
7123
7178
  if (match.route.lazy || needsToRunLoader) {
7124
- renderFallback = true;
7179
+ if (dataRouterOpts.isStatic) {
7180
+ renderFallback = true;
7181
+ }
7125
7182
  if (fallbackIndex >= 0) {
7126
7183
  renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);
7127
7184
  } else {
@@ -7132,10 +7189,11 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, onE
7132
7189
  }
7133
7190
  }
7134
7191
  }
7192
+ let onErrorHandler = _optionalChain([dataRouterOpts, 'optionalAccess', _92 => _92.onError]);
7135
7193
  let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
7136
7194
  onErrorHandler(error, {
7137
7195
  location: dataRouterState.location,
7138
- params: _nullishCoalesce(_optionalChain([dataRouterState, 'access', _84 => _84.matches, 'optionalAccess', _85 => _85[0], 'optionalAccess', _86 => _86.params]), () => ( {})),
7196
+ params: _nullishCoalesce(_optionalChain([dataRouterState, 'access', _93 => _93.matches, 'optionalAccess', _94 => _94[0], 'optionalAccess', _95 => _95.params]), () => ( {})),
7139
7197
  unstable_pattern: getRoutePattern(dataRouterState.matches),
7140
7198
  errorInfo
7141
7199
  });
@@ -7282,15 +7340,15 @@ function useRouteError() {
7282
7340
  if (error !== void 0) {
7283
7341
  return error;
7284
7342
  }
7285
- return _optionalChain([state, 'access', _87 => _87.errors, 'optionalAccess', _88 => _88[routeId]]);
7343
+ return _optionalChain([state, 'access', _96 => _96.errors, 'optionalAccess', _97 => _97[routeId]]);
7286
7344
  }
7287
7345
  function useAsyncValue() {
7288
7346
  let value = React3.useContext(AwaitContext);
7289
- return _optionalChain([value, 'optionalAccess', _89 => _89._data]);
7347
+ return _optionalChain([value, 'optionalAccess', _98 => _98._data]);
7290
7348
  }
7291
7349
  function useAsyncError() {
7292
7350
  let value = React3.useContext(AwaitContext);
7293
- return _optionalChain([value, 'optionalAccess', _90 => _90._error]);
7351
+ return _optionalChain([value, 'optionalAccess', _99 => _99._error]);
7294
7352
  }
7295
7353
  var blockerId = 0;
7296
7354
  function useBlocker(shouldBlock) {
@@ -7371,7 +7429,7 @@ function useRoute(...args) {
7371
7429
  return {
7372
7430
  handle: route.route.handle,
7373
7431
  loaderData: state.loaderData[id],
7374
- actionData: _optionalChain([state, 'access', _91 => _91.actionData, 'optionalAccess', _92 => _92[id]])
7432
+ actionData: _optionalChain([state, 'access', _100 => _100.actionData, 'optionalAccess', _101 => _101[id]])
7375
7433
  };
7376
7434
  }
7377
7435
 
@@ -7416,7 +7474,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
7416
7474
  let route = manifest.routes[match.route.id];
7417
7475
  return [
7418
7476
  route && route.css ? route.css.map((href) => ({ rel: "stylesheet", href })) : [],
7419
- _optionalChain([module, 'optionalAccess', _93 => _93.links, 'optionalCall', _94 => _94()]) || []
7477
+ _optionalChain([module, 'optionalAccess', _102 => _102.links, 'optionalCall', _103 => _103()]) || []
7420
7478
  ];
7421
7479
  }).flat(2);
7422
7480
  let preloads = getModuleLinkHrefs(matches, manifest);
@@ -7517,7 +7575,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
7517
7575
  // param change, /users/123 -> /users/456
7518
7576
  currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
7519
7577
  // e.g. /files/images/avatar.jpg -> files/finances.xls
7520
- _optionalChain([currentMatches, 'access', _95 => _95[index], 'access', _96 => _96.route, 'access', _97 => _97.path, 'optionalAccess', _98 => _98.endsWith, 'call', _99 => _99("*")]) && currentMatches[index].params["*"] !== match.params["*"]
7578
+ _optionalChain([currentMatches, 'access', _104 => _104[index], 'access', _105 => _105.route, 'access', _106 => _106.path, 'optionalAccess', _107 => _107.endsWith, 'call', _108 => _108("*")]) && currentMatches[index].params["*"] !== match.params["*"]
7521
7579
  );
7522
7580
  };
7523
7581
  if (mode === "assets") {
@@ -7540,7 +7598,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
7540
7598
  location.pathname + location.search + location.hash,
7541
7599
  window.origin
7542
7600
  ),
7543
- currentParams: _optionalChain([currentMatches, 'access', _100 => _100[0], 'optionalAccess', _101 => _101.params]) || {},
7601
+ currentParams: _optionalChain([currentMatches, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.params]) || {},
7544
7602
  nextUrl: new URL(page, window.origin),
7545
7603
  nextParams: match.params,
7546
7604
  defaultShouldRevalidate: true
@@ -7812,10 +7870,10 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
7812
7870
  )
7813
7871
  });
7814
7872
  let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
7815
- let initialData = hasInitialData ? _optionalChain([initialState, 'optionalAccess', _102 => _102.loaderData, 'optionalAccess', _103 => _103[route.id]]) : void 0;
7873
+ let initialData = hasInitialData ? _optionalChain([initialState, 'optionalAccess', _111 => _111.loaderData, 'optionalAccess', _112 => _112[route.id]]) : void 0;
7816
7874
  let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
7817
- let initialError = hasInitialError ? _optionalChain([initialState, 'optionalAccess', _104 => _104.errors, 'optionalAccess', _105 => _105[route.id]]) : void 0;
7818
- let isHydrationRequest = needsRevalidation == null && (_optionalChain([routeModule, 'access', _106 => _106.clientLoader, 'optionalAccess', _107 => _107.hydrate]) === true || !route.hasLoader);
7875
+ let initialError = hasInitialError ? _optionalChain([initialState, 'optionalAccess', _113 => _113.errors, 'optionalAccess', _114 => _114[route.id]]) : void 0;
7876
+ let isHydrationRequest = needsRevalidation == null && (_optionalChain([routeModule, 'access', _115 => _115.clientLoader, 'optionalAccess', _116 => _116.hydrate]) === true || !route.hasLoader);
7819
7877
  dataRoute.loader = async ({ request, params, context, unstable_pattern }, singleFetch) => {
7820
7878
  try {
7821
7879
  let result = await prefetchStylesAndCallHandler(async () => {
@@ -8082,7 +8140,7 @@ function getPartialManifest({ sri, ...manifest }, router) {
8082
8140
  sri: sri ? true : void 0
8083
8141
  };
8084
8142
  }
8085
- function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, routeDiscovery, isSpaMode, basename) {
8143
+ function getPatchRoutesOnNavigationFunction(getRouter, manifest, routeModules, ssr, routeDiscovery, isSpaMode, basename) {
8086
8144
  if (!isFogOfWarEnabled(routeDiscovery, ssr)) {
8087
8145
  return void 0;
8088
8146
  }
@@ -8090,9 +8148,12 @@ function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, routeDi
8090
8148
  if (discoveredPaths.has(path)) {
8091
8149
  return;
8092
8150
  }
8151
+ let { state } = getRouter();
8093
8152
  await fetchAndApplyManifestPatches(
8094
8153
  [path],
8095
- fetcherKey ? window.location.href : path,
8154
+ // If we're patching for a fetcher call, reload the current location
8155
+ // Otherwise prefer any ongoing navigation location
8156
+ fetcherKey ? window.location.href : createPath(state.navigation.location || state.location),
8096
8157
  manifest,
8097
8158
  routeModules,
8098
8159
  ssr,
@@ -8107,7 +8168,7 @@ function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, routeDi
8107
8168
  function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {
8108
8169
  React6.useEffect(() => {
8109
8170
  if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet
8110
- _optionalChain([window, 'access', _108 => _108.navigator, 'optionalAccess', _109 => _109.connection, 'optionalAccess', _110 => _110.saveData]) === true) {
8171
+ _optionalChain([window, 'access', _117 => _117.navigator, 'optionalAccess', _118 => _118.connection, 'optionalAccess', _119 => _119.saveData]) === true) {
8111
8172
  return;
8112
8173
  }
8113
8174
  function registerElement(el) {
@@ -8216,7 +8277,7 @@ async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, ro
8216
8277
  }
8217
8278
  serverPatches = await res.json();
8218
8279
  } catch (e) {
8219
- if (_optionalChain([signal, 'optionalAccess', _111 => _111.aborted])) return;
8280
+ if (_optionalChain([signal, 'optionalAccess', _120 => _120.aborted])) return;
8220
8281
  throw e;
8221
8282
  }
8222
8283
  let knownRoutes = new Set(Object.keys(manifest.routes));
@@ -8475,7 +8536,7 @@ function PrefetchPageLinksImpl({
8475
8536
  if (!manifestRoute || !manifestRoute.hasLoader) {
8476
8537
  return;
8477
8538
  }
8478
- if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && _optionalChain([routeModules, 'access', _112 => _112[m.route.id], 'optionalAccess', _113 => _113.shouldRevalidate])) {
8539
+ if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && _optionalChain([routeModules, 'access', _121 => _121[m.route.id], 'optionalAccess', _122 => _122.shouldRevalidate])) {
8479
8540
  foundOptOutRoute = true;
8480
8541
  } else if (manifestRoute.hasClientLoader) {
8481
8542
  foundOptOutRoute = true;
@@ -8563,7 +8624,7 @@ function Meta() {
8563
8624
  error
8564
8625
  };
8565
8626
  matches[i] = match;
8566
- if (_optionalChain([routeModule, 'optionalAccess', _114 => _114.meta])) {
8627
+ if (_optionalChain([routeModule, 'optionalAccess', _123 => _123.meta])) {
8567
8628
  routeMeta = typeof routeModule.meta === "function" ? routeModule.meta({
8568
8629
  data: data2,
8569
8630
  loaderData: data2,
@@ -8578,7 +8639,7 @@ function Meta() {
8578
8639
  routeMeta = routeMeta || [];
8579
8640
  if (!Array.isArray(routeMeta)) {
8580
8641
  throw new Error(
8581
- "The route at " + _match.route.path + " returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://remix.run/route/meta"
8642
+ "The route at " + _match.route.path + " returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta"
8582
8643
  );
8583
8644
  }
8584
8645
  match.meta = routeMeta;
@@ -8662,7 +8723,7 @@ function Scripts(scriptProps) {
8662
8723
  }
8663
8724
  let streamScript = "window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());";
8664
8725
  let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : " ";
8665
- let routeModulesScript = !isStatic ? " " : `${_optionalChain([manifest, 'access', _115 => _115.hmr, 'optionalAccess', _116 => _116.runtime]) ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
8726
+ let routeModulesScript = !isStatic ? " " : `${_optionalChain([manifest, 'access', _124 => _124.hmr, 'optionalAccess', _125 => _125.runtime]) ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
8666
8727
  ${matches.map((match, routeIndex) => {
8667
8728
  let routeVarName = `route${routeIndex}`;
8668
8729
  let manifestEntry = manifest.routes[match.route.id];
@@ -8893,7 +8954,7 @@ function BoundaryShell({
8893
8954
  children
8894
8955
  }) {
8895
8956
  let { routeModules } = useFrameworkContext();
8896
- if (_optionalChain([routeModules, 'access', _117 => _117.root, 'optionalAccess', _118 => _118.Layout]) && !isOutsideRemixApp) {
8957
+ if (_optionalChain([routeModules, 'access', _126 => _126.root, 'optionalAccess', _127 => _127.Layout]) && !isOutsideRemixApp) {
8897
8958
  return children;
8898
8959
  }
8899
8960
  return /* @__PURE__ */ React8.createElement("html", { lang: "en" }, /* @__PURE__ */ React8.createElement("head", null, /* @__PURE__ */ React8.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ React8.createElement(
@@ -8973,20 +9034,20 @@ var hydrationRouteProperties = [
8973
9034
  ];
8974
9035
  function createMemoryRouter(routes, opts) {
8975
9036
  return createRouter({
8976
- basename: _optionalChain([opts, 'optionalAccess', _119 => _119.basename]),
8977
- getContext: _optionalChain([opts, 'optionalAccess', _120 => _120.getContext]),
8978
- future: _optionalChain([opts, 'optionalAccess', _121 => _121.future]),
9037
+ basename: _optionalChain([opts, 'optionalAccess', _128 => _128.basename]),
9038
+ getContext: _optionalChain([opts, 'optionalAccess', _129 => _129.getContext]),
9039
+ future: _optionalChain([opts, 'optionalAccess', _130 => _130.future]),
8979
9040
  history: createMemoryHistory({
8980
- initialEntries: _optionalChain([opts, 'optionalAccess', _122 => _122.initialEntries]),
8981
- initialIndex: _optionalChain([opts, 'optionalAccess', _123 => _123.initialIndex])
9041
+ initialEntries: _optionalChain([opts, 'optionalAccess', _131 => _131.initialEntries]),
9042
+ initialIndex: _optionalChain([opts, 'optionalAccess', _132 => _132.initialIndex])
8982
9043
  }),
8983
- hydrationData: _optionalChain([opts, 'optionalAccess', _124 => _124.hydrationData]),
9044
+ hydrationData: _optionalChain([opts, 'optionalAccess', _133 => _133.hydrationData]),
8984
9045
  routes,
8985
9046
  hydrationRouteProperties,
8986
9047
  mapRouteProperties,
8987
- dataStrategy: _optionalChain([opts, 'optionalAccess', _125 => _125.dataStrategy]),
8988
- patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _126 => _126.patchRoutesOnNavigation]),
8989
- unstable_instrumentations: _optionalChain([opts, 'optionalAccess', _127 => _127.unstable_instrumentations])
9048
+ dataStrategy: _optionalChain([opts, 'optionalAccess', _134 => _134.dataStrategy]),
9049
+ patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _135 => _135.patchRoutesOnNavigation]),
9050
+ unstable_instrumentations: _optionalChain([opts, 'optionalAccess', _136 => _136.unstable_instrumentations])
8990
9051
  }).initialize();
8991
9052
  }
8992
9053
  var Deferred2 = class {
@@ -9032,7 +9093,7 @@ function RouterProvider({
9032
9093
  Object.values(newErrors).forEach(
9033
9094
  (error) => onError(error, {
9034
9095
  location: newState.location,
9035
- params: _nullishCoalesce(_optionalChain([newState, 'access', _128 => _128.matches, 'access', _129 => _129[0], 'optionalAccess', _130 => _130.params]), () => ( {})),
9096
+ params: _nullishCoalesce(_optionalChain([newState, 'access', _137 => _137.matches, 'access', _138 => _138[0], 'optionalAccess', _139 => _139.params]), () => ( {})),
9036
9097
  unstable_pattern: getRoutePattern(newState.matches)
9037
9098
  })
9038
9099
  );
@@ -9070,7 +9131,7 @@ function RouterProvider({
9070
9131
  if (reactDomFlushSyncImpl && flushSync) {
9071
9132
  reactDomFlushSyncImpl(() => {
9072
9133
  if (transition) {
9073
- _optionalChain([renderDfd, 'optionalAccess', _131 => _131.resolve, 'call', _132 => _132()]);
9134
+ _optionalChain([renderDfd, 'optionalAccess', _140 => _140.resolve, 'call', _141 => _141()]);
9074
9135
  transition.skipTransition();
9075
9136
  }
9076
9137
  setVtContext({
@@ -9095,7 +9156,7 @@ function RouterProvider({
9095
9156
  return;
9096
9157
  }
9097
9158
  if (transition) {
9098
- _optionalChain([renderDfd, 'optionalAccess', _133 => _133.resolve, 'call', _134 => _134()]);
9159
+ _optionalChain([renderDfd, 'optionalAccess', _142 => _142.resolve, 'call', _143 => _143()]);
9099
9160
  transition.skipTransition();
9100
9161
  setInterruption({
9101
9162
  state: newState,
@@ -9184,12 +9245,12 @@ function RouterProvider({
9184
9245
  go: (n) => router.navigate(n),
9185
9246
  push: (to, state2, opts) => router.navigate(to, {
9186
9247
  state: state2,
9187
- preventScrollReset: _optionalChain([opts, 'optionalAccess', _135 => _135.preventScrollReset])
9248
+ preventScrollReset: _optionalChain([opts, 'optionalAccess', _144 => _144.preventScrollReset])
9188
9249
  }),
9189
9250
  replace: (to, state2, opts) => router.navigate(to, {
9190
9251
  replace: true,
9191
9252
  state: state2,
9192
- preventScrollReset: _optionalChain([opts, 'optionalAccess', _136 => _136.preventScrollReset])
9253
+ preventScrollReset: _optionalChain([opts, 'optionalAccess', _145 => _145.preventScrollReset])
9193
9254
  })
9194
9255
  };
9195
9256
  }, [router]);
@@ -9219,6 +9280,7 @@ function RouterProvider({
9219
9280
  routes: router.routes,
9220
9281
  future: router.future,
9221
9282
  state,
9283
+ isStatic: false,
9222
9284
  onError
9223
9285
  }
9224
9286
  )
@@ -9243,9 +9305,10 @@ function DataRoutes({
9243
9305
  routes,
9244
9306
  future,
9245
9307
  state,
9308
+ isStatic,
9246
9309
  onError
9247
9310
  }) {
9248
- return useRoutesImpl(routes, void 0, state, onError, future);
9311
+ return useRoutesImpl(routes, void 0, { state, isStatic, onError, future });
9249
9312
  }
9250
9313
  function MemoryRouter({
9251
9314
  basename,
@@ -9363,7 +9426,8 @@ function Router({
9363
9426
  search = "",
9364
9427
  hash = "",
9365
9428
  state = null,
9366
- key = "default"
9429
+ key = "default",
9430
+ unstable_mask
9367
9431
  } = locationProp;
9368
9432
  let locationContext = React9.useMemo(() => {
9369
9433
  let trailingPathname = stripBasename(pathname, basename);
@@ -9376,11 +9440,21 @@ function Router({
9376
9440
  search,
9377
9441
  hash,
9378
9442
  state,
9379
- key
9443
+ key,
9444
+ unstable_mask
9380
9445
  },
9381
9446
  navigationType
9382
9447
  };
9383
- }, [basename, pathname, search, hash, state, key, navigationType]);
9448
+ }, [
9449
+ basename,
9450
+ pathname,
9451
+ search,
9452
+ hash,
9453
+ state,
9454
+ key,
9455
+ navigationType,
9456
+ unstable_mask
9457
+ ]);
9384
9458
  warning(
9385
9459
  locationContext != null,
9386
9460
  `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
@@ -9408,7 +9482,7 @@ function Await({
9408
9482
  if (dataRouterContext && dataRouterContext.onError && dataRouterStateContext) {
9409
9483
  dataRouterContext.onError(error, {
9410
9484
  location: dataRouterStateContext.location,
9411
- params: _optionalChain([dataRouterStateContext, 'access', _137 => _137.matches, 'access', _138 => _138[0], 'optionalAccess', _139 => _139.params]) || {},
9485
+ params: _optionalChain([dataRouterStateContext, 'access', _146 => _146.matches, 'access', _147 => _147[0], 'optionalAccess', _148 => _148.params]) || {},
9412
9486
  unstable_pattern: getRoutePattern(dataRouterStateContext.matches),
9413
9487
  errorInfo
9414
9488
  });
@@ -9470,7 +9544,7 @@ var AwaitErrorBoundary = class extends React9.Component {
9470
9544
  promise = resolve.then(
9471
9545
  (data2) => Object.defineProperty(resolve, "_data", { get: () => data2 }),
9472
9546
  (error) => {
9473
- _optionalChain([this, 'access', _140 => _140.props, 'access', _141 => _141.onError, 'optionalCall', _142 => _142(error)]);
9547
+ _optionalChain([this, 'access', _149 => _149.props, 'access', _150 => _150.onError, 'optionalCall', _151 => _151(error)]);
9474
9548
  Object.defineProperty(resolve, "_error", { get: () => error });
9475
9549
  }
9476
9550
  );
@@ -9733,4 +9807,5 @@ function withErrorBoundaryProps(ErrorBoundary) {
9733
9807
 
9734
9808
 
9735
9809
 
9736
- exports.Action = Action; exports.createMemoryHistory = createMemoryHistory; exports.createBrowserHistory = createBrowserHistory; exports.createHashHistory = createHashHistory; exports.invariant = invariant; exports.warning = warning; exports.createPath = createPath; exports.parsePath = parsePath; exports.createContext = createContext; exports.RouterContextProvider = RouterContextProvider; exports.convertRoutesToDataRoutes = convertRoutesToDataRoutes; exports.matchRoutes = matchRoutes; exports.generatePath = generatePath; exports.matchPath = matchPath; exports.stripBasename = stripBasename; exports.resolvePath = resolvePath; exports.joinPaths = joinPaths; exports.data = data; exports.redirect = redirect; exports.redirectDocument = redirectDocument; exports.replace = replace; exports.ErrorResponseImpl = ErrorResponseImpl; exports.isRouteErrorResponse = isRouteErrorResponse; exports.parseToInfo = parseToInfo; exports.escapeHtml = escapeHtml; exports.encode = encode; exports.instrumentHandler = instrumentHandler; exports.IDLE_NAVIGATION = IDLE_NAVIGATION; exports.IDLE_FETCHER = IDLE_FETCHER; exports.IDLE_BLOCKER = IDLE_BLOCKER; exports.createRouter = createRouter; exports.createStaticHandler = createStaticHandler; exports.getStaticContextFromError = getStaticContextFromError; exports.isDataWithResponseInit = isDataWithResponseInit; exports.isResponse = isResponse; exports.isRedirectStatusCode = isRedirectStatusCode; exports.isRedirectResponse = isRedirectResponse; exports.isMutationMethod = isMutationMethod; exports.createRequestInit = createRequestInit; exports.SingleFetchRedirectSymbol = SingleFetchRedirectSymbol; exports.SINGLE_FETCH_REDIRECT_STATUS = SINGLE_FETCH_REDIRECT_STATUS; exports.NO_BODY_STATUS_CODES = NO_BODY_STATUS_CODES; exports.StreamTransfer = StreamTransfer; exports.getTurboStreamSingleFetchDataStrategy = getTurboStreamSingleFetchDataStrategy; exports.getSingleFetchDataStrategyImpl = getSingleFetchDataStrategyImpl; exports.stripIndexParam = stripIndexParam; exports.singleFetchUrl = singleFetchUrl; exports.decodeViaTurboStream = decodeViaTurboStream; exports.DataRouterContext = DataRouterContext; exports.DataRouterStateContext = DataRouterStateContext; exports.RSCRouterContext = RSCRouterContext; exports.ViewTransitionContext = ViewTransitionContext; exports.FetchersContext = FetchersContext; exports.AwaitContextProvider = AwaitContextProvider; exports.NavigationContext = NavigationContext; exports.LocationContext = LocationContext; exports.RouteContext = RouteContext; exports.ENABLE_DEV_WARNINGS = ENABLE_DEV_WARNINGS; exports.warnOnce = warnOnce; exports.decodeRedirectErrorDigest = decodeRedirectErrorDigest; exports.decodeRouteErrorResponseDigest = decodeRouteErrorResponseDigest; exports.useHref = useHref; exports.useInRouterContext = useInRouterContext; exports.useLocation = useLocation; exports.useNavigationType = useNavigationType; exports.useMatch = useMatch; exports.useNavigate = useNavigate; exports.useOutletContext = useOutletContext; exports.useOutlet = useOutlet; exports.useParams = useParams; exports.useResolvedPath = useResolvedPath; exports.useRoutes = useRoutes; exports.useRoutesImpl = useRoutesImpl; exports.useRouteId = useRouteId; exports.useNavigation = useNavigation; exports.useRevalidator = useRevalidator; exports.useMatches = useMatches; exports.useLoaderData = useLoaderData; exports.useRouteLoaderData = useRouteLoaderData; exports.useActionData = useActionData; exports.useRouteError = useRouteError; exports.useAsyncValue = useAsyncValue; exports.useAsyncError = useAsyncError; exports.useBlocker = useBlocker; exports.useRoute = useRoute; exports.RemixErrorBoundary = RemixErrorBoundary; exports.createServerRoutes = createServerRoutes; exports.createClientRoutesWithHMRRevalidationOptOut = createClientRoutesWithHMRRevalidationOptOut; exports.noActionDefinedError = noActionDefinedError; exports.createClientRoutes = createClientRoutes; exports.shouldHydrateRouteLoader = shouldHydrateRouteLoader; exports.getPatchRoutesOnNavigationFunction = getPatchRoutesOnNavigationFunction; exports.useFogOFWarDiscovery = useFogOFWarDiscovery; exports.getManifestPath = getManifestPath; exports.FrameworkContext = FrameworkContext; exports.usePrefetchBehavior = usePrefetchBehavior; exports.CRITICAL_CSS_DATA_ATTRIBUTE = CRITICAL_CSS_DATA_ATTRIBUTE; exports.Links = Links; exports.PrefetchPageLinks = PrefetchPageLinks; exports.Meta = Meta; exports.setIsHydrated = setIsHydrated; exports.Scripts = Scripts; exports.mergeRefs = mergeRefs; exports.mapRouteProperties = mapRouteProperties; exports.hydrationRouteProperties = hydrationRouteProperties; exports.createMemoryRouter = createMemoryRouter; exports.RouterProvider = RouterProvider; exports.MemoryRouter = MemoryRouter; exports.Navigate = Navigate; exports.Outlet = Outlet; exports.Route = Route; exports.Router = Router; exports.Routes = Routes; exports.Await = Await; exports.createRoutesFromChildren = createRoutesFromChildren; exports.createRoutesFromElements = createRoutesFromElements; exports.renderMatches = renderMatches; exports.WithComponentProps = WithComponentProps; exports.withComponentProps = withComponentProps; exports.WithHydrateFallbackProps = WithHydrateFallbackProps; exports.withHydrateFallbackProps = withHydrateFallbackProps; exports.WithErrorBoundaryProps = WithErrorBoundaryProps; exports.withErrorBoundaryProps = withErrorBoundaryProps;
9810
+
9811
+ exports.Action = Action; exports.createMemoryHistory = createMemoryHistory; exports.createBrowserHistory = createBrowserHistory; exports.createHashHistory = createHashHistory; exports.invariant = invariant; exports.warning = warning; exports.createPath = createPath; exports.parsePath = parsePath; exports.createContext = createContext; exports.RouterContextProvider = RouterContextProvider; exports.convertRoutesToDataRoutes = convertRoutesToDataRoutes; exports.matchRoutes = matchRoutes; exports.generatePath = generatePath; exports.matchPath = matchPath; exports.stripBasename = stripBasename; exports.resolvePath = resolvePath; exports.resolveTo = resolveTo; exports.joinPaths = joinPaths; exports.data = data; exports.redirect = redirect; exports.redirectDocument = redirectDocument; exports.replace = replace; exports.ErrorResponseImpl = ErrorResponseImpl; exports.isRouteErrorResponse = isRouteErrorResponse; exports.parseToInfo = parseToInfo; exports.escapeHtml = escapeHtml; exports.encode = encode; exports.instrumentHandler = instrumentHandler; exports.IDLE_NAVIGATION = IDLE_NAVIGATION; exports.IDLE_FETCHER = IDLE_FETCHER; exports.IDLE_BLOCKER = IDLE_BLOCKER; exports.createRouter = createRouter; exports.createStaticHandler = createStaticHandler; exports.getStaticContextFromError = getStaticContextFromError; exports.isDataWithResponseInit = isDataWithResponseInit; exports.isResponse = isResponse; exports.isRedirectStatusCode = isRedirectStatusCode; exports.isRedirectResponse = isRedirectResponse; exports.isMutationMethod = isMutationMethod; exports.createRequestInit = createRequestInit; exports.SingleFetchRedirectSymbol = SingleFetchRedirectSymbol; exports.SINGLE_FETCH_REDIRECT_STATUS = SINGLE_FETCH_REDIRECT_STATUS; exports.NO_BODY_STATUS_CODES = NO_BODY_STATUS_CODES; exports.StreamTransfer = StreamTransfer; exports.getTurboStreamSingleFetchDataStrategy = getTurboStreamSingleFetchDataStrategy; exports.getSingleFetchDataStrategyImpl = getSingleFetchDataStrategyImpl; exports.stripIndexParam = stripIndexParam; exports.singleFetchUrl = singleFetchUrl; exports.decodeViaTurboStream = decodeViaTurboStream; exports.DataRouterContext = DataRouterContext; exports.DataRouterStateContext = DataRouterStateContext; exports.RSCRouterContext = RSCRouterContext; exports.ViewTransitionContext = ViewTransitionContext; exports.FetchersContext = FetchersContext; exports.AwaitContextProvider = AwaitContextProvider; exports.NavigationContext = NavigationContext; exports.LocationContext = LocationContext; exports.RouteContext = RouteContext; exports.ENABLE_DEV_WARNINGS = ENABLE_DEV_WARNINGS; exports.warnOnce = warnOnce; exports.decodeRedirectErrorDigest = decodeRedirectErrorDigest; exports.decodeRouteErrorResponseDigest = decodeRouteErrorResponseDigest; exports.useHref = useHref; exports.useInRouterContext = useInRouterContext; exports.useLocation = useLocation; exports.useNavigationType = useNavigationType; exports.useMatch = useMatch; exports.useNavigate = useNavigate; exports.useOutletContext = useOutletContext; exports.useOutlet = useOutlet; exports.useParams = useParams; exports.useResolvedPath = useResolvedPath; exports.useRoutes = useRoutes; exports.useRouteId = useRouteId; exports.useNavigation = useNavigation; exports.useRevalidator = useRevalidator; exports.useMatches = useMatches; exports.useLoaderData = useLoaderData; exports.useRouteLoaderData = useRouteLoaderData; exports.useActionData = useActionData; exports.useRouteError = useRouteError; exports.useAsyncValue = useAsyncValue; exports.useAsyncError = useAsyncError; exports.useBlocker = useBlocker; exports.useRoute = useRoute; exports.RemixErrorBoundary = RemixErrorBoundary; exports.createServerRoutes = createServerRoutes; exports.createClientRoutesWithHMRRevalidationOptOut = createClientRoutesWithHMRRevalidationOptOut; exports.noActionDefinedError = noActionDefinedError; exports.createClientRoutes = createClientRoutes; exports.shouldHydrateRouteLoader = shouldHydrateRouteLoader; exports.getPatchRoutesOnNavigationFunction = getPatchRoutesOnNavigationFunction; exports.useFogOFWarDiscovery = useFogOFWarDiscovery; exports.getManifestPath = getManifestPath; exports.FrameworkContext = FrameworkContext; exports.usePrefetchBehavior = usePrefetchBehavior; exports.CRITICAL_CSS_DATA_ATTRIBUTE = CRITICAL_CSS_DATA_ATTRIBUTE; exports.Links = Links; exports.PrefetchPageLinks = PrefetchPageLinks; exports.Meta = Meta; exports.setIsHydrated = setIsHydrated; exports.Scripts = Scripts; exports.mergeRefs = mergeRefs; exports.mapRouteProperties = mapRouteProperties; exports.hydrationRouteProperties = hydrationRouteProperties; exports.createMemoryRouter = createMemoryRouter; exports.RouterProvider = RouterProvider; exports.DataRoutes = DataRoutes; exports.MemoryRouter = MemoryRouter; exports.Navigate = Navigate; exports.Outlet = Outlet; exports.Route = Route; exports.Router = Router; exports.Routes = Routes; exports.Await = Await; exports.createRoutesFromChildren = createRoutesFromChildren; exports.createRoutesFromElements = createRoutesFromElements; exports.renderMatches = renderMatches; exports.WithComponentProps = WithComponentProps; exports.withComponentProps = withComponentProps; exports.WithHydrateFallbackProps = WithHydrateFallbackProps; exports.withHydrateFallbackProps = withHydrateFallbackProps; exports.WithErrorBoundaryProps = WithErrorBoundaryProps; exports.withErrorBoundaryProps = withErrorBoundaryProps;