react-router 0.0.0-experimental-ebf23340b → 0.0.0-experimental-5cde395f4

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 (29) hide show
  1. package/dist/development/{chunk-QPDGWHQ7.mjs → chunk-7AVAX3B5.mjs} +31 -32
  2. package/dist/development/{chunk-GZIAUTEM.js → chunk-JI2SH6DC.js} +1 -1
  3. package/dist/development/{chunk-3FJJXNII.js → chunk-JL64IQ5P.js} +264 -156
  4. package/dist/development/{chunk-VGAMJJWA.mjs → chunk-UETMX45E.mjs} +110 -2
  5. package/dist/development/dom-export.js +3 -3
  6. package/dist/development/dom-export.mjs +3 -3
  7. package/dist/development/index-react-server-client.js +4 -4
  8. package/dist/development/index-react-server-client.mjs +2 -2
  9. package/dist/development/index-react-server.js +1 -1
  10. package/dist/development/index-react-server.mjs +1 -1
  11. package/dist/development/index.js +125 -126
  12. package/dist/development/index.mjs +3 -3
  13. package/dist/development/lib/types/internal.js +1 -1
  14. package/dist/development/lib/types/internal.mjs +1 -1
  15. package/dist/production/{chunk-CMZZ5GRK.js → chunk-33LFW6NB.js} +1 -1
  16. package/dist/production/{chunk-72RPF3NM.js → chunk-3D2ZQMH4.js} +264 -156
  17. package/dist/production/{chunk-Q2RJ4JRR.mjs → chunk-ILA24WHZ.mjs} +110 -2
  18. package/dist/production/{chunk-AY4GZSWZ.mjs → chunk-JGITFPO7.mjs} +31 -32
  19. package/dist/production/dom-export.js +3 -3
  20. package/dist/production/dom-export.mjs +3 -3
  21. package/dist/production/index-react-server-client.js +4 -4
  22. package/dist/production/index-react-server-client.mjs +2 -2
  23. package/dist/production/index-react-server.js +1 -1
  24. package/dist/production/index-react-server.mjs +1 -1
  25. package/dist/production/index.js +125 -126
  26. package/dist/production/index.mjs +3 -3
  27. package/dist/production/lib/types/internal.js +1 -1
  28. package/dist/production/lib/types/internal.mjs +1 -1
  29. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-ebf23340b
2
+ * react-router v0.0.0-experimental-5cde395f4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -22,6 +22,7 @@ import {
22
22
  SingleFetchRedirectSymbol,
23
23
  StaticRouterProvider,
24
24
  StreamTransfer,
25
+ UNSTABLE_TransitionEnabledRouterProvider,
25
26
  convertRoutesToDataRoutes,
26
27
  createBrowserHistory,
27
28
  createContext,
@@ -59,7 +60,7 @@ import {
59
60
  withComponentProps,
60
61
  withErrorBoundaryProps,
61
62
  withHydrateFallbackProps
62
- } from "./chunk-VGAMJJWA.mjs";
63
+ } from "./chunk-UETMX45E.mjs";
63
64
 
64
65
  // lib/dom/ssr/server.tsx
65
66
  import * as React from "react";
@@ -1886,8 +1887,7 @@ function createCallServer({
1886
1887
  throw new Error("Unexpected payload type");
1887
1888
  }
1888
1889
  if (payload.rerender) {
1889
- React4.startTransition(
1890
- // @ts-expect-error - We have old react types that don't know this can be async
1890
+ globalVar.__reactRouterDataRouter.__startRevalidation(
1891
1891
  async () => {
1892
1892
  const rerender = await payload.rerender;
1893
1893
  if (!rerender) return;
@@ -1903,34 +1903,33 @@ function createCallServer({
1903
1903
  });
1904
1904
  return;
1905
1905
  }
1906
- let lastMatch;
1907
- for (const match of rerender.matches) {
1908
- globalVar.__reactRouterDataRouter.patchRoutes(
1909
- lastMatch?.id ?? null,
1910
- [createRouteFromServerManifest(match)],
1911
- true
1912
- );
1913
- lastMatch = match;
1914
- }
1915
- window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
1916
- {}
1917
- );
1918
- React4.startTransition(() => {
1919
- window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
1920
- {
1921
- loaderData: Object.assign(
1922
- {},
1923
- globalVar.__reactRouterDataRouter.state.loaderData,
1924
- rerender.loaderData
1925
- ),
1926
- errors: rerender.errors ? Object.assign(
1927
- {},
1928
- globalVar.__reactRouterDataRouter.state.errors,
1929
- rerender.errors
1930
- ) : null
1906
+ globalVar.__reactRouterDataRouter.__startRevalidation(
1907
+ () => {
1908
+ let lastMatch;
1909
+ for (const match of rerender.matches) {
1910
+ globalVar.__reactRouterDataRouter.patchRoutes(
1911
+ lastMatch?.id ?? null,
1912
+ [createRouteFromServerManifest(match)],
1913
+ true
1914
+ );
1915
+ lastMatch = match;
1931
1916
  }
1932
- );
1933
- });
1917
+ window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
1918
+ {
1919
+ loaderData: Object.assign(
1920
+ {},
1921
+ globalVar.__reactRouterDataRouter.state.loaderData,
1922
+ rerender.loaderData
1923
+ ),
1924
+ errors: rerender.errors ? Object.assign(
1925
+ {},
1926
+ globalVar.__reactRouterDataRouter.state.errors,
1927
+ rerender.errors
1928
+ ) : null
1929
+ }
1930
+ );
1931
+ }
1932
+ );
1934
1933
  }
1935
1934
  }
1936
1935
  );
@@ -2302,7 +2301,7 @@ function RSCHydratedRouter({
2302
2301
  routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
2303
2302
  routeModules
2304
2303
  };
2305
- return /* @__PURE__ */ React4.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
2304
+ return /* @__PURE__ */ React4.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
2306
2305
  }
2307
2306
  function createRouteFromServerManifest(match, payload) {
2308
2307
  let hasInitialData = payload && match.id in payload.loaderData;
@@ -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 v0.0.0-experimental-ebf23340b
2
+ * react-router v0.0.0-experimental-5cde395f4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *