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
@@ -50,21 +50,21 @@ export class Wrapper extends UI.Widget.VBox {
50
50
 
51
51
  export class LinearMemoryInspectorPaneImpl extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
52
52
  UI.Widget.VBox) {
53
- private readonly tabbedPane: UI.TabbedPane.TabbedPane;
54
- private readonly tabIdToInspectorView: Map<string, LinearMemoryInspectorView>;
53
+ readonly #tabbedPane: UI.TabbedPane.TabbedPane;
54
+ readonly #tabIdToInspectorView: Map<string, LinearMemoryInspectorView>;
55
55
  constructor() {
56
56
  super(false);
57
57
  const placeholder = document.createElement('div');
58
58
  placeholder.textContent = i18nString(UIStrings.noOpenInspections);
59
59
  placeholder.style.display = 'flex';
60
- this.tabbedPane = new UI.TabbedPane.TabbedPane();
61
- this.tabbedPane.setPlaceholderElement(placeholder);
62
- this.tabbedPane.setCloseableTabs(true);
63
- this.tabbedPane.setAllowTabReorder(true, true);
64
- this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.tabClosed, this);
65
- this.tabbedPane.show(this.contentElement);
60
+ this.#tabbedPane = new UI.TabbedPane.TabbedPane();
61
+ this.#tabbedPane.setPlaceholderElement(placeholder);
62
+ this.#tabbedPane.setCloseableTabs(true);
63
+ this.#tabbedPane.setAllowTabReorder(true, true);
64
+ this.#tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.tabClosed, this);
65
+ this.#tabbedPane.show(this.contentElement);
66
66
 
67
- this.tabIdToInspectorView = new Map();
67
+ this.#tabIdToInspectorView = new Map();
68
68
  }
69
69
 
70
70
  static instance(): LinearMemoryInspectorPaneImpl {
@@ -76,17 +76,17 @@ export class LinearMemoryInspectorPaneImpl extends Common.ObjectWrapper.eventMix
76
76
 
77
77
  create(tabId: string, title: string, arrayWrapper: LazyUint8Array, address?: number): void {
78
78
  const inspectorView = new LinearMemoryInspectorView(arrayWrapper, address);
79
- this.tabIdToInspectorView.set(tabId, inspectorView);
80
- this.tabbedPane.appendTab(tabId, title, inspectorView, undefined, false, true);
81
- this.tabbedPane.selectTab(tabId);
79
+ this.#tabIdToInspectorView.set(tabId, inspectorView);
80
+ this.#tabbedPane.appendTab(tabId, title, inspectorView, undefined, false, true);
81
+ this.#tabbedPane.selectTab(tabId);
82
82
  }
83
83
 
84
84
  close(tabId: string): void {
85
- this.tabbedPane.closeTab(tabId, false);
85
+ this.#tabbedPane.closeTab(tabId, false);
86
86
  }
87
87
 
88
88
  reveal(tabId: string, address?: number): void {
89
- const view = this.tabIdToInspectorView.get(tabId);
89
+ const view = this.#tabIdToInspectorView.get(tabId);
90
90
  if (!view) {
91
91
  throw new Error(`No linear memory inspector view for given tab id: ${tabId}`);
92
92
  }
@@ -95,11 +95,11 @@ export class LinearMemoryInspectorPaneImpl extends Common.ObjectWrapper.eventMix
95
95
  view.updateAddress(address);
96
96
  }
97
97
  this.refreshView(tabId);
98
- this.tabbedPane.selectTab(tabId);
98
+ this.#tabbedPane.selectTab(tabId);
99
99
  }
100
100
 
