@wordpress/block-library 9.2.0 → 9.4.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 (623) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/audio/edit.js +20 -8
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/audio/index.js +4 -0
  5. package/build/audio/index.js.map +1 -1
  6. package/build/audio/transforms.js +1 -1
  7. package/build/audio/transforms.js.map +1 -1
  8. package/build/block/edit.js +38 -24
  9. package/build/block/edit.js.map +1 -1
  10. package/build/block/index.js +5 -1
  11. package/build/block/index.js.map +1 -1
  12. package/build/button/edit.js +1 -1
  13. package/build/button/edit.js.map +1 -1
  14. package/build/buttons/index.js +26 -0
  15. package/build/buttons/index.js.map +1 -1
  16. package/build/categories/edit.js +20 -3
  17. package/build/categories/edit.js.map +1 -1
  18. package/build/categories/index.js +8 -0
  19. package/build/categories/index.js.map +1 -1
  20. package/build/columns/index.js +2 -2
  21. package/build/columns/index.js.map +1 -1
  22. package/build/cover/edit/inspector-controls.js +2 -1
  23. package/build/cover/edit/inspector-controls.js.map +1 -1
  24. package/build/embed/embed-preview.js +4 -4
  25. package/build/embed/embed-preview.js.map +1 -1
  26. package/build/embed/variations.js +39 -34
  27. package/build/embed/variations.js.map +1 -1
  28. package/build/file/edit.js +14 -6
  29. package/build/file/edit.js.map +1 -1
  30. package/build/file/index.js +4 -0
  31. package/build/file/index.js.map +1 -1
  32. package/build/file/transforms.js +2 -3
  33. package/build/file/transforms.js.map +1 -1
  34. package/build/footnotes/index.js +1 -1
  35. package/build/footnotes/index.js.map +1 -1
  36. package/build/form-input/edit.js +2 -0
  37. package/build/form-input/edit.js.map +1 -1
  38. package/build/gallery/deprecated.js +6 -54
  39. package/build/gallery/deprecated.js.map +1 -1
  40. package/build/gallery/edit.js +9 -8
  41. package/build/gallery/edit.js.map +1 -1
  42. package/build/gallery/index.js +12 -2
  43. package/build/gallery/index.js.map +1 -1
  44. package/build/gallery/save.js +0 -11
  45. package/build/gallery/save.js.map +1 -1
  46. package/build/gallery/shared.js +0 -27
  47. package/build/gallery/shared.js.map +1 -1
  48. package/build/gallery/transforms.js +29 -80
  49. package/build/gallery/transforms.js.map +1 -1
  50. package/build/group/deprecated.js +2 -5
  51. package/build/group/deprecated.js.map +1 -1
  52. package/build/group/index.js +1 -0
  53. package/build/group/index.js.map +1 -1
  54. package/build/group/placeholder.js +5 -0
  55. package/build/group/placeholder.js.map +1 -1
  56. package/build/heading/index.js +14 -1
  57. package/build/heading/index.js.map +1 -1
  58. package/build/image/edit.js +14 -22
  59. package/build/image/edit.js.map +1 -1
  60. package/build/image/image.js +54 -28
  61. package/build/image/image.js.map +1 -1
  62. package/build/image/index.js +7 -0
  63. package/build/image/index.js.map +1 -1
  64. package/build/image/transforms.js +1 -1
  65. package/build/image/transforms.js.map +1 -1
  66. package/build/image/view.js +65 -49
  67. package/build/image/view.js.map +1 -1
  68. package/build/latest-comments/index.js +9 -0
  69. package/build/latest-comments/index.js.map +1 -1
  70. package/build/list/edit.js +3 -3
  71. package/build/list/edit.js.map +1 -1
  72. package/build/list-item/edit.js +3 -3
  73. package/build/list-item/edit.js.map +1 -1
  74. package/build/list-item/hooks/index.js +0 -7
  75. package/build/list-item/hooks/index.js.map +1 -1
  76. package/build/list-item/hooks/use-merge.js +8 -1
  77. package/build/list-item/hooks/use-merge.js.map +1 -1
  78. package/build/list-item/index.js +11 -1
  79. package/build/list-item/index.js.map +1 -1
  80. package/build/loginout/index.js +3 -0
  81. package/build/loginout/index.js.map +1 -1
  82. package/build/media-text/edit.js +3 -2
  83. package/build/media-text/edit.js.map +1 -1
  84. package/build/media-text/index.js +12 -0
  85. package/build/media-text/index.js.map +1 -1
  86. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  87. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  88. package/build/navigation/use-navigation-menu.js +5 -1
  89. package/build/navigation/use-navigation-menu.js.map +1 -1
  90. package/build/navigation-link/link-ui.js +13 -17
  91. package/build/navigation-link/link-ui.js.map +1 -1
  92. package/build/navigation-submenu/edit.js +1 -12
  93. package/build/navigation-submenu/edit.js.map +1 -1
  94. package/build/page-list/convert-to-links-modal.js +1 -1
  95. package/build/page-list/convert-to-links-modal.js.map +1 -1
  96. package/build/page-list/edit.js +2 -1
  97. package/build/page-list/edit.js.map +1 -1
  98. package/build/page-list-item/edit.js +4 -1
  99. package/build/page-list-item/edit.js.map +1 -1
  100. package/build/paragraph/index.js +6 -0
  101. package/build/paragraph/index.js.map +1 -1
  102. package/build/paragraph/transforms.js +6 -0
  103. package/build/paragraph/transforms.js.map +1 -1
  104. package/build/post-author/index.js +8 -0
  105. package/build/post-author/index.js.map +1 -1
  106. package/build/post-author-biography/index.js +3 -0
  107. package/build/post-author-biography/index.js.map +1 -1
  108. package/build/post-author-name/index.js +3 -0
  109. package/build/post-author-name/index.js.map +1 -1
  110. package/build/post-content/index.js +3 -0
  111. package/build/post-content/index.js.map +1 -1
  112. package/build/post-date/edit.js +3 -1
  113. package/build/post-date/edit.js.map +1 -1
  114. package/build/post-date/index.js +3 -0
  115. package/build/post-date/index.js.map +1 -1
  116. package/build/post-excerpt/edit.js +1 -0
  117. package/build/post-excerpt/edit.js.map +1 -1
  118. package/build/post-excerpt/index.js +3 -0
  119. package/build/post-excerpt/index.js.map +1 -1
  120. package/build/post-featured-image/index.js +3 -0
  121. package/build/post-featured-image/index.js.map +1 -1
  122. package/build/post-terms/index.js +3 -0
  123. package/build/post-terms/index.js.map +1 -1
  124. package/build/post-title/edit.js +5 -1
  125. package/build/post-title/edit.js.map +1 -1
  126. package/build/post-title/index.js +3 -0
  127. package/build/post-title/index.js.map +1 -1
  128. package/build/query/edit/inspector-controls/author-control.js +3 -1
  129. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  130. package/build/query/edit/inspector-controls/index.js +27 -8
  131. package/build/query/edit/inspector-controls/index.js.map +1 -1
  132. package/build/query/edit/inspector-controls/order-control.js +1 -0
  133. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  134. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  135. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  136. package/build/query/edit/inspector-controls/sticky-control.js +1 -0
  137. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  138. package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
  139. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  140. package/build/query/edit/query-content.js +11 -2
  141. package/build/query/edit/query-content.js.map +1 -1
  142. package/build/query/edit/query-placeholder.js +1 -14
  143. package/build/query/edit/query-placeholder.js.map +1 -1
  144. package/build/query/edit/query-toolbar.js +54 -61
  145. package/build/query/edit/query-toolbar.js.map +1 -1
  146. package/build/query/index.js +34 -0
  147. package/build/query/index.js.map +1 -1
  148. package/build/query/utils.js +5 -1
  149. package/build/query/utils.js.map +1 -1
  150. package/build/query/variations.js +9 -55
  151. package/build/query/variations.js.map +1 -1
  152. package/build/query-pagination-numbers/edit.js +1 -0
  153. package/build/query-pagination-numbers/edit.js.map +1 -1
  154. package/build/query-title/edit.js +11 -19
  155. package/build/query-title/edit.js.map +1 -1
  156. package/build/query-title/use-archive-label.js +95 -0
  157. package/build/query-title/use-archive-label.js.map +1 -0
  158. package/build/quote/index.js +15 -1
  159. package/build/quote/index.js.map +1 -1
  160. package/build/search/index.js +3 -0
  161. package/build/search/index.js.map +1 -1
  162. package/build/site-logo/edit.js +4 -1
  163. package/build/site-logo/edit.js.map +1 -1
  164. package/build/site-tagline/edit.js +5 -2
  165. package/build/site-tagline/edit.js.map +1 -1
  166. package/build/site-tagline/index.js +6 -1
  167. package/build/site-tagline/index.js.map +1 -1
  168. package/build/site-title/edit.js +4 -1
  169. package/build/site-title/edit.js.map +1 -1
  170. package/build/site-title/index.js +6 -1
  171. package/build/site-title/index.js.map +1 -1
  172. package/build/social-link/edit.js +27 -7
  173. package/build/social-link/edit.js.map +1 -1
  174. package/build/social-link/icons/soundcloud.js +1 -1
  175. package/build/social-link/icons/soundcloud.js.map +1 -1
  176. package/build/social-links/index.js +12 -0
  177. package/build/social-links/index.js.map +1 -1
  178. package/build/table/edit.js +8 -17
  179. package/build/table/edit.js.map +1 -1
  180. package/build/tag-cloud/edit.js +4 -1
  181. package/build/tag-cloud/edit.js.map +1 -1
  182. package/build/template-part/edit/index.js +5 -3
  183. package/build/template-part/edit/index.js.map +1 -1
  184. package/build/template-part/edit/inner-blocks.js +8 -3
  185. package/build/template-part/edit/inner-blocks.js.map +1 -1
  186. package/build/template-part/edit/placeholder.js +23 -3
  187. package/build/template-part/edit/placeholder.js.map +1 -1
  188. package/build/template-part/edit/title-modal.js +21 -9
  189. package/build/template-part/edit/title-modal.js.map +1 -1
  190. package/build/term-description/index.js +12 -0
  191. package/build/term-description/index.js.map +1 -1
  192. package/build/utils/hooks.js +17 -1
  193. package/build/utils/hooks.js.map +1 -1
  194. package/build/video/deprecated.js +4 -0
  195. package/build/video/deprecated.js.map +1 -1
  196. package/build/video/edit.js +17 -7
  197. package/build/video/edit.js.map +1 -1
  198. package/build/video/index.js +4 -0
  199. package/build/video/index.js.map +1 -1
  200. package/build/video/transforms.js +1 -1
  201. package/build/video/transforms.js.map +1 -1
  202. package/build-module/audio/edit.js +20 -8
  203. package/build-module/audio/edit.js.map +1 -1
  204. package/build-module/audio/index.js +4 -0
  205. package/build-module/audio/index.js.map +1 -1
  206. package/build-module/audio/transforms.js +1 -1
  207. package/build-module/audio/transforms.js.map +1 -1
  208. package/build-module/block/edit.js +38 -24
  209. package/build-module/block/edit.js.map +1 -1
  210. package/build-module/block/index.js +5 -1
  211. package/build-module/block/index.js.map +1 -1
  212. package/build-module/button/edit.js +1 -1
  213. package/build-module/button/edit.js.map +1 -1
  214. package/build-module/buttons/index.js +26 -0
  215. package/build-module/buttons/index.js.map +1 -1
  216. package/build-module/categories/edit.js +21 -4
  217. package/build-module/categories/edit.js.map +1 -1
  218. package/build-module/categories/index.js +8 -0
  219. package/build-module/categories/index.js.map +1 -1
  220. package/build-module/columns/index.js +2 -2
  221. package/build-module/columns/index.js.map +1 -1
  222. package/build-module/cover/edit/inspector-controls.js +2 -1
  223. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  224. package/build-module/embed/embed-preview.js +4 -4
  225. package/build-module/embed/embed-preview.js.map +1 -1
  226. package/build-module/embed/variations.js +40 -35
  227. package/build-module/embed/variations.js.map +1 -1
  228. package/build-module/file/edit.js +15 -7
  229. package/build-module/file/edit.js.map +1 -1
  230. package/build-module/file/index.js +4 -0
  231. package/build-module/file/index.js.map +1 -1
  232. package/build-module/file/transforms.js +2 -3
  233. package/build-module/file/transforms.js.map +1 -1
  234. package/build-module/footnotes/index.js +1 -1
  235. package/build-module/footnotes/index.js.map +1 -1
  236. package/build-module/form-input/edit.js +2 -0
  237. package/build-module/form-input/edit.js.map +1 -1
  238. package/build-module/gallery/deprecated.js +6 -54
  239. package/build-module/gallery/deprecated.js.map +1 -1
  240. package/build-module/gallery/edit.js +10 -9
  241. package/build-module/gallery/edit.js.map +1 -1
  242. package/build-module/gallery/index.js +11 -1
  243. package/build-module/gallery/index.js.map +1 -1
  244. package/build-module/gallery/save.js +0 -11
  245. package/build-module/gallery/save.js.map +1 -1
  246. package/build-module/gallery/shared.js +0 -25
  247. package/build-module/gallery/shared.js.map +1 -1
  248. package/build-module/gallery/transforms.js +29 -80
  249. package/build-module/gallery/transforms.js.map +1 -1
  250. package/build-module/group/deprecated.js +2 -5
  251. package/build-module/group/deprecated.js.map +1 -1
  252. package/build-module/group/index.js +1 -0
  253. package/build-module/group/index.js.map +1 -1
  254. package/build-module/group/placeholder.js +5 -0
  255. package/build-module/group/placeholder.js.map +1 -1
  256. package/build-module/heading/index.js +14 -1
  257. package/build-module/heading/index.js.map +1 -1
  258. package/build-module/image/edit.js +13 -21
  259. package/build-module/image/edit.js.map +1 -1
  260. package/build-module/image/image.js +50 -24
  261. package/build-module/image/image.js.map +1 -1
  262. package/build-module/image/index.js +7 -0
  263. package/build-module/image/index.js.map +1 -1
  264. package/build-module/image/transforms.js +1 -1
  265. package/build-module/image/transforms.js.map +1 -1
  266. package/build-module/image/view.js +65 -49
  267. package/build-module/image/view.js.map +1 -1
  268. package/build-module/latest-comments/index.js +9 -0
  269. package/build-module/latest-comments/index.js.map +1 -1
  270. package/build-module/list/edit.js +3 -3
  271. package/build-module/list/edit.js.map +1 -1
  272. package/build-module/list-item/edit.js +3 -3
  273. package/build-module/list-item/edit.js.map +1 -1
  274. package/build-module/list-item/hooks/index.js +0 -1
  275. package/build-module/list-item/hooks/index.js.map +1 -1
  276. package/build-module/list-item/hooks/use-merge.js +8 -1
  277. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  278. package/build-module/list-item/index.js +11 -1
  279. package/build-module/list-item/index.js.map +1 -1
  280. package/build-module/loginout/index.js +3 -0
  281. package/build-module/loginout/index.js.map +1 -1
  282. package/build-module/media-text/edit.js +3 -2
  283. package/build-module/media-text/edit.js.map +1 -1
  284. package/build-module/media-text/index.js +12 -0
  285. package/build-module/media-text/index.js.map +1 -1
  286. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  287. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  288. package/build-module/navigation/use-navigation-menu.js +5 -1
  289. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  290. package/build-module/navigation-link/link-ui.js +13 -17
  291. package/build-module/navigation-link/link-ui.js.map +1 -1
  292. package/build-module/navigation-submenu/edit.js +1 -12
  293. package/build-module/navigation-submenu/edit.js.map +1 -1
  294. package/build-module/page-list/convert-to-links-modal.js +1 -1
  295. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  296. package/build-module/page-list/edit.js +2 -1
  297. package/build-module/page-list/edit.js.map +1 -1
  298. package/build-module/page-list-item/edit.js +4 -1
  299. package/build-module/page-list-item/edit.js.map +1 -1
  300. package/build-module/paragraph/index.js +6 -0
  301. package/build-module/paragraph/index.js.map +1 -1
  302. package/build-module/paragraph/transforms.js +6 -0
  303. package/build-module/paragraph/transforms.js.map +1 -1
  304. package/build-module/post-author/index.js +8 -0
  305. package/build-module/post-author/index.js.map +1 -1
  306. package/build-module/post-author-biography/index.js +3 -0
  307. package/build-module/post-author-biography/index.js.map +1 -1
  308. package/build-module/post-author-name/index.js +3 -0
  309. package/build-module/post-author-name/index.js.map +1 -1
  310. package/build-module/post-content/index.js +3 -0
  311. package/build-module/post-content/index.js.map +1 -1
  312. package/build-module/post-date/edit.js +4 -2
  313. package/build-module/post-date/edit.js.map +1 -1
  314. package/build-module/post-date/index.js +3 -0
  315. package/build-module/post-date/index.js.map +1 -1
  316. package/build-module/post-excerpt/edit.js +1 -0
  317. package/build-module/post-excerpt/edit.js.map +1 -1
  318. package/build-module/post-excerpt/index.js +3 -0
  319. package/build-module/post-excerpt/index.js.map +1 -1
  320. package/build-module/post-featured-image/index.js +3 -0
  321. package/build-module/post-featured-image/index.js.map +1 -1
  322. package/build-module/post-terms/index.js +3 -0
  323. package/build-module/post-terms/index.js.map +1 -1
  324. package/build-module/post-title/edit.js +5 -1
  325. package/build-module/post-title/edit.js.map +1 -1
  326. package/build-module/post-title/index.js +3 -0
  327. package/build-module/post-title/index.js.map +1 -1
  328. package/build-module/query/edit/inspector-controls/author-control.js +3 -1
  329. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  330. package/build-module/query/edit/inspector-controls/index.js +28 -9
  331. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  332. package/build-module/query/edit/inspector-controls/order-control.js +1 -0
  333. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  334. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  335. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  336. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
  337. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  338. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
  339. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  340. package/build-module/query/edit/query-content.js +11 -2
  341. package/build-module/query/edit/query-content.js.map +1 -1
  342. package/build-module/query/edit/query-placeholder.js +1 -14
  343. package/build-module/query/edit/query-placeholder.js.map +1 -1
  344. package/build-module/query/edit/query-toolbar.js +55 -62
  345. package/build-module/query/edit/query-toolbar.js.map +1 -1
  346. package/build-module/query/index.js +34 -0
  347. package/build-module/query/index.js.map +1 -1
  348. package/build-module/query/utils.js +5 -1
  349. package/build-module/query/utils.js.map +1 -1
  350. package/build-module/query/variations.js +4 -50
  351. package/build-module/query/variations.js.map +1 -1
  352. package/build-module/query-pagination-numbers/edit.js +1 -0
  353. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  354. package/build-module/query-title/edit.js +12 -20
  355. package/build-module/query-title/edit.js.map +1 -1
  356. package/build-module/query-title/use-archive-label.js +88 -0
  357. package/build-module/query-title/use-archive-label.js.map +1 -0
  358. package/build-module/quote/index.js +15 -1
  359. package/build-module/quote/index.js.map +1 -1
  360. package/build-module/search/index.js +3 -0
  361. package/build-module/search/index.js.map +1 -1
  362. package/build-module/site-logo/edit.js +4 -1
  363. package/build-module/site-logo/edit.js.map +1 -1
  364. package/build-module/site-tagline/edit.js +5 -2
  365. package/build-module/site-tagline/edit.js.map +1 -1
  366. package/build-module/site-tagline/index.js +6 -1
  367. package/build-module/site-tagline/index.js.map +1 -1
  368. package/build-module/site-title/edit.js +4 -1
  369. package/build-module/site-title/edit.js.map +1 -1
  370. package/build-module/site-title/index.js +6 -1
  371. package/build-module/site-title/index.js.map +1 -1
  372. package/build-module/social-link/edit.js +28 -8
  373. package/build-module/social-link/edit.js.map +1 -1
  374. package/build-module/social-link/icons/soundcloud.js +1 -1
  375. package/build-module/social-link/icons/soundcloud.js.map +1 -1
  376. package/build-module/social-links/index.js +12 -0
  377. package/build-module/social-links/index.js.map +1 -1
  378. package/build-module/table/edit.js +9 -18
  379. package/build-module/table/edit.js.map +1 -1
  380. package/build-module/tag-cloud/edit.js +4 -1
  381. package/build-module/tag-cloud/edit.js.map +1 -1
  382. package/build-module/template-part/edit/index.js +5 -3
  383. package/build-module/template-part/edit/index.js.map +1 -1
  384. package/build-module/template-part/edit/inner-blocks.js +8 -3
  385. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  386. package/build-module/template-part/edit/placeholder.js +23 -3
  387. package/build-module/template-part/edit/placeholder.js.map +1 -1
  388. package/build-module/template-part/edit/title-modal.js +21 -9
  389. package/build-module/template-part/edit/title-modal.js.map +1 -1
  390. package/build-module/term-description/index.js +12 -0
  391. package/build-module/term-description/index.js.map +1 -1
  392. package/build-module/utils/hooks.js +16 -1
  393. package/build-module/utils/hooks.js.map +1 -1
  394. package/build-module/video/deprecated.js +4 -0
  395. package/build-module/video/deprecated.js.map +1 -1
  396. package/build-module/video/edit.js +18 -8
  397. package/build-module/video/edit.js.map +1 -1
  398. package/build-module/video/index.js +4 -0
  399. package/build-module/video/index.js.map +1 -1
  400. package/build-module/video/transforms.js +1 -1
  401. package/build-module/video/transforms.js.map +1 -1
  402. package/build-style/categories/editor-rtl.css +4 -0
  403. package/build-style/categories/editor.css +4 -0
  404. package/build-style/categories/style-rtl.css +4 -0
  405. package/build-style/categories/style.css +4 -0
  406. package/build-style/editor-rtl.css +16 -12
  407. package/build-style/editor.css +16 -12
  408. package/build-style/image/editor-rtl.css +8 -4
  409. package/build-style/image/editor.css +8 -4
  410. package/build-style/image/style-rtl.css +19 -0
  411. package/build-style/image/style.css +19 -0
  412. package/build-style/list/style-rtl.css +1 -1
  413. package/build-style/list/style.css +1 -1
  414. package/build-style/navigation/style-rtl.css +1 -4
  415. package/build-style/navigation/style.css +1 -4
  416. package/build-style/post-comments-form/style-rtl.css +12 -11
  417. package/build-style/post-comments-form/style.css +12 -11
  418. package/build-style/query/editor-rtl.css +3 -7
  419. package/build-style/query/editor.css +3 -7
  420. package/build-style/search/editor-rtl.css +1 -1
  421. package/build-style/search/editor.css +1 -1
  422. package/build-style/social-links/style-rtl.css +93 -93
  423. package/build-style/social-links/style.css +93 -93
  424. package/build-style/style-rtl.css +131 -109
  425. package/build-style/style.css +131 -109
  426. package/build-style/term-description/style-rtl.css +1 -0
  427. package/build-style/term-description/style.css +1 -0
  428. package/package.json +35 -35
  429. package/src/audio/block.json +4 -0
  430. package/src/audio/edit.js +19 -7
  431. package/src/audio/transforms.js +1 -1
  432. package/src/block/block.json +5 -1
  433. package/src/block/edit.js +58 -28
  434. package/src/block/test/edit.native.js +6 -2
  435. package/src/button/edit.js +1 -1
  436. package/src/button/index.php +14 -1
  437. package/src/buttons/block.json +20 -0
  438. package/src/buttons/index.js +6 -0
  439. package/src/categories/block.json +8 -0
  440. package/src/categories/edit.js +32 -4
  441. package/src/categories/editor.scss +4 -0
  442. package/src/categories/index.php +4 -1
  443. package/src/categories/style.scss +4 -0
  444. package/src/columns/index.js +1 -1
  445. package/src/cover/edit/inspector-controls.js +1 -0
  446. package/src/embed/embed-preview.js +4 -6
  447. package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
  448. package/src/embed/test/index.js +1 -1
  449. package/src/embed/test/index.native.js +24 -23
  450. package/src/embed/variations.js +43 -35
  451. package/src/file/block.json +4 -0
  452. package/src/file/edit.js +19 -6
  453. package/src/file/transforms.js +1 -2
  454. package/src/footnotes/index.js +1 -2
  455. package/src/form-input/edit.js +2 -0
  456. package/src/gallery/block.json +10 -0
  457. package/src/gallery/deprecated.js +6 -55
  458. package/src/gallery/edit.js +13 -10
  459. package/src/gallery/gallery-styles.native.scss +0 -2
  460. package/src/gallery/index.js +1 -1
  461. package/src/gallery/save.js +0 -10
  462. package/src/gallery/shared.js +0 -28
  463. package/src/gallery/transforms.js +56 -99
  464. package/src/group/block.json +1 -0
  465. package/src/group/deprecated.js +3 -7
  466. package/src/group/placeholder.js +7 -0
  467. package/src/heading/block.json +12 -0
  468. package/src/heading/index.js +1 -0
  469. package/src/image/block.json +7 -0
  470. package/src/image/edit.js +11 -20
  471. package/src/image/editor.scss +6 -1
  472. package/src/image/image.js +91 -49
  473. package/src/image/index.php +58 -20
  474. package/src/image/style.scss +22 -0
  475. package/src/image/test/edit.native.js +1 -0
  476. package/src/image/transforms.js +1 -1
  477. package/src/image/view.js +69 -49
  478. package/src/latest-comments/block.json +9 -0
  479. package/src/list/edit.js +3 -3
  480. package/src/list/style.scss +1 -1
  481. package/src/list-item/block.json +11 -1
  482. package/src/list-item/edit.js +3 -3
  483. package/src/list-item/hooks/index.js +0 -1
  484. package/src/list-item/hooks/use-merge.js +19 -5
  485. package/src/loginout/block.json +3 -0
  486. package/src/media-text/block.json +12 -0
  487. package/src/media-text/edit.js +3 -2
  488. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  489. package/src/navigation/index.php +1 -1
  490. package/src/navigation/style.scss +4 -9
  491. package/src/navigation/test/use-navigation-menu.js +54 -15
  492. package/src/navigation/use-navigation-menu.js +5 -1
  493. package/src/navigation-link/link-ui.js +8 -14
  494. package/src/navigation-submenu/edit.js +2 -14
  495. package/src/page-list/convert-to-links-modal.js +1 -1
  496. package/src/page-list/edit.js +2 -1
  497. package/src/page-list-item/edit.js +4 -4
  498. package/src/paragraph/block.json +6 -0
  499. package/src/post-author/index.js +8 -0
  500. package/src/post-author-biography/block.json +3 -0
  501. package/src/post-author-name/block.json +3 -0
  502. package/src/post-comments-form/style.scss +16 -13
  503. package/src/post-content/block.json +3 -0
  504. package/src/post-date/block.json +3 -0
  505. package/src/post-date/edit.js +5 -1
  506. package/src/post-date/index.php +8 -2
  507. package/src/post-excerpt/block.json +3 -0
  508. package/src/post-excerpt/edit.js +1 -0
  509. package/src/post-featured-image/block.json +3 -0
  510. package/src/post-terms/block.json +3 -0
  511. package/src/post-title/block.json +3 -0
  512. package/src/post-title/edit.js +5 -5
  513. package/src/query/edit/inspector-controls/author-control.js +2 -0
  514. package/src/query/edit/inspector-controls/index.js +44 -16
  515. package/src/query/edit/inspector-controls/order-control.js +1 -0
  516. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  517. package/src/query/edit/inspector-controls/sticky-control.js +1 -0
  518. package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
  519. package/src/query/edit/query-content.js +17 -3
  520. package/src/query/edit/query-placeholder.js +1 -21
  521. package/src/query/edit/query-toolbar.js +60 -72
  522. package/src/query/editor.scss +4 -9
  523. package/src/query/index.js +40 -0
  524. package/src/query/utils.js +4 -0
  525. package/src/query/variations.js +4 -46
  526. package/src/query-pagination-numbers/edit.js +1 -0
  527. package/src/query-title/edit.js +10 -17
  528. package/src/query-title/use-archive-label.js +99 -0
  529. package/src/quote/block.json +15 -1
  530. package/src/search/block.json +3 -0
  531. package/src/search/editor.scss +1 -1
  532. package/src/site-logo/edit.js +4 -1
  533. package/src/site-tagline/block.json +6 -1
  534. package/src/site-tagline/edit.js +5 -2
  535. package/src/site-title/edit.js +4 -1
  536. package/src/site-title/index.js +6 -1
  537. package/src/social-link/edit.js +29 -3
  538. package/src/social-link/icons/soundcloud.js +1 -1
  539. package/src/social-link/socials-with-bg.scss +1 -1
  540. package/src/social-link/socials-without-bg.scss +1 -1
  541. package/src/social-links/block.json +12 -0
  542. package/src/social-links/style.scss +2 -2
  543. package/src/table/edit.js +11 -24
  544. package/src/tag-cloud/edit.js +7 -1
  545. package/src/template-part/edit/index.js +5 -3
  546. package/src/template-part/edit/inner-blocks.js +8 -5
  547. package/src/template-part/edit/placeholder.js +31 -6
  548. package/src/template-part/edit/title-modal.js +19 -5
  549. package/src/term-description/block.json +12 -0
  550. package/src/term-description/style.scss +2 -0
  551. package/src/utils/hooks.js +19 -2
  552. package/src/video/block.json +4 -0
  553. package/src/video/edit.js +23 -8
  554. package/src/video/transforms.js +1 -1
  555. package/tsconfig.tsbuildinfo +1 -1
  556. package/build/gallery/edit-wrapper.js +0 -37
  557. package/build/gallery/edit-wrapper.js.map +0 -1
  558. package/build/gallery/v1/constants.js +0 -10
  559. package/build/gallery/v1/constants.js.map +0 -1
  560. package/build/gallery/v1/edit.js +0 -399
  561. package/build/gallery/v1/edit.js.map +0 -1
  562. package/build/gallery/v1/gallery-button.native.js +0 -55
  563. package/build/gallery/v1/gallery-button.native.js.map +0 -1
  564. package/build/gallery/v1/gallery-image.js +0 -285
  565. package/build/gallery/v1/gallery-image.js.map +0 -1
  566. package/build/gallery/v1/gallery-image.native.js +0 -297
  567. package/build/gallery/v1/gallery-image.native.js.map +0 -1
  568. package/build/gallery/v1/gallery.js +0 -112
  569. package/build/gallery/v1/gallery.js.map +0 -1
  570. package/build/gallery/v1/gallery.native.js +0 -139
  571. package/build/gallery/v1/gallery.native.js.map +0 -1
  572. package/build/gallery/v1/save.js +0 -81
  573. package/build/gallery/v1/save.js.map +0 -1
  574. package/build/gallery/v1/shared.js +0 -17
  575. package/build/gallery/v1/shared.js.map +0 -1
  576. package/build/gallery/v1/tiles.native.js +0 -83
  577. package/build/gallery/v1/tiles.native.js.map +0 -1
  578. package/build/list-item/hooks/use-split.js +0 -39
  579. package/build/list-item/hooks/use-split.js.map +0 -1
  580. package/build/utils/constants.js +0 -15
  581. package/build/utils/constants.js.map +0 -1
  582. package/build-module/gallery/edit-wrapper.js +0 -31
  583. package/build-module/gallery/edit-wrapper.js.map +0 -1
  584. package/build-module/gallery/v1/constants.js +0 -4
  585. package/build-module/gallery/v1/constants.js.map +0 -1
  586. package/build-module/gallery/v1/edit.js +0 -393
  587. package/build-module/gallery/v1/edit.js.map +0 -1
  588. package/build-module/gallery/v1/gallery-button.native.js +0 -46
  589. package/build-module/gallery/v1/gallery-button.native.js.map +0 -1
  590. package/build-module/gallery/v1/gallery-image.js +0 -279
  591. package/build-module/gallery/v1/gallery-image.js.map +0 -1
  592. package/build-module/gallery/v1/gallery-image.native.js +0 -291
  593. package/build-module/gallery/v1/gallery-image.native.js.map +0 -1
  594. package/build-module/gallery/v1/gallery.js +0 -104
  595. package/build-module/gallery/v1/gallery.js.map +0 -1
  596. package/build-module/gallery/v1/gallery.native.js +0 -131
  597. package/build-module/gallery/v1/gallery.native.js.map +0 -1
  598. package/build-module/gallery/v1/save.js +0 -74
  599. package/build-module/gallery/v1/save.js.map +0 -1
  600. package/build-module/gallery/v1/shared.js +0 -10
  601. package/build-module/gallery/v1/shared.js.map +0 -1
  602. package/build-module/gallery/v1/tiles.native.js +0 -75
  603. package/build-module/gallery/v1/tiles.native.js.map +0 -1
  604. package/build-module/list-item/hooks/use-split.js +0 -32
  605. package/build-module/list-item/hooks/use-split.js.map +0 -1
  606. package/build-module/utils/constants.js +0 -9
  607. package/build-module/utils/constants.js.map +0 -1
  608. package/src/gallery/edit-wrapper.js +0 -27
  609. package/src/gallery/v1/constants.js +0 -3
  610. package/src/gallery/v1/edit.js +0 -450
  611. package/src/gallery/v1/gallery-button.native.js +0 -47
  612. package/src/gallery/v1/gallery-image-style.native.scss +0 -109
  613. package/src/gallery/v1/gallery-image.js +0 -293
  614. package/src/gallery/v1/gallery-image.native.js +0 -348
  615. package/src/gallery/v1/gallery-styles.native.scss +0 -8
  616. package/src/gallery/v1/gallery.js +0 -125
  617. package/src/gallery/v1/gallery.native.js +0 -162
  618. package/src/gallery/v1/save.js +0 -98
  619. package/src/gallery/v1/shared.js +0 -19
  620. package/src/gallery/v1/tiles-styles.native.scss +0 -11
  621. package/src/gallery/v1/tiles.native.js +0 -79
  622. package/src/list-item/hooks/use-split.js +0 -33
  623. package/src/utils/constants.js +0 -8
