chrome-devtools-frontend 1.0.1689415 → 1.0.1690531

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 (318) hide show
  1. package/.gitmodules +4 -0
  2. package/eslint.config.mjs +8 -2
  3. package/front_end/core/common/Object.ts +10 -4
  4. package/front_end/core/i18n/collect-ui-strings.js +5 -5
  5. package/front_end/core/i18n/generate-locales-js.js +1 -1
  6. package/front_end/core/i18n/i18n.ts +6 -0
  7. package/front_end/core/root/Runtime.ts +1 -5
  8. package/front_end/core/sdk/CSSMetadata.ts +3 -5
  9. package/front_end/core/sdk/DOMModel.ts +46 -11
  10. package/front_end/core/sdk/EmulationModel.ts +18 -0
  11. package/front_end/core/sdk/NetworkRequest.ts +50 -4
  12. package/front_end/core/sdk/NetworkRequestAccess.ts +172 -0
  13. package/front_end/core/sdk/SDKSettings.ts +9 -0
  14. package/front_end/core/sdk/Script.ts +0 -1
  15. package/front_end/core/sdk/SecurityOrigin.ts +160 -25
  16. package/front_end/core/sdk/Target.ts +1 -5
  17. package/front_end/core/sdk/sdk.ts +2 -0
  18. package/front_end/generated/SupportedCSSProperties.ts +1 -1
  19. package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
  20. package/front_end/models/ai_assistance/AiConversation.ts +29 -18
  21. package/front_end/models/ai_assistance/AiUtils.ts +0 -10
  22. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +6 -10
  23. package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -1
  24. package/front_end/models/ai_assistance/injected.ts +0 -2
  25. package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -1
  26. package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
  27. package/front_end/models/trace/insights/Cache.ts +1 -3
  28. package/front_end/models/trace/insights/CharacterSet.ts +1 -3
  29. package/front_end/models/trace/insights/DOMSize.ts +1 -3
  30. package/front_end/models/trace/insights/DocumentLatency.ts +1 -3
  31. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -3
  32. package/front_end/models/trace/insights/FontDisplay.ts +1 -2
  33. package/front_end/models/trace/insights/ForcedReflow.ts +1 -2
  34. package/front_end/models/trace/insights/INPBreakdown.ts +1 -3
  35. package/front_end/models/trace/insights/ImageDelivery.ts +1 -3
  36. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -3
  37. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -3
  38. package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -3
  39. package/front_end/models/trace/insights/ModernHTTP.ts +1 -2
  40. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -2
  41. package/front_end/models/trace/insights/RenderBlocking.ts +1 -3
  42. package/front_end/models/trace/insights/SlowCSSSelector.ts +1 -3
  43. package/front_end/models/trace/insights/ThirdParties.ts +1 -3
  44. package/front_end/models/trace/insights/Viewport.ts +1 -2
  45. package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -1
  46. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +3 -3
  47. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
  48. package/front_end/panels/accessibility/AccessibilityStrings.ts +7 -3
  49. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -2
  50. package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +1 -3
  51. package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
  52. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
  53. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  54. package/front_end/panels/animation/AnimationUI.ts +1 -1
  55. package/front_end/panels/application/AppManifestView.ts +6 -2
  56. package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
  57. package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
  58. package/front_end/panels/application/FrameDetailsView.ts +1 -1
  59. package/front_end/panels/application/IndexedDBViews.ts +3 -2
  60. package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
  61. package/front_end/panels/application/ReportingApiView.ts +2 -2
  62. package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -1
  63. package/front_end/panels/application/ServiceWorkersView.ts +1 -1
  64. package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
  65. package/front_end/panels/application/StorageItemsToolbar.ts +6 -2
  66. package/front_end/panels/application/StorageView.ts +9 -8
  67. package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
  68. package/front_end/panels/application/WebMCPView.ts +2 -1
  69. package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
  70. package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
  71. package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
  72. package/front_end/panels/application/components/EndpointsGrid.ts +3 -2
  73. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
  74. package/front_end/panels/application/components/ReportsGrid.ts +1 -1
  75. package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
  76. package/front_end/panels/application/components/TrustTokensView.ts +2 -2
  77. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
  78. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
  79. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
  80. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
  81. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +7 -2
  82. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
  83. package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -0
  84. package/front_end/panels/autofill/AutofillView.ts +2 -2
  85. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
  86. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
  87. package/front_end/panels/changes/ChangesSidebar.ts +56 -15
  88. package/front_end/panels/changes/ChangesView.ts +1 -1
  89. package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
  90. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  91. package/front_end/panels/common/ExtensionView.ts +2 -1
  92. package/front_end/panels/console/ConsolePinPane.ts +4 -2
  93. package/front_end/panels/console/ConsolePrompt.ts +6 -2
  94. package/front_end/panels/console/ConsoleSidebar.ts +12 -4
  95. package/front_end/panels/console/PromptBuilder.ts +1 -1
  96. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  97. package/front_end/panels/coverage/CoverageModel.ts +6 -4
  98. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -9
  99. package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
  100. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
  101. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
  102. package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
  103. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
  104. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
  105. package/front_end/panels/elements/ElementsTreeElement.ts +16 -3
  106. package/front_end/panels/elements/ElementsTreeOutline.ts +402 -130
  107. package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
  108. package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
  109. package/front_end/panels/elements/PropertyRenderer.ts +22 -15
  110. package/front_end/panels/elements/ShortcutTreeElement.ts +2 -1
  111. package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
  112. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  113. package/front_end/panels/elements/StylePropertyTreeElement.ts +75 -26
  114. package/front_end/panels/elements/StylesSidebarPane.ts +9 -4
  115. package/front_end/panels/elements/components/StylePropertyEditor.ts +160 -148
  116. package/front_end/panels/elements/elementsTreeOutline.css +4 -0
  117. package/front_end/panels/emulation/DeviceModeView.ts +6 -1
  118. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +6 -2
  119. package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
  120. package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
  121. package/front_end/panels/layer_viewer/LayerDetailsView.ts +6 -2
  122. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
  123. package/front_end/panels/layer_viewer/Layers3DView.ts +8 -1
  124. package/front_end/panels/layer_viewer/PaintProfilerView.ts +6 -2
  125. package/front_end/panels/lighthouse/lighthousePanel.css +5 -5
  126. package/front_end/panels/lighthouse/lighthouseStartView.css +13 -13
  127. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +6 -2
  128. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -2
  129. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
  130. package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
  131. package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
  132. package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
  133. package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
  134. package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
  135. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +6 -2
  136. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +25 -54
  137. package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
  138. package/front_end/panels/network/NetworkLogView.ts +12 -4
  139. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  140. package/front_end/panels/network/RequestHeadersView.ts +1 -1
  141. package/front_end/panels/network/RequestPayloadView.ts +1 -1
  142. package/front_end/panels/network/RequestResponseView.ts +1 -1
  143. package/front_end/panels/network/RequestTimingView.ts +1 -1
  144. package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
  145. package/front_end/panels/network/components/RequestHeadersView.css +5 -0
  146. package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
  147. package/front_end/panels/network/networkLogView.css +4 -0
  148. package/front_end/panels/network/requestInitiatorViewTree.css +2 -0
  149. package/front_end/panels/performance_monitor/performanceMonitor.css +3 -3
  150. package/front_end/panels/profiler/HeapDetachedElementsView.ts +7 -2
  151. package/front_end/panels/profiler/HeapProfileView.ts +7 -2
  152. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -4
  153. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +8 -4
  154. package/front_end/panels/profiler/HeapSnapshotView.ts +15 -6
  155. package/front_end/panels/profiler/HeapTimelineOverview.ts +6 -2
  156. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +12 -5
  157. package/front_end/panels/profiler/ProfileLauncherView.ts +6 -2
  158. package/front_end/panels/profiler/profilesPanel.css +8 -9
  159. package/front_end/panels/profiler/profilesSidebarTree.css +13 -13
  160. package/front_end/panels/protocol_monitor/JSONEditor.css +2 -2
  161. package/front_end/panels/protocol_monitor/JSONEditor.ts +6 -1
  162. package/front_end/panels/protocol_monitor/protocolMonitor.css +2 -2
  163. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
  164. package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
  165. package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
  166. package/front_end/panels/sources/ProfilePlugin.ts +2 -1
  167. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  168. package/front_end/panels/sources/SourcesView.ts +7 -2
  169. package/front_end/panels/sources/TabbedEditorContainer.ts +6 -2
  170. package/front_end/panels/sources/UISourceCodeFrame.ts +10 -3
  171. package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
  172. package/front_end/panels/timeline/AnnotationHelpers.ts +9 -9
  173. package/front_end/panels/timeline/CountersGraph.ts +8 -8
  174. package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
  175. package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
  176. package/front_end/panels/timeline/GPUTrackAppender.ts +1 -1
  177. package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
  178. package/front_end/panels/timeline/IsolateSelector.ts +3 -3
  179. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +4 -4
  180. package/front_end/panels/timeline/NetworkTrackAppender.ts +2 -2
  181. package/front_end/panels/timeline/StatusDialog.ts +5 -6
  182. package/front_end/panels/timeline/ThirdPartyTreeView.ts +4 -4
  183. package/front_end/panels/timeline/ThreadAppender.ts +12 -14
  184. package/front_end/panels/timeline/TimelineController.ts +5 -8
  185. package/front_end/panels/timeline/TimelineDetailsView.ts +13 -9
  186. package/front_end/panels/timeline/TimelineEventOverview.ts +4 -4
  187. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +18 -18
  188. package/front_end/panels/timeline/TimelineFlameChartView.ts +8 -3
  189. package/front_end/panels/timeline/TimelineHistoryManager.ts +9 -9
  190. package/front_end/panels/timeline/TimelineLoader.ts +1 -1
  191. package/front_end/panels/timeline/TimelineMiniMap.ts +7 -2
  192. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
  193. package/front_end/panels/timeline/TimelinePanel.ts +60 -62
  194. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +27 -27
  195. package/front_end/panels/timeline/TimelineTreeView.ts +47 -45
  196. package/front_end/panels/timeline/TimelineUIUtils.ts +146 -120
  197. package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
  198. package/front_end/panels/timeline/TrackConfigBanner.ts +4 -4
  199. package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
  200. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
  201. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
  202. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
  203. package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
  204. package/front_end/panels/timeline/components/Sidebar.ts +1 -1
  205. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
  206. package/front_end/panels/timeline/components/insights/Table.ts +1 -1
  207. package/front_end/panels/timeline/enable-easter-egg.js +1 -1
  208. package/front_end/panels/timeline/timeline-meta.ts +30 -30
  209. package/front_end/panels/timeline/timelineFlameChartView.css +10 -10
  210. package/front_end/panels/timeline/timelineFlamechartPopover.css +5 -5
  211. package/front_end/panels/timeline/timelineHistoryManager.css +7 -7
  212. package/front_end/panels/timeline/timelinePaintProfiler.css +2 -2
  213. package/front_end/panels/timeline/utils/Helpers.ts +1 -1
  214. package/front_end/panels/timeline/utils/IgnoreList.ts +4 -4
  215. package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
  216. package/front_end/panels/web_audio/WebAudioView.ts +3 -3
  217. package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
  218. package/front_end/third_party/acorn/acorn.ts +3 -3
  219. package/front_end/third_party/chromium/README.chromium +1 -1
  220. package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
  221. package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
  222. package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
  223. package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
  224. package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
  225. package/front_end/third_party/json5/json5.ts +2 -2
  226. package/front_end/ui/comments/CommentAnchorResolver.ts +12 -3
  227. package/front_end/ui/comments/CommentOverlayManager.ts +9 -1
  228. package/front_end/ui/components/buttons/Button.docs.ts +1 -1
  229. package/front_end/ui/components/buttons/button.css +21 -0
  230. package/front_end/ui/components/buttons/floatingButton.css +25 -0
  231. package/front_end/ui/components/report_view/ReportView.docs.ts +1 -1
  232. package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
  233. package/front_end/ui/components/spinners/Spinner.ts +1 -1
  234. package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
  235. package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
  236. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +46 -27
  237. package/front_end/ui/components/switch/Switch.docs.ts +1 -1
  238. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +10 -8
  239. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +2 -1
  240. package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +2 -2
  241. package/front_end/ui/components/text_editor/TextEditor.ts +19 -0
  242. package/front_end/ui/components/text_editor/config.ts +109 -96
  243. package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
  244. package/front_end/ui/components/text_editor/theme.ts +1 -1
  245. package/front_end/ui/components/tooltips/Tooltip.docs.ts +1 -1
  246. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  247. package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +4 -1
  248. package/front_end/ui/kit/cards/Card.ts +1 -1
  249. package/front_end/ui/kit/icons/Icon.ts +1 -1
  250. package/front_end/ui/kit/link/Link.docs.ts +1 -1
  251. package/front_end/ui/kit/link/Link.ts +1 -1
  252. package/front_end/ui/legacy/ContextMenu.docs.ts +1 -1
  253. package/front_end/ui/legacy/ContextMenu.ts +2 -2
  254. package/front_end/ui/legacy/Dialog.ts +10 -2
  255. package/front_end/ui/legacy/DropTarget.ts +6 -1
  256. package/front_end/ui/legacy/EmptyWidget.ts +1 -1
  257. package/front_end/ui/legacy/FilterBar.ts +6 -1
  258. package/front_end/ui/legacy/GlassPane.ts +1 -1
  259. package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
  260. package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
  261. package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
  262. package/front_end/ui/legacy/Slider.docs.ts +1 -1
  263. package/front_end/ui/legacy/SplitWidget.ts +7 -2
  264. package/front_end/ui/legacy/StackedPane.ts +1 -1
  265. package/front_end/ui/legacy/TabbedPane.ts +5 -1
  266. package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
  267. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  268. package/front_end/ui/legacy/Toolbar.ts +1 -1
  269. package/front_end/ui/legacy/Treeoutline.ts +13 -37
  270. package/front_end/ui/legacy/UIUtils.ts +6 -3
  271. package/front_end/ui/legacy/ViewManager.ts +1 -1
  272. package/front_end/ui/legacy/Widget.ts +1 -1
  273. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +13 -2
  274. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  275. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
  276. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -2
  277. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
  278. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +54 -45
  279. package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
  280. package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +6 -2
  281. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +141 -106
  282. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  283. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -10
  284. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
  285. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -1
  286. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +6 -2
  287. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -4
  288. package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
  289. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -3
  290. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -1
  291. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -7
  292. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
  293. package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
  294. package/front_end/ui/legacy/inspectorCommon.css +11 -0
  295. package/front_end/ui/visual_logging/Debugging.ts +2 -1
  296. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
  297. package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
  298. package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
  299. package/front_end/ui/visual_logging/LoggingState.ts +1 -1
  300. package/front_end/ui/visual_logging/visual_logging.ts +67 -56
  301. package/package.json +3 -2
  302. package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
  303. package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
  304. package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
  305. package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
  306. package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
  307. package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
  308. package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
  309. package/front_end/third_party/json5/json5-tsconfig.json +0 -8
  310. package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
  311. package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
  312. package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
  313. package/front_end/third_party/lit/lit-tsconfig.json +0 -15
  314. package/front_end/third_party/marked/marked-tsconfig.json +0 -8
  315. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +0 -191
  316. package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
  317. package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
  318. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
@@ -10,19 +10,19 @@ import * as Workspace from '../../../models/workspace/workspace.js';
10
10
 
11
11
  const UIStrings = {
12
12
  /**
13
- * @description Refers to when skipping content scripts is enabled and the current script is ignored because it's a content script.
13
+ * @description Reason why a script is ignored because it is a Chrome extension content script.
14
14
  */
15
15
  skipContentScripts: 'Content script',
16
16
  /**
17
- * @description Refers to when skipping known third party scripts is enabled and the current script is ignored because it's a known third party script.
17
+ * @description Reason why a script is ignored because it is marked with ignoreList in the source map.
18
18
  */
19
19
  skip3rdPartyScripts: 'Marked with ignoreList in source map',
20
20
  /**
21
- * @description Refers to when skipping anonymous scripts is enabled and the current script is ignored because is an anonymous script.
21
+ * @description Reason why a script is ignored because it is an anonymous script.
22
22
  */
23
23
  skipAnonymousScripts: 'Anonymous script',
24
24
  /**
25
- * @description Refers to when the current script is ignored because of an unknown rule.
25
+ * @description Reason why a script is ignored because of an unknown ignore rule.
26
26
  */
27
27
  unknown: 'Unknown',
28
28
  } as const;
@@ -6,7 +6,7 @@ import * as Trace from '../../../models/trace/trace.js';
6
6
 
7
7
  const imageCache =
8
8
  new WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null>();
9
- export const emitter = new EventTarget();
9
+ export const emitter: EventTarget = new EventTarget();
10
10
 
11
11
  /**
12
12
  * Synchronously returns an image, or return `null` while queuing up an async load of that image.
@@ -55,5 +55,7 @@ export function preload(screenshots: Array<Trace.Types.Events.LegacySyntheticScr
55
55
  return Promise.all(promises);
56
56
  }
57
57
 
58
- export const cacheForTesting = imageCache;
59
- export const loadImageForTesting = loadImage;
58
+ export const cacheForTesting:
59
+ WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null> =
60
+ imageCache;
61
+ export const loadImageForTesting: typeof loadImage = loadImage;
@@ -76,14 +76,14 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
76
76
  const WEBAUDIO_EXPLANATION_URL =
77
77
  'https://developer.chrome.com/docs/devtools/webaudio' as Platform.DevToolsPath.UrlString;
78
78
 
79
- interface ViewInput {
79
+ export interface ViewInput {
80
80
  contexts: Protocol.WebAudio.BaseAudioContext[];
81
81
  selectedContextIndex: number;
82
82
  onContextSelectorSelectionChanged: (contextId: string) => void;
83
83
  contextRealtimeData: Protocol.WebAudio.ContextRealtimeData|null;
84
84
  }
85
85
 
86
- type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
86
+ export type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
87
87
 
88
88
  export const DEFAULT_VIEW: View = (input, _output, target) => {
89
89
  const {
@@ -189,7 +189,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
189
189
  private selectedContextIndex = -1;
190
190
  private readonly pollRealtimeDataThrottler: Common.Throttler.Throttler;
191
191
 
192
- constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
192
+ constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
193
193
  super({useShadowDom: 'pure'});
194
194
  this.view = view;
195
195
 
@@ -240,19 +240,13 @@ const PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum<typeof Protocol.Web
240
240
  U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,
241
241
  };
242
242
 
243
- interface Authenticator {
243
+ export interface Authenticator {
244
244
  name: string;
245
245
  options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
246
246
  credentials: Protocol.WebAuthn.Credential[];
247
247
  }
248
248
 
249
- interface Authenticator {
250
- name: string;
251
- options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
252
- credentials: Protocol.WebAuthn.Credential[];
253
- }
254
-
255
- interface ViewInput {
249
+ export interface ViewInput {
256
250
  enabled: boolean;
257
251
  onToggleEnabled: () => void;
258
252
  authenticators: Map<Protocol.WebAuthn.AuthenticatorId, Authenticator>;
@@ -270,11 +264,11 @@ interface ViewInput {
270
264
  onRemoveCredential: (id: Protocol.WebAuthn.AuthenticatorId, credentialId: string) => void;
271
265
  }
272
266
 
273
- interface ViewOutput {
267
+ export interface ViewOutput {
274
268
  revealSection: Map<string, () => void>;
275
269
  }
276
270
 
277
- type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
271
+ export type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
278
272
 
279
273
  function renderToolbar(enabled: boolean, onToggle: () => void): Lit.TemplateResult {
280
274
  const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);
@@ -629,7 +623,7 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
629
623
  revealSection: new Map(),
630
624
  };
631
625
 
632
- constructor(view = DEFAULT_VIEW) {
626
+ constructor(view: ViewFunction = DEFAULT_VIEW) {
633
627
  super('webauthn');
634
628
 
635
629
  this.#view = view;
@@ -9,6 +9,6 @@ export {ESTree};
9
9
 
10
10
  export { type Comment, defaultOptions, getLineInfo, Node, SourceLocation, Token, tokTypes} from './package/dist/acorn.mjs';
11
11
 
12
- export const Parser = acorn.Parser;
13
- export const tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
14
- export const parse = acorn.Parser.parse.bind(acorn.Parser);
12
+ export const Parser: typeof acorn.Parser = acorn.Parser;
13
+ export const tokenizer: typeof acorn.Parser.tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
14
+ export const parse: typeof acorn.Parser.parse = acorn.Parser.parse.bind(acorn.Parser);
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: e10b20e60f162e7ad88e4930833695a54f4e15fb
4
+ Revision: e8d7f556806fab69401893b125dee4b6e6ded695
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -0,0 +1 @@
1
+ export {};
@@ -343,12 +343,12 @@ export function isUrlScheme(urlScheme: string): boolean {
343
343
  /**
344
344
  * A regex pattern to check nonce prefix and Base64 formatting of a nonce value.
345
345
  */
346
- export const STRICT_NONCE_PATTERN =
346
+ export const STRICT_NONCE_PATTERN: RegExp =
347
347
  new RegExp('^\'nonce-[a-zA-Z0-9+/_-]+[=]{0,2}\'$');
348
348
 
349
349
 
350
350
  /** A regex pattern for checking if nonce prefix. */
351
- export const NONCE_PATTERN = new RegExp('^\'nonce-(.+)\'$');
351
+ export const NONCE_PATTERN: RegExp = new RegExp('^\'nonce-(.+)\'$');
352
352
 
353
353
 
354
354
  /**
@@ -367,12 +367,12 @@ export function isNonce(nonce: string, strictCheck?: boolean): boolean {
367
367
  /**
368
368
  * A regex pattern to check hash prefix and Base64 formatting of a hash value.
369
369
  */
370
- export const STRICT_HASH_PATTERN =
370
+ export const STRICT_HASH_PATTERN: RegExp =
371
371
  new RegExp('^\'(sha256|sha384|sha512)-[a-zA-Z0-9+/]+[=]{0,2}\'$');
372
372
 
373
373
 
374
374
  /** A regex pattern to check hash prefix. */
375
- export const HASH_PATTERN = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
375
+ export const HASH_PATTERN: RegExp = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
376
376
 
377
377
 
378
378
  /**
@@ -97,4 +97,6 @@ function normalizeDirectiveValue(directiveValue: string): string {
97
97
  return directiveValue;
98
98
  }
99
99
 
100
- export const TEST_ONLY = {normalizeDirectiveValue};
100
+ export const TEST_ONLY: {
101
+ normalizeDirectiveValue: typeof normalizeDirectiveValue,
102
+ } = {normalizeDirectiveValue};
@@ -136,7 +136,7 @@ export function matchWildcardUrls(
136
136
  export function applyCheckFunktionToDirectives(
137
137
  parsedCsp: csp.Csp,
138
138
  check: (directive: string, directiveValues: string[]) => void,
139
- ) {
139
+ ): void {
140
140
  const directiveNames = Object.keys(parsedCsp.directives);
141
141
 
142
142
  for (const directive of directiveNames) {
@@ -0,0 +1,10 @@
1
+ // Copyright 2026 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ /* eslint-disable @typescript-eslint/naming-convention */
6
+ declare class diff_match_patch {
7
+ diff_main(text1: string, text2: string): Array<{0: number, 1: string}>;
8
+ diff_cleanupSemantic(diff: Array<{0: number, 1: string}>): void;
9
+ }
10
+ /* eslint-enable @typescript-eslint/naming-convention */
@@ -1,4 +1,4 @@
1
1
  import JSON5 from './lib/index.js';
2
2
 
3
- export const parse = JSON5.parse;
4
- export const stringify = JSON5.stringify;
3
+ export const parse: typeof JSON5.parse = JSON5.parse;
4
+ export const stringify: typeof JSON5.stringify = JSON5.stringify;
@@ -57,6 +57,16 @@ function isCodeMirrorEditor(element: Element): boolean {
57
57
  return element.classList.contains('cm-editor');
58
58
  }
59
59
 