101
101
  refreshView(tabId: string): void {
102
- const view = this.tabIdToInspectorView.get(tabId);
102
+ const view = this.#tabIdToInspectorView.get(tabId);
103
103
  if (!view) {
104
104
  throw new Error(`View for specified tab id does not exist: ${tabId}`);
105
105
  }
@@ -108,7 +108,7 @@ export class LinearMemoryInspectorPaneImpl extends Common.ObjectWrapper.eventMix
108
108
 
109
109
  private tabClosed(event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void {
110
110
  const {tabId} = event.data;
111
- this.tabIdToInspectorView.delete(tabId);
111
+ this.#tabIdToInspectorView.delete(tabId);
112
112
  this.dispatchEventToListeners(Events.ViewClosed, tabId);
113
113
  }
114
114
  }
@@ -122,9 +122,9 @@ export type EventTypes = {
122
122
  };
123
123
 
124
124
  class LinearMemoryInspectorView extends UI.Widget.VBox {
125
- private memoryWrapper: LazyUint8Array;
126
- private address: number;
127
- private inspector: LinearMemoryInspector;
125
+ #memoryWrapper: LazyUint8Array;
126
+ #address: number;
127
+ #inspector: LinearMemoryInspector;
128
128
  firstTimeOpen: boolean;
129
129
  constructor(memoryWrapper: LazyUint8Array, address: number|undefined = 0) {
130
130
  super(false);
@@ -133,21 +133,21 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
133
133
  throw new Error('Requested address is out of bounds.');
134
134
  }
135
135
 
136
- this.memoryWrapper = memoryWrapper;
137
- this.address = address;
138
- this.inspector = new LinearMemoryInspector();
139
- this.inspector.addEventListener('memoryrequest', (event: MemoryRequestEvent) => {
136
+ this.#memoryWrapper = memoryWrapper;
137
+ this.#address = address;
138
+ this.#inspector = new LinearMemoryInspector();
139
+ this.#inspector.addEventListener('memoryrequest', (event: MemoryRequestEvent) => {
140
140
  this.memoryRequested(event);
141
141
  });
142
- this.inspector.addEventListener('addresschanged', (event: AddressChangedEvent) => {
142
+ this.#inspector.addEventListener('addresschanged', (event: AddressChangedEvent) => {
143
143
  this.updateAddress(event.data);
144
144
  });
145
- this.inspector.addEventListener('settingschanged', (event: SettingsChangedEvent) => {
145
+ this.#inspector.addEventListener('settingschanged', (event: SettingsChangedEvent) => {
146
146
  // Stop event from bubbling up, since no element further up needs the event.
147
147
  event.stopPropagation();
148
148
  this.saveSettings(event.data);
149
149
  });
150
- this.contentElement.appendChild(this.inspector);
150
+ this.contentElement.appendChild(this.#inspector);
151
151
  this.firstTimeOpen = true;
152
152
  }
153
153
 
@@ -160,14 +160,14 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
160
160
  }
161
161
 
162
162
  updateAddress(address: number): void {
163
- if (address < 0 || address >= this.memoryWrapper.length()) {
163
+ if (address < 0 || address >= this.#memoryWrapper.length()) {
164
164
  throw new Error('Requested address is out of bounds.');
165
165
  }
166
- this.address = address;
166
+ this.#address = address;
167
167
  }
168
168
 
169
169
  refreshData(): void {
170
- LinearMemoryInspectorController.getMemoryForAddress(this.memoryWrapper, this.address).then(({memory, offset}) => {
170
+ LinearMemoryInspectorController.getMemoryForAddress(this.#memoryWrapper, this.#address).then(({memory, offset}) => {
171
171
  let valueTypes;
172
172
  let valueTypeModes;
173
173
  let endianness;
@@ -178,11 +178,11 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
178
178
  endianness = settings.endianness;
179
179
  this.firstTimeOpen = false;
180
180
  }
181
- this.inspector.data = {
181
+ this.#inspector.data = {
182
182
  memory,
183
- address: this.address,
183
+ address: this.#address,
184
184
  memoryOffset: offset,
185
- outerMemoryLength: this.memoryWrapper.length(),
185
+ outerMemoryLength: this.#memoryWrapper.length(),
186
186
  valueTypes,
187
187
  valueTypeModes,
188
188
  endianness,
@@ -196,12 +196,12 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
196
196
  throw new Error('Requested address is out of bounds.');
197
197
  }
198
198
 
199
- LinearMemoryInspectorController.getMemoryRange(this.memoryWrapper, start, end).then(memory => {
200
- this.inspector.data = {
199
+ LinearMemoryInspectorController.getMemoryRange(this.#memoryWrapper, start, end).then(memory => {
200
+ this.#inspector.data = {
201
201
  memory: memory,
202
202
  address: address,
203
203
  memoryOffset: start,
204
- outerMemoryLength: this.memoryWrapper.length(),
204
+ outerMemoryLength: this.#memoryWrapper.length(),
205
205
  };
206
206
  });
207
207
  }
@@ -98,26 +98,26 @@ export const enum Mode {
98
98
  export class LinearMemoryNavigator extends HTMLElement {
99
99
  static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-navigator`;
100
100
 
101
- private readonly shadow = this.attachShadow({mode: 'open'});
102
- private address = '0';
103
- private error: string|undefined = undefined;
104
- private valid = true;
105
- private canGoBackInHistory = false;
106
- private canGoForwardInHistory = false;
101
+ readonly #shadow = this.attachShadow({mode: 'open'});
102
+ #address = '0';
103
+ #error: string|undefined = undefined;
104
+ #valid = true;
105
+ #canGoBackInHistory = false;
106
+ #canGoForwardInHistory = false;
107
107
 
108
108
  connectedCallback(): void {
109
- this.shadow.adoptedStyleSheets = [linearMemoryNavigatorStyles];
109
+ this.#shadow.adoptedStyleSheets = [linearMemoryNavigatorStyles];
110
110
  }
111
111
 
112
112
  set data(data: LinearMemoryNavigatorData) {
113
- this.address = data.address;
114
- this.error = data.error;
115
- this.valid = data.valid;
116
- this.canGoBackInHistory = data.canGoBackInHistory;
117
- this.canGoForwardInHistory = data.canGoForwardInHistory;
113
+ this.#address = data.address;
114
+ this.#error = data.error;
115
+ this.#valid = data.valid;
116
+ this.#canGoBackInHistory = data.canGoBackInHistory;
117
+ this.#canGoForwardInHistory = data.canGoForwardInHistory;
118
118
  this.render();
119
119
 
120
- const addressInput = this.shadow.querySelector<HTMLInputElement>('.address-input');
120
+ const addressInput = this.#shadow.querySelector<HTMLInputElement>('.address-input');
121
121
  if (addressInput) {
122
122
  if (data.mode === Mode.Submitted) {
123
123
  addressInput.blur();
@@ -134,9 +134,9 @@ export class LinearMemoryNavigator extends HTMLElement {
134
134
  <div class="navigator">
135
135
  <div class="navigator-item">
136
136
  ${this.createButton({icon: 'ic_undo_16x16_icon', title: i18nString(UIStrings.goBackInAddressHistory),
137
- event: new HistoryNavigationEvent(Navigation.Backward), enabled: this.canGoBackInHistory})}
137
+ event: new HistoryNavigationEvent(Navigation.Backward), enabled: this.#canGoBackInHistory})}
138
138
  ${this.createButton({icon: 'ic_redo_16x16_icon', title: i18nString(UIStrings.goForwardInAddressHistory),
139
- event: new HistoryNavigationEvent(Navigation.Forward), enabled: this.canGoForwardInHistory})}
139
+ event: new HistoryNavigationEvent(Navigation.Forward), enabled: this.#canGoForwardInHistory})}
140
140
  </div>
141
141
  <div class="navigator-item">
142
142
  ${this.createButton({icon: 'ic_page_prev_16x16_icon', title: i18nString(UIStrings.previousPage),
@@ -149,18 +149,18 @@ export class LinearMemoryNavigator extends HTMLElement {
149
149
  event: new RefreshRequestedEvent(), enabled: true})}
150
150
  </div>
151
151
  `;
152
- render(result, this.shadow, {host: this});
152
+ render(result, this.#shadow, {host: this});
153
153
  // clang-format on
154
154
  }
155
155
 
156
156
  private createAddressInput(): LitHtml.TemplateResult {
157
157
  const classMap = {
158
158
  'address-input': true,
159
- invalid: !this.valid,
159
+ invalid: !this.#valid,
160
160
  };
161
161
  return html`
162
- <input class=${LitHtml.Directives.classMap(classMap)} data-input="true" .value=${this.address}
163
- title=${this.valid ? i18nString(UIStrings.enterAddress) : this.error} @change=${
162
+ <input class=${LitHtml.Directives.classMap(classMap)} data-input="true" .value=${this.#address}
163
+ title=${this.#valid ? i18nString(UIStrings.enterAddress) : this.#error} @change=${
164
164
  this.onAddressChange.bind(this, Mode.Submitted)} @input=${this.onAddressChange.bind(this, Mode.Edit)}/>`;
165
165
  }
166
166
 
@@ -66,31 +66,31 @@ export interface LinearMemoryValueInterpreterData {
66
66
  export class LinearMemoryValueInterpreter extends HTMLElement {
67
67
  static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-interpreter`;
68
68
 
69
- private readonly shadow = this.attachShadow({mode: 'open'});
70
- private endianness = Endianness.Little;
71
- private buffer = new ArrayBuffer(0);
72
- private valueTypes: Set<ValueType> = new Set();
73
- private valueTypeModeConfig: Map<ValueType, ValueTypeMode> = new Map();
74
- private memoryLength = 0;
75
- private showSettings = false;
69
+ readonly #shadow = this.attachShadow({mode: 'open'});
70
+ #endianness = Endianness.Little;
71
+ #buffer = new ArrayBuffer(0);
72
+ #valueTypes: Set<ValueType> = new Set();
73
+ #valueTypeModeConfig: Map<ValueType, ValueTypeMode> = new Map();
74
+ #memoryLength = 0;
75
+ #showSettings = false;
76
76
 
77
77
  constructor() {
78
78
  super();
79
- this.shadow.adoptedStyleSheets = [
79
+ this.#shadow.adoptedStyleSheets = [
80
80
  inspectorCommonStyles,
81
81
  ];
82
82
  }
83
83
 
84
84
  connectedCallback(): void {
85
- this.shadow.adoptedStyleSheets = [linearMemoryValueInterpreterStyles];
85
+ this.#shadow.adoptedStyleSheets = [linearMemoryValueInterpreterStyles];
86
86
  }
87
87
 
88
88
  set data(data: LinearMemoryValueInterpreterData) {
89
- this.endianness = data.endianness;
90
- this.buffer = data.value;
91
- this.valueTypes = data.valueTypes;
92
- this.valueTypeModeConfig = data.valueTypeModes || new Map();
93
- this.memoryLength = data.memoryLength;
89
+ this.#endianness = data.endianness;
90
+ this.#buffer = data.value;
91
+ this.#valueTypes = data.valueTypes;
92
+ this.#valueTypeModeConfig = data.valueTypeModes || new Map();
93
+ this.#memoryLength = data.memoryLength;
94
94
  this.render();
95
95
  }
96
96
 
@@ -101,7 +101,7 @@ export class LinearMemoryValueInterpreter extends HTMLElement {
101
101
  <div class="value-interpreter">
102
102
  <div class="settings-toolbar">
103
103
  ${this.renderEndiannessSetting()}
104
- <button data-settings="true" class="settings-toolbar-button ${this.showSettings ? 'active' : ''}" title=${i18nString(UIStrings.toggleValueTypeSettings)} @click=${this.onSettingsToggle}>
104
+ <button data-settings="true" class="settings-toolbar-button ${this.#showSettings ? 'active' : ''}" title=${i18nString(UIStrings.toggleValueTypeSettings)} @click=${this.onSettingsToggle}>
105
105
  <${IconButton.Icon.Icon.litTagName}
106
106
  .data=${{ iconName: 'settings_14x14_icon', color: 'var(--color-text-secondary)', width: '14px' } as IconButton.Icon.IconWithName}>
107
107
  </${IconButton.Icon.Icon.litTagName}>
@@ -109,26 +109,26 @@ export class LinearMemoryValueInterpreter extends HTMLElement {
109
109
  </div>
110
110
  <span class="divider"></span>
111
111
  <div>
112
- ${this.showSettings ?
112
+ ${this.#showSettings ?
113
113
  html`
114
114
  <${ValueInterpreterSettings.litTagName}
115
- .data=${{ valueTypes: this.valueTypes } as ValueInterpreterSettingsData}
115
+ .data=${{ valueTypes: this.#valueTypes } as ValueInterpreterSettingsData}
116
116
  @typetoggle=${this.onTypeToggle}>
117
117
  </${ValueInterpreterSettings.litTagName}>` :
118
118
  html`
119
119
  <${ValueInterpreterDisplay.litTagName}
120
120
  .data=${{
121
- buffer: this.buffer,
122
- valueTypes: this.valueTypes,
123
- endianness: this.endianness,
124
- valueTypeModes: this.valueTypeModeConfig,
125
- memoryLength: this.memoryLength,
121
+ buffer: this.#buffer,
122
+ valueTypes: this.#valueTypes,
123
+ endianness: this.#endianness,
124
+ valueTypeModes: this.#valueTypeModeConfig,
125
+ memoryLength: this.#memoryLength,
126
126
  } as ValueDisplayData}>
127
127
  </${ValueInterpreterDisplay.litTagName}>`}
128
128
  </div>
129
129
  </div>
130
130
  `,
131
- this.shadow, { host: this },
131
+ this.#shadow, { host: this },
132
132
  );
133
133
  // clang-format on
134
134
  }
@@ -150,7 +150,7 @@ export class LinearMemoryValueInterpreter extends HTMLElement {
150
150
  style="border: none; background-color: transparent; cursor: pointer;"
151
151
  data-endianness="true" @change=${onEnumSettingChange}>
152
152
  ${[Endianness.Little, Endianness.Big].map(endianness => {
153
- return html`<option value=${endianness} .selected=${this.endianness === endianness}>${
153
+ return html`<option value=${endianness} .selected=${this.#endianness === endianness}>${
154
154
  i18n.i18n.lockedString(endianness)}</option>`;
155
155
  })}
156
156
  </select>
@@ -160,7 +160,7 @@ export class LinearMemoryValueInterpreter extends HTMLElement {
160
160
  }
161
161
 
162
162
  private onSettingsToggle(): void {
163
- this.showSettings = !this.showSettings;
163
+ this.#showSettings = !this.#showSettings;
164
164
  this.render();
165
165
  }
166
166
 
@@ -40,21 +40,21 @@ export class LinearMemoryViewer extends HTMLElement {
40
40
 
41
41
  private static readonly BYTE_GROUP_MARGIN = 8;
42
42
  private static readonly BYTE_GROUP_SIZE = 4;
43
- private readonly shadow = this.attachShadow({mode: 'open'});
43
+ readonly #shadow = this.attachShadow({mode: 'open'});
44
44
 
45
- private readonly resizeObserver = new ResizeObserver(() => this.resize());
46
- private isObservingResize = false;
45
+ readonly #resizeObserver = new ResizeObserver(() => this.resize());
46
+ #isObservingResize = false;
47
47
 
48
- private memory = new Uint8Array();
49
- private address = 0;
50
- private memoryOffset = 0;
48
+ #memory = new Uint8Array();
49
+ #address = 0;
50
+ #memoryOffset = 0;
51
51
 
52
- private numRows = 1;
53
- private numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
52
+ #numRows = 1;
53
+ #numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
54
54
 
55
- private focusOnByte = true;
55
+ #focusOnByte = true;
56
56
 
57
- private lastKeyUpdateSent: number|undefined = undefined;
57
+ #lastKeyUpdateSent: number|undefined = undefined;
58
58
 
59
59
  set data(data: LinearMemoryViewerData) {
60
60
  if (data.address < data.memoryOffset || data.address > data.memoryOffset + data.memory.length || data.address < 0) {
@@ -65,21 +65,21 @@ export class LinearMemoryViewer extends HTMLElement {
65
65
  throw new Error('Memory offset has to be greater or equal to zero.');
66
66
  }
67
67
 
68
- this.memory = data.memory;
69
- this.address = data.address;
70
- this.memoryOffset = data.memoryOffset;
71
- this.focusOnByte = data.focus;
68
+ this.#memory = data.memory;
69
+ this.#address = data.address;
70
+ this.#memoryOffset = data.memoryOffset;
71
+ this.#focusOnByte = data.focus;
72
72
  this.update();
73
73
  }
74
74
 
75
75
  connectedCallback(): void {
76
76
  ComponentHelpers.SetCSSProperty.set(this, '--byte-group-margin', `${LinearMemoryViewer.BYTE_GROUP_MARGIN}px`);
77
- this.shadow.adoptedStyleSheets = [linearMemoryViewerStyles];
77
+ this.#shadow.adoptedStyleSheets = [linearMemoryViewerStyles];
78
78
  }
79
79
 
80
80
  disconnectedCallback(): void {
81
- this.isObservingResize = false;
82
- this.resizeObserver.disconnect();
81
+ this.#isObservingResize = false;
82
+ this.#resizeObserver.disconnect();
83
83
  }
84
84
 
85
85
  private update(): void {
@@ -90,8 +90,8 @@ export class LinearMemoryViewer extends HTMLElement {
90
90
  }
91
91
 
92
92
  private focusOnView(): void {
93
- if (this.focusOnByte) {
94
- const view = this.shadow.querySelector<HTMLDivElement>('.view');
93
+ if (this.#focusOnByte) {
94
+ const view = this.#shadow.querySelector<HTMLDivElement>('.view');
95
95
  if (view) {
96
96
  view.focus();
97
97
  }
@@ -100,14 +100,14 @@ export class LinearMemoryViewer extends HTMLElement {
100
100
 
101
101
  private resize(): void {
102
102
  this.update();
103
- this.dispatchEvent(new ResizeEvent(this.numBytesInRow * this.numRows));
103
+ this.dispatchEvent(new ResizeEvent(this.#numBytesInRow * this.#numRows));
104
104
  }
105
105
 
106
106
  /** Recomputes the number of rows and (byte) columns that fit into the current view. */
107
107
  private updateDimensions(): void {
108
108
  if (this.clientWidth === 0 || this.clientHeight === 0 || !this.shadowRoot) {
109
- this.numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
110
- this.numRows = 1;
109
+ this.#numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
110
+ this.#numRows = 1;
111
111
  return;
112
112
  }
113
113
 
@@ -126,8 +126,8 @@ export class LinearMemoryViewer extends HTMLElement {
126
126
  const rowElement = this.shadowRoot.querySelector('.row');
127
127
 
128
128
  if (!firstByteCell || !textCell || !divider || !rowElement) {
129
- this.numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
130
- this.numRows = 1;
129
+ this.#numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
130
+ this.#numRows = 1;
131
131
  return;
132
132
  }
133
133
 
@@ -144,22 +144,22 @@ export class LinearMemoryViewer extends HTMLElement {
144
144
  const widthToFill = this.clientWidth - 1 -
145
145
  (firstByteCell.getBoundingClientRect().left - this.getBoundingClientRect().left) - dividerWidth;
146
146
  if (widthToFill < groupWidth) {
147
- this.numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
148
- this.numRows = 1;
147
+ this.#numBytesInRow = LinearMemoryViewer.BYTE_GROUP_SIZE;
148
+ this.#numRows = 1;
149
149
  return;
150
150
  }
151
151
 
152
- this.numBytesInRow = Math.floor(widthToFill / groupWidth) * LinearMemoryViewer.BYTE_GROUP_SIZE;
153
- this.numRows = Math.floor(this.clientHeight / rowElement.clientHeight);
152
+ this.#numBytesInRow = Math.floor(widthToFill / groupWidth) * LinearMemoryViewer.BYTE_GROUP_SIZE;
153
+ this.#numRows = Math.floor(this.clientHeight / rowElement.clientHeight);
154
154
  }
155
155
 
156
156
  private engageResizeObserver(): void {
157
- if (!this.resizeObserver || this.isObservingResize) {
157
+ if (!this.#resizeObserver || this.#isObservingResize) {
158
158
  return;
159
159
  }
160
160
 
161
- this.resizeObserver.observe(this);
162
- this.isObservingResize = true;
161
+ this.#resizeObserver.observe(this);
162
+ this.#isObservingResize = true;
163
163
  }
164
164
 
165
165
  private render(): void {
@@ -169,50 +169,50 @@ export class LinearMemoryViewer extends HTMLElement {
169
169
  <div class="view" tabindex="0" @keydown=${this.onKeyDown}>
170
170
  ${this.renderView()}
171
171
  </div>
172
- `, this.shadow, {host: this});
172
+ `, this.#shadow, {host: this});
173
173
  }
174
174
 
175
175
  private onKeyDown(event: Event): void {
176
176
  const keyboardEvent = event as KeyboardEvent;
177
177
  let newAddress = undefined;
178
178
  if (keyboardEvent.code === 'ArrowUp') {
179
- newAddress = this.address - this.numBytesInRow;
179
+ newAddress = this.#address - this.#numBytesInRow;
180
180
  } else if (keyboardEvent.code === 'ArrowDown') {
181
- newAddress = this.address + this.numBytesInRow;
181
+ newAddress = this.#address + this.#numBytesInRow;
182
182
  } else if (keyboardEvent.code === 'ArrowLeft') {
183
- newAddress = this.address - 1;
183
+ newAddress = this.#address - 1;
184
184
  } else if (keyboardEvent.code === 'ArrowRight') {
185
- newAddress = this.address + 1;
185
+ newAddress = this.#address + 1;
186
186
  } else if (keyboardEvent.code === 'PageUp') {
187
- newAddress = this.address - this.numBytesInRow * this.numRows;
187
+ newAddress = this.#address - this.#numBytesInRow * this.#numRows;
188
188
  } else if (keyboardEvent.code === 'PageDown') {
189
- newAddress = this.address + this.numBytesInRow * this.numRows;
189
+ newAddress = this.#address + this.#numBytesInRow * this.#numRows;
190
190
  }
191
191
 
192
- if (newAddress !== undefined && newAddress !== this.lastKeyUpdateSent) {
193
- this.lastKeyUpdateSent = newAddress;
192
+ if (newAddress !== undefined && newAddress !== this.#lastKeyUpdateSent) {
193
+ this.#lastKeyUpdateSent = newAddress;
194
194
  this.dispatchEvent(new ByteSelectedEvent(newAddress));
195
195
  }
196
196
  }
197
197
 
198
198
  private renderView(): LitHtml.TemplateResult {
199
199
  const itemTemplates = [];
200
- for (let i = 0; i < this.numRows; ++i) {
200
+ for (let i = 0; i < this.#numRows; ++i) {
201
201
  itemTemplates.push(this.renderRow(i));
202
202
  }
203
203
  return html`${itemTemplates}`;
204
204
  }
205
205
 
206
206
  private renderRow(row: number): LitHtml.TemplateResult {
207
- const {startIndex, endIndex} = {startIndex: row * this.numBytesInRow, endIndex: (row + 1) * this.numBytesInRow};
207
+ const {startIndex, endIndex} = {startIndex: row * this.#numBytesInRow, endIndex: (row + 1) * this.#numBytesInRow};
208
208
 
209
209
  const classMap = {
210
210
  address: true,
211
- selected: Math.floor((this.address - this.memoryOffset) / this.numBytesInRow) === row,
211
+ selected: Math.floor((this.#address - this.#memoryOffset) / this.#numBytesInRow) === row,
212
212
  };
213
213
  return html`
214
214
  <div class="row">
215
- <span class="${LitHtml.Directives.classMap(classMap)}">${toHexString({number: startIndex + this.memoryOffset, pad: 8, prefix: false})}</span>
215
+ <span class="${LitHtml.Directives.classMap(classMap)}">${toHexString({number: startIndex + this.#memoryOffset, pad: 8, prefix: false})}</span>
216
216
  <span class="divider"></span>
217
217
  ${this.renderByteValues(startIndex, endIndex)}
218
218
  <span class="divider"></span>
@@ -226,16 +226,16 @@ export class LinearMemoryViewer extends HTMLElement {
226
226
  for (let i = startIndex; i < endIndex; ++i) {
227
227
  // Add margin after each group of bytes of size byteGroupSize.
228
228
  const addMargin = i !== startIndex && (i - startIndex) % LinearMemoryViewer.BYTE_GROUP_SIZE === 0;
229
- const selected = i === this.address - this.memoryOffset;
229
+ const selected = i === this.#address - this.#memoryOffset;
230
230
  const classMap = {
231
231
  'cell': true,
232
232
  'byte-cell': true,
233
233
  'byte-group-margin': addMargin,
234
234
  selected,
235
235
  };
236
- const isSelectableCell = i < this.memory.length;
237
- const byteValue = isSelectableCell ? html`${toHexString({number: this.memory[i], pad: 2, prefix: false})}` : '';
238
- const actualIndex = i + this.memoryOffset;
236
+ const isSelectableCell = i < this.#memory.length;
237
+ const byteValue = isSelectableCell ? html`${toHexString({number: this.#memory[i], pad: 2, prefix: false})}` : '';
238
+ const actualIndex = i + this.#memoryOffset;
239
239
  const onSelectedByte = isSelectableCell ? this.onSelectedByte.bind(this, actualIndex) : '';
240
240
  cells.push(html`<span class="${LitHtml.Directives.classMap(classMap)}" @click=${onSelectedByte}>${byteValue}</span>`);
241
241
  }
@@ -248,11 +248,11 @@ export class LinearMemoryViewer extends HTMLElement {
248
248
  const classMap = {
249
249
  'cell': true,
250
250
  'text-cell': true,
251
- selected: this.address - this.memoryOffset === i,
251
+ selected: this.#address - this.#memoryOffset === i,
252
252
  };
253
- const isSelectableCell = i < this.memory.length;
254
- const value = isSelectableCell ? html`${this.toAscii(this.memory[i])}` : '';
255
- const onSelectedByte = isSelectableCell ? this.onSelectedByte.bind(this, i + this.memoryOffset) : '';
253
+ const isSelectableCell = i < this.#memory.length;
254
+ const value = isSelectableCell ? html`${this.toAscii(this.#memory[i])}` : '';
255
+ const onSelectedByte = isSelectableCell ? this.onSelectedByte.bind(this, i + this.#memoryOffset) : '';
256
256
  cells.push(html`<span class="${LitHtml.Directives.classMap(classMap)}" @click=${onSelectedByte}>${value}</span>`);
257
257
  }
258
258
  return html`${cells}`;