@wordpress/block-library 9.6.1 → 9.7.1-next.1f6eadc42.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 (427) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +1 -1
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/audio/edit.js +2 -1
  5. package/build/audio/edit.js.map +1 -1
  6. package/build/block/edit.js +5 -8
  7. package/build/block/edit.js.map +1 -1
  8. package/build/button/edit.js +1 -1
  9. package/build/button/edit.js.map +1 -1
  10. package/build/buttons/index.js +1 -1
  11. package/build/categories/index.js +1 -0
  12. package/build/categories/index.js.map +1 -1
  13. package/build/comment-edit-link/index.js +13 -2
  14. package/build/comment-edit-link/index.js.map +1 -1
  15. package/build/comment-reply-link/index.js +13 -2
  16. package/build/comment-reply-link/index.js.map +1 -1
  17. package/build/comments/edit/comments-legacy.js +1 -0
  18. package/build/comments/edit/comments-legacy.js.map +1 -1
  19. package/build/cover/deprecated.js +1 -1
  20. package/build/cover/deprecated.js.map +1 -1
  21. package/build/cover/edit/block-controls.js +4 -2
  22. package/build/cover/edit/block-controls.js.map +1 -1
  23. package/build/cover/edit/index.js +6 -3
  24. package/build/cover/edit/index.js.map +1 -1
  25. package/build/cover/edit/inspector-controls.js +4 -12
  26. package/build/cover/edit/inspector-controls.js.map +1 -1
  27. package/build/details/index.js +3 -1
  28. package/build/details/index.js.map +1 -1
  29. package/build/details/transforms.js +24 -0
  30. package/build/details/transforms.js.map +1 -0
  31. package/build/embed/edit.js +5 -11
  32. package/build/embed/edit.js.map +1 -1
  33. package/build/embed/embed-placeholder.js +2 -0
  34. package/build/embed/embed-placeholder.js.map +1 -1
  35. package/build/embed/embed-preview.js +16 -4
  36. package/build/embed/embed-preview.js.map +1 -1
  37. package/build/file/edit.js +12 -1
  38. package/build/file/edit.js.map +1 -1
  39. package/build/file/transforms.js +18 -4
  40. package/build/file/transforms.js.map +1 -1
  41. package/build/form-input/deprecated.js +113 -1
  42. package/build/form-input/deprecated.js.map +1 -1
  43. package/build/form-input/edit.js +16 -12
  44. package/build/form-input/edit.js.map +1 -1
  45. package/build/form-input/save.js +9 -1
  46. package/build/form-input/save.js.map +1 -1
  47. package/build/freeform/edit.js +4 -4
  48. package/build/freeform/edit.js.map +1 -1
  49. package/build/freeform/modal.js +3 -0
  50. package/build/freeform/modal.js.map +1 -1
  51. package/build/home-link/edit.js +3 -9
  52. package/build/home-link/edit.js.map +1 -1
  53. package/build/image/edit.js +95 -45
  54. package/build/image/edit.js.map +1 -1
  55. package/build/image/image.js +39 -24
  56. package/build/image/image.js.map +1 -1
  57. package/build/image/transforms.js +0 -13
  58. package/build/image/transforms.js.map +1 -1
  59. package/build/image/use-max-width-observer.js +35 -0
  60. package/build/image/use-max-width-observer.js.map +1 -0
  61. package/build/image/utils.js +11 -0
  62. package/build/image/utils.js.map +1 -1
  63. package/build/latest-posts/edit.js +1 -1
  64. package/build/latest-posts/edit.js.map +1 -1
  65. package/build/media-text/deprecated.js +144 -3
  66. package/build/media-text/deprecated.js.map +1 -1
  67. package/build/media-text/edit.js +5 -5
  68. package/build/media-text/edit.js.map +1 -1
  69. package/build/media-text/image-fill.js +12 -0
  70. package/build/media-text/image-fill.js.map +1 -0
  71. package/build/media-text/media-container.js +21 -18
  72. package/build/media-text/media-container.js.map +1 -1
  73. package/build/media-text/media-container.native.js +0 -7
  74. package/build/media-text/media-container.native.js.map +1 -1
  75. package/build/media-text/save.js +5 -6
  76. package/build/media-text/save.js.map +1 -1
  77. package/build/missing/edit.js +3 -2
  78. package/build/missing/edit.js.map +1 -1
  79. package/build/navigation/edit/deleted-navigation-warning.js +14 -7
  80. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  81. package/build/navigation/edit/index.js +1 -0
  82. package/build/navigation/edit/index.js.map +1 -1
  83. package/build/navigation/edit/menu-inspector-controls.js +2 -1
  84. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  85. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  86. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  87. package/build/navigation/edit/placeholder/index.js +1 -0
  88. package/build/navigation/edit/placeholder/index.js.map +1 -1
  89. package/build/navigation/edit/responsive-wrapper.js +2 -0
  90. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  91. package/build/navigation/edit/unsaved-inner-blocks.js +4 -4
  92. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  93. package/build/navigation-link/link-ui.js +2 -1
  94. package/build/navigation-link/link-ui.js.map +1 -1
  95. package/build/page-list/convert-to-links-modal.js +2 -0
  96. package/build/page-list/convert-to-links-modal.js.map +1 -1
  97. package/build/page-list/edit.js +4 -1
  98. package/build/page-list/edit.js.map +1 -1
  99. package/build/post-comments-form/form.js +1 -0
  100. package/build/post-comments-form/form.js.map +1 -1
  101. package/build/post-featured-image/dimension-controls.js +6 -8
  102. package/build/post-featured-image/dimension-controls.js.map +1 -1
  103. package/build/post-featured-image/edit.js +2 -4
  104. package/build/post-featured-image/edit.js.map +1 -1
  105. package/build/post-title/index.js +4 -1
  106. package/build/post-title/index.js.map +1 -1
  107. package/build/query/edit/enhanced-pagination-modal.js +3 -2
  108. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  109. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  110. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  111. package/build/query/edit/inspector-controls/index.js +2 -10
  112. package/build/query/edit/inspector-controls/index.js.map +1 -1
  113. package/build/query/edit/query-content.js +9 -3
  114. package/build/query/edit/query-content.js.map +1 -1
  115. package/build/query/edit/query-placeholder.js +2 -0
  116. package/build/query/edit/query-placeholder.js.map +1 -1
  117. package/build/site-logo/edit.js +9 -13
  118. package/build/site-logo/edit.js.map +1 -1
  119. package/build/site-title/index.js +4 -1
  120. package/build/site-title/index.js.map +1 -1
  121. package/build/social-link/edit.js +4 -1
  122. package/build/social-link/edit.js.map +1 -1
  123. package/build/social-links/edit.js +10 -9
  124. package/build/social-links/edit.js.map +1 -1
  125. package/build/template-part/edit/advanced-controls.js.map +1 -1
  126. package/build/template-part/edit/index.js +1 -1
  127. package/build/template-part/edit/index.js.map +1 -1
  128. package/build/template-part/edit/inner-blocks.js +10 -1
  129. package/build/template-part/edit/inner-blocks.js.map +1 -1
  130. package/build/template-part/edit/placeholder.js +2 -0
  131. package/build/template-part/edit/placeholder.js.map +1 -1
  132. package/build/utils/hooks.js +10 -10
  133. package/build/utils/hooks.js.map +1 -1
  134. package/build/video/edit.js +16 -12
  135. package/build/video/edit.js.map +1 -1
  136. package/build/video/tracks-editor.js +3 -0
  137. package/build/video/tracks-editor.js.map +1 -1
  138. package/build-module/archives/edit.js +1 -1
  139. package/build-module/archives/edit.js.map +1 -1
  140. package/build-module/audio/edit.js +2 -1
  141. package/build-module/audio/edit.js.map +1 -1
  142. package/build-module/block/edit.js +6 -9
  143. package/build-module/block/edit.js.map +1 -1
  144. package/build-module/button/edit.js +1 -1
  145. package/build-module/button/edit.js.map +1 -1
  146. package/build-module/buttons/index.js +1 -1
  147. package/build-module/categories/index.js +1 -0
  148. package/build-module/categories/index.js.map +1 -1
  149. package/build-module/comment-edit-link/index.js +13 -2
  150. package/build-module/comment-edit-link/index.js.map +1 -1
  151. package/build-module/comment-reply-link/index.js +13 -2
  152. package/build-module/comment-reply-link/index.js.map +1 -1
  153. package/build-module/comments/edit/comments-legacy.js +1 -0
  154. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  155. package/build-module/cover/deprecated.js +1 -1
  156. package/build-module/cover/deprecated.js.map +1 -1
  157. package/build-module/cover/edit/block-controls.js +4 -2
  158. package/build-module/cover/edit/block-controls.js.map +1 -1
  159. package/build-module/cover/edit/index.js +6 -3
  160. package/build-module/cover/edit/index.js.map +1 -1
  161. package/build-module/cover/edit/inspector-controls.js +5 -13
  162. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  163. package/build-module/details/index.js +3 -1
  164. package/build-module/details/index.js.map +1 -1
  165. package/build-module/details/transforms.js +18 -0
  166. package/build-module/details/transforms.js.map +1 -0
  167. package/build-module/embed/edit.js +6 -12
  168. package/build-module/embed/edit.js.map +1 -1
  169. package/build-module/embed/embed-placeholder.js +2 -0
  170. package/build-module/embed/embed-placeholder.js.map +1 -1
  171. package/build-module/embed/embed-preview.js +16 -4
  172. package/build-module/embed/embed-preview.js.map +1 -1
  173. package/build-module/file/edit.js +12 -1
  174. package/build-module/file/edit.js.map +1 -1
  175. package/build-module/file/transforms.js +18 -4
  176. package/build-module/file/transforms.js.map +1 -1
  177. package/build-module/form-input/deprecated.js +114 -2
  178. package/build-module/form-input/deprecated.js.map +1 -1
  179. package/build-module/form-input/edit.js +16 -12
  180. package/build-module/form-input/edit.js.map +1 -1
  181. package/build-module/form-input/save.js +9 -1
  182. package/build-module/form-input/save.js.map +1 -1
  183. package/build-module/freeform/edit.js +4 -4
  184. package/build-module/freeform/edit.js.map +1 -1
  185. package/build-module/freeform/modal.js +3 -0
  186. package/build-module/freeform/modal.js.map +1 -1
  187. package/build-module/home-link/edit.js +3 -9
  188. package/build-module/home-link/edit.js.map +1 -1
  189. package/build-module/image/edit.js +99 -48
  190. package/build-module/image/edit.js.map +1 -1
  191. package/build-module/image/image.js +40 -25
  192. package/build-module/image/image.js.map +1 -1
  193. package/build-module/image/transforms.js +0 -13
  194. package/build-module/image/transforms.js.map +1 -1
  195. package/build-module/image/use-max-width-observer.js +29 -0
  196. package/build-module/image/use-max-width-observer.js.map +1 -0
  197. package/build-module/image/utils.js +11 -1
  198. package/build-module/image/utils.js.map +1 -1
  199. package/build-module/latest-posts/edit.js +1 -1
  200. package/build-module/latest-posts/edit.js.map +1 -1
  201. package/build-module/media-text/deprecated.js +144 -3
  202. package/build-module/media-text/deprecated.js.map +1 -1
  203. package/build-module/media-text/edit.js +5 -5
  204. package/build-module/media-text/edit.js.map +1 -1
  205. package/build-module/media-text/image-fill.js +6 -0
  206. package/build-module/media-text/image-fill.js.map +1 -0
  207. package/build-module/media-text/media-container.js +21 -17
  208. package/build-module/media-text/media-container.js.map +1 -1
  209. package/build-module/media-text/media-container.native.js +0 -1
  210. package/build-module/media-text/media-container.native.js.map +1 -1
  211. package/build-module/media-text/save.js +5 -6
  212. package/build-module/media-text/save.js.map +1 -1
  213. package/build-module/missing/edit.js +3 -2
  214. package/build-module/missing/edit.js.map +1 -1
  215. package/build-module/navigation/edit/deleted-navigation-warning.js +15 -8
  216. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  217. package/build-module/navigation/edit/index.js +1 -0
  218. package/build-module/navigation/edit/index.js.map +1 -1
  219. package/build-module/navigation/edit/menu-inspector-controls.js +2 -1
  220. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  221. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  222. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  223. package/build-module/navigation/edit/placeholder/index.js +1 -0
  224. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  225. package/build-module/navigation/edit/responsive-wrapper.js +2 -0
  226. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  227. package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -4
  228. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  229. package/build-module/navigation-link/link-ui.js +4 -3
  230. package/build-module/navigation-link/link-ui.js.map +1 -1
  231. package/build-module/page-list/convert-to-links-modal.js +2 -0
  232. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  233. package/build-module/page-list/edit.js +4 -1
  234. package/build-module/page-list/edit.js.map +1 -1
  235. package/build-module/post-comments-form/form.js +1 -0
  236. package/build-module/post-comments-form/form.js.map +1 -1
  237. package/build-module/post-featured-image/dimension-controls.js +6 -8
  238. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  239. package/build-module/post-featured-image/edit.js +3 -5
  240. package/build-module/post-featured-image/edit.js.map +1 -1
  241. package/build-module/post-title/index.js +4 -1
  242. package/build-module/post-title/index.js.map +1 -1
  243. package/build-module/query/edit/enhanced-pagination-modal.js +3 -2
  244. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  245. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  246. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  247. package/build-module/query/edit/inspector-controls/index.js +2 -10
  248. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  249. package/build-module/query/edit/query-content.js +10 -4
  250. package/build-module/query/edit/query-content.js.map +1 -1
  251. package/build-module/query/edit/query-placeholder.js +2 -0
  252. package/build-module/query/edit/query-placeholder.js.map +1 -1
  253. package/build-module/site-logo/edit.js +10 -14
  254. package/build-module/site-logo/edit.js.map +1 -1
  255. package/build-module/site-title/index.js +4 -1
  256. package/build-module/site-title/index.js.map +1 -1
  257. package/build-module/social-link/edit.js +4 -1
  258. package/build-module/social-link/edit.js.map +1 -1
  259. package/build-module/social-links/edit.js +11 -10
  260. package/build-module/social-links/edit.js.map +1 -1
  261. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  262. package/build-module/template-part/edit/index.js +1 -1
  263. package/build-module/template-part/edit/index.js.map +1 -1
  264. package/build-module/template-part/edit/inner-blocks.js +10 -1
  265. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  266. package/build-module/template-part/edit/placeholder.js +2 -0
  267. package/build-module/template-part/edit/placeholder.js.map +1 -1
  268. package/build-module/utils/hooks.js +10 -10
  269. package/build-module/utils/hooks.js.map +1 -1
  270. package/build-module/video/edit.js +16 -13
  271. package/build-module/video/edit.js.map +1 -1
  272. package/build-module/video/tracks-editor.js +3 -0
  273. package/build-module/video/tracks-editor.js.map +1 -1
  274. package/build-style/button/editor-rtl.css +0 -4
  275. package/build-style/button/editor.css +0 -4
  276. package/build-style/buttons/editor-rtl.css +2 -5
  277. package/build-style/buttons/editor.css +2 -5
  278. package/build-style/buttons/style-rtl.css +2 -2
  279. package/build-style/buttons/style.css +2 -2
  280. package/build-style/comment-edit-link/style-rtl.css +94 -0
  281. package/build-style/comment-edit-link/style.css +94 -0
  282. package/build-style/comment-reply-link/style-rtl.css +94 -0
  283. package/build-style/comment-reply-link/style.css +94 -0
  284. package/build-style/comments-pagination/editor-rtl.css +2 -2
  285. package/build-style/comments-pagination/editor.css +2 -2
  286. package/build-style/common-rtl.css +2 -2
  287. package/build-style/common.css +2 -2
  288. package/build-style/cover/editor-rtl.css +0 -6
  289. package/build-style/cover/editor.css +0 -6
  290. package/build-style/editor-rtl.css +35 -99
  291. package/build-style/editor.css +35 -101
  292. package/build-style/form-input/style-rtl.css +7 -8
  293. package/build-style/form-input/style.css +7 -8
  294. package/build-style/group/editor-rtl.css +0 -1
  295. package/build-style/group/editor.css +0 -1
  296. package/build-style/image/editor-rtl.css +6 -27
  297. package/build-style/image/editor.css +6 -27
  298. package/build-style/media-text/editor-rtl.css +3 -1
  299. package/build-style/media-text/editor.css +3 -1
  300. package/build-style/media-text/style-rtl.css +20 -0
  301. package/build-style/media-text/style.css +20 -0
  302. package/build-style/navigation/editor-rtl.css +1 -2
  303. package/build-style/navigation/editor.css +1 -2
  304. package/build-style/post-featured-image/style-rtl.css +1 -1
  305. package/build-style/post-featured-image/style.css +1 -1
  306. package/build-style/post-title/style-rtl.css +21 -0
  307. package/build-style/post-title/style.css +21 -0
  308. package/build-style/query-pagination/editor-rtl.css +2 -16
  309. package/build-style/query-pagination/editor.css +2 -18
  310. package/build-style/query-pagination/style-rtl.css +0 -11
  311. package/build-style/query-pagination/style.css +0 -13
  312. package/build-style/site-title/editor-rtl.css +0 -4
  313. package/build-style/site-title/editor.css +0 -4
  314. package/build-style/site-title/style-rtl.css +21 -0
  315. package/build-style/site-title/style.css +21 -0
  316. package/build-style/social-links/editor-rtl.css +17 -0
  317. package/build-style/social-links/editor.css +17 -0
  318. package/build-style/style-rtl.css +82 -24
  319. package/build-style/style.css +82 -26
  320. package/build-style/video/editor-rtl.css +0 -29
  321. package/build-style/video/editor.css +0 -29
  322. package/package.json +42 -35
  323. package/src/archives/edit.js +1 -1
  324. package/src/audio/edit.js +1 -0
  325. package/src/block/edit.js +9 -11
  326. package/src/button/edit.js +1 -1
  327. package/src/button/editor.scss +0 -5
  328. package/src/buttons/block.json +1 -1
  329. package/src/buttons/editor.scss +2 -8
  330. package/src/buttons/style.scss +2 -2
  331. package/src/categories/block.json +1 -0
  332. package/src/categories/index.php +13 -2
  333. package/src/comment-edit-link/block.json +13 -2
  334. package/src/comment-edit-link/style.scss +4 -0
  335. package/src/comment-reply-link/block.json +13 -2
  336. package/src/comment-reply-link/style.scss +4 -0
  337. package/src/comments/edit/comments-legacy.js +1 -0
  338. package/src/comments-pagination/editor.scss +1 -1
  339. package/src/cover/deprecated.js +3 -2
  340. package/src/cover/edit/block-controls.js +2 -0
  341. package/src/cover/edit/index.js +6 -1
  342. package/src/cover/edit/inspector-controls.js +3 -15
  343. package/src/cover/editor.scss +0 -5
  344. package/src/cover/test/edit.js +30 -26
  345. package/src/details/index.js +2 -0
  346. package/src/details/transforms.js +26 -0
  347. package/src/embed/edit.js +0 -7
  348. package/src/embed/embed-placeholder.js +10 -2
  349. package/src/embed/embed-preview.js +22 -2
  350. package/src/file/edit.js +11 -0
  351. package/src/file/index.php +1 -1
  352. package/src/file/transforms.js +26 -6
  353. package/src/form-input/deprecated.js +114 -1
  354. package/src/form-input/edit.js +17 -11
  355. package/src/form-input/save.js +13 -3
  356. package/src/form-input/style.scss +9 -8
  357. package/src/freeform/edit.js +4 -4
  358. package/src/freeform/editor.scss +1 -1
  359. package/src/freeform/modal.js +7 -1
  360. package/src/gallery/editor.scss +1 -1
  361. package/src/group/editor.scss +0 -1
  362. package/src/home-link/edit.js +4 -7
  363. package/src/image/edit.js +130 -47
  364. package/src/image/editor.scss +7 -41
  365. package/src/image/image.js +100 -67
  366. package/src/image/index.php +1 -1
  367. package/src/image/transforms.js +0 -23
  368. package/src/image/use-max-width-observer.js +32 -0
  369. package/src/image/utils.js +13 -1
  370. package/src/latest-posts/edit.js +1 -1
  371. package/src/media-text/deprecated.js +159 -3
  372. package/src/media-text/edit.js +5 -5
  373. package/src/media-text/editor.scss +3 -1
  374. package/src/media-text/image-fill.js +11 -0
  375. package/src/media-text/index.php +53 -43
  376. package/src/media-text/media-container.js +25 -25
  377. package/src/media-text/media-container.native.js +0 -2
  378. package/src/media-text/save.js +9 -13
  379. package/src/media-text/style.scss +21 -0
  380. package/src/media-text/test/image-fill.js +19 -0
  381. package/src/missing/edit.js +8 -3
  382. package/src/navigation/edit/deleted-navigation-warning.js +23 -13
  383. package/src/navigation/edit/index.js +1 -0
  384. package/src/navigation/edit/menu-inspector-controls.js +3 -1
  385. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  386. package/src/navigation/edit/placeholder/index.js +1 -0
  387. package/src/navigation/edit/responsive-wrapper.js +2 -0
  388. package/src/navigation/edit/unsaved-inner-blocks.js +4 -4
  389. package/src/navigation/editor.scss +11 -4
  390. package/src/navigation/index.php +1 -1
  391. package/src/navigation-link/link-ui.js +4 -3
  392. package/src/page-list/convert-to-links-modal.js +6 -1
  393. package/src/page-list/edit.js +6 -1
  394. package/src/page-list/index.php +3 -1
  395. package/src/post-comments-form/form.js +1 -0
  396. package/src/post-featured-image/dimension-controls.js +4 -4
  397. package/src/post-featured-image/edit.js +3 -6
  398. package/src/post-featured-image/style.scss +1 -1
  399. package/src/post-title/block.json +4 -1
  400. package/src/post-title/style.scss +24 -0
  401. package/src/query/edit/enhanced-pagination-modal.js +7 -3
  402. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  403. package/src/query/edit/inspector-controls/index.js +2 -9
  404. package/src/query/edit/query-content.js +7 -0
  405. package/src/query/edit/query-placeholder.js +2 -0
  406. package/src/query/index.php +1 -1
  407. package/src/query-pagination/editor.scss +1 -21
  408. package/src/query-pagination/style.scss +0 -15
  409. package/src/search/index.php +1 -1
  410. package/src/site-logo/edit.js +11 -20
  411. package/src/site-title/block.json +4 -1
  412. package/src/site-title/editor.scss +0 -4
  413. package/src/site-title/style.scss +24 -0
  414. package/src/social-link/edit.js +2 -0
  415. package/src/social-links/edit.js +17 -10
  416. package/src/social-links/editor.scss +24 -5
  417. package/src/style.scss +2 -0
  418. package/src/tag-cloud/index.php +7 -2
  419. package/src/template-part/edit/advanced-controls.js +0 -1
  420. package/src/template-part/edit/index.js +12 -10
  421. package/src/template-part/edit/inner-blocks.js +20 -1
  422. package/src/template-part/edit/placeholder.js +6 -1
  423. package/src/utils/hooks.js +11 -11
  424. package/src/video/edit.js +24 -21
  425. package/src/video/editor.scss +0 -45
  426. package/src/video/tracks-editor.js +3 -0
  427. package/src/media-text/test/media-container.js +0 -24
@@ -9,6 +9,7 @@ import removeAccents from 'remove-accents';
9
9
  */
10
10
  import {
11
11
  RichText,
12
+ useBlockProps,
12
13
  __experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
13
14
  __experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
14
15
  } from '@wordpress/block-editor';
@@ -26,6 +27,118 @@ const getNameFromLabelV1 = ( content ) => {
26
27
  );
27
28
  };
28
29
 
30
+ const v2 = {
31
+ attributes: {
32
+ type: {
33
+ type: 'string',
34
+ default: 'text',
35
+ },
36
+ name: {
37
+ type: 'string',
38
+ },
39
+ label: {
40
+ type: 'string',
41
+ default: 'Label',
42
+ selector: '.wp-block-form-input__label-content',
43
+ source: 'html',
44
+ __experimentalRole: 'content',
45
+ },
46
+ inlineLabel: {
47
+ type: 'boolean',
48
+ default: false,
49
+ },
50
+ required: {
51
+ type: 'boolean',
52
+ default: false,
53
+ selector: '.wp-block-form-input__input',
54
+ source: 'attribute',
55
+ attribute: 'required',
56
+ },
57
+ placeholder: {
58
+ type: 'string',
59
+ selector: '.wp-block-form-input__input',
60
+ source: 'attribute',
61
+ attribute: 'placeholder',
62
+ __experimentalRole: 'content',
63
+ },
64
+ value: {
65
+ type: 'string',
66
+ default: '',
67
+ selector: 'input',
68
+ source: 'attribute',
69
+ attribute: 'value',
70
+ },
71
+ visibilityPermissions: {
72
+ type: 'string',
73
+ default: 'all',
74
+ },
75
+ },
76
+ supports: {
77
+ anchor: true,
78
+ reusable: false,
79
+ spacing: {
80
+ margin: [ 'top', 'bottom' ],
81
+ },
82
+ __experimentalBorder: {
83
+ radius: true,
84
+ __experimentalSkipSerialization: true,
85
+ __experimentalDefaultControls: {
86
+ radius: true,
87
+ },
88
+ },
89
+ },
90
+ save( { attributes } ) {
91
+ const { type, name, label, inlineLabel, required, placeholder, value } =
92
+ attributes;
93
+
94
+ const borderProps = getBorderClassesAndStyles( attributes );
95
+ const colorProps = getColorClassesAndStyles( attributes );
96
+
97
+ const inputStyle = {
98
+ ...borderProps.style,
99
+ ...colorProps.style,
100
+ };
101
+
102
+ const inputClasses = clsx(
103
+ 'wp-block-form-input__input',
104
+ colorProps.className,
105
+ borderProps.className
106
+ );
107
+ const TagName = type === 'textarea' ? 'textarea' : 'input';
108
+
109
+ const blockProps = useBlockProps.save();
110
+
111
+ if ( 'hidden' === type ) {
112
+ return <input type={ type } name={ name } value={ value } />;
113
+ }
114
+
115
+ return (
116
+ <div { ...blockProps }>
117
+ { /* eslint-disable jsx-a11y/label-has-associated-control */ }
118
+ <label
119
+ className={ clsx( 'wp-block-form-input__label', {
120
+ 'is-label-inline': inlineLabel,
121
+ } ) }
122
+ >
123
+ <span className="wp-block-form-input__label-content">
124
+ <RichText.Content value={ label } />
125
+ </span>
126
+ <TagName
127
+ className={ inputClasses }
128
+ type={ 'textarea' === type ? undefined : type }
129
+ name={ name || getNameFromLabelV1( label ) }
130
+ required={ required }
131
+ aria-required={ required }
132
+ placeholder={ placeholder || undefined }
133
+ style={ inputStyle }
134
+ />
135
+ </label>
136
+ { /* eslint-enable jsx-a11y/label-has-associated-control */ }
137
+ </div>
138
+ );
139
+ },
140
+ };
141
+
29
142
  // Version without wrapper div in saved markup
30
143
  // See: https://github.com/WordPress/gutenberg/pull/56507
31
144
  const v1 = {
@@ -137,6 +250,6 @@ const v1 = {
137
250
  },
138
251
  };
139
252
 
140
- const deprecated = [ v1 ];
253
+ const deprecated = [ v2, v1 ];
141
254
 
142
255
  export default deprecated;
@@ -31,6 +31,9 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
31
31
  ref.current.focus();
32
32
  }
33
33
 
34
+ // Note: radio inputs aren't implemented yet.
35
+ const isCheckboxOrRadio = type === 'checkbox' || type === 'radio';
36
+
34
37
  const controls = (
35
38
  <>
36
39
  { 'hidden' !== type && (
@@ -81,6 +84,18 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
81
84
  </>
82
85
  );
83
86
 
87
+ const content = (
88
+ <RichText
89
+ tagName="span"
90
+ className="wp-block-form-input__label-content"
91
+ value={ label }
92
+ onChange={ ( newLabel ) => setAttributes( { label: newLabel } ) }
93
+ aria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }
94
+ data-empty={ ! label }
95
+ placeholder={ __( 'Type the label for this input' ) }
96
+ />
97
+ );
98
+
84
99
  if ( 'hidden' === type ) {
85
100
  return (
86
101
  <>
@@ -111,17 +126,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
111
126
  'is-label-inline': inlineLabel || 'checkbox' === type,
112
127
  } ) }
