chrome-devtools-frontend 1.0.1690116 → 1.0.1695017

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 (421) hide show
  1. package/.agents/skills/devtools-model-management/SKILL.md +3 -3
  2. package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
  3. package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
  4. package/AUTHORS +3 -0
  5. package/config/typescript/tsconfig.base.json +1 -0
  6. package/docs/get_the_code.md +4 -9
  7. package/front_end/Images/src/comment-mode-cursor.svg +23 -0
  8. package/front_end/Tests.js +1 -1
  9. package/front_end/application_tokens.css +5 -0
  10. package/front_end/core/common/ColorConverter.ts +3 -3
  11. package/front_end/core/host/UserMetrics.ts +27 -0
  12. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
  13. package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
  14. package/front_end/core/root/Runtime.ts +1 -0
  15. package/front_end/core/sdk/CSSLocation.ts +32 -0
  16. package/front_end/core/sdk/CSSModel.ts +2 -22
  17. package/front_end/core/sdk/CSSQuery.ts +2 -1
  18. package/front_end/core/sdk/CSSRule.ts +29 -0
  19. package/front_end/core/sdk/DebuggerModel.ts +5 -1
  20. package/front_end/core/sdk/NetworkManager.ts +2 -0
  21. package/front_end/core/sdk/NetworkRequest.ts +63 -4
  22. package/front_end/core/sdk/NetworkRequestAccess.ts +191 -0
  23. package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
  24. package/front_end/core/sdk/SecurityOrigin.ts +97 -12
  25. package/front_end/core/sdk/Target.ts +18 -0
  26. package/front_end/core/sdk/sdk.ts +4 -0
  27. package/front_end/entrypoints/main/MainImpl.ts +8 -1
  28. package/front_end/foundation/Universe.ts +14 -11
  29. package/front_end/generated/Deprecation.ts +8 -0
  30. package/front_end/generated/InspectorBackendCommands.ts +9 -8
  31. package/front_end/generated/SupportedCSSProperties.ts +14 -4
  32. package/front_end/generated/protocol.ts +24 -0
  33. package/front_end/models/ai_assistance/AiAgent2.ts +46 -10
  34. package/front_end/models/ai_assistance/AiConversation.ts +35 -24
  35. package/front_end/models/ai_assistance/README.md +5 -3
  36. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
  37. package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
  38. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
  39. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
  40. package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
  41. package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
  42. package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
  43. package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
  44. package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
  45. package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
  46. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
  47. package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
  48. package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
  49. package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
  50. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
  51. package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
  52. package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
  53. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
  54. package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
  55. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
  56. package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
  57. package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
  58. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
  59. package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
  60. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
  61. package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
  62. package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
  63. package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
  64. package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
  65. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
  66. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
  67. package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
  68. package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
  69. package/front_end/models/ai_assistance/tools/README.md +4 -2
  70. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
  71. package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
  72. package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
  73. package/front_end/models/comment_manager/CommentManager.ts +50 -8
  74. package/front_end/models/comment_manager/comment_manager.ts +2 -0
  75. package/front_end/models/emulation/DeviceModeModel.ts +37 -47
  76. package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
  77. package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
  78. package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
  79. package/front_end/models/trace/ModelImpl.ts +2 -0
  80. package/front_end/models/trace/Processor.ts +6 -4
  81. package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
  82. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
  83. package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
  84. package/front_end/models/trace/types/Configuration.ts +7 -0
  85. package/front_end/models/trace/types/TraceEvents.ts +20 -4
  86. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
  87. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
  88. package/front_end/panels/accessibility/accessibility.ts +2 -0
  89. package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
  90. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
  91. package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
  92. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
  93. package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
  94. package/front_end/panels/animation/AnimationTimeline.ts +1 -0
  95. package/front_end/panels/application/CrashReportContextView.ts +0 -1
  96. package/front_end/panels/application/FrameDetailsView.ts +5 -4
  97. package/front_end/panels/application/IndexedDBViews.ts +4 -4
  98. package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
  99. package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
  100. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
  101. package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
  102. package/front_end/panels/application/components/TrustTokensView.ts +1 -1
  103. package/front_end/panels/application/indexedDBViews.css +0 -14
  104. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
  105. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
  106. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
  107. package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
  108. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  109. package/front_end/panels/common/ExtensionView.ts +2 -1
  110. package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
  111. package/front_end/panels/console/ConsolePinPane.ts +4 -2
  112. package/front_end/panels/console/ConsoleSidebar.ts +6 -2
  113. package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
  114. package/front_end/panels/console/PromptBuilder.ts +1 -1
  115. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  116. package/front_end/panels/coverage/CoverageModel.ts +6 -4
  117. package/front_end/panels/coverage/coverageView.css +8 -8
  118. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +13 -14
  119. package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
  120. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
  121. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
  122. package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
  123. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
  124. package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
  125. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
  126. package/front_end/panels/elements/ElementsTreeElement.ts +43 -15
  127. package/front_end/panels/elements/ElementsTreeOutline.ts +185 -109
  128. package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
  129. package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
  130. package/front_end/panels/elements/ShortcutTreeElement.ts +6 -1
  131. package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
  132. package/front_end/panels/elements/StylePropertiesSection.ts +2 -35
  133. package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
  134. package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
  135. package/front_end/panels/elements/components/StylePropertyEditor.ts +161 -148
  136. package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
  137. package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
  138. package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
  139. package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
  140. package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
  141. package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
  142. package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
  143. package/front_end/panels/elements/components/queryContainer.css +2 -2
  144. package/front_end/panels/elements/elementsTreeOutline.css +20 -4
  145. package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
  146. package/front_end/panels/event_listeners/eventListenersView.css +1 -1
  147. package/front_end/panels/issues/AffectedElementsView.ts +3 -0
  148. package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
  149. package/front_end/panels/issues/issues.ts +2 -0
  150. package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
  151. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
  152. package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
  153. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
  154. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
  155. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
  156. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
  157. package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
  158. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
  159. package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
  160. package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
  161. package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
  162. package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
  163. package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
  164. package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
  165. package/front_end/panels/media/TickingFlameChart.ts +3 -2
  166. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
  167. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
  168. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
  169. package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
  170. package/front_end/panels/network/NetworkLogView.ts +4 -1
  171. package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
  172. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  173. package/front_end/panels/network/RequestHeadersView.ts +47 -11
  174. package/front_end/panels/network/RequestPayloadView.ts +1 -1
  175. package/front_end/panels/network/RequestResponseView.ts +1 -1
  176. package/front_end/panels/network/RequestTimingView.ts +1 -1
  177. package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
  178. package/front_end/panels/network/components/RequestHeadersView.css +12 -0
  179. package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
  180. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
  181. package/front_end/panels/profiler/HeapProfileView.ts +1 -1
  182. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  183. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  184. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
  185. package/front_end/panels/recorder/RecordingListView.ts +0 -6
  186. package/front_end/panels/recorder/RecordingView.ts +0 -6
  187. package/front_end/panels/recorder/controlButton.css +10 -10
  188. package/front_end/panels/recorder/startView.css +1 -1
  189. package/front_end/panels/screencast/ScreencastView.ts +4 -2
  190. package/front_end/panels/search/SearchView.ts +1 -1
  191. package/front_end/panels/security/SecurityPanel.ts +46 -35
  192. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
  193. package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
  194. package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
  195. package/front_end/panels/sources/ProfilePlugin.ts +2 -1
  196. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  197. package/front_end/panels/timeline/IsolateSelector.ts +1 -1
  198. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
  199. package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
  200. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
  201. package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
  202. package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
  203. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
  204. package/front_end/panels/timeline/TimelinePanel.ts +3 -20
  205. package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
  206. package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
  207. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
  208. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
  209. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
  210. package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
  211. package/front_end/panels/timeline/components/Sidebar.ts +1 -1
  212. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
  213. package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
  214. package/front_end/panels/timeline/components/insights/checklist.css +1 -1
  215. package/front_end/panels/timeline/components/insights/table.css +3 -3
  216. package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
  217. package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
  218. package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
  219. package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
  220. package/front_end/panels/timeline/timelinePanel.css +0 -74
  221. package/front_end/panels/timeline/utils/Helpers.ts +1 -1
  222. package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
  223. package/front_end/panels/web_audio/WebAudioView.ts +3 -3
  224. package/front_end/panels/web_audio/webAudio.css +5 -5
  225. package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
  226. package/front_end/third_party/acorn/acorn.ts +3 -3
  227. package/front_end/third_party/chromium/README.chromium +1 -1
  228. package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
  229. package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
  230. package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
  231. package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
  232. package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
  233. package/front_end/third_party/diff/DiffWrapper.ts +1 -8
  234. package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
  235. package/front_end/third_party/json5/json5.ts +2 -2
  236. package/front_end/third_party/puppeteer/README.chromium +2 -2
  237. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +183 -4
  238. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
  239. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -3
  240. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +84 -11
  242. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts +75 -0
  244. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
  245. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
  246. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
  247. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
  248. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
  249. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
  250. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
  251. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -1
  252. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
  253. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +7 -0
  254. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts +31 -0
  256. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
  257. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
  258. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
  259. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
  260. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
  261. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
  262. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
  263. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -0
  264. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +23 -0
  266. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +6 -1
  268. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -0
  270. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts +31 -0
  272. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
  273. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
  274. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
  275. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
  276. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
  277. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
  278. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +7 -4
  280. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  281. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
  282. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
  283. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
  284. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
  285. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
  286. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  287. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
  288. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
  290. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
  291. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -0
  292. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  293. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +24 -3
  294. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  295. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +23 -2
  296. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
  297. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
  298. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  299. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  300. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  301. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  302. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
  303. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  304. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
  305. package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
  306. package/front_end/third_party/puppeteer/package/package.json +4 -4
  307. package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
  308. package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
  309. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  310. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
  311. package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
  312. package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
  313. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
  314. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
  315. package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
  316. package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
  317. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
  318. package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
  319. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
  320. package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
  321. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
  322. package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
  323. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  324. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  325. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +3 -0
  326. package/front_end/tsconfig.json +1 -2
  327. package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
  328. package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
  329. package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
  330. package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
  331. package/front_end/ui/comments/comments-meta.ts +21 -0
  332. package/front_end/ui/comments/comments.ts +2 -0
  333. package/front_end/ui/comments/commentsOverlay.css +22 -3
  334. package/front_end/ui/components/buttons/floatingButton.css +25 -0
  335. package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
  336. package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
  337. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
  338. package/front_end/ui/kit/icons/Icon.ts +0 -1
  339. package/front_end/ui/kit/link/Link.ts +8 -1
  340. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  341. package/front_end/ui/legacy/DropTarget.ts +6 -1
  342. package/front_end/ui/legacy/EmptyWidget.ts +1 -1
  343. package/front_end/ui/legacy/GlassPane.ts +1 -1
  344. package/front_end/ui/legacy/InspectorView.ts +17 -1
  345. package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
  346. package/front_end/ui/legacy/SplitWidget.ts +18 -3
  347. package/front_end/ui/legacy/StackedPane.ts +1 -1
  348. package/front_end/ui/legacy/StatusBar.ts +78 -0
  349. package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
  350. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  351. package/front_end/ui/legacy/Toolbar.ts +5 -1
  352. package/front_end/ui/legacy/Treeoutline.ts +91 -48
  353. package/front_end/ui/legacy/UIUtils.ts +8 -4
  354. package/front_end/ui/legacy/ViewManager.ts +1 -1
  355. package/front_end/ui/legacy/ViewRegistration.ts +1 -0
  356. package/front_end/ui/legacy/Widget.ts +1 -1
  357. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
  358. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  359. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
  360. package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
  361. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
  362. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
  363. package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
  364. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
  365. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
  366. package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
  367. package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
  368. package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
  369. package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
  370. package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
  371. package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
  372. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +224 -127
  373. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
  374. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +25 -106
  375. package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
  376. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
  377. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
  378. package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
  379. package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
  380. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
  381. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
  382. package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
  383. package/front_end/ui/legacy/inspectorCommon.css +41 -6
  384. package/front_end/ui/legacy/legacy.ts +2 -0
  385. package/front_end/ui/legacy/statusBar.css +18 -0
  386. package/front_end/ui/visual_logging/Debugging.ts +2 -1
  387. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
  388. package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
  389. package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
  390. package/front_end/ui/visual_logging/LoggingState.ts +1 -1
  391. package/front_end/ui/visual_logging/visual_logging.ts +67 -56
  392. package/inspector_overlay/main.ts +8 -8
  393. package/mcp/mcp.ts +5 -0
  394. package/package.json +2 -8
  395. package/front_end/Images/generate-css-vars.js +0 -52
  396. package/front_end/Images/rollup.config.mjs +0 -36
  397. package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
  398. package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
  399. package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
  400. package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
  401. package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
  402. package/front_end/panels/timeline/enable-easter-egg.js +0 -20
  403. package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
  404. package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
  405. package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
  406. package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
  407. package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
  408. package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
  409. package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
  410. package/front_end/third_party/json5/json5-tsconfig.json +0 -8
  411. package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
  412. package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
  413. package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
  414. package/front_end/third_party/lit/lit-tsconfig.json +0 -15
  415. package/front_end/third_party/marked/marked-tsconfig.json +0 -8
  416. package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
  417. package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
  418. package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
  419. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
  420. package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
  421. package/inspector_overlay/loadCSS.rollup.js +0 -29
