@tanstack/router-core 1.121.2 → 1.121.14
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/dist/cjs/index.d.cts +1 -1
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +6 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/router.d.ts +6 -5
- package/dist/esm/router.js +1 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/router.ts +7 -2
package/dist/cjs/router.d.cts
CHANGED
|
@@ -602,14 +602,15 @@ interface RouteLike {
|
|
|
602
602
|
caseSensitive?: boolean;
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
export
|
|
606
|
-
routeTree: TRouteLike;
|
|
607
|
-
initRoute?: (route: TRouteLike, index: number) => void;
|
|
608
|
-
}): {
|
|
605
|
+
export type ProcessRouteTreeResult<TRouteLike extends RouteLike> = {
|
|
609
606
|
routesById: Record<string, TRouteLike>;
|
|
610
607
|
routesByPath: Record<string, TRouteLike>;
|
|
611
|
-
flatRoutes: TRouteLike
|
|
608
|
+
flatRoutes: Array<TRouteLike>;
|
|
612
609
|
};
|
|
610
|
+
export declare function processRouteTree<TRouteLike extends RouteLike>({ routeTree, initRoute, }: {
|
|
611
|
+
routeTree: TRouteLike;
|
|
612
|
+
initRoute?: (route: TRouteLike, index: number) => void;
|
|
613
|
+
}): ProcessRouteTreeResult<TRouteLike>;
|
|
613
614
|
export declare function getMatchedRoutes<TRouteLike extends RouteLike>({ pathname, routePathname, basepath, caseSensitive, routesByPath, routesById, flatRoutes, }: {
|
|
614
615
|
pathname: string;
|
|
615
616
|
routePathname?: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type { RootRouteId } from './root.js';
|
|
|
17
17
|
export { BaseRoute, BaseRouteApi, BaseRootRoute } from './route.js';
|
|
18
18
|
export type { AnyPathParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, SearchFilter, SearchMiddlewareContext, SearchMiddleware, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, InferAllParams, InferAllContext, MetaDescriptor, RouteLinkEntry, SearchValidator, AnySearchValidator, DefaultSearchValidator, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, ResolveParams, ParseParamsFn, StringifyParamsFn, ParamsOptions, UpdatableStaticRouteOption, ContextReturnType, ContextAsyncReturnType, ResolveRouteContext, ResolveLoaderData, RoutePrefix, TrimPath, TrimPathLeft, TrimPathRight, ResolveSearchSchemaFnInput, ResolveSearchSchemaInput, ResolveSearchSchemaFn, ResolveSearchSchema, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllContext, BeforeLoadContextParameter, RouteContextParameter, ResolveAllParamsFromParent, AnyRoute, Route, RouteTypes, FullSearchSchemaOption, RemountDepsOptions, MakeRemountDepsOptionsUnion, ResolveFullPath, AnyRouteWithContext, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, RouteContextFn, BeforeLoadFn, ContextOptions, RouteContextOptions, BeforeLoadContextOptions, RootRouteOptions, UpdatableRouteOptionsExtensions, RouteConstraints, RouteTypesById, RouteMask, RouteExtensions, RouteLazyFn, RouteAddChildrenFn, RouteAddFileChildrenFn, RouteAddFileTypesFn, ResolveOptionalParams, ResolveRequiredParams, RootRoute, } from './route.js';
|
|
19
19
|
export { defaultSerializeError, getLocationChangeInfo, RouterCore, componentTypes, lazyFn, SearchParamError, PathParamError, getInitialRouterState, processRouteTree, getMatchedRoutes, } from './router.js';
|
|
20
|
-
export type { ViewTransitionOptions, ExtractedBaseEntry, ExtractedStream, ExtractedPromise, ExtractedEntry, StreamState, TrailingSlashOption, Register, AnyRouter, AnyRouterWithContext, RegisteredRouter, RouterState, BuildNextOptions, RouterListener, RouterEvent, ListenerFn, RouterEvents, MatchRoutesOpts, RouterOptionsExtensions, DefaultRemountDepsFn, PreloadRouteFn, MatchRouteFn, RouterContextOptions, RouterOptions, RouterConstructorOptions, UpdateFn, ParseLocationFn, InvalidateFn, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, EmitFn, LoadFn, GetMatchFn, SubscribeFn, UpdateMatchFn, CommitLocationFn, GetMatchRoutesFn, MatchRoutesFn, StartTransitionFn, LoadRouteChunkFn, ServerSrr, ClearCacheFn, CreateRouterFn, } from './router.js';
|
|
20
|
+
export type { ViewTransitionOptions, ExtractedBaseEntry, ExtractedStream, ExtractedPromise, ExtractedEntry, StreamState, TrailingSlashOption, Register, AnyRouter, AnyRouterWithContext, RegisteredRouter, RouterState, BuildNextOptions, RouterListener, RouterEvent, ListenerFn, RouterEvents, MatchRoutesOpts, RouterOptionsExtensions, DefaultRemountDepsFn, PreloadRouteFn, MatchRouteFn, RouterContextOptions, RouterOptions, RouterConstructorOptions, UpdateFn, ParseLocationFn, InvalidateFn, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, EmitFn, LoadFn, GetMatchFn, SubscribeFn, UpdateMatchFn, CommitLocationFn, GetMatchRoutesFn, MatchRoutesFn, StartTransitionFn, LoadRouteChunkFn, ServerSrr, ClearCacheFn, CreateRouterFn, ProcessRouteTreeResult, } from './router.js';
|
|
21
21
|
export type { MatchLocation, CommitLocationOptions, NavigateFn, BuildLocationFn, } from './RouterProvider.js';
|
|
22
22
|
export { retainSearchParams, stripSearchParams } from './searchMiddleware.js';
|
|
23
23
|
export { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, } from './searchParams.js';
|
package/dist/esm/router.d.ts
CHANGED
|
@@ -602,14 +602,15 @@ interface RouteLike {
|
|
|
602
602
|
caseSensitive?: boolean;
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
export
|
|
606
|
-
routeTree: TRouteLike;
|
|
607
|
-
initRoute?: (route: TRouteLike, index: number) => void;
|
|
608
|
-
}): {
|
|
605
|
+
export type ProcessRouteTreeResult<TRouteLike extends RouteLike> = {
|
|
609
606
|
routesById: Record<string, TRouteLike>;
|
|
610
607
|
routesByPath: Record<string, TRouteLike>;
|
|
611
|
-
flatRoutes: TRouteLike
|
|
608
|
+
flatRoutes: Array<TRouteLike>;
|
|
612
609
|
};
|
|
610
|
+
export declare function processRouteTree<TRouteLike extends RouteLike>({ routeTree, initRoute, }: {
|
|
611
|
+
routeTree: TRouteLike;
|
|
612
|
+
initRoute?: (route: TRouteLike, index: number) => void;
|
|
613
|
+
}): ProcessRouteTreeResult<TRouteLike>;
|
|
613
614
|
export declare function getMatchedRoutes<TRouteLike extends RouteLike>({ pathname, routePathname, basepath, caseSensitive, routesByPath, routesById, flatRoutes, }: {
|
|
614
615
|
pathname: string;
|
|
615
616
|
routePathname?: string;
|
package/dist/esm/router.js
CHANGED
|
@@ -778,7 +778,7 @@ class RouterCore {
|
|
|
778
778
|
}, pendingMs);
|
|
779
779
|
}
|
|
780
780
|
await existingMatch.beforeLoadPromise;
|
|
781
|
-
executeBeforeLoad = this.getMatch(matchId).status
|
|
781
|
+
executeBeforeLoad = this.getMatch(matchId).status === "error";
|
|
782
782
|
}
|
|
783
783
|
if (executeBeforeLoad) {
|
|
784
784
|
try {
|