import type { Page } from "playwright";
export interface WebVitals {
    /** Largest Contentful Paint - loading performance */
    lcp: number | null;
    /** First Input Delay - interactivity */
    fid: number | null;
    /** Cumulative Layout Shift - visual stability */
    cls: number | null;
    /** Time to First Byte - server response time */
    ttfb: number | null;
    /** First Contentful Paint - initial content render */
    fcp: number | null;
    /** Total Blocking Time - main thread blocked time */
    tbt: number | null;
    /** Time to Interactive - page fully interactive */
    tti: number | null;
    /** DOM Content Loaded event time */
    domContentLoaded: number | null;
    /** Full page load time */
    loadComplete: number | null;
}
export interface PerformanceBudget {
    lcp?: number;
    cls?: number;
    ttfb?: number;
    fcp?: number;
    tbt?: number;
    tti?: number;
    loadComplete?: number;
}
export interface BudgetViolation {
    metric: string;
    actual: number;
    budget: number;
    unit: string;
}
export interface PerformanceResult {
    vitals: WebVitals;
    budgetViolations: BudgetViolation[];
    url: string;
    timestamp: string;
    pass: boolean;
}
/**
 * Collect Core Web Vitals and performance metrics from the current page.
 * Uses the Performance API and web-vitals library via CDN.
 */
export declare function collectWebVitals(page: Page): Promise<WebVitals>;
/**
 * Collect performance metrics from the Navigation Timing API without external deps.
 */
export declare function collectPerformanceMetrics(page: Page): Promise<WebVitals>;
/**
 * Check collected vitals against a performance budget.
 */
export declare function checkBudget(vitals: WebVitals, budget: PerformanceBudget): BudgetViolation[];
/**
 * Default performance budgets based on Google's "good" thresholds.
 */
export declare const DEFAULT_BUDGET: PerformanceBudget;
/**
 * Format performance results as a human-readable report.
 */
export declare function formatPerformanceResult(result: PerformanceResult): string;
//# sourceMappingURL=performance.d.ts.map