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 because it subscribes * the component to the router state used for matching. The returned function's * identity changes when that state changes. For imperative checks in event * handlers, get the router with `useRouter` and call `router.matchRoute(...)` * to avoid that subscription. * * @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 presented route matches above the current match, or select a * derived value from them. */ export declare function useParentMatches(opts?: UseMatchesBaseOptions & StructuralSharingOption): UseMatchesResult; /** * Read the presented route matches below the current match, or select a * derived value from them. */ export declare function useChildMatches(opts?: UseMatchesBaseOptions & StructuralSharingOption): UseMatchesResult;