@@ -21,8 +21,8 @@ var _lockUnlock = require("../lock-unlock");
21
21
  var _util = require("../embed/util");
22
22
  var _edit = require("./edit");
23
23
  var _caption = require("../utils/caption");
24
- var _constants = require("../utils/constants");
25
- var _constants2 = require("./constants");
24
+ var _hooks = require("../utils/hooks");
25
+ var _constants = require("./constants");
26
26
  var _utils = require("./utils");
27
27
  var _jsxRuntime = require("react/jsx-runtime");
28
28
  /**
@@ -159,9 +159,10 @@ function Image({
159
159
  }, setLoadedNaturalSize] = (0, _element.useState)({});
160
160
  const [isEditingImage, setIsEditingImage] = (0, _element.useState)(false);
161
161
  const [externalBlob, setExternalBlob] = (0, _element.useState)();
162
+ const [hasImageErrored, setHasImageErrored] = (0, _element.useState)(false);
162
163
  const hasNonContentControls = blockEditingMode === 'default';
163
164
  const isContentOnlyMode = blockEditingMode === 'contentOnly';
164
- const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport && parentLayoutType !== 'grid';
165
+ const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
165
166
  const imageSizeOptions = imageSizes.filter(({
166
167
  slug
167
168
  }) => image?.media_details?.sizes?.[slug]?.source_url).map(({
@@ -210,6 +211,8 @@ function Image({
210
211
  toggleSelection(true);
211
212
  }
212
213
  function onImageError() {
214
+ setHasImageErrored(true);
215
+
213
216
  // Check if there's an embed block that handles this URL, e.g., instagram URL.
214
217
  // See: https://github.com/WordPress/gutenberg/pull/11472
215
218
  const embedBlock = (0, _util.createUpgradedEmbedBlock)({
@@ -221,6 +224,13 @@ function Image({
221
224
  onReplace(embedBlock);
222
225
  }
223
226
  }
227
+ function onImageLoad(event) {
228
+ setHasImageErrored(false);
229
+ setLoadedNaturalSize({
230
+ loadedNaturalWidth: event.target?.naturalWidth,
231
+ loadedNaturalHeight: event.target?.naturalHeight
232
+ });
233
+ }
224
234
  function onSetHref(props) {
225
235
  setAttributes(props);
226
236
  }
@@ -301,7 +311,7 @@ function Image({
301
311
  type: 'snackbar'
302
312
  });
303
313
  },
304
- allowedTypes: _constants2.ALLOWED_MEDIA_TYPES,
314
+ allowedTypes: _constants.ALLOWED_MEDIA_TYPES,
305
315
  onError(message) {
306
316
  createErrorNotice(message, {
307
317
  type: 'snackbar'
@@ -332,6 +342,7 @@ function Image({
332
342
  // remove that override, even if the lightbox UI is disabled in the settings.
333
343
  !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing;
334
344
  const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
345
+ const dropdownMenuProps = (0, _hooks.useToolsPanelDropdownMenuProps)();
335
346
  const dimensionsControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(DimensionsTool, {
336
347
  value: {
337
348
  width,
@@ -364,6 +375,21 @@ function Image({
364
375
  scaleOptions: scaleOptions,
365
376
  unitsOptions: dimensionsUnitsOptions
366
377
  });
378
+ const aspectRatioControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(DimensionsTool, {
379
+ value: {
380
+ aspectRatio
381
+ },
382
+ onChange: ({
383
+ aspectRatio: newAspectRatio
384
+ }) => {
385
+ setAttributes({
386
+ aspectRatio: newAspectRatio,
387
+ scale: 'cover'
388
+ });
389
+ },
390
+ defaultAspectRatio: "auto",
391
+ tools: ['aspectRatio']
392
+ });
367
393
  const resetAll = () => {
368
394
  setAttributes({
369
395
  alt: undefined,
@@ -378,8 +404,8 @@ function Image({
378
404
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanel, {
379
405
  label: (0, _i18n.__)('Settings'),
380
406
  resetAll: resetAll,
381
- dropdownMenuProps: _constants.TOOLSPANEL_DROPDOWNMENU_PROPS,
382
- children: isResizable && dimensionsControl
407
+ dropdownMenuProps: dropdownMenuProps,
408
+ children: isResizable && (parentLayoutType === 'grid' ? aspectRatioControl : dimensionsControl)
383
409
  })
384
410
  });
385
411
  const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === 'core/pattern-overrides';
@@ -398,20 +424,17 @@ function Image({
398
424
  const {
399
425
  getBlockBindingsSource
400
426
  } = (0, _lockUnlock.unlock)(select(_blocks.store));
401
- const {
402
- getBlockParentsByBlockName
403
- } = (0, _lockUnlock.unlock)(select(_blockEditor.store));
404
427
  const {
405
428
  url: urlBinding,
406
429
  alt: altBinding,
407
430
  title: titleBinding
408
431
  } = metadata?.bindings || {};
409
- const hasParentPattern = getBlockParentsByBlockName(clientId, 'core/block').length > 0;
432
+ const hasParentPattern = !!context['pattern/overrides'];
410
433
  const urlBindingSource = getBlockBindingsSource(urlBinding?.source);
411
434
  const altBindingSource = getBlockBindingsSource(altBinding?.source);
412
435
  const titleBindingSource = getBlockBindingsSource(titleBinding?.source);
413
436
  return {
414
- lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue({
437
+ lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
415
438
  select,
416
439
  context,
417
440
  args: urlBinding?.args
@@ -424,14 +447,14 @@ function Image({
424
447
  // Disable editing the caption if the image is inside a pattern instance.
425
448
  // This is a temporary solution until we support overriding the caption on the frontend.
426
449
  hasParentPattern,
427
- lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue({
450
+ lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
428
451
  select,
429
452
  context,
430
453
  args: altBinding?.args
431
454
  }),
432
455
  lockAltControlsMessage: altBindingSource?.label ? (0, _i18n.sprintf)( /* translators: %s: Label of the bindings source. */
