@tanstack/react-router 0.0.1-beta.151 → 0.0.1-beta.153

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.
@@ -7,7 +7,7 @@
7
7
  "name": "index.production.js",
8
8
  "children": [
9
9
  {
10
- "uid": "526a-167",
10
+ "uid": "92ad-167",
11
11
  "name": "\u0000rollupPluginBabelHelpers.js"
12
12
  },
13
13
  {
@@ -15,19 +15,19 @@
15
15
  "children": [
16
16
  {
17
17
  "name": "store/build/esm/index.js",
18
- "uid": "526a-169"
18
+ "uid": "92ad-169"
19
19
  },
20
20
  {
21
21
  "name": "react-store/build/esm/index.js",
22
- "uid": "526a-171"
22
+ "uid": "92ad-171"
23
23
  },
24
24
  {
25
25
  "name": "router-core/build/esm/index.js",
26
- "uid": "526a-177"
26
+ "uid": "92ad-177"
27
27
  },
28
28
  {
29
29
  "name": "react-router/src/index.tsx",
30
- "uid": "526a-179"
30
+ "uid": "92ad-179"
31
31
  }
32
32
  ]
33
33
  },
@@ -36,11 +36,11 @@
36
36
  "children": [
37
37
  {
38
38
  "name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
39
- "uid": "526a-173"
39
+ "uid": "92ad-173"
40
40
  },
41
41
  {
42
42
  "name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
43
- "uid": "526a-175"
43
+ "uid": "92ad-175"
44
44
  }
45
45
  ]
46
46
  }
@@ -50,194 +50,194 @@
50
50
  "isRoot": true
51
51
  },
