@wordpress/block-library 7.2.0 → 7.3.2

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 (469) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/archives/edit.js +21 -1
  4. package/build/archives/edit.js.map +1 -1
  5. package/build/archives/index.js +5 -1
  6. package/build/archives/index.js.map +1 -1
  7. package/build/audio/edit.js +1 -1
  8. package/build/audio/edit.js.map +1 -1
  9. package/build/audio/edit.native.js +0 -5
  10. package/build/audio/edit.native.js.map +1 -1
  11. package/build/avatar/edit.js +17 -11
  12. package/build/avatar/edit.js.map +1 -1
  13. package/build/block/edit.js +2 -1
  14. package/build/block/edit.js.map +1 -1
  15. package/build/column/index.js +1 -0
  16. package/build/column/index.js.map +1 -1
  17. package/build/comment-author-avatar/index.js +3 -3
  18. package/build/comment-author-name/index.js +7 -3
  19. package/build/comment-author-name/index.js.map +1 -1
  20. package/build/comment-content/index.js +1 -1
  21. package/build/comment-date/index.js +7 -3
  22. package/build/comment-date/index.js.map +1 -1
  23. package/build/comment-edit-link/index.js +5 -1
  24. package/build/comment-edit-link/index.js.map +1 -1
  25. package/build/comment-reply-link/index.js +5 -1
  26. package/build/comment-reply-link/index.js.map +1 -1
  27. package/build/comment-template/edit.js +10 -15
  28. package/build/comment-template/edit.js.map +1 -1
  29. package/build/comment-template/hooks.js +10 -24
  30. package/build/comment-template/hooks.js.map +1 -1
  31. package/build/comment-template/index.js +2 -2
  32. package/build/comments-pagination-next/index.js +2 -2
  33. package/build/comments-pagination-numbers/index.js +1 -1
  34. package/build/comments-pagination-previous/index.js +1 -1
  35. package/build/comments-query-loop/edit/comments-inspector-controls.js +2 -69
  36. package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  37. package/build/comments-query-loop/edit.js +22 -1
  38. package/build/comments-query-loop/edit.js.map +1 -1
  39. package/build/comments-query-loop/index.js +1 -23
  40. package/build/comments-query-loop/index.js.map +1 -1
  41. package/build/cover/edit.js +35 -6
  42. package/build/cover/edit.js.map +1 -1
  43. package/build/cover/index.js +5 -0
  44. package/build/cover/index.js.map +1 -1
  45. package/build/cover/save.js +3 -2
  46. package/build/cover/save.js.map +1 -1
  47. package/build/cover/transforms.js +33 -32
  48. package/build/cover/transforms.js.map +1 -1
  49. package/build/gallery/gap-styles.js +8 -2
  50. package/build/gallery/gap-styles.js.map +1 -1
  51. package/build/gallery/index.js +1 -0
  52. package/build/gallery/index.js.map +1 -1
  53. package/build/group/edit.js +3 -1
  54. package/build/group/edit.js.map +1 -1
  55. package/build/group/index.js +2 -4
  56. package/build/group/index.js.map +1 -1
  57. package/build/group/variations.js +31 -9
  58. package/build/group/variations.js.map +1 -1
  59. package/build/heading/edit.js +1 -1
  60. package/build/heading/edit.js.map +1 -1
  61. package/build/html/edit.js +3 -2
  62. package/build/html/edit.js.map +1 -1
  63. package/build/image/edit.native.js +8 -10
  64. package/build/image/edit.native.js.map +1 -1
  65. package/build/index.js +4 -4
  66. package/build/index.js.map +1 -1
  67. package/build/list/deprecated.js +2 -2
  68. package/build/list/deprecated.js.map +1 -1
  69. package/build/list/index.js +13 -2
  70. package/build/list/index.js.map +1 -1
  71. package/build/list/v2/deprecated.js +117 -0
  72. package/build/list/v2/deprecated.js.map +1 -0
  73. package/build/list/v2/edit.js +106 -3
  74. package/build/list/v2/edit.js.map +1 -1
  75. package/build/list/v2/index.js +4 -1
  76. package/build/list/v2/index.js.map +1 -1
  77. package/build/list/v2/migrate.js +85 -0
  78. package/build/list/v2/migrate.js.map +1 -0
  79. package/build/list-item/edit.js +59 -10
  80. package/build/list-item/edit.js.map +1 -1
  81. package/build/list-item/hooks/index.js +32 -0
  82. package/build/list-item/hooks/index.js.map +1 -0
  83. package/build/list-item/hooks/use-enter.js +93 -0
  84. package/build/list-item/hooks/use-enter.js.map +1 -0
  85. package/build/list-item/hooks/use-indent-list-item.js +74 -0
  86. package/build/list-item/hooks/use-indent-list-item.js.map +1 -0
  87. package/build/list-item/hooks/use-outdent-list-item.js +77 -0
  88. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -0
  89. package/build/list-item/index.js +1 -1
  90. package/build/list-item/index.js.map +1 -1
  91. package/build/list-item/utils.js +16 -0
  92. package/build/list-item/utils.js.map +1 -0
  93. package/build/media-text/media-container.native.js +1 -16
  94. package/build/media-text/media-container.native.js.map +1 -1
  95. package/build/navigation/edit/index.js +36 -17
  96. package/build/navigation/edit/index.js.map +1 -1
  97. package/build/navigation/edit/navigation-menu-delete-control.js +1 -1
  98. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  99. package/build/navigation/edit/unsaved-inner-blocks.js +34 -7
  100. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  101. package/build/navigation/index.js +9 -1
  102. package/build/navigation/index.js.map +1 -1
  103. package/build/navigation/use-navigation-menu.js +1 -0
  104. package/build/navigation/use-navigation-menu.js.map +1 -1
  105. package/build/navigation-link/edit.js +9 -5
  106. package/build/navigation-link/edit.js.map +1 -1
  107. package/build/navigation-link/index.js +1 -1
  108. package/build/navigation-submenu/edit.js +5 -9
  109. package/build/navigation-submenu/edit.js.map +1 -1
  110. package/build/navigation-submenu/index.js +1 -1
  111. package/build/post-comment/edit.js +2 -2
  112. package/build/post-comment/edit.js.map +1 -1
  113. package/build/post-comments/index.js +4 -3
  114. package/build/post-comments/index.js.map +1 -1
  115. package/build/post-comments-form/edit.js +3 -2
  116. package/build/post-comments-form/edit.js.map +1 -1
  117. package/build/post-featured-image/edit.js +19 -7
  118. package/build/post-featured-image/edit.js.map +1 -1
  119. package/build/post-featured-image/index.js +1 -1
  120. package/build/post-template/edit.js +7 -2
  121. package/build/post-template/edit.js.map +1 -1
  122. package/build/post-terms/edit.js +3 -1
  123. package/build/post-terms/edit.js.map +1 -1
  124. package/build/post-terms/variations.js +1 -1
  125. package/build/post-terms/variations.js.map +1 -1
  126. package/build/query/edit/index.js +84 -22
  127. package/build/query/edit/index.js.map +1 -1
  128. package/build/query/edit/query-placeholder.js +7 -14
  129. package/build/query/edit/query-placeholder.js.map +1 -1
  130. package/build/query/edit/query-toolbar.js +6 -1
  131. package/build/query/edit/query-toolbar.js.map +1 -1
  132. package/build/query-pagination/edit.js +1 -1
  133. package/build/query-pagination/edit.js.map +1 -1
  134. package/build/query-pagination-numbers/index.js +19 -1
  135. package/build/query-pagination-numbers/index.js.map +1 -1
  136. package/build/quote/index.js +20 -2
  137. package/build/quote/index.js.map +1 -1
  138. package/build/quote/v2/deprecated.js +133 -0
  139. package/build/quote/v2/deprecated.js.map +1 -0
  140. package/build/quote/v2/edit.js +131 -0
  141. package/build/quote/v2/edit.js.map +1 -0
  142. package/build/quote/v2/index.js +49 -0
  143. package/build/quote/v2/index.js.map +1 -0
  144. package/build/quote/v2/save.js +43 -0
  145. package/build/quote/v2/save.js.map +1 -0
  146. package/build/quote/v2/transforms.js +156 -0
  147. package/build/quote/v2/transforms.js.map +1 -0
  148. package/build/read-more/index.js +1 -1
  149. package/build/rss/edit.js +6 -1
  150. package/build/rss/edit.js.map +1 -1
  151. package/build/site-logo/edit.js +3 -2
  152. package/build/site-logo/edit.js.map +1 -1
  153. package/build/site-logo/index.js +1 -1
  154. package/build/social-links/index.js +1 -0
  155. package/build/social-links/index.js.map +1 -1
  156. package/build/spacer/controls.native.js +1 -1
  157. package/build/spacer/controls.native.js.map +1 -1
  158. package/build/template-part/edit/utils/hooks.js +5 -2
  159. package/build/template-part/edit/utils/hooks.js.map +1 -1
  160. package/build-module/archives/edit.js +22 -2
  161. package/build-module/archives/edit.js.map +1 -1
  162. package/build-module/archives/index.js +5 -1
  163. package/build-module/archives/index.js.map +1 -1
  164. package/build-module/audio/edit.js +1 -1
  165. package/build-module/audio/edit.js.map +1 -1
  166. package/build-module/audio/edit.native.js +0 -5
  167. package/build-module/audio/edit.native.js.map +1 -1
  168. package/build-module/avatar/edit.js +16 -11
  169. package/build-module/avatar/edit.js.map +1 -1
  170. package/build-module/block/edit.js +4 -3
  171. package/build-module/block/edit.js.map +1 -1
  172. package/build-module/column/index.js +1 -0
  173. package/build-module/column/index.js.map +1 -1
  174. package/build-module/comment-author-avatar/index.js +3 -3
  175. package/build-module/comment-author-name/index.js +7 -3
  176. package/build-module/comment-author-name/index.js.map +1 -1
  177. package/build-module/comment-content/index.js +1 -1
  178. package/build-module/comment-date/index.js +7 -3
  179. package/build-module/comment-date/index.js.map +1 -1
  180. package/build-module/comment-edit-link/index.js +5 -1
  181. package/build-module/comment-edit-link/index.js.map +1 -1
  182. package/build-module/comment-reply-link/index.js +5 -1
  183. package/build-module/comment-reply-link/index.js.map +1 -1
  184. package/build-module/comment-template/edit.js +10 -15
  185. package/build-module/comment-template/edit.js.map +1 -1
  186. package/build-module/comment-template/hooks.js +10 -24
  187. package/build-module/comment-template/hooks.js.map +1 -1
  188. package/build-module/comment-template/index.js +2 -2
  189. package/build-module/comments-pagination-next/index.js +2 -2
  190. package/build-module/comments-pagination-numbers/index.js +1 -1
  191. package/build-module/comments-pagination-previous/index.js +1 -1
  192. package/build-module/comments-query-loop/edit/comments-inspector-controls.js +4 -70
  193. package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  194. package/build-module/comments-query-loop/edit.js +22 -1
  195. package/build-module/comments-query-loop/edit.js.map +1 -1
  196. package/build-module/comments-query-loop/index.js +1 -23
  197. package/build-module/comments-query-loop/index.js.map +1 -1
  198. package/build-module/cover/edit.js +36 -8
  199. package/build-module/cover/edit.js.map +1 -1
  200. package/build-module/cover/index.js +5 -0
  201. package/build-module/cover/index.js.map +1 -1
  202. package/build-module/cover/save.js +3 -2
  203. package/build-module/cover/save.js.map +1 -1
  204. package/build-module/cover/transforms.js +33 -32
  205. package/build-module/cover/transforms.js.map +1 -1
  206. package/build-module/gallery/gap-styles.js +8 -2
  207. package/build-module/gallery/gap-styles.js.map +1 -1
  208. package/build-module/gallery/index.js +1 -0
  209. package/build-module/gallery/index.js.map +1 -1
  210. package/build-module/group/edit.js +3 -1
  211. package/build-module/group/edit.js.map +1 -1
  212. package/build-module/group/index.js +2 -4
  213. package/build-module/group/index.js.map +1 -1
  214. package/build-module/group/variations.js +30 -9
  215. package/build-module/group/variations.js.map +1 -1
  216. package/build-module/heading/edit.js +1 -1
  217. package/build-module/heading/edit.js.map +1 -1
  218. package/build-module/html/edit.js +4 -3
  219. package/build-module/html/edit.js.map +1 -1
  220. package/build-module/image/edit.native.js +8 -10
  221. package/build-module/image/edit.native.js.map +1 -1
  222. package/build-module/index.js +4 -4
  223. package/build-module/index.js.map +1 -1
  224. package/build-module/list/deprecated.js +2 -2
  225. package/build-module/list/deprecated.js.map +1 -1
  226. package/build-module/list/index.js +9 -3
  227. package/build-module/list/index.js.map +1 -1
  228. package/build-module/list/v2/deprecated.js +104 -0
  229. package/build-module/list/v2/deprecated.js.map +1 -0
  230. package/build-module/list/v2/edit.js +104 -5
  231. package/build-module/list/v2/edit.js.map +1 -1
  232. package/build-module/list/v2/index.js +3 -1
  233. package/build-module/list/v2/index.js.map +1 -1
  234. package/build-module/list/v2/migrate.js +77 -0
  235. package/build-module/list/v2/migrate.js.map +1 -0
  236. package/build-module/list-item/edit.js +59 -13
  237. package/build-module/list-item/edit.js.map +1 -1
  238. package/build-module/list-item/hooks/index.js +4 -0
  239. package/build-module/list-item/hooks/index.js.map +1 -0
  240. package/build-module/list-item/hooks/use-enter.js +77 -0
  241. package/build-module/list-item/hooks/use-enter.js.map +1 -0
  242. package/build-module/list-item/hooks/use-indent-list-item.js +62 -0
  243. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -0
  244. package/build-module/list-item/hooks/use-outdent-list-item.js +66 -0
  245. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -0
  246. package/build-module/list-item/index.js +1 -1
  247. package/build-module/list-item/index.js.map +1 -1
  248. package/build-module/list-item/utils.js +8 -0
  249. package/build-module/list-item/utils.js.map +1 -0
  250. package/build-module/media-text/media-container.native.js +1 -14
  251. package/build-module/media-text/media-container.native.js.map +1 -1
  252. package/build-module/navigation/edit/index.js +37 -17
  253. package/build-module/navigation/edit/index.js.map +1 -1
  254. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -1
  255. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  256. package/build-module/navigation/edit/unsaved-inner-blocks.js +35 -8
  257. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  258. package/build-module/navigation/index.js +9 -1
  259. package/build-module/navigation/index.js.map +1 -1
  260. package/build-module/navigation/use-navigation-menu.js +1 -0
  261. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  262. package/build-module/navigation-link/edit.js +9 -5
  263. package/build-module/navigation-link/edit.js.map +1 -1
  264. package/build-module/navigation-link/index.js +1 -1
  265. package/build-module/navigation-submenu/edit.js +6 -10
  266. package/build-module/navigation-submenu/edit.js.map +1 -1
  267. package/build-module/navigation-submenu/index.js +1 -1
  268. package/build-module/post-comment/edit.js +2 -2
  269. package/build-module/post-comment/edit.js.map +1 -1
  270. package/build-module/post-comments/index.js +4 -3
  271. package/build-module/post-comments/index.js.map +1 -1
  272. package/build-module/post-comments-form/edit.js +3 -2
  273. package/build-module/post-comments-form/edit.js.map +1 -1
  274. package/build-module/post-featured-image/edit.js +19 -7
  275. package/build-module/post-featured-image/edit.js.map +1 -1
  276. package/build-module/post-featured-image/index.js +1 -1
  277. package/build-module/post-template/edit.js +7 -2
  278. package/build-module/post-template/edit.js.map +1 -1
  279. package/build-module/post-terms/edit.js +4 -2
  280. package/build-module/post-terms/edit.js.map +1 -1
  281. package/build-module/post-terms/variations.js +3 -3
  282. package/build-module/post-terms/variations.js.map +1 -1
  283. package/build-module/query/edit/index.js +87 -26
  284. package/build-module/query/edit/index.js.map +1 -1
  285. package/build-module/query/edit/query-placeholder.js +8 -15
  286. package/build-module/query/edit/query-placeholder.js.map +1 -1
  287. package/build-module/query/edit/query-toolbar.js +6 -1
  288. package/build-module/query/edit/query-toolbar.js.map +1 -1
  289. package/build-module/query-pagination/edit.js +1 -1
  290. package/build-module/query-pagination/edit.js.map +1 -1
  291. package/build-module/query-pagination-numbers/index.js +19 -1
  292. package/build-module/query-pagination-numbers/index.js.map +1 -1
  293. package/build-module/quote/index.js +19 -1
  294. package/build-module/quote/index.js.map +1 -1
  295. package/build-module/quote/v2/deprecated.js +116 -0
  296. package/build-module/quote/v2/deprecated.js.map +1 -0
  297. package/build-module/quote/v2/edit.js +115 -0
  298. package/build-module/quote/v2/edit.js.map +1 -0
  299. package/build-module/quote/v2/index.js +33 -0
  300. package/build-module/quote/v2/index.js.map +1 -0
  301. package/build-module/quote/v2/save.js +30 -0
  302. package/build-module/quote/v2/save.js.map +1 -0
  303. package/build-module/quote/v2/transforms.js +147 -0
  304. package/build-module/quote/v2/transforms.js.map +1 -0
  305. package/build-module/read-more/index.js +1 -1
  306. package/build-module/rss/edit.js +5 -1
  307. package/build-module/rss/edit.js.map +1 -1
  308. package/build-module/site-logo/edit.js +3 -2
  309. package/build-module/site-logo/edit.js.map +1 -1
  310. package/build-module/site-logo/index.js +1 -1
  311. package/build-module/social-links/index.js +1 -0
  312. package/build-module/social-links/index.js.map +1 -1
  313. package/build-module/spacer/controls.native.js +1 -1
  314. package/build-module/spacer/controls.native.js.map +1 -1
  315. package/build-module/template-part/edit/utils/hooks.js +5 -2
  316. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  317. package/build-style/avatar/editor-rtl.css +4 -0
  318. package/build-style/avatar/editor.css +4 -0
  319. package/build-style/avatar/style-rtl.css +79 -0
  320. package/build-style/avatar/style.css +79 -0
  321. package/build-style/editor-rtl.css +69 -9
  322. package/build-style/editor.css +69 -9
  323. package/build-style/group/editor-rtl.css +26 -0
  324. package/build-style/group/editor.css +26 -0
  325. package/build-style/heading/style-rtl.css +0 -8
  326. package/build-style/heading/style.css +0 -8
  327. package/build-style/list/style-rtl.css +1 -1
  328. package/build-style/list/style.css +1 -1
  329. package/build-style/navigation/style-rtl.css +11 -9
  330. package/build-style/navigation/style.css +11 -9
  331. package/build-style/navigation-link/style-rtl.css +3 -0
  332. package/build-style/navigation-link/style.css +3 -0
  333. package/build-style/paragraph/style-rtl.css +0 -4
  334. package/build-style/paragraph/style.css +0 -4
  335. package/build-style/query/editor-rtl.css +39 -0
  336. package/build-style/query/editor.css +39 -0
  337. package/build-style/quote/style-rtl.css +1 -0
  338. package/build-style/quote/style.css +1 -0
  339. package/build-style/reset-rtl.css +1 -1
  340. package/build-style/reset.css +1 -1
  341. package/build-style/style-rtl.css +20 -22
  342. package/build-style/style.css +20 -22
  343. package/build-style/template-part/editor-rtl.css +0 -9
  344. package/build-style/template-part/editor.css +0 -9
  345. package/package.json +28 -28
  346. package/src/archives/block.json +5 -1
  347. package/src/archives/edit.js +20 -2
  348. package/src/archives/index.php +4 -4
  349. package/src/audio/edit.js +1 -1
  350. package/src/audio/edit.native.js +0 -5
  351. package/src/avatar/edit.js +21 -13
  352. package/src/avatar/editor.scss +6 -0
  353. package/src/avatar/index.php +2 -2
  354. package/src/avatar/style.scss +5 -0
  355. package/src/block/edit.js +21 -11
  356. package/src/column/block.json +1 -0
  357. package/src/comment-author-avatar/block.json +3 -3
  358. package/src/comment-author-name/block.json +7 -3
  359. package/src/comment-author-name/index.php +3 -0
  360. package/src/comment-content/block.json +1 -1
  361. package/src/comment-date/block.json +7 -3
  362. package/src/comment-date/index.php +6 -1
  363. package/src/comment-edit-link/block.json +5 -1
  364. package/src/comment-edit-link/index.php +3 -0
  365. package/src/comment-reply-link/block.json +5 -1
  366. package/src/comment-reply-link/index.php +4 -1
  367. package/src/comment-template/block.json +2 -8
  368. package/src/comment-template/edit.js +17 -22
  369. package/src/comment-template/hooks.js +10 -25
  370. package/src/comment-template/index.php +15 -5
  371. package/src/comments-pagination-next/block.json +2 -9
  372. package/src/comments-pagination-numbers/block.json +2 -8
  373. package/src/comments-pagination-previous/block.json +2 -2
  374. package/src/comments-query-loop/block.json +1 -23
  375. package/src/comments-query-loop/edit/comments-inspector-controls.js +2 -83
  376. package/src/comments-query-loop/edit.js +54 -1
  377. package/src/cover/block.json +5 -0
  378. package/src/cover/edit.js +77 -29
  379. package/src/cover/index.php +85 -0
  380. package/src/cover/save.js +18 -14
  381. package/src/cover/transforms.js +51 -28
  382. package/src/gallery/block.json +1 -0
  383. package/src/gallery/gap-styles.js +9 -4
  384. package/src/gallery/index.php +7 -6
  385. package/src/group/block.json +2 -4
  386. package/src/group/edit.js +4 -1
  387. package/src/group/editor.scss +31 -0
  388. package/src/group/variations.js +21 -4
  389. package/src/heading/edit.js +1 -1
  390. package/src/heading/style.scss +0 -3
  391. package/src/html/edit.js +22 -30
  392. package/src/image/edit.native.js +7 -11
  393. package/src/index.js +19 -16
  394. package/src/list/deprecated.js +2 -2
  395. package/src/list/index.js +7 -3
  396. package/src/list/style.scss +1 -2
  397. package/src/list/test/migrate.js +159 -0
  398. package/src/list/v2/deprecated.js +89 -0
  399. package/src/list/v2/edit.js +110 -1
  400. package/src/list/v2/index.js +2 -0
  401. package/src/list/v2/migrate.js +87 -0
  402. package/src/list-item/edit.js +69 -23
  403. package/src/list-item/hooks/index.js +3 -0
  404. package/src/list-item/hooks/use-enter.js +94 -0
  405. package/src/list-item/hooks/use-indent-list-item.js +89 -0
  406. package/src/list-item/hooks/use-outdent-list-item.js +95 -0
  407. package/src/list-item/index.js +1 -1
  408. package/src/list-item/utils.js +14 -0
  409. package/src/media-text/media-container.native.js +1 -14
  410. package/src/navigation/block.json +9 -1
  411. package/src/navigation/edit/index.js +50 -14
  412. package/src/navigation/edit/navigation-menu-delete-control.js +1 -1
  413. package/src/navigation/edit/unsaved-inner-blocks.js +57 -8
  414. package/src/navigation/index.php +6 -1
  415. package/src/navigation/style.scss +15 -13
  416. package/src/navigation/use-navigation-menu.js +4 -0
  417. package/src/navigation-link/block.json +1 -0
  418. package/src/navigation-link/edit.js +43 -35
  419. package/src/navigation-link/index.php +8 -0
  420. package/src/navigation-link/style.scss +6 -0
  421. package/src/navigation-submenu/block.json +1 -0
  422. package/src/navigation-submenu/edit.js +7 -9
  423. package/src/paragraph/style.scss +0 -5
  424. package/src/post-author/index.php +0 -1
  425. package/src/post-comment/edit.js +2 -2
  426. package/src/post-comments/block.json +4 -3
  427. package/src/post-comments-form/edit.js +6 -3
  428. package/src/post-comments-form/index.php +12 -4
  429. package/src/post-featured-image/block.json +1 -1
  430. package/src/post-featured-image/edit.js +24 -12
  431. package/src/post-template/edit.js +7 -1
  432. package/src/post-terms/edit.js +4 -1
  433. package/src/post-terms/variations.js +3 -3
  434. package/src/query/edit/index.js +125 -26
  435. package/src/query/edit/query-placeholder.js +3 -13
  436. package/src/query/edit/query-toolbar.js +6 -0
  437. package/src/query/editor.scss +38 -0
  438. package/src/query-pagination/edit.js +1 -1
  439. package/src/query-pagination/index.php +9 -2
  440. package/src/query-pagination-numbers/block.json +19 -1
  441. package/src/quote/block.json +8 -0
  442. package/src/quote/index.js +10 -1
  443. package/src/quote/style.scss +1 -0
  444. package/src/quote/v2/deprecated.js +107 -0
  445. package/src/quote/v2/edit.js +136 -0
  446. package/src/quote/v2/index.js +36 -0
  447. package/src/quote/v2/save.js +26 -0
  448. package/src/quote/v2/test/migrate.js +92 -0
  449. package/src/quote/v2/transforms.js +155 -0
  450. package/src/read-more/block.json +1 -1
  451. package/src/reset.scss +1 -1
  452. package/src/rss/edit.js +3 -1
  453. package/src/rss/index.php +14 -1
  454. package/src/site-logo/block.json +1 -1
  455. package/src/site-logo/edit.js +2 -1
  456. package/src/site-logo/index.php +0 -4
  457. package/src/social-link/index.php +1 -2
  458. package/src/social-links/block.json +1 -0
  459. package/src/spacer/controls.native.js +1 -1
  460. package/src/spacer/test/__snapshots__/index.native.js.snap +31 -0
  461. package/src/spacer/test/index.native.js +180 -0
  462. package/src/style.scss +1 -0
  463. package/src/template-part/edit/utils/hooks.js +6 -1
  464. package/src/template-part/editor.scss +0 -10
  465. package/build/navigation/edit/use-list-view-modal.js +0 -73
  466. package/build/navigation/edit/use-list-view-modal.js.map +0 -1
  467. package/build-module/navigation/edit/use-list-view-modal.js +0 -63
  468. package/build-module/navigation/edit/use-list-view-modal.js.map +0 -1
  469. package/src/navigation/edit/use-list-view-modal.js +0 -72
@@ -9,7 +9,60 @@ import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
9
9
  import CommentsInspectorControls from './edit/comments-inspector-controls';
10
10
 
11
11
  const TEMPLATE = [
12
- [ 'core/comment-template' ],
12
+ [
13
+ 'core/comment-template',
14
+ {},
15
+ [
16
+ [
17
+ 'core/columns',
18
+ {},
19
+ [
20
+ [
21
+ 'core/column',
22
+ { width: '40px' },
23
+ [
24
+ [
25
+ 'core/avatar',
26
+ {
27
+ size: 40,
28
+ style: {
29
+ border: { radius: '20px' },
30
+ },
31
+ },
32
+ ],
33
+ ],
34
+ ],
35
+ [
36
+ 'core/column',
37
+ {},
38
+ [
39
+ [ 'core/comment-author-name' ],
40
+ [
41
+ 'core/group',
42
+ {
43
+ layout: { type: 'flex' },
44
+ style: {
45
+ spacing: {
46
+ margin: {
47
+ top: '0px',
48
+ bottom: '0px',
49
+ },
50
+ },
51
+ },
52
+ },
53
+ [
54
+ [ 'core/comment-date' ],
55
+ [ 'core/comment-edit-link' ],
56
+ ],
57
+ ],
58
+ [ 'core/comment-content' ],
59
+ [ 'core/comment-reply-link' ],
60
+ ],
61
+ ],
62
+ ],
63
+ ],
64
+ ],
65
+ ],
13
66
  [ 'core/comments-pagination' ],
14
67
  ];