113
128
  >
114
- <RichText
115
- tagName="span"
116
- className="wp-block-form-input__label-content"
117
- value={ label }
118
- onChange={ ( newLabel ) =>
119
- setAttributes( { label: newLabel } )
120
- }
121
- aria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }
122
- data-empty={ label ? false : true }
123
- placeholder={ __( 'Type the label for this input' ) }
124
- />
129
+ { ! isCheckboxOrRadio && content }
125
130
  <TagName
126
131
  type={ 'textarea' === type ? undefined : type }
127
132
  className={ clsx(
@@ -147,6 +152,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
147
152
  ...colorProps.style,
148
153
  } }
149
154
  />
155
+ { isCheckboxOrRadio && content }
150
156
  </span>
151
157
  </div>
152
158
  );
@@ -55,6 +55,9 @@ export default function save( { attributes } ) {
55
55
 
56
56
  const blockProps = useBlockProps.save();
57
57
 
58
+ // Note: radio inputs aren't implemented yet.
59
+ const isCheckboxOrRadio = type === 'checkbox' || type === 'radio';
60
+
58
61
  if ( 'hidden' === type ) {
59
62
  return <input type={ type } name={ name } value={ value } />;
60
63
  }
@@ -67,9 +70,11 @@ export default function save( { attributes } ) {
67
70
  'is-label-inline': inlineLabel,
68
71
  } ) }
