chrome-devtools-frontend 1.0.943986 → 1.0.945579

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 (335) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
  4. package/front_end/core/common/ParsedURL.ts +1 -1
  5. package/front_end/core/host/UserMetrics.ts +2 -1
  6. package/front_end/core/i18n/i18nImpl.ts +7 -4
  7. package/front_end/core/i18n/locales/en-US.json +3 -72
  8. package/front_end/core/i18n/locales/en-XL.json +15 -84
  9. package/front_end/core/protocol_client/NodeURL.ts +1 -0
  10. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  11. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
  12. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
  13. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  14. package/front_end/core/sdk/Cookie.ts +17 -0
  15. package/front_end/core/sdk/CookieModel.ts +1 -0
  16. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  17. package/front_end/core/sdk/NetworkManager.ts +4 -1
  18. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  19. package/front_end/core/sdk/OverlayModel.ts +0 -9
  20. package/front_end/core/sdk/Resource.ts +2 -2
  21. package/front_end/core/sdk/Script.ts +2 -3
  22. package/front_end/core/sdk/sdk-meta.ts +0 -26
  23. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
  24. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  25. package/front_end/generated/protocol.d.ts +0 -4
  26. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  27. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  28. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  29. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  30. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  31. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  32. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  33. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  34. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  35. package/front_end/models/workspace/UISourceCode.ts +2 -2
  36. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
  37. package/front_end/panels/animation/animationTimeline.css +2 -0
  38. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  39. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  40. package/front_end/panels/application/ReportingApiView.ts +15 -1
  41. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  42. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  43. package/front_end/panels/changes/ChangesView.ts +8 -7
  44. package/front_end/panels/console/ConsolePinPane.ts +1 -0
  45. package/front_end/panels/console/ConsolePrompt.ts +121 -171
  46. package/front_end/panels/console/ConsoleView.ts +1 -1
  47. package/front_end/panels/console/consoleView.css +1 -1
  48. package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
  49. package/front_end/panels/elements/AccessibilityTreeUtils.ts +2 -1
  50. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  51. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  52. package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
  53. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -12
  54. package/front_end/panels/elements/StylesSidebarPane.ts +36 -10
  55. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
  56. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  57. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  58. package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
  59. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  60. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  61. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  62. package/front_end/panels/sources/NavigatorView.ts +1 -1
  63. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  64. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  65. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  66. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  67. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  68. package/front_end/third_party/acorn/README.chromium +2 -2
  69. package/front_end/third_party/acorn/acorn.ts +1 -1
  70. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  71. package/front_end/third_party/acorn/package/README.md +1 -1
  72. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  73. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  74. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  75. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  76. package/front_end/third_party/acorn/package/package.json +1 -1
  77. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  78. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  79. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  80. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  81. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  82. package/front_end/third_party/codemirror.next/bundle.ts +4 -3
  83. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  84. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +39 -1
  85. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  86. package/front_end/third_party/codemirror.next/package.json +4 -4
  87. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  88. package/front_end/third_party/lit-html/README.chromium +2 -2
  89. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  90. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  91. package/front_end/third_party/lit-html/package/README.md +12 -162
  92. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  93. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  94. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  95. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  96. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  97. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  98. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  99. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  100. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  101. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  102. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  103. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  104. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  105. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  106. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  107. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  108. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  109. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  110. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  111. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  112. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  113. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  114. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  115. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  116. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  117. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  118. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  119. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  120. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  121. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  122. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  123. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  124. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  125. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  126. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  127. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  128. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  129. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  130. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  131. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  132. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  133. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  134. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  135. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  136. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  137. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  138. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  139. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  140. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  141. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  142. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  143. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  144. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  145. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  146. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  147. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  148. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  149. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  150. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  151. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  152. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  153. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  154. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  155. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  156. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  157. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  158. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  159. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  160. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  161. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  162. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  163. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  164. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  165. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  166. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  167. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  168. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  169. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  170. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  171. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  172. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  173. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  174. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  175. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  176. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  177. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  178. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  179. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  180. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  181. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  182. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  183. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  184. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  185. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  186. package/front_end/third_party/lit-html/package/directive.js +1 -1
  187. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  188. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  189. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  190. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  191. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  192. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  193. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  194. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  195. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  196. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  197. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  198. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  199. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  200. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  201. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  202. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  203. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  204. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  205. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  206. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  207. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  208. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  209. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  210. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  211. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  212. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  213. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  214. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  215. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  216. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  217. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  218. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  219. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  220. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  221. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  222. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  223. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  224. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  225. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  226. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  227. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  228. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  229. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  230. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  231. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  232. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  233. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  234. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  235. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  236. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  237. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  238. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  239. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  240. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  241. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  242. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  243. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  244. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  245. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  246. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  247. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  248. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  249. package/front_end/third_party/lit-html/package/package.json +75 -24
  250. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  251. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  252. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  253. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  254. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  255. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  256. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  257. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  258. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  259. package/front_end/third_party/lit-html/package/static.js +1 -1
  260. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  261. package/front_end/third_party/marked/README.chromium +2 -2
  262. package/front_end/third_party/marked/marked.ts +2 -2
  263. package/front_end/third_party/marked/package/README.md +7 -1
  264. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  265. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  266. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  267. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  268. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  269. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  270. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  271. package/front_end/third_party/marked/package/marked.min.js +1 -1
  272. package/front_end/third_party/marked/package/package.json +41 -32
  273. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  274. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  275. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  276. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  277. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  278. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  279. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  280. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  281. package/front_end/third_party/marked/package/src/marked.js +146 -63
  282. package/front_end/third_party/marked/package/src/rules.js +20 -45
  283. package/front_end/third_party/wasmparser/README.chromium +2 -2
  284. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  285. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  286. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  287. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  288. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  289. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  290. package/front_end/third_party/wasmparser/package/package.json +1 -1
  291. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  292. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  293. package/front_end/ui/components/buttons/Button.ts +116 -42
  294. package/front_end/ui/components/data_grid/DataGrid.ts +122 -122
  295. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  296. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  297. package/front_end/ui/components/docs/button/basic.html +3 -0
  298. package/front_end/ui/components/docs/button/basic.ts +16 -0
  299. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  300. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  301. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  302. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  303. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  304. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  305. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  306. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  307. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  308. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
  309. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  310. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  311. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  312. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  313. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  314. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  315. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  316. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  317. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  318. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  319. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  320. package/front_end/ui/components/text_editor/TextEditor.ts +65 -36
  321. package/front_end/ui/components/text_editor/config.ts +36 -14
  322. package/front_end/ui/components/text_editor/javascript.ts +20 -15
  323. package/front_end/ui/components/text_editor/theme.ts +29 -4
  324. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  325. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  326. package/front_end/ui/legacy/Infobar.ts +9 -0
  327. package/front_end/ui/legacy/InspectorView.ts +1 -1
  328. package/front_end/ui/legacy/ViewManager.ts +6 -0
  329. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  330. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  331. package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
  332. package/front_end/ui/legacy/tabbedPane.css +1 -1
  333. package/front_end/ui/legacy/themeColors.css +2 -0
  334. package/inspector_overlay/main.ts +3 -0
  335. package/package.json +1 -1
@@ -25,12 +25,16 @@ export const enum Size {
25
25
  MEDIUM = 'MEDIUM',
26
26
  }
27
27
 
28
+ type ButtonType = 'button'|'submit'|'reset';
29
+
28
30
  interface ButtonState {
29
31
  iconUrl?: string;
30
32
  variant?: Variant;
31
33
  size?: Size;
32
34
  disabled: boolean;
33
35
  active: boolean;
36
+ type: ButtonType;
37
+ value?: string;
34
38
  }
35
39
 
36
40
  export type ButtonData = {
@@ -39,30 +43,46 @@ export type ButtonData = {
39
43
  size?: Size,
40
44
  disabled?: boolean,
41
45
  active?: boolean,
46
+ type?: ButtonType,
47
+ value?: string,
42
48
  }|{
43
49
  variant: Variant.PRIMARY | Variant.SECONDARY,
44
50
  iconUrl?: string,
45
51
  size?: Size,
46
52
  disabled?: boolean,
47
53
  active?: boolean,
54
+ type?: ButtonType,
55
+ value?: string,
48
56
  };
49
57
 
58
+ interface ButtonElementInternals extends ElementInternals {
59
+ readonly form?: HTMLFormElement;
60
+ readonly validity: ValidityState;
61
+ readonly willValidate: boolean;
62
+ readonly validationMessage: string;
63
+ checkValidity(): void;
64
+ reportValidity(): void;
65
+ }
66
+
50
67
  export class Button extends HTMLElement {
68
+ static formAssociated = true;
51
69
  static readonly litTagName = LitHtml.literal`devtools-button`;
52
- private readonly shadow = this.attachShadow({mode: 'open', delegatesFocus: true});
53
- private readonly boundRender = this.render.bind(this);
54
- private readonly boundOnClick = this.onClick.bind(this);
55
- private readonly props: ButtonState = {
70
+ readonly #shadow = this.attachShadow({mode: 'open', delegatesFocus: true});
71
+ readonly #boundRender = this.render.bind(this);
72
+ readonly #boundOnClick = this.onClick.bind(this);
73
+ readonly #props: ButtonState = {
56
74
  size: Size.MEDIUM,
57
75
  disabled: false,
58
76
  active: false,
77
+ type: 'button',
59
78
  };
60
- private isEmpty = true;
79
+ #isEmpty = true;
80
+ #internals = this.attachInternals() as ButtonElementInternals;
61
81
 
62
82
  constructor() {
63
83
  super();
64
84
  this.setAttribute('role', 'presentation');
65
- this.addEventListener('click', this.boundOnClick, true);
85
+ this.addEventListener('click', this.#boundOnClick, true);
66
86
  }
67
87
 
68
88
  /**
@@ -70,104 +90,158 @@ export class Button extends HTMLElement {
70
90
  * for increased type-safety.
71
91
  */
72
92
  set data(data: ButtonData) {
73
- this.props.variant = data.variant;
74
- this.props.iconUrl = data.iconUrl;
75
- this.props.size = data.size || Size.MEDIUM;
76
- this.props.active = Boolean(data.active);
93
+ this.#props.variant = data.variant;
94
+ this.#props.iconUrl = data.iconUrl;
95
+ this.#props.size = data.size || Size.MEDIUM;
96
+ this.#props.active = Boolean(data.active);
97
+ this.#props.type = data.type || 'button';
77
98
  this.setDisabledProperty(data.disabled || false);
78
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
99
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
79
100
  }
80
101
 
81
102
  set iconUrl(iconUrl: string|undefined) {
82
- this.props.iconUrl = iconUrl;
83
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
103
+ this.#props.iconUrl = iconUrl;
104
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
84
105
  }
85
106
 
86
107
  set variant(variant: Variant) {
87
- this.props.variant = variant;
88
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
108
+ this.#props.variant = variant;
109
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
89
110
  }
90
111
 
91
112
  set size(size: Size) {
92
- this.props.size = size;
93
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
113
+ this.#props.size = size;
114
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
115
+ }
116
+
117
+ set type(type: ButtonType) {
118
+ this.#props.type = type;
119
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
94
120
  }
95
121
 
96
122
  set disabled(disabled: boolean) {
97
123
  this.setDisabledProperty(disabled);
98
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
124
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
99
125
  }
100
126
 
101
127
  set active(active: boolean) {
102
- this.props.active = active;
103
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
128
+ this.#props.active = active;
129
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
104
130
  }
105
131
 
106
132
  private setDisabledProperty(disabled: boolean): void {
107
- this.props.disabled = disabled;
133
+ this.#props.disabled = disabled;
108
134
  this.toggleAttribute('disabled', disabled);
109
135
  }
110
136
 
111
137
  focus(): void {
112
- this.shadow.querySelector('button')?.focus();
138
+ this.#shadow.querySelector('button')?.focus();
113
139
  }
114
140
 
115
141
  connectedCallback(): void {
116
- this.shadow.adoptedStyleSheets = [buttonStyles];
117
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
142
+ this.#shadow.adoptedStyleSheets = [buttonStyles];
143
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
118
144
  }
119
145
 
120
146
  private onClick(event: Event): void {
121
- if (this.props.disabled) {
147
+ if (this.#props.disabled) {
122
148
  event.stopPropagation();
123
149
  event.preventDefault();
150
+ return;
151
+ }
152
+ if (this.form && this.#props.type === 'submit') {
153
+ event.preventDefault();
154
+ this.form.dispatchEvent(new SubmitEvent('submit', {
155
+ submitter: this,
156
+ }));
157
+ }
158
+ if (this.form && this.#props.type === 'reset') {
159
+ event.preventDefault();
160
+ this.form.reset();
124
161
  }
125
162
  }
126
163
 
127
164
  private onSlotChange(event: Event): void {
128
165
  const slot = event.target as HTMLSlotElement | undefined;
129
166
  const nodes = slot?.assignedNodes();
130
- this.isEmpty = !nodes || !Boolean(nodes.length);
131
- ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
167
+ this.#isEmpty = !nodes || !Boolean(nodes.length);
168
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
132
169
  }
133
170
 
134
171
  private render(): void {
135
- if (!this.props.variant) {
172
+ if (!this.#props.variant) {
136
173
  throw new Error('Button requires a variant to be defined');
137
174
  }
138
- if (this.props.variant === Variant.TOOLBAR) {
139
- if (!this.props.iconUrl) {
175
+ if (this.#props.variant === Variant.TOOLBAR) {
176
+ if (!this.#props.iconUrl) {
140
177
  throw new Error('Toolbar button requires an icon');
141
178
  }
142
- if (!this.isEmpty) {
179
+ if (!this.#isEmpty) {
143
180
  throw new Error('Tooblar button does not accept children');
144
181
  }
145
182
  }
146
183
  const classes = {
147
- primary: this.props.variant === Variant.PRIMARY,
148
- secondary: this.props.variant === Variant.SECONDARY,
149
- toolbar: this.props.variant === Variant.TOOLBAR,
150
- 'text-with-icon': Boolean(this.props.iconUrl) && !this.isEmpty,
151
- 'only-icon': Boolean(this.props.iconUrl) && this.isEmpty,
152
- small: Boolean(this.props.size === Size.SMALL),
153
- active: this.props.active,
184
+ primary: this.#props.variant === Variant.PRIMARY,
185
+ secondary: this.#props.variant === Variant.SECONDARY,
186
+ toolbar: this.#props.variant === Variant.TOOLBAR,
187
+ 'text-with-icon': Boolean(this.#props.iconUrl) && !this.#isEmpty,
188
+ 'only-icon': Boolean(this.#props.iconUrl) && this.#isEmpty,
189
+ small: Boolean(this.#props.size === Size.SMALL),
190
+ active: this.#props.active,
154
191
  };
155
192
  // clang-format off
156
193
  LitHtml.render(
157
194
  LitHtml.html`
158
- <button .disabled=${this.props.disabled} class=${LitHtml.Directives.classMap(classes)}>
159
- ${this.props.iconUrl ? LitHtml.html`<${IconButton.Icon.Icon.litTagName}
195
+ <button .disabled=${this.#props.disabled} class=${LitHtml.Directives.classMap(classes)}>
196
+ ${this.#props.iconUrl ? LitHtml.html`<${IconButton.Icon.Icon.litTagName}
160
197
  .data=${{
161
- iconPath: this.props.iconUrl,
198
+ iconPath: this.#props.iconUrl,
162
199
  color: 'var(--color-background)',
163
200
  } as IconButton.Icon.IconData}
164
201
  >
165
202
  </${IconButton.Icon.Icon.litTagName}>` : ''}
166
203
  <slot @slotchange=${this.onSlotChange}></slot>
167
204
  </button>
168
- `, this.shadow, {host: this});
205
+ `, this.#shadow, {host: this});
169
206
  // clang-format on
170
207
  }
208
+
209
+ // Based on https://web.dev/more-capable-form-controls/ to make custom elements form-friendly.
210
+ // Form controls usually expose a "value" property.
211
+ get value(): string {
212
+ return this.#props.value || '';
213
+ }
214
+ set value(value: string) {
215
+ this.#props.value = value;
216
+ }
217
+
218
+ // The following properties and methods aren't strictly required,
219
+ // but browser-level form controls provide them. Providing them helps
220
+ // ensure consistency with browser-provided controls.
221
+ get form(): HTMLFormElement|undefined {
222
+ return this.#internals.form;
223
+ }
224
+ get name(): string|null {
225
+ return this.getAttribute('name');
226
+ }
227
+ get type(): ButtonType {
228
+ return this.#props.type;
229
+ }
230
+ get validity(): ValidityState {
231
+ return this.#internals.validity;
232
+ }
233
+ get validationMessage(): string {
234
+ return this.#internals.validationMessage;
235
+ }
236
+ get willValidate(): boolean {
237
+ return this.#internals.willValidate;
238
+ }
239
+ checkValidity(): void {
240
+ return this.#internals.checkValidity();
241
+ }
242
+ reportValidity(): void {
243
+ return this.#internals.reportValidity();
244
+ }
171
245
  }
172
246
 
173
247
  ComponentHelpers.CustomElements.defineComponent('devtools-button', Button);