react-router 0.0.0-experimental-ce4015162 → 0.0.0-experimental-8cee090e4
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.
- package/CHANGELOG.md +17 -0
- package/dist/development/dom-export.js +1 -1
- package/dist/development/index-react-server-client.js +1 -1
- package/dist/development/index-react-server.d.ts +9 -9
- package/dist/development/index-react-server.js +16 -14
- package/dist/development/index.d.ts +2 -2
- package/dist/development/index.js +1 -1
- package/dist/development/lib/actions.js +1 -1
- package/dist/development/lib/components.js +5 -2
- package/dist/development/lib/context.js +1 -1
- package/dist/development/lib/dom/dom.js +1 -1
- package/dist/development/lib/dom/lib.js +2 -16
- package/dist/development/lib/dom/server.js +1 -1
- package/dist/development/lib/dom/ssr/components.js +4 -11
- package/dist/development/lib/dom/ssr/data.js +1 -1
- package/dist/development/lib/dom/ssr/entry.d.ts +1 -3
- package/dist/development/lib/dom/ssr/errorBoundaries.d.ts +1 -1
- package/dist/development/lib/dom/ssr/errorBoundaries.js +1 -1
- package/dist/development/lib/dom/ssr/errors.js +1 -1
- package/dist/development/lib/dom/ssr/fallback.js +1 -1
- package/dist/development/lib/dom/ssr/fog-of-war.js +1 -1
- package/dist/development/lib/dom/ssr/hydration.js +1 -1
- package/dist/development/lib/dom/ssr/invariant.js +1 -1
- package/dist/development/lib/dom/ssr/links.js +1 -1
- package/dist/development/lib/dom/ssr/markup.js +1 -1
- package/dist/development/lib/dom/ssr/routeModules.d.ts +1 -1
- package/dist/development/lib/dom/ssr/routeModules.js +1 -1
- package/dist/development/lib/dom/ssr/routes-test-stub.js +2 -2
- package/dist/development/lib/dom/ssr/routes.js +1 -1
- package/dist/development/lib/dom/ssr/server.js +1 -1
- package/dist/development/lib/dom/ssr/single-fetch.d.ts +1 -1
- package/dist/development/lib/dom/ssr/single-fetch.js +22 -25
- package/dist/development/lib/dom-export/dom-router-provider.js +1 -1
- package/dist/development/lib/dom-export/hydrated-router.js +2 -2
- package/dist/development/lib/errors.js +1 -1
- package/dist/development/lib/hooks.d.ts +8 -2
- package/dist/development/lib/hooks.js +2 -4
- package/dist/development/lib/href.js +1 -1
- package/dist/development/lib/router/history.js +1 -1
- package/dist/development/lib/router/instrumentation.js +1 -1
- package/dist/development/lib/router/router.js +1 -1
- package/dist/development/lib/router/utils.js +10 -3
- package/dist/development/lib/rsc/browser.js +7 -7
- package/dist/development/lib/rsc/errorBoundaries.js +1 -1
- package/dist/development/lib/rsc/html-stream/browser.js +1 -1
- package/dist/development/lib/rsc/html-stream/server.js +1 -1
- package/dist/development/lib/rsc/route-modules.js +1 -1
- package/dist/development/lib/rsc/server.ssr.js +2 -2
- package/dist/development/lib/server-runtime/cookies.d.ts +5 -5
- package/dist/development/lib/server-runtime/cookies.js +2 -2
- package/dist/development/lib/server-runtime/crypto.js +1 -1
- package/dist/development/lib/server-runtime/data.js +1 -1
- package/dist/development/lib/server-runtime/dev.js +1 -1
- package/dist/development/lib/server-runtime/entry.js +1 -1
- package/dist/development/lib/server-runtime/errors.js +1 -1
- package/dist/development/lib/server-runtime/headers.js +3 -3
- package/dist/development/lib/server-runtime/invariant.js +1 -1
- package/dist/development/lib/server-runtime/mode.js +1 -1
- package/dist/development/lib/server-runtime/routeMatching.js +1 -1
- package/dist/development/lib/server-runtime/routes.js +1 -1
- package/dist/development/lib/server-runtime/server.js +4 -4
- package/dist/development/lib/server-runtime/serverHandoff.js +1 -1
- package/dist/development/lib/server-runtime/sessions/cookieStorage.js +1 -1
- package/dist/development/lib/server-runtime/sessions/memoryStorage.js +1 -1
- package/dist/development/lib/server-runtime/sessions.d.ts +4 -4
- package/dist/development/lib/server-runtime/sessions.js +1 -1
- package/dist/development/lib/server-runtime/single-fetch.js +3 -3
- package/dist/development/lib/server-runtime/urls.js +4 -8
- package/dist/development/lib/server-runtime/warnings.js +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/vendor/turbo-stream-v2/flatten.js +1 -1
- package/dist/development/vendor/turbo-stream-v2/turbo-stream.js +1 -1
- package/dist/development/vendor/turbo-stream-v2/unflatten.js +1 -1
- package/dist/development/vendor/turbo-stream-v2/utils.js +4 -1
- package/dist/production/dom-export.js +1 -1
- package/dist/production/index-react-server-client.js +1 -1
- package/dist/production/index-react-server.d.ts +9 -9
- package/dist/production/index-react-server.js +16 -14
- package/dist/production/index.d.ts +2 -2
- package/dist/production/index.js +1 -1
- package/dist/production/lib/actions.js +1 -1
- package/dist/production/lib/components.js +5 -2
- package/dist/production/lib/context.js +1 -1
- package/dist/production/lib/dom/dom.js +1 -1
- package/dist/production/lib/dom/lib.js +2 -16
- package/dist/production/lib/dom/server.js +1 -1
- package/dist/production/lib/dom/ssr/components.js +4 -11
- package/dist/production/lib/dom/ssr/data.js +1 -1
- package/dist/production/lib/dom/ssr/entry.d.ts +1 -3
- package/dist/production/lib/dom/ssr/errorBoundaries.d.ts +1 -1
- package/dist/production/lib/dom/ssr/errorBoundaries.js +1 -1
- package/dist/production/lib/dom/ssr/errors.js +1 -1
- package/dist/production/lib/dom/ssr/fallback.js +1 -1
- package/dist/production/lib/dom/ssr/fog-of-war.js +1 -1
- package/dist/production/lib/dom/ssr/hydration.js +1 -1
- package/dist/production/lib/dom/ssr/invariant.js +1 -1
- package/dist/production/lib/dom/ssr/links.js +1 -1
- package/dist/production/lib/dom/ssr/markup.js +1 -1
- package/dist/production/lib/dom/ssr/routeModules.d.ts +1 -1
- package/dist/production/lib/dom/ssr/routeModules.js +1 -1
- package/dist/production/lib/dom/ssr/routes-test-stub.js +2 -2
- package/dist/production/lib/dom/ssr/routes.js +1 -1
- package/dist/production/lib/dom/ssr/server.js +1 -1
- package/dist/production/lib/dom/ssr/single-fetch.d.ts +1 -1
- package/dist/production/lib/dom/ssr/single-fetch.js +22 -25
- package/dist/production/lib/dom-export/dom-router-provider.js +1 -1
- package/dist/production/lib/dom-export/hydrated-router.js +2 -2
- package/dist/production/lib/errors.js +1 -1
- package/dist/production/lib/hooks.d.ts +8 -2
- package/dist/production/lib/hooks.js +2 -4
- package/dist/production/lib/href.js +1 -1
- package/dist/production/lib/router/history.js +1 -1
- package/dist/production/lib/router/instrumentation.js +1 -1
- package/dist/production/lib/router/router.js +1 -1
- package/dist/production/lib/router/utils.js +10 -3
- package/dist/production/lib/rsc/browser.js +7 -7
- package/dist/production/lib/rsc/errorBoundaries.js +1 -1
- package/dist/production/lib/rsc/html-stream/browser.js +1 -1
- package/dist/production/lib/rsc/html-stream/server.js +1 -1
- package/dist/production/lib/rsc/route-modules.js +1 -1
- package/dist/production/lib/rsc/server.ssr.js +2 -2
- package/dist/production/lib/server-runtime/cookies.d.ts +5 -5
- package/dist/production/lib/server-runtime/cookies.js +2 -2
- package/dist/production/lib/server-runtime/crypto.js +1 -1
- package/dist/production/lib/server-runtime/data.js +1 -1
- package/dist/production/lib/server-runtime/dev.js +1 -1
- package/dist/production/lib/server-runtime/entry.js +1 -1
- package/dist/production/lib/server-runtime/errors.js +1 -1
- package/dist/production/lib/server-runtime/headers.js +3 -3
- package/dist/production/lib/server-runtime/invariant.js +1 -1
- package/dist/production/lib/server-runtime/mode.js +1 -1
- package/dist/production/lib/server-runtime/routeMatching.js +1 -1
- package/dist/production/lib/server-runtime/routes.js +1 -1
- package/dist/production/lib/server-runtime/server.js +4 -4
- package/dist/production/lib/server-runtime/serverHandoff.js +1 -1
- package/dist/production/lib/server-runtime/sessions/cookieStorage.js +1 -1
- package/dist/production/lib/server-runtime/sessions/memoryStorage.js +1 -1
- package/dist/production/lib/server-runtime/sessions.d.ts +4 -4
- package/dist/production/lib/server-runtime/sessions.js +1 -1
- package/dist/production/lib/server-runtime/single-fetch.js +3 -3
- package/dist/production/lib/server-runtime/urls.js +4 -8
- package/dist/production/lib/server-runtime/warnings.js +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/vendor/turbo-stream-v2/flatten.js +1 -1
- package/dist/production/vendor/turbo-stream-v2/turbo-stream.js +1 -1
- package/dist/production/vendor/turbo-stream-v2/unflatten.js +1 -1
- package/dist/production/vendor/turbo-stream-v2/utils.js +4 -1
- package/docs/explanation/backend-for-frontend.md +50 -0
- package/docs/explanation/code-splitting.md +77 -0
- package/docs/explanation/concurrency.md +135 -0
- package/docs/explanation/form-vs-fetcher.md +292 -0
- package/docs/explanation/hot-module-replacement.md +137 -0
- package/docs/explanation/hydration.md +14 -0
- package/docs/explanation/index-query-param.md +86 -0
- package/docs/explanation/index.md +4 -0
- package/docs/explanation/lazy-route-discovery.md +78 -0
- package/docs/explanation/location.md +6 -0
- package/docs/explanation/progressive-enhancement.md +150 -0
- package/docs/explanation/race-conditions.md +88 -0
- package/docs/explanation/react-transitions.md +160 -0
- package/docs/explanation/route-matching.md +7 -0
- package/docs/explanation/server-client-execution.md +4 -0
- package/docs/explanation/sessions-and-cookies.md +465 -0
- package/docs/explanation/special-files.md +16 -0
- package/docs/explanation/state-management.md +524 -0
- package/docs/explanation/styling.md +87 -0
- package/docs/explanation/type-safety.md +82 -0
- package/docs/how-to/accessibility.md +44 -0
- package/docs/how-to/client-data.md +199 -0
- package/docs/how-to/data-strategy.md +317 -0
- package/docs/how-to/error-boundary.md +231 -0
- package/docs/how-to/error-reporting.md +134 -0
- package/docs/how-to/fetchers.md +307 -0
- package/docs/how-to/file-route-conventions.md +410 -0
- package/docs/how-to/file-uploads.md +217 -0
- package/docs/how-to/form-validation.md +120 -0
- package/docs/how-to/headers.md +164 -0
- package/docs/how-to/index.md +4 -0
- package/docs/how-to/instrumentation.md +556 -0
- package/docs/how-to/meta.md +40 -0
- package/docs/how-to/middleware.md +728 -0
- package/docs/how-to/navigation-blocking.md +233 -0
- package/docs/how-to/optimize-revalidation.md +12 -0
- package/docs/how-to/pre-rendering.md +225 -0
- package/docs/how-to/presets.md +103 -0
- package/docs/how-to/react-server-components.md +899 -0
- package/docs/how-to/resource-routes.md +126 -0
- package/docs/how-to/route-module-type-safety.md +100 -0
- package/docs/how-to/search-params.md +4 -0
- package/docs/how-to/security.md +30 -0
- package/docs/how-to/server-bundles.md +66 -0
- package/docs/how-to/spa.md +120 -0
- package/docs/how-to/status.md +63 -0
- package/docs/how-to/suspense.md +132 -0
- package/docs/how-to/using-handle.md +117 -0
- package/docs/how-to/view-transitions.md +237 -0
- package/docs/how-to/webhook.md +50 -0
- package/docs/index.md +39 -0
- package/docs/start/data/actions.md +138 -0
- package/docs/start/data/custom.md +198 -0
- package/docs/start/data/data-loading.md +44 -0
- package/docs/start/data/index.md +4 -0
- package/docs/start/data/installation.md +52 -0
- package/docs/start/data/navigating.md +12 -0
- package/docs/start/data/pending-ui.md +12 -0
- package/docs/start/data/route-object.md +248 -0
- package/docs/start/data/routing.md +281 -0
- package/docs/start/data/testing.md +8 -0
- package/docs/start/declarative/index.md +4 -0
- package/docs/start/declarative/installation.md +43 -0
- package/docs/start/declarative/navigating.md +133 -0
- package/docs/start/declarative/routing.md +237 -0
- package/docs/start/declarative/url-values.md +65 -0
- package/docs/start/framework/actions.md +175 -0
- package/docs/start/framework/data-loading.md +201 -0
- package/docs/start/framework/deploying.md +96 -0
- package/docs/start/framework/index.md +4 -0
- package/docs/start/framework/installation.md +42 -0
- package/docs/start/framework/navigating.md +182 -0
- package/docs/start/framework/pending-ui.md +142 -0
- package/docs/start/framework/rendering.md +59 -0
- package/docs/start/framework/route-module.md +527 -0
- package/docs/start/framework/routing.md +362 -0
- package/docs/start/framework/testing.md +133 -0
- package/docs/start/index.md +4 -0
- package/docs/start/modes.md +201 -0
- package/docs/upgrading/component-routes.md +363 -0
- package/docs/upgrading/future.md +31 -0
- package/docs/upgrading/index.md +4 -0
- package/docs/upgrading/remix.md +403 -0
- package/docs/upgrading/router-provider.md +442 -0
- package/docs/upgrading/v6.md +379 -0
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## v7.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Stabilize `future.unstable_trailingSlashAwareDataRequests` as `future.v8_trailingSlashAwareDataRequests` ([#15098](https://github.com/remix-run/react-router/pull/15098))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Disable manifest path when lazy route dicovery is disabled ([#15068](https://github.com/remix-run/react-router/pull/15068))
|
|
12
|
+
|
|
13
|
+
- Fix browser URL creation to use the configured history window instead of the global window. ([#15066](https://github.com/remix-run/react-router/pull/15066))
|
|
14
|
+
- Pass the history/router window through to `createBrowserURLImpl` so custom window contexts keep the correct URL origin.
|
|
15
|
+
|
|
16
|
+
- Fix `useNavigation()` return type to preserve discriminated union across navigation states ([#15095](https://github.com/remix-run/react-router/pull/15095))
|
|
17
|
+
|
|
18
|
+
- Widen `MetaDescriptor` `script:ld+json` type from `LdJsonObject` to `LdJsonObject | LdJsonObject[]` to permit multiple JSON-LD schemas in a single `<script type="application/ld+json">` tag emitted by `<Meta />` ([#15082](https://github.com/remix-run/react-router/pull/15082))
|
|
19
|
+
|
|
3
20
|
## v7.15.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { CookieParseOptions, CookieParseOptions as CookieParseOptions$1, CookieSerializeOptions, CookieSerializeOptions as CookieSerializeOptions$1 } from "cookie-es";
|
|
3
4
|
import { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Outlet, Route, Router, RouterProvider, Routes, ScrollRestoration, StaticRouter, StaticRouterProvider, unstable_HistoryRouter } from "react-router/internal/react-server-client";
|
|
4
|
-
import { ParseOptions, ParseOptions as ParseOptions$1, SerializeOptions, SerializeOptions as SerializeOptions$1 } from "cookie";
|
|
5
5
|
|
|
6
6
|
//#region lib/router/history.d.ts
|
|
7
7
|
/**
|
|
@@ -2038,7 +2038,7 @@ type MetaDescriptor = {
|
|
|
2038
2038
|
httpEquiv: string;
|
|
2039
2039
|
content: string;
|
|
2040
2040
|
} | {
|
|
2041
|
-
"script:ld+json": LdJsonObject;
|
|
2041
|
+
"script:ld+json": LdJsonObject | LdJsonObject[];
|
|
2042
2042
|
} | {
|
|
2043
2043
|
tagName: "meta" | "link";
|
|
2044
2044
|
[name: string]: string;
|
|
@@ -2480,7 +2480,7 @@ interface CookieSignatureOptions {
|
|
|
2480
2480
|
*/
|
|
2481
2481
|
secrets?: string[];
|
|
2482
2482
|
}
|
|
2483
|
-
type CookieOptions =
|
|
2483
|
+
type CookieOptions = CookieParseOptions & CookieSerializeOptions & CookieSignatureOptions;
|
|
2484
2484
|
/**
|
|
2485
2485
|
* A HTTP cookie.
|
|
2486
2486
|
*
|
|
@@ -2511,12 +2511,12 @@ interface Cookie {
|
|
|
2511
2511
|
* Parses a raw `Cookie` header and returns the value of this cookie or
|
|
2512
2512
|
* `null` if it's not present.
|
|
2513
2513
|
*/
|
|
2514
|
-
parse(cookieHeader: string | null, options?:
|
|
2514
|
+
parse(cookieHeader: string | null, options?: CookieParseOptions): Promise<any>;
|
|
2515
2515
|
/**
|
|
2516
2516
|
* Serializes the given value to a string and returns the `Set-Cookie`
|
|
2517
2517
|
* header.
|
|
2518
2518
|
*/
|
|
2519
|
-
serialize(value: any, options?:
|
|
2519
|
+
serialize(value: any, options?: CookieSerializeOptions): Promise<string>;
|
|
2520
2520
|
}
|
|
2521
2521
|
/**
|
|
2522
2522
|
* Creates a logical container for managing a browser cookie from the server.
|
|
@@ -2610,17 +2610,17 @@ interface SessionStorage<Data = SessionData, FlashData = Data> {
|
|
|
2610
2610
|
* Session. If there is no session associated with the cookie, this will
|
|
2611
2611
|
* return a new Session with no data.
|
|
2612
2612
|
*/
|
|
2613
|
-
getSession: (cookieHeader?: string | null, options?:
|
|
2613
|
+
getSession: (cookieHeader?: string | null, options?: CookieParseOptions$1) => Promise<Session<Data, FlashData>>;
|
|
2614
2614
|
/**
|
|
2615
2615
|
* Stores all data in the Session and returns the Set-Cookie header to be
|
|
2616
2616
|
* used in the HTTP response.
|
|
2617
2617
|
*/
|
|
2618
|
-
commitSession: (session: Session<Data, FlashData>, options?:
|
|
2618
|
+
commitSession: (session: Session<Data, FlashData>, options?: CookieSerializeOptions$1) => Promise<string>;
|
|
2619
2619
|
/**
|
|
2620
2620
|
* Deletes all data associated with the Session and returns the Set-Cookie
|
|
2621
2621
|
* header to be used in the HTTP response.
|
|
2622
2622
|
*/
|
|
2623
|
-
destroySession: (session: Session<Data, FlashData>, options?:
|
|
2623
|
+
destroySession: (session: Session<Data, FlashData>, options?: CookieSerializeOptions$1) => Promise<string>;
|
|
2624
2624
|
}
|
|
2625
2625
|
/**
|
|
2626
2626
|
* SessionIdStorageStrategy is designed to allow anyone to easily build their
|
|
@@ -2710,4 +2710,4 @@ declare function createMemorySessionStorage<Data = SessionData, FlashData = Data
|
|
|
2710
2710
|
cookie
|
|
2711
2711
|
}?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
|
|
2712
2712
|
//#endregion
|
|
2713
|
-
export { Await, BrowserRouter, type Cookie, type CookieOptions, type
|
|
2713
|
+
export { Await, BrowserRouter, type Cookie, type CookieOptions, type CookieParseOptions, type CookieSerializeOptions, type CookieSignatureOptions, type FlashSessionData, Form, HashRouter, type IsCookieFunction, type IsSessionFunction, Link, Links, MemoryRouter, Meta, type MiddlewareFunction, type MiddlewareNextFunction, NavLink, Navigate, Outlet, Route, Router, type RouterContext, RouterContextProvider, RouterProvider, Routes, ScrollRestoration, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticRouter, StaticRouterProvider, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, href, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace$1 as replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, unstable_HistoryRouter, type LoadServerActionFunction as unstable_LoadServerActionFunction, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCMatch as unstable_RSCMatch, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, type RSCRouteConfig as unstable_RSCRouteConfig, type RSCRouteConfigEntry as unstable_RSCRouteConfigEntry, type RSCRouteManifest as unstable_RSCRouteManifest, type RSCRouteMatch as unstable_RSCRouteMatch, getRequest as unstable_getRequest, matchRSCServerRequest as unstable_matchRSCServerRequest };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
12
12
|
import * as React from "react";
|
|
13
|
-
import {
|
|
13
|
+
import { parse, serialize, splitSetCookieString } from "cookie-es";
|
|
14
14
|
import { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Outlet, Outlet as Outlet$1, Route, Router, RouterProvider, Routes, ScrollRestoration, StaticRouter, StaticRouterProvider, UNSAFE_AwaitContextProvider, UNSAFE_WithComponentProps, UNSAFE_WithErrorBoundaryProps, UNSAFE_WithHydrateFallbackProps, unstable_HistoryRouter } from "react-router/internal/react-server-client";
|
|
15
|
-
import { parse, serialize } from "cookie";
|
|
16
15
|
//#region lib/router/history.ts
|
|
17
16
|
function invariant$1(value, message) {
|
|
18
17
|
if (value === false || value === null || typeof value === "undefined") throw new Error(message);
|
|
@@ -730,8 +729,10 @@ const normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^
|
|
|
730
729
|
const normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
731
730
|
const normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
732
731
|
var DataWithResponseInit = class {
|
|
732
|
+
type = "DataWithResponseInit";
|
|
733
|
+
data;
|
|
734
|
+
init;
|
|
733
735
|
constructor(data, init) {
|
|
734
|
-
this.type = "DataWithResponseInit";
|
|
735
736
|
this.data = data;
|
|
736
737
|
this.init = init || null;
|
|
737
738
|
}
|
|
@@ -875,6 +876,11 @@ const replace$1 = (url, init) => {
|
|
|
875
876
|
return response;
|
|
876
877
|
};
|
|
877
878
|
var ErrorResponseImpl = class {
|
|
879
|
+
status;
|
|
880
|
+
statusText;
|
|
881
|
+
data;
|
|
882
|
+
error;
|
|
883
|
+
internal;
|
|
878
884
|
constructor(status, statusText, data, internal = false) {
|
|
879
885
|
this.status = status;
|
|
880
886
|
this.statusText = statusText || "";
|
|
@@ -2057,7 +2063,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn, _defaultHeaders) {
|
|
|
2057
2063
|
function prependCookies(parentHeaders, childHeaders) {
|
|
2058
2064
|
let parentSetCookieString = parentHeaders.get("Set-Cookie");
|
|
2059
2065
|
if (parentSetCookieString) {
|
|
2060
|
-
let cookies =
|
|
2066
|
+
let cookies = splitSetCookieString(parentSetCookieString);
|
|
2061
2067
|
let childCookies = new Set(childHeaders.getSetCookie());
|
|
2062
2068
|
cookies.forEach((cookie) => {
|
|
2063
2069
|
if (!childCookies.has(cookie)) childHeaders.append("Set-Cookie", cookie);
|
|
@@ -2150,17 +2156,13 @@ function createRouteErrorResponseDigest(response) {
|
|
|
2150
2156
|
}
|
|
2151
2157
|
//#endregion
|
|
2152
2158
|
//#region lib/server-runtime/urls.ts
|
|
2153
|
-
function getNormalizedPath(request, basename
|
|
2159
|
+
function getNormalizedPath(request, basename) {
|
|
2154
2160
|
basename = basename || "/";
|
|
2155
2161
|
let url = new URL(request.url);
|
|
2156
2162
|
let pathname = url.pathname;
|
|
2157
|
-
if (
|
|
2163
|
+
if (pathname.endsWith("/_.data")) pathname = pathname.replace(/_\.data$/, "");
|
|
2158
2164
|
else pathname = pathname.replace(/\.data$/, "");
|
|
2159
|
-
|
|
2160
|
-
if (stripBasename(pathname, basename) === "/_root.data") pathname = basename;
|
|
2161
|
-
else if (pathname.endsWith(".data")) pathname = pathname.replace(/\.data$/, "");
|
|
2162
|
-
if (stripBasename(pathname, basename) !== "/" && pathname.endsWith("/")) pathname = pathname.slice(0, -1);
|
|
2163
|
-
}
|
|
2165
|
+
if (stripBasename(pathname, basename) !== "/" && pathname.endsWith("/")) pathname = pathname.slice(0, -1);
|
|
2164
2166
|
let searchParams = new URLSearchParams(url.search);
|
|
2165
2167
|
searchParams.delete("_routes");
|
|
2166
2168
|
let search = searchParams.toString();
|
|
@@ -2443,7 +2445,7 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2443
2445
|
return generateErrorResponse(error);
|
|
2444
2446
|
}
|
|
2445
2447
|
},
|
|
2446
|
-
normalizePath: (r) => getNormalizedPath(r, basename
|
|
2448
|
+
normalizePath: (r) => getNormalizedPath(r, basename)
|
|
2447
2449
|
});
|
|
2448
2450
|
} catch (error) {
|
|
2449
2451
|
return generateErrorResponse(error);
|
|
@@ -2490,7 +2492,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2490
2492
|
skipLoaderErrorBubbling: isDataRequest,
|
|
2491
2493
|
skipRevalidation: isSubmission,
|
|
2492
2494
|
...routeIdsToLoad ? { filterMatchesToLoad: (m) => routeIdsToLoad.includes(m.route.id) } : {},
|
|
2493
|
-
normalizePath: (r) => getNormalizedPath(r, basename
|
|
2495
|
+
normalizePath: (r) => getNormalizedPath(r, basename),
|
|
2494
2496
|
async generateMiddlewareResponse(query) {
|
|
2495
2497
|
let formState;
|
|
2496
2498
|
let skipRevalidation = false;
|
|
@@ -13,7 +13,7 @@ import { BrowserRouter, BrowserRouterProps, DOMRouterOpts, FetcherFormProps, Fet
|
|
|
13
13
|
import { StaticRouter, StaticRouterProps, StaticRouterProvider, StaticRouterProviderProps, createStaticRouter } from "./lib/dom/server.js";
|
|
14
14
|
import { ServerRouter, ServerRouterProps } from "./lib/dom/ssr/server.js";
|
|
15
15
|
import { RoutesTestStubProps, createRoutesStub } from "./lib/dom/ssr/routes-test-stub.js";
|
|
16
|
-
import { Cookie, CookieOptions,
|
|
16
|
+
import { Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, IsCookieFunction, createCookie, isCookie } from "./lib/server-runtime/cookies.js";
|
|
17
17
|
import { FlashSessionData, IsSessionFunction, Session, SessionData, SessionIdStorageStrategy, SessionStorage, createSession, createSessionStorage, isSession } from "./lib/server-runtime/sessions.js";
|
|
18
18
|
import { createCookieSessionStorage } from "./lib/server-runtime/sessions/cookieStorage.js";
|
|
19
19
|
import { createMemorySessionStorage } from "./lib/server-runtime/sessions/memoryStorage.js";
|
|
@@ -43,4 +43,4 @@ import { ClientInstrumentation, InstrumentRequestHandlerFunction, InstrumentRout
|
|
|
43
43
|
declare const unstable_getRequest: typeof getRequest;
|
|
44
44
|
declare const unstable_matchRSCServerRequest: typeof matchRSCServerRequest;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { type ActionFunction, type ActionFunctionArgs, type AppLoadContext, Await, type AwaitProps, type BaseRouteObject, type Blocker, type BlockerFunction, BrowserRouter, type BrowserRouterProps, type ClientActionFunction, type ClientActionFunctionArgs, type ClientInstrumentation, type ClientLoaderFunction, type ClientLoaderFunctionArgs, type ClientOnErrorFunction, type Cookie, type CookieOptions, type
|
|
46
|
+
export { type ActionFunction, type ActionFunctionArgs, type AppLoadContext, Await, type AwaitProps, type BaseRouteObject, type Blocker, type BlockerFunction, BrowserRouter, type BrowserRouterProps, type ClientActionFunction, type ClientActionFunctionArgs, type ClientInstrumentation, type ClientLoaderFunction, type ClientLoaderFunctionArgs, type ClientOnErrorFunction, type Cookie, type CookieOptions, type CookieParseOptions, type CookieSerializeOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, type DataRouteMatch, type DataRouteObject, type Router as DataRouter, type DataStrategyFunction, type DataStrategyFunctionArgs, type DataStrategyMatch, type DataStrategyResult, type DiscoverBehavior, type EntryContext, type ErrorResponse, type Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, type FormEncType, type FormMethod, type FormProps, type Future, type GetScrollPositionFunction, type GetScrollRestorationKeyFunction, type HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HeadersArgs, type HeadersFunction, type HistoryRouterProps, type HtmlLinkDescriptor, type HydrationState, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, type IndexRouteObject, type IndexRouteProps, type InitialEntry, type InstrumentRequestHandlerFunction, type InstrumentRouteFunction, type InstrumentRouterFunction, type InstrumentationHandlerResult, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, type LazyRouteFunction, Link, type LinkDescriptor, type LinkProps, Links, type LinksFunction, type LinksProps, type LoaderFunction, type LoaderFunctionArgs, type Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, type MetaArgs, type MetaDescriptor, type MetaFunction, type MiddlewareFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, type NavigateOptions, type NavigateProps, type Navigation, type NavigationStates, Action as NavigationType, type Navigator, type NonIndexRouteObject, Outlet, type OutletProps, type PageLinkDescriptor, type ParamKeyValuePair, type ParamParseKey, type Params, type PatchRoutesOnNavigationFunction, type PatchRoutesOnNavigationFunctionArgs, type Path, type PathMatch, type PathParam, type PathPattern, type PathRouteProps, type PrefetchBehavior, PrefetchPageLinks, type RedirectFunction, type Register, type RelativeRoutingType, type RequestHandler, type RevalidationState, Route, type RouteMatch, type RouteObject, type RouteProps, Router$1 as Router, type RouterContext, RouterContextProvider, type RouterFetchOptions, type RouterInit, type RouterNavigateOptions, type RouterProps, RouterProvider, type RouterProviderProps, type RouterState, type RouterSubscriber, Routes, type RoutesProps, type RoutesTestStubProps, Scripts, type ScriptsProps, ScrollRestoration, type ScrollRestorationProps, type ServerBuild, type ServerEntryModule, type ServerInstrumentation, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, type SetURLSearchParams, type ShouldRevalidateFunction, type ShouldRevalidateFunctionArgs, type StaticHandler, type StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, type SubmitFunction, type SubmitOptions, type SubmitTarget, type To, type UIMatch, type AssetsManifest as UNSAFE_AssetsManifest, AwaitContextProvider as UNSAFE_AwaitContextProvider, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, type DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, type RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createHashHistory as UNSAFE_createHashHistory, createMemoryHistory as UNSAFE_createMemoryHistory, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, defaultMapRouteProperties as UNSAFE_defaultMapRouteProperties, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, type URLSearchParamsInit, createBrowserRouter, createContext, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createPath, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, data, generatePath, href, isCookie, isRouteErrorResponse, isSession, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, type BrowserCreateFromReadableStreamFunction as unstable_BrowserCreateFromReadableStreamFunction, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, type EncodeReplyFunction as unstable_EncodeReplyFunction, HistoryRouter as unstable_HistoryRouter, type LoadServerActionFunction as unstable_LoadServerActionFunction, type RSCHydratedRouterProps as unstable_RSCHydratedRouterProps, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCMatch as unstable_RSCMatch, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, type RSCRouteConfig as unstable_RSCRouteConfig, type RSCRouteConfigEntry as unstable_RSCRouteConfigEntry, type RSCRouteManifest as unstable_RSCRouteManifest, type RSCRouteMatch as unstable_RSCRouteMatch, RSCStaticRouter as unstable_RSCStaticRouter, type RSCStaticRouterProps as unstable_RSCStaticRouterProps, type unstable_RouterState, type unstable_RouterStateActiveVariant, type unstable_RouterStatePendingVariant, type SSRCreateFromReadableStreamFunction as unstable_SSRCreateFromReadableStreamFunction, type unstable_SerializesTo, unstable_getRequest, unstable_matchRSCServerRequest, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useRoute as unstable_useRoute, useRouterState as unstable_useRouterState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -58,8 +58,11 @@ function createMemoryRouter(routes, opts) {
|
|
|
58
58
|
}).initialize();
|
|
59
59
|
}
|
|
60
60
|
var Deferred = class {
|
|
61
|
+
status = "pending";
|
|
62
|
+
promise;
|
|
63
|
+
resolve;
|
|
64
|
+
reject;
|
|
61
65
|
constructor() {
|
|
62
|
-
this.status = "pending";
|
|
63
66
|
this.promise = new Promise((resolve, reject) => {
|
|
64
67
|
this.resolve = (value) => {
|
|
65
68
|
if (this.status === "pending") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -21,7 +21,7 @@ import * as React$1 from "react";
|
|
|
21
21
|
//#region lib/dom/lib.tsx
|
|
22
22
|
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
23
23
|
try {
|
|
24
|
-
if (isBrowser) window.__reactRouterVersion = "0.0.0-experimental-
|
|
24
|
+
if (isBrowser) window.__reactRouterVersion = "0.0.0-experimental-8cee090e4";
|
|
25
25
|
} catch (e) {}
|
|
26
26
|
/**
|
|
27
27
|
* Create a new {@link DataRouter| data router} that manages the application
|
|
@@ -561,20 +561,6 @@ function ScrollRestoration({ getKey, storageKey, ...props }) {
|
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
ScrollRestoration.displayName = "ScrollRestoration";
|
|
564
|
-
var DataRouterHook = /* @__PURE__ */ function(DataRouterHook) {
|
|
565
|
-
DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
566
|
-
DataRouterHook["UseSubmit"] = "useSubmit";
|
|
567
|
-
DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
568
|
-
DataRouterHook["UseFetcher"] = "useFetcher";
|
|
569
|
-
DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
|
|
570
|
-
return DataRouterHook;
|
|
571
|
-
}(DataRouterHook || {});
|
|
572
|
-
var DataRouterStateHook = /* @__PURE__ */ function(DataRouterStateHook) {
|
|
573
|
-
DataRouterStateHook["UseFetcher"] = "useFetcher";
|
|
574
|
-
DataRouterStateHook["UseFetchers"] = "useFetchers";
|
|
575
|
-
DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
576
|
-
return DataRouterStateHook;
|
|
577
|
-
}(DataRouterStateHook || {});
|
|
578
564
|
function getDataRouterConsoleError(hookName) {
|
|
579
565
|
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
580
566
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -238,11 +238,9 @@ function useKeyedPrefetchLinks(matches) {
|
|
|
238
238
|
}
|
|
239
239
|
function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
240
240
|
let location = useLocation();
|
|
241
|
-
let { future } = useFrameworkContext();
|
|
242
|
-
let { basename } = useDataRouterContext();
|
|
243
241
|
let dataHrefs = React$1.useMemo(() => {
|
|
244
242
|
if (page === location.pathname + location.search + location.hash) return [];
|
|
245
|
-
let url = singleFetchUrl(page,
|
|
243
|
+
let url = singleFetchUrl(page, "rsc");
|
|
246
244
|
let hasSomeRoutesWithShouldRevalidate = false;
|
|
247
245
|
let targetRoutes = [];
|
|
248
246
|
for (let match of nextMatches) if (typeof match.route.shouldRevalidate === "function") hasSomeRoutesWithShouldRevalidate = true;
|
|
@@ -250,8 +248,6 @@ function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps })
|
|
|
250
248
|
if (hasSomeRoutesWithShouldRevalidate && targetRoutes.length > 0) url.searchParams.set("_routes", targetRoutes.join(","));
|
|
251
249
|
return [url.pathname + url.search];
|
|
252
250
|
}, [
|
|
253
|
-
basename,
|
|
254
|
-
future.unstable_trailingSlashAwareDataRequests,
|
|
255
251
|
page,
|
|
256
252
|
location,
|
|
257
253
|
nextMatches
|
|
@@ -266,8 +262,7 @@ function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps })
|
|
|
266
262
|
}
|
|
267
263
|
function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
268
264
|
let location = useLocation();
|
|
269
|
-
let {
|
|
270
|
-
let { basename } = useDataRouterContext();
|
|
265
|
+
let { manifest, routeModules } = useFrameworkContext();
|
|
271
266
|
let { loaderData, matches } = useDataRouterStateContext();
|
|
272
267
|
let newMatchesForData = React$1.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, "data"), [
|
|
273
268
|
page,
|
|
@@ -295,12 +290,10 @@ function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
|
295
290
|
else routesParams.add(m.route.id);
|
|
296
291
|
});
|
|
297
292
|
if (routesParams.size === 0) return [];
|
|
298
|
-
let url = singleFetchUrl(page,
|
|
293
|
+
let url = singleFetchUrl(page, "data");
|
|
299
294
|
if (foundOptOutRoute && routesParams.size > 0) url.searchParams.set("_routes", nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(","));
|
|
300
295
|
return [url.pathname + url.search];
|
|
301
296
|
}, [
|
|
302
|
-
basename,
|
|
303
|
-
future.unstable_trailingSlashAwareDataRequests,
|
|
304
297
|
loaderData,
|
|
305
298
|
location,
|
|
306
299
|
manifest,
|
|
@@ -36,9 +36,7 @@ interface EntryContext extends FrameworkContextObject {
|
|
|
36
36
|
staticHandlerContext: StaticHandlerContext;
|
|
37
37
|
serverHandoffStream?: ReadableStream<Uint8Array>;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
unstable_trailingSlashAwareDataRequests: boolean;
|
|
41
|
-
}
|
|
39
|
+
type FutureConfig = Record<string, never>;
|
|
42
40
|
type CriticalCss = string | {
|
|
43
41
|
rel: "stylesheet";
|
|
44
42
|
href: string;
|
|
@@ -21,7 +21,7 @@ declare class RemixErrorBoundary extends React$1.Component<RemixErrorBoundaryPro
|
|
|
21
21
|
error: Error | null;
|
|
22
22
|
location: Location<any>;
|
|
23
23
|
};
|
|
24
|
-
render(): string | number | bigint | boolean |
|
|
24
|
+
render(): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | React$1.JSX.Element | null | undefined;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
export { RemixErrorBoundary };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-8cee090e4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -22,7 +22,7 @@ function createRoutesStub(routes, _context) {
|
|
|
22
22
|
let frameworkContextRef = React$1.useRef(null);
|
|
23
23
|
if (routerRef.current == null || frameworkContextRef.current == null) {
|
|
24
24
|
frameworkContextRef.current = {
|
|
25
|
-
future: {
|
|
25
|
+
future: {},
|
|
26
26
|
manifest: {
|
|
27
27
|
routes: {},
|
|
28
28
|
entry: {
|
|
@@ -5,7 +5,7 @@ import { RouteModules } from "./routeModules.js";
|
|
|
5
5
|
import { AssetsManifest } from "./entry.js";
|
|
6
6
|
//#region lib/dom/ssr/single-fetch.d.ts
|
|
7
7
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
8
|
-
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean
|
|
8
|
+
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean): DataStrategyFunction;
|
|
9
9
|
declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
|
|
10
10
|
done: Promise<void>;
|
|
11
11
|
value: unknown;
|