chrome-devtools-frontend 1.0.1545096 → 1.0.1547571

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 (301) hide show
  1. package/.stylelintrc.json +5 -1
  2. package/docs/contributing/infrastructure.md +2 -2
  3. package/docs/styleguide/ux/styles.md +1 -1
  4. package/eslint.config.mjs +2 -1
  5. package/front_end/Images/generate-css-vars.js +1 -1
  6. package/front_end/Images/src/arrow-down.svg +8 -1
  7. package/front_end/Images/src/arrow-up.svg +8 -1
  8. package/front_end/core/common/common.ts +0 -2
  9. package/front_end/core/host/AidaClient.ts +1 -1
  10. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  11. package/front_end/core/host/UserMetrics.ts +0 -5
  12. package/front_end/core/i18n/collect-ui-strings.js +1 -1
  13. package/front_end/core/i18n/generate-locales-js.js +1 -1
  14. package/front_end/core/platform/HostRuntime.ts +25 -0
  15. package/front_end/core/platform/KeyboardUtilities.ts +2 -2
  16. package/front_end/core/platform/StringUtilities.ts +1 -1
  17. package/front_end/core/platform/api/HostRuntime.ts +45 -0
  18. package/front_end/core/platform/api/api.ts +7 -0
  19. package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
  20. package/front_end/core/platform/browser/browser.ts +7 -0
  21. package/front_end/core/platform/node/HostRuntime.ts +85 -0
  22. package/front_end/core/platform/node/node.ts +7 -0
  23. package/front_end/core/platform/platform.ts +2 -2
  24. package/front_end/core/sdk/AnimationModel.ts +1 -1
  25. package/front_end/core/sdk/CSSModel.ts +1 -1
  26. package/front_end/core/sdk/CSSProperty.ts +1 -1
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
  28. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  29. package/front_end/core/sdk/Cookie.ts +1 -1
  30. package/front_end/core/sdk/DOMModel.ts +2 -2
  31. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  32. package/front_end/core/sdk/NetworkManager.ts +6 -0
  33. package/front_end/core/sdk/PreloadingModel.ts +1 -1
  34. package/front_end/core/sdk/RemoteObject.ts +1 -1
  35. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  36. package/front_end/core/sdk/Script.ts +4 -4
  37. package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
  38. package/front_end/core/sdk/Target.ts +5 -14
  39. package/front_end/core/sdk/TargetManager.ts +26 -4
  40. package/front_end/core/sdk/sdk-meta.ts +62 -0
  41. package/front_end/devtools_compatibility.js +0 -1
  42. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
  43. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
  44. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
  45. package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
  46. package/front_end/entrypoints/main/MainImpl.ts +4 -4
  47. package/front_end/foundation/Universe.ts +2 -2
  48. package/front_end/generated/Deprecation.ts +26 -0
  49. package/front_end/generated/InspectorBackendCommands.ts +5 -4
  50. package/front_end/generated/SupportedCSSProperties.js +17 -15
  51. package/front_end/generated/protocol-mapping.d.ts +2 -0
  52. package/front_end/generated/protocol-proxy-api.d.ts +4 -0
  53. package/front_end/generated/protocol.ts +19 -29
  54. package/front_end/models/ai_assistance/AiConversation.ts +268 -0
  55. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
  56. package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
  57. package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
  58. package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
  59. package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
  60. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
  61. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
  62. package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
  63. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  64. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
  65. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
  66. package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
  67. package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
  68. package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
  69. package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
  70. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
  71. package/front_end/models/crux-manager/CrUXManager.ts +7 -4
  72. package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
  73. package/front_end/models/har/Importer.ts +1 -1
  74. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
  75. package/front_end/models/issues_manager/GenericIssue.ts +12 -9
  76. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  77. package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
  78. package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
  79. package/front_end/models/trace/helpers/Trace.ts +13 -0
  80. package/front_end/models/trace/types/TraceEvents.ts +2 -1
  81. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
  82. package/front_end/models/workspace/IgnoreListManager.ts +1 -2
  83. package/front_end/models/workspace/UISourceCode.ts +50 -0
  84. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
  85. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
  86. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
  87. package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
  88. package/front_end/panels/animation/AnimationTimeline.ts +0 -8
  89. package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
  90. package/front_end/panels/application/FrameDetailsView.ts +64 -36
  91. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  92. package/front_end/panels/application/components/components.ts +0 -2
  93. package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
  94. package/front_end/panels/common/common.ts +2 -1
  95. package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
  96. package/front_end/panels/console/ConsolePrompt.ts +4 -2
  97. package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
  98. package/front_end/panels/console/ConsoleViewport.ts +2 -3
  99. package/front_end/panels/console/consoleInsightTeaser.css +1 -0
  100. package/front_end/panels/coverage/CoverageModel.ts +2 -2
  101. package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
  102. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  103. package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
  104. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
  105. package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
  106. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  107. package/front_end/panels/elements/cssValueTraceView.css +1 -1
  108. package/front_end/panels/elements/elements-meta.ts +1 -0
  109. package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
  110. package/front_end/panels/explain/components/consoleInsight.css +46 -1
  111. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
  112. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
  113. package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
  114. package/front_end/panels/network/networkLogView.css +11 -0
  115. package/front_end/panels/network/networkTimingTable.css +8 -6
  116. package/front_end/panels/network/requestConditionsDrawer.css +10 -1
  117. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  118. package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
  119. package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
  120. package/front_end/panels/recorder/components/StepEditor.ts +1 -1
  121. package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
  122. package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
  123. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  124. package/front_end/panels/sources/CoveragePlugin.ts +5 -5
  125. package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
  126. package/front_end/panels/sources/NavigatorView.ts +1 -1
  127. package/front_end/panels/sources/Plugin.ts +1 -1
  128. package/front_end/panels/sources/ProfilePlugin.ts +22 -14
  129. package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
  130. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
  131. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
  132. package/front_end/panels/sources/sources-meta.ts +0 -62
  133. package/front_end/panels/timeline/README.md +1 -9
  134. package/front_end/panels/timeline/ThreadAppender.ts +0 -7
  135. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  136. package/front_end/panels/timeline/TimelinePanel.ts +8 -8
  137. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
  138. package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
  139. package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
  140. package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
  141. package/front_end/panels/timeline/enable-easter-egg.js +1 -1
  142. package/front_end/panels/timeline/utils/Treemap.ts +1 -1
  143. package/front_end/third_party/chromium/README.chromium +1 -1
  144. package/front_end/third_party/puppeteer/README.chromium +2 -2
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
  193. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
  240. package/front_end/third_party/puppeteer/package/package.json +3 -3
  241. package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
  242. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  243. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
  244. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  245. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
  246. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
  247. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
  248. package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
  249. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
  250. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
  251. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
  252. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  253. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  254. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  255. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
  256. package/front_end/ui/components/text_editor/javascript.ts +1 -1
  257. package/front_end/ui/legacy/ARIAUtils.ts +2 -2
  258. package/front_end/ui/legacy/ActionRegistration.ts +11 -0
  259. package/front_end/ui/legacy/ListWidget.ts +51 -18
  260. package/front_end/ui/legacy/ReportView.ts +1 -1
  261. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  262. package/front_end/ui/legacy/TabbedPane.ts +3 -3
  263. package/front_end/ui/legacy/TextPrompt.ts +3 -2
  264. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  265. package/front_end/ui/legacy/UIUtils.ts +11 -10
  266. package/front_end/ui/legacy/Widget.ts +3 -2
  267. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
  268. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
  269. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
  270. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
  271. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
  272. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
  273. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
  274. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
  275. package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
  276. package/front_end/ui/legacy/inspectorCommon.css +2 -2
  277. package/front_end/ui/legacy/legacy.ts +2 -0
  278. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  279. package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
  280. package/inspector_overlay/tool_window_controls.ts +4 -1
  281. package/mcp/mcp.ts +1 -1
  282. package/package.json +2 -3
  283. package/front_end/panels/application/components/StackTrace.ts +0 -239
  284. package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
  285. package/front_end/panels/application/components/stackTraceRow.css +0 -50
  286. package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
  287. package/front_end/ui/components/docs/README.md +0 -6
  288. package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
  289. package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
  290. package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
  291. package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
  292. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
  293. package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
  294. package/front_end/ui/components/docs/component_docs.ts +0 -24
  295. package/front_end/ui/components/docs/component_docs_styles.css +0 -53
  296. package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
  297. package/front_end/ui/components/docs/slider/basic.html +0 -20
  298. package/front_end/ui/components/docs/switch/basic.html +0 -20
  299. /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
  300. /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
  301. /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
