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
@@ -55,11 +55,9 @@ import checkboxTextLabelStyles from './checkboxTextLabel.css.js';
55
55
  import confirmDialogStyles from './confirmDialog.css.js';
56
56
  import {Dialog} from './Dialog.js';
57
57
  import {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';
58
- import inlineButtonStyles from './inlineButton.css.js';
59
58
  import inspectorCommonStyles from './inspectorCommon.css.js';
60
59
  import {KeyboardShortcut, Keys} from './KeyboardShortcut.js';
61
60
  import smallBubbleStyles from './smallBubble.css.js';
62
- import type {ToolbarButton} from './Toolbar.js';
63
61
  import {Tooltip} from './Tooltip.js';
64
62
  import {Widget} from './Widget.js';
65
63
 
@@ -1757,15 +1755,6 @@ export class ConfirmDialog {
1757
1755
  }
1758
1756
  }
1759
1757
 
1760
- export function createInlineButton(toolbarButton: ToolbarButton): Element {
1761
- const element = document.createElement('span');
1762
- const shadowRoot = createShadowRootWithCoreStyles(element, {cssFile: inlineButtonStyles});
1763
- element.classList.add('inline-button');
1764
- const toolbar = shadowRoot.createChild('devtools-toolbar');
1765
- toolbar.appendToolbarItem(toolbarButton);
1766
- return element;
1767
- }
1768
-
1769
1758
  export interface RenderedObject {
1770
1759
  element: HTMLElement;
1771
1760
  forceSelect(): void;
@@ -2135,6 +2124,7 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2135
2124
  const action = ActionRegistry.instance().getAction(actionName);
2136
2125
 
2137
2126
  let setEnabled: (enabled: boolean) => void;
2127
+ let toggled: () => void;
2138
2128
  function actionEnabledChanged(event: Common.EventTarget.EventTargetEvent<boolean>): void {
2139
2129
  setEnabled(event.data);
2140
2130
  }
@@ -2142,6 +2132,7 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2142
2132
  return Directives.ref((e: Element|undefined) => {
2143
2133
  if (!e || !(e instanceof Buttons.Button.Button)) {
2144
2134
  action.removeEventListener(ActionRegistration.Events.ENABLED, actionEnabledChanged);
2135
+ action.removeEventListener(ActionRegistration.Events.TOGGLED, toggled);
2145
2136
  return;
2146
2137
  }
2147
2138
 
@@ -2151,10 +2142,34 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2151
2142
 
2152
2143
  action.addEventListener(ActionRegistration.Events.ENABLED, actionEnabledChanged);
2153
2144
 
2145
+ const toggleable = action.toggleable();
2154
2146
  const title = action.title();
2155
- const iconName = action.icon();
2147
+ const iconName = action.icon() ?? '';
2156
2148
  const jslogContext = action.id();
2157
- if (iconName) {
2149
+ const toggledIconName = action.toggledIcon() ?? iconName;
2150
+ const toggleType = action.toggleWithRedColor() ? Buttons.Button.ToggleType.RED : Buttons.Button.ToggleType.PRIMARY;
2151
+ if (e.childNodes.length) {
2152
+ e.jslogContext = jslogContext;
2153
+ } else if (toggleable) {
2154
+ toggled = () => {
2155
+ e.toggled = action.toggled();
2156
+ if (action.title()) {
2157
+ e.title = action.title();
2158
+ Tooltip.installWithActionBinding(e, action.title(), action.id());
2159
+ }
2160
+ };
2161
+ action.addEventListener(ActionRegistration.Events.TOGGLED, toggled);
2162
+ e.data = {
2163
+ jslogContext,
2164
+ title,
2165
+ variant: Buttons.Button.Variant.ICON_TOGGLE,
2166
+ iconName,
2167
+ toggledIconName,
2168
+ toggleType,
2169
+ toggled: action.toggled(),
2170
+ };
2171
+ toggled();
2172
+ } else if (iconName) {
2158
2173
  e.data = {iconName, jslogContext, title, variant: Buttons.Button.Variant.ICON};
2159
2174
  } else {
2160
2175
  e.data = {jslogContext, title, variant: Buttons.Button.Variant.TEXT};
@@ -441,6 +441,7 @@ export class ContainerWidget extends VBox {
441
441
  }
442
442
 
443
443
  override wasShown(): void {
444
+ super.wasShown();
444
445
  void this.materialize().then(() => {
445
446
  const widget = widgetForView.get(this.view);
446
447
  if (widget) {
@@ -737,6 +737,11 @@ export class Widget {
737
737
  return;
738
738
  }
739
739
 
740
+ if (this.#shadowRoot?.delegatesFocus && this.contentElement.querySelector('[autofocus]')) {
741
+ this.element.focus();
742
+ return;
743
+ }
744
+
740
745
  const element = (this.#defaultFocusedElement as HTMLElement | null);
741
746
  if (element) {
742
747
  if (!element.hasFocus()) {
@@ -4,15 +4,13 @@
4
4
 
5
5
  import * as Common from '../../../../core/common/common.js';
6
6
  import * as i18n from '../../../../core/i18n/i18n.js';
7
- import * as IconButton from '../../../components/icon_button/icon_button.js';
8
7
  import * as UI from '../../legacy.js';
9
8
 
10
9
  const UIStrings = {
11
10
  /**
12
- * @description Tooltip text describing that a color was clipped after conversion to match the target gamut
13
- * @example {rgb(255 255 255)} PH1
11
+ * @description Menu warning that some color will be clipped after conversion to match the target gamut
14
12
  */
15
- colorClippedTooltipText: 'This color was clipped to match the format\'s gamut. The actual result was {PH1}',
13
+ colorShiftWarning: '⚠️ Conversion to a narrow gamut will cause color shifts',
16
14
  } as const;
17
15
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/color_picker/FormatPickerContextMenu.ts', UIStrings);
18
16
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -56,10 +54,13 @@ export class FormatPickerContextMenu {
56
54
  Common.Color.Format.XYZ_D65,
57
55
  ];
58
56
  const menu = new UI.ContextMenu.ContextMenu(e, {onSoftMenuClosed: () => resolve()});
57
+ const disclamerSection = menu.section('disclaimer');
59
58
  const legacySection = menu.section('legacy');
60
59
  const wideSection = menu.section('wide');
61
60
  const colorFunctionSection = menu.section('color-function').appendSubMenuItem('color()', false, 'color').section();
62
61
 
62
+ disclamerSection.appendItem(i18nString(UIStrings.colorShiftWarning), () => {}, {disabled: true});
63
+
63
64
  if (!(this.#color instanceof Common.Color.Nickname)) {
64
65
  const nickname = this.#color.asLegacyColor().nickname();
65
66
  if (nickname) {
@@ -102,27 +103,13 @@ export class FormatPickerContextMenu {
102
103
  return;
103
104
  }
104
105
  }
105
- const label = newColor.asString();
106
+ const label = newColor.isGamutClipped() ? newColor.asString() + ' ⚠️' : newColor.asString();
106
107
  if (!label) {
107
108
  return;
108
109
  }
109
- let icon = undefined;
110
- if (newColor.isGamutClipped()) {
111
- icon = new IconButton.Icon.Icon();
112
- icon.name = 'warning';
113
- icon.classList.add('medium');
114
- icon.style.marginLeft = '1px';
115
- icon.style.marginTop = '-1px';
116
- icon.style.minWidth = '16px';
117
- icon.style.minHeight = '16px';
118
- }
119
- const tooltip =
120
- icon ? i18nString(UIStrings.colorClippedTooltipText, {PH1: newColor.getAsRawString() ?? 'none'}) : undefined;
121
110
 
122
111
  const handler = (): void => onSelect(newColor);
123
112
 
124
- section.appendItem(
125
- label, handler,
126
- {additionalElement: icon, tooltip, jslogContext: newColor.isGamutClipped() ? 'color' : 'clipped-color'});
113
+ section.appendItem(label, handler, {jslogContext: newColor.isGamutClipped() ? 'color' : 'clipped-color'});
127
114
  }
128
115
  }
@@ -1366,6 +1366,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
1366
1366
  }
1367
1367
 
1368
1368
  override wasShown(): void {
1369
+ super.wasShown();
1369
1370
  this.hueAlphaWidth = this.hueElement.offsetWidth;
1370
1371
  this.slideHelperWidth = this.hueSlider.offsetWidth / 2;
1371
1372
  this.dragWidth = this.colorElement.offsetWidth;
@@ -1388,6 +1389,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
1388
1389
  }
1389
1390
 
1390
1391
  override willHide(): void {
1392
+ super.willHide();
1391
1393
  void this.toggleColorPicker(false);
1392
1394
  if (this.contrastDetails && this.contrastDetailsBackgroundColorPickerToggledBound) {
1393
1395
  this.contrastDetails.removeEventListener(
@@ -325,6 +325,7 @@ export class CookiesTable extends UI.Widget.VBox {
325
325
  }
326
326
 
327
327
  override willHide(): void {
328
+ super.willHide();
328
329
  this.lastEditedColumnId = null;
329
330
  }
330
331
 
@@ -312,6 +312,7 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
312
312
  for (const element of this.#getStyleElements(nodes)) {
313
313
  this.#shadowRoot.appendChild(element.cloneNode(true));
314
314
  }
315
+ this.#dataGrid.dispatchEventToListeners(DataGridEvents.SORTING_CHANGED);
315
316
  }
316
317
 
317
318
  override removeNodes(nodes: NodeList): void {
@@ -346,7 +347,6 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
346
347
  dataGridNode.refresh();
347
348
  }
348
349
  }
349
- this.#dataGrid.dispatchEventToListeners(DataGridEvents.SORTING_CHANGED);
350
350
  }
351
351
 
352
352
  #updateCreationNode(): void {
@@ -99,6 +99,7 @@ export class BezierEditor extends Common.ObjectWrapper.eventMixin<EventTypes, ty
99
99
  }
100
100
 
101
101
  override wasShown(): void {
102
+ super.wasShown();
102
103
  this.unselectPresets();
103
104
  // Check if bezier matches a preset
104
105
  for (const category of this.presetCategories) {
@@ -498,6 +498,7 @@ export class ChartViewport extends UI.Widget.VBox {
498
498
  }
499
499
 
500
500
  override willHide(): void {
501
+ super.willHide();
501
502
  // Stop animations when the view is hidden (or destroyed).
502
503
  // In this case, we also jump the time immediately to the target time, so
503
504
  // that if the view is restored, the time shown is correct.
@@ -229,6 +229,7 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
229
229
  }
230
230
 
231
231
  override willHide(): void {
232
+ super.willHide();
232
233
  if (this.provider) {
233
234
  this.provider.detach();
234
235
  }
@@ -128,6 +128,7 @@ export class FontView extends UI.View.SimpleView {
128
128
  }
129
129
 
130
130
  override wasShown(): void {
131
+ super.wasShown();
131
132
  this.createContentIfNeeded();
132
133
 
133
134
  this.updateFontPreviewSize();
@@ -141,6 +141,7 @@ export class ImageView extends UI.View.SimpleView {
141
141
  }
142
142
 
143
143
  override wasShown(): void {
144
+ super.wasShown();
144
145
  void this.updateContentIfNeeded();
145
146
  }
146
147
 
@@ -134,6 +134,7 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
134
134
  }
135
135
 
136
136
  override wasShown(): void {
137
+ super.wasShown();
137
138
  this.initialize();
138
139
  }
139
140
 
@@ -480,6 +480,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
480
480
  }
481
481
 
482
482
  override wasShown(): void {
483
+ super.wasShown();
483
484
  void this.ensureContentLoaded();
484
485
  this.wasShownOrLoaded();
485
486
  }
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable rulesdir/no-imperative-dom-api */
5
5
 
6
+ import type * as Common from '../../../../core/common/common.js';
6
7
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
7
8
  import * as LinearMemoryInspectorComponents from '../../../../panels/linear_memory_inspector/components/components.js';
8
9
  import * as UI from '../../legacy.js';
@@ -22,19 +23,18 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
22
23
 
23
24
  constructor() {
24
25
  super();
25
- this.#inspector.contentElement.addEventListener(
26
- LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,
27
- (event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) =>
28
- this.#memoryRequested(event));
29
- this.#inspector.contentElement.addEventListener(
30
- LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,
31
- (event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) => {
26
+ this.#inspector.addEventListener(
27
+ LinearMemoryInspectorComponents.LinearMemoryInspector.Events.MEMORY_REQUEST, this.#memoryRequested, this);
28
+ this.#inspector.addEventListener(
29
+ LinearMemoryInspectorComponents.LinearMemoryInspector.Events.ADDRESS_CHANGED,
30
+ (event: Common.EventTarget.EventTargetEvent<number>) => {
32
31
  this.#address = event.data;
33
32
  });
34
33
  this.#inspector.show(this.contentElement);
35
34
  }
36
35
 
37
36
  override wasShown(): void {
37
+ super.wasShown();
38
38
  this.refreshData();
39
39
  }
40
40
 
@@ -60,7 +60,7 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
60
60
  this.#inspector.hideValueInspector = true;
61
61
  }
62
62
 
63
- #memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {
63
+ #memoryRequested(event: Common.EventTarget.EventTargetEvent<{start: number, end: number, address: number}>): void {
64
64
  // TODO(szuend): The following lines are copied from `LinearMemoryInspectorController`. We can't reuse them
65
65
  // as depending on a module in `panels/` from a component is a layering violation.
66
66
 
@@ -100,6 +100,7 @@ export class StreamingContentHexView extends LinearMemoryInspectorView {
100
100
  }
101
101
 
102
102
  override wasShown(): void {
103
+ super.wasShown();
103
104
  this.#updateMemoryFromContentData();
104
105
  this.#streamingContentData.addEventListener(
105
106
  TextUtils.StreamingContentData.Events.CHUNK_ADDED, this.#updateMemoryFromContentData, this);
@@ -2181,9 +2181,11 @@ export const knownContextValues = new Set([
2181
2181
  'lighthouse.audit.bootup-time',
2182
2182
  'lighthouse.audit.button-name',
2183
2183
  'lighthouse.audit.bypass',
2184
+ 'lighthouse.audit.cache-insight',
2184
2185
  'lighthouse.audit.canonical',
2185
2186
  'lighthouse.audit.charset',
2186
2187
  'lighthouse.audit.clickjacking-mitigation',
2188
+ 'lighthouse.audit.cls-culprits-insight',
2187
2189
  'lighthouse.audit.color-contrast',
2188
2190
  'lighthouse.audit.crawlable-anchors',
2189
2191
  'lighthouse.audit.critical-request-chains',
@@ -2196,10 +2198,13 @@ export const knownContextValues = new Set([
2196
2198
  'lighthouse.audit.diagnostics',
2197
2199
  'lighthouse.audit.dlitem',
2198
2200
  'lighthouse.audit.doctype',
2201
+ 'lighthouse.audit.document-latency-insight',
2199
2202
  'lighthouse.audit.document-title',
2200
2203
  'lighthouse.audit.dom-size',
2204
+ 'lighthouse.audit.dom-size-insight',
2201
2205
  'lighthouse.audit.duplicate-id-aria',
2202
2206
  'lighthouse.audit.duplicated-javascript',
2207
+ 'lighthouse.audit.duplicated-javascript-insight',
2203
2208
  'lighthouse.audit.efficient-animated-content',
2204
2209
  'lighthouse.audit.empty-heading',
2205
2210
  'lighthouse.audit.errors-in-console',
@@ -2209,7 +2214,9 @@ export const knownContextValues = new Set([
2209
2214
  'lighthouse.audit.focus-traps',
2210
2215
  'lighthouse.audit.focusable-controls',
2211
2216
  'lighthouse.audit.font-display',
2217
+ 'lighthouse.audit.font-display-insight',
2212
2218
  'lighthouse.audit.font-size',
2219
+ 'lighthouse.audit.forced-reflow-insight',
2213
2220
  'lighthouse.audit.form-field-multiple-labels',
2214
2221
  'lighthouse.audit.frame-title',
2215
2222
  'lighthouse.audit.geolocation-on-start',
@@ -2223,8 +2230,10 @@ export const knownContextValues = new Set([
2223
2230
  'lighthouse.audit.identical-links-same-purpose',
2224
2231
  'lighthouse.audit.image-alt',
2225
2232
  'lighthouse.audit.image-aspect-ratio',
2233
+ 'lighthouse.audit.image-delivery-insight',
2226
2234
  'lighthouse.audit.image-redundant-alt',
2227
2235
  'lighthouse.audit.image-size-responsive',
2236
+ 'lighthouse.audit.inp-breakdown-insight',
2228
2237
  'lighthouse.audit.input-button-name',
2229
2238
  'lighthouse.audit.input-image-alt',
2230
2239
  'lighthouse.audit.inspector-issues',
@@ -2240,8 +2249,11 @@ export const knownContextValues = new Set([
2240
2249
  'lighthouse.audit.largest-contentful-paint',
2241
2250
  'lighthouse.audit.largest-contentful-paint-element',
2242
2251
  'lighthouse.audit.layout-shifts',
2252
+ 'lighthouse.audit.lcp-breakdown-insight',
2253
+ 'lighthouse.audit.lcp-discovery-insight',
2243
2254
  'lighthouse.audit.lcp-lazy-loaded',
2244
2255
  'lighthouse.audit.legacy-javascript',
2256
+ 'lighthouse.audit.legacy-javascript-insight',
2245
2257
  'lighthouse.audit.link-in-text-block',
2246
2258
  'lighthouse.audit.link-name',
2247
2259
  'lighthouse.audit.link-text',
@@ -2257,7 +2269,9 @@ export const knownContextValues = new Set([
2257
2269
  'lighthouse.audit.meta-refresh',
2258
2270
  'lighthouse.audit.meta-viewport',
2259
2271
  'lighthouse.audit.metrics',
2272
+ 'lighthouse.audit.modern-http-insight',
2260
2273
  'lighthouse.audit.modern-image-formats',
2274
+ 'lighthouse.audit.network-dependency-tree-insight',
2261
2275
  'lighthouse.audit.network-requests',
2262
2276
  'lighthouse.audit.network-rtt',
2263
2277
  'lighthouse.audit.network-server-latency',
@@ -2272,6 +2286,7 @@ export const knownContextValues = new Set([
2272
2286
  'lighthouse.audit.prioritize-lcp-image',
2273
2287
  'lighthouse.audit.redirects',
2274
2288
  'lighthouse.audit.redirects-http',
2289
+ 'lighthouse.audit.render-blocking-insight',
2275
2290
  'lighthouse.audit.render-blocking-resources',
2276
2291
  'lighthouse.audit.resource-summary',
2277
2292
  'lighthouse.audit.robots-txt',
@@ -2289,6 +2304,7 @@ export const knownContextValues = new Set([
2289
2304
  'lighthouse.audit.td-has-header',
2290
2305
  'lighthouse.audit.td-headers-attr',
2291
2306
  'lighthouse.audit.th-has-data-cells',
2307
+ 'lighthouse.audit.third-parties-insight',
2292
2308
  'lighthouse.audit.third-party-cookies',
2293
2309
  'lighthouse.audit.third-party-facades',
2294
2310
  'lighthouse.audit.third-party-summary',
@@ -2314,6 +2330,7 @@ export const knownContextValues = new Set([
2314
2330
  'lighthouse.audit.valid-source-maps',
2315
2331
  'lighthouse.audit.video-caption',
2316
2332
  'lighthouse.audit.viewport',
2333
+ 'lighthouse.audit.viewport-insight',
2317
2334
  'lighthouse.audit.visual-order-follows-dom',
2318
2335
  'lighthouse.audit.work-during-interaction',
2319
2336
  'lighthouse.cancel',
package/mcp/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # MCP
2
+
3
+ This is the entrypoint for
4
+ [chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp).
5
+ Unlike other entrypoints in front_end, the build output of this one is not
6
+ consumed (yet). Instead, `chrome-devtools-mcp` integrates files exported here
7
+ and their transitive dependencies into its own build.
package/mcp/mcp.ts ADDED
@@ -0,0 +1,8 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export {PerformanceInsightFormatter} from '../front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.js';
6
+ export {PerformanceTraceFormatter} from '../front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.js';
7
+ export {AgentFocus} from '../front_end/models/ai_assistance/performance/AIContext.js';
8
+ export * as TraceEngine from '../front_end/models/trace/trace.js';
package/package.json CHANGED
@@ -102,5 +102,5 @@
102
102
  "flat-cache": "6.1.12"
103
103
  }
104
104
  },
105
- "version": "1.0.1526203"
105
+ "version": "1.0.1528866"
106
106
  }
@@ -1,34 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- /**
6
- * @file web-vitals.js doesn't provide a log of all interactions.
7
- * This solution is hacky but it was recommended by web-vitals devs:
8
- * b/371052022
9
- */
10
-
11
- import * as WebVitals from '../../../third_party/web-vitals/web-vitals.js';
12
-
13
- export function onEachInteraction(onReport: (metric: WebVitals.INPMetricWithAttribution) => void): void {
14
- WebVitals.entryPreProcessingCallbacks.push((entry: PerformanceEventTiming) => {
15
- // Wait a microtask so this "pre" processing callback actually
16
- // becomes a "post" processing callback.
17
- void Promise.resolve().then(() => {
18
- if (entry.interactionId) {
19
- const interaction = WebVitals.attributeINP({
20
- entries: [entry],
21
- // The only value we really need for `attributeINP` is `entries`
22
- // Everything else is included to fill out the type.
23
- name: 'INP',
24
- rating: 'good',
25
- value: entry.duration,
26
- delta: entry.duration,
27
- navigationType: 'navigate',
28
- id: 'N/A',
29
- });
30
- onReport(interaction);
31
- }
32
- });
33
- });
34
- }
@@ -1,16 +0,0 @@
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';
@@ -1,18 +0,0 @@
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,7 +0,0 @@
1
- export {
2
- /**
3
- * @deprecated Use `onINP()` instead.
4
- */
5
- onFID, } from './onFID.js';
6
- export { FIDThresholds } from '../onFID.js';
7
- export * from '../types.js';
@@ -1,11 +0,0 @@
1
- import { FIDMetricWithAttribution, ReportOpts } from '../types.js';
2
- /**
3
- * Calculates the [FID](https://web.dev/articles/fid) value for the current page and
4
- * calls the `callback` function once the value is ready, along with the
5
- * relevant `first-input` performance entry used to determine the value. The
6
- * reported value is a `DOMHighResTimeStamp`.
7
- *
8
- * _**Important:** since FID is only reported after the user interacts with the
9
- * page, it's possible that it will not be reported for some page loads._
10
- */
11
- export declare const onFID: (onReport: (metric: FIDMetricWithAttribution) => void, opts?: ReportOpts) => void;
@@ -1,46 +0,0 @@
1
- /*
2
- * Copyright 2022 Google LLC
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { getLoadState } from '../lib/getLoadState.js';
17
- import { getSelector } from '../lib/getSelector.js';
18
- import { onFID as unattributedOnFID } from '../onFID.js';
19
- const attributeFID = (metric) => {
20
- const fidEntry = metric.entries[0];
21
- const attribution = {
22
- eventTarget: getSelector(fidEntry.target),
23
- eventType: fidEntry.name,
24
- eventTime: fidEntry.startTime,
25
- eventEntry: fidEntry,
26
- loadState: getLoadState(fidEntry.startTime),
27
- };
28
- // Use Object.assign to set property to keep tsc happy.
29
- const metricWithAttribution = Object.assign(metric, { attribution });
30
- return metricWithAttribution;
31
- };
32
- /**
33
- * Calculates the [FID](https://web.dev/articles/fid) value for the current page and
34
- * calls the `callback` function once the value is ready, along with the
35
- * relevant `first-input` performance entry used to determine the value. The
36
- * reported value is a `DOMHighResTimeStamp`.
37
- *
38
- * _**Important:** since FID is only reported after the user interacts with the
39
- * page, it's possible that it will not be reported for some page loads._
40
- */
41
- export const onFID = (onReport, opts) => {
42
- unattributedOnFID((metric) => {
43
- const metricWithAttribution = attributeFID(metric);
44
- onReport(metricWithAttribution);
45
- }, opts);
46
- };
@@ -1,5 +0,0 @@
1
- export {
2
- /**
3
- * @deprecated Use `onINP()` instead.
4
- */
5
- onFID, FIDThresholds, } from './onFID.js';
@@ -1,31 +0,0 @@
1
- interface Interaction {
2
- id: number;
3
- latency: number;
4
- entries: PerformanceEventTiming[];
5
- }
6
- interface EntryPreProcessingHook {
7
- (entry: PerformanceEventTiming): void;
8
- }
9
- export declare const longestInteractionList: Interaction[];
10
- export declare const longestInteractionMap: Map<number, Interaction>;
11
- export declare const DEFAULT_DURATION_THRESHOLD = 40;
12
- export declare const resetInteractions: () => void;
13
- /**
14
- * Returns the estimated p98 longest interaction based on the stored
15
- * interaction candidates and the interaction count for the current page.
16
- */
17
- export declare const estimateP98LongestInteraction: () => Interaction;
18
- /**
19
- * A list of callback functions to run before each entry is processed.
20
- * Exposing this list allows the attribution build to hook into the
21
- * entry processing pipeline.
22
- */
23
- export declare const entryPreProcessingCallbacks: EntryPreProcessingHook[];
24
- /**
25
- * Takes a performance entry and adds it to the list of worst interactions
26
- * if its duration is long enough to make it among the worst. If the
27
- * entry is part of an existing interaction, it is merged and the latency
28
- * and entries list is updated as needed.
29
- */
30
- export declare const processInteractionEntry: (entry: PerformanceEventTiming) => void;
31
- export {};