/** * History Autocapture * * Captures pageview events when the user navigates using the History API * (pushState, replaceState) or browser back/forward buttons. * * Implements the Feature interface for consistent lifecycle management. */ import type { VTilt } from "../vtilt"; import type { VTiltConfig } from "../types"; import type { Feature, FeatureConfig } from "../feature"; export interface HistoryAutocaptureConfig extends FeatureConfig { } /** * History Autocapture Feature * * Automatically captures $pageview events on SPA navigation. * Implements the Feature interface for consistent lifecycle management. */ export declare class HistoryAutocapture implements Feature { readonly name = "HistoryAutocapture"; private _instance; private _config; private _isStarted; private _popstateListener; private _lastPathname; constructor(instance: VTilt, config?: HistoryAutocaptureConfig); /** * Extract history autocapture config from VTiltConfig. * Self-contained - vtilt.ts doesn't need to know config details. */ static extractConfig(config: VTiltConfig): HistoryAutocaptureConfig; get isEnabled(): boolean; get isStarted(): boolean; startIfEnabled(): void; stop(): void; onConfigUpdate(config: VTiltConfig): void; private _start; private _patchHistoryMethods; /** $pageleave must run while the current URL still reflects the page being left. */ private _emitPageleaveIfPathWillChange; private _setupPopstateListener; private _capturePageview; }