@@ -5,10 +5,9 @@
5
5
 
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as Platform from '../../core/platform/platform.js';
8
- import type * as Workspace from '../../models/workspace/workspace.js';
8
+ import * as Workspace from '../../models/workspace/workspace.js';
9
9
  import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
10
10
  import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
11
- import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
12
11
 
13
12
  import {Plugin} from './Plugin.js';
14
13
 
@@ -90,22 +89,31 @@ class PerformanceMarker extends CodeMirror.GutterMarker {
90
89
  }
91
90
 
92
91
  function markersFromProfileData(
93
- map: Map<number, number>, state: CodeMirror.EditorState,
94
- type: SourceFrame.SourceFrame.DecoratorType): CodeMirror.RangeSet<CodeMirror.GutterMarker> {
95
- const markerType = type === SourceFrame.SourceFrame.DecoratorType.PERFORMANCE ? PerformanceMarker : MemoryMarker;
92
+ map: Map<number, number>|Map<number, Map<number, number>>, state: CodeMirror.EditorState,
93
+ type: Workspace.UISourceCode.DecoratorType): CodeMirror.RangeSet<CodeMirror.GutterMarker> {
94
+ const markerType = type === Workspace.UISourceCode.DecoratorType.PERFORMANCE ? PerformanceMarker : MemoryMarker;
96
95
  const markers: Array<CodeMirror.Range<CodeMirror.GutterMarker>> = [];
96
+ const aggregatedByLine = new Map<number, number>();
97
97
  for (const [line, value] of map) {
98
98
  if (line <= state.doc.lines) {
99
- const {from} = state.doc.line(line);
100
- markers.push(new markerType(value).range(from));
99
+ if (value instanceof Map) {
100
+ for (const [, data] of value) {
101
+ aggregatedByLine.set(line, (aggregatedByLine.get(line) || 0) + data);
102
+ }
103
+ continue;
104
+ }
105
+ aggregatedByLine.set(line, value);
101
106
  }
102
107
  }
108
+ for (const [line, value] of aggregatedByLine) {
109
+ const {from} = state.doc.line(line);
110
+ markers.push(new markerType(value).range(from));
111
+ }
103
112
  return CodeMirror.RangeSet.of(markers, true);
104
113
  }
