@wordpress/block-library 9.8.4 → 9.9.0

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 (453) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/avatar/index.js +2 -1
  3. package/build/avatar/index.js.map +1 -1
  4. package/build/block/edit.js +1 -4
  5. package/build/block/edit.js.map +1 -1
  6. package/build/button/edit.js +2 -4
  7. package/build/button/edit.js.map +1 -1
  8. package/build/comment-author-name/index.js +2 -1
  9. package/build/comment-author-name/index.js.map +1 -1
  10. package/build/comment-content/index.js +2 -1
  11. package/build/comment-content/index.js.map +1 -1
  12. package/build/comment-date/index.js +2 -1
  13. package/build/comment-date/index.js.map +1 -1
  14. package/build/comment-edit-link/index.js +2 -1
  15. package/build/comment-edit-link/index.js.map +1 -1
  16. package/build/comment-reply-link/index.js +2 -1
  17. package/build/comment-reply-link/index.js.map +1 -1
  18. package/build/comments-pagination-next/index.js +5 -0
  19. package/build/comments-pagination-next/index.js.map +1 -1
  20. package/build/comments-pagination-numbers/index.js +2 -1
  21. package/build/comments-pagination-numbers/index.js.map +1 -1
  22. package/build/comments-pagination-previous/index.js +5 -0
  23. package/build/comments-pagination-previous/index.js.map +1 -1
  24. package/build/comments-title/index.js +2 -1
  25. package/build/comments-title/index.js.map +1 -1
  26. package/build/cover/edit/index.js +4 -2
  27. package/build/cover/edit/index.js.map +1 -1
  28. package/build/file/index.js +8 -4
  29. package/build/file/index.js.map +1 -1
  30. package/build/image/edit.js +2 -4
  31. package/build/image/edit.js.map +1 -1
  32. package/build/image/image.js +6 -10
  33. package/build/image/image.js.map +1 -1
  34. package/build/post-navigation-link/index.js +6 -0
  35. package/build/post-navigation-link/index.js.map +1 -1
  36. package/build/post-navigation-link/variations.js +14 -2
  37. package/build/post-navigation-link/variations.js.map +1 -1
  38. package/build/post-time-to-read/index.js +2 -1
  39. package/build/post-time-to-read/index.js.map +1 -1
  40. package/build/query/edit/inspector-controls/index.js +2 -2
  41. package/build/query/edit/inspector-controls/index.js.map +1 -1
  42. package/build/query/edit/inspector-controls/pages-control.js +1 -1
  43. package/build/query/edit/inspector-controls/pages-control.js.map +1 -1
  44. package/build/query/edit/inspector-controls/per-page-control.js +1 -1
  45. package/build/query/edit/inspector-controls/per-page-control.js.map +1 -1
  46. package/build/query/index.js +1 -0
  47. package/build/query/index.js.map +1 -1
  48. package/build/query-no-results/index.js +8 -0
  49. package/build/query-no-results/index.js.map +1 -1
  50. package/build/query-pagination-numbers/index.js +2 -1
  51. package/build/query-pagination-numbers/index.js.map +1 -1
  52. package/build/query-title/index.js +5 -0
  53. package/build/query-title/index.js.map +1 -1
  54. package/build/site-logo/edit.js +5 -3
  55. package/build/site-logo/edit.js.map +1 -1
  56. package/build/table-of-contents/index.js +42 -1
  57. package/build/table-of-contents/index.js.map +1 -1
  58. package/build/term-description/index.js +2 -1
  59. package/build/term-description/index.js.map +1 -1
  60. package/build-module/avatar/index.js +2 -1
  61. package/build-module/avatar/index.js.map +1 -1
  62. package/build-module/block/edit.js +1 -4
  63. package/build-module/block/edit.js.map +1 -1
  64. package/build-module/button/edit.js +4 -6
  65. package/build-module/button/edit.js.map +1 -1
  66. package/build-module/comment-author-name/index.js +2 -1
  67. package/build-module/comment-author-name/index.js.map +1 -1
  68. package/build-module/comment-content/index.js +2 -1
  69. package/build-module/comment-content/index.js.map +1 -1
  70. package/build-module/comment-date/index.js +2 -1
  71. package/build-module/comment-date/index.js.map +1 -1
  72. package/build-module/comment-edit-link/index.js +2 -1
  73. package/build-module/comment-edit-link/index.js.map +1 -1
  74. package/build-module/comment-reply-link/index.js +2 -1
  75. package/build-module/comment-reply-link/index.js.map +1 -1
  76. package/build-module/comments-pagination-next/index.js +5 -0
  77. package/build-module/comments-pagination-next/index.js.map +1 -1
  78. package/build-module/comments-pagination-numbers/index.js +2 -1
  79. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  80. package/build-module/comments-pagination-previous/index.js +5 -0
  81. package/build-module/comments-pagination-previous/index.js.map +1 -1
  82. package/build-module/comments-title/index.js +2 -1
  83. package/build-module/comments-title/index.js.map +1 -1
  84. package/build-module/cover/edit/index.js +5 -3
  85. package/build-module/cover/edit/index.js.map +1 -1
  86. package/build-module/file/index.js +8 -4
  87. package/build-module/file/index.js.map +1 -1
  88. package/build-module/image/edit.js +4 -6
  89. package/build-module/image/edit.js.map +1 -1
  90. package/build-module/image/image.js +5 -9
  91. package/build-module/image/image.js.map +1 -1
  92. package/build-module/post-navigation-link/index.js +6 -0
  93. package/build-module/post-navigation-link/index.js.map +1 -1
  94. package/build-module/post-navigation-link/variations.js +14 -2
  95. package/build-module/post-navigation-link/variations.js.map +1 -1
  96. package/build-module/post-time-to-read/index.js +2 -1
  97. package/build-module/post-time-to-read/index.js.map +1 -1
  98. package/build-module/query/edit/inspector-controls/index.js +2 -2
  99. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  100. package/build-module/query/edit/inspector-controls/pages-control.js +1 -1
  101. package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -1
  102. package/build-module/query/edit/inspector-controls/per-page-control.js +1 -1
  103. package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -1
  104. package/build-module/query/index.js +1 -0
  105. package/build-module/query/index.js.map +1 -1
  106. package/build-module/query-no-results/index.js +8 -0
  107. package/build-module/query-no-results/index.js.map +1 -1
  108. package/build-module/query-pagination-numbers/index.js +2 -1
  109. package/build-module/query-pagination-numbers/index.js.map +1 -1
  110. package/build-module/query-title/index.js +5 -0
  111. package/build-module/query-title/index.js.map +1 -1
  112. package/build-module/site-logo/edit.js +5 -3
  113. package/build-module/site-logo/edit.js.map +1 -1
  114. package/build-module/table-of-contents/index.js +42 -1
  115. package/build-module/table-of-contents/index.js.map +1 -1
  116. package/build-module/term-description/index.js +2 -1
  117. package/build-module/term-description/index.js.map +1 -1
  118. package/build-style/archives/editor-rtl.css +10 -1
  119. package/build-style/archives/editor.css +10 -1
  120. package/build-style/archives/style-rtl.css +10 -1
  121. package/build-style/archives/style.css +10 -1
  122. package/build-style/audio/editor-rtl.css +10 -1
  123. package/build-style/audio/editor.css +10 -1
  124. package/build-style/audio/style-rtl.css +10 -1
  125. package/build-style/audio/style.css +10 -1
  126. package/build-style/audio/theme-rtl.css +10 -1
  127. package/build-style/audio/theme.css +10 -1
  128. package/build-style/avatar/editor-rtl.css +10 -1
  129. package/build-style/avatar/editor.css +10 -1
  130. package/build-style/avatar/style-rtl.css +10 -1
  131. package/build-style/avatar/style.css +10 -1
  132. package/build-style/button/editor-rtl.css +10 -1
  133. package/build-style/button/editor.css +10 -1
  134. package/build-style/button/style-rtl.css +10 -1
  135. package/build-style/button/style.css +10 -1
  136. package/build-style/buttons/editor-rtl.css +10 -1
  137. package/build-style/buttons/editor.css +10 -1
  138. package/build-style/buttons/style-rtl.css +11 -1
  139. package/build-style/buttons/style.css +11 -1
  140. package/build-style/calendar/style-rtl.css +10 -1
  141. package/build-style/calendar/style.css +10 -1
  142. package/build-style/categories/editor-rtl.css +10 -1
  143. package/build-style/categories/editor.css +10 -1
  144. package/build-style/categories/style-rtl.css +10 -1
  145. package/build-style/categories/style.css +10 -1
  146. package/build-style/classic-rtl.css +10 -1
  147. package/build-style/classic.css +10 -1
  148. package/build-style/code/editor-rtl.css +10 -1
  149. package/build-style/code/editor.css +10 -1
  150. package/build-style/code/style-rtl.css +10 -1
  151. package/build-style/code/style.css +10 -1
  152. package/build-style/code/theme-rtl.css +10 -1
  153. package/build-style/code/theme.css +10 -1
  154. package/build-style/columns/editor-rtl.css +10 -1
  155. package/build-style/columns/editor.css +10 -1
  156. package/build-style/columns/style-rtl.css +10 -1
  157. package/build-style/columns/style.css +10 -1
  158. package/build-style/comment-author-avatar/editor-rtl.css +10 -1
  159. package/build-style/comment-author-avatar/editor.css +10 -1
  160. package/build-style/comment-author-name/style-rtl.css +10 -1
  161. package/build-style/comment-author-name/style.css +10 -1
  162. package/build-style/comment-content/style-rtl.css +10 -1
  163. package/build-style/comment-content/style.css +10 -1
  164. package/build-style/comment-date/style-rtl.css +10 -1
  165. package/build-style/comment-date/style.css +10 -1
  166. package/build-style/comment-edit-link/style-rtl.css +10 -1
  167. package/build-style/comment-edit-link/style.css +10 -1
  168. package/build-style/comment-reply-link/style-rtl.css +10 -1
  169. package/build-style/comment-reply-link/style.css +10 -1
  170. package/build-style/comment-template/style-rtl.css +10 -1
  171. package/build-style/comment-template/style.css +10 -1
  172. package/build-style/comments/editor-rtl.css +10 -1
  173. package/build-style/comments/editor.css +10 -1
  174. package/build-style/comments/style-rtl.css +10 -1
  175. package/build-style/comments/style.css +10 -1
  176. package/build-style/comments-pagination/editor-rtl.css +10 -1
  177. package/build-style/comments-pagination/editor.css +10 -1
  178. package/build-style/comments-pagination/style-rtl.css +10 -1
  179. package/build-style/comments-pagination/style.css +10 -1
  180. package/build-style/comments-pagination-numbers/editor-rtl.css +10 -1
  181. package/build-style/comments-pagination-numbers/editor.css +10 -1
  182. package/build-style/comments-title/editor-rtl.css +10 -1
  183. package/build-style/comments-title/editor.css +10 -1
  184. package/build-style/common-rtl.css +10 -1
  185. package/build-style/common.css +10 -1
  186. package/build-style/cover/editor-rtl.css +10 -1
  187. package/build-style/cover/editor.css +10 -1
  188. package/build-style/cover/style-rtl.css +10 -1
  189. package/build-style/cover/style.css +10 -1
  190. package/build-style/details/editor-rtl.css +10 -1
  191. package/build-style/details/editor.css +10 -1
  192. package/build-style/details/style-rtl.css +10 -1
  193. package/build-style/details/style.css +10 -1
  194. package/build-style/editor-elements-rtl.css +10 -1
  195. package/build-style/editor-elements.css +10 -1
  196. package/build-style/editor-rtl.css +16 -19
  197. package/build-style/editor.css +16 -19
  198. package/build-style/elements-rtl.css +10 -1
  199. package/build-style/elements.css +10 -1
  200. package/build-style/embed/editor-rtl.css +10 -1
  201. package/build-style/embed/editor.css +10 -1
  202. package/build-style/embed/style-rtl.css +10 -1
  203. package/build-style/embed/style.css +10 -1
  204. package/build-style/embed/theme-rtl.css +10 -1
  205. package/build-style/embed/theme.css +10 -1
  206. package/build-style/file/editor-rtl.css +10 -1
  207. package/build-style/file/editor.css +10 -1
  208. package/build-style/file/style-rtl.css +10 -1
  209. package/build-style/file/style.css +10 -1
  210. package/build-style/footnotes/style-rtl.css +10 -1
  211. package/build-style/footnotes/style.css +10 -1
  212. package/build-style/form-input/editor-rtl.css +10 -1
  213. package/build-style/form-input/editor.css +10 -1
  214. package/build-style/form-input/style-rtl.css +10 -1
  215. package/build-style/form-input/style.css +10 -1
  216. package/build-style/form-submission-notification/editor-rtl.css +10 -1
  217. package/build-style/form-submission-notification/editor.css +10 -1
  218. package/build-style/form-submit-button/style-rtl.css +10 -1
  219. package/build-style/form-submit-button/style.css +10 -1
  220. package/build-style/freeform/editor-rtl.css +10 -1
  221. package/build-style/freeform/editor.css +10 -1
  222. package/build-style/gallery/editor-rtl.css +10 -1
  223. package/build-style/gallery/editor.css +10 -1
  224. package/build-style/gallery/style-rtl.css +10 -1
  225. package/build-style/gallery/style.css +10 -1
  226. package/build-style/gallery/theme-rtl.css +10 -1
  227. package/build-style/gallery/theme.css +10 -1
  228. package/build-style/group/editor-rtl.css +12 -3
  229. package/build-style/group/editor.css +12 -3
  230. package/build-style/group/style-rtl.css +10 -1
  231. package/build-style/group/style.css +10 -1
  232. package/build-style/group/theme-rtl.css +10 -1
  233. package/build-style/group/theme.css +10 -1
  234. package/build-style/heading/style-rtl.css +10 -1
  235. package/build-style/heading/style.css +10 -1
  236. package/build-style/html/editor-rtl.css +10 -1
  237. package/build-style/html/editor.css +10 -1
  238. package/build-style/image/editor-rtl.css +10 -1
  239. package/build-style/image/editor.css +10 -1
  240. package/build-style/image/style-rtl.css +10 -1
  241. package/build-style/image/style.css +10 -1
  242. package/build-style/image/theme-rtl.css +10 -1
  243. package/build-style/image/theme.css +10 -1
  244. package/build-style/latest-comments/style-rtl.css +10 -1
  245. package/build-style/latest-comments/style.css +10 -1
  246. package/build-style/latest-posts/editor-rtl.css +10 -1
  247. package/build-style/latest-posts/editor.css +10 -1
  248. package/build-style/latest-posts/style-rtl.css +10 -1
  249. package/build-style/latest-posts/style.css +10 -1
  250. package/build-style/list/style-rtl.css +10 -1
  251. package/build-style/list/style.css +10 -1
  252. package/build-style/loginout/style-rtl.css +10 -1
  253. package/build-style/loginout/style.css +10 -1
  254. package/build-style/media-text/editor-rtl.css +10 -1
  255. package/build-style/media-text/editor.css +10 -1
  256. package/build-style/media-text/style-rtl.css +10 -1
  257. package/build-style/media-text/style.css +10 -1
  258. package/build-style/more/editor-rtl.css +10 -1
  259. package/build-style/more/editor.css +10 -1
  260. package/build-style/navigation/editor-rtl.css +10 -1
  261. package/build-style/navigation/editor.css +10 -1
  262. package/build-style/navigation/style-rtl.css +10 -1
  263. package/build-style/navigation/style.css +10 -1
  264. package/build-style/navigation-link/editor-rtl.css +10 -1
  265. package/build-style/navigation-link/editor.css +10 -1
  266. package/build-style/navigation-link/style-rtl.css +10 -1
  267. package/build-style/navigation-link/style.css +10 -1
  268. package/build-style/navigation-submenu/editor-rtl.css +10 -1
  269. package/build-style/navigation-submenu/editor.css +10 -1
  270. package/build-style/nextpage/editor-rtl.css +10 -1
  271. package/build-style/nextpage/editor.css +10 -1
  272. package/build-style/page-list/editor-rtl.css +10 -1
  273. package/build-style/page-list/editor.css +10 -1
  274. package/build-style/page-list/style-rtl.css +10 -1
  275. package/build-style/page-list/style.css +10 -1
  276. package/build-style/paragraph/editor-rtl.css +10 -1
  277. package/build-style/paragraph/editor.css +10 -1
  278. package/build-style/paragraph/style-rtl.css +10 -1
  279. package/build-style/paragraph/style.css +10 -1
  280. package/build-style/post-author/editor-rtl.css +10 -1
  281. package/build-style/post-author/editor.css +10 -1
  282. package/build-style/post-author/style-rtl.css +10 -1
  283. package/build-style/post-author/style.css +10 -1
  284. package/build-style/post-author-biography/style-rtl.css +10 -1
  285. package/build-style/post-author-biography/style.css +10 -1
  286. package/build-style/post-author-name/style-rtl.css +10 -1
  287. package/build-style/post-author-name/style.css +10 -1
  288. package/build-style/post-comments-form/editor-rtl.css +10 -1
  289. package/build-style/post-comments-form/editor.css +10 -1
  290. package/build-style/post-comments-form/style-rtl.css +10 -1
  291. package/build-style/post-comments-form/style.css +10 -1
  292. package/build-style/post-content/style-rtl.css +10 -1
  293. package/build-style/post-content/style.css +10 -1
  294. package/build-style/post-date/style-rtl.css +10 -1
  295. package/build-style/post-date/style.css +10 -1
  296. package/build-style/post-excerpt/editor-rtl.css +10 -1
  297. package/build-style/post-excerpt/editor.css +10 -1
  298. package/build-style/post-excerpt/style-rtl.css +10 -1
  299. package/build-style/post-excerpt/style.css +10 -1
  300. package/build-style/post-featured-image/editor-rtl.css +10 -1
  301. package/build-style/post-featured-image/editor.css +10 -1
  302. package/build-style/post-featured-image/style-rtl.css +10 -1
  303. package/build-style/post-featured-image/style.css +10 -1
  304. package/build-style/post-navigation-link/style-rtl.css +10 -1
  305. package/build-style/post-navigation-link/style.css +10 -1
  306. package/build-style/post-template/editor-rtl.css +10 -1
  307. package/build-style/post-template/editor.css +10 -1
  308. package/build-style/post-template/style-rtl.css +10 -1
  309. package/build-style/post-template/style.css +10 -1
  310. package/build-style/post-terms/style-rtl.css +10 -1
  311. package/build-style/post-terms/style.css +10 -1
  312. package/build-style/post-time-to-read/style-rtl.css +10 -1
  313. package/build-style/post-time-to-read/style.css +10 -1
  314. package/build-style/post-title/style-rtl.css +10 -1
  315. package/build-style/post-title/style.css +10 -1
  316. package/build-style/preformatted/style-rtl.css +10 -1
  317. package/build-style/preformatted/style.css +10 -1
  318. package/build-style/pullquote/editor-rtl.css +10 -1
  319. package/build-style/pullquote/editor.css +10 -1
  320. package/build-style/pullquote/style-rtl.css +10 -1
  321. package/build-style/pullquote/style.css +10 -1
  322. package/build-style/pullquote/theme-rtl.css +10 -1
  323. package/build-style/pullquote/theme.css +10 -1
  324. package/build-style/query/editor-rtl.css +10 -1
  325. package/build-style/query/editor.css +10 -1
  326. package/build-style/query-pagination/editor-rtl.css +10 -1
  327. package/build-style/query-pagination/editor.css +10 -1
  328. package/build-style/query-pagination/style-rtl.css +10 -1
  329. package/build-style/query-pagination/style.css +10 -1
  330. package/build-style/query-pagination-numbers/editor-rtl.css +10 -1
  331. package/build-style/query-pagination-numbers/editor.css +10 -1
  332. package/build-style/query-title/style-rtl.css +10 -1
  333. package/build-style/query-title/style.css +10 -1
  334. package/build-style/quote/style-rtl.css +10 -1
  335. package/build-style/quote/style.css +10 -1
  336. package/build-style/quote/theme-rtl.css +10 -1
  337. package/build-style/quote/theme.css +10 -1
  338. package/build-style/read-more/style-rtl.css +10 -1
  339. package/build-style/read-more/style.css +10 -1
  340. package/build-style/reset-rtl.css +10 -1
  341. package/build-style/reset.css +10 -1
  342. package/build-style/rss/editor-rtl.css +10 -1
  343. package/build-style/rss/editor.css +10 -1
  344. package/build-style/rss/style-rtl.css +10 -1
  345. package/build-style/rss/style.css +10 -1
  346. package/build-style/search/editor-rtl.css +10 -1
  347. package/build-style/search/editor.css +10 -1
  348. package/build-style/search/style-rtl.css +10 -1
  349. package/build-style/search/style.css +10 -1
  350. package/build-style/search/theme-rtl.css +10 -1
  351. package/build-style/search/theme.css +10 -1
  352. package/build-style/separator/editor-rtl.css +10 -1
  353. package/build-style/separator/editor.css +10 -1
  354. package/build-style/separator/style-rtl.css +10 -1
  355. package/build-style/separator/style.css +10 -1
  356. package/build-style/separator/theme-rtl.css +10 -1
  357. package/build-style/separator/theme.css +10 -1
  358. package/build-style/shortcode/editor-rtl.css +10 -1
  359. package/build-style/shortcode/editor.css +10 -1
  360. package/build-style/site-logo/editor-rtl.css +10 -1
  361. package/build-style/site-logo/editor.css +10 -1
  362. package/build-style/site-logo/style-rtl.css +10 -1
  363. package/build-style/site-logo/style.css +10 -1
  364. package/build-style/site-tagline/editor-rtl.css +10 -1
  365. package/build-style/site-tagline/editor.css +10 -1
  366. package/build-style/site-tagline/style-rtl.css +10 -1
  367. package/build-style/site-tagline/style.css +10 -1
  368. package/build-style/site-title/editor-rtl.css +10 -1
  369. package/build-style/site-title/editor.css +10 -1
  370. package/build-style/site-title/style-rtl.css +10 -1
  371. package/build-style/site-title/style.css +10 -1
  372. package/build-style/social-link/editor-rtl.css +10 -1
  373. package/build-style/social-link/editor.css +10 -1
  374. package/build-style/social-links/editor-rtl.css +14 -12
  375. package/build-style/social-links/editor.css +14 -12
  376. package/build-style/social-links/style-rtl.css +10 -1
  377. package/build-style/social-links/style.css +10 -1
  378. package/build-style/spacer/editor-rtl.css +10 -1
  379. package/build-style/spacer/editor.css +10 -1
  380. package/build-style/spacer/style-rtl.css +10 -1
  381. package/build-style/spacer/style.css +10 -1
  382. package/build-style/style-rtl.css +11 -1
  383. package/build-style/style.css +11 -1
  384. package/build-style/table/editor-rtl.css +10 -1
  385. package/build-style/table/editor.css +10 -1
  386. package/build-style/table/style-rtl.css +10 -1
  387. package/build-style/table/style.css +10 -1
  388. package/build-style/table/theme-rtl.css +10 -1
  389. package/build-style/table/theme.css +10 -1
  390. package/build-style/table-of-contents/style-rtl.css +10 -1
  391. package/build-style/table-of-contents/style.css +10 -1
  392. package/build-style/tag-cloud/editor-rtl.css +10 -1
  393. package/build-style/tag-cloud/editor.css +10 -1
  394. package/build-style/tag-cloud/style-rtl.css +10 -1
  395. package/build-style/tag-cloud/style.css +10 -1
  396. package/build-style/template-part/editor-rtl.css +10 -1
  397. package/build-style/template-part/editor.css +10 -1
  398. package/build-style/template-part/theme-rtl.css +10 -1
  399. package/build-style/template-part/theme.css +10 -1
  400. package/build-style/term-description/style-rtl.css +10 -1
  401. package/build-style/term-description/style.css +10 -1
  402. package/build-style/text-columns/editor-rtl.css +10 -1
  403. package/build-style/text-columns/editor.css +10 -1
  404. package/build-style/text-columns/style-rtl.css +10 -1
  405. package/build-style/text-columns/style.css +10 -1
  406. package/build-style/theme-rtl.css +10 -1
  407. package/build-style/theme.css +10 -1
  408. package/build-style/verse/style-rtl.css +10 -1
  409. package/build-style/verse/style.css +10 -1
  410. package/build-style/video/editor-rtl.css +10 -1
  411. package/build-style/video/editor.css +10 -1
  412. package/build-style/video/style-rtl.css +10 -1
  413. package/build-style/video/style.css +10 -1
  414. package/build-style/video/theme-rtl.css +10 -1
  415. package/build-style/video/theme.css +10 -1
  416. package/package.json +35 -35
  417. package/src/avatar/index.js +1 -0
  418. package/src/block/edit.js +1 -2
  419. package/src/button/edit.js +6 -8
  420. package/src/buttons/style.scss +2 -0
  421. package/src/categories/index.php +1 -1
  422. package/src/comment-author-name/index.js +1 -0
  423. package/src/comment-content/index.js +1 -0
  424. package/src/comment-date/index.js +1 -0
  425. package/src/comment-edit-link/index.js +1 -0
  426. package/src/comment-reply-link/index.js +1 -0
  427. package/src/comments-pagination-next/block.json +5 -0
  428. package/src/comments-pagination-numbers/index.js +1 -0
  429. package/src/comments-pagination-previous/block.json +5 -0
  430. package/src/comments-title/index.js +1 -0
  431. package/src/cover/edit/index.js +6 -2
  432. package/src/editor.scss +0 -1
  433. package/src/file/block.json +8 -4
  434. package/src/group/editor.scss +2 -2
  435. package/src/image/edit.js +6 -8
  436. package/src/image/image.js +5 -7
  437. package/src/post-navigation-link/block.json +6 -0
  438. package/src/post-navigation-link/variations.js +12 -0
  439. package/src/post-time-to-read/index.js +1 -0
  440. package/src/query/block.json +1 -0
  441. package/src/query/edit/inspector-controls/index.js +2 -2
  442. package/src/query/edit/inspector-controls/pages-control.js +1 -1
  443. package/src/query/edit/inspector-controls/per-page-control.js +1 -1
  444. package/src/query-no-results/block.json +10 -0
  445. package/src/query-pagination-numbers/index.js +1 -0
  446. package/src/query-title/block.json +5 -0
  447. package/src/site-logo/edit.js +1 -0
  448. package/src/social-links/editor.scss +4 -13
  449. package/src/table-of-contents/block.json +52 -1
  450. package/src/term-description/index.js +1 -0
  451. package/build-style/post-content/editor-rtl.css +0 -95
  452. package/build-style/post-content/editor.css +0 -95
  453. package/src/post-content/editor.scss +0 -4
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_components","_compose","_blockEditor","_i18n","_data","_blob","_notices","_shared","_inspectorControls","_blockControls","_coverPlaceholder","_resizableCoverPopover","_colorUtils","_jsxRuntime","getInnerBlocksTemplate","attributes","align","placeholder","__","isTemporaryMedia","id","url","isBlobURL","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","useEntityProp","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","media","useSelect","select","coreStore","getMedia","mediaUrl","source_url","useEffect","averageBackgroundColor","getMediaColor","newOverlayColor","color","newIsDark","compositeIsDark","replaceAll","IMAGE_BACKGROUND_TYPE","createErrorNotice","noticesStore","gradientClass","gradientValue","__experimentalUseGradient","onSelectMedia","newMedia","mediaAttributes","attributesFromMedia","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","DEFAULT_OVERLAY_COLOR","DEFAULT_BACKGROUND_COLOR","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","VIDEO_BACKGROUND_TYPE","resizeListener","height","width","useResizeObserver","resizableBoxDimensions","useMemo","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","mediaPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","useRef","blockProps","useBlockProps","fontSizes","useSettings","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","useInnerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","jsx","default","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","dimensions","aspectRatio","size","jsxs","Fragment","children","clsx","onError","ColorPalette","disableCustomColors","onChange","clearable","classes","isContentPositionCenter","getPositionClassName","showOverlay","dimRatioToClass","class","Placeholder","withIllustration","src","role","autoPlay","muted","loop","Spinner","disableMediaButtons","_default","exports","compose","withColors"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\tisDark: newIsDark,\n\t\t\t\tisUserOverlayColor: isUserOverlayColor || false,\n\t\t\t} );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&amp;', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t\tisUserOverlayColor: isUserOverlayColor || false,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\t// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.\n\t\tshowHandle: ! attributes.style?.dimensions?.aspectRatio ? true : false,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ clsx( 'is-placeholder', blockProps.className ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = clsx(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\tconst showOverlay =\n\t\turl || ! useFeaturedImage || ( useFeaturedImage && ! url );\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ showOverlay && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAA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,CACjD,CAAC,CAAEH,SAAU,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_coreData","_element","_components","_compose","_blockEditor","_i18n","_data","_blob","_notices","_shared","_inspectorControls","_blockControls","_coverPlaceholder","_resizableCoverPopover","_colorUtils","_jsxRuntime","getInnerBlocksTemplate","attributes","align","placeholder","__","isTemporaryMedia","id","url","isBlobURL","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","useEntityProp","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","media","useSelect","select","coreStore","getMedia","mediaUrl","source_url","useEffect","averageBackgroundColor","getMediaColor","newOverlayColor","color","newIsDark","compositeIsDark","replaceAll","IMAGE_BACKGROUND_TYPE","createErrorNotice","noticesStore","gradientClass","gradientValue","__experimentalUseGradient","onSelectMedia","newMedia","mediaAttributes","attributesFromMedia","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","DEFAULT_OVERLAY_COLOR","DEFAULT_BACKGROUND_COLOR","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","VIDEO_BACKGROUND_TYPE","blockEditingMode","useBlockEditingMode","hasNonContentControls","resizeListener","height","width","useResizeObserver","resizableBoxDimensions","useMemo","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","mediaPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","useRef","blockProps","useBlockProps","fontSizes","useSettings","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","useInnerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","jsx","default","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","dimensions","aspectRatio","size","jsxs","Fragment","children","clsx","onError","ColorPalette","disableCustomColors","onChange","clearable","classes","isContentPositionCenter","getPositionClassName","showOverlay","dimRatioToClass","class","Placeholder","withIllustration","src","role","autoPlay","muted","loop","Spinner","disableMediaButtons","_default","exports","compose","withColors"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\tisDark: newIsDark,\n\t\t\t\tisUserOverlayColor: isUserOverlayColor || false,\n\t\t\t} );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&amp;', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t\tisUserOverlayColor: isUserOverlayColor || false,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\t// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.\n\t\tshowHandle: ! attributes.style?.dimensions?.aspectRatio ? true : false,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ hasNonContentControls && isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ clsx( 'is-placeholder', blockProps.className ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = clsx(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\tconst showOverlay =\n\t\turl || ! useFeaturedImage || ( useFeaturedImage && ! url );\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ showOverlay && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ hasNonContentControls && isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAUA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,OAAA,GAAAV,OAAA;AASA,IAAAW,kBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,iBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,sBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AAKuB,IAAAgB,WAAA,GAAAhB,OAAA;AAhDvB;AACA;AACA;;AAGA;AACA;AACA;;AAoBA;AACA;AACA;;AAqBA,SAASiB,sBAAsBA,CAAEC,UAAU,EAAG;EAC7C,OAAO,CACN,CACC,gBAAgB,EAChB;IACCC,KAAK,EAAE,QAAQ;IACfC,WAAW,EAAE,IAAAC,QAAE,EAAE,cAAe,CAAC;IACjC,GAAGH;EACJ,CAAC,CACD,CACD;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,gBAAgB,GAAGA,CAAEC,EAAE,EAAEC,GAAG,KAAM,CAAED,EAAE,IAAI,IAAAE,eAAS,EAAED,GAAI,CAAC;AAEhE,SA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ACzBgD,sBAAsB,EAAGA;MAAwB,CACjD,CAAC,eACF,IAAA/H,WAAA,CAAAkI,GAAA;QAAA,GAAUZ;MAAgB,CAAI,CAAC;IAAA,CACvB,CAAC,EACR/B,qBAAqB,IAAI3E,UAAU,iBACpC,IAAAZ,WAAA,CAAAkI,GAAA,EAACpI,sBAAA,CAAAqI,OAAqB;MAAA,GAAMI;IAAmB,CAAI,CACnD;EAAA,CACA,CAAC;AAEL;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAAvC,OAAA,GAEc,IAAAwC,gBAAO,EAAE,CACvB,IAAAC,uBAAU,EAAE;EAAE/J,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEH,SAAU,CAAC","ignoreList":[]}
@@ -36,7 +36,8 @@ const metadata = exports.metadata = {
36
36
  role: "local"
37
37
  },
