Files
klz-cables.com/.pnpm-store/v10/files/07/34325ae67180c8fb628f9573b8897687060f9c68ed871b8a85f017f50f1ec5f9a604088ea79a570cbb3e06294e28bc68576e4b08efd0f18ed0480cece7efe1
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

53 lines
2.0 KiB
Plaintext

import { AllPerformanceEntry, AllPerformanceEntryData, ReplayContainer, ReplayPerformanceEntry, WebVitalData } from '../types';
export interface Metric {
/**
* The current value of the metric.
*/
value: number;
/**
* The rating as to whether the metric value is within the "good",
* "needs improvement", or "poor" thresholds of the metric.
*/
rating: 'good' | 'needs-improvement' | 'poor';
/**
* Any performance entries relevant to the metric value calculation.
* The array may also be empty if the metric value was not based on any
* entries (e.g. a CLS value of 0 given no layout shifts).
*/
entries: PerformanceEntry[] | LayoutShift[];
}
interface LayoutShift extends PerformanceEntry {
value: number;
sources: LayoutShiftAttribution[];
hadRecentInput: boolean;
}
interface LayoutShiftAttribution {
node?: Node;
previousRect: DOMRectReadOnly;
currentRect: DOMRectReadOnly;
}
/**
* Handler creater for web vitals
*/
export declare function webVitalHandler(getter: (metric: Metric) => ReplayPerformanceEntry<AllPerformanceEntryData>, replay: ReplayContainer): (data: {
metric: Metric;
}) => void;
/**
* Create replay performance entries from the browser performance entries.
*/
export declare function createPerformanceEntries(entries: AllPerformanceEntry[]): ReplayPerformanceEntry<AllPerformanceEntryData>[];
/**
* Add a LCP event to the replay based on a LCP metric.
*/
export declare function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
/**
* Add a CLS event to the replay based on a CLS metric.
*/
export declare function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
/**
* Add an INP event to the replay based on an INP metric.
*/
export declare function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
export {};
//# sourceMappingURL=createPerformanceEntries.d.ts.map