105
114
 
106
- const makeLineLevelProfilePlugin = (type: SourceFrame.SourceFrame.DecoratorType): typeof Plugin =>
107
- class extends Plugin {
108
- updateEffect = CodeMirror.StateEffect.define<Map<number, number>>();
115
+ const makeLineLevelProfilePlugin = (type: Workspace.UISourceCode.DecoratorType): typeof Plugin => class extends Plugin {
116
+ updateEffect = CodeMirror.StateEffect.define<Map<number, number>|Map<number, Map<number, number>>>();
109
117
  field: CodeMirror.StateField<CodeMirror.RangeSet<CodeMirror.GutterMarker>>;
110
118
  gutter: CodeMirror.Extension;
111
119
  compartment: CodeMirror.Compartment = new CodeMirror.Compartment();
@@ -134,7 +142,7 @@ const makeLineLevelProfilePlugin = (type: SourceFrame.SourceFrame.DecoratorType)
134
142
  return uiSourceCode.contentType().hasScripts();
135
143
  }
136
144
 
137
- private getLineMap(): Map<number, number>|undefined {
145
+ private getLineMap(): Map<number, number>|Map<number, Map<number, number>>|undefined {
138
146
  return this.uiSourceCode.getDecorationData(type);
139
147
  }
140
148
 
@@ -144,7 +152,7 @@ const makeLineLevelProfilePlugin = (type: SourceFrame.SourceFrame.DecoratorType)
144
152
  !map ? [] : [this.field.init(state => markersFromProfileData(map, state, type)), this.gutter, theme]);
145
153
  }
146
154
 
147
- override decorationChanged(type: SourceFrame.SourceFrame.DecoratorType, editor: TextEditor.TextEditor.TextEditor):
155
+ override decorationChanged(type: Workspace.UISourceCode.DecoratorType, editor: TextEditor.TextEditor.TextEditor):
148
156
  void {
149
157
  const installed = Boolean(editor.state.field(this.field, false));
150
158
  const map = this.getLineMap();
@@ -189,6 +197,6 @@ const theme = CodeMirror.EditorView.baseTheme({
189
197
  },
190
198
  });
191
199
 
192
- export const MemoryProfilePlugin = makeLineLevelProfilePlugin(SourceFrame.SourceFrame.DecoratorType.MEMORY);
200
+ export const MemoryProfilePlugin = makeLineLevelProfilePlugin(Workspace.UISourceCode.DecoratorType.MEMORY);
193
201
 
194
- export const PerformanceProfilePlugin = makeLineLevelProfilePlugin(SourceFrame.SourceFrame.DecoratorType.PERFORMANCE);
202
+ export const PerformanceProfilePlugin = makeLineLevelProfilePlugin(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
@@ -136,7 +136,7 @@ export class SourcesSearchScope implements Search.SearchScope.SearchScope {
136
136
  continue;
137
137
  }
138
138
  const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
139
- if (binding && binding.network === uiSourceCode) {
139
+ if (binding?.network === uiSourceCode) {
140
140
  continue;
141
141
  }
142
142
  if (dirtyOnly && !uiSourceCode.isDirty()) {
@@ -238,6 +238,7 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
238
238
  }
239
239
 
240
240
  override async setContent(content: string): Promise<void> {
241
+ this.#uiSourceCode.formatChanged(this.formattedMap);
241
242
  this.disposePlugins();
242
243
  this.loadPlugins();
243
244
  await super.setContent(content);
@@ -423,7 +424,7 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
423
424
 
424
425
  private onDecorationChanged(event: Common.EventTarget.EventTargetEvent<string>): void {
425
426
  for (const plugin of this.plugins) {
426
- plugin.decorationChanged(event.data as SourceFrame.SourceFrame.DecoratorType, this.textEditor);
427
+ plugin.decorationChanged(event.data as Workspace.UISourceCode.DecoratorType, this.textEditor);
427
428
  }
428
429
  }
429
430
 
@@ -42,6 +42,7 @@ import type * as Protocol from '../../generated/protocol.js';
42
42
  import * as Formatter from '../../models/formatter/formatter.js';
43
43
  import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
44
44
  import * as Buttons from '../../ui/components/buttons/buttons.js';
45
+ import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
45
46
  import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
46
47
  // eslint-disable-next-line @devtools/es-modules-import
47
48
  import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
@@ -306,6 +307,13 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
306
307
  }
307
308
  }
308
309
 
310
+ class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
311
+ constructor() {
312
+ super();
313
+ this.initialize(TextEditor.JavaScript.completeInContext);
314
+ }
315
+ }
316
+
309
317
  export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
