@tanstack/router-core 0.0.1-beta.23 → 0.0.1-beta.25
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/build/cjs/packages/router-core/src/route.js +1 -0
- package/build/cjs/packages/router-core/src/route.js.map +1 -1
- package/build/cjs/packages/router-core/src/routeConfig.js.map +1 -1
- package/build/cjs/packages/router-core/src/routeMatch.js.map +1 -1
- package/build/cjs/packages/router-core/src/router.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +128 -128
- package/build/types/index.d.ts +5 -4
- package/build/umd/index.development.js +1 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/frameworks.ts +1 -0
- package/src/link.ts +3 -2
- package/src/route.ts +6 -1
- package/src/routeConfig.ts +1 -1
- package/src/routeMatch.ts +3 -3
- package/src/router.ts +1 -1
package/build/types/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ interface RouteMatch<TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo
|
|
|
35
35
|
invalidAt: number;
|
|
36
36
|
__: {
|
|
37
37
|
component?: GetFrameworkGeneric<'Component'>;
|
|
38
|
-
errorComponent?: GetFrameworkGeneric<'
|
|
38
|
+
errorComponent?: GetFrameworkGeneric<'ErrorComponent'>;
|
|
39
39
|
pendingComponent?: GetFrameworkGeneric<'Component'>;
|
|
40
40
|
loadPromise?: Promise<void>;
|
|
41
41
|
componentsPromise?: Promise<void>;
|
|
@@ -145,7 +145,7 @@ interface RouterOptions<TRouteConfig extends AnyRouteConfig> {
|
|
|
145
145
|
defaultPreloadGcMaxAge?: number;
|
|
146
146
|
defaultPreloadDelay?: number;
|
|
147
147
|
defaultComponent?: GetFrameworkGeneric<'Component'>;
|
|
148
|
-
defaultErrorComponent?: GetFrameworkGeneric<'
|
|
148
|
+
defaultErrorComponent?: GetFrameworkGeneric<'ErrorComponent'>;
|
|
149
149
|
defaultPendingComponent?: GetFrameworkGeneric<'Component'>;
|
|
150
150
|
defaultLoaderMaxAge?: number;
|
|
151
151
|
defaultLoaderGcMaxAge?: number;
|
|
@@ -323,6 +323,7 @@ declare function createRouter<TRouteConfig extends AnyRouteConfig = RouteConfig,
|
|
|
323
323
|
interface AnyRoute extends Route<any, any> {
|
|
324
324
|
}
|
|
325
325
|
interface Route<TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo, TRouteInfo extends AnyRouteInfo = RouteInfo> {
|
|
326
|
+
routeInfo: TRouteInfo;
|
|
326
327
|
routeId: TRouteInfo['id'];
|
|
327
328
|
routeRouteId: TRouteInfo['routeId'];
|
|
328
329
|
routePath: TRouteInfo['path'];
|
|
@@ -333,7 +334,7 @@ interface Route<TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo, TRo
|
|
|
333
334
|
router: Router<TAllRouteInfo['routeConfig'], TAllRouteInfo>;
|
|
334
335
|
buildLink: <TTo extends string = '.'>(options: Omit<LinkOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>, 'from'>) => LinkInfo;
|
|
335
336
|
matchRoute: <TTo extends string = '.', TResolved extends string = ResolveRelativePath<TRouteInfo['id'], TTo>>(matchLocation: CheckRelativePath<TAllRouteInfo, TRouteInfo['fullPath'], NoInfer<TTo>> & Omit<ToOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>, 'from'>, opts?: MatchRouteOptions) => RouteInfoByPath<TAllRouteInfo, TResolved>['allParams'];
|
|
336
|
-
navigate: <TTo extends string = '.'>(options: Omit<LinkOptions<TAllRouteInfo, TRouteInfo['
|
|
337
|
+
navigate: <TTo extends string = '.'>(options: Omit<LinkOptions<TAllRouteInfo, TRouteInfo['fullPath'], TTo>, 'from'>) => Promise<void>;
|
|
337
338
|
action: unknown extends TRouteInfo['actionResponse'] ? Action<TRouteInfo['actionPayload'], TRouteInfo['actionResponse']> | undefined : Action<TRouteInfo['actionPayload'], TRouteInfo['actionResponse']>;
|
|
338
339
|
loader: unknown extends TRouteInfo['routeLoaderData'] ? Action<LoaderContext<TRouteInfo['fullSearchSchema'], TRouteInfo['allParams']>, TRouteInfo['routeLoaderData']> | undefined : Loader<TRouteInfo['fullSearchSchema'], TRouteInfo['allParams'], TRouteInfo['routeLoaderData']>;
|
|
339
340
|
}
|
|
@@ -446,7 +447,7 @@ type RouteOptions<TRouteId extends string = string, TPath extends string = strin
|
|
|
446
447
|
preSearchFilters?: SearchFilter<TFullSearchSchema>[];
|
|
447
448
|
postSearchFilters?: SearchFilter<TFullSearchSchema>[];
|
|
448
449
|
component?: GetFrameworkGeneric<'Component'>;
|
|
449
|
-
errorComponent?: GetFrameworkGeneric<'
|
|
450
|
+
errorComponent?: GetFrameworkGeneric<'ErrorComponent'>;
|
|
450
451
|
pendingComponent?: GetFrameworkGeneric<'Component'>;
|
|
451
452
|
loader?: LoaderFn<TRouteLoaderData, TFullSearchSchema, TAllParams>;
|
|
452
453
|
loaderMaxAge?: number;
|