@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/router.ts CHANGED
@@ -120,8 +120,6 @@ export type HydrationCtx = {
120
120
 
121
121
  export type InferRouterContext<TRouteTree extends AnyRoute> =
122
122
  TRouteTree extends RootRoute<
123
- any,
124
- any,
125
123
  any,
126
124
  any,
127
125
  any,
@@ -251,10 +249,9 @@ export interface RouterOptions<
251
249
  */
252
250
  defaultPreloadStaleTime?: number
253
251
  /**
254
- * Defaults to `routerOptions.defaultGcTime`, which defaults to 30 minutes.
255
- *
256
252
  * The default `defaultPreloadGcTime` a route should use if no preloadGcTime is provided.
257
253
  *
254
+ * @default 1_800_000 `(30 minutes)`
258
255
  * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultpreloadgctime-property)
259
256
  * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/preloading)
260
257
  */
@@ -267,10 +264,18 @@ export interface RouterOptions<
267
264
  */
268
265
  defaultOnCatch?: (error: Error, errorInfo: React.ErrorInfo) => void
269
266
  /**
270
- * If set to `true`, all navigation actions will wrapped in `document.startViewTransition()`.
267
+ * If `true`, route navigations will called using `document.startViewTransition()`.
268
+ *
269
+ * If the browser does not support this api, this option will be ignored.
270
+ *
271
+ * See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for more information on how this function works.
272
+ *
273
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultviewtransition-property)
271
274
  */
272
275
  defaultViewTransition?: boolean
273
276
  /**
277
+ * @default 'fuzzy'
278
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#notfoundmode-property)
274
279
  * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/not-found-errors#the-notfoundmode-option)
275
280
  */
276
281
  notFoundMode?: 'root' | 'fuzzy'
@@ -636,6 +641,7 @@ export class Router<
636
641
  defaultPendingMinMs: 500,
637
642
  context: undefined!,
638
643
  ...options,
644
+ notFoundMode: options.notFoundMode ?? 'fuzzy',
639
645
  stringifySearch: options.stringifySearch ?? defaultStringifySearch,
640
646
  parseSearch: options.parseSearch ?? defaultParseSearch,
641
647
  transformer: options.transformer ?? {