chrome-devtools-frontend 1.0.1664496 → 1.0.1665921

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 (407) hide show
  1. package/.agents/skills/devtools-testing-guidance/SKILL.md +48 -0
  2. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +3 -3
  3. package/.agents/skills/repro-flaky-tests/SKILL.md +2 -2
  4. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
  5. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +2 -0
  6. package/.agents/skills/version-control/SKILL.md +4 -3
  7. package/docs/ui_engineering.md +89 -0
  8. package/eslint.config.mjs +9 -2
  9. package/front_end/Images/rollup.config.mjs +1 -1
  10. package/front_end/Tests.js +15 -16
  11. package/front_end/core/common/Gzip.ts +2 -2
  12. package/front_end/core/common/Settings.ts +4 -20
  13. package/front_end/core/common/Srcset.ts +1 -1
  14. package/front_end/core/common/VersionController.ts +1 -1
  15. package/front_end/core/host/AidaClient.ts +19 -4
  16. package/front_end/core/host/AidaGcaTranslation.ts +2 -2
  17. package/front_end/core/host/GcaClient.ts +2 -2
  18. package/front_end/core/host/GdpClient.ts +3 -3
  19. package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
  20. package/front_end/core/host/ResourceLoader.ts +15 -15
  21. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
  22. package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
  23. package/front_end/core/root/Runtime.ts +0 -1
  24. package/front_end/core/sdk/CSSMatchedStyles.ts +78 -3
  25. package/front_end/core/sdk/CSSMetadata.ts +17 -12
  26. package/front_end/core/sdk/CSSProperty.ts +1 -1
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -2
  28. package/front_end/core/sdk/CSSRule.ts +3 -3
  29. package/front_end/core/sdk/CSSStyleSheetHeader.ts +3 -3
  30. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -1
  31. package/front_end/core/sdk/Connections.ts +1 -1
  32. package/front_end/core/sdk/DebuggerModel.ts +13 -13
  33. package/front_end/core/sdk/NetworkManager.ts +19 -19
  34. package/front_end/core/sdk/NetworkRequest.ts +57 -57
  35. package/front_end/core/sdk/OverlayModel.ts +1 -1
  36. package/front_end/core/sdk/PageResourceLoader.ts +2 -2
  37. package/front_end/core/sdk/RehydratingConnection.ts +5 -5
  38. package/front_end/core/sdk/ScreenCaptureModel.ts +1 -1
  39. package/front_end/core/sdk/Script.ts +2 -2
  40. package/front_end/core/sdk/ServerTiming.ts +7 -7
  41. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +1 -1
  42. package/front_end/core/sdk/ServiceWorkerManager.ts +11 -11
  43. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
  44. package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
  45. package/front_end/core/sdk/StorageKeyManager.ts +1 -1
  46. package/front_end/core/sdk/sdk-meta.ts +98 -98
  47. package/front_end/devtools_compatibility.js +15 -13
  48. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +4 -8
  49. package/front_end/entrypoints/main/MainImpl.ts +2 -3
  50. package/front_end/entrypoints/main/main-meta.ts +1 -16
  51. package/front_end/entrypoints/shell/shell.ts +1 -0
  52. package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
  53. package/front_end/foundation/README.md +1 -1
  54. package/front_end/foundation/Universe.test.api.ts +73 -0
  55. package/front_end/foundation/Universe.ts +22 -0
  56. package/front_end/generated/InspectorBackendCommands.ts +2 -2
  57. package/front_end/generated/SupportedCSSProperties.js +1 -1
  58. package/front_end/generated/protocol.ts +19 -0
  59. package/front_end/models/ai_assistance/AiAgent2.ts +1 -1
  60. package/front_end/models/ai_assistance/AiConversation.ts +1 -1
  61. package/front_end/models/ai_assistance/BuiltInAi.ts +1 -1
  62. package/front_end/models/ai_assistance/ChangeManager.ts +0 -70
  63. package/front_end/models/ai_assistance/ExtensionScope.ts +2 -36
  64. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +9 -9
  65. package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -2
  66. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +4 -4
  67. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +1 -1
  68. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +21 -21
  69. package/front_end/models/ai_assistance/agents/StorageAgent.ts +4 -4
  70. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
  71. package/front_end/models/ai_assistance/ai_assistance.ts +0 -5
  72. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +11 -4
  73. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +8 -2
  74. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +14 -11
  75. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +2 -2
  76. package/front_end/models/ai_assistance/performance/AICallTree.ts +2 -2
  77. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +1 -1
  78. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +9 -2
  79. package/front_end/models/ai_assistance/tools/GetStyles.ts +4 -4
  80. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -5
  81. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -2
  82. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -2
  83. package/front_end/models/badges/badges-meta.ts +27 -0
  84. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -3
  85. package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
  86. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +6 -7
  87. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +5 -4
  88. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +72 -29
  89. package/front_end/models/bindings/ResourceMapping.ts +38 -32
  90. package/front_end/models/bindings/ResourceScriptMapping.ts +5 -7
  91. package/front_end/models/breakpoints/BreakpointManager.ts +2 -1
  92. package/front_end/models/har/Writer.ts +2 -2
  93. package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +1 -1
  94. package/front_end/models/issues_manager/GenericIssue.ts +1 -1
  95. package/front_end/models/issues_manager/IssuesManager.ts +14 -5
  96. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +1 -1
  97. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
  98. package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +13 -2
  99. package/front_end/models/issues_manager/issues_manager.ts +0 -2
  100. package/front_end/models/live-metrics/LiveMetrics.ts +22 -5
  101. package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +1 -1
  102. package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +10 -4
  103. package/front_end/models/logs/logs-meta.ts +23 -16
  104. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +2 -2
  105. package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
  106. package/front_end/models/persistence/IsolatedFileSystemManager.ts +1 -1
  107. package/front_end/models/source_map_scopes/NamesResolver.ts +104 -86
  108. package/front_end/models/source_map_scopes/ScopeChainModel.ts +6 -2
  109. package/front_end/models/stack_trace/StackTraceModel.ts +1 -1
  110. package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +1 -1
  111. package/front_end/models/trace/handlers/UserTimingsHandler.ts +17 -6
  112. package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -1
  113. package/front_end/models/trace/helpers/Timing.ts +1 -1
  114. package/front_end/models/trace/insights/Common.ts +1 -1
  115. package/front_end/models/trace/insights/DocumentLatency.ts +3 -3
  116. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  117. package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
  118. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +2 -2
  119. package/front_end/models/workspace_diff/WorkspaceDiff.ts +14 -9
  120. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +2 -15
  121. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -2
  122. package/front_end/panels/ai_assistance/components/ChatInput.ts +23 -19
  123. package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -18
  124. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -35
  125. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +1 -1
  126. package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
  127. package/front_end/panels/ai_assistance/components/ImageResize.ts +74 -0
  128. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +2 -2
  129. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +28 -29
  130. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  131. package/front_end/panels/animation/animationTimeline.css +0 -2
  132. package/front_end/panels/application/AppManifestView.ts +1 -1
  133. package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -1
  134. package/front_end/panels/application/CookieItemsView.ts +1 -1
  135. package/front_end/panels/application/CrashReportContextView.ts +3 -3
  136. package/front_end/panels/application/DeviceBoundSessionsModel.ts +1 -1
  137. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +1 -1
  138. package/front_end/panels/application/DeviceBoundSessionsView.ts +1 -1
  139. package/front_end/panels/application/IndexedDBViews.ts +1 -1
  140. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -1
  141. package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
  142. package/front_end/panels/application/ServiceWorkersView.ts +6 -6
  143. package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
  144. package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
  145. package/front_end/panels/application/WebMCPView.ts +7 -5
  146. package/front_end/panels/application/components/AdsView.ts +21 -6
  147. package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
  148. package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
  149. package/front_end/panels/application/components/StorageMetadataView.ts +1 -1
  150. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
  151. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
  152. package/front_end/panels/application/preloading/components/PreloadingString.ts +3 -3
  153. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -1
  154. package/front_end/panels/autofill/AutofillView.ts +1 -1
  155. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
  156. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +2 -2
  157. package/front_end/panels/changes/ChangesSidebar.ts +2 -2
  158. package/front_end/panels/changes/ChangesView.ts +4 -5
  159. package/front_end/panels/changes/CombinedDiffView.ts +3 -3
  160. package/front_end/panels/changes/changes-meta.ts +2 -2
  161. package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
  162. package/front_end/panels/common/AiCodeGenerationTeaser.ts +3 -3
  163. package/front_end/panels/common/BadgeNotification.ts +8 -8
  164. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  165. package/front_end/panels/common/GdpSignUpDialog.ts +2 -2
  166. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
  167. package/front_end/panels/common/aiCodeCompletionDisclaimer.css +0 -1
  168. package/front_end/panels/console/ConsoleInsightTeaser.ts +1 -1
  169. package/front_end/panels/console/ConsolePinPane.ts +3 -3
  170. package/front_end/panels/console/ConsolePrompt.ts +6 -4
  171. package/front_end/panels/console/ConsoleSidebar.ts +8 -10
  172. package/front_end/panels/console_counters/WarningErrorCounter.ts +10 -11
  173. package/front_end/panels/coverage/CoverageView.ts +2 -2
  174. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
  175. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
  176. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
  177. package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
  178. package/front_end/panels/elements/ComputedStyleWidget.ts +3 -2
  179. package/front_end/panels/elements/ElementsTreeElement.ts +3 -3
  180. package/front_end/panels/elements/EventListenersWidget.ts +1 -3
  181. package/front_end/panels/elements/LayoutPane.ts +23 -13
  182. package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -7
  183. package/front_end/panels/elements/StylePropertiesSection.ts +33 -5
  184. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -5
  185. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -6
  186. package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
  187. package/front_end/panels/elements/elements-meta.ts +18 -2
  188. package/front_end/panels/emulation/DeviceModeToolbar.ts +100 -40
  189. package/front_end/panels/emulation/DeviceModeView.ts +5 -4
  190. package/front_end/panels/emulation/MediaQueryInspector.ts +35 -19
  191. package/front_end/panels/event_listeners/EventListenersView.ts +4 -4
  192. package/front_end/panels/explain/components/ConsoleInsight.ts +8 -9
  193. package/front_end/panels/explain/explain-meta.ts +3 -3
  194. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +135 -167
  195. package/front_end/panels/layer_viewer/Layers3DView.ts +10 -23
  196. package/front_end/panels/layer_viewer/layer_viewer-meta.ts +27 -0
  197. package/front_end/panels/lighthouse/LighthouseController.ts +44 -55
  198. package/front_end/panels/lighthouse/LighthousePanel.ts +9 -9
  199. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -2
  200. package/front_end/panels/lighthouse/LighthouseStartView.ts +9 -12
  201. package/front_end/panels/lighthouse/LighthouseStatusView.ts +33 -33
  202. package/front_end/panels/lighthouse/RadioSetting.ts +1 -1
  203. package/front_end/panels/lighthouse/lighthouse-meta.ts +131 -1
  204. package/front_end/panels/media/EventDisplayTable.ts +67 -94
  205. package/front_end/panels/media/PlayerListView.ts +1 -1
  206. package/front_end/panels/media/eventDisplayTable.css +9 -4
  207. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +5 -5
  208. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
  209. package/front_end/panels/network/EventSourceMessagesView.ts +98 -107
  210. package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
  211. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -1
  212. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  213. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  214. package/front_end/panels/network/RequestHeadersView.ts +5 -5
  215. package/front_end/panels/network/RequestPayloadView.ts +4 -4
  216. package/front_end/panels/network/RequestTimingView.ts +2 -2
  217. package/front_end/panels/network/components/DirectSocketConnectionView.ts +1 -1
  218. package/front_end/panels/network/eventSourceMessagesView.css +12 -3
  219. package/front_end/panels/network/networkTimingTable.css +2 -2
  220. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
  221. package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +25 -29
  222. package/front_end/panels/profiler/HeapProfileView.ts +308 -247
  223. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +13 -3
  224. package/front_end/panels/profiler/HeapSnapshotView.ts +30 -10
  225. package/front_end/panels/profiler/HeapTimelineOverview.ts +5 -2
  226. package/front_end/panels/profiler/ProfileDataGrid.ts +128 -157
  227. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +17 -5
  228. package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
  229. package/front_end/panels/profiler/TopDownProfileDataGrid.ts +17 -21
  230. package/front_end/panels/profiler/profilesPanel.css +9 -13
  231. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
  232. package/front_end/panels/recorder/CreateRecordingView.ts +4 -4
  233. package/front_end/panels/recorder/RecorderPanel.ts +6 -6
  234. package/front_end/panels/recorder/RecordingView.ts +1 -1
  235. package/front_end/panels/recorder/ReplaySection.ts +1 -1
  236. package/front_end/panels/recorder/StepView.ts +1 -1
  237. package/front_end/panels/recorder/injected/rollup.config.mjs +1 -1
  238. package/front_end/panels/search/SearchView.ts +1 -1
  239. package/front_end/panels/security/SecurityPanel.ts +54 -41
  240. package/front_end/panels/sensors/LocationsSettingsTab.ts +246 -233
  241. package/front_end/panels/sensors/SensorsView.ts +1 -1
  242. package/front_end/panels/settings/AISettingsTab.ts +11 -10
  243. package/front_end/panels/settings/SettingsScreen.ts +29 -24
  244. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  245. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +5 -5
  246. package/front_end/panels/sources/BreakpointEditDialog.ts +2 -2
  247. package/front_end/panels/sources/BreakpointsView.ts +1 -1
  248. package/front_end/panels/sources/CallStackSidebarPane.ts +2 -2
  249. package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -2
  250. package/front_end/panels/sources/DebuggerPlugin.ts +25 -22
  251. package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -1
  252. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +7 -5
  253. package/front_end/panels/sources/sources-meta.ts +1 -1
  254. package/front_end/panels/timeline/CountersGraph.ts +1 -2
  255. package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
  256. package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
  257. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -2
  258. package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
  259. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
  260. package/front_end/panels/timeline/TimelinePanel.ts +53 -81
  261. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +10 -3
  262. package/front_end/panels/timeline/TimelineUIUtils.ts +18 -4
  263. package/front_end/panels/timeline/TrackConfigBanner.ts +1 -1
  264. package/front_end/panels/timeline/components/ExportTraceOptions.ts +1 -1
  265. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +8 -9
  266. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
  267. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
  268. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
  269. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +1 -1
  270. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +1 -1
  271. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  272. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -0
  273. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +13 -8
  274. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +1 -0
  275. package/front_end/panels/timeline/timeline-meta.ts +169 -0
  276. package/front_end/panels/timeline/timelineFlameChartView.css +5 -0
  277. package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
  278. package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
  279. package/front_end/panels/whats_new/resources/WNDT.md +7 -8
  280. package/front_end/third_party/chromium/README.chromium +1 -1
  281. package/front_end/third_party/web-vitals/README.chromium +2 -2
  282. package/front_end/third_party/web-vitals/package/README.md +120 -19
  283. package/front_end/third_party/web-vitals/package/attribution.d.ts +16 -0
  284. package/front_end/third_party/web-vitals/package/attribution.js +18 -0
  285. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +1 -1
  286. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +1 -7
  287. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +53 -32
  288. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +2 -2
  289. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +43 -12
  290. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +1 -1
  291. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +21 -3
  292. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +1 -1
  293. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +30 -24
  294. package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.d.ts +3 -0
  295. package/front_end/third_party/web-vitals/package/dist/modules/lib/FCPEntryManager.js +18 -0
  296. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +2 -1
  297. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +18 -2
  298. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +1 -0
  299. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.js +1 -0
  300. package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.d.ts +1 -1
  301. package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
  302. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.d.ts +1 -1
  303. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +7 -7
  304. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +1 -1
  305. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -1
  306. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +4 -1
  307. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +7 -3
  308. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +20 -11
  309. package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.js +8 -3
  310. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.d.ts +3 -1
  311. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +19 -4
  312. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -1
  313. package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.d.ts +3 -0
  314. package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.js +38 -0
  315. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +5 -1
  316. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.d.ts +1 -1
  317. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +30 -11
  318. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.d.ts +1 -1
  319. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +36 -4
  320. package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +1 -1
  321. package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +42 -22
  322. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.d.ts +1 -1
  323. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +109 -30
  324. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.d.ts +1 -1
  325. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +25 -7
  326. package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +24 -1
  327. package/front_end/third_party/web-vitals/package/dist/modules/types/fcp.d.ts +1 -1
  328. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +14 -6
  329. package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +1 -1
  330. package/front_end/third_party/web-vitals/package/dist/modules/types/ttfb.d.ts +2 -2
  331. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +26 -4
  332. package/front_end/third_party/web-vitals/package/package.json +21 -22
  333. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +1 -1
  334. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +62 -39
  335. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +52 -15
  336. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +25 -7
  337. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +43 -37
  338. package/front_end/third_party/web-vitals/package/src/lib/{polyfills/getFirstHiddenTimePolyfill.ts → FCPEntryManager.ts} +4 -14
  339. package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +22 -2
  340. package/front_end/third_party/web-vitals/package/src/lib/LCPEntryManager.ts +1 -0
  341. package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
  342. package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
  343. package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +11 -12
  344. package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +1 -1
  345. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +4 -1
  346. package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +24 -11
  347. package/front_end/third_party/web-vitals/package/src/lib/initUnique.ts +12 -4
  348. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +26 -5
  349. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +1 -1
  350. package/front_end/third_party/web-vitals/package/src/lib/softNavs.ts +48 -0
  351. package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +12 -4
  352. package/front_end/third_party/web-vitals/package/src/onCLS.ts +75 -18
  353. package/front_end/third_party/web-vitals/package/src/onFCP.ts +66 -7
  354. package/front_end/third_party/web-vitals/package/src/onINP.ts +100 -39
  355. package/front_end/third_party/web-vitals/package/src/onLCP.ts +169 -34
  356. package/front_end/third_party/web-vitals/package/src/onTTFB.ts +50 -13
  357. package/front_end/third_party/web-vitals/package/src/types/base.ts +31 -10
  358. package/front_end/third_party/web-vitals/package/src/types/fcp.ts +1 -1
  359. package/front_end/third_party/web-vitals/package/src/types/inp.ts +14 -6
  360. package/front_end/third_party/web-vitals/package/src/types/lcp.ts +1 -1
  361. package/front_end/third_party/web-vitals/package/src/types/ttfb.ts +2 -2
  362. package/front_end/third_party/web-vitals/package/src/types.ts +32 -9
  363. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +11 -11
  364. package/front_end/third_party/web-vitals/rebuild.sh +2 -2
  365. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +2 -0
  366. package/front_end/ui/components/buttons/Button.ts +16 -0
  367. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  368. package/front_end/ui/components/highlighting/HighlightManager.ts +6 -1
  369. package/front_end/ui/components/highlighting/highlighting.ts +1 -1
  370. package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
  371. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
  372. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +2 -2
  373. package/front_end/ui/components/settings/SettingCheckbox.ts +12 -7
  374. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +2 -2
  375. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +6 -6
  376. package/front_end/ui/components/text_editor/javascript.ts +3 -1
  377. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  378. package/front_end/ui/legacy/ContextMenu.ts +12 -2
  379. package/front_end/ui/legacy/ListControl.ts +1 -1
  380. package/front_end/ui/legacy/SelectMenu.docs.ts +17 -19
  381. package/front_end/ui/legacy/Toolbar.ts +4 -1
  382. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  383. package/front_end/ui/legacy/components/color_picker/spectrum.css +1 -2
  384. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  385. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -4
  386. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +3 -1
  387. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +4 -4
  388. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -7
  389. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +14 -11
  390. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
  391. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +15 -5
  392. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -4
  393. package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -1
  394. package/front_end/ui/lit/render.ts +1 -1
  395. package/front_end/ui/settings/SettingUIRegistration.ts +8 -3
  396. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  397. package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
  398. package/inspector_overlay/main.ts +1 -1
  399. package/mcp/mcp.ts +5 -4
  400. package/package.json +13 -13
  401. package/front_end/models/ai_assistance/AgentProject.ts +0 -261
  402. package/front_end/models/ai_assistance/agents/PatchAgent.ts +0 -306
  403. package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +0 -45
  404. package/front_end/models/text_utils/text_utils.ts +0 -5
  405. package/front_end/panels/ai_assistance/PatchWidget.ts +0 -867
  406. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +0 -368
  407. package/front_end/panels/ai_assistance/selectWorkspaceDialog.css +0 -92
