react-router 7.13.0 → 7.13.1-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.
- package/CHANGELOG.md +70 -20
- package/dist/development/{browser-BEPxnEBW.d.mts → browser-DzsJABDQ.d.mts} +3 -2
- package/dist/{production/browser-BEPxnEBW.d.mts → development/browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/{production/chunk-GSFLVUYQ.mjs → development/chunk-BPFEYQ6M.mjs} +13 -4
- package/dist/{production/chunk-NGWWS4QJ.js → development/chunk-CGPAOPIJ.js} +7 -7
- package/dist/development/{chunk-WICQJKU6.js → chunk-LF5SS6XE.js} +203 -128
- package/dist/development/{chunk-HMDR2CVH.js → chunk-TC44ITIJ.js} +124 -107
- package/dist/development/{chunk-JZWAC4HX.mjs → chunk-WQZSGSJA.mjs} +153 -63
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +34 -27
- package/dist/development/dom-export.mjs +10 -3
- package/dist/development/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/development/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +12 -1
- package/dist/development/index-react-server.d.ts +12 -1
- package/dist/development/index-react-server.js +80 -44
- package/dist/development/index-react-server.mjs +80 -45
- package/dist/development/index.d.mts +11 -10
- package/dist/development/index.d.ts +11 -10
- package/dist/development/index.js +94 -85
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-DvHY1sgY.d.ts → development/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/development/lib/types/internal.d.mts +4 -4
- package/dist/development/lib/types/internal.d.ts +4 -4
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/development/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{production/router-5iOvts3c.d.mts → development/router-cLsU7kHk.d.mts} +14 -2
- package/dist/{development/browser-CJ9_du-U.d.ts → production/browser-DzsJABDQ.d.mts} +3 -2
- package/dist/production/{browser-CJ9_du-U.d.ts → browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/production/{chunk-Y3R63HEB.mjs → chunk-2K4LVAAG.mjs} +153 -63
- package/dist/{development/chunk-7PAHGFS4.js → production/chunk-I63A6YSE.js} +7 -7
- package/dist/{development/chunk-4LKRSAEJ.mjs → production/chunk-ROHSFSEU.mjs} +13 -4
- package/dist/production/{chunk-QSNCZFX5.js → chunk-XCKC4VBJ.js} +203 -128
- package/dist/production/{chunk-N2HZAAIG.js → chunk-ZXYVKLN7.js} +124 -107
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +34 -27
- package/dist/production/dom-export.mjs +10 -3
- package/dist/production/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/production/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +12 -1
- package/dist/production/index-react-server.d.ts +12 -1
- package/dist/production/index-react-server.js +80 -44
- package/dist/production/index-react-server.mjs +80 -45
- package/dist/production/index.d.mts +11 -10
- package/dist/production/index.d.ts +11 -10
- package/dist/production/index.js +94 -85
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/production/lib/types/internal.d.mts +4 -4
- package/dist/production/lib/types/internal.d.ts +4 -4
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/production/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{development/router-5iOvts3c.d.mts → production/router-cLsU7kHk.d.mts} +14 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkCGPAOPIJjs = require('./chunk-CGPAOPIJ.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ var _chunk7PAHGFS4js = require('./chunk-7PAHGFS4.js');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkLF5SS6XEjs = require('./chunk-LF5SS6XE.js');
|
|
36
36
|
|
|
37
37
|
// lib/dom-export/dom-router-provider.tsx
|
|
38
38
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -149,6 +149,12 @@ function createHydratedRouter({
|
|
|
149
149
|
hydrationData.errors = _reactrouter.UNSAFE_deserializeErrors.call(void 0, hydrationData.errors);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
if (window.history.state && window.history.state.masked) {
|
|
153
|
+
window.history.replaceState(
|
|
154
|
+
{ ...window.history.state, masked: void 0 },
|
|
155
|
+
""
|
|
156
|
+
);
|
|
157
|
+
}
|
|
152
158
|
let router2 = _reactrouter.UNSAFE_createRouter.call(void 0, {
|
|
153
159
|
routes,
|
|
154
160
|
history: _reactrouter.UNSAFE_createBrowserHistory.call(void 0, ),
|
|
@@ -170,6 +176,7 @@ function createHydratedRouter({
|
|
|
170
176
|
ssrInfo.context.future.unstable_trailingSlashAwareDataRequests
|
|
171
177
|
),
|
|
172
178
|
patchRoutesOnNavigation: _reactrouter.UNSAFE_getPatchRoutesOnNavigationFunction.call(void 0,
|
|
179
|
+
() => router2,
|
|
173
180
|
ssrInfo.manifest,
|
|
174
181
|
ssrInfo.routeModules,
|
|
175
182
|
ssrInfo.context.ssr,
|
|
@@ -205,7 +212,7 @@ function HydratedRouter(props) {
|
|
|
205
212
|
}, []);
|
|
206
213
|
React2.useEffect(() => {
|
|
207
214
|
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
|
208
|
-
document.querySelectorAll(`[${
|
|
215
|
+
document.querySelectorAll(`[${_chunkLF5SS6XEjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
|
209
216
|
}
|
|
210
217
|
}, [criticalCss]);
|
|
211
218
|
let [location2, setLocation] = React2.useState(router.state.location);
|
|
@@ -377,10 +384,10 @@ function createRouterFromPayload({
|
|
|
377
384
|
};
|
|
378
385
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
379
386
|
globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
|
|
380
|
-
|
|
387
|
+
_chunkCGPAOPIJjs.populateRSCRouteModules.call(void 0, globalVar.__reactRouterRouteModules, payload.matches);
|
|
381
388
|
let patches = /* @__PURE__ */ new Map();
|
|
382
389
|
_optionalChain([payload, 'access', _22 => _22.patches, 'optionalAccess', _23 => _23.forEach, 'call', _24 => _24((patch) => {
|
|
383
|
-
|
|
390
|
+
_chunkLF5SS6XEjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
384
391
|
if (!patches.has(patch.parentId)) {
|
|
385
392
|
patches.set(patch.parentId, []);
|
|
386
393
|
}
|
|
@@ -402,12 +409,12 @@ function createRouterFromPayload({
|
|
|
402
409
|
}
|
|
403
410
|
return [route];
|
|
404
411
|
}, []);
|
|
405
|
-
globalVar.__reactRouterDataRouter =
|
|
412
|
+
globalVar.__reactRouterDataRouter = _chunkLF5SS6XEjs.createRouter.call(void 0, {
|
|
406
413
|
routes,
|
|
407
414
|
getContext,
|
|
408
415
|
basename: payload.basename,
|
|
409
|
-
history:
|
|
410
|
-
hydrationData:
|
|
416
|
+
history: _chunkLF5SS6XEjs.createBrowserHistory.call(void 0, ),
|
|
417
|
+
hydrationData: _chunkCGPAOPIJjs.getHydrationData.call(void 0, {
|
|
411
418
|
state: {
|
|
412
419
|
loaderData: payload.loaderData,
|
|
413
420
|
actionData: payload.actionData,
|
|
@@ -416,7 +423,7 @@ function createRouterFromPayload({
|
|
|
416
423
|
routes,
|
|
417
424
|
getRouteInfo: (routeId) => {
|
|
418
425
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
419
|
-
|
|
426
|
+
_chunkLF5SS6XEjs.invariant.call(void 0, match, "Route not found in payload");
|
|
420
427
|
return {
|
|
421
428
|
clientLoader: match.clientLoader,
|
|
422
429
|
hasLoader: match.hasLoader,
|
|
@@ -514,9 +521,9 @@ function createRouterFromPayload({
|
|
|
514
521
|
routeModules: globalVar.__reactRouterRouteModules
|
|
515
522
|
};
|
|
516
523
|
}
|
|
517
|
-
var renderedRoutesContext =
|
|
524
|
+
var renderedRoutesContext = _chunkLF5SS6XEjs.createContext.call(void 0, );
|
|
518
525
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
519
|
-
let dataStrategy =
|
|
526
|
+
let dataStrategy = _chunkLF5SS6XEjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
520
527
|
getRouter,
|
|
521
528
|
(match) => {
|
|
522
529
|
let M = match;
|
|
@@ -574,20 +581,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
574
581
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
575
582
|
return async (args, basename, trailingSlashAware, targetRoutes) => {
|
|
576
583
|
let { request, context } = args;
|
|
577
|
-
let url =
|
|
584
|
+
let url = _chunkLF5SS6XEjs.singleFetchUrl.call(void 0, request.url, basename, trailingSlashAware, "rsc");
|
|
578
585
|
if (request.method === "GET") {
|
|
579
|
-
url =
|
|
586
|
+
url = _chunkLF5SS6XEjs.stripIndexParam.call(void 0, url);
|
|
580
587
|
if (targetRoutes) {
|
|
581
588
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
582
589
|
}
|
|
583
590
|
}
|
|
584
591
|
let res = await fetchImplementation(
|
|
585
|
-
new Request(url, await
|
|
592
|
+
new Request(url, await _chunkLF5SS6XEjs.createRequestInit.call(void 0, request))
|
|
586
593
|
);
|
|
587
594
|
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
588
|
-
throw new (0,
|
|
595
|
+
throw new (0, _chunkLF5SS6XEjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
589
596
|
}
|
|
590
|
-
|
|
597
|
+
_chunkLF5SS6XEjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
591
598
|
try {
|
|
592
599
|
const payload = await createFromReadableStream(res.body, {
|
|
593
600
|
temporaryReferences: void 0
|
|
@@ -611,7 +618,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
611
618
|
}
|
|
612
619
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
613
620
|
let results = { routes: {} };
|
|
614
|
-
const dataKey =
|
|
621
|
+
const dataKey = _chunkLF5SS6XEjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
615
622
|
for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
|
|
616
623
|
results.routes[routeId] = { data };
|
|
617
624
|
}
|
|
@@ -644,7 +651,7 @@ function RSCHydratedRouter({
|
|
|
644
651
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
645
652
|
);
|
|
646
653
|
React3.useEffect(() => {
|
|
647
|
-
|
|
654
|
+
_chunkLF5SS6XEjs.setIsHydrated.call(void 0, );
|
|
648
655
|
}, []);
|
|
649
656
|
React3.useLayoutEffect(() => {
|
|
650
657
|
const globalVar = window;
|
|
@@ -748,8 +755,8 @@ function RSCHydratedRouter({
|
|
|
748
755
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
749
756
|
routeModules
|
|
750
757
|
};
|
|
751
|
-
return /* @__PURE__ */ React3.createElement(
|
|
752
|
-
|
|
758
|
+
return /* @__PURE__ */ React3.createElement(_chunkLF5SS6XEjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkCGPAOPIJjs.RSCRouterGlobalErrorBoundary, { location: state.location }, /* @__PURE__ */ React3.createElement(_chunkLF5SS6XEjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
759
|
+
_chunkLF5SS6XEjs.RouterProvider,
|
|
753
760
|
{
|
|
754
761
|
router: transitionEnabledRouter,
|
|
755
762
|
flushSync: ReactDOM2.flushSync
|
|
@@ -765,8 +772,8 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
765
772
|
// the server loader flow regardless of whether the client loader calls
|
|
766
773
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
767
774
|
match.hasComponent && !match.element;
|
|
768
|
-
|
|
769
|
-
|
|
775
|
+
_chunkLF5SS6XEjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
776
|
+
_chunkCGPAOPIJjs.populateRSCRouteModules.call(void 0, window.__reactRouterRouteModules, match);
|
|
770
777
|
let dataRoute = {
|
|
771
778
|
id: match.id,
|
|
772
779
|
element: match.element,
|
|
@@ -816,7 +823,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
816
823
|
return await callSingleFetch(singleFetch);
|
|
817
824
|
}
|
|
818
825
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
819
|
-
throw
|
|
826
|
+
throw _chunkLF5SS6XEjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
820
827
|
},
|
|
821
828
|
path: match.path,
|
|
822
829
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -829,7 +836,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
829
836
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
830
837
|
};
|
|
831
838
|
if (typeof dataRoute.loader === "function") {
|
|
832
|
-
dataRoute.loader.hydrate =
|
|
839
|
+
dataRoute.loader.hydrate = _chunkLF5SS6XEjs.shouldHydrateRouteLoader.call(void 0,
|
|
833
840
|
match.id,
|
|
834
841
|
match.clientLoader,
|
|
835
842
|
match.hasLoader,
|
|
@@ -839,7 +846,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
839
846
|
return dataRoute;
|
|
840
847
|
}
|
|
841
848
|
function callSingleFetch(singleFetch) {
|
|
842
|
-
|
|
849
|
+
_chunkLF5SS6XEjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
843
850
|
return singleFetch();
|
|
844
851
|
}
|
|
845
852
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -847,7 +854,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
847
854
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
848
855
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
849
856
|
console.error(msg);
|
|
850
|
-
throw new (0,
|
|
857
|
+
throw new (0, _chunkLF5SS6XEjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
851
858
|
}
|
|
852
859
|
}
|
|
853
860
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
deserializeErrors,
|
|
15
15
|
getHydrationData,
|
|
16
16
|
populateRSCRouteModules
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BPFEYQ6M.mjs";
|
|
18
18
|
import {
|
|
19
19
|
CRITICAL_CSS_DATA_ATTRIBUTE,
|
|
20
20
|
ErrorResponseImpl,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
singleFetchUrl,
|
|
43
43
|
stripIndexParam,
|
|
44
44
|
useFogOFWarDiscovery
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WQZSGSJA.mjs";
|
|
46
46
|
|
|
47
47
|
// lib/dom-export/dom-router-provider.tsx
|
|
48
48
|
import * as React from "react";
|
|
@@ -141,6 +141,12 @@ function createHydratedRouter({
|
|
|
141
141
|
hydrationData.errors = deserializeErrors(hydrationData.errors);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
if (window.history.state && window.history.state.masked) {
|
|
145
|
+
window.history.replaceState(
|
|
146
|
+
{ ...window.history.state, masked: void 0 },
|
|
147
|
+
""
|
|
148
|
+
);
|
|
149
|
+
}
|
|
144
150
|
let router2 = createRouter({
|
|
145
151
|
routes,
|
|
146
152
|
history: createBrowserHistory(),
|
|
@@ -162,6 +168,7 @@ function createHydratedRouter({
|
|
|
162
168
|
ssrInfo.context.future.unstable_trailingSlashAwareDataRequests
|
|
163
169
|
),
|
|
164
170
|
patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
|
|
171
|
+
() => router2,
|
|
165
172
|
ssrInfo.manifest,
|
|
166
173
|
ssrInfo.routeModules,
|
|
167
174
|
ssrInfo.context.ssr,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bG as RouteManifest, o as RouteModules, Q as HydrationState, a1 as DataRouteObject, a as ClientLoaderFunction, a5 as StaticHandlerContext, bH as ServerRouteModule, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, al as LoaderFunctionArgs, ac as ActionFunctionArgs, au as unstable_ServerInstrumentation, aj as HTMLFormMethod, ah as FormEncType, w as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a4 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, p as DataStrategyFunction, a0 as PatchRoutesOnNavigationFunction, s as NavigateOptions, a6 as Fetcher, K as RouteObject, n as Router, v as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a2 as StaticHandler } from './instrumentation
|
|
1
|
+
import { bG as RouteManifest, o as RouteModules, Q as HydrationState, a1 as DataRouteObject, a as ClientLoaderFunction, a5 as StaticHandlerContext, bH as ServerRouteModule, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, al as LoaderFunctionArgs, ac as ActionFunctionArgs, au as unstable_ServerInstrumentation, aj as HTMLFormMethod, ah as FormEncType, w as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a4 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, p as DataStrategyFunction, a0 as PatchRoutesOnNavigationFunction, s as NavigateOptions, a6 as Fetcher, K as RouteObject, n as Router, v as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a2 as StaticHandler } from './instrumentation--6Pioq_G.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
interface Route {
|
|
@@ -1304,6 +1304,54 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1304
1304
|
* standard revalidation behavior.
|
|
1305
1305
|
*/
|
|
1306
1306
|
unstable_defaultShouldRevalidate?: boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* Masked path for for this navigation, when you want to navigate the router to
|
|
1309
|
+
* one location but display a separate location in the URL bar.
|
|
1310
|
+
*
|
|
1311
|
+
* This is useful for contextual navigations such as opening an image in a modal
|
|
1312
|
+
* on top of a gallery while keeping the underlying gallery active. If a user
|
|
1313
|
+
* shares the masked URL, or opens the link in a new tab, they will only load
|
|
1314
|
+
* the masked location without the underlying contextual location.
|
|
1315
|
+
*
|
|
1316
|
+
* This feature relies on `history.state` and is thus only intended for SPA uses
|
|
1317
|
+
* and SSR renders will not respect the masking.
|
|
1318
|
+
*
|
|
1319
|
+
* ```tsx
|
|
1320
|
+
* // routes/gallery.tsx
|
|
1321
|
+
* export function clientLoader({ request }: Route.LoaderArgs) {
|
|
1322
|
+
* let sp = new URL(request.url).searchParams;
|
|
1323
|
+
* return {
|
|
1324
|
+
* images: getImages(),
|
|
1325
|
+
* modalImage: sp.has("image") ? getImage(sp.get("image")!) : null,
|
|
1326
|
+
* };
|
|
1327
|
+
* }
|
|
1328
|
+
*
|
|
1329
|
+
* export default function Gallery({ loaderData }: Route.ComponentProps) {
|
|
1330
|
+
* return (
|
|
1331
|
+
* <>
|
|
1332
|
+
* <GalleryGrid>
|
|
1333
|
+
* {loaderData.images.map((image) => (
|
|
1334
|
+
* <Link
|
|
1335
|
+
* key={image.id}
|
|
1336
|
+
* to={`/gallery?image=${image.id}`}
|
|
1337
|
+
* unstable_mask={`/images/${image.id}`}
|
|
1338
|
+
* >
|
|
1339
|
+
* <img src={image.url} alt={image.alt} />
|
|
1340
|
+
* </Link>
|
|
1341
|
+
* ))}
|
|
1342
|
+
* </GalleryGrid>
|
|
1343
|
+
*
|
|
1344
|
+
* {data.modalImage ? (
|
|
1345
|
+
* <dialog open>
|
|
1346
|
+
* <img src={data.modalImage.url} alt={data.modalImage.alt} />
|
|
1347
|
+
* </dialog>
|
|
1348
|
+
* ) : null}
|
|
1349
|
+
* </>
|
|
1350
|
+
* );
|
|
1351
|
+
* }
|
|
1352
|
+
* ```
|
|
1353
|
+
*/
|
|
1354
|
+
unstable_mask?: To;
|
|
1307
1355
|
}
|
|
1308
1356
|
/**
|
|
1309
1357
|
* A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
|
|
@@ -1334,6 +1382,7 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1334
1382
|
* @param {LinkProps.to} props.to n/a
|
|
1335
1383
|
* @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
|
|
1336
1384
|
* @param {LinkProps.unstable_defaultShouldRevalidate} props.unstable_defaultShouldRevalidate n/a
|
|
1385
|
+
* @param {LinkProps.unstable_mask} props.unstable_mask [modes: framework, data] n/a
|
|
1337
1386
|
*/
|
|
1338
1387
|
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
1339
1388
|
/**
|
|
@@ -1775,14 +1824,17 @@ declare namespace ScrollRestoration {
|
|
|
1775
1824
|
* {@link useViewTransitionState}. Defaults to `false`.
|
|
1776
1825
|
* @param options.unstable_defaultShouldRevalidate Specify the default revalidation
|
|
1777
1826
|
* behavior for the navigation. Defaults to `true`.
|
|
1827
|
+
* @param options.unstable_mask Masked location to display in the browser instead
|
|
1828
|
+
* of the router location. Defaults to `undefined`.
|
|
1778
1829
|
* @param options.unstable_useTransitions Wraps the navigation in
|
|
1779
1830
|
* [`React.startTransition`](https://react.dev/reference/react/startTransition)
|
|
1780
1831
|
* for concurrent rendering. Defaults to `false`.
|
|
1781
1832
|
* @returns A click handler function that can be used in a custom {@link Link} component.
|
|
1782
1833
|
*/
|
|
1783
|
-
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
|
|
1834
|
+
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, unstable_mask, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
|
|
1784
1835
|
target?: React.HTMLAttributeAnchorTarget;
|
|
1785
1836
|
replace?: boolean;
|
|
1837
|
+
unstable_mask?: To;
|
|
1786
1838
|
state?: any;
|
|
1787
1839
|
preventScrollReset?: boolean;
|
|
1788
1840
|
relative?: RelativeRoutingType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bG as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bH as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-
|
|
1
|
+
import { bG as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bH as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-cLsU7kHk.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
interface Route {
|
|
@@ -1304,6 +1304,54 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1304
1304
|
* standard revalidation behavior.
|
|
1305
1305
|
*/
|
|
1306
1306
|
unstable_defaultShouldRevalidate?: boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* Masked path for for this navigation, when you want to navigate the router to
|
|
1309
|
+
* one location but display a separate location in the URL bar.
|
|
1310
|
+
*
|
|
1311
|
+
* This is useful for contextual navigations such as opening an image in a modal
|
|
1312
|
+
* on top of a gallery while keeping the underlying gallery active. If a user
|
|
1313
|
+
* shares the masked URL, or opens the link in a new tab, they will only load
|
|
1314
|
+
* the masked location without the underlying contextual location.
|
|
1315
|
+
*
|
|
1316
|
+
* This feature relies on `history.state` and is thus only intended for SPA uses
|
|
1317
|
+
* and SSR renders will not respect the masking.
|
|
1318
|
+
*
|
|
1319
|
+
* ```tsx
|
|
1320
|
+
* // routes/gallery.tsx
|
|
1321
|
+
* export function clientLoader({ request }: Route.LoaderArgs) {
|
|
1322
|
+
* let sp = new URL(request.url).searchParams;
|
|
1323
|
+
* return {
|
|
1324
|
+
* images: getImages(),
|
|
1325
|
+
* modalImage: sp.has("image") ? getImage(sp.get("image")!) : null,
|
|
1326
|
+
* };
|
|
1327
|
+
* }
|
|
1328
|
+
*
|
|
1329
|
+
* export default function Gallery({ loaderData }: Route.ComponentProps) {
|
|
1330
|
+
* return (
|
|
1331
|
+
* <>
|
|
1332
|
+
* <GalleryGrid>
|
|
1333
|
+
* {loaderData.images.map((image) => (
|
|
1334
|
+
* <Link
|
|
1335
|
+
* key={image.id}
|
|
1336
|
+
* to={`/gallery?image=${image.id}`}
|
|
1337
|
+
* unstable_mask={`/images/${image.id}`}
|
|
1338
|
+
* >
|
|
1339
|
+
* <img src={image.url} alt={image.alt} />
|
|
1340
|
+
* </Link>
|
|
1341
|
+
* ))}
|
|
1342
|
+
* </GalleryGrid>
|
|
1343
|
+
*
|
|
1344
|
+
* {data.modalImage ? (
|
|
1345
|
+
* <dialog open>
|
|
1346
|
+
* <img src={data.modalImage.url} alt={data.modalImage.alt} />
|
|
1347
|
+
* </dialog>
|
|
1348
|
+
* ) : null}
|
|
1349
|
+
* </>
|
|
1350
|
+
* );
|
|
1351
|
+
* }
|
|
1352
|
+
* ```
|
|
1353
|
+
*/
|
|
1354
|
+
unstable_mask?: To;
|
|
1307
1355
|
}
|
|
1308
1356
|
/**
|
|
1309
1357
|
* A progressively enhanced [`<a href>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
|
|
@@ -1334,6 +1382,7 @@ interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
1334
1382
|
* @param {LinkProps.to} props.to n/a
|
|
1335
1383
|
* @param {LinkProps.viewTransition} props.viewTransition [modes: framework, data] n/a
|
|
1336
1384
|
* @param {LinkProps.unstable_defaultShouldRevalidate} props.unstable_defaultShouldRevalidate n/a
|
|
1385
|
+
* @param {LinkProps.unstable_mask} props.unstable_mask [modes: framework, data] n/a
|
|
1337
1386
|
*/
|
|
1338
1387
|
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
1339
1388
|
/**
|
|
@@ -1775,14 +1824,17 @@ declare namespace ScrollRestoration {
|
|
|
1775
1824
|
* {@link useViewTransitionState}. Defaults to `false`.
|
|
1776
1825
|
* @param options.unstable_defaultShouldRevalidate Specify the default revalidation
|
|
1777
1826
|
* behavior for the navigation. Defaults to `true`.
|
|
1827
|
+
* @param options.unstable_mask Masked location to display in the browser instead
|
|
1828
|
+
* of the router location. Defaults to `undefined`.
|
|
1778
1829
|
* @param options.unstable_useTransitions Wraps the navigation in
|
|
1779
1830
|
* [`React.startTransition`](https://react.dev/reference/react/startTransition)
|
|
1780
1831
|
* for concurrent rendering. Defaults to `false`.
|
|
1781
1832
|
* @returns A click handler function that can be used in a custom {@link Link} component.
|
|
1782
1833
|
*/
|
|
1783
|
-
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
|
|
1834
|
+
declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, unstable_mask, state, preventScrollReset, relative, viewTransition, unstable_defaultShouldRevalidate, unstable_useTransitions, }?: {
|
|
1784
1835
|
target?: React.HTMLAttributeAnchorTarget;
|
|
1785
1836
|
replace?: boolean;
|
|
1837
|
+
unstable_mask?: To;
|
|
1786
1838
|
state?: any;
|
|
1787
1839
|
preventScrollReset?: boolean;
|
|
1788
1840
|
relative?: RelativeRoutingType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './router-
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './router-cLsU7kHk.mjs';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-EzWJGpN_.mjs';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './instrumentation
|
|
2
|
-
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-
|
|
1
|
+
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './instrumentation--6Pioq_G.js';
|
|
2
|
+
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-C4tCIird.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkTC44ITIJjs = require('./chunk-TC44ITIJ.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ var _chunkHMDR2CVHjs = require('./chunk-HMDR2CVH.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkLF5SS6XEjs = require('./chunk-LF5SS6XE.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkWICQJKU6js = require('./chunk-WICQJKU6.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkTC44ITIJjs.BrowserRouter; exports.Form = _chunkTC44ITIJjs.Form; exports.HashRouter = _chunkTC44ITIJjs.HashRouter; exports.Link = _chunkTC44ITIJjs.Link; exports.Links = _chunkLF5SS6XEjs.Links; exports.MemoryRouter = _chunkLF5SS6XEjs.MemoryRouter; exports.Meta = _chunkLF5SS6XEjs.Meta; exports.NavLink = _chunkTC44ITIJjs.NavLink; exports.Navigate = _chunkLF5SS6XEjs.Navigate; exports.Outlet = _chunkLF5SS6XEjs.Outlet; exports.Route = _chunkLF5SS6XEjs.Route; exports.Router = _chunkLF5SS6XEjs.Router; exports.RouterProvider = _chunkLF5SS6XEjs.RouterProvider; exports.Routes = _chunkLF5SS6XEjs.Routes; exports.ScrollRestoration = _chunkTC44ITIJjs.ScrollRestoration; exports.StaticRouter = _chunkTC44ITIJjs.StaticRouter; exports.StaticRouterProvider = _chunkTC44ITIJjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkLF5SS6XEjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkLF5SS6XEjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkLF5SS6XEjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkLF5SS6XEjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkTC44ITIJjs.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
WithComponentProps,
|
|
33
33
|
WithErrorBoundaryProps,
|
|
34
34
|
WithHydrateFallbackProps
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WQZSGSJA.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -60,6 +60,11 @@ interface Location<State = any> extends Path {
|
|
|
60
60
|
* Note: This value is always "default" on the initial location.
|
|
61
61
|
*/
|
|
62
62
|
key: string;
|
|
63
|
+
/**
|
|
64
|
+
* The masked location displayed in the URL bar, which differs from the URL the
|
|
65
|
+
* router is operating on
|
|
66
|
+
*/
|
|
67
|
+
unstable_mask: Path | undefined;
|
|
63
68
|
}
|
|
64
69
|
/**
|
|
65
70
|
* A change to the current location.
|
|
@@ -1224,6 +1229,10 @@ interface RouterState {
|
|
|
1224
1229
|
* Tracks whether we've completed our initial data load
|
|
1225
1230
|
*/
|
|
1226
1231
|
initialized: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* Tracks whether we should be rendering a HydrateFallback during hydration
|
|
1234
|
+
*/
|
|
1235
|
+
renderFallback: boolean;
|
|
1227
1236
|
/**
|
|
1228
1237
|
* Current scroll position we should start at for a new view
|
|
1229
1238
|
* - number -> scroll position to restore to
|
|
@@ -1376,6 +1385,7 @@ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
|
1376
1385
|
state?: any;
|
|
1377
1386
|
fromRouteId?: string;
|
|
1378
1387
|
viewTransition?: boolean;
|
|
1388
|
+
unstable_mask?: To;
|
|
1379
1389
|
};
|
|
1380
1390
|
type BaseSubmissionOptions = {
|
|
1381
1391
|
formMethod?: HTMLFormMethod;
|
|
@@ -2097,6 +2107,7 @@ type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
|
|
|
2097
2107
|
*/
|
|
2098
2108
|
type RouteHandle = unknown;
|
|
2099
2109
|
|
|
2110
|
+
declare function getRequest(): Request;
|
|
2100
2111
|
declare const redirect: typeof redirect$1;
|
|
2101
2112
|
declare const redirectDocument: typeof redirectDocument$1;
|
|
2102
2113
|
declare const replace: typeof replace$1;
|
|
@@ -2550,4 +2561,4 @@ interface MemorySessionStorageOptions {
|
|
|
2550
2561
|
*/
|
|
2551
2562
|
declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({ cookie }?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
|
|
2552
2563
|
|
|
2553
|
-
export { Await, type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type MiddlewareFunction, type MiddlewareNextFunction, type RouterContext, RouterContextProvider, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, href, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, 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, matchRSCServerRequest as unstable_matchRSCServerRequest };
|
|
2564
|
+
export { Await, type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type MiddlewareFunction, type MiddlewareNextFunction, type RouterContext, RouterContextProvider, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, href, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, 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 };
|
|
@@ -60,6 +60,11 @@ interface Location<State = any> extends Path {
|
|
|
60
60
|
* Note: This value is always "default" on the initial location.
|
|
61
61
|
*/
|
|
62
62
|
key: string;
|
|
63
|
+
/**
|
|
64
|
+
* The masked location displayed in the URL bar, which differs from the URL the
|
|
65
|
+
* router is operating on
|
|
66
|
+
*/
|
|
67
|
+
unstable_mask: Path | undefined;
|
|
63
68
|
}
|
|
64
69
|
/**
|
|
65
70
|
* A change to the current location.
|
|
@@ -1224,6 +1229,10 @@ interface RouterState {
|
|
|
1224
1229
|
* Tracks whether we've completed our initial data load
|
|
1225
1230
|
*/
|
|
1226
1231
|
initialized: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* Tracks whether we should be rendering a HydrateFallback during hydration
|
|
1234
|
+
*/
|
|
1235
|
+
renderFallback: boolean;
|
|
1227
1236
|
/**
|
|
1228
1237
|
* Current scroll position we should start at for a new view
|
|
1229
1238
|
* - number -> scroll position to restore to
|
|
@@ -1376,6 +1385,7 @@ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
|
|
1376
1385
|
state?: any;
|
|
1377
1386
|
fromRouteId?: string;
|
|
1378
1387
|
viewTransition?: boolean;
|
|
1388
|
+
unstable_mask?: To;
|
|
1379
1389
|
};
|
|
1380
1390
|
type BaseSubmissionOptions = {
|
|
1381
1391
|
formMethod?: HTMLFormMethod;
|
|
@@ -2097,6 +2107,7 @@ type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
|
|
|
2097
2107
|
*/
|
|
2098
2108
|
type RouteHandle = unknown;
|
|
2099
2109
|
|
|
2110
|
+
declare function getRequest(): Request;
|
|
2100
2111
|
declare const redirect: typeof redirect$1;
|
|
2101
2112
|
declare const redirectDocument: typeof redirectDocument$1;
|
|
2102
2113
|
declare const replace: typeof replace$1;
|
|
@@ -2550,4 +2561,4 @@ interface MemorySessionStorageOptions {
|
|
|
2550
2561
|
*/
|
|
2551
2562
|
declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({ cookie }?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
|
|
2552
2563
|
|
|
2553
|
-
export { Await, type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type MiddlewareFunction, type MiddlewareNextFunction, type RouterContext, RouterContextProvider, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, href, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, 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, matchRSCServerRequest as unstable_matchRSCServerRequest };
|
|
2564
|
+
export { Await, type Cookie, type CookieOptions, type CookieSignatureOptions, type FlashSessionData, type IsCookieFunction, type IsSessionFunction, type MiddlewareFunction, type MiddlewareNextFunction, type RouterContext, RouterContextProvider, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, createContext, createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, href, isCookie, isRouteErrorResponse, isSession, matchRoutes, redirect, redirectDocument, replace, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, 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 };
|