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,9 +3,8 @@
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { directive, Directive, PartType, } from '../directive.js';
7
6
  import { noChange } from '../lit-html.js';
8
-
7
+ import { directive, Directive, PartType, } from '../directive.js';
9
8
  class ClassMapDirective extends Directive {
10
9
  constructor(partInfo) {
11
10
  var _a;
@@ -18,16 +17,26 @@ class ClassMapDirective extends Directive {
18
17
  }
19
18
  }
20
19
  render(classInfo) {
21
- return Object.keys(classInfo)
22
- .filter((key) => classInfo[key])
23
- .join(' ');
20
+ // Add spaces to ensure separation from static classes
21
+ return (' ' +
22
+ Object.keys(classInfo)
23
+ .filter((key) => classInfo[key])
24
+ .join(' ') +
25
+ ' ');
24
26
  }
25
27
  update(part, [classInfo]) {
28
+ var _a, _b;
26
29
  // Remember dynamic classes on the first render
27
30
  if (this._previousClasses === undefined) {
28
31
  this._previousClasses = new Set();
32
+ if (part.strings !== undefined) {
33
+ this._staticClasses = new Set(part.strings
34
+ .join(' ')
35
+ .split(/\s/)
36
+ .filter((s) => s !== ''));
37
+ }
29
38
  for (const name in classInfo) {
30
- if (classInfo[name]) {
39
+ if (classInfo[name] && !((_a = this._staticClasses) === null || _a === void 0 ? void 0 : _a.has(name))) {
31
40
  this._previousClasses.add(name);
32
41
  }
33
42
  }
@@ -48,7 +57,8 @@ class ClassMapDirective extends Directive {
48
57
  // We explicitly want a loose truthy check of `value` because it seems
49
58
  // more convenient that '' and 0 are skipped.
50
59
  const value = !!classInfo[name];
51
- if (value !== this._previousClasses.has(name)) {
60
+ if (value !== this._previousClasses.has(name) &&
61
+ !((_b = this._staticClasses) === null || _b === void 0 ? void 0 : _b.has(name))) {
52
62
  if (value) {
53
63
  classList.add(name);
54
64
  this._previousClasses.add(name);
@@ -1 +1 @@
1
- {"version":3,"file":"class-map.js","sourceRoot":"","sources":["../../src/directives/class-map.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgB,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,iBAAiB,CAAC;AASzB,MAAM,iBAAkB,SAAQ,SAAS;IAOvC,YAAY,QAAkB;;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IACE,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS;YACpC,QAAQ,CAAC,IAAI,KAAK,OAAO;YACzB,CAAC,MAAA,QAAQ,CAAC,OAAO,0CAAE,MAAiB,IAAG,CAAC,EACxC;YACA,MAAM,IAAI,KAAK,CACb,yDAAyD;gBACvD,6CAA6C,CAChD,CAAC;SACH;IACH,CAAC;IAED,MAAM,CAAC,SAAoB;QACzB,OAAO,MA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BACpB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;iBACjC;qBAAM;oBACL,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;oBACvB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACpC;aACF;SACF;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n return Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ');\n }\n\n update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n for (const name in classInfo) {\n if (classInfo[name]) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n // We use forEach() instead of for-of so that we don't require down-level\n // iteration.\n this._previousClasses.forEach((name) => {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n });\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (value !== this._previousClasses.has(name)) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsey, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n"]}
1
+ {"version":3,"file":"class-map.js","sourceRoot":"","sources":["../../src/directives/class-map.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgB,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,iBAAiB,CAAC;AASzB,MAAM,iBAAkB,SAAQ,SAAS;IAQvC,YAAY,QAAkB;;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IACE,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS;YACpC,QAAQ,CAAC,IAAI,KAAK,OAAO;YACzB,CAAC,MAAA,QAAQ,CAAC,OAAO,0CAAE,MAAiB,IAAG,CAAC,EACxC;YACA,MAAM,IAAI,KAAK,CACb,yDAAyD;gBACvD,6CAA6C,CAChD,CAAC;SACH;IACH,CAAC;IAED,MAAM,CAAC,SAAoB;QACzB,sDAAsD;QACtD,OAAO,CACL,GAAG;YACH,MAAM,CAAC,IAAI,CA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,CAAC,CAAC;aACrC;QACH,CAAC,CAAC,CAAC;QAEH,sDAAsD;QACtD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE;YAC5B,sEAAsE;YACtE,6CAA6C;YAC7C,MAAM,KAAK,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAChC,IACE,KAAK,KAAK,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC;gBACzC,CAAC,CAAA,MAAA,IAAI,CAAC,cAAc,0CAAE,GAAG,CAAC,IAAI,CAAC,CAAA,EAC/B;gBACA,IAAI,KAAK,EAAE;oBACT,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACpB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;iBACjC;qBAAM;oBACL,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;oBACvB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACpC;aACF;SACF;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of class names to truthy values.\n */\nexport interface ClassInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nclass ClassMapDirective extends Directive {\n /**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\n private _previousClasses?: Set<string>;\n private _staticClasses?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'class' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n '`classMap()` can only be used in the `class` attribute ' +\n 'and must be the only part in the attribute.'\n );\n }\n }\n\n render(classInfo: ClassInfo) {\n // Add spaces to ensure separation from static classes\n return (\n ' ' +\n Object.keys(classInfo)\n .filter((key) => classInfo[key])\n .join(' ') +\n ' '\n );\n }\n\n override update(part: AttributePart, [classInfo]: DirectiveParameters<this>) {\n // Remember dynamic classes on the first render\n if (this._previousClasses === undefined) {\n this._previousClasses = new Set();\n if (part.strings !== undefined) {\n this._staticClasses = new Set(\n part.strings\n .join(' ')\n .split(/\\s/)\n .filter((s) => s !== '')\n );\n }\n for (const name in classInfo) {\n if (classInfo[name] && !this._staticClasses?.has(name)) {\n this._previousClasses.add(name);\n }\n }\n return this.render(classInfo);\n }\n\n const classList = part.element.classList;\n\n // Remove old classes that no longer apply\n // We use forEach() instead of for-of so that we don't require down-level\n // iteration.\n this._previousClasses.forEach((name) => {\n if (!(name in classInfo)) {\n classList.remove(name);\n this._previousClasses!.delete(name);\n }\n });\n\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n const value = !!classInfo[name];\n if (\n value !== this._previousClasses.has(name) &&\n !this._staticClasses?.has(name)\n ) {\n if (value) {\n classList.add(name);\n this._previousClasses.add(name);\n } else {\n classList.remove(name);\n this._previousClasses.delete(name);\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies dynamic CSS classes.\n *\n * This must be used in the `class` attribute and must be the only part used in\n * the attribute. It takes each property in the `classInfo` argument and adds\n * the property name to the element's `classList` if the property value is\n * truthy; if the property value is falsey, the property name is removed from\n * the element's `class`.\n *\n * For example `{foo: bar}` applies the class `foo` if the value of `bar` is\n * truthy.\n *\n * @param classInfo\n */\nexport const classMap = directive(ClassMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {ClassMapDirective};\n"]}
@@ -3,9 +3,8 @@
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { Directive, DirectiveParameters } from '../directive.js';
7
6
  import { Part } from '../lit-html.js';
8
-
7
+ import { Directive, DirectiveParameters } from '../directive.js';
9
8
  declare class GuardDirective extends Directive {
10
9
  private _previousValue;
11
10
  render(_value: unknown, f: () => unknown): unknown;
@@ -28,6 +27,7 @@ declare class GuardDirective extends Directive {
28
27
  * <div>
29
28
  * ${guard([user.id, company.id], () => html`...`)}
30
29
  * </div>
30
+ * `
31
31
  * ```
32
32
  *
33
33
  * In this case, the template only rerenders if either `user.id` or `company.id`
@@ -43,6 +43,7 @@ declare class GuardDirective extends Directive {
43
43
  * <div>
44
44
  * ${guard([immutableItems], () => immutableItems.map(i => html`${i}`))}
45
45
  * </div>
46
+ * `
46
47
  * ```
47
48
  *
48
49
  * In this case, items are mapped over only when the array reference changes.
@@ -1 +1 @@
1
- {"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/directives/guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAW,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAY,SAAS,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAK1E,cAAM,cAAe,SAAQ,SAAS;IACpC,OAAO,CAAC,cAAc,CAAyB;IAE/C,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,OAAO;IAIxC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CAqB1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,KAAK,6BAlEiB,OAAO,qEAkEI,CAAC;AAE/C;;;GAGG;AACH,YAAY,EAAC,cAAc,EAAC,CAAC"}
1
+ {"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/directives/guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAW,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAY,SAAS,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAK1E,cAAM,cAAe,SAAQ,SAAS;IACpC,OAAO,CAAC,cAAc,CAAyB;IAE/C,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,OAAO;IAI/B,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CAqBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,6BApEiB,OAAO,qEAoEI,CAAC;AAE/C;;;GAGG;AACH,YAAY,EAAC,cAAc,EAAC,CAAC"}
@@ -3,9 +3,8 @@
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { directive, Directive } from '../directive.js';
7
6
  import { noChange } from '../lit-html.js';
8
-
7
+ import { directive, Directive } from '../directive.js';
9
8
  // A sentinal that indicates guard() hasn't rendered anything yet
10
9
  const initialValue = {};
11
10
  class GuardDirective extends Directive {
@@ -53,6 +52,7 @@ class GuardDirective extends Directive {
53
52
  * <div>
54
53
  * ${guard([user.id, company.id], () => html`...`)}
55
54
  * </div>
55
+ * `
56
56
  * ```
57
57
  *
58
58
  * In this case, the template only rerenders if either `user.id` or `company.id`
@@ -68,6 +68,7 @@ class GuardDirective extends Directive {
68
68
  * <div>
69
69
  * ${guard([immutableItems], () => immutableItems.map(i => html`${i}`))}
70
70
  * </div>
71
+ * `
71
72
  * ```
72
73
  *
73
74
  * In this case, items are mapped over only when the array reference changes.
@@ -1 +1 @@
1
- {"version":3,"file":"guard.js","sourceRoot":"","sources":["../../src/directives/guard.ts"],"names":[],"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M,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {noChange, Part} from '../lit-html.js';\nimport {directive, Directive, DirectiveParameters} from '../directive.js';\n\n// A sentinal that indicates guard() hasn't rendered anything yet\nconst initialValue = {};\n\nclass GuardDirective extends Directive {\n private _previousValue: unknown = initialValue;\n\n render(_value: unknown, f: () => unknown) {\n return f();\n }\n\n update(_part: Part, [value, f]: DirectiveParameters<this>) {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(this._previousValue) &&\n this._previousValue.length === value.length &&\n value.every((v, i) => v === (this._previousValue as Array<unknown>)[i])\n ) {\n return noChange;\n }\n } else if (this._previousValue === value) {\n // Dirty-check non-arrays by identity\n return noChange;\n }\n\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n const r = this.render(value, f);\n return r;\n }\n}\n\n/**\n * Prevents re-render of a template function until a single value or an array of\n * values changes.\n *\n * Values are checked against previous values with strict equality (`===`), and\n * so the check won't detect nested property changes inside objects or arrays.\n * Arrays values have each item checked against the previous value at the same\n * index with strict equality. Nested arrays are also checked only by strict\n * equality.\n *\n * Example:\n *\n * ```js\n * html`\n * <div>\n * ${guard([user.id, company.id], () => html`...`)}\n * </div>\n * ```\n *\n * In this case, the template only rerenders if either `user.id` or `company.id`\n * changes.\n *\n * guard() is useful with immutable data patterns, by preventing expensive work\n * until data updates.\n *\n * Example:\n *\n * ```js\n * html`\n * <div>\n * ${guard([immutableItems], () => immutableItems.map(i => html`${i}`))}\n * </div>\n * ```\n *\n * In this case, items are mapped over only when the array reference changes.\n *\n * @param value the value to check before re-rendering\n * @param f the template function\n */\nexport const guard = directive(GuardDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {GuardDirective};\n"]}
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AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {noChange, Part} from '../lit-html.js';\nimport {directive, Directive, DirectiveParameters} from '../directive.js';\n\n// A sentinal that indicates guard() hasn't rendered anything yet\nconst initialValue = {};\n\nclass GuardDirective extends Directive {\n private _previousValue: unknown = initialValue;\n\n render(_value: unknown, f: () => unknown) {\n return f();\n }\n\n override update(_part: Part, [value, f]: DirectiveParameters<this>) {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(this._previousValue) &&\n this._previousValue.length === value.length &&\n value.every((v, i) => v === (this._previousValue as Array<unknown>)[i])\n ) {\n return noChange;\n }\n } else if (this._previousValue === value) {\n // Dirty-check non-arrays by identity\n return noChange;\n }\n\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n const r = this.render(value, f);\n return r;\n }\n}\n\n/**\n * Prevents re-render of a template function until a single value or an array of\n * values changes.\n *\n * Values are checked against previous values with strict equality (`===`), and\n * so the check won't detect nested property changes inside objects or arrays.\n * Arrays values have each item checked against the previous value at the same\n * index with strict equality. Nested arrays are also checked only by strict\n * equality.\n *\n * Example:\n *\n * ```js\n * html`\n * <div>\n * ${guard([user.id, company.id], () => html`...`)}\n * </div>\n * `\n * ```\n *\n * In this case, the template only rerenders if either `user.id` or `company.id`\n * changes.\n *\n * guard() is useful with immutable data patterns, by preventing expensive work\n * until data updates.\n *\n * Example:\n *\n * ```js\n * html`\n * <div>\n * ${guard([immutableItems], () => immutableItems.map(i => html`${i}`))}\n * </div>\n * `\n * ```\n *\n * In this case, items are mapped over only when the array reference changes.\n *\n * @param value the value to check before re-rendering\n * @param f the template function\n */\nexport const guard = directive(GuardDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {GuardDirective};\n"]}
@@ -3,9 +3,8 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { Directive, DirectiveParameters, PartInfo } from '../directive.js';
7
6
  import { AttributePart } from '../lit-html.js';
8
-
7
+ import { Directive, DirectiveParameters, PartInfo } from '../directive.js';
9
8
  declare class LiveDirective extends Directive {
10
9
  constructor(partInfo: PartInfo);
11
10
  render(value: unknown): unknown;
@@ -25,7 +24,9 @@ declare class LiveDirective extends Directive {
25
24
  * it alone. If this is not what you want--if you want to overwrite the DOM
26
25
  * value with the bound value no matter what--use the `live()` directive:
27
26
  *
28
- * html`<input .value=${live(x)}>`
27
+ * ```js
28
+ * html`<input .value=${live(x)}>`
29
+ * ```
29
30
  *
30
31
  * `live()` performs a strict equality check agains the live DOM value, and if
31
32
  * the new value is equal to the live value, does nothing. This means that
@@ -1 +1 @@
1
- {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/directives/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAEL,SAAS,EACT,mBAAmB,EACnB,QAAQ,EAET,MAAM,iBAAiB,CAAC;AAGzB,cAAM,aAAc,SAAQ,SAAS;gBACvB,QAAQ,EAAE,QAAQ;IAkB9B,MAAM,CAAC,KAAK,EAAE,OAAO;IAIrB,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CA6B/D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI,qFAA2B,CAAC;AAE7C;;;GAGG;AACH,YAAY,EAAC,aAAa,EAAC,CAAC"}
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/directives/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAEL,SAAS,EACT,mBAAmB,EACnB,QAAQ,EAET,MAAM,iBAAiB,CAAC;AAGzB,cAAM,aAAc,SAAQ,SAAS;gBACvB,QAAQ,EAAE,QAAQ;IAkB9B,MAAM,CAAC,KAAK,EAAE,OAAO;IAIZ,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CA0BxE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,qFAA2B,CAAC;AAE7C;;;GAGG;AACH,YAAY,EAAC,aAAa,EAAC,CAAC"}
@@ -3,10 +3,9 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { isSingleExpression, setCommittedValue } from '../directive-helpers.js';
7
- import { directive, Directive, PartType, } from '../directive.js';
8
6
  import { noChange, nothing } from '../lit-html.js';
9
-
7
+ import { directive, Directive, PartType, } from '../directive.js';
8
+ import { isSingleExpression, setCommittedValue } from '../directive-helpers.js';
10
9
  class LiveDirective extends Directive {
11
10
  constructor(partInfo) {
12
11
  super(partInfo);
@@ -28,9 +27,6 @@ class LiveDirective extends Directive {
28
27
  }
29
28
  const element = part.element;
30
29
  const name = part.name;
31
- // TODO (justinfagnani): This is essentially implementing a getLiveValue()
32
- // method for each part type. Should that be moved into the AttributePart
33
- // interface?
34
30
  if (part.type === PartType.PROPERTY) {
35
31
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
32
  if (value === element[name]) {
@@ -67,7 +63,9 @@ class LiveDirective extends Directive {
67
63
  * it alone. If this is not what you want--if you want to overwrite the DOM
68
64
  * value with the bound value no matter what--use the `live()` directive:
69
65
  *
70
- * html`<input .value=${live(x)}>`
66
+ * ```js
67
+ * html`<input .value=${live(x)}>`
68
+ * ```
71
69
  *
72
70
  * `live()` performs a strict equality check agains the live DOM value, and if
73
71
  * the new value is equal to the live value, does nothing. This means that
@@ -1 +1 @@
1
- {"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/directives/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgB,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE9E,MAAM,aAAc,SAAQ,SAAS;IACnC,YAAY,QAAkB;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IACE,CAAC,CACC,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,QAAQ;YACnC,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS;YACpC,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,iBAAiB,CAC7C,EACD;YACA,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;SACH;QACD,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACzE;IACH,CAAC;IAED,MAAM,CAAC,KAAc;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,IAAmB,EAAE,CAAC,KAAK,CAA4B;QAC5D,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,OAAO,EAAE;YAC3C,OAAO,KAAK,CAAC;SACd;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEvB,0EAA0E;QAC1E,yEAAyE;QACzE,aAAa;QACb,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,QAAQ,EAAE;YACnC,8DAA8D;YAC9D,IAAI,KAAK,KAAM,OAAe,CAAC,IAAI,CAAC,EAAE;gBACpC,OAAO,QAAQ,CAAC;aACjB;SACF;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,iBAAiB,EAAE;YACnD,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;gBAC1C,OAAO,QAAQ,CAAC;aACjB;SACF;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS,EAAE;YAC3C,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE;gBAChD,OAAO,QAAQ,CAAC;aACjB;SACF;QACD,sEAAsE;QACtE,yBAAyB;QACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange, nothing} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\nimport {isSingleExpression, setCommittedValue} from '../directive-helpers.js';\n\nclass LiveDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n !(\n partInfo.type === PartType.PROPERTY ||\n partInfo.type === PartType.ATTRIBUTE ||\n partInfo.type === PartType.BOOLEAN_ATTRIBUTE\n )\n ) {\n throw new Error(\n 'The `live` directive is not allowed on child or event bindings'\n );\n }\n if (!isSingleExpression(partInfo)) {\n throw new Error('`live` bindings can only contain a single expression');\n }\n }\n\n render(value: unknown) {\n return value;\n }\n\n update(part: AttributePart, [value]: DirectiveParameters<this>) {\n if (value === noChange || value === nothing) {\n return value;\n }\n const element = part.element;\n const name = part.name;\n\n // TODO (justinfagnani): This is essentially implementing a getLiveValue()\n // method for each part type. Should that be moved into the AttributePart\n // interface?\n if (part.type === PartType.PROPERTY) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (value === (element as any)[name]) {\n return noChange;\n }\n } else if (part.type === PartType.BOOLEAN_ATTRIBUTE) {\n if (!!value === element.hasAttribute(name)) {\n return noChange;\n }\n } else if (part.type === PartType.ATTRIBUTE) {\n if (element.getAttribute(name) === String(value)) {\n return noChange;\n }\n }\n // Resets the part's value, causing its dirty-check to fail so that it\n // always sets the value.\n setCommittedValue(part);\n return value;\n }\n}\n\n/**\n * Checks binding values against live DOM values, instead of previously bound\n * values, when determining whether to update the value.\n *\n * This is useful for cases where the DOM value may change from outside of\n * lit-html, such as with a binding to an `<input>` element's `value` property,\n * a content editable elements text, or to a custom element that changes it's\n * own properties or attributes.\n *\n * In these cases if the DOM value changes, but the value set through lit-html\n * bindings hasn't, lit-html won't know to update the DOM value and will leave\n * it alone. If this is not what you want--if you want to overwrite the DOM\n * value with the bound value no matter what--use the `live()` directive:\n *\n * html`<input .value=${live(x)}>`\n *\n * `live()` performs a strict equality check agains the live DOM value, and if\n * the new value is equal to the live value, does nothing. This means that\n * `live()` should not be used when the binding will cause a type conversion. If\n * you use `live()` with an attribute binding, make sure that only strings are\n * passed in, or the binding will update every render.\n */\nexport const live = directive(LiveDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {LiveDirective};\n"]}
1
+ {"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/directives/live.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgB,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC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C,EAAE;gBAChD,OAAO,QAAQ,CAAC;aACjB;SACF;QACD,sEAAsE;QACtE,yBAAyB;QACzB,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange, nothing} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\nimport {isSingleExpression, setCommittedValue} from '../directive-helpers.js';\n\nclass LiveDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n !(\n partInfo.type === PartType.PROPERTY ||\n partInfo.type === PartType.ATTRIBUTE ||\n partInfo.type === PartType.BOOLEAN_ATTRIBUTE\n )\n ) {\n throw new Error(\n 'The `live` directive is not allowed on child or event bindings'\n );\n }\n if (!isSingleExpression(partInfo)) {\n throw new Error('`live` bindings can only contain a single expression');\n }\n }\n\n render(value: unknown) {\n return value;\n }\n\n override update(part: AttributePart, [value]: DirectiveParameters<this>) {\n if (value === noChange || value === nothing) {\n return value;\n }\n const element = part.element;\n const name = part.name;\n\n if (part.type === PartType.PROPERTY) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (value === (element as any)[name]) {\n return noChange;\n }\n } else if (part.type === PartType.BOOLEAN_ATTRIBUTE) {\n if (!!value === element.hasAttribute(name)) {\n return noChange;\n }\n } else if (part.type === PartType.ATTRIBUTE) {\n if (element.getAttribute(name) === String(value)) {\n return noChange;\n }\n }\n // Resets the part's value, causing its dirty-check to fail so that it\n // always sets the value.\n setCommittedValue(part);\n return value;\n }\n}\n\n/**\n * Checks binding values against live DOM values, instead of previously bound\n * values, when determining whether to update the value.\n *\n * This is useful for cases where the DOM value may change from outside of\n * lit-html, such as with a binding to an `<input>` element's `value` property,\n * a content editable elements text, or to a custom element that changes it's\n * own properties or attributes.\n *\n * In these cases if the DOM value changes, but the value set through lit-html\n * bindings hasn't, lit-html won't know to update the DOM value and will leave\n * it alone. If this is not what you want--if you want to overwrite the DOM\n * value with the bound value no matter what--use the `live()` directive:\n *\n * ```js\n * html`<input .value=${live(x)}>`\n * ```\n *\n * `live()` performs a strict equality check agains the live DOM value, and if\n * the new value is equal to the live value, does nothing. This means that\n * `live()` should not be used when the binding will cause a type conversion. If\n * you use `live()` with an attribute binding, make sure that only strings are\n * passed in, or the binding will update every render.\n */\nexport const live = directive(LiveDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {LiveDirective};\n"]}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ /**
7
+ * Helper to iterate an AsyncIterable in its own closure.
8
+ * @param iterable The iterable to iterate
9
+ * @param callback The callback to call for each value. If the callback returns
10
+ * `false`, the loop will be broken.
11
+ */
12
+ export declare const forAwaitOf: <T>(iterable: AsyncIterable<T>, callback: (value: T) => Promise<boolean>) => Promise<void>;
13
+ /**
14
+ * Holds a reference to an instance that can be disconnected and reconnected,
15
+ * so that a closure over the ref (e.g. in a then function to a promise) does
16
+ * not strongly hold a ref to the instance. Approximates a WeakRef but must
17
+ * be manually connected & disconnected to the backing instance.
18
+ */
19
+ export declare class PseudoWeakRef<T> {
20
+ private _ref?;
21
+ constructor(ref: T);
22
+ /**
23
+ * Disassociates the ref with the backing instance.
24
+ */
25
+ disconnect(): void;
26
+ /**
27
+ * Reassociates the ref with the backing instance.
28
+ */
29
+ reconnect(ref: T): void;
30
+ /**
31
+ * Retrieves the backing instance (will be undefined when disconnected)
32
+ */
33
+ deref(): T | undefined;
34
+ }
35
+ /**
36
+ * A helper to pause and resume waiting on a condition in an async function
37
+ */
38
+ export declare class Pauser {
39
+ private _promise?;
40
+ private _resolve?;
41
+ /**
42
+ * When paused, returns a promise to be awaited; when unpaused, returns
43
+ * undefined. Note that in the microtask between the pauser being resumed
44
+ * an an await of this promise resolving, the pauser could be paused again,
45
+ * hence callers should check the promise in a loop when awaiting.
46
+ * @returns A promise to be awaited when paused or undefined
47
+ */
48
+ get(): Promise<void> | undefined;
49
+ /**
50
+ * Creates a promise to be awaited
51
+ */
52
+ pause(): void;
53
+ /**
54
+ * Resolves the promise which may be awaited
55
+ */
56
+ resume(): void;
57
+ }
58
+ //# sourceMappingURL=private-async-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-async-helpers.d.ts","sourceRoot":"","sources":["../../src/directives/private-async-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,UAAU,0DAEG,QAAQ,OAAO,CAAC,kBAOzC,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,aAAa,CAAC,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAI;gBACL,GAAG,EAAE,CAAC;IAGlB;;OAEG;IACH,UAAU;IAGV;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,CAAC;IAGhB;;OAEG;IACH,KAAK;CAGN;AAED;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,CAA4B;IAC7C,OAAO,CAAC,QAAQ,CAAC,CAAyB;IAC1C;;;;;;OAMG;IACH,GAAG;IAGH;;OAEG;IACH,KAAK;IAGL;;OAEG;IACH,MAAM;CAIP"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ // Note, this module is not included in package exports so that it's private to
7
+ // our first-party directives. If it ends up being useful, we can open it up and
8
+ // export it.
9
+ /**
10
+ * Helper to iterate an AsyncIterable in its own closure.
11
+ * @param iterable The iterable to iterate
12
+ * @param callback The callback to call for each value. If the callback returns
13
+ * `false`, the loop will be broken.
14
+ */
15
+ export const forAwaitOf = async (iterable, callback) => {
16
+ for await (const v of iterable) {
17
+ if ((await callback(v)) === false) {
18
+ return;
19
+ }
20
+ }
21
+ };
22
+ /**
23
+ * Holds a reference to an instance that can be disconnected and reconnected,
24
+ * so that a closure over the ref (e.g. in a then function to a promise) does
25
+ * not strongly hold a ref to the instance. Approximates a WeakRef but must
26
+ * be manually connected & disconnected to the backing instance.
27
+ */
28
+ export class PseudoWeakRef {
29
+ constructor(ref) {
30
+ this._ref = ref;
31
+ }
32
+ /**
33
+ * Disassociates the ref with the backing instance.
34
+ */
35
+ disconnect() {
36
+ this._ref = undefined;
37
+ }
38
+ /**
39
+ * Reassociates the ref with the backing instance.
40
+ */
41
+ reconnect(ref) {
42
+ this._ref = ref;
43
+ }
44
+ /**
45
+ * Retrieves the backing instance (will be undefined when disconnected)
46
+ */
47
+ deref() {
48
+ return this._ref;
49
+ }
50
+ }
51
+ /**
52
+ * A helper to pause and resume waiting on a condition in an async function
53
+ */
54
+ export class Pauser {
55
+ constructor() {
56
+ this._promise = undefined;
57
+ this._resolve = undefined;
58
+ }
59
+ /**
60
+ * When paused, returns a promise to be awaited; when unpaused, returns
61
+ * undefined. Note that in the microtask between the pauser being resumed
62
+ * an an await of this promise resolving, the pauser could be paused again,
63
+ * hence callers should check the promise in a loop when awaiting.
64
+ * @returns A promise to be awaited when paused or undefined
65
+ */
66
+ get() {
67
+ return this._promise;
68
+ }
69
+ /**
70
+ * Creates a promise to be awaited
71
+ */
72
+ pause() {
73
+ var _a;
74
+ (_a = this._promise) !== null && _a !== void 0 ? _a : (this._promise = new Promise((resolve) => (this._resolve = resolve)));
75
+ }
76
+ /**
77
+ * Resolves the promise which may be awaited
78
+ */
79
+ resume() {
80
+ var _a;
81
+ (_a = this._resolve) === null || _a === void 0 ? void 0 : _a.call(this);
82
+ this._promise = this._resolve = undefined;
83
+ }
84
+ }
85
+ //# sourceMappingURL=private-async-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-async-helpers.js","sourceRoot":"","sources":["../../src/directives/private-async-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,gFAAgF;AAChF,aAAa;AAEb;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAA0B,EAC1B,QAAwC,EACxC,EAAE;IACF,IAAI,KAAK,EAAE,MAAM,CAAC,IAAI,QAAQ,EAAE;QAC9B,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE;YACjC,OAAO;SACR;KACF;AACH,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IAExB,YAAY,GAAM;QAChB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IACD;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,CAAC;IACD;;OAEG;IACH,SAAS,CAAC,GAAM;QACd,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IACD;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,MAAM;IAAnB;QACU,aAAQ,GAAmB,SAAS,CAAC;QACrC,aAAQ,GAAgB,SAAS,CAAC;IAwB5C,CAAC;IAvBC;;;;;;OAMG;IACH,GAAG;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD;;OAEG;IACH,KAAK;;QACH,MAAA,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,EAAC;IACxE,CAAC;IACD;;OAEG;IACH,MAAM;;QACJ,MAAA,IAAI,CAAC,QAAQ,+CAAb,IAAI,CAAa,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5C,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// Note, this module is not included in package exports so that it's private to\n// our first-party directives. If it ends up being useful, we can open it up and\n// export it.\n\n/**\n * Helper to iterate an AsyncIterable in its own closure.\n * @param iterable The iterable to iterate\n * @param callback The callback to call for each value. If the callback returns\n * `false`, the loop will be broken.\n */\nexport const forAwaitOf = async <T>(\n iterable: AsyncIterable<T>,\n callback: (value: T) => Promise<boolean>\n) => {\n for await (const v of iterable) {\n if ((await callback(v)) === false) {\n return;\n }\n }\n};\n\n/**\n * Holds a reference to an instance that can be disconnected and reconnected,\n * so that a closure over the ref (e.g. in a then function to a promise) does\n * not strongly hold a ref to the instance. Approximates a WeakRef but must\n * be manually connected & disconnected to the backing instance.\n */\nexport class PseudoWeakRef<T> {\n private _ref?: T;\n constructor(ref: T) {\n this._ref = ref;\n }\n /**\n * Disassociates the ref with the backing instance.\n */\n disconnect() {\n this._ref = undefined;\n }\n /**\n * Reassociates the ref with the backing instance.\n */\n reconnect(ref: T) {\n this._ref = ref;\n }\n /**\n * Retrieves the backing instance (will be undefined when disconnected)\n */\n deref() {\n return this._ref;\n }\n}\n\n/**\n * A helper to pause and resume waiting on a condition in an async function\n */\nexport class Pauser {\n private _promise?: Promise<void> = undefined;\n private _resolve?: () => void = undefined;\n /**\n * When paused, returns a promise to be awaited; when unpaused, returns\n * undefined. Note that in the microtask between the pauser being resumed\n * an an await of this promise resolving, the pauser could be paused again,\n * hence callers should check the promise in a loop when awaiting.\n * @returns A promise to be awaited when paused or undefined\n */\n get() {\n return this._promise;\n }\n /**\n * Creates a promise to be awaited\n */\n pause() {\n this._promise ??= new Promise((resolve) => (this._resolve = resolve));\n }\n /**\n * Resolves the promise which may be awaited\n */\n resume() {\n this._resolve?.();\n this._promise = this._resolve = undefined;\n }\n}\n"]}
@@ -3,13 +3,15 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { AsyncDirective } from '../async-directive.js';
7
6
  import { ElementPart } from '../lit-html.js';
8
-
7
+ import { AsyncDirective } from '../async-directive.js';
9
8
  /**
10
9
  * Creates a new Ref object, which is container for a reference to an element.
11
10
  */
12
11
  export declare const createRef: <T = Element>() => Ref<T>;
12
+ /**
13
+ * An object that holds a ref value.
14
+ */
13
15
  declare class Ref<T = Element> {
14
16
  /**
15
17
  * The current Element value of the ref, or else `undefined` if the ref is no
@@ -17,6 +19,7 @@ declare class Ref<T = Element> {
17
19
  */
18
20
  readonly value?: T;
19
21
  }
22
+ export type { Ref };
20
23
  export declare type RefOrCallback = Ref | ((el: Element | undefined) => void);
21
24
  declare class RefDirective extends AsyncDirective {
22
25
  private _element?;
@@ -43,16 +46,16 @@ declare class RefDirective extends AsyncDirective {
43
46
  * removed in a subsequent render, it will first be called with `undefined`,
44
47
  * followed by another call with the new element it was rendered to (if any).
45
48
  *
46
- * @example
47
- *
48
- * // Using Ref object
49
- * const inputRef = createRef();
50
- * render(html`<input ${ref(inputRef)}>`, container);
51
- * inputRef.value.focus();
49
+ * ```js
50
+ * // Using Ref object
51
+ * const inputRef = createRef();
52
+ * render(html`<input ${ref(inputRef)}>`, container);
53
+ * inputRef.value.focus();
52
54
  *
53
- * // Using callback
54
- * const callback = (inputElement) => inputElement.focus();
55
- * render(html`<input ${ref(callback)}>`, container);
55
+ * // Using callback
56
+ * const callback = (inputElement) => inputElement.focus();
57
+ * render(html`<input ${ref(callback)}>`, container);
58
+ * ```
56
59
  */
57
60
  export declare const ref: (_ref: RefOrCallback) => import("../directive.js").DirectiveResult<typeof RefDirective>;
58
61
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../src/directives/ref.ts"],"names":[],"mappings":"AAA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AAE,CAAC,CAAC;CACpB;AAED,YAAY,EAAC,GAAG,EAAC,CAAC;AAYlB,oBAAY,aAAa,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC;AAEtE,cAAM,YAAa,SAAQ,cAAc;IACvC,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAgB;IAC7B,OAAO,CAAC,QAAQ,CAAU;IAE1B,MAAM,CAAC,IAAI,EAAE,aAAa;IAIjB,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAiBpE,OAAO,CAAC,eAAe;IAqBvB,OAAO,KAAK,kBAAkB,GAI7B;IAEQ,YAAY;IAUZ,WAAW;CAKrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,GAAG,yFAA0B,CAAC;AAE3C;;;GAGG;AACH,YAAY,EAAC,YAAY,EAAC,CAAC"}
@@ -3,13 +3,15 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { AsyncDirective , directive} from '../async-directive.js';
7
6
  import { nothing } from '../lit-html.js';
8
-
7
+ import { directive, AsyncDirective } from '../async-directive.js';
9
8
  /**
10
9
  * Creates a new Ref object, which is container for a reference to an element.
11
10
  */
12
11
  export const createRef = () => new Ref();
12
+ /**
13
+ * An object that holds a ref value.
14
+ */
13
15
  class Ref {
14
16
  }
15
17
  // When callbacks are used for refs, this map tracks the last value the callback
@@ -93,16 +95,16 @@ class RefDirective extends AsyncDirective {
93
95
  * removed in a subsequent render, it will first be called with `undefined`,
94
96
  * followed by another call with the new element it was rendered to (if any).
95
97
  *
96
- * @example
97
- *
98
- * // Using Ref object
99
- * const inputRef = createRef();
100
- * render(html`<input ${ref(inputRef)}>`, container);
101
- * inputRef.value.focus();
98
+ * ```js
99
+ * // Using Ref object
100
+ * const inputRef = createRef();
101
+ * render(html`<input ${ref(inputRef)}>`, container);
102
+ * inputRef.value.focus();
102
103
  *
103
- * // Using callback
104
- * const callback = (inputElement) => inputElement.focus();
105
- * render(html`<input ${ref(callback)}>`, container);
104
+ * // Using callback
105
+ * const callback = (inputElement) => inputElement.focus();
106
+ * render(html`<input ${ref(callback)}>`, container);
107
+ * ```
106
108
  */
107
109
  export const ref = directive(RefDirective);
108
110
  //# sourceMappingURL=ref.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/directives/ref.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAc,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,GAAgB,EAAE,CAAC,IAAI,GAAG,EAAK,CAAC;AAEzD,MAAM,GAAG;CAMR;AAMD,gFAAgF;AAChF,6EAA6E;AAC7E,0CAA0C;AAC1C,MAAM,sBAAsB,GAGxB,IAAI,OAAO,EAAE,CAAC;AAIlB,MAAM,YAAa,SAAQ,cAAc;IAKvC,MAAM,CAAC,IAAmB;QACxB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,IAAiB,EAAE,CAAC,GAAG,CAA6B;;QACzD,MAAM,UAAU,GAAG,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC;QACrC,IAAI,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;YACzC,+CAA+C;YAC/C,iCAAiC;YACjC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;SACjC;QACD,IAAI,UAAU,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,QAAQ,EAAE;YAC3D,uDAAuD;YACvD,+CAA+C;YAC/C,IAAI,CAAC,IAAI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,CAAC,SAAS,CAAC,CAAC;SACjC;IACH,CAAC;IAED,WAAW;QACT,0EAA0E;QAC1E,sEAAsE;QACtE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {nothing, ElementPart} from '../lit-html.js';\nimport {directive, AsyncDirective} from '../async-directive.js';\n\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = <T = Element>() => new Ref<T>();\n\nclass Ref<T = Element> {\n /**\n * The current Element value of the ref, or else `undefined` if the ref is no\n * longer rendered.\n */\n readonly value?: T;\n}\n\ninterface RefInternal {\n value: Element | undefined;\n}\n\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot\nconst lastElementForCallback: WeakMap<\n Function,\n Element | undefined\n> = new WeakMap();\n\nexport type RefOrCallback = Ref | ((el: Element | undefined) => void);\n\nclass RefDirective extends AsyncDirective {\n private _element?: Element;\n private _ref?: RefOrCallback;\n private _context: unknown;\n\n render(_ref: RefOrCallback) {\n return nothing;\n }\n\n update(part: ElementPart, [ref]: Parameters<this['render']>) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n\n private _updateRefValue(element: Element | undefined) {\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set)\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n } else {\n (this._ref as RefInternal)!.value = element;\n }\n }\n\n private get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForCallback.get(this._ref)\n : this._ref?.value;\n }\n\n disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n\n reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * @example\n *\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n */\nexport const ref = directive(RefDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RefDirective};\n"]}
1
+ {"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/directives/ref.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,OAAO,EAAc,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,SAAS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D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aAC1C;YACD,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC/C,0CAA0C;YAC1C,IAAI,OAAO,KAAK,SAAS,EAAE;gBACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;aACxC;SACF;aAAM;YACJ,IAAI,CAAC,IAAqB,CAAC,KAAK,GAAG,OAAO,CAAC;SAC7C;IACH,CAAC;IAED,IAAY,kBAAkB;;QAC5B,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU;YACpC,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YACvC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,CAAC;IACvB,CAAC;IAEQ,YAAY;QACnB,yEAAyE;QACzE,wEAAwE;QACxE,2EAA2E;QAC3E,iBAAiB;QACjB,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,QAAQ,EAAE;YAC7C,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;SACjC;IACH,CAAC;IAEQ,WAAW;QAClB,0EAA0E;QAC1E,sEAAsE;QACtE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {nothing, ElementPart} from '../lit-html.js';\nimport {directive, AsyncDirective} from '../async-directive.js';\n\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = <T = Element>() => new Ref<T>();\n\n/**\n * An object that holds a ref value.\n */\nclass Ref<T = Element> {\n /**\n * The current Element value of the ref, or else `undefined` if the ref is no\n * longer rendered.\n */\n readonly value?: T;\n}\n\nexport type {Ref};\n\ninterface RefInternal {\n value: Element | undefined;\n}\n\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot\nconst lastElementForCallback: WeakMap<Function, Element | undefined> =\n new WeakMap();\n\nexport type RefOrCallback = Ref | ((el: Element | undefined) => void);\n\nclass RefDirective extends AsyncDirective {\n private _element?: Element;\n private _ref?: RefOrCallback;\n private _context: unknown;\n\n render(_ref: RefOrCallback) {\n return nothing;\n }\n\n override update(part: ElementPart, [ref]: Parameters<this['render']>) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n\n private _updateRefValue(element: Element | undefined) {\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set)\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n } else {\n (this._ref as RefInternal)!.value = element;\n }\n }\n\n private get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForCallback.get(this._ref)\n : this._ref?.value;\n }\n\n override disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n\n override reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RefDirective};\n"]}
@@ -3,9 +3,8 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- import { Directive, PartInfo } from '../directive.js';
7
6
  import { ChildPart, noChange } from '../lit-html.js';
8
-
7
+ import { Directive, PartInfo } from '../directive.js';
9
8
  export declare type KeyFn<T> = (item: T, index: number) => unknown;
10
9
  export declare type ItemTemplate<T> = (item: T, index: number) => unknown;
11
10
  declare class RepeatDirective extends Directive {
@@ -40,8 +39,13 @@ export interface RepeatDirectiveFn {
40
39
  * The `keyFn` takes two parameters, the item and its index, and returns a unique key value.
41
40
  *
42
41
  * ```js
43
- * ${repeat(this.items, (item) => item.id, (item, index) =>
44
- html`<li>${index}: ${item.name}</li>`)}
42
+ * html`
43
+ * <ol>
44
+ * ${repeat(this.items, (item) => item.id, (item, index) => {
45
+ * return html`<li>${index}: ${item.name}</li>`;
46
+ * })}
47
+ * </ol>
48
+ * `
45
49
  * ```
46
50
  *
47
51
  * **Important**: If providing a `keyFn`, keys *must* be unique for all items in a
@@ -1 +1 @@
1
- {"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../src/directives/repeat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAY,SAAS,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAC;AASzE,oBAAY,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAC3D,oBAAY,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAalE,cAAM,eAAgB,SAAQ,SAAS;IACrC,OAAO,CAAC,SAAS,CAAC,CAAY;gBAElB,QAAQ,EAAE,QAAQ;IAO9B,OAAO,CAAC,iBAAiB;IAyBzB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACxE,MAAM,CAAC,CAAC,EACN,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,OAAO,CAAC;IASjB,MAAM,CAAC,CAAC,EACN,aAAa,EAAE,SAAS,EACxB,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE;QAClC,QAAQ,CAAC,CAAC,CAAC;QACX,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;QAC1B,YAAY,CAAC,CAAC,CAAC;KAChB;CAkVJ;AAED,MAAM,W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