@tanstack/react-router 1.47.5 → 1.48.1

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/src/fileRoute.ts CHANGED
@@ -12,16 +12,14 @@ import type {
12
12
  AnyContext,
13
13
  AnyPathParams,
14
14
  AnyRoute,
15
- AnySearchSchema,
15
+ AnySearchValidator,
16
+ DefaultSearchValidator,
16
17
  FileBaseRouteOptions,
17
18
  InferAllContext,
18
19
  ResolveAllContext,
19
20
  ResolveAllParamsFromParent,
20
- ResolveFullSearchSchema,
21
- ResolveFullSearchSchemaInput,
22
21
  ResolveLoaderData,
23
22
  ResolveRouteContext,
24
- ResolveSearchSchemaUsed,
25
23
  Route,
26
24
  RouteConstraints,
27
25
  RouteContext,
@@ -75,17 +73,7 @@ export class FileRoute<
75
73
  }
76
74
 
77
75
  createRoute = <
78
- TSearchSchemaInput = Record<string, unknown>,
79
- TSearchSchema = {},
80
- TSearchSchemaUsed = ResolveSearchSchemaUsed<
81
- TSearchSchemaInput,
82
- TSearchSchema
83
- >,
84
- TFullSearchSchemaInput = ResolveFullSearchSchemaInput<
85
- TParentRoute,
86
- TSearchSchemaUsed
87
- >,
88
- TFullSearchSchema = ResolveFullSearchSchema<TParentRoute, TSearchSchema>,
76
+ TSearchValidator extends AnySearchValidator = DefaultSearchValidator,
89
77
  TParams = Record<ParsePathParams<TPath>, string>,
90
78
  TAllParams = ResolveAllParamsFromParent<TParentRoute, TParams>,
91
79
  TRouteContextReturn = RouteContext,
@@ -97,10 +85,9 @@ export class FileRoute<
97
85
  TChildren = unknown,
98
86
  >(
99
87
  options?: FileBaseRouteOptions<
88
+ TParentRoute,
100
89
  TPath,
101
- TSearchSchemaInput,
102
- TSearchSchema,
103
- TFullSearchSchema,
90
+ TSearchValidator,
104
91
  TParams,
105
92
  TAllParams,
106
93
  TRouteContextReturn,
@@ -110,9 +97,10 @@ export class FileRoute<
110
97
  TLoaderDataReturn
111
98
  > &
112
99
  UpdatableRouteOptions<
100
+ TParentRoute,
113
101
  TId,
114
102
  TAllParams,
115
- TFullSearchSchema,
103
+ TSearchValidator,
116
104
  TLoaderData,
117
105
  TAllContext,
118
106
  TRouteContext,
@@ -124,11 +112,7 @@ export class FileRoute<
124
112
  TFullPath,
125
113
  TFilePath,
126
114
  TId,
127
- TSearchSchemaInput,
128
- TSearchSchema,
129
- TSearchSchemaUsed,
130
- TFullSearchSchemaInput,
131
- TFullSearchSchema,
115
+ TSearchValidator,
132
116
  TParams,
133
117
  TAllParams,
134
118
  TRouteContextReturn,
@@ -181,9 +165,10 @@ export function FileRouteLoader<
181
165
 
182
166
  export type LazyRouteOptions = Pick<
183
167
  UpdatableRouteOptions<
168
+ AnyRoute,
184
169
  string,
185
170
  AnyPathParams,
186
- AnySearchSchema,
171
+ AnySearchValidator,
187
172
  {},
188
173
  AnyContext,
189
174
  AnyContext,
package/src/index.tsx CHANGED
@@ -139,6 +139,7 @@ export {
139
139
  export type {
140
140
  AnyPathParams,
141
141
  SearchSchemaInput,
142
+ SearchValidatorAdapter,
142
143
  AnySearchSchema,
143
144
  AnyContext,
144
145
  RouteContext,
@@ -154,9 +155,6 @@ export type {
154
155
  MetaDescriptor,
155
156
  RouteLinkEntry,
156
157
  ParseParamsFn,
157
- SearchSchemaValidator,
158
- SearchSchemaValidatorObj,
159
- SearchSchemaValidatorFn,
160
158
  RouteLoaderFn,
161
159
  LoaderFnContext,
162
160
  SearchFilter,