chrome-devtools-frontend 1.0.943182 → 1.0.944903

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 (382) hide show
  1. package/config/gni/devtools_grd_files.gni +3 -0
  2. package/front_end/core/common/ParsedURL.ts +1 -1
  3. package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -5
  4. package/front_end/core/host/UserMetrics.ts +0 -1
  5. package/front_end/core/i18n/locales/af.json +455 -44
  6. package/front_end/core/i18n/locales/am.json +455 -44
  7. package/front_end/core/i18n/locales/ar.json +455 -44
  8. package/front_end/core/i18n/locales/as.json +455 -44
  9. package/front_end/core/i18n/locales/az.json +455 -44
  10. package/front_end/core/i18n/locales/be.json +456 -45
  11. package/front_end/core/i18n/locales/bg.json +455 -44
  12. package/front_end/core/i18n/locales/bn.json +455 -44
  13. package/front_end/core/i18n/locales/bs.json +455 -44
  14. package/front_end/core/i18n/locales/ca.json +457 -46
  15. package/front_end/core/i18n/locales/cs.json +458 -47
  16. package/front_end/core/i18n/locales/cy.json +455 -44
  17. package/front_end/core/i18n/locales/da.json +455 -44
  18. package/front_end/core/i18n/locales/de.json +455 -44
  19. package/front_end/core/i18n/locales/el.json +455 -44
  20. package/front_end/core/i18n/locales/en-GB.json +449 -38
  21. package/front_end/core/i18n/locales/en-US.json +10 -34
  22. package/front_end/core/i18n/locales/en-XL.json +22 -46
  23. package/front_end/core/i18n/locales/es-419.json +455 -44
  24. package/front_end/core/i18n/locales/es.json +455 -44
  25. package/front_end/core/i18n/locales/et.json +455 -44
  26. package/front_end/core/i18n/locales/eu.json +462 -51
  27. package/front_end/core/i18n/locales/fa.json +455 -44
  28. package/front_end/core/i18n/locales/fi.json +455 -44
  29. package/front_end/core/i18n/locales/fil.json +454 -43
  30. package/front_end/core/i18n/locales/fr-CA.json +455 -44
  31. package/front_end/core/i18n/locales/fr.json +456 -45
  32. package/front_end/core/i18n/locales/gl.json +455 -44
  33. package/front_end/core/i18n/locales/gu.json +456 -45
  34. package/front_end/core/i18n/locales/he.json +455 -44
  35. package/front_end/core/i18n/locales/hi.json +455 -44
  36. package/front_end/core/i18n/locales/hr.json +455 -44
  37. package/front_end/core/i18n/locales/hu.json +455 -44
  38. package/front_end/core/i18n/locales/hy.json +455 -44
  39. package/front_end/core/i18n/locales/id.json +455 -44
  40. package/front_end/core/i18n/locales/is.json +455 -44
  41. package/front_end/core/i18n/locales/it.json +502 -91
  42. package/front_end/core/i18n/locales/ja.json +456 -45
  43. package/front_end/core/i18n/locales/ka.json +455 -44
  44. package/front_end/core/i18n/locales/kk.json +456 -45
  45. package/front_end/core/i18n/locales/km.json +455 -44
  46. package/front_end/core/i18n/locales/kn.json +455 -44
  47. package/front_end/core/i18n/locales/ko.json +455 -44
  48. package/front_end/core/i18n/locales/ky.json +456 -45
  49. package/front_end/core/i18n/locales/lo.json +454 -43
  50. package/front_end/core/i18n/locales/lt.json +455 -44
  51. package/front_end/core/i18n/locales/lv.json +458 -47
  52. package/front_end/core/i18n/locales/mk.json +455 -44
  53. package/front_end/core/i18n/locales/ml.json +461 -50
  54. package/front_end/core/i18n/locales/mn.json +455 -44
  55. package/front_end/core/i18n/locales/mr.json +455 -44
  56. package/front_end/core/i18n/locales/ms.json +455 -44
  57. package/front_end/core/i18n/locales/my.json +456 -45
  58. package/front_end/core/i18n/locales/ne.json +456 -45
  59. package/front_end/core/i18n/locales/nl.json +532 -121
  60. package/front_end/core/i18n/locales/no.json +455 -44
  61. package/front_end/core/i18n/locales/or.json +455 -44
  62. package/front_end/core/i18n/locales/pa.json +455 -44
  63. package/front_end/core/i18n/locales/pl.json +455 -44
  64. package/front_end/core/i18n/locales/pt-PT.json +504 -93
  65. package/front_end/core/i18n/locales/pt.json +454 -43
  66. package/front_end/core/i18n/locales/ro.json +455 -44
  67. package/front_end/core/i18n/locales/ru.json +455 -44
  68. package/front_end/core/i18n/locales/si.json +455 -44
  69. package/front_end/core/i18n/locales/sk.json +456 -45
  70. package/front_end/core/i18n/locales/sl.json +455 -44
  71. package/front_end/core/i18n/locales/sq.json +455 -44
  72. package/front_end/core/i18n/locales/sr-Latn.json +455 -44
  73. package/front_end/core/i18n/locales/sr.json +455 -44
  74. package/front_end/core/i18n/locales/sv.json +456 -45
  75. package/front_end/core/i18n/locales/sw.json +455 -44
  76. package/front_end/core/i18n/locales/ta.json +456 -45
  77. package/front_end/core/i18n/locales/te.json +454 -43
  78. package/front_end/core/i18n/locales/th.json +455 -44
  79. package/front_end/core/i18n/locales/tr.json +455 -44
  80. package/front_end/core/i18n/locales/uk.json +455 -44
  81. package/front_end/core/i18n/locales/ur.json +455 -44
  82. package/front_end/core/i18n/locales/uz.json +455 -44
  83. package/front_end/core/i18n/locales/vi.json +455 -44
  84. package/front_end/core/i18n/locales/zh-HK.json +459 -48
  85. package/front_end/core/i18n/locales/zh-TW.json +457 -46
  86. package/front_end/core/i18n/locales/zh.json +460 -49
  87. package/front_end/core/i18n/locales/zu.json +455 -44
  88. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  89. package/front_end/core/protocol_client/NodeURL.ts +1 -0
  90. package/front_end/core/sdk/AccessibilityModel.ts +99 -78
  91. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
  92. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
  93. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  94. package/front_end/core/sdk/Cookie.ts +17 -0
  95. package/front_end/core/sdk/CookieModel.ts +1 -0
  96. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  97. package/front_end/core/sdk/NetworkManager.ts +6 -0
  98. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  99. package/front_end/core/sdk/OverlayModel.ts +0 -9
  100. package/front_end/core/sdk/Resource.ts +2 -2
  101. package/front_end/core/sdk/Script.ts +2 -7
  102. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +13 -12
  103. package/front_end/core/sdk/sdk-meta.ts +0 -26
  104. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
  105. package/front_end/entrypoints/main/MainImpl.ts +2 -4
  106. package/front_end/generated/InspectorBackendCommands.js +3 -1
  107. package/front_end/generated/protocol-mapping.d.ts +1 -0
  108. package/front_end/generated/protocol-proxy-api.d.ts +2 -0
  109. package/front_end/generated/protocol.d.ts +40 -0
  110. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  111. package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
  112. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  113. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
  114. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  115. package/front_end/models/formatter/SourceFormatter.ts +0 -15
  116. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  117. package/front_end/models/persistence/IsolatedFileSystemManager.ts +10 -6
  118. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  119. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  120. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  121. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  122. package/front_end/models/timeline_model/TimelineJSProfile.ts +3 -16
  123. package/front_end/models/timeline_model/TimelineModel.ts +0 -1
  124. package/front_end/models/workspace/UISourceCode.ts +2 -2
  125. package/front_end/panels/animation/animationTimeline.css +2 -0
  126. package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
  127. package/front_end/panels/application/BackForwardCacheView.ts +26 -26
  128. package/front_end/panels/application/ReportingApiView.ts +15 -1
  129. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  130. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  131. package/front_end/panels/console/ConsolePinPane.ts +1 -0
  132. package/front_end/panels/console/ConsolePrompt.ts +121 -171
  133. package/front_end/panels/console/ConsoleView.ts +1 -1
  134. package/front_end/panels/console/consoleView.css +1 -1
  135. package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
  136. package/front_end/panels/elements/AccessibilityTreeUtils.ts +98 -67
  137. package/front_end/panels/elements/AccessibilityTreeView.ts +76 -125
  138. package/front_end/panels/elements/ElementsPanel.ts +6 -7
  139. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  140. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  141. package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
  142. package/front_end/panels/elements/StylePropertyTreeElement.ts +7 -4
  143. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  144. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
  145. package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
  146. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  147. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  148. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  149. package/front_end/panels/sources/NavigatorView.ts +1 -1
  150. package/front_end/panels/sources/Plugin.ts +0 -3
  151. package/front_end/panels/sources/UISourceCodeFrame.ts +23 -50
  152. package/front_end/panels/timeline/TimelineController.ts +0 -3
  153. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  154. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  155. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  156. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  157. package/front_end/third_party/codemirror.next/bundle.ts +4 -3
  158. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  159. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +39 -1
  160. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  161. package/front_end/third_party/codemirror.next/package.json +3 -3
  162. package/front_end/third_party/lit-html/README.chromium +2 -2
  163. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  164. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  165. package/front_end/third_party/lit-html/package/README.md +12 -162
  166. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  167. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  168. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  169. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  170. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  171. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  172. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  173. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  174. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  175. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  176. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  177. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  178. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  179. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  180. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  181. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  182. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  183. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  184. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  185. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  186. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  187. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  188. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  189. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  190. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  191. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  192. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  193. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  194. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  195. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  196. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  197. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  198. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  199. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  200. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  201. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  202. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  203. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  204. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  205. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  206. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  207. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  208. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  209. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  210. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  211. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  212. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  213. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  214. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  215. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  216. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  217. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  218. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  219. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  220. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  221. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  222. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  223. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  224. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  225. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  226. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  227. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  228. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  229. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  230. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  231. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  232. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  233. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  234. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  235. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  236. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  237. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  238. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  239. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  240. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  241. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  242. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  243. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  244. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  245. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  246. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  247. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  248. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  249. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  250. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  251. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  252. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  253. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  254. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  255. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  256. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  257. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  258. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  259. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  260. package/front_end/third_party/lit-html/package/directive.js +1 -1
  261. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  262. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  263. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  264. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  265. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  266. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  267. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  268. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  269. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  270. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  271. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  272. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  273. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  274. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  275. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  276. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  277. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  278. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  279. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  280. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  281. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  282. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  283. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  284. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  285. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  286. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  287. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  288. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  289. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  290. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  291. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  292. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  293. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  294. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  295. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  296. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  297. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  298. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  299. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  300. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  301. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  302. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  303. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  304. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  305. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  306. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  307. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  308. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  309. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  310. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  311. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  312. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  313. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  314. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  315. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  316. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  317. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  318. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  319. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  320. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  321. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  322. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  323. package/front_end/third_party/lit-html/package/package.json +75 -24
  324. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  325. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  326. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  327. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  328. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  329. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  330. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  331. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  332. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  333. package/front_end/third_party/lit-html/package/static.js +1 -1
  334. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  335. package/front_end/third_party/marked/README.chromium +2 -2
  336. package/front_end/third_party/marked/marked.ts +2 -2
  337. package/front_end/third_party/marked/package/README.md +7 -1
  338. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  339. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  340. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  341. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  342. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  343. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  344. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  345. package/front_end/third_party/marked/package/marked.min.js +1 -1
  346. package/front_end/third_party/marked/package/package.json +41 -32
  347. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  348. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  349. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  350. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  351. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  352. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  353. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  354. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  355. package/front_end/third_party/marked/package/src/marked.js +146 -63
  356. package/front_end/third_party/marked/package/src/rules.js +20 -45
  357. package/front_end/third_party/wasmparser/README.chromium +2 -2
  358. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  359. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  360. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  361. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  362. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  363. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  364. package/front_end/third_party/wasmparser/package/package.json +1 -1
  365. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  366. package/front_end/ui/components/text_editor/TextEditor.ts +29 -0
  367. package/front_end/ui/components/text_editor/config.ts +36 -14
  368. package/front_end/ui/components/text_editor/javascript.ts +14 -9
  369. package/front_end/ui/components/text_editor/theme.ts +29 -4
  370. package/front_end/ui/components/tree_outline/TreeOutline.ts +8 -0
  371. package/front_end/ui/legacy/Dialog.ts +8 -3
  372. package/front_end/ui/legacy/ViewManager.ts +6 -0
  373. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  374. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +6 -4
  375. package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
  376. package/front_end/ui/legacy/themeColors.css +2 -0
  377. package/inspector_overlay/css_grid_label_helpers.ts +1 -1
  378. package/inspector_overlay/highlight_common.ts +1 -1
  379. package/inspector_overlay/tool_highlight.ts +1 -1
  380. package/package.json +1 -1
  381. package/scripts/eslint_rules/lib/es_modules_import.js +0 -16
  382. package/scripts/eslint_rules/tests/es_modules_import_test.js +0 -16
@@ -3,16 +3,34 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- var _a, _b, _c, _d, _e;
7
- var _f;
6
+ var _a, _b, _c, _d;
8
7
  const DEV_MODE = true;
9
8
  const ENABLE_EXTRA_SECURITY_HOOKS = true;
10
9
  const ENABLE_SHADYDOM_NOPATCH = true;
10
+ /**
11
+ * `true` if we're building for google3 with temporary back-compat helpers.
12
+ * This export is not present in prod builds.
13
+ * @internal
14
+ */
15
+ export const INTERNAL = true;
16
+ let issueWarning;
11
17
  if (DEV_MODE) {
12
- console.warn('lit-html is in dev mode. Not recommended for production!');
18
+ (_a = globalThis.litIssuedWarnings) !== null && _a !== void 0 ? _a : (globalThis.litIssuedWarnings = new Set());
19
+ // Issue a warning, if we haven't already.
20
+ issueWarning = (code, warning) => {
21
+ warning += code
22
+ ? ` See https://lit.dev/msg/${code} for more information.`
23
+ : '';
24
+ if (!globalThis.litIssuedWarnings.has(warning)) {
25
+ console.warn(warning);
26
+ globalThis.litIssuedWarnings.add(warning);
27
+ }
28
+ };
29
+ issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);
13
30
  }
14
- const wrap = ENABLE_SHADYDOM_NOPATCH && ((_a = window.ShadyDOM) === null || _a === void 0 ? void 0 : _a.inUse) &&
15
- ((_b = window.ShadyDOM) === null || _b === void 0 ? void 0 : _b.noPatch) === true
31
+ const wrap = ENABLE_SHADYDOM_NOPATCH &&
32
+ ((_b = window.ShadyDOM) === null || _b === void 0 ? void 0 : _b.inUse) &&
33
+ ((_c = window.ShadyDOM) === null || _c === void 0 ? void 0 : _c.noPatch) === true
16
34
  ? window.ShadyDOM.wrap
17
35
  : (node) => node;
18
36
  const trustedTypes = globalThis.trustedTypes;
@@ -152,14 +170,33 @@ const COMMENT_PART = 7;
152
170
  * Generates a template literal tag function that returns a TemplateResult with
153
171
  * the given result type.
154
172
  */
155
- const tag = (_$litType$) => (strings, ...values) => ({
156
- _$litType$,
157
- strings,
158
- values,
159
- });
173
+ const tag = (type) => (strings, ...values) => {
174
+ // Warn against templates octal escape sequences
175
+ // We do this here rather than in render so that the warning is closer to the
176
+ // template definition.
177
+ if (DEV_MODE && strings.some((s) => s === undefined)) {
178
+ console.warn('Some template strings are undefined.\n' +
179
+ 'This is probably caused by illegal octal escape sequences.');
180
+ }
181
+ return {
182
+ // This property needs to remain unminified.
183
+ ['_$litType$']: type,
184
+ strings,
185
+ values,
186
+ };
187
+ };
160
188
  /**
161
189
  * Interprets a template literal as an HTML template that can efficiently
162
190
  * render to and update a container.
191
+ *
192
+ * ```ts
193
+ * const header = (title: string) => html`<h1>${title}</h1>`;
194
+ * ```
195
+ *
196
+ * The `html` tag returns a description of the DOM to render as a value. It is
197
+ * lazy, meaning no work is done until the template is rendered. When rendering,
198
+ * if a template comes from the same expression as a previously rendered result,
199
+ * it's efficiently updated instead of replaced.
163
200
  */
164
201
  export const html = tag(HTML_RESULT);
165
202
  /**
@@ -174,6 +211,22 @@ export const svg = tag(SVG_RESULT);
174
211
  export const noChange = Symbol.for('lit-noChange');
175
212
  /**
176
213
  * A sentinel value that signals a ChildPart to fully clear its content.
214
+ *
215
+ * ```ts
216
+ * const button = html`${
217
+ * user.isAdmin
218
+ * ? html`<button>DELETE</button>`
219
+ * : nothing
220
+ * }`;
221
+ * ```
222
+ *
223
+ * Prefer using `nothing` over other falsy values as it provides a consistent
224
+ * behavior between various expression binding contexts.
225
+ *
226
+ * In child expressions, `undefined`, `null`, `''`, and `nothing` all behave the
227
+ * same and render no nodes. In attribute expressions, `nothing` _removes_ the
228
+ * attribute, while `undefined` and `null` will render an empty string. In
229
+ * property expressions `nothing` becomes `undefined`.
177
230
  */
178
231
  export const nothing = Symbol.for('lit-nothing');
179
232
  /**
@@ -191,14 +244,28 @@ const templateCache = new WeakMap();
191
244
  * @param options
192
245
  */
193
246
  export const render = (value, container, options) => {
194
- var _a, _b;
247
+ var _a, _b, _c;
195
248
  const partOwnerNode = (_a = options === null || options === void 0 ? void 0 : options.renderBefore) !== null && _a !== void 0 ? _a : container;
249
+ // This property needs to remain unminified.
196
250
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
197
- let part = partOwnerNode._$litPart$;
251
+ let part = partOwnerNode['_$litPart$'];
198
252
  if (part === undefined) {
199
253
  const endNode = (_b = options === null || options === void 0 ? void 0 : options.renderBefore) !== null && _b !== void 0 ? _b : null;
254
+ // Internal modification: don't clear container to match lit-html 2.0
255
+ if (INTERNAL &&
256
+ ((_c = options) === null || _c === void 0 ? void 0 : _c.clearContainerForLit2MigrationOnly) ===
257
+ true) {
258
+ let n = container.firstChild;
259
+ // Clear only up to the `endNode` aka `renderBefore` node.
260
+ while (n && n !== endNode) {
261
+ const next = n.nextSibling;
262
+ n.remove();
263
+ n = next;
264
+ }
265
+ }
266
+ // This property needs to remain unminified.
200
267
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
201
- partOwnerNode._$litPart$ = part = new ChildPart(container.insertBefore(createMarker(), endNode), endNode, undefined, options);
268
+ partOwnerNode['_$litPart$'] = part = new ChildPart(container.insertBefore(createMarker(), endNode), endNode, undefined, options !== null && options !== void 0 ? options : {});
202
269
  }
203
270
  part._$setValue(value);
204
271
  return part;
@@ -207,7 +274,8 @@ if (ENABLE_EXTRA_SECURITY_HOOKS) {
207
274
  render.setSanitizer = setSanitizer;
208
275
  render.createSanitizer = createSanitizer;
209
276
  if (DEV_MODE) {
210
- render._testOnlyClearSanitizerFactoryDoNotCallOrElse = _testOnlyClearSanitizerFactoryDoNotCallOrElse;
277
+ render._testOnlyClearSanitizerFactoryDoNotCallOrElse =
278
+ _testOnlyClearSanitizerFactoryDoNotCallOrElse;
211
279
  }
212
280
  }
213
281
  const walker = d.createTreeWalker(d, 129 /* NodeFilter.SHOW_{ELEMENT|COMMENT} */, null, false);
@@ -282,7 +350,10 @@ const getTemplateHtml = (strings, type) => {
282
350
  regex = tagEndRegex;
283
351
  }
284
352
  else if (match[DYNAMIC_TAG_NAME] !== undefined) {
285
- // dynamic tag name
353
+ if (DEV_MODE) {
354
+ throw new Error('Bindings in tag names are not supported. Please use static templates instead. ' +
355
+ 'See https://lit.dev/docs/templates/expressions/#static-expressions');
356
+ }
286
357
  regex = tagEndRegex;
287
358
  }
288
359
  }
@@ -370,7 +441,9 @@ const getTemplateHtml = (strings, type) => {
370
441
  ];
371
442
  };