433
456
  (0, _i18n.__)('Connected to %s'), altBindingSource.label) : (0, _i18n.__)('Connected to dynamic data'),
434
- lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue({
457
+ lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
435
458
  select,
436
459
  context,
437
460
  args: titleBinding?.args
@@ -439,7 +462,7 @@ function Image({
439
462
  lockTitleControlsMessage: titleBindingSource?.label ? (0, _i18n.sprintf)( /* translators: %s: Label of the bindings source. */
440
463
  (0, _i18n.__)('Connected to %s'), titleBindingSource.label) : (0, _i18n.__)('Connected to dynamic data')
441
464
  };
442
- }, [clientId, isSingleSelected, metadata?.bindings]);
465
+ }, [arePatternOverridesEnabled, context, isSingleSelected, metadata?.bindings]);
443
466
  const showUrlInput = isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls;
444
467
  const showCoverControls = isSingleSelected && canInsertCover;
445
468
  const showBlockControls = showUrlInput || allowCrop || showCoverControls;
@@ -473,7 +496,7 @@ function Image({
473
496
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.MediaReplaceFlow, {
474
497
  mediaId: id,
475
498
  mediaURL: url,
476
- allowedTypes: _constants2.ALLOWED_MEDIA_TYPES,
499
+ allowedTypes: _constants.ALLOWED_MEDIA_TYPES,
477
500
  accept: "image/*",
478
501
  onSelect: onSelectImage,
479
502
  onSelectURL: onSelectURL,
@@ -571,7 +594,7 @@ function Image({
571
594
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToolsPanel, {
572
595
  label: (0, _i18n.__)('Settings'),
573
596
  resetAll: resetAll,
574
- dropdownMenuProps: _constants.TOOLSPANEL_DROPDOWNMENU_PROPS,
597
+ dropdownMenuProps: dropdownMenuProps,
575
598
  children: [isSingleSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
576
599
  label: (0, _i18n.__)('Alternative text'),
577
600
  isShownByDefault: true,
@@ -596,7 +619,7 @@ function Image({
596
619
  }),
597
620
  __nextHasNoMarginBottom: true
598
621
  })
599
- }), isResizable && dimensionsControl, !!imageSizeOptions.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(ResolutionTool, {
622
+ }), isResizable && (parentLayoutType === 'grid' ? aspectRatioControl : dimensionsControl), !!imageSizeOptions.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(ResolutionTool, {
600
623
  value: sizeSlug,
601
624
  onChange: updateImage,
602
625
  options: imageSizeOptions
@@ -635,7 +658,15 @@ function Image({
635
658
  const borderProps = (0, _blockEditor.__experimentalUseBorderProps)(attributes);
636
659
  const shadowProps = (0, _blockEditor.__experimentalGetShadowClassesAndStyles)(attributes);
637
660
  const isRounded = attributes.className?.includes('is-style-rounded');
638
- let img =
661
+ let img = temporaryURL && hasImageErrored ?
662
+ /*#__PURE__*/
663
+ // Show a placeholder during upload when the blob URL can't be loaded. This can
664
+ // happen when the user uploads a HEIC image in a browser that doesn't support them.
665
+ (0, _jsxRuntime.jsx)(_components.Placeholder, {
666
+ className: "wp-block-image__placeholder",
667
+ withIllustration: true,
668
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {})
669
+ }) :
639
670
  /*#__PURE__*/
640
671
  // Disable reason: Image itself is not meant to be interactive, but
641
672
  // should direct focus to block.
@@ -644,13 +675,8 @@ function Image({
644
675
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
645
676
  src: temporaryURL || url,
646
677
  alt: defaultedAlt,
647
- onError: () => onImageError(),
648
- onLoad: event => {
649
- setLoadedNaturalSize({
650
- loadedNaturalWidth: event.target?.naturalWidth,
651
- loadedNaturalHeight: event.target?.naturalHeight
652
- });
653
- },
678
+ onError: onImageError,
679
+ onLoad: onImageLoad,
654
680
  ref: imageRef,
655
681
  className: borderProps.className,
656
682
  style: {
@@ -680,7 +706,7 @@ function Image({
680
706
  borderProps: isRounded ? undefined : borderProps
681
707
  })
682
708
  });
683
- } else if (!isResizable) {
709
+ } else if (!isResizable || parentLayoutType === 'grid') {
684
710
  img = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
685
711
  style: {
686
712
  width,
@@ -699,8 +725,8 @@ function Image({
699
725
  const ratio = numericRatio || customRatio || naturalRatio || 1;
700
726
  const currentWidth = !numericWidth && numericHeight ? numericHeight * ratio : numericWidth;
701
727
  const currentHeight = !numericHeight && numericWidth ? numericWidth / ratio : numericHeight;
702
- const minWidth = naturalWidth < naturalHeight ? _constants2.MIN_SIZE : _constants2.MIN_SIZE * ratio;
703
- const minHeight = naturalHeight < naturalWidth ? _constants2.MIN_SIZE : _constants2.MIN_SIZE / ratio;
728
+ const minWidth = naturalWidth < naturalHeight ? _constants.MIN_SIZE : _constants.MIN_SIZE * ratio;
729
+ const minHeight = naturalHeight < naturalWidth ? _constants.MIN_SIZE : _constants.MIN_SIZE / ratio;
704
730
 
705
731
  // With the current implementation of ResizableBox, an image needs an
706
732
  // explicit pixel value for the max-width. In absence of being able to
@@ -1 +1 @@
1
- {"version":3,"names":["_blob","require","_components","_compose","_data","_blockEditor","_element","_i18n","_keycodes","_url","_blocks","_icons","_notices","_coreData","_lockUnlock","_util","_edit","_caption","_constants","_constants2","_utils","_jsxRuntime","DimensionsTool","ResolutionTool","unlock","blockEditorPrivateApis","scaleOptions","value","label","_x","help","__","ImageWrapper","href","children","jsx","onClick","event","preventDefault","style","pointerEvents","cursor","display","Image","temporaryURL","attributes","setAttributes","isSingleSelected","insertBlocksAfter","onReplace","onSelectImage","onSelectURL","onUploadError","context","clientId","blockEditingMode","parentLayoutType","url","alt","align","id","rel","linkClass","linkDestination","title","width","height","aspectRatio","scale","linkTarget","sizeSlug","lightbox","metadata","numericWidth","parseInt","undefined","numericHeight","imageRef","useRef","allowResize","getBlock","getSettings","useSelect","blockEditorStore","image","select","coreStore","getMedia","canInsertCover","imageEditing","imageSizes","maxWidth","getBlockRootClientId","canInsertBlockType","rootClientId","settings","replaceBlocks","toggleSelection","useDispatch","createErrorNotice","createSuccessNotice","noticesStore","isLargeViewport","useViewportMatch","isWideAligned","includes","loadedNaturalWidth","loadedNaturalHeight","setLoadedNaturalSize","useState","isEditingImage","setIsEditingImage","externalBlob","setExternalBlob","hasNonContentControls","isContentOnlyMode","isResizable","imageSizeOptions","filter","slug","media_details","sizes","source_url","map","name","useEffect","isExternalImage","mediaUpload","window","fetch","then","response","blob","catch","naturalWidth","naturalHeight","useMemo","current","complete","onResizeStart","onResizeStop","onImageError","embedBlock","createUpgradedEmbedBlock","onSetHref","props","onSetLightbox","enable","lightboxSetting","enabled","resetLightbox","allowEditing","onSetTitle","updateAlt","newAlt","updateImage","newSizeSlug","newUrl","uploadExternal","filesList","onFileChange","img","isBlobURL","type","allowedTypes","ALLOWED_MEDIA_TYPES","onError","message","canEditImage","allowCrop","switchToCover","switchToBlockType","dimensionsUnitsOptions","useCustomUnits","availableUnits","useSettings","showLightboxSetting","lightboxChecked","dimensionsControl","onChange","newWidth","newHeight","newScale","newAspectRatio","defaultScale","defaultAspectRatio","unitsOptions","resetAll","sizeControls","InspectorControls","__experimentalToolsPanel","dropdownMenuProps","TOOLSPANEL_DROPDOWNMENU_PROPS","arePatternOverridesEnabled","bindings","__default","source","lockUrlControls","lockHrefControls","lockAltControls","lockAltControlsMessage","lockTitleControls","lockTitleControlsMessage","lockCaption","getBlockBindingsSource","blocksStore","getBlockParentsByBlockName","urlBinding","altBinding","titleBinding","hasParentPattern","length","urlBindingSource","altBindingSource","titleBindingSource","canUserEditValue","args","sprintf","showUrlInput","showCoverControls","showBlockControls","controls","jsxs","Fragment","BlockControls","group","__experimentalImageURLInputUI","onChangeUrl","mediaUrl","mediaLink","link","lightboxEnabled","ToolbarButton","icon","crop","overlayText","MediaReplaceFlow","mediaId","mediaURL","accept","onSelect","ToolbarGroup","upload","Dropdown","popoverProps","position","renderToggle","isOpen","onToggle","onKeyDown","keyCode","DOWN","renderContent","TextareaControl","className","disabled","ExternalLink","__nextHasNoMarginBottom","TextControl","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","readOnly","options","__next40pxDefaultSize","filename","getFilename","defaultedAlt","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","isRounded","src","onLoad","target","ref","objectFit","Spinner","__experimentalImageEditor","onSaveImage","imageAttributes","onFinishEditing","numericRatio","evalAspectRatio","customRatio","naturalRatio","ratio","currentWidth","currentHeight","minWidth","MIN_SIZE","minHeight","maxWidthBuffer","showRightHandle","showLeftHandle","isRTL","ResizableBox","size","showHandle","maxHeight","lockAspectRatio","top","right","bottom","left","direction","elt","offsetWidth","String","resizeRatio","Caption","isSelected","showToolbarButton"],"sources":["@wordpress/block-library/src/image/image.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tExternalLink,\n\tResizableBox,\n\tSpinner,\n\tTextareaControl,\n\tTextControl,\n\tToolbarButton,\n\tToolbarGroup,\n\tDropdown,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalImageURLInputUI as ImageURLInputUI,\n\tMediaReplaceFlow,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__experimentalImageEditor as ImageEditor,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useEffect, useMemo, useState, useRef } from '@wordpress/element';\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport { getFilename } from '@wordpress/url';\nimport { switchToBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { crop, overlayText, upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport { isExternalImage } from './edit';\nimport { Caption } from '../utils/caption';\n\n/**\n * Module constants\n */\nimport { TOOLSPANEL_DROPDOWNMENU_PROPS } from '../utils/constants';\nimport { MIN_SIZE, ALLOWED_MEDIA_TYPES } from './constants';\nimport { evalAspectRatio } from './utils';\n\nconst { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );\n\nconst scaleOptions = [\n\t{\n\t\tvalue: 'cover',\n\t\tlabel: _x( 'Cover', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image covers the space evenly.' ),\n\t},\n\t{\n\t\tvalue: 'contain',\n\t\tlabel: _x( 'Contain', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image is contained without distortion.' ),\n\t},\n];\n\n// If the image has a href, wrap in an <a /> tag to trigger any inherited link element styles.\nconst ImageWrapper = ( { href, children } ) => {\n\tif ( ! href ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<a\n\t\t\thref={ href }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\taria-disabled\n\t\t\tstyle={ {\n\t\t\t\t// When the Image block is linked,\n\t\t\t\t// it's wrapped with a disabled <a /> tag.\n\t\t\t\t// Restore cursor style so it doesn't appear 'clickable'\n\t\t\t\t// and remove pointer events. Safari needs the display property.\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\tcursor: 'default',\n\t\t\t\tdisplay: 'inline',\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</a>\n\t);\n};\n\nexport default function Image( {\n\ttemporaryURL,\n\tattributes,\n\tsetAttributes,\n\tisSingleSelected,\n\tinsertBlocksAfter,\n\tonReplace,\n\tonSelectImage,\n\tonSelectURL,\n\tonUploadError,\n\tcontext,\n\tclientId,\n\tblockEditingMode,\n\tparentLayoutType,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\talign,\n\t\tid,\n\t\thref,\n\t\trel,\n\t\tlinkClass,\n\t\tlinkDestination,\n\t\ttitle,\n\t\twidth,\n\t\theight,\n\t\taspectRatio,\n\t\tscale,\n\t\tlinkTarget,\n\t\tsizeSlug,\n\t\tlightbox,\n\t\tmetadata,\n\t} = attributes;\n\n\t// The only supported unit is px, so we can parseInt to strip the px here.\n\tconst numericWidth = width ? parseInt( width, 10 ) : undefined;\n\tconst numericHeight = height ? parseInt( height, 10 ) : undefined;\n\n\tconst imageRef = useRef();\n\tconst { allowResize = true } = context;\n\tconst { getBlock, getSettings } = useSelect( blockEditorStore );\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isSingleSelected\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isSingleSelected ]\n\t);\n\n\tconst { canInsertCover, imageEditing, imageSizes, maxWidth } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, canInsertBlockType } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst settings = getSettings();\n\n\t\t\treturn {\n\t\t\t\timageEditing: settings.imageEditing,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tmaxWidth: settings.maxWidth,\n\t\t\t\tcanInsertCover: canInsertBlockType(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst [\n\t\t{ loadedNaturalWidth, loadedNaturalHeight },\n\t\tsetLoadedNaturalSize,\n\t] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst [ externalBlob, setExternalBlob ] = useState();\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst isContentOnlyMode = blockEditingMode === 'contentOnly';\n\tconst isResizable =\n\t\tallowResize &&\n\t\thasNonContentControls &&\n\t\t! isWideAligned &&\n\t\tisLargeViewport &&\n\t\tparentLayoutType !== 'grid';\n\tconst imageSizeOptions = imageSizes\n\t\t.filter(\n\t\t\t( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url\n\t\t)\n\t\t.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\t// If an image is externally hosted, try to fetch the image data. This may\n\t// fail if the image host doesn't allow CORS with the domain. If it works,\n\t// we can enable a button in the toolbar to upload the image.\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! isExternalImage( id, url ) ||\n\t\t\t! isSingleSelected ||\n\t\t\t! getSettings().mediaUpload\n\t\t) {\n\t\t\tsetExternalBlob();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( externalBlob ) {\n\t\t\treturn;\n\t\t}\n\n\t\twindow\n\t\t\t// Avoid cache, which seems to help avoid CORS problems.\n\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t.then( ( response ) => response.blob() )\n\t\t\t.then( ( blob ) => setExternalBlob( blob ) )\n\t\t\t// Do nothing, cannot upload.\n\t\t\t.catch( () => {} );\n\t}, [ id, url, isSingleSelected, externalBlob ] );\n\n\t// Get naturalWidth and naturalHeight from image ref, and fall back to loaded natural\n\t// width and height. This resolves an issue in Safari where the loaded natural\n\t// width and height is otherwise lost when switching between alignments.\n\t// See: https://github.com/WordPress/gutenberg/pull/37210.\n\tconst { naturalWidth, naturalHeight } = useMemo( () => {\n\t\treturn {\n\t\t\tnaturalWidth:\n\t\t\t\timageRef.current?.naturalWidth ||\n\t\t\t\tloadedNaturalWidth ||\n\t\t\t\tundefined,\n\t\t\tnaturalHeight:\n\t\t\t\timageRef.current?.naturalHeight ||\n\t\t\t\tloadedNaturalHeight ||\n\t\t\t\tundefined,\n\t\t};\n\t}, [\n\t\tloadedNaturalWidth,\n\t\tloadedNaturalHeight,\n\t\timageRef.current?.complete,\n\t] );\n\n\tfunction onResizeStart() {\n\t\ttoggleSelection( false );\n\t}\n\n\tfunction onResizeStop() {\n\t\ttoggleSelection( true );\n\t}\n\n\tfunction onImageError() {\n\t\t// Check if there's an embed block that handles this URL, e.g., instagram URL.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/11472\n\t\tconst embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );\n\n\t\tif ( undefined !== embedBlock ) {\n\t\t\tonReplace( embedBlock );\n\t\t}\n\t}\n\n\tfunction onSetHref( props ) {\n\t\tsetAttributes( props );\n\t}\n\n\tfunction onSetLightbox( enable ) {\n\t\tif ( enable && ! lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: true },\n\t\t\t} );\n\t\t} else if ( ! enable && lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction resetLightbox() {\n\t\t// When deleting a link from an image while lightbox settings\n\t\t// are enabled by default, we should disable the lightbox,\n\t\t// otherwise the resulting UX looks like a mistake.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59890/files#r1532286123.\n\t\tif ( lightboxSetting?.enabled && lightboxSetting?.allowEditing ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction onSetTitle( value ) {\n\t\t// This is the HTML title attribute, separate from the media object\n\t\t// title.\n\t\tsetAttributes( { title: value } );\n\t}\n\n\tfunction updateAlt( newAlt ) {\n\t\tsetAttributes( { alt: newAlt } );\n\t}\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl = image?.media_details?.sizes?.[ newSizeSlug ]?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tfunction uploadExternal() {\n\t\tconst { mediaUpload } = getSettings();\n\t\tif ( ! mediaUpload ) {\n\t\t\treturn;\n\t\t}\n\t\tmediaUpload( {\n\t\t\tfilesList: [ externalBlob ],\n\t\t\tonFileChange( [ img ] ) {\n\t\t\t\tonSelectImage( img );\n\n\t\t\t\tif ( isBlobURL( img.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetExternalBlob();\n\t\t\t\tcreateSuccessNotice( __( 'Image uploaded.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t},\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tonError( message ) {\n\t\t\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSingleSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSingleSelected ] );\n\n\tconst canEditImage = id && naturalWidth && naturalHeight && imageEditing;\n\tconst allowCrop = isSingleSelected && canEditImage && ! isEditingImage;\n\n\tfunction switchToCover() {\n\t\treplaceBlocks(\n\t\t\tclientId,\n\t\t\tswitchToBlockType( getBlock( clientId ), 'core/cover' )\n\t\t);\n\t}\n\n\t// TODO: Can allow more units after figuring out how they should interact\n\t// with the ResizableBox and ImageEditor components. Calculations later on\n\t// for those components are currently assuming px units.\n\tconst dimensionsUnitsOptions = useCustomUnits( {\n\t\tavailableUnits: [ 'px' ],\n\t} );\n\n\tconst [ lightboxSetting ] = useSettings( 'lightbox' );\n\n\tconst showLightboxSetting =\n\t\t// If a block-level override is set, we should give users the option to\n\t\t// remove that override, even if the lightbox UI is disabled in the settings.\n\t\t( !! lightbox && lightbox?.enabled !== lightboxSetting?.enabled ) ||\n\t\tlightboxSetting?.allowEditing;\n\n\tconst lightboxChecked =\n\t\t!! lightbox?.enabled || ( ! lightbox && !! lightboxSetting?.enabled );\n\n\tconst dimensionsControl = (\n\t\t<DimensionsTool\n\t\t\tvalue={ { width, height, scale, aspectRatio } }\n\t\t\tonChange={ ( {\n\t\t\t\twidth: newWidth,\n\t\t\t\theight: newHeight,\n\t\t\t\tscale: newScale,\n\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t} ) => {\n\t\t\t\t// Rebuilding the object forces setting `undefined`\n\t\t\t\t// for values that are removed since setAttributes\n\t\t\t\t// doesn't do anything with keys that aren't set.\n\t\t\t\tsetAttributes( {\n\t\t\t\t\t// CSS includes `height: auto`, but we need\n\t\t\t\t\t// `width: auto` to fix the aspect ratio when\n\t\t\t\t\t// only height is set due to the width and\n\t\t\t\t\t// height attributes set via the server.\n\t\t\t\t\twidth: ! newWidth && newHeight ? 'auto' : newWidth,\n\t\t\t\t\theight: newHeight,\n\t\t\t\t\tscale: newScale,\n\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tdefaultScale=\"cover\"\n\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\tscaleOptions={ scaleOptions }\n\t\t\tunitsOptions={ dimensionsUnitsOptions }\n\t\t/>\n\t);\n\n\tconst resetAll = () => {\n\t\tsetAttributes( {\n\t\t\talt: undefined,\n\t\t\twidth: undefined,\n\t\t\theight: undefined,\n\t\t\tscale: undefined,\n\t\t\taspectRatio: undefined,\n\t\t\tlightbox: undefined,\n\t\t} );\n\t};\n\n\tconst sizeControls = (\n\t\t<InspectorControls>\n\t\t\t<ToolsPanel\n\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\tresetAll={ resetAll }\n\t\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t\t>\n\t\t\t\t{ isResizable && dimensionsControl }\n\t\t\t</ToolsPanel>\n\t\t</InspectorControls>\n\t);\n\n\tconst arePatternOverridesEnabled =\n\t\tmetadata?.bindings?.__default?.source === 'core/pattern-overrides';\n\n\tconst {\n\t\tlockUrlControls = false,\n\t\tlockHrefControls = false,\n\t\tlockAltControls = false,\n\t\tlockAltControlsMessage,\n\t\tlockTitleControls = false,\n\t\tlockTitleControlsMessage,\n\t\tlockCaption = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst { getBlockParentsByBlockName } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\tconst {\n\t\t\t\turl: urlBinding,\n\t\t\t\talt: altBinding,\n\t\t\t\ttitle: titleBinding,\n\t\t\t} = metadata?.bindings || {};\n\t\t\tconst hasParentPattern =\n\t\t\t\tgetBlockParentsByBlockName( clientId, 'core/block' ).length > 0;\n\t\t\tconst urlBindingSource = getBlockBindingsSource(\n\t\t\t\turlBinding?.source\n\t\t\t);\n\t\t\tconst altBindingSource = getBlockBindingsSource(\n\t\t\t\taltBinding?.source\n\t\t\t);\n\t\t\tconst titleBindingSource = getBlockBindingsSource(\n\t\t\t\ttitleBinding?.source\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! urlBinding &&\n\t\t\t\t\t! urlBindingSource?.canUserEditValue( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: urlBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockHrefControls:\n\t\t\t\t\t// Disable editing the link of the URL if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the link on the frontend.\n\t\t\t\t\thasParentPattern || arePatternOverridesEnabled,\n\t\t\t\tlockCaption:\n\t\t\t\t\t// Disable editing the caption if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the caption on the frontend.\n\t\t\t\t\thasParentPattern,\n\t\t\t\tlockAltControls:\n\t\t\t\t\t!! altBinding &&\n\t\t\t\t\t! altBindingSource?.canUserEditValue( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: altBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockAltControlsMessage: altBindingSource?.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\taltBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t\tlockTitleControls:\n\t\t\t\t\t!! titleBinding &&\n\t\t\t\t\t! titleBindingSource?.canUserEditValue( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: titleBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockTitleControlsMessage: titleBindingSource?.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\ttitleBindingSource.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[ clientId, isSingleSelected, metadata?.bindings ]\n\t);\n\n\tconst showUrlInput =\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockHrefControls &&\n\t\t! lockUrlControls;\n\n\tconst showCoverControls = isSingleSelected && canInsertCover;\n\n\tconst showBlockControls = showUrlInput || allowCrop || showCoverControls;\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ showBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ showUrlInput && (\n\t\t\t\t\t\t<ImageURLInputUI\n\t\t\t\t\t\t\turl={ href || '' }\n\t\t\t\t\t\t\tonChangeUrl={ onSetHref }\n\t\t\t\t\t\t\tlinkDestination={ linkDestination }\n\t\t\t\t\t\t\tmediaUrl={ ( image && image.source_url ) || url }\n\t\t\t\t\t\t\tmediaLink={ image && image.link }\n\t\t\t\t\t\t\tlinkTarget={ linkTarget }\n\t\t\t\t\t\t\tlinkClass={ linkClass }\n\t\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t\t\tshowLightboxSetting={ showLightboxSetting }\n\t\t\t\t\t\t\tlightboxEnabled={ lightboxChecked }\n\t\t\t\t\t\t\tonSetLightbox={ onSetLightbox }\n\t\t\t\t\t\t\tresetLightbox={ resetLightbox }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ allowCrop && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showCoverControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ticon={ overlayText }\n\t\t\t\t\t\t\tlabel={ __( 'Add text over image' ) }\n\t\t\t\t\t\t\tonClick={ switchToCover }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && ! isEditingImage && ! lockUrlControls && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\t\tmediaId={ id }\n\t\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && externalBlob && (\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ uploadExternal }\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tlabel={ __( 'Upload to Media Library' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isContentOnlyMode && (\n\t\t\t\t// Add some extra controls for content attributes when content only mode is active.\n\t\t\t\t// With content only mode active, the inspector is hidden, so users need another way\n\t\t\t\t// to edit these attributes.\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ { position: 'bottom right' } }\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ _x(\n\t\t\t\t\t\t\t\t\t'Alt',\n\t\t\t\t\t\t\t\t\t'Alternative text for an image. Block toolbar label, a low character count is preferred.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\tdisabled={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ { position: 'bottom right' } }\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Title' ) }\n\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\t\t\t\tdisabled={ lockTitleControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAll }\n\t\t\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t\t\t>\n\t\t\t\t\t{ isSingleSelected && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\treadOnly={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isResizable && dimensionsControl }\n\t\t\t\t\t{ !! imageSizeOptions.length && (\n\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\treadOnly={ lockTitleControls }\n\t\t\t\t\thelp={\n\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst filename = getFilename( url );\n\tlet defaultedAlt;\n\n\tif ( alt ) {\n\t\tdefaultedAlt = alt;\n\t} else if ( filename ) {\n\t\tdefaultedAlt = sprintf(\n\t\t\t/* translators: %s: file name */\n\t\t\t__( 'This image has an empty alt attribute; its file name is %s' ),\n\t\t\tfilename\n\t\t);\n\t} else {\n\t\tdefaultedAlt = __( 'This image has an empty alt attribute' );\n\t}\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst isRounded = attributes.className?.includes( 'is-style-rounded' );\n\n\tlet img = (\n\t\t// Disable reason: Image itself is not meant to be interactive, but\n\t\t// should direct focus to block.\n\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t<>\n\t\t\t<img\n\t\t\t\tsrc={ temporaryURL || url }\n\t\t\t\talt={ defaultedAlt }\n\t\t\t\tonError={ () => onImageError() }\n\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\tsetLoadedNaturalSize( {\n\t\t\t\t\t\tloadedNaturalWidth: event.target?.naturalWidth,\n\t\t\t\t\t\tloadedNaturalHeight: event.target?.naturalHeight,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tref={ imageRef }\n\t\t\t\tclassName={ borderProps.className }\n\t\t\t\tstyle={ {\n\t\t\t\t\twidth:\n\t\t\t\t\t\t( width && height ) || aspectRatio ? '100%' : undefined,\n\t\t\t\t\theight:\n\t\t\t\t\t\t( width && height ) || aspectRatio ? '100%' : undefined,\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{ temporaryURL && <Spinner /> }\n\t\t</>\n\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t);\n\n\tif ( canEditImage && isEditingImage ) {\n\t\timg = (\n\t\t\t<ImageWrapper href={ href }>\n\t\t\t\t<ImageEditor\n\t\t\t\t\tid={ id }\n\t\t\t\t\turl={ url }\n\t\t\t\t\twidth={ numericWidth }\n\t\t\t\t\theight={ numericHeight }\n\t\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\t\tonSaveImage={ ( imageAttributes ) =>\n\t\t\t\t\t\tsetAttributes( imageAttributes )\n\t\t\t\t\t}\n\t\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t\t} }\n\t\t\t\t\tborderProps={ isRounded ? undefined : borderProps }\n\t\t\t\t/>\n\t\t\t</ImageWrapper>\n\t\t);\n\t} else if ( ! isResizable ) {\n\t\timg = (\n\t\t\t<div style={ { width, height, aspectRatio } }>\n\t\t\t\t<ImageWrapper href={ href }>{ img }</ImageWrapper>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tconst numericRatio = aspectRatio && evalAspectRatio( aspectRatio );\n\t\tconst customRatio = numericWidth / numericHeight;\n\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\tconst ratio = numericRatio || customRatio || naturalRatio || 1;\n\t\tconst currentWidth =\n\t\t\t! numericWidth && numericHeight\n\t\t\t\t? numericHeight * ratio\n\t\t\t\t: numericWidth;\n\t\tconst currentHeight =\n\t\t\t! numericHeight && numericWidth\n\t\t\t\t? numericWidth / ratio\n\t\t\t\t: numericHeight;\n\n\t\tconst minWidth =\n\t\t\tnaturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;\n\t\tconst minHeight =\n\t\t\tnaturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio;\n\n\t\t// With the current implementation of ResizableBox, an image needs an\n\t\t// explicit pixel value for the max-width. In absence of being able to\n\t\t// set the content-width, this max-width is currently dictated by the\n\t\t// vanilla editor style. The following variable adds a buffer to this\n\t\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t\t// in most cases, allow you to scale the image beyond the width of the\n\t\t// main column, though not infinitely.\n\t\t// @todo It would be good to revisit this once a content-width variable\n\t\t// becomes available.\n\t\tconst maxWidthBuffer = maxWidth * 2.5;\n\n\t\tlet showRightHandle = false;\n\t\tlet showLeftHandle = false;\n\n\t\t/* eslint-disable no-lonely-if */\n\t\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\t\tif ( align === 'center' ) {\n\t\t\t// When the image is centered, show both handles.\n\t\t\tshowRightHandle = true;\n\t\t\tshowLeftHandle = true;\n\t\t} else if ( isRTL() ) {\n\t\t\t// In RTL mode the image is on the right by default.\n\t\t\t// Show the right handle and hide the left handle only when it is\n\t\t\t// aligned left. Otherwise always show the left handle.\n\t\t\tif ( align === 'left' ) {\n\t\t\t\tshowRightHandle = true;\n\t\t\t} else {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// Show the left handle and hide the right handle only when the\n\t\t\t// image is aligned right. Otherwise always show the right handle.\n\t\t\tif ( align === 'right' ) {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t} else {\n\t\t\t\tshowRightHandle = true;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-lonely-if */\n\t\timg = (\n\t\t\t<ResizableBox\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\tobjectFit: scale,\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} }\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: currentWidth ?? 'auto',\n\t\t\t\t\theight: currentHeight ?? 'auto',\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSingleSelected }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxWidthBuffer }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxWidthBuffer / ratio }\n\t\t\t\tlockAspectRatio={ ratio }\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ onResizeStart }\n\t\t\t\tonResizeStop={ ( event, direction, elt ) => {\n\t\t\t\t\tonResizeStop();\n\t\t\t\t\t// Since the aspect ratio is locked when resizing, we can\n\t\t\t\t\t// use the width of the resized element to calculate the\n\t\t\t\t\t// height in CSS to prevent stretching when the max-width\n\t\t\t\t\t// is reached.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: `${ elt.offsetWidth }px`,\n\t\t\t\t\t\theight: 'auto',\n\t\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t\tratio === naturalRatio\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: String( ratio ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tresizeRatio={ align === 'center' ? 2 : 1 }\n\t\t\t>\n\t\t\t\t<ImageWrapper href={ href }>{ img }</ImageWrapper>\n\t\t\t</ResizableBox>\n\t\t);\n\t}\n\n\tif ( ! url && ! temporaryURL ) {\n\t\t// Add all controls if the image attributes are connected.\n\t\treturn metadata?.bindings ? controls : sizeControls;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ controls }\n\t\t\t{ img }\n\n\t\t\t<Caption\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tisSelected={ isSingleSelected }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tlabel={ __( 'Image caption text' ) }\n\t\t\t\tshowToolbarButton={\n\t\t\t\t\tisSingleSelected &&\n\t\t\t\t\thasNonContentControls &&\n\t\t\t\t\t! arePatternOverridesEnabled\n\t\t\t\t}\n\t\t\t\treadOnly={ lockCaption }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAYA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,M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","_keycodes","_url","_blocks","_icons","_notices","_coreData","_lockUnlock","_util","_edit","_caption","_hooks","_constants","_utils","_jsxRuntime","DimensionsTool","ResolutionTool","unlock","blockEditorPrivateApis","scaleOptions","value","label","_x","help","__","ImageWrapper","href","children","jsx","onClick","event","preventDefault","style","pointerEvents","cursor","display","Image","temporaryURL","attributes","setAttributes","isSingleSelected","insertBlocksAfter","onReplace","onSelectImage","onSelectURL","onUploadError","context","clientId","blockEditingMode","parentLayoutType","url","alt","align","id","rel","linkClass","linkDestination","title","width","height","aspectRatio","scale","linkTarget","sizeSlug","lightbox","metadata","numericWidth","parseInt","undefined","numericHeight","imageRef","useRef","allowResize","getBlock","getSettings","useSelect","blockEditorStore","image","select","coreStore","getMedia","canInsertCover","imageEditing","imageSizes","maxWidth","getBlockRootClientId","canInsertBlockType","rootClientId","settings","replaceBlocks","toggleSelection","useDispatch","createErrorNotice","createSuccessNotice","noticesStore","isLargeViewport","useViewportMatch","isWideAligned","includes","loadedNaturalWidth","loadedNaturalHeight","setLoadedNaturalSize","useState","isEditingImage","setIsEditingImage","externalBlob","setExternalBlob","hasImageErrored","setHasImageErrored","hasNonContentControls","isContentOnlyMode","isResizable","imageSizeOptions","filter","slug","media_details","sizes","source_url","map","name","useEffect","isExternalImage","mediaUpload","window","fetch","then","response","blob","catch","naturalWidth","naturalHeight","useMemo","current","complete","onResizeStart","onResizeStop","onImageError","embedBlock","createUpgradedEmbedBlock","onImageLoad","target","onSetHref","props","onSetLightbox","enable","lightboxSetting","enabled","resetLightbox","allowEditing","onSetTitle","updateAlt","newAlt","updateImage","newSizeSlug","newUrl","uploadExternal","filesList","onFileChange","img","isBlobURL","type","allowedTypes","ALLOWED_MEDIA_TYPES","onError","message","canEditImage","allowCrop","switchToCover","switchToBlockType","dimensionsUnitsOptions","useCustomUnits","availableUnits","useSettings","showLightboxSetting","lightboxChecked","dropdownMenuProps","useToolsPanelDropdownMenuProps","dimensionsControl","onChange","newWidth","newHeight","newScale","newAspectRatio","defaultScale","defaultAspectRatio","unitsOptions","aspectRatioControl","tools","resetAll","sizeControls","InspectorControls","__experimentalToolsPanel","arePatternOverridesEnabled","bindings","__default","source","lockUrlControls","lockHrefControls","lockAltControls","lockAltControlsMessage","lockTitleControls","lockTitleControlsMessage","lockCaption","getBlockBindingsSource","blocksStore","urlBinding","altBinding","titleBinding","hasParentPattern","urlBindingSource","altBindingSource","titleBindingSource","canUserEditValue","args","sprintf","showUrlInput","showCoverControls","showBlockControls","controls","jsxs","Fragment","BlockControls","group","__experimentalImageURLInputUI","onChangeUrl","mediaUrl","mediaLink","link","lightboxEnabled","ToolbarButton","icon","crop","overlayText","MediaReplaceFlow","mediaId","mediaURL","accept","onSelect","ToolbarGroup","upload","Dropdown","popoverProps","position","renderToggle","isOpen","onToggle","onKeyDown","keyCode","DOWN","renderContent","TextareaControl","className","disabled","ExternalLink","__nextHasNoMarginBottom","TextControl","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","readOnly","length","options","__next40pxDefaultSize","filename","getFilename","defaultedAlt","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","isRounded","Placeholder","withIllustration","Spinner","src","onLoad","ref","objectFit","__experimentalImageEditor","onSaveImage","imageAttributes","onFinishEditing","numericRatio","evalAspectRatio","customRatio","naturalRatio","ratio","currentWidth","currentHeight","minWidth","MIN_SIZE","minHeight","maxWidthBuffer","showRightHandle","showLeftHandle","isRTL","ResizableBox","size","showHandle","maxHeight","lockAspectRatio","top","right","bottom","left","direction","elt","offsetWidth","String","resizeRatio","Caption","isSelected","showToolbarButton"],"sources":["@wordpress/block-library/src/image/image.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tExternalLink,\n\tResizableBox,\n\tSpinner,\n\tTextareaControl,\n\tTextControl,\n\tToolbarButton,\n\tToolbarGroup,\n\tDropdown,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\tPlaceholder,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalImageURLInputUI as ImageURLInputUI,\n\tMediaReplaceFlow,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__experimentalImageEditor as ImageEditor,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useEffect, useMemo, useState, useRef } from '@wordpress/element';\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport { getFilename } from '@wordpress/url';\nimport { switchToBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { crop, overlayText, upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport { isExternalImage } from './edit';\nimport { Caption } from '../utils/caption';\n\n/**\n * Module constants\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport { MIN_SIZE, ALLOWED_MEDIA_TYPES } from './constants';\nimport { evalAspectRatio } from './utils';\n\nconst { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );\n\nconst scaleOptions = [\n\t{\n\t\tvalue: 'cover',\n\t\tlabel: _x( 'Cover', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image covers the space evenly.' ),\n\t},\n\t{\n\t\tvalue: 'contain',\n\t\tlabel: _x( 'Contain', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image is contained without distortion.' ),\n\t},\n];\n\n// If the image has a href, wrap in an <a /> tag to trigger any inherited link element styles.\nconst ImageWrapper = ( { href, children } ) => {\n\tif ( ! href ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<a\n\t\t\thref={ href }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\taria-disabled\n\t\t\tstyle={ {\n\t\t\t\t// When the Image block is linked,\n\t\t\t\t// it's wrapped with a disabled <a /> tag.\n\t\t\t\t// Restore cursor style so it doesn't appear 'clickable'\n\t\t\t\t// and remove pointer events. Safari needs the display property.\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\tcursor: 'default',\n\t\t\t\tdisplay: 'inline',\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</a>\n\t);\n};\n\nexport default function Image( {\n\ttemporaryURL,\n\tattributes,\n\tsetAttributes,\n\tisSingleSelected,\n\tinsertBlocksAfter,\n\tonReplace,\n\tonSelectImage,\n\tonSelectURL,\n\tonUploadError,\n\tcontext,\n\tclientId,\n\tblockEditingMode,\n\tparentLayoutType,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\talign,\n\t\tid,\n\t\thref,\n\t\trel,\n\t\tlinkClass,\n\t\tlinkDestination,\n\t\ttitle,\n\t\twidth,\n\t\theight,\n\t\taspectRatio,\n\t\tscale,\n\t\tlinkTarget,\n\t\tsizeSlug,\n\t\tlightbox,\n\t\tmetadata,\n\t} = attributes;\n\n\t// The only supported unit is px, so we can parseInt to strip the px here.\n\tconst numericWidth = width ? parseInt( width, 10 ) : undefined;\n\tconst numericHeight = height ? parseInt( height, 10 ) : undefined;\n\n\tconst imageRef = useRef();\n\tconst { allowResize = true } = context;\n\tconst { getBlock, getSettings } = useSelect( blockEditorStore );\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isSingleSelected\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isSingleSelected ]\n\t);\n\n\tconst { canInsertCover, imageEditing, imageSizes, maxWidth } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, canInsertBlockType } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst settings = getSettings();\n\n\t\t\treturn {\n\t\t\t\timageEditing: settings.imageEditing,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tmaxWidth: settings.maxWidth,\n\t\t\t\tcanInsertCover: canInsertBlockType(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst [\n\t\t{ loadedNaturalWidth, loadedNaturalHeight },\n\t\tsetLoadedNaturalSize,\n\t] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst [ externalBlob, setExternalBlob ] = useState();\n\tconst [ hasImageErrored, setHasImageErrored ] = useState( false );\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst isContentOnlyMode = blockEditingMode === 'contentOnly';\n\tconst isResizable =\n\t\tallowResize &&\n\t\thasNonContentControls &&\n\t\t! isWideAligned &&\n\t\tisLargeViewport;\n\tconst imageSizeOptions = imageSizes\n\t\t.filter(\n\t\t\t( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url\n\t\t)\n\t\t.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\t// If an image is externally hosted, try to fetch the image data. This may\n\t// fail if the image host doesn't allow CORS with the domain. If it works,\n\t// we can enable a button in the toolbar to upload the image.\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! isExternalImage( id, url ) ||\n\t\t\t! isSingleSelected ||\n\t\t\t! getSettings().mediaUpload\n\t\t) {\n\t\t\tsetExternalBlob();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( externalBlob ) {\n\t\t\treturn;\n\t\t}\n\n\t\twindow\n\t\t\t// Avoid cache, which seems to help avoid CORS problems.\n\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t.then( ( response ) => response.blob() )\n\t\t\t.then( ( blob ) => setExternalBlob( blob ) )\n\t\t\t// Do nothing, cannot upload.\n\t\t\t.catch( () => {} );\n\t}, [ id, url, isSingleSelected, externalBlob ] );\n\n\t// Get naturalWidth and naturalHeight from image ref, and fall back to loaded natural\n\t// width and height. This resolves an issue in Safari where the loaded natural\n\t// width and height is otherwise lost when switching between alignments.\n\t// See: https://github.com/WordPress/gutenberg/pull/37210.\n\tconst { naturalWidth, naturalHeight } = useMemo( () => {\n\t\treturn {\n\t\t\tnaturalWidth:\n\t\t\t\timageRef.current?.naturalWidth ||\n\t\t\t\tloadedNaturalWidth ||\n\t\t\t\tundefined,\n\t\t\tnaturalHeight:\n\t\t\t\timageRef.current?.naturalHeight ||\n\t\t\t\tloadedNaturalHeight ||\n\t\t\t\tundefined,\n\t\t};\n\t}, [\n\t\tloadedNaturalWidth,\n\t\tloadedNaturalHeight,\n\t\timageRef.current?.complete,\n\t] );\n\n\tfunction onResizeStart() {\n\t\ttoggleSelection( false );\n\t}\n\n\tfunction onResizeStop() {\n\t\ttoggleSelection( true );\n\t}\n\n\tfunction onImageError() {\n\t\tsetHasImageErrored( true );\n\n\t\t// Check if there's an embed block that handles this URL, e.g., instagram URL.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/11472\n\t\tconst embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );\n\t\tif ( undefined !== embedBlock ) {\n\t\t\tonReplace( embedBlock );\n\t\t}\n\t}\n\n\tfunction onImageLoad( event ) {\n\t\tsetHasImageErrored( false );\n\t\tsetLoadedNaturalSize( {\n\t\t\tloadedNaturalWidth: event.target?.naturalWidth,\n\t\t\tloadedNaturalHeight: event.target?.naturalHeight,\n\t\t} );\n\t}\n\n\tfunction onSetHref( props ) {\n\t\tsetAttributes( props );\n\t}\n\n\tfunction onSetLightbox( enable ) {\n\t\tif ( enable && ! lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: true },\n\t\t\t} );\n\t\t} else if ( ! enable && lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction resetLightbox() {\n\t\t// When deleting a link from an image while lightbox settings\n\t\t// are enabled by default, we should disable the lightbox,\n\t\t// otherwise the resulting UX looks like a mistake.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59890/files#r1532286123.\n\t\tif ( lightboxSetting?.enabled && lightboxSetting?.allowEditing ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction onSetTitle( value ) {\n\t\t// This is the HTML title attribute, separate from the media object\n\t\t// title.\n\t\tsetAttributes( { title: value } );\n\t}\n\n\tfunction updateAlt( newAlt ) {\n\t\tsetAttributes( { alt: newAlt } );\n\t}\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl = image?.media_details?.sizes?.[ newSizeSlug ]?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tfunction uploadExternal() {\n\t\tconst { mediaUpload } = getSettings();\n\t\tif ( ! mediaUpload ) {\n\t\t\treturn;\n\t\t}\n\t\tmediaUpload( {\n\t\t\tfilesList: [ externalBlob ],\n\t\t\tonFileChange( [ img ] ) {\n\t\t\t\tonSelectImage( img );\n\n\t\t\t\tif ( isBlobURL( img.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetExternalBlob();\n\t\t\t\tcreateSuccessNotice( __( 'Image uploaded.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t},\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tonError( message ) {\n\t\t\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSingleSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSingleSelected ] );\n\n\tconst canEditImage = id && naturalWidth && naturalHeight && imageEditing;\n\tconst allowCrop = isSingleSelected && canEditImage && ! isEditingImage;\n\n\tfunction switchToCover() {\n\t\treplaceBlocks(\n\t\t\tclientId,\n\t\t\tswitchToBlockType( getBlock( clientId ), 'core/cover' )\n\t\t);\n\t}\n\n\t// TODO: Can allow more units after figuring out how they should interact\n\t// with the ResizableBox and ImageEditor components. Calculations later on\n\t// for those components are currently assuming px units.\n\tconst dimensionsUnitsOptions = useCustomUnits( {\n\t\tavailableUnits: [ 'px' ],\n\t} );\n\n\tconst [ lightboxSetting ] = useSettings( 'lightbox' );\n\n\tconst showLightboxSetting =\n\t\t// If a block-level override is set, we should give users the option to\n\t\t// remove that override, even if the lightbox UI is disabled in the settings.\n\t\t( !! lightbox && lightbox?.enabled !== lightboxSetting?.enabled ) ||\n\t\tlightboxSetting?.allowEditing;\n\n\tconst lightboxChecked =\n\t\t!! lightbox?.enabled || ( ! lightbox && !! lightboxSetting?.enabled );\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst dimensionsControl = (\n\t\t<DimensionsTool\n\t\t\tvalue={ { width, height, scale, aspectRatio } }\n\t\t\tonChange={ ( {\n\t\t\t\twidth: newWidth,\n\t\t\t\theight: newHeight,\n\t\t\t\tscale: newScale,\n\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t} ) => {\n\t\t\t\t// Rebuilding the object forces setting `undefined`\n\t\t\t\t// for values that are removed since setAttributes\n\t\t\t\t// doesn't do anything with keys that aren't set.\n\t\t\t\tsetAttributes( {\n\t\t\t\t\t// CSS includes `height: auto`, but we need\n\t\t\t\t\t// `width: auto` to fix the aspect ratio when\n\t\t\t\t\t// only height is set due to the width and\n\t\t\t\t\t// height attributes set via the server.\n\t\t\t\t\twidth: ! newWidth && newHeight ? 'auto' : newWidth,\n\t\t\t\t\theight: newHeight,\n\t\t\t\t\tscale: newScale,\n\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tdefaultScale=\"cover\"\n\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\tscaleOptions={ scaleOptions }\n\t\t\tunitsOptions={ dimensionsUnitsOptions }\n\t\t/>\n\t);\n\n\tconst aspectRatioControl = (\n\t\t<DimensionsTool\n\t\t\tvalue={ { aspectRatio } }\n\t\t\tonChange={ ( { aspectRatio: newAspectRatio } ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t\tscale: 'cover',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\ttools={ [ 'aspectRatio' ] }\n\t\t/>\n\t);\n\n\tconst resetAll = () => {\n\t\tsetAttributes( {\n\t\t\talt: undefined,\n\t\t\twidth: undefined,\n\t\t\theight: undefined,\n\t\t\tscale: undefined,\n\t\t\taspectRatio: undefined,\n\t\t\tlightbox: undefined,\n\t\t} );\n\t};\n\n\tconst sizeControls = (\n\t\t<InspectorControls>\n\t\t\t<ToolsPanel\n\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\tresetAll={ resetAll }\n\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t>\n\t\t\t\t{ isResizable &&\n\t\t\t\t\t( parentLayoutType === 'grid'\n\t\t\t\t\t\t? aspectRatioControl\n\t\t\t\t\t\t: dimensionsControl ) }\n\t\t\t</ToolsPanel>\n\t\t</InspectorControls>\n\t);\n\n\tconst arePatternOverridesEnabled =\n\t\tmetadata?.bindings?.__default?.source === 'core/pattern-overrides';\n\n\tconst {\n\t\tlockUrlControls = false,\n\t\tlockHrefControls = false,\n\t\tlockAltControls = false,\n\t\tlockAltControlsMessage,\n\t\tlockTitleControls = false,\n\t\tlockTitleControlsMessage,\n\t\tlockCaption = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getBlockBindingsSource } = unlock( select( blocksStore ) );\n\t\t\tconst {\n\t\t\t\turl: urlBinding,\n\t\t\t\talt: altBinding,\n\t\t\t\ttitle: titleBinding,\n\t\t\t} = metadata?.bindings || {};\n\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\t\t\tconst urlBindingSource = getBlockBindingsSource(\n\t\t\t\turlBinding?.source\n\t\t\t);\n\t\t\tconst altBindingSource = getBlockBindingsSource(\n\t\t\t\taltBinding?.source\n\t\t\t);\n\t\t\tconst titleBindingSource = getBlockBindingsSource(\n\t\t\t\ttitleBinding?.source\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! urlBinding &&\n\t\t\t\t\t! urlBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: urlBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockHrefControls:\n\t\t\t\t\t// Disable editing the link of the URL if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the link on the frontend.\n\t\t\t\t\thasParentPattern || arePatternOverridesEnabled,\n\t\t\t\tlockCaption:\n\t\t\t\t\t// Disable editing the caption if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the caption on the frontend.\n\t\t\t\t\thasParentPattern,\n\t\t\t\tlockAltControls:\n\t\t\t\t\t!! altBinding &&\n\t\t\t\t\t! altBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: altBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockAltControlsMessage: altBindingSource?.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\taltBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t\tlockTitleControls:\n\t\t\t\t\t!! titleBinding &&\n\t\t\t\t\t! titleBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: titleBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockTitleControlsMessage: titleBindingSource?.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\ttitleBindingSource.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[\n\t\t\tarePatternOverridesEnabled,\n\t\t\tcontext,\n\t\t\tisSingleSelected,\n\t\t\tmetadata?.bindings,\n\t\t]\n\t);\n\n\tconst showUrlInput =\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockHrefControls &&\n\t\t! lockUrlControls;\n\n\tconst showCoverControls = isSingleSelected && canInsertCover;\n\n\tconst showBlockControls = showUrlInput || allowCrop || showCoverControls;\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ showBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ showUrlInput && (\n\t\t\t\t\t\t<ImageURLInputUI\n\t\t\t\t\t\t\turl={ href || '' }\n\t\t\t\t\t\t\tonChangeUrl={ onSetHref }\n\t\t\t\t\t\t\tlinkDestination={ linkDestination }\n\t\t\t\t\t\t\tmediaUrl={ ( image && image.source_url ) || url }\n\t\t\t\t\t\t\tmediaLink={ image && image.link }\n\t\t\t\t\t\t\tlinkTarget={ linkTarget }\n\t\t\t\t\t\t\tlinkClass={ linkClass }\n\t\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t\t\tshowLightboxSetting={ showLightboxSetting }\n\t\t\t\t\t\t\tlightboxEnabled={ lightboxChecked }\n\t\t\t\t\t\t\tonSetLightbox={ onSetLightbox }\n\t\t\t\t\t\t\tresetLightbox={ resetLightbox }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ allowCrop && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showCoverControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ticon={ overlayText }\n\t\t\t\t\t\t\tlabel={ __( 'Add text over image' ) }\n\t\t\t\t\t\t\tonClick={ switchToCover }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && ! isEditingImage && ! lockUrlControls && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\t\tmediaId={ id }\n\t\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && externalBlob && (\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ uploadExternal }\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tlabel={ __( 'Upload to Media Library' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isContentOnlyMode && (\n\t\t\t\t// Add some extra controls for content attributes when content only mode is active.\n\t\t\t\t// With content only mode active, the inspector is hidden, so users need another way\n\t\t\t\t// to edit these attributes.\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ { position: 'bottom right' } }\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ _x(\n\t\t\t\t\t\t\t\t\t'Alt',\n\t\t\t\t\t\t\t\t\t'Alternative text for an image. Block toolbar label, a low character count is preferred.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\tdisabled={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ { position: 'bottom right' } }\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Title' ) }\n\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\t\t\t\tdisabled={ lockTitleControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAll }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ isSingleSelected && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\treadOnly={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isResizable &&\n\t\t\t\t\t\t( parentLayoutType === 'grid'\n\t\t\t\t\t\t\t? aspectRatioControl\n\t\t\t\t\t\t\t: dimensionsControl ) }\n\t\t\t\t\t{ !! imageSizeOptions.length && (\n\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\treadOnly={ lockTitleControls }\n\t\t\t\t\thelp={\n\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst filename = getFilename( url );\n\tlet defaultedAlt;\n\n\tif ( alt ) {\n\t\tdefaultedAlt = alt;\n\t} else if ( filename ) {\n\t\tdefaultedAlt = sprintf(\n\t\t\t/* translators: %s: file name */\n\t\t\t__( 'This image has an empty alt attribute; its file name is %s' ),\n\t\t\tfilename\n\t\t);\n\t} else {\n\t\tdefaultedAlt = __( 'This image has an empty alt attribute' );\n\t}\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst isRounded = attributes.className?.includes( 'is-style-rounded' );\n\n\tlet img =\n\t\ttemporaryURL && hasImageErrored ? (\n\t\t\t// Show a placeholder during upload when the blob URL can't be loaded. This can\n\t\t\t// happen when the user uploads a HEIC image in a browser that doesn't support them.\n\t\t\t<Placeholder\n\t\t\t\tclassName=\"wp-block-image__placeholder\"\n\t\t\t\twithIllustration\n\t\t\t>\n\t\t\t\t<Spinner />\n\t\t\t</Placeholder>\n\t\t) : (\n\t\t\t// Disable reason: Image itself is not meant to be interactive, but\n\t\t\t// should direct focus to block.\n\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t<>\n\t\t\t\t<img\n\t\t\t\t\tsrc={ temporaryURL || url }\n\t\t\t\t\talt={ defaultedAlt }\n\t\t\t\t\tonError={ onImageError }\n\t\t\t\t\tonLoad={ onImageLoad }\n\t\t\t\t\tref={ imageRef }\n\t\t\t\t\tclassName={ borderProps.className }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t( width && height ) || aspectRatio\n\t\t\t\t\t\t\t\t? '100%'\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t( width && height ) || aspectRatio\n\t\t\t\t\t\t\t\t? '100%'\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ temporaryURL && <Spinner /> }\n\t\t\t</>\n\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t);\n\n\tif ( canEditImage && isEditingImage ) {\n\t\timg = (\n\t\t\t<ImageWrapper href={ href }>\n\t\t\t\t<ImageEditor\n\t\t\t\t\tid={ id }\n\t\t\t\t\turl={ url }\n\t\t\t\t\twidth={ numericWidth }\n\t\t\t\t\theight={ numericHeight }\n\t\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\t\tonSaveImage={ ( imageAttributes ) =>\n\t\t\t\t\t\tsetAttributes( imageAttributes )\n\t\t\t\t\t}\n\t\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t\t} }\n\t\t\t\t\tborderProps={ isRounded ? undefined : borderProps }\n\t\t\t\t/>\n\t\t\t</ImageWrapper>\n\t\t);\n\t} else if ( ! isResizable || parentLayoutType === 'grid' ) {\n\t\timg = (\n\t\t\t<div style={ { width, height, aspectRatio } }>\n\t\t\t\t<ImageWrapper href={ href }>{ img }</ImageWrapper>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tconst numericRatio = aspectRatio && evalAspectRatio( aspectRatio );\n\t\tconst customRatio = numericWidth / numericHeight;\n\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\tconst ratio = numericRatio || customRatio || naturalRatio || 1;\n\t\tconst currentWidth =\n\t\t\t! numericWidth && numericHeight\n\t\t\t\t? numericHeight * ratio\n\t\t\t\t: numericWidth;\n\t\tconst currentHeight =\n\t\t\t! numericHeight && numericWidth\n\t\t\t\t? numericWidth / ratio\n\t\t\t\t: numericHeight;\n\n\t\tconst minWidth =\n\t\t\tnaturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;\n\t\tconst minHeight =\n\t\t\tnaturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio;\n\n\t\t// With the current implementation of ResizableBox, an image needs an\n\t\t// explicit pixel value for the max-width. In absence of being able to\n\t\t// set the content-width, this max-width is currently dictated by the\n\t\t// vanilla editor style. The following variable adds a buffer to this\n\t\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t\t// in most cases, allow you to scale the image beyond the width of the\n\t\t// main column, though not infinitely.\n\t\t// @todo It would be good to revisit this once a content-width variable\n\t\t// becomes available.\n\t\tconst maxWidthBuffer = maxWidth * 2.5;\n\n\t\tlet showRightHandle = false;\n\t\tlet showLeftHandle = false;\n\n\t\t/* eslint-disable no-lonely-if */\n\t\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\t\tif ( align === 'center' ) {\n\t\t\t// When the image is centered, show both handles.\n\t\t\tshowRightHandle = true;\n\t\t\tshowLeftHandle = true;\n\t\t} else if ( isRTL() ) {\n\t\t\t// In RTL mode the image is on the right by default.\n\t\t\t// Show the right handle and hide the left handle only when it is\n\t\t\t// aligned left. Otherwise always show the left handle.\n\t\t\tif ( align === 'left' ) {\n\t\t\t\tshowRightHandle = true;\n\t\t\t} else {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// Show the left handle and hide the right handle only when the\n\t\t\t// image is aligned right. Otherwise always show the right handle.\n\t\t\tif ( align === 'right' ) {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t} else {\n\t\t\t\tshowRightHandle = true;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-lonely-if */\n\t\timg = (\n\t\t\t<ResizableBox\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\tobjectFit: scale,\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} }\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: currentWidth ?? 'auto',\n\t\t\t\t\theight: currentHeight ?? 'auto',\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSingleSelected }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxWidthBuffer }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxWidthBuffer / ratio }\n\t\t\t\tlockAspectRatio={ ratio }\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ onResizeStart }\n\t\t\t\tonResizeStop={ ( event, direction, elt ) => {\n\t\t\t\t\tonResizeStop();\n\t\t\t\t\t// Since the aspect ratio is locked when resizing, we can\n\t\t\t\t\t// use the width of the resized element to calculate the\n\t\t\t\t\t// height in CSS to prevent stretching when the max-width\n\t\t\t\t\t// is reached.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: `${ elt.offsetWidth }px`,\n\t\t\t\t\t\theight: 'auto',\n\t\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t\tratio === naturalRatio\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: String( ratio ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tresizeRatio={ align === 'center' ? 2 : 1 }\n\t\t\t>\n\t\t\t\t<ImageWrapper href={ href }>{ img }</ImageWrapper>\n\t\t\t</ResizableBox>\n\t\t);\n\t}\n\n\tif ( ! url && ! temporaryURL ) {\n\t\t// Add all controls if the image attributes are connected.\n\t\treturn metadata?.bindings ? controls : sizeControls;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ controls }\n\t\t\t{ img }\n\n\t\t\t<Caption\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tisSelected={ isSingleSelected }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tlabel={ __( 'Image caption text' ) }\n\t\t\t\tshowToolbarButton={\n\t\t\t\t\tisSingleSelected &&\n\t\t\t\t\thasNonContentControls &&\n\t\t\t\t\t! arePatternOverridesEnabled\n\t\t\t\t}\n\t\t\t\treadOnly={ lockCaption }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAYA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AAKA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,KAAA,GAAAd,OAAA;AACA,IAAAe,KAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AAKA,IAAAiB,MAAA,GAAAjB,OAAA;AACA,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,GAAGyB,QAAQ,GAAG7B,YAAY;EACpD;EAEA,oBACC,IAAA/K,WAAA,CAAA6M,IAAA,EAAA7M,WAAA,CAAA8M,QAAA;IAAAjM,QAAA,GACG+L,QAAQ,EACR5D,GAAG,eAEL,IAAAhJ,WAAA,CAAAc,GAAA,EAAClB,QAAA,CAAA6S,OAAO;MACPjR,UAAU,EAAGA,UAAY;MACzBC,aAAa,EAAGA,aAAe;MAC/BiR,UAAU,EAAGhR,gBAAkB;MAC/BC,iBAAiB,EAAGA,iBAAmB;MACvCpB,KAAK,EAAG,IAAAG,QAAE,EAAE,oBAAqB,CAAG;MACpCiS,iBAAiB,EAChBjR,gBAAgB,IAChBqE,qBAAqB,IACrB,CAAEmF,0BACF;MACDoE,QAAQ,EAAG1D;IAAa,CACxB,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
@@ -29,6 +29,10 @@ const metadata = exports.metadata = {
29
29
  keywords: ["img", "photo", "picture"],
30
30
  textdomain: "default",
31
31
  attributes: {
32
+ blob: {
33
+ type: "string",
34
+ __experimentalRole: "local"
35
+ },
32
36
  url: {
33
37
  type: "string",
34
38
  source: "attribute",
@@ -122,6 +126,9 @@ const metadata = exports.metadata = {
122
126
  filter: {
123
127
  duotone: true
124
128
  },
129
+ spacing: {
130
+ margin: true
131
+ },
125
132
  __experimentalBorder: {
126
133
  color: true,
127
134
  radius: true,
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","usesContext","description","keywords","textdomain","attributes","url","type","source","selector","attribute","__experimentalRole","alt","caption","lightbox","enabled","href","rel","linkClass","id","width","height","aspectRatio","scale","sizeSlug","linkDestination","linkTarget","supports","interactivity","align","anchor","color","text","background","filter","duotone","__experimentalBorder","radius","__experimentalSkipSerialization","__experimentalDefaultControls","shadow","selectors","border","styles","label","isDefault","editorStyle","style","settings","icon","example","__","__experimentalLabel","context","customName","getEditWrapperProps","transforms","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/image/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { image 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\tsizeSlug: 'large',\n\t\t\turl: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',\n\t\t\t// translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.\n\t\t\tcaption: __( 'Mont Blanc appears—still, snowy, and serene.' ),\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst customName = attributes?.metadata?.name;\n\n\t\tif ( context === 'list-view' && customName ) {\n\t\t\treturn customName;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\tconst { caption, alt, url } = attributes;\n\n\t\t\tif ( ! url ) {\n\t\t\t\treturn __( 'Empty' );\n\t\t\t}\n\n\t\t\tif ( ! alt ) {\n\t\t\t\treturn caption || '';\n\t\t\t}\n\n\t\t\t// This is intended to be read by a screen reader.\n\t\t\t// A period simply means a pause, no need to translate it.\n\t\t\treturn alt + ( caption ? '. ' + caption : '' );\n\t\t}\n\t},\n\tgetEditWrapperProps( attributes ) {\n\t\treturn {\n\t\t\t'data-align': attributes.align,\n\t\t};\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\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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N;MAAI,CAAC,GAAGD,UAAU;MAExC,IAAK,CAAEC,GAAG,EAAG;QACZ,OAAO,IAAA6C,QAAE,EAAE,OAAQ,CAAC;MACrB;MAEA,IAAK,CAAEvC,GAAG,EAAG;QACZ,OAAOC,OAAO,IAAI,EAAE;MACrB;;MAEA;MACA;MACA,OAAOD,GAAG,IAAKC,OAAO,GAAG,IAAI,GAAGA,OAAO,GAAG,EAAE,CAAE;IAC/C;EACD,CAAC;EACD0C,mBAAmBA,CAAElD,UAAU,EAAG;IACjC,OAAO;MACN,YAAY,EAAEA,UAAU,CAACwB;IAC1B,CAAC;EACF,CAAC;EACD2B,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE/D,IAAI;EAAEJ,QAAQ;EAAEsD;AAAS,CAAE,CAAC;AAACrD,OAAA,CAAAiE,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","metadata","exports","$schema","apiVersion","name","title","category","usesContext","description","keywords","textdomain","attributes","blob","type","__experimentalRole","url","source","selector","attribute","alt","caption","lightbox","enabled","href","rel","linkClass","id","width","height","aspectRatio","scale","sizeSlug","linkDestination","linkTarget","supports","interactivity","align","anchor","color","text","background","filter","duotone","spacing","margin","__experimentalBorder","radius","__experimentalSkipSerialization","__experimentalDefaultControls","shadow","selectors","border","styles","label","isDefault","editorStyle","style","settings","icon","example","__","__experimentalLabel","context","customName","getEditWrapperProps","transforms","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/image/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { image 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\tsizeSlug: 'large',\n\t\t\turl: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',\n\t\t\t// translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.\n\t\t\tcaption: __( 'Mont Blanc appears—still, snowy, and serene.' ),\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst customName = attributes?.metadata?.name;\n\n\t\tif ( context === 'list-view' && customName ) {\n\t\t\treturn customName;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\tconst { caption, alt, url } = attributes;\n\n\t\t\tif ( ! url ) {\n\t\t\t\treturn __( 'Empty' );\n\t\t\t}\n\n\t\t\tif ( ! alt ) {\n\t\t\t\treturn caption || '';\n\t\t\t}\n\n\t\t\t// This is intended to be read by a screen reader.\n\t\t\t// A period simply means a pause, no need to translate it.\n\t\t\treturn alt + ( caption ? '. ' + caption : '' );\n\t\t}\n\t},\n\tgetEditWrapperProps( attributes ) {\n\t\treturn {\n\t\t\t'data-align': attributes.align,\n\t\t};\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\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,Q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MACrB;MAEA,IAAK,CAAEzC,GAAG,EAAG;QACZ,OAAOC,OAAO,IAAI,EAAE;MACrB;;MAEA;MACA;MACA,OAAOD,GAAG,IAAKC,OAAO,GAAG,IAAI,GAAGA,OAAO,GAAG,EAAE,CAAE;IAC/C;EACD,CAAC;EACD4C,mBAAmBA,CAAErD,UAAU,EAAG;IACjC,OAAO;MACN,YAAY,EAAEA,UAAU,CAACyB;IAC1B,CAAC;EACF,CAAC;EACD6B,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAElE,IAAI;EAAEJ,QAAQ;EAAEyD;AAAS,CAAE,CAAC;AAACxD,OAAA,CAAAoE,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -118,7 +118,7 @@ const transforms = {
118
118
  transform(files) {
119
119
  const blocks = files.map(file => {
120
120
  return (0, _blocks.createBlock)('core/image', {
121
- url: (0, _blob.createBlobURL)(file)
121
+ blob: (0, _blob.createBlobURL)(file)
122
122
  });
123
123
  });
124
124
  return blocks;