chrome-devtools-frontend 1.0.1526203 → 1.0.1528866

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.
Files changed (328) hide show
  1. package/docs/ui_engineering.md +159 -0
  2. package/eslint.config.mjs +6 -1
  3. package/front_end/core/i18n/i18nImpl.ts +5 -0
  4. package/front_end/core/protocol_client/protocol_client.ts +1 -1
  5. package/front_end/core/root/Runtime.ts +28 -4
  6. package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
  7. package/front_end/core/sdk/CSSRule.ts +35 -6
  8. package/front_end/core/sdk/ChildTargetManager.ts +2 -0
  9. package/front_end/core/sdk/Connections.ts +2 -1
  10. package/front_end/core/sdk/DOMModel.ts +4 -0
  11. package/front_end/core/sdk/DebuggerModel.ts +5 -1
  12. package/front_end/core/sdk/NetworkManager.ts +214 -31
  13. package/front_end/core/sdk/PreloadingModel.ts +82 -17
  14. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
  15. package/front_end/core/sdk/RehydratingConnection.ts +29 -4
  16. package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
  17. package/front_end/core/sdk/SourceMap.ts +37 -11
  18. package/front_end/core/sdk/SourceMapManager.ts +13 -2
  19. package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -0
  20. package/front_end/core/sdk/TargetManager.ts +0 -22
  21. package/front_end/core/sdk/TraceObject.ts +8 -7
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
  23. package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
  24. package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
  25. package/front_end/entrypoints/main/MainImpl.ts +20 -25
  26. package/front_end/generated/InspectorBackendCommands.js +4 -3
  27. package/front_end/generated/protocol-mapping.d.ts +3 -1
  28. package/front_end/generated/protocol-proxy-api.d.ts +3 -1
  29. package/front_end/generated/protocol.ts +17 -3
  30. package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
  31. package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
  33. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
  34. package/front_end/models/extensions/ExtensionView.ts +3 -0
  35. package/front_end/models/javascript_metadata/NativeFunctions.js +23 -27
  36. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
  37. package/front_end/models/persistence/EditFileSystemView.ts +1 -0
  38. package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
  39. package/front_end/models/stack_trace/Trie.ts +9 -0
  40. package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
  41. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
  42. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
  43. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
  44. package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
  45. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
  46. package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
  47. package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
  48. package/front_end/panels/animation/AnimationTimeline.ts +1 -0
  49. package/front_end/panels/application/CookieItemsView.ts +1 -0
  50. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  51. package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
  52. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
  53. package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
  54. package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
  55. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
  56. package/front_end/panels/changes/CombinedDiffView.ts +1 -0
  57. package/front_end/panels/console/ConsoleInsightTeaser.ts +106 -0
  58. package/front_end/panels/console/ConsolePanel.ts +2 -0
  59. package/front_end/panels/console/ConsolePrompt.ts +12 -2
  60. package/front_end/panels/console/ConsoleSidebar.ts +1 -1
  61. package/front_end/panels/console/ConsoleView.ts +12 -0
  62. package/front_end/panels/console/ConsoleViewMessage.ts +27 -0
  63. package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
  64. package/front_end/panels/console/console.ts +6 -0
  65. package/front_end/panels/console/consoleInsightTeaser.css +55 -0
  66. package/front_end/panels/coverage/CoverageListView.ts +141 -277
  67. package/front_end/panels/coverage/CoverageView.ts +330 -324
  68. package/front_end/panels/coverage/coverageView.css +17 -0
  69. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
  70. package/front_end/panels/elements/LayoutPane.ts +1 -0
  71. package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
  72. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
  73. package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
  74. package/front_end/panels/emulation/DeviceModeView.ts +2 -0
  75. package/front_end/panels/explain/ActionDelegate.ts +1 -2
  76. package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
  77. package/front_end/panels/explain/explain.ts +0 -1
  78. package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
  79. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
  80. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
  81. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +12 -19
  82. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
  83. package/front_end/panels/media/MainView.ts +1 -0
  84. package/front_end/panels/media/TickingFlameChart.ts +2 -0
  85. package/front_end/panels/network/BlockedURLsPane.ts +111 -85
  86. package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
  87. package/front_end/panels/network/NetworkItemView.ts +1 -0
  88. package/front_end/panels/network/NetworkLogView.ts +9 -7
  89. package/front_end/panels/network/NetworkOverview.ts +1 -0
  90. package/front_end/panels/network/RequestCookiesView.ts +1 -0
  91. package/front_end/panels/network/RequestHTMLView.ts +1 -0
  92. package/front_end/panels/network/RequestInitiatorView.ts +1 -0
  93. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  94. package/front_end/panels/network/RequestPreviewView.ts +1 -0
  95. package/front_end/panels/network/RequestResponseView.ts +2 -1
  96. package/front_end/panels/network/RequestTimingView.ts +2 -0
  97. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
  98. package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
  99. package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
  100. package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
  101. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
  102. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
  103. package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
  104. package/front_end/panels/profiler/IsolateSelector.ts +1 -0
  105. package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
  106. package/front_end/panels/profiler/ProfileView.ts +1 -0
  107. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
  108. package/front_end/panels/recorder/RecorderPanel.ts +2 -0
  109. package/front_end/panels/screencast/ScreencastView.ts +1 -0
  110. package/front_end/panels/search/SearchView.ts +1 -0
  111. package/front_end/panels/settings/AISettingsTab.ts +3 -3
  112. package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -0
  113. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  114. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
  115. package/front_end/panels/sources/BreakpointsView.ts +1 -0
  116. package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
  117. package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
  118. package/front_end/panels/timeline/README.md +2 -2
  119. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
  120. package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
  121. package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
  122. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
  123. package/front_end/panels/timeline/TimelinePanel.ts +43 -62
  124. package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
  125. package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
  126. package/front_end/panels/timeline/components/Sidebar.ts +2 -0
  127. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
  128. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
  129. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
  130. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
  131. package/front_end/panels/web_audio/WebAudioView.ts +1 -0
  132. package/front_end/third_party/chromium/README.chromium +1 -1
  133. package/front_end/third_party/lighthouse/README.chromium +2 -2
  134. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
  135. package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
  136. package/front_end/third_party/lighthouse/locales/ar.json +107 -455
  137. package/front_end/third_party/lighthouse/locales/bg.json +96 -444
  138. package/front_end/third_party/lighthouse/locales/ca.json +96 -444
  139. package/front_end/third_party/lighthouse/locales/cs.json +96 -444
  140. package/front_end/third_party/lighthouse/locales/da.json +96 -444
  141. package/front_end/third_party/lighthouse/locales/de.json +96 -444
  142. package/front_end/third_party/lighthouse/locales/el.json +96 -444
  143. package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
  144. package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
  145. package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
  146. package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
  147. package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
  148. package/front_end/third_party/lighthouse/locales/es.json +96 -444
  149. package/front_end/third_party/lighthouse/locales/fi.json +96 -444
  150. package/front_end/third_party/lighthouse/locales/fil.json +96 -444
  151. package/front_end/third_party/lighthouse/locales/fr.json +96 -444
  152. package/front_end/third_party/lighthouse/locales/he.json +118 -466
  153. package/front_end/third_party/lighthouse/locales/hi.json +96 -444
  154. package/front_end/third_party/lighthouse/locales/hr.json +100 -448
  155. package/front_end/third_party/lighthouse/locales/hu.json +96 -444
  156. package/front_end/third_party/lighthouse/locales/id.json +96 -444
  157. package/front_end/third_party/lighthouse/locales/it.json +96 -444
  158. package/front_end/third_party/lighthouse/locales/ja.json +96 -444
  159. package/front_end/third_party/lighthouse/locales/ko.json +97 -445
  160. package/front_end/third_party/lighthouse/locales/lt.json +96 -444
  161. package/front_end/third_party/lighthouse/locales/lv.json +97 -445
  162. package/front_end/third_party/lighthouse/locales/nl.json +96 -444
  163. package/front_end/third_party/lighthouse/locales/no.json +96 -444
  164. package/front_end/third_party/lighthouse/locales/pl.json +96 -444
  165. package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
  166. package/front_end/third_party/lighthouse/locales/pt.json +97 -445
  167. package/front_end/third_party/lighthouse/locales/ro.json +97 -445
  168. package/front_end/third_party/lighthouse/locales/ru.json +96 -444
  169. package/front_end/third_party/lighthouse/locales/sk.json +96 -444
  170. package/front_end/third_party/lighthouse/locales/sl.json +96 -444
  171. package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
  172. package/front_end/third_party/lighthouse/locales/sr.json +96 -444
  173. package/front_end/third_party/lighthouse/locales/sv.json +96 -444
  174. package/front_end/third_party/lighthouse/locales/ta.json +96 -444
  175. package/front_end/third_party/lighthouse/locales/te.json +97 -445
  176. package/front_end/third_party/lighthouse/locales/th.json +96 -444
  177. package/front_end/third_party/lighthouse/locales/tr.json +96 -444
  178. package/front_end/third_party/lighthouse/locales/uk.json +96 -444
  179. package/front_end/third_party/lighthouse/locales/vi.json +96 -444
  180. package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
  181. package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
  182. package/front_end/third_party/lighthouse/locales/zh.json +96 -444
  183. package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
  184. package/front_end/third_party/lighthouse/report/bundle.js +10 -49
  185. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  186. package/front_end/third_party/web-vitals/README.chromium +5 -8
  187. package/front_end/third_party/web-vitals/package/README.md +191 -152
  188. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
  189. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
  190. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
  191. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
  192. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
  193. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
  194. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
  195. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
  196. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
  197. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
  198. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
  199. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
  200. package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
  201. package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
  202. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
  203. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
  204. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
  205. package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
  206. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
  207. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
  208. package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
  209. package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
  210. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
  211. package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
  212. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
  213. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
  214. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
  215. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
  216. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
  217. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
  218. package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
  219. package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
  220. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
  221. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
  222. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
  223. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
  224. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
  225. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
  226. package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
  227. package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
  228. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
  229. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
  230. package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
  231. package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
  232. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
  233. package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
  234. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
  235. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  236. package/front_end/third_party/web-vitals/package/package.json +4 -10
  237. package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
  238. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
  239. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
  240. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
  241. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
  242. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
  243. package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
  244. package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
  245. package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
  246. package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
  247. package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
  248. package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
  249. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
  250. package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
  251. package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
  252. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
  253. package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
  254. package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
  255. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
  256. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
  257. package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
  258. package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
  259. package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
  260. package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
  261. package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
  262. package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
  263. package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
  264. package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
  265. package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
  266. package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
  267. package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
  268. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
  269. package/front_end/third_party/web-vitals/rebuild.sh +32 -18
  270. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
  271. package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
  272. package/front_end/ui/components/buttons/Button.ts +1 -1
  273. package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
  274. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
  275. package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
  276. package/front_end/ui/legacy/EmptyWidget.ts +11 -1
  277. package/front_end/ui/legacy/InspectorView.ts +2 -0
  278. package/front_end/ui/legacy/SplitWidget.ts +2 -0
  279. package/front_end/ui/legacy/TabbedPane.ts +1 -0
  280. package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
  281. package/front_end/ui/legacy/Toolbar.ts +25 -4
  282. package/front_end/ui/legacy/UIUtils.ts +28 -13
  283. package/front_end/ui/legacy/ViewManager.ts +1 -0
  284. package/front_end/ui/legacy/Widget.ts +5 -0
  285. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
  286. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
  287. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
  288. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
  289. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
  290. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
  291. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
  292. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  293. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  294. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  295. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  296. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +9 -8
  297. package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
  298. package/mcp/README.md +7 -0
  299. package/mcp/mcp.ts +8 -0
  300. package/package.json +1 -1
  301. package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
  302. package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
  303. package/front_end/third_party/web-vitals/package/attribution.js +0 -18
  304. package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
  305. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
  306. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
  307. package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
  308. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
  309. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
  310. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
  311. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
  312. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
  313. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
  314. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
  315. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
  316. package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
  317. package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
  318. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
  319. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
  320. package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
  321. package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
  322. package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
  323. package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
  324. package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
  325. package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
  326. package/front_end/ui/components/text_editor/textEditor.css +0 -18
  327. package/front_end/ui/legacy/inlineButton.css +0 -22
  328. /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
