react-router 7.1.3-pre.0 → 7.1.4-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 (36) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/dist/development/{chunk-F43ZKHNQ.mjs → chunk-6WHQQTEJ.mjs} +52 -47
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.d.ts +2 -2
  5. package/dist/development/dom-export.js +35 -36
  6. package/dist/development/dom-export.mjs +2 -2
  7. package/dist/{production/fog-of-war-Ckdfl79L.d.ts → development/fog-of-war-CCAcUMgB.d.ts} +1 -1
  8. package/dist/development/{fog-of-war-Ckdfl79L.d.ts → fog-of-war-D6dP9JIt.d.mts} +1 -1
  9. package/dist/development/index.d.mts +5 -41
  10. package/dist/development/index.d.ts +5 -41
  11. package/dist/development/index.js +52 -47
  12. package/dist/development/index.mjs +2 -2
  13. package/dist/development/lib/types/route-module.d.mts +1 -1
  14. package/dist/development/lib/types/route-module.d.ts +1 -1
  15. package/dist/development/lib/types/route-module.js +1 -1
  16. package/dist/development/lib/types/route-module.mjs +1 -1
  17. package/dist/development/{route-data-Cw8htKcF.d.ts → route-data-Cq_b5feC.d.mts} +27 -1
  18. package/dist/{production/route-data-Cw8htKcF.d.mts → development/route-data-Cq_b5feC.d.ts} +27 -1
  19. package/dist/production/{chunk-KRXM4FJG.mjs → chunk-REQYSU7D.mjs} +52 -47
  20. package/dist/production/dom-export.d.mts +2 -2
  21. package/dist/production/dom-export.d.ts +2 -2
  22. package/dist/production/dom-export.js +35 -36
  23. package/dist/production/dom-export.mjs +2 -2
  24. package/dist/{development/fog-of-war-ClXvjZ4E.d.mts → production/fog-of-war-CCAcUMgB.d.ts} +1 -1
  25. package/dist/production/{fog-of-war-ClXvjZ4E.d.mts → fog-of-war-D6dP9JIt.d.mts} +1 -1
  26. package/dist/production/index.d.mts +5 -41
  27. package/dist/production/index.d.ts +5 -41
  28. package/dist/production/index.js +52 -47
  29. package/dist/production/index.mjs +2 -2
  30. package/dist/production/lib/types/route-module.d.mts +1 -1
  31. package/dist/production/lib/types/route-module.d.ts +1 -1
  32. package/dist/production/lib/types/route-module.js +1 -1
  33. package/dist/production/lib/types/route-module.mjs +1 -1
  34. package/dist/production/{route-data-Cw8htKcF.d.ts → route-data-Cq_b5feC.d.mts} +27 -1
  35. package/dist/{development/route-data-Cw8htKcF.d.mts → production/route-data-Cq_b5feC.d.ts} +27 -1
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,25 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.1.3-pre.0
3
+ ## 7.1.4-pre.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Internal reorg to clean up some duplicated route module types ([#12799](https://github.com/remix-run/react-router/pull/12799))
8
+ - Properly handle status codes that cannot have a body in single fetch responses (204, etc.) ([#12760](https://github.com/remix-run/react-router/pull/12760))
9
+ - Stop erroring on resource routes that return raw strings/objects and instead serialize them as `text/plain` or `application/json` responses ([#12848](https://github.com/remix-run/react-router/pull/12848))
10
+
11
+ - This only applies when accessed as a resource route without the `.data` extension
12
+ - When accessed from a Single Fetch `.data` request, they will still be encoded via `turbo-stream`
13
+
14
+ - REMOVE: limit matchRoutes optimization to client side ([#12882](https://github.com/remix-run/react-router/pull/12882))
15
+ - Optimize Lazy Route Discovery path discovery to favor a single `querySelectorAll` call at the `body` level instead of many calls at the sub-tree level ([#12731](https://github.com/remix-run/react-router/pull/12731))
16
+ - - Properly bubble headers as `errorHeaders` when throwing a `data()` result ([#12846](https://github.com/remix-run/react-router/pull/12846))
17
+ - Avoid duplication of `Set-Cookie` headers could be duplicated if also returned from `headers`
18
+ - Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12800](https://github.com/remix-run/react-router/pull/12800))
19
+
20
+ ## 7.1.3
21
+
22
+ _No changes_
4
23
 
5
24
  ## 7.1.2
6
25
 
@@ -19,6 +38,8 @@
19
38
 
20
39
  ## 7.1.1
21
40
 
41
+ _No changes_
42
+
22
43
  ## 7.1.0
23
44
 
24
45
  ### Patch Changes
@@ -40,6 +61,8 @@
40
61
 
41
62
  ## 7.0.1
42
63
 
64
+ _No changes_
65
+
43
66
  ## 7.0.0
44
67
 
45
68
  ### Major Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.3-pre.0
2
+ * react-router v7.1.4-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -919,6 +919,7 @@ function createRouter(init) {
919
919
  let getScrollPosition = null;
920
920
  let initialScrollRestored = init.hydrationData != null;
921
921
  let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
922
+ let initialMatchesIsFOW = false;
922
923
  let initialErrors = null;
923
924
  if (initialMatches == null && !patchRoutesOnNavigationImpl) {
924
925
  let error = getInternalRouterError(404, {
@@ -948,6 +949,7 @@ function createRouter(init) {
948
949
  init.history.location.pathname
949
950
  );
950
951
  if (fogOfWar.active && fogOfWar.matches) {
952
+ initialMatchesIsFOW = true;
951
953
  initialMatches = fogOfWar.matches;
952
954
  }
953
955
  } else if (initialMatches.some((m) => m.route.lazy)) {
@@ -1313,7 +1315,10 @@ function createRouter(init) {
1313
1315
  pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
1314
1316
  let routesToUse = inFlightDataRoutes || dataRoutes;
1315
1317
  let loadingNavigation = opts && opts.overrideNavigation;
1316
- let matches = matchRoutes(routesToUse, location, basename);
1318
+ let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
1319
+ // `matchRoutes()` has already been called if we're in here via `router.initialize()`
1320
+ state.matches
1321
+ ) : matchRoutes(routesToUse, location, basename);
1317
1322
  let flushSync = (opts && opts.flushSync) === true;
1318
1323
  let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);
1319
1324
  if (fogOfWar.active && fogOfWar.matches) {
@@ -3497,14 +3502,20 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
3497
3502
  return {
3498
3503
  type: "error" /* error */,
3499
3504
  error: result.data,
3500
- statusCode: result.init?.status
3505
+ statusCode: result.init?.status,
3506
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
3501
3507
  };
3502
3508
  }
3503
- result = new ErrorResponseImpl(
3504
- result.init?.status || 500,
3505
- void 0,
3506
- result.data
3507
- );
3509
+ return {
3510
+ type: "error" /* error */,
3511
+ error: new ErrorResponseImpl(
3512
+ result.init?.status || 500,
3513
+ void 0,
3514
+ result.data
3515
+ ),
3516
+ statusCode: isRouteErrorResponse(result) ? result.status : void 0,
3517
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
3518
+ };
3508
3519
  }
3509
3520
  return {
3510
3521
  type: "error" /* error */,
@@ -4205,7 +4216,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
4205
4216
  // router loaded. We can help them understand how to avoid that.
4206
4217
  `useRoutes() may be used only in the context of a <Router> component.`
4207
4218
  );
4208
- let { navigator: navigator2 } = React2.useContext(NavigationContext);
4219
+ let { navigator: navigator2, static: isStatic } = React2.useContext(NavigationContext);
4209
4220
  let { matches: parentMatches } = React2.useContext(RouteContext);
4210
4221
  let routeMatch = parentMatches[parentMatches.length - 1];
4211
4222
  let parentParams = routeMatch ? routeMatch.params : {};
@@ -4241,7 +4252,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
4241
4252
  let segments = pathname.replace(/^\//, "").split("/");
4242
4253
  remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
4243
4254
  }
4244
- let matches = matchRoutes(routes, { pathname: remainingPathname });
4255
+ let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, { pathname: remainingPathname });
4245
4256
  if (ENABLE_DEV_WARNINGS) {
4246
4257
  warning(
4247
4258
  parentRoute || matches != null,
@@ -5821,6 +5832,14 @@ async function fetchAndDecode(url, init) {
5821
5832
  if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
5822
5833
  throw new ErrorResponseImpl(404, "Not Found", true);
5823
5834
  }
5835
+ const NO_BODY_STATUS_CODES2 = /* @__PURE__ */ new Set([100, 101, 204, 205]);
5836
+ if (NO_BODY_STATUS_CODES2.has(res.status)) {
5837
+ if (!init.method || init.method === "GET") {
5838
+ return { status: res.status, data: {} };
5839
+ } else {
5840
+ return { status: res.status, data: { data: void 0 } };
5841
+ }
5842
+ }
5824
5843
  invariant2(res.body, "No response body to decode");
5825
5844
  try {
5826
5845
  let decoded = await decodeViaTurboStream(res.body, window);
@@ -6436,12 +6455,13 @@ function useFogOFWarDiscovery(router, manifest, routeModules, isSpaMode) {
6436
6455
  if (!path) {
6437
6456
  return;
6438
6457
  }
6439
- let url = new URL(path, window.location.origin);
6440
- if (!discoveredPaths.has(url.pathname)) {
6441
- nextPaths.add(url.pathname);
6458
+ let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
6459
+ if (!discoveredPaths.has(pathname)) {
6460
+ nextPaths.add(pathname);
6442
6461
  }
6443
6462
  }
6444
6463
  async function fetchPatches() {
6464
+ document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
6445
6465
  let lazyPaths = Array.from(nextPaths.keys()).filter((path) => {
6446
6466
  if (discoveredPaths.has(path)) {
6447
6467
  nextPaths.delete(path);
@@ -6465,30 +6485,9 @@ function useFogOFWarDiscovery(router, manifest, routeModules, isSpaMode) {
6465
6485
  console.error("Failed to fetch manifest patches", e);
6466
6486
  }
6467
6487
  }
6468
- document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach((el) => registerElement(el));
6469
- fetchPatches();
6470
6488
  let debouncedFetchPatches = debounce(fetchPatches, 100);
6471
- function isElement(node) {
6472
- return node.nodeType === Node.ELEMENT_NODE;
6473
- }
6474
- let observer = new MutationObserver((records) => {
6475
- let elements = /* @__PURE__ */ new Set();
6476
- records.forEach((r) => {
6477
- [r.target, ...r.addedNodes].forEach((node) => {
6478
- if (!isElement(node)) return;
6479
- if (node.tagName === "A" && node.getAttribute("data-discover")) {
6480
- elements.add(node);
6481
- } else if (node.tagName === "FORM" && node.getAttribute("data-discover")) {
6482
- elements.add(node);
6483
- }
6484
- if (node.tagName !== "A") {
6485
- node.querySelectorAll("a[data-discover], form[data-discover]").forEach((el) => elements.add(el));
6486
- }
6487
- });
6488
- });
6489
- elements.forEach((el) => registerElement(el));
6490
- debouncedFetchPatches();
6491
- });
6489
+ fetchPatches();
6490
+ let observer = new MutationObserver(() => debouncedFetchPatches());
6492
6491
  observer.observe(document.documentElement, {
6493
6492
  subtree: true,
6494
6493
  childList: true,
@@ -6982,7 +6981,7 @@ function mergeRefs(...refs) {
6982
6981
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
6983
6982
  try {
6984
6983
  if (isBrowser) {
6985
- window.__reactRouterVersion = "7.1.3-pre.0";
6984
+ window.__reactRouterVersion = "7.1.4-pre.0";
6986
6985
  }
6987
6986
  } catch (e) {
6988
6987
  }
@@ -8702,8 +8701,11 @@ function prependCookies(parentHeaders, childHeaders) {
8702
8701
  let parentSetCookieString = parentHeaders.get("Set-Cookie");
8703
8702
  if (parentSetCookieString) {
8704
8703
  let cookies = splitCookiesString(parentSetCookieString);
8704
+ let childCookies = new Set(childHeaders.getSetCookie());
8705
8705
  cookies.forEach((cookie) => {
8706
- childHeaders.append("Set-Cookie", cookie);
8706
+ if (!childCookies.has(cookie)) {
8707
+ childHeaders.append("Set-Cookie", cookie);
8708
+ }
8707
8709
  });
8708
8710
  }
8709
8711
  }
@@ -8933,6 +8935,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
8933
8935
  }
8934
8936
 
8935
8937
  // lib/server-runtime/server.ts
8938
+ var NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([100, 101, 204, 205, 304]);
8936
8939
  function derive(build, mode) {
8937
8940
  let routes = createRoutes(build.routes);
8938
8941
  let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
@@ -9131,8 +9134,8 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
9131
9134
  );
9132
9135
  let resultHeaders = new Headers(headers);
9133
9136
  resultHeaders.set("X-Remix-Response", "yes");
9134
- if (status === 304) {
9135
- return new Response(null, { status: 304, headers: resultHeaders });
9137
+ if (NO_BODY_STATUS_CODES.has(status)) {
9138
+ return new Response(null, { status, headers: resultHeaders });
9136
9139
  }
9137
9140
  resultHeaders.set("Content-Type", "text/x-script");
9138
9141
  return new Response(
@@ -9162,8 +9165,8 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
9162
9165
  return context;
9163
9166
  }
9164
9167
  let headers = getDocumentHeaders(build, context);
9165
- if (context.statusCode === 304) {
9166
- return new Response(null, { status: 304, headers });
9168
+ if (NO_BODY_STATUS_CODES.has(context.statusCode)) {
9169
+ return new Response(null, { status: context.statusCode, headers });
9167
9170
  }
9168
9171
  if (context.errors) {
9169
9172
  Object.values(context.errors).forEach((err) => {
@@ -9272,11 +9275,13 @@ async function handleResourceRequest(serverMode, staticHandler, routeId, request
9272
9275
  routeId,
9273
9276
  requestContext: loadContext
9274
9277
  });
9275
- invariant3(
9276
- isResponse(response),
9277
- "Expected a Response to be returned from resource route handler"
9278
- );
9279
- return response;
9278
+ if (isResponse(response)) {
9279
+ return response;
9280
+ }
9281
+ if (typeof response === "string") {
9282
+ return new Response(response);
9283
+ }
9284
+ return Response.json(response);
9280
9285
  } catch (error) {
9281
9286
  if (isResponse(error)) {
9282
9287
  error.headers.set("X-Remix-Catch", "yes");
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-ClXvjZ4E.mjs';
3
- import './route-data-Cw8htKcF.mjs';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-D6dP9JIt.mjs';
3
+ import './route-data-Cq_b5feC.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-Ckdfl79L.js';
3
- import './route-data-Cw8htKcF.js';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-CCAcUMgB.js';
3
+ import './route-data-Cq_b5feC.js';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.3-pre.0
2
+ * react-router v7.1.4-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -776,6 +776,7 @@ function createRouter(init) {
776
776
  let getScrollPosition = null;
777
777
  let initialScrollRestored = init.hydrationData != null;
778
778
  let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
779
+ let initialMatchesIsFOW = false;
779
780
  let initialErrors = null;
780
781
  if (initialMatches == null && !patchRoutesOnNavigationImpl) {
781
782
  let error = getInternalRouterError(404, {
@@ -805,6 +806,7 @@ function createRouter(init) {
805
806
  init.history.location.pathname
806
807
  );
807
808
  if (fogOfWar.active && fogOfWar.matches) {
809
+ initialMatchesIsFOW = true;
808
810
  initialMatches = fogOfWar.matches;
809
811
  }
810
812
  } else if (initialMatches.some((m) => m.route.lazy)) {
@@ -1170,7 +1172,10 @@ function createRouter(init) {
1170
1172
  pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
1171
1173
  let routesToUse = inFlightDataRoutes || dataRoutes;
1172
1174
  let loadingNavigation = opts && opts.overrideNavigation;
1173
- let matches = matchRoutes(routesToUse, location, basename);
1175
+ let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
1176
+ // `matchRoutes()` has already been called if we're in here via `router.initialize()`
1177
+ state.matches
1178
+ ) : matchRoutes(routesToUse, location, basename);
1174
1179
  let flushSync2 = (opts && opts.flushSync) === true;
1175
1180
  let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);
1176
1181
  if (fogOfWar.active && fogOfWar.matches) {
@@ -2973,14 +2978,20 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
2973
2978
  return {
2974
2979
  type: "error" /* error */,
2975
2980
  error: result.data,
2976
- statusCode: result.init?.status
2981
+ statusCode: result.init?.status,
2982
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
2977
2983
  };
2978
2984
  }
2979
- result = new ErrorResponseImpl(
2980
- result.init?.status || 500,
2981
- void 0,
2982
- result.data
2983
- );
2985
+ return {
2986
+ type: "error" /* error */,
2987
+ error: new ErrorResponseImpl(
2988
+ result.init?.status || 500,
2989
+ void 0,
2990
+ result.data
2991
+ ),
2992
+ statusCode: isRouteErrorResponse(result) ? result.status : void 0,
2993
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
2994
+ };
2984
2995
  }
2985
2996
  return {
2986
2997
  type: "error" /* error */,
@@ -3549,7 +3560,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
3549
3560
  // router loaded. We can help them understand how to avoid that.
3550
3561
  `useRoutes() may be used only in the context of a <Router> component.`
3551
3562
  );
3552
- let { navigator: navigator2 } = React2.useContext(NavigationContext);
3563
+ let { navigator: navigator2, static: isStatic } = React2.useContext(NavigationContext);
3553
3564
  let { matches: parentMatches } = React2.useContext(RouteContext);
3554
3565
  let routeMatch = parentMatches[parentMatches.length - 1];
3555
3566
  let parentParams = routeMatch ? routeMatch.params : {};
@@ -3585,7 +3596,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
3585
3596
  let segments = pathname.replace(/^\//, "").split("/");
3586
3597
  remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
3587
3598
  }
3588
- let matches = matchRoutes(routes, { pathname: remainingPathname });
3599
+ let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, { pathname: remainingPathname });
3589
3600
  if (ENABLE_DEV_WARNINGS) {
3590
3601
  warning(
3591
3602
  parentRoute || matches != null,
@@ -4481,6 +4492,14 @@ async function fetchAndDecode(url, init) {
4481
4492
  if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
4482
4493
  throw new ErrorResponseImpl(404, "Not Found", true);
4483
4494
  }
4495
+ const NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([100, 101, 204, 205]);
4496
+ if (NO_BODY_STATUS_CODES.has(res.status)) {
4497
+ if (!init.method || init.method === "GET") {
4498
+ return { status: res.status, data: {} };
4499
+ } else {
4500
+ return { status: res.status, data: { data: void 0 } };
4501
+ }
4502
+ }
4484
4503
  invariant2(res.body, "No response body to decode");
4485
4504
  try {
4486
4505
  let decoded = await decodeViaTurboStream(res.body, window);
@@ -5056,12 +5075,13 @@ function useFogOFWarDiscovery(router2, manifest, routeModules, isSpaMode) {
5056
5075
  if (!path) {
5057
5076
  return;
5058
5077
  }
5059
- let url = new URL(path, window.location.origin);
5060
- if (!discoveredPaths.has(url.pathname)) {
5061
- nextPaths.add(url.pathname);
5078
+ let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
5079
+ if (!discoveredPaths.has(pathname)) {
5080
+ nextPaths.add(pathname);
5062
5081
  }
5063
5082
  }
5064
5083
  async function fetchPatches() {
5084
+ document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
5065
5085
  let lazyPaths = Array.from(nextPaths.keys()).filter((path) => {
5066
5086
  if (discoveredPaths.has(path)) {
5067
5087
  nextPaths.delete(path);
@@ -5085,30 +5105,9 @@ function useFogOFWarDiscovery(router2, manifest, routeModules, isSpaMode) {
5085
5105
  console.error("Failed to fetch manifest patches", e);
5086
5106
  }
5087
5107
  }
5088
- document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach((el) => registerElement(el));
5089
- fetchPatches();
5090
5108
  let debouncedFetchPatches = debounce(fetchPatches, 100);
5091
- function isElement(node) {
5092
- return node.nodeType === Node.ELEMENT_NODE;
5093
- }
5094
- let observer = new MutationObserver((records) => {
5095
- let elements = /* @__PURE__ */ new Set();
5096
- records.forEach((r) => {
5097
- [r.target, ...r.addedNodes].forEach((node) => {
5098
- if (!isElement(node)) return;
5099
- if (node.tagName === "A" && node.getAttribute("data-discover")) {
5100
- elements.add(node);
5101
- } else if (node.tagName === "FORM" && node.getAttribute("data-discover")) {
5102
- elements.add(node);
5103
- }
5104
- if (node.tagName !== "A") {
5105
- node.querySelectorAll("a[data-discover], form[data-discover]").forEach((el) => elements.add(el));
5106
- }
5107
- });
5108
- });
5109
- elements.forEach((el) => registerElement(el));
5110
- debouncedFetchPatches();
5111
- });
5109
+ fetchPatches();
5110
+ let observer = new MutationObserver(() => debouncedFetchPatches());
5112
5111
  observer.observe(document.documentElement, {
5113
5112
  subtree: true,
5114
5113
  childList: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.1.3-pre.0
2
+ * react-router v7.1.4-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-F43ZKHNQ.mjs";
28
+ } from "./chunk-6WHQQTEJ.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-Cw8htKcF.js';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-Cq_b5feC.js';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { n as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, g as RelativeRoutingType, v as NonIndexRouteObject, a0 as LazyRouteFunction, u as IndexRouteObject, h as Location, i as Action, al as Navigator, ao as RouteMatch, r as StaticHandlerContext, d as RouteManifest, R as RouteModules, ak as DataRouteObject, aH as RouteModule, $ as HTMLFormMethod, Z as FormEncType, at as PageLinkDescriptor, aI as History, x as GetScrollRestorationKeyFunction, N as NavigateOptions, y as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-Cw8htKcF.js';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-Cq_b5feC.mjs';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-Cw8htKcF.mjs';
2
- export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-Cw8htKcF.mjs';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-ClXvjZ4E.mjs';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-ClXvjZ4E.mjs';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-Cq_b5feC.mjs';
2
+ export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-Cq_b5feC.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-D6dP9JIt.mjs';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-D6dP9JIt.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -24,42 +24,6 @@ declare enum ServerMode {
24
24
  Test = "test"
25
25
  }
26
26
 
27
- type HeadersArgs = {
28
- loaderHeaders: Headers;
29
- parentHeaders: Headers;
30
- actionHeaders: Headers;
31
- errorHeaders: Headers | undefined;
32
- };
33
- /**
34
- * A function that returns HTTP headers to be used for a route. These headers
35
- * will be merged with (and take precedence over) headers from parent routes.
36
- */
37
- interface HeadersFunction {
38
- (args: HeadersArgs): Headers | HeadersInit;
39
- }
40
- /**
41
- * An arbitrary object that is associated with a route.
42
- */
43
- type RouteHandle = unknown;
44
- interface EntryRouteModule {
45
- clientAction?: ClientActionFunction;
46
- clientLoader?: ClientLoaderFunction;
47
- ErrorBoundary?: any;
48
- HydrateFallback?: any;
49
- Layout?: any;
50
- default: any;
51
- handle?: RouteHandle;
52
- links?: LinksFunction;
53
- meta?: MetaFunction;
54
- }
55
- interface ServerRouteModule extends EntryRouteModule {
56
- action?: ActionFunction;
57
- headers?: HeadersFunction | {
58
- [name: string]: string;
59
- };
60
- loader?: LoaderFunction;
61
- }
62
-
63
27
  type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
64
28
  interface ServerRoute extends Route {
65
29
  children: ServerRoute[];
@@ -836,4 +800,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
836
800
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
837
801
  }
838
802
 
839
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, type HeadersArgs, type HeadersFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
803
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-Cw8htKcF.js';
2
- export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-Cw8htKcF.js';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-Ckdfl79L.js';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-Ckdfl79L.js';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-Cq_b5feC.js';
2
+ export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-Cq_b5feC.js';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CCAcUMgB.js';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-CCAcUMgB.js';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -24,42 +24,6 @@ declare enum ServerMode {
24
24
  Test = "test"
25
25
  }
26
26
 
27
- type HeadersArgs = {
28
- loaderHeaders: Headers;
29
- parentHeaders: Headers;
30
- actionHeaders: Headers;
31
- errorHeaders: Headers | undefined;
32
- };
33
- /**
34
- * A function that returns HTTP headers to be used for a route. These headers
35
- * will be merged with (and take precedence over) headers from parent routes.
36
- */
37
- interface HeadersFunction {
38
- (args: HeadersArgs): Headers | HeadersInit;
39
- }
40
- /**
41
- * An arbitrary object that is associated with a route.
42
- */
43
- type RouteHandle = unknown;
44
- interface EntryRouteModule {
45
- clientAction?: ClientActionFunction;
46
- clientLoader?: ClientLoaderFunction;
47
- ErrorBoundary?: any;
48
- HydrateFallback?: any;
49
- Layout?: any;
50
- default: any;
51
- handle?: RouteHandle;
52
- links?: LinksFunction;
53
- meta?: MetaFunction;
54
- }
55
- interface ServerRouteModule extends EntryRouteModule {
56
- action?: ActionFunction;
57
- headers?: HeadersFunction | {
58
- [name: string]: string;
59
- };
60
- loader?: LoaderFunction;
61
- }
62
-
63
27
  type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
64
28
  interface ServerRoute extends Route {
65
29
  children: ServerRoute[];
@@ -836,4 +800,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
836
800
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
837
801
  }
838
802
 
839
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, type HeadersArgs, type HeadersFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
803
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };