chrome-devtools-frontend 1.0.981004 → 1.0.995227

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 (509) hide show
  1. package/AUTHORS +2 -0
  2. package/config/gni/devtools_grd_files.gni +8 -7
  3. package/config/gni/devtools_image_files.gni +1 -0
  4. package/front_end/.eslintrc.js +10 -0
  5. package/front_end/Images/src/ic_rendering.svg +3 -0
  6. package/front_end/core/common/ParsedURL.ts +44 -28
  7. package/front_end/core/common/ResourceType.ts +1 -1
  8. package/front_end/core/common/SettingRegistration.ts +1 -0
  9. package/front_end/core/host/InspectorFrontendHost.ts +11 -10
  10. package/front_end/core/host/InspectorFrontendHostAPI.ts +15 -14
  11. package/front_end/core/host/Platform.ts +11 -2
  12. package/front_end/core/host/UserMetrics.ts +27 -2
  13. package/front_end/core/i18n/DevToolsLocale.ts +4 -0
  14. package/front_end/core/i18n/locales/af.json +76 -16
  15. package/front_end/core/i18n/locales/am.json +76 -16
  16. package/front_end/core/i18n/locales/ar.json +77 -17
  17. package/front_end/core/i18n/locales/as.json +76 -16
  18. package/front_end/core/i18n/locales/az.json +76 -16
  19. package/front_end/core/i18n/locales/be.json +75 -15
  20. package/front_end/core/i18n/locales/bg.json +76 -16
  21. package/front_end/core/i18n/locales/bn.json +76 -16
  22. package/front_end/core/i18n/locales/bs.json +88 -28
  23. package/front_end/core/i18n/locales/ca.json +76 -16
  24. package/front_end/core/i18n/locales/cs.json +76 -16
  25. package/front_end/core/i18n/locales/cy.json +76 -16
  26. package/front_end/core/i18n/locales/da.json +77 -17
  27. package/front_end/core/i18n/locales/de.json +178 -118
  28. package/front_end/core/i18n/locales/el.json +76 -16
  29. package/front_end/core/i18n/locales/en-GB.json +76 -16
  30. package/front_end/core/i18n/locales/en-US.json +208 -52
  31. package/front_end/core/i18n/locales/en-XL.json +208 -52
  32. package/front_end/core/i18n/locales/es-419.json +76 -16
  33. package/front_end/core/i18n/locales/es.json +76 -16
  34. package/front_end/core/i18n/locales/et.json +76 -16
  35. package/front_end/core/i18n/locales/eu.json +76 -16
  36. package/front_end/core/i18n/locales/fa.json +83 -23
  37. package/front_end/core/i18n/locales/fi.json +76 -16
  38. package/front_end/core/i18n/locales/fil.json +76 -16
  39. package/front_end/core/i18n/locales/fr-CA.json +76 -16
  40. package/front_end/core/i18n/locales/fr.json +76 -16
  41. package/front_end/core/i18n/locales/gl.json +76 -16
  42. package/front_end/core/i18n/locales/gu.json +76 -16
  43. package/front_end/core/i18n/locales/he.json +76 -16
  44. package/front_end/core/i18n/locales/hi.json +76 -16
  45. package/front_end/core/i18n/locales/hr.json +76 -16
  46. package/front_end/core/i18n/locales/hu.json +76 -16
  47. package/front_end/core/i18n/locales/hy.json +76 -16
  48. package/front_end/core/i18n/locales/id.json +79 -19
  49. package/front_end/core/i18n/locales/is.json +75 -15
  50. package/front_end/core/i18n/locales/it.json +124 -64
  51. package/front_end/core/i18n/locales/ja.json +76 -16
  52. package/front_end/core/i18n/locales/ka.json +76 -16
  53. package/front_end/core/i18n/locales/kk.json +76 -16
  54. package/front_end/core/i18n/locales/km.json +76 -16
  55. package/front_end/core/i18n/locales/kn.json +76 -16
  56. package/front_end/core/i18n/locales/ko.json +76 -16
  57. package/front_end/core/i18n/locales/ky.json +76 -16
  58. package/front_end/core/i18n/locales/lo.json +76 -16
  59. package/front_end/core/i18n/locales/lt.json +76 -16
  60. package/front_end/core/i18n/locales/lv.json +76 -16
  61. package/front_end/core/i18n/locales/mk.json +76 -16
  62. package/front_end/core/i18n/locales/ml.json +76 -16
  63. package/front_end/core/i18n/locales/mn.json +76 -16
  64. package/front_end/core/i18n/locales/mr.json +76 -16
  65. package/front_end/core/i18n/locales/ms.json +76 -16
  66. package/front_end/core/i18n/locales/my.json +78 -18
  67. package/front_end/core/i18n/locales/ne.json +76 -16
  68. package/front_end/core/i18n/locales/nl.json +77 -17
  69. package/front_end/core/i18n/locales/no.json +76 -16
  70. package/front_end/core/i18n/locales/or.json +76 -16
  71. package/front_end/core/i18n/locales/pa.json +76 -16
  72. package/front_end/core/i18n/locales/pl.json +78 -18
  73. package/front_end/core/i18n/locales/pt-PT.json +123 -63
  74. package/front_end/core/i18n/locales/pt.json +78 -18
  75. package/front_end/core/i18n/locales/ro.json +76 -16
  76. package/front_end/core/i18n/locales/ru.json +77 -17
  77. package/front_end/core/i18n/locales/si.json +76 -16
  78. package/front_end/core/i18n/locales/sk.json +76 -16
  79. package/front_end/core/i18n/locales/sl.json +76 -16
  80. package/front_end/core/i18n/locales/sq.json +76 -16
  81. package/front_end/core/i18n/locales/sr-Latn.json +76 -16
  82. package/front_end/core/i18n/locales/sr.json +76 -16
  83. package/front_end/core/i18n/locales/sv.json +76 -16
  84. package/front_end/core/i18n/locales/sw.json +76 -16
  85. package/front_end/core/i18n/locales/ta.json +77 -17
  86. package/front_end/core/i18n/locales/te.json +76 -16
  87. package/front_end/core/i18n/locales/th.json +76 -16
  88. package/front_end/core/i18n/locales/tr.json +76 -16
  89. package/front_end/core/i18n/locales/uk.json +76 -16
  90. package/front_end/core/i18n/locales/ur.json +76 -16
  91. package/front_end/core/i18n/locales/uz.json +77 -17
  92. package/front_end/core/i18n/locales/vi.json +76 -16
  93. package/front_end/core/i18n/locales/zh-HK.json +76 -16
  94. package/front_end/core/i18n/locales/zh-TW.json +76 -16
  95. package/front_end/core/i18n/locales/zh.json +76 -16
  96. package/front_end/core/i18n/locales/zu.json +76 -16
  97. package/front_end/core/platform/dom-utilities.ts +16 -0
  98. package/front_end/core/platform/platform.ts +2 -0
  99. package/front_end/core/protocol_client/InspectorBackend.ts +2 -1
  100. package/front_end/core/protocol_client/NodeURL.ts +1 -1
  101. package/front_end/core/root/Runtime.ts +6 -0
  102. package/front_end/core/sdk/AccessibilityModel.ts +7 -6
  103. package/front_end/core/sdk/CSSMatchedStyles.ts +71 -17
  104. package/front_end/core/sdk/CSSMetadata.ts +15 -0
  105. package/front_end/core/sdk/CSSModel.ts +9 -7
  106. package/front_end/core/sdk/CSSProperty.ts +97 -11
  107. package/front_end/core/sdk/CSSStyleSheetHeader.ts +9 -5
  108. package/front_end/core/sdk/CSSSupports.ts +4 -1
  109. package/front_end/core/sdk/ChildTargetManager.ts +3 -1
  110. package/front_end/core/sdk/Connections.ts +3 -2
  111. package/front_end/core/sdk/ConsoleModel.ts +6 -5
  112. package/front_end/core/sdk/Cookie.ts +4 -2
  113. package/front_end/core/sdk/DOMDebuggerModel.ts +10 -6
  114. package/front_end/core/sdk/DOMModel.ts +2 -2
  115. package/front_end/core/sdk/DebuggerModel.ts +27 -5
  116. package/front_end/core/sdk/HeapProfilerModel.ts +2 -1
  117. package/front_end/core/sdk/NetworkManager.ts +13 -12
  118. package/front_end/core/sdk/NetworkRequest.ts +1 -1
  119. package/front_end/core/sdk/PageLoad.ts +3 -1
  120. package/front_end/core/sdk/PageResourceLoader.ts +9 -7
  121. package/front_end/core/sdk/ProfileTreeModel.ts +3 -2
  122. package/front_end/core/sdk/RemoteObject.ts +18 -6
  123. package/front_end/core/sdk/ResourceTreeModel.ts +17 -11
  124. package/front_end/core/sdk/ScreenCaptureModel.ts +3 -0
  125. package/front_end/core/sdk/Script.ts +4 -3
  126. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +2 -1
  127. package/front_end/core/sdk/SourceMap.ts +10 -6
  128. package/front_end/core/sdk/SourceMapManager.ts +47 -5
  129. package/front_end/core/sdk/Target.ts +2 -1
  130. package/front_end/core/sdk/TracingModel.ts +0 -9
  131. package/front_end/devtools_compatibility.js +1 -0
  132. package/front_end/entrypoints/formatter_worker/CSSRuleParser.ts +1 -1
  133. package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +10 -3
  134. package/front_end/entrypoints/main/MainImpl.ts +22 -2
  135. package/front_end/generated/InspectorBackendCommands.js +85 -16
  136. package/front_end/generated/SupportedCSSProperties.js +21 -8
  137. package/front_end/generated/protocol-mapping.d.ts +4 -0
  138. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  139. package/front_end/generated/protocol.ts +174 -28
  140. package/front_end/legacy/legacy-defs.d.ts +0 -4
  141. package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -1
  142. package/front_end/legacy_test_runner/test_runner/TestRunner.js +1 -0
  143. package/front_end/models/bindings/BreakpointManager.ts +68 -11
  144. package/front_end/models/bindings/CSSWorkspaceBinding.ts +9 -2
  145. package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
  146. package/front_end/models/bindings/ContentProviderBasedProject.ts +12 -9
  147. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +10 -8
  148. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -1
  149. package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
  150. package/front_end/models/bindings/FileUtils.ts +3 -2
  151. package/front_end/models/bindings/IgnoreListManager.ts +5 -5
  152. package/front_end/models/bindings/ResourceUtils.ts +5 -4
  153. package/front_end/models/emulation/EmulatedDevices.ts +17 -0
  154. package/front_end/models/extensions/ExtensionAPI.ts +5 -2
  155. package/front_end/models/extensions/ExtensionPanel.ts +2 -1
  156. package/front_end/models/extensions/ExtensionServer.ts +13 -8
  157. package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -63
  158. package/front_end/models/issues_manager/CookieIssue.ts +7 -0
  159. package/front_end/models/issues_manager/DeprecationIssue.ts +326 -8
  160. package/front_end/models/issues_manager/IssuesManager.ts +4 -0
  161. package/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  162. package/front_end/models/issues_manager/descriptions/deprecation.md +1 -1
  163. package/front_end/models/logs/LogManager.ts +2 -1
  164. package/front_end/models/logs/NetworkLog.ts +14 -12
  165. package/front_end/models/persistence/Automapping.ts +17 -16
  166. package/front_end/models/persistence/EditFileSystemView.ts +5 -4
  167. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
  168. package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
  169. package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -6
  170. package/front_end/models/persistence/NetworkPersistenceManager.ts +92 -54
  171. package/front_end/models/persistence/PersistenceImpl.ts +7 -7
  172. package/front_end/models/persistence/PlatformFileSystem.ts +7 -8
  173. package/front_end/models/persistence/WorkspaceSettingsTab.ts +3 -2
  174. package/front_end/models/text_utils/CodeMirrorUtils.ts +53 -0
  175. package/front_end/models/text_utils/text_utils.ts +2 -0
  176. package/front_end/models/timeline_model/TimelineModel.ts +32 -30
  177. package/front_end/models/timeline_model/TimelineProfileTree.ts +3 -2
  178. package/front_end/models/workspace/FileManager.ts +9 -6
  179. package/front_end/models/workspace/UISourceCode.ts +16 -14
  180. package/front_end/models/workspace/WorkspaceImpl.ts +40 -16
  181. package/front_end/panels/accessibility/AccessibilitySubPane.ts +2 -1
  182. package/front_end/panels/application/AppManifestView.ts +1 -1
  183. package/front_end/panels/application/ApplicationPanelCacheSection.ts +5 -4
  184. package/front_end/panels/application/ApplicationPanelSidebar.ts +34 -30
  185. package/front_end/panels/application/ApplicationPanelTreeElement.ts +5 -4
  186. package/front_end/panels/application/BackgroundServiceView.ts +2 -1
  187. package/front_end/panels/application/DatabaseQueryView.ts +2 -1
  188. package/front_end/panels/application/InterestGroupTreeElement.ts +3 -2
  189. package/front_end/panels/application/ReportingApiTreeElement.ts +3 -2
  190. package/front_end/panels/application/ResourcesPanel.ts +4 -3
  191. package/front_end/panels/application/ServiceWorkerCacheViews.ts +6 -1
  192. package/front_end/panels/application/TrustTokensTreeElement.ts +3 -2
  193. package/front_end/panels/application/components/BackForwardCacheStrings.ts +10 -1
  194. package/front_end/panels/application/components/BackForwardCacheView.ts +163 -13
  195. package/front_end/panels/application/components/backForwardCacheView.css +15 -4
  196. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +19 -19
  197. package/front_end/panels/changes/ChangesView.ts +38 -0
  198. package/front_end/panels/console/ConsoleFormat.ts +23 -0
  199. package/front_end/panels/console/ConsolePinPane.ts +7 -0
  200. package/front_end/panels/console/ConsolePrompt.ts +11 -1
  201. package/front_end/panels/console/ConsoleSidebar.ts +2 -1
  202. package/front_end/panels/console/ConsoleView.ts +60 -32
  203. package/front_end/panels/console/ConsoleViewMessage.ts +15 -28
  204. package/front_end/panels/console/ConsoleViewport.ts +2 -1
  205. package/front_end/panels/console/ErrorStackParser.ts +8 -4
  206. package/front_end/panels/console/consoleView.css +0 -1
  207. package/front_end/panels/coverage/CoverageListView.ts +1 -1
  208. package/front_end/panels/coverage/CoverageModel.ts +6 -6
  209. package/front_end/panels/coverage/CoverageView.ts +2 -1
  210. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -1
  211. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +7 -6
  212. package/front_end/panels/css_overview/components/cssOverviewStartView.css +0 -48
  213. package/front_end/panels/css_overview/cssOverviewCompletedView.css +5 -0
  214. package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +2 -0
  215. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -1
  216. package/front_end/panels/elements/ComputedStyleWidget.ts +2 -1
  217. package/front_end/panels/elements/ElementStatePaneWidget.ts +4 -6
  218. package/front_end/panels/elements/ElementsPanel.ts +16 -5
  219. package/front_end/panels/elements/ImagePreviewPopover.ts +6 -4
  220. package/front_end/panels/elements/PropertiesWidget.ts +4 -24
  221. package/front_end/panels/elements/StyleEditorWidget.ts +2 -1
  222. package/front_end/panels/elements/StylePropertiesSection.ts +1614 -0
  223. package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -1
  224. package/front_end/panels/elements/StylePropertyTreeElement.ts +20 -1
  225. package/front_end/panels/elements/StylesSidebarPane.ts +97 -1675
  226. package/front_end/panels/elements/elements-legacy.ts +3 -3
  227. package/front_end/panels/elements/elements.ts +3 -0
  228. package/front_end/panels/elements/stylesSidebarPane.css +3 -1
  229. package/front_end/panels/emulation/AdvancedApp.ts +6 -2
  230. package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -1
  231. package/front_end/panels/input/InputTimeline.ts +3 -2
  232. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -50
  233. package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +14 -2
  234. package/front_end/panels/issues/IssueAggregator.ts +8 -0
  235. package/front_end/panels/issues/issues.ts +2 -0
  236. package/front_end/panels/lighthouse/LighthouseController.ts +5 -1
  237. package/front_end/panels/lighthouse/LighthousePanel.ts +3 -1
  238. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  239. package/front_end/panels/lighthouse/LighthouseTimespanView.ts +3 -3
  240. package/front_end/panels/network/BlockedURLsPane.ts +3 -2
  241. package/front_end/panels/network/NetworkConfigView.ts +6 -0
  242. package/front_end/panels/network/NetworkDataGridNode.ts +4 -0
  243. package/front_end/panels/network/NetworkLogView.ts +3 -3
  244. package/front_end/panels/network/RequestHTMLView.ts +1 -0
  245. package/front_end/panels/network/RequestHeadersView.ts +71 -10
  246. package/front_end/panels/network/networkLogView.css +9 -17
  247. package/front_end/panels/network/requestHeadersTree.css +16 -0
  248. package/front_end/panels/profiler/HeapSnapshotView.ts +5 -2
  249. package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
  250. package/front_end/panels/profiler/ProfileView.ts +2 -2
  251. package/front_end/panels/profiler/ProfilesPanel.ts +2 -1
  252. package/front_end/panels/profiler/heapProfiler.css +15 -3
  253. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
  254. package/front_end/panels/screencast/ScreencastView.ts +5 -2
  255. package/front_end/panels/search/SearchConfig.ts +2 -1
  256. package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
  257. package/front_end/panels/settings/SettingsScreen.ts +4 -1
  258. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -2
  259. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +4 -4
  260. package/front_end/panels/sources/BreakpointEditDialog.ts +0 -1
  261. package/front_end/panels/sources/CSSPlugin.ts +6 -6
  262. package/front_end/panels/sources/CoveragePlugin.ts +2 -1
  263. package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
  264. package/front_end/panels/sources/EditingLocationHistoryManager.ts +4 -1
  265. package/front_end/panels/sources/NavigatorView.ts +28 -20
  266. package/front_end/panels/sources/SearchSourcesView.ts +2 -2
  267. package/front_end/panels/sources/SourcesNavigator.ts +4 -2
  268. package/front_end/panels/sources/SourcesPanel.ts +4 -4
  269. package/front_end/panels/sources/SourcesSearchScope.ts +12 -8
  270. package/front_end/panels/sources/SourcesView.ts +3 -1
  271. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  272. package/front_end/panels/sources/components/HeadersView.css +17 -2
  273. package/front_end/panels/sources/components/HeadersView.ts +103 -1
  274. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +9 -9
  275. package/front_end/panels/timeline/TimelinePanel.ts +3 -2
  276. package/front_end/panels/timeline/TimelineUIUtils.ts +7 -0
  277. package/front_end/panels/timeline/timelinePanel.css +1 -2
  278. package/front_end/panels/utils/utils.ts +97 -0
  279. package/front_end/third_party/codemirror.next/bundle.ts +27 -25
  280. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  281. package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -2
  282. package/front_end/third_party/codemirror.next/chunk/java.js +2 -1
  283. package/front_end/third_party/codemirror.next/chunk/json.js +2 -2
  284. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  285. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
  286. package/front_end/third_party/codemirror.next/chunk/php.js +2 -1
  287. package/front_end/third_party/codemirror.next/chunk/python.js +2 -2
  288. package/front_end/third_party/codemirror.next/chunk/wast.js +2 -1
  289. package/front_end/third_party/codemirror.next/chunk/xml.js +2 -1
  290. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1884 -2281
  291. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  292. package/front_end/third_party/codemirror.next/package.json +21 -32
  293. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +963 -886
  294. package/front_end/third_party/lighthouse/report/bundle.js +3 -2
  295. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  296. package/front_end/third_party/lit-html/README.chromium +3 -3
  297. package/front_end/third_party/lit-html/package/README.md +1 -1
  298. package/front_end/third_party/lit-html/package/async-directive.d.ts +1 -1
  299. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  300. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +1 -1
  301. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  302. package/front_end/third_party/lit-html/package/development/directives/choose.d.ts +32 -0
  303. package/front_end/third_party/lit-html/package/development/directives/choose.d.ts.map +1 -0
  304. package/front_end/third_party/lit-html/package/development/directives/choose.js +41 -0
  305. package/front_end/third_party/lit-html/package/development/directives/choose.js.map +1 -0
  306. package/front_end/third_party/lit-html/package/development/directives/join.d.ts +21 -0
  307. package/front_end/third_party/lit-html/package/development/directives/join.d.ts.map +1 -0
  308. package/front_end/third_party/lit-html/package/development/directives/join.js +19 -0
  309. package/front_end/third_party/lit-html/package/development/directives/join.js.map +1 -0
  310. package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts +23 -0
  311. package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts.map +1 -0
  312. package/front_end/third_party/lit-html/package/development/directives/keyed.js +39 -0
  313. package/front_end/third_party/lit-html/package/development/directives/keyed.js.map +1 -0
  314. package/front_end/third_party/lit-html/package/development/directives/map.d.ts +23 -0
  315. package/front_end/third_party/lit-html/package/development/directives/map.d.ts.map +1 -0
  316. package/front_end/third_party/lit-html/package/development/directives/map.js +30 -0
  317. package/front_end/third_party/lit-html/package/development/directives/map.js.map +1 -0
  318. package/front_end/third_party/lit-html/package/development/directives/range.d.ts +24 -0
  319. package/front_end/third_party/lit-html/package/development/directives/range.d.ts.map +1 -0
  320. package/front_end/third_party/lit-html/package/development/directives/range.js +13 -0
  321. package/front_end/third_party/lit-html/package/development/directives/range.js.map +1 -0
  322. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -1
  323. package/front_end/third_party/lit-html/package/development/directives/when.d.ts +26 -0
  324. package/front_end/third_party/lit-html/package/development/directives/when.d.ts.map +1 -0
  325. package/front_end/third_party/lit-html/package/development/directives/when.js +9 -0
  326. package/front_end/third_party/lit-html/package/development/directives/when.js.map +1 -0
  327. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +182 -1
  328. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  329. package/front_end/third_party/lit-html/package/development/lit-html.js +187 -4
  330. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  331. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  332. package/front_end/third_party/lit-html/package/development/static.js +7 -0
  333. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  334. package/front_end/third_party/lit-html/package/directives/choose.d.ts +32 -0
  335. package/front_end/third_party/lit-html/package/directives/choose.d.ts.map +1 -0
  336. package/front_end/third_party/lit-html/package/directives/choose.js +7 -0
  337. package/front_end/third_party/lit-html/package/directives/choose.js.map +1 -0
  338. package/front_end/third_party/lit-html/package/directives/class-map.js +1 -1
  339. package/front_end/third_party/lit-html/package/directives/guard.js +1 -1
  340. package/front_end/third_party/lit-html/package/directives/join.d.ts +21 -0
  341. package/front_end/third_party/lit-html/package/directives/join.d.ts.map +1 -0
  342. package/front_end/third_party/lit-html/package/directives/join.js +7 -0
  343. package/front_end/third_party/lit-html/package/directives/join.js.map +1 -0
  344. package/front_end/third_party/lit-html/package/directives/keyed.d.ts +23 -0
  345. package/front_end/third_party/lit-html/package/directives/keyed.d.ts.map +1 -0
  346. package/front_end/third_party/lit-html/package/directives/keyed.js +7 -0
  347. package/front_end/third_party/lit-html/package/directives/keyed.js.map +1 -0
  348. package/front_end/third_party/lit-html/package/directives/map.d.ts +23 -0
  349. package/front_end/third_party/lit-html/package/directives/map.d.ts.map +1 -0
  350. package/front_end/third_party/lit-html/package/directives/map.js +7 -0
  351. package/front_end/third_party/lit-html/package/directives/map.js.map +1 -0
  352. package/front_end/third_party/lit-html/package/directives/range.d.ts +24 -0
  353. package/front_end/third_party/lit-html/package/directives/range.d.ts.map +1 -0
  354. package/front_end/third_party/lit-html/package/directives/range.js +7 -0
  355. package/front_end/third_party/lit-html/package/directives/range.js.map +1 -0
  356. package/front_end/third_party/lit-html/package/directives/ref.js +1 -1
  357. package/front_end/third_party/lit-html/package/directives/repeat.js +1 -1
  358. package/front_end/third_party/lit-html/package/directives/style-map.js +1 -1
  359. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -1
  360. package/front_end/third_party/lit-html/package/directives/template-content.js +1 -1
  361. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +1 -1
  362. package/front_end/third_party/lit-html/package/directives/until.js +1 -1
  363. package/front_end/third_party/lit-html/package/directives/when.d.ts +26 -0
  364. package/front_end/third_party/lit-html/package/directives/when.d.ts.map +1 -0
  365. package/front_end/third_party/lit-html/package/directives/when.js +7 -0
  366. package/front_end/third_party/lit-html/package/directives/when.js.map +1 -0
  367. package/front_end/third_party/lit-html/package/lit-html.d.ts +182 -1
  368. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  369. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  370. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  371. package/front_end/third_party/lit-html/package/package.json +25 -1
  372. package/front_end/third_party/lit-html/package/private-ssr-support.js +1 -1
  373. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  374. package/front_end/third_party/lit-html/package/static.js +1 -1
  375. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  376. package/front_end/third_party/puppeteer/README.chromium +1 -1
  377. package/front_end/third_party/puppeteer/package/README.md +12 -13
  378. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js +5 -1
  379. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js.map +1 -1
  380. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -1
  381. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  382. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +2 -2
  383. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +2 -2
  384. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +2 -2
  385. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  386. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +13 -6
  387. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
  388. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +5 -1
  389. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  390. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +1 -0
  391. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
  392. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +4 -1
  393. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
  394. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -0
  395. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
  396. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +10 -0
  397. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
  398. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +4 -2
  399. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
  400. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
  401. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
  402. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +12 -1
  403. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
  404. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +5 -1
  405. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
  406. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
  407. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +7 -6
  408. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
  409. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +8 -1
  410. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
  411. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +6 -2
  412. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
  413. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +6 -2
  414. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
  415. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
  416. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +2 -2
  417. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +2 -2
  418. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +2 -2
  419. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
  420. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +13 -6
  421. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
  422. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +1 -0
  423. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
  424. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +4 -1
  425. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
  426. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -0
  427. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
  428. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +10 -0
  429. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
  430. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +4 -2
  431. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
  432. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
  433. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
  434. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -1
  435. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
  436. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
  437. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +2 -5
  438. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
  439. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +3 -0
  440. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
  441. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +1 -1
  442. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
  443. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +1 -1
  444. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
  445. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
  446. package/front_end/third_party/puppeteer/package/lib/types.d.ts +10 -6
  447. package/front_end/third_party/puppeteer/package/package.json +17 -17
  448. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +1 -1
  449. package/front_end/ui/components/data_grid/DataGrid.ts +8 -9
  450. package/front_end/ui/components/data_grid/DataGridController.ts +3 -1
  451. package/front_end/ui/components/docs/panel_introduction_steps/basic.html +25 -0
  452. package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +25 -0
  453. package/front_end/ui/components/input/input.ts +2 -2
  454. package/front_end/ui/components/linkifier/LinkifierUtils.ts +3 -1
  455. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -1
  456. package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +44 -0
  457. package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +56 -0
  458. package/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.ts +5 -0
  459. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +3 -4
  460. package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
  461. package/front_end/ui/components/text_editor/config.ts +1 -35
  462. package/front_end/ui/components/text_editor/javascript.ts +8 -8
  463. package/front_end/ui/components/tree_outline/TreeOutline.ts +10 -9
  464. package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
  465. package/front_end/ui/legacy/ARIAUtils.ts +4 -2
  466. package/front_end/ui/legacy/ContextMenu.ts +14 -0
  467. package/front_end/ui/legacy/DockController.ts +2 -1
  468. package/front_end/ui/legacy/SettingsUI.ts +3 -3
  469. package/front_end/ui/legacy/SoftContextMenu.ts +43 -14
  470. package/front_end/ui/legacy/Toolbar.ts +16 -0
  471. package/front_end/ui/legacy/Treeoutline.ts +17 -7
  472. package/front_end/ui/legacy/UIUtils.ts +2 -2
  473. package/front_end/ui/legacy/View.ts +14 -8
  474. package/front_end/ui/legacy/ViewManager.ts +2 -1
  475. package/front_end/ui/legacy/ViewRegistration.ts +6 -0
  476. package/front_end/ui/legacy/Widget.ts +2 -1
  477. package/front_end/ui/legacy/XLink.ts +8 -3
  478. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +3 -1
  479. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +43 -11
  480. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +98 -48
  481. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +4 -3
  482. package/front_end/ui/legacy/components/data_grid/dataGrid.css +24 -28
  483. package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +5 -11
  484. package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +8 -1
  485. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -7
  486. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +11 -10
  487. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +7 -1
  488. package/front_end/ui/legacy/components/utils/ImagePreview.ts +18 -9
  489. package/front_end/ui/legacy/components/utils/Linkifier.ts +13 -6
  490. package/front_end/ui/legacy/reportView.css +1 -0
  491. package/front_end/ui/legacy/splitWidget.css +1 -1
  492. package/front_end/ui/legacy/tabbedPane.css +2 -0
  493. package/front_end/ui/legacy/themeColors.css +1 -1
  494. package/front_end/ui/legacy/toolbar.css +17 -1
  495. package/front_end/ui/legacy/utils/focus-changed.ts +3 -1
  496. package/inspector_overlay/.eslintrc.js +9 -0
  497. package/package.json +17 -17
  498. package/scripts/eslint_rules/lib/check_component_naming.js +4 -0
  499. package/scripts/eslint_rules/lib/es_modules_import.js +6 -0
  500. package/scripts/eslint_rules/lib/inject_checkbox_styles.js +121 -0
  501. package/scripts/eslint_rules/tests/es_modules_import_test.js +12 -0
  502. package/scripts/eslint_rules/tests/inject_checkbox_styles_test.js +127 -0
  503. package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +0 -4
  504. package/front_end/models/issues_manager/descriptions/arAttributionTriggerDataTooLarge.md +0 -4
  505. package/front_end/models/issues_manager/descriptions/arInvalidAttributionData.md +0 -8
  506. package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +0 -9
  507. package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +0 -5
  508. package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +0 -5
  509. package/front_end/models/issues_manager/descriptions/arMissingAttributionData.md +0 -7
@@ -276,7 +276,7 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
276
276
  this.editorView.setMainWidget(this.sourcesViewInternal);
277
277
 
278
278
  this.threadsSidebarPane = null;
279
- this.watchSidebarPane = (UI.ViewManager.ViewManager.instance().view('sources.watch') as UI.View.View);
279
+ this.watchSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.watch');
280
280
  this.callstackPane = CallStackSidebarPane.instance();
281
281
 
282
282
  Common.Settings.Settings.instance()
@@ -354,7 +354,7 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
354
354
 
355
355
  private showThreadsIfNeeded(): void {
356
356
  if (ThreadsSidebarPane.shouldBeShown() && !this.threadsSidebarPane) {
357
- this.threadsSidebarPane = (UI.ViewManager.ViewManager.instance().view('sources.threads') as UI.View.View);
357
+ this.threadsSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.threads');
358
358
  if (this.sidebarPaneStack && this.threadsSidebarPane) {
359
359
  void this.sidebarPaneStack.showView(
360
360
  this.threadsSidebarPane, this.splitWidget.isVertical() ? this.watchSidebarPane : this.callstackPane);
@@ -1058,8 +1058,8 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
1058
1058
  void this.sidebarPaneStack.showView(this.threadsSidebarPane);
1059
1059
  }
1060
1060
 
1061
- const jsBreakpoints = (UI.ViewManager.ViewManager.instance().view('sources.jsBreakpoints') as UI.View.View);
1062
- const scopeChainView = (UI.ViewManager.ViewManager.instance().view('sources.scopeChain') as UI.View.View);
1061
+ const jsBreakpoints = UI.ViewManager.ViewManager.instance().view('sources.jsBreakpoints');
1062
+ const scopeChainView = UI.ViewManager.ViewManager.instance().view('sources.scopeChain');
1063
1063
 
1064
1064
  if (this.tabbedLocationHeader) {
1065
1065
  this.splitWidget.uninstallResizer(this.tabbedLocationHeader);
@@ -28,6 +28,8 @@
28
28
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
  */
30
30
 
31
+ // TODO(crbug.com/1253323): Casts to Branded Types will be removed from this file when migration to branded types is complete.
32
+
31
33
  import * as Common from '../../core/common/common.js';
32
34
  import * as Platform from '../../core/platform/platform.js';
33
35
  import * as Bindings from '../../models/bindings/bindings.js';
@@ -126,12 +128,12 @@ export class SourcesSearchScope implements Search.SearchConfig.SearchScope {
126
128
  for (const project of this.projects()) {
127
129
  const weight = project.uiSourceCodes().length;
128
130
  const findMatchingFilesInProjectProgress = findMatchingFilesProgress.createSubProgress(weight);
129
- const filesMathingFileQuery = this.projectFilesMatchingFileQuery(project, searchConfig);
131
+ const filesMatchingFileQuery = this.projectFilesMatchingFileQuery(project, searchConfig);
130
132
  const promise =
131
133
  project
132
- .findFilesMatchingSearchRequest(searchConfig, filesMathingFileQuery, findMatchingFilesInProjectProgress)
134
+ .findFilesMatchingSearchRequest(searchConfig, filesMatchingFileQuery, findMatchingFilesInProjectProgress)
133
135
  .then(this.processMatchingFilesForProject.bind(
134
- this, this.searchId, project, searchConfig, filesMathingFileQuery));
136
+ this, this.searchId, project, searchConfig, filesMatchingFileQuery));
135
137
  promises.push(promise);
136
138
  }
137
139
 
@@ -141,7 +143,7 @@ export class SourcesSearchScope implements Search.SearchConfig.SearchScope {
141
143
 
142
144
  private projectFilesMatchingFileQuery(
143
145
  project: Workspace.Workspace.Project, searchConfig: Workspace.Workspace.ProjectSearchConfig,
144
- dirtyOnly?: boolean): string[] {
146
+ dirtyOnly?: boolean): Platform.DevToolsPath.UrlString[] {
145
147
  const result = [];
146
148
  const uiSourceCodes = project.uiSourceCodes();
147
149
  for (let i = 0; i < uiSourceCodes.length; ++i) {
@@ -156,7 +158,9 @@ export class SourcesSearchScope implements Search.SearchConfig.SearchScope {
156
158
  if (dirtyOnly && !uiSourceCode.isDirty()) {
157
159
  continue;
158
160
  }
159
- if (searchConfig.filePathMatchesFileQuery(uiSourceCode.fullDisplayName())) {
161
+ if (searchConfig.filePathMatchesFileQuery(
162
+ uiSourceCode.fullDisplayName() as Platform.DevToolsPath.UrlString |
163
+ Platform.DevToolsPath.EncodedPathString)) {
160
164
  result.push(uiSourceCode.url());
161
165
  }
162
166
  }
@@ -166,7 +170,7 @@ export class SourcesSearchScope implements Search.SearchConfig.SearchScope {
166
170
 
167
171
  private processMatchingFilesForProject(
168
172
  searchId: number, project: Workspace.Workspace.Project, searchConfig: Workspace.Workspace.ProjectSearchConfig,
169
- filesMathingFileQuery: string[], files: string[]): void {
173
+ filesMatchingFileQuery: string[], files: string[]): void {
170
174
  if (searchId !== this.searchId && this.searchFinishedCallback) {
171
175
  this.searchFinishedCallback(false);
172
176
  return;
@@ -174,13 +178,13 @@ export class SourcesSearchScope implements Search.SearchConfig.SearchScope {
174
178
 
175
179
  files.sort(Platform.StringUtilities.naturalOrderComparator);
176
180
  files = Platform.ArrayUtilities.intersectOrdered(
177
- files, filesMathingFileQuery, Platform.StringUtilities.naturalOrderComparator);
181
+ files, filesMatchingFileQuery, Platform.StringUtilities.naturalOrderComparator);
178
182
  const dirtyFiles = this.projectFilesMatchingFileQuery(project, searchConfig, true);
179
183
  files = Platform.ArrayUtilities.mergeOrdered(files, dirtyFiles, Platform.StringUtilities.naturalOrderComparator);
180
184
 
181
185
  const uiSourceCodes = [];
182
186
  for (const file of files) {
183
- const uiSourceCode = project.uiSourceCodeForURL(file);
187
+ const uiSourceCode = project.uiSourceCodeForURL(file as Platform.DevToolsPath.UrlString);
184
188
  if (!uiSourceCode) {
185
189
  continue;
186
190
  }
@@ -702,7 +702,9 @@ export class SwitchFileActionDelegate implements UI.ActionRegistration.ActionDel
702
702
  }
703
703
  candidates.sort(Platform.StringUtilities.naturalOrderComparator);
704
704
  const index = Platform.NumberUtilities.mod(candidates.indexOf(name) + 1, candidates.length);
705
- const fullURL = (url ? url + '/' : '') + candidates[index];
705
+ const fullURL = Common.ParsedURL.ParsedURL.concatenate(
706
+ (url ? Common.ParsedURL.ParsedURL.concatenate(url, '/') : '' as Platform.DevToolsPath.UrlString),
707
+ candidates[index]);
706
708
  const nextUISourceCode = currentUISourceCode.project().uiSourceCodeForURL(fullURL);
707
709
  return nextUISourceCode !== currentUISourceCode ? nextUISourceCode : null;
708
710
  }
@@ -238,7 +238,7 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
238
238
  this.scrollTimer = window.setTimeout(() => this.history.save(this.previouslyViewedFilesSetting), 100);
239
239
  if (this.currentFileInternal) {
240
240
  const {editor} = this.currentView.textEditor;
241
- const topBlock = editor.blockAtHeight(editor.scrollDOM.getBoundingClientRect().top);
241
+ const topBlock = editor.lineBlockAtHeight(editor.scrollDOM.getBoundingClientRect().top - editor.documentTop);
242
242
  const topLine = editor.state.doc.lineAt(topBlock.from).number - 1;
243
243
  this.history.updateScrollLineNumber(this.currentFileInternal.url(), topLine);
244
244
  }
@@ -16,8 +16,7 @@
16
16
  font-family: var(--monospace-font-family);
17
17
  font-size: var(--monospace-font-size);
18
18
  align-items: center;
19
- line-height: 18px;
20
- margin-top: 3px;
19
+ line-height: 24px;
21
20
  }
22
21
 
23
22
  .row devtools-button {
@@ -57,6 +56,18 @@
57
56
  border-radius: 2px;
58
57
  }
59
58
 
59
+ .row .inline-button {
60
+ opacity: 0%;
61
+ visibility: hidden;
62
+ transition: opacity 200ms;
63
+ }
64
+
65
+ .row:focus-within .inline-button,
66
+ .row:hover .inline-button {
67
+ opacity: 100%;
68
+ visibility: visible;
69
+ }
70
+
60
71
  .center-wrapper {
61
72
  height: 100%;
62
73
  display: flex;
@@ -79,3 +90,7 @@
79
90
  line-height: 1.5em;
80
91
  color: var(--color-text-secondary);
81
92
  }
93
+
94
+ .add-block {
95
+ margin-top: 3px;
96
+ }
@@ -5,6 +5,7 @@
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as Persistence from '../../../models/persistence/persistence.js';
7
7
  import * as Workspace from '../../../models/workspace/workspace.js';
8
+ import * as Buttons from '../../../ui/components/buttons/buttons.js';
8
9
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
9
10
  import * as UI from '../../../ui/legacy/legacy.js';
10
11
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
@@ -12,6 +13,18 @@ import * as LitHtml from '../../../ui/lit-html/lit-html.js';
12
13
  import HeadersViewStyles from './HeadersView.css.js';
13
14
 
14
15
  const UIStrings = {
16
+ /**
17
+ *@description The title of a button that adds a field to input a header in the editor form.
18
+ */
19
+ addHeader: 'Add a header',
20
+ /**
21
+ *@description The title of a button that removes a field to input a header in the editor form.
22
+ */
23
+ removeHeader: 'Remove this header',
24
+ /**
25
+ *@description The title of a button that removes a section for defining header overrides in the editor form.
26
+ */
27
+ removeBlock: 'Remove this \'`ApplyTo`\'-section',
15
28
  /**
16
29
  *@description Error message for files which cannot not be parsed.
17
30
  *@example {.headers} PH1
@@ -23,16 +36,23 @@ const UIStrings = {
23
36
  */
24
37
  parsingErrorExplainer:
25
38
  'This is most likely due to a syntax error in \'\'{PH1}\'\'. Try opening this file in an external editor to fix the error or delete the file and re-create the override.',
39
+ /**
40
+ *@description Button text for a button which adds an additional header override.
41
+ */
42
+ addHeaderOverride: 'Add header override',
26
43
  };
27
44
  const str_ = i18n.i18n.registerUIStrings('panels/sources/components/HeadersView.ts', UIStrings);
28
45
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
29
46
 
47
+ const plusIconUrl = new URL('../../../Images/plus_icon.svg', import.meta.url).toString();
48
+ const minusIconUrl = new URL('../../../Images/minus_icon.svg', import.meta.url).toString();
49
+
30
50
  export class HeadersView extends UI.View.SimpleView {
31
51
  readonly #headersViewComponent = new HeadersViewComponent();
32
52
  #uiSourceCode: Workspace.UISourceCode.UISourceCode;
33
53
 
34
54
  constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
35
- super('HeadersView');
55
+ super(i18n.i18n.lockedString('HeadersView'));
36
56
  this.#uiSourceCode = uiSourceCode;
37
57
  this.#uiSourceCode.addEventListener(
38
58
  Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);
@@ -96,6 +116,10 @@ export class HeadersView extends UI.View.SimpleView {
96
116
  this.#setComponentData(this.#uiSourceCode.workingCopy());
97
117
  }
98
118
 
119
+ getComponent(): HeadersViewComponent {
120
+ return this.#headersViewComponent;
121
+ }
122
+
99
123
  dispose(): void {
100
124
  this.#uiSourceCode.removeEventListener(
101
125
  Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);
@@ -127,11 +151,13 @@ export class HeadersViewComponent extends HTMLElement {
127
151
  #headerOverrides: HeaderOverride[] = [];
128
152
  #uiSourceCode: Workspace.UISourceCode.UISourceCode|null = null;
129
153
  #parsingError = false;
154
+ #focusElement: {blockIndex: number, headerIndex?: number}|null = null;
130
155
 
131
156
  constructor() {
132
157
  super();
133
158
  this.#shadow.addEventListener('focusin', this.#onFocusIn.bind(this));
134
159
  this.#shadow.addEventListener('focusout', this.#onFocusOut.bind(this));
160
+ this.#shadow.addEventListener('click', this.#onClick.bind(this));
135
161
  this.#shadow.addEventListener('input', this.#onInput.bind(this));
136
162
  this.#shadow.addEventListener('keydown', this.#onKeyDown.bind(this));
137
163
  }
@@ -187,6 +213,43 @@ export class HeadersViewComponent extends HTMLElement {
187
213
  selection?.removeAllRanges();
188
214
  }
189
215
 
216
+ #generateNextHeaderName(headers: Header[]): string {
217
+ const takenNames = new Set<string>(headers.map(header => header.name));
218
+ let idx = 1;
219
+ while (takenNames.has('headerName' + idx)) {
220
+ idx++;
221
+ }
222
+ return 'headerName' + idx;
223
+ }
224
+
225
+ #onClick(e: Event): void {
226
+ const target = e.target as HTMLButtonElement;
227
+ const rowElement = target.closest('.row') as HTMLElement | null;
228
+ const blockIndex = Number(rowElement?.dataset.blockIndex || 0);
229
+ const headerIndex = Number(rowElement?.dataset.headerIndex || 0);
230
+ if (target.matches('.add-header')) {
231
+ this.#headerOverrides[blockIndex].headers.splice(
232
+ headerIndex + 1, 0,
233
+ {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: 'headerValue'});
234
+ this.#focusElement = {blockIndex, headerIndex: headerIndex + 1};
235
+ this.#onHeadersChanged();
236
+ } else if (target.matches('.remove-header')) {
237
+ this.#headerOverrides[blockIndex].headers.splice(headerIndex, 1);
238
+ if (this.#headerOverrides[blockIndex].headers.length === 0) {
239
+ this.#headerOverrides[blockIndex].headers.push(
240
+ {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: 'headerValue'});
241
+ }
242
+ this.#onHeadersChanged();
243
+ } else if (target.matches('.add-block')) {
244
+ this.#headerOverrides.push({applyTo: '*', headers: [{name: 'headerName', value: 'headerValue'}]});
245
+ this.#focusElement = {blockIndex: this.#headerOverrides.length - 1};
246
+ this.#onHeadersChanged();
247
+ } else if (target.matches('.remove-block')) {
248
+ this.#headerOverrides.splice(blockIndex, 1);
249
+ this.#onHeadersChanged();
250
+ }
251
+ }
252
+
190
253
  #onInput(e: Event): void {
191
254
  const target = e.target as HTMLButtonElement;
192
255
  const rowElement = target.closest('.row') as HTMLElement;
@@ -252,8 +315,25 @@ export class HeadersViewComponent extends HTMLElement {
252
315
  )}
253
316
  `,
254
317
  )}
318
+ <${Buttons.Button.Button.litTagName} .variant=${Buttons.Button.Variant.SECONDARY} class="add-block">
319
+ ${i18nString(UIStrings.addHeaderOverride)}
320
+ </${Buttons.Button.Button.litTagName}>
255
321
  `, this.#shadow, {host: this});
256
322
  // clang-format on
323
+
324
+ if (this.#focusElement) {
325
+ let focusElement: Element|null = null;
326
+ if (this.#focusElement.headerIndex) {
327
+ focusElement = this.#shadow.querySelector(`[data-block-index="${
328
+ this.#focusElement.blockIndex}"][data-header-index="${this.#focusElement.headerIndex}"] .header-name`);
329
+ } else {
330
+ focusElement = this.#shadow.querySelector(`[data-block-index="${this.#focusElement.blockIndex}"] .apply-to`);
331
+ }
332
+ if (focusElement) {
333
+ (focusElement as HTMLElement).focus();
334
+ }
335
+ this.#focusElement = null;
336
+ }
257
337
  }
258
338
 
259
339
  #renderApplyToRow(pattern: string, blockIndex: number): LitHtml.TemplateResult {
@@ -263,6 +343,13 @@ export class HeadersViewComponent extends HTMLElement {
263
343
  <div>${i18n.i18n.lockedString('Apply to')}</div>
264
344
  <div class="separator">:</div>
265
345
  ${this.#renderEditable(pattern, 'apply-to')}
346
+ <${Buttons.Button.Button.litTagName}
347
+ title=${i18nString(UIStrings.removeBlock)}
348
+ .size=${Buttons.Button.Size.SMALL}
349
+ .iconUrl=${minusIconUrl}
350
+ .variant=${Buttons.Button.Variant.ROUND}
351
+ class="remove-block inline-button"
352
+ ></${Buttons.Button.Button.litTagName}>
266
353
  </div>
267
354
  `;
268
355
  // clang-format on
@@ -275,6 +362,21 @@ export class HeadersViewComponent extends HTMLElement {
275
362
  ${this.#renderEditable(header.name, 'header-name red')}
276
363
  <div class="separator">:</div>
277
364
  ${this.#renderEditable(header.value, 'header-value')}
365
+ <${Buttons.Button.Button.litTagName}
366
+ title=${i18nString(UIStrings.addHeader)}
367
+ .size=${Buttons.Button.Size.SMALL}
368
+ .iconUrl=${plusIconUrl}
369
+ .variant=${Buttons.Button.Variant.ROUND}
370
+ class="add-header inline-button"
371
+ ></${Buttons.Button.Button.litTagName}>
372
+ <${Buttons.Button.Button.litTagName}
373
+ title=${i18nString(UIStrings.removeHeader)}
374
+ .size=${Buttons.Button.Size.SMALL}
375
+ .iconUrl=${minusIconUrl}
376
+ .variant=${Buttons.Button.Variant.ROUND}
377
+ class="remove-header inline-button"
378
+ ></${Buttons.Button.Button.litTagName}>
379
+ </div>
278
380
  `;
279
381
  // clang-format on
280
382
  }
@@ -165,6 +165,8 @@ const UIStrings = {
165
165
  };
166
166
  const str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartDataProvider.ts', UIStrings);
167
167
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
168
+ type TimelineFlameChartEntry = (SDK.FilmStripModel.Frame|SDK.TracingModel.Event|
169
+ TimelineModel.TimelineFrameModel.TimelineFrame|TimelineModel.TimelineIRModel.Phases);
168
170
  export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
169
171
  PerfUI.FlameChart.FlameChartDataProvider {
170
172
  private readonly font: string;
@@ -190,8 +192,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
190
192
  private readonly interactionsHeaderLevel2: PerfUI.FlameChart.GroupStyle;
191
193
  private readonly experienceHeader: PerfUI.FlameChart.GroupStyle;
192
194
  private readonly flowEventIndexById: Map<string, number>;
193
- private entryData!: (SDK.FilmStripModel.Frame|SDK.TracingModel.Event|
194
- TimelineModel.TimelineFrameModel.TimelineFrame|TimelineModel.TimelineIRModel.Phases)[];
195
+ private entryData!: TimelineFlameChartEntry[];
195
196
  private entryTypeByLevel!: EntryType[];
196
197
  private markers!: TimelineFlameChartMarker[];
197
198
  private asyncColorByInteractionPhase!: Map<TimelineModel.TimelineIRModel.Phases, string>;
@@ -721,11 +722,11 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
721
722
  if (event.name !== TimelineModel.TimelineModel.RecordType.JSFrame) {
722
723
  return false;
723
724
  }
724
- const url = event.args['data']['url'];
725
+ const url = event.args['data']['url'] as Platform.DevToolsPath.UrlString;
725
726
  return url && this.isIgnoreListedURL(url);
726
727
  }
727
728
 
728
- private isIgnoreListedURL(url: string): boolean {
729
+ private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {
729
730
  return Bindings.IgnoreListManager.IgnoreListManager.instance().isIgnoreListedURL(url);
730
731
  }
731
732
 
@@ -1345,11 +1346,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
1345
1346
  }
1346
1347
 
1347
1348
  private appendAsyncEvent(asyncEvent: SDK.TracingModel.AsyncEvent, level: number): void {
1348
- if (SDK.TracingModel.TracingModel.isNestableAsyncPhase(asyncEvent.phase)) {
1349
- // FIXME: also add steps once we support event nesting in the FlameChart.
1350
- this.appendEvent(asyncEvent, level);
1351
- return;
1352
- }
1353
1349
  const steps = asyncEvent.steps;
1354
1350
  // If we have past steps, put the end event for each range rather than start one.
1355
1351
  const eventOffset = steps.length > 1 && steps[1].phase === SDK.TracingModel.Phase.AsyncStepPast ? 1 : 0;
@@ -1467,6 +1463,10 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
1467
1463
  null;
1468
1464
  }
1469
1465
 
1466
+ entryDataByIndex(entryIndex: number): TimelineFlameChartEntry {
1467
+ return this.entryData[entryIndex];
1468
+ }
1469
+
1470
1470
  setEventColorMapping(colorForEvent: (arg0: SDK.TracingModel.Event) => string): void {
1471
1471
  this.colorForEvent = colorForEvent;
1472
1472
  }
@@ -636,7 +636,8 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
636
636
  }
637
637
 
638
638
  const now = new Date();
639
- const fileName = 'Profile-' + Platform.DateUtilities.toISO8601Compact(now) + '.json';
639
+ const fileName =
640
+ 'Profile-' + Platform.DateUtilities.toISO8601Compact(now) + '.json' as Platform.DevToolsPath.RawPathString;
640
641
  const stream = new Bindings.FileUtils.FileOutputStream();
641
642
 
642
643
  const accepted = await stream.open(fileName);
@@ -771,7 +772,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
771
772
  }
772
773
 
773
774
  private async getCoverageViewWidget(): Promise<Coverage.CoverageView.CoverageView> {
774
- const view = (UI.ViewManager.ViewManager.instance().view('coverage') as UI.View.View);
775
+ const view = UI.ViewManager.ViewManager.instance().view('coverage');
775
776
  return await view.widget() as Coverage.CoverageView.CoverageView;
776
777
  }
777
778
 
@@ -132,6 +132,12 @@ const UIStrings = {
132
132
  */
133
133
  paintImage: 'Paint Image',
134
134
  /**
135
+ *@description Noun for an event in the Performance panel. Pre-paint is a
136
+ *step before the 'Paint' event. A paint event is when the browser records the
137
+ *instructions for drawing the page. This step is the setup beforehand.
138
+ */
139
+ prePaint: 'Pre-Paint',
140
+ /**
135
141
  *@description Text in Timeline UIUtils of the Performance panel
136
142
  */
137
143
  updateLayer: 'Update Layer',
@@ -1283,6 +1289,7 @@ export class TimelineUIUtils {
1283
1289
  eventStyles[type.UpdateLayer] = new TimelineRecordStyle(i18nString(UIStrings.updateLayer), painting, true);
1284
1290
  eventStyles[type.UpdateLayerTree] = new TimelineRecordStyle(i18nString(UIStrings.updateLayerTree), rendering);
1285
1291
  eventStyles[type.Paint] = new TimelineRecordStyle(i18nString(UIStrings.paint), painting);
1292
+ eventStyles[type.PrePaint] = new TimelineRecordStyle(i18nString(UIStrings.prePaint), rendering);
1286
1293
  eventStyles[type.RasterTask] = new TimelineRecordStyle(i18nString(UIStrings.rasterizePaint), painting);
1287
1294
  eventStyles[type.ScrollLayer] = new TimelineRecordStyle(i18nString(UIStrings.scroll), rendering);
1288
1295
  eventStyles[type.CompositeLayers] = new TimelineRecordStyle(i18nString(UIStrings.compositeLayers), painting);
@@ -406,7 +406,6 @@
406
406
 
407
407
  .timeline-tree-view .data-grid .data-container {
408
408
  overflow-y: scroll;
409
- top: 21px;
410
409
  }
411
410
 
412
411
  .timeline-tree-view .data-grid.data-grid-fits-viewport .corner {
@@ -519,7 +518,7 @@
519
518
  width: 120px;
520
519
  }
521
520
 
522
- .timeline-tree-view .data-grid .header-container {
521
+ .timeline-tree-view .data-grid thead {
523
522
  height: 21px;
524
523
  }
525
524
 
@@ -3,6 +3,9 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
+ import * as Formatter from '../../models/formatter/formatter.js';
7
+ import type * as Diff from '../../third_party/diff/diff.js';
8
+ import * as DiffView from '../../ui/components/diff_view/diff_view.js';
6
9
 
7
10
  export function imageNameForResourceType(resourceType: Common.ResourceType.ResourceType): string {
8
11
  if (resourceType.isDocument()) {
@@ -25,3 +28,97 @@ export function imageNameForResourceType(resourceType: Common.ResourceType.Resou
25
28
  }
26
29
  return 'ic_file_default';
27
30
  }
31
+
32
+ export async function formatCSSChangesFromDiff(diff: Diff.Diff.DiffArray): Promise<string> {
33
+ const indent = ' ';
34
+ const {originalLines, currentLines, rows} = DiffView.DiffView.buildDiffRows(diff);
35
+ const originalRuleMaps = await buildStyleRuleMaps(originalLines.join('\n'));
36
+ const currentRuleMaps = await buildStyleRuleMaps(currentLines.join('\n'));
37
+
38
+ let changes = '';
39
+ let recordedOriginalSelector, recordedCurrentSelector;
40
+ let hasOpenDeclarationBlock = false;
41
+ for (const {currentLineNumber, originalLineNumber, type} of rows) {
42
+ if (type !== DiffView.DiffView.RowType.Deletion && type !== DiffView.DiffView.RowType.Addition) {
43
+ continue;
44
+ }
45
+
46
+ const isDeletion = type === DiffView.DiffView.RowType.Deletion;
47
+ const lines = isDeletion ? originalLines : currentLines;
48
+ // Diff line arrays starts at 0, but line numbers start at 1.
49
+ const lineIndex = isDeletion ? originalLineNumber - 1 : currentLineNumber - 1;
50
+ const line = lines[lineIndex].trim();
51
+ const {declarationIDToStyleRule, styleRuleIDToStyleRule} = isDeletion ? originalRuleMaps : currentRuleMaps;
52
+ let styleRule;
53
+ let prefix = '';
54
+ if (declarationIDToStyleRule.has(lineIndex)) {
55
+ styleRule = declarationIDToStyleRule.get(lineIndex) as FormattableStyleRule;
56
+ const selector = styleRule.selector;
57
+ // Use the equality of selector strings as a best-effort check for the equality of style rules.
58
+ if (selector !== recordedOriginalSelector && selector !== recordedCurrentSelector) {
59
+ prefix += `${selector} {\n`;
60
+ }
61
+ prefix += indent;
62
+ hasOpenDeclarationBlock = true;
63
+ } else {
64
+ if (hasOpenDeclarationBlock) {
65
+ prefix = '}\n\n';
66
+ hasOpenDeclarationBlock = false;
67
+ }
68
+ if (styleRuleIDToStyleRule.has(lineIndex)) {
69
+ styleRule = styleRuleIDToStyleRule.get(lineIndex);
70
+ }
71
+ }
72
+
73
+ const processedLine = isDeletion ? `/* ${line} */` : line;
74
+ changes += prefix + processedLine + '\n';
75
+ if (isDeletion) {
76
+ recordedOriginalSelector = styleRule?.selector;
77
+ } else {
78
+ recordedCurrentSelector = styleRule?.selector;
79
+ }
80
+ }
81
+
82
+ if (changes.length > 0) {
83
+ changes += '}';
84
+ }
85
+ return changes;
86
+ }
87
+
88
+ interface FormattableStyleRule {
89
+ rule: Formatter.FormatterWorkerPool.CSSRule;
90
+ selector: string;
91
+ }
92
+
93
+ async function buildStyleRuleMaps(content: string): Promise<{
94
+ declarationIDToStyleRule: Map<number, FormattableStyleRule>,
95
+ styleRuleIDToStyleRule: Map<number, FormattableStyleRule>,
96
+ }> {
97
+ const rules = await new Promise<Formatter.FormatterWorkerPool.CSSRule[]>(res => {
98
+ const rules: Formatter.FormatterWorkerPool.CSSRule[] = [];
99
+ Formatter.FormatterWorkerPool.formatterWorkerPool().parseCSS(content, (isLastChunk, currentRules) => {
100
+ rules.push(...currentRules);
101
+ if (isLastChunk) {
102
+ res(rules);
103
+ }
104
+ });
105
+ });
106
+
107
+ // We use line numbers as unique IDs for rules and declarations
108
+ const declarationIDToStyleRule = new Map<number, FormattableStyleRule>();
109
+ const styleRuleIDToStyleRule = new Map<number, FormattableStyleRule>();
110
+ for (const rule of rules) {
111
+ if ('styleRange' in rule) {
112
+ const selector = rule.selectorText.split('\n').pop()?.trim();
113
+ if (!selector) {
114
+ continue;
115
+ }
116
+ const styleRule = {rule, selector};
117
+ styleRuleIDToStyleRule.set(rule.styleRange.startLine, styleRule);
118
+ for (const property of rule.properties) {
119
+ declarationIDToStyleRule.set(property.range.startLine, styleRule);
120
+ }
121
+ }
122
+ }
123
+ return {declarationIDToStyleRule, styleRuleIDToStyleRule};
124
+ }
@@ -4,50 +4,49 @@
4
4
  // Note that this file is also used as a TypeScript source to bundle
5
5
  // the .d.ts files.
6
6
 
7
- import {StreamLanguage} from '@codemirror/stream-parser';
7
+ import {StreamLanguage} from "@codemirror/language";
8
8
 
9
9
  export {
10
- acceptCompletion, autocompletion, closeCompletion, completeAnyWord,
10
+ acceptCompletion, autocompletion, closeBrackets, closeBracketsKeymap
11
+ , closeCompletion, completeAnyWord,
11
12
  Completion, CompletionContext, CompletionResult, CompletionSource, currentCompletions,
12
- ifNotIn, selectedCompletion, startCompletion,
13
- } from '@codemirror/autocomplete';
14
- export {closeBrackets, closeBracketsKeymap} from '@codemirror/closebrackets';
13
+ ifNotIn, selectedCompletion, startCompletion} from '@codemirror/autocomplete';
15
14
  export {
16
15
  cursorMatchingBracket, cursorSubwordBackward, cursorSubwordForward,
17
- indentLess, indentMore, insertNewlineAndIndent, selectMatchingBracket,
16
+ history, historyKeymap,
17
+ indentLess, indentMore, insertNewlineAndIndent, redo, redoSelection, selectMatchingBracket,
18
18
  selectSubwordBackward, selectSubwordForward,
19
- standardKeymap
19
+ standardKeymap, toggleComment, undo, undoSelection
20
20
  } from '@codemirror/commands';
21
- export {toggleComment} from '@codemirror/comment';
22
- export {codeFolding, foldGutter, foldKeymap} from '@codemirror/fold';
23
- export {gutter, GutterMarker, gutters, lineNumberMarkers,lineNumbers} from '@codemirror/gutter';
24
- export {HighlightStyle, highlightTree, Tag, tags, TagStyle} from '@codemirror/highlight';
25
- export {history, historyKeymap, redo, redoSelection, undo, undoSelection} from '@codemirror/history';
26
21
  export * as css from '@codemirror/lang-css';
27
22
  export * as html from '@codemirror/lang-html';
28
23
  export * as javascript from '@codemirror/lang-javascript';
29
- export {ensureSyntaxTree, indentOnInput, indentUnit,Language, LanguageSupport, syntaxTree} from '@codemirror/language';
30
- export {bracketMatching} from '@codemirror/matchbrackets';
31
- export {Panel, showPanel} from '@codemirror/panel';
32
- export {Range, RangeSet, RangeSetBuilder} from '@codemirror/rangeset';
24
+ export { bracketMatching,
25
+ codeFolding,
26
+ ensureSyntaxTree, foldGutter, foldKeymap, HighlightStyle, indentOnInput, indentUnit,Language, LanguageSupport,
27
+ StreamLanguage, StreamParser, StringStream
28
+ , syntaxHighlighting, syntaxTree, TagStyle} from '@codemirror/language';
29
+ export {} from '@codemirror/rangeset';
33
30
  export { highlightSelectionMatches,selectNextOccurrence} from '@codemirror/search';
34
31
  export {
35
32
  Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Compartment,
36
- EditorSelection, EditorState, EditorStateConfig, Extension, Facet, MapMode
37
- , Prec,
38
- SelectionRange, StateEffect, StateEffectType, StateField, Transaction,
33
+ EditorSelection, EditorState, EditorStateConfig, Extension, Facet,
34
+ Line, MapMode, Prec, Range, RangeSet, RangeSetBuilder,
35
+ SelectionRange, StateEffect, StateEffectType, StateField, Text, TextIterator
36
+ , Transaction,
39
37
  TransactionSpec} from '@codemirror/state';
40
- export {StreamLanguage, StreamParser, StringStream} from '@codemirror/stream-parser';
41
- export {Line, Text, TextIterator} from '@codemirror/text';
42
- export { repositionTooltips,showTooltip, Tooltip, tooltips, TooltipView} from '@codemirror/tooltip';
38
+ export {} from '@codemirror/stream-parser';
43
39
  export {
44
40
  Command, Decoration, DecorationSet, drawSelection, EditorView,
45
- highlightSpecialChars, KeyBinding, keymap, MatchDecorator, placeholder,
46
- scrollPastEnd, ViewPlugin, ViewUpdate, WidgetType,
47
- } from '@codemirror/view';
41
+ gutter, GutterMarker, gutters,
42
+ highlightSpecialChars, KeyBinding, keymap, lineNumberMarkers,lineNumbers, MatchDecorator, Panel, placeholder,
43
+ repositionTooltips,
44
+ scrollPastEnd, showPanel,showTooltip, Tooltip, tooltips, TooltipView
45
+ , ViewPlugin, ViewUpdate, WidgetType} from '@codemirror/view';
48
46
  export {
49
47
  NodeProp, NodeSet, NodeType, Parser, SyntaxNode, Tree, TreeCursor
50
48
  } from '@lezer/common';
49
+ export {highlightTree, Tag, tags} from '@lezer/highlight';
51
50
  export {LRParser} from '@lezer/lr';
52
51
  export {StyleModule} from 'style-mod';
53
52
 
@@ -78,6 +77,9 @@ export function python() {
78
77
  export async function shell() {
79
78
  return StreamLanguage.define((await import('@codemirror/legacy-modes/mode/shell')).shell);
80
79
  }
80
+ export async function cssStreamParser() {
81
+ return (await import('@codemirror/legacy-modes/mode/css') as any).sCSS;
82
+ }
81
83
  export function wast() {
82
84
  return import('@codemirror/lang-wast');
83
85
  }