@@ -1,4 +1,11 @@
1
- import type { LoadState, Metric } from './base.js';
1
+ import type { LoadState, Metric, ReportOpts, AttributionReportOpts } from './base.js';
2
+ export interface INPReportOpts extends ReportOpts {
3
+ durationThreshold?: number;
4
+ }
5
+ export interface INPAttributionReportOpts extends AttributionReportOpts {
6
+ durationThreshold?: number;
7
+ onEachInteraction?: (interaction: INPMetricWithAttribution) => void;
8
+ }
2
9
  /**
3
10
  * An INP-specific version of the Metric object.
4
11
  */
@@ -6,6 +13,21 @@ export interface INPMetric extends Metric {
6
13
  name: 'INP';
7
14
  entries: PerformanceEventTiming[];
8
15
  }
16
+ export interface INPLongestScriptSummary {
17
+ /**
18
+ * The longest Long Animation Frame script entry that intersects the INP
19
+ * interaction.
20
+ */
21
+ entry: PerformanceScriptTiming;
22
+ /**
23
+ * The INP subpart where the longest script ran.
24
+ */
25
+ subpart: 'input-delay' | 'processing-duration' | 'presentation-delay';
26
+ /**
27
+ * The amount of time the longest script intersected the INP duration.
28
+ */
29
+ intersectingDuration: number;
30
+ }
9
31
  /**
10
32
  * An object containing potentially-helpful debugging information that
11
33
  * can be sent along with the INP value for the current page visit in order
@@ -13,37 +35,21 @@ export interface INPMetric extends Metric {
13
35
  */
