@wordpress/block-library 9.22.0 → 9.24.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 (483) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/calendar/index.js +1 -0
  3. package/build/calendar/index.js.map +1 -1
  4. package/build/code/index.js +2 -1
  5. package/build/code/index.js.map +1 -1
  6. package/build/comments/edit/comments-inspector-controls.js +13 -13
  7. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  8. package/build/comments/edit/index.js +4 -2
  9. package/build/comments/edit/index.js.map +1 -1
  10. package/build/cover/edit/inspector-controls.js +9 -12
  11. package/build/cover/edit/inspector-controls.js.map +1 -1
  12. package/build/details/index.js +2 -1
  13. package/build/details/index.js.map +1 -1
  14. package/build/group/edit.js +17 -13
  15. package/build/group/edit.js.map +1 -1
  16. package/build/html/index.js +2 -1
  17. package/build/html/index.js.map +1 -1
  18. package/build/image/constants.js +2 -1
  19. package/build/image/constants.js.map +1 -1
  20. package/build/image/edit.js +1 -7
  21. package/build/image/edit.js.map +1 -1
  22. package/build/image/image.js +1 -4
  23. package/build/image/image.js.map +1 -1
  24. package/build/latest-posts/edit.js +100 -54
  25. package/build/latest-posts/edit.js.map +1 -1
  26. package/build/more/index.js +2 -1
  27. package/build/more/index.js.map +1 -1
  28. package/build/post-excerpt/edit.js +3 -1
  29. package/build/post-excerpt/edit.js.map +1 -1
  30. package/build/post-excerpt/index.js +2 -1
  31. package/build/post-excerpt/index.js.map +1 -1
  32. package/build/post-navigation-link/edit.js +3 -1
  33. package/build/post-navigation-link/edit.js.map +1 -1
  34. package/build/post-navigation-link/index.js +2 -1
  35. package/build/post-navigation-link/index.js.map +1 -1
  36. package/build/post-navigation-link/variations.js +13 -13
  37. package/build/post-navigation-link/variations.js.map +1 -1
  38. package/build/post-template/edit.js +5 -3
  39. package/build/post-template/edit.js.map +1 -1
  40. package/build/post-terms/edit.js +3 -1
  41. package/build/post-terms/edit.js.map +1 -1
  42. package/build/post-terms/index.js +4 -2
  43. package/build/post-terms/index.js.map +1 -1
  44. package/build/preformatted/transforms.js +5 -1
  45. package/build/preformatted/transforms.js.map +1 -1
  46. package/build/query/edit/query-content.js +11 -12
  47. package/build/query/edit/query-content.js.map +1 -1
  48. package/build/read-more/index.js +2 -1
  49. package/build/read-more/index.js.map +1 -1
  50. package/build/rss/index.js +2 -1
  51. package/build/rss/index.js.map +1 -1
  52. package/build/search/edit.js +76 -86
  53. package/build/search/edit.js.map +1 -1
  54. package/build/separator/edit.js +13 -12
  55. package/build/separator/edit.js.map +1 -1
  56. package/build/table/edit.js +3 -2
  57. package/build/table/edit.js.map +1 -1
  58. package/build/table/index.js +8 -4
  59. package/build/table/index.js.map +1 -1
  60. package/build/template-part/edit/advanced-controls.js +14 -12
  61. package/build/template-part/edit/advanced-controls.js.map +1 -1
  62. package/build/template-part/edit/index.js +2 -1
  63. package/build/template-part/edit/index.js.map +1 -1
  64. package/build-module/calendar/index.js +1 -0
  65. package/build-module/calendar/index.js.map +1 -1
  66. package/build-module/code/index.js +2 -1
  67. package/build-module/code/index.js.map +1 -1
  68. package/build-module/comments/edit/comments-inspector-controls.js +14 -14
  69. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  70. package/build-module/comments/edit/index.js +4 -2
  71. package/build-module/comments/edit/index.js.map +1 -1
  72. package/build-module/cover/edit/inspector-controls.js +10 -13
  73. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  74. package/build-module/details/index.js +2 -1
  75. package/build-module/details/index.js.map +1 -1
  76. package/build-module/group/edit.js +16 -14
  77. package/build-module/group/edit.js.map +1 -1
  78. package/build-module/html/index.js +2 -1
  79. package/build-module/html/index.js.map +1 -1
  80. package/build-module/image/constants.js +1 -0
  81. package/build-module/image/constants.js.map +1 -1
  82. package/build-module/image/edit.js +2 -8
  83. package/build-module/image/edit.js.map +1 -1
  84. package/build-module/image/image.js +2 -5
  85. package/build-module/image/image.js.map +1 -1
  86. package/build-module/latest-posts/edit.js +100 -54
  87. package/build-module/latest-posts/edit.js.map +1 -1
  88. package/build-module/more/index.js +2 -1
  89. package/build-module/more/index.js.map +1 -1
  90. package/build-module/post-excerpt/edit.js +4 -2
  91. package/build-module/post-excerpt/edit.js.map +1 -1
  92. package/build-module/post-excerpt/index.js +2 -1
  93. package/build-module/post-excerpt/index.js.map +1 -1
  94. package/build-module/post-navigation-link/edit.js +4 -2
  95. package/build-module/post-navigation-link/edit.js.map +1 -1
  96. package/build-module/post-navigation-link/index.js +2 -1
  97. package/build-module/post-navigation-link/index.js.map +1 -1
  98. package/build-module/post-navigation-link/variations.js +13 -13
  99. package/build-module/post-navigation-link/variations.js.map +1 -1
  100. package/build-module/post-template/edit.js +5 -3
  101. package/build-module/post-template/edit.js.map +1 -1
  102. package/build-module/post-terms/edit.js +4 -2
  103. package/build-module/post-terms/edit.js.map +1 -1
  104. package/build-module/post-terms/index.js +4 -2
  105. package/build-module/post-terms/index.js.map +1 -1
  106. package/build-module/preformatted/transforms.js +5 -1
  107. package/build-module/preformatted/transforms.js.map +1 -1
  108. package/build-module/query/edit/query-content.js +12 -13
  109. package/build-module/query/edit/query-content.js.map +1 -1
  110. package/build-module/read-more/index.js +2 -1
  111. package/build-module/read-more/index.js.map +1 -1
  112. package/build-module/rss/index.js +2 -1
  113. package/build-module/rss/index.js.map +1 -1
  114. package/build-module/search/edit.js +78 -88
  115. package/build-module/search/edit.js.map +1 -1
  116. package/build-module/separator/edit.js +15 -14
  117. package/build-module/separator/edit.js.map +1 -1
  118. package/build-module/table/edit.js +4 -3
  119. package/build-module/table/edit.js.map +1 -1
  120. package/build-module/table/index.js +8 -4
  121. package/build-module/table/index.js.map +1 -1
  122. package/build-module/template-part/edit/advanced-controls.js +14 -12
  123. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  124. package/build-module/template-part/edit/index.js +2 -1
  125. package/build-module/template-part/edit/index.js.map +1 -1
  126. package/build-style/archives/editor-rtl.css +47 -11
  127. package/build-style/archives/editor.css +47 -11
  128. package/build-style/archives/style-rtl.css +47 -11
  129. package/build-style/archives/style.css +47 -11
  130. package/build-style/audio/editor-rtl.css +47 -11
  131. package/build-style/audio/editor.css +47 -11
  132. package/build-style/audio/style-rtl.css +47 -11
  133. package/build-style/audio/style.css +47 -11
  134. package/build-style/audio/theme-rtl.css +47 -11
  135. package/build-style/audio/theme.css +47 -11
  136. package/build-style/avatar/editor-rtl.css +47 -11
  137. package/build-style/avatar/editor.css +47 -11
  138. package/build-style/avatar/style-rtl.css +47 -11
  139. package/build-style/avatar/style.css +47 -11
  140. package/build-style/button/editor-rtl.css +47 -11
  141. package/build-style/button/editor.css +47 -11
  142. package/build-style/button/style-rtl.css +47 -12
  143. package/build-style/button/style.css +47 -12
  144. package/build-style/buttons/editor-rtl.css +47 -11
  145. package/build-style/buttons/editor.css +47 -11
  146. package/build-style/buttons/style-rtl.css +50 -11
  147. package/build-style/buttons/style.css +50 -11
  148. package/build-style/calendar/style-rtl.css +47 -11
  149. package/build-style/calendar/style.css +47 -11
  150. package/build-style/categories/editor-rtl.css +47 -11
  151. package/build-style/categories/editor.css +47 -11
  152. package/build-style/categories/style-rtl.css +47 -11
  153. package/build-style/categories/style.css +47 -11
  154. package/build-style/classic-rtl.css +47 -11
  155. package/build-style/classic.css +47 -11
  156. package/build-style/code/editor-rtl.css +47 -11
  157. package/build-style/code/editor.css +47 -11
  158. package/build-style/code/style-rtl.css +47 -11
  159. package/build-style/code/style.css +47 -11
  160. package/build-style/code/theme-rtl.css +47 -11
  161. package/build-style/code/theme.css +47 -11
  162. package/build-style/columns/editor-rtl.css +47 -11
  163. package/build-style/columns/editor.css +47 -11
  164. package/build-style/columns/style-rtl.css +47 -11
  165. package/build-style/columns/style.css +47 -11
  166. package/build-style/comment-author-avatar/editor-rtl.css +47 -11
  167. package/build-style/comment-author-avatar/editor.css +47 -11
  168. package/build-style/comment-author-name/style-rtl.css +47 -11
  169. package/build-style/comment-author-name/style.css +47 -11
  170. package/build-style/comment-content/style-rtl.css +47 -11
  171. package/build-style/comment-content/style.css +47 -11
  172. package/build-style/comment-date/style-rtl.css +47 -11
  173. package/build-style/comment-date/style.css +47 -11
  174. package/build-style/comment-edit-link/style-rtl.css +47 -11
  175. package/build-style/comment-edit-link/style.css +47 -11
  176. package/build-style/comment-reply-link/style-rtl.css +47 -11
  177. package/build-style/comment-reply-link/style.css +47 -11
  178. package/build-style/comment-template/style-rtl.css +47 -11
  179. package/build-style/comment-template/style.css +47 -11
  180. package/build-style/comments/editor-rtl.css +47 -11
  181. package/build-style/comments/editor.css +47 -11
  182. package/build-style/comments/style-rtl.css +47 -11
  183. package/build-style/comments/style.css +47 -11
  184. package/build-style/comments-pagination/editor-rtl.css +47 -11
  185. package/build-style/comments-pagination/editor.css +47 -11
  186. package/build-style/comments-pagination/style-rtl.css +47 -11
  187. package/build-style/comments-pagination/style.css +47 -11
  188. package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
  189. package/build-style/comments-pagination-numbers/editor.css +47 -11
  190. package/build-style/comments-title/editor-rtl.css +47 -11
  191. package/build-style/comments-title/editor.css +47 -11
  192. package/build-style/common-rtl.css +130 -9
  193. package/build-style/common.css +130 -9
  194. package/build-style/cover/editor-rtl.css +47 -11
  195. package/build-style/cover/editor.css +47 -11
  196. package/build-style/cover/style-rtl.css +47 -11
  197. package/build-style/cover/style.css +47 -11
  198. package/build-style/details/editor-rtl.css +47 -11
  199. package/build-style/details/editor.css +47 -11
  200. package/build-style/details/style-rtl.css +47 -11
  201. package/build-style/details/style.css +47 -11
  202. package/build-style/editor-elements-rtl.css +47 -11
  203. package/build-style/editor-elements.css +47 -11
  204. package/build-style/editor-rtl.css +48 -11
  205. package/build-style/editor.css +48 -11
  206. package/build-style/elements-rtl.css +47 -11
  207. package/build-style/elements.css +47 -11
  208. package/build-style/embed/editor-rtl.css +47 -11
  209. package/build-style/embed/editor.css +47 -11
  210. package/build-style/embed/style-rtl.css +47 -11
  211. package/build-style/embed/style.css +47 -11
  212. package/build-style/embed/theme-rtl.css +47 -11
  213. package/build-style/embed/theme.css +47 -11
  214. package/build-style/file/editor-rtl.css +47 -11
  215. package/build-style/file/editor.css +47 -11
  216. package/build-style/file/style-rtl.css +47 -11
  217. package/build-style/file/style.css +47 -11
  218. package/build-style/footnotes/style-rtl.css +47 -11
  219. package/build-style/footnotes/style.css +47 -11
  220. package/build-style/form-input/editor-rtl.css +47 -11
  221. package/build-style/form-input/editor.css +47 -11
  222. package/build-style/form-input/style-rtl.css +47 -11
  223. package/build-style/form-input/style.css +47 -11
  224. package/build-style/form-submission-notification/editor-rtl.css +47 -11
  225. package/build-style/form-submission-notification/editor.css +47 -11
  226. package/build-style/form-submit-button/style-rtl.css +47 -11
  227. package/build-style/form-submit-button/style.css +47 -11
  228. package/build-style/freeform/editor-rtl.css +47 -11
  229. package/build-style/freeform/editor.css +47 -11
  230. package/build-style/gallery/editor-rtl.css +47 -11
  231. package/build-style/gallery/editor.css +47 -11
  232. package/build-style/gallery/style-rtl.css +47 -11
  233. package/build-style/gallery/style.css +47 -11
  234. package/build-style/gallery/theme-rtl.css +47 -11
  235. package/build-style/gallery/theme.css +47 -11
  236. package/build-style/group/editor-rtl.css +47 -11
  237. package/build-style/group/editor.css +47 -11
  238. package/build-style/group/style-rtl.css +47 -11
  239. package/build-style/group/style.css +47 -11
  240. package/build-style/group/theme-rtl.css +47 -11
  241. package/build-style/group/theme.css +47 -11
  242. package/build-style/heading/style-rtl.css +47 -11
  243. package/build-style/heading/style.css +47 -11
  244. package/build-style/html/editor-rtl.css +48 -11
  245. package/build-style/html/editor.css +48 -11
  246. package/build-style/image/editor-rtl.css +47 -11
  247. package/build-style/image/editor.css +47 -11
  248. package/build-style/image/style-rtl.css +47 -11
  249. package/build-style/image/style.css +47 -11
  250. package/build-style/image/theme-rtl.css +47 -11
  251. package/build-style/image/theme.css +47 -11
  252. package/build-style/latest-comments/style-rtl.css +47 -11
  253. package/build-style/latest-comments/style.css +47 -11
  254. package/build-style/latest-posts/editor-rtl.css +47 -11
  255. package/build-style/latest-posts/editor.css +47 -11
  256. package/build-style/latest-posts/style-rtl.css +47 -11
  257. package/build-style/latest-posts/style.css +47 -11
  258. package/build-style/list/style-rtl.css +47 -11
  259. package/build-style/list/style.css +47 -11
  260. package/build-style/loginout/style-rtl.css +47 -11
  261. package/build-style/loginout/style.css +47 -11
  262. package/build-style/media-text/editor-rtl.css +47 -11
  263. package/build-style/media-text/editor.css +47 -11
  264. package/build-style/media-text/style-rtl.css +47 -11
  265. package/build-style/media-text/style.css +47 -11
  266. package/build-style/more/editor-rtl.css +47 -11
  267. package/build-style/more/editor.css +47 -11
  268. package/build-style/navigation/editor-rtl.css +47 -11
  269. package/build-style/navigation/editor.css +47 -11
  270. package/build-style/navigation/style-rtl.css +47 -11
  271. package/build-style/navigation/style.css +47 -11
  272. package/build-style/navigation-link/editor-rtl.css +47 -11
  273. package/build-style/navigation-link/editor.css +47 -11
  274. package/build-style/navigation-link/style-rtl.css +47 -11
  275. package/build-style/navigation-link/style.css +47 -11
  276. package/build-style/navigation-submenu/editor-rtl.css +47 -11
  277. package/build-style/navigation-submenu/editor.css +47 -11
  278. package/build-style/nextpage/editor-rtl.css +47 -11
  279. package/build-style/nextpage/editor.css +47 -11
  280. package/build-style/page-list/editor-rtl.css +47 -11
  281. package/build-style/page-list/editor.css +47 -11
  282. package/build-style/page-list/style-rtl.css +47 -11
  283. package/build-style/page-list/style.css +47 -11
  284. package/build-style/paragraph/editor-rtl.css +47 -11
  285. package/build-style/paragraph/editor.css +47 -11
  286. package/build-style/paragraph/style-rtl.css +47 -11
  287. package/build-style/paragraph/style.css +47 -11
  288. package/build-style/post-author/editor-rtl.css +47 -11
  289. package/build-style/post-author/editor.css +47 -11
  290. package/build-style/post-author/style-rtl.css +47 -11
  291. package/build-style/post-author/style.css +47 -11
  292. package/build-style/post-author-biography/style-rtl.css +47 -11
  293. package/build-style/post-author-biography/style.css +47 -11
  294. package/build-style/post-author-name/style-rtl.css +47 -11
  295. package/build-style/post-author-name/style.css +47 -11
  296. package/build-style/post-comments-count/style-rtl.css +47 -11
  297. package/build-style/post-comments-count/style.css +47 -11
  298. package/build-style/post-comments-form/editor-rtl.css +47 -11
  299. package/build-style/post-comments-form/editor.css +47 -11
  300. package/build-style/post-comments-form/style-rtl.css +47 -14
  301. package/build-style/post-comments-form/style.css +47 -14
  302. package/build-style/post-comments-link/style-rtl.css +47 -11
  303. package/build-style/post-comments-link/style.css +47 -11
  304. package/build-style/post-content/style-rtl.css +47 -11
  305. package/build-style/post-content/style.css +47 -11
  306. package/build-style/post-date/style-rtl.css +47 -11
  307. package/build-style/post-date/style.css +47 -11
  308. package/build-style/post-excerpt/editor-rtl.css +47 -11
  309. package/build-style/post-excerpt/editor.css +47 -11
  310. package/build-style/post-excerpt/style-rtl.css +47 -11
  311. package/build-style/post-excerpt/style.css +47 -11
  312. package/build-style/post-featured-image/editor-rtl.css +47 -11
  313. package/build-style/post-featured-image/editor.css +47 -11
  314. package/build-style/post-featured-image/style-rtl.css +47 -11
  315. package/build-style/post-featured-image/style.css +47 -11
  316. package/build-style/post-navigation-link/style-rtl.css +47 -11
  317. package/build-style/post-navigation-link/style.css +47 -11
  318. package/build-style/post-template/style-rtl.css +47 -11
  319. package/build-style/post-template/style.css +47 -11
  320. package/build-style/post-terms/style-rtl.css +47 -11
  321. package/build-style/post-terms/style.css +47 -11
  322. package/build-style/post-time-to-read/style-rtl.css +47 -11
  323. package/build-style/post-time-to-read/style.css +47 -11
  324. package/build-style/post-title/style-rtl.css +47 -11
  325. package/build-style/post-title/style.css +47 -11
  326. package/build-style/preformatted/style-rtl.css +47 -11
  327. package/build-style/preformatted/style.css +47 -11
  328. package/build-style/pullquote/editor-rtl.css +47 -11
  329. package/build-style/pullquote/editor.css +47 -11
  330. package/build-style/pullquote/style-rtl.css +47 -11
  331. package/build-style/pullquote/style.css +47 -11
  332. package/build-style/pullquote/theme-rtl.css +47 -11
  333. package/build-style/pullquote/theme.css +47 -11
  334. package/build-style/query/editor-rtl.css +47 -11
  335. package/build-style/query/editor.css +47 -11
  336. package/build-style/query-pagination/editor-rtl.css +47 -11
  337. package/build-style/query-pagination/editor.css +47 -11
  338. package/build-style/query-pagination/style-rtl.css +47 -11
  339. package/build-style/query-pagination/style.css +47 -11
  340. package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
  341. package/build-style/query-pagination-numbers/editor.css +47 -11
  342. package/build-style/query-title/style-rtl.css +47 -11
  343. package/build-style/query-title/style.css +47 -11
  344. package/build-style/query-total/style-rtl.css +47 -11
  345. package/build-style/query-total/style.css +47 -11
  346. package/build-style/quote/style-rtl.css +47 -11
  347. package/build-style/quote/style.css +47 -11
  348. package/build-style/quote/theme-rtl.css +47 -11
  349. package/build-style/quote/theme.css +47 -11
  350. package/build-style/read-more/style-rtl.css +47 -11
  351. package/build-style/read-more/style.css +47 -11
  352. package/build-style/reset-rtl.css +47 -11
  353. package/build-style/reset.css +47 -11
  354. package/build-style/rss/editor-rtl.css +47 -11
  355. package/build-style/rss/editor.css +47 -11
  356. package/build-style/rss/style-rtl.css +47 -11
  357. package/build-style/rss/style.css +47 -11
  358. package/build-style/search/editor-rtl.css +47 -11
  359. package/build-style/search/editor.css +47 -11
  360. package/build-style/search/style-rtl.css +47 -11
  361. package/build-style/search/style.css +47 -11
  362. package/build-style/search/theme-rtl.css +47 -11
  363. package/build-style/search/theme.css +47 -11
  364. package/build-style/separator/editor-rtl.css +47 -11
  365. package/build-style/separator/editor.css +47 -11
  366. package/build-style/separator/style-rtl.css +47 -11
  367. package/build-style/separator/style.css +47 -11
  368. package/build-style/separator/theme-rtl.css +47 -11
  369. package/build-style/separator/theme.css +47 -11
  370. package/build-style/shortcode/editor-rtl.css +47 -11
  371. package/build-style/shortcode/editor.css +47 -11
  372. package/build-style/site-logo/editor-rtl.css +47 -11
  373. package/build-style/site-logo/editor.css +47 -11
  374. package/build-style/site-logo/style-rtl.css +47 -11
  375. package/build-style/site-logo/style.css +47 -11
  376. package/build-style/site-tagline/editor-rtl.css +47 -11
  377. package/build-style/site-tagline/editor.css +47 -11
  378. package/build-style/site-tagline/style-rtl.css +47 -11
  379. package/build-style/site-tagline/style.css +47 -11
  380. package/build-style/site-title/editor-rtl.css +47 -11
  381. package/build-style/site-title/editor.css +47 -11
  382. package/build-style/site-title/style-rtl.css +47 -11
  383. package/build-style/site-title/style.css +47 -11
  384. package/build-style/social-link/editor-rtl.css +47 -11
  385. package/build-style/social-link/editor.css +47 -11
  386. package/build-style/social-links/editor-rtl.css +47 -11
  387. package/build-style/social-links/editor.css +47 -11
  388. package/build-style/social-links/style-rtl.css +47 -11
  389. package/build-style/social-links/style.css +47 -11
  390. package/build-style/spacer/editor-rtl.css +47 -11
  391. package/build-style/spacer/editor.css +47 -11
  392. package/build-style/spacer/style-rtl.css +47 -11
  393. package/build-style/spacer/style.css +47 -11
  394. package/build-style/style-rtl.css +50 -15
  395. package/build-style/style.css +50 -15
  396. package/build-style/table/editor-rtl.css +47 -11
  397. package/build-style/table/editor.css +47 -11
  398. package/build-style/table/style-rtl.css +47 -11
  399. package/build-style/table/style.css +47 -11
  400. package/build-style/table/theme-rtl.css +47 -11
  401. package/build-style/table/theme.css +47 -11
  402. package/build-style/table-of-contents/style-rtl.css +47 -11
  403. package/build-style/table-of-contents/style.css +47 -11
  404. package/build-style/tag-cloud/editor-rtl.css +47 -11
  405. package/build-style/tag-cloud/editor.css +47 -11
  406. package/build-style/tag-cloud/style-rtl.css +47 -11
  407. package/build-style/tag-cloud/style.css +47 -11
  408. package/build-style/template-part/editor-rtl.css +47 -11
  409. package/build-style/template-part/editor.css +47 -11
  410. package/build-style/template-part/theme-rtl.css +47 -11
  411. package/build-style/template-part/theme.css +47 -11
  412. package/build-style/term-description/style-rtl.css +47 -11
  413. package/build-style/term-description/style.css +47 -11
  414. package/build-style/text-columns/editor-rtl.css +47 -11
  415. package/build-style/text-columns/editor.css +47 -11
  416. package/build-style/text-columns/style-rtl.css +47 -11
  417. package/build-style/text-columns/style.css +47 -11
  418. package/build-style/theme-rtl.css +47 -11
  419. package/build-style/theme.css +47 -11
  420. package/build-style/verse/style-rtl.css +47 -11
  421. package/build-style/verse/style.css +47 -11
  422. package/build-style/video/editor-rtl.css +47 -11
  423. package/build-style/video/editor.css +47 -11
  424. package/build-style/video/style-rtl.css +47 -11
  425. package/build-style/video/style.css +47 -11
  426. package/build-style/video/theme-rtl.css +47 -11
  427. package/build-style/video/theme.css +47 -11
  428. package/package.json +35 -35
  429. package/src/button/style.scss +0 -1
  430. package/src/buttons/style.scss +5 -0
  431. package/src/calendar/block.json +1 -0
  432. package/src/code/block.json +2 -1
  433. package/src/comments/edit/comments-inspector-controls.js +14 -12
  434. package/src/comments/edit/index.js +2 -1
  435. package/src/cover/edit/inspector-controls.js +9 -12
  436. package/src/details/block.json +2 -1
  437. package/src/group/edit.js +11 -10
  438. package/src/html/block.json +2 -1
  439. package/src/html/editor.scss +1 -0
  440. package/src/image/constants.js +1 -0
  441. package/src/image/edit.js +2 -5
  442. package/src/image/image.js +7 -5
  443. package/src/latest-posts/edit.js +113 -81
  444. package/src/loginout/index.php +5 -1
  445. package/src/more/block.json +2 -1
  446. package/src/navigation/index.php +0 -1
  447. package/src/navigation-link/index.php +1 -1
  448. package/src/navigation-submenu/index.php +1 -1
  449. package/src/post-author/index.php +1 -1
  450. package/src/post-author-name/index.php +1 -1
  451. package/src/post-comments-form/style.scss +0 -5
  452. package/src/post-excerpt/block.json +2 -1
  453. package/src/post-excerpt/edit.js +13 -8
  454. package/src/post-navigation-link/block.json +2 -1
  455. package/src/post-navigation-link/edit.js +13 -8
  456. package/src/post-navigation-link/variations.js +13 -13
  457. package/src/post-template/edit.js +4 -3
  458. package/src/post-terms/block.json +4 -2
  459. package/src/post-terms/edit.js +13 -8
  460. package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
  461. package/src/preformatted/test/transforms.native.js +6 -1
  462. package/src/preformatted/transforms.js +7 -1
  463. package/src/query/edit/query-content.js +10 -11
  464. package/src/read-more/block.json +2 -1
  465. package/src/rss/block.json +2 -1
  466. package/src/search/edit.js +84 -99
  467. package/src/separator/edit.js +16 -12
  468. package/src/table/block.json +8 -4
  469. package/src/table/edit.js +6 -2
  470. package/src/template-part/edit/advanced-controls.js +9 -8
  471. package/src/template-part/edit/index.js +1 -0
  472. package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
  473. package/src/verse/test/transforms.native.js +5 -1
  474. package/build/search/icons.js +0 -121
  475. package/build/search/icons.js.map +0 -1
  476. package/build/utils/messages.js +0 -22
  477. package/build/utils/messages.js.map +0 -1
  478. package/build-module/search/icons.js +0 -114
  479. package/build-module/search/icons.js.map +0 -1
  480. package/build-module/utils/messages.js +0 -15
  481. package/build-module/utils/messages.js.map +0 -1
  482. package/src/search/icons.js +0 -89
  483. package/src/utils/messages.js +0 -31
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "supports": {
19
19
  "align": true,
20
+ "html": false,
20
21
  "color": {
21
22
  "link": true,
22
23
  "__experimentalSkipSerialization": [ "text", "background" ],
@@ -11,7 +11,8 @@
11
11
  "type": "rich-text",
12
12
  "source": "rich-text",
13
13
  "selector": "code",
14
- "__unstablePreserveWhiteSpace": true
14
+ "__unstablePreserveWhiteSpace": true,
15
+ "role": "content"
15
16
  }
16
17
  },