372
443
  class Template {
373
- constructor({ strings, _$litType$: type }, options) {
444
+ constructor(
445
+ // This property needs to remain unminified.
446
+ { strings, ['_$litType$']: type }, options) {
374
447
  /** @internal */
375
448
  this.parts = [];
376
449
  let node;
@@ -392,6 +465,24 @@ class Template {
392
465
  // Walk the template to find binding markers and create TemplateParts
393
466
  while ((node = walker.nextNode()) !== null && parts.length < partCount) {
394
467
  if (node.nodeType === 1) {
468
+ if (DEV_MODE) {
469
+ const tag = node.localName;
470
+ // Warn if `textarea` includes an expression and throw if `template`
471
+ // does since these are not supported. We do this by checking
472
+ // innerHTML for anything that looks like a marker. This catches
473
+ // cases like bindings in textarea there markers turn into text nodes.
474
+ if (/^(?:textarea|template)$/i.test(tag) &&
475
+ node.innerHTML.includes(marker)) {
476
+ const m = `Expressions are not supported inside \`${tag}\` ` +
477
+ `elements. See https://lit.dev/msg/expression-in-${tag} for more ` +
478
+ `information.`;
479
+ if (tag === 'template') {
480
+ throw new Error(m);
481
+ }
482
+ else
483
+ issueWarning('', m);
484
+ }
485
+ }
395
486
  // TODO (justinfagnani): for attempted dynamic tag names, we don't
396
487
  // increment the bindingIndex, and it'll be off by 1 in the element
397
488
  // and off by two after it.
@@ -458,7 +549,8 @@ class Template {
458
549
  // Generate a new text node for each literal section
459
550
  // These nodes are also used as the markers for node parts
460
551
  // We can't use empty text nodes as markers because they're
461
- // normalized in some browsers (TODO: check)
552
+ // normalized when cloning in IE (could simplify when
553
+ // IE is no longer supported)
462
554
  for (let i = 0; i < lastIndex; i++) {
463
555
  node.append(strings[i], createMarker());
464
556
  // Walk past the marker node we just added
@@ -482,8 +574,6 @@ class Template {
482
574
  while ((i = node.data.indexOf(marker, i + 1)) !== -1) {
483
575
  // Comment node has a binding marker inside, make an inactive part
484
576
  // The binding won't work, but subsequent bindings will
485
- // TODO (justinfagnani): consider whether it's even worth it to
486
- // make bindings in comments work
487
577
  parts.push({ type: COMMENT_PART, index: nodeIndex });
488
578
  // Move to the end of the match
489
579
  i += marker.length - 1;
@@ -493,7 +583,8 @@ class Template {
493
583
  nodeIndex++;
494
584
  }
495
585
  }
496
- // Overridden via `litHtmlPlatformSupport` to provide platform support.
586
+ // Overridden via `litHtmlPolyfillSupport` to provide platform support.
587
+ /** @nocollapse */
497
588
  static createElement(html, _options) {
498
589
  const el = d.createElement('template');
499
590
  el.innerHTML = html;
@@ -509,12 +600,15 @@ function resolveDirective(part, value, parent = part, attributeIndex) {
509
600
  return value;
510
601
  }
511
602
  let currentDirective = attributeIndex !== undefined
512
- ? (_a = parent.__directives) === null || _a === void 0 ? void 0 : _a[attributeIndex] : parent.__directive;
603
+ ? (_a = parent.__directives) === null || _a === void 0 ? void 0 : _a[attributeIndex]
604
+ : parent.__directive;
513
605
  const nextDirectiveConstructor = isPrimitive(value)
514
606
  ? undefined
515
- : value._$litDirective$;
607
+ : // This property needs to remain unminified.
608
+ value['_$litDirective$'];
516
609
  if ((currentDirective === null || currentDirective === void 0 ? void 0 : currentDirective.constructor) !== nextDirectiveConstructor) {
517
- (_b = currentDirective === null || currentDirective === void 0 ? void 0 : currentDirective._$setDirectiveConnected) === null || _b === void 0 ? void 0 : _b.call(currentDirective, false);
610
+ // This property needs to remain unminified.
611
+ (_b = currentDirective === null || currentDirective === void 0 ? void 0 : currentDirective['_$notifyDirectiveConnectionChanged']) === null || _b === void 0 ? void 0 : _b.call(currentDirective, false);
518
612
  if (nextDirectiveConstructor === undefined) {
519
613
  currentDirective = undefined;
520
614
  }
@@ -523,7 +617,8 @@ function resolveDirective(part, value, parent = part, attributeIndex) {
523
617
  currentDirective._$initialize(part, parent, attributeIndex);
524
618
  }
525
619
  if (attributeIndex !== undefined) {
526
- ((_c = (_d = parent).__directives) !== null && _c !== void 0 ? _c : (_d.__directives = []))[attributeIndex] = currentDirective;
620
+ ((_c = (_d = parent).__directives) !== null && _c !== void 0 ? _c : (_d.__directives = []))[attributeIndex] =
621
+ currentDirective;
527
622
  }
528
623
  else {
529
624
  parent.__directive = currentDirective;
@@ -543,10 +638,18 @@ class TemplateInstance {
543
638
  /** @internal */
544
639
  this._parts = [];
545
640
  /** @internal */
546
- this._$disconnetableChildren = undefined;
641
+ this._$disconnectableChildren = undefined;
547
642
  this._$template = template;
548
643
  this._$parent = parent;
549
644
  }
645
+ // Called by ChildPart parentNode getter
646
+ get parentNode() {
647
+ return this._$parent.parentNode;
648
+ }
649
+ // See comment in Disconnectable interface for why this is a getter
650
+ get _$isConnected() {
651
+ return this._$parent._$isConnected;
652
+ }
550
653
  // This method is separate from the constructor because we need to return a
551
654
  // DocumentFragment and we don't want to hold onto it with an instance field.
552
655
  _clone(options) {
@@ -601,28 +704,33 @@ class TemplateInstance {
601
704
  }
602
705
  class ChildPart {
603
706
  constructor(startNode, endNode, parent, options) {
707
+ var _a;
604
708
  this.type = CHILD_PART;
709
+ this._$committedValue = nothing;
605
710
  // The following fields will be patched onto ChildParts when required by
606
711
  // AsyncDirective
607
712
  /** @internal */
608
- this._$disconnetableChildren = undefined;
713
+ this._$disconnectableChildren = undefined;
609
714
  this._$startNode = startNode;
610
715
  this._$endNode = endNode;
611
716
  this._$parent = parent;
612
717
  this.options = options;
718
+ // Note __isConnected is only ever accessed on RootParts (i.e. when there is
719
+ // no _$parent); the value on a non-root-part is "don't care", but checking
720
+ // for parent would be more code
721
+ this.__isConnected = (_a = options === null || options === void 0 ? void 0 : options.isConnected) !== null && _a !== void 0 ? _a : true;
613
722
  if (ENABLE_EXTRA_SECURITY_HOOKS) {
614
723
  // Explicitly initialize for consistent class shape.
615
724
  this._textSanitizer = undefined;
616
725
  }
617
726
  }
618
- /**
619
- * Sets the connection state for any `AsyncDirectives` contained
620
- * within this part and runs their `disconnected` or `reconnected`, according
621
- * to the `isConnected` argument.
622
- */
623
- setConnected(isConnected) {
624
- var _a;
625
- (_a = this._$setChildPartConnected) === null || _a === void 0 ? void 0 : _a.call(this, isConnected);
727
+ // See comment in Disconnectable interface for why this is a getter
728
+ get _$isConnected() {
729
+ var _a, _b;
730
+ // ChildParts that are not at the root should always be created with a
731
+ // parent; only RootChildNode's won't, so they return the local isConnected
732
+ // state
733
+ return (_b = (_a = this._$parent) === null || _a === void 0 ? void 0 : _a._$isConnected) !== null && _b !== void 0 ? _b : this.__isConnected;
626
734
  }
627
735
  /**
628
736
  * The parent node into which the part renders its content.
@@ -643,7 +751,16 @@ class ChildPart {
643
751
  * consists of all child nodes of `.parentNode`.
644
752
  */
645
753
  get parentNode() {
646
- return wrap(this._$startNode).parentNode;
754
+ let parentNode = wrap(this._$startNode).parentNode;
755
+ const parent = this._$parent;
756
+ if (parent !== undefined &&
757
+ parentNode.nodeType === 11 /* Node.DOCUMENT_FRAGMENT */) {
758
+ // If the parentNode is a DocumentFragment, it may be because the DOM is
759
+ // still in the cloned fragment during initial render; if so, get the real
760
+ // parentNode the part will be committed into by asking the parent.
761
+ parentNode = parent.parentNode;
762
+ }
763
+ return parentNode;
647
764
  }
648
765
  /**
649
766
  * The part's leading marker node, if any. See `.parentNode` for more
@@ -660,6 +777,9 @@ class ChildPart {
660
777
  return this._$endNode;
661
778
  }
662
779
  _$setValue(value, directiveParent = this) {
780
+ if (DEV_MODE && this.parentNode === null) {
781
+ throw new Error(`This \`ChildPart\` has no \`parentNode\` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's \`innerHTML\` or \`textContent\` can do this.`);
782
+ }
663
783
  value = resolveDirective(this, value, directiveParent);
664
784
  if (isPrimitive(value)) {
665
785
  // Non-rendering child values. It's important that these do not render
@@ -674,8 +794,9 @@ class ChildPart {
674
794
  else if (value !== this._$committedValue && value !== noChange) {
675
795
  this._commitText(value);
676
796
  }
797
+ // This property needs to remain unminified.
677
798
  }
678
- else if (value._$litType$ !== undefined) {
799
+ else if (value['_$litType$'] !== undefined) {
679
800
  this._commitTemplateResult(value);
680
801
  }
681
802
  else if (value.nodeType !== undefined) {
@@ -700,30 +821,44 @@ class ChildPart {
700
821
  sanitizerFactoryInternal !== noopSanitizer) {
701
822
  const parentNodeName = (_a = this._$startNode.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName;
702
823
  if (parentNodeName === 'STYLE' || parentNodeName === 'SCRIPT') {
703
- this._insert(new Text('/* lit-html will not write ' +
704
- 'TemplateResults to scripts and styles */'));
705
- return;
824
+ let message = 'Forbidden';
825
+ if (DEV_MODE) {
826
+ if (parentNodeName === 'STYLE') {
827
+ message =
828
+ `Lit does not support binding inside style nodes. ` +
829
+ `This is a security risk, as style injection attacks can ` +
830
+ `exfiltrate data and spoof UIs. ` +
831
+ `Consider instead using css\`...\` literals ` +
832
+ `to compose styles, and make do dynamic styling with ` +
833
+ `css custom properties, ::parts, <slot>s, ` +
834
+ `and by mutating the DOM rather than stylesheets.`;
835
+ }
836
+ else {
837
+ message =
838
+ `Lit does not support binding inside script nodes. ` +
839
+ `This is a security risk, as it could allow arbitrary ` +
840
+ `code execution.`;
841
+ }
842
+ }
843
+ throw new Error(message);
706
844
  }
707
845
  }
708
846
  this._$committedValue = this._insert(value);
709
847
  }
710
848
  }
711
849
  _commitText(value) {
712
- const node = wrap(this._$startNode).nextSibling;
713
- // TODO(justinfagnani): Can we just check if this._$committedValue is primitive?
714
- if (node !== null &&
715
- node.nodeType === 3 /* Node.TEXT_NODE */ &&
716
- (this._$endNode === null
717
- ? wrap(node).nextSibling === null
718
- : node === wrap(this._$endNode).previousSibling)) {
850
+ // If the committed value is a primitive it means we called _commitText on
851
+ // the previous render, and we know that this._$startNode.nextSibling is a
852
+ // Text node. We can now just replace the text content (.data) of the node.
853
+ if (this._$committedValue !== nothing &&
854
+ isPrimitive(this._$committedValue)) {
855
+ const node = wrap(this._$startNode).nextSibling;
719
856
  if (ENABLE_EXTRA_SECURITY_HOOKS) {
720
857
  if (this._textSanitizer === undefined) {
721
858
  this._textSanitizer = createSanitizer(node, 'data', 'property');
722
859
  }
723
860
  value = this._textSanitizer(value);
724
861
  }
725
- // If we only have a single text node between the markers, we can just
726
- // set its value, rather than replacing it.
727
862
  node.data = value;
728
863
  }
729
864
  else {
@@ -748,16 +883,17 @@ class ChildPart {
748
883
  }
749
884
  _commitTemplateResult(result) {
750
885
  var _a;
751
- const { values, _$litType$ } = result;
886
+ // This property needs to remain unminified.
887
+ const { values, ['_$litType$']: type } = result;
752
888
  // If $litType$ is a number, result is a plain TemplateResult and we get
753
889
  // the template from the template cache. If not, result is a
754
890
  // CompiledTemplateResult and _$litType$ is a CompiledTemplate and we need
755
891
  // to create the <template> element the first time we see it.
756
- const template = typeof _$litType$ === 'number'
892
+ const template = typeof type === 'number'
757
893
  ? this._$getTemplate(result)
758
- : (_$litType$.el === undefined &&
759
- (_$litType$.el = Template.createElement(_$litType$.h, this.options)),
760
- _$litType$);
894
+ : (type.el === undefined &&
895
+ (type.el = Template.createElement(type.h, this.options)),
896
+ type);
761
897
  if (((_a = this._$committedValue) === null || _a === void 0 ? void 0 : _a._$template) === template) {
762
898
  this._$committedValue._update(values);
763
899
  }
@@ -769,7 +905,7 @@ class ChildPart {
769
905
  this._$committedValue = instance;
770
906
  }
771
907
  }
772
- // Overridden via `litHtmlPlatformSupport` to provide platform support.
908
+ // Overridden via `litHtmlPolyfillSupport` to provide platform support.
773
909
  /** @internal */
774
910
  _$getTemplate(result) {
775
911
  let template = templateCache.get(result.strings);
@@ -802,7 +938,7 @@ class ChildPart {
802
938
  // If no existing part, create a new one
803
939
  // TODO (justinfagnani): test perf impact of always creating two parts
804
940
  // instead of sharing parts between nodes
805
- // https://github.com/Polymer/lit-html/issues/1266
941
+ // https://github.com/lit/lit/issues/1266
806
942
  itemParts.push((itemPart = new ChildPart(this._insert(createMarker()), this._insert(createMarker()), this, this.options)));
807
943
  }
808
944
  else {
@@ -832,13 +968,31 @@ class ChildPart {
832
968
  */
833
969
  _$clear(start = wrap(this._$startNode).nextSibling, from) {
834
970
  var _a;
835
- (_a = this._$setChildPartConnected) === null || _a === void 0 ? void 0 : _a.call(this, false, true, from);
971
+ (_a = this._$notifyConnectionChanged) === null || _a === void 0 ? void 0 : _a.call(this, false, true, from);
836
972
  while (start && start !== this._$endNode) {
837
973
  const n = wrap(start).nextSibling;
838
974
  wrap(start).remove();
839
975
  start = n;
840
976
  }
841
977
  }
978
+ /**
979
+ * Implementation of RootPart's `isConnected`. Note that this metod
980
+ * should only be called on `RootPart`s (the `ChildPart` returned from a
981
+ * top-level `render()` call). It has no effect on non-root ChildParts.
982
+ * @param isConnected Whether to set
983
+ * @internal
984
+ */
985
+ setConnected(isConnected) {
986
+ var _a;
987
+ if (this._$parent === undefined) {
988
+ this.__isConnected = isConnected;
989
+ (_a = this._$notifyConnectionChanged) === null || _a === void 0 ? void 0 : _a.call(this, isConnected);
990
+ }
991
+ else if (DEV_MODE) {
992
+ throw new Error('part.setConnected() may only be called on a ' +
993
+ 'RootPart returned from render().');
994
+ }
995
+ }
842
996
  }
843
997
  class AttributePart {
844
998
  constructor(element, name, strings, parent, options) {
@@ -846,15 +1000,13 @@ class AttributePart {
846
1000
  /** @internal */
847
1001
  this._$committedValue = nothing;
848
1002
  /** @internal */
849
- this._$disconnetableChildren = undefined;
850
- /** @internal */
851
- this._setDirectiveConnected = undefined;
1003
+ this._$disconnectableChildren = undefined;
852
1004
  this.element = element;
853
1005
  this.name = name;
854
1006
  this._$parent = parent;
855
1007
  this.options = options;
856
1008
  if (strings.length > 2 || strings[0] !== '' || strings[1] !== '') {
857
- this._$committedValue = new Array(strings.length - 1).fill(nothing);
1009
+ this._$committedValue = new Array(strings.length - 1).fill(new String());
858
1010
  this.strings = strings;
859
1011
  }
860
1012
  else {
@@ -867,6 +1019,10 @@ class AttributePart {
867
1019
  get tagName() {
868
1020
  return this.element.tagName;
869
1021
  }
1022
+ // See comment in Disconnectable interface for why this is a getter
1023
+ get _$isConnected() {
1024
+ return this._$parent._$isConnected;
1025
+ }
870
1026
  /**
871
1027
  * Sets the value of this part by resolving the value from possibly multiple
872
1028
  * values and static strings and committing it to the DOM.
@@ -963,6 +1119,13 @@ class PropertyPart extends AttributePart {
963
1119
  this.element[this.name] = value === nothing ? undefined : value;
964
1120
  }
965
1121
  }
1122
+ // Temporary workaround for https://crbug.com/993268
1123
+ // Currently, any attribute starting with "on" is considered to be a
1124
+ // TrustedScript source. Such boolean attributes must be set to the equivalent
1125
+ // trusted emptyScript value.
1126
+ const emptyStringForBooleanAttribute = trustedTypes
1127
+ ? trustedTypes.emptyScript
1128
+ : '';
966
1129
  class BooleanAttributePart extends AttributePart {
967
1130
  constructor() {
968
1131
  super(...arguments);
@@ -971,7 +1134,7 @@ class BooleanAttributePart extends AttributePart {
971
1134
  /** @internal */
972
1135
  _commitValue(value) {
973
1136
  if (value && value !== nothing) {
974
- wrap(this.element).setAttribute(this.name, '');
1137
+ wrap(this.element).setAttribute(this.name, emptyStringForBooleanAttribute);
975
1138
  }
976
1139
  else {
977
1140
  wrap(this.element).removeAttribute(this.name);
@@ -979,16 +1142,22 @@ class BooleanAttributePart extends AttributePart {
979
1142
  }
980
1143
  }
981
1144
  class EventPart extends AttributePart {
982
- constructor() {
983
- super(...arguments);
1145
+ constructor(element, name, strings, parent, options) {
1146
+ super(element, name, strings, parent, options);
984
1147
  this.type = EVENT_PART;
1148
+ if (DEV_MODE && this.strings !== undefined) {
1149
+ throw new Error(`A \`<${element.localName}>\` has a \`@${name}=...\` listener with ` +
1150
+ 'invalid content. Event listeners in templates must have exactly ' +
1151
+ 'one expression and no surrounding text.');
1152
+ }
985
1153
  }
986
1154
  // EventPart does not use the base _$setValue/_resolveValue implementation
987
1155
  // since the dirty checking is more complex
988
1156
  /** @internal */
989
1157
  _$setValue(newListener, directiveParent = this) {
990
1158
  var _a;
991
- newListener = (_a = resolveDirective(this, newListener, directiveParent, 0)) !== null && _a !== void 0 ? _a : nothing;
1159
+ newListener =
1160
+ (_a = resolveDirective(this, newListener, directiveParent, 0)) !== null && _a !== void 0 ? _a : nothing;
992
1161
  if (newListener === noChange) {
993
1162
  return;
994
1163
  }
@@ -1020,8 +1189,6 @@ class EventPart extends AttributePart {
1020
1189
  handleEvent(event) {
1021
1190
  var _a, _b;
1022
1191
  if (typeof this._$committedValue === 'function') {
1023
- // TODO (justinfagnani): do we need to default to this.element?
1024
- // It'll always be the same as `e.currentTarget`.
1025
1192
  this._$committedValue.call((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : this.element, event);
1026
1193
  }
1027
1194
  else {
@@ -1034,12 +1201,14 @@ class ElementPart {
1034
1201
  this.element = element;
1035
1202
  this.type = ELEMENT_PART;
1036
1203
  /** @internal */
1037
- this._$disconnetableChildren = undefined;
1038
- /** @internal */
1039
- this._setDirectiveConnected = undefined;
1204
+ this._$disconnectableChildren = undefined;
1040
1205
  this._$parent = parent;
1041
1206
  this.options = options;
1042
1207
  }
1208
+ // See comment in Disconnectable interface for why this is a getter
1209
+ get _$isConnected() {
1210
+ return this._$parent._$isConnected;
1211
+ }
1043
1212
  _$setValue(value) {
1044
1213
  resolveDirective(this, value);
1045
1214
  }
@@ -1052,7 +1221,7 @@ class ElementPart {
1052
1221
  *
1053
1222
  * We currently do not make a mangled rollup build of the lit-ssr code. In order
1054
1223
  * to keep a number of (otherwise private) top-level exports mangled in the
1055
- * client side code, we export a _Σ object containing those members (or
1224
+ * client side code, we export a _$LH object containing those members (or
1056
1225
  * helper methods for accessing private fields of those members), and then
1057
1226
  * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the
1058
1227
  * client-side code is being used in `dev` mode or `prod` mode.
@@ -1062,7 +1231,7 @@ class ElementPart {
1062
1231
  *
1063
1232
  * @private
1064
1233
  */
1065
- export const _Σ = {
1234
+ export const _$LH = {
1066
1235
  // Used in lit-ssr
1067
1236
  _boundAttributeSuffix: boundAttributeSuffix,
1068
1237
  _marker: marker,
@@ -1082,11 +1251,15 @@ export const _Σ = {
1082
1251
  _ElementPart: ElementPart,
1083
1252
  };
1084
1253
  // Apply polyfills if available
1085
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1086
- (_d = (_c = globalThis)['litHtmlPlatformSupport']) === null || _d === void 0 ? void 0 : _d.call(_c, Template, ChildPart);
1254
+ const polyfillSupport = DEV_MODE
1255
+ ? window.litHtmlPolyfillSupportDevMode
1256
+ : window.litHtmlPolyfillSupport;
1257
+ polyfillSupport === null || polyfillSupport === void 0 ? void 0 : polyfillSupport(Template, ChildPart);
1087
1258
  // IMPORTANT: do not change the property name or the assignment expression.
1088
1259
  // This line will be used in regexes to search for lit-html usage.
1089
- // TODO(justinfagnani): inject version number at build time
1090
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1091
- ((_e = (_f = globalThis)['litHtmlVersions']) !== null && _e !== void 0 ? _e : (_f['litHtmlVersions'] = [])).push('2.0.0-rc.2');
1260
+ ((_d = globalThis.litHtmlVersions) !== null && _d !== void 0 ? _d : (globalThis.litHtmlVersions = [])).push('2.0.2');
1261
+ if (DEV_MODE && globalThis.litHtmlVersions.length > 1) {
1262
+ issueWarning('multiple-versions', `Multiple versions of Lit loaded. ` +
1263
+ `Loading multiple versions is not recommended.`);
1264
+ }
1092
1265
  //# sourceMappingURL=lit-html.js.map