@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
@@ -33,14 +33,14 @@ $blocks-block__margin: 0.5em;
33
33
  //
34
34
  // This back compat rule is ignored if the user decides to use the
35
35
  // newer justification options on the button block, hence the :not.
36
- /* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
36
+ /* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
37
37
  &:not(
38
38
  .is-content-justification-space-between,
39
39
  .is-content-justification-right,
40
40
  .is-content-justification-left,
41
41
  .is-content-justification-center
42
42
  ) .wp-block[data-align="center"] {
43
- /* stylelint-enable indentation */
43
+ /* stylelint-enable @stylistic/indentation */
44
44
  margin-left: auto;
45
45
  margin-right: auto;
46
46
  margin-top: 0;
@@ -52,12 +52,6 @@ $blocks-block__margin: 0.5em;
52
52
  margin-bottom: 0;
53
53
  }
54
54
  }
55
-
56
- .editor-styles-wrapper &.has-custom-font-size {
57
- .wp-block-button__link {
58
- font-size: inherit;
59
- }
60
- }
61
55
  }
62
56
 
63
57
  .wp-block[data-align="center"] > .wp-block-buttons {
@@ -55,14 +55,14 @@ $blocks-block__margin: 0.5em;
55
55
  //
56
56
  // This back compat rule is ignored if the user decides to use the
57
57
  // newer justification options on the button block, hence the :not.
58
- /* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
58
+ /* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
59
59
  &:not(
60
60
  .is-content-justification-space-between,
61
61
  .is-content-justification-right,
62
62
  .is-content-justification-left,
63
63
  .is-content-justification-center
64
64
  ) .wp-block-button.aligncenter {
65
- /* stylelint-enable indentation */
65
+ /* stylelint-enable @stylistic/indentation */
66
66
  margin-left: auto;
67
67
  margin-right: auto;
68
68
  width: 100%;
@@ -36,6 +36,7 @@
36
36
  "default": true
37
37
  }
38
38
  },
39
+ "usesContext": [ "enhancedPagination" ],
39
40
  "supports": {
40
41
  "align": true,
41
42
  "html": false,
@@ -9,12 +9,15 @@
9
9
  * Renders the `core/categories` block on server.
10
10
  *
11
11
  * @since 5.0.0
12
+ * @since 6.7.0 Enable client-side rendering if enhancedPagination context is true.
12
13
  *
13
- * @param array $attributes The block attributes.
14
+ * @param array $attributes The block attributes.
15
+ * @param string $content Block default content.
16
+ * @param WP_Block $block Block instance.
14
17
  *
15
18
  * @return string Returns the categories list/dropdown markup.
16
19
  */
17
- function render_block_core_categories( $attributes ) {
20
+ function render_block_core_categories( $attributes, $content, $block ) {
18
21
  static $block_id = 0;
19
22
  ++$block_id;
20
23
 
@@ -54,6 +57,14 @@ function render_block_core_categories( $attributes ) {
54
57
  $wrapper_markup = '<ul %1$s>%2$s</ul>';
55
58
  $items_markup = wp_list_categories( $args );
56
59
  $type = 'list';
60
+
61
+ if ( ! empty( $block->context['enhancedPagination'] ) ) {
62
+ $p = new WP_HTML_Tag_Processor( $items_markup );
63
+ while ( $p->next_tag( 'a' ) ) {
64
+ $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
65
+ }
66
+ $items_markup = $p->get_updated_html();
67
+ }
57
68
  }
58
69
 
59
70
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) );
@@ -30,7 +30,11 @@
30
30
  },
31
31
  "spacing": {
32
32
  "margin": true,
33
- "padding": true
33
+ "padding": true,
34
+ "__experimentalDefaultControls": {
35
+ "margin": false,
36
+ "padding": false
37
+ }
34
38
  },
35
39
  "typography": {
36
40
  "fontSize": true,
@@ -47,6 +51,13 @@
47
51
  },
48
52
  "interactivity": {
49
53
  "clientNavigation": true
54
+ },
55
+ "__experimentalBorder": {
56
+ "radius": true,
57
+ "color": true,
58
+ "width": true,
59
+ "style": true
50
60
  }
51
- }
61
+ },
62
+ "style": "wp-block-comment-edit-link"
52
63
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-comment-edit-link {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -25,7 +25,11 @@
25
25
  },
26
26
  "spacing": {
27
27
  "margin": true,
28
- "padding": true
28
+ "padding": true,
29
+ "__experimentalDefaultControls": {
30
+ "margin": false,
31
+ "padding": false
32
+ }
29
33
  },
30
34
  "typography": {
31
35
  "fontSize": true,
@@ -40,6 +44,13 @@
40
44
  "fontSize": true
41
45
  }
42
46
  },
47
+ "__experimentalBorder": {
48
+ "radius": true,
49
+ "color": true,
50
+ "width": true,
51
+ "style": true
52
+ },
43
53
  "html": false
44
- }
54
+ },
55
+ "style": "wp-block-comment-reply-link"
45
56
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-comment-reply-link {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -29,6 +29,7 @@ export default function CommentsLegacy( {
29
29
 
30
30
  const actions = [
31
31
  <Button
32
+ __next40pxDefaultSize
32
33
  key="convert"
33
34
  onClick={ () => void setAttributes( { legacy: false } ) }
34
35
  variant="primary"
@@ -5,7 +5,7 @@ $pagination-margin: 0.5em;
5
5
  justify-content: center;
6
6
  }
7
7
 
8
- .editor-styles-wrapper {
8
+ :where(.editor-styles-wrapper) {
9
9
  .wp-block-comments-pagination {
10
10
  max-width: 100%;
11
11
  &.block-editor-block-list__layout {
@@ -400,8 +400,9 @@ const v12 = {
400
400
  supports: v12BlockSupports,
401
401
  isEligible( attributes ) {
402
402
  return (
403
- attributes.customOverlayColor !== undefined ||
404
- attributes.overlayColor !== undefined
403
+ ( attributes.customOverlayColor !== undefined ||
404
+ attributes.overlayColor !== undefined ) &&
405
+ attributes.isUserOverlayColor === undefined
405
406
  );
406
407
  },
407
408
  migrate( attributes ) {
@@ -26,6 +26,7 @@ export default function CoverBlockControls( {
26
26
  onSelectMedia,
27
27
  currentSettings,
28
28
  toggleUseFeaturedImage,
29
+ onClearMedia,
29
30
  } ) {
30
31
  const { contentPosition, id, useFeaturedImage, minHeight, minHeightUnit } =
31
32
  attributes;
@@ -101,6 +102,7 @@ export default function CoverBlockControls( {
101
102
  onToggleFeaturedImage={ toggleUseFeaturedImage }
102
103
  useFeaturedImage={ useFeaturedImage }
103
104
  name={ ! url ? __( 'Add Media' ) : __( 'Replace' ) }
105
+ onReset={ onClearMedia }
104
106
  />
105
107
  </BlockControls>
106
108
  </>
@@ -143,7 +143,10 @@ function CoverEdit( {
143
143
  averageBackgroundColor
144
144
  );
145
145
  __unstableMarkNextChangeAsNotPersistent();
146
- setAttributes( { isDark: newIsDark } );
146
+ setAttributes( {
147
+ isDark: newIsDark,
148
+ isUserOverlayColor: isUserOverlayColor || false,
149
+ } );
147
150
  } )();
148
151
  // Disable reason: Update the block only when the featured image changes.
149
152
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -201,6 +204,7 @@ function CoverEdit( {
201
204
  useFeaturedImage: undefined,
202
205
  dimRatio: newDimRatio,
203
206
  isDark: newIsDark,
207
+ isUserOverlayColor: isUserOverlayColor || false,
204
208
  } );
205
209
  };
206
210
 
@@ -398,6 +402,7 @@ function CoverEdit( {
398
402
  onSelectMedia={ onSelectMedia }
399
403
  currentSettings={ currentSettings }
400
404
  toggleUseFeaturedImage={ toggleUseFeaturedImage }
405
+ onClearMedia={ onClearMedia }
401
406
  />
402
407
  );
403
408
 
@@ -3,11 +3,9 @@
3
3
  */
4
4
  import { useMemo } from '@wordpress/element';
5
5
  import {
6
- Button,
7
6
  ExternalLink,
8
7
  FocalPointPicker,
9
8
  PanelBody,
10
- PanelRow,
11
9
  RangeControl,
12
10
  TextareaControl,
13
11
  ToggleControl,
@@ -73,13 +71,13 @@ function CoverHeightInput( {
73
71
 
74
72
  return (
75
73
  <UnitControl
76
- label={ __( 'Minimum height of cover' ) }
74
+ __next40pxDefaultSize
75
+ label={ __( 'Minimum height' ) }
77
76
  id={ inputId }
78
77
  isResetValueOnUnitChange
79
78
  min={ min }
80
79
  onChange={ handleOnChange }
81
80
  onUnitChange={ onUnitChange }
82
- __unstableInputWidth="80px"
83
81
  units={ units }
84
82
  value={ computedValue }
85
83
  />
@@ -93,7 +91,6 @@ export default function CoverInspectorControls( {
93
91
  coverRef,
94
92
  currentSettings,
95
93
  updateDimRatio,
96
- onClearMedia,
97
94
  } ) {
98
95
  const {
99
96
  useFeaturedImage,
@@ -228,16 +225,6 @@ export default function CoverInspectorControls( {
228
225
  }
229
226
  />
230
227
  ) }
231
- <PanelRow>
232
- <Button
233
- variant="secondary"
234
- size="small"
235
- className="block-library-cover__reset-button"
236
- onClick={ onClearMedia }
237
- >
238
- { __( 'Clear Media' ) }
239
- </Button>
240
- </PanelRow>
241
228
  </PanelBody>
242
229
  ) }
243
230
  </InspectorControls>
@@ -299,6 +286,7 @@ export default function CoverInspectorControls( {
299
286
  ) }
300
287
  <InspectorControls group="dimensions">
301
288
  <ToolsPanelItem
289
+ className="single-column"
302
290
  hasValue={ () => !! minHeight }
303
291
  label={ __( 'Minimum height' ) }
304
292
  onDeselect={ () =>
@@ -1,9 +1,4 @@
1
1
  .wp-block-cover {
2
- /* Extra specificity needed because the reset.css applied in the editor context is overriding this rule. */
3
- .editor-styles-wrapper & {
4
- box-sizing: border-box;
5
- }
6
-
7
2
  // Override default cover styles
8
3
  // because we're not ready yet to show the cover block.
9
4
  &.is-placeholder {
@@ -155,6 +155,34 @@ describe( 'Cover block', () => {
155
155
  'is-position-top-left'
156
156
  );
157
157
  } );
158
+
159
+ test( 'clears media when clear media button clicked', async () => {
160
+ await setup( {
161
+ url: 'http://localhost/my-image.jpg',
162
+ } );
163
+
164
+ await selectBlock( 'Block: Cover' );
165
+ expect(
166
+ within( screen.getByLabelText( 'Block: Cover' ) ).getByRole(
167
+ 'img'
168
+ )
169
+ ).toBeInTheDocument();
170
+
171
+ await userEvent.click(
172
+ screen.getByRole( 'button', { name: 'Replace' } )
173
+ );
174
+ await userEvent.click(
175
+ screen.getByRole( 'menuitem', {
176
+ name: 'Reset',
177
+ } )
178
+ );
179
+
180
+ expect(
181
+ within( screen.getByLabelText( 'Block: Cover' ) ).queryByRole(
182
+ 'img'
183
+ )
184
+ ).not.toBeInTheDocument();
185
+ } );
158
186
  } );
159
187
 
160
188
  describe( 'Inspector controls', () => {
@@ -242,30 +270,6 @@ describe( 'Cover block', () => {
242
270
  expect( screen.getByAltText( 'Me' ) ).toBeInTheDocument();
243
271
  } );
244
272
 
245
- test( 'clears media when clear media button clicked', async () => {
246
- await setup( {
247
- url: 'http://localhost/my-image.jpg',
248
- } );
249
-
250
- await selectBlock( 'Block: Cover' );
251
- expect(
252
- within( screen.getByLabelText( 'Block: Cover' ) ).getByRole(
253
- 'img'
254
- )
255
- ).toBeInTheDocument();
256
-
257
- await userEvent.click(
258
- screen.getByRole( 'button', {
259
- name: 'Clear Media',
260
- } )
261
- );
262
- expect(
263
- within( screen.getByLabelText( 'Block: Cover' ) ).queryByRole(
264
- 'img'
265
- )
266
- ).not.toBeInTheDocument();
267
- } );
268
-
269
273
  describe( 'Color panel', () => {
270
274
  test( 'applies selected opacity to block when number control value changed', async () => {
271
275
  const { container } = await setup();
@@ -372,10 +376,10 @@ describe( 'Cover block', () => {
372
376
  } )
373
377
  );
374
378
  await userEvent.clear(
375
- screen.getByLabelText( 'Minimum height of cover' )
379
+ screen.getByLabelText( 'Minimum height' )
376
380
  );
377
381
  await userEvent.type(
378
- screen.getByLabelText( 'Minimum height of cover' ),
382
+ screen.getByLabelText( 'Minimum height' ),
379
383
  '300'
380
384
  );
381
385
 
@@ -11,6 +11,7 @@ import initBlock from '../utils/init-block';
11
11
  import metadata from './block.json';
12
12
  import edit from './edit';
13
13
  import save from './save';
14
+ import transforms from './transforms';
14
15
 
15
16
  const { name } = metadata;
16
17
  export { metadata, name };
@@ -35,6 +36,7 @@ export const settings = {
35
36
  },
36
37
  save,
37
38
  edit,
39
+ transforms,
38
40
  };
39
41
 
40
42
  export const init = () => initBlock( { name, metadata, settings } );
@@ -0,0 +1,26 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createBlock, cloneBlock } from '@wordpress/blocks';
5
+
6
+ export default {
7
+ from: [
8
+ {
9
+ type: 'block',
10
+ isMultiBlock: true,
11
+ blocks: [ '*' ],
12
+ isMatch( {}, blocks ) {
13
+ return ! (
14
+ blocks.length === 1 && blocks[ 0 ].name === 'core/details'
15
+ );
16
+ },
17
+ __experimentalConvert( blocks ) {
18
+ return createBlock(
19
+ 'core/details',
20
+ {},
21
+ blocks.map( ( block ) => cloneBlock( block ) )
22
+ );
23
+ },
24
+ },
25
+ ],
26
+ };
package/src/embed/edit.js CHANGED
@@ -14,7 +14,6 @@ import { embedContentIcon } from './icons';
14
14
  import EmbedLoading from './embed-loading';
15
15
  import EmbedPlaceholder from './embed-placeholder';
16
16
  import EmbedPreview from './embed-preview';
17
- import { Caption } from '../utils/caption';
18
17
 
19
18
  /**
20
19
  * External dependencies
@@ -277,14 +276,8 @@ const EmbedEdit = ( props ) => {
277
276
  icon={ icon }
278
277
  label={ label }
279
278
  insertBlocksAfter={ insertBlocksAfter }
280
- />
281
- <Caption
282
279
  attributes={ attributes }
283
280
  setAttributes={ setAttributes }
284
- isSelected={ isSelected }
285
- insertBlocksAfter={ insertBlocksAfter }
286
- label={ __( 'Embed caption text' ) }
287
- showToolbarButton={ isSelected }
288
281
  />
289
282
  </View>
290
283
  </>
@@ -65,10 +65,18 @@ const EmbedPlaceholder = ( {
65
65
  spacing={ 3 }
66
66
  justify="flex-start"
67
67
  >
68
- <Button variant="secondary" onClick={ tryAgain }>
68
+ <Button
69
+ __next40pxDefaultSize
70
+ variant="secondary"
71
+ onClick={ tryAgain }
72
+ >
69
73
  { _x( 'Try again', 'button label' ) }
70
74
  </Button>{ ' ' }
71
- <Button variant="secondary" onClick={ fallback }>
75
+ <Button
76
+ __next40pxDefaultSize
77
+ variant="secondary"
78
+ onClick={ fallback }
79
+ >
72
80
  { _x( 'Convert to link', 'button label' ) }
73
81
  </Button>
74
82
  </HStack>
@@ -21,6 +21,7 @@ import { getAuthority } from '@wordpress/url';
21
21
  * Internal dependencies
22
22
  */
23
23
  import WpEmbedPreview from './wp-embed-preview';
24
+ import { Caption } from '../utils/caption';
24
25
 
25
26
  class EmbedPreview extends Component {
26
27
  constructor() {
@@ -52,8 +53,19 @@ class EmbedPreview extends Component {
52
53
  }
53
54
 
54
55
  render() {
55
- const { preview, previewable, url, type, className, icon, label } =
56
- this.props;
56
+ const {
57
+ preview,
58
+ previewable,
59
+ url,
60
+ type,
61
+ className,
62
+ icon,
63
+ label,
64
+ insertBlocksAfter,
65
+ attributes,
66
+ setAttributes,
67
+ isSelected,
68
+ } = this.props;
57
69
  const { scripts } = preview;
58
70
  const { interactive } = this.state;
59
71
 
@@ -123,6 +135,14 @@ class EmbedPreview extends Component {
123
135
  </p>
124
136
  </Placeholder>
125
137
  ) }
138
+ <Caption
139
+ attributes={ attributes }
140
+ setAttributes={ setAttributes }
141
+ isSelected={ isSelected }
142
+ insertBlocksAfter={ insertBlocksAfter }
143
+ label={ __( 'Embed caption text' ) }
144
+ showToolbarButton={ isSelected }
145
+ />
126
146
  </figure>
127
147
  );
128
148
  }
package/src/file/edit.js CHANGED
@@ -109,6 +109,16 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
109
109
 
110
110
  function onSelectFile( newMedia ) {
111
111
  if ( ! newMedia || ! newMedia.url ) {
112
+ // Reset attributes.
113
+ setAttributes( {
114
+ href: undefined,
115
+ fileName: undefined,
116
+ textLinkHref: undefined,
117
+ id: undefined,
118
+ fileId: undefined,
119
+ displayPreview: undefined,
120
+ previewHeight: undefined,
121
+ } );
112
122
  setTemporaryURL();
113
123
  return;
114
124
  }
@@ -230,6 +240,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
230
240
  accept="*"
231
241
  onSelect={ onSelectFile }
232
242
  onError={ onUploadError }
243
+ onReset={ () => onSelectFile( undefined ) }
233
244
  />
234
245
  <ClipboardToolbarButton
235
246
  text={ href }
@@ -21,7 +21,7 @@ function render_block_core_file( $attributes, $content ) {
21
21
  if ( ! empty( $attributes['displayPreview'] ) ) {
22
22
  $suffix = wp_scripts_get_suffix();
23
23
  if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
24
- $module_url = gutenberg_url( '/build/interactivity/file.min.js' );
24
+ $module_url = gutenberg_url( '/build-module/block-library/file/view.min.js' );
25
25
  }
26
26
 
27
27
  wp_register_script_module(
@@ -24,12 +24,32 @@ const transforms = {
24
24
  const blobURL = createBlobURL( file );
25
25
 
26
26
  // File will be uploaded in componentDidMount()
27
- blocks.push(
28
- createBlock( 'core/file', {
29
- blob: blobURL,
30
- fileName: file.name,
31
- } )
32
- );
27
+ if ( file.type.startsWith( 'video/' ) ) {
28
+ blocks.push(
29
+ createBlock( 'core/video', {
30
+ blob: createBlobURL( file ),
31
+ } )
32
+ );
33
+ } else if ( file.type.startsWith( 'image/' ) ) {
34
+ blocks.push(
35
+ createBlock( 'core/image', {
36
+ blob: createBlobURL( file ),
37
+ } )
38
+ );
39
+ } else if ( file.type.startsWith( 'audio/' ) ) {
40
+ blocks.push(
41
+ createBlock( 'core/audio', {
42
+ blob: createBlobURL( file ),
43
+ } )
44
+ );
45
+ } else {
46
+ blocks.push(
47
+ createBlock( 'core/file', {
48
+ blob: blobURL,
49
+ fileName: file.name,
50
+ } )
51
+ );
52
+ }
33
53
  } );
34
54
 
35
55
  return blocks;