14
36
  export interface INPAttribution {
15
37
  /**
16
- * A selector identifying the element that the user first interacted with
17
- * as part of the frame where the INP candidate interaction occurred.
18
- * If this value is an empty string, that generally means the element was
19
- * removed from the DOM after the interaction.
38
+ * By default, a selector identifying the element that the user first
39
+ * interacted with as part of the frame where the INP candidate interaction
40
+ * occurred. If this value is an empty string, that generally means the
41
+ * element was removed from the DOM after the interaction. If the
42
+ * `generateTarget` configuration option was passed, then this will instead
43
+ * be the return value of that function, falling back to the default if that
44
+ * returns null or undefined.
20
45
  */
21
46
  interactionTarget: string;
22
- /**
23
- * A reference to the HTML element identified by `interactionTargetSelector`.
24
- * NOTE: for attribution purpose, a selector identifying the element is
25
- * typically more useful than the element itself. However, the element is
26
- * also made available in case additional context is needed.
27
- */
28
- interactionTargetElement: Node | undefined;
29
47
  /**
30
48
  * The time when the user first interacted during the frame where the INP
31
49
  * candidate interaction occurred (if more than one interaction occurred
32
50
  * within the frame, only the first time is reported).
33
51
  */
34
52
  interactionTime: DOMHighResTimeStamp;
35
- /**
36
- * The best-guess timestamp of the next paint after the interaction.
37
- * In general, this timestamp is the same as the `startTime + duration` of
38
- * the event timing entry. However, since `duration` values are rounded to
39
- * the nearest 8ms, it can sometimes appear that the paint occurred before
40
- * processing ended (which cannot happen). This value clamps the paint time
41
- * so it's always after `processingEnd` from the Event Timing API and
42
- * `renderStart` from the Long Animation Frame API (where available).
43
- * It also averages the duration values for all entries in the same
44
- * animation frame, which should be closer to the "real" value.
45
- */
46
- nextPaintTime: DOMHighResTimeStamp;
47
53
  /**
48
54
  * The type of interaction, based on the event type of the `event` entry
49
55
  * that corresponds to the interaction (i.e. the first `event` entry
@@ -52,20 +58,19 @@ export interface INPAttribution {
52
58
  * and for "keydown" or "keyup" events this will be "keyboard".
53
59
  */
54
60
  interactionType: 'pointer' | 'keyboard';
61
+ /**
62
+ * The best-guess timestamp of the next paint after the interaction.
63
+ * In general, this timestamp is the same as the `startTime + duration` of
64
+ * the event timing entry. However, since duration values are rounded to the
65
+ * nearest 8ms (and can be rounded down), this value is clamped to always be
66
+ * reported after the processing times.
67
+ */
68
+ nextPaintTime: DOMHighResTimeStamp;
55
69
  /**
56
70
  * An array of Event Timing entries that were processed within the same
57
71
  * animation frame as the INP candidate interaction.
58
72
  */
59
73
  processedEventEntries: PerformanceEventTiming[];
60
- /**
61
- * If the browser supports the Long Animation Frame API, this array will
62
- * include any `long-animation-frame` entries that intersect with the INP
63
- * candidate interaction's `startTime` and the `processingEnd` time of the
64
- * last event processed within that animation frame. If the browser does not
65
- * support the Long Animation Frame API or no `long-animation-frame` entries
66
- * are detect, this array will be empty.
67
- */
68
- longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
69
74
  /**
70
75
  * The time from when the user interacted with the page until when the
71
76
  * browser was first able to start processing event listeners for that
@@ -94,6 +99,48 @@ export interface INPAttribution {
94
99
  * (e.g. usually in the `dom-interactive` phase) it can result in long delays.
95
100
  */
96
101
  loadState: LoadState;
102
+ /**
103
+ * If the browser supports the Long Animation Frame API, this array will
104
+ * include any `long-animation-frame` entries that intersect with the INP
105
+ * candidate interaction's `startTime` and the `processingEnd` time of the
106
+ * last event processed within that animation frame. If the browser does not
107
+ * support the Long Animation Frame API or no `long-animation-frame` entries
108
+ * are detected, this array will be empty.
109
+ */
110
+ longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
111
+ /**
112
+ * Summary information about the longest script entry intersecting the INP
113
+ * duration. Note, only script entries above 5 milliseconds are reported by
114
+ * the Long Animation Frame API.
115
+ */
116
+ longestScript?: INPLongestScriptSummary;
117
+ /**
118
+ * The total duration of Long Animation Frame scripts that intersect the INP
119
+ * duration excluding any forced style and layout (that is included in
120
+ * totalStyleAndLayout). Note, this is limited to scripts > 5 milliseconds.
121
+ */
122
+ totalScriptDuration?: number;
123
+ /**
124
+ * The total style and layout duration from any Long Animation Frames
125
+ * intersecting the INP interaction. This includes any end-of-frame style and
126
+ * layout duration + any forced style and layout duration.
127
+ */
128
+ totalStyleAndLayoutDuration?: number;
129
+ /**
130
+ * The off main-thread presentation delay from the end of the last Long
131
+ * Animation Frame (where available) until the INP end point.
132
+ */
133
+ totalPaintDuration?: number;
134
+ /**
135
+ * The total unattributed time not included in any of the previous totals.
136
+ * This includes scripts < 5 milliseconds and other timings not attributed
137
+ * by Long Animation Frame (including when a frame is < 50ms and so has no
138
+ * Long Animation Frame).
139
+ * When no Long Animation Frames are present this will be undefined, rather
140
+ * than everything being unattributed to make it clearer when it's expected
141
+ * to be small.
142
+ */
143
+ totalUnattributedDuration?: number;
97
144
  }
