@wordpress/block-library 9.15.1 → 9.17.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 (441) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/archives/edit.js +2 -2
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/button/edit.js +2 -1
  5. package/build/button/edit.js.map +1 -1
  6. package/build/categories/edit.js +115 -37
  7. package/build/categories/edit.js.map +1 -1
  8. package/build/columns/edit.js +1 -1
  9. package/build/columns/edit.js.map +1 -1
  10. package/build/columns/edit.native.js +1 -1
  11. package/build/columns/edit.native.js.map +1 -1
  12. package/build/comment-template/edit.js +2 -2
  13. package/build/comment-template/edit.js.map +1 -1
  14. package/build/comments/edit/comments-inspector-controls.js +6 -5
  15. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  16. package/build/comments-pagination/index.js +5 -0
  17. package/build/comments-pagination/index.js.map +1 -1
  18. package/build/comments-pagination-next/index.js +7 -6
  19. package/build/comments-pagination-next/index.js.map +1 -1
  20. package/build/comments-pagination-previous/index.js +7 -6
  21. package/build/comments-pagination-previous/index.js.map +1 -1
  22. package/build/cover/deprecated.js +1 -1
  23. package/build/cover/deprecated.js.map +1 -1
  24. package/build/cover/edit/inspector-controls.js +2 -9
  25. package/build/cover/edit/inspector-controls.js.map +1 -1
  26. package/build/details/edit.js +27 -18
  27. package/build/details/edit.js.map +1 -1
  28. package/build/details/index.js +12 -0
  29. package/build/details/index.js.map +1 -1
  30. package/build/details/save.js +2 -0
  31. package/build/details/save.js.map +1 -1
  32. package/build/embed/transforms.js +5 -2
  33. package/build/embed/transforms.js.map +1 -1
  34. package/build/embed/util.js +1 -1
  35. package/build/embed/util.js.map +1 -1
  36. package/build/file/edit.js +7 -4
  37. package/build/file/edit.js.map +1 -1
  38. package/build/file/transforms.js +1 -1
  39. package/build/file/transforms.js.map +1 -1
  40. package/build/file/utils/index.js +1 -1
  41. package/build/file/utils/index.js.map +1 -1
  42. package/build/form/variations.js +1 -1
  43. package/build/form/variations.js.map +1 -1
  44. package/build/form-input/edit.js +1 -1
  45. package/build/form-input/edit.js.map +1 -1
  46. package/build/gallery/edit.js +1 -1
  47. package/build/gallery/edit.js.map +1 -1
  48. package/build/gallery/transforms.js +2 -2
  49. package/build/gallery/transforms.js.map +1 -1
  50. package/build/gallery/use-get-new-images.js +1 -1
  51. package/build/gallery/use-get-new-images.js.map +1 -1
  52. package/build/group/edit.js +2 -9
  53. package/build/group/edit.js.map +1 -1
  54. package/build/home-link/edit.js +1 -2
  55. package/build/home-link/edit.js.map +1 -1
  56. package/build/latest-comments/edit.js +73 -26
  57. package/build/latest-comments/edit.js.map +1 -1
  58. package/build/latest-posts/constants.js +2 -1
  59. package/build/latest-posts/constants.js.map +1 -1
  60. package/build/latest-posts/edit.js +91 -38
  61. package/build/latest-posts/edit.js.map +1 -1
  62. package/build/list-item/edit.native.js +2 -2
  63. package/build/list-item/edit.native.js.map +1 -1
  64. package/build/list-item/index.js +1 -1
  65. package/build/media-text/edit.native.js +2 -2
  66. package/build/media-text/edit.native.js.map +1 -1
  67. package/build/media-text/media-container.native.js +4 -4
  68. package/build/media-text/media-container.native.js.map +1 -1
  69. package/build/navigation/edit/index.js +8 -4
  70. package/build/navigation/edit/index.js.map +1 -1
  71. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  72. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  73. package/build/navigation/edit/use-generate-default-navigation-title.js +4 -4
  74. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  75. package/build/navigation/index.js +15 -0
  76. package/build/navigation/index.js.map +1 -1
  77. package/build/navigation-link/edit.js +15 -20
  78. package/build/navigation-link/edit.js.map +1 -1
  79. package/build/navigation-link/link-ui.js +9 -18
  80. package/build/navigation-link/link-ui.js.map +1 -1
  81. package/build/navigation-submenu/edit.js +1 -1
  82. package/build/navigation-submenu/edit.js.map +1 -1
  83. package/build/navigation-submenu/index.js +7 -0
  84. package/build/navigation-submenu/index.js.map +1 -1
  85. package/build/page-list/edit.js +1 -1
  86. package/build/page-list/edit.js.map +1 -1
  87. package/build/page-list/index.js +11 -0
  88. package/build/page-list/index.js.map +1 -1
  89. package/build/paragraph/edit.js +4 -14
  90. package/build/paragraph/edit.js.map +1 -1
  91. package/build/pattern/index.js +1 -1
  92. package/build/post-author-name/edit.js +41 -12
  93. package/build/post-author-name/edit.js.map +1 -1
  94. package/build/post-comments-link/index.js +7 -1
  95. package/build/post-comments-link/index.js.map +1 -1
  96. package/build/post-content/index.js +1 -0
  97. package/build/post-content/index.js.map +1 -1
  98. package/build/post-date/edit.js +1 -1
  99. package/build/post-date/edit.js.map +1 -1
  100. package/build/post-featured-image/edit.js +0 -6
  101. package/build/post-featured-image/edit.js.map +1 -1
  102. package/build/post-featured-image/overlay-controls.js +2 -1
  103. package/build/post-featured-image/overlay-controls.js.map +1 -1
  104. package/build/post-navigation-link/variations.js +2 -2
  105. package/build/post-navigation-link/variations.js.map +1 -1
  106. package/build/post-terms/edit.js +1 -0
  107. package/build/post-terms/edit.js.map +1 -1
  108. package/build/post-time-to-read/index.js +1 -1
  109. package/build/query/edit/inspector-controls/author-control.js +1 -1
  110. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  111. package/build/query/edit/inspector-controls/index.js +110 -61
  112. package/build/query/edit/inspector-controls/index.js.map +1 -1
  113. package/build/query/edit/query-content.js +2 -6
  114. package/build/query/edit/query-content.js.map +1 -1
  115. package/build/query/utils.js +1 -1
  116. package/build/query/utils.js.map +1 -1
  117. package/build/query-no-results/index.js +1 -1
  118. package/build/query-pagination-numbers/edit.js +1 -1
  119. package/build/query-pagination-numbers/edit.js.map +1 -1
  120. package/build/query-title/edit.js +40 -14
  121. package/build/query-title/edit.js.map +1 -1
  122. package/build/query-total/index.js +7 -1
  123. package/build/query-total/index.js.map +1 -1
  124. package/build/quote/transforms.js +1 -1
  125. package/build/quote/transforms.js.map +1 -1
  126. package/build/read-more/edit.js +25 -7
  127. package/build/read-more/edit.js.map +1 -1
  128. package/build/rss/edit.js +1 -0
  129. package/build/rss/edit.js.map +1 -1
  130. package/build/rss/index.js +6 -0
  131. package/build/rss/index.js.map +1 -1
  132. package/build/search/edit.js +67 -48
  133. package/build/search/edit.js.map +1 -1
  134. package/build/separator/edit.js +2 -4
  135. package/build/separator/edit.js.map +1 -1
  136. package/build/site-logo/edit.js +26 -35
  137. package/build/site-logo/edit.js.map +1 -1
  138. package/build/social-links/edit.js +2 -1
  139. package/build/social-links/edit.js.map +1 -1
  140. package/build/spacer/controls.js +13 -9
  141. package/build/spacer/controls.js.map +1 -1
  142. package/build/spacer/edit.js +23 -21
  143. package/build/spacer/edit.js.map +1 -1
  144. package/build/table-of-contents/edit.js +24 -8
  145. package/build/table-of-contents/edit.js.map +1 -1
  146. package/build/template-part/edit/advanced-controls.js +2 -9
  147. package/build/template-part/edit/advanced-controls.js.map +1 -1
  148. package/build/utils/messages.js +22 -0
  149. package/build/utils/messages.js.map +1 -0
  150. package/build/video/edit-common-settings.js +1 -1
  151. package/build/video/edit-common-settings.js.map +1 -1
  152. package/build/video/edit.native.js +3 -3
  153. package/build/video/edit.native.js.map +1 -1
  154. package/build-module/archives/edit.js +2 -2
  155. package/build-module/archives/edit.js.map +1 -1
  156. package/build-module/button/edit.js +3 -2
  157. package/build-module/button/edit.js.map +1 -1
  158. package/build-module/categories/edit.js +116 -38
  159. package/build-module/categories/edit.js.map +1 -1
  160. package/build-module/columns/edit.js +1 -1
  161. package/build-module/columns/edit.js.map +1 -1
  162. package/build-module/columns/edit.native.js +1 -1
  163. package/build-module/columns/edit.native.js.map +1 -1
  164. package/build-module/comment-template/edit.js +2 -2
  165. package/build-module/comment-template/edit.js.map +1 -1
  166. package/build-module/comments/edit/comments-inspector-controls.js +5 -4
  167. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  168. package/build-module/comments-pagination/index.js +5 -0
  169. package/build-module/comments-pagination/index.js.map +1 -1
  170. package/build-module/comments-pagination-next/index.js +7 -6
  171. package/build-module/comments-pagination-next/index.js.map +1 -1
  172. package/build-module/comments-pagination-previous/index.js +7 -6
  173. package/build-module/comments-pagination-previous/index.js.map +1 -1
  174. package/build-module/cover/deprecated.js +1 -1
  175. package/build-module/cover/deprecated.js.map +1 -1
  176. package/build-module/cover/edit/inspector-controls.js +1 -8
  177. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  178. package/build-module/details/edit.js +29 -20
  179. package/build-module/details/edit.js.map +1 -1
  180. package/build-module/details/index.js +12 -0
  181. package/build-module/details/index.js.map +1 -1
  182. package/build-module/details/save.js +2 -0
  183. package/build-module/details/save.js.map +1 -1
  184. package/build-module/embed/transforms.js +5 -2
  185. package/build-module/embed/transforms.js.map +1 -1
  186. package/build-module/embed/util.js +1 -1
  187. package/build-module/embed/util.js.map +1 -1
  188. package/build-module/file/edit.js +7 -4
  189. package/build-module/file/edit.js.map +1 -1
  190. package/build-module/file/transforms.js +1 -1
  191. package/build-module/file/transforms.js.map +1 -1
  192. package/build-module/file/utils/index.js +1 -1
  193. package/build-module/file/utils/index.js.map +1 -1
  194. package/build-module/form/variations.js +1 -1
  195. package/build-module/form/variations.js.map +1 -1
  196. package/build-module/form-input/edit.js +1 -1
  197. package/build-module/form-input/edit.js.map +1 -1
  198. package/build-module/gallery/edit.js +1 -1
  199. package/build-module/gallery/edit.js.map +1 -1
  200. package/build-module/gallery/transforms.js +2 -2
  201. package/build-module/gallery/transforms.js.map +1 -1
  202. package/build-module/gallery/use-get-new-images.js +1 -1
  203. package/build-module/gallery/use-get-new-images.js.map +1 -1
  204. package/build-module/group/edit.js +1 -8
  205. package/build-module/group/edit.js.map +1 -1
  206. package/build-module/home-link/edit.js +1 -2
  207. package/build-module/home-link/edit.js.map +1 -1
  208. package/build-module/latest-comments/edit.js +74 -27
  209. package/build-module/latest-comments/edit.js.map +1 -1
  210. package/build-module/latest-posts/constants.js +1 -0
  211. package/build-module/latest-posts/constants.js.map +1 -1
  212. package/build-module/latest-posts/edit.js +93 -40
  213. package/build-module/latest-posts/edit.js.map +1 -1
  214. package/build-module/list-item/edit.native.js +2 -2
  215. package/build-module/list-item/edit.native.js.map +1 -1
  216. package/build-module/list-item/index.js +1 -1
  217. package/build-module/media-text/edit.native.js +2 -2
  218. package/build-module/media-text/edit.native.js.map +1 -1
  219. package/build-module/media-text/media-container.native.js +4 -4
  220. package/build-module/media-text/media-container.native.js.map +1 -1
  221. package/build-module/navigation/edit/index.js +8 -4
  222. package/build-module/navigation/edit/index.js.map +1 -1
  223. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  224. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  225. package/build-module/navigation/edit/use-generate-default-navigation-title.js +4 -4
  226. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  227. package/build-module/navigation/index.js +15 -0
  228. package/build-module/navigation/index.js.map +1 -1
  229. package/build-module/navigation-link/edit.js +16 -21
  230. package/build-module/navigation-link/edit.js.map +1 -1
  231. package/build-module/navigation-link/link-ui.js +9 -18
  232. package/build-module/navigation-link/link-ui.js.map +1 -1
  233. package/build-module/navigation-submenu/edit.js +1 -1
  234. package/build-module/navigation-submenu/edit.js.map +1 -1
  235. package/build-module/navigation-submenu/index.js +7 -0
  236. package/build-module/navigation-submenu/index.js.map +1 -1
  237. package/build-module/page-list/edit.js +1 -1
  238. package/build-module/page-list/edit.js.map +1 -1
  239. package/build-module/page-list/index.js +11 -0
  240. package/build-module/page-list/index.js.map +1 -1
  241. package/build-module/paragraph/edit.js +5 -15
  242. package/build-module/paragraph/edit.js.map +1 -1
  243. package/build-module/pattern/index.js +1 -1
  244. package/build-module/post-author-name/edit.js +42 -13
  245. package/build-module/post-author-name/edit.js.map +1 -1
  246. package/build-module/post-comments-link/index.js +7 -1
  247. package/build-module/post-comments-link/index.js.map +1 -1
  248. package/build-module/post-content/index.js +1 -0
  249. package/build-module/post-content/index.js.map +1 -1
  250. package/build-module/post-date/edit.js +1 -1
  251. package/build-module/post-date/edit.js.map +1 -1
  252. package/build-module/post-featured-image/edit.js +0 -6
  253. package/build-module/post-featured-image/edit.js.map +1 -1
  254. package/build-module/post-featured-image/overlay-controls.js +2 -1
  255. package/build-module/post-featured-image/overlay-controls.js.map +1 -1
  256. package/build-module/post-navigation-link/variations.js +2 -2
  257. package/build-module/post-navigation-link/variations.js.map +1 -1
  258. package/build-module/post-terms/edit.js +1 -0
  259. package/build-module/post-terms/edit.js.map +1 -1
  260. package/build-module/post-time-to-read/index.js +1 -1
  261. package/build-module/query/edit/inspector-controls/author-control.js +1 -1
  262. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  263. package/build-module/query/edit/inspector-controls/index.js +111 -62
  264. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  265. package/build-module/query/edit/query-content.js +1 -5
  266. package/build-module/query/edit/query-content.js.map +1 -1
  267. package/build-module/query/utils.js +1 -1
  268. package/build-module/query/utils.js.map +1 -1
  269. package/build-module/query-no-results/index.js +1 -1
  270. package/build-module/query-pagination-numbers/edit.js +1 -1
  271. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  272. package/build-module/query-title/edit.js +41 -15
  273. package/build-module/query-title/edit.js.map +1 -1
  274. package/build-module/query-total/index.js +7 -1
  275. package/build-module/query-total/index.js.map +1 -1
  276. package/build-module/quote/transforms.js +1 -1
  277. package/build-module/quote/transforms.js.map +1 -1
  278. package/build-module/read-more/edit.js +26 -8
  279. package/build-module/read-more/edit.js.map +1 -1
  280. package/build-module/rss/edit.js +1 -0
  281. package/build-module/rss/edit.js.map +1 -1
  282. package/build-module/rss/index.js +6 -0
  283. package/build-module/rss/index.js.map +1 -1
  284. package/build-module/search/edit.js +69 -50
  285. package/build-module/search/edit.js.map +1 -1
  286. package/build-module/separator/edit.js +1 -3
  287. package/build-module/separator/edit.js.map +1 -1
  288. package/build-module/site-logo/edit.js +27 -36
  289. package/build-module/site-logo/edit.js.map +1 -1
  290. package/build-module/social-links/edit.js +2 -1
  291. package/build-module/social-links/edit.js.map +1 -1
  292. package/build-module/spacer/controls.js +13 -9
  293. package/build-module/spacer/controls.js.map +1 -1
  294. package/build-module/spacer/edit.js +24 -22
  295. package/build-module/spacer/edit.js.map +1 -1
  296. package/build-module/table-of-contents/edit.js +25 -9
  297. package/build-module/table-of-contents/edit.js.map +1 -1
  298. package/build-module/template-part/edit/advanced-controls.js +1 -8
  299. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  300. package/build-module/utils/messages.js +15 -0
  301. package/build-module/utils/messages.js.map +1 -0
  302. package/build-module/video/edit-common-settings.js +1 -1
  303. package/build-module/video/edit-common-settings.js.map +1 -1
  304. package/build-module/video/edit.native.js +3 -3
  305. package/build-module/video/edit.native.js.map +1 -1
  306. package/build-style/editor-rtl.css +12 -86
  307. package/build-style/editor.css +12 -86
  308. package/build-style/freeform/editor-rtl.css +2 -4
  309. package/build-style/freeform/editor.css +2 -4
  310. package/build-style/gallery/editor-rtl.css +0 -46
  311. package/build-style/gallery/editor.css +0 -46
  312. package/build-style/image/style-rtl.css +24 -10
  313. package/build-style/image/style.css +24 -10
  314. package/build-style/navigation/style-rtl.css +8 -6
  315. package/build-style/navigation/style.css +8 -6
  316. package/build-style/navigation-link/editor-rtl.css +3 -0
  317. package/build-style/navigation-link/editor.css +3 -0
  318. package/build-style/paragraph/editor-rtl.css +4 -0
  319. package/build-style/paragraph/editor.css +4 -0
  320. package/build-style/post-featured-image/editor-rtl.css +1 -1
  321. package/build-style/post-featured-image/editor.css +1 -1
  322. package/build-style/query/editor-rtl.css +0 -27
  323. package/build-style/query/editor.css +0 -27
  324. package/build-style/site-logo/editor-rtl.css +2 -8
  325. package/build-style/site-logo/editor.css +2 -8
  326. package/build-style/social-links/style-rtl.css +2 -5
  327. package/build-style/social-links/style.css +2 -5
  328. package/build-style/style-rtl.css +34 -21
  329. package/build-style/style.css +34 -21
  330. package/package.json +35 -35
  331. package/src/archives/edit.js +2 -2
  332. package/src/audio/test/transforms.native.js +4 -3
  333. package/src/button/edit.js +6 -2
  334. package/src/categories/edit.js +133 -45
  335. package/src/columns/edit.js +1 -1
  336. package/src/columns/edit.native.js +1 -1
  337. package/src/comment-template/edit.js +2 -2
  338. package/src/comments/edit/comments-inspector-controls.js +5 -8
  339. package/src/comments-pagination/block.json +5 -0
  340. package/src/comments-pagination-next/block.json +0 -5
  341. package/src/comments-pagination-next/index.js +6 -0
  342. package/src/comments-pagination-previous/block.json +0 -5
  343. package/src/comments-pagination-previous/index.js +6 -0
  344. package/src/cover/deprecated.js +1 -1
  345. package/src/cover/edit/inspector-controls.js +1 -21
  346. package/src/cover/test/__snapshots__/edit.native.js.snap +1 -1
  347. package/src/cover/test/edit.js +7 -7
  348. package/src/cover/test/edit.native.js +2 -2
  349. package/src/cover/test/transforms.native.js +9 -5
  350. package/src/details/block.json +12 -0
  351. package/src/details/edit.js +29 -24
  352. package/src/details/save.js +6 -2
  353. package/src/editor.scss +1 -1
  354. package/src/embed/test/index.js +1 -1
  355. package/src/embed/transforms.js +3 -1
  356. package/src/embed/util.js +1 -1
  357. package/src/file/edit.js +4 -3
  358. package/src/file/test/transforms.native.js +4 -3
  359. package/src/file/transforms.js +1 -1
  360. package/src/file/utils/index.js +1 -1
  361. package/src/form/variations.js +1 -1
  362. package/src/form-input/edit.js +1 -1
  363. package/src/freeform/editor.scss +4 -3
  364. package/src/gallery/edit.js +1 -1
  365. package/src/gallery/editor.scss +0 -54
  366. package/src/gallery/test/transforms.native.js +4 -3
  367. package/src/gallery/transforms.js +2 -2
  368. package/src/gallery/use-get-new-images.js +1 -1
  369. package/src/group/edit.js +1 -20
  370. package/src/home-link/edit.js +0 -6
  371. package/src/image/block.json +8 -1
  372. package/src/image/editor.scss +1 -1
  373. package/src/image/index.php +9 -13
  374. package/src/image/style.scss +17 -7
  375. package/src/image/test/edit.native.js +1 -1
  376. package/src/image/test/transforms.native.js +4 -3
  377. package/src/latest-comments/edit.js +93 -33
  378. package/src/latest-posts/constants.js +1 -0
  379. package/src/latest-posts/edit.js +119 -44
  380. package/src/list/test/edit.native.js +10 -10
  381. package/src/list-item/block.json +1 -1
  382. package/src/list-item/edit.native.js +2 -2
  383. package/src/media-text/edit.native.js +2 -2
  384. package/src/media-text/media-container.native.js +4 -4
  385. package/src/media-text/test/transforms.native.js +9 -5
  386. package/src/navigation/edit/index.js +4 -0
  387. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  388. package/src/navigation/edit/use-generate-default-navigation-title.js +4 -4
  389. package/src/navigation/index.js +20 -0
  390. package/src/navigation/style.scss +7 -4
  391. package/src/navigation-link/edit.js +26 -30
  392. package/src/navigation-link/editor.scss +27 -18
  393. package/src/navigation-link/link-ui.js +7 -13
  394. package/src/navigation-submenu/edit.js +1 -1
  395. package/src/navigation-submenu/index.js +7 -0
  396. package/src/navigation-submenu/index.php +21 -4
  397. package/src/page-list/block.json +11 -0
  398. package/src/page-list/edit.js +52 -50
  399. package/src/paragraph/edit.js +3 -18
  400. package/src/paragraph/editor.scss +7 -0
  401. package/src/paragraph/style.scss +1 -1
  402. package/src/pattern/block.json +1 -1
  403. package/src/post-author-name/edit.js +53 -15
  404. package/src/post-comments-link/block.json +7 -1
  405. package/src/post-content/block.json +2 -1
  406. package/src/post-date/edit.js +1 -3
  407. package/src/post-featured-image/edit.js +2 -15
  408. package/src/post-featured-image/editor.scss +2 -2
  409. package/src/post-featured-image/overlay-controls.js +1 -0
  410. package/src/post-navigation-link/variations.js +2 -2
  411. package/src/post-terms/edit.js +1 -0
  412. package/src/post-time-to-read/block.json +1 -1
  413. package/src/query/edit/inspector-controls/author-control.js +1 -1
  414. package/src/query/edit/inspector-controls/index.js +148 -88
  415. package/src/query/edit/query-content.js +1 -11
  416. package/src/query/editor.scss +0 -31
  417. package/src/query/utils.js +1 -1
  418. package/src/query-no-results/block.json +1 -1
  419. package/src/query-pagination-numbers/edit.js +1 -1
  420. package/src/query-title/edit.js +61 -19
  421. package/src/query-total/block.json +7 -1
  422. package/src/quote/transforms.js +1 -1
  423. package/src/read-more/edit.js +35 -11
  424. package/src/rss/block.json +6 -0
  425. package/src/rss/edit.js +1 -0
  426. package/src/search/edit.js +100 -71
  427. package/src/separator/deprecated.scss +1 -1
  428. package/src/separator/edit.js +1 -6
  429. package/src/site-logo/edit.js +34 -47
  430. package/src/site-logo/editor.scss +3 -6
  431. package/src/social-link/index.php +2 -2
  432. package/src/social-links/edit.js +1 -0
  433. package/src/social-links/style.scss +3 -3
  434. package/src/spacer/controls.js +10 -9
  435. package/src/spacer/edit.js +25 -23
  436. package/src/table-of-contents/edit.js +38 -19
  437. package/src/template-part/edit/advanced-controls.js +1 -21
  438. package/src/utils/messages.js +31 -0
  439. package/src/video/edit-common-settings.js +1 -1
  440. package/src/video/edit.native.js +3 -3
  441. package/src/video/test/transforms.native.js +4 -3
