@tanstack/router-core
Advanced tools
Comparing version 0.0.1-beta.151 to 0.0.1-beta.152
@@ -287,2 +287,3 @@ /** | ||
let matchedRoutes = [routeCursor]; | ||
// let includingLayouts = true | ||
while (routeCursor?.parentRoute) { | ||
@@ -289,0 +290,0 @@ routeCursor = routeCursor.parentRoute; |
@@ -946,2 +946,3 @@ /** | ||
let matchedRoutes = [routeCursor]; | ||
// let includingLayouts = true | ||
while (routeCursor?.parentRoute) { | ||
@@ -948,0 +949,0 @@ routeCursor = routeCursor.parentRoute; |
@@ -14,7 +14,7 @@ { | ||
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"uid": "526a-43" | ||
"uid": "60ee-43" | ||
}, | ||
{ | ||
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"uid": "526a-45" | ||
"uid": "60ee-45" | ||
} | ||
@@ -30,35 +30,35 @@ ] | ||
{ | ||
"uid": "526a-47", | ||
"uid": "60ee-47", | ||
"name": "history.ts" | ||
}, | ||
{ | ||
"uid": "526a-49", | ||
"uid": "60ee-49", | ||
"name": "utils.ts" | ||
}, | ||
{ | ||
"uid": "526a-51", | ||
"uid": "60ee-51", | ||
"name": "path.ts" | ||
}, | ||
{ | ||
"uid": "526a-53", | ||
"uid": "60ee-53", | ||
"name": "qss.ts" | ||
}, | ||
{ | ||
"uid": "526a-55", | ||
"uid": "60ee-55", | ||
"name": "route.ts" | ||
}, | ||
{ | ||
"uid": "526a-57", | ||
"uid": "60ee-57", | ||
"name": "fileRoute.ts" | ||
}, | ||
{ | ||
"uid": "526a-61", | ||
"uid": "60ee-61", | ||
"name": "searchParams.ts" | ||
}, | ||
{ | ||
"uid": "526a-63", | ||
"uid": "60ee-63", | ||
"name": "router.ts" | ||
}, | ||
{ | ||
"uid": "526a-65", | ||
"uid": "60ee-65", | ||
"name": "index.ts" | ||
@@ -70,3 +70,3 @@ } | ||
"name": "store/build/esm/index.js", | ||
"uid": "526a-59" | ||
"uid": "60ee-59" | ||
} | ||
@@ -81,80 +81,80 @@ ] | ||
"nodeParts": { | ||
"526a-43": { | ||
"60ee-43": { | ||
"renderedLength": 199, | ||
"gzipLength": 134, | ||
"brotliLength": 0, | ||
"mainUid": "526a-42" | ||
"mainUid": "60ee-42" | ||
}, | ||
"526a-45": { | ||
"60ee-45": { | ||
"renderedLength": 48, | ||
"gzipLength": 65, | ||
"brotliLength": 0, | ||
"mainUid": "526a-44" | ||
"mainUid": "60ee-44" | ||
}, | ||
"526a-47": { | ||
"60ee-47": { | ||
"renderedLength": 6426, | ||
"gzipLength": 1539, | ||
"brotliLength": 0, | ||
"mainUid": "526a-46" | ||
"mainUid": "60ee-46" | ||
}, | ||
"526a-49": { | ||
"60ee-49": { | ||
"renderedLength": 2821, | ||
"gzipLength": 990, | ||
"brotliLength": 0, | ||
"mainUid": "526a-48" | ||
"mainUid": "60ee-48" | ||
}, | ||
"526a-51": { | ||
"60ee-51": { | ||
"renderedLength": 6028, | ||
"gzipLength": 1423, | ||
"brotliLength": 0, | ||
"mainUid": "526a-50" | ||
"mainUid": "60ee-50" | ||
}, | ||
"526a-53": { | ||
"60ee-53": { | ||
"renderedLength": 1371, | ||
"gzipLength": 552, | ||
"brotliLength": 0, | ||
"mainUid": "526a-52" | ||
"mainUid": "60ee-52" | ||
}, | ||
"526a-55": { | ||
"60ee-55": { | ||
"renderedLength": 2292, | ||
"gzipLength": 807, | ||
"brotliLength": 0, | ||
"mainUid": "526a-54" | ||
"mainUid": "60ee-54" | ||
}, | ||
"526a-57": { | ||
"60ee-57": { | ||
"renderedLength": 223, | ||
"gzipLength": 143, | ||
"brotliLength": 0, | ||
"mainUid": "526a-56" | ||
"mainUid": "60ee-56" | ||
}, | ||
"526a-59": { | ||
"60ee-59": { | ||
"renderedLength": 1969, | ||
"gzipLength": 653, | ||
"brotliLength": 0, | ||
"mainUid": "526a-58" | ||
"mainUid": "60ee-58" | ||
}, | ||
"526a-61": { | ||
"60ee-61": { | ||
"renderedLength": 1387, | ||
"gzipLength": 483, | ||
"brotliLength": 0, | ||
"mainUid": "526a-60" | ||
"mainUid": "60ee-60" | ||
}, | ||
"526a-63": { | ||
"renderedLength": 38562, | ||
"gzipLength": 8597, | ||
"60ee-63": { | ||
"renderedLength": 38601, | ||
"gzipLength": 8613, | ||
"brotliLength": 0, | ||
"mainUid": "526a-62" | ||
"mainUid": "60ee-62" | ||
}, | ||
"526a-65": { | ||
"60ee-65": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "526a-64" | ||
"mainUid": "60ee-64" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"526a-42": { | ||
"60ee-42": { | ||
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"moduleParts": { | ||
"index.production.js": "526a-43" | ||
"index.production.js": "60ee-43" | ||
}, | ||
@@ -164,16 +164,16 @@ "imported": [], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-54" | ||
"uid": "60ee-54" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-44": { | ||
"60ee-44": { | ||
"id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"moduleParts": { | ||
"index.production.js": "526a-45" | ||
"index.production.js": "60ee-45" | ||
}, | ||
@@ -183,10 +183,10 @@ "imported": [], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
} | ||
] | ||
}, | ||
"526a-46": { | ||
"60ee-46": { | ||
"id": "/packages/router-core/src/history.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-47" | ||
"index.production.js": "60ee-47" | ||
}, | ||
@@ -196,13 +196,13 @@ "imported": [], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-48": { | ||
"60ee-48": { | ||
"id": "/packages/router-core/src/utils.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-49" | ||
"index.production.js": "60ee-49" | ||
}, | ||
@@ -212,20 +212,20 @@ "imported": [], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-50" | ||
"uid": "60ee-50" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-50": { | ||
"60ee-50": { | ||
"id": "/packages/router-core/src/path.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-51" | ||
"index.production.js": "60ee-51" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-48" | ||
"uid": "60ee-48" | ||
} | ||
@@ -235,16 +235,16 @@ ], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-54" | ||
"uid": "60ee-54" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-52": { | ||
"60ee-52": { | ||
"id": "/packages/router-core/src/qss.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-53" | ||
"index.production.js": "60ee-53" | ||
}, | ||
@@ -254,20 +254,20 @@ "imported": [], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-60" | ||
"uid": "60ee-60" | ||
} | ||
] | ||
}, | ||
"526a-54": { | ||
"60ee-54": { | ||
"id": "/packages/router-core/src/route.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-55" | ||
"index.production.js": "60ee-55" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-42" | ||
"uid": "60ee-42" | ||
}, | ||
{ | ||
"uid": "526a-50" | ||
"uid": "60ee-50" | ||
} | ||
@@ -277,17 +277,17 @@ ], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-56" | ||
"uid": "60ee-56" | ||
} | ||
] | ||
}, | ||
"526a-56": { | ||
"60ee-56": { | ||
"id": "/packages/router-core/src/fileRoute.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-57" | ||
"index.production.js": "60ee-57" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-54" | ||
"uid": "60ee-54" | ||
} | ||
@@ -297,10 +297,10 @@ ], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
} | ||
] | ||
}, | ||
"526a-58": { | ||
"60ee-58": { | ||
"id": "/packages/store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "526a-59" | ||
"index.production.js": "60ee-59" | ||
}, | ||
@@ -310,14 +310,14 @@ "imported": [], | ||
{ | ||
"uid": "526a-68" | ||
"uid": "60ee-68" | ||
} | ||
] | ||
}, | ||
"526a-60": { | ||
"60ee-60": { | ||
"id": "/packages/router-core/src/searchParams.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-61" | ||
"index.production.js": "60ee-61" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-52" | ||
"uid": "60ee-52" | ||
} | ||
@@ -327,32 +327,32 @@ ], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-62": { | ||
"60ee-62": { | ||
"id": "/packages/router-core/src/router.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-63" | ||
"index.production.js": "60ee-63" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-68" | ||
"uid": "60ee-68" | ||
}, | ||
{ | ||
"uid": "526a-42" | ||
"uid": "60ee-42" | ||
}, | ||
{ | ||
"uid": "526a-50" | ||
"uid": "60ee-50" | ||
}, | ||
{ | ||
"uid": "526a-60" | ||
"uid": "60ee-60" | ||
}, | ||
{ | ||
"uid": "526a-48" | ||
"uid": "60ee-48" | ||
}, | ||
{ | ||
"uid": "526a-46" | ||
"uid": "60ee-46" | ||
} | ||
@@ -362,47 +362,47 @@ ], | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
} | ||
] | ||
}, | ||
"526a-64": { | ||
"60ee-64": { | ||
"id": "/packages/router-core/src/index.ts", | ||
"moduleParts": { | ||
"index.production.js": "526a-65" | ||
"index.production.js": "60ee-65" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "526a-42" | ||
"uid": "60ee-42" | ||
}, | ||
{ | ||
"uid": "526a-44" | ||
"uid": "60ee-44" | ||
}, | ||
{ | ||
"uid": "526a-46" | ||
"uid": "60ee-46" | ||
}, | ||
{ | ||
"uid": "526a-66" | ||
"uid": "60ee-66" | ||
}, | ||
{ | ||
"uid": "526a-50" | ||
"uid": "60ee-50" | ||
}, | ||
{ | ||
"uid": "526a-52" | ||
"uid": "60ee-52" | ||
}, | ||
{ | ||
"uid": "526a-54" | ||
"uid": "60ee-54" | ||
}, | ||
{ | ||
"uid": "526a-56" | ||
"uid": "60ee-56" | ||
}, | ||
{ | ||
"uid": "526a-67" | ||
"uid": "60ee-67" | ||
}, | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
}, | ||
{ | ||
"uid": "526a-60" | ||
"uid": "60ee-60" | ||
}, | ||
{ | ||
"uid": "526a-48" | ||
"uid": "60ee-48" | ||
} | ||
@@ -413,3 +413,3 @@ ], | ||
}, | ||
"526a-66": { | ||
"60ee-66": { | ||
"id": "/packages/router-core/src/link.ts", | ||
@@ -420,7 +420,7 @@ "moduleParts": {}, | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
} | ||
] | ||
}, | ||
"526a-67": { | ||
"60ee-67": { | ||
"id": "/packages/router-core/src/routeInfo.ts", | ||
@@ -431,7 +431,7 @@ "moduleParts": {}, | ||
{ | ||
"uid": "526a-64" | ||
"uid": "60ee-64" | ||
} | ||
] | ||
}, | ||
"526a-68": { | ||
"60ee-68": { | ||
"id": "/packages/react-store/build/esm/index.js", | ||
@@ -441,6 +441,6 @@ "moduleParts": {}, | ||
{ | ||
"uid": "526a-69" | ||
"uid": "60ee-69" | ||
}, | ||
{ | ||
"uid": "526a-58" | ||
"uid": "60ee-58" | ||
} | ||
@@ -450,7 +450,7 @@ ], | ||
{ | ||
"uid": "526a-62" | ||
"uid": "60ee-62" | ||
} | ||
] | ||
}, | ||
"526a-69": { | ||
"60ee-69": { | ||
"id": "use-sync-external-store/shim/with-selector", | ||
@@ -461,3 +461,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "526a-68" | ||
"uid": "60ee-68" | ||
} | ||
@@ -464,0 +464,0 @@ ], |
@@ -99,2 +99,80 @@ /** | ||
interface AnyRoutesInfo { | ||
routeTree: AnyRoute; | ||
routeUnion: AnyRoute; | ||
routesById: Record<string, AnyRoute>; | ||
routesByFullPath: Record<string, AnyRoute>; | ||
routeIds: any; | ||
routePaths: any; | ||
routeIntersection: AnyRoute; | ||
fullSearchSchema: Record<string, any>; | ||
allParams: Record<string, any>; | ||
} | ||
interface DefaultRoutesInfo { | ||
routeTree: AnyRoute; | ||
routeUnion: AnyRoute; | ||
routesById: Record<string, Route>; | ||
routesByFullPath: Record<string, Route>; | ||
routeIds: string; | ||
routePaths: string; | ||
routeIntersection: AnyRoute; | ||
fullSearchSchema: AnySearchSchema; | ||
allParams: AnyPathParams; | ||
} | ||
interface RoutesInfo<TRouteTree extends AnyRoute = Route> extends RoutesInfoInner<TRouteTree, ParseRoute<TRouteTree>> { | ||
} | ||
interface RoutesInfoInner<TRouteTree extends AnyRoute, TRouteUnion extends AnyRoute = Route, TRoutesById = { | ||
'/': TRouteUnion; | ||
} & { | ||
[TRoute in TRouteUnion as TRoute['id']]: TRoute; | ||
}, TRoutesByFullPath = { | ||
'/': TRouteUnion; | ||
} & { | ||
[TRoute in TRouteUnion as TRoute['fullPath'] extends RootRouteId ? never : string extends TRoute['fullPath'] ? never : `${TRoute['fullPath']}/` extends keyof TRoutesById ? never : TRoute['fullPath'] extends `${infer Trimmed}/` ? Trimmed : TRoute['fullPath']]: TRoute; | ||
}> { | ||
routeTree: TRouteTree; | ||
routeUnion: TRouteUnion; | ||
routesById: TRoutesById; | ||
routesByFullPath: TRoutesByFullPath; | ||
routeIds: keyof TRoutesById; | ||
routePaths: keyof TRoutesByFullPath; | ||
routeIntersection: Route<TRouteUnion['__types']['parentRoute'], // TParentRoute, | ||
TRouteUnion['__types']['path'], // TPath, | ||
TRouteUnion['__types']['fullPath'], // TFullPath, | ||
TRouteUnion['__types']['customId'], // TCustomId, | ||
TRouteUnion['__types']['id'], // TId, | ||
TRouteUnion['__types']['loader'], // TId, | ||
// TId, | ||
MergeUnion<TRouteUnion['__types']['searchSchema']> & {}, // TSearchSchema, | ||
// TSearchSchema, | ||
MergeUnion<TRouteUnion['__types']['fullSearchSchema']> & {}, // TFullSearchSchema, | ||
MergeUnion<TRouteUnion['__types']['params']>, // TParams, | ||
MergeUnion<TRouteUnion['__types']['allParams']>, // TAllParams, | ||
MergeUnion<TRouteUnion['__types']['parentContext']>, // TParentContext, | ||
MergeUnion<TRouteUnion['__types']['allParentContext']>, // TAllParentContext, | ||
// TAllParentContext, | ||
MergeUnion<TRouteUnion['__types']['routeContext']> & {}, // TRouteContext, | ||
// TRouteContext, | ||
MergeUnion<TRouteUnion['__types']['context']> & {}, // TContext, | ||
// TContext, | ||
MergeUnion<TRouteUnion['__types']['routerContext']> & {}, // TRouterContext, | ||
TRouteUnion['__types']['children'], // TChildren, | ||
TRouteUnion['__types']['routesInfo']>; | ||
fullSearchSchema: Partial<MergeUnion<TRouteUnion['__types']['fullSearchSchema']>>; | ||
allParams: Partial<MergeUnion<TRouteUnion['__types']['allParams']>>; | ||
} | ||
type ParseRoute<TRouteTree> = TRouteTree extends AnyRoute ? TRouteTree | ParseRouteChildren<TRouteTree> : never; | ||
type ParseRouteChildren<TRouteTree> = TRouteTree extends Route<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, infer TChildren, any> ? unknown extends TChildren ? never : TChildren extends AnyRoute[] ? Values<{ | ||
[TId in TChildren[number]['id']]: ParseRouteChild<TChildren[number], TId>; | ||
}> : never : never; | ||
type ParseRouteChild<TRoute, TId> = TRoute extends AnyRoute ? ParseRoute<TRoute> : never; | ||
type RoutesById<TRoutesInfo extends AnyRoutesInfo> = { | ||
[K in keyof TRoutesInfo['routesById']]: TRoutesInfo['routesById'][K]; | ||
}; | ||
type RouteById<TRoutesInfo extends AnyRoutesInfo, TId> = TId extends keyof TRoutesInfo['routesById'] ? IsAny<TRoutesInfo['routesById'][TId]['id'], Route, TRoutesInfo['routesById'][TId]> : never; | ||
type RoutesByPath<TRoutesInfo extends AnyRoutesInfo> = { | ||
[K in keyof TRoutesInfo['routesByFullPath']]: TRoutesInfo['routesByFullPath'][K]; | ||
}; | ||
type RouteByPath<TRoutesInfo extends AnyRoutesInfo, TPath> = TPath extends keyof TRoutesInfo['routesByFullPath'] ? IsAny<TRoutesInfo['routesByFullPath'][TPath]['id'], Route, TRoutesInfo['routesByFullPath'][TPath]> : never; | ||
declare global { | ||
@@ -378,5 +456,6 @@ interface Window { | ||
}; | ||
type RouteOptions<TParentRoute extends AnyRoute = AnyRoute, TCustomId extends string = string, TPath extends string = string, TLoader = unknown, TParentSearchSchema extends AnySearchSchema = {}, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = TSearchSchema, TParentParams extends AnyPathParams = AnyPathParams, TParams extends AnyPathParams = Record<ParsePathParams<TPath>, string>, TAllParams extends AnyPathParams = TParams, TParentContext extends AnyContext = AnyContext, TAllParentContext extends IsAny<TParentRoute['__types']['allParams'], TParentContext, TParentRoute['__types']['allParams'] & TParentContext> = IsAny<TParentRoute['__types']['allParams'], TParentContext, TParentRoute['__types']['allParams'] & TParentContext>, TRouteContext extends RouteContext = RouteContext, TContext extends MergeParamsFromParent<TAllParentContext, TRouteContext> = MergeParamsFromParent<TAllParentContext, TRouteContext>> = BaseRouteOptions<TParentRoute, TCustomId, TPath, TLoader, TParentSearchSchema, TSearchSchema, TFullSearchSchema, TParentParams, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>; | ||
type RouteOptions<TParentRoute extends AnyRoute = AnyRoute, TCustomId extends string = string, TPath extends string = string, TLoader = unknown, TParentSearchSchema extends AnySearchSchema = {}, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = TSearchSchema, TParams extends AnyPathParams = AnyPathParams, TAllParams extends AnyPathParams = TParams, TParentContext extends AnyContext = AnyContext, TAllParentContext extends AnyContext = AnyContext, TRouteContext extends RouteContext = RouteContext, TContext extends AnyContext = AnyContext> = BaseRouteOptions<TParentRoute, TCustomId, TPath, TLoader, TParentSearchSchema, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>; | ||
type ParamsFallback<TPath extends string, TParams> = unknown extends TParams ? Record<ParsePathParams<TPath>, string> : TParams; | ||
type BaseRouteOptions<TParentRoute extends AnyRoute = AnyRoute, TCustomId extends string = string, TPath extends string = string, TLoader = unknown, TParentSearchSchema extends AnySearchSchema = {}, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = TSearchSchema, TParentParams extends AnyPathParams = AnyPathParams, TParams = unknown, TAllParams = ParamsFallback<TPath, TParams>, TParentContext extends AnyContext = AnyContext, TAllParentContext extends IsAny<TParentRoute['__types']['allParams'], TParentContext, TParentRoute['__types']['allParams'] & TParentContext> = IsAny<TParentRoute['__types']['allParams'], TParentContext, TParentRoute['__types']['allParams'] & TParentContext>, TRouteContext extends RouteContext = RouteContext, TContext extends MergeParamsFromParent<TAllParentContext, TRouteContext> = MergeParamsFromParent<TAllParentContext, TRouteContext>> = RoutePathOptions<TCustomId, TPath> & { | ||
type BaseRouteOptions<TParentRoute extends AnyRoute = AnyRoute, TCustomId extends string = string, TPath extends string = string, TLoader = unknown, TParentSearchSchema extends AnySearchSchema = {}, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = TSearchSchema, TParams = unknown, TAllParams = ParamsFallback<TPath, TParams>, TParentContext extends AnyContext = AnyContext, TAllParentContext extends AnyContext = AnyContext, TRouteContext extends RouteContext = RouteContext, TContext extends AnyContext = AnyContext> = RoutePathOptions<TCustomId, TPath> & { | ||
layoutLimit?: string; | ||
getParentRoute: () => TParentRoute; | ||
@@ -501,3 +580,21 @@ validateSearch?: SearchSchemaValidator<TSearchSchema, TParentSearchSchema>; | ||
}; | ||
declare class Route<TParentRoute extends AnyRoute = AnyRoute, TPath extends string = '/', TFullPath extends ResolveFullPath<TParentRoute, TPath> = ResolveFullPath<TParentRoute, TPath>, TCustomId extends string = string, TId extends ResolveId<TParentRoute, TCustomId, TPath> = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends Record<ParsePathParams<TPath>, any> = Record<ParsePathParams<TPath>, string>, TAllParams extends MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams> = MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams>, TParentContext extends TParentRoute['__types']['routeContext'] = TParentRoute['__types']['routeContext'], TAllParentContext extends TParentRoute['__types']['context'] = TParentRoute['__types']['context'], TRouteContext extends RouteContext = RouteContext, TContext extends MergeParamsFromParent<TParentRoute['__types']['context'], TRouteContext> = MergeParamsFromParent<TParentRoute['__types']['context'], TRouteContext>, TRouterContext extends AnyContext = AnyContext, TChildren extends unknown = unknown, TRoutesInfo extends DefaultRoutesInfo = DefaultRoutesInfo> { | ||
type RouteConstraints = { | ||
TParentRoute: AnyRoute; | ||
TPath: string; | ||
TFullPath: string; | ||
TCustomId: string; | ||
TId: string; | ||
TSearchSchema: AnySearchSchema; | ||
TFullSearchSchema: AnySearchSchema; | ||
TParams: Record<string, any>; | ||
TAllParams: Record<string, any>; | ||
TParentContext: AnyContext; | ||
TAllParentContext: AnyContext; | ||
TRouteContext: RouteContext; | ||
TContext: AnyContext; | ||
TRouterContext: AnyContext; | ||
TChildren: unknown; | ||
TRoutesInfo: DefaultRoutesInfo; | ||
}; | ||
declare class Route<TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, TPath extends RouteConstraints['TPath'] = '/', TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, TCustomId extends RouteConstraints['TCustomId'] = string, TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends RouteConstraints['TParams'] = Record<ParsePathParams<TPath>, string>, TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['__types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['__types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, TContext extends RouteConstraints['TContext'] = MergeParamsFromParent<TParentRoute['__types']['context'], TRouteContext>, TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, TChildren extends RouteConstraints['TChildren'] = unknown, TRoutesInfo extends RouteConstraints['TRoutesInfo'] = DefaultRoutesInfo> { | ||
__types: { | ||
@@ -524,3 +621,3 @@ parentRoute: TParentRoute; | ||
isRoot: TParentRoute extends Route<any> ? true : false; | ||
options: RouteOptions<TParentRoute, TCustomId, TPath, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParentRoute['__types']['allParams'], TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>; | ||
options: RouteOptions<TParentRoute, TCustomId, TPath, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>; | ||
parentRoute: TParentRoute; | ||
@@ -535,3 +632,3 @@ id: TId; | ||
rank: number; | ||
constructor(options: RouteOptions<TParentRoute, TCustomId, TPath, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParentRoute['__types']['allParams'], TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>); | ||
constructor(options: RouteOptions<TParentRoute, TCustomId, TPath, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext> & UpdatableRouteOptions<TLoader, TSearchSchema, TFullSearchSchema, TAllParams, TRouteContext, TContext>); | ||
init: (opts: { | ||
@@ -548,8 +645,8 @@ originalIndex: number; | ||
constructor(); | ||
createRootRoute: <TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TContext extends RouteContext = RouteContext>(options?: Omit<RouteOptions<AnyRoute, "__root__", "", {}, TSearchSchema, {}, {}, AnyPathParams, Record<never, string>, Record<never, string>, AnyContext, AnyContext, RouteContext, RouteContext>, "caseSensitive" | "path" | "getParentRoute" | "stringifyParams" | "parseParams" | "id"> | undefined) => RootRoute<TLoader, TSearchSchema, TContext, TRouterContext>; | ||
createRootRoute: <TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TContext extends RouteContext = RouteContext>(options?: Omit<RouteOptions<AnyRoute, "__root__", "", {}, TSearchSchema, {}, {}, AnyPathParams, AnyPathParams, AnyContext, AnyContext, RouteContext, AnyContext>, "caseSensitive" | "path" | "getParentRoute" | "stringifyParams" | "parseParams" | "id"> | undefined) => RootRoute<TLoader, TSearchSchema, TContext, TRouterContext>; | ||
} | ||
declare class RootRoute<TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TContext extends RouteContext = RouteContext, TRouterContext extends {} = {}> extends Route<any, '/', '/', string, RootRouteId, TLoader, TSearchSchema, TSearchSchema, {}, {}, TRouterContext, TRouterContext, MergeParamsFromParent<TRouterContext, TContext>, MergeParamsFromParent<TRouterContext, TContext>, TRouterContext, any, any> { | ||
constructor(options?: Omit<RouteOptions<AnyRoute, RootRouteId, '', TLoader, TSearchSchema, {}, {}>, 'path' | 'id' | 'getParentRoute' | 'caseSensitive' | 'parseParams' | 'stringifyParams'>); | ||
constructor(options?: Omit<RouteOptions<AnyRoute, RootRouteId, '', TLoader, TSearchSchema, {}>, 'path' | 'id' | 'getParentRoute' | 'caseSensitive' | 'parseParams' | 'stringifyParams'>); | ||
} | ||
type ResolveFullPath<TParentRoute extends AnyRoute, TPath extends string, TPrefixed extends RoutePrefix<TParentRoute['fullPath'], TPath> = RoutePrefix<TParentRoute['fullPath'], TPath>> = TPrefixed extends RootRouteId ? '/' : TPrefixed; | ||
type ResolveFullPath<TParentRoute extends AnyRoute, TPath extends string, TPrefixed = RoutePrefix<TParentRoute['fullPath'], TPath>> = TPrefixed extends RootRouteId ? '/' : TPrefixed; | ||
type RoutePrefix<TPrefix extends string, TPath extends string> = string extends TPath ? RootRouteId : TPath extends string ? TPrefix extends RootRouteId ? TPath extends '/' ? '/' : `/${TrimPath<TPath>}` : `${TPrefix}/${TPath}` extends '/' ? '/' : `/${TrimPathLeft<`${TrimPathRight<TPrefix>}/${TrimPath<TPath>}`>}` : never; | ||
@@ -560,79 +657,48 @@ type TrimPath<T extends string> = '' extends T ? '' : TrimPathRight<TrimPathLeft<T>>; | ||
interface AnyRoutesInfo { | ||
routeTree: AnyRoute; | ||
routeUnion: AnyRoute; | ||
routesById: Record<string, AnyRoute>; | ||
routesByFullPath: Record<string, AnyRoute>; | ||
routeIds: any; | ||
routePaths: any; | ||
routeIntersection: AnyRoute; | ||
fullSearchSchema: Record<string, any>; | ||
allParams: Record<string, any>; | ||
interface FileRoutesByPath { | ||
} | ||
interface DefaultRoutesInfo { | ||
routeTree: AnyRoute; | ||
routeUnion: AnyRoute; | ||
routesById: Record<string, Route>; | ||
routesByFullPath: Record<string, Route>; | ||
routeIds: string; | ||
routePaths: string; | ||
routeIntersection: AnyRoute; | ||
fullSearchSchema: AnySearchSchema; | ||
allParams: AnyPathParams; | ||
type Replace<S extends string, From extends string, To extends string> = S extends `${infer Start}${From}${infer Rest}` ? `${Start}${To}${Replace<Rest, From, To>}` : S; | ||
type TrimLeft<T extends string, S extends string> = T extends `${S}${infer U}` ? U : T; | ||
type TrimRight<T extends string, S extends string> = T extends `${infer U}${S}` ? U : T; | ||
type Trim<T extends string, S extends string> = TrimLeft<TrimRight<T, S>, S>; | ||
type ResolveFilePath<TParentRoute extends AnyRoute, TFilePath extends string> = TParentRoute['id'] extends RootRouteId ? TrimPathLeft<TFilePath> : Replace<TrimPathLeft<TFilePath>, TrimPathLeft<TParentRoute['__types']['customId']>, ''>; | ||
type FileRoutePath<TParentRoute extends AnyRoute, TFilePath extends string> = ResolveFilePath<TParentRoute, TFilePath> extends `_${infer _}` ? string : ResolveFilePath<TParentRoute, TFilePath>; | ||
declare class FileRoute<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], TId extends string = TFilePath, TPath extends string = FileRoutePath<TParentRoute, TFilePath>, TFullPath extends string = ResolveFullPath<TParentRoute, TPath>> { | ||
path: TFilePath; | ||
constructor(path: TFilePath); | ||
createRoute: <TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends (TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> extends infer T_1 ? T_1 extends TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> ? T_1 extends `$${infer L}` ? L : never : never : never) extends never ? AnyPathParams : Record<TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> extends infer T_1 ? T_1 extends TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> ? T_1 extends `$${infer L}` ? L : never : never : never, any> = (TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> extends infer T_1 ? T_1 extends TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> ? T_1 extends `$${infer L}` ? L : never : never : never) extends never ? AnyPathParams : Record<TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> extends infer T_1 ? T_1 extends TrimLeft<TrimRight<Split<TPath, true>[number], "_">, "_"> ? T_1 extends `$${infer L}` ? L : never : never : never, string>, TAllParams extends IsAny<TParentRoute["__types"]["allParams"], TParams, TParentRoute["__types"]["allParams"] & TParams> = IsAny<TParentRoute["__types"]["allParams"], TParams, TParentRoute["__types"]["allParams"] & TParams>, TParentContext extends TParentRoute["__types"]["routeContext"] = TParentRoute["__types"]["routeContext"], TAllParentContext extends TParentRoute["__types"]["context"] = TParentRoute["__types"]["context"], TRouteContext extends RouteContext = RouteContext, TContext extends IsAny<TParentRoute["__types"]["context"], TRouteContext, TParentRoute["__types"]["context"] & TRouteContext> = IsAny<TParentRoute["__types"]["context"], TRouteContext, TParentRoute["__types"]["context"] & TRouteContext>, TRouterContext extends AnyContext = AnyContext, TChildren extends unknown = unknown, TRoutesInfo extends DefaultRoutesInfo = DefaultRoutesInfo>(options: Omit<RouteOptions<TParentRoute, string, string, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext>, "path" | "getParentRoute" | "id"> & { | ||
meta?: RouteMeta | undefined; | ||
} & { | ||
key?: false | GetKeyFn<TFullSearchSchema, TAllParams> | null | undefined; | ||
caseSensitive?: boolean | undefined; | ||
wrapInSuspense?: boolean | undefined; | ||
component?: ((props: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>) => unknown) | undefined; | ||
errorComponent?: ((props: { | ||
error: unknown; | ||
} & Partial<RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>>) => unknown) | undefined; | ||
pendingComponent?: ((props: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>) => unknown) | undefined; | ||
preSearchFilters?: SearchFilter<TFullSearchSchema, TFullSearchSchema>[] | undefined; | ||
postSearchFilters?: SearchFilter<TFullSearchSchema, TFullSearchSchema>[] | undefined; | ||
preloadMaxAge?: number | undefined; | ||
maxAge?: number | undefined; | ||
gcMaxAge?: number | undefined; | ||
beforeLoad?: ((opts: LoaderContext<TSearchSchema, TFullSearchSchema, TAllParams, NoInfer<TRouteContext>, TContext>) => void | Promise<void>) | undefined; | ||
onBeforeLoadError?: ((err: any) => void) | undefined; | ||
onValidateSearchError?: ((err: any) => void) | undefined; | ||
onParseParamsError?: ((err: any) => void) | undefined; | ||
onLoadError?: ((err: any) => void) | undefined; | ||
onError?: ((err: any) => void) | undefined; | ||
onLoaded?: ((matchContext: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void | ((match: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void) | undefined) | undefined; | ||
onTransition?: ((match: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void) | undefined; | ||
}) => Route<TParentRoute, TPath, TFullPath, TFilePath, TId, TLoader, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext, TRouterContext, TChildren, TRoutesInfo>; | ||
} | ||
interface RoutesInfo<TRouteTree extends AnyRoute = Route> extends RoutesInfoInner<TRouteTree, ParseRoute<TRouteTree>> { | ||
} | ||
interface RoutesInfoInner<TRouteTree extends AnyRoute, TRouteUnion extends AnyRoute = Route, TRoutesById = { | ||
'/': TRouteUnion; | ||
} & { | ||
[TRoute in TRouteUnion as TRoute['id']]: TRoute; | ||
}, TRoutesByFullPath = { | ||
'/': TRouteUnion; | ||
} & { | ||
[TRoute in TRouteUnion as TRoute['fullPath'] extends RootRouteId ? never : string extends TRoute['fullPath'] ? never : `${TRoute['fullPath']}/` extends keyof TRoutesById ? never : TRoute['fullPath'] extends `${infer Trimmed}/` ? Trimmed : TRoute['fullPath']]: TRoute; | ||
}> { | ||
routeTree: TRouteTree; | ||
routeUnion: TRouteUnion; | ||
routesById: TRoutesById; | ||
routesByFullPath: TRoutesByFullPath; | ||
routeIds: keyof TRoutesById; | ||
routePaths: keyof TRoutesByFullPath; | ||
routeIntersection: Route<TRouteUnion['__types']['parentRoute'], // TParentRoute, | ||
TRouteUnion['__types']['path'], // TPath, | ||
TRouteUnion['__types']['fullPath'], // TFullPath, | ||
TRouteUnion['__types']['customId'], // TCustomId, | ||
TRouteUnion['__types']['id'], // TId, | ||
TRouteUnion['__types']['loader'], // TId, | ||
// TId, | ||
MergeUnion<TRouteUnion['__types']['searchSchema']> & {}, // TSearchSchema, | ||
// TSearchSchema, | ||
MergeUnion<TRouteUnion['__types']['fullSearchSchema']> & {}, // TFullSearchSchema, | ||
MergeUnion<TRouteUnion['__types']['params']>, // TParams, | ||
MergeUnion<TRouteUnion['__types']['allParams']>, // TAllParams, | ||
MergeUnion<TRouteUnion['__types']['parentContext']>, // TParentContext, | ||
MergeUnion<TRouteUnion['__types']['allParentContext']>, // TAllParentContext, | ||
// TAllParentContext, | ||
MergeUnion<TRouteUnion['__types']['routeContext']> & {}, // TRouteContext, | ||
// TRouteContext, | ||
MergeUnion<TRouteUnion['__types']['context']> & {}, // TContext, | ||
// TContext, | ||
MergeUnion<TRouteUnion['__types']['routerContext']> & {}, // TRouterContext, | ||
TRouteUnion['__types']['children'], // TChildren, | ||
TRouteUnion['__types']['routesInfo']>; | ||
fullSearchSchema: Partial<MergeUnion<TRouteUnion['__types']['fullSearchSchema']>>; | ||
allParams: Partial<MergeUnion<TRouteUnion['__types']['allParams']>>; | ||
} | ||
type ParseRoute<TRouteTree> = TRouteTree extends AnyRoute ? TRouteTree | ParseRouteChildren<TRouteTree> : never; | ||
type ParseRouteChildren<TRouteTree> = TRouteTree extends Route<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, infer TChildren, any> ? unknown extends TChildren ? never : TChildren extends AnyRoute[] ? Values<{ | ||
[TId in TChildren[number]['id']]: ParseRouteChild<TChildren[number], TId>; | ||
}> : never : never; | ||
type ParseRouteChild<TRoute, TId> = TRoute extends AnyRoute ? ParseRoute<TRoute> : never; | ||
type RoutesById<TRoutesInfo extends AnyRoutesInfo> = { | ||
[K in keyof TRoutesInfo['routesById']]: TRoutesInfo['routesById'][K]; | ||
}; | ||
type RouteById<TRoutesInfo extends AnyRoutesInfo, TId> = TId extends keyof TRoutesInfo['routesById'] ? IsAny<TRoutesInfo['routesById'][TId]['id'], Route, TRoutesInfo['routesById'][TId]> : never; | ||
type RoutesByPath<TRoutesInfo extends AnyRoutesInfo> = { | ||
[K in keyof TRoutesInfo['routesByFullPath']]: TRoutesInfo['routesByFullPath'][K]; | ||
}; | ||
type RouteByPath<TRoutesInfo extends AnyRoutesInfo, TPath> = TPath extends keyof TRoutesInfo['routesByFullPath'] ? IsAny<TRoutesInfo['routesByFullPath'][TPath]['id'], Route, TRoutesInfo['routesByFullPath'][TPath]> : never; | ||
@@ -655,3 +721,5 @@ type LinkInfo = { | ||
type Split<S, TIncludeTrailingSlash = true> = S extends unknown ? string extends S ? string[] : S extends string ? CleanPath<S> extends '' ? [] : TIncludeTrailingSlash extends true ? CleanPath<S> extends `${infer T}/` ? [...Split<T>, '/'] : CleanPath<S> extends `/${infer U}` ? Split<U> : CleanPath<S> extends `${infer T}/${infer U}` ? [...Split<T>, ...Split<U>] : [S] : CleanPath<S> extends `${infer T}/${infer U}` ? [...Split<T>, ...Split<U>] : S extends string ? [S] : never : never : never; | ||
type ParsePathParams<T extends string> = Split<T>[number] extends infer U ? U extends `$${infer V}` ? V : never : never; | ||
type ParsePathParams<T extends string> = keyof { | ||
[K in Trim<Split<T>[number], '_'> as K extends `$${infer L}` ? L : never]: K; | ||
}; | ||
type Join<T, Delimiter extends string = '/'> = T extends [] ? '' : T extends [infer L extends string] ? L : T extends [infer L extends string, ...infer Tail extends [...string[]]] ? CleanPath<`${L}${Delimiter}${Join<Tail>}`> : never; | ||
@@ -742,43 +810,2 @@ type Last<T extends any[]> = T extends [...infer _, infer L] ? L : never; | ||
interface FileRoutesByPath { | ||
} | ||
declare class FileRoute<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], TPath extends string = Last<Split<TFilePath>>, TCustomId extends string = TPath extends `_${infer T}` ? T : string> { | ||
path: TFilePath; | ||
constructor(path: TFilePath); | ||
createRoute: <TFullPath extends ResolveFullPath<TParentRoute, TPath, string extends TPath ? "__root__" : TPath extends string ? TParentRoute["fullPath"] extends infer T ? T extends TParentRoute["fullPath"] ? T extends "__root__" ? TPath extends "/" ? "/" : `/${TrimPath<TPath>}` : `${T}/${TPath}` extends "/" ? "/" : `/${TrimPathLeft<`${TrimPathRight<T>}/${TrimPath<TPath>}`>}` : never : never : never> = ResolveFullPath<TParentRoute, TPath, string extends TPath ? "__root__" : TPath extends string ? TParentRoute["fullPath"] extends infer T ? T extends TParentRoute["fullPath"] ? T extends "__root__" ? TPath extends "/" ? "/" : `/${TrimPath<TPath>}` : `${T}/${TPath}` extends "/" ? "/" : `/${TrimPathLeft<`${TrimPathRight<T>}/${TrimPath<TPath>}`>}` : never : never : never>, TId extends ResolveId<TParentRoute, TCustomId, TPath> = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends AnySearchSchema = {}, TFullSearchSchema extends AnySearchSchema = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends Record<ParsePathParams<TPath>, any> = Record<ParsePathParams<TPath>, string>, TAllParams extends IsAny<TParentRoute["__types"]["allParams"], TParams, TParentRoute["__types"]["allParams"] & TParams> = IsAny<TParentRoute["__types"]["allParams"], TParams, TParentRoute["__types"]["allParams"] & TParams>, TParentContext extends TParentRoute["__types"]["routeContext"] = TParentRoute["__types"]["routeContext"], TAllParentContext extends TParentRoute["__types"]["context"] = TParentRoute["__types"]["context"], TRouteContext extends RouteContext = RouteContext, TContext extends IsAny<TParentRoute["__types"]["context"], TRouteContext, TParentRoute["__types"]["context"] & TRouteContext> = IsAny<TParentRoute["__types"]["context"], TRouteContext, TParentRoute["__types"]["context"] & TRouteContext>, TRouterContext extends AnyContext = AnyContext, TChildren extends unknown = unknown, TRoutesInfo extends DefaultRoutesInfo = DefaultRoutesInfo>(options: Omit<RouteOptions<TParentRoute, TCustomId, TPath, TLoader, InferFullSearchSchema<TParentRoute>, TSearchSchema, TFullSearchSchema, TParentRoute["__types"]["allParams"], TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext>, "path" | "getParentRoute" | "id"> & { | ||
meta?: RouteMeta | undefined; | ||
} & { | ||
key?: false | GetKeyFn<TFullSearchSchema, TAllParams> | null | undefined; | ||
caseSensitive?: boolean | undefined; | ||
wrapInSuspense?: boolean | undefined; | ||
component?: ((props: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>) => unknown) | undefined; | ||
errorComponent?: ((props: { | ||
error: unknown; | ||
} & Partial<RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>>) => unknown) | undefined; | ||
pendingComponent?: ((props: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TContext>) => unknown) | undefined; | ||
preSearchFilters?: SearchFilter<TFullSearchSchema, TFullSearchSchema>[] | undefined; | ||
postSearchFilters?: SearchFilter<TFullSearchSchema, TFullSearchSchema>[] | undefined; | ||
preloadMaxAge?: number | undefined; | ||
maxAge?: number | undefined; | ||
gcMaxAge?: number | undefined; | ||
beforeLoad?: ((opts: LoaderContext<TSearchSchema, TFullSearchSchema, TAllParams, NoInfer<TRouteContext>, TContext>) => void | Promise<void>) | undefined; | ||
onBeforeLoadError?: ((err: any) => void) | undefined; | ||
onValidateSearchError?: ((err: any) => void) | undefined; | ||
onParseParamsError?: ((err: any) => void) | undefined; | ||
onLoadError?: ((err: any) => void) | undefined; | ||
onError?: ((err: any) => void) | undefined; | ||
onLoaded?: ((matchContext: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void | ((match: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void) | undefined) | undefined; | ||
onTransition?: ((match: { | ||
params: TAllParams; | ||
search: TFullSearchSchema; | ||
}) => void) | undefined; | ||
}) => Route<TParentRoute, TPath, TFullPath, TCustomId, TId, TLoader, TSearchSchema, TFullSearchSchema, TParams, TAllParams, TParentContext, TAllParentContext, TRouteContext, TContext, TRouterContext, TChildren, TRoutesInfo>; | ||
} | ||
declare const defaultParseSearch: (searchStr: string) => AnySearchSchema; | ||
@@ -789,2 +816,2 @@ declare const defaultStringifySearch: (search: Record<string, any>) => string; | ||
export { ActiveOptions, AnyContext, AnyPathParams, AnyRedirect, AnyRootRoute, AnyRoute, AnyRouteMatch, AnyRouteProps, AnyRouteWithRouterContext, AnyRouter, AnyRoutesInfo, AnySearchSchema, BaseRouteOptions, BuildNextOptions, CheckId, CheckIdError, CheckPath, CheckPathError, CheckRelativePath, ComponentFromRoute, ComponentPropsFromRoute, DeepAwaited, DefaultRoutesInfo, DefinedPathParamWarning, DehydratedRouter, DehydratedRouterState, Expand, FileRoute, FileRoutesByPath, FromLocation, GetKeyFn, HydrationCtx, InferFullSearchSchema, IsAny, IsAnyBoolean, IsKnown, Join, Last, LinkInfo, LinkOptions, ListenerFn, LoaderContext, LoaderFn, LocationState, MatchLocation, MatchRouteOptions, MergeParamsFromParent, MergeUnion, MetaOptions, NavigateOptions, NoInfer, ParamsFallback, ParentParams, ParseParamsFn, ParseParamsObj, ParseParamsOption, ParsePathParams, ParseRoute, ParseRouteChild, ParseRouteChildren, ParsedLocation, ParsedPath, PathParamError, PathParamMask, PathParamOptions, PickAsPartial, PickAsRequired, PickExclude, PickExtra, PickExtract, PickRequired, PickUnsafe, PreloadableObj, Redirect, Register, RegisterRouteComponent, RegisterRouteErrorComponent, RegisteredRouteComponent, RegisteredRouteErrorComponent, RegisteredRouter, RegisteredRouterPair, RegisteredRoutesInfo, RelativeToPathAutoComplete, ResolveFullPath, ResolveFullSearchSchema, ResolveId, ResolveRelativePath, RootRoute, RootRouteId, Route, RouteById, RouteByPath, RouteContext, RouteLoaderFromRoute, RouteMatch, RouteMeta, RouteOptions, RoutePathOptions, RoutePathOptionsIntersection, RouteProps, Router, RouterConstructorOptions, RouterContext, RouterContextOptions, RouterHistory, RouterLocation, RouterOptions, RouterState, RoutesById, RoutesByPath, RoutesInfo, RoutesInfoInner, SearchFilter, SearchParamError, SearchParamOptions, SearchParser, SearchSchemaValidator, SearchSchemaValidatorFn, SearchSchemaValidatorObj, SearchSerializer, Segment, Split, StreamedPromise, Timeout, ToIdOption, ToOptions, ToPathOption, TrimPath, TrimPathLeft, TrimPathRight, UnionToIntersection, UnloaderFn, UpdatableRouteOptions, Updater, UseLoaderResult, UseLoaderResultPromise, ValueKeys, Values, cleanPath, componentTypes, createBrowserHistory, createHashHistory, createMemoryHistory, decode, defaultParseSearch, defaultStringifySearch, encode, functionalUpdate, interpolatePath, isPlainObject, isRedirect, joinPaths, last, lazyFn, matchByPath, matchPathname, parsePathname, parseSearchWith, partialDeepEqual, pick, redirect, replaceEqualDeep, resolvePath, rootRouteId, stringifySearchWith, trimPath, trimPathLeft, trimPathRight }; | ||
export { ActiveOptions, AnyContext, AnyPathParams, AnyRedirect, AnyRootRoute, AnyRoute, AnyRouteMatch, AnyRouteProps, AnyRouteWithRouterContext, AnyRouter, AnyRoutesInfo, AnySearchSchema, BaseRouteOptions, BuildNextOptions, CheckId, CheckIdError, CheckPath, CheckPathError, CheckRelativePath, CleanPath, ComponentFromRoute, ComponentPropsFromRoute, DeepAwaited, DefaultRoutesInfo, DefinedPathParamWarning, DehydratedRouter, DehydratedRouterState, Expand, FileRoute, FileRoutePath, FileRoutesByPath, FromLocation, GetKeyFn, HydrationCtx, InferFullSearchSchema, IsAny, IsAnyBoolean, IsKnown, Join, Last, LinkInfo, LinkOptions, ListenerFn, LoaderContext, LoaderFn, LocationState, MatchLocation, MatchRouteOptions, MergeParamsFromParent, MergeUnion, MetaOptions, NavigateOptions, NoInfer, ParamsFallback, ParentParams, ParseParamsFn, ParseParamsObj, ParseParamsOption, ParsePathParams, ParseRoute, ParseRouteChild, ParseRouteChildren, ParsedLocation, ParsedPath, PathParamError, PathParamMask, PathParamOptions, PickAsPartial, PickAsRequired, PickExclude, PickExtra, PickExtract, PickRequired, PickUnsafe, PreloadableObj, Redirect, Register, RegisterRouteComponent, RegisterRouteErrorComponent, RegisteredRouteComponent, RegisteredRouteErrorComponent, RegisteredRouter, RegisteredRouterPair, RegisteredRoutesInfo, RelativeToPathAutoComplete, ResolveFilePath, ResolveFullPath, ResolveFullSearchSchema, ResolveId, ResolveRelativePath, RootRoute, RootRouteId, Route, RouteById, RouteByPath, RouteConstraints, RouteContext, RouteLoaderFromRoute, RouteMatch, RouteMeta, RouteOptions, RoutePathOptions, RoutePathOptionsIntersection, RouteProps, Router, RouterConstructorOptions, RouterContext, RouterContextOptions, RouterHistory, RouterLocation, RouterOptions, RouterState, RoutesById, RoutesByPath, RoutesInfo, RoutesInfoInner, SearchFilter, SearchParamError, SearchParamOptions, SearchParser, SearchSchemaValidator, SearchSchemaValidatorFn, SearchSchemaValidatorObj, SearchSerializer, Segment, Split, StreamedPromise, Timeout, ToIdOption, ToOptions, ToPathOption, Trim, TrimLeft, TrimPath, TrimPathLeft, TrimPathRight, TrimRight, UnionToIntersection, UnloaderFn, UpdatableRouteOptions, Updater, UseLoaderResult, UseLoaderResultPromise, ValueKeys, Values, cleanPath, componentTypes, createBrowserHistory, createHashHistory, createMemoryHistory, decode, defaultParseSearch, defaultStringifySearch, encode, functionalUpdate, interpolatePath, isPlainObject, isRedirect, joinPaths, last, lazyFn, matchByPath, matchPathname, parsePathname, parseSearchWith, partialDeepEqual, pick, redirect, replaceEqualDeep, resolvePath, rootRouteId, stringifySearchWith, trimPath, trimPathLeft, trimPathRight }; |
{ | ||
"name": "@tanstack/router-core", | ||
"author": "Tanner Linsley", | ||
"version": "0.0.1-beta.151", | ||
"version": "0.0.1-beta.152", | ||
"license": "MIT", | ||
@@ -46,3 +46,3 @@ "repository": "tanstack/router", | ||
"@gisatcz/cross-package-react-context": "^0.2.0", | ||
"@tanstack/react-store": "0.0.1-beta.151" | ||
"@tanstack/react-store": "0.0.1-beta.152" | ||
}, | ||
@@ -49,0 +49,0 @@ "scripts": { |
@@ -1,2 +0,3 @@ | ||
import { Last, ParsePathParams, Split } from './link' | ||
import { T } from 'vitest/dist/types-198fd1d9' | ||
import { CleanPath, Last, ParsePathParams, Split } from './link' | ||
import { | ||
@@ -15,2 +16,5 @@ AnyRoute, | ||
Route, | ||
AnyPathParams, | ||
RootRouteId, | ||
TrimPathLeft, | ||
} from './route' | ||
@@ -25,7 +29,49 @@ import { DefaultRoutesInfo } from './routeInfo' | ||
type Replace< | ||
S extends string, | ||
From extends string, | ||
To extends string, | ||
> = S extends `${infer Start}${From}${infer Rest}` | ||
? `${Start}${To}${Replace<Rest, From, To>}` | ||
: S | ||
export type TrimLeft< | ||
T extends string, | ||
S extends string, | ||
> = T extends `${S}${infer U}` ? U : T | ||
export type TrimRight< | ||
T extends string, | ||
S extends string, | ||
> = T extends `${infer U}${S}` ? U : T | ||
export type Trim<T extends string, S extends string> = TrimLeft< | ||
TrimRight<T, S>, | ||
S | ||
> | ||
export type ResolveFilePath< | ||
TParentRoute extends AnyRoute, | ||
TFilePath extends string, | ||
> = TParentRoute['id'] extends RootRouteId | ||
? TrimPathLeft<TFilePath> | ||
: Replace< | ||
TrimPathLeft<TFilePath>, | ||
TrimPathLeft<TParentRoute['__types']['customId']>, | ||
'' | ||
> | ||
export type FileRoutePath< | ||
TParentRoute extends AnyRoute, | ||
TFilePath extends string, | ||
> = ResolveFilePath<TParentRoute, TFilePath> extends `_${infer _}` | ||
? string | ||
: ResolveFilePath<TParentRoute, TFilePath> | ||
export class FileRoute< | ||
TFilePath extends keyof FileRoutesByPath, | ||
TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], | ||
TPath extends string = Last<Split<TFilePath>>, | ||
TCustomId extends string = TPath extends `_${infer T}` ? T : string, | ||
TId extends string = TFilePath, | ||
TPath extends string = FileRoutePath<TParentRoute, TFilePath>, | ||
TFullPath extends string = ResolveFullPath<TParentRoute, TPath>, | ||
> { | ||
@@ -35,11 +81,2 @@ constructor(public path: TFilePath) {} | ||
createRoute = < | ||
TFullPath extends ResolveFullPath<TParentRoute, TPath> = ResolveFullPath< | ||
TParentRoute, | ||
TPath | ||
>, | ||
TId extends ResolveId<TParentRoute, TCustomId, TPath> = ResolveId< | ||
TParentRoute, | ||
TCustomId, | ||
TPath | ||
>, | ||
TLoader = unknown, | ||
@@ -51,6 +88,10 @@ TSearchSchema extends AnySearchSchema = {}, | ||
>, | ||
TParams extends Record<ParsePathParams<TPath>, any> = Record< | ||
ParsePathParams<TPath>, | ||
string | ||
>, | ||
TParams extends ParsePathParams<TPath> extends never | ||
? AnyPathParams | ||
: Record< | ||
ParsePathParams<TPath>, | ||
any | ||
> = ParsePathParams<TPath> extends never | ||
? AnyPathParams | ||
: Record<ParsePathParams<TPath>, string>, | ||
TAllParams extends MergeParamsFromParent< | ||
@@ -77,4 +118,4 @@ TParentRoute['__types']['allParams'], | ||
TParentRoute, | ||
TCustomId, | ||
TPath, | ||
string, | ||
string, | ||
TLoader, | ||
@@ -84,3 +125,2 @@ InferFullSearchSchema<TParentRoute>, | ||
TFullSearchSchema, | ||
TParentRoute['__types']['allParams'], | ||
TParams, | ||
@@ -107,3 +147,3 @@ TAllParams, | ||
TFullPath, | ||
TCustomId, | ||
TFilePath, | ||
TId, | ||
@@ -110,0 +150,0 @@ TLoader, |
@@ -0,1 +1,2 @@ | ||
import { Trim } from './fileRoute' | ||
import { AnyRoutesInfo, RouteByPath } from './routeInfo' | ||
@@ -22,3 +23,3 @@ import { ParsedLocation, LocationState, RegisteredRoutesInfo } from './router' | ||
type CleanPath<T extends string> = T extends `${infer L}//${infer R}` | ||
export type CleanPath<T extends string> = T extends `${infer L}//${infer R}` | ||
? CleanPath<`${CleanPath<L>}/${CleanPath<R>}`> | ||
@@ -53,7 +54,5 @@ : T extends `${infer L}//` | ||
export type ParsePathParams<T extends string> = Split<T>[number] extends infer U | ||
? U extends `$${infer V}` | ||
? V | ||
: never | ||
: never | ||
export type ParsePathParams<T extends string> = keyof { | ||
[K in Trim<Split<T>[number], '_'> as K extends `$${infer L}` ? L : never]: K | ||
} | ||
@@ -60,0 +59,0 @@ export type Join<T, Delimiter extends string = '/'> = T extends [] |
111
src/route.ts
@@ -138,20 +138,8 @@ import { ParsePathParams } from './link' | ||
TFullSearchSchema extends AnySearchSchema = TSearchSchema, | ||
TParentParams extends AnyPathParams = AnyPathParams, | ||
TParams extends AnyPathParams = Record<ParsePathParams<TPath>, string>, | ||
TParams extends AnyPathParams = AnyPathParams, | ||
TAllParams extends AnyPathParams = TParams, | ||
TParentContext extends AnyContext = AnyContext, | ||
TAllParentContext extends IsAny< | ||
TParentRoute['__types']['allParams'], | ||
TParentContext, | ||
TParentRoute['__types']['allParams'] & TParentContext | ||
> = IsAny< | ||
TParentRoute['__types']['allParams'], | ||
TParentContext, | ||
TParentRoute['__types']['allParams'] & TParentContext | ||
>, | ||
TAllParentContext extends AnyContext = AnyContext, | ||
TRouteContext extends RouteContext = RouteContext, | ||
TContext extends MergeParamsFromParent< | ||
TAllParentContext, | ||
TRouteContext | ||
> = MergeParamsFromParent<TAllParentContext, TRouteContext>, | ||
TContext extends AnyContext = AnyContext, | ||
> = BaseRouteOptions< | ||
@@ -165,3 +153,2 @@ TParentRoute, | ||
TFullSearchSchema, | ||
TParentParams, | ||
TParams, | ||
@@ -188,2 +175,10 @@ TAllParams, | ||
type Prefix<T extends string, U extends string> = U extends `${T}${infer _}` | ||
? U | ||
: never | ||
type PrefixOrExact<T extends string, U extends string> = U extends T | ||
? U | ||
: Prefix<T, U> | ||
export type BaseRouteOptions< | ||
@@ -197,21 +192,10 @@ TParentRoute extends AnyRoute = AnyRoute, | ||
TFullSearchSchema extends AnySearchSchema = TSearchSchema, | ||
TParentParams extends AnyPathParams = AnyPathParams, | ||
TParams = unknown, | ||
TAllParams = ParamsFallback<TPath, TParams>, | ||
TParentContext extends AnyContext = AnyContext, | ||
TAllParentContext extends IsAny< | ||
TParentRoute['__types']['allParams'], | ||
TParentContext, | ||
TParentRoute['__types']['allParams'] & TParentContext | ||
> = IsAny< | ||
TParentRoute['__types']['allParams'], | ||
TParentContext, | ||
TParentRoute['__types']['allParams'] & TParentContext | ||
>, | ||
TAllParentContext extends AnyContext = AnyContext, | ||
TRouteContext extends RouteContext = RouteContext, | ||
TContext extends MergeParamsFromParent< | ||
TAllParentContext, | ||
TRouteContext | ||
> = MergeParamsFromParent<TAllParentContext, TRouteContext>, | ||
TContext extends AnyContext = AnyContext, | ||
> = RoutePathOptions<TCustomId, TPath> & { | ||
layoutLimit?: string | ||
getParentRoute: () => TParentRoute | ||
@@ -562,11 +546,30 @@ validateSearch?: SearchSchemaValidator<TSearchSchema, TParentSearchSchema> | ||
export type RouteConstraints = { | ||
TParentRoute: AnyRoute | ||
TPath: string | ||
TFullPath: string | ||
TCustomId: string | ||
TId: string | ||
TSearchSchema: AnySearchSchema | ||
TFullSearchSchema: AnySearchSchema | ||
TParams: Record<string, any> | ||
TAllParams: Record<string, any> | ||
TParentContext: AnyContext | ||
TAllParentContext: AnyContext | ||
TRouteContext: RouteContext | ||
TContext: AnyContext | ||
TRouterContext: AnyContext | ||
TChildren: unknown | ||
TRoutesInfo: DefaultRoutesInfo | ||
} | ||
export class Route< | ||
TParentRoute extends AnyRoute = AnyRoute, | ||
TPath extends string = '/', | ||
TFullPath extends ResolveFullPath<TParentRoute, TPath> = ResolveFullPath< | ||
TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, | ||
TPath extends RouteConstraints['TPath'] = '/', | ||
TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath< | ||
TParentRoute, | ||
TPath | ||
>, | ||
TCustomId extends string = string, | ||
TId extends ResolveId<TParentRoute, TCustomId, TPath> = ResolveId< | ||
TCustomId extends RouteConstraints['TCustomId'] = string, | ||
TId extends RouteConstraints['TId'] = ResolveId< | ||
TParentRoute, | ||
@@ -577,25 +580,25 @@ TCustomId, | ||
TLoader = unknown, | ||
TSearchSchema extends AnySearchSchema = {}, | ||
TFullSearchSchema extends AnySearchSchema = ResolveFullSearchSchema< | ||
TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, | ||
TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema< | ||
TParentRoute, | ||
TSearchSchema | ||
>, | ||
TParams extends Record<ParsePathParams<TPath>, any> = Record< | ||
TParams extends RouteConstraints['TParams'] = Record< | ||
ParsePathParams<TPath>, | ||
string | ||
>, | ||
TAllParams extends MergeParamsFromParent< | ||
TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent< | ||
TParentRoute['__types']['allParams'], | ||
TParams | ||
> = MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams>, | ||
TParentContext extends TParentRoute['__types']['routeContext'] = TParentRoute['__types']['routeContext'], | ||
TAllParentContext extends TParentRoute['__types']['context'] = TParentRoute['__types']['context'], | ||
TRouteContext extends RouteContext = RouteContext, | ||
TContext extends MergeParamsFromParent< | ||
>, | ||
TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['__types']['routeContext'], | ||
TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['__types']['context'], | ||
TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, | ||
TContext extends RouteConstraints['TContext'] = MergeParamsFromParent< | ||
TParentRoute['__types']['context'], | ||
TRouteContext | ||
> = MergeParamsFromParent<TParentRoute['__types']['context'], TRouteContext>, | ||
TRouterContext extends AnyContext = AnyContext, | ||
TChildren extends unknown = unknown, | ||
TRoutesInfo extends DefaultRoutesInfo = DefaultRoutesInfo, | ||
>, | ||
TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, | ||
TChildren extends RouteConstraints['TChildren'] = unknown, | ||
TRoutesInfo extends RouteConstraints['TRoutesInfo'] = DefaultRoutesInfo, | ||
> { | ||
@@ -631,3 +634,2 @@ __types!: { | ||
TFullSearchSchema, | ||
TParentRoute['__types']['allParams'], | ||
TParams, | ||
@@ -672,3 +674,2 @@ TAllParams, | ||
TFullSearchSchema, | ||
TParentRoute['__types']['allParams'], | ||
TParams, | ||
@@ -705,3 +706,2 @@ TAllParams, | ||
TSearchSchema, | ||
TParentRoute['__types']['allParams'], | ||
TParams | ||
@@ -817,3 +817,3 @@ > & | ||
options?: Omit< | ||
RouteOptions<AnyRoute, RootRouteId, '', {}, TSearchSchema, {}, {}>, | ||
RouteOptions<AnyRoute, RootRouteId, '', {}, TSearchSchema, {}>, | ||
| 'path' | ||
@@ -859,3 +859,3 @@ | 'id' | ||
options?: Omit< | ||
RouteOptions<AnyRoute, RootRouteId, '', TLoader, TSearchSchema, {}, {}>, | ||
RouteOptions<AnyRoute, RootRouteId, '', TLoader, TSearchSchema, {}>, | ||
| 'path' | ||
@@ -876,6 +876,3 @@ | 'id' | ||
TPath extends string, | ||
TPrefixed extends RoutePrefix<TParentRoute['fullPath'], TPath> = RoutePrefix< | ||
TParentRoute['fullPath'], | ||
TPath | ||
>, | ||
TPrefixed = RoutePrefix<TParentRoute['fullPath'], TPath>, | ||
> = TPrefixed extends RootRouteId ? '/' : TPrefixed | ||
@@ -882,0 +879,0 @@ |
@@ -652,6 +652,7 @@ import { Store } from '@tanstack/react-store' | ||
let routeCursor = foundRoute || (this.routesById['__root__'] as any) | ||
let routeCursor: AnyRoute = | ||
foundRoute || (this.routesById['__root__'] as any) | ||
let matchedRoutes: AnyRoute[] = [routeCursor] | ||
// let includingLayouts = true | ||
while (routeCursor?.parentRoute) { | ||
@@ -658,0 +659,0 @@ routeCursor = routeCursor.parentRoute |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1172369
10506
+ Added@tanstack/react-store@0.0.1-beta.152(transitive)
+ Added@tanstack/store@0.0.1-beta.152(transitive)
- Removed@tanstack/react-store@0.0.1-beta.151(transitive)
- Removed@tanstack/store@0.0.1-beta.151(transitive)