@@ -74,6 +74,58 @@ const UIStrings = {
74
74
  * @description Title of a setting under the Performance category in Settings
75
75
  */
76
76
  timelineInvalidationTracking: 'Invalidation tracking',
77
+ /**
78
+ * @description Title of a setting in Performance panel.
79
+ */
80
+ disableJavascriptSamples: 'Disable JavaScript samples',
81
+ /**
82
+ * @description Title of a setting in Performance panel.
83
+ */
84
+ enableAdvancedPaint: 'Enable advanced paint instrumentation (slow)',
85
+ /**
86
+ * @description Title of a setting in Performance panel.
87
+ */
88
+ enableSelectorStats: 'Enable CSS selector stats (slow)',
89
+ /**
90
+ * @description Title of a setting in Performance panel.
91
+ */
92
+ screenshotCapture: 'Screenshot capture',
93
+ /**
94
+ * @description Title of a setting in Performance panel.
95
+ */
96
+ screenshots: 'Screenshots',
97
+ /**
98
+ * @description Title of a setting in Performance panel.
99
+ */
100
+ memory: 'Memory',
101
+ /**
102
+ * @description Title of a setting in Performance panel.
103
+ */
104
+ dimThirdParties: 'Dim 3rd parties',
105
+ /**
106
+ * @description Title of a setting in Performance panel.
107
+ */
108
+ showCustomtracks: 'Show custom tracks',
109
+ /**
110
+ * @description Title of a setting in Performance panel counters graph.
111
+ */
112
+ jsHeap: 'JS heap',
113
+ /**
114
+ * @description Title of a setting in Performance panel counters graph.
115
+ */
116
+ documents: 'Documents',
117
+ /**
118
+ * @description Title of a setting in Performance panel counters graph.
119
+ */
120
+ nodes: 'Nodes',
121
+ /**
122
+ * @description Title of a setting in Performance panel counters graph.
123
+ */
124
+ listeners: 'Listeners',
125
+ /**
126
+ * @description Title of a setting in Performance panel counters graph.
127
+ */
128
+ gpuMemory: 'GPU memory',
77
129
  } as const;
