@sentry/browser-utils 11.0.0-alpha.0 → 11.0.0-alpha.2
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/component-name.js +28 -0
- package/build/cjs/component-name.js.map +1 -0
- package/build/cjs/getLocationHref.js +14 -0
- package/build/cjs/getLocationHref.js.map +1 -0
- package/build/cjs/index.js +36 -28
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrumentation/dom.js.map +1 -0
- package/build/cjs/{instrument → instrumentation}/history.js +5 -1
- 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/isBotUserAgent.js +15 -0
- package/build/cjs/isBotUserAgent.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} +45 -220
- package/build/cjs/performance/entries.js.map +1 -0
- package/build/cjs/performance/interactions.js +123 -0
- package/build/cjs/performance/interactions.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 +4 -30
- package/build/cjs/performance/utils.js.map +1 -0
- package/build/cjs/types.js.map +1 -1
- 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} +30 -21
- 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/component-name.js +26 -0
- package/build/esm/component-name.js.map +1 -0
- package/build/esm/getLocationHref.js +12 -0
- package/build/esm/getLocationHref.js.map +1 -0
- package/build/esm/index.js +18 -13
- package/build/esm/index.js.map +1 -1
- package/build/esm/instrumentation/dom.js.map +1 -0
- package/build/esm/{instrument → instrumentation}/history.js +5 -2
- 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/isBotUserAgent.js +13 -0
- package/build/esm/isBotUserAgent.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} +41 -213
- package/build/esm/performance/entries.js.map +1 -0
- package/build/esm/performance/interactions.js +121 -0
- package/build/esm/performance/interactions.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/types.js.map +1 -1
- 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} +25 -16
- 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/component-name.d.ts +9 -0
- package/build/types/component-name.d.ts.map +1 -0
- package/build/types/getLocationHref.d.ts +5 -0
- package/build/types/getLocationHref.d.ts.map +1 -0
- package/build/types/index.d.ts +18 -13
- package/build/types/index.d.ts.map +1 -1
- package/build/types/{instrument → instrumentation}/dom.d.ts +1 -1
- package/build/types/instrumentation/dom.d.ts.map +1 -0
- package/build/types/{instrument → instrumentation}/history.d.ts +8 -1
- 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/{instrument → instrumentation}/xhr.d.ts +1 -1
- package/build/types/instrumentation/xhr.d.ts.map +1 -0
- package/build/types/isBotUserAgent.d.ts +5 -0
- package/build/types/isBotUserAgent.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} +4 -51
- package/build/types/performance/entries.d.ts.map +1 -0
- package/build/types/performance/interactions.d.ts +48 -0
- package/build/types/performance/interactions.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/types.d.ts +38 -1
- package/build/types/types.d.ts.map +1 -1
- package/build/types/{metrics → web-vitals}/inp.d.ts +2 -1
- 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 +5 -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}/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}/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}/location.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}/lcp.d.ts +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { observe } from '../observe.js';
|
|
2
|
-
|
|
3
|
-
let interactionCountEstimate = 0;
|
|
4
|
-
let minKnownInteractionId = Infinity;
|
|
5
|
-
let maxKnownInteractionId = 0;
|
|
6
|
-
const updateEstimate = (entries) => {
|
|
7
|
-
entries.forEach((e) => {
|
|
8
|
-
if (e.interactionId) {
|
|
9
|
-
minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);
|
|
10
|
-
maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);
|
|
11
|
-
interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
let po;
|
|
16
|
-
const getInteractionCount = () => {
|
|
17
|
-
return po ? interactionCountEstimate : performance.interactionCount || 0;
|
|
18
|
-
};
|
|
19
|
-
const initInteractionCountPolyfill = () => {
|
|
20
|
-
if ("interactionCount" in performance || po) return;
|
|
21
|
-
po = observe("event", updateEstimate, {
|
|
22
|
-
type: "event",
|
|
23
|
-
buffered: true,
|
|
24
|
-
durationThreshold: 0
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { getInteractionCount, initInteractionCountPolyfill };
|
|
29
|
-
//# sourceMappingURL=interactionCountPolyfill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactionCountPolyfill.js","sources":["../../../../../../src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { observe } from '../observe';\n\ndeclare global {\n interface Performance {\n readonly interactionCount: number;\n }\n}\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries: PerformanceEventTiming[]) => {\n entries.forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po: PerformanceObserver | undefined;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = (): number => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nexport const initInteractionCountPolyfill = (): void => {\n if ('interactionCount' in performance || po) return;\n\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n });\n};\n"],"names":[],"mappings":";;AAwBA,IAAI,wBAAA,GAA2B,CAAA;AAC/B,IAAI,qBAAA,GAAwB,QAAA;AAC5B,IAAI,qBAAA,GAAwB,CAAA;AAE5B,MAAM,cAAA,GAAiB,CAAC,OAAA,KAAsC;AAC5D,EAAA,OAAA,CAAQ,QAAQ,CAAA,CAAA,KAAK;AACnB,IAAA,IAAI,EAAE,aAAA,EAAe;AACnB,MAAA,qBAAA,GAAwB,IAAA,CAAK,GAAA,CAAI,qBAAA,EAAuB,CAAA,CAAE,aAAa,CAAA;AACvE,MAAA,qBAAA,GAAwB,IAAA,CAAK,GAAA,CAAI,qBAAA,EAAuB,CAAA,CAAE,aAAa,CAAA;AAEvE,MAAA,wBAAA,GAA2B,qBAAA,GAAA,CAAyB,qBAAA,GAAwB,qBAAA,IAAyB,CAAA,GAAI,CAAA,GAAI,CAAA;AAAA,IAC/G;AAAA,EACF,CAAC,CAAA;AACH,CAAA;AAEA,IAAI,EAAA;AAMG,MAAM,sBAAsB,MAAc;AAC/C,EAAA,OAAO,EAAA,GAAK,wBAAA,GAA2B,WAAA,CAAY,gBAAA,IAAoB,CAAA;AACzE;AAKO,MAAM,+BAA+B,MAAY;AACtD,EAAA,IAAI,kBAAA,IAAsB,eAAe,EAAA,EAAI;AAE7C,EAAA,EAAA,GAAK,OAAA,CAAQ,SAAS,cAAA,EAAgB;AAAA,IACpC,IAAA,EAAM,OAAA;AAAA,IACN,QAAA,EAAU,IAAA;AAAA,IACV,iBAAA,EAAmB;AAAA,GACpB,CAAA;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runOnce.js","sources":["../../../../../src/metrics/web-vitals/lib/runOnce.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const runOnce = (cb: () => void) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n"],"names":[],"mappings":"AAgBO,MAAM,OAAA,GAAU,CAAC,EAAA,KAAmB;AACzC,EAAA,IAAI,MAAA,GAAS,KAAA;AACb,EAAA,OAAO,MAAM;AACX,IAAA,IAAI,CAAC,MAAA,EAAQ;AACX,MAAA,EAAA,EAAG;AACH,MAAA,MAAA,GAAS,IAAA;AAAA,IACX;AAAA,EACF,CAAA;AACF;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../../types.js';
|
|
2
|
-
|
|
3
|
-
const whenActivated = (callback) => {
|
|
4
|
-
if (WINDOW.document?.prerendering) {
|
|
5
|
-
addEventListener("prerenderingchange", () => callback(), true);
|
|
6
|
-
} else {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { whenActivated };
|
|
12
|
-
//# sourceMappingURL=whenActivated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenActivated.js","sources":["../../../../../src/metrics/web-vitals/lib/whenActivated.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\nexport const whenActivated = (callback: () => void) => {\n if (WINDOW.document?.prerendering) {\n addEventListener('prerenderingchange', () => callback(), true);\n } else {\n callback();\n }\n};\n"],"names":[],"mappings":";;AAkBO,MAAM,aAAA,GAAgB,CAAC,QAAA,KAAyB;AACrD,EAAA,IAAI,MAAA,CAAO,UAAU,YAAA,EAAc;AACjC,IAAA,gBAAA,CAAiB,oBAAA,EAAsB,MAAM,QAAA,EAAS,EAAG,IAAI,CAAA;AAAA,EAC/D,CAAA,MAAO;AACL,IAAA,QAAA,EAAS;AAAA,EACX;AACF;;;;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../../types.js';
|
|
2
|
-
import { addPageListener, removePageListener } from './globalListeners.js';
|
|
3
|
-
import { runOnce } from './runOnce.js';
|
|
4
|
-
|
|
5
|
-
const whenIdleOrHidden = (cb) => {
|
|
6
|
-
const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;
|
|
7
|
-
if (WINDOW.document?.visibilityState === "hidden") {
|
|
8
|
-
cb();
|
|
9
|
-
} else {
|
|
10
|
-
cb = runOnce(cb);
|
|
11
|
-
addPageListener("visibilitychange", cb, { once: true, capture: true });
|
|
12
|
-
rIC(() => {
|
|
13
|
-
cb();
|
|
14
|
-
removePageListener("visibilitychange", cb, { capture: true });
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { whenIdleOrHidden };
|
|
20
|
-
//# sourceMappingURL=whenIdleOrHidden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenIdleOrHidden.js","sources":["../../../../../src/metrics/web-vitals/lib/whenIdleOrHidden.ts"],"sourcesContent":["/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\nimport { runOnce } from './runOnce.js';\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nexport const whenIdleOrHidden = (cb: () => void) => {\n const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n // If the document is hidden, run the callback immediately, otherwise\n // race an idle callback with the next `visibilitychange` event.\n if (WINDOW.document?.visibilityState === 'hidden') {\n cb();\n } else {\n // eslint-disable-next-line no-param-reassign\n cb = runOnce(cb);\n addPageListener('visibilitychange', cb, { once: true, capture: true });\n rIC(() => {\n cb();\n // Remove the above event listener since no longer required.\n // See: https://github.com/GoogleChrome/web-vitals/issues/622\n removePageListener('visibilitychange', cb, { capture: true });\n });\n }\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,gBAAA,GAAmB,CAAC,EAAA,KAAmB;AAClD,EAAA,MAAM,GAAA,GAAM,MAAA,CAAO,mBAAA,IAAuB,MAAA,CAAO,UAAA;AAIjD,EAAA,IAAI,MAAA,CAAO,QAAA,EAAU,eAAA,KAAoB,QAAA,EAAU;AACjD,IAAA,EAAA,EAAG;AAAA,EACL,CAAA,MAAO;AAEL,IAAA,EAAA,GAAK,QAAQ,EAAE,CAAA;AACf,IAAA,eAAA,CAAgB,oBAAoB,EAAA,EAAI,EAAE,MAAM,IAAA,EAAM,OAAA,EAAS,MAAM,CAAA;AACrE,IAAA,GAAA,CAAI,MAAM;AACR,MAAA,EAAA,EAAG;AAGH,MAAA,kBAAA,CAAmB,kBAAA,EAAoB,EAAA,EAAI,EAAE,OAAA,EAAS,MAAM,CAAA;AAAA,IAC9D,CAAC,CAAA;AAAA,EACH;AACF;;;;"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { bindReporter } from './lib/bindReporter.js';
|
|
2
|
-
import { getActivationStart } from './lib/getActivationStart.js';
|
|
3
|
-
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';
|
|
4
|
-
import { initMetric } from './lib/initMetric.js';
|
|
5
|
-
import { observe } from './lib/observe.js';
|
|
6
|
-
import { whenActivated } from './lib/whenActivated.js';
|
|
7
|
-
|
|
8
|
-
const FCPThresholds = [1800, 3e3];
|
|
9
|
-
const onFCP = (onReport, opts = {}) => {
|
|
10
|
-
whenActivated(() => {
|
|
11
|
-
const visibilityWatcher = getVisibilityWatcher();
|
|
12
|
-
const metric = initMetric("FCP");
|
|
13
|
-
let report;
|
|
14
|
-
const handleEntries = (entries) => {
|
|
15
|
-
for (const entry of entries) {
|
|
16
|
-
if (entry.name === "first-contentful-paint") {
|
|
17
|
-
po.disconnect();
|
|
18
|
-
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
|
|
19
|
-
metric.value = Math.max(entry.startTime - getActivationStart(), 0);
|
|
20
|
-
metric.entries.push(entry);
|
|
21
|
-
report(true);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const po = observe("paint", handleEntries);
|
|
27
|
-
if (po) {
|
|
28
|
-
report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { FCPThresholds, onFCP };
|
|
34
|
-
//# sourceMappingURL=onFCP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onFCP.js","sources":["../../../../src/metrics/web-vitals/onFCP.ts"],"sourcesContent":["/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { whenActivated } from './lib/whenActivated';\nimport type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds: MetricRatingThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport: (metric: FCPMetric) => void, opts: ReportOpts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FCP');\n let report: ReturnType<typeof bindReporter>;\n\n const handleEntries = (entries: FCPMetric['entries']) => {\n for (const entry of entries) {\n if (entry.name === 'first-contentful-paint') {\n po!.disconnect();\n\n // Only report if the page wasn't hidden prior to the first paint.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n }\n };\n\n const po = observe('paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,aAAA,GAAwC,CAAC,IAAA,EAAM,GAAI;AAQzD,MAAM,KAAA,GAAQ,CAAC,QAAA,EAAuC,IAAA,GAAmB,EAAC,KAAM;AACrF,EAAA,aAAA,CAAc,MAAM;AAClB,IAAA,MAAM,oBAAoB,oBAAA,EAAqB;AAC/C,IAAA,MAAM,MAAA,GAAS,WAAW,KAAK,CAAA;AAC/B,IAAA,IAAI,MAAA;AAEJ,IAAA,MAAM,aAAA,GAAgB,CAAC,OAAA,KAAkC;AACvD,MAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,QAAA,IAAI,KAAA,CAAM,SAAS,wBAAA,EAA0B;AAC3C,UAAA,EAAA,CAAI,UAAA,EAAW;AAGf,UAAA,IAAI,KAAA,CAAM,SAAA,GAAY,iBAAA,CAAkB,eAAA,EAAiB;AAKvD,YAAA,MAAA,CAAO,QAAQ,IAAA,CAAK,GAAA,CAAI,MAAM,SAAA,GAAY,kBAAA,IAAsB,CAAC,CAAA;AACjE,YAAA,MAAA,CAAO,OAAA,CAAQ,KAAK,KAAK,CAAA;AACzB,YAAA,MAAA,CAAO,IAAI,CAAA;AAAA,UACb;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAA;AAEA,IAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,OAAA,EAAS,aAAa,CAAA;AAEzC,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,MAAA,GAAS,YAAA,CAAa,QAAA,EAAU,MAAA,EAAQ,aAAA,EAAe,KAAK,gBAAgB,CAAA;AAAA,IAC9E;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../types.js';
|
|
2
|
-
import { bindReporter } from './lib/bindReporter.js';
|
|
3
|
-
import { getActivationStart } from './lib/getActivationStart.js';
|
|
4
|
-
import { getNavigationEntry } from './lib/getNavigationEntry.js';
|
|
5
|
-
import { initMetric } from './lib/initMetric.js';
|
|
6
|
-
import { whenActivated } from './lib/whenActivated.js';
|
|
7
|
-
|
|
8
|
-
const TTFBThresholds = [800, 1800];
|
|
9
|
-
const whenReady = (callback) => {
|
|
10
|
-
if (WINDOW.document?.prerendering) {
|
|
11
|
-
whenActivated(() => whenReady(callback));
|
|
12
|
-
} else if (WINDOW.document?.readyState !== "complete") {
|
|
13
|
-
addEventListener("load", () => whenReady(callback), true);
|
|
14
|
-
} else {
|
|
15
|
-
setTimeout(callback);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const onTTFB = (onReport, opts = {}) => {
|
|
19
|
-
const metric = initMetric("TTFB");
|
|
20
|
-
const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
|
|
21
|
-
whenReady(() => {
|
|
22
|
-
const navigationEntry = getNavigationEntry();
|
|
23
|
-
if (navigationEntry) {
|
|
24
|
-
metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);
|
|
25
|
-
metric.entries = [navigationEntry];
|
|
26
|
-
report(true);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { TTFBThresholds, onTTFB };
|
|
32
|
-
//# sourceMappingURL=onTTFB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onTTFB.js","sources":["../../../../src/metrics/web-vitals/onTTFB.ts"],"sourcesContent":["/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getNavigationEntry } from './lib/getNavigationEntry';\nimport { initMetric } from './lib/initMetric';\nimport { whenActivated } from './lib/whenActivated';\nimport type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nexport const TTFBThresholds: MetricRatingThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback: () => void) => {\n if (WINDOW.document?.prerendering) {\n whenActivated(() => whenReady(callback));\n } else if (WINDOW.document?.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback);\n }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport: (metric: TTFBMetric) => void, opts: ReportOpts = {}) => {\n const metric = initMetric('TTFB');\n const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n whenReady(() => {\n const navigationEntry = getNavigationEntry();\n\n if (navigationEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n metric.entries = [navigationEntry];\n report(true);\n }\n });\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,cAAA,GAAyC,CAAC,GAAA,EAAK,IAAI;AAMhE,MAAM,SAAA,GAAY,CAAC,QAAA,KAAyB;AAC1C,EAAA,IAAI,MAAA,CAAO,UAAU,YAAA,EAAc;AACjC,IAAA,aAAA,CAAc,MAAM,SAAA,CAAU,QAAQ,CAAC,CAAA;AAAA,EACzC,CAAA,MAAA,IAAW,MAAA,CAAO,QAAA,EAAU,UAAA,KAAe,UAAA,EAAY;AACrD,IAAA,gBAAA,CAAiB,MAAA,EAAQ,MAAM,SAAA,CAAU,QAAQ,GAAG,IAAI,CAAA;AAAA,EAC1D,CAAA,MAAO;AAEL,IAAA,UAAA,CAAW,QAAQ,CAAA;AAAA,EACrB;AACF,CAAA;AAiBO,MAAM,MAAA,GAAS,CAAC,QAAA,EAAwC,IAAA,GAAmB,EAAC,KAAM;AACvF,EAAA,MAAM,MAAA,GAAS,WAAW,MAAM,CAAA;AAChC,EAAA,MAAM,SAAS,YAAA,CAAa,QAAA,EAAU,MAAA,EAAQ,cAAA,EAAgB,KAAK,gBAAgB,CAAA;AAEnF,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAE3C,IAAA,IAAI,eAAA,EAAiB;AAKnB,MAAA,MAAA,CAAO,QAAQ,IAAA,CAAK,GAAA,CAAI,gBAAgB,aAAA,GAAgB,kBAAA,IAAsB,CAAC,CAAA;AAE/E,MAAA,MAAA,CAAO,OAAA,GAAU,CAAC,eAAe,CAAA;AACjC,MAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IACb;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webVitalSpans.js","sources":["../../../src/metrics/webVitalSpans.ts"],"sourcesContent":["import type { Client, Integration, Span, SpanAttributes } from '@sentry/core';\nimport {\n browserPerformanceTimeOrigin,\n debug,\n getActiveSpan,\n getClient,\n getCurrentScope,\n getRootSpan,\n hasSpanStreamingEnabled,\n SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToStreamedSpanJSON,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { getCachedInteractionContext, INP_ENTRY_MAP, MAX_PLAUSIBLE_INP_DURATION } from './inp';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler } from './instrument';\nimport { isValidLcpMetric } from './lcp';\nimport type { WebVitalReportEvent } from './utils';\nimport { getBrowserPerformanceAPI, listenForWebVitalReportEvents, msToSec, supportsWebVital } from './utils';\nimport type { PerformanceEventTiming } from './instrument';\nimport { SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION } from '@sentry/conventions/attributes';\n\n// Locally-defined interfaces to avoid leaking bare global type references into the\n// generated .d.ts. The `declare global` augmentations in web-vitals/types.ts make these\n// available during this package's compilation but are NOT carried to consumers.\n// This mirrors the pattern used for PerformanceEventTiming in instrument.ts.\nexport interface LayoutShift extends PerformanceEntry {\n value: number;\n sources: Array<{ node: Node | null }>;\n hadRecentInput: boolean;\n}\n\nexport interface LargestContentfulPaint extends PerformanceEntry {\n readonly renderTime: DOMHighResTimeStamp;\n readonly loadTime: DOMHighResTimeStamp;\n readonly size: number;\n readonly id: string;\n readonly url: string;\n readonly element: Element | null;\n}\n\ninterface WebVitalSpanOptions {\n name: string;\n op: string;\n origin: string;\n metricName: 'lcp' | 'cls' | 'inp';\n value: number;\n attributes?: SpanAttributes;\n parentSpan?: Span;\n reportEvent?: WebVitalReportEvent;\n startTime: number;\n endTime?: number;\n /**\n * When `true`, the span is sent on its own as a v2 streamed span instead of being folded into a\n * transaction. Used for INP when span streaming is disabled (it reports late, so it can't ride\n * the pageload transaction).\n *\n * TODO(standalone): remove once the static (transaction) trace lifecycle is dropped and INP always streams.\n */\n standalone?: boolean;\n}\n\n/**\n * Emits a web vital span. When `standalone` is set it is sent on its own as a v2 streamed span;\n * otherwise it flows through the span streaming pipeline as a child of `parentSpan`.\n */\nexport function _emitWebVitalSpan(options: WebVitalSpanOptions): void {\n const {\n name,\n op,\n origin,\n metricName,\n value,\n attributes: passedAttributes,\n parentSpan,\n reportEvent,\n startTime,\n endTime,\n standalone,\n } = options;\n\n const routeName = getCurrentScope().getScopeData().transactionName;\n\n const attributes: SpanAttributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n [`browser.web_vital.${metricName}.value`]: value,\n // oxlint-disable-next-line typescript-eslint/no-deprecated\n [SENTRY_TRANSACTION]: routeName,\n [SENTRY_SEGMENT_NAME]: routeName,\n // Web vital score calculation relies on the user agent\n 'user_agent.original': WINDOW.navigator?.userAgent,\n ...passedAttributes,\n };\n\n if (parentSpan && spanToStreamedSpanJSON(parentSpan).attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] === 'pageload') {\n // for LCP and CLS, we collect the pageload span id as an attribute\n attributes['sentry.pageload.span_id'] = parentSpan.spanContext().spanId;\n }\n\n if (reportEvent) {\n attributes[`browser.web_vital.${metricName}.report_event`] = reportEvent;\n }\n\n // A standalone span is sent as a plain v2 span without running the `processSpan` hooks (see\n // `captureStandaloneSpanWithStaticCallback`), so Replay can't attach the replay id itself. Set it\n // here, mirroring Replay's `processSpan`, so INP keeps its replay association like it did on v1.\n // TODO(standalone): remove once the static (transaction) trace lifecycle is dropped and INP always\n // streams, at which point Replay's `processSpan` runs and attaches the replay id.\n if (standalone) {\n Object.assign(attributes, getReplayAttributes());\n }\n\n const span = startInactiveSpan({\n name,\n attributes,\n startTime,\n parentSpan,\n // oxlint-disable-next-line typescript/no-deprecated -- intentional during the v1/v2 transition; see the TODO(standalone) above\n experimental: standalone ? { standalone: true } : undefined,\n });\n\n if (span) {\n span.end(endTime ?? startTime);\n }\n}\n\ninterface ReplayIntegration extends Integration {\n getReplayId: (onlyIfSampled?: boolean) => string | undefined;\n getRecordingMode: () => 'session' | 'buffer' | undefined;\n}\n\n// TODO(standalone): remove once the static (transaction) trace lifecycle is dropped; Replay's\n// `processSpan` then attaches the replay id to the streamed INP span instead.\nfunction getReplayAttributes(): SpanAttributes {\n const replay = getClient()?.getIntegrationByName<ReplayIntegration>('Replay');\n const replayId = replay?.getReplayId(true);\n if (!replayId) {\n return {};\n }\n\n return {\n 'sentry.replay_id': replayId,\n 'sentry._internal.replay_is_buffering': replay!.getRecordingMode() === 'buffer' ? true : undefined,\n };\n}\n\n/**\n * Tracks LCP as a streamed span.\n */\nexport function trackLcpAsSpan(client: Client): void {\n let lcpValue = 0;\n let lcpEntry: LargestContentfulPaint | undefined;\n\n if (!supportsWebVital('largest-contentful-paint')) {\n return;\n }\n\n const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n if (!entry || !isValidLcpMetric(metric.value)) {\n return;\n }\n lcpValue = metric.value;\n lcpEntry = entry;\n }, true);\n\n listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n _sendLcpSpan(lcpValue, lcpEntry, pageloadSpan, reportEvent);\n cleanupLcpHandler();\n });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendLcpSpan(\n lcpValue: number,\n entry: LargestContentfulPaint | undefined,\n pageloadSpan?: Span,\n reportEvent?: WebVitalReportEvent,\n): void {\n if (!isValidLcpMetric(lcpValue)) {\n return;\n }\n\n DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n const performanceTimeOrigin = browserPerformanceTimeOrigin() || 0;\n const timeOrigin = msToSec(performanceTimeOrigin);\n const endTime = msToSec(performanceTimeOrigin + (entry?.startTime || 0));\n const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n const attributes: SpanAttributes = {};\n\n entry?.element && (attributes['browser.web_vital.lcp.element'] = htmlTreeAsString(entry.element));\n entry?.id && (attributes['browser.web_vital.lcp.id'] = entry.id);\n entry?.url && (attributes['browser.web_vital.lcp.url'] = entry.url);\n entry?.loadTime != null && (attributes['browser.web_vital.lcp.load_time'] = entry.loadTime);\n entry?.renderTime != null && (attributes['browser.web_vital.lcp.render_time'] = entry.renderTime);\n entry?.size != null && (attributes['browser.web_vital.lcp.size'] = entry.size);\n\n _emitWebVitalSpan({\n name,\n op: 'ui.webvital.lcp',\n origin: 'auto.http.browser.lcp',\n metricName: 'lcp',\n value: lcpValue,\n attributes,\n parentSpan: pageloadSpan,\n reportEvent,\n startTime: timeOrigin,\n endTime,\n });\n}\n\n/**\n * Tracks CLS as a streamed span.\n */\nexport function trackClsAsSpan(client: Client): void {\n let clsValue = 0;\n let clsEntry: LayoutShift | undefined;\n\n if (!supportsWebVital('layout-shift')) {\n return;\n }\n\n const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n if (!entry) {\n return;\n }\n clsValue = metric.value;\n clsEntry = entry;\n }, true);\n\n listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n _sendClsSpan(clsValue, clsEntry, pageloadSpan, reportEvent);\n cleanupClsHandler();\n });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendClsSpan(\n clsValue: number,\n entry: LayoutShift | undefined,\n pageloadSpan?: Span,\n reportEvent?: WebVitalReportEvent,\n): void {\n DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n const attributes: SpanAttributes = {};\n\n if (entry?.sources) {\n entry.sources.forEach((source, index) => {\n attributes[`browser.web_vital.cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n });\n }\n\n _emitWebVitalSpan({\n name,\n op: 'ui.webvital.cls',\n origin: 'auto.http.browser.cls',\n metricName: 'cls',\n value: clsValue,\n attributes,\n parentSpan: pageloadSpan,\n reportEvent,\n startTime,\n });\n}\n\n/**\n * Tracks INP and emits it as a web vital span, as a child of the interaction's root span.\n * Requires `registerInpInteractionListener()` to be called separately for cached element names and\n * root spans per interaction.\n */\nexport function trackInpAsSpan(client: Client): void {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !browserPerformanceTimeOrigin()) {\n return;\n }\n\n // INP reports late (on pagehide, after the pageload span has ended). With span streaming enabled\n // it rides the streaming pipeline. With streaming disabled it would be dropped as a late span, so\n // it is emitted as its own standalone v2 span instead (see `_emitWebVitalSpan`), overriding the\n // static trace lifecycle for INP only.\n // TODO(standalone): once the static trace lifecycle is dropped, INP always streams; drop this flag.\n const standalone = !hasSpanStreamingEnabled(client);\n\n const onInp: InstrumentationHandlerCallback = ({ metric }) => {\n if (metric.value == null) {\n return;\n }\n\n const duration = msToSec(metric.value);\n\n if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n return;\n }\n\n const entry = metric.entries.find(e => e.duration === metric.value && INP_ENTRY_MAP[e.name]);\n\n if (!entry) {\n return;\n }\n\n _sendInpSpan(metric.value, entry, standalone);\n };\n\n addInpInstrumentationHandler(onInp);\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendInpSpan(inpValue: number, entry: PerformanceEventTiming, standalone = false): void {\n DEBUG_BUILD && debug.log(`Sending INP span (${inpValue})`);\n\n const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n const duration = msToSec(inpValue);\n const interactionType = INP_ENTRY_MAP[entry.name];\n\n const cachedContext = getCachedInteractionContext(entry.interactionId);\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n const spanToUse = cachedContext?.span || rootSpan;\n const routeName = spanToUse\n ? spanToStreamedSpanJSON(spanToUse).name\n : getCurrentScope().getScopeData().transactionName;\n const name = cachedContext?.elementName || htmlTreeAsString(entry.target);\n\n _emitWebVitalSpan({\n name,\n op: `ui.interaction.${interactionType}`,\n origin: 'auto.http.browser.inp',\n metricName: 'inp',\n value: inpValue,\n attributes: {\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n // oxlint-disable-next-line typescript-eslint/no-deprecated\n [SENTRY_TRANSACTION]: routeName,\n [SENTRY_SEGMENT_NAME]: routeName,\n },\n startTime,\n endTime: startTime + duration,\n parentSpan: spanToUse,\n standalone,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;AAwEO,SAAS,kBAAkB,OAAA,EAAoC;AACpE,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA,EAAY,gBAAA;AAAA,IACZ,UAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,MAAM,SAAA,GAAY,eAAA,EAAgB,CAAE,YAAA,EAAa,CAAE,eAAA;AAEnD,EAAA,MAAM,UAAA,GAA6B;AAAA,IACjC,CAAC,gCAAgC,GAAG,MAAA;AAAA,IACpC,CAAC,4BAA4B,GAAG,EAAA;AAAA,IAChC,CAAC,iCAAiC,GAAG,CAAA;AAAA,IACrC,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAA,MAAA,CAAQ,GAAG,KAAA;AAAA;AA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"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAiCnD;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAIpG;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,IAAI,CAuFpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/instrument/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMvD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,GAAG,IAAI,CAIlG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAmDxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../src/instrument/location.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../src/instrument/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,cAAc,CAAC;AAIhF,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAI1F;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,IAAI,CA0IpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browserMetrics.d.ts","sourceRoot":"","sources":["../../../src/metrics/browserMetrics.ts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UAAU,EAAE,MAAM,GAAG,IAAI,CAW5G;AAmFD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,yBAAyB,EAChC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GACrC,IAAI,CAuDN;AAgGD,KAAK,kCAAkC,GACnC,sBAAsB,GACtB,cAAc,GAKd,gBAAgB,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,kCAAkC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAChH,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,EAAE,MAAM,CAAC,EAAE,GAC3F,IAAI,CAUN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elementTiming.d.ts","sourceRoot":"","sources":["../../../src/metrics/elementTiming.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;CAA+C,CAAC;AAErF;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAEvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inp.d.ts","sourceRoot":"","sources":["../../../src/metrics/inp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAMzC,UAAU,kBAAkB;IAC1B,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,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;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,8BAA8B,GAAG,sBAAsB,CAE7G;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,GAAG;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAC,GAAG,sBAAsB,CAAC,EAAE,CAAA;CAAE,KAAK,IAAI,GACnH,sBAAsB,CAAC;AAC1B,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAAE,KAAK,IAAI,GACxD,sBAAsB,CAAC;AA6J1B;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,sBAAsB,CAEjG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lcp.d.ts","sourceRoot":"","sources":["../../../src/metrics/lcp.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,IAAI,MAAM,CAEjF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTiming.d.ts","sourceRoot":"","sources":["../../../src/metrics/resourceTiming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAUnD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,cAAc,EAAE,yBAAyB,GAAG,cAAc,CA0CxG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userTiming.d.ts","sourceRoot":"","sources":["../../../src/metrics/userTiming.ts"],"names":[],"mappings":"AACA,OAA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AAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAuBjG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,cAAc,GAAG,0BAA0B,GAAG,OAAO,CAMhG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,IAAI,KAAK,IAAI,QA8BrG"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { CLSMetric, MetricRatingThresholds, ReportOpts } from './types';
|
|
2
|
-
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */
|
|
3
|
-
export declare const CLSThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
|
|
6
|
-
* calls the `callback` function once the value is ready to be reported, along
|
|
7
|
-
* with all `layout-shift` performance entries that were used in the metric
|
|
8
|
-
* value calculation. The reported value is a `double` (corresponding to a
|
|
9
|
-
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
|
|
10
|
-
*
|
|
11
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
12
|
-
* `callback` function will be called as soon as the value is initially
|
|
13
|
-
* determined as well as any time the value changes throughout the page
|
|
14
|
-
* lifespan.
|
|
15
|
-
*
|
|
16
|
-
* _**Important:** CLS should be continually monitored for changes throughout
|
|
17
|
-
* the entire lifespan of a page—including if the user returns to the page after
|
|
18
|
-
* it's been hidden/backgrounded. However, since browsers often [will not fire
|
|
19
|
-
* additional callbacks once the user has backgrounded a
|
|
20
|
-
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
|
|
21
|
-
* `callback` is always called when the page's visibility state changes to
|
|
22
|
-
* hidden. As a result, the `callback` function might be called multiple times
|
|
23
|
-
* during the same page load._
|
|
24
|
-
*/
|
|
25
|
-
export declare const onCLS: (onReport: (metric: CLSMetric) => void, opts?: ReportOpts) => void;
|
|
26
|
-
//# sourceMappingURL=getCLS.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCLS.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getCLS.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAoC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,KAAK,aAAc,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,SAAQ,UAAU,SAyC5E,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { INPMetric, INPReportOpts, MetricRatingThresholds } from './types';
|
|
2
|
-
/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */
|
|
3
|
-
export declare const INPThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [INP](https://web.dev/articles/inp) value for the current
|
|
6
|
-
* page and calls the `callback` function once the value is ready, along with
|
|
7
|
-
* the `event` performance entries reported for that interaction. The reported
|
|
8
|
-
* value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*
|
|
10
|
-
* A custom `durationThreshold` configuration option can optionally be passed
|
|
11
|
-
* to control what `event-timing` entries are considered for INP reporting. The
|
|
12
|
-
* default threshold is `40`, which means INP scores of less than 40 will not
|
|
13
|
-
* be reported. To avoid reporting no interactions in these cases, the library
|
|
14
|
-
* will fall back to the input delay of the first interaction. Note that this
|
|
15
|
-
* will not affect your 75th percentile INP value unless that value is also
|
|
16
|
-
* less than 40 (well below the recommended
|
|
17
|
-
* [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).
|
|
18
|
-
*
|
|
19
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
20
|
-
* `callback` function will be called as soon as the value is initially
|
|
21
|
-
* determined as well as any time the value changes throughout the page
|
|
22
|
-
* lifespan.
|
|
23
|
-
*
|
|
24
|
-
* _**Important:** INP should be continually monitored for changes throughout
|
|
25
|
-
* the entire lifespan of a page—including if the user returns to the page after
|
|
26
|
-
* it's been hidden/backgrounded. However, since browsers often [will not fire
|
|
27
|
-
* additional callbacks once the user has backgrounded a
|
|
28
|
-
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
|
|
29
|
-
* `callback` is always called when the page's visibility state changes to
|
|
30
|
-
* hidden. As a result, the `callback` function might be called multiple times
|
|
31
|
-
* during the same page load._
|
|
32
|
-
*/
|
|
33
|
-
export declare const onINP: (onReport: (metric: INPMetric) => void, opts?: INPReportOpts) => void;
|
|
34
|
-
//# sourceMappingURL=getINP.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getINP.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getINP.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEhF,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAmC,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,KAAK,aAAc,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,SAAQ,aAAa,SA+D/E,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { LCPMetric, MetricRatingThresholds, ReportOpts } from './types';
|
|
2
|
-
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */
|
|
3
|
-
export declare const LCPThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
|
|
6
|
-
* calls the `callback` function once the value is ready (along with the
|
|
7
|
-
* relevant `largest-contentful-paint` performance entry used to determine the
|
|
8
|
-
* value). The reported value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*
|
|
10
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
11
|
-
* `callback` function will be called any time a new `largest-contentful-paint`
|
|
12
|
-
* performance entry is dispatched, or once the final value of the metric has
|
|
13
|
-
* been determined.
|
|
14
|
-
*/
|
|
15
|
-
export declare const onLCP: (onReport: (metric: LCPMetric) => void, opts?: ReportOpts) => void;
|
|
16
|
-
//# sourceMappingURL=getLCP.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLCP.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getLCP.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAqC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,aAAc,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,SAAQ,UAAU,SAwE5E,CAAC"}
|
|
@@ -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"}
|