import { PerformanceIssueEvent, PerformanceIssuesOptions } from '../types/issues'; /** Default threshold for Long Tasks detector (ms). */ export declare const DEFAULT_LONG_TASK_THRESHOLD_MS = 100; /** Default threshold for Long Animation Frames detector (ms). */ export declare const DEFAULT_LOAF_THRESHOLD_MS = 300; /** * Hard lower bound for custom detector thresholds (in ms). * Prevents near-zero values that would generate noisy, low-value issue reports. */ export declare const MIN_REPORTABLE_ISSUE_THRESHOLD_MS = 50; /** * Performance issues monitor. * * Observes browser Performance API entries and Web Vitals metrics, * validates them against configured thresholds and filtering rules, * and emits structured {@link PerformanceIssueEvent} payloads. * * Supported detectors: * - **Long Tasks** — cross-origin / iframe tasks with identifiable container * - **Long Animation Frames** — frames with at least one identifiable script * - **Web Vitals** — poor-rated Core Web Vitals (LCP, FCP, TTFB, INP, CLS) */ export declare class PerformanceIssuesMonitor { /** * Initializes enabled detectors based on the provided options. * * @param options - detector configuration (longTasks, longAnimationFrames, webVitals) * @param onIssue - callback invoked for each detected performance issue */ init(options: PerformanceIssuesOptions, onIssue: (event: PerformanceIssueEvent) => void): void; /** * Creates a PerformanceObserver for the given entry type. * Returns null if the browser does not support the entry type or the observer fails. * * @param type - performance entry type (e.g. "longtask", "long-animation-frame") * @param onEntry - callback invoked for each observed entry */ private observe; /** * Subscribes to Core Web Vitals via the web-vitals library. * Emits one issue per poor-rated metric; each metric name is reported at most once. * * @param onIssue - callback invoked for each poor metric * @param webVitalsOptions */ private observeWebVitals; }