@wordpress/block-library 8.3.5 → 8.3.7

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 (344) hide show
  1. package/build/archives/index.js +0 -1
  2. package/build/archives/index.js.map +1 -1
  3. package/build/avatar/index.js +0 -1
  4. package/build/avatar/index.js.map +1 -1
  5. package/build/calendar/index.js +0 -1
  6. package/build/calendar/index.js.map +1 -1
  7. package/build/categories/index.js +0 -1
  8. package/build/categories/index.js.map +1 -1
  9. package/build/comment-author-avatar/index.js +0 -1
  10. package/build/comment-author-avatar/index.js.map +1 -1
  11. package/build/comment-author-name/index.js +0 -1
  12. package/build/comment-author-name/index.js.map +1 -1
  13. package/build/comment-content/index.js +0 -1
  14. package/build/comment-content/index.js.map +1 -1
  15. package/build/comment-date/index.js +0 -1
  16. package/build/comment-date/index.js.map +1 -1
  17. package/build/comment-edit-link/index.js +0 -1
  18. package/build/comment-edit-link/index.js.map +1 -1
  19. package/build/comment-reply-link/index.js +0 -1
  20. package/build/comment-reply-link/index.js.map +1 -1
  21. package/build/comment-template/index.js +0 -1
  22. package/build/comment-template/index.js.map +1 -1
  23. package/build/comments/index.js +1 -2
  24. package/build/comments/index.js.map +1 -1
  25. package/build/comments-pagination/index.js +0 -1
  26. package/build/comments-pagination/index.js.map +1 -1
  27. package/build/comments-pagination-next/index.js +0 -1
  28. package/build/comments-pagination-next/index.js.map +1 -1
  29. package/build/comments-pagination-numbers/index.js +0 -1
  30. package/build/comments-pagination-numbers/index.js.map +1 -1
  31. package/build/comments-pagination-previous/index.js +0 -1
  32. package/build/comments-pagination-previous/index.js.map +1 -1
  33. package/build/home-link/index.js +0 -1
  34. package/build/home-link/index.js.map +1 -1
  35. package/build/latest-comments/index.js +0 -1
  36. package/build/latest-comments/index.js.map +1 -1
  37. package/build/latest-posts/deprecated.js +0 -1
  38. package/build/latest-posts/deprecated.js.map +1 -1
  39. package/build/latest-posts/index.js +0 -1
  40. package/build/latest-posts/index.js.map +1 -1
  41. package/build/list-item/hooks/use-outdent-list-item.js +2 -1
  42. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  43. package/build/loginout/index.js +0 -1
  44. package/build/loginout/index.js.map +1 -1
  45. package/build/navigation/edit/index.js +4 -2
  46. package/build/navigation/edit/index.js.map +1 -1
  47. package/build/navigation/edit/inner-blocks.js +4 -1
  48. package/build/navigation/edit/inner-blocks.js.map +1 -1
  49. package/build/navigation/edit/menu-inspector-controls.js +1 -1
  50. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  51. package/build/navigation/index.js +0 -1
  52. package/build/navigation/index.js.map +1 -1
  53. package/build/navigation-link/edit.js +5 -21
  54. package/build/navigation-link/edit.js.map +1 -1
  55. package/build/navigation-submenu/edit.js +1 -13
  56. package/build/navigation-submenu/edit.js.map +1 -1
  57. package/build/page-list/edit.js +5 -1
  58. package/build/page-list/edit.js.map +1 -1
  59. package/build/page-list/index.js +0 -1
  60. package/build/page-list/index.js.map +1 -1
  61. package/build/post-author/index.js +0 -1
  62. package/build/post-author/index.js.map +1 -1
  63. package/build/post-author-biography/index.js +0 -1
  64. package/build/post-author-biography/index.js.map +1 -1
  65. package/build/post-author-name/index.js +0 -1
  66. package/build/post-author-name/index.js.map +1 -1
  67. package/build/post-comments-count/index.js +0 -1
  68. package/build/post-comments-count/index.js.map +1 -1
  69. package/build/post-comments-form/index.js +0 -1
  70. package/build/post-comments-form/index.js.map +1 -1
  71. package/build/post-comments-link/index.js +0 -1
  72. package/build/post-comments-link/index.js.map +1 -1
  73. package/build/post-content/index.js +0 -1
  74. package/build/post-content/index.js.map +1 -1
  75. package/build/post-date/index.js +0 -1
  76. package/build/post-date/index.js.map +1 -1
  77. package/build/post-excerpt/index.js +0 -1
  78. package/build/post-excerpt/index.js.map +1 -1
  79. package/build/post-featured-image/index.js +0 -1
  80. package/build/post-featured-image/index.js.map +1 -1
  81. package/build/post-navigation-link/index.js +0 -1
  82. package/build/post-navigation-link/index.js.map +1 -1
  83. package/build/post-template/index.js +0 -1
  84. package/build/post-template/index.js.map +1 -1
  85. package/build/post-terms/index.js +0 -1
  86. package/build/post-terms/index.js.map +1 -1
  87. package/build/post-title/index.js +0 -1
  88. package/build/post-title/index.js.map +1 -1
  89. package/build/query/edit/query-placeholder.js +3 -2
  90. package/build/query/edit/query-placeholder.js.map +1 -1
  91. package/build/query/index.js +0 -1
  92. package/build/query/index.js.map +1 -1
  93. package/build/query/utils.js +0 -1
  94. package/build/query/utils.js.map +1 -1
  95. package/build/query-no-results/index.js +0 -1
  96. package/build/query-no-results/index.js.map +1 -1
  97. package/build/query-pagination/index.js +0 -1
  98. package/build/query-pagination/index.js.map +1 -1
  99. package/build/query-pagination-next/index.js +0 -1
  100. package/build/query-pagination-next/index.js.map +1 -1
  101. package/build/query-pagination-numbers/index.js +0 -1
  102. package/build/query-pagination-numbers/index.js.map +1 -1
  103. package/build/query-pagination-previous/index.js +0 -1
  104. package/build/query-pagination-previous/index.js.map +1 -1
  105. package/build/query-title/index.js +0 -1
  106. package/build/query-title/index.js.map +1 -1
  107. package/build/read-more/index.js +0 -1
  108. package/build/read-more/index.js.map +1 -1
  109. package/build/rss/index.js +0 -1
  110. package/build/rss/index.js.map +1 -1
  111. package/build/search/index.js +0 -1
  112. package/build/search/index.js.map +1 -1
  113. package/build/site-logo/index.js +0 -1
  114. package/build/site-logo/index.js.map +1 -1
  115. package/build/site-tagline/index.js +1 -1
  116. package/build/site-title/index.js +0 -1
  117. package/build/site-title/index.js.map +1 -1
  118. package/build/social-link/index.js +0 -1
  119. package/build/social-link/index.js.map +1 -1
  120. package/build/social-links/edit.js +2 -1
  121. package/build/social-links/edit.js.map +1 -1
  122. package/build/tag-cloud/index.js +0 -1
  123. package/build/tag-cloud/index.js.map +1 -1
  124. package/build/template-part/edit/import-controls.js +33 -30
  125. package/build/template-part/edit/import-controls.js.map +1 -1
  126. package/build/template-part/edit/utils/transformers.js +69 -19
  127. package/build/template-part/edit/utils/transformers.js.map +1 -1
  128. package/build/template-part/index.js +0 -1
  129. package/build/template-part/index.js.map +1 -1
  130. package/build/term-description/index.js +0 -1
  131. package/build/term-description/index.js.map +1 -1
  132. package/build-module/archives/index.js +0 -1
  133. package/build-module/archives/index.js.map +1 -1
  134. package/build-module/avatar/index.js +0 -1
  135. package/build-module/avatar/index.js.map +1 -1
  136. package/build-module/calendar/index.js +0 -1
  137. package/build-module/calendar/index.js.map +1 -1
  138. package/build-module/categories/index.js +0 -1
  139. package/build-module/categories/index.js.map +1 -1
  140. package/build-module/comment-author-avatar/index.js +0 -1
  141. package/build-module/comment-author-avatar/index.js.map +1 -1
  142. package/build-module/comment-author-name/index.js +0 -1
  143. package/build-module/comment-author-name/index.js.map +1 -1
  144. package/build-module/comment-content/index.js +0 -1
  145. package/build-module/comment-content/index.js.map +1 -1
  146. package/build-module/comment-date/index.js +0 -1
  147. package/build-module/comment-date/index.js.map +1 -1
  148. package/build-module/comment-edit-link/index.js +0 -1
  149. package/build-module/comment-edit-link/index.js.map +1 -1
  150. package/build-module/comment-reply-link/index.js +0 -1
  151. package/build-module/comment-reply-link/index.js.map +1 -1
  152. package/build-module/comment-template/index.js +0 -1
  153. package/build-module/comment-template/index.js.map +1 -1
  154. package/build-module/comments/index.js +1 -2
  155. package/build-module/comments/index.js.map +1 -1
  156. package/build-module/comments-pagination/index.js +0 -1
  157. package/build-module/comments-pagination/index.js.map +1 -1
  158. package/build-module/comments-pagination-next/index.js +0 -1
  159. package/build-module/comments-pagination-next/index.js.map +1 -1
  160. package/build-module/comments-pagination-numbers/index.js +0 -1
  161. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  162. package/build-module/comments-pagination-previous/index.js +0 -1
  163. package/build-module/comments-pagination-previous/index.js.map +1 -1
  164. package/build-module/home-link/index.js +0 -1
  165. package/build-module/home-link/index.js.map +1 -1
  166. package/build-module/latest-comments/index.js +0 -1
  167. package/build-module/latest-comments/index.js.map +1 -1
  168. package/build-module/latest-posts/deprecated.js +0 -1
  169. package/build-module/latest-posts/deprecated.js.map +1 -1
  170. package/build-module/latest-posts/index.js +0 -1
  171. package/build-module/latest-posts/index.js.map +1 -1
  172. package/build-module/list-item/hooks/use-outdent-list-item.js +2 -1
  173. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  174. package/build-module/loginout/index.js +0 -1
  175. package/build-module/loginout/index.js.map +1 -1
  176. package/build-module/navigation/edit/index.js +4 -2
  177. package/build-module/navigation/edit/index.js.map +1 -1
  178. package/build-module/navigation/edit/inner-blocks.js +4 -1
  179. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  180. package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
  181. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  182. package/build-module/navigation/index.js +0 -1
  183. package/build-module/navigation/index.js.map +1 -1
  184. package/build-module/navigation-link/edit.js +5 -21
  185. package/build-module/navigation-link/edit.js.map +1 -1
  186. package/build-module/navigation-submenu/edit.js +1 -13
  187. package/build-module/navigation-submenu/edit.js.map +1 -1
  188. package/build-module/page-list/edit.js +5 -1
  189. package/build-module/page-list/edit.js.map +1 -1
  190. package/build-module/page-list/index.js +0 -1
  191. package/build-module/page-list/index.js.map +1 -1
  192. package/build-module/post-author/index.js +0 -1
  193. package/build-module/post-author/index.js.map +1 -1
  194. package/build-module/post-author-biography/index.js +0 -1
  195. package/build-module/post-author-biography/index.js.map +1 -1
  196. package/build-module/post-author-name/index.js +0 -1
  197. package/build-module/post-author-name/index.js.map +1 -1
  198. package/build-module/post-comments-count/index.js +0 -1
  199. package/build-module/post-comments-count/index.js.map +1 -1
  200. package/build-module/post-comments-form/index.js +0 -1
  201. package/build-module/post-comments-form/index.js.map +1 -1
  202. package/build-module/post-comments-link/index.js +0 -1
  203. package/build-module/post-comments-link/index.js.map +1 -1
  204. package/build-module/post-content/index.js +0 -1
  205. package/build-module/post-content/index.js.map +1 -1
  206. package/build-module/post-date/index.js +0 -1
  207. package/build-module/post-date/index.js.map +1 -1
  208. package/build-module/post-excerpt/index.js +0 -1
  209. package/build-module/post-excerpt/index.js.map +1 -1
  210. package/build-module/post-featured-image/index.js +0 -1
  211. package/build-module/post-featured-image/index.js.map +1 -1
  212. package/build-module/post-navigation-link/index.js +0 -1
  213. package/build-module/post-navigation-link/index.js.map +1 -1
  214. package/build-module/post-template/index.js +0 -1
  215. package/build-module/post-template/index.js.map +1 -1
  216. package/build-module/post-terms/index.js +0 -1
  217. package/build-module/post-terms/index.js.map +1 -1
  218. package/build-module/post-title/index.js +0 -1
  219. package/build-module/post-title/index.js.map +1 -1
  220. package/build-module/query/edit/query-placeholder.js +4 -3
  221. package/build-module/query/edit/query-placeholder.js.map +1 -1
  222. package/build-module/query/index.js +0 -1
  223. package/build-module/query/index.js.map +1 -1
  224. package/build-module/query/utils.js +0 -1
  225. package/build-module/query/utils.js.map +1 -1
  226. package/build-module/query-no-results/index.js +0 -1
  227. package/build-module/query-no-results/index.js.map +1 -1
  228. package/build-module/query-pagination/index.js +0 -1
  229. package/build-module/query-pagination/index.js.map +1 -1
  230. package/build-module/query-pagination-next/index.js +0 -1
  231. package/build-module/query-pagination-next/index.js.map +1 -1
  232. package/build-module/query-pagination-numbers/index.js +0 -1
  233. package/build-module/query-pagination-numbers/index.js.map +1 -1
  234. package/build-module/query-pagination-previous/index.js +0 -1
  235. package/build-module/query-pagination-previous/index.js.map +1 -1
  236. package/build-module/query-title/index.js +0 -1
  237. package/build-module/query-title/index.js.map +1 -1
  238. package/build-module/read-more/index.js +0 -1
  239. package/build-module/read-more/index.js.map +1 -1
  240. package/build-module/rss/index.js +0 -1
  241. package/build-module/rss/index.js.map +1 -1
  242. package/build-module/search/index.js +0 -1
  243. package/build-module/search/index.js.map +1 -1
  244. package/build-module/site-logo/index.js +0 -1
  245. package/build-module/site-logo/index.js.map +1 -1
  246. package/build-module/site-tagline/index.js +1 -1
  247. package/build-module/site-title/index.js +0 -1
  248. package/build-module/site-title/index.js.map +1 -1
  249. package/build-module/social-link/index.js +0 -1
  250. package/build-module/social-link/index.js.map +1 -1
  251. package/build-module/social-links/edit.js +2 -1
  252. package/build-module/social-links/edit.js.map +1 -1
  253. package/build-module/tag-cloud/index.js +0 -1
  254. package/build-module/tag-cloud/index.js.map +1 -1
  255. package/build-module/template-part/edit/import-controls.js +32 -29
  256. package/build-module/template-part/edit/import-controls.js.map +1 -1
  257. package/build-module/template-part/edit/utils/transformers.js +69 -20
  258. package/build-module/template-part/edit/utils/transformers.js.map +1 -1
  259. package/build-module/template-part/index.js +0 -1
  260. package/build-module/template-part/index.js.map +1 -1
  261. package/build-module/term-description/index.js +0 -1
  262. package/build-module/term-description/index.js.map +1 -1
  263. package/build-style/editor-rtl.css +8 -3
  264. package/build-style/editor.css +8 -3
  265. package/build-style/navigation/editor-rtl.css +1 -1
  266. package/build-style/navigation/editor.css +1 -1
  267. package/build-style/page-list/editor-rtl.css +4 -0
  268. package/build-style/page-list/editor.css +4 -0
  269. package/build-style/query/editor-rtl.css +1 -0
  270. package/build-style/query/editor.css +1 -0
  271. package/build-style/site-logo/editor-rtl.css +2 -2
  272. package/build-style/site-logo/editor.css +2 -2
  273. package/package.json +6 -6
  274. package/src/archives/block.json +0 -1
  275. package/src/avatar/block.json +0 -1
  276. package/src/calendar/block.json +0 -1
  277. package/src/categories/block.json +0 -1
  278. package/src/comment-author-avatar/block.json +0 -1
  279. package/src/comment-author-name/block.json +0 -1
  280. package/src/comment-content/block.json +0 -1
  281. package/src/comment-date/block.json +0 -1
  282. package/src/comment-edit-link/block.json +0 -1
  283. package/src/comment-reply-link/block.json +0 -1
  284. package/src/comment-template/block.json +0 -1
  285. package/src/comments/block.json +1 -2
  286. package/src/comments-pagination/block.json +0 -1
  287. package/src/comments-pagination-next/block.json +0 -1
  288. package/src/comments-pagination-numbers/block.json +0 -1
  289. package/src/comments-pagination-previous/block.json +0 -1
  290. package/src/home-link/block.json +0 -1
  291. package/src/latest-comments/block.json +0 -1
  292. package/src/latest-posts/block.json +0 -1
  293. package/src/list-item/hooks/use-outdent-list-item.js +2 -1
  294. package/src/loginout/block.json +0 -1
  295. package/src/navigation/block.json +0 -1
  296. package/src/navigation/edit/index.js +3 -1
  297. package/src/navigation/edit/inner-blocks.js +3 -0
  298. package/src/navigation/edit/menu-inspector-controls.js +1 -3
  299. package/src/navigation/editor.scss +23 -20
  300. package/src/navigation/index.php +8 -6
  301. package/src/navigation-link/edit.js +5 -19
  302. package/src/navigation-link/index.php +4 -5
  303. package/src/navigation-submenu/edit.js +0 -10
  304. package/src/navigation-submenu/index.php +23 -6
  305. package/src/page-list/block.json +0 -1
  306. package/src/page-list/edit.js +3 -1
  307. package/src/page-list/editor.scss +6 -0
  308. package/src/post-author/block.json +0 -1
  309. package/src/post-author-biography/block.json +0 -1
  310. package/src/post-author-name/block.json +0 -1
  311. package/src/post-comments-count/block.json +0 -1
  312. package/src/post-comments-form/block.json +0 -1
  313. package/src/post-comments-link/block.json +0 -1
  314. package/src/post-content/block.json +0 -1
  315. package/src/post-date/block.json +0 -1
  316. package/src/post-excerpt/block.json +0 -1
  317. package/src/post-featured-image/block.json +0 -1
  318. package/src/post-navigation-link/block.json +0 -1
  319. package/src/post-template/block.json +0 -1
  320. package/src/post-terms/block.json +0 -1
  321. package/src/post-title/block.json +0 -1
  322. package/src/query/block.json +0 -1
  323. package/src/query/edit/query-placeholder.js +10 -5
  324. package/src/query/editor.scss +1 -0
  325. package/src/query-no-results/block.json +0 -1
  326. package/src/query-pagination/block.json +0 -1
  327. package/src/query-pagination-next/block.json +0 -1
  328. package/src/query-pagination-numbers/block.json +0 -1
  329. package/src/query-pagination-previous/block.json +0 -1
  330. package/src/query-title/block.json +0 -1
  331. package/src/read-more/block.json +0 -1
  332. package/src/rss/block.json +0 -1
  333. package/src/search/block.json +0 -1
  334. package/src/site-logo/block.json +0 -1
  335. package/src/site-logo/editor.scss +3 -3
  336. package/src/site-tagline/block.json +1 -1
  337. package/src/site-title/block.json +0 -1
  338. package/src/social-link/block.json +0 -1
  339. package/src/social-links/edit.js +1 -0
  340. package/src/tag-cloud/block.json +0 -1
  341. package/src/template-part/block.json +0 -1
  342. package/src/template-part/edit/import-controls.js +26 -34
  343. package/src/template-part/edit/utils/transformers.js +96 -19
  344. package/src/term-description/block.json +0 -1