69
72
  >
70
- <span className="wp-block-form-input__label-content">
71
- <RichText.Content value={ label } />
72
- </span>
73
+ { ! isCheckboxOrRadio && (
74
+ <span className="wp-block-form-input__label-content">
75
+ <RichText.Content value={ label } />
76
+ </span>
77
+ ) }
73
78
  <TagName
74
79
  className={ inputClasses }
75
80
  type={ 'textarea' === type ? undefined : type }
@@ -79,6 +84,11 @@ export default function save( { attributes } ) {
79
84
  placeholder={ placeholder || undefined }
80
85
  style={ inputStyle }
81
86
  />
87
+ { isCheckboxOrRadio && (
88
+ <span className="wp-block-form-input__label-content">
89
+ <RichText.Content value={ label } />
90
+ </span>
91
+ ) }
82
92
  </label>
83
93
  { /* eslint-enable jsx-a11y/label-has-associated-control */ }
84
94
  </div>
@@ -15,16 +15,17 @@
15
15
  }
16
16
  }
17
17
 
18
- /*
19
- Small tweak to left-align the checkbox.
20
- Even though `:has` is not currently supported in Firefox, this is a small tweak
21
- and does not affect the functionality of the block or the user's experience.
22
- There will be a minor inconsistency between browsers. However, it's more important to provide
23
- a better experience for 80+% of users, until Firefox catches up and supports `:has`.
24
- */
25
18
  &:has(input[type="checkbox"]) {
19
+ flex-direction: row;
26
20
  width: fit-content;
27
- /* stylelint-disable-next-line declaration-property-value-allowed-list -- This should be refactored to not use the row-reverse value. */
21
+
22
+ .wp-block-form-input__label-content {
23
+ margin: 0;
24
+ }
25
+ }
26
+
27
+ &:has(.wp-block-form-input__label-content + input[type="checkbox"]) {
28
+ /* stylelint-disable-next-line declaration-property-value-allowed-list -- This style is required for old markup. */
28
29
  flex-direction: row-reverse;
29
30
  }
