export { P as PageSpeedClient, a as analyzeUrl, c as createPageSpeedClient } from '../client-wkPNSYlT.cjs'; import { c as Diagnostic, f as LCPElement, M as MetricValue, b as CoreWebVitals, O as Opportunity, a as CategoryScores, C as CacheIssue, D as DetailedInsights, I as ImageIssue, L as LCPBreakdown, h as LegacyJSIssue, i as LongTask, R as RenderBlockingResource, T as ThirdPartyIssue, U as UnusedCodeIssue } from '../index-ccc21brR.cjs'; import { e as PageSpeedResponse, C as Category } from '../index-CBmIhSX_.cjs'; /** * @silverassist/performance-toolkit * * PageSpeed data extractors for scores, metrics, opportunities, and diagnostics. * * @module pagespeed/extractors * @author Miguel Colmenares * @license PolyForm-Noncommercial-1.0.0 */ type LighthouseResult = PageSpeedResponse["lighthouseResult"]; type LighthouseAudit = LighthouseResult["audits"][string]; /** * Extracts category scores from Lighthouse result */ declare function extractScores(result: LighthouseResult): CategoryScores; /** * Extracts Core Web Vitals metrics from audits */ declare function extractMetrics(result: LighthouseResult): CoreWebVitals; /** * Extracts a single metric value from audit */ declare function extractMetricValue(audit?: LighthouseAudit): MetricValue; /** * Extracts LCP element information */ declare function extractLCPElement(result: LighthouseResult): LCPElement | undefined; /** * Extracts performance improvement opportunities */ declare function extractOpportunities(result: LighthouseResult): Opportunity[]; /** * Extracts diagnostic information */ declare function extractDiagnostics(result: LighthouseResult): Diagnostic[]; /** * @silverassist/performance-toolkit * * Detailed insights extractors for AI agents and actionable data. * * @module pagespeed/insights * @author Miguel Colmenares * @license PolyForm-Noncommercial-1.0.0 */ type LighthouseAudits = PageSpeedResponse["lighthouseResult"]["audits"]; /** * Extracts all detailed insights for actionable improvements */ declare function extractDetailedInsights(audits: LighthouseAudits, analyzedUrl?: string): DetailedInsights; /** * Extracts resources with poor cache policies */ declare function extractCacheIssues(audits: LighthouseAudits): CacheIssue[]; /** * Extracts image optimization issues from multiple audits */ declare function extractImageIssues(audits: LighthouseAudits): ImageIssue[]; /** * Extracts unused JavaScript or CSS */ declare function extractUnusedCode(audits: LighthouseAudits, auditId: "unused-javascript" | "unused-css-rules", hostDomain: string): UnusedCodeIssue[]; /** * Extracts legacy JavaScript polyfills */ declare function extractLegacyJavaScript(audits: LighthouseAudits): LegacyJSIssue[]; /** * Extracts third-party script impact */ declare function extractThirdParties(audits: LighthouseAudits): ThirdPartyIssue[]; /** * Extracts long tasks blocking main thread */ declare function extractLongTasks(audits: LighthouseAudits): LongTask[]; /** * Extracts render-blocking resources */ declare function extractRenderBlockingResources(audits: LighthouseAudits): RenderBlockingResource[]; /** * Extracts LCP timing breakdown */ declare function extractLCPBreakdown(audits: LighthouseAudits): LCPBreakdown | undefined; /** * @silverassist/performance-toolkit * * PageSpeed utility functions for data extraction and formatting. * * @module pagespeed/utils * @author Miguel Colmenares * @license PolyForm-Noncommercial-1.0.0 */ /** * Formats cache TTL to human-readable string */ declare function formatCacheTTL(ms: number): string; /** * Extracts entity/third-party name from URL */ declare function extractEntityFromUrl(url: string): string | undefined; /** * Categorizes third-party by type */ declare function categorizeThirdParty(entity: string): string; /** * Checks if URL is first-party */ declare function isFirstParty(url: string, hostDomain: string): boolean; /** * Gets host domain from URL * @param url - The URL to extract domain from * @returns The host domain */ declare function getHostDomain(url: string): string; /** * @silverassist/performance-toolkit * * PageSpeed API constants and configuration values. * * @module pagespeed/constants * @author Miguel Colmenares * @license PolyForm-Noncommercial-1.0.0 */ /** PageSpeed Insights API base URL */ declare const PSI_API_URL = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed"; /** Default request timeout in milliseconds */ declare const DEFAULT_TIMEOUT = 60000; /** Default categories to analyze */ declare const DEFAULT_CATEGORIES: Category[]; /** Audit IDs for performance improvement opportunities */ declare const OPPORTUNITY_AUDITS: readonly ["render-blocking-resources", "unused-css-rules", "unused-javascript", "modern-image-formats", "offscreen-images", "unminified-css", "unminified-javascript", "efficient-animated-content", "uses-optimized-images", "uses-responsive-images", "server-response-time", "uses-text-compression", "uses-rel-preconnect", "uses-rel-preload", "font-display", "third-party-summary"]; /** Audit IDs for diagnostic information */ declare const DIAGNOSTIC_AUDITS: readonly ["mainthread-work-breakdown", "bootup-time", "dom-size", "critical-request-chains", "network-requests", "network-rtt", "network-server-latency", "long-tasks", "non-composited-animations", "unsized-images", "viewport", "no-document-write", "js-libraries"]; /** Third-party entity name patterns */ declare const THIRD_PARTY_PATTERNS: Record; export { DEFAULT_CATEGORIES, DEFAULT_TIMEOUT, DIAGNOSTIC_AUDITS, OPPORTUNITY_AUDITS, PSI_API_URL, THIRD_PARTY_PATTERNS, categorizeThirdParty, extractCacheIssues, extractDetailedInsights, extractDiagnostics, extractEntityFromUrl, extractImageIssues, extractLCPBreakdown, extractLCPElement, extractLegacyJavaScript, extractLongTasks, extractMetricValue, extractMetrics, extractOpportunities, extractRenderBlockingResources, extractScores, extractThirdParties, extractUnusedCode, formatCacheTTL, getHostDomain, isFirstParty };