chrome-devtools-frontend 1.0.944427 → 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 (251) 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/i18n/locales/en-US.json +3 -15
  5. package/front_end/core/i18n/locales/en-XL.json +15 -27
  6. package/front_end/core/protocol_client/NodeURL.ts +1 -0
  7. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
  8. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
  9. package/front_end/core/sdk/Cookie.ts +17 -0
  10. package/front_end/core/sdk/CookieModel.ts +1 -0
  11. package/front_end/core/sdk/DebuggerModel.ts +5 -4
  12. package/front_end/core/sdk/NetworkManager.ts +4 -1
  13. package/front_end/core/sdk/NetworkRequest.ts +2 -2
  14. package/front_end/core/sdk/Resource.ts +2 -2
  15. package/front_end/core/sdk/Script.ts +2 -3
  16. package/front_end/models/bindings/BreakpointManager.ts +3 -4
  17. package/front_end/models/bindings/ResourceMapping.ts +1 -2
  18. package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
  19. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
  20. package/front_end/models/persistence/IsolatedFileSystemManager.ts +10 -6
  21. package/front_end/models/persistence/PersistenceActions.ts +4 -1
  22. package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
  23. package/front_end/models/text_utils/ContentProvider.ts +1 -2
  24. package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
  25. package/front_end/models/workspace/UISourceCode.ts +2 -2
  26. package/front_end/panels/animation/animationTimeline.css +2 -0
  27. package/front_end/panels/application/ReportingApiView.ts +15 -1
  28. package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
  29. package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
  30. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
  31. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  32. package/front_end/panels/sources/NavigatorView.ts +1 -1
  33. package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
  34. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
  35. package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
  36. package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
  37. package/front_end/services/window_bounds/window_bounds.ts +9 -0
  38. package/front_end/third_party/codemirror.next/bundle.ts +1 -1
  39. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  40. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +8 -1
  41. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  42. package/front_end/third_party/codemirror.next/package.json +1 -1
  43. package/front_end/third_party/lit-html/README.chromium +2 -2
  44. package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
  45. package/front_end/third_party/lit-html/package/LICENSE +9 -9
  46. package/front_end/third_party/lit-html/package/README.md +12 -162
  47. package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
  48. package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
  49. package/front_end/third_party/lit-html/package/async-directive.js +2 -7
  50. package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
  51. package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
  52. package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
  53. package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
  54. package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
  55. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
  56. package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
  57. package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
  58. package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
  59. package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
  60. package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
  61. package/front_end/third_party/lit-html/package/development/directive.js +6 -1
  62. package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
  63. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
  64. package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
  65. package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
  66. package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
  67. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
  68. package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
  69. package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
  70. package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
  71. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
  72. package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
  73. package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
  74. package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
  75. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
  76. package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
  77. package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
  78. package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
  79. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
  80. package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
  81. package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
  82. package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
  83. package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
  84. package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
  85. package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
  86. package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
  87. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
  88. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
  89. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
  90. package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
  91. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
  92. package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
  93. package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
  94. package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
  95. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
  96. package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
  97. package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
  98. package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
  99. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
  100. package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
  101. package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
  102. package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
  103. package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
  104. package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
  105. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
  106. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
  107. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
  108. package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
  109. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
  110. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
  111. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
  112. package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
  113. package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
  114. package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
  115. package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
  116. package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
  117. package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
  118. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
  119. package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
  120. package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
  121. package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
  122. package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
  123. package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
  124. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
  125. package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
  126. package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
  127. package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
  128. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
  129. package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
  130. package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
  131. package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
  132. package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
  133. package/front_end/third_party/lit-html/package/development/static.js +6 -5
  134. package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
  135. package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
  136. package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
  137. package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
  138. package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
  139. package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
  140. package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
  141. package/front_end/third_party/lit-html/package/directive.js +1 -1
  142. package/front_end/third_party/lit-html/package/directive.js.map +1 -1
  143. package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
  144. package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
  145. package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
  146. package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
  147. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
  148. package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
  149. package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
  150. package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
  151. package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
  152. package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
  153. package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
  154. package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
  155. package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
  156. package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
  157. package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
  158. package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
  159. package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
  160. package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
  161. package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
  162. package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
  163. package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
  164. package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
  165. package/front_end/third_party/lit-html/package/directives/live.js +1 -4
  166. package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
  167. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
  168. package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
  169. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
  170. package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
  171. package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
  172. package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
  173. package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
  174. package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
  175. package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
  176. package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
  177. package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
  178. package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
  179. package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
  180. package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
  181. package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
  182. package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
  183. package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
  184. package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
  185. package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
  186. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
  187. package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
  188. package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
  189. package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
  190. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
  191. package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
  192. package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
  193. package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
  194. package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
  195. package/front_end/third_party/lit-html/package/directives/until.js +2 -6
  196. package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
  197. package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
  198. package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
  199. package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
  200. package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
  201. package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
  202. package/front_end/third_party/lit-html/package/lit-html.js +1 -1
  203. package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
  204. package/front_end/third_party/lit-html/package/package.json +75 -24
  205. package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
  206. package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
  207. package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
  208. package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
  209. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
  210. package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
  211. package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
  212. package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
  213. package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
  214. package/front_end/third_party/lit-html/package/static.js +1 -1
  215. package/front_end/third_party/lit-html/package/static.js.map +1 -1
  216. package/front_end/third_party/marked/README.chromium +2 -2
  217. package/front_end/third_party/marked/marked.ts +2 -2
  218. package/front_end/third_party/marked/package/README.md +7 -1
  219. package/front_end/third_party/marked/package/bin/marked.js +214 -0
  220. package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
  221. package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
  222. package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
  223. package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
  224. package/front_end/third_party/marked/package/man/marked.1 +5 -24
  225. package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
  226. package/front_end/third_party/marked/package/marked.min.js +1 -1
  227. package/front_end/third_party/marked/package/package.json +41 -32
  228. package/front_end/third_party/marked/package/src/Lexer.js +109 -108
  229. package/front_end/third_party/marked/package/src/Parser.js +38 -15
  230. package/front_end/third_party/marked/package/src/Renderer.js +5 -5
  231. package/front_end/third_party/marked/package/src/Slugger.js +2 -2
  232. package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
  233. package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
  234. package/front_end/third_party/marked/package/src/defaults.js +6 -9
  235. package/front_end/third_party/marked/package/src/helpers.js +16 -27
  236. package/front_end/third_party/marked/package/src/marked.js +146 -63
  237. package/front_end/third_party/marked/package/src/rules.js +20 -45
  238. package/front_end/third_party/wasmparser/README.chromium +2 -2
  239. package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
  240. package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
  241. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
  242. package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
  243. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
  244. package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
  245. package/front_end/third_party/wasmparser/package/package.json +1 -1
  246. package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
  247. package/front_end/ui/components/text_editor/TextEditor.ts +29 -0
  248. package/front_end/ui/components/text_editor/config.ts +4 -2
  249. package/front_end/ui/legacy/ViewManager.ts +6 -0
  250. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
  251. package/package.json +1 -1
@@ -5592,6 +5592,13 @@ interface TooltipView {
5592
5592
  Behavior by which an extension can provide a tooltip to be shown.
5593
5593
  */
5594
5594
  declare const showTooltip: Facet<Tooltip | null, readonly (Tooltip | null)[]>;
5595
+ /**
5596
+ Tell the tooltip extension to recompute the position of the active
5597
+ tooltips. This can be useful when something happens (such as a
5598
+ re-positioning or CSS change affecting the editor) that could
5599
+ invalidate the existing tooltip positions.
5600
+ */
5601
+ declare function repositionTooltips(view: EditorView): void;
5595
5602
 
5596
5603
  declare function clojure(): Promise<StreamLanguage<unknown>>;
5597
5604
  declare function coffeescript(): Promise<StreamLanguage<unknown>>;
@@ -5605,4 +5612,4 @@ declare function shell(): Promise<StreamLanguage<unknown>>;
5605
5612
  declare function wast(): Promise<typeof _codemirror_lang_wast>;
5606
5613
  declare function xml(): Promise<typeof _codemirror_lang_xml>;
5607
5614
 
5608
- export { Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Command, Compartment, Completion, CompletionContext, CompletionResult, CompletionSource, Decoration, DecorationSet, EditorSelection, EditorState, EditorStateConfig, EditorView, Extension, Facet, GutterMarker, HighlightStyle, KeyBinding, LRParser, Language, LanguageSupport, Line$1 as Line, MatchDecorator, NodeProp, NodeSet, NodeType, Panel, Parser, Prec, Range, RangeSet, RangeSetBuilder, SelectionRange, StateEffect, StateEffectType, StateField, StreamLanguage, StreamParser, StringStream, StyleModule, SyntaxNode, Tag, TagStyle, Text, TextIterator, Tooltip, TooltipView, Transaction, TransactionSpec, Tree, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, acceptCompletion, autocompletion, bracketMatching, clojure, closeBrackets, closeBracketsKeymap, closeCompletion, codeFolding, coffeescript, completeAnyWord, cpp, index_d$2 as css, currentCompletions, cursorMatchingBracket, cursorSubwordBackward, cursorSubwordForward, drawSelection, ensureSyntaxTree, foldGutter, foldKeymap, gutter, gutters, highlightSpecialChars, highlightTree, history, historyKeymap, index_d$1 as html, ifNotIn, indentLess, indentMore, indentOnInput, indentUnit, insertNewlineAndIndent, java, index_d as javascript, json, keymap, lineNumberMarkers, lineNumbers, markdown, php, placeholder, python, redo, redoSelection, scrollPastEnd, selectMatchingBracket, selectNextOccurrence, selectSubwordBackward, selectSubwordForward, selectedCompletion, shell, showPanel, showTooltip, standardKeymap, startCompletion, syntaxTree, tags, toggleComment, tooltips, undo, undoSelection, wast, xml };
5615
+ export { Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Command, Compartment, Completion, CompletionContext, CompletionResult, CompletionSource, Decoration, DecorationSet, EditorSelection, EditorState, EditorStateConfig, EditorView, Extension, Facet, GutterMarker, HighlightStyle, KeyBinding, LRParser, Language, LanguageSupport, Line$1 as Line, MatchDecorator, NodeProp, NodeSet, NodeType, Panel, Parser, Prec, Range, RangeSet, RangeSetBuilder, SelectionRange, StateEffect, StateEffectType, StateField, StreamLanguage, StreamParser, StringStream, StyleModule, SyntaxNode, Tag, TagStyle, Text, TextIterator, Tooltip, TooltipView, Transaction, TransactionSpec, Tree, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, acceptCompletion, autocompletion, bracketMatching, clojure, closeBrackets, closeBracketsKeymap, closeCompletion, codeFolding, coffeescript, completeAnyWord, cpp, index_d$2 as css, currentCompletions, cursorMatchingBracket, cursorSubwordBackward, cursorSubwordForward, drawSelection, ensureSyntaxTree, foldGutter, foldKeymap, gutter, gutters, highlightSpecialChars, highlightTree, history, historyKeymap, index_d$1 as html, ifNotIn, indentLess, indentMore, indentOnInput, indentUnit, insertNewlineAndIndent, java, index_d as javascript, json, keymap, lineNumberMarkers, lineNumbers, markdown, php, placeholder, python, redo, redoSelection, repositionTooltips, scrollPastEnd, selectMatchingBracket, selectNextOccurrence, selectSubwordBackward, selectSubwordForward, selectedCompletion, shell, showPanel, showTooltip, standardKeymap, startCompletion, syntaxTree, tags, toggleComment, tooltips, undo, undoSelection, wast, xml };
@@ -1,2 +1,2 @@
1
- export{$ as cursorSubwordForward,_ as cursorSubwordBackward,A as java,a$ as ViewUpdate,a0 as indentLess,a1 as indentMore,a2 as insertNewlineAndIndent,a3 as selectMatchingBracket,a4 as selectSubwordBackward,a5 as selectSubwordForward,a6 as standardKeymap,a7 as toggleComment,a8 as codeFolding,a9 as foldGutter,a_ as ViewPlugin,aa as foldKeymap,aA as selectNextOccurrence,aB as Annotation,ab as gutter,aC as AnnotationType,ac as GutterMarker,aD as ChangeDesc,ad as gutters,aE as ChangeSet,ae as lineNumberMarkers,aF as Compartment,af as lineNumbers,aG as EditorState,ag as HighlightStyle,aH as Facet,ah as highlightTree,aI as SelectionRange,ai as Tag,aJ as StateEffect,aj as history,aK as StateEffectType,ak as historyKeymap,aL as StateField,al as redo,aM as Transaction,am as redoSelection,aN as StreamLanguage,an as undo,aO as StringStream,ao as undoSelection,aP as Line,ap as css,aQ as Text,aq as html,ar as javascript,aR as showTooltip,as as ensureSyntaxTree,aS as tooltips,aT as Decoration,at as indentOnInput,aU as drawSelection,au as indentUnit,aV as EditorView,av as bracketMatching,aW as highlightSpecialChars,aw as showPanel,aX as MatchDecorator,ax as Range,ay as RangeSet,aY as placeholder,az as RangeSetBuilder,aZ as scrollPastEnd,B as json,b0 as WidgetType,b1 as TreeCursor,b2 as StyleModule,D as markdown,e as LanguageSupport,F as php,g as NodeType,G as python,h as NodeSet,H as shell,I as wast,j as Language,J as xml,K as acceptCompletion,k as syntaxTree,L as LRParser,m as EditorSelection,M as autocompletion,N as NodeProp,n as Prec,O as closeCompletion,o as keymap,P as Parser,Q as completeAnyWord,R as CompletionContext,S as currentCompletions,T as Tree,t as tags,U as ifNotIn,V as selectedCompletion,W as startCompletion,x as clojure,X as closeBrackets,Y as closeBracketsKeymap,y as coffeescript,z as cpp,Z as cursorMatchingBracket}from"./chunk/codemirror.js";
1
+ export{$ as cursorSubwordForward,_ as cursorSubwordBackward,A as java,a$ as ViewPlugin,a0 as indentLess,a1 as indentMore,a2 as insertNewlineAndIndent,a3 as selectMatchingBracket,a4 as selectSubwordBackward,a5 as selectSubwordForward,a6 as standardKeymap,a7 as toggleComment,a8 as codeFolding,a9 as foldGutter,a_ as scrollPastEnd,aa as foldKeymap,aA as selectNextOccurrence,aB as Annotation,ab as gutter,aC as AnnotationType,ac as GutterMarker,aD as ChangeDesc,ad as gutters,aE as ChangeSet,ae as lineNumberMarkers,aF as Compartment,af as lineNumbers,aG as EditorState,ag as HighlightStyle,aH as Facet,ah as highlightTree,aI as SelectionRange,ai as Tag,aJ as StateEffect,aj as history,aK as StateEffectType,ak as historyKeymap,aL as StateField,al as redo,aM as Transaction,am as redoSelection,aN as StreamLanguage,an as undo,aO as StringStream,ao as undoSelection,aP as Line,ap as css,aQ as Text,aq as html,ar as javascript,aR as showTooltip,as as ensureSyntaxTree,aS as tooltips,at as indentOnInput,aT as repositionTooltips,aU as Decoration,au as indentUnit,av as bracketMatching,aV as drawSelection,aW as EditorView,aw as showPanel,ax as Range,aX as highlightSpecialChars,aY as MatchDecorator,ay as RangeSet,az as RangeSetBuilder,aZ as placeholder,B as json,b0 as ViewUpdate,b1 as WidgetType,b2 as TreeCursor,b3 as StyleModule,D as markdown,e as LanguageSupport,F as php,g as NodeType,G as python,h as NodeSet,H as shell,I as wast,j as Language,J as xml,K as acceptCompletion,k as syntaxTree,L as LRParser,m as EditorSelection,M as autocompletion,N as NodeProp,n as Prec,O as closeCompletion,o as keymap,P as Parser,Q as completeAnyWord,R as CompletionContext,S as currentCompletions,T as Tree,t as tags,U as ifNotIn,V as selectedCompletion,W as startCompletion,x as clojure,X as closeBrackets,Y as closeBracketsKeymap,y as coffeescript,z as cpp,Z as cursorMatchingBracket}from"./chunk/codemirror.js";
2
2
 
@@ -31,7 +31,7 @@
31
31
  "@codemirror/state": "0.19.5",
32
32
  "@codemirror/stream-parser": "0.19.2",
33
33
  "@codemirror/text": "0.19.5",
34
- "@codemirror/tooltip": "0.19.9",
34
+ "@codemirror/tooltip": "0.19.10",
35
35
  "@codemirror/view": "0.19.20",
36
36
  "@lezer/common": "0.15.8",
37
37
  "@rollup/plugin-node-resolve": "^13.0.4",
@@ -1,7 +1,7 @@
1
1
  Name: An efficient, expressive, extensible HTML templating library for JavaScript
2
2
  Short Name: lit-html
3
3
  URL: https://github.com/polymer/lit-html
4
- Version: 2.0.0-rc.2
4
+ Version: 2.0.2
5
5
  License: BSD-3
6
6
  License File: LICENSE
7
7
  Security Critical: no
@@ -12,5 +12,5 @@ lit-html lets you write HTML templates in JavaScript, then efficiently render an
12
12
  To update this package, run the following command (replace version number with updated version number) in this directory:
13
13
 
14
14
  ```bash
15
- wget -qO- https://registry.npmjs.org/lit-html/-/lit-html-2.0.0-rc.2.tgz | tar xzf -
15
+ wget -qO- https://registry.npmjs.org/lit-html/-/lit-html-2.0.2.tgz | tar xzf -
16
16
  ```
@@ -1,9 +1,191 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## 2.0.2
4
4
 
5
- The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
- and this project adheres to [Semantic Versioning](http://semver.org/).
5
+ ### Patch Changes
6
+
7
+ - [#2146](https://github.com/lit/lit/pull/2146) [`8bb33c88`](https://github.com/lit/lit/commit/8bb33c882bf5a9a215efac9dd9dd8665285a417d) - Work around a Chrome bug with trusted types: https://crbug.com/993268
8
+
9
+ * [#2236](https://github.com/lit/lit/pull/2236) [`5fc3818a`](https://github.com/lit/lit/commit/5fc3818afa43365b90b921ea0fd8f41e970e767f) - Prevent `polyfillSupport.noPatchSupported` from implicitly being `any`.
10
+ Deduplicate types for `DevMode`-suffixed polyfill support functions.
11
+
12
+ ## 2.0.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#2152](https://github.com/lit/lit/pull/2152) [`ba5e1391`](https://github.com/lit/lit/commit/ba5e139163049014e6261123ff808700352b86a8) - Replace dynamic name lookups for polyfill support functions with static names.
17
+
18
+ ## 2.0.0
19
+
20
+ ### Major Changes
21
+
22
+ - The `templateFactory` option of `RenderOptions` has been removed.
23
+ - `TemplateProcessor` has been removed.
24
+ - Symbols are not converted to a string before mutating DOM, so passing a Symbol to an attribute or text binding will result in an exception.
25
+ - The `shady-render` module has been removed and is now part of `platform-support`, and Lit's polyfill support now adds the following limitations: (1) Bindings in style elements are no longer supported. Previously these could not change and in the future they may be supported via static bindings. (2) `ShadyCSS.styleElement` is no longer called automatically. This must be called whenever dynamic changes that affect styling are made that involve css custom property shimming (older browsers) or changes to custom properties used via the deprecated `@apply` feature. It was previously called only on first render, and it is now up to the user to decide when this should be called. See [Polyfills](https://lit.dev/docs/tools/requirements/#polyfills) for more details.
26
+ - `render()` no longer clears the container it's rendered to. It now appends to the container by default.
27
+ - Expressions in comments are no longer rendered or updated. See [Valid expression locations](https://lit.dev/docs/templates/expressions/#expression-locations) for more details.
28
+ - Template caching happens per callsite, not per template-tag/callsize pair. This means some rare forms of highly dynamic template tags are no longer supported.
29
+ - Arrays and other iterables passed to attribute bindings are not specially handled. Arrays will be rendered with their default toString representation. This means that `` html`<div class=${['a', 'b']}> `` will render `<div class="a,b">` instead of `<div class="a b">`. To get the old behavior, use `array.join(' ')`.
30
+ - Multiple bindings in a single attribute value don't require the attribute value is quoted, as long as there is no whitespace or other attribute-ending character in the attribute value. `` html`<div id=${a}-${b}>` ``
31
+ - The directive and part APIs are significantly different. See [Custom Directives](https://lit.dev/docs/templates/custom-directives/) and the [Upgrade Guide](https://lit.dev/docs/releases/upgrade/#update-custom-directive-implementations) for more details.
32
+ - The `Directive` base class and `directive()` factory function are
33
+ now exported from the `lit-html/directive.js` module.
34
+ - `NodePart` has been renamed to `ChildPart`,
35
+ along with other methods and variables that use the "Node" naming, like
36
+ `PartType.Node` which is now `PartType.CHILD`.
37
+ - The part exports (`ChildPart`,
38
+ `AttributePart`, etc) have been change to interface-only exports. The constructors are no longer exported. Directive authors should use helpers in `directive-helpers.js` to construct parts.
39
+ - The `eventContext` render option has been changed to `host`.
40
+ - [#2103](https://github.com/lit/lit/pull/2103) [`15a8356d`](https://github.com/lit/lit/commit/15a8356ddd59a1e80880a93acd21fadc9c24e14b) - Updates the `exports` field of `package.json` files to replace the [subpath
41
+ folder
42
+ mapping](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#packages_subpath_folder_mappings)
43
+ syntax with an explicit list of all exported files.
44
+
45
+ The `/`-suffixed syntax for subpath folder mapping originally used in these
46
+ files is deprecated. Rather than update to the new syntax, this change replaces
47
+ these mappings with individual entries for all exported files so that (a) users
48
+ must import using extensions and (b) bundlers or other tools that don't resolve
49
+ subpath folder mapping exactly as Node.js does won't break these packages'
50
+ expectations around how they're imported.
51
+
52
+ - [#1764](https://github.com/lit/lit/pull/1764) [`0b4d6eda`](https://github.com/lit/lit/commit/0b4d6eda5220aeb53abe250217d70dcb8f45fe43) - Don't allow classMap to remove static classes. This keeps classMap consistent with building a string out of the classnames to be applied.
53
+
54
+ ### Minor Changes
55
+
56
+ - Added `renderBefore` to render options. If specified, content is rendered before the node given via render options, e.g. `{renderBefore: node}`.
57
+ - Added development mode, which can be enabled by setting the `development` Node exports condition. See [Development and production builds](https://lit.dev/docs/tools/development/#development-and-production-builds) for more details.
58
+ - All usage of `instanceof` has been removed, making rendering more likely to
59
+ work when multiple instances of the library interact.
60
+ - Template processing is more robust to expressions in places other than text and attribute values.
61
+ - `render` now returns the `ChildPart` that was created/updated by `render`.
62
+ - Added `AsyncDirective`, which is a `Directive` subclass whose
63
+ `disconnected` callback will be called when the part containing the directive
64
+ is cleared (or transitively cleared by a Part higher in the tree) or manually
65
+ disconnected using the `setConnected` API, and whose `reconnected` callback
66
+ will be called when manually re-connected using `setConnected`. When
67
+ implementing `disconnected`, the `reconnected` callback should also be
68
+ implemented to return the directive to a usable state. Note that `LitElement`
69
+ will disconnect directives upon element disconnection, and re-connect
70
+ directives upon element re-connection. See [Async directives](https://lit.dev/docs/templates/custom-directives/#async-directives) for more details.
71
+ - Added `setConnected(isConnected: boolean)` to `ChildPart`; when called with
72
+ `false`, the `disconnected` callback will be run on any directives contained within
73
+ the part (directly or transitively), but without clearing or causing a
74
+ re-render to the tree. When called with `true`, any such directives'
75
+ `reconnected` callback will be called prior to its next `update`/`render`
76
+ callbacks. Note that `LitElement` will call this method by default on the
77
+ rendered part in its `connectedCallback` and `disconnetedCallback`.
78
+ - Added the `static-html` module, a static `html` tag function, a `literal` tag function, and `unsafeStatic()`, which allows template authors to add strings to the
79
+ static structure of the template, before it's parsed as HTML. See [Static expressions](https://lit.dev/docs/templates/expressions/#static-expressions) for more details.
80
+ - Added `lit-html/directive-helpers.js` module with helpers for creating custom directives. See [Custom directives](https://lit.dev/docs/api/custom-directives/#clearPart) for more details.
81
+ - Rendering `null`, `undefined`, or empty string in a `ChildPart` now has the same affect as rendering `nothing`: it does not produce an empty text node. When rendering into an element with Shadow DOM, this makes it harder to inadvertently prevent `<slot>` fallback content from rendering.
82
+ - Nested directives whose parent returns `noChange` are now unchanged. This
83
+ allows the `guard` directive to guard directive values ([#1519](https://github.com/Polymer/lit-html/issues/1519)).
84
+ - Added optional `creationScope` to `RenderOptions`, which controls the node from which the template is cloned from.
85
+ - Added support for running with [Trusted Types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types) enforced.
86
+
87
+ ### Patch Changes
88
+
89
+ - [#1922](https://github.com/lit/lit/pull/1922) [`8189f094`](https://github.com/lit/lit/commit/8189f09406a5ee2f2c7351884486944fd46e1d5b) - Binding `noChange` into an interpolated attribute expression now no longer removes the attribute on first render - instead it acts like an empty string. This is mostly noticable when using `until()` without a fallback in interpolated attributes.
90
+
91
+ - [#1964](https://github.com/lit/lit/pull/1964) [`f43b811`](https://github.com/lit/lit/commit/f43b811405be32ce6caf82e80d25cb6170eeb7dc) - Don't publish src/ to npm.
92
+
93
+ * [#2070](https://github.com/lit/lit/pull/2070) [`a48f39c8`](https://github.com/lit/lit/commit/a48f39c8d5872dbc9a19a9bc72b22692950071f5) - Throw instead of rendering an innocuous value into a style or script when security hooks are enabled.
94
+
95
+ * [#2044](https://github.com/lit/lit/pull/2044) [`662209c3`](https://github.com/lit/lit/commit/662209c370d2f5f58cb2f24e558125f91baeebd0) - Improves disconnection handling for first-party `AsyncDirective`s (`until`, `asyncAppend`, `asyncReplace`) so that the directive (and any DOM associated with it) can be garbage collected before any promises they are awaiting resolve.
96
+
97
+ ## 2.0.0-rc.5
98
+
99
+ ### Patch Changes
100
+
101
+ - [#2098](https://github.com/lit/lit/pull/2098) [`b3121ab7`](https://github.com/lit/lit/commit/b3121ab7ce71d6947d1081995e962806f32bc5ea) - Fix ChildPart parentNode for top-level parts to return the parentNode they _will_ be inserted into, rather than the DocumentFragment they were cloned into. Fixes #2032.
102
+
103
+ * [#2103](https://github.com/lit/lit/pull/2103) [`15a8356d`](https://github.com/lit/lit/commit/15a8356ddd59a1e80880a93acd21fadc9c24e14b) - Updates the `exports` field of `package.json` files to replace the [subpath
104
+ folder
105
+ mapping](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#packages_subpath_folder_mappings)
106
+ syntax with an explicit list of all exported files.
107
+
108
+ The `/`-suffixed syntax for subpath folder mapping originally used in these
109
+ files is deprecated. Rather than update to the new syntax, this change replaces
110
+ these mappings with individual entries for all exported files so that (a) users
111
+ must import using extensions and (b) bundlers or other tools that don't resolve
112
+ subpath folder mapping exactly as Node.js does won't break these packages'
113
+ expectations around how they're imported.
114
+
115
+ - [#2074](https://github.com/lit/lit/pull/2074) [`d6b385e3`](https://github.com/lit/lit/commit/d6b385e3e4ae2ff23c1ecc3164fa7bb1a20c7dd5) - (Cleanup) Added missing tests to close out TODOs in the code.
116
+ Fixed `unsafeHTML` and `unsafeSVG` to render no content (empty string) for values `undefined`, `null`, and `nothing`.
117
+
118
+ * [#1922](https://github.com/lit/lit/pull/1922) [`8189f094`](https://github.com/lit/lit/commit/8189f09406a5ee2f2c7351884486944fd46e1d5b) - Binding `noChange` into an interpolated attribute expression now no longer removes the attribute on first render - instead it acts like an empty string. This is mostly noticable when using `until()` without a fallback in interpolated attributes.
119
+
120
+ - [#2114](https://github.com/lit/lit/pull/2114) [`b4bd9f7c`](https://github.com/lit/lit/commit/b4bd9f7c7d036da8667cbd7075af4f6d6f27bc32) - Parts are not supported inside the `template` or `textarea` tags. In dev mode, we indicate if parts are placed here so the developer can remove them.
121
+
122
+ * [#2113](https://github.com/lit/lit/pull/2113) [`5b2f3642`](https://github.com/lit/lit/commit/5b2f3642ff91931b5b01f8bdd2ed98aba24f1047) - Dependency upgrades including TypeScript 4.4.2
123
+
124
+ - [#2072](https://github.com/lit/lit/pull/2072) [`7adfbb0c`](https://github.com/lit/lit/commit/7adfbb0cd32a7eab82551aa6c9d1434e7c4b563e) - Remove unneeded `matches` support in @queryAssignedNodes. Update styling tests to use static bindings where needed. Fix TODOs related to doc links.
125
+
126
+ * [#2119](https://github.com/lit/lit/pull/2119) [`24feb430`](https://github.com/lit/lit/commit/24feb4306ec3ddf2996c678a266a211b52f6aff2) - Added lit.dev/msg links to dev mode warnings.
127
+
128
+ - [#1764](https://github.com/lit/lit/pull/1764) [`0b4d6eda`](https://github.com/lit/lit/commit/0b4d6eda5220aeb53abe250217d70dcb8f45fe43) - Don't allow classMap to remove static classes. This keeps classMap consistent with building a string out of the classnames to be applied.
129
+
130
+ * [#2071](https://github.com/lit/lit/pull/2071) [`01353317`](https://github.com/lit/lit/commit/013533178ded7fb5e533e15f6dc982de25d12b94) - In dev mode, throw for tag name bindings. These should use static templates.
131
+
132
+ - [#2070](https://github.com/lit/lit/pull/2070) [`a48f39c8`](https://github.com/lit/lit/commit/a48f39c8d5872dbc9a19a9bc72b22692950071f5) - Throw instead of rendering an innocuous value into a style or script when security hooks are enabled.
133
+
134
+ * [#2075](https://github.com/lit/lit/pull/2075) [`724a9aab`](https://github.com/lit/lit/commit/724a9aabe263fb9dafee073e74de50a1aeabbe0f) - Ensures dev mode warnings do not spam by taking care to issue unique warnings only once.
135
+
136
+ - [#2076](https://github.com/lit/lit/pull/2076) [`0d703bfb`](https://github.com/lit/lit/commit/0d703bfbc9eb515a6bba8bf5ca608bbcd60fee98) - Optimize setting primitives on ChildNode.
137
+
138
+ * [#2073](https://github.com/lit/lit/pull/2073) [`0312f3e5`](https://github.com/lit/lit/commit/0312f3e533611eb3f4f9381594485a33ad003b74) - (Cleanup) Removed obsolete TODOs from codebase
139
+
140
+ - [#2056](https://github.com/lit/lit/pull/2056) [`e5667d66`](https://github.com/lit/lit/commit/e5667d66f4da58e74206fdef526b1c21a6e45925) - Fixed issue where `AsyncDirective`s could see `this.isConnected === true` if a LitElement performed its initial render while it was disconnected.
141
+
142
+ * [#2128](https://github.com/lit/lit/pull/2128) [`cc5c3a09`](https://github.com/lit/lit/commit/cc5c3a09a150bd19ce5445333dfb3799d33e03de) - Add test for AsyncDirectives that synchronously call this.setValue()
143
+
144
+ - [#2046](https://github.com/lit/lit/pull/2046) [`043a16fb`](https://github.com/lit/lit/commit/043a16fbfbd55c71fbee399691537765277694ea) - In development mode, constructing an `EventPart` from an improperly formed attribute will now throw: the attribute must contain only a single expression and the surrounding two strings must be the empty string. Before, constructing an `EventPart` with extra expressions or surrounding text would cause that part to be silently and incorrectly treated as an `AttributePart`.
145
+
146
+ * [#2043](https://github.com/lit/lit/pull/2043) [`761375ac`](https://github.com/lit/lit/commit/761375ac9ef28dd0ba8a1f9363aaf5f0df725205) - Update some internal types to avoid casting `globalThis` to `any` to retrieve globals where possible.
147
+
148
+ ## 2.0.0-rc.4
149
+
150
+ ### Major Changes
151
+
152
+ - [#1959](https://github.com/lit/lit/pull/1959) [`69389958`](https://github.com/lit/lit/commit/69389958ab41b2ad3074fd86926ed18dc9968302) - Changed all prefixes used for minifying object and class properties from greek
153
+ characters to ASCII, to avoid requiring an explicit script charset on some
154
+ browser/webview environments.
155
+
156
+ ### Patch Changes
157
+
158
+ - [#2002](https://github.com/lit/lit/pull/2002) [`ff0d1556`](https://github.com/lit/lit/commit/ff0d15568fe79019ebfa6b72b88ba86aac4af91b) - Fixes polyfill-support styling issues: styling should be fully applied by firstUpdated/update time; late added styles are now retained (matching Lit1 behavior)
159
+
160
+ * [#2034](https://github.com/lit/lit/pull/2034) [`5768cc60`](https://github.com/lit/lit/commit/5768cc604dc7fcb2c95165399180179d406bb257) - Reverts the change in Lit 2 to pause ReactiveElement's update cycle while the element is disconnected. The update cycle for elements will now run while disconnected as in Lit 1, however AsyncDirectives must now check the `this.isConnected` flag during `update` to ensure that e.g. subscriptions that could lead to memory leaks are not made when AsyncDirectives update while disconnected.
161
+
162
+ - [#1942](https://github.com/lit/lit/pull/1942) [`c8fe1d4`](https://github.com/lit/lit/commit/c8fe1d4c4a8b1c9acdd5331129ae3641c51d9904) - For minified class fields on classes in lit libraries, added prefix to stable properties to avoid collisions with user properties.
163
+
164
+ * [#2041](https://github.com/lit/lit/pull/2041) [`52a47c7e`](https://github.com/lit/lit/commit/52a47c7e25d71ff802083ca9b0751724efd3a4f4) - Remove some unnecessary internal type declarations.
165
+
166
+ - [#1959](https://github.com/lit/lit/pull/1959) [`6938995`](https://github.com/lit/lit/commit/69389958ab41b2ad3074fd86926ed18dc9968302) - Changed prefix used for minifying class field names on lit libraries to stay within ASCII subset, to avoid needing to explicitly set the charset for scripts in some browsers.
167
+
168
+ * [#1937](https://github.com/lit/lit/pull/1937) [`3663f09`](https://github.com/lit/lit/commit/3663f09af853bc92172c929a356e301b42b19f1f) - Re-export PropertyPart from 'directive.ts'
169
+
170
+ - [#1964](https://github.com/lit/lit/pull/1964) [`f43b811`](https://github.com/lit/lit/commit/f43b811405be32ce6caf82e80d25cb6170eeb7dc) - Don't publish src/ to npm.
171
+
172
+ * [#1991](https://github.com/lit/lit/pull/1991) [`f05be301`](https://github.com/lit/lit/commit/f05be301e36fce93ae887007c0bdd328e5434225) - Fixed bug where Template.createElement was not patchable by polyfill-support when compiled using closure compiler, leading to incorrect style scoping.
173
+
174
+ - [#2016](https://github.com/lit/lit/pull/2016) [`e6dc6a7`](https://github.com/lit/lit/commit/e6dc6a708adacec6a17a884784f821c3250d7532) - Clean up internal TypeScript types
175
+
176
+ * [#1990](https://github.com/lit/lit/pull/1990) [`56e8efd3`](https://github.com/lit/lit/commit/56e8efd3fc654396421e7024f82f0eac9d2c4d33) - Fixed an error thrown when an empty `<style></style>` tag is rendered while using the @apply shim under native Shadow DOM.
177
+
178
+ - [#2044](https://github.com/lit/lit/pull/2044) [`662209c3`](https://github.com/lit/lit/commit/662209c370d2f5f58cb2f24e558125f91baeebd0) - Improves disconnection handling for first-party `AsyncDirective`s (`until`, `asyncAppend`, `asyncReplace`) so that the directive (and any DOM associated with it) can be garbage collected before any promises they are awaiting resolve.
179
+
180
+ * [#1972](https://github.com/lit/lit/pull/1972) [`a791514b`](https://github.com/lit/lit/commit/a791514b426b790de2bfa4c78754fb62815e71d4) - Properties that must remain unminified are now compatible with build tools other than rollup/terser.
181
+
182
+ - [#2050](https://github.com/lit/lit/pull/2050) [`8758e06`](https://github.com/lit/lit/commit/8758e06c7a142332fd4c3334d8806b3b51c7f249) - Fix syntax highlighting in some documentation examples
183
+
184
+ ---
185
+
186
+ Changes below were based on the [Keep a Changelog](http://keepachangelog.com/) format. All changes above are generated automatically by [Changesets](https://github.com/atlassian/changesets).
187
+
188
+ ---
7
189
 
8
190
  <!--
9
191
  PRs should document their user-visible changes (if any) in the
@@ -17,6 +199,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
17
199
  <!-- ### Fixed -->
18
200
  <!-- ### Removed -->
19
201
 
202
+ ## [2.0.0-rc.3] - 2021-05-07
203
+
204
+ ### Fixed
205
+
206
+ - Exported the `Ref` interface.
207
+
20
208
  ## [2.0.0-rc.2] - 2021-04-20
21
209
 
22
210
  ### Changed
@@ -97,43 +285,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
97
285
 
98
286
  ### Changed
99
287
 
100
- - [Breaking] Directives that asynchronously update their part value must now
288
+ - Directives that asynchronously update their part value must now
101
289
  extend `DisconnectableDirective` and call `this.setValue()`, a new API exposed
102
290
  on the `DisconnectableDirective` class. Directives that render synchronously
103
291
  to their `update` lifecycle should simply return the value to be committed to
104
292
  their part from `update`/`render`.
105
293
 
106
- - [Breaking] The `Directive` base class and `directive()` factory function are
294
+ - The `Directive` base class and `directive()` factory function are
107
295
  now exported from the `lit-html/directive.js` module.
108
296
 
109
- - [Breaking] (since 2.0.0-pre.3) The Part type constants (`NODE_PART`, etc) are
297
+ - (since 2.0.0-pre.3) The Part type constants (`NODE_PART`, etc) are
110
298
  removed from the main `lit-html` module and exported as an enum-object named
111
299
  `PartType` from `lit-html/directive.js`. Use `PartType.NODE` instead of
112
300
  `NODE_TYPE`.
113
301
 
114
- - [Breaking] (since 2.0.0-pre.3)) `lit-html/parts.js` has been renamed to
302
+ - (since 2.0.0-pre.3)) `lit-html/parts.js` has been renamed to
115
303
  `lit-html/directive-helpers.js`.
116
304
 
117
- - [Breaking] (since 2.0.0-pre.3)) Originally in `lit-html/parts.js`,
305
+ - (since 2.0.0-pre.3)) Originally in `lit-html/parts.js`,
118
306
  `createAndInsertPart()` and `insertPartBefore()` have been combined into a single `insertPart()` function in `lit-html/directive-helpers.js`. `detachNodePart()` and `restoreNodePart()` have been removed in favor of moving parts with `insertPart()`.
119
307
 
120
- - [Breaking] (since 2.0.0-pre.3) `NodePart` has been renamed to `ChildPart`,
308
+ - (since 2.0.0-pre.3) `NodePart` has been renamed to `ChildPart`,
121
309
  along with other methods and variables that use the "Node" naming, like
122
310
  `PartType.Node` which is now `PartType.CHILD`.
123
311
 
124
- - [Breaking] (since 2.0.0-pre.3) The `DirectiveClass`, `DirectiveParameters`
312
+ - (since 2.0.0-pre.3) The `DirectiveClass`, `DirectiveParameters`
125
313
  and `PartInfo` types have been moved from `lit-html` to
126
314
  `lit-html/directive.ts`.
127
315
 
128
- - [Breaking] (since 2.0.0-pre.3) The part exports (`ChildPart`,
316
+ - (since 2.0.0-pre.3) The part exports (`ChildPart`,
129
317
  `AttributePart`, etc) have been change to interface-only exports. The constructors are no longer exported. Directive authors should use helpers in `directive-helpers.js` to construct parts.
130
318
 
131
- - [Breaking] (since 2.0.0-pre.3) The `setPartValue` function in
319
+ - (since 2.0.0-pre.3) The `setPartValue` function in
132
320
  `directove-helpers.js` has been renamed to `setChildPartValue` and now only
133
321
  supports ChildParts. Directives that require updating their container
134
322
  part outside the `render`/`update` lifecycle should extend
135
323
  `DisconnectableDirective` and use `this.setValue()`.
136
- - [Breaking] (since 2.0.0-pre.3) [Breaking] The `eventContext` render option has been changed to `host`.
324
+ - (since 2.0.0-pre.3) The `eventContext` render option has been changed to `host`.
137
325
 
138
326
  <!-- ### Fixed -->
139
327
  <!-- ### Removed -->
@@ -142,13 +330,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
142
330
 
143
331
  ### Changed
144
332
 
145
- - [Breaking] The `shady-render` module has been removed and is now part of `platform-support`. There are also a couple of breaking changes. (1) Bindings in style elements are no longer supported. Previously these could not change and in the future they may be supported via static bindings. (2) `ShadyCSS.styleElement` is no longer called automatically. This must be called whenever dynamic changes that affect styling are made that involve css custom property shimming (older browsers) or changes to custom properties used via the deprecated `@apply` feature. It was previously called only on first render, and it is now up to the user to decide when this should be called.
146
- - [Breaking] `render()` no longer clears the container it's rendered to. It now appends to the container by default.
147
- - [Breaking] Expressions in comments are not rendered or updated.
148
- - [Breaking] Template caching happens per callsite, not per template-tag/callsize pair. This means some rare forms of highly dynamic template tags are no longer supported.
149
- - [Breaking] Arrays and other iterables passed to attribute bindings are not specially handled. Arrays will be rendered with their default toString representation. This means that `` html`<div class=${['a', 'b']}> `` will render `<div class="a,b">` instead of `<div class="a b">`. To get the old behavior, use `array.join(' ')`.
333
+ - The `shady-render` module has been removed and is now part of `platform-support`. There are also a couple of breaking changes. (1) Bindings in style elements are no longer supported. Previously these could not change and in the future they may be supported via static bindings. (2) `ShadyCSS.styleElement` is no longer called automatically. This must be called whenever dynamic changes that affect styling are made that involve css custom property shimming (older browsers) or changes to custom properties used via the deprecated `@apply` feature. It was previously called only on first render, and it is now up to the user to decide when this should be called.
334
+ - `render()` no longer clears the container it's rendered to. It now appends to the container by default.
335
+ - Expressions in comments are not rendered or updated.
336
+ - Template caching happens per callsite, not per template-tag/callsize pair. This means some rare forms of highly dynamic template tags are no longer supported.
337
+ - Arrays and other iterables passed to attribute bindings are not specially handled. Arrays will be rendered with their default toString representation. This means that `` html`<div class=${['a', 'b']}> `` will render `<div class="a,b">` instead of `<div class="a b">`. To get the old behavior, use `array.join(' ')`.
150
338
  - Multiple bindings in a single attribute value don't require the attribute value is quoted, as long as there is no whitespace or other attribute-ending character in the attribute value. `` html`<div id=${a}-${b}> ``
151
- - [Breaking] The directive and part APIs are significantly different. See the [README](README.md) for mroe details.
339
+ - The directive and part APIs are significantly different. See the [README](README.md) for mroe details.
152
340
 
153
341
  ### Added
154
342
 
@@ -163,10 +351,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
163
351
 
164
352
  ### Removed
165
353
 
166
- - [Breaking] The `templateFactory` option of `RenderOptions` has been removed.
167
- - [Breaking] TemplateProcessor has been removed.
168
- - [Breaking] Symbols are not converted to a string before mutating DOM, so passing a Symbol to an attribute or text binding will result in an exception.
169
- - [Breaking] The `asyncAppend` and `asyncReplace` directives are not implemented.
354
+ - The `templateFactory` option of `RenderOptions` has been removed.
355
+ - TemplateProcessor has been removed.
356
+ - Symbols are not converted to a string before mutating DOM, so passing a Symbol to an attribute or text binding will result in an exception.
357
+ - The `asyncAppend` and `asyncReplace` directives are not implemented.
170
358
 
171
359
  ## [1.3.0] - 2020-08-19
172
360
 
@@ -271,8 +459,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
271
459
  ### Changed
272
460
 
273
461
  - `until()` can now take any number of sync or async arguments. ([#555](https://github.com/Polymer/lit-html/pull/555))
274
- - [Breaking] `guard()` supports multiple dependencies. If the first argument to `guard()` is an array, the array items are checked for equality to previous values. ([#666](https://github.com/Polymer/lit-html/pull/666))
275
- - [Breaking] Renamed `classMap.js` and `styleMap.js` files to kebab-case. ([#644](https://github.com/Polymer/lit-html/pull/644))
462
+ - `guard()` supports multiple dependencies. If the first argument to `guard()` is an array, the array items are checked for equality to previous values. ([#666](https://github.com/Polymer/lit-html/pull/666))
463
+ - Renamed `classMap.js` and `styleMap.js` files to kebab-case. ([#644](https://github.com/Polymer/lit-html/pull/644))
276
464
 
277
465
  ### Added
278
466
 
@@ -282,7 +470,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
282
470
 
283
471
  ### Removed
284
472
 
285
- - [Breaking] Removed the `when()` directive. Users may achieve similar behavior by wrapping a ternary with the `cache()` directive.
473
+ - Removed the `when()` directive. Users may achieve similar behavior by wrapping a ternary with the `cache()` directive.
286
474
 
287
475
  ### Fixed
288
476
 
@@ -294,7 +482,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
294
482
 
295
483
  ### Changed
296
484
 
297
- - [Breaking] Directives are now defined by passing the entire directive factory function to `directive()`. ([#562](https://github.com/Polymer/lit-html/pull/562))
485
+ - Directives are now defined by passing the entire directive factory function to `directive()`. ([#562](https://github.com/Polymer/lit-html/pull/562))
298
486
 
299
487
  ### Fixed
300
488
 
@@ -309,7 +497,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
309
497
 
310
498
  - Re-implemented repeat directive for better performance ([#501](https://github.com/Polymer/lit-html/pull/501))
311
499
  - Updated TypeScript dependency to 3.1
312
- - [Breaking] `render()` now takes an options object as the third argument. ([#523](https://github.com/Polymer/lit-html/pull/523))
500
+ - `render()` now takes an options object as the third argument. ([#523](https://github.com/Polymer/lit-html/pull/523))
313
501
 
314
502
  ### Added
315
503
 
@@ -1,20 +1,20 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2017, The Polymer Authors. All rights reserved.
3
+ Copyright (c) 2017 Google LLC. All rights reserved.
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without
6
6
  modification, are permitted provided that the following conditions are met:
7
7
 
8
- * Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
10
 
11
- * Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
14
 
15
- * Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
18
 
19
19
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
20
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,135 +1,21 @@
1
- # lit-html 2.0 Pre-release
1
+ # lit-html 2.0
2
2
 
3
3
  Efficient, Expressive, Extensible HTML templates in JavaScript
4
4
 
5
- [![Build Status](https://github.com/polymer/lit-html/workflows/Tests/badge.svg)](https://github.com/Polymer/lit-html/actions?query=workflow%3ATests)
6
- [![Published on npm](https://img.shields.io/npm/v/lit-html/next-major)](https://www.npmjs.com/package/lit-html)
5
+ [![Build Status](https://github.com/lit/lit/workflows/Tests/badge.svg)](https://github.com/lit/lit/actions?query=workflow%3ATests)
6
+ [![Published on npm](https://img.shields.io/npm/v/lit-html/next)](https://www.npmjs.com/package/lit-html)
7
7
  [![Join our Slack](https://img.shields.io/badge/slack-join%20chat-4a154b.svg)](https://www.polymer-project.org/slack-invite)
8
8
  [![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)
9
9
 
10
- ## 🚨 About this pre-release
11
-
12
- This is a major version pre-release of lit-html 2.0. See issue
13
- [#1182](https://github.com/Polymer/lit-html/issues/1182) for the full list of changes
14
- planned/considered for this release.
15
-
16
- This pre-release is not yet feature complete or API stable. Please note the
17
- breaking changes, known issues, and limitations below, and use at your risk
18
- until the stable release is available. Issues are welcome
19
- for unexpected changes not noted below or in the changelog.
20
-
21
- ## 🚨 Breaking changes
22
-
23
- While `lit-html` 2.0 is intended to be a backward-compatible change for the
24
- majority of 1.x users, please be aware of the following notable breaking
25
- changes:
26
-
27
- - New `directive` and `Part` API (see below for migration info)
28
- - `render()` no longer clears its container on first render
29
- - Custom `templateFactory`, `TemplateProcessor`, and custom tag functions are no
30
- longer supported
31
- - The `polyfill-support.js` file must be loaded when using the `webcomponents`
32
- polyfills
33
-
34
- See the full [changelog](CHANGELOG.md) for more details on
35
- these and other minor breaking changes.
36
-
37
- ## 🚨 Migrating directives
38
-
39
- While the API for _using_ directives should be 100% backward-compatible with
40
- 1.x, there is a breaking change to how custom directives are _authored_. The API
41
- change improves ergonomics around making stateful directives while providing a
42
- clear pattern for SSR-compatible directives: only `render` will be called on the
43
- server, while `update` will not be.
44
-
45
- <details>
46
- <summary>Expand here for details on migrating directives.</summary>
47
-
48
- ### Overview of directive API changes
49
-
50
- | | 1.x API | 2.0 API |
51
- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
52
- | Code idiom for directive | function that takes directive arguments, and returns function that takes `part` and returns value | class with `update` & `render` methods which accept directive arguments |
53
- | Where to do declarative rendering | pass value to `part.setValue()` | return value from `render()` method |
54
- | Where to do imperative DOM/part manipulation | directive function | `update()` method |
55
- | Where state is stored between renders | `WeakMap` keyed on `part` | class instance fields |
56
- | How part validation is done | `instanceof` check on `part` in every render | `part.type` check in constructor |
57
-
58
- ### Example directive migration
59
-
60
- Below is an example of a lit-html 1.x directive, and how to migrate it to the
61
- new API:
62
-
63
- 1.x Directive API:
64
-
65
- ```js
66
- import {directive, NodePart, html} from 'lit-html';
67
-
68
- // State stored in WeakMap
69
- const previousState = new WeakMap();
70
-
71
- // Functional-based directive API
72
- export const renderCounter = directive((initialValue) => (part) => {
73
- // When necessary, validate part type each render using `instanceof`
74
- if (!(part instanceof NodePart)) {
75
- throw new Error('renderCounter only supports NodePart');
76
- }
77
- // Retrieve value from previous state
78
- let value = previousState.get(part);
79
- // Update state
80
- if (previous === undefined) {
81
- value = initialValue;
82
- } else {
83
- value++;
84
- }
85
- // Store state
86
- previousState.set(part, value);
87
- // Update part with new rendering
88
- part.setValue(html`<p>${value}</p>`);
89
- });
90
- ```
10
+ lit-html is the template system that powers the [Lit](https://lit.dev) library for building fast web components. When using `lit-html` to develop web components, most users should import lit-html via the [`lit`](https://www.npmjs.com/package/lit) package rather than installing and importing from `lit-html` directly.
91
11
 
92
- 2.0 Directive API:
93
-
94
- ```js
95
- import {html} from 'lit-html';
96
- import {directive, Directive, PartType} from 'lit-html/directive.js';
97
-
98
- // Class-based directive API
99
- export const renderCounter = directive(
100
- class extends Directive {
101
- // State stored in class field
102
- value = undefined;
103
- constructor(partInfo: PartInfo, index?: number) {
104
- super(partInfo, index);
105
- // When necessary, validate part in constructor using `part.type`
106
- if (partInfo.type !== PartType.CHILD) {
107
- throw new Error('renderCounter only supports child expressions');
108
- }
109
- }
110
- // Any imperative updates to DOM/parts would go here
111
- update(part, [initialValue]) {
112
- // ...
113
- }
114
- // Do SSR-compatible rendering (arguments are passed from call site)
115
- render(initialValue) {
116
- // Previous state available on class field
117
- if (this.value === undefined) {
118
- this.value = initialValue;
119
- } else {
120
- this.value++;
121
- }
122
- return html`<p>${this.value}</p>`;
123
- }
124
- }
125
- );
126
- ```
12
+ ## About this release
127
13
 
128
- </details>
14
+ This is a stable release of `lit-html` 2.0 (part of the Lit 2.0 release). If upgrading from previous versions of `lit-html`, please note the minor breaking changes from lit-html 1.0 in the [Upgrade Guide](https://lit.dev/docs/releases/upgrade/).
129
15
 
130
- <hr>
16
+ ## Documentation
131
17
 
132
- # lit-html
18
+ Full documentation is available at [lit.dev](https://lit.dev).
133
19
 
134
20
  ## Overview
135
21
 
@@ -161,48 +47,12 @@ render(helloTemplate('Kevin'), document.body);
161
47
  $ npm install lit-html
162
48
  ```
163
49
 
164
- ## Development mode
165
-
166
- lit-html includes a development mode which adds additional checks that are
167
- reported in the console.
168
-
169
- To enable development mode, add the `development` exports condition to your node
170
- resolve configuration.
171
-
172
- #### @web/dev-server
173
-
174
- ```js
175
- {
176
- nodeResolve: {
177
- exportConditions: ['development'],
178
- }
179
- }
180
- ```
50
+ Or use from `lit`:
181
51
 
182
- #### Rollup
183
-
184
- ```js
185
- {
186
- plugins: [
187
- nodeResolve({
188
- exportConditions: ['development'],
189
- }),
190
- ],
191
- }
192
- ```
193
-
194
- #### Webpack
195
-
196
- > NOTE: Requires [Webpack v5](https://webpack.js.org/migrate/5/)
197
-
198
- ```js
199
- {
200
- resolve: {
201
- conditionNames: ['development'],
202
- }
203
- }
52
+ ```bash
53
+ $ npm install lit
204
54
  ```
205
55
 
206
56
  ## Contributing
207
57
 
208
- Please see [CONTRIBUTING.md](../../CONTRIBUTING.md).
58
+ Please see [CONTRIBUTING.md](./CONTRIBUTING.md).