import { RouterAdapter } from '../types/types'; /** * Create a TanStack Router adapter * * @param router - TanStack Router instance * @returns RouterAdapter for use with Vowel * * @example * ```ts * import { createRouter } from '@tanstack/react-router'; * import { tanstackRouterAdapter } from '@/lib/vowel/adapters'; * import { Vowel } from '@/lib/vowel'; * * const router = createRouter({ ... }); * * export const vowel = new Vowel({ * appId: 'your-app-id', * router: tanstackRouterAdapter(router) * }); * ``` */ export declare function tanstackRouterAdapter(router: any): RouterAdapter; /** * Create a TanStack Router adapter with useNavigate hook * This version is for use within React components * * @param navigate - navigate function from useNavigate() hook * @param pathname - current pathname from useLocation() or similar * @returns RouterAdapter * * @example * ```tsx * import { useNavigate, useRouterState } from '@tanstack/react-router'; * import { tanstackRouterHookAdapter } from '@/lib/vowel/adapters'; * import { Vowel } from '@/lib/vowel'; * * function App() { * const navigate = useNavigate(); * const pathname = useRouterState({ select: s => s.location.pathname }); * * const vowel = useMemo(() => new Vowel({ * appId: 'your-app-id', * router: tanstackRouterHookAdapter(navigate, pathname) * }), [navigate, pathname]); * * return ...; * } * ``` */ export declare function tanstackRouterHookAdapter(navigate: (opts: { to: string; }) => Promise, pathname: string): RouterAdapter; //# sourceMappingURL=tanstack.d.ts.map