78
130
  const str_ = i18n.i18n.registerUIStrings('panels/timeline/timeline-meta.ts', UIStrings);
79
131
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -469,3 +521,120 @@ Common.Revealer.registerRevealer({
469
521
  return new Timeline.TimelinePanel.ProfileFinishedRevealer();
470
522
  },
471
523
  });
524
+
525
+ Common.Settings.registerSettingExtension({
526
+ category: Common.Settings.SettingCategory.NONE,
527
+ storageType: Common.Settings.SettingStorageType.SESSION,
528
+ title: i18nLazyString(UIStrings.disableJavascriptSamples),
529
+ settingName: 'timeline-disable-js-sampling',
530
+ settingType: Common.Settings.SettingType.BOOLEAN,
531
+ defaultValue: false,
532
+ });
533
+
534
+ Common.Settings.registerSettingExtension({
535
+ category: Common.Settings.SettingCategory.NONE,
536
+ storageType: Common.Settings.SettingStorageType.SESSION,
537
+ title: i18nLazyString(UIStrings.enableAdvancedPaint),
538
+ settingName: 'timeline-capture-layers-and-pictures',
539
+ settingType: Common.Settings.SettingType.BOOLEAN,
540
+ defaultValue: false,
541
+ });
542
+
543
+ Common.Settings.registerSettingExtension({
544
+ category: Common.Settings.SettingCategory.NONE,
545
+ storageType: Common.Settings.SettingStorageType.SESSION,
546
+ title: i18nLazyString(UIStrings.enableSelectorStats),
547
+ settingName: 'timeline-capture-selector-stats',
548
+ settingType: Common.Settings.SettingType.BOOLEAN,
549
+ defaultValue: false,
550
+ });
551
+
552
+ Common.Settings.registerSettingExtension({
553
+ category: Common.Settings.SettingCategory.NONE,
554
+ storageType: Common.Settings.SettingStorageType.SESSION,
555
+ title: i18nLazyString(UIStrings.screenshotCapture),
556
+ settingName: 'timeline-screenshot-capture-mode',
557
+ settingType: Common.Settings.SettingType.ENUM,
558
+ defaultValue: 'auto',
559
+ });
560
+
561
+ Common.Settings.registerSettingExtension({
562
+ category: Common.Settings.SettingCategory.NONE,
563
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
564
+ title: i18nLazyString(UIStrings.screenshots),
565
+ settingName: 'timeline-show-screenshots',
566
+ settingType: Common.Settings.SettingType.BOOLEAN,
567
+ defaultValue: true,
568
+ });
569
+
570
+ Common.Settings.registerSettingExtension({
571
+ category: Common.Settings.SettingCategory.NONE,
572
+ storageType: Common.Settings.SettingStorageType.SESSION,
573
+ title: i18nLazyString(UIStrings.memory),
574
+ settingName: 'timeline-show-memory',
575
+ settingType: Common.Settings.SettingType.BOOLEAN,
576
+ defaultValue: false,
577
+ });
578
+
579
+ Common.Settings.registerSettingExtension({
580
+ category: Common.Settings.SettingCategory.NONE,
581
+ storageType: Common.Settings.SettingStorageType.SESSION,
582
+ title: i18nLazyString(UIStrings.dimThirdParties),
583
+ settingName: 'timeline-dim-third-parties',
584
+ settingType: Common.Settings.SettingType.BOOLEAN,
585
+ defaultValue: false,
586
+ });
587
+
588
+ Common.Settings.registerSettingExtension({
589
+ category: Common.Settings.SettingCategory.NONE,
590
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
591
+ title: i18nLazyString(UIStrings.showCustomtracks),
592
+ settingName: 'timeline-show-extension-data',
593
+ settingType: Common.Settings.SettingType.BOOLEAN,
594
+ defaultValue: true,
595
+ });
596
+
597
+ Common.Settings.registerSettingExtension({
598
+ category: Common.Settings.SettingCategory.NONE,
599
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
600
+ title: i18nLazyString(UIStrings.jsHeap),
601
+ settingName: 'timeline-counters-graph-js-heap-size-used',
602
+ settingType: Common.Settings.SettingType.BOOLEAN,
603
+ defaultValue: true,
604
+ });
605
+
606
+ Common.Settings.registerSettingExtension({
607
+ category: Common.Settings.SettingCategory.NONE,
608
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
609
+ title: i18nLazyString(UIStrings.documents),
610
+ settingName: 'timeline-counters-graph-documents',
611
+ settingType: Common.Settings.SettingType.BOOLEAN,
612
+ defaultValue: true,
613
+ });
614
+
615
+ Common.Settings.registerSettingExtension({
616
+ category: Common.Settings.SettingCategory.NONE,
617
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
618
+ title: i18nLazyString(UIStrings.nodes),
619
+ settingName: 'timeline-counters-graph-nodes',
620
+ settingType: Common.Settings.SettingType.BOOLEAN,
621
+ defaultValue: true,
622
+ });
623
+
624
+ Common.Settings.registerSettingExtension({
625
+ category: Common.Settings.SettingCategory.NONE,
626
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
627
+ title: i18nLazyString(UIStrings.listeners),
628
+ settingName: 'timeline-counters-graph-js-event-listeners',
629
+ settingType: Common.Settings.SettingType.BOOLEAN,
630
+ defaultValue: true,
631
+ });
632
+
633
+ Common.Settings.registerSettingExtension({
634
+ category: Common.Settings.SettingCategory.NONE,
635
+ storageType: Common.Settings.SettingStorageType.GLOBAL,
636
+ title: i18nLazyString(UIStrings.gpuMemory),
637
+ settingName: 'timeline-counters-graph-gpu-memory-used-kb',
638
+ settingType: Common.Settings.SettingType.BOOLEAN,
639
+ defaultValue: true,
640
+ });
@@ -157,6 +157,11 @@
157
157
  top: unset;