@@ -33,8 +33,7 @@
33
33
  "devtools_compatibility.js",
34
34
  "Images/generate-css-vars.js",
35
35
  "core/i18n/collect-ui-strings.js",
36
- "core/i18n/generate-locales-js.js",
37
- "panels/timeline/enable-easter-egg.js"
36
+ "core/i18n/generate-locales-js.js"
38
37
  ],
39
38
  "references": [{ "path": "./tsconfig.compatibility.json" }]
40
39
  }
@@ -366,6 +366,8 @@ export function resolveCommentAnchor(
366
366
 
367
367
  const backendNodeIdStr = target.getAttribute('data-backend-node-id');
368
368
  const backendNodeId = backendNodeIdStr ? Number(backendNodeIdStr) : undefined;
369
+ const targetId = target.getAttribute('data-target-id') ?? undefined;
370
+ const node = (backendNodeId !== undefined && targetId !== undefined) ? {backendNodeId, targetId} : undefined;
369
371
 
370
372
  return {
371
373
  vePath,
@@ -373,7 +375,7 @@ export function resolveCommentAnchor(
373
375
  parentTextSignature,
374
376
  siblingIndex,
375
377
  networkRequestId,
376
- backendNodeId,
378
+ node,
377
379
  editor,
378
380
  };
379
381
  }
@@ -455,8 +457,11 @@ export function rematchCommentAnchor(comment: CommentThread, root: Document|Elem
455
457
  if (anchor.networkRequestId) {
456
458
  return deepQuerySelector(root, `[data-network-request-id="${CSS.escape(anchor.networkRequestId)}"]`);
457
459
  }
458
- if (anchor.backendNodeId !== undefined) {
459
- return deepQuerySelector(root, `[data-backend-node-id="${CSS.escape(String(anchor.backendNodeId))}"]`);
460
+ if (anchor.node) {
461
+ return deepQuerySelector(
462
+ root,
463
+ `[data-backend-node-id="${CSS.escape(String(anchor.node.backendNodeId))}"][data-target-id="${
464
+ CSS.escape(anchor.node.targetId)}"]`);
460
465
  }
461
466
  if (anchor.editor) {
462
467
  const {lineNumber, filePath} = anchor.editor;
@@ -15,6 +15,8 @@ import {
15
15
  resolveCommentAnchorElement,
16
16
  } from './CommentAnchorResolver.js';
17
17
 
18
+ export const COMMENT_MODE_CURSOR = 'var(--comment-cursor)';
19
+
18
20
  export interface StartOptions {
19
21
  root?: Document|Element;
20
22
  scrollTarget?: EventTarget;
@@ -27,6 +29,7 @@ export interface PinPositionData {
27
29
  top: number;
28
30
  left: number;
29
31
  visible: boolean;
32
+ index: number;
30
33
  }
31
34
 
32
35
  export interface HighlightRectData {
@@ -105,6 +108,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
105
108
 
106
109
  #mutationObserver?: MutationObserver;
107
110
  #rematchTimeoutId?: ReturnType<typeof setTimeout>;
111
+ #cursorElement: HTMLElement|null = null;
108
112
 
109
113
  constructor(commentManager: CommentManager.CommentManager.CommentManager) {
110
114
  super();
@@ -120,9 +124,9 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
120
124
  CommentManager.CommentManager.Events.COMMENT_MODE_CHANGED,
121
125
  ({data: active}) => {
122
126
  if (!active) {
123
- this.#setHoverHighlight(null);
127
+ this.#clearHover();
124
128
  }
125
- document.body.style.cursor = active ? 'crosshair' : '';
129
+ document.body.style.cursor = active ? COMMENT_MODE_CURSOR : '';
126
130
  },
127
131
  this,
128
132
  );
@@ -157,6 +161,27 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
157
161
  return this.#commentManager.isCommentMode();
158
162
  }
159
163
 
164
+ #setHoverCursor(element: Element|null): void {
165
+ const previousElement = this.#cursorElement;
166
+ const newElement = element instanceof HTMLElement ? element : null;
167
+
168
+ if (previousElement === newElement) {
169
+ return;
170
+ }
171
+
172
+ if (previousElement) {
173
+ previousElement.style.cursor = '';
174
+ previousElement.style.removeProperty('--override-cursor');
175
+ }
176
+
177
+ if (newElement) {
178
+ newElement.style.cursor = COMMENT_MODE_CURSOR;
179
+ newElement.style.setProperty('--override-cursor', COMMENT_MODE_CURSOR);
180
+ }
181
+
182
+ this.#cursorElement = newElement;
183
+ }
184
+
160
185
  #setHoverHighlight(data: HoverHighlightData|null): void {
161
186
  if (data === null && this.#hoverData === null) {
162
187
  return;
@@ -170,6 +195,11 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
170
195
  this.dispatchEventToListeners(Events.HOVER_HIGHLIGHT_CHANGED, data);
171
196
  }
172
197
 
198
+ #clearHover(): void {
199
+ this.#setHoverHighlight(null);
200
+ this.#setHoverCursor(null);
201
+ }
202
+
173
203
  getHoverHighlight(): HoverHighlightData|null {
174
204
  return this.#hoverData;
175
205
  }
@@ -328,6 +358,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
328
358
  top: scrollY + visibleRect.top - 12 + offsetY,
329
359
  left: scrollX + visibleRect.right - 12,
330
360
  visible: true,
361
+ index: thread.index,
331
362
  });
332
363
 
333
364
  newHighlights.push({
@@ -387,10 +418,12 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
387
418
  * Stops and detaches all active listeners and observers without clearing comment threads.
388
419
  */
389
420
  stop(): void {
421
+ document.body.style.cursor = '';
390
422
  this.#removeClickListener();
391
423
  this.#removeScrollListener();
392
424
  this.#removeResizeObserver();
393
425
  this.#removeMutationObserver();
426
+ this.#clearHover();
394
427
  }
395
428
 
396
429
  /**
@@ -438,25 +471,25 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
438
471
 
439
472
  this.#hoverListener = (event: Event): void => {
440
473
  if (!this.isCommentMode()) {
441
- this.#setHoverHighlight(null);
474
+ this.#clearHover();
442
475
  return;
443
476
  }
444
477
  const composedTarget = event.composedPath()[0];
445
478
  const target = (composedTarget instanceof Element) ? composedTarget : event.target;
446
479
  if (!(target instanceof Element)) {
447
- this.#setHoverHighlight(null);
480
+ this.#clearHover();
448
481
  return;
449
482
  }
450
483
  const isLeaveEvent = event.type === 'mouseout' || event.type === 'mouseleave' || event.type === 'pointerout';
451
484
  const anchorEl = resolveCommentAnchorElement(target);
452
485
  if (isLeaveEvent) {
453
486
  const relatedTarget = (event as MouseEvent | PointerEvent).relatedTarget;
454
- if (anchorEl && relatedTarget instanceof Node && anchorEl.contains(relatedTarget)) {
487
+ if (anchorEl && relatedTarget instanceof Node && anchorEl.isSelfOrAncestor(relatedTarget)) {
455
488
  event.consume(true);
456
489
  return;
457
490
  }
458
491
 
459
- this.#setHoverHighlight(null);
492
+ this.#clearHover();
460
493
  if (anchorEl) {
461
494
  event.consume(true);
462
495
  }
@@ -477,12 +510,13 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
477
510
  height: visibleRect.height,
478
511
  visible: true,
479
512
  });
513
+ this.#setHoverCursor(highlightTarget);
480
514
  } else {
481
- this.#setHoverHighlight(null);
515
+ this.#clearHover();
482
516
  }
483
517
  event.consume(true);
484
518
  } else {
485
- this.#setHoverHighlight(null);
519
+ this.#clearHover();
486
520
  }
487
521
  };
488
522
 
@@ -528,7 +562,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
528
562
  this.#removeScrollListener();
529
563
  this.#scrollTarget = target;
530
564
  this.#scrollListener = (): void => {
531
- this.#setHoverHighlight(null);
565
+ this.#clearHover();
532
566
  if (this.#scrollRafId !== undefined) {
533
567
  cancelAnimationFrame(this.#scrollRafId);
534
568
  }
@@ -562,7 +596,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
562
596
  #installResizeObserver(element: Element = document.body): void {
563
597
  this.#removeResizeObserver();
564
598
  this.#devToolsResizeObserver = new ResizeObserver(() => {
565
- this.#setHoverHighlight(null);
599
+ this.#clearHover();
566
600
  if (this.#resizeRafId !== undefined) {
567
601
  cancelAnimationFrame(this.#resizeRafId);
568
602
  }
@@ -615,8 +649,14 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
615
649
  this.#mutationObserver.observe(targetNode, {
616
650
  childList: true,
617
651
  subtree: true,
618
- attributes: true,
619
- attributeFilter: ['jslog', 'data-network-request-id', 'data-backend-node-id', 'aria-expanded', 'data-file-path'],
652
+ attributeFilter: [
653
+ 'jslog',
654
+ 'data-network-request-id',
655
+ 'data-backend-node-id',
656
+ 'data-target-id',
657
+ 'aria-expanded',
658
+ 'data-file-path',
659
+ ],
620
660
  });
621
661
  }
622
662
 
@@ -643,6 +683,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
643
683
  this.#observedThreads = new WeakSet();
644
684
  this.#pinPositions = [];
645
685
  this.#highlightRects = [];
686
+ this.#clearHover();
646
687
  this.#updatePositions();
647
688
  }
648
689
  }
@@ -29,8 +29,8 @@ export interface ViewInput {
29
29
 
30
30
  export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
31
31
 
32
- // clang-format off
33
32
  const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
33
+ // clang-format off
34
34
  render(html`
35
35
  <style>${commentsOverlayStyles}</style>
36
36
  <div class="comments-overlay-container">
@@ -66,13 +66,13 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target: HTMLEl
66
66
  left: `${p.left}px`,
67
67
  })}
68
68
  @click=${() => input.onPinClick(p.id)}>
69
- 💬
69
+ <div class="comment-cursor">${p.index}</div>
70
70
  </div>
71
71
  ` : nothing)}
72
72
  </div>
73
73
  `, target);
74
+ // clang-format on
74
75
  };
75
- // clang-format on
76
76
 
77
77
  export class CommentsOverlayWidget extends UI.Widget.Widget {
78
78
  readonly #view: View;
@@ -0,0 +1,96 @@
1
+ // Copyright 2026 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
+ import * as i18n from '../../core/i18n/i18n.js';
6
+ import * as CommentManager from '../../models/comment_manager/comment_manager.js';
7
+ import * as UI from '../legacy/legacy.js';
8
+ import * as Lit from '../lit/lit.js';
9
+ import * as VisualLogging from '../visual_logging/visual_logging.js';
10
+
11
+ const UIStrings = {
12
+ /**
13
+ * @description Button text for the comments status bar pill showing the number of open comments.
14
+ * @example {2} PH1
15
+ */
16
+ commentsCount: 'Comments ({PH1})',
17
+ } as const;
18
+ const str_ = i18n.i18n.registerUIStrings('ui/comments/CommentsStatusBarPill.ts', UIStrings);
19
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
+
21
+ const {html, render} = Lit;
22
+
23
+ export interface ViewInput {
24
+ threads: CommentManager.CommentManager.CommentThread[];
25
+ onPillClick: () => void;
26
+ disabled?: boolean;
27
+ }
28
+
29
+ export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
30
+
31
+ export const DEFAULT_VIEW: View = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
32
+ // clang-format off
33
+ render(html`
34
+ ${input.threads.length <= 0 ? Lit.nothing : html`
35
+ <button
36
+ class="devtools-pill"
37
+ ?disabled=${input.disabled}
38
+ @click=${input.onPillClick}
39
+ jslog=${VisualLogging.action('comments-status-bar-pill').track({click: true})}>
40
+ ${i18nString(UIStrings.commentsCount, {PH1: input.threads.length})}
41
+ </button>
42
+ `}
43
+ `, target);
44
+ // clang-format on
45
+ };
46
+
47
+ export class CommentsStatusBarPill extends UI.Widget.Widget {
48
+ static override readonly INJECT: readonly[typeof CommentManager.CommentManager.CommentManager] =
49
+ [CommentManager.CommentManager.CommentManager] as const;
50
+
51
+ readonly #view: View;
52
+ readonly #commentManager: CommentManager.CommentManager.CommentManager;
53
+
54
+ constructor(
55
+ element: HTMLElement|undefined,
56
+ [commentManager]: UI.Widget.WidgetDependencies<typeof CommentsStatusBarPill>,
57
+ view: View = DEFAULT_VIEW,
58
+ ) {
59
+ super(element);
60
+ this.#view = view;
61
+ this.#commentManager = commentManager;
62
+ }
63
+
64
+ #onThreadsChanged(): void {
65
+ this.requestUpdate();
66
+ }
67
+
68
+ override wasShown(): void {
69
+ super.wasShown();
70
+ this.#commentManager.addEventListener(
71
+ CommentManager.CommentManager.Events.COMMENT_THREADS_CHANGED,
72
+ this.#onThreadsChanged,
73
+ this,
74
+ );
75
+ this.requestUpdate();
76
+ }
77
+
78
+ override willHide(): void {
79
+ this.#commentManager.removeEventListener(
80
+ CommentManager.CommentManager.Events.COMMENT_THREADS_CHANGED,
81
+ this.#onThreadsChanged,
82
+ this,
83
+ );
84
+ super.willHide();
85
+ }
86
+
87
+ override performUpdate(): void {
88
+ const viewInput: ViewInput = {
89
+ threads: this.#commentManager.getCommentThreads(),
90
+ onPillClick: this.#handlePillClick,
91
+ };
92
+ this.#view(viewInput, undefined, this.contentElement);
93
+ }
94
+
95
+ #handlePillClick = (): void => {};
96
+ }
@@ -13,6 +13,14 @@ const UIStrings = {
13
13
  * @description Title of an action that toggles comment mode.
14
14
  */
15
15
  toggleCommentMode: 'Add comments to send to your AI coding agent',
16
+ /**
17
+ * @description Label for the comments status bar when it's not showing.
18
+ */
19
+ showComments: 'Show comments',
20
+ /**
21
+ * @description Label for the comments status bar when it's showing.
22
+ */
23
+ comments: 'Comments',
16
24
  } as const;