@@ -9,18 +9,17 @@
9
9
  * Build an array with CSS classes and inline styles defining the colors
10
10
  * which will be applied to the navigation markup in the front-end.
11
11
  *
12
- * @param array $context Navigation block context.
13
- * @param array $attributes Block attributes.
12
+ * @param array $context Navigation block context.
13
+ * @param array $attributes Block attributes.
14
+ * @param bool $is_sub_menu Whether the block is a sub-menu.
14
15
  * @return array Colors CSS classes and inline styles.
15
16
  */
16
- function block_core_navigation_submenu_build_css_colors( $context, $attributes ) {
17
+ function block_core_navigation_submenu_build_css_colors( $context, $attributes, $is_sub_menu = false ) {
17
18
  $colors = array(
18
19
  'css_classes' => array(),
19
20
  'inline_styles' => '',
20
21
  );
21
22
 
22
- $is_sub_menu = isset( $attributes['isTopLevelItem'] ) ? ( ! $attributes['isTopLevelItem'] ) : false;
23
-
24
23
  // Text color.
25
24
  $named_text_color = null;
26
25
  $custom_text_color = null;
@@ -250,6 +249,15 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
250
249
  }
251
250
 
252
251
  if ( $has_submenu ) {
252
+ $colors = block_core_navigation_submenu_build_css_colors( $block->context, $attributes, $has_submenu );
253
+ $classes = array_merge(
254
+ array( 'wp-block-navigation__submenu-container' ),
255
+ $colors['css_classes']
256
+ );
257
+ $css_classes = trim( implode( ' ', $classes ) );
258
+
259
+ $style_attribute = $colors['inline_styles'];
260
+
253
261
  $inner_blocks_html = '';
254
262
  foreach ( $block->inner_blocks as $inner_block ) {
255
263
  $inner_blocks_html .= $inner_block->render();
@@ -263,10 +271,19 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
263
271
  $html = $tag_processor->get_updated_html();
264
272
  }
265
273
 
274
+ $wrapper_attributes = get_block_wrapper_attributes(
275
+ array(
276
+ 'class' => $css_classes,
277
+ 'style' => $style_attribute,
278
+ )
279
+ );
280
+
266
281
  $html .= sprintf(
267
- '<ul class="wp-block-navigation__submenu-container">%s</ul>',
282
+ '<ul %s>%s</ul>',
283
+ $wrapper_attributes,
268
284
  $inner_blocks_html
269
285
  );
286
+
270
287
  }
271
288
 
272
289
  $html .= '</li>';
@@ -33,7 +33,6 @@
33
33
  "openSubmenusOnClick"
34
34
  ],