17
18
  "supports": {
@@ -1,36 +1,38 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { SelectControl } from '@wordpress/components';
5
4
  import { __ } from '@wordpress/i18n';
6
- import { InspectorControls } from '@wordpress/block-editor';
5
+ import {
6
+ InspectorControls,
7
+ privateApis as blockEditorPrivateApis,
8
+ } from '@wordpress/block-editor';
7
9
 
8
10
  /**
9
11
  * Internal dependencies
10
12
  */
11
- import { htmlElementMessages } from '../../utils/messages';
13
+ import { unlock } from '../../lock-unlock';
14
+
15
+ const { HTMLElementControl } = unlock( blockEditorPrivateApis );
12
16
 
13
17
  export default function CommentsInspectorControls( {
14
18
  attributes: { tagName },
15
19
  setAttributes,
20
+ clientId,
16
21
  } ) {
17
22
  return (
18
23
  <InspectorControls>
19
24
  <InspectorControls group="advanced">
20
- <SelectControl
21
- __nextHasNoMarginBottom
22
- __next40pxDefaultSize
23
- label={ __( 'HTML element' ) }
25
+ <HTMLElementControl
26
+ tagName={ tagName }
27
+ onChange={ ( value ) =>
28
+ setAttributes( { tagName: value } )
29
+ }
30
+ clientId={ clientId }
24
31
  options={ [
25
32
  { label: __( 'Default (<div>)' ), value: 'div' },
26
33
  { label: '<section>', value: 'section' },
27
34
  { label: '<aside>', value: 'aside' },
28
35
  ] }
29
- value={ tagName }
30
- onChange={ ( value ) =>
31
- setAttributes( { tagName: value } )
32
- }
33
- help={ htmlElementMessages[ tagName ] }
34
36
  />
35
37
  </InspectorControls>
36
38
  </InspectorControls>
@@ -11,7 +11,7 @@ import CommentsLegacy from './comments-legacy';
11
11
  import TEMPLATE from './template';
12
12
 
13
13
  export default function CommentsEdit( props ) {
14
- const { attributes, setAttributes } = props;
14
+ const { attributes, setAttributes, clientId } = props;
15
15
  const { tagName: TagName, legacy } = attributes;
16
16
 
17
17
  const blockProps = useBlockProps();
@@ -28,6 +28,7 @@ export default function CommentsEdit( props ) {
28
28
  <CommentsInspectorControls
29
29
  attributes={ attributes }
30
30
  setAttributes={ setAttributes }
31
+ clientId={ clientId }
31
32
  />
32
33
  <TagName { ...innerBlocksProps } />
33
34
  </>
@@ -8,7 +8,6 @@ import {
8
8
  RangeControl,
9
9
  TextareaControl,
10
10
  ToggleControl,
11
- SelectControl,
12
11
  __experimentalUseCustomUnits as useCustomUnits,
13
12
  __experimentalToolsPanel as ToolsPanel,
14
13
  __experimentalToolsPanelItem as ToolsPanelItem,
@@ -36,9 +35,10 @@ import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
36
35
  import { unlock } from '../../lock-unlock';
37
36
  import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
38
37
  import { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';
39
- import { htmlElementMessages } from '../../utils/messages';
40
38
 
41
- const { cleanEmptyObject, ResolutionTool } = unlock( blockEditorPrivateApis );
39
+ const { cleanEmptyObject, ResolutionTool, HTMLElementControl } = unlock(
40
+ blockEditorPrivateApis
41
+ );
42
42
 
43
43
  function CoverHeightInput( {
44
44
  onChange,
@@ -421,10 +421,12 @@ export default function CoverInspectorControls( {
421
421
  </ToolsPanelItem>
422
422
  </InspectorControls>
423
423
  <InspectorControls group="advanced">
424
- <SelectControl
425
- __nextHasNoMarginBottom
426
- __next40pxDefaultSize
427
- label={ __( 'HTML element' ) }
424
+ <HTMLElementControl
425
+ tagName={ tagName }
426
+ onChange={ ( value ) =>
427
+ setAttributes( { tagName: value } )
428
+ }
429
+ clientId={ clientId }
428
430
  options={ [
429
431
  { label: __( 'Default (<div>)' ), value: 'div' },
430
432
  { label: '<header>', value: 'header' },
@@ -434,11 +436,6 @@ export default function CoverInspectorControls( {
434
436
  { label: '<aside>', value: 'aside' },
435
437
  { label: '<footer>', value: 'footer' },
436
438
  ] }
437
- value={ tagName }
438
- onChange={ ( value ) =>
439
- setAttributes( { tagName: value } )
440
- }
441
- help={ htmlElementMessages[ tagName ] }
442
439
  />
443
440
  </InspectorControls>
444
441
  </>
@@ -15,7 +15,8 @@
15
15
  "summary": {
16
16
  "type": "rich-text",
17
17
  "source": "rich-text",
18
- "selector": "summary"
18
+ "selector": "summary",
19
+ "role": "content"
19
20
  },
20
21
  "name": {
21
22
  "type": "string",
package/src/group/edit.js CHANGED
@@ -8,8 +8,8 @@ import {
8
8
  InspectorControls,
9
9
  useInnerBlocksProps,
10
10
  store as blockEditorStore,
11
+ privateApis as blockEditorPrivateApis,
11
12
  } from '@wordpress/block-editor';
12
- import { SelectControl } from '@wordpress/components';
13
13
  import { useRef } from '@wordpress/element';
14
14
  import { __ } from '@wordpress/i18n';
15
15
  import { View } from '@wordpress/primitives';
@@ -18,7 +18,9 @@ import { View } from '@wordpress/primitives';
18
18
  * Internal dependencies
19
19
  */
20
20
  import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
21
- import { htmlElementMessages } from '../utils/messages';
21
+ import { unlock } from '../lock-unlock';
22
+
23
+ const { HTMLElementControl } = unlock( blockEditorPrivateApis );
22
24
 
23
25
  /**
24
26
  * Render inspector controls for the Group block.
@@ -26,16 +28,17 @@ import { htmlElementMessages } from '../utils/messages';
26
28
  * @param {Object} props Component props.
27
29
  * @param {string} props.tagName The HTML tag name.
28
30
  * @param {Function} props.onSelectTagName onChange function for the SelectControl.
31
+ * @param {string} props.clientId The client ID of the current block.
29
32
  *
30
33
  * @return {JSX.Element} The control group.
31
34
  */
32
- function GroupEditControls( { tagName, onSelectTagName } ) {
35
+ function GroupEditControls( { tagName, onSelectTagName, clientId } ) {
33
36
  return (
34
37
  <InspectorControls group="advanced">
35
- <SelectControl
36
- __nextHasNoMarginBottom
37
- __next40pxDefaultSize
38
- label={ __( 'HTML element' ) }
38
+ <HTMLElementControl
39
+ tagName={ tagName }
40
+ onChange={ onSelectTagName }
41
+ clientId={ clientId }
39
42
  options={ [
40
43
  { label: __( 'Default (<div>)' ), value: 'div' },
41
44
  { label: '<header>', value: 'header' },
@@ -45,9 +48,6 @@ function GroupEditControls( { tagName, onSelectTagName } ) {
45
48
  { label: '<aside>', value: 'aside' },
46
49
  { label: '<footer>', value: 'footer' },
47
50
  ] }
48
- value={ tagName }
49
- onChange={ onSelectTagName }
50
- help={ htmlElementMessages[ tagName ] }
51
51
  />
52
52
  </InspectorControls>
53
53
  );
@@ -129,6 +129,7 @@ function GroupEdit( { attributes, name, setAttributes, clientId } ) {
129
129
  onSelectTagName={ ( value ) =>
130
130
  setAttributes( { tagName: value } )
131
131
  }
132
+ clientId={ clientId }
132
133
  />
133
134
  { showPlaceholder && (
134
135
  <View>
@@ -10,7 +10,8 @@
10
10
  "attributes": {
11
11
  "content": {
12
12
  "type": "string",
13
- "source": "raw"
13
+ "source": "raw",
14
+ "role": "content"
14
15
  }
15
16
  },
16
17
  "supports": {
@@ -10,6 +10,7 @@
10
10
  // The editing view for the HTML block is equivalent to block UI.
11
11
  // Therefore we increase specificity to avoid theme styles bleeding in.
12
12
  .block-editor-plain-text {
13
+ display: block;
13
14
  box-sizing: border-box;
14
15
  max-height: 250px;
15
16
  @include editor-input-reset();
@@ -7,3 +7,4 @@ export const NEW_TAB_REL = [ 'noreferrer', 'noopener' ];
7
7
  export const ALLOWED_MEDIA_TYPES = [ 'image' ];
8
8
  export const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
9
9
  export const SIZED_LAYOUTS = [ 'flex', 'grid' ];
10
+ export const DEFAULT_MEDIA_SIZE_SLUG = 'full';
package/src/image/edit.js CHANGED
@@ -42,6 +42,7 @@ import {
42
42
  LINK_DESTINATION_MEDIA,
43
43
  LINK_DESTINATION_NONE,
44
44
  ALLOWED_MEDIA_TYPES,
45
+ DEFAULT_MEDIA_SIZE_SLUG,
45
46
  } from './constants';
46
47
 
47
48
  export const pickRelevantMediaFiles = ( image, size ) => {
@@ -239,7 +240,7 @@ export function ImageEdit( {
239
240
 
240
241
  // Try to use the previous selected image size if its available
241
242
  // otherwise try the default image size or fallback to "full"
242
- let newSize = 'full';
243
+ let newSize = DEFAULT_MEDIA_SIZE_SLUG;
243
244
  if ( sizeSlug && hasSize( media, sizeSlug ) ) {
244
245
  newSize = sizeSlug;
245
246
  } else if ( hasSize( media, imageDefaultSize ) ) {
@@ -262,10 +263,6 @@ export function ImageEdit( {
262
263
  additionalAttributes = {
263
264
  sizeSlug: newSize,
264
265
  };
265
- } else {
266
- // Keep the same url when selecting the same file, so "Resolution"
267
- // option is not changed.
268
- additionalAttributes = { url };
269
266
  }
270
267
 
271
268
  // Check if default link setting should be used.
@@ -53,12 +53,13 @@ import { unlock } from '../lock-unlock';
53
53
  import { createUpgradedEmbedBlock } from '../embed/util';
54
54
  import { isExternalImage } from './edit';
55
55
  import { Caption } from '../utils/caption';
56
-
57
- /**
58
- * Module constants
59
- */
60
56
  import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
61
- import { MIN_SIZE, ALLOWED_MEDIA_TYPES, SIZED_LAYOUTS } from './constants';
57
+ import {
58
+ MIN_SIZE,
59
+ ALLOWED_MEDIA_TYPES,
60
+ SIZED_LAYOUTS,
61
+ DEFAULT_MEDIA_SIZE_SLUG,
62
+ } from './constants';
62
63
  import { evalAspectRatio } from './utils';
63
64
 
64
65
  const { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );
@@ -836,6 +837,7 @@ export default function Image( {
836
837
  { !! imageSizeOptions.length && (
837
838
  <ResolutionTool
838
839
  value={ sizeSlug }
840
+ defaultValue={ DEFAULT_MEDIA_SIZE_SLUG }
839
841
  onChange={ updateImage }
840
842
  options={ imageSizeOptions }
841
843
  />
@@ -60,6 +60,7 @@ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
60
60
  */
61
61
  const CATEGORIES_LIST_QUERY = {
62
62
  per_page: -1,
63
+ _fields: 'id,name',
63
64
  context: 'view',
64
65
  };
65
66
  const USERS_LIST_QUERY = {
@@ -67,6 +68,28 @@ const USERS_LIST_QUERY = {
67
68
  has_published_posts: [ 'post' ],
68
69
  context: 'view',
69
70
  };
71
+ const imageAlignmentOptions = [
72
+ {
73
+ value: 'none',
74
+ icon: alignNone,
75
+ label: __( 'None' ),
76
+ },
77
+ {
78
+ value: 'left',
79
+ icon: positionLeft,
80
+ label: __( 'Left' ),
81
+ },
82
+ {
83
+ value: 'center',
84
+ icon: positionCenter,
85
+ label: __( 'Center' ),
86
+ },
87
+ {
88
+ value: 'right',
89
+ icon: positionRight,
90
+ label: __( 'Right' ),
91
+ },
92
+ ];
70
93
 
71
94
  function getFeaturedImageDetails( post, size ) {
72
95
  const image = post._embedded?.[ 'wp:featuredmedia' ]?.[ '0' ];
@@ -79,10 +102,11 @@ function getFeaturedImageDetails( post, size ) {
79
102
  };
80
103
  }
81
104
 
82
- export default function LatestPostsEdit( { attributes, setAttributes } ) {
83
- const instanceId = useInstanceId( LatestPostsEdit );
84
- const dropdownMenuProps = useToolsPanelDropdownMenuProps();
105
+ function getCurrentAuthor( post ) {
106
+ return post._embedded?.author?.[ 0 ];
107
+ }
85
108
 
109
+ function Controls( { attributes, setAttributes, postCount } ) {
86
110
  const {
87
111
  postsToShow,
88
112
  order,
@@ -105,7 +129,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
105
129
  } = attributes;
106
130
  const {
107
131
  imageSizes,
108
- latestPosts,
109
132
  defaultImageWidth,
110
133
  defaultImageHeight,
111
134
  categoriesList,
@@ -114,21 +137,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
114
137
  ( select ) => {
115
138
  const { getEntityRecords, getUsers } = select( coreStore );
116
139
  const settings = select( blockEditorStore ).getSettings();
117
- const catIds =
118
- categories && categories.length > 0
119
- ? categories.map( ( cat ) => cat.id )
120
- : [];
121
- const latestPostsQuery = Object.fromEntries(
122
- Object.entries( {
123
- categories: catIds,
124
- author: selectedAuthor,
125
- order,
126
- orderby: orderBy,
127
- per_page: postsToShow,
128
- _embed: 'wp:featuredmedia',
129
- ignore_sticky: true,
130
- } ).filter( ( [ , value ] ) => typeof value !== 'undefined' )
131
- );
132
140
 
133
141
  return {
134
142
  defaultImageWidth:
@@ -138,11 +146,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
138
146
  settings.imageDimensions?.[ featuredImageSizeSlug ]
139
147
  ?.height ?? 0,
140
148
  imageSizes: settings.imageSizes,
141
- latestPosts: getEntityRecords(
142
- 'postType',
143
- 'post',
144
- latestPostsQuery
145
- ),
146
149
  categoriesList: getEntityRecords(
147
150
  'taxonomy',
148
151
  'category',
@@ -151,25 +154,10 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
151
154
  authorList: getUsers( USERS_LIST_QUERY ),
152
155
  };
153
156
  },
154
- [
155
- featuredImageSizeSlug,
156
- postsToShow,
157
- order,
158
- orderBy,
159
- categories,
160
- selectedAuthor,
161
- ]
157
+ [ featuredImageSizeSlug ]
162
158
  );
163
159
 
164
- // If a user clicks to a link prevent redirection and show a warning.
165
- const { createWarningNotice } = useDispatch( noticeStore );
166
- const showRedirectionPreventedNotice = ( event ) => {
167
- event.preventDefault();
168
- createWarningNotice( __( 'Links are disabled in the editor.' ), {
169
- id: `block-library/core/latest-posts/redirection-prevented/${ instanceId }`,
170
- type: 'snackbar',
171
- } );
172
- };
160
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
173
161
 
174
162
  const imageSizeOptions = imageSizes
175
163
  .filter( ( { slug } ) => slug !== 'full' )
@@ -208,32 +196,8 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
208
196
  setAttributes( { categories: allCategories } );
209
197
  };
210
198
 
211
- const imageAlignmentOptions = [
212
- {
213
- value: 'none',
214
- icon: alignNone,
215
- label: __( 'None' ),
216
- },
217
- {
218
- value: 'left',
219
- icon: positionLeft,
220
- label: __( 'Left' ),
221
- },
222
- {
223
- value: 'center',
224
- icon: positionCenter,
225
- label: __( 'Center' ),
226
- },
227
- {
228
- value: 'right',
229
- icon: positionRight,
230
- label: __( 'Right' ),
231
- },
232
- ];
233
-
234
- const hasPosts = !! latestPosts?.length;
235
- const inspectorControls = (
236
- <InspectorControls>
199
+ return (
200
+ <>
237
201
  <ToolsPanel
238
202
  label={ __( 'Post content' ) }
239
203
  resetAll={ () =>
@@ -247,7 +211,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
247
211
  >
248
212
  <ToolsPanelItem
249
213
  hasValue={ () => !! displayPostContent }
250
- label={ __( 'Post content' ) }
214
+ label={ __( 'Display post content' ) }
251
215
  onDeselect={ () =>
252
216
  setAttributes( { displayPostContent: false } )
253
217
  }
@@ -255,7 +219,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
255
219
  >
256
220
  <ToggleControl
257
221
  __nextHasNoMarginBottom
258
- label={ __( 'Post content' ) }
222
+ label={ __( 'Display post content' ) }
259
223
  checked={ displayPostContent }
260
224
  onChange={ ( value ) =>
261
225
  setAttributes( { displayPostContent: value } )
@@ -265,7 +229,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
265
229
  { displayPostContent && (
266
230
  <ToolsPanelItem
267
231
  hasValue={ () => displayPostContentRadio !== 'excerpt' }
268
- label={ __( 'Show' ) }
232
+ label={ __( 'Content length' ) }
269
233
  onDeselect={ () =>
270
234
  setAttributes( {
271
235
  displayPostContentRadio: 'excerpt',
@@ -274,7 +238,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
274
238
  isShownByDefault
275
239
  >
276
240
  <RadioControl
277
- label={ __( 'Show' ) }
241
+ label={ __( 'Content length' ) }
278
242
  selected={ displayPostContentRadio }
279
243
  options={ [
280
244
  { label: __( 'Excerpt' ), value: 'excerpt' },
@@ -319,7 +283,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
319
283
  </ToolsPanelItem>
320
284
  ) }
321
285
  </ToolsPanel>
322
-
323
286
  <ToolsPanel
324
287
  label={ __( 'Post meta' ) }
325
288
  resetAll={ () =>
@@ -445,7 +408,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
445
408
  </>
446
409
  ) }
447
410
  </PanelBody>
448
-
449
411
  <PanelBody title={ __( 'Sorting and filtering' ) }>
450
412
  <QueryControls
451
413
  { ...{ order, orderBy } }
@@ -483,17 +445,89 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
483
445
  }
484
446
  min={ 2 }
485
447
  max={
486
- ! hasPosts
448
+ ! postCount
487
449
  ? MAX_POSTS_COLUMNS
488
- : Math.min(
489
- MAX_POSTS_COLUMNS,
490
- latestPosts.length
491
- )
450
+ : Math.min( MAX_POSTS_COLUMNS, postCount )
492
451
  }
493
452
  required
494
453
  />
495
454
  ) }
496
455
  </PanelBody>
456
+ </>
457
+ );
458
+ }
459
+
460
+ export default function LatestPostsEdit( { attributes, setAttributes } ) {
461
+ const instanceId = useInstanceId( LatestPostsEdit );
462
+
463
+ const {
464
+ postsToShow,
465
+ order,
466
+ orderBy,
467
+ categories,
468
+ selectedAuthor,
469
+ displayFeaturedImage,
470
+ displayPostContentRadio,
471
+ displayPostContent,
472
+ displayPostDate,
473
+ displayAuthor,
474
+ postLayout,
475
+ columns,
476
+ excerptLength,
477
+ featuredImageAlign,
478
+ featuredImageSizeSlug,
479
+ featuredImageSizeWidth,
480
+ featuredImageSizeHeight,
481
+ addLinkToFeaturedImage,
482
+ } = attributes;
483
+ const { latestPosts } = useSelect(
484
+ ( select ) => {
485
+ const { getEntityRecords } = select( coreStore );
486
+ const catIds =
487
+ categories && categories.length > 0
488
+ ? categories.map( ( cat ) => cat.id )
489
+ : [];
490
+ const latestPostsQuery = Object.fromEntries(
491
+ Object.entries( {
492
+ categories: catIds,
493
+ author: selectedAuthor,
494
+ order,
495
+ orderby: orderBy,
496
+ per_page: postsToShow,
497
+ _embed: 'author,wp:featuredmedia',
498
+ ignore_sticky: true,
499
+ } ).filter( ( [ , value ] ) => typeof value !== 'undefined' )
500
+ );
501
+
502
+ return {
503
+ latestPosts: getEntityRecords(
504
+ 'postType',
505
+ 'post',
506
+ latestPostsQuery
507
+ ),
508
+ };
509
+ },
510
+ [ postsToShow, order, orderBy, categories, selectedAuthor ]
511
+ );
512
+
513
+ // If a user clicks to a link prevent redirection and show a warning.
514
+ const { createWarningNotice } = useDispatch( noticeStore );
515
+ const showRedirectionPreventedNotice = ( event ) => {
516
+ event.preventDefault();
517
+ createWarningNotice( __( 'Links are disabled in the editor.' ), {
518
+ id: `block-library/core/latest-posts/redirection-prevented/${ instanceId }`,
519
+ type: 'snackbar',
520
+ } );
521
+ };
522
+
523
+ const hasPosts = !! latestPosts?.length;
524
+ const inspectorControls = (
525
+ <InspectorControls>
526
+ <Controls
527
+ attributes={ attributes }
528
+ setAttributes={ setAttributes }
529
+ postCount={ latestPosts?.length ?? 0 }
530
+ />
497
531
  </InspectorControls>
498
532
  );
499
533
 
@@ -555,9 +589,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
555
589
  { displayPosts.map( ( post ) => {
556
590
  const titleTrimmed = post.title.rendered.trim();
557
591
  let excerpt = post.excerpt.rendered;
558
- const currentAuthor = authorList?.find(
559
- ( author ) => author.id === post.author
560
- );
592
+ const currentAuthor = getCurrentAuthor( post );
561
593
 
562
594
  const excerptElement = document.createElement( 'div' );
563
595
  excerptElement.innerHTML = excerpt;
@@ -16,7 +16,11 @@
16
16
  */
17
17
  function render_block_core_loginout( $attributes ) {
18
18
 
19
- // Build the redirect URL.
19
+ /*
20
+ * Build the redirect URL. This current url fetching logic matches with the core.
21
+ *
22
+ * @see https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528.
23
+ */
20
24
  $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
21
25
 
22
26
  $classes = is_user_logged_in() ? 'logged-in' : 'logged-out';
@@ -10,7 +10,8 @@
10
10
  "attributes": {
11
11
  "customText": {
12
12
  "type": "string",
13
- "default": ""
13
+ "default": "",
14
+ "role": "content"
14
15
  },
15
16
  "noTeaser": {
16
17
  "type": "boolean",
@@ -133,7 +133,6 @@ class WP_Navigation_Block_Renderer {
133
133
  * @since 6.5.0
134
134
  *
135
135
  * @param array $needs_list_item_wrapper The list of blocks that need a list item wrapper.
136
- * @return array The list of blocks that need a list item wrapper.
137
136
  */
138
137
  $needs_list_item_wrapper = apply_filters( 'block_core_navigation_listable_blocks', static::$needs_list_item_wrapper );
139
138
 
@@ -213,7 +213,7 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
213
213
  $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
214
214
  $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
215
215
 
216
- if ( is_post_type_archive() ) {
216
+ if ( is_post_type_archive() && ! empty( $attributes['url'] ) ) {
217
217
  $queried_archive_link = get_post_type_archive_link( get_queried_object()->name );
218
218
  if ( $attributes['url'] === $queried_archive_link ) {
219
219
  $is_active = true;
@@ -86,7 +86,7 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
86
86
  $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
87
87
  $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
88
88
 
89
- if ( is_post_type_archive() ) {
89
+ if ( is_post_type_archive() && ! empty( $attributes['url'] ) ) {
90
90
  $queried_archive_link = get_post_type_archive_link( get_queried_object()->name );
91
91
  if ( $attributes['url'] === $queried_archive_link ) {
92
92
  $is_active = true;
@@ -26,7 +26,7 @@ function render_block_core_post_author( $attributes, $content, $block ) {
26
26
  return '';
27
27
  }
28
28
 
29
- if ( ! post_type_supports( $block->context['postType'], 'author' ) ) {
29
+ if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) {
30
30
  return '';
31
31
  }
32
32
 
@@ -26,7 +26,7 @@ function render_block_core_post_author_name( $attributes, $content, $block ) {
26
26
  return '';
27
27
  }
28
28
 
29
- if ( ! post_type_supports( $block->context['postType'], 'author' ) ) {
29
+ if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) {
30
30
  return '';
31
31
  }
32
32