17
25
  const str_ = i18n.i18n.registerUIStrings('ui/comments/comments-meta.ts', UIStrings);
18
26
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -30,6 +38,19 @@ function isCommentsEnabled(config?: Root.Runtime.HostConfig): boolean {
30
38
  return Boolean(config?.devToolsComments?.enabled);
31
39
  }
32
40
 
41
+ UI.ViewManager.registerViewExtension({
42
+ location: UI.ViewManager.ViewLocationValues.STATUS_BAR,
43
+ id: 'comments-status-bar-pill',
44
+ order: 1,
45
+ condition: isCommentsEnabled,
46
+ commandPrompt: i18nLazyString(UIStrings.showComments),
47
+ title: i18nLazyString(UIStrings.comments),
48
+ async loadView(universe) {
49
+ const Comments = await loadCommentsModule();
50
+ return new Comments.CommentsStatusBarPill.CommentsStatusBarPill(undefined, [universe.commentManager]);
51
+ },
52
+ });
53
+
33
54
  UI.ActionRegistration.registerActionExtension({
34
55
  category: UI.ActionRegistration.ActionCategory.GLOBAL,
35
56
  actionId: 'comments.toggle-comment-mode',
@@ -5,9 +5,11 @@
5
5
  import * as CommentAnchorResolver from './CommentAnchorResolver.js';
6
6
  import * as CommentOverlayManager from './CommentOverlayManager.js';
7
7
  import * as CommentsOverlayWidget from './CommentsOverlayWidget.js';
8
+ import * as CommentsStatusBarPill from './CommentsStatusBarPill.js';
8
9
 
9
10
  export {
10
11
  CommentAnchorResolver,
11
12
  CommentOverlayManager,
12
13
  CommentsOverlayWidget,
14
+ CommentsStatusBarPill,
13
15
  };
@@ -21,17 +21,36 @@
21
21
  position: absolute;
22
22
  pointer-events: auto;
23
23
  cursor: pointer;
24
- font-size: var(--sys-typescale-headline1-size);
25
- line-height: var(--sys-typescale-body1-line-height);
26
- filter: drop-shadow(0 2px 5px rgb(0 0 0 / 35%));
27
24
  user-select: none;
28
25
  transition: transform 0.1s ease;
26
+ transform-origin: center center;
27
+ will-change: transform;
29
28
  }
30
29
 
31
30
  .comment-pin:hover {
32
31
  transform: scale(1.15);
33
32
  }
34
33
 
34
+ .comment-cursor {
35
+ display: flex;
36
+ width: var(--sys-size-9);
37
+ height: var(--sys-size-9);
38
+ box-sizing: border-box;
39
+ padding: 0;
40
+ flex-direction: column;
41
+ justify-content: center;
42
+ align-items: center;
43
+ flex-shrink: 0;
44
+ box-shadow: var(--sys-elevation-level2);
45
+ border-radius: 100px 100px 100px var(--sys-shape-corner-extra-small, 4px);
46
+ background: var(--sys-color-primary);
47
+ color: var(--sys-color-on-primary);
48
+ font-family: var(--default-font-family);
49
+ font-size: var(--sys-typescale-body5-size);
50
+ font-weight: var(--ref-typeface-weight-bold, 600);
51
+ line-height: 1;
52
+ }
53
+
35
54
  .comment-anchor-highlight {
36
55
  position: absolute;
37
56
  pointer-events: none;
@@ -116,3 +116,28 @@ button {
116
116
  color: var(--ref-palette-neutral100) !important; /* stylelint-disable-line declaration-no-important */
117
117
  }
118
118
  }
119
+
120
+ @media (forced-colors: active) {
121
+ button {
122
+ forced-color-adjust: none;
123
+ box-shadow: 0 0 0 var(--sys-size-1) ButtonText;
124
+
125
+ :host-context(:not(.theme-with-dark-background)) &,
126
+ :host-context(.theme-with-dark-background) &:not(:disabled) {
127
+ background-color: ButtonFace;
128
+ }
129
+
130
+ :host-context(:not(.theme-with-dark-background)) &:not(:disabled) > devtools-icon,
131
+ :host-context(.theme-with-dark-background) &:not(:disabled) > devtools-icon {
132
+ color: ButtonText;
133
+ }
134
+
135
+ &:focus-visible {
136
+ outline-color: ButtonText;
137
+ }
138
+
139
+ &:disabled > devtools-icon {
140
+ color: GrayText;
141
+ }
142
+ }
143
+ }
@@ -7,7 +7,7 @@ import './CodeBlock.js';
7
7
  import './MarkdownImage.js';
8
8
  import '../../kit/kit.js';
9
9
 
10
- import type * as Marked from '../../../third_party/marked/marked.js';
10
+ import * as Marked from '../../../third_party/marked/marked.js';
11
11
  import * as Lit from '../../lit/lit.js';
12
12
  import * as VisualLogging from '../../visual_logging/visual_logging.js';
13
13
 
@@ -433,3 +433,33 @@ export class MarkdownInsightRenderer extends MarkdownLitRenderer {
433
433
  return super.templateForToken(token as Marked.Marked.MarkedToken);
434
434
  }
435
435
  }