38
38
  href: {
39
- type: "string"
39
+ type: "string",
40
+ role: "content"
40
41
  },
41
42
  fileId: {
42
43
  type: "string",
@@ -47,13 +48,15 @@ const metadata = exports.metadata = {
47
48
  fileName: {
48
49
  type: "rich-text",
49
50
  source: "rich-text",
50
- selector: "a:not([download])"
51
+ selector: "a:not([download])",
52
+ role: "content"
51
53
  },
52
54
  textLinkHref: {
53
55
  type: "string",
54
56
  source: "attribute",
55
57
  selector: "a:not([download])",
56
- attribute: "href"
58
+ attribute: "href",
59
+ role: "content"
57
60
  },
58
61
  textLinkTarget: {
59
62
  type: "string",
@@ -68,7 +71,8 @@ const metadata = exports.metadata = {
68
71
  downloadButtonText: {
69
72
  type: "rich-text",
70
73
  source: "rich-text",
71
- selector: "a[download]"
74
+ selector: "a[download]",
75
+ role: "content"
72
76
  },
73
77
  displayPreview: {
74
78
  type: "boolean"
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","id","type","blob","role","href","fileId","source","selector","attribute","fileName","textLinkHref","textLinkTarget","showDownloadButton","downloadButtonText","displayPreview","previewHeight","supports","anchor","align","spacing","margin","padding","color","gradients","link","text","__experimentalDefaultControls","background","__experimentalBorder","radius","width","style","interactivity","editorStyle","settings","icon","example","_x","transforms","deprecated","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/file/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { file as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\thref: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg',\n\t\t\tfileName: _x( 'Armstrong_Small_Step', 'Name of the file' ),\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAQ,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,EAAA;MAAAC,IAAA;IAAA;IAAAC,IAAA;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,UAAU,EAAVA,mBAAU;EACVC,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAElD,IAAI;EAAEJ,QAAQ;EAAE6C;AAAS,CAAE,CAAC;AAAC5C,OAAA,CAAAoD,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","id","type","blob","role","href","fileId","source","selector","attribute","fileName","textLinkHref","textLinkTarget","showDownloadButton","downloadButtonText","displayPreview","previewHeight","supports","anchor","align","spacing","margin","padding","color","gradients","link","text","__experimentalDefaultControls","background","__experimentalBorder","radius","width","style","interactivity","editorStyle","settings","icon","example","_x","transforms","deprecated","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/file/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { file as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\thref: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg',\n\t\t\tfileName: _x( 'Armstrong_Small_Step', 'Name of the file' ),\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA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KAAA;MAAAQ,KAAA;MAAAC,KAAA;MAAAL,6BAAA;QAAAG,MAAA;QAAAP,KAAA;QAAAQ,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAC,aAAA;EAAA;EAAAC,WAAA;EAAAF,KAAA;AAAA;AAUA,MAAM;EAAEtC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMyC,QAAQ,GAAA5C,OAAA,CAAA4C,QAAA,GAAG;EACvBC,IAAI,EAAJA,WAAI;EACJC,OAAO,EAAE;IACRrC,UAAU,EAAE;MACXK,IAAI,EAAE,8EAA8E;MACpFK,QAAQ,EAAE,IAAA4B,QAAE,EAAE,sBAAsB,EAAE,kBAAmB;IAC1D;EACD,CAAC;EACDC,UAAU,EAAVA,mBAAU;EACVC,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAElD,IAAI;EAAEJ,QAAQ;EAAE6C;AAAS,CAAE,CAAC;AAAC5C,OAAA,CAAAoD,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -17,7 +17,6 @@ var _i18n = require("@wordpress/i18n");
17
17
  var _icons = require("@wordpress/icons");
18
18
  var _notices = require("@wordpress/notices");
19
19
  var _compose = require("@wordpress/compose");
20
- var _lockUnlock = require("../lock-unlock");
21
20
  var _hooks = require("../utils/hooks");
22
21
  var _image = _interopRequireDefault(require("./image"));
23
22
  var _utils = require("./utils");
@@ -97,7 +96,6 @@ function ImageEdit({
97
96
  metadata
98
97
  } = attributes;
99
98
  const [temporaryURL, setTemporaryURL] = (0, _element.useState)(attributes.blob);
100
- const registry = (0, _data.useRegistry)();
101
99
  const containerRef = (0, _element.useRef)();
102
100
  // Only observe the max width from the parent container when the parent layout is not flex nor grid.
103
101
  // This won't work for them because the container width changes with the image.
@@ -323,10 +321,10 @@ function ImageEdit({
323
321
  if (!isSingleSelected) {
324
322
  return {};
325
323
  }
326
- const blockBindingsSource = (0, _lockUnlock.unlock)(select(_blocks.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
324
+ const blockBindingsSource = (0, _blocks.getBlockBindingsSource)(metadata?.bindings?.url?.source);
327
325
  return {
328
326
  lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
329
- registry,
327
+ select,
330
328
  context,
331
329
  args: metadata?.bindings?.url?.args
332
330
  }),
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blob","_blocks","_components","_data","_blockEditor","_element","_i18n","_icons","_notices","_compose","_lockUnlock","_hooks","_image","_utils","_useMaxWidthObserver","_constants","_jsxRuntime","pickRelevantMediaFiles","image","size","imageProps","Object","fromEntries","entries","filter","key","includes","url","sizes","media_details","source_url","exports","isExternalImage","id","isBlobURL","hasSize","_image$sizes$size","_image$media_details$","ImageEdit","attributes","setAttributes","isSelected","isSingleSelected","className","insertBlocksAfter","onReplace","context","clientId","__unstableParentLayout","parentLayout","alt","caption","width","height","sizeSlug","aspectRatio","scale","align","metadata","temporaryURL","setTemporaryURL","useState","blob","registry","useRegistry","containerRef","useRef","isMaxWidthContainerWidth","type","maxWidthObserver","maxContentWidth","useMaxWidthObserver","placeholderResizeListener","placeholderWidth","useResizeObserver","isSmallContainer","altRef","useEffect","current","captionRef","__unstableMarkNextChangeAsNotPersistent","replaceBlock","useDispatch","blockEditorStore","undefined","getSettings","getBlockRootClientId","getBlockName","canInsertBlockType","useSelect","blockEditingMode","useBlockEditingMode","createErrorNotice","noticesStore","onUploadError","message","src","onSelectImagesList","images","win","ownerDocument","defaultView","every","file","File","files","rootClientId","some","isValidFileType","__","imageBlocks","map","createBlock","createBlobURL","galleryBlock","onSelectImage","media","Array","isArray","title","imageDefaultSize","newSize","mediaAttributes","omittedCaption","restMediaAttributes","additionalAttributes","linkDestination","window","wp","view","settings","defaultProps","link","LINK_DESTINATION_NONE","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT","LINK_DESTINATION_CUSTOM","href","onSelectURL","newURL","useUploadMediaFromBlobURL","allowedTypes","ALLOWED_MEDIA_TYPES","onChange","onError","isExternal","mediaPreview","jsx","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","classes","clsx","style","keys","length","blockProps","useBlockProps","ref","lockUrlControls","lockUrlControlsMessage","select","blockBindingsSource","unlock","blocksStore","getBlockBindingsSource","bindings","source","canUserEditValue","args","label","sprintf","placeholder","content","jsxs","Placeholder","icon","pluginsIcon","withIllustration","instructions","objectFit","children","Fragment","default","parentLayoutType","MediaPlaceholder","BlockIcon","onSelect","accept","handleUpload","value","disableMediaButtons","_default"],"sources":["@wordpress/block-library/src/image/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL, createBlobURL } from '@wordpress/blob';\nimport { store as blocksStore, createBlock } from '@wordpress/blocks';\nimport { Placeholder } from '@wordpress/components';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport {\n\tBlockIcon,\n\tuseBlockProps,\n\tMediaPlaceholder,\n\tstore as blockEditorStore,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { image as icon, plugins as pluginsIcon } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useResizeObserver } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { useUploadMediaFromBlobURL } from '../utils/hooks';\nimport Image from './image';\nimport { isValidFileType } from './utils';\nimport { useMaxWidthObserver } from './use-max-width-observer';\n\n/**\n * Module constants\n */\nimport {\n\tLINK_DESTINATION_ATTACHMENT,\n\tLINK_DESTINATION_CUSTOM,\n\tLINK_DESTINATION_MEDIA,\n\tLINK_DESTINATION_NONE,\n\tALLOWED_MEDIA_TYPES,\n} from './constants';\n\nexport const pickRelevantMediaFiles = ( image, size ) => {\n\tconst imageProps = Object.fromEntries(\n\t\tObject.entries( image ?? {} ).filter( ( [ key ] ) =>\n\t\t\t[ 'alt', 'id', 'link', 'caption' ].includes( key )\n\t\t)\n\t);\n\n\timageProps.url =\n\t\timage?.sizes?.[ size ]?.url ||\n\t\timage?.media_details?.sizes?.[ size ]?.source_url ||\n\t\timage.url;\n\treturn imageProps;\n};\n\n/**\n * Is the url for the image hosted externally. An externally hosted image has no\n * id and is not a blob url.\n *\n * @param {number=} id The id of the image.\n * @param {string=} url The url of the image.\n *\n * @return {boolean} Is the url an externally hosted url?\n */\nexport const isExternalImage = ( id, url ) => url && ! id && ! isBlobURL( url );\n\n/**\n * Checks if WP generated the specified image size. Size generation is skipped\n * when the image is smaller than the said size.\n *\n * @param {Object} image\n * @param {string} size\n *\n * @return {boolean} Whether or not it has default image size.\n */\nfunction hasSize( image, size ) {\n\treturn (\n\t\t'url' in ( image?.sizes?.[ size ] ?? {} ) ||\n\t\t'source_url' in ( image?.media_details?.sizes?.[ size ] ?? {} )\n\t);\n}\n\nexport function ImageEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected: isSingleSelected,\n\tclassName,\n\tinsertBlocksAfter,\n\tonReplace,\n\tcontext,\n\tclientId,\n\t__unstableParentLayout: parentLayout,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\tcaption,\n\t\tid,\n\t\twidth,\n\t\theight,\n\t\tsizeSlug,\n\t\taspectRatio,\n\t\tscale,\n\t\talign,\n\t\tmetadata,\n\t} = attributes;\n\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\n\tconst registry = useRegistry();\n\tconst containerRef = useRef();\n\t// Only observe the max width from the parent container when the parent layout is not flex nor grid.\n\t// This won't work for them because the container width changes with the image.\n\t// TODO: Find a way to observe the container width for flex and grid layouts.\n\tconst isMaxWidthContainerWidth =\n\t\t! parentLayout ||\n\t\t( parentLayout.type !== 'flex' && parentLayout.type !== 'grid' );\n\tconst [ maxWidthObserver, maxContentWidth ] = useMaxWidthObserver();\n\n\tconst [ placeholderResizeListener, { width: placeholderWidth } ] =\n\t\tuseResizeObserver();\n\n\tconst isSmallContainer = placeholderWidth && placeholderWidth < 160;\n\n\tconst altRef = useRef();\n\tuseEffect( () => {\n\t\taltRef.current = alt;\n\t}, [ alt ] );\n\n\tconst captionRef = useRef();\n\tuseEffect( () => {\n\t\tcaptionRef.current = caption;\n\t}, [ caption ] );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent, replaceBlock } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( [ 'wide', 'full' ].includes( align ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\twidth: undefined,\n\t\t\t\theight: undefined,\n\t\t\t\taspectRatio: undefined,\n\t\t\t\tscale: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ __unstableMarkNextChangeAsNotPersistent, align, setAttributes ] );\n\n\tconst {\n\t\tgetSettings,\n\t\tgetBlockRootClientId,\n\t\tgetBlockName,\n\t\tcanInsertBlockType,\n\t} = useSelect( blockEditorStore );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetAttributes( {\n\t\t\tsrc: undefined,\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tblob: undefined,\n\t\t} );\n\t}\n\n\tfunction onSelectImagesList( images ) {\n\t\tconst win = containerRef.current?.ownerDocument.defaultView;\n\n\t\tif ( images.every( ( file ) => file instanceof win.File ) ) {\n\t\t\t/** @type {File[]} */\n\t\t\tconst files = images;\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\tif ( files.some( ( file ) => ! isValidFileType( file ) ) ) {\n\t\t\t\t// Copied from the same notice in the gallery block.\n\t\t\t\tcreateErrorNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'If uploading to a gallery all files need to be image formats'\n\t\t\t\t\t),\n\t\t\t\t\t{ id: 'gallery-upload-invalid-file', type: 'snackbar' }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst imageBlocks = files\n\t\t\t\t.filter( ( file ) => isValidFileType( file ) )\n\t\t\t\t.map( ( file ) =>\n\t\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\tif ( getBlockName( rootClientId ) === 'core/gallery' ) {\n\t\t\t\treplaceBlock( clientId, imageBlocks );\n\t\t\t} else if ( canInsertBlockType( 'core/gallery', rootClientId ) ) {\n\t\t\t\tconst galleryBlock = createBlock(\n\t\t\t\t\t'core/gallery',\n\t\t\t\t\t{},\n\t\t\t\t\timageBlocks\n\t\t\t\t);\n\n\t\t\t\treplaceBlock( clientId, galleryBlock );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction onSelectImage( media ) {\n\t\tif ( Array.isArray( media ) ) {\n\t\t\tonSelectImagesList( media );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! media || ! media.url ) {\n\t\t\tsetAttributes( {\n\t\t\t\turl: undefined,\n\t\t\t\talt: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\ttitle: undefined,\n\t\t\t\tcaption: undefined,\n\t\t\t\tblob: undefined,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( media.url ) ) {\n\t\t\tsetTemporaryURL( media.url );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { imageDefaultSize } = getSettings();\n\n\t\t// Try to use the previous selected image size if its available\n\t\t// otherwise try the default image size or fallback to \"full\"\n\t\tlet newSize = 'full';\n\t\tif ( sizeSlug && hasSize( media, sizeSlug ) ) {\n\t\t\tnewSize = sizeSlug;\n\t\t} else if ( hasSize( media, imageDefaultSize ) ) {\n\t\t\tnewSize = imageDefaultSize;\n\t\t}\n\n\t\tlet mediaAttributes = pickRelevantMediaFiles( media, newSize );\n\n\t\t// If a caption text was meanwhile written by the user,\n\t\t// make sure the text is not overwritten by empty captions.\n\t\tif ( captionRef.current && ! mediaAttributes.caption ) {\n\t\t\tconst { caption: omittedCaption, ...restMediaAttributes } =\n\t\t\t\tmediaAttributes;\n\t\t\tmediaAttributes = restMediaAttributes;\n\t\t}\n\n\t\tlet additionalAttributes;\n\t\t// Reset the dimension attributes if changing to a different image.\n\t\tif ( ! media.id || media.id !== id ) {\n\t\t\tadditionalAttributes = {\n\t\t\t\tsizeSlug: newSize,\n\t\t\t};\n\t\t} else {\n\t\t\t// Keep the same url when selecting the same file, so \"Resolution\"\n\t\t\t// option is not changed.\n\t\t\tadditionalAttributes = { url };\n\t\t}\n\n\t\t// Check if default link setting should be used.\n\t\tlet linkDestination = attributes.linkDestination;\n\t\tif ( ! linkDestination ) {\n\t\t\t// Use the WordPress option to determine the proper default.\n\t\t\t// The constants used in Gutenberg do not match WP options so a little more complicated than ideal.\n\t\t\t// TODO: fix this in a follow up PR, requires updating media-text and ui component.\n\t\t\tswitch (\n\t\t\t\twindow?.wp?.media?.view?.settings?.defaultProps?.link ||\n\t\t\t\tLINK_DESTINATION_NONE\n\t\t\t) {\n\t\t\t\tcase 'file':\n\t\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_MEDIA;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_ATTACHMENT;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LINK_DESTINATION_CUSTOM:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_CUSTOM;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LINK_DESTINATION_NONE:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_NONE;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Check if the image is linked to it's media.\n\t\tlet href;\n\t\tswitch ( linkDestination ) {\n\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\thref = media.url;\n\t\t\t\tbreak;\n\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\thref = media.link;\n\t\t\t\tbreak;\n\t\t}\n\t\tmediaAttributes.href = href;\n\n\t\tsetAttributes( {\n\t\t\tblob: undefined,\n\t\t\t...mediaAttributes,\n\t\t\t...additionalAttributes,\n\t\t\tlinkDestination,\n\t\t} );\n\t\tsetTemporaryURL();\n\t}\n\n\tfunction onSelectURL( newURL ) {\n\t\tif ( newURL !== url ) {\n\t\t\tsetAttributes( {\n\t\t\t\tblob: undefined,\n\t\t\t\turl: newURL,\n\t\t\t\tid: undefined,\n\t\t\t\tsizeSlug: getSettings().imageDefaultSize,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}\n\n\tuseUploadMediaFromBlobURL( {\n\t\turl: temporaryURL,\n\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\tonChange: onSelectImage,\n\t\tonError: onUploadError,\n\t} );\n\n\tconst isExternal = isExternalImage( id, url );\n\tconst src = isExternal ? url : undefined;\n\tconst mediaPreview = !! url && (\n\t\t<img\n\t\t\talt={ __( 'Edit image' ) }\n\t\t\ttitle={ __( 'Edit image' ) }\n\t\t\tclassName=\"edit-image-preview\"\n\t\t\tsrc={ url }\n\t\t/>\n\t);\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\n\tconst classes = clsx( className, {\n\t\t'is-transient': !! temporaryURL,\n\t\t'is-resized': !! width || !! height,\n\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t'has-custom-border':\n\t\t\t!! borderProps.className ||\n\t\t\t( borderProps.style &&\n\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tref: containerRef,\n\t\tclassName: classes,\n\t} );\n\n\t// Much of this description is duplicated from MediaPlaceholder.\n\tconst { lockUrlControls = false, lockUrlControlsMessage } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst blockBindingsSource = unlock(\n\t\t\t\tselect( blocksStore )\n\t\t\t).getBlockBindingsSource( metadata?.bindings?.url?.source );\n\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tregistry,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockUrlControlsMessage: blockBindingsSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\tblockBindingsSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t};\n\t\t},\n\t\t[ context, isSingleSelected, metadata?.bindings?.url ]\n\t);\n\tconst placeholder = ( content ) => {\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ clsx( 'block-editor-media-placeholder', {\n\t\t\t\t\t[ borderProps.className ]:\n\t\t\t\t\t\t!! borderProps.className && ! isSingleSelected,\n\t\t\t\t} ) }\n\t\t\t\ticon={\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\t( lockUrlControls ? pluginsIcon : icon )\n\t\t\t\t}\n\t\t\t\twithIllustration={ ! isSingleSelected || isSmallContainer }\n\t\t\t\tlabel={ ! isSmallContainer && __( 'Image' ) }\n\t\t\t\tinstructions={\n\t\t\t\t\t! lockUrlControls &&\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Upload or drag an image file here, or pick one from your library.'\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tstyle={ {\n\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t! ( width && height ) && aspectRatio\n\t\t\t\t\t\t\t? aspectRatio\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\twidth: height && aspectRatio ? '100%' : width,\n\t\t\t\t\theight: width && aspectRatio ? '100%' : height,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t...shadowProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ lockUrlControls &&\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\tlockUrlControlsMessage }\n\n\t\t\t\t{ ! lockUrlControls && ! isSmallContainer && content }\n\t\t\t\t{ placeholderResizeListener }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t<Image\n\t\t\t\t\ttemporaryURL={ temporaryURL }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSingleSelected={ isSingleSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonSelectImage={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonUploadError={ onUploadError }\n\t\t\t\t\tcontext={ context }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tblockEditingMode={ blockEditingMode }\n\t\t\t\t\tparentLayoutType={ parentLayout?.type }\n\t\t\t\t\tmaxContentWidth={ maxContentWidth }\n\t\t\t\t/>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\thandleUpload={ ( files ) => files.length === 1 }\n\t\t\t\t\tvalue={ { id, src } }\n\t\t\t\t\tmediaPreview={ mediaPreview }\n\t\t\t\t\tdisableMediaButtons={ temporaryURL || url }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t\t{\n\t\t\t\t// The listener cannot be placed as the first element as it will break the in-between inserter.\n\t\t\t\t// See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120\n\t\t\t\tisSingleSelected && isMaxWidthContainerWidth && maxWidthObserver\n\t\t\t}\n\t\t</>\n\t);\n}\n\nexport default ImageEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AASA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAKA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,oBAAA,GAAAf,OAAA;AAKA,IAAAgB,UAAA,GAAAhB,OAAA;AAMqB,IAAAiB,WAAA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,IAAI,eAAG,IAAAjK,WAAA,CAAAmI,GAAA,EAAC/I,YAAA,CAAAuL,SAAS;UAACV,IAAI,EAAGA;QAAM,CAAE,CAAG;QACpCW,QAAQ,EAAGzE,aAAe;QAC1BuB,WAAW,EAAGA,WAAa;QAC3BM,OAAO,EAAGlD,aAAe;QACzB+E,WAAW,EAAGA,WAAa;QAC3BgB,MAAM,EAAC,SAAS;QAChBhD,YAAY,EAAGC,8BAAqB;QACpCgD,YAAY,EAAKrF,KAAK,IAAMA,KAAK,CAACmD,MAAM,KAAK,CAAG;QAChDmC,KAAK,EAAG;UAAE9J,EAAE;UAAE+D;QAAI,CAAG;QACrBkD,YAAY,EAAGA,YAAc;QAC7B8C,mBAAmB,EAAGrI,YAAY,IAAIhC;MAAK,CAC3C,CAAC;IAAA,CACK,CAAC;IAER;IACA;IACAe,gBAAgB,IAAIyB,wBAAwB,IAAIE,gBAAgB;EAAA,CAEhE,CAAC;AAEL;AAAC,IAAA4H,QAAA,GAAAlK,OAAA,CAAAyJ,OAAA,GAEclJ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blob","_blocks","_components","_data","_blockEditor","_element","_i18n","_icons","_notices","_compose","_hooks","_image","_utils","_useMaxWidthObserver","_constants","_jsxRuntime","pickRelevantMediaFiles","image","size","imageProps","Object","fromEntries","entries","filter","key","includes","url","sizes","media_details","source_url","exports","isExternalImage","id","isBlobURL","hasSize","_image$sizes$size","_image$media_details$","ImageEdit","attributes","setAttributes","isSelected","isSingleSelected","className","insertBlocksAfter","onReplace","context","clientId","__unstableParentLayout","parentLayout","alt","caption","width","height","sizeSlug","aspectRatio","scale","align","metadata","temporaryURL","setTemporaryURL","useState","blob","containerRef","useRef","isMaxWidthContainerWidth","type","maxWidthObserver","maxContentWidth","useMaxWidthObserver","placeholderResizeListener","placeholderWidth","useResizeObserver","isSmallContainer","altRef","useEffect","current","captionRef","__unstableMarkNextChangeAsNotPersistent","replaceBlock","useDispatch","blockEditorStore","undefined","getSettings","getBlockRootClientId","getBlockName","canInsertBlockType","useSelect","blockEditingMode","useBlockEditingMode","createErrorNotice","noticesStore","onUploadError","message","src","onSelectImagesList","images","win","ownerDocument","defaultView","every","file","File","files","rootClientId","some","isValidFileType","__","imageBlocks","map","createBlock","createBlobURL","galleryBlock","onSelectImage","media","Array","isArray","title","imageDefaultSize","newSize","mediaAttributes","omittedCaption","restMediaAttributes","additionalAttributes","linkDestination","window","wp","view","settings","defaultProps","link","LINK_DESTINATION_NONE","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT","LINK_DESTINATION_CUSTOM","href","onSelectURL","newURL","useUploadMediaFromBlobURL","allowedTypes","ALLOWED_MEDIA_TYPES","onChange","onError","isExternal","mediaPreview","jsx","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","classes","clsx","style","keys","length","blockProps","useBlockProps","ref","lockUrlControls","lockUrlControlsMessage","select","blockBindingsSource","getBlockBindingsSource","bindings","source","canUserEditValue","args","label","sprintf","placeholder","content","jsxs","Placeholder","icon","pluginsIcon","withIllustration","instructions","objectFit","children","Fragment","default","parentLayoutType","MediaPlaceholder","BlockIcon","onSelect","accept","handleUpload","value","disableMediaButtons","_default"],"sources":["@wordpress/block-library/src/image/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL, createBlobURL } from '@wordpress/blob';\nimport { createBlock, getBlockBindingsSource } from '@wordpress/blocks';\nimport { Placeholder } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tBlockIcon,\n\tuseBlockProps,\n\tMediaPlaceholder,\n\tstore as blockEditorStore,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { image as icon, plugins as pluginsIcon } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useResizeObserver } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { useUploadMediaFromBlobURL } from '../utils/hooks';\nimport Image from './image';\nimport { isValidFileType } from './utils';\nimport { useMaxWidthObserver } from './use-max-width-observer';\n\n/**\n * Module constants\n */\nimport {\n\tLINK_DESTINATION_ATTACHMENT,\n\tLINK_DESTINATION_CUSTOM,\n\tLINK_DESTINATION_MEDIA,\n\tLINK_DESTINATION_NONE,\n\tALLOWED_MEDIA_TYPES,\n} from './constants';\n\nexport const pickRelevantMediaFiles = ( image, size ) => {\n\tconst imageProps = Object.fromEntries(\n\t\tObject.entries( image ?? {} ).filter( ( [ key ] ) =>\n\t\t\t[ 'alt', 'id', 'link', 'caption' ].includes( key )\n\t\t)\n\t);\n\n\timageProps.url =\n\t\timage?.sizes?.[ size ]?.url ||\n\t\timage?.media_details?.sizes?.[ size ]?.source_url ||\n\t\timage.url;\n\treturn imageProps;\n};\n\n/**\n * Is the url for the image hosted externally. An externally hosted image has no\n * id and is not a blob url.\n *\n * @param {number=} id The id of the image.\n * @param {string=} url The url of the image.\n *\n * @return {boolean} Is the url an externally hosted url?\n */\nexport const isExternalImage = ( id, url ) => url && ! id && ! isBlobURL( url );\n\n/**\n * Checks if WP generated the specified image size. Size generation is skipped\n * when the image is smaller than the said size.\n *\n * @param {Object} image\n * @param {string} size\n *\n * @return {boolean} Whether or not it has default image size.\n */\nfunction hasSize( image, size ) {\n\treturn (\n\t\t'url' in ( image?.sizes?.[ size ] ?? {} ) ||\n\t\t'source_url' in ( image?.media_details?.sizes?.[ size ] ?? {} )\n\t);\n}\n\nexport function ImageEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected: isSingleSelected,\n\tclassName,\n\tinsertBlocksAfter,\n\tonReplace,\n\tcontext,\n\tclientId,\n\t__unstableParentLayout: parentLayout,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\tcaption,\n\t\tid,\n\t\twidth,\n\t\theight,\n\t\tsizeSlug,\n\t\taspectRatio,\n\t\tscale,\n\t\talign,\n\t\tmetadata,\n\t} = attributes;\n\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\n\tconst containerRef = useRef();\n\t// Only observe the max width from the parent container when the parent layout is not flex nor grid.\n\t// This won't work for them because the container width changes with the image.\n\t// TODO: Find a way to observe the container width for flex and grid layouts.\n\tconst isMaxWidthContainerWidth =\n\t\t! parentLayout ||\n\t\t( parentLayout.type !== 'flex' && parentLayout.type !== 'grid' );\n\tconst [ maxWidthObserver, maxContentWidth ] = useMaxWidthObserver();\n\n\tconst [ placeholderResizeListener, { width: placeholderWidth } ] =\n\t\tuseResizeObserver();\n\n\tconst isSmallContainer = placeholderWidth && placeholderWidth < 160;\n\n\tconst altRef = useRef();\n\tuseEffect( () => {\n\t\taltRef.current = alt;\n\t}, [ alt ] );\n\n\tconst captionRef = useRef();\n\tuseEffect( () => {\n\t\tcaptionRef.current = caption;\n\t}, [ caption ] );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent, replaceBlock } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( [ 'wide', 'full' ].includes( align ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\twidth: undefined,\n\t\t\t\theight: undefined,\n\t\t\t\taspectRatio: undefined,\n\t\t\t\tscale: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ __unstableMarkNextChangeAsNotPersistent, align, setAttributes ] );\n\n\tconst {\n\t\tgetSettings,\n\t\tgetBlockRootClientId,\n\t\tgetBlockName,\n\t\tcanInsertBlockType,\n\t} = useSelect( blockEditorStore );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetAttributes( {\n\t\t\tsrc: undefined,\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tblob: undefined,\n\t\t} );\n\t}\n\n\tfunction onSelectImagesList( images ) {\n\t\tconst win = containerRef.current?.ownerDocument.defaultView;\n\n\t\tif ( images.every( ( file ) => file instanceof win.File ) ) {\n\t\t\t/** @type {File[]} */\n\t\t\tconst files = images;\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\tif ( files.some( ( file ) => ! isValidFileType( file ) ) ) {\n\t\t\t\t// Copied from the same notice in the gallery block.\n\t\t\t\tcreateErrorNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'If uploading to a gallery all files need to be image formats'\n\t\t\t\t\t),\n\t\t\t\t\t{ id: 'gallery-upload-invalid-file', type: 'snackbar' }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst imageBlocks = files\n\t\t\t\t.filter( ( file ) => isValidFileType( file ) )\n\t\t\t\t.map( ( file ) =>\n\t\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\tif ( getBlockName( rootClientId ) === 'core/gallery' ) {\n\t\t\t\treplaceBlock( clientId, imageBlocks );\n\t\t\t} else if ( canInsertBlockType( 'core/gallery', rootClientId ) ) {\n\t\t\t\tconst galleryBlock = createBlock(\n\t\t\t\t\t'core/gallery',\n\t\t\t\t\t{},\n\t\t\t\t\timageBlocks\n\t\t\t\t);\n\n\t\t\t\treplaceBlock( clientId, galleryBlock );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction onSelectImage( media ) {\n\t\tif ( Array.isArray( media ) ) {\n\t\t\tonSelectImagesList( media );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! media || ! media.url ) {\n\t\t\tsetAttributes( {\n\t\t\t\turl: undefined,\n\t\t\t\talt: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\ttitle: undefined,\n\t\t\t\tcaption: undefined,\n\t\t\t\tblob: undefined,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( media.url ) ) {\n\t\t\tsetTemporaryURL( media.url );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { imageDefaultSize } = getSettings();\n\n\t\t// Try to use the previous selected image size if its available\n\t\t// otherwise try the default image size or fallback to \"full\"\n\t\tlet newSize = 'full';\n\t\tif ( sizeSlug && hasSize( media, sizeSlug ) ) {\n\t\t\tnewSize = sizeSlug;\n\t\t} else if ( hasSize( media, imageDefaultSize ) ) {\n\t\t\tnewSize = imageDefaultSize;\n\t\t}\n\n\t\tlet mediaAttributes = pickRelevantMediaFiles( media, newSize );\n\n\t\t// If a caption text was meanwhile written by the user,\n\t\t// make sure the text is not overwritten by empty captions.\n\t\tif ( captionRef.current && ! mediaAttributes.caption ) {\n\t\t\tconst { caption: omittedCaption, ...restMediaAttributes } =\n\t\t\t\tmediaAttributes;\n\t\t\tmediaAttributes = restMediaAttributes;\n\t\t}\n\n\t\tlet additionalAttributes;\n\t\t// Reset the dimension attributes if changing to a different image.\n\t\tif ( ! media.id || media.id !== id ) {\n\t\t\tadditionalAttributes = {\n\t\t\t\tsizeSlug: newSize,\n\t\t\t};\n\t\t} else {\n\t\t\t// Keep the same url when selecting the same file, so \"Resolution\"\n\t\t\t// option is not changed.\n\t\t\tadditionalAttributes = { url };\n\t\t}\n\n\t\t// Check if default link setting should be used.\n\t\tlet linkDestination = attributes.linkDestination;\n\t\tif ( ! linkDestination ) {\n\t\t\t// Use the WordPress option to determine the proper default.\n\t\t\t// The constants used in Gutenberg do not match WP options so a little more complicated than ideal.\n\t\t\t// TODO: fix this in a follow up PR, requires updating media-text and ui component.\n\t\t\tswitch (\n\t\t\t\twindow?.wp?.media?.view?.settings?.defaultProps?.link ||\n\t\t\t\tLINK_DESTINATION_NONE\n\t\t\t) {\n\t\t\t\tcase 'file':\n\t\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_MEDIA;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_ATTACHMENT;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LINK_DESTINATION_CUSTOM:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_CUSTOM;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LINK_DESTINATION_NONE:\n\t\t\t\t\tlinkDestination = LINK_DESTINATION_NONE;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Check if the image is linked to it's media.\n\t\tlet href;\n\t\tswitch ( linkDestination ) {\n\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\thref = media.url;\n\t\t\t\tbreak;\n\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\thref = media.link;\n\t\t\t\tbreak;\n\t\t}\n\t\tmediaAttributes.href = href;\n\n\t\tsetAttributes( {\n\t\t\tblob: undefined,\n\t\t\t...mediaAttributes,\n\t\t\t...additionalAttributes,\n\t\t\tlinkDestination,\n\t\t} );\n\t\tsetTemporaryURL();\n\t}\n\n\tfunction onSelectURL( newURL ) {\n\t\tif ( newURL !== url ) {\n\t\t\tsetAttributes( {\n\t\t\t\tblob: undefined,\n\t\t\t\turl: newURL,\n\t\t\t\tid: undefined,\n\t\t\t\tsizeSlug: getSettings().imageDefaultSize,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}\n\n\tuseUploadMediaFromBlobURL( {\n\t\turl: temporaryURL,\n\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\tonChange: onSelectImage,\n\t\tonError: onUploadError,\n\t} );\n\n\tconst isExternal = isExternalImage( id, url );\n\tconst src = isExternal ? url : undefined;\n\tconst mediaPreview = !! url && (\n\t\t<img\n\t\t\talt={ __( 'Edit image' ) }\n\t\t\ttitle={ __( 'Edit image' ) }\n\t\t\tclassName=\"edit-image-preview\"\n\t\t\tsrc={ url }\n\t\t/>\n\t);\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\n\tconst classes = clsx( className, {\n\t\t'is-transient': !! temporaryURL,\n\t\t'is-resized': !! width || !! height,\n\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t'has-custom-border':\n\t\t\t!! borderProps.className ||\n\t\t\t( borderProps.style &&\n\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tref: containerRef,\n\t\tclassName: classes,\n\t} );\n\n\t// Much of this description is duplicated from MediaPlaceholder.\n\tconst { lockUrlControls = false, lockUrlControlsMessage } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst blockBindingsSource = getBlockBindingsSource(\n\t\t\t\tmetadata?.bindings?.url?.source\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockUrlControlsMessage: blockBindingsSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\tblockBindingsSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t};\n\t\t},\n\t\t[ context, isSingleSelected, metadata?.bindings?.url ]\n\t);\n\tconst placeholder = ( content ) => {\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ clsx( 'block-editor-media-placeholder', {\n\t\t\t\t\t[ borderProps.className ]:\n\t\t\t\t\t\t!! borderProps.className && ! isSingleSelected,\n\t\t\t\t} ) }\n\t\t\t\ticon={\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\t( lockUrlControls ? pluginsIcon : icon )\n\t\t\t\t}\n\t\t\t\twithIllustration={ ! isSingleSelected || isSmallContainer }\n\t\t\t\tlabel={ ! isSmallContainer && __( 'Image' ) }\n\t\t\t\tinstructions={\n\t\t\t\t\t! lockUrlControls &&\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Upload or drag an image file here, or pick one from your library.'\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tstyle={ {\n\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t! ( width && height ) && aspectRatio\n\t\t\t\t\t\t\t? aspectRatio\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\twidth: height && aspectRatio ? '100%' : width,\n\t\t\t\t\theight: width && aspectRatio ? '100%' : height,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t...shadowProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ lockUrlControls &&\n\t\t\t\t\t! isSmallContainer &&\n\t\t\t\t\tlockUrlControlsMessage }\n\n\t\t\t\t{ ! lockUrlControls && ! isSmallContainer && content }\n\t\t\t\t{ placeholderResizeListener }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t<Image\n\t\t\t\t\ttemporaryURL={ temporaryURL }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSingleSelected={ isSingleSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonSelectImage={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonUploadError={ onUploadError }\n\t\t\t\t\tcontext={ context }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tblockEditingMode={ blockEditingMode }\n\t\t\t\t\tparentLayoutType={ parentLayout?.type }\n\t\t\t\t\tmaxContentWidth={ maxContentWidth }\n\t\t\t\t/>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\thandleUpload={ ( files ) => files.length === 1 }\n\t\t\t\t\tvalue={ { id, src } }\n\t\t\t\t\tmediaPreview={ mediaPreview }\n\t\t\t\t\tdisableMediaButtons={ temporaryURL || url }\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t\t{\n\t\t\t\t// The listener cannot be placed as the first element as it will break the in-between inserter.\n\t\t\t\t// See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120\n\t\t\t\tisSingleSelected && isMaxWidthContainerWidth && maxWidthObserver\n\t\t\t}\n\t\t</>\n\t);\n}\n\nexport default ImageEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AASA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV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iB,CACnC,CAAC,eACF,IAAApD,WAAA,CAAAiI,GAAA,EAAC5I,YAAA,CAAAiL,gBAAgB;QAChBT,IAAI,eAAG,IAAA7J,WAAA,CAAAiI,GAAA,EAAC5I,YAAA,CAAAkL,SAAS;UAACV,IAAI,EAAGA;QAAM,CAAE,CAAG;QACpCW,QAAQ,EAAGvE,aAAe;QAC1BuB,WAAW,EAAGA,WAAa;QAC3BM,OAAO,EAAGlD,aAAe;QACzB6E,WAAW,EAAGA,WAAa;QAC3BgB,MAAM,EAAC,SAAS;QAChB9C,YAAY,EAAGC,8BAAqB;QACpC8C,YAAY,EAAKnF,KAAK,IAAMA,KAAK,CAACmD,MAAM,KAAK,CAAG;QAChDiC,KAAK,EAAG;UAAE1J,EAAE;UAAE6D;QAAI,CAAG;QACrBkD,YAAY,EAAGA,YAAc;QAC7B4C,mBAAmB,EAAGjI,YAAY,IAAIhC;MAAK,CAC3C,CAAC;IAAA,CACK,CAAC;IAER;IACA;IACAe,gBAAgB,IAAIuB,wBAAwB,IAAIE,gBAAgB;EAAA,CAEhE,CAAC;AAEL;AAAC,IAAA0H,QAAA,GAAA9J,OAAA,CAAAqJ,OAAA,GAEc9I,SAAS","ignoreList":[]}
@@ -114,7 +114,6 @@ function Image({
114
114
  // The only supported unit is px, so we can parseInt to strip the px here.
115
115
  const numericWidth = width ? parseInt(width, 10) : undefined;
116
116
  const numericHeight = height ? parseInt(height, 10) : undefined;
117
- const registry = (0, _data.useRegistry)();
118
117
  const imageRef = (0, _element.useRef)();
119
118
  const {
120
119
  allowResize = true
@@ -423,21 +422,18 @@ function Image({
423
422
  if (!isSingleSelected) {
424
423
  return {};
425
424
  }
426
- const {
427
- getBlockBindingsSource
428
- } = (0, _lockUnlock.unlock)(select(_blocks.store));
429
425
  const {
430
426
  url: urlBinding,
431
427
  alt: altBinding,
432
428
  title: titleBinding
433
429
  } = metadata?.bindings || {};
434
430
  const hasParentPattern = !!context['pattern/overrides'];
435
- const urlBindingSource = getBlockBindingsSource(urlBinding?.source);
436
- const altBindingSource = getBlockBindingsSource(altBinding?.source);
437
- const titleBindingSource = getBlockBindingsSource(titleBinding?.source);
431
+ const urlBindingSource = (0, _blocks.getBlockBindingsSource)(urlBinding?.source);
432
+ const altBindingSource = (0, _blocks.getBlockBindingsSource)(altBinding?.source);
433
+ const titleBindingSource = (0, _blocks.getBlockBindingsSource)(titleBinding?.source);
438
434
  return {
439
435
  lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
440
- registry,
436
+ select,
441
437
  context,
442
438
  args: urlBinding?.args
443
439
  }),
@@ -450,14 +446,14 @@ function Image({
450
446
  // This is a temporary solution until we support overriding the caption on the frontend.
451
447
  hasParentPattern,
452
448
  lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
453
- registry,
449
+ select,
454
450
  context,
455
451
  args: altBinding?.args
456
452
  }),
457
453
  lockAltControlsMessage: altBindingSource?.label ? (0, _i18n.sprintf)( /* translators: %s: Label of the bindings source. */
458
454
  (0, _i18n.__)('Connected to %s'), altBindingSource.label) : (0, _i18n.__)('Connected to dynamic data'),
459
455
  lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
460
- registry,
456
+ select,
461
457
  context,
462
458
  args: titleBinding?.args
463
459
  }),