import type { LinkInterceptorOptions, NavigateOptions } from "./types.js"; /** * Default link interception predicate * * Returns true if the link should be intercepted for SPA navigation. * Filters out: * - Cross-origin links * - Links with download attribute * - Links with target other than _self * - Links with data-no-intercept attribute * * @param link - The anchor element to check * @returns true if the link should be intercepted */ export declare function defaultShouldIntercept(link: HTMLAnchorElement): boolean; /** * Set up link interception for SPA navigation * * Attaches a global click handler to intercept clicks on anchor elements * and call the onNavigate callback instead of performing a full page load. * * @param onNavigate - Callback when a link should navigate via SPA * @param options - Configuration options * @returns Cleanup function to remove the event listener * * @example * ```typescript * const cleanup = setupLinkInterception((url) => { * window.history.pushState({}, "", url); * fetchPartialUpdate(url); * }); * * // Later, to clean up: * cleanup(); * ``` */ export declare function setupLinkInterception(onNavigate: (url: string, options?: NavigateOptions) => void, options?: LinkInterceptorOptions): () => void; //# sourceMappingURL=link-interceptor.d.ts.map