98
145
  /**
99
146
  * An INP-specific version of the Metric object with attribution.
@@ -13,9 +13,13 @@ export interface LCPMetric extends Metric {
13
13
  */
14
14
  export interface LCPAttribution {
15
15
  /**
16
- * The element corresponding to the largest contentful paint for the page.
16
+ * By default, a selector identifying the element corresponding to the
17
+ * largest contentful paint for the page. If the `generateTarget`
18
+ * configuration option was passed, then this will instead be the return
19
+ * value of that function, falling back to the default if that returns null
20
+ * or undefined.
17
21
  */
18
- element?: string;
22
+ target?: string;
19
23
  /**
20
24
  * The URL (if applicable) of the LCP image resource. If the LCP element
21
25
  * is a text node, this value will not be set.
@@ -2,7 +2,6 @@ export * from './types/base.js';
2
2
  export * from './types/polyfills.js';
3
3
  export * from './types/cls.js';
4
4
  export * from './types/fcp.js';
5
- export * from './types/fid.js';
6
5
  export * from './types/inp.js';
7
6
  export * from './types/lcp.js';
8
7
  export * from './types/ttfb.js';
@@ -30,7 +29,7 @@ declare global {
30
29
  interactionId: number;
31
30
  }
32
31
  interface LayoutShiftAttribution {
33
- node?: Node;
32
+ node: Node | null;
34
33
  previousRect: DOMRectReadOnly;
35
34
  currentRect: DOMRectReadOnly;
36
35
  }
@@ -47,8 +46,33 @@ declare global {
47
46
  readonly url: string;
48
47
  readonly element: Element | null;
49
48
  }
49
+ export type ScriptInvokerType = 'classic-script' | 'module-script' | 'event-listener' | 'user-callback' | 'resolve-promise' | 'reject-promise';
50
+ export type ScriptWindowAttribution = 'self' | 'descendant' | 'ancestor' | 'same-page' | 'other';
51
+ interface PerformanceScriptTiming extends PerformanceEntry {
52
+ readonly startTime: DOMHighResTimeStamp;
53
+ readonly duration: DOMHighResTimeStamp;
54
+ readonly name: string;
55
+ readonly entryType: string;
56
+ readonly invokerType: ScriptInvokerType;
57
+ readonly invoker: string;
58
+ readonly executionStart: DOMHighResTimeStamp;
59
+ readonly sourceURL: string;
60
+ readonly sourceFunctionName: string;
61
+ readonly sourceCharPosition: number;
62
+ readonly pauseDuration: DOMHighResTimeStamp;
63
+ readonly forcedStyleAndLayoutDuration: DOMHighResTimeStamp;
64
+ readonly window?: Window;
65
+ readonly windowAttribution: ScriptWindowAttribution;
66
+ }
50
67
  interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {
51
- renderStart: DOMHighResTimeStamp;
52
- duration: DOMHighResTimeStamp;
68
+ readonly startTime: DOMHighResTimeStamp;
69
+ readonly duration: DOMHighResTimeStamp;
70
+ readonly name: string;
71
+ readonly entryType: string;
72
+ readonly renderStart: DOMHighResTimeStamp;
73
+ readonly styleAndLayoutStart: DOMHighResTimeStamp;
74
+ readonly blockingDuration: DOMHighResTimeStamp;
75
+ readonly firstUIEventTimestamp: DOMHighResTimeStamp;
76
+ readonly scripts: PerformanceScriptTiming[];
53
77
  }
54
78
  }
@@ -17,7 +17,6 @@ export * from './types/base.js';
17
17
  export * from './types/polyfills.js';
18
18
  export * from './types/cls.js';
19
19
  export * from './types/fcp.js';
20
- export * from './types/fid.js';
21
20
  export * from './types/inp.js';
22
21
  export * from './types/lcp.js';
23
22
  export * from './types/ttfb.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-vitals",
3
- "version": "4.2.4",
3
+ "version": "5.1.0",
4
4
  "description": "Easily measure performance metrics in JavaScript",
5
5
  "type": "module",
6
6
  "typings": "dist/modules/index.d.ts",
@@ -31,10 +31,6 @@
31
31
  "types": "./dist/modules/onFCP.d.ts",
32
32
  "default": "./dist/modules/onFCP.js"
33
33
  },
34
- "./onFID.js": {
35
- "types": "./dist/modules/onFID.d.ts",
36
- "default": "./dist/modules/onFID.js"
37
- },
38
34
  "./onINP.js": {
39
35
  "types": "./dist/modules/onINP.d.ts",
40
36
  "default": "./dist/modules/onINP.js"
@@ -55,10 +51,6 @@
55
51
  "types": "./dist/modules/attribution/onFCP.d.ts",
56
52
  "default": "./dist/modules/attribution/onFCP.js"
57
53
  },
58
- "./attribution/onFID.js": {
59
- "types": "./dist/modules/attribution/onFID.d.ts",
60
- "default": "./dist/modules/attribution/onFID.js"
61
- },
62
54
  "./attribution/onINP.js": {
63
55
  "types": "./dist/modules/attribution/onINP.d.ts",
64
56
  "default": "./dist/modules/attribution/onINP.js"
@@ -92,6 +84,9 @@
92
84
  "release:major": "npm version major -m 'Release v%s' && npm publish",
93
85
  "release:minor": "npm version minor -m 'Release v%s' && npm publish",
94
86
  "release:patch": "npm version patch -m 'Release v%s' && npm publish",
87
+ "release:alpha": "npm version prerelease --preid=alpha -m 'Release v%s' && npm publish --tag next",
88
+ "release:beta": "npm version prerelease --preid=beta -m 'Release v%s' && npm publish --tag next",
89
+ "release:rc": "npm version prerelease --preid=rc -m 'Release v%s' && npm publish --tag next",
95
90
  "test": "npm-run-all build test:unit -p -r test:e2e test:server",
96
91
  "test:e2e": "wdio wdio.conf.cjs",
97
92
  "test:server": "node test/server.js",
@@ -110,7 +105,6 @@
110
105
  "Core Web Vitals",
111
106
  "CLS",
112
107
  "FCP",
113
- "FID",
114
108
  "INP",
115
109
  "LCP",
116
110
  "TTFB"
@@ -26,5 +26,4 @@ export {INPThresholds} from '../onINP.js';
26
26
  export {LCPThresholds} from '../onLCP.js';
27
27
  export {TTFBThresholds} from '../onTTFB.js';
28
28
 
29
- export * from './deprecated.js';
30
29
  export * from '../types.js';
@@ -14,51 +14,24 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ import {LayoutShiftManager} from '../lib/LayoutShiftManager.js';
17
18
  import {getLoadState} from '../lib/getLoadState.js';
18
19
  import {getSelector} from '../lib/getSelector.js';
20
+ import {initUnique} from '../lib/initUnique.js';
19
21
  import {onCLS as unattributedOnCLS} from '../onCLS.js';
20
22
  import {
21
23
  CLSAttribution,
22
24
  CLSMetric,
23
25
  CLSMetricWithAttribution,
24
- ReportOpts,
26
+ AttributionReportOpts,
25
27
  } from '../types.js';
26
28
 
27
29
  const getLargestLayoutShiftEntry = (entries: LayoutShift[]) => {
28
- return entries.reduce((a, b) => (a && a.value > b.value ? a : b));
30
+ return entries.reduce((a, b) => (a.value > b.value ? a : b));
29
31
  };
30
32
 
31
33
  const getLargestLayoutShiftSource = (sources: LayoutShiftAttribution[]) => {
32
- return sources.find((s) => s.node && s.node.nodeType === 1) || sources[0];
33
- };
34
-
35
- const attributeCLS = (metric: CLSMetric): CLSMetricWithAttribution => {
36
- // Use an empty object if no other attribution has been set.
37
- let attribution: CLSAttribution = {};
38
-
39
- if (metric.entries.length) {
40
- const largestEntry = getLargestLayoutShiftEntry(metric.entries);
41
- if (largestEntry && largestEntry.sources && largestEntry.sources.length) {
42
- const largestSource = getLargestLayoutShiftSource(largestEntry.sources);
43
- if (largestSource) {
44
- attribution = {
45
- largestShiftTarget: getSelector(largestSource.node),
46
- largestShiftTime: largestEntry.startTime,
47
- largestShiftValue: largestEntry.value,
48
- largestShiftSource: largestSource,
49
- largestShiftEntry: largestEntry,
50
- loadState: getLoadState(largestEntry.startTime),
51
- };
52
- }
53
- }
54
- }
55
-
56
- // Use Object.assign to set property to keep tsc happy.
57
- const metricWithAttribution: CLSMetricWithAttribution = Object.assign(
58
- metric,
59
- {attribution},
60
- );
61
- return metricWithAttribution;
34
+ return sources.find((s) => s.node?.nodeType === 1) || sources[0];
62
35
  };
63
36
 
64
37
  /**
@@ -84,8 +57,60 @@ const attributeCLS = (metric: CLSMetric): CLSMetricWithAttribution => {
84
57
  */
85
58
  export const onCLS = (
86
59
  onReport: (metric: CLSMetricWithAttribution) => void,
87
- opts?: ReportOpts,
60
+ opts: AttributionReportOpts = {},
88
61
  ) => {
62
+ // Clone the opts object to ensure it's unique, so we can initialize a
63
+ // single instance of the `LayoutShiftManager` class that's shared only with
64
+ // this function invocation and the `unattributedOnCLS()` invocation below
65
+ // (which is passed the same `opts` object).
66
+ opts = Object.assign({}, opts);
67
+
68
+ const layoutShiftManager = initUnique(opts, LayoutShiftManager);
69
+ const layoutShiftTargetMap: WeakMap<LayoutShiftAttribution, string> =
70
+ new WeakMap();
71
+
72
+ layoutShiftManager._onAfterProcessingUnexpectedShift = (
73
+ entry: LayoutShift,
74
+ ) => {
75
+ if (entry?.sources?.length) {
76
+ const largestSource = getLargestLayoutShiftSource(entry.sources);
77
+ const node = largestSource?.node;
78
+ if (node) {
79
+ const customTarget = opts.generateTarget?.(node) ?? getSelector(node);
80
+ layoutShiftTargetMap.set(largestSource, customTarget);
81
+ }
82
+ }
83
+ };
84
+
85
+ const attributeCLS = (metric: CLSMetric): CLSMetricWithAttribution => {
86
+ // Use an empty object if no other attribution has been set.
87
+ let attribution: CLSAttribution = {};
88
+
89
+ if (metric.entries.length) {
90
+ const largestEntry = getLargestLayoutShiftEntry(metric.entries);
91
+ if (largestEntry?.sources?.length) {
92
+ const largestSource = getLargestLayoutShiftSource(largestEntry.sources);
93
+ if (largestSource) {
94
+ attribution = {
95
+ largestShiftTarget: layoutShiftTargetMap.get(largestSource),
96
+ largestShiftTime: largestEntry.startTime,
97
+ largestShiftValue: largestEntry.value,
98
+ largestShiftSource: largestSource,
99
+ largestShiftEntry: largestEntry,
100
+ loadState: getLoadState(largestEntry.startTime),
101
+ };
102
+ }
103
+ }
104
+ }
105
+
106
+ // Use `Object.assign()` to ensure the original metric object is returned.
107
+ const metricWithAttribution: CLSMetricWithAttribution = Object.assign(
108
+ metric,
109
+ {attribution},
110
+ );
111
+ return metricWithAttribution;
112
+ };
113
+
89
114
  unattributedOnCLS((metric: CLSMetric) => {
90
115
  const metricWithAttribution = attributeCLS(metric);
91
116
  onReport(metricWithAttribution);
@@ -22,7 +22,7 @@ import {
22
22
  FCPAttribution,
23
23
  FCPMetric,
24
24
  FCPMetricWithAttribution,
25
- ReportOpts,
25
+ AttributionReportOpts,
26
26
  } from '../types.js';
27
27
 
28
28
  const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
@@ -35,7 +35,7 @@ const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
35
35
 
36
36
  if (metric.entries.length) {
37
37
  const navigationEntry = getNavigationEntry();
38
- const fcpEntry = metric.entries[metric.entries.length - 1];
38
+ const fcpEntry = metric.entries.at(-1);
39
39
 
40
40
  if (navigationEntry) {
41
41
  const activationStart = navigationEntry.activationStart || 0;
@@ -51,7 +51,7 @@ const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
51
51
  }
52
52
  }
53
53
 
54
- // Use Object.assign to set property to keep tsc happy.
54
+ // Use `Object.assign()` to ensure the original metric object is returned.
55
55
  const metricWithAttribution: FCPMetricWithAttribution = Object.assign(
56
56
  metric,
57
57
  {attribution},
@@ -67,7 +67,7 @@ const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
67
67
  */
68
68
  export const onFCP = (
69
69
  onReport: (metric: FCPMetricWithAttribution) => void,
70
- opts?: ReportOpts,
70
+ opts: AttributionReportOpts = {},
71
71
  ) => {
72
72
  unattributedOnFCP((metric: FCPMetric) => {
73
73
  const metricWithAttribution = attributeFCP(metric);