436
+
437
+ export function renderTextAsMarkdown(text: string, markdownRenderer: MarkdownLitRenderer = new MarkdownLitRenderer(),
438
+ {animate, ref: refFn}: {
439
+ animate?: boolean,
440
+ ref?: (element?: Element) => void,
441
+ } = {}): Lit.TemplateResult {
442
+ let tokens = [];
443
+ try {
444
+ tokens = Marked.Marked.lexer(text);
445
+ for (const token of tokens) {
446
+ // Try to render all the tokens to make sure that
447
+ // they all have a template defined for them. If there
448
+ // isn't any template defined for a token, we'll fallback
449
+ // to rendering the text as plain text instead of markdown.
450
+ markdownRenderer.renderToken(token);
451
+ }
452
+ } catch {
453
+ // The tokens were not parsed correctly or
454
+ // one of the tokens are not supported, so we
455
+ // continue to render this as text.
456
+ return html`${text}`;
457
+ }
458
+
459
+ // clang-format off
460
+ return html`<devtools-markdown-view
461
+ .data=${{tokens, renderer: markdownRenderer, animationEnabled: animate} as MarkdownViewData}
462
+ ${refFn ? Lit.Directives.ref(refFn) : Lit.nothing}>
463
+ </devtools-markdown-view>`;
464
+ // clang-format on
465
+ }
@@ -9,7 +9,7 @@ import {html, render} from '../../../ui/lit/lit.js';
9
9
 