15
68
 
@@ -10,6 +10,10 @@
10
10
  "url": {
11
11
  "type": "string"
12
12
  },
13
+ "useFeaturedImage": {
14
+ "type": "boolean",
15
+ "default": false
16
+ },
13
17
  "id": {
14
18
  "type": "number"
15
19
  },
@@ -72,6 +76,7 @@
72
76
  "enum": [ "all", "insert", false ]
73
77
  }
74
78
  },
79
+ "usesContext": [ "postId", "postType" ],
75
80
  "supports": {
76
81
  "anchor": true,
77
82
  "align": true,
package/src/cover/edit.js CHANGED
@@ -9,6 +9,7 @@ import namesPlugin from 'colord/plugins/names';
9
9
  /**
10
10
  * WordPress dependencies
11
11
  */
12
+ import { useEntityProp, store as coreStore } from '@wordpress/core-data';
12
13
  import {
13
14
  Fragment,
14
15
  useEffect,
@@ -28,6 +29,7 @@ import {
28
29
  Spinner,
29
30
  TextareaControl,
30
31
  ToggleControl,
32
+ ToolbarButton,
31
33
  __experimentalUseCustomUnits as useCustomUnits,
32
34
  __experimentalBoxControl as BoxControl,
33
35
  __experimentalToolsPanelItem as ToolsPanelItem,
@@ -54,7 +56,7 @@ import {
54
56
  } from '@wordpress/block-editor';
55
57
  import { __ } from '@wordpress/i18n';
56
58
  import { useSelect, useDispatch } from '@wordpress/data';
57
- import { cover as icon } from '@wordpress/icons';
59
+ import { postFeaturedImage, cover as icon } from '@wordpress/icons';
58
60
  import { isBlobURL } from '@wordpress/blob';
59
61
  import { store as noticesStore } from '@wordpress/notices';
60
62
 
@@ -298,11 +300,12 @@ function CoverEdit( {
298
300
  setAttributes,
299
301
  setOverlayColor,
300
302
  toggleSelection,
303
+ context: { postId, postType },
301
304
  } ) {
302
305
  const {
303
306
  contentPosition,
304
307
  id,
305
- backgroundType,
308
+ useFeaturedImage,
306
309
  dimRatio,
307
310
  focalPoint,
308
311
  hasParallax,
@@ -311,11 +314,35 @@ function CoverEdit( {
311
314
  minHeight,
312
315
  minHeightUnit,
313
316
  style: styleAttribute,
314
- url,
315
317
  alt,
316
318
  allowedBlocks,
317
319
  templateLock,
318
320
  } = attributes;
321
+
322
+ const [ featuredImage ] = useEntityProp(
323
+ 'postType',
324
+ postType,
325
+ 'featured_media',
326
+ postId
327
+ );
328
+
329
+ const media = useSelect(
330
+ ( select ) =>
331
+ featuredImage &&
332
+ select( coreStore ).getMedia( featuredImage, { context: 'view' } ),
333
+ [ featuredImage ]
334
+ );
335
+ const mediaUrl = media?.source_url;
336
+
337
+ // instead of destructuring the attributes
338
+ // we define the url and background type
339
+ // depending on the value of the useFeaturedImage flag
340
+ // to preview in edit the dynamic featured image
341
+ const url = useFeaturedImage ? mediaUrl : attributes.url;
342
+ const backgroundType = useFeaturedImage
343
+ ? IMAGE_BACKGROUND_TYPE
344
+ : attributes.backgroundType;
345
+
319
346
  const { __unstableMarkNextChangeAsNotPersistent } = useDispatch(
320
347
  blockEditorStore
321
348
  );
@@ -374,6 +401,13 @@ function CoverEdit( {
374
401
  } );
375
402
  };
376
403
 
404
+ const toggleUseFeaturedImage = () => {
405
+ setAttributes( {
406
+ useFeaturedImage: ! useFeaturedImage,
407
+ dimRatio: dimRatio === 100 ? 50 : dimRatio,
408
+ } );
409
+ };
410
+
377
411
  const onUploadError = ( message ) => {
378
412
  createErrorNotice( Array.isArray( message ) ? message[ 2 ] : message, {
379
413
  type: 'snackbar',
@@ -458,14 +492,22 @@ function CoverEdit( {
458
492
  />
459
493
  </BlockControls>
460
494
  <BlockControls group="other">
461
- <MediaReplaceFlow
462
- mediaId={ id }
463
- mediaURL={ url }
464
- allowedTypes={ ALLOWED_MEDIA_TYPES }
465
- accept="image/*,video/*"
466
- onSelect={ onSelectMedia }
467
- name={ ! url ? __( 'Add Media' ) : __( 'Replace' ) }
495
+ <ToolbarButton
496
+ icon={ postFeaturedImage }
497
+ label={ __( 'Use featured image' ) }
498
+ isPressed={ useFeaturedImage }
499
+ onClick={ toggleUseFeaturedImage }
468
500
  />
501
+ { ! useFeaturedImage && (
502
+ <MediaReplaceFlow
503
+ mediaId={ id }
504
+ mediaURL={ url }
505
+ allowedTypes={ ALLOWED_MEDIA_TYPES }
506
+ accept="image/*,video/*"
507
+ onSelect={ onSelectMedia }
508
+ name={ ! url ? __( 'Add Media' ) : __( 'Replace' ) }
509
+ />
510
+ ) }
469
511
  </BlockControls>
470
512
  <InspectorControls>
471
513
  { !! url && (
@@ -499,27 +541,32 @@ function CoverEdit( {
499
541
  }
500
542
  />
501
543
  ) }
502
- { url && isImageBackground && isImgElement && (
503
- <TextareaControl
504
- label={ __( 'Alt text (alternative text)' ) }
505
- value={ alt }
506
- onChange={ ( newAlt ) =>
507
- setAttributes( { alt: newAlt } )
508
- }
509
- help={
510
- <>
511
- <ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
544
+ { ! useFeaturedImage &&
545
+ url &&
546
+ isImageBackground &&
547
+ isImgElement && (
548
+ <TextareaControl
549
+ label={ __(
550
+ 'Alt text (alternative text)'
551
+ ) }
552
+ value={ alt }
553
+ onChange={ ( newAlt ) =>
554
+ setAttributes( { alt: newAlt } )
555
+ }
556
+ help={
557
+ <>
558
+ <ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
559
+ { __(
560
+ 'Describe the purpose of the image'
561
+ ) }
562
+ </ExternalLink>
512
563
  { __(
513
- 'Describe the purpose of the image'
564
+ 'Leave empty if the image is purely decorative.'
514
565
  ) }
515
- </ExternalLink>
516
- { __(
517
- 'Leave empty if the image is purely decorative.'
518
- ) }
519
- </>
520
- }
521
- />
522
- ) }
566
+ </>
567
+ }
568
+ />
569
+ ) }
523
570
  <PanelRow>
524
571
  <Button
525
572
  variant="secondary"
@@ -533,6 +580,7 @@ function CoverEdit( {
533
580
  focalPoint: undefined,
534
581
  hasParallax: undefined,
535
582
  isRepeated: undefined,
583
+ useFeaturedImage: false,
536
584
  } )
537
585
  }
538
586
  >
@@ -0,0 +1,85 @@
1
+ <?php
2
+ /**
3
+ * Server-side rendering of the `core/cover` block.
4
+ *
5
+ * @package WordPress
6
+ */
7
+
8
+ /**
9
+ * Renders the `core/cover` block on server.
10
+ *
11
+ * @param array $attributes The block attributes.
12
+ * @param array $content The block rendered content.
13
+ *
14
+ * @return string Returns the cover block markup, if useFeaturedImage is true.
15
+ */
16
+ function render_block_core_cover( $attributes, $content ) {
17
+ if ( false === $attributes['useFeaturedImage'] ) {
18
+ return $content;
19
+ }
20
+
21
+ $current_featured_image = get_the_post_thumbnail_url();
22
+
23
+ if ( false === $current_featured_image ) {
24
+ return $content;
25
+ }
26
+
27
+ $is_img_element = ! ( $attributes['hasParallax'] || $attributes['isRepeated'] );
28
+ $is_image_background = 'image' === $attributes['backgroundType'];
29
+
30
+ if ( $is_image_background && ! $is_img_element ) {
31
+ $content = preg_replace(
32
+ '/class=\".*?\"/',
33
+ '${0} style="background-image:url(' . esc_url( $current_featured_image ) . ')"',
34
+ $content,
35
+ 1
36
+ );
37
+ }
38
+
39
+ if ( $is_image_background && $is_img_element ) {
40
+ $object_position = '';
41
+ if ( isset( $attributes['focalPoint'] ) ) {
42
+ $object_position = round( $attributes['focalPoint']['x'] * 100 ) . '%' . ' ' .
43
+ round( $attributes['focalPoint']['x'] * 100 ) . '%';
44
+ }
45
+
46
+ $image_template = '<img
47
+ class="wp-block-cover__image-background"
48
+ alt="%s"
49
+ src="%s"
50
+ style="object-position: %s"
51
+ data-object-fit="cover"
52
+ data-object-position="%s"
53
+ />';
54
+
55
+ $image = sprintf(
56
+ $image_template,
57
+ esc_attr( get_the_post_thumbnail_caption() ),
58
+ esc_url( $current_featured_image ),
59
+ esc_attr( $object_position ),
60
+ esc_attr( $object_position )
61
+ );
62
+
63
+ $content = str_replace(
64
+ '</span><div',
65
+ '</span>' . $image . '<div',
66
+ $content
67
+ );
68
+
69
+ }
70
+
71
+ return $content;
72
+ }
73
+
74
+ /**
75
+ * Registers the `core/cover` block renderer on server.
76
+ */
77
+ function register_block_core_cover() {
78
+ register_block_type_from_metadata(
79
+ __DIR__ . '/cover',
80
+ array(
81
+ 'render_callback' => 'render_block_core_cover',
82
+ )
83
+ );
84
+ }
85
+ add_action( 'init', 'register_block_core_cover' );
package/src/cover/save.js CHANGED
@@ -34,6 +34,7 @@ export default function save( { attributes } ) {
34
34
  customOverlayColor,
35
35
  dimRatio,
36
36
  focalPoint,
37
+ useFeaturedImage,
37
38
  hasParallax,
38
39
  isDark,
39
40
  isRepeated,
@@ -60,7 +61,7 @@ export default function save( { attributes } ) {
60
61
  const isImgElement = ! ( hasParallax || isRepeated );
61
62
 
62
63
  const style = {
63
- ...( isImageBackground && ! isImgElement
64
+ ...( isImageBackground && ! isImgElement && ! useFeaturedImage
64
65
  ? backgroundImageStyles( url )
65
66
  : {} ),
66
67
  minHeight: minHeight || undefined,
@@ -113,19 +114,22 @@ export default function save( { attributes } ) {
113
114
  style={ bgStyle }
114
115
  />
115
116
 
116
- { isImageBackground && isImgElement && url && (
117
- <img
118
- className={ classnames(
119
- 'wp-block-cover__image-background',
120
- id ? `wp-image-${ id }` : null
121
- ) }
122
- alt={ alt }
123
- src={ url }
124
- style={ { objectPosition } }
125
- data-object-fit="cover"
126
- data-object-position={ objectPosition }
127
- />
128
- ) }
117
+ { ! useFeaturedImage &&
118
+ isImageBackground &&
119
+ isImgElement &&
120
+ url && (
121
+ <img
122
+ className={ classnames(
123
+ 'wp-block-cover__image-background',
124
+ id ? `wp-image-${ id }` : null
125
+ ) }
126
+ alt={ alt }
127
+ src={ url }
128
+ style={ { objectPosition } }
129
+ data-object-fit="cover"
130
+ data-object-position={ objectPosition }
131
+ />
132
+ ) }
129
133
  { isVideoBackground && url && (
130
134
  <video
131
135
  className={ classnames(
@@ -64,37 +64,60 @@ const transforms = {
64
64
  {
65
65
  type: 'block',
66
66
  blocks: [ 'core/group' ],
67
- isMatch: ( { backgroundColor, gradient, style } ) => {
68
- /*
69
- * Make this transformation available only if the Group has background
70
- * or gradient set, because otherwise `Cover` block displays a Placeholder.
71
- *
72
- * This helps avoid arbitrary decisions about the Cover block's background
73
- * and user confusion about the existence of previous content.
74
- */
75
- return (
67
+ transform: ( attributes, innerBlocks ) => {
68
+ const {
69
+ align,
70
+ anchor,
71
+ backgroundColor,
72
+ gradient,
73
+ style,
74
+ } = attributes;
75
+
76
+ // If no background or gradient color is provided, default to 50% opacity.
77
+ // This matches the styling of a Cover block with a background image,
78
+ // in the state where a background image has been removed.
79
+ const dimRatio =
76
80
  backgroundColor ||
81
+ gradient ||
77
82
  style?.color?.background ||
78
- style?.color?.gradient ||
79
- gradient
80
- );
81
- },
82
- transform: (
83
- { align, anchor, backgroundColor, gradient, style },
84
- innerBlocks
85
- ) => {
86
- return createBlock(
87
- 'core/cover',
88
- {
89
- align,
90
- anchor,
91
- overlayColor: backgroundColor,
92
- customOverlayColor: style?.color?.background,
93
- gradient,
94
- customGradient: style?.color?.gradient,
83
+ style?.color?.gradient
84
+ ? undefined
85
+ : 50;
86
+
87
+ // Move the background or gradient color to the parent Cover block.
88
+ const parentAttributes = {
89
+ align,
90
+ anchor,
91
+ dimRatio,
92
+ overlayColor: backgroundColor,
93
+ customOverlayColor: style?.color?.background,
94
+ gradient,
95
+ customGradient: style?.color?.gradient,
96
+ };
97
+
98
+ const attributesWithoutBackgroundColors = {
99
+ ...attributes,
100
+ backgroundColor: undefined,
101
+ gradient: undefined,
102
+ style: {
103
+ ...attributes?.style,
104
+ color: {
105
+ ...attributes?.style?.color,
106
+ background: undefined,
107
+ gradient: undefined,
108
+ },
95
109
  },
96
- innerBlocks
97
- );
110
+ };
111
+
112
+ // Preserve the block by nesting it within the Cover block,
113
+ // instead of converting the Group block directly to the Cover block.
114
+ return createBlock( 'core/cover', parentAttributes, [
115
+ createBlock(
116
+ 'core/group',
117
+ attributesWithoutBackgroundColors,
118
+ innerBlocks
119
+ ),
120
+ ] );
98
121
  },
99
122
  },
100
123
  ],
@@ -111,6 +111,7 @@
111
111
  "units": [ "px", "em", "rem", "vh", "vw" ],
112
112
  "spacing": {
113
113
  "blockGap": true,
114
+ "__experimentalSkipSerialization": [ "blockGap" ],
114
115
  "__experimentalDefaultControls": {
115
116
  "blockGap": true
116
117
  }
@@ -6,10 +6,15 @@ import { useContext, createPortal } from '@wordpress/element';
6
6
 
7
7
  export default function GapStyles( { blockGap, clientId } ) {
8
8
  const styleElement = useContext( BlockList.__unstableElementContext );
9
-
10
- const gap = blockGap
11
- ? `#block-${ clientId } { --wp--style--unstable-gallery-gap: ${ blockGap } }`
12
- : `#block-${ clientId } { --wp--style--unstable-gallery-gap: var( --wp--style--block-gap, 0.5em ) }`;
9
+ // --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default
10
+ // gap on the gallery.
11
+ const gapValue = blockGap
12
+ ? blockGap
13
+ : `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
14
+ const gap = `#block-${ clientId } {
15
+ --wp--style--unstable-gallery-gap: ${ gapValue };
16
+ gap: ${ gapValue }
17
+ }`;
13
18
 
14
19
  const GapStyle = () => {
15
20
  return <style>{ gap }</style>;
@@ -48,17 +48,18 @@ function block_core_gallery_render( $attributes, $content ) {
48
48
  // Skip if gap value contains unsupported characters.
49
49
  // Regex for CSS value borrowed from `safecss_filter_attr`, and used here
50
50
  // because we only want to match against the value, not the CSS attribute.
51
- $gap = preg_match( '%[\\\(&=}]|/\*%', $gap ) ? null : $gap;
52
- $id = uniqid();
53
- $class = 'wp-block-gallery-' . $id;
54
- $content = preg_replace(
51
+ $gap = preg_match( '%[\\\(&=}]|/\*%', $gap ) ? null : $gap;
52
+ $class = wp_unique_id( 'wp-block-gallery-' );
53
+ $content = preg_replace(
55
54
  '/' . preg_quote( 'class="', '/' ) . '/',
56
55
  'class="' . $class . ' ',
57
56
  $content,
58
57
  1
59
58
  );
60
- $gap_value = $gap ? $gap : 'var( --wp--style--block-gap, 0.5em )';
61
- $style = '.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_value . '}';
59
+ // --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default
60
+ // gap on the gallery.
61
+ $gap_value = $gap ? $gap : 'var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )';
62
+ $style = '.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_value . '; gap: ' . $gap_value . '}';
62
63
  // Ideally styles should be loaded in the head, but blocks may be parsed
63
64
  // after that, so loading in the footer for now.
64
65
  // See https://core.trac.wordpress.org/ticket/53494.
@@ -4,7 +4,7 @@
4
4
  "name": "core/group",
5
5
  "title": "Group",
6
6
  "category": "design",
7
- "description": "Combine blocks into a group.",
7
+ "description": "Gather blocks in a layout container.",
8
8
  "keywords": [ "container", "wrapper", "row", "section" ],
9
9
  "textdomain": "default",
10
10
  "attributes": {
@@ -61,9 +61,7 @@
61
61
  "fontSize": true
62
62
  }
63
63
  },
64
- "__experimentalLayout": {
65
- "allowOrientation": false
66
- }
64
+ "__experimentalLayout": true
67
65
  },
68
66
  "editorStyle": "wp-block-group-editor",
69
67
  "style": "wp-block-group"
package/src/group/edit.js CHANGED
@@ -52,7 +52,10 @@ function GroupEdit( { attributes, setAttributes, clientId } ) {
52
52
  const { type = 'default' } = usedLayout;
53
53
  const layoutSupportEnabled = themeSupportsLayout || type !== 'default';
54
54
 
55
- const blockProps = useBlockProps();
55
+ const blockProps = useBlockProps( {
56
+ className: `is-layout-${ type }`,
57
+ } );
58
+
56
59
  const innerBlocksProps = useInnerBlocksProps(
57
60
  layoutSupportEnabled
58
61
  ? blockProps
@@ -22,3 +22,34 @@
22
22
  margin-bottom: $block-padding + $grid-unit-05;
23
23
  }
24
24
  }
25
+
26
+ // Affect the appender of the Row and Stack variants.
27
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child {
28
+ gap: inherit;
29
+
30
+ &,
31
+ .block-editor-default-block-appender__content,
32
+ .block-editor-inserter {
33
+ display: inherit;
34
+ width: 100%;
35
+ flex-direction: inherit;
36
+ flex: 1;
37
+ }
38
+
39
+ &::after {
40
+ content: "";
41
+ display: flex;
42
+ border: $border-width dashed currentColor;
43
+ opacity: 0.4;
44
+ border-radius: $radius-block-ui;
45
+ flex: 1;
46
+ pointer-events: none;
47
+ min-height: $grid-unit-60;
48
+ }
49
+
50
+ // Let the parent be selectable in the placeholder area.
51
+ pointer-events: none;
52
+ .block-editor-inserter {
53
+ pointer-events: all;
54
+ }
55
+ }
@@ -2,26 +2,43 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
+ import { group, row, stack } from '@wordpress/icons';
5
6
 
6
7
  const variations = [
7
8
  {
8
9
  name: 'group',
9
10
  title: __( 'Group' ),
10
- description: __( 'Blocks shown in a column.' ),
11
+ description: __( 'Gather blocks in a layout container.' ),
11
12
  attributes: { layout: { type: 'default' } },
12
13
  scope: [ 'transform' ],
13
14
  isActive: ( blockAttributes ) =>
14
15
  ! blockAttributes.layout ||
16
+ ! blockAttributes.layout?.type ||
15
17
  blockAttributes.layout?.type === 'default',
18
+ icon: group,
16
19
  },
17
20
  {
18
21
  name: 'group-row',
19
22
  title: __( 'Row' ),
20
- description: __( 'Blocks shown in a row.' ),
21
- attributes: { layout: { type: 'flex' } },
23
+ description: __( 'Arrange blocks horizontally.' ),
24
+ attributes: { layout: { type: 'flex', flexWrap: 'nowrap' } },
22
25
  scope: [ 'inserter', 'transform' ],
23
26
  isActive: ( blockAttributes ) =>
24
- blockAttributes.layout?.type === 'flex',
27
+ blockAttributes.layout?.type === 'flex' &&
28
+ ( ! blockAttributes.layout?.orientation ||
29
+ blockAttributes.layout?.orientation === 'horizontal' ),
30
+ icon: row,
31
+ },
32
+ {
33
+ name: 'group-stack',
34
+ title: __( 'Stack' ),
35
+ description: __( 'Arrange blocks vertically.' ),
36
+ attributes: { layout: { type: 'flex', orientation: 'vertical' } },
37
+ scope: [ 'inserter', 'transform' ],
38
+ isActive: ( blockAttributes ) =>
39
+ blockAttributes.layout?.type === 'flex' &&
40
+ blockAttributes.layout?.orientation === 'vertical',
41
+ icon: stack,
25
42
  },
26
43
  ];
27
44
 
@@ -45,7 +45,7 @@ function HeadingEdit( {
45
45
  const settings = select( blockEditorStore ).getSettings();
46
46
 
47
47
  return {
48
- canGenerateAnchors: !! settings.__experimentalGenerateAnchors,
48
+ canGenerateAnchors: !! settings.generateAnchors,
49
49
  };
50
50
  }, [] );
51
51
 
@@ -4,9 +4,6 @@ h3,
4
4
  h4,
5
5
  h5,
6
6
  h6 {
7
- // Break long strings of text without spaces so they don't overflow the block.
8
- overflow-wrap: break-word;
9
-
10
7
  &.has-background {
11
8
  padding: $block-bg-padding--v $block-bg-padding--h;
12
9
  }