52
52
  "nodeParts": {
53
- "526a-167": {
53
+ "92ad-167": {
54
54
  "renderedLength": 429,
55
55
  "gzipLength": 238,
56
56
  "brotliLength": 0,
57
- "mainUid": "526a-166"
57
+ "mainUid": "92ad-166"
58
58
  },
59
- "526a-169": {
59
+ "92ad-169": {
60
60
  "renderedLength": 1843,
61
61
  "gzipLength": 644,
62
62
  "brotliLength": 0,
63
- "mainUid": "526a-168"
63
+ "mainUid": "92ad-168"
64
64
  },
65
- "526a-171": {
65
+ "92ad-171": {
66
66
  "renderedLength": 1006,
67
67
  "gzipLength": 479,
68
68
  "brotliLength": 0,
69
- "mainUid": "526a-170"
69
+ "mainUid": "92ad-170"
70
70
  },
71
- "526a-173": {
71
+ "92ad-173": {
72
72
  "renderedLength": 181,
73
73
  "gzipLength": 129,
74
74
  "brotliLength": 0,
75
- "mainUid": "526a-172"
75
+ "mainUid": "92ad-172"
76
76
  },
77
- "526a-175": {
77
+ "92ad-175": {
78
78
  "renderedLength": 44,
79
79
  "gzipLength": 62,
80
80
  "brotliLength": 0,
81
- "mainUid": "526a-174"
81
+ "mainUid": "92ad-174"
82
82
  },
83
- "526a-177": {
84
- "renderedLength": 56013,
85
- "gzipLength": 13281,
83
+ "92ad-177": {
84
+ "renderedLength": 56084,
85
+ "gzipLength": 13303,
86
86
  "brotliLength": 0,
87
- "mainUid": "526a-176"
87
+ "mainUid": "92ad-176"
88
88
  },
89
- "526a-179": {
89
+ "92ad-179": {
90
90
  "renderedLength": 17095,
91
91
  "gzipLength": 3814,
92
92
  "brotliLength": 0,
93
- "mainUid": "526a-178"
93
+ "mainUid": "92ad-178"
94
94
  }
95
95
  },
96
96
  "nodeMetas": {
97
- "526a-166": {
97
+ "92ad-166": {
98
98
  "id": "\u0000rollupPluginBabelHelpers.js",
99
99
  "moduleParts": {
100
- "index.production.js": "526a-167"
100
+ "index.production.js": "92ad-167"
101
101
  },
102
102
  "imported": [],
103
103
  "importedBy": [
104
104
  {
105
- "uid": "526a-178"
105
+ "uid": "92ad-178"
106
106
  }
107
107
  ]
108
108
  },
109
- "526a-168": {
109
+ "92ad-168": {
110
110
  "id": "/packages/store/build/esm/index.js",
111
111
  "moduleParts": {
112
- "index.production.js": "526a-169"
112
+ "index.production.js": "92ad-169"
113
113
  },
114
114
  "imported": [],
115
115
  "importedBy": [
116
116
  {
117
- "uid": "526a-170"
117
+ "uid": "92ad-170"
118
118
  }
119
119
  ]
120
120
  },
121
- "526a-170": {
121
+ "92ad-170": {
122
122
  "id": "/packages/react-store/build/esm/index.js",
123
123
  "moduleParts": {
124
- "index.production.js": "526a-171"
124
+ "index.production.js": "92ad-171"
125
125
  },
126
126
  "imported": [
127
127
  {
128
- "uid": "526a-181"
128
+ "uid": "92ad-181"
129
129
  },
130
130
  {
131
- "uid": "526a-168"
131
+ "uid": "92ad-168"
132
132
  }
133
133
  ],
134
134
  "importedBy": [
135
135
  {
136
- "uid": "526a-178"
136
+ "uid": "92ad-178"
137
137
  },
138
138
  {
139
- "uid": "526a-176"
139
+ "uid": "92ad-176"
140
140
  }
141
141
  ]
142
142
  },
143
- "526a-172": {
143
+ "92ad-172": {
144
144
  "id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
145
145
  "moduleParts": {
146
- "index.production.js": "526a-173"
146
+ "index.production.js": "92ad-173"
147
147
  },
148
148
  "imported": [],
149
149
  "importedBy": [
150
150
  {
151
- "uid": "526a-178"
151
+ "uid": "92ad-178"
152
152
  },
153
153
  {
154
- "uid": "526a-176"
154
+ "uid": "92ad-176"
155
155
  }
156
156
  ]
157
157
  },
158
- "526a-174": {
158
+ "92ad-174": {
159
159
  "id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
160
160
  "moduleParts": {
161
- "index.production.js": "526a-175"
161
+ "index.production.js": "92ad-175"
162
162
  },
163
163
  "imported": [],
164
164
  "importedBy": [
165
165
  {
166
- "uid": "526a-178"
166
+ "uid": "92ad-178"
167
167
  },
168
168
  {
169
- "uid": "526a-176"
169
+ "uid": "92ad-176"
170
170
  }
171
171
  ]
172
172
  },
173
- "526a-176": {
173
+ "92ad-176": {
174
174
  "id": "/packages/router-core/build/esm/index.js",
175
175
  "moduleParts": {
176
- "index.production.js": "526a-177"
176
+ "index.production.js": "92ad-177"
177
177
  },
178
178
  "imported": [
179
179
  {
180
- "uid": "526a-172"
180
+ "uid": "92ad-172"
181
181
  },
182
182
  {
183
- "uid": "526a-174"
183
+ "uid": "92ad-174"
184
184
  },
185
185
  {
186
- "uid": "526a-170"
186
+ "uid": "92ad-170"
187
187
  }
188
188
  ],
189
189
  "importedBy": [
190
190
  {
191
- "uid": "526a-178"
191
+ "uid": "92ad-178"
192
192
  }
193
193
  ]
194
194
  },
195
- "526a-178": {
195
+ "92ad-178": {
196
196
  "id": "/packages/react-router/src/index.tsx",
197
197
  "moduleParts": {
198
- "index.production.js": "526a-179"
198
+ "index.production.js": "92ad-179"
199
199
  },
200
200
  "imported": [
201
201
  {
202
- "uid": "526a-166"
202
+ "uid": "92ad-166"
203
203
  },
204
204
  {
205
- "uid": "526a-180"
205
+ "uid": "92ad-180"
206
206
  },
207
207
  {
208
- "uid": "526a-170"
208
+ "uid": "92ad-170"
209
209
  },
210
210
  {
211
- "uid": "526a-172"
211
+ "uid": "92ad-172"
212
212
  },
213
213
  {
214
- "uid": "526a-174"
214
+ "uid": "92ad-174"
215
215
  },
216
216
  {
217
- "uid": "526a-176"
217
+ "uid": "92ad-176"
218
218
  }
219
219
  ],
220
220
  "importedBy": [],
221
221
  "isEntry": true
222
222
  },
223
- "526a-180": {
223
+ "92ad-180": {
224
224
  "id": "react",
225
225
  "moduleParts": {},
226
226
  "imported": [],
227
227
  "importedBy": [
228
228
  {
229
- "uid": "526a-178"
229
+ "uid": "92ad-178"
230
230
  }
231
231
  ],
232
232
  "isExternal": true
233
233
  },
234
- "526a-181": {
234
+ "92ad-181": {
235
235
  "id": "use-sync-external-store/shim/with-selector",
236
236
  "moduleParts": {},
237
237
  "imported": [],
238
238
  "importedBy": [
239
239
  {
240
- "uid": "526a-170"
240
+ "uid": "92ad-170"
241
241
  }
242
242
  ],
243
243
  "isExternal": true
@@ -8,12 +8,11 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import * as _tanstack_router_core from '@tanstack/router-core';
12
- import { AnyRoute, ResolveFullPath, ResolveId, AnySearchSchema, ResolveFullSearchSchema, ParsePathParams, MergeParamsFromParent, RouteContext, AnyContext, DefaultRoutesInfo, UseLoaderResult, AnyRouteProps, RegisteredRoutesInfo, LinkOptions, ToOptions, MatchRouteOptions, RouteByPath, ResolveRelativePath, NavigateOptions, Router, AnyRoutesInfo, RouterOptions, RegisteredRouter, RouteMatch } from '@tanstack/router-core';
13
- export * from '@tanstack/router-core';
14
11
  import * as React from 'react';
15
12
  import { NoInfer } from '@tanstack/react-store';
16
13
  export { useStore } from '@tanstack/react-store';
14
+ import { RouteConstraints, AnyRoute, ResolveFullPath, ResolveId, ResolveFullSearchSchema, ParsePathParams, MergeParamsFromParent, RouteContext, AnyContext, UseLoaderResult, AnyRouteProps, RoutePaths, RegisteredRouter, LinkOptions, ToOptions, MatchRouteOptions, RouteByPath, ResolveRelativePath, NavigateOptions, Router, RouterOptions, RouteMatch, RouteIds, RouteById, ParseRoute, RoutesById, AllParams } from '@tanstack/router-core';
15
+ export * from '@tanstack/router-core';
17
16
 
18
17
  declare module '@tanstack/router-core' {
19
18
  interface RegisterRouteComponent<TProps extends Record<string, any>> {
@@ -22,7 +21,7 @@ declare module '@tanstack/router-core' {
22
21
  interface RegisterRouteErrorComponent<TProps extends Record<string, any>> {
23
22
  RouteErrorComponent: RouteComponent<TProps>;
24
23
  }
25
- interface 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> {
24
+ interface 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, TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute> {
26
25
  useMatch: <TStrict extends boolean = true, TSelected = TContext>(opts?: {
27
26
  strict?: TStrict;
28
27
  select?: (search: TContext) => TSelected;
@@ -64,17 +63,17 @@ type RouteErrorComponentProps = {
64
63
  type AnyRouteComponent = RouteComponent<AnyRouteProps>;
65
64
  type RouteComponent<TProps> = AsyncRouteComponent<TProps>;
66
65
  declare function lazyRouteComponent<T extends Record<string, any>, TKey extends keyof T = 'default'>(importer: () => Promise<T>, exportName?: TKey): T[TKey] extends (props: infer TProps) => any ? AsyncRouteComponent<TProps> : never;
67
- type LinkPropsOptions<TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''> = LinkOptions<RegisteredRoutesInfo, TFrom, TTo> & {
66
+ type LinkPropsOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = LinkOptions<RegisteredRouter['routeTree'], TFrom, TTo> & {
68
67
  activeProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>);
69
68
  inactiveProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>);
70
69
  startTransition?: boolean;
71
70
  };
72
- type MakeUseMatchRouteOptions<TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions;
73
- type MakeMatchRouteOptions<TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions & {
74
- children?: ((params?: RouteByPath<RegisteredRoutesInfo, ResolveRelativePath<TFrom, NoInfer<TTo>>>['__types']['allParams']) => ReactNode) | React.ReactNode;
71
+ type MakeUseMatchRouteOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = ToOptions<RegisteredRouter['routeTree'], TFrom, TTo> & MatchRouteOptions;
72
+ type MakeMatchRouteOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = ToOptions<RegisteredRouter['routeTree'], TFrom, TTo> & MatchRouteOptions & {
73
+ children?: ((params?: RouteByPath<RegisteredRouter['routeTree'], ResolveRelativePath<TFrom, NoInfer<TTo>>>['__types']['allParams']) => ReactNode) | React.ReactNode;
75
74
  };
76
75
  type MakeLinkPropsOptions<TFrom extends string = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
77
- type MakeLinkOptions<TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {
76
+ type MakeLinkOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {
78
77
  children?: React.ReactNode | ((state: {
79
78
  isActive: boolean;
80
79
  }) => React.ReactNode);
@@ -86,57 +85,57 @@ type PromptProps = {
86
85
  };
87
86
  declare function useLinkProps<TFrom extends string = '/', TTo extends string = ''>(options: MakeLinkPropsOptions<TFrom, TTo>): React.AnchorHTMLAttributes<HTMLAnchorElement>;
88
87
  interface LinkComponent<TProps extends Record<string, any> = {}> {
89
- <TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''>(props: MakeLinkOptions<TFrom, TTo> & TProps & React.RefAttributes<HTMLAnchorElement>): ReactNode;
88
+ <TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''>(props: MakeLinkOptions<TFrom, TTo> & TProps & React.RefAttributes<HTMLAnchorElement>): ReactNode;
90
89
  }
91
90
  declare const Link: LinkComponent;
92
- declare function Navigate<TFrom extends RegisteredRoutesInfo['routePaths'] = '/', TTo extends string = ''>(props: NavigateOptions<RegisteredRoutesInfo, TFrom, TTo>): null;
91
+ declare function Navigate<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''>(props: NavigateOptions<RegisteredRouter['routeTree'], TFrom, TTo>): null;
93
92
  declare const matchIdsContext: React.Context<string[]>;
94
- declare const routerContext: React.Context<Router<AnyRoute, _tanstack_router_core.RoutesInfo<AnyRoute>, Record<string, any>>>;
95
- type RouterProps<TRouteConfig extends AnyRoute = AnyRoute, TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo, TDehydrated extends Record<string, any> = Record<string, any>> = Omit<RouterOptions<TRouteConfig, TDehydrated>, 'context'> & {
96
- router: Router<TRouteConfig, TRoutesInfo>;
97
- context?: Partial<RouterOptions<TRouteConfig, TDehydrated>['context']>;
93
+ declare const routerContext: React.Context<Router<AnyRoute, Record<string, any>>>;
94
+ type RouterProps<TRouteTree extends AnyRoute = AnyRoute, TDehydrated extends Record<string, any> = Record<string, any>> = Omit<RouterOptions<TRouteTree, TDehydrated>, 'context'> & {
95
+ router: Router<TRouteTree>;
96
+ context?: Partial<RouterOptions<TRouteTree, TDehydrated>['context']>;
98
97
  };
99
98
  declare function useRouterState<TSelected = RegisteredRouter['state']>(opts?: {
100
99
  select: (state: RegisteredRouter['state']) => TSelected;
101
100
  }): TSelected;
102
- declare function RouterProvider<TRouteConfig extends AnyRoute = AnyRoute, TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo, TDehydrated extends Record<string, any> = Record<string, any>>({ router, ...rest }: RouterProps<TRouteConfig, TRoutesInfo, TDehydrated>): JSX.Element;
101
+ declare function RouterProvider<TRouteTree extends AnyRoute = AnyRoute, TDehydrated extends Record<string, any> = Record<string, any>>({ router, ...rest }: RouterProps<TRouteTree, TDehydrated>): JSX.Element;
103
102
  declare function useRouter(): RegisteredRouter;
104
103
  declare function useMatches<T = RouteMatch[]>(opts?: {
105
104
  select?: (matches: RouteMatch[]) => T;
106
105
  }): T;
107
- declare function useMatch<TFrom extends keyof RegisteredRoutesInfo['routesById'], TStrict extends boolean = true, TRouteMatchState = RouteMatch<RegisteredRoutesInfo, RegisteredRoutesInfo['routesById'][TFrom]>, TSelected = TRouteMatchState>(opts?: {
106
+ declare function useMatch<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TRouteMatchState = RouteMatch<RegisteredRouter['routeTree'], RouteById<RegisteredRouter['routeTree'], TFrom>>, TSelected = TRouteMatchState>(opts?: {
108
107
  from: TFrom;
109
108
  strict?: TStrict;
110
109
  select?: (match: TRouteMatchState) => TSelected;
111
110
  }): TStrict extends true ? TRouteMatchState : TRouteMatchState | undefined;
112
- type RouteFromIdOrRoute<T> = T extends RegisteredRoutesInfo['routeUnion'] ? T : T extends keyof RegisteredRoutesInfo['routesById'] ? RegisteredRoutesInfo['routesById'][T] : T extends string ? keyof RegisteredRoutesInfo['routesById'] : never;
113
- declare function useLoader<TFrom extends keyof RegisteredRoutesInfo['routesById'], TStrict extends boolean = true, TLoader = RegisteredRoutesInfo['routesById'][TFrom]['__types']['loader'], TSelected = TLoader>(opts?: {
111
+ type RouteFromIdOrRoute<T> = T extends ParseRoute<RegisteredRouter['routeTree']> ? T : T extends RouteIds<RegisteredRouter['routeTree']> ? RoutesById<RegisteredRouter['routeTree']>[T] : T extends string ? RouteIds<RegisteredRouter['routeTree']> : never;
112
+ declare function useLoader<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TLoader = RouteById<RegisteredRouter['routeTree'], TFrom>['__types']['loader'], TSelected = TLoader>(opts?: {
114
113
  from: TFrom;
115
114
  strict?: TStrict;
116
115
  select?: (search: TLoader) => TSelected;
117
116
  }): TStrict extends true ? TSelected : TSelected | undefined;
118
- declare function useRouterContext<TFrom extends keyof RegisteredRoutesInfo['routesById'], TStrict extends boolean = true, TContext = RegisteredRoutesInfo['routesById'][TFrom]['__types']['context'], TSelected = TContext>(opts?: {
117
+ declare function useRouterContext<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TContext = RouteById<RegisteredRouter['routeTree'], TFrom>['__types']['context'], TSelected = TContext>(opts?: {
119
118
  from: TFrom;
120
119
  strict?: TStrict;
121
120
  select?: (search: TContext) => TSelected;
122
121
  }): TStrict extends true ? TSelected : TSelected | undefined;
123
- declare function useRouteContext<TFrom extends keyof RegisteredRoutesInfo['routesById'], TStrict extends boolean = true, TRouteContext = RegisteredRoutesInfo['routesById'][TFrom]['__types']['routeContext'], TSelected = TRouteContext>(opts?: {
122
+ declare function useRouteContext<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TRouteContext = RouteById<RegisteredRouter['routeTree'], TFrom>['__types']['routeContext'], TSelected = TRouteContext>(opts?: {
124
123
  from: TFrom;
125
124
  strict?: TStrict;
126
125
  select?: (search: TRouteContext) => TSelected;
127
126
  }): TStrict extends true ? TSelected : TSelected | undefined;
128
- declare function useSearch<TFrom extends keyof RegisteredRoutesInfo['routesById'], TStrict extends boolean = true, TSearch = RegisteredRoutesInfo['routesById'][TFrom]['__types']['fullSearchSchema'], TSelected = TSearch>(opts?: {
127
+ declare function useSearch<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TSearch = RouteById<RegisteredRouter['routeTree'], TFrom>['__types']['fullSearchSchema'], TSelected = TSearch>(opts?: {
129
128
  from: TFrom;
130
129
  strict?: TStrict;
131
130
  select?: (search: TSearch) => TSelected;
132
131
  }): TStrict extends true ? TSelected : TSelected | undefined;
133
- declare function useParams<TFrom extends keyof RegisteredRoutesInfo['routesById'] = '/', TDefaultSelected = RegisteredRoutesInfo['allParams'] & RegisteredRoutesInfo['routesById'][TFrom]['__types']['allParams'], TSelected = TDefaultSelected>(opts?: {
132
+ declare function useParams<TFrom extends RouteIds<RegisteredRouter['routeTree']> = '/', TDefaultSelected = AllParams<RegisteredRouter['routeTree']> & RouteById<RegisteredRouter['routeTree'], TFrom>['__types']['allParams'], TSelected = TDefaultSelected>(opts?: {
134
133
  from: TFrom;
135
134
  select?: (search: TDefaultSelected) => TSelected;
136
135
  }): TSelected;
137
- declare function useNavigate<TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/'>(defaultOpts?: {
136
+ declare function useNavigate<TDefaultFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/'>(defaultOpts?: {
138
137
  from?: TDefaultFrom;
139
- }): <TFrom extends unknown = TDefaultFrom, TTo extends string = "">(opts?: NavigateOptions<AnyRoutesInfo, TFrom, TTo> | undefined) => Promise<void>;
138
+ }): <TFrom extends unknown = TDefaultFrom, TTo extends string = "">(opts?: NavigateOptions<AnyRoute, TFrom, TTo> | undefined) => Promise<void>;
140
139
  declare function useMatchRoute(): <TFrom extends string = "/", TTo extends string = "">(opts: MakeUseMatchRouteOptions<TFrom, TTo>) => any;
141
140
  declare function MatchRoute<TFrom extends string = '/', TTo extends string = ''>(props: MakeMatchRouteOptions<TFrom, TTo>): any;
142
141
  declare function Outlet(): JSX.Element | null;
@@ -1118,6 +1118,7 @@
1118
1118
  });
1119
1119
  let routeCursor = foundRoute || this.routesById['__root__'];
1120
1120
  let matchedRoutes = [routeCursor];
1121
+ // let includingLayouts = true
1121
1122
  while (routeCursor?.parentRoute) {
1122
1123
  routeCursor = routeCursor.parentRoute;
1123
1124
  if (routeCursor) matchedRoutes.unshift(routeCursor);
@@ -1604,11 +1605,12 @@
1604
1605
  const ctx = _ctx;
1605
1606
  this.dehydratedData = ctx.payload;
1606
1607
  this.options.hydrate?.(ctx.payload);
1608
+ const routerState = ctx.router.state;
1607
1609
  this.__store.setState(s => {
1608
1610
  return {
1609
1611
  ...s,
1610
- ...ctx.router.state,
1611
- resolvedLocation: ctx.router.state.location
1612
+ ...routerState,
1613
+ resolvedLocation: routerState.location
1612
1614
  };
1613
1615
  });
1614
1616
  await this.load();