10
10
  import srgbOverlayStyles from './srgbOverlay.css.js';
11
11
 
12
- interface SrgbOverlayProps {
12
+ export interface SrgbOverlayProps {
13
13
  // [0 - 1] corresponding to HSV hue
14
14
  hue: number;
15
15
  width: number;
@@ -22,8 +22,7 @@ function assert<T>(
22
22
  }
23
23
  }
24
24
 
25
- const {html, Decorators, Directives, LitElement} = Lit;
26
- const {customElement, property, state} = Decorators;
25
+ const {html, Directives} = Lit;
27
26
  const {classMap} = Directives;
28
27
 
29
28
  declare global {
@@ -41,7 +40,6 @@ const jsonPropertyOptions = {
41
40
  attribute: false,
42
41
  };
43
42
 
44
- @customElement('devtools-editable-content')
45
43
  class EditableContent extends HTMLElement {
46
44
  static get observedAttributes(): string[] {
47
45
  return ['disabled', 'placeholder'];
@@ -127,7 +125,7 @@ class SuggestionInitEvent extends Event {
127
125
  }
128
126
  }
129
127
 
130
- type SuggestionFilter = (option: string, query: string) => boolean;
128
+ export type SuggestionFilter = (option: string, query: string) => boolean;
131
129
 
132
130
  const defaultSuggestionFilter = (option: string, query: string): boolean =>
133
131
  option.toLowerCase().startsWith(query.toLowerCase());
@@ -136,13 +134,19 @@ const defaultSuggestionFilter = (option: string, query: string): boolean =>
136
134
  * @fires SuggestionInitEvent#suggestioninit
137
135
  * @fires SuggestEvent#suggest
138
136
  */
139
- @customElement('devtools-suggestion-box')
140
- class SuggestionBox extends LitElement {
141
- @property(jsonPropertyOptions) declare options: readonly string[];
142
- @property() declare expression: string;
143
- @property() declare suggestionFilter?: SuggestionFilter;
137
+ class SuggestionBox extends Lit.LitElement {
138
+ static override properties: typeof Lit.LitElement.properties = {
139
+ options: jsonPropertyOptions,
140
+ expression: {type: String},
141
+ suggestionFilter: {attribute: false},
142
+ cursor: {state: true},
143
+ };
144
+
145
+ declare options: readonly string[];
146
+ declare expression: string;
147
+ declare suggestionFilter?: SuggestionFilter;
144
148
 
145
- @state() private declare cursor: number;
149
+ private declare cursor: number;
146
150
 
147
151
  #suggestions: string[] = [];
148
152
 
@@ -229,30 +233,42 @@ class SuggestionBox extends LitElement {
229
233
  }
230
234
  }
231
235
 
232
- @customElement('devtools-suggestion-input')
233
- export class SuggestionInput extends LitElement {
234
- static override shadowRootOptions = {
235
- ...LitElement.shadowRootOptions,
236
+ export class SuggestionInput extends Lit.LitElement {
237
+ static override shadowRootOptions: ShadowRootInit = {
238
+ ...Lit.LitElement.shadowRootOptions,
236
239
  delegatesFocus: true,
237
- } as const;
240
+ };
241
+
242
+ static override properties: typeof Lit.LitElement.properties = {
243
+ options: jsonPropertyOptions,
244
+ autocomplete: {type: Boolean},
245
+ suggestionFilter: {attribute: false},
246
+ expression: {state: true},
247
+ placeholder: {type: String},
248
+ value: {type: String},
249
+ disabled: {type: Boolean},
250
+ strikethrough: {type: Boolean},
251
+ mimeType: {type: String},
252
+ jslogContext: {type: String},
253
+ };
238
254
 
239
255
  /**
240
256
  * State passed to devtools-suggestion-box.
241
257
  */
242
- @property(jsonPropertyOptions) declare options: readonly string[];
243
- @property({type: Boolean}) declare autocomplete?: boolean;
244
- @property() declare suggestionFilter?: SuggestionFilter;
245
- @state() declare expression: string;
258
+ declare options: readonly string[];
259
+ declare autocomplete?: boolean;
260
+ declare suggestionFilter?: SuggestionFilter;
261
+ declare expression: string;
246
262
 
247
263
  /**
248
264
  * State passed to devtools-editable-content.
249
265
  */
250
- @property() declare placeholder: string;
251
- @property() declare value: string;
252
- @property({type: Boolean}) declare disabled: boolean;
253
- @property({type: Boolean}) declare strikethrough: boolean;
254
- @property() declare mimeType: string;
255
- @property() declare jslogContext?: string;
266
+ declare placeholder: string;
267
+ declare value: string;
268
+ declare disabled: boolean;
269
+ declare strikethrough: boolean;
270
+ declare mimeType: string;
271
+ declare jslogContext?: string;
256
272
 
257
273
  constructor() {
258
274
  super();
@@ -364,3 +380,7 @@ export class SuggestionInput extends LitElement {
364
380
  // clang-format on
365
381
  }
366
382
  }
383
+
384
+ customElements.define('devtools-editable-content', EditableContent);
385
+ customElements.define('devtools-suggestion-box', SuggestionBox);
386
+ customElements.define('devtools-suggestion-input', SuggestionInput);
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-imperative-dom-api */
5
5
 
6
- // @ts-expect-error tsc 6 can't find type declarations for this file.
7
6
  import '../../../Images/Images.js';
8
7
 
9
8
  import iconStyles from './icon.css.js';
@@ -129,9 +129,16 @@ export class Link extends HTMLElement {
129
129
  };
130
130
 
131
131
  #onKeyDown = (event: KeyboardEvent): void => {
132
- if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
132
+ if (!Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
133
+ return;
134
+ }
135
+ if (this.href) {
133
136
  this.#handleOpeningLink(event);
137
+ return;
134
138
  }
139
+
140
+ event.consume(true);
141
+ this.click();
135
142
  };
136
143
 
137
144
  #render(): void {
@@ -946,7 +946,7 @@ export class ContextMenu extends SubMenu {
946
946
 
947
947
  private static pendingMenu: ContextMenu|null = null;
948
948
  private static useSoftMenu = false;
949
- static readonly groupWeights = [
949
+ static readonly groupWeights: string[] = [
950
950
  'header',
951
951
  'new',
952
952
  'reveal',
@@ -978,7 +978,7 @@ export class ContextMenu extends SubMenu {
978
978
  *
979
979
  */
980
980
  export class MenuButton extends HTMLElement {
981
- static readonly observedAttributes = ['icon-name', 'disabled'];
981
+ static readonly observedAttributes: string[] = ['icon-name', 'disabled'];
982
982
  readonly #shadow = this.attachShadow({mode: 'open'});
983
983
  #triggerTimeoutId?: number;
984
984
  #populateMenuCall?: (arg0: ContextMenu) => void;