@sentry/browser-utils 11.0.0-alpha.0 → 11.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +29 -28
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrumentation/dom.js.map +1 -0
- package/build/cjs/instrumentation/history.js.map +1 -0
- package/build/cjs/instrumentation/location.js.map +1 -0
- package/build/cjs/{metrics/instrument.js → instrumentation/performanceObserver.js} +44 -32
- package/build/cjs/instrumentation/performanceObserver.js.map +1 -0
- package/build/cjs/instrumentation/xhr.js.map +1 -0
- package/build/cjs/{metrics → performance}/elementTiming.js +2 -2
- package/build/cjs/performance/elementTiming.js.map +1 -0
- package/build/cjs/{metrics/browserMetrics.js → performance/entries.js} +22 -175
- package/build/cjs/performance/entries.js.map +1 -0
- package/build/cjs/performance/resourceTiming.js.map +1 -0
- package/build/cjs/{metrics → performance}/userTiming.js +4 -3
- package/build/cjs/performance/userTiming.js.map +1 -0
- package/build/cjs/{metrics → performance}/utils.js +1 -27
- package/build/cjs/performance/utils.js.map +1 -0
- package/build/cjs/{metrics → web-vitals}/inp.js +4 -4
- package/build/cjs/web-vitals/inp.js.map +1 -0
- package/build/cjs/web-vitals/lcp.js.map +1 -0
- package/build/cjs/web-vitals/reportEvents.js +31 -0
- package/build/cjs/web-vitals/reportEvents.js.map +1 -0
- package/build/cjs/{metrics/webVitalSpans.js → web-vitals/spans.js} +11 -10
- package/build/cjs/web-vitals/spans.js.map +1 -0
- package/build/cjs/web-vitals/tracking.js +164 -0
- package/build/cjs/web-vitals/tracking.js.map +1 -0
- package/build/cjs/web-vitals/utils.js +99 -0
- package/build/cjs/web-vitals/utils.js.map +1 -0
- package/build/esm/index.js +14 -13
- package/build/esm/index.js.map +1 -1
- package/build/esm/instrumentation/dom.js.map +1 -0
- package/build/esm/instrumentation/history.js.map +1 -0
- package/build/esm/instrumentation/location.js.map +1 -0
- package/build/esm/{metrics/instrument.js → instrumentation/performanceObserver.js} +42 -30
- package/build/esm/instrumentation/performanceObserver.js.map +1 -0
- package/build/esm/instrumentation/xhr.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/{metrics → performance}/elementTiming.js +1 -1
- package/build/esm/performance/elementTiming.js.map +1 -0
- package/build/esm/{metrics/browserMetrics.js → performance/entries.js} +15 -166
- package/build/esm/performance/entries.js.map +1 -0
- package/build/esm/performance/resourceTiming.js.map +1 -0
- package/build/esm/{metrics → performance}/userTiming.js +4 -3
- package/build/esm/performance/userTiming.js.map +1 -0
- package/build/esm/{metrics → performance}/utils.js +3 -28
- package/build/esm/performance/utils.js.map +1 -0
- package/build/esm/{metrics → web-vitals}/inp.js +1 -1
- package/build/esm/web-vitals/inp.js.map +1 -0
- package/build/esm/web-vitals/lcp.js.map +1 -0
- package/build/esm/web-vitals/reportEvents.js +29 -0
- package/build/esm/web-vitals/reportEvents.js.map +1 -0
- package/build/esm/{metrics/webVitalSpans.js → web-vitals/spans.js} +7 -6
- package/build/esm/web-vitals/spans.js.map +1 -0
- package/build/esm/web-vitals/tracking.js +161 -0
- package/build/esm/web-vitals/tracking.js.map +1 -0
- package/build/esm/web-vitals/utils.js +91 -0
- package/build/esm/web-vitals/utils.js.map +1 -0
- package/build/types/index.d.ts +13 -12
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentation/dom.d.ts.map +1 -0
- package/build/types/instrumentation/history.d.ts.map +1 -0
- package/build/types/instrumentation/location.d.ts.map +1 -0
- package/build/types/{metrics/instrument.d.ts → instrumentation/performanceObserver.d.ts} +3 -3
- package/build/types/instrumentation/performanceObserver.d.ts.map +1 -0
- package/build/types/instrumentation/xhr.d.ts.map +1 -0
- package/build/types/performance/elementTiming.d.ts.map +1 -0
- package/build/types/{metrics/browserMetrics.d.ts → performance/entries.d.ts} +3 -46
- package/build/types/performance/entries.d.ts.map +1 -0
- package/build/types/performance/resourceTiming.d.ts.map +1 -0
- package/build/types/performance/userTiming.d.ts.map +1 -0
- package/build/types/{metrics → performance}/utils.d.ts +1 -17
- package/build/types/performance/utils.d.ts.map +1 -0
- package/build/types/web-vitals/inp.d.ts.map +1 -0
- package/build/types/web-vitals/lcp.d.ts.map +1 -0
- package/build/types/web-vitals/reportEvents.d.ts +18 -0
- package/build/types/web-vitals/reportEvents.d.ts.map +1 -0
- package/build/types/{metrics/webVitalSpans.d.ts → web-vitals/spans.d.ts} +3 -3
- package/build/types/web-vitals/spans.d.ts.map +1 -0
- package/build/types/web-vitals/tracking.d.ts +46 -0
- package/build/types/web-vitals/tracking.d.ts.map +1 -0
- package/build/types/{metrics/web-vitals/lib/globalListeners.d.ts → web-vitals/utils.d.ts} +16 -1
- package/build/types/web-vitals/utils.d.ts.map +1 -0
- package/package.json +4 -3
- package/build/cjs/instrument/dom.js.map +0 -1
- package/build/cjs/instrument/history.js.map +0 -1
- package/build/cjs/instrument/location.js.map +0 -1
- package/build/cjs/instrument/xhr.js.map +0 -1
- package/build/cjs/metrics/browserMetrics.js.map +0 -1
- package/build/cjs/metrics/elementTiming.js.map +0 -1
- package/build/cjs/metrics/inp.js.map +0 -1
- package/build/cjs/metrics/instrument.js.map +0 -1
- package/build/cjs/metrics/lcp.js.map +0 -1
- package/build/cjs/metrics/resourceTiming.js.map +0 -1
- package/build/cjs/metrics/userTiming.js.map +0 -1
- package/build/cjs/metrics/utils.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getCLS.js +0 -46
- package/build/cjs/metrics/web-vitals/getCLS.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getINP.js +0 -60
- package/build/cjs/metrics/web-vitals/getINP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getLCP.js +0 -62
- package/build/cjs/metrics/web-vitals/getLCP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/InteractionManager.js +0 -87
- package/build/cjs/metrics/web-vitals/lib/InteractionManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/LCPEntryManager.js +0 -11
- package/build/cjs/metrics/web-vitals/lib/LCPEntryManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/LayoutShiftManager.js +0 -27
- package/build/cjs/metrics/web-vitals/lib/LayoutShiftManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/bindReporter.js +0 -31
- package/build/cjs/metrics/web-vitals/lib/bindReporter.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/generateUniqueID.js +0 -8
- package/build/cjs/metrics/web-vitals/lib/generateUniqueID.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getActivationStart.js +0 -11
- package/build/cjs/metrics/web-vitals/lib/getActivationStart.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getNavigationEntry.js +0 -17
- package/build/cjs/metrics/web-vitals/lib/getNavigationEntry.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js +0 -44
- package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/globalListeners.js +0 -18
- package/build/cjs/metrics/web-vitals/lib/globalListeners.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/initMetric.js +0 -34
- package/build/cjs/metrics/web-vitals/lib/initMetric.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/initUnique.js +0 -16
- package/build/cjs/metrics/web-vitals/lib/initUnique.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/observe.js +0 -20
- package/build/cjs/metrics/web-vitals/lib/observe.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/onHidden.js +0 -16
- package/build/cjs/metrics/web-vitals/lib/onHidden.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js +0 -32
- package/build/cjs/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/runOnce.js +0 -14
- package/build/cjs/metrics/web-vitals/lib/runOnce.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/whenActivated.js +0 -14
- package/build/cjs/metrics/web-vitals/lib/whenActivated.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -22
- package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js.map +0 -1
- package/build/cjs/metrics/web-vitals/onFCP.js +0 -37
- package/build/cjs/metrics/web-vitals/onFCP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/onTTFB.js +0 -35
- package/build/cjs/metrics/web-vitals/onTTFB.js.map +0 -1
- package/build/cjs/metrics/webVitalSpans.js.map +0 -1
- package/build/esm/instrument/dom.js.map +0 -1
- package/build/esm/instrument/history.js.map +0 -1
- package/build/esm/instrument/location.js.map +0 -1
- package/build/esm/instrument/xhr.js.map +0 -1
- package/build/esm/metrics/browserMetrics.js.map +0 -1
- package/build/esm/metrics/elementTiming.js.map +0 -1
- package/build/esm/metrics/inp.js.map +0 -1
- package/build/esm/metrics/instrument.js.map +0 -1
- package/build/esm/metrics/lcp.js.map +0 -1
- package/build/esm/metrics/resourceTiming.js.map +0 -1
- package/build/esm/metrics/userTiming.js.map +0 -1
- package/build/esm/metrics/utils.js.map +0 -1
- package/build/esm/metrics/web-vitals/getCLS.js +0 -43
- package/build/esm/metrics/web-vitals/getCLS.js.map +0 -1
- package/build/esm/metrics/web-vitals/getINP.js +0 -57
- package/build/esm/metrics/web-vitals/getINP.js.map +0 -1
- package/build/esm/metrics/web-vitals/getLCP.js +0 -59
- package/build/esm/metrics/web-vitals/getLCP.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/InteractionManager.js +0 -85
- package/build/esm/metrics/web-vitals/lib/InteractionManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/LCPEntryManager.js +0 -9
- package/build/esm/metrics/web-vitals/lib/LCPEntryManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/LayoutShiftManager.js +0 -25
- package/build/esm/metrics/web-vitals/lib/LayoutShiftManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/bindReporter.js +0 -29
- package/build/esm/metrics/web-vitals/lib/bindReporter.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/generateUniqueID.js +0 -6
- package/build/esm/metrics/web-vitals/lib/generateUniqueID.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getActivationStart.js +0 -9
- package/build/esm/metrics/web-vitals/lib/getActivationStart.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getNavigationEntry.js +0 -15
- package/build/esm/metrics/web-vitals/lib/getNavigationEntry.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js +0 -42
- package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/globalListeners.js +0 -15
- package/build/esm/metrics/web-vitals/lib/globalListeners.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/initMetric.js +0 -32
- package/build/esm/metrics/web-vitals/lib/initMetric.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/initUnique.js +0 -14
- package/build/esm/metrics/web-vitals/lib/initUnique.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/observe.js +0 -18
- package/build/esm/metrics/web-vitals/lib/observe.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/onHidden.js +0 -14
- package/build/esm/metrics/web-vitals/lib/onHidden.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js +0 -29
- package/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/runOnce.js +0 -12
- package/build/esm/metrics/web-vitals/lib/runOnce.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/whenActivated.js +0 -12
- package/build/esm/metrics/web-vitals/lib/whenActivated.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -20
- package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js.map +0 -1
- package/build/esm/metrics/web-vitals/onFCP.js +0 -34
- package/build/esm/metrics/web-vitals/onFCP.js.map +0 -1
- package/build/esm/metrics/web-vitals/onTTFB.js +0 -32
- package/build/esm/metrics/web-vitals/onTTFB.js.map +0 -1
- package/build/esm/metrics/webVitalSpans.js.map +0 -1
- package/build/types/instrument/dom.d.ts.map +0 -1
- package/build/types/instrument/history.d.ts.map +0 -1
- package/build/types/instrument/location.d.ts.map +0 -1
- package/build/types/instrument/xhr.d.ts.map +0 -1
- package/build/types/metrics/browserMetrics.d.ts.map +0 -1
- package/build/types/metrics/elementTiming.d.ts.map +0 -1
- package/build/types/metrics/inp.d.ts.map +0 -1
- package/build/types/metrics/instrument.d.ts.map +0 -1
- package/build/types/metrics/lcp.d.ts.map +0 -1
- package/build/types/metrics/resourceTiming.d.ts.map +0 -1
- package/build/types/metrics/userTiming.d.ts.map +0 -1
- package/build/types/metrics/utils.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getCLS.d.ts +0 -26
- package/build/types/metrics/web-vitals/getCLS.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getINP.d.ts +0 -34
- package/build/types/metrics/web-vitals/getINP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getLCP.d.ts +0 -16
- package/build/types/metrics/web-vitals/getLCP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/InteractionManager.d.ts +0 -37
- package/build/types/metrics/web-vitals/lib/InteractionManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/LCPEntryManager.d.ts +0 -5
- package/build/types/metrics/web-vitals/lib/LCPEntryManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/LayoutShiftManager.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/LayoutShiftManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/bindReporter.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/bindReporter.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/generateUniqueID.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/generateUniqueID.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getActivationStart.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/getActivationStart.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getNavigationEntry.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/getNavigationEntry.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getVisibilityWatcher.d.ts +0 -5
- package/build/types/metrics/web-vitals/lib/getVisibilityWatcher.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/globalListeners.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/initMetric.d.ts +0 -21
- package/build/types/metrics/web-vitals/lib/initMetric.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/initUnique.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/initUnique.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/observe.d.ts +0 -23
- package/build/types/metrics/web-vitals/lib/observe.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/onHidden.d.ts +0 -15
- package/build/types/metrics/web-vitals/lib/onHidden.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts +0 -15
- package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/runOnce.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/runOnce.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/whenActivated.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/whenActivated.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/whenIdleOrHidden.d.ts +0 -6
- package/build/types/metrics/web-vitals/lib/whenIdleOrHidden.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/onFCP.d.ts +0 -11
- package/build/types/metrics/web-vitals/onFCP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/onTTFB.d.ts +0 -20
- package/build/types/metrics/web-vitals/onTTFB.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/base.d.ts +0 -103
- package/build/types/metrics/web-vitals/types/base.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/cls.d.ts +0 -58
- package/build/types/metrics/web-vitals/types/cls.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/fcp.d.ts +0 -47
- package/build/types/metrics/web-vitals/types/fcp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/inp.d.ts +0 -150
- package/build/types/metrics/web-vitals/types/inp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/lcp.d.ts +0 -74
- package/build/types/metrics/web-vitals/types/lcp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/ttfb.d.ts +0 -60
- package/build/types/metrics/web-vitals/types/ttfb.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types.d.ts +0 -78
- package/build/types/metrics/web-vitals/types.d.ts.map +0 -1
- package/build/types/metrics/webVitalSpans.d.ts.map +0 -1
- /package/build/cjs/{instrument → instrumentation}/dom.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/history.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/location.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/xhr.js +0 -0
- /package/build/cjs/{metrics → performance}/resourceTiming.js +0 -0
- /package/build/cjs/{metrics → web-vitals}/lcp.js +0 -0
- /package/build/esm/{instrument → instrumentation}/dom.js +0 -0
- /package/build/esm/{instrument → instrumentation}/history.js +0 -0
- /package/build/esm/{instrument → instrumentation}/location.js +0 -0
- /package/build/esm/{instrument → instrumentation}/xhr.js +0 -0
- /package/build/esm/{metrics → performance}/resourceTiming.js +0 -0
- /package/build/esm/{metrics → web-vitals}/lcp.js +0 -0
- /package/build/types/{instrument → instrumentation}/dom.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/history.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/location.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/xhr.d.ts +0 -0
- /package/build/types/{metrics → performance}/elementTiming.d.ts +0 -0
- /package/build/types/{metrics → performance}/resourceTiming.d.ts +0 -0
- /package/build/types/{metrics → performance}/userTiming.d.ts +0 -0
- /package/build/types/{metrics → web-vitals}/inp.d.ts +0 -0
- /package/build/types/{metrics → web-vitals}/lcp.d.ts +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface Interaction {
|
|
2
|
-
_latency: number;
|
|
3
|
-
id: number;
|
|
4
|
-
entries: PerformanceEventTiming[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare class InteractionManager {
|
|
10
|
-
/**
|
|
11
|
-
* A list of longest interactions on the page (by latency) sorted so the
|
|
12
|
-
* longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER
|
|
13
|
-
* long.
|
|
14
|
-
*/
|
|
15
|
-
_longestInteractionList: Interaction[];
|
|
16
|
-
/**
|
|
17
|
-
* A mapping of longest interactions by their interaction ID.
|
|
18
|
-
* This is used for faster lookup.
|
|
19
|
-
*/
|
|
20
|
-
_longestInteractionMap: Map<number, Interaction>;
|
|
21
|
-
_onBeforeProcessingEntry?: (entry: PerformanceEventTiming) => void;
|
|
22
|
-
_onAfterProcessingINPCandidate?: (interaction: Interaction) => void;
|
|
23
|
-
_resetInteractions(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the estimated p98 longest interaction based on the stored
|
|
26
|
-
* interaction candidates and the interaction count for the current page.
|
|
27
|
-
*/
|
|
28
|
-
_estimateP98LongestInteraction(): Interaction | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Takes a performance entry and adds it to the list of worst interactions
|
|
31
|
-
* if its duration is long enough to make it among the worst. If the
|
|
32
|
-
* entry is part of an existing interaction, it is merged and the latency
|
|
33
|
-
* and entries list is updated as needed.
|
|
34
|
-
*/
|
|
35
|
-
_processEntry(entry: PerformanceEventTiming): void;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=InteractionManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionManager.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/InteractionManager.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IAKjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC;AAkBD;;GAEG;AACH,qBAAa,kBAAkB;IAC7B;;;;OAIG;IAEH,uBAAuB,EAAE,WAAW,EAAE,CAAM;IAE5C;;;OAGG;IAEH,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAG7D,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAGnE,8BAA8B,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IAGpE,kBAAkB,SAIjB;IAED;;;OAGG;IAEH,8BAA8B,4BAO7B;IAED;;;;;OAKG;IAEH,aAAa,CAAC,KAAK,EAAE,sBAAsB,QAoD1C;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LCPEntryManager.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/LCPEntryManager.ts"],"names":[],"mappings":"AAiBA,qBAAa,eAAe;IAE1B,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAGnE,aAAa,CAAC,KAAK,EAAE,sBAAsB,QAE1C;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutShiftManager.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/LayoutShiftManager.ts"],"names":[],"mappings":"AAiBA,qBAAa,kBAAkB;IAE7B,iCAAiC,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAGjE,aAAa,SAAK;IAElB,eAAe,EAAE,WAAW,EAAE,CAAM;IAGpC,aAAa,CAAC,KAAK,EAAE,WAAW,QA2B/B;CACF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MetricRatingThresholds, MetricType } from '../types';
|
|
2
|
-
export declare const bindReporter: <MetricName extends MetricType['name']>(callback: (metric: Extract<MetricType, {
|
|
3
|
-
name: MetricName;
|
|
4
|
-
}>) => void, metric: Extract<MetricType, {
|
|
5
|
-
name: MetricName;
|
|
6
|
-
}>, thresholds: MetricRatingThresholds, reportAllChanges?: boolean) => (forceReport?: boolean) => void;
|
|
7
|
-
//# sourceMappingURL=bindReporter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindReporter.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/bindReporter.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAYnE,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,UAAU,CAAC,MAAM,CAAC,YACtD,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,KAAK,IAAI,UAC7D,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,cACrC,sBAAsB,qBACf,OAAO,oBAIJ,OAAO,SAkB9B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performantly generate a unique, 30-char string by combining a version
|
|
3
|
-
* number, the current timestamp with a 13-digit number integer.
|
|
4
|
-
* @return {string}
|
|
5
|
-
*/
|
|
6
|
-
export declare const generateUniqueID: () => string;
|
|
7
|
-
//# sourceMappingURL=generateUniqueID.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateUniqueID.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/generateUniqueID.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,cAE5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getActivationStart.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/getActivationStart.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,kBAAkB,QAAO,MAGrC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getNavigationEntry.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/getNavigationEntry.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,kBAAkB,oCAAgC,2BAA2B,GAAG,IAiB5F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getVisibilityWatcher.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/getVisibilityWatcher.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,oBAAoB;aA4BzB,eAAe;IAGnB,QAAQ,KAAK,MAAM,IAAI;CAI1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globalListeners.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/globalListeners.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,QAIjH;AACD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,QAIpH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { MetricType } from '../types';
|
|
2
|
-
export declare const initMetric: <MetricName extends MetricType['name']>(name: MetricName, value?: number) => {
|
|
3
|
-
name: MetricName;
|
|
4
|
-
value: number;
|
|
5
|
-
rating: 'good';
|
|
6
|
-
delta: number;
|
|
7
|
-
entries: (Extract<import("../types").CLSMetric, {
|
|
8
|
-
name: MetricName;
|
|
9
|
-
}> | Extract<import("../types").FCPMetric, {
|
|
10
|
-
name: MetricName;
|
|
11
|
-
}> | Extract<import("../types").INPMetric, {
|
|
12
|
-
name: MetricName;
|
|
13
|
-
}> | Extract<import("../types").LCPMetric, {
|
|
14
|
-
name: MetricName;
|
|
15
|
-
}> | Extract<import("../types").TTFBMetric, {
|
|
16
|
-
name: MetricName;
|
|
17
|
-
}>)["entries"];
|
|
18
|
-
id: string;
|
|
19
|
-
navigationType: "back-forward" | "back-forward-cache" | "navigate" | "prerender" | "reload" | "restore";
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=initMetric.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initMetric.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/initMetric.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,UAAU,GAAI,UAAU,SAAS,UAAU,CAAC,MAAM,CAAC,QAAQ,UAAU,UAAS,MAAM;;;YAoBrF,MAAM;;;cAL2B,UAAU;;;;;;;;;;;;CAWtD,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that accepts and identity object and a class object and returns
|
|
3
|
-
* either a new instance of that class or an existing instance, if the
|
|
4
|
-
* identity object was previously used.
|
|
5
|
-
*/
|
|
6
|
-
export declare function initUnique<T>(identityObj: object, ClassObj: new () => T): T;
|
|
7
|
-
//# sourceMappingURL=initUnique.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initUnique.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/initUnique.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,CAa3E"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface PerformanceEntryMap {
|
|
2
|
-
event: PerformanceEventTiming[];
|
|
3
|
-
'first-input': PerformanceEventTiming[];
|
|
4
|
-
'layout-shift': LayoutShift[];
|
|
5
|
-
'largest-contentful-paint': LargestContentfulPaint[];
|
|
6
|
-
'long-animation-frame': PerformanceLongAnimationFrameTiming[];
|
|
7
|
-
paint: PerformancePaintTiming[];
|
|
8
|
-
navigation: PerformanceNavigationTiming[];
|
|
9
|
-
resource: PerformanceResourceTiming[];
|
|
10
|
-
longtask: PerformanceEntry[];
|
|
11
|
-
element: PerformanceEntry[];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Takes a performance entry type and a callback function, and creates a
|
|
15
|
-
* `PerformanceObserver` instance that will observe the specified entry type
|
|
16
|
-
* with buffering enabled and call the callback _for each entry_.
|
|
17
|
-
*
|
|
18
|
-
* This function also feature-detects entry support and wraps the logic in a
|
|
19
|
-
* try/catch to avoid errors in unsupporting browsers.
|
|
20
|
-
*/
|
|
21
|
-
export declare const observe: <K extends keyof PerformanceEntryMap>(type: K, callback: (entries: PerformanceEntryMap[K]) => void, opts?: PerformanceObserverInit) => PerformanceObserver | undefined;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=observe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/observe.ts"],"names":[],"mappings":"AAgBA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,0BAA0B,EAAE,sBAAsB,EAAE,CAAC;IACrD,sBAAsB,EAAE,mCAAmC,EAAE,CAAC;IAC9D,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAC1C,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IAKtC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAG7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,MAAM,mBAAmB,QACnD,CAAC,YACG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,SAC7C,uBAAuB,KAC5B,mBAAmB,GAAG,SAmBxB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface OnHiddenCallback {
|
|
2
|
-
(event: Event): void;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Calls the passed callback when the page transitions to hidden.
|
|
6
|
-
*
|
|
7
|
-
* Uses the `visibilitychange` event exclusively, which is well-supported
|
|
8
|
-
* across all modern browsers.
|
|
9
|
-
*
|
|
10
|
-
* @param {OnHiddenCallback} cb - Callback to be executed when the page is hidden.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated use `whenIdleOrHidden` or `addPageListener('visibilitychange')` instead
|
|
13
|
-
*/
|
|
14
|
-
export declare const onHidden: (cb: OnHiddenCallback) => void;
|
|
15
|
-
//# sourceMappingURL=onHidden.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onHidden.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/onHidden.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,gBAAgB;IAC/B,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,OAAQ,gBAAgB,SAQ5C,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Performance {
|
|
3
|
-
readonly interactionCount: number;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Returns the `interactionCount` value using the native API (if available)
|
|
8
|
-
* or the polyfill estimate in this module.
|
|
9
|
-
*/
|
|
10
|
-
export declare const getInteractionCount: () => number;
|
|
11
|
-
/**
|
|
12
|
-
* Feature detects native support or initializes the polyfill if needed.
|
|
13
|
-
*/
|
|
14
|
-
export declare const initInteractionCountPolyfill: () => void;
|
|
15
|
-
//# sourceMappingURL=interactionCountPolyfill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactionCountPolyfill.d.ts","sourceRoot":"","sources":["../../../../../../src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts"],"names":[],"mappings":"AAkBA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;KACnC;CACF;AAmBD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAEtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,QAAO,IAQ/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runOnce.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/runOnce.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO,OAAQ,MAAM,IAAI,eAQrC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenActivated.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/whenActivated.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,aAAc,MAAM,IAAI,SAMjD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenIdleOrHidden.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/whenIdleOrHidden.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,OAAQ,MAAM,IAAI,SAkB9C,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';
|
|
2
|
-
/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */
|
|
3
|
-
export declare const FCPThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
|
|
6
|
-
* calls the `callback` function once the value is ready, along with the
|
|
7
|
-
* relevant `paint` performance entry used to determine the value. The reported
|
|
8
|
-
* value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*/
|
|
10
|
-
export declare const onFCP: (onReport: (metric: FCPMetric) => void, opts?: ReportOpts) => void;
|
|
11
|
-
//# sourceMappingURL=onFCP.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onFCP.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/onFCP.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAqC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,KAAK,aAAc,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,SAAQ,UAAU,SA+B5E,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';
|
|
2
|
-
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */
|
|
3
|
-
export declare const TTFBThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
|
|
6
|
-
* current page and calls the `callback` function once the page has loaded,
|
|
7
|
-
* along with the relevant `navigation` performance entry used to determine the
|
|
8
|
-
* value. The reported value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*
|
|
10
|
-
* Note, this function waits until after the page is loaded to call `callback`
|
|
11
|
-
* in order to ensure all properties of the `navigation` entry are populated.
|
|
12
|
-
* This is useful if you want to report on other metrics exposed by the
|
|
13
|
-
* [Navigation Timing API](https://w3c.github.io/navigation-timing/). For
|
|
14
|
-
* example, the TTFB metric starts from the page's [time
|
|
15
|
-
* origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it
|
|
16
|
-
* includes time spent on DNS lookup, connection negotiation, network latency,
|
|
17
|
-
* and server processing time.
|
|
18
|
-
*/
|
|
19
|
-
export declare const onTTFB: (onReport: (metric: TTFBMetric) => void, opts?: ReportOpts) => void;
|
|
20
|
-
//# sourceMappingURL=onTTFB.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onTTFB.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/onTTFB.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9E,uFAAuF;AACvF,eAAO,MAAM,cAAc,EAAE,sBAAoC,CAAC;AAiBlE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,aAAc,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,SAAQ,UAAU,SAkB9E,CAAC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { CLSMetric, CLSMetricWithAttribution } from './cls';
|
|
2
|
-
import type { FCPMetric, FCPMetricWithAttribution } from './fcp';
|
|
3
|
-
import type { INPMetric, INPMetricWithAttribution } from './inp';
|
|
4
|
-
import type { LCPMetric, LCPMetricWithAttribution } from './lcp';
|
|
5
|
-
import type { TTFBMetric, TTFBMetricWithAttribution } from './ttfb';
|
|
6
|
-
export interface Metric {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the metric (in acronym form).
|
|
9
|
-
*/
|
|
10
|
-
name: 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
|
|
11
|
-
/**
|
|
12
|
-
* The current value of the metric.
|
|
13
|
-
*/
|
|
14
|
-
value: number;
|
|
15
|
-
/**
|
|
16
|
-
* The rating as to whether the metric value is within the "good",
|
|
17
|
-
* "needs improvement", or "poor" thresholds of the metric.
|
|
18
|
-
*/
|
|
19
|
-
rating: 'good' | 'needs-improvement' | 'poor';
|
|
20
|
-
/**
|
|
21
|
-
* The delta between the current value and the last-reported value.
|
|
22
|
-
* On the first report, `delta` and `value` will always be the same.
|
|
23
|
-
*/
|
|
24
|
-
delta: number;
|
|
25
|
-
/**
|
|
26
|
-
* A unique ID representing this particular metric instance. This ID can
|
|
27
|
-
* be used by an analytics tool to dedupe multiple values sent for the same
|
|
28
|
-
* metric instance, or to group multiple deltas together and calculate a
|
|
29
|
-
* total. It can also be used to differentiate multiple different metric
|
|
30
|
-
* instances sent from the same page, which can happen if the page is
|
|
31
|
-
* restored from the back/forward cache (in that case new metrics object
|
|
32
|
-
* get created).
|
|
33
|
-
*/
|
|
34
|
-
id: string;
|
|
35
|
-
/**
|
|
36
|
-
* Any performance entries relevant to the metric value calculation.
|
|
37
|
-
* The array may also be empty if the metric value was not based on any
|
|
38
|
-
* entries (e.g. a CLS value of 0 given no layout shifts).
|
|
39
|
-
*/
|
|
40
|
-
entries: PerformanceEntry[];
|
|
41
|
-
/**
|
|
42
|
-
* The type of navigation.
|
|
43
|
-
*
|
|
44
|
-
* This will be the value returned by the Navigation Timing API (or
|
|
45
|
-
* `undefined` if the browser doesn't support that API), with the following
|
|
46
|
-
* exceptions:
|
|
47
|
-
* - 'back-forward-cache': for pages that are restored from the bfcache.
|
|
48
|
-
* - 'back_forward' is renamed to 'back-forward' for consistency.
|
|
49
|
-
* - 'prerender': for pages that were prerendered.
|
|
50
|
-
* - 'restore': for pages that were discarded by the browser and then
|
|
51
|
-
* restored by the user.
|
|
52
|
-
*/
|
|
53
|
-
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
|
|
54
|
-
}
|
|
55
|
-
/** The union of supported metric types. */
|
|
56
|
-
export type MetricType = CLSMetric | FCPMetric | INPMetric | LCPMetric | TTFBMetric;
|
|
57
|
-
/** The union of supported metric attribution types. */
|
|
58
|
-
export type MetricWithAttribution = CLSMetricWithAttribution | FCPMetricWithAttribution | INPMetricWithAttribution | LCPMetricWithAttribution | TTFBMetricWithAttribution;
|
|
59
|
-
/**
|
|
60
|
-
* The thresholds of metric's "good", "needs improvement", and "poor" ratings.
|
|
61
|
-
*
|
|
62
|
-
* - Metric values up to and including [0] are rated "good"
|
|
63
|
-
* - Metric values up to and including [1] are rated "needs improvement"
|
|
64
|
-
* - Metric values above [1] are "poor"
|
|
65
|
-
*
|
|
66
|
-
* | Metric value | Rating |
|
|
67
|
-
* | --------------- | ------------------- |
|
|
68
|
-
* | ≦ [0] | "good" |
|
|
69
|
-
* | > [0] and ≦ [1] | "needs improvement" |
|
|
70
|
-
* | > [1] | "poor" |
|
|
71
|
-
*/
|
|
72
|
-
export type MetricRatingThresholds = [number, number];
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated Use metric-specific function types instead, such as:
|
|
75
|
-
* `(metric: LCPMetric) => void`. If a single callback type is needed for
|
|
76
|
-
* multiple metrics, use `(metric: MetricType) => void`.
|
|
77
|
-
*/
|
|
78
|
-
export interface ReportCallback {
|
|
79
|
-
(metric: MetricType): void;
|
|
80
|
-
}
|
|
81
|
-
export interface ReportOpts {
|
|
82
|
-
reportAllChanges?: boolean;
|
|
83
|
-
}
|
|
84
|
-
export interface AttributionReportOpts extends ReportOpts {
|
|
85
|
-
generateTarget?: (el: Node | null) => string | undefined;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* The loading state of the document. Note: this value is similar to
|
|
89
|
-
* `document.readyState` but it subdivides the "interactive" state into the
|
|
90
|
-
* time before and after the DOMContentLoaded event fires.
|
|
91
|
-
*
|
|
92
|
-
* State descriptions:
|
|
93
|
-
* - `loading`: the initial document response has not yet been fully downloaded
|
|
94
|
-
* and parsed. This is equivalent to the corresponding `readyState` value.
|
|
95
|
-
* - `dom-interactive`: the document has been fully loaded and parsed, but
|
|
96
|
-
* scripts may not have yet finished loading and executing.
|
|
97
|
-
* - `dom-content-loaded`: the document is fully loaded and parsed, and all
|
|
98
|
-
* scripts (except `async` scripts) have loaded and finished executing.
|
|
99
|
-
* - `complete`: the document and all of its sub-resources have finished
|
|
100
|
-
* loading. This is equivalent to the corresponding `readyState` value.
|
|
101
|
-
*/
|
|
102
|
-
export type LoadState = 'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete';
|
|
103
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/types/base.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAEpE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAE7C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC;IAE9C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,oBAAoB,GAAG,WAAW,GAAG,SAAS,CAAC;CACzG;AAED,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEpF,uDAAuD;AACvD,MAAM,MAAM,qBAAqB,GAC7B,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;CAC1D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,UAAU,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { LoadState, Metric } from './base';
|
|
2
|
-
/**
|
|
3
|
-
* A CLS-specific version of the Metric object.
|
|
4
|
-
*/
|
|
5
|
-
export interface CLSMetric extends Metric {
|
|
6
|
-
name: 'CLS';
|
|
7
|
-
entries: LayoutShift[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* An object containing potentially-helpful debugging information that
|
|
11
|
-
* can be sent along with the CLS value for the current page visit in order
|
|
12
|
-
* to help identify issues happening to real-users in the field.
|
|
13
|
-
*/
|
|
14
|
-
export interface CLSAttribution {
|
|
15
|
-
/**
|
|
16
|
-
* By default, a selector identifying the first element (in document order)
|
|
17
|
-
* that shifted when the single largest layout shift that contributed to the
|
|
18
|
-
* page's CLS score occurred. If the `generateTarget` configuration option
|
|
19
|
-
* was passed, then this will instead be the return value of that function,
|
|
20
|
-
* falling back to the default if that returns null or undefined.
|
|
21
|
-
*/
|
|
22
|
-
largestShiftTarget?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The time when the single largest layout shift contributing to the page's
|
|
25
|
-
* CLS score occurred.
|
|
26
|
-
*/
|
|
27
|
-
largestShiftTime?: DOMHighResTimeStamp;
|
|
28
|
-
/**
|
|
29
|
-
* The layout shift score of the single largest layout shift contributing to
|
|
30
|
-
* the page's CLS score.
|
|
31
|
-
*/
|
|
32
|
-
largestShiftValue?: number;
|
|
33
|
-
/**
|
|
34
|
-
* The `LayoutShiftEntry` representing the single largest layout shift
|
|
35
|
-
* contributing to the page's CLS score. (Useful when you need more than just
|
|
36
|
-
* `largestShiftTarget`, `largestShiftTime`, and `largestShiftValue`).
|
|
37
|
-
*/
|
|
38
|
-
largestShiftEntry?: LayoutShift;
|
|
39
|
-
/**
|
|
40
|
-
* The first element source (in document order) among the `sources` list
|
|
41
|
-
* of the `largestShiftEntry` object. (Also useful when you need more than
|
|
42
|
-
* just `largestShiftTarget`, `largestShiftTime`, and `largestShiftValue`).
|
|
43
|
-
*/
|
|
44
|
-
largestShiftSource?: LayoutShiftAttribution;
|
|
45
|
-
/**
|
|
46
|
-
* The loading state of the document at the time when the largest layout
|
|
47
|
-
* shift contribution to the page's CLS score occurred (see `LoadState`
|
|
48
|
-
* for details).
|
|
49
|
-
*/
|
|
50
|
-
loadState?: LoadState;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* A CLS-specific version of the Metric object with attribution.
|
|
54
|
-
*/
|
|
55
|
-
export interface CLSMetricWithAttribution extends CLSMetric {
|
|
56
|
-
attribution: CLSAttribution;
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=cls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cls.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/types/cls.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM;IACvC,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,WAAW,EAAE,cAAc,CAAC;CAC7B"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { LoadState, Metric } from './base';
|
|
2
|
-
/**
|
|
3
|
-
* An FCP-specific version of the Metric object.
|
|
4
|
-
*/
|
|
5
|
-
export interface FCPMetric extends Metric {
|
|
6
|
-
name: 'FCP';
|
|
7
|
-
entries: PerformancePaintTiming[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* An object containing potentially-helpful debugging information that
|
|
11
|
-
* can be sent along with the FCP value for the current page visit in order
|
|
12
|
-
* to help identify issues happening to real-users in the field.
|
|
13
|
-
*/
|
|
14
|
-
export interface FCPAttribution {
|
|
15
|
-
/**
|
|
16
|
-
* The time from when the user initiates loading the page until when the
|
|
17
|
-
* browser receives the first byte of the response (a.k.a. TTFB).
|
|
18
|
-
*/
|
|
19
|
-
timeToFirstByte: number;
|
|
20
|
-
/**
|
|
21
|
-
* The delta between TTFB and the first contentful paint (FCP).
|
|
22
|
-
*/
|
|
23
|
-
firstByteToFCP: number;
|
|
24
|
-
/**
|
|
25
|
-
* The loading state of the document at the time when FCP `occurred (see
|
|
26
|
-
* `LoadState` for details). Ideally, documents can paint before they finish
|
|
27
|
-
* loading (e.g. the `loading` or `dom-interactive` phases).
|
|
28
|
-
*/
|
|
29
|
-
loadState: LoadState;
|
|
30
|
-
/**
|
|
31
|
-
* The `PerformancePaintTiming` entry corresponding to FCP.
|
|
32
|
-
*/
|
|
33
|
-
fcpEntry?: PerformancePaintTiming;
|
|
34
|
-
/**
|
|
35
|
-
* The `navigation` entry of the current page, which is useful for diagnosing
|
|
36
|
-
* general page load issues. This can be used to access `serverTiming` for example:
|
|
37
|
-
* navigationEntry?.serverTiming
|
|
38
|
-
*/
|
|
39
|
-
navigationEntry?: PerformanceNavigationTiming;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* An FCP-specific version of the Metric object with attribution.
|
|
43
|
-
*/
|
|
44
|
-
export interface FCPMetricWithAttribution extends FCPMetric {
|
|
45
|
-
attribution: FCPAttribution;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=fcp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fcp.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/types/fcp.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM;IACvC,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC;;;;OAIG;IACH,eAAe,CAAC,EAAE,2BAA2B,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,WAAW,EAAE,cAAc,CAAC;CAC7B"}
|