import { StructuralSharingOption, ValidateSelected } from './structuralSharing.js'; import { AnyRouter, DeepPartial, Expand, MakeOptionalPathParams, MakeOptionalSearchParams, MakeRouteMatchUnion, MaskOptions, MatchRouteOptions, RegisteredRouter, ResolveRoute, ToSubOptionsProps } from '@tanstack/router-core'; import * as React from 'react'; declare module '@tanstack/router-core' { interface RouteMatchExtensions { meta?: Array; links?: Array; scripts?: Array; styles?: Array; headScripts?: Array; } } /** * Internal component that renders the router's active match tree with * suspense, error, and not-found boundaries. Rendered by `RouterProvider`. */ export declare function Matches(): import("react/jsx-runtime").JSX.Element; export type UseMatchRouteOptions = ToSubOptionsProps & DeepPartial> & DeepPartial> & MaskOptions & MatchRouteOptions; /** * Create a matcher function for testing locations against route definitions. * * The returned function accepts standard navigation options (`to`, `params`, * `search`, etc.) and returns either `false` (no match) or the matched params * object when the route matches the current or pending location. * * Useful for conditional rendering and active UI states. * * @returns A `matchRoute(options)` function that returns `false` or params. * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchRouteHook */ export declare function useMatchRoute(): (opts: UseMatchRouteOptions) => false | Expand["types"]["allParams"]>; export type MakeMatchRouteOptions = UseMatchRouteOptions & { children?: ((params?: Expand['types']['allParams']>) => React.ReactNode) | React.ReactNode; }; /** * Component that conditionally renders its children based on whether a route * matches the provided `from`/`to` options. If `children` is a function, it * receives the matched params object. * * @link https://tanstack.com/router/latest/docs/framework/react/api/router/matchRouteComponent */ export declare function MatchRoute(props: MakeMatchRouteOptions): any; export interface UseMatchesBaseOptions { select?: (matches: Array>) => ValidateSelected; } export type UseMatchesResult = unknown extends TSelected ? Array> : TSelected; export declare function useMatches(opts?: UseMatchesBaseOptions & StructuralSharingOption): UseMatchesResult; /** * Read the full array of active route matches or select a derived subset. * * Useful for debugging, breadcrumbs, or aggregating metadata across matches. * * @returns The array of matches (or the selected value). * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchesHook */ /** * Read the full array of active route matches or select a derived subset. * * Useful for debugging, breadcrumbs, or aggregating metadata across matches. * * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchesHook */ export declare function useParentMatches(opts?: UseMatchesBaseOptions & StructuralSharingOption): UseMatchesResult; /** * Read the array of active route matches that are children of the current * match (or selected parent) in the match tree. */ export declare function useChildMatches(opts?: UseMatchesBaseOptions & StructuralSharingOption): UseMatchesResult;