60
+ /**
61
+ * Resolves the file path attribute for a CodeMirror editor element.
62
+ *
63
+ * @param element The editor element to check.
64
+ * @returns The file path string or undefined if not found.
65
+ */
66
+ export function getEditorFilePath(element: Element): string|undefined {
67
+ return element.getAttribute('data-file-path') ?? undefined;
68
+ }
69
+
60
70
  /**
61
71
  * Checks whether an element contains non-empty text content (after trimming whitespace),
62
72
  * including text from any nested shadow roots.
@@ -340,7 +350,7 @@ export function resolveCommentAnchor(
340
350
  return null;
341
351
  }
342
352
  textSignature = lineInfo.textSignature;
343
- const filePath = target.getAttribute('data-file-path') ?? undefined;
353
+ const filePath = getEditorFilePath(target);
344
354
  editor = {lineNumber: lineInfo.lineNumber, filePath};
345
355
  } else {
346
356
  textSignature = target.deepTextContent();
@@ -379,7 +389,6 @@ export function resolveCommentAnchor(
379
389
  * @param limit Maximum number of matching elements to return (defaults to Infinity).
380
390
  * @returns Array of matching Elements in document order.
381
391
  */
382
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
383
392
  export function deepQuerySelectorAll(root: Document|Element, selector: string, limit: number = Infinity): Element[] {
384
393
  const results: Element[] = [];
385
394
  if (limit <= 0 || Number.isNaN(limit)) {
@@ -453,7 +462,7 @@ export function rematchCommentAnchor(comment: CommentThread, root: Document|Elem
453
462
  const {lineNumber, filePath} = anchor.editor;
454
463
  const cmEditors = deepQuerySelectorAll(root, '.cm-editor');
455
464
  const matchingEditors = cmEditors.filter(cmEditor => {
456
- if (filePath !== undefined && cmEditor.getAttribute('data-file-path') !== filePath) {
465
+ if (filePath !== undefined && getEditorFilePath(cmEditor) !== filePath) {
457
466
  return false;
458
467
  }
459
468
  return VisualLogging.getVePath(cmEditor) === anchor.vePath;
@@ -9,6 +9,7 @@ import {
9
9
  type CommentThread,
10
10
  computeVisibleRect,
11
11
  deepQuerySelectorAll,
12
+ getEditorFilePath,
12
13
  rematchCommentAnchor,
13
14
  resolveCommentAnchor,
14
15
  resolveCommentAnchorElement,
@@ -298,6 +299,13 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
298
299
  continue;
299
300
  }
300
301
 
302
+ if (thread.anchor.editor?.filePath) {
303
+ const currentFilePath = getEditorFilePath(el);
304
+ if (currentFilePath && currentFilePath !== thread.anchor.editor.filePath) {
305
+ continue;
306
+ }
307
+ }
308
+
301
309
  const observer = this.#getIntersectionObserver();
302
310
  if (!this.#observedThreads.has(el)) {
303
311
  observer.observe(el);
@@ -608,7 +616,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
608
616
  childList: true,
609
617
  subtree: true,
610
618
  attributes: true,
611
- attributeFilter: ['jslog', 'data-network-request-id', 'data-backend-node-id', 'aria-expanded'],
619
+ attributeFilter: ['jslog', 'data-network-request-id', 'data-backend-node-id', 'aria-expanded', 'data-file-path'],
612
620
  });
613
621
  }
614
622
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {Button, FloatingButton} from './buttons.js';
6
6
 
7
- export function render(container: HTMLElement) {
7
+ export function render(container: HTMLElement): void {
8
8
  const buttonDocs = container.createChild('div', 'button-docs');
9
9
  const style = document.createElement('style');
10
10
  style.textContent = `
@@ -358,3 +358,24 @@ button {
358
358
  transform: rotate(360deg);
359
359
  }
360
360
  }
361
+
362
+ @media (forced-colors: active) {
363
+ button.outlined {
364
+ background: ButtonFace;
365
+ border-color: ButtonText;
366
+ color: ButtonText;
367
+
368
+ devtools-icon {
369
+ color: ButtonText;
370
+ }
371
+
372
+ &:disabled {
373
+ border-color: GrayText;
374
+ color: GrayText;
375
+
376
+ devtools-icon {
377
+ color: GrayText;
378
+ }
379
+ }
380
+ }
381
+ }
@@ -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
+ }
@@ -15,7 +15,7 @@ const exampleRenderHelper = (key: string, value: string) => html`
15
15
  <devtools-report-value>${value}</devtools-report-value>
16
16
  `;
17
17
 
18
- export function render(container: HTMLElement) {
18
+ export function render(container: HTMLElement): void {
19
19
  // clang-format off
20
20
  Lit.render(
21
21
  html`
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {Snackbar} from './snackbars.js';
6
6
 
7
- export function render(container: HTMLElement) {
7
+ export function render(container: HTMLElement): void {
8
8
  const onActionClick = (): void => {
9
9
  console.log('Action button clicked!');
10
10
  };
@@ -14,7 +14,7 @@ export interface SpinnerProperties {
14
14
  }
15
15
 
16
16
  export class Spinner extends HTMLElement {
17
- static readonly observedAttributes = ['active'];
17
+ static readonly observedAttributes = ['active'] as const;
18
18
  readonly #shadow = this.attachShadow({mode: 'open'});
19
19
 
20
20
  constructor(props?: SpinnerProperties) {
@@ -8,6 +8,6 @@ import * as Lit from '../../lit/lit.js';
8
8
 
9
9
  const {html} = Lit;
10
10
 
11
- export function render(container: HTMLElement) {
11
+ export function render(container: HTMLElement): void {
12
12
  Lit.render(html`<devtools-spinner></devtools-spinner>`, container);
13
13
  }
@@ -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;
@@ -4,7 +4,6 @@
4
4
  /* eslint-disable @devtools/enforce-custom-element-definitions-location */
5
5
 
6
6
  import * as CodeHighlighter from '../../../ui/components/code_highlighter/code_highlighter.js';
7
- import codeHighlighterStyles from '../../../ui/components/code_highlighter/codeHighlighter.css.js';
8
7
  import * as Lit from '../../../ui/lit/lit.js';
9
8
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
10
9
 
@@ -23,8 +22,7 @@ function assert<T>(
23
22
  }
24
23
  }
25
24
 
26
- const {html, Decorators, Directives, LitElement} = Lit;
27
- const {customElement, property, state} = Decorators;
25
+ const {html, Directives} = Lit;
28
26
  const {classMap} = Directives;
29
27
 
30
28
  declare global {
@@ -42,7 +40,6 @@ const jsonPropertyOptions = {
42
40
  attribute: false,
43
41
  };
44
42
 
45
- @customElement('devtools-editable-content')
46
43
  class EditableContent extends HTMLElement {
47
44
  static get observedAttributes(): string[] {
48
45
  return ['disabled', 'placeholder'];
@@ -128,7 +125,7 @@ class SuggestionInitEvent extends Event {
128
125
  }
129
126
  }
130
127
 
131
- type SuggestionFilter = (option: string, query: string) => boolean;
128
+ export type SuggestionFilter = (option: string, query: string) => boolean;
132
129
 
133
130
  const defaultSuggestionFilter = (option: string, query: string): boolean =>
134
131
  option.toLowerCase().startsWith(query.toLowerCase());
@@ -137,13 +134,19 @@ const defaultSuggestionFilter = (option: string, query: string): boolean =>
137
134
  * @fires SuggestionInitEvent#suggestioninit
138
135
  * @fires SuggestEvent#suggest
139
136
  */
140
- @customElement('devtools-suggestion-box')
141
- class SuggestionBox extends LitElement {
142
- @property(jsonPropertyOptions) declare options: readonly string[];
143
- @property() declare expression: string;
144
- @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;
145
148
 
146
- @state() private declare cursor: number;
149
+ private declare cursor: number;
147
150
 
148
151
  #suggestions: string[] = [];
149
152
 
@@ -230,30 +233,42 @@ class SuggestionBox extends LitElement {
230
233
  }
231
234
  }
232
235
 
233
- @customElement('devtools-suggestion-input')
234
- export class SuggestionInput extends LitElement {
235
- static override shadowRootOptions = {
236
- ...LitElement.shadowRootOptions,
236
+ export class SuggestionInput extends Lit.LitElement {
237
+ static override shadowRootOptions: ShadowRootInit = {
238
+ ...Lit.LitElement.shadowRootOptions,
237
239
  delegatesFocus: true,
238
- } 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
+ };
239
254
 
240
255
  /**
241
256
  * State passed to devtools-suggestion-box.
242
257
  */
243
- @property(jsonPropertyOptions) declare options: readonly string[];
244
- @property({type: Boolean}) declare autocomplete?: boolean;
245
- @property() declare suggestionFilter?: SuggestionFilter;
246
- @state() declare expression: string;
258
+ declare options: readonly string[];
259
+ declare autocomplete?: boolean;
260
+ declare suggestionFilter?: SuggestionFilter;
261
+ declare expression: string;
247
262
 
248
263
  /**
249
264
  * State passed to devtools-editable-content.
250
265
  */
251
- @property() declare placeholder: string;
252
- @property() declare value: string;
253
- @property({type: Boolean}) declare disabled: boolean;
254
- @property({type: Boolean}) declare strikethrough: boolean;
255
- @property() declare mimeType: string;
256
- @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;
257
272
 
258
273
  constructor() {
259
274
  super();
@@ -338,7 +353,7 @@ export class SuggestionInput extends LitElement {
338
353
  protected override render(): Lit.TemplateResult {
339
354
  // clang-format off
340
355
  return html`<style>${contentEditableStyles}</style>
341
- <style>${codeHighlighterStyles}</style>
356
+ <style>${CodeHighlighter.codeHighlighterStyles}</style>
342
357
  <devtools-editable-content
343
358
  ?disabled=${this.disabled}
344
359
  class=${classMap({
@@ -365,3 +380,7 @@ export class SuggestionInput extends LitElement {
365
380
  // clang-format on
366
381
  }
367
382
  }
383
+
384
+ customElements.define('devtools-editable-content', EditableContent);
385
+ customElements.define('devtools-suggestion-box', SuggestionBox);
386
+ customElements.define('devtools-suggestion-input', SuggestionInput);
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {Switch} from './switch.js';
6
6
 
7
- export function render(container: HTMLElement) {
7
+ export function render(container: HTMLElement): void {
8
8
  function switchExample({checked, disabled}: {checked: boolean, disabled: boolean}): HTMLElement {
9
9
  const example = document.createElement('div');
10
10
  example.style.marginTop = '20px';
@@ -33,14 +33,16 @@ export enum AiCodeCompletionTeaserMode {
33
33
  ONLY_SHOW_ON_EMPTY = 'onlyShowOnEmpty',
34
34
  }
35
35
 
36
- export const setAiCodeCompletionTeaserMode = CodeMirror.StateEffect.define<AiCodeCompletionTeaserMode>();
37
-
38
- export const aiCodeCompletionTeaserModeState = CodeMirror.StateField.define<AiCodeCompletionTeaserMode>({
39
- create: () => AiCodeCompletionTeaserMode.OFF,
40
- update(value, tr) {
41
- return tr.effects.find(effect => effect.is(setAiCodeCompletionTeaserMode))?.value ?? value;
42
- },
43
- });
36
+ export const setAiCodeCompletionTeaserMode: CodeMirror.StateEffectType<AiCodeCompletionTeaserMode> =
37
+ CodeMirror.StateEffect.define<AiCodeCompletionTeaserMode>();
38
+
39
+ export const aiCodeCompletionTeaserModeState: CodeMirror.StateField<AiCodeCompletionTeaserMode> =
40
+ CodeMirror.StateField.define<AiCodeCompletionTeaserMode>({
41
+ create: () => AiCodeCompletionTeaserMode.OFF,
42
+ update(value, tr) {
43
+ return tr.effects.find(effect => effect.is(setAiCodeCompletionTeaserMode))?.value ?? value;
44
+ },
45
+ });
44
46
 
45
47
  export interface AiCodeCompletionConfig {
46
48
  completionContext: {
@@ -31,7 +31,8 @@ export enum AiCodeGenerationTeaserMode {
31
31
  DISMISSED = 'dismissed',
32
32
  }
33
33
 
34
- export const setAiCodeGenerationTeaserMode = CodeMirror.StateEffect.define<AiCodeGenerationTeaserMode>();
34
+ export const setAiCodeGenerationTeaserMode: CodeMirror.StateEffectType<AiCodeGenerationTeaserMode> =
35
+ CodeMirror.StateEffect.define<AiCodeGenerationTeaserMode>();
35
36
 
36
37
  const aiCodeGenerationTeaserModeState = CodeMirror.StateField.define<AiCodeGenerationTeaserMode>({
37
38
  create: () => AiCodeGenerationTeaserMode.ACTIVE,
@@ -12,7 +12,7 @@ import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.nex
12
12
  * view.dispatch({effects: setHighlightedPosition.of(position)});
13
13
  * ```
14
14
  */
15
- export const setHighlightedPosition = CodeMirror.StateEffect.define<number>();
15
+ export const setHighlightedPosition: CodeMirror.StateEffectType<number> = CodeMirror.StateEffect.define<number>();
16
16
 
17
17
  /**
18
18
  * The CodeMirror effect used to clear the highlighted execution position.
@@ -22,7 +22,7 @@ export const setHighlightedPosition = CodeMirror.StateEffect.define<number>();
22
22
  * view.dispatch({effects: clearHighlightedPosition.of()});
23
23
  * ```
24
24
  */
25
- export const clearHighlightedPosition = CodeMirror.StateEffect.define<void>();
25
+ export const clearHighlightedPosition: CodeMirror.StateEffectType<void> = CodeMirror.StateEffect.define<void>();
26
26
 
27
27
  /**
28
28
  * Constructs a CodeMirror extension that can be used to decorate the current execution
@@ -38,6 +38,20 @@ export class TextEditor extends HTMLElement {
38
38
  };
39
39
  #devtoolsResizeObserver = new ResizeObserver(this.#resizeListener);
40
40
 
41
+ static get observedAttributes(): string[] {
42
+ return ['data-file-path'];
43
+ }
44
+
45
+ attributeChangedCallback(name: string, _oldValue: string|null, newValue: string|null): void {
46
+ if (name === 'data-file-path' && this.#activeEditor) {
47
+ if (newValue !== null) {
48
+ this.#activeEditor.dom.setAttribute('data-file-path', newValue);
49
+ } else {
50
+ this.#activeEditor.dom.removeAttribute('data-file-path');
51
+ }
52
+ }
53
+ }
54
+
41
55
  constructor(pendingState?: CodeMirror.EditorState) {
42
56
  super();
43
57
  this.#pendingState = pendingState;
@@ -59,6 +73,11 @@ export class TextEditor extends HTMLElement {
59
73
  scrollTo: this.#lastScrollSnapshot,
60
74
  });
61
75
 
76
+ const filePath = this.getAttribute('data-file-path');
77
+ if (filePath) {
78
+ this.#activeEditor.dom.setAttribute('data-file-path', filePath);
79
+ }
80
+
62
81
  this.#activeEditor.scrollDOM.addEventListener('scroll', () => {
63
82
  if (!this.#activeEditor) {
64
83
  return;