35
35
  "supports": {
36
- "anchor": true,
37
36
  "reusable": false,
38
37
  "html": false,
39
38
  "typography": {
@@ -55,7 +55,9 @@ function BlockContent( {
55
55
  if ( ! hasResolvedPages ) {
56
56
  return (
57
57
  <div { ...blockProps }>
58
- <Spinner />
58
+ <div className="wp-block-page-list__loading-indicator-container">
59
+ <Spinner className="wp-block-page-list__loading-indicator" />
60
+ </div>
59
61
  </div>
60
62
  );
61
63
  }
@@ -61,3 +61,9 @@
61
61
  .wp-block-page-list .components-notice {
62
62
  margin-left: 0;
63
63
  }
64
+
65
+ // Space spinner to give it breathing
66
+ // room when block is selected and has focus outline.
67
+ .wp-block-page-list__loading-indicator-container {
68
+ padding: $grid-unit-10 $grid-unit-15;
69
+ }
@@ -35,7 +35,6 @@
35
35
  },
36
36
  "usesContext": [ "postType", "postId", "queryId" ],
37
37
  "supports": {
38
- "anchor": true,
39
38
  "html": false,
40
39
  "spacing": {
41
40
  "margin": true,
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "usesContext": [ "postType", "postId" ],
15
15
  "supports": {
16
- "anchor": true,
17
16
  "spacing": {
18
17
  "margin": true,
19
18
  "padding": true
@@ -21,7 +21,6 @@
21
21
  },
22
22
  "usesContext": [ "postType", "postId" ],
23
23
  "supports": {
24
- "anchor": true,
25
24
  "html": false,
26
25
  "spacing": {
27
26
  "margin": true,
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "usesContext": [ "postId" ],
16
16
  "supports": {
17
- "anchor": true,
18
17
  "html": false,
19
18
  "color": {
20
19
  "gradients": true,
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "usesContext": [ "postId", "postType" ],
15
15
  "supports": {
16
- "anchor": true,
17
16
  "html": false,
18
17
  "color": {
19
18
  "gradients": true,
@@ -14,7 +14,6 @@
14
14
  }
15
15
  },
16
16
  "supports": {
17
- "anchor": true,
18
17
  "html": false,
19
18
  "color": {
20
19
  "link": true,
@@ -8,7 +8,6 @@
8
8
  "textdomain": "default",
9
9
  "usesContext": [ "postId", "postType", "queryId" ],
10
10
  "supports": {
11
- "anchor": true,
12
11
  "align": [ "wide", "full" ],
13
12
  "html": false,
14
13
  "__experimentalLayout": true,
@@ -24,7 +24,6 @@
24
24
  },
25
25
  "usesContext": [ "postId", "postType", "queryId" ],
26
26
  "supports": {
27
- "anchor": true,
28
27
  "html": false,
29
28
  "color": {
30
29
  "gradients": true,
@@ -20,7 +20,6 @@
20
20
  },
21
21
  "usesContext": [ "postId", "postType", "queryId" ],
22
22
  "supports": {
23
- "anchor": true,
24
23
  "html": false,
25
24
  "color": {
26
25
  "gradients": true,
@@ -53,7 +53,6 @@
53
53
  "usesContext": [ "postId", "postType", "queryId" ],
54
54
  "supports": {
55
55
  "align": [ "left", "right", "center", "wide", "full" ],
56
- "anchor": true,
57
56
  "color": {
58
57
  "__experimentalDuotone": "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
59
58
  "text": false,
@@ -31,7 +31,6 @@
31
31
  }
32
32
  },
33
33
  "supports": {
34
- "anchor": true,
35
34
  "reusable": false,
36
35
  "html": false,
37
36
  "color": {
@@ -19,7 +19,6 @@
19
19
  "reusable": false,
20
20
  "html": false,
21
21
  "align": true,
22
- "anchor": true,
23
22
  "__experimentalLayout": {
24
23
  "allowEditing": false
25
24
  },
@@ -28,7 +28,6 @@
28
28
  },
29
29
  "usesContext": [ "postId", "postType" ],
30
30
  "supports": {
31
- "anchor": true,
32
31
  "html": false,
33
32
  "color": {
34
33
  "gradients": true,
@@ -31,7 +31,6 @@
31
31
  },
32
32
  "supports": {
33
33
  "align": [ "wide", "full" ],
34
- "anchor": true,
35
34
  "html": false,
36
35
  "color": {
37
36
  "gradients": true,
@@ -49,7 +49,6 @@
49
49
  },
50
50
  "supports": {
51
51
  "align": [ "wide", "full" ],
52
- "anchor": true,
53
52
  "html": false,
54
53
  "__experimentalLayout": true
55
54
  },
@@ -19,7 +19,7 @@ import { __ } from '@wordpress/i18n';
19
19
  /**
20
20
  * Internal dependencies
21
21
  */
22
- import { useScopedBlockVariations } from '../utils';
22
+ import { useScopedBlockVariations, useBlockNameForPatterns } from '../utils';
23
23
 
24
24
  export default function QueryPlaceholder( {
25
25
  attributes,
@@ -30,6 +30,10 @@ export default function QueryPlaceholder( {
30
30
  } ) {
31
31
  const [ isStartingBlank, setIsStartingBlank ] = useState( false );
32
32
  const blockProps = useBlockProps();
33
+ const blockNameForPatterns = useBlockNameForPatterns(
34
+ clientId,
35
+ attributes
36
+ );
33
37
 
34
38
  const { blockType, allVariations, hasPatterns } = useSelect(
35
39
  ( select ) => {
@@ -37,15 +41,16 @@ export default function QueryPlaceholder( {
37
41
  const { getBlockRootClientId, getPatternsByBlockTypes } =
38
42
  select( blockEditorStore );
39
43
  const rootClientId = getBlockRootClientId( clientId );
40
-
41
44
  return {
42
45
  blockType: getBlockType( name ),
43
46
  allVariations: getBlockVariations( name ),
44
- hasPatterns: !! getPatternsByBlockTypes( name, rootClientId )
45
- .length,
47
+ hasPatterns: !! getPatternsByBlockTypes(
48
+ blockNameForPatterns,
49
+ rootClientId
50
+ ).length,
46
51
  };
47
52
  },
48
- [ name, clientId ]
53
+ [ name, blockNameForPatterns, clientId ]
49
54
  );
50
55
 
51
56
  const matchingVariation = getMatchingVariation( attributes, allVariations );
@@ -42,6 +42,7 @@
42
42
  position: sticky;
43
43
  top: 0;
44
44
  padding: $grid-unit-20 0;
45
+ margin-bottom: 2px;
45
46
  z-index: z-index(".block-library-query-pattern__selection-search");
46
47
  }
47
48
  }
@@ -9,7 +9,6 @@
9
9
  "textdomain": "default",
10
10
  "usesContext": [ "queryId", "query" ],
11
11
  "supports": {
12
- "anchor": true,
13
12
  "align": true,
14
13
  "reusable": false,
15
14
  "html": false,
@@ -18,7 +18,6 @@
18
18
  "paginationArrow": "paginationArrow"
19
19
  },
20
20
  "supports": {
21
- "anchor": true,
22
21
  "align": true,
23
22
  "reusable": false,
24
23
  "html": false,
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "usesContext": [ "queryId", "query", "paginationArrow" ],
16
16
  "supports": {
17
- "anchor": true,
18
17
  "reusable": false,
19
18
  "html": false,
20
19
  "color": {
@@ -9,7 +9,6 @@
9
9
  "textdomain": "default",
10
10
  "usesContext": [ "queryId", "query" ],
11
11
  "supports": {
12
- "anchor": true,
13
12
  "reusable": false,
14
13
  "html": false,
15
14
  "color": {
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "usesContext": [ "queryId", "query", "paginationArrow" ],
16
16
  "supports": {
17
- "anchor": true,
18
17
  "reusable": false,
19
18
  "html": false,
20
19
  "color": {
@@ -27,7 +27,6 @@
27
27
  }
28
28
  },
29
29
  "supports": {
30
- "anchor": true,
31
30
  "align": [ "wide", "full" ],
32
31
  "html": false,
33
32
  "color": {
@@ -17,7 +17,6 @@
17
17
  },
18
18
  "usesContext": [ "postId" ],
19
19
  "supports": {
20
- "anchor": true,
21
20
  "html": false,
22
21
  "color": {
23
22
  "gradients": true,
@@ -43,7 +43,6 @@
43
43
  },
44
44
  "supports": {
45
45
  "align": true,
46
- "anchor": true,
47
46
  "html": false
48
47
  },
49
48
  "editorStyle": "wp-block-rss-editor",
@@ -46,7 +46,6 @@
46
46
  },
47
47
  "supports": {
48
48
  "align": [ "left", "center", "right" ],
49
- "anchor": true,
50
49
  "color": {
51
50
  "gradients": true,
52
51
  "__experimentalSkipSerialization": true,
@@ -31,7 +31,6 @@
31
31
  },
32
32
  "supports": {
33
33
  "html": false,
34
- "anchor": true,
35
34
  "align": true,
36
35
  "alignWide": false,
37
36
  "color": {
@@ -33,10 +33,10 @@
33
33
  // Provide special styling for the placeholder.
34
34
  // @todo: this particular minimal style of placeholder could be componentized further.
35
35
  .wp-block-site-logo.wp-block-site-logo {
36
- // Match the default logo size.
36
+
37
37
  &.is-default-size .components-placeholder {
38
- height: 120px;
39
- width: 120px;
38
+ height: 60px;
39
+ width: 60px;
40
40
  }
41
41
 
42
42
  // Inherit radius.
@@ -12,8 +12,8 @@
12
12
  "type": "string"
13
13
  }
14
14
  },
15
+ "example": {},
15
16
  "supports": {
16
- "anchor": true,
17
17
  "align": [ "wide", "full" ],
18
18
  "html": false,
19
19
  "color": {
@@ -27,7 +27,6 @@
27
27
  "viewportWidth": 500
28
28
  },
29
29
  "supports": {
30
- "anchor": true,
31
30
  "align": [ "wide", "full" ],
32
31
  "html": false,
33
32
  "color": {
@@ -28,7 +28,6 @@
28
28
  "iconBackgroundColorValue"
29
29
  ],
30
30
  "supports": {
31
- "anchor": true,
32
31
  "reusable": false,
33
32
  "html": false
34
33
  },
@@ -109,6 +109,7 @@ export function SocialLinksEdit( props ) {
109
109
  allowedBlocks: ALLOWED_BLOCKS,
110
110
  placeholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder,
111
111
  templateLock: false,
112
+ orientation: attributes.layout?.orientation ?? 'horizontal',
112
113
  __experimentalAppenderTagName: 'li',
113
114
  } );
114
115
 
@@ -36,7 +36,6 @@
36
36
  ],
37
37
  "supports": {
38
38
  "html": false,
39
- "anchor": true,
40
39
  "align": true,
41
40
  "spacing": {
42
41
  "margin": true,
@@ -21,7 +21,6 @@
21
21
  }
22
22
  },
23
23
  "supports": {
24
- "anchor": true,
25
24
  "align": true,
26
25
  "html": false,
27
26
  "reusable": false
@@ -12,10 +12,6 @@ import {
12
12
  __experimentalHStack as HStack,
13
13
  __experimentalSpacer as Spacer,
14
14
  } from '@wordpress/components';
15
- import {
16
- switchToBlockType,
17
- getPossibleBlockTransformations,
18
- } from '@wordpress/blocks';
19
15
  import { store as coreStore } from '@wordpress/core-data';
20
16
  import { store as noticesStore } from '@wordpress/notices';
21
17
 
@@ -25,16 +21,25 @@ import { store as noticesStore } from '@wordpress/notices';
25
21
  import { useCreateTemplatePartFromBlocks } from './utils/hooks';
26
22
  import { transformWidgetToBlock } from './utils/transformers';
27
23
 
24
+ const SIDEBARS_QUERY = {
25
+ per_page: -1,
26
+ _fields: 'id,name,description,status,widgets',
27
+ };
28
+
28
29
  export function TemplatePartImportControls( { area, setAttributes } ) {
29
30
  const [ selectedSidebar, setSelectedSidebar ] = useState( '' );
30
31
  const [ isBusy, setIsBusy ] = useState( false );
31
32
 
32
33
  const registry = useRegistry();
33
- const sidebars = useSelect( ( select ) => {
34
- return select( coreStore ).getSidebars( {
35
- per_page: -1,
36
- _fields: 'id,name,description,status,widgets',
37
- } );
34
+ const { sidebars, hasResolved } = useSelect( ( select ) => {
35
+ const { getSidebars, hasFinishedResolution } = select( coreStore );
36
+
37
+ return {
38
+ sidebars: getSidebars( SIDEBARS_QUERY ),
39
+ hasResolved: hasFinishedResolution( 'getSidebars', [
40
+ SIDEBARS_QUERY,
41
+ ] ),
42
+ };
38
43
  }, [] );
39
44
  const { createErrorNotice } = useDispatch( noticesStore );
40
45
 
@@ -67,6 +72,16 @@ export function TemplatePartImportControls( { area, setAttributes } ) {
67
72
  ];
68
73
  }, [ sidebars ] );
69
74
 
75
+ // Render an empty node while data is loading to avoid SlotFill re-positioning bug.
76
+ // See: https://github.com/WordPress/gutenberg/issues/15641.
77
+ if ( ! hasResolved ) {
78
+ return <Spacer marginBottom="0" />;
79
+ }
80
+
81
+ if ( hasResolved && ! options.length ) {
82
+ return null;
83
+ }
84
+
70
85
  async function createFromWidgets( event ) {
71
86
  event.preventDefault();
72
87
 
@@ -91,36 +106,13 @@ export function TemplatePartImportControls( { area, setAttributes } ) {
91
106
  const blocks = widgets.flatMap( ( widget ) => {
92
107
  const block = transformWidgetToBlock( widget );
93
108
 
94
- if ( block.name !== 'core/legacy-widget' ) {
95
- return block;
96
- }
97
-
98
- const transforms = getPossibleBlockTransformations( [
99
- block,
100
- ] ).filter( ( item ) => {
101
- // The block without any transformations can't be a wildcard.
102
- if ( ! item.transforms ) {
103
- return true;
104
- }
105
-
106
- const hasWildCardFrom = item.transforms?.from?.find(
107
- ( from ) => from.blocks && from.blocks.includes( '*' )
108
- );
109
- const hasWildCardTo = item.transforms?.to?.find(
110
- ( to ) => to.blocks && to.blocks.includes( '*' )
111
- );
112
-
113
- return ! hasWildCardFrom && ! hasWildCardTo;
114
- } );
115
-
116
109
  // Skip the block if we have no matching transformations.
117
- if ( ! transforms.length ) {
110
+ if ( ! block ) {
118
111
  skippedWidgets.add( widget.id_base );
119
112
  return [];
120
113
  }
121
114
 
122
- // Try transforming the Legacy Widget into a first matching block.
123
- return switchToBlockType( block, transforms[ 0 ].name );
115
+ return block;
124
116
  } );
125
117
 
126
118
  await createFromBlocks(