158
158
  bottom: 0;
159
159
  height: 100px;
160
+
161
+ &.positioned-by-event {
162
+ top: 0;
163
+ bottom: unset;
164
+ }
160
165
  }
161
166
 
162
167
  .overlay-type-TIMINGS_MARKER {
@@ -341,7 +341,7 @@ function renderNewAuthenticatorSection(
341
341
  Protocol.WebAuthn.AuthenticatorTransport.Usb,
342
342
  Protocol.WebAuthn.AuthenticatorTransport.Ble,
343
343
  Protocol.WebAuthn.AuthenticatorTransport.Nfc,
344
- ...(isCtap2 ? [Protocol.WebAuthn.AuthenticatorTransport.Internal] : [])
344
+ ...(isCtap2 ? [Protocol.WebAuthn.AuthenticatorTransport.Internal] : []),
345
345
  ].map(option => html`
346
346
  <option value=${option} jslog=${VisualLogging.item(option).track({click: true})}
347
347
  .selected=${options.transport === option}
@@ -40,28 +40,28 @@ export function getReleaseNote(): ReleaseNote {
40
40
  }
41
41
 
42
42
  let releaseNote: ReleaseNote = {
43
- version: 150,
44
- header: 'What’s new in DevTools 150',
43
+ version: 151,
44
+ header: 'What’s new in DevTools 151',
45
45
  markdownLinks: [
46
46
  {
47
47
  key: 'devtools-for-agents',
48
- link: 'https://developer.chrome.com/blog/new-in-devtools-150/#devtools-for-agents',
48
+ link: 'https://developer.chrome.com/blog/new-in-devtools-151/#devtools-for-agents',
49
49
  },
50
50
  {
51
51
  key: 'ai-assistance',
52
- link: 'https://developer.chrome.com/blog/new-in-devtools-150/#ai-assistance',
52
+ link: 'https://developer.chrome.com/blog/new-in-devtools-151/#ai-assistance',
53
53
  },
54
54
  {
55
- key: 'css-container-function',
56
- link: 'https://developer.chrome.com/blog/new-in-devtools-150/#css-container-function',
57
- }
55
+ key: 'css-specificity',
56
+ link: 'https://developer.chrome.com/blog/new-in-devtools-151/#css-specificity',
57
+ },
58
58
  ],
59
59
  videoLinks: [
60
60
  {
61
61
  description: 'See all highlights from Chrome 148-150',
62
- link: 'https://developer.chrome.com/blog/new-in-devtools-150' as Platform.DevToolsPath.UrlString,
62
+ link: 'https://www.youtube.com/watch?v=wBNCPp5gdqg' as Platform.DevToolsPath.UrlString,
63
63
  type: VideoType.WHATS_NEW,
64
64
  },
65
65
  ],
66
- link: 'https://developer.chrome.com/blog/new-in-devtools-150/',
66
+ link: 'https://developer.chrome.com/blog/new-in-devtools-151/',
67
67
  };
@@ -1,15 +1,14 @@
1
1
  ### [DevTools for agents](devtools-for-agents)
2
2
 
3
- DevTools for agents 1.4 and later bring new experimental memory debugging tools,
4
- experimental TOON support for structured content output, and improved skill discovery.
3
+ DevTools for agents 1.6 and later brings various improvements to the memory debugging tools,
4
+ experimental GCF support as an alternative to JSON for token savings, and improved multi-page support.
5
5
 
6
6
  ### [AI assistance](ai-assistance)
7
7
 
8
- The agent walkthrough in the updated AI assistance panel now renders rich widgets
9
- for performance network tracks, timeline event summaries, network requests,
10
- syntax-highlighted source code, and inspected file lists.
8
+ AI assistance continues to evolve with additional Network track and Network requests list
9
+ widgets for the agent walkthrough, as well as support for table rendering in responses.
11
10
 
12
- ### [@container and @function](css-container-function)
11
+ ### [CSS specificity breakdowns](css-specificity)
13
12
 
14
- You can now directly edit `@container` and `@function`
15
- rules within the Styles tab, allowing for seamless experimentation.
13
+ Hovering over selector names in the Styles tab now shows a tooltip breaking down
14
+ how each part contributes to the (a, b, c) specificity calculation.
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: 0710d8bfc99da895041ed5684b55ab2f262173b6
4
+ Revision: 8e5dd02f11d866b080045c734fbb8cbb99e9064c
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1,10 +1,10 @@
1
1
  Name: Web Vitals
2
2
  Short Name: Web Vitals
3
3
  URL: https://github.com/GoogleChrome/web-vitals
4
- Version: 5.2.0
4
+ Version: 6.0.0
5
5
  License: Apache-2.0
6
6
  License File: package/LICENSE
7
- Revision: 331486c02721e1d37835177ffc89589a580ba57e
7
+ Revision: 67a9ddb4cf77f8d1cb2c877ccd870b9c821aa853
8
8
  Update Mechanism: Manual
9
9
  Security Critical: no
10
10
  Shipped: yes
@@ -28,7 +28,7 @@
28
28
 
29
29
  ## Overview
30
30
 
31
- The `web-vitals` library is a tiny (~2K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/articles/vitals) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)).
31
+ The `web-vitals` library is a tiny (~3K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/articles/vitals) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)).
32
32
 
33
33
  The library supports all of the [Core Web Vitals](https://web.dev/articles/vitals#core_web_vitals) as well as a number of other metrics that are useful in diagnosing [real-user](https://web.dev/articles/user-centric-performance-metrics) performance issues.
34
34
 
@@ -210,7 +210,7 @@ In other cases, a metric callback may be called more than once:
210
210
  - All metrics are reported again (with the above exceptions) after a page is restored from the [back/forward cache](https://web.dev/articles/bfcache).
211
211
 
212
212
  > [!WARNING]
213
- > Do not call any of the Web Vitals functions (e.g. `onCLS()`, `onINP()`, `onLCP()`) more than once per page load. Each of these functions creates a `PerformanceObserver` instance and registers event listeners for the lifetime of the page. While the overhead of calling these functions once is negligible, calling them repeatedly on the same page may eventually result in a memory leak.
213
+ > Avoid calling the Web Vitals functions (e.g. `onCLS()`, `onINP()`, `onLCP()`) repeatedly per page load without a good reason. Each of these functions creates a `PerformanceObserver` instance and registers event listeners for the lifetime of the page. While the overhead of calling these functions once is negligible, calling them repeatedly on the same page may eventually result increased memory overhead.
214
214
 
215
215
  ### Report the value on every change
216
216
 
@@ -252,6 +252,65 @@ onLCP(logDelta);
252
252
 
253
253
  In addition to using the `id` field to group multiple deltas for the same metric, it can also be used to differentiate different metrics reported on the same page. For example, after a back/forward cache restore, a new metric object is created with a new `id` (since back/forward cache restores are considered separate page visits).
254
254
 
255
+ ### Report metrics for soft navigations
256
+
257
+ When originally launched, Core Web Vitals are only tracked for full page navigations, which can affect how [Single Page Applications](https://web.dev/vitals-spa-faq/) that use so called "soft navigations" to update the browser URL and history outside of the normal browser's handling of this.
258
+
259
+ The Chrome team have added a feature from Chrome 151 to enable [measuring these soft navigations](https://github.com/WICG/soft-navigations) and report on Core Web Vitals separately for them.
260
+
261
+ A "soft navigation" is tracked automatically when the following three things happen:
262
+
263
+ - A user interaction occurs
264
+ - The URL changes
265
+ - Something is painted to screen.
266
+
267
+ For some sites, this definition may lead to false positives (that users would not really consider a "navigation"), or false negatives (where the user does consider a navigation to have happened despite not missing the above criteria). However, by having the browser define the soft navigation, rather than depending on SPA frameworks to call an API when happens, allows for soft navigations to be measured for existing SPA applications and also provides a more consistent experience across frameworks.
268
+
269
+ Some important points to note:
270
+
271
+ - TTFB is reported as 0, and not the time of the first network call (if any) after the soft navigation.
272
+ - FCP and LCP are the first and largest contentful paints after the soft navigation. Elements that remain between soft navigations will not count since they are not repainted. This can lead to differences between measuring performance for a page from a soft navigation and a hard navigation.
273
+ - INP is reset to measure only interactions after the the soft navigation.
274
+ - CLS is reset to measure again separate to the first page.
275
+
276
+ The metrics can be reported for Soft Navigations using the `reportSoftNavs: true` reporting option:
277
+
278
+ ```js
279
+ import {
280
+ onCLS,
281
+ onINP,
282
+ onLCP,
283
+ } from 'https://unpkg.com/web-vitals@soft-navs/dist/web-vitals.js?module';
284
+
285
+ onCLS(console.log, {reportSoftNavs: true});
286
+ onINP(console.log, {reportSoftNavs: true});
287
+ onLCP(console.log, {reportSoftNavs: true});
288
+ ```
289
+
290
+ Note that this will change the way the first page loads are measured as the metrics for the initial URL will be finalized once the first soft nav occurs.
291
+
292
+ This will also lead to differences with browsers that support soft navigations (Chromium-based browsers on version 151+) and other browsers (that will not change reporting even with the `reportSoftNavs` flag).
293
+
294
+ To measure both you need to register two callbacks:
295
+
296
+ ```js
297
+ import {
298
+ onCLS,
299
+ onINP,
300
+ onLCP,
301
+ } from 'https://unpkg.com/web-vitals@soft-navs/dist/web-vitals.js?module';
302
+
303
+ onCLS(doTraditionalProcessing);
304
+ onINP(doTraditionalProcessing);
305
+ onLCP(doTraditionalProcessing);
306
+
307
+ onCLS(doSoftNavProcessing, {reportSoftNavs: true});
308
+ onINP(doSoftNavProcessing, {reportSoftNavs: true});
309
+ onLCP(doSoftNavProcessing, {reportSoftNavs: true});
310
+ ```
311
+
312
+ In both cases the `navigationURL` property will provide the URL the metrics are for. This should be used rather than assuming the current URL is the page URL, since metrics may be reported after the fact.
313
+
255
314
  ### Send the results to an analytics endpoint
256
315
 
257
316
  The following example measures each of the Core Web Vitals metrics and reports them to a hypothetical `/analytics` endpoint, as soon as each is ready to be sent.
@@ -267,6 +326,9 @@ function sendToAnalytics(metric) {
267
326
  value: metric.value,
268
327
  id: metric.id,
269
328
 
329
+ // Override the page location for soft nav support
330
+ page_location: navigationURL,
331
+
270
332
  // Include additional data as needed...
271
333
  });
272
334
 
@@ -300,6 +362,9 @@ function sendToGoogleAnalytics({name, delta, value, id}) {
300
362
  metric_value: value, // Optional.
301
363
  metric_delta: delta, // Optional.
302
364
 
365
+ // Override the page location as metrics can be reported late for soft navs
366
+ page_location: navigationURL,
367
+
303
368
  // OPTIONAL: any additional params or debug info here.
304
369
  // See: https://web.dev/articles/debug-performance-in-the-field
305
370
  // metric_rating: 'good' | 'needs-improvement' | 'poor',
@@ -339,6 +404,9 @@ function sendToGoogleAnalytics({name, delta, value, id, attribution}) {
339
404
  metric_id: id, // Needed to aggregate events.
340
405
  metric_value: value, // Optional.
341
406
  metric_delta: delta, // Optional.
407
+
408
+ // Override the page location for soft nav support
409
+ page_location: navigationURL,
342
410
  };
343
411
 
344
412
  switch (name) {
@@ -546,6 +614,7 @@ interface Metric {
546
614
  * - 'prerender': for pages that were prerendered.
547
615
  * - 'restore': for pages that were discarded by the browser and then
548
616
  * restored by the user.
617
+ * - 'soft-navigation': for soft navigations.
549
618
  */
550
619
  navigationType:
551
620
  | 'navigate'
@@ -553,7 +622,32 @@ interface Metric {
553
622
  | 'back-forward'
554
623
  | 'back-forward-cache'
555
624
  | 'prerender'
556
- | 'restore';
625
+ | 'restore'
626
+ | 'soft-navigation';
627
+
628
+ /**
629
+ * The navigationId the metric happened for. This is particularly relevant for soft navigations where
630
+ * the metric may be reported for a previous URL.
631
+ */
632
+ navigationId: number;
633
+
634
+ /**
635
+ * For metrics specific to a soft navigation, the interactionId of the
636
+ * interaction that triggered that soft navigation.
637
+ */
638
+ navigationInteractionId?: number;
639
+
640
+ /**
641
+ * The navigation startTime the metric is based from. This is particularly
642
+ * relevant for soft navigations where time origin is not 0.
643
+ */
644
+ navigationStartTime?: number;
645
+
646
+ /**
647
+ * The navigation URL the metric happened for. This is particularly relevant for soft navigations where
648
+ * the metric may be reported for a previous URL.
649
+ */
650
+ navigationURL?: string;
557
651
  }
558
652
  ```
559
653
 
@@ -600,7 +694,7 @@ interface LCPMetric extends Metric {
600
694
  ```ts
601
695
  interface TTFBMetric extends Metric {
602
696
  name: 'TTFB';
603
- entries: PerformanceNavigationTiming[];
697
+ entries: (PerformanceNavigationTiming | PeformanceSoftNavigation)[];
604
698
  }
605
699
  ```
606
700
 
@@ -660,6 +754,7 @@ Metric-specific subclasses:
660
754
  interface INPAttributionReportOpts extends AttributionReportOpts {
661
755
  durationThreshold?: number;
662
756
  includeProcessedEventEntries?: boolean;
757
+ reportSoftNavs?: boolean;
663
758
  }
664
759
  ```
665
760
 
@@ -684,10 +779,7 @@ The `LoadState` type is used in several of the metric [attribution objects](#att
684
779
  * loading. This is equivalent to the corresponding `readyState` value.
685
780
  */
686
781
  type LoadState =
687
- | 'loading'
688
- | 'dom-interactive'
689
- | 'dom-content-loaded'
690
- | 'complete';
782
+ 'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete';
691
783
  ```
692
784
 
693
785
  ### Functions:
@@ -815,7 +907,7 @@ In the [attribution build](#attribution-build) each of the metric functions has
815
907
  onLCP(sendToAnalytics, {generateTarget: customGenerateTarget});
816
908
  ```
817
909
 
818
- 3. The `onINP` `AttributionReportOpts` supports an additional, optional, `includeProcessedEventEntries` configuration option. When set to `false`, the `event` performance entries will not be included in the `attribution` object to conserve memory if these entries are not needed. The default value is `true`.
910
+ 3. The `onINP` `AttributionReportOpts` supports an additional, optional, `includeProcessedEventEntries` configuration option. When set to `true`, _all_ the `event` performance entries processed during the INP duration will be included in the `attribution.processedEventEntries` object. This can include a lot of events and increased memory on very interactive or event-heavy pages. The default value is `false`. Regardless of this setting, the `entries` object will include the entries with an `interactionId` (which are the entries relevant for INP), but use this setting to include all entries (whether they have an `interactionId` or not) in `attribution.processedEventEntries` if you need more attribution information to identify delays to INP events.
819
911
 
820
912
  ```ts
821
913
  interface INPAttributionReportOpts extends AttributionReportOpts {
@@ -897,7 +989,7 @@ interface FCPAttribution {
897
989
  * general page load issues. This can be used to access `serverTiming` for example:
898
990
  * navigationEntry?.serverTiming
899
991
  */
900
- navigationEntry?: PerformanceNavigationTiming;
992
+ navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
901
993
  }
902
994
  ```
903
995
 
@@ -913,35 +1005,43 @@ interface INPAttribution {
913
1005
  * `generateTarget` configuration option was passed, then this will instead
914
1006
  * be the return value of that function, falling back to the default if that
915
1007
  * returns null or undefined.
1008
+ * This value may not be set in cases where the event duration was less than
1009
+ * the browser minimum reporting threshold, and thus no entry was dispatched.
916
1010
  */
917
- interactionTarget: string;
1011
+ interactionTarget?: string;
918
1012
  /**
919
1013
  * The time when the user first interacted during the frame where the INP
920
1014
  * candidate interaction occurred (if more than one interaction occurred
921
1015
  * within the frame, only the first time is reported).
1016
+ * This value may not be set in cases where the event duration was less than
1017
+ * the browser minimum reporting threshold, and thus no entry was dispatched.
922
1018
  */
923
- interactionTime: DOMHighResTimeStamp;
1019
+ interactionTime?: DOMHighResTimeStamp;
924
1020
  /**
925
1021
  * The type of interaction, based on the event type of the `event` entry
926
1022
  * that corresponds to the interaction (i.e. the first `event` entry
927
1023
  * containing an `interactionId` dispatched in a given animation frame).
928
1024
  * For "pointerdown", "pointerup", or "click" events this will be "pointer",
929
1025
  * and for "keydown" or "keyup" events this will be "keyboard".
1026
+ * This value may not be set in cases where the event duration was less than
1027
+ * the browser minimum reporting threshold, and thus no entry was dispatched.
930
1028
  */
931
- interactionType: 'pointer' | 'keyboard';
1029
+ interactionType?: 'pointer' | 'keyboard';
932
1030
  /**
933
1031
  * The best-guess timestamp of the next paint after the interaction.
934
1032
  * In general, this timestamp is the same as the `startTime + duration` of
935
1033
  * the event timing entry. However, since duration values are rounded to the
936
1034
  * nearest 8ms (and can be rounded down), this value is clamped to always be
937
1035
  * reported after the processing times.
1036
+ * This value may not be set in cases where the event duration was less than
1037
+ * the browser minimum reporting threshold, and thus no entry was dispatched.
938
1038
  */
939
- nextPaintTime: DOMHighResTimeStamp;
1039
+ nextPaintTime?: DOMHighResTimeStamp;
940
1040
  /**
941
1041
  * An array of Event Timing entries that were processed within the same
942
1042
  * animation frame as the INP candidate interaction.
943
- * This array can be quite large so it will be empty if the
944
- * `includeProcessedEventEntries` configuration option is set to `false` to
1043
+ * This array can be quite large so it will be empty unless the
1044
+ * `includeProcessedEventEntries` configuration option is set to `true` to
945
1045
  * conserve memory if these entries are not required.
946
1046
  */
947
1047
  processedEventEntries: PerformanceEventTiming[];
@@ -1084,7 +1184,7 @@ interface LCPAttribution {
1084
1184
  * general page load issues. This can be used to access `serverTiming` for example:
1085
1185
  * navigationEntry?.serverTiming
1086
1186
  */
1087
- navigationEntry?: PerformanceNavigationTiming;
1187
+ navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
1088
1188
  /**
1089
1189
  * The `resource` entry for the LCP resource (if applicable), which is useful
1090
1190
  * for diagnosing resource load issues.
@@ -1134,7 +1234,7 @@ interface TTFBAttribution {
1134
1234
  * general page load issues. This can be used to access `serverTiming` for
1135
1235
  * example: navigationEntry?.serverTiming
1136
1236
  */
1137
- navigationEntry?: PerformanceNavigationTiming;
1237
+ navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
1138
1238
  }
1139
1239
  ```
1140
1240
 
@@ -1142,13 +1242,14 @@ interface TTFBAttribution {
1142
1242
 
1143
1243
  The `web-vitals` code is tested in Chrome, Firefox, and Safari. In addition, all JavaScript features used in the code are part of ([Baseline Widely Available](https://web.dev/baseline)), and thus should run without error in all versions of these browsers released within the last 30 months.
1144
1244
 
1145
- However, some of the APIs required to capture these metrics (notable CLS) are currently only available in some browsers. The latest browser support for each function is as follows:
1245
+ However, some of the APIs required to capture these metrics (notable CLS and soft navigations) are currently only available in some browsers. The latest browser support for each function is as follows:
1146
1246
 
1147
1247
  - `onCLS()`: Chromium
1148
1248
  - `onFCP()`: Chromium, Firefox, Safari
1149
1249
  - `onINP()`: Chromium, Firefox, Safari
1150
1250
  - `onLCP()`: Chromium, Firefox, Safari
1151
1251
  - `onTTFB()`: Chromium, Firefox, Safari
1252
+ - Core Web Vitals for soft navigations: Chromium 151+
1152
1253
 
1153
1254
  ## Limitations
1154
1255
 
@@ -0,0 +1,16 @@
1
+ /*
2
+ Copyright 2022 Google LLC
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ https://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+ */
15
+
16
+ export * from './dist/modules/attribution/index.js';
@@ -0,0 +1,18 @@
1
+ /*
2
+ Copyright 2022 Google LLC
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ https://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+ */
15
+
16
+ // Creates the `web-vitals/attribution` import in node-based bundlers.
17
+ // This will not be needed when export maps are widely supported.
18
+ export * from './dist/web-vitals.attribution.js';
@@ -1,4 +1,4 @@
1
- import { CLSMetricWithAttribution, AttributionReportOpts } from '../types.js';
1
+ import type { CLSMetricWithAttribution, AttributionReportOpts } from '../types.js';
2
2
  /**
3
3
  * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
4
4
  * calls the `callback` function once the value is ready to be reported, along
@@ -1,8 +1,2 @@
1
- import { FCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
2
- /**
3
- * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
4
- * calls the `callback` function once the value is ready, along with the
5
- * relevant `paint` performance entry used to determine the value. The reported
6
- * value is a `DOMHighResTimeStamp`.
7
- */
1
+ import type { FCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
8
2
  export declare const onFCP: (onReport: (metric: FCPMetricWithAttribution) => void, opts?: AttributionReportOpts) => void;