310
318
  #treeElement!: UI.TreeOutline.TreeElement;
311
319
  private nameElement!: Element;
@@ -315,7 +323,7 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
315
323
  private element: HTMLDivElement;
316
324
  private editing: boolean;
317
325
  private linkifier: Components.Linkifier.Linkifier;
318
- private textPrompt?: ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt;
326
+ private textPrompt?: ObjectPropertyPrompt;
319
327
  private result?: SDK.RemoteObject.RemoteObject|null;
320
328
  private preventClickTimeout?: number;
321
329
  constructor(
@@ -390,7 +398,7 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
390
398
  this.element.removeChildren();
391
399
  const newDiv = this.element.createChild('div');
392
400
  newDiv.textContent = this.nameElement.textContent;
393
- this.textPrompt = new ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt();
401
+ this.textPrompt = new ObjectPropertyPrompt();
394
402
  this.textPrompt.renderAsBlock();
395
403
  const proxyElement = (this.textPrompt.attachAndStartEditing(newDiv, this.finishEditing.bind(this)) as HTMLElement);
396
404
  this.#treeElement.listItemElement.classList.add('watch-expression-editing');
@@ -232,18 +232,6 @@ const UIStrings = {
232
232
  * @description Title of a setting under the Sources category that can be invoked through the Command Menu
233
233
  */
234
234
  doNotAutomaticallyRevealFilesIn: 'Do not automatically reveal files in sidebar',
235
- /**
236
- * @description Setting under the Sources category to toggle usage of JavaScript source maps.
237
- */
238
- javaScriptSourceMaps: 'JavaScript source maps',
239
- /**
240
- * @description Title of a setting under the Sources category that can be invoked through the Command Menu
241
- */
242
- enableJavaScriptSourceMaps: 'Enable JavaScript source maps',
243
- /**
244
- * @description Title of a setting under the Sources category that can be invoked through the Command Menu
245
- */
246
- disableJavaScriptSourceMaps: 'Disable JavaScript source maps',
247
235
  /**
248
236
  * @description Title of a setting under the Sources category.
249
237
  *'tab moves focus' is the name of the setting, which means that when the user
@@ -373,18 +361,6 @@ const UIStrings = {
373
361
  * @description Title of a setting under the Sources category that can be invoked through the Command Menu
374
362
  */
375
363
  doNotDisplayVariableValuesInline: 'Do not display variable values inline while debugging',
376
- /**
377
- * @description Title of a setting under the Sources category
378
- */
379
- cssSourceMaps: 'CSS source maps',
380
- /**
381
- * @description Title of a setting under the Sources category that can be invoked through the Command Menu
382
- */
383
- enableCssSourceMaps: 'Enable CSS source maps',
384
- /**
385
- * @description Title of a setting under the Sources category that can be invoked through the Command Menu
386
- */
387
- disableCssSourceMaps: 'Disable CSS source maps',
388
364
  /**
389
365
  * @description Title of a setting under the Sources category in Settings
390
366
  */
@@ -1556,25 +1532,6 @@ Common.Settings.registerSettingExtension({
1556
1532
  ],
1557
1533
  });
1558
1534
 
1559
- Common.Settings.registerSettingExtension({
1560
- category: Common.Settings.SettingCategory.SOURCES,
1561
- storageType: Common.Settings.SettingStorageType.SYNCED,
1562
- title: i18nLazyString(UIStrings.javaScriptSourceMaps),
1563
- settingName: 'js-source-maps-enabled',
1564
- settingType: Common.Settings.SettingType.BOOLEAN,
1565
- defaultValue: true,
1566
- options: [
1567
- {
1568
- value: true,
1569
- title: i18nLazyString(UIStrings.enableJavaScriptSourceMaps),
1570
- },
1571
- {
1572
- value: false,
1573
- title: i18nLazyString(UIStrings.disableJavaScriptSourceMaps),
1574
- },
1575
- ],
1576
- });
1577
-
1578
1535
  Common.Settings.registerSettingExtension({
1579
1536
  category: Common.Settings.SettingCategory.SOURCES,
1580
1537
  storageType: Common.Settings.SettingStorageType.SYNCED,
@@ -1799,25 +1756,6 @@ Common.Settings.registerSettingExtension({
1799
1756
  ],
1800
1757
  });
1801
1758
 
1802
- Common.Settings.registerSettingExtension({
1803
- category: Common.Settings.SettingCategory.SOURCES,
1804
- storageType: Common.Settings.SettingStorageType.SYNCED,
1805
- title: i18nLazyString(UIStrings.cssSourceMaps),
1806
- settingName: 'css-source-maps-enabled',
1807
- settingType: Common.Settings.SettingType.BOOLEAN,
1808
- defaultValue: true,
1809
- options: [
1810
- {
1811
- value: true,
1812
- title: i18nLazyString(UIStrings.enableCssSourceMaps),
1813
- },
1814
- {
1815
- value: false,
1816
- title: i18nLazyString(UIStrings.disableCssSourceMaps),
1817
- },
1818
- ],
1819
- });
1820
-
1821
1759
  Common.Settings.registerSettingExtension({
1822
1760
  category: Common.Settings.SettingCategory.SOURCES,
1823
1761
  storageType: Common.Settings.SettingStorageType.SYNCED,
@@ -14,15 +14,7 @@ The first method is to run DevTools! Load up the Chrome for Testing version that
14
14
 
15
15
  DevTools, navigate to the Performance Panel and record or import a trace. There are a number of trace files saved in `devtools-frontend/test/unittests/fixtures/traces` that you can use.
16
16
 
17
- #### Option 2: the components server
18
-
19
- You can also use the DevTools component server. This server runs standalone parts of DevTools in the browser. To do this, run `npm run components-server` in the terminal, which will run a server on `localhost:8090`.
20
-
21
- You can then navigate to the Performance Panel examples using the link on the index page. This runs the real Performance Panel code in isolation, and you can additionally preload a trace by appending `?trace=name-of-trace-file-from-fixtures`. This is a nicer development cycle because you do not have to manually import a trace after each change. Note though that some parts of the experience are stubbed, so you always should test your work in proper DevTools too.
22
-
23
- These examples can also be used to create screenshot tests, which are an important tool for the Performance Panel because it is the only way to test `<canvas>` output. We define these as interaction tests (`devtools-frontend/tests/interactions/panels/performance`).
24
-
25
- #### Option 3: bundled DevTools in the browser
17
+ #### Option 2: bundled DevTools in the browser
26
18
 
27
19
  This option loads the DevTools frontend in a browser tab in Chrome, but requires a little more setup to easily load traces.
28
20
 
@@ -135,13 +135,6 @@ const UIStrings = {
135
135
  const str_ = i18n.i18n.registerUIStrings('panels/timeline/ThreadAppender.ts', UIStrings);
136
136
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
137
137
 
138
- /**
139
- * This appender is only triggered when the Renderer handler is run. At
140
- * the moment this only happens in the basic component server example.
141
- * In the future, once this appender fully supports the behaviour of the
142
- * old engine's thread/sync tracks we can always run it by enabling the
143
- * Renderer and Samples handler by default.
144
- **/
145
138
  export class ThreadAppender implements TrackAppender {
146
139
  readonly appenderName: TrackAppenderName = 'Thread';
147
140
 
@@ -777,7 +777,7 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
777
777
 
778
778
  hoverAnnotationInSidebar(annotation: Trace.Types.File.Annotation): void {
779
779
  const overlay = ModificationsManager.activeManager()?.getOverlaybyAnnotation(annotation);
780
- if (overlay && overlay.type === 'ENTRY_LABEL') {
780
+ if (overlay?.type === 'ENTRY_LABEL') {
781
781
  this.#overlays.highlightOverlay(overlay);
782
782
  }
783
783
  }
@@ -945,12 +945,13 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
945
945
  throw new Error('could not create performance agent focus');
946
946
  }
947
947
 
948
- const agent = conversationHandler.createAgent(AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE);
949
- const conversation = new AiAssistanceModel.AiHistoryStorage.Conversation(
948
+ const conversation = new AiAssistanceModel.AiConversation.AiConversation(
950
949
  AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE,
951
950
  [],
952
- agent.id,
951
+ undefined,
953
952
  /* isReadOnly */ true,
953
+ conversationHandler.aidaClient,
954
+ undefined,
954
955
  /* isExternal */ true,
955
956
  );
956
957
 
@@ -960,7 +961,6 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
960
961
  this.#externalAIConversationData = {
961
962
  conversationHandler,
962
963
  conversation,
963
- agent,
964
964
  selected,
965
965
  };
966
966
  }
@@ -1599,7 +1599,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1599
1599
  const recordingData = this.#historyManager.navigate(direction);
1600
1600
  // When navigating programmatically, you cannot navigate to the landing page
1601
1601
  // view, so we can discount that possibility here.
1602
- if (recordingData && recordingData.type === 'TRACE_INDEX') {
1602
+ if (recordingData?.type === 'TRACE_INDEX') {
1603
1603
  this.#changeView({
1604
1604
  mode: 'VIEWING_TRACE',
1605
1605
  traceIndex: recordingData.parsedTraceIndex,
@@ -1652,7 +1652,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
1652
1652
  // Clarifying the window the code is referring to
1653
1653
  const hostWindow = window;
1654
1654
  function onMessageHandler(ev: MessageEvent): void {
1655
- if (url && ev.data && ev.data.type === 'REHYDRATING_WINDOW_READY') {
1655
+ if (url && ev.data?.type === 'REHYDRATING_WINDOW_READY') {
1656
1656
  rehydratingWindow?.postMessage({type: 'REHYDRATING_TRACE_FILE', traceJson}, url.origin);
1657
1657
  }
1658
1658
  hostWindow.removeEventListener('message', onMessageHandler);
@@ -2865,8 +2865,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
2865
2865
  event: Common.EventTarget
2866
2866
  .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>):
2867
2867
  Promise<void> {
2868
- if (this.state !== State.RECORDING || !this.recordingPageReload || !this.controller ||
2869
- this.controller.primaryPageTarget !== event.data.resourceTreeModel.target()) {
2868
+ if (this.state !== State.RECORDING || !this.recordingPageReload ||
2869
+ this.controller?.primaryPageTarget !== event.data.resourceTreeModel.target()) {
2870
2870
  return;
2871
2871
  }
2872
2872
  const controller = this.controller;
@@ -1646,6 +1646,8 @@ export class TimelineUIUtils {
1646
1646
  private static renderEventJson(event: Trace.Types.Events.Event, contentHelper: TimelineDetailsContentHelper): void {
1647
1647
  contentHelper.addSection(i18nString(UIStrings.traceEvent));
1648
1648
 
1649
+ contentHelper.appendElementRow('eventKey', new Trace.EventsSerializer.EventsSerializer().keyForEvent(event) ?? '?');
1650
+
1649
1651
  const eventWithArgsFirst = {
1650
1652
  ...{args: event.args},
1651
1653
  ...event,
@@ -2462,7 +2464,9 @@ export class TimelineDetailsContentHelper {
2462
2464
  const stackTrace = await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()
2463
2465
  .createStackTraceFromProtocolRuntime(runtimeStackTrace, this.target);
2464
2466
  callFrameContents = new LegacyComponents.JSPresentationUtils.StackTracePreviewContent(
2465
- undefined, this.target ?? undefined, this.#linkifier, {stackTrace, tabStops: true, showColumnNumber: true});
2467
+ undefined, this.target ?? undefined, this.#linkifier, {tabStops: true, showColumnNumber: true});
2468
+ callFrameContents.stackTrace = stackTrace;
2469
+ await callFrameContents.updateComplete;
2466
2470
  } else {
2467
2471
  // I _think_ this only happens during tests.
2468
2472
  // See "TimelineFlameChartView > shows the details for a selected main thread event".
@@ -14,6 +14,7 @@ import * as Dialogs from '../../../ui/components/dialogs/dialogs.js';
14
14
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
15
15
  import * as UI from '../../../ui/legacy/legacy.js';
16
16
  import * as Lit from '../../../ui/lit/lit.js';
17
+ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
17
18
 
18
19
  import exportTraceOptionsStyles from './exportTraceOptions.css.js';
19
20
 
@@ -44,6 +45,10 @@ const UIStrings = {
44
45
  * @description Text for the compression option.
45
46
  */
46
47
  shouldCompress: 'Compress with gzip',
48
+ /**
49
+ * @description Text for the explanation link
50
+ */
51
+ explanation: 'Explanation',
47
52
  /**
48
53
  * @description Text for the save trace button
49
54
  */
@@ -292,7 +297,16 @@ export class ExportTraceOptions extends HTMLElement {
292
297
  'script-source-maps',
293
298
  this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
294
299
  ${this.#renderCheckbox('compress-with-gzip', this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
295
- <div class='export-trace-options-row'><div class='export-trace-blank'></div><devtools-button
300
+ <div class='export-trace-options-row export-trace-options-row-last'>
301
+ <div class="export-trace-explanation">
302
+ <x-link
303
+ href="https://developer.chrome.com/docs/devtools/performance/save-trace"
304
+ class=devtools-link
305
+ jslog=${VisualLogging.link().track({click: true, keydown:'Enter|Space'}).context('save-trace-explanation')}>
306
+ ${i18nString(UIStrings.explanation)}
307
+ </x-link>
308
+ </div>
309
+ <devtools-button
296
310
  class="setup-button"
297
311
  data-export-button
298
312
  @click=${this.#onExportClick.bind(this)}
@@ -58,6 +58,14 @@ const UIStrings = {
58
58
  * @description Title of a view that shows performance metrics from the local environment.
59
59
  */
60
60
  localMetrics: 'Local metrics',
61
+ /**
62
+ *@description Text for the link to the historical field data for the specific URL or origin that is shown. This link text appears in parenthesis after the collection period information in the field data dialog. The link opens the CrUX Vis viewer (https://cruxvis.withgoogle.com).
63
+ */
64
+ fieldDataHistoryLink: 'View history',
65
+ /**
66
+ *@description Tooltip for the CrUX Vis viewer link which shows the history of the field data for the specific URL or origin.
67
+ */
68
+ fieldDataHistoryTooltip: 'View field data history in CrUX Vis',
61
69
  /**
62
70
  * @description Accessible label for a section that logs user interactions and layout shifts. A layout shift is an event that shifts content in the layout of the page causing a jarring experience for the user.
63
71
  */
@@ -840,6 +848,32 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
840
848
  });
841
849
  }
842
850
 
851
+ #renderFieldDataHistoryLink(): Lit.LitTemplate {
852
+ if (!this.#cruxManager.getConfigSetting().get().enabled) {
853
+ return Lit.nothing;
854
+ }
855
+ const normalizedUrl = this.#cruxManager.pageResult?.normalizedUrl;
856
+ if (!normalizedUrl) {
857
+ return Lit.nothing;
858
+ }
859
+ const tmp = new URL('https://cruxvis.withgoogle.com/');
860
+ tmp.searchParams.set('view', 'cwvsummary');
861
+ tmp.searchParams.set('url', normalizedUrl);
862
+ // identifier must be 'origin' or 'url'.
863
+ const identifier = this.#cruxManager.fieldPageScope;
864
+ tmp.searchParams.set('identifier', identifier);
865
+ // device must be one 'PHONE', 'DESKTOP', 'TABLET', or 'ALL'.
866
+ const device = this.#cruxManager.getSelectedDeviceScope();
867
+ tmp.searchParams.set('device', device);
868
+ const cruxVis = `${tmp.origin}/#/${tmp.search}`;
869
+ return html`
870
+ (<x-link href=${cruxVis}
871
+ class="local-field-link"
872
+ title=${i18nString(UIStrings.fieldDataHistoryTooltip)}
873
+ >${i18nString(UIStrings.fieldDataHistoryLink)}</x-link>)
874
+ `;
875
+ }
876
+
843
877
  #renderCollectionPeriod(): Lit.LitTemplate {
844
878
  const range = this.#getCollectionPeriodRange();
845
879
 
@@ -851,11 +885,13 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
851
885
  PH1: dateEl,
852
886
  });
853
887
 
888
+ const fieldDataHistoryLink = range ? this.#renderFieldDataHistoryLink() : Lit.nothing;
889
+
854
890
  const warnings = this.#cruxManager.pageResult?.warnings || [];
855
891
 
856
892
  return html`
857
893
  <div class="field-data-message">
858
- <div>${message}</div>
894
+ <div>${message} ${fieldDataHistoryLink}</div>
859
895
  ${warnings.map(warning => html`
860
896
  <div class="field-data-warning">${warning}</div>
861
897
  `)}
@@ -19,13 +19,22 @@
19
19
  height: 24px;
20
20
  }
21
21
 
22
- .export-trace-blank {
22
+ .export-trace-explanation {
23
23
  flex: 1;
24
- min-width: var(--sys-size-25)
24
+ min-width: var(--sys-size-25);
25
25
  }
26
26
  }
27
27
 
28
+ .export-trace-options-row-last {
29
+ align-items: center;
30
+ }
31
+
28
32
  .info-tooltip-container {
29
33
  max-width: var(--sys-size-28);
30
34
  white-space: normal;
31
35
  }
36
+
37
+ x-link {
38
+ color: var(--sys-color-primary);
39
+ text-decoration-line: underline;
40
+ }
@@ -2,7 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- const path = require('path');
5
+ const path = require('node:path');
6
6
 
7
7
  const {writeIfChanged} = require('../../../scripts/build/ninja/write-if-changed.js');
8
8
  const [, , targetGenDir] = process.argv;
@@ -132,7 +132,7 @@ export function makeScriptNode(src: string, sourceRoot: string, sourcesData: Rec
132
132
  * Collapse nodes that have only one child.
133
133
  */
134
134
  function collapseAll(node: TreemapNode): void {
135
- while (node.children && node.children.length === 1) {
135
+ while (node.children?.length === 1) {
136
136
  const child = node.children[0];
137
137
  node.name += '/' + child.name;
138
138
  if (child.duplicatedNormalizedModuleName) {
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: https://chromium.googlesource.com/chromium/src
3
3
  Version: N/A
4
- Revision: ee4cd283ea61d6cd89c8035af63ff05876860e3a
4
+ Revision: d967be56e70076834aad74008418755b70035538
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: Puppeteer Core
2
2
  Short Name: Puppeteer Core
3
3
  URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
4
- Version: 24.30.0
4
+ Version: 24.31.0
5
5
  License: Apache-2.0
6
6
  License File: LICENSE
7
- Revision: 1afcd1605bd49775cfc8c16ddfc76aae6dacbd8b
7
+ Revision: 1ad21f5e63d828175a1a5ca96c397c3d6ee1802b
8
8
  Security Critical: no
9
9
  Shipped: yes
10
10
  Update Mechanism: Autoroll
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { WaitTimeoutOptions } from './Page.js';
7
+ /**
8
+ * Device in a request prompt.
9
+ *
10
+ * @public
11
+ */
12
+ export declare class DeviceRequestPromptDevice {
13
+ /**
14
+ * Device id during a prompt.
15
+ */
16
+ id: string;
17
+ /**
18
+ * Device name as it appears in a prompt.
19
+ */
20
+ name: string;
21
+ /**
22
+ * @internal
23
+ */
24
+ constructor(id: string, name: string);
25
+ }
26
+ /**
27
+ * Device request prompts let you respond to the page requesting for a device
28
+ * through an API like WebBluetooth.
29
+ *
30
+ * @remarks
31
+ * `DeviceRequestPrompt` instances are returned via the
32
+ * {@link Page.waitForDevicePrompt} method.
33
+ *
34
+ * @example
35
+ *
36
+ * ```ts
37
+ * const [devicePrompt] = Promise.all([
38
+ * page.waitForDevicePrompt(),
39
+ * page.click('#connect-bluetooth'),
40
+ * ]);
41
+ * await devicePrompt.select(
42
+ * await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
43
+ * );
44
+ * ```
45
+ *
46
+ * @public
47
+ */
48
+ export declare abstract class DeviceRequestPrompt {
49
+ /**
50
+ * Current list of selectable devices.
51
+ */
52
+ abstract get devices(): DeviceRequestPromptDevice[];
53
+ /**
54
+ * Resolve to the first device in the prompt matching a filter.
55
+ */
56
+ abstract waitForDevice(filter: (device: DeviceRequestPromptDevice) => boolean, options?: WaitTimeoutOptions): Promise<DeviceRequestPromptDevice>;
57
+ /**
58
+ * Select a device in the prompt's list.
59
+ */
60
+ abstract select(device: DeviceRequestPromptDevice): Promise<void>;
61
+ /**
62
+ * Cancel the prompt.
63
+ */
64
+ abstract cancel(): Promise<void>;
65
+ }
66
+ //# sourceMappingURL=DeviceRequestPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceRequestPrompt.d.ts","sourceRoot":"","sources":["../../../../src/api/DeviceRequestPrompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAElD;;;;GAIG;AACH,qBAAa,yBAAyB;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;gBACS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAIrC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,QAAQ,KAAK,OAAO,IAAI,yBAAyB,EAAE,CAAC;IAEpD;;OAEG;IACH,QAAQ,CAAC,aAAa,CACpB,MAAM,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,OAAO,EACtD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,yBAAyB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEjE;;OAEG;IACH,QAAQ,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CACjC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google Inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.DeviceRequestPrompt = exports.DeviceRequestPromptDevice = void 0;
9
+ /**
10
+ * Device in a request prompt.
11
+ *
12
+ * @public
13
+ */
14
+ class DeviceRequestPromptDevice {
15
+ /**
16
+ * Device id during a prompt.
17
+ */
18
+ id;
19
+ /**
20
+ * Device name as it appears in a prompt.
21
+ */
22
+ name;
23
+ /**
24
+ * @internal
25
+ */
26
+ constructor(id, name) {
27
+ this.id = id;
28
+ this.name = name;
29
+ }
30
+ }
31
+ exports.DeviceRequestPromptDevice = DeviceRequestPromptDevice;
32
+ /**
33
+ * Device request prompts let you respond to the page requesting for a device
34
+ * through an API like WebBluetooth.
35
+ *
36
+ * @remarks
37
+ * `DeviceRequestPrompt` instances are returned via the
38
+ * {@link Page.waitForDevicePrompt} method.
39
+ *
40
+ * @example
41
+ *
42
+ * ```ts
43
+ * const [devicePrompt] = Promise.all([
44
+ * page.waitForDevicePrompt(),
45
+ * page.click('#connect-bluetooth'),
46
+ * ]);
47
+ * await devicePrompt.select(
48
+ * await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
49
+ * );
50
+ * ```
51
+ *
52
+ * @public
53
+ */
54
+ class DeviceRequestPrompt {
55
+ }
56
+ exports.DeviceRequestPrompt = DeviceRequestPrompt;
57
+ //# sourceMappingURL=DeviceRequestPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceRequestPrompt.js","sourceRoot":"","sources":["../../../../src/api/DeviceRequestPrompt.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH;;;;GAIG;AACH,MAAa,yBAAyB;IACpC;;OAEG;IACH,EAAE,CAAS;IAEX;;OAEG;IACH,IAAI,CAAS;IAEb;;OAEG;IACH,YAAY,EAAU,EAAE,IAAY;QAClC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAlBD,8DAkBC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAsB,mBAAmB;CAuBxC;AAvBD,kDAuBC"}