30
31
  }
@@ -75,10 +75,10 @@ function ClassicEdit( {
75
75
  onReplace,
76
76
  } ) {
77
77
  const { getMultiSelectedBlockClientIds } = useSelect( blockEditorStore );
78
- const didMount = useRef( false );
78
+ const didMountRef = useRef( false );
79
79
 
80
80
  useEffect( () => {
81
- if ( ! didMount.current ) {
81
+ if ( ! didMountRef.current ) {
82
82
  return;
83
83
  }
84
84
 
@@ -96,7 +96,7 @@ function ClassicEdit( {
96
96
  useEffect( () => {
97
97
  const { baseURL, suffix } = window.wpEditorL10n.tinymce;
98
98
 
99
- didMount.current = true;
99
+ didMountRef.current = true;
100
100
 
101
101
  window.tinymce.EditorManager.overrideDefaults( {
102
102
  base_url: baseURL,
@@ -230,7 +230,7 @@ function ClassicEdit( {
230
230
  onReadyStateChange
231
231
  );
232
232
  wp.oldEditor.remove( `editor-${ clientId }` );
233
- didMount.current = false;
233
+ didMountRef.current = false;
234
234
  };
235
235
  }, [] );
236
236
 
@@ -299,7 +299,7 @@ div[data-type="core/freeform"] {
299
299
  top: 0;
300
300
  border: $border-width solid $gray-300;
301
301
  border-bottom: none;
302
- border-radius: $radius-block-ui;
302
+ border-radius: $radius-small;
303
303
  margin-bottom: $grid-unit-10;
304
304
 
305
305
  // On mobile, toolbars go edge to edge.
@@ -25,6 +25,7 @@ function ModalAuxiliaryActions( { onClick, isModalFullScreen } ) {
25
25
 
26
26
  return (
27
27
  <Button
28
+ size="small"
28
29
  onClick={ onClick }
29
30
  icon={ fullscreen }
30
31
  isPressed={ isModalFullScreen }
@@ -120,12 +121,17 @@ export default function ModalEdit( props ) {
120
121
  expanded={ false }
121
122
  >
122
123
  <FlexItem>
123
- <Button variant="tertiary" onClick={ onClose }>
124
+ <Button
125
+ __next40pxDefaultSize
126
+ variant="tertiary"
127
+ onClick={ onClose }
128
+ >
124
129
  { __( 'Cancel' ) }
125
130
  </Button>
126
131
  </FlexItem>
127
132
  <FlexItem>
128
133
  <Button
134
+ __next40pxDefaultSize
129
135
  variant="primary"
130
136
  onClick={ () => {
131
137
  setAttributes( {
@@ -139,7 +139,7 @@
139
139
  z-index: z-index(".block-library-gallery-item__inline-menu");
140
140
  transition: box-shadow 0.2s ease-out;
141
141
  @include reduce-motion("transition");
142
- border-radius: $radius-block-ui;
142
+ border-radius: $radius-small;
143
143
  background: $white;
144
144
  border: $border-width solid $gray-900;
145
145
 
@@ -43,7 +43,6 @@
43
43
  pointer-events: none;
44
44
  min-height: $grid-unit-60 - $border-width - $border-width;
45
45
  border: $border-width dashed currentColor;
46
- border-radius: $radius-block-ui;
47
46
  }
48
47
 
49
48
  // Let the parent be selectable in the placeholder area.
@@ -19,13 +19,10 @@ import { useEffect } from '@wordpress/element';
19
19
  const preventDefault = ( event ) => event.preventDefault();
20
20
 
21
21
  export default function HomeEdit( { attributes, setAttributes, context } ) {
22
- const { homeUrl } = useSelect( ( select ) => {
23
- const {
24
- getUnstableBase, // Site index.
25
- } = select( coreStore );
26
- return {
27
- homeUrl: getUnstableBase()?.home,
28
- };
22
+ const homeUrl = useSelect( ( select ) => {
23
+ // Site index.
24
+ return select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
25
+ ?.home;
29
26
  }, [] );
30
27
  const { __unstableMarkNextChangeAsNotPersistent } =
31
28
  useDispatch( blockEditorStore );
package/src/image/edit.js CHANGED
@@ -6,14 +6,14 @@ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { isBlobURL } from '@wordpress/blob';
10
- import { store as blocksStore } from '@wordpress/blocks';
9
+ import { isBlobURL, createBlobURL } from '@wordpress/blob';
10
+ import { store as blocksStore, createBlock } from '@wordpress/blocks';
11
11
  import { Placeholder } from '@wordpress/components';
12
12
  import { useDispatch, useSelect } from '@wordpress/data';
13
13
  import {
14
14
  BlockIcon,
15
- MediaPlaceholder,
16
15
  useBlockProps,
16
+ MediaPlaceholder,
17
17
  store as blockEditorStore,
18
18
  __experimentalUseBorderProps as useBorderProps,
19
19
  __experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,
@@ -23,6 +23,7 @@ import { useEffect, useRef, useState } from '@wordpress/element';
23
23
  import { __, sprintf } from '@wordpress/i18n';
24
24
  import { image as icon, plugins as pluginsIcon } from '@wordpress/icons';
25
25
  import { store as noticesStore } from '@wordpress/notices';
26
+ import { useResizeObserver } from '@wordpress/compose';
26
27
 
27
28
  /**
28
29
  * Internal dependencies
@@ -30,6 +31,8 @@ import { store as noticesStore } from '@wordpress/notices';
30
31
  import { unlock } from '../lock-unlock';
31
32
  import { useUploadMediaFromBlobURL } from '../utils/hooks';
32
33
  import Image from './image';
34
+ import { isValidFileType } from './utils';
35
+ import { useMaxWidthObserver } from './use-max-width-observer';
33
36
 
34
37
  /**
35
38
  * Module constants
@@ -107,8 +110,23 @@ export function ImageEdit( {
107
110
  align,
108
111
  metadata,
109
112
  } = attributes;
113
+
110
114
  const [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );
111
115
 
116
+ const containerRef = useRef();
117
+ // Only observe the max width from the parent container when the parent layout is not flex nor grid.
118
+ // This won't work for them because the container width changes with the image.
119
+ // TODO: Find a way to observe the container width for flex and grid layouts.
120
+ const isMaxWidthContainerWidth =
121
+ ! parentLayout ||
122
+ ( parentLayout.type !== 'flex' && parentLayout.type !== 'grid' );
123
+ const [ maxWidthObserver, maxContentWidth ] = useMaxWidthObserver();
124
+
125
+ const [ placeholderResizeListener, { width: placeholderWidth } ] =
126
+ useResizeObserver();
127
+
128
+ const isSmallContainer = placeholderWidth && placeholderWidth < 160;
129
+
112
130
  const altRef = useRef();
113
131
  useEffect( () => {
114
132
  altRef.current = alt;
@@ -119,7 +137,7 @@ export function ImageEdit( {
119
137
  captionRef.current = caption;
120
138
  }, [ caption ] );
121
139
 
122
- const { __unstableMarkNextChangeAsNotPersistent } =
140
+ const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } =
123
141
  useDispatch( blockEditorStore );
124
142
 
125
143
  useEffect( () => {
@@ -134,7 +152,12 @@ export function ImageEdit( {
134
152
  }
135
153
  }, [ __unstableMarkNextChangeAsNotPersistent, align, setAttributes ] );
136
154
 
137
- const { getSettings } = useSelect( blockEditorStore );
155
+ const {
156
+ getSettings,
157
+ getBlockRootClientId,
158
+ getBlockName,
159
+ canInsertBlockType,
160
+ } = useSelect( blockEditorStore );
138
161
  const blockEditingMode = useBlockEditingMode();
139
162
 
140
163
  const { createErrorNotice } = useDispatch( noticesStore );
@@ -148,7 +171,52 @@ export function ImageEdit( {
148
171
  } );
149
172
  }
150
173
 
174
+ function onSelectImagesList( images ) {
175
+ const win = containerRef.current?.ownerDocument.defaultView;
176
+
177
+ if ( images.every( ( file ) => file instanceof win.File ) ) {
178
+ /** @type {File[]} */
179
+ const files = images;
180
+ const rootClientId = getBlockRootClientId( clientId );
181
+
182
+ if ( files.some( ( file ) => ! isValidFileType( file ) ) ) {
183
+ // Copied from the same notice in the gallery block.
184
+ createErrorNotice(
185
+ __(
186
+ 'If uploading to a gallery all files need to be image formats'
187
+ ),
188
+ { id: 'gallery-upload-invalid-file', type: 'snackbar' }
189
+ );
190
+ }
191
+
192
+ const imageBlocks = files
193
+ .filter( ( file ) => isValidFileType( file ) )
194
+ .map( ( file ) =>
195
+ createBlock( 'core/image', {
196
+ blob: createBlobURL( file ),
197
+ } )
198
+ );
199
+
200
+ if ( getBlockName( rootClientId ) === 'core/gallery' ) {
201
+ replaceBlock( clientId, imageBlocks );
202
+ } else if ( canInsertBlockType( 'core/gallery', rootClientId ) ) {
203
+ const galleryBlock = createBlock(
204
+ 'core/gallery',
205
+ {},
206
+ imageBlocks
207
+ );
208
+
209
+ replaceBlock( clientId, galleryBlock );
210
+ }
211
+ }
212
+ }
213
+
151
214
  function onSelectImage( media ) {
215
+ if ( Array.isArray( media ) ) {
216
+ onSelectImagesList( media );
217
+ return;
218
+ }
219
+
152
220
  if ( ! media || ! media.url ) {
153
221
  setAttributes( {
154
222
  url: undefined,
@@ -292,7 +360,10 @@ export function ImageEdit( {
292
360
  Object.keys( borderProps.style ).length > 0 ),
293
361
  } );
294
362
 
295
- const blockProps = useBlockProps( { className: classes } );
363
+ const blockProps = useBlockProps( {
364
+ ref: containerRef,
365
+ className: classes,
366
+ } );
296
367
 
297
368
  // Much of this description is duplicated from MediaPlaceholder.
298
369
  const { lockUrlControls = false, lockUrlControlsMessage } = useSelect(
@@ -322,7 +393,7 @@ export function ImageEdit( {
322
393
  : __( 'Connected to dynamic data' ),
323
394
  };
324
395
  },
325
- [ isSingleSelected, metadata?.bindings?.url ]
396
+ [ context, isSingleSelected, metadata?.bindings?.url ]
326
397
  );
327
398
  const placeholder = ( content ) => {
328
399
  return (
@@ -331,13 +402,17 @@ export function ImageEdit( {
331
402
  [ borderProps.className ]:
332
403
  !! borderProps.className && ! isSingleSelected,
333
404
  } ) }
334
- withIllustration
335
- icon={ lockUrlControls ? pluginsIcon : icon }
336
- label={ __( 'Image' ) }
405
+ icon={
406
+ ! isSmallContainer &&
407
+ ( lockUrlControls ? pluginsIcon : icon )
408
+ }
409
+ withIllustration={ ! isSingleSelected || isSmallContainer }
410
+ label={ ! isSmallContainer && __( 'Image' ) }
337
411
  instructions={
338
412
  ! lockUrlControls &&
413
+ ! isSmallContainer &&
339
414
  __(
340
- 'Upload an image file, pick one from your media library, or add one with a URL.'
415
+ 'Upload or drag an image file here, or pick one from your library.'
341
416
  )
342
417
  }
343
418
  style={ {
@@ -352,47 +427,55 @@ export function ImageEdit( {
352
427
  ...shadowProps.style,
353
428
  } }
354
429
  >
355
- { lockUrlControls ? (
356
- <span className="block-bindings-media-placeholder-message">
357
- { lockUrlControlsMessage }
358
- </span>
359
- ) : (
360
- content
361
- ) }
430
+ { lockUrlControls &&
431
+ ! isSmallContainer &&
432
+ lockUrlControlsMessage }
433
+
434
+ { ! lockUrlControls && ! isSmallContainer && content }
435
+ { placeholderResizeListener }
362
436
  </Placeholder>
363
437
  );
364
438
  };
365
439
 
366
440
  return (
367
- <figure { ...blockProps }>
368
- <Image
369
- temporaryURL={ temporaryURL }
370
- attributes={ attributes }
371
- setAttributes={ setAttributes }
372
- isSingleSelected={ isSingleSelected }
373
- insertBlocksAfter={ insertBlocksAfter }
374
- onReplace={ onReplace }
375
- onSelectImage={ onSelectImage }
376
- onSelectURL={ onSelectURL }
377
- onUploadError={ onUploadError }
378
- context={ context }
379
- clientId={ clientId }
380
- blockEditingMode={ blockEditingMode }
381
- parentLayoutType={ parentLayout?.type }
382
- />
383
- <MediaPlaceholder
384
- icon={ <BlockIcon icon={ icon } /> }
385
- onSelect={ onSelectImage }
386
- onSelectURL={ onSelectURL }
387
- onError={ onUploadError }
388
- placeholder={ placeholder }
389
- accept="image/*"
390
- allowedTypes={ ALLOWED_MEDIA_TYPES }
391
- value={ { id, src } }
392
- mediaPreview={ mediaPreview }
393
- disableMediaButtons={ temporaryURL || url }
394
- />
395
- </figure>
441
+ <>
442
+ <figure { ...blockProps }>
443
+ <Image
444
+ temporaryURL={ temporaryURL }
445
+ attributes={ attributes }
446
+ setAttributes={ setAttributes }
447
+ isSingleSelected={ isSingleSelected }
448
+ insertBlocksAfter={ insertBlocksAfter }
449
+ onReplace={ onReplace }
450
+ onSelectImage={ onSelectImage }
451
+ onSelectURL={ onSelectURL }
452
+ onUploadError={ onUploadError }
453
+ context={ context }
454
+ clientId={ clientId }
455
+ blockEditingMode={ blockEditingMode }
456
+ parentLayoutType={ parentLayout?.type }
457
+ maxContentWidth={ maxContentWidth }
458
+ />
459
+ <MediaPlaceholder
460
+ icon={ <BlockIcon icon={ icon } /> }
461
+ onSelect={ onSelectImage }
462
+ onSelectURL={ onSelectURL }
463
+ onError={ onUploadError }
464
+ placeholder={ placeholder }
465
+ accept="image/*"
466
+ allowedTypes={ ALLOWED_MEDIA_TYPES }
467
+ handleUpload={ ( files ) => files.length === 1 }
468
+ value={ { id, src } }
469
+ mediaPreview={ mediaPreview }
470
+ disableMediaButtons={ temporaryURL || url }
471
+ />
472
+ </figure>
473
+ {
474
+ // The listener cannot be placed as the first element as it will break the in-between inserter.
475
+ // See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120
476
+ isSingleSelected && isMaxWidthContainerWidth && maxWidthObserver
477
+ }
478
+ </>
396
479
  );
397
480
  }
398
481
 
@@ -1,47 +1,8 @@
1
1
  // Provide special styling for the placeholder.
2
2
  // @todo this particular minimal style of placeholder could be componentized further.
3
3
  .wp-block-image.wp-block-image {
4
-
5
- // Show Placeholder style on-select.
6
- &.is-selected .block-editor-media-placeholder {
7
- // Block UI appearance.
8
- color: $gray-900;
9
- background-color: $white;
10
- box-shadow: inset 0 0 0 $border-width $gray-900;
11
- border: none;
12
-
13
- // Disable any duotone filter applied in the selected state.
14
- filter: none !important;
15
-
16
- // @todo this should eventually be overridden by a custom border-radius set in the inspector.
17
- border-radius: $radius-block-ui;
18
-
19
- > svg {
20
- opacity: 0;
21
- }
22
-
23
- .components-placeholder__illustration {
24
- display: none;
25
- }
26
-
27
- &::before {
28
- opacity: 0;
29
- }
30
- }
31
- .block-bindings-media-placeholder-message {
32
- opacity: 0;
33
- }
34
- &.is-selected .block-bindings-media-placeholder-message {
35
- opacity: 1;
36
- }
37
-
38
- // Remove the transition while we still have a legacy placeholder style.
39
- // Otherwise the content jumps between the 1px placeholder border, and any inherited custom
40
- // parent border that may get applied when you deselect.
41
- .components-placeholder__label,
42
- .components-placeholder__instructions,
43
- .components-button {
44
- transition: none;
4
+ .block-editor-media-placeholder.is-small {
5
+ min-height: 60px;
45
6
  }
46
7
  }
47
8
 
@@ -152,6 +113,11 @@ figure.wp-block-image:not(.wp-block) {
152
113
  text-align: center;
153
114
  }
154
115
 
116
+ // Relatively position the alignment container to support the content resizer.
117
+ .wp-block[data-align]:has(> .wp-block-image) {
118
+ position: relative;
119
+ }
120
+
155
121
  .wp-block-image__crop-area {
156
122
  position: relative;
157
123
  max-width: 100%;