@@ -22,3 +22,10 @@
22
22
  .block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"] {
23
23
  rotate: 180deg;
24
24
  }
25
+
26
+ // Hide the placeholder when the editor is in zoomed out mode.
27
+ .is-zoomed-out .block-editor-block-list__block[data-empty="true"] {
28
+ [data-rich-text-placeholder] {
29
+ opacity: 0;
30
+ }
31
+ }
@@ -44,7 +44,7 @@ p.has-drop-cap.has-background {
44
44
  }
45
45
 
46
46
  // Use :where to contain the specificity of this rule
47
- // so it's easily overrideable by any theme that targets
47
+ // so it's easily overridable by any theme that targets
48
48
  // links using the a element.
49
49
  // For example, this is what global styles does.
50
50
  :where(p.has-text-color:not(.has-link-color)) a {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://schemas.wp.org/trunk/block.json",
3
3
  "apiVersion": 3,
4
4
  "name": "core/pattern",
5
- "title": "Pattern placeholder",
5
+ "title": "Pattern Placeholder",
6
6
  "category": "theme",
7
7
  "description": "Show a block pattern.",
8
8
  "supports": {
@@ -15,7 +15,16 @@ import {
15
15
  import { useSelect } from '@wordpress/data';
16
16
  import { __, sprintf } from '@wordpress/i18n';
17
17
  import { store as coreStore } from '@wordpress/core-data';
18
- import { PanelBody, ToggleControl } from '@wordpress/components';
18
+ import {
19
+ ToggleControl,
20
+ __experimentalToolsPanel as ToolsPanel,
21
+ __experimentalToolsPanelItem as ToolsPanelItem,
22
+ } from '@wordpress/components';
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
19
28
 
20
29
  function PostAuthorNameEdit( {
21
30
  context: { postType, postId },
@@ -61,6 +70,8 @@ function PostAuthorNameEdit( {
61
70
  displayName
62
71
  );
63
72
 
73
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
74
+
64
75
  return (
65
76
  <>
66
77
  <BlockControls group="block">
@@ -72,26 +83,53 @@ function PostAuthorNameEdit( {
72
83
  />
73
84
  </BlockControls>
74
85
  <InspectorControls>
75
- <PanelBody title={ __( 'Settings' ) }>
76
- <ToggleControl
77
- __nextHasNoMarginBottom
86
+ <ToolsPanel
87
+ label={ __( 'Settings' ) }
88
+ resetAll={ () => {
89
+ setAttributes( {
90
+ isLink: false,
91
+ linkTarget: '_self',
92
+ } );
93
+ } }
94
+ dropdownMenuProps={ dropdownMenuProps }
95
+ >
96
+ <ToolsPanelItem
78
97
  label={ __( 'Link to author archive' ) }
79
- onChange={ () => setAttributes( { isLink: ! isLink } ) }
80
- checked={ isLink }
81
- />
82
- { isLink && (
98
+ isShownByDefault
99
+ hasValue={ () => isLink }
100
+ onDeselect={ () => setAttributes( { isLink: false } ) }
101
+ >
83
102
  <ToggleControl
84
103
  __nextHasNoMarginBottom
85
- label={ __( 'Open in new tab' ) }
86
- onChange={ ( value ) =>
87
- setAttributes( {
88
- linkTarget: value ? '_blank' : '_self',
89
- } )
104
+ label={ __( 'Link to author archive' ) }
105
+ onChange={ () =>
106
+ setAttributes( { isLink: ! isLink } )
90
107
  }
91
- checked={ linkTarget === '_blank' }
108
+ checked={ isLink }
92
109
  />
110
+ </ToolsPanelItem>
111
+ { isLink && (
112
+ <ToolsPanelItem
113
+ label={ __( 'Open in new tab' ) }
114
+ isShownByDefault
115
+ hasValue={ () => linkTarget !== '_self' }
116
+ onDeselect={ () =>
117
+ setAttributes( { linkTarget: '_self' } )
118
+ }
119
+ >
120
+ <ToggleControl
121
+ __nextHasNoMarginBottom
122
+ label={ __( 'Open in new tab' ) }
123
+ onChange={ ( value ) =>
124
+ setAttributes( {
125
+ linkTarget: value ? '_blank' : '_self',
126
+ } )
127
+ }
128
+ checked={ linkTarget === '_blank' }
129
+ />
130
+ </ToolsPanelItem>
93
131
  ) }
94
- </PanelBody>
132
+ </ToolsPanel>
95
133
  </InspectorControls>
96
134
  <div { ...blockProps }>
97
135
  { supportsAuthor
@@ -47,7 +47,13 @@
47
47
  "radius": true,
48
48
  "color": true,
49
49
  "width": true,
50
- "style": true
50
+ "style": true,
51
+ "__experimentalDefaultControls": {
52
+ "radius": true,
53
+ "color": true,
54
+ "width": true,
55
+ "style": true
56
+ }
51
57
  }
52
58
  },
53
59
  "style": "wp-block-post-comments-link"
@@ -35,6 +35,7 @@
35
35
  },
36
36
  "color": {
37
37
  "gradients": true,
38
+ "heading": true,
38
39
  "link": true,
39
40
  "__experimentalDefaultControls": {
40
41
  "background": false,
@@ -69,4 +70,4 @@
69
70
  },
70
71
  "style": "wp-block-post-content",
71
72
  "editorStyle": "wp-block-post-content-editor"
72
- }
73
+ }
@@ -179,9 +179,7 @@ export default function PostDateEdit( {
179
179
  dropdownMenuProps={ dropdownMenuProps }
180
180
  >
181
181
  <ToolsPanelItem
182
- hasValue={ () =>
183
- format !== undefined && format !== siteFormat
184
- }
182
+ hasValue={ () => !! format }
185
183
  label={ __( 'Date Format' ) }
186
184
  onDeselect={ () =>
187
185
  setAttributes( { format: undefined } )
@@ -49,11 +49,6 @@ function getMediaSourceUrlBySizeSlug( media, slug ) {
49
49
  );
50
50
  }
51
51
 
52
- const disabledClickProps = {
53
- onClick: ( event ) => event.preventDefault(),
54
- 'aria-disabled': true,
55
- };
56
-
57
52
  export default function PostFeaturedImageEdit( {
58
53
  clientId,
59
54
  attributes,
@@ -318,11 +313,7 @@ export default function PostFeaturedImageEdit( {
318
313
  { controls }
319
314
  <div { ...blockProps }>
320
315
  { !! isLink ? (
321
- <a
322
- href={ postPermalink }
323
- target={ linkTarget }
324
- { ...disabledClickProps }
325
- >
316
+ <a href={ postPermalink } target={ linkTarget }>
326
317
  { placeholder() }
327
318
  </a>
328
319
  ) : (
@@ -430,11 +421,7 @@ export default function PostFeaturedImageEdit( {
430
421
  <figure { ...blockProps }>
431
422
  { /* If the featured image is linked, wrap in an <a /> tag to trigger any inherited link element styles */ }
432
423
  { !! isLink ? (
433
- <a
434
- href={ postPermalink }
435
- target={ linkTarget }
436
- { ...disabledClickProps }
437
- >
424
+ <a href={ postPermalink } target={ linkTarget }>
438
425
  { image }
439
426
  </a>
440
427
  ) : (
@@ -100,9 +100,9 @@
100
100
 
101
101
  // When the Post Featured Image block is linked,
102
102
  // it's wrapped with a disabled <a /> tag.
103
- // Restore cursor style so it doesn't appear 'clickable'.
103
+ // Ensure that the link is not clickable.
104
104
  > a {
105
- cursor: default;
105
+ pointer-events: none;
106
106
  }
107
107
 
108
108
  // When the Post Featured Image block is linked,
@@ -47,6 +47,7 @@ const Overlay = ( {
47
47
  gradient: undefined,
48
48
  customGradient: undefined,
49
49
  } ),
50
+ clearable: true,
50
51
  },
51
52
  ] }
52
53
  panelId={ clientId }
@@ -8,7 +8,7 @@ const variations = [
8
8
  {
9
9
  isDefault: true,
10
10
  name: 'post-next',
11
- title: __( 'Next post' ),
11
+ title: __( 'Next Post' ),
12
12
  description: __(
13
13
  'Displays the post link that follows the current post.'
14
14
  ),
@@ -24,7 +24,7 @@ const variations = [
24
24
  },
25
25
  {
26
26
  name: 'post-previous',
27
- title: __( 'Previous post' ),
27
+ title: __( 'Previous Post' ),
28
28
  description: __(
29
29
  'Displays the post link that precedes the current post.'
30
30
  ),
@@ -122,6 +122,7 @@ export default function PostTermsEdit( {
122
122
  key={ postTerm.id }
123
123
  href={ postTerm.link }
124
124
  onClick={ ( event ) => event.preventDefault() }
125
+ rel="tag"
125
126
  >
126
127
  { decodeEntities( postTerm.name ) }
127
128
  </a>
@@ -3,7 +3,7 @@
3
3
  "apiVersion": 3,
4
4
  "__experimental": true,
5
5
  "name": "core/post-time-to-read",
6
- "title": "Time To Read",
6
+ "title": "Time to Read",
7
7
  "category": "theme",
8
8
  "description": "Show minutes required to finish reading the post.",
9
9
  "textdomain": "default",
@@ -30,7 +30,7 @@ function AuthorControl( { value, onChange } ) {
30
30
  const authorsInfo = getEntitiesInfo( authorsList );
31
31
  /**
32
32
  * We need to normalize the value because the block operates on a
33
- * comma(`,`) separated string value and `FormTokenFiels` needs an
33
+ * comma(`,`) separated string value and `FormTokenField` needs an
34
34
  * array.
35
35
  */
36
36
  const normalizedValue = ! value ? [] : value.toString().split( ',' );
@@ -2,7 +2,6 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- PanelBody,
6
5
  TextControl,
7
6
  SelectControl,
8
7
  RangeControl,
@@ -187,110 +186,171 @@ export default function QueryInspectorControls( props ) {
187
186
  return (
188
187
  <>
189
188
  { showSettingsPanel && (
190
- <PanelBody title={ __( 'Settings' ) }>
189
+ <ToolsPanel
190
+ label={ __( 'Settings' ) }
191
+ resetAll={ () => {
192
+ setQuery( {
193
+ postType: 'post',
194
+ order: 'desc',
195
+ orderBy: 'date',
196
+ sticky: '',
197
+ inherit: true,
198
+ } );
199
+ } }
200
+ dropdownMenuProps={ dropdownMenuProps }
201
+ >
191
202
  { showInheritControl && (
192
- <ToggleGroupControl
193
- __next40pxDefaultSize
194
- __nextHasNoMarginBottom
203
+ <ToolsPanelItem
204
+ hasValue={ () => ! inherit }
195
205
  label={ __( 'Query type' ) }
196
- isBlock
197
- onChange={ ( value ) => {
198
- setQuery( { inherit: value === 'default' } );
199
- } }
200
- help={
201
- inherit
202
- ? __(
203
- 'Display a list of posts or custom post types based on the current template.'
204
- )
205
- : __(
206
- 'Display a list of posts or custom post types based on specific criteria.'
207
- )
208
- }
209
- value={ !! inherit ? 'default' : 'custom' }
206
+ onDeselect={ () => setQuery( { inherit: true } ) }
207
+ isShownByDefault
210
208
  >
211
- <ToggleGroupControlOption
212
- value="default"
213
- label={ __( 'Default' ) }
214
- />
215
- <ToggleGroupControlOption
216
- value="custom"
217
- label={ __( 'Custom' ) }
218
- />
219
- </ToggleGroupControl>
220
- ) }
221
- { showPostTypeControl &&
222
- ( postTypesSelectOptions.length > 2 ? (
223
- <SelectControl
224
- __nextHasNoMarginBottom
225
- __next40pxDefaultSize
226
- options={ postTypesSelectOptions }
227
- value={ postType }
228
- label={ postTypeControlLabel }
229
- onChange={ onPostTypeChange }
230
- help={ postTypeControlHelp }
231
- />
232
- ) : (
233
209
  <ToggleGroupControl
234
- __nextHasNoMarginBottom
235
210
  __next40pxDefaultSize
211
+ __nextHasNoMarginBottom
212
+ label={ __( 'Query type' ) }
236
213
  isBlock
237
- value={ postType }
238
- label={ postTypeControlLabel }
239
- onChange={ onPostTypeChange }
240
- help={ postTypeControlHelp }
214
+ onChange={ ( value ) => {
215
+ setQuery( {
216
+ inherit: value === 'default',
217
+ } );
218
+ } }
219
+ help={
220
+ inherit
221
+ ? __(
222
+ 'Display a list of posts or custom post types based on the current template.'
223
+ )
224
+ : __(
225
+ 'Display a list of posts or custom post types based on specific criteria.'
226
+ )
227
+ }
228
+ value={ !! inherit ? 'default' : 'custom' }
241
229
  >
242
- { postTypesSelectOptions.map( ( option ) => (
243
- <ToggleGroupControlOption
244
- key={ option.value }
245
- value={ option.value }
246
- label={ option.label }
247
- />
248
- ) ) }
230
+ <ToggleGroupControlOption
231
+ value="default"
232
+ label={ __( 'Default' ) }
233
+ />
234
+ <ToggleGroupControlOption
235
+ value="custom"
236
+ label={ __( 'Custom' ) }
237
+ />
249
238
  </ToggleGroupControl>
250
- ) ) }
239
+ </ToolsPanelItem>
240
+ ) }
251
241
 
252
- { showColumnsControl && (
253
- <>
254
- <RangeControl
255
- __nextHasNoMarginBottom
256
- __next40pxDefaultSize
257
- label={ __( 'Columns' ) }
258
- value={ displayLayout.columns }
259
- onChange={ ( value ) =>
260
- setDisplayLayout( {
261
- columns: value,
262
- } )
263
- }
264
- min={ 2 }
265
- max={ Math.max( 6, displayLayout.columns ) }
266
- />
267
- { displayLayout.columns > 6 && (
268
- <Notice
269
- status="warning"
270
- isDismissible={ false }
242
+ { showPostTypeControl && (
243
+ <ToolsPanelItem
244
+ hasValue={ () => postType !== 'post' }
245
+ label={ postTypeControlLabel }
246
+ onDeselect={ () => onPostTypeChange( 'post' ) }
247
+ isShownByDefault
248
+ >
249
+ { postTypesSelectOptions.length > 2 ? (
250
+ <SelectControl
251
+ __nextHasNoMarginBottom
252
+ __next40pxDefaultSize
253
+ options={ postTypesSelectOptions }
254
+ value={ postType }
255
+ label={ postTypeControlLabel }
256
+ onChange={ onPostTypeChange }
257
+ help={ postTypeControlHelp }
258
+ />
259
+ ) : (
260
+ <ToggleGroupControl
261
+ __nextHasNoMarginBottom
262
+ __next40pxDefaultSize
263
+ isBlock
264
+ value={ postType }
265
+ label={ postTypeControlLabel }
266
+ onChange={ onPostTypeChange }
267
+ help={ postTypeControlHelp }
271
268
  >
272
- { __(
273
- 'This column count exceeds the recommended amount and may cause visual breakage.'
269
+ { postTypesSelectOptions.map(
270
+ ( option ) => (
271
+ <ToggleGroupControlOption
272
+ key={ option.value }
273
+ value={ option.value }
274
+ label={ option.label }
275
+ />
276
+ )
274
277
  ) }
275
- </Notice>
278
+ </ToggleGroupControl>
276
279
  ) }
277
- </>
280
+ </ToolsPanelItem>
278
281
  ) }
282
+
283
+ { showColumnsControl && (
284
+ <ToolsPanelItem
285
+ hasValue={ () => displayLayout?.columns !== 2 }
286
+ label={ __( 'Columns' ) }
287
+ onDeselect={ () =>
288
+ setDisplayLayout( { columns: 2 } )
289
+ }
290
+ isShownByDefault
291
+ >
292
+ <>
293
+ <RangeControl
294
+ __nextHasNoMarginBottom
295
+ __next40pxDefaultSize
296
+ label={ __( 'Columns' ) }
297
+ value={ displayLayout.columns }
298
+ onChange={ ( value ) =>
299
+ setDisplayLayout( {
300
+ columns: value,
301
+ } )
302
+ }
303
+ min={ 2 }
304
+ max={ Math.max( 6, displayLayout.columns ) }
305
+ />
306
+ { displayLayout.columns > 6 && (
307
+ <Notice
308
+ status="warning"
309
+ isDismissible={ false }
310
+ >
311
+ { __(
312
+ 'This column count exceeds the recommended amount and may cause visual breakage.'
313
+ ) }
314
+ </Notice>
315
+ ) }
316
+ </>
317
+ </ToolsPanelItem>
318
+ ) }
319
+
279
320
  { showOrderControl && (
280
- <OrderControl
281
- { ...{ order, orderBy } }
282
- onChange={ setQuery }
283
- />
321
+ <ToolsPanelItem
322
+ hasValue={ () =>
323
+ order !== 'desc' || orderBy !== 'date'
324
+ }
325
+ label={ __( 'Order by' ) }
326
+ onDeselect={ () =>
327
+ setQuery( { order: 'desc', orderBy: 'date' } )
328
+ }
329
+ isShownByDefault
330
+ >
331
+ <OrderControl
332
+ { ...{ order, orderBy } }
333
+ onChange={ setQuery }
334
+ />
335
+ </ToolsPanelItem>
284
336
  ) }
337
+
285
338
  { showStickyControl && (
286
- <StickyControl
287
- value={ sticky }
288
- onChange={ ( value ) =>
289
- setQuery( { sticky: value } )
290
- }
291
- />
339
+ <ToolsPanelItem
340
+ hasValue={ () => !! sticky }
341
+ label={ __( 'Sticky posts' ) }
342
+ onDeselect={ () => setQuery( { sticky: '' } ) }
343
+ isShownByDefault
344
+ >
345
+ <StickyControl
346
+ value={ sticky }
347
+ onChange={ ( value ) =>
348
+ setQuery( { sticky: value } )
349
+ }
350
+ />
351
+ </ToolsPanelItem>
292
352
  ) }
293
- </PanelBody>
353
+ </ToolsPanel>
294
354
  ) }
295
355
  { ! inherit && showDisplayPanel && (
296
356
  <ToolsPanel
@@ -23,6 +23,7 @@ import QueryInspectorControls from './inspector-controls';
23
23
  import EnhancedPaginationModal from './enhanced-pagination-modal';
24
24
  import { getQueryContextFromTemplate } from '../utils';
25
25
  import QueryToolbar from './query-toolbar';
26
+ import { htmlElementMessages } from '../../utils/messages';
26
27
 
27
28
  const DEFAULTS_POSTS_PER_PAGE = 3;
28
29
 
@@ -132,17 +133,6 @@ export default function QueryContent( {
132
133
  setAttributes( {
133
134
  displayLayout: { ...displayLayout, ...newDisplayLayout },
134
135
  } );
135
- const htmlElementMessages = {
136
- main: __(
137
- 'The <main> element should be used for the primary content of your document only.'
138
- ),
139
- section: __(
140
- "The <section> element should represent a standalone portion of the document that can't be better represented by another element."
141
- ),
142
- aside: __(
143
- "The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
144
- ),
145
- };
146
136
 
147
137
  return (
148
138
  <>
@@ -1,24 +1,3 @@
1
- .block-library-query-toolbar__popover .components-popover__content {
2
- min-width: 230px;
3
-
4
- .block-library-query-toolbar__popover-number-control {
5
- margin-bottom: $grid-unit-10;
6
- }
7
- }
8
-
9
- .block-library-query__pattern-selection-content .block-editor-block-patterns-list {
10
- display: grid;
11
- grid-template-columns: 1fr 1fr 1fr;
12
- grid-gap: $grid-unit-10;
13
-
14
- .block-editor-block-patterns-list__list-item {
15
- margin-bottom: 0;
16
- .block-editor-block-preview__container {
17
- max-height: 250px;
18
- }
19
- }
20
- }
21
-
22
1
  .block-library-query-pattern__selection-modal {
23
2
 
24
3
  .block-editor-block-patterns-list {
@@ -45,22 +24,12 @@
45
24
  }
46
25
  }
47
26
 
48
- .block-library-query-toolspanel__design {
49
- .block-library-query-pattern__selection-content {
50
- margin-top: $grid-unit-10;
51
- }
52
- }
53
-
54
27
  .wp-block-query__enhanced-pagination-modal {
55
28
  @include break-small() {
56
29
  max-width: $break-mobile;
57
30
  }
58
31
  }
59
32
 
60
- .wp-block-query__enhanced-pagination-notice {
61
- margin: 0;
62
- }
63
-
64
33
  .block-editor-block-settings-menu__popover {
65
34
  &.is-expanded {
66
35
  overflow-y: scroll;
@@ -81,7 +81,7 @@ export const getValueFromObjectPath = ( object, path ) => {
81
81
  *
82
82
  * @param {Object[]} entities The array of entities.
83
83
  * @param {string} path The path to map a `name` property from the entity.
84
- * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.
84
+ * @return {IHasNameAndId[]} An array of entities that now implement the `IHasNameAndId` interface.
85
85
  */
86
86
  export const mapToIHasNameAndId = ( entities, path ) => {
87
87
  return ( entities || [] ).map( ( entity ) => ( {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://schemas.wp.org/trunk/block.json",
3
3
  "apiVersion": 3,
4
4
  "name": "core/query-no-results",
5
- "title": "No results",
5
+ "title": "No Results",
6
6
  "category": "theme",
7
7
  "description": "Contains the block elements used to render content when no query results are found.",
8
8
  "ancestor": [ "core/query" ],
@@ -67,7 +67,7 @@ export default function QueryPaginationNumbersEdit( {
67
67
  >
68
68
  <ToolsPanelItem
69
69
  label={ __( 'Number of links' ) }
70
- hasValue={ () => midSize !== undefined }
70
+ hasValue={ () => midSize !== 2 }
71
71
  onDeselect={ () => setAttributes( { midSize: 2 } ) }
72
72
  isShownByDefault
73
73
  >