@wordpress/block-library 7.11.0 → 7.12.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 (261) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +7 -0
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/archives/index.js +4 -0
  5. package/build/archives/index.js.map +1 -1
  6. package/build/block/edit.js +4 -2
  7. package/build/block/edit.js.map +1 -1
  8. package/build/block/edit.native.js +4 -2
  9. package/build/block/edit.native.js.map +1 -1
  10. package/build/calendar/edit.js +12 -5
  11. package/build/calendar/edit.js.map +1 -1
  12. package/build/columns/edit.native.js +2 -1
  13. package/build/columns/edit.native.js.map +1 -1
  14. package/build/cover/edit/resizable-cover.js +6 -0
  15. package/build/cover/edit/resizable-cover.js.map +1 -1
  16. package/build/group/transforms.js +5 -0
  17. package/build/group/transforms.js.map +1 -1
  18. package/build/index.native.js +17 -4
  19. package/build/index.native.js.map +1 -1
  20. package/build/list/index.js +6 -0
  21. package/build/list/index.js.map +1 -1
  22. package/build/list/v2/edit.js +16 -5
  23. package/build/list/v2/edit.js.map +1 -1
  24. package/build/list/v2/tag-name.js +31 -0
  25. package/build/list/v2/tag-name.js.map +1 -0
  26. package/build/list/v2/tag-name.native.js +32 -0
  27. package/build/list/v2/tag-name.native.js.map +1 -0
  28. package/build/list/v2/transforms.js +1 -11
  29. package/build/list/v2/transforms.js.map +1 -1
  30. package/build/list-item/edit.js +1 -0
  31. package/build/list-item/edit.js.map +1 -1
  32. package/build/list-item/edit.native.js +158 -0
  33. package/build/list-item/edit.native.js.map +1 -0
  34. package/build/list-item/icons.native.js +53 -0
  35. package/build/list-item/icons.native.js.map +1 -0
  36. package/build/list-item/list-style-type.native.js +136 -0
  37. package/build/list-item/list-style-type.native.js.map +1 -0
  38. package/build/media-text/deprecated.js +188 -66
  39. package/build/media-text/deprecated.js.map +1 -1
  40. package/build/media-text/edit.js +2 -1
  41. package/build/media-text/edit.js.map +1 -1
  42. package/build/media-text/media-container.js +1 -1
  43. package/build/media-text/media-container.js.map +1 -1
  44. package/build/navigation/edit/index.js +68 -123
  45. package/build/navigation/edit/index.js.map +1 -1
  46. package/build/navigation/edit/navigation-menu-selector.js +11 -14
  47. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  48. package/build/navigation/edit/placeholder/index.js +4 -2
  49. package/build/navigation/edit/placeholder/index.js.map +1 -1
  50. package/build/navigation/edit/responsive-wrapper.js +13 -3
  51. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  52. package/build/navigation/edit/use-create-navigation-menu.js +5 -1
  53. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  54. package/build/navigation/edit/use-inner-blocks.js +43 -0
  55. package/build/navigation/edit/use-inner-blocks.js.map +1 -0
  56. package/build/navigation/edit/utils.js +28 -0
  57. package/build/navigation/edit/utils.js.map +1 -0
  58. package/build/navigation/use-navigation-menu.js +7 -3
  59. package/build/navigation/use-navigation-menu.js.map +1 -1
  60. package/build/post-author/edit.js +5 -2
  61. package/build/post-author/edit.js.map +1 -1
  62. package/build/post-author-biography/edit.js +7 -1
  63. package/build/post-author-biography/edit.js.map +1 -1
  64. package/build/post-content/edit.js +4 -2
  65. package/build/post-content/edit.js.map +1 -1
  66. package/build/post-featured-image/edit.js +16 -2
  67. package/build/post-featured-image/edit.js.map +1 -1
  68. package/build/post-featured-image/index.js +9 -0
  69. package/build/post-featured-image/index.js.map +1 -1
  70. package/build/query/edit/inspector-controls/index.js +42 -9
  71. package/build/query/edit/inspector-controls/index.js.map +1 -1
  72. package/build/query/edit/inspector-controls/taxonomy-controls.js +21 -14
  73. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  74. package/build/query-title/edit.js +20 -7
  75. package/build/query-title/edit.js.map +1 -1
  76. package/build/query-title/index.js +4 -0
  77. package/build/query-title/index.js.map +1 -1
  78. package/build/query-title/variations.js +10 -0
  79. package/build/query-title/variations.js.map +1 -1
  80. package/build/quote/transforms.js +2 -2
  81. package/build/quote/transforms.js.map +1 -1
  82. package/build/separator/edit.js +1 -1
  83. package/build/separator/edit.js.map +1 -1
  84. package/build/social-links/edit.js +1 -0
  85. package/build/social-links/edit.js.map +1 -1
  86. package/build/template-part/edit/index.js +4 -2
  87. package/build/template-part/edit/index.js.map +1 -1
  88. package/build-module/archives/edit.js +7 -0
  89. package/build-module/archives/edit.js.map +1 -1
  90. package/build-module/archives/index.js +4 -0
  91. package/build-module/archives/index.js.map +1 -1
  92. package/build-module/block/edit.js +5 -3
  93. package/build-module/block/edit.js.map +1 -1
  94. package/build-module/block/edit.native.js +5 -3
  95. package/build-module/block/edit.native.js.map +1 -1
  96. package/build-module/calendar/edit.js +12 -4
  97. package/build-module/calendar/edit.js.map +1 -1
  98. package/build-module/columns/edit.native.js +3 -2
  99. package/build-module/columns/edit.native.js.map +1 -1
  100. package/build-module/cover/edit/resizable-cover.js +6 -0
  101. package/build-module/cover/edit/resizable-cover.js.map +1 -1
  102. package/build-module/group/transforms.js +5 -0
  103. package/build-module/group/transforms.js.map +1 -1
  104. package/build-module/index.native.js +16 -4
  105. package/build-module/index.native.js.map +1 -1
  106. package/build-module/list/index.js +1 -1
  107. package/build-module/list/index.js.map +1 -1
  108. package/build-module/list/v2/edit.js +15 -5
  109. package/build-module/list/v2/edit.js.map +1 -1
  110. package/build-module/list/v2/tag-name.js +21 -0
  111. package/build-module/list/v2/tag-name.js.map +1 -0
  112. package/build-module/list/v2/tag-name.native.js +21 -0
  113. package/build-module/list/v2/tag-name.native.js.map +1 -0
  114. package/build-module/list/v2/transforms.js +1 -10
  115. package/build-module/list/v2/transforms.js.map +1 -1
  116. package/build-module/list-item/edit.js +1 -3
  117. package/build-module/list-item/edit.js.map +1 -1
  118. package/build-module/list-item/edit.native.js +141 -0
  119. package/build-module/list-item/edit.native.js.map +1 -0
  120. package/build-module/list-item/icons.native.js +37 -0
  121. package/build-module/list-item/icons.native.js.map +1 -0
  122. package/build-module/list-item/list-style-type.native.js +124 -0
  123. package/build-module/list-item/list-style-type.native.js.map +1 -0
  124. package/build-module/media-text/deprecated.js +189 -65
  125. package/build-module/media-text/deprecated.js.map +1 -1
  126. package/build-module/media-text/edit.js +2 -1
  127. package/build-module/media-text/edit.js.map +1 -1
  128. package/build-module/media-text/media-container.js +1 -1
  129. package/build-module/media-text/media-container.js.map +1 -1
  130. package/build-module/navigation/edit/index.js +66 -122
  131. package/build-module/navigation/edit/index.js.map +1 -1
  132. package/build-module/navigation/edit/navigation-menu-selector.js +12 -15
  133. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  134. package/build-module/navigation/edit/placeholder/index.js +4 -2
  135. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  136. package/build-module/navigation/edit/responsive-wrapper.js +12 -3
  137. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  138. package/build-module/navigation/edit/use-create-navigation-menu.js +5 -1
  139. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  140. package/build-module/navigation/edit/use-inner-blocks.js +33 -0
  141. package/build-module/navigation/edit/use-inner-blocks.js.map +1 -0
  142. package/build-module/navigation/edit/utils.js +21 -0
  143. package/build-module/navigation/edit/utils.js.map +1 -0
  144. package/build-module/navigation/use-navigation-menu.js +7 -3
  145. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  146. package/build-module/post-author/edit.js +5 -2
  147. package/build-module/post-author/edit.js.map +1 -1
  148. package/build-module/post-author-biography/edit.js +6 -1
  149. package/build-module/post-author-biography/edit.js.map +1 -1
  150. package/build-module/post-content/edit.js +5 -3
  151. package/build-module/post-content/edit.js.map +1 -1
  152. package/build-module/post-featured-image/edit.js +17 -3
  153. package/build-module/post-featured-image/edit.js.map +1 -1
  154. package/build-module/post-featured-image/index.js +9 -0
  155. package/build-module/post-featured-image/index.js.map +1 -1
  156. package/build-module/query/edit/inspector-controls/index.js +42 -9
  157. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  158. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +16 -12
  159. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  160. package/build-module/query-title/edit.js +20 -8
  161. package/build-module/query-title/edit.js.map +1 -1
  162. package/build-module/query-title/index.js +4 -0
  163. package/build-module/query-title/index.js.map +1 -1
  164. package/build-module/query-title/variations.js +10 -0
  165. package/build-module/query-title/variations.js.map +1 -1
  166. package/build-module/quote/transforms.js +3 -3
  167. package/build-module/quote/transforms.js.map +1 -1
  168. package/build-module/separator/edit.js +1 -1
  169. package/build-module/separator/edit.js.map +1 -1
  170. package/build-module/social-links/edit.js +1 -0
  171. package/build-module/social-links/edit.js.map +1 -1
  172. package/build-module/template-part/edit/index.js +5 -3
  173. package/build-module/template-part/edit/index.js.map +1 -1
  174. package/build-style/editor-rtl.css +10 -0
  175. package/build-style/editor.css +10 -0
  176. package/build-style/latest-posts/editor-rtl.css +3 -0
  177. package/build-style/latest-posts/editor.css +3 -0
  178. package/build-style/navigation/style-rtl.css +17 -19
  179. package/build-style/navigation/style.css +17 -19
  180. package/build-style/query/editor-rtl.css +7 -0
  181. package/build-style/query/editor.css +7 -0
  182. package/build-style/query-pagination/style-rtl.css +6 -0
  183. package/build-style/query-pagination/style.css +6 -0
  184. package/build-style/search/style-rtl.css +2 -0
  185. package/build-style/search/style.css +2 -0
  186. package/build-style/style-rtl.css +26 -19
  187. package/build-style/style.css +26 -19
  188. package/build-style/tag-cloud/style-rtl.css +1 -0
  189. package/build-style/tag-cloud/style.css +1 -0
  190. package/package.json +28 -29
  191. package/src/archives/block.json +4 -0
  192. package/src/archives/edit.js +12 -1
  193. package/src/archives/index.php +5 -3
  194. package/src/audio/test/__snapshots__/edit.native.js.snap +16 -2
  195. package/src/block/edit.js +4 -4
  196. package/src/block/edit.native.js +4 -4
  197. package/src/calendar/edit.js +11 -4
  198. package/src/columns/edit.native.js +4 -2
  199. package/src/cover/edit/resizable-cover.js +6 -0
  200. package/src/cover/index.php +2 -2
  201. package/src/file/test/__snapshots__/edit.native.js.snap +32 -4
  202. package/src/group/transforms.js +7 -0
  203. package/src/home-link/index.php +8 -17
  204. package/src/image/test/edit.native.js +6 -10
  205. package/src/index.native.js +15 -2
  206. package/src/latest-posts/editor.scss +5 -0
  207. package/src/list/index.js +1 -1
  208. package/src/list/test/__snapshots__/edit.native.js.snap +133 -0
  209. package/src/list/test/edit.native.js +511 -7
  210. package/src/list/v2/edit.js +12 -4
  211. package/src/list/v2/tag-name.js +13 -0
  212. package/src/list/v2/tag-name.native.js +12 -0
  213. package/src/list/v2/transforms.js +1 -9
  214. package/src/list-item/edit.js +1 -1
  215. package/src/list-item/edit.native.js +148 -0
  216. package/src/list-item/icons.native.js +34 -0
  217. package/src/list-item/list-style-type.native.js +139 -0
  218. package/src/list-item/style.native.scss +45 -0
  219. package/src/media-text/deprecated.js +561 -415
  220. package/src/media-text/edit.js +1 -0
  221. package/src/media-text/media-container.js +3 -1
  222. package/src/media-text/test/media-container.js +24 -0
  223. package/src/navigation/edit/index.js +83 -164
  224. package/src/navigation/edit/navigation-menu-selector.js +12 -26
  225. package/src/navigation/edit/placeholder/index.js +4 -2
  226. package/src/navigation/edit/responsive-wrapper.js +24 -3
  227. package/src/navigation/edit/use-create-navigation-menu.js +4 -0
  228. package/src/navigation/edit/use-inner-blocks.js +39 -0
  229. package/src/navigation/edit/utils.js +30 -0
  230. package/src/navigation/index.php +6 -0
  231. package/src/navigation/style.scss +12 -22
  232. package/src/navigation/use-navigation-menu.js +9 -5
  233. package/src/navigation-link/index.php +1 -1
  234. package/src/navigation-submenu/index.php +1 -1
  235. package/src/page-list/index.php +4 -4
  236. package/src/post-author/edit.js +6 -3
  237. package/src/post-author-biography/edit.js +4 -1
  238. package/src/post-content/edit.js +4 -4
  239. package/src/post-featured-image/block.json +9 -0
  240. package/src/post-featured-image/edit.js +23 -1
  241. package/src/post-featured-image/index.php +3 -1
  242. package/src/post-title/index.php +2 -1
  243. package/src/preformatted/test/__snapshots__/edit.native.js.snap +16 -2
  244. package/src/query/edit/inspector-controls/index.js +129 -65
  245. package/src/query/edit/inspector-controls/taxonomy-controls.js +17 -10
  246. package/src/query/editor.scss +9 -0
  247. package/src/query-pagination/style.scss +14 -0
  248. package/src/query-title/block.json +4 -0
  249. package/src/query-title/edit.js +33 -6
  250. package/src/query-title/index.php +17 -1
  251. package/src/query-title/variations.js +13 -0
  252. package/src/quote/transforms.js +3 -7
  253. package/src/search/style.scss +2 -0
  254. package/src/search/test/__snapshots__/edit.native.js.snap +56 -7
  255. package/src/separator/edit.js +1 -1
  256. package/src/separator/test/edit.js +5 -3
  257. package/src/site-title/index.php +8 -9
  258. package/src/social-link/index.php +1 -1
  259. package/src/social-links/edit.js +1 -0
  260. package/src/tag-cloud/style.scss +1 -0
  261. package/src/template-part/edit/index.js +4 -4
@@ -13,6 +13,20 @@ $pagination-margin: 0.5em;
13
13
  margin-right: 0;
14
14
  }
15
15
  }
16
+
17
+ // This moves the next link to the right side of the container,
18
+ // which is important when it's the only block displayed
19
+ // and the block has a "space-between" justification.
20
+ &.is-content-justification-space-between {
21
+ > .wp-block-query-pagination-next:last-child {
22
+ margin-inline-start: auto;
23
+ }
24
+ > .wp-block-query-pagination-previous:first-child {
25
+ margin-inline-end: auto;
26
+ }
27
+ }
28
+
29
+
16
30
  .wp-block-query-pagination-previous-arrow {
17
31
  margin-right: 1ch;
18
32
  display: inline-block; // Needed so that the transform works.
@@ -16,6 +16,10 @@
16
16
  "level": {
17
17
  "type": "number",
18
18
  "default": 1
19
+ },
20
+ "showSearchTerm": {
21
+ "type": "boolean",
22
+ "default": true
19
23
  }
20
24
  },
21
25
  "supports": {
@@ -9,9 +9,11 @@ import classnames from 'classnames';
9
9
  import {
10
10
  AlignmentControl,
11
11
  BlockControls,
12
+ InspectorControls,
12
13
  useBlockProps,
13
14
  Warning,
14
15
  } from '@wordpress/block-editor';
16
+ import { ToggleControl, PanelBody } from '@wordpress/components';
15
17
  import { __ } from '@wordpress/i18n';
16
18
 
17
19
  /**
@@ -19,21 +21,19 @@ import { __ } from '@wordpress/i18n';
19
21
  */
20
22
  import HeadingLevelDropdown from '../heading/heading-level-dropdown';
21
23
 
22
- const SUPPORTED_TYPES = [ 'archive' ];
24
+ const SUPPORTED_TYPES = [ 'archive', 'search' ];
23
25
 
24
26
  export default function QueryTitleEdit( {
25
- attributes: { type, level, textAlign },
27
+ attributes: { type, level, textAlign, showSearchTerm },
26
28
  setAttributes,
27
29
  } ) {
28
30
  const TagName = `h${ level }`;
29
31
  const blockProps = useBlockProps( {
30
- className: classnames( {
32
+ className: classnames( 'wp-block-query-title__placeholder', {
31
33
  [ `has-text-align-${ textAlign }` ]: textAlign,
32
- 'wp-block-query-title__placeholder': type === 'archive',
33
34
  } ),
34
35
  } );
35
- // The plan is to augment this block with more
36
- // block variations like `Search Title`.
36
+
37
37
  if ( ! SUPPORTED_TYPES.includes( type ) ) {
38
38
  return (
39
39
  <div { ...blockProps }>
@@ -48,6 +48,33 @@ export default function QueryTitleEdit( {
48
48
  <TagName { ...blockProps }>{ __( 'Archive title' ) }</TagName>
49
49
  );
50
50
  }
51
+
52
+ if ( type === 'search' ) {
53
+ titleElement = (
54
+ <>
55
+ <InspectorControls>
56
+ <PanelBody title={ __( 'Settings' ) }>
57
+ <ToggleControl
58
+ label={ __( 'Show search term in title' ) }
59
+ onChange={ () =>
60
+ setAttributes( {
61
+ showSearchTerm: ! showSearchTerm,
62
+ } )
63
+ }
64
+ checked={ showSearchTerm }
65
+ />
66
+ </PanelBody>
67
+ </InspectorControls>
68
+
69
+ <TagName { ...blockProps }>
70
+ { showSearchTerm
71
+ ? __( 'Search results for: "search term"' )
72
+ : __( 'Search results' ) }
73
+ </TagName>
74
+ </>
75
+ );
76
+ }
77
+
51
78
  return (
52
79
  <>
53
80
  <BlockControls group="block">
@@ -17,13 +17,29 @@
17
17
  function render_block_core_query_title( $attributes ) {
18
18
  $type = isset( $attributes['type'] ) ? $attributes['type'] : null;
19
19
  $is_archive = is_archive();
20
- if ( ! $type || ( 'archive' === $type && ! $is_archive ) ) {
20
+ $is_search = is_search();
21
+ if ( ! $type ||
22
+ ( 'archive' === $type && ! $is_archive ) ||
23
+ ( 'search' === $type && ! $is_search )
24
+ ) {
21
25
  return '';
22
26
  }
23
27
  $title = '';
24
28
  if ( $is_archive ) {
25
29
  $title = get_the_archive_title();
26
30
  }
31
+ if ( $is_search ) {
32
+ $title = __( 'Search results' );
33
+
34
+ if ( isset( $attributes['showSearchTerm'] ) && $attributes['showSearchTerm'] ) {
35
+ $title = sprintf(
36
+ /* translators: %s is the search term. */
37
+ __( 'Search results for: "%s"' ),
38
+ get_search_query()
39
+ );
40
+ }
41
+ }
42
+
27
43
  $tag_name = isset( $attributes['level'] ) ? 'h' . (int) $attributes['level'] : 'h1';
28
44
  $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
29
45
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
@@ -17,6 +17,19 @@ const variations = [
17
17
  },
18
18
  scope: [ 'inserter' ],
19
19
  },
20
+ {
21
+ isDefault: false,
22
+ name: 'search-title',
23
+ title: __( 'Search Results Title' ),
24
+ description: __(
25
+ 'Display the search results title based on the queried object.'
26
+ ),
27
+ icon: title,
28
+ attributes: {
29
+ type: 'search',
30
+ },
31
+ scope: [ 'inserter' ],
32
+ },
20
33
  ];
21
34
 
22
35
  /**
@@ -1,11 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import {
5
- createBlock,
6
- parseWithAttributeSchema,
7
- rawHandler,
8
- } from '@wordpress/blocks';
4
+ import { createBlock, parseWithAttributeSchema } from '@wordpress/blocks';
9
5
 
10
6
  const transforms = {
11
7
  from: [
@@ -59,7 +55,7 @@ const transforms = {
59
55
  },
60
56
  } ),
61
57
  selector: 'blockquote',
62
- transform: ( node ) => {
58
+ transform: ( node, handler ) => {
63
59
  return createBlock(
64
60
  'core/quote',
65
61
  // Don't try to parse any `cite` out of this content.
@@ -68,7 +64,7 @@ const transforms = {
68
64
  // * If the cite is nested in the quoted text, it's wrong to
69
65
  // remove it.
70
66
  {},
71
- rawHandler( {
67
+ handler( {
72
68
  HTML: node.innerHTML,
73
69
  mode: 'BLOCKS',
74
70
  } )
@@ -34,6 +34,8 @@
34
34
  .wp-block-search__input {
35
35
  padding: 8px;
36
36
  flex-grow: 1;
37
+ margin-left: 0;
38
+ margin-right: 0;
37
39
  min-width: 3em;
38
40
  border: 1px solid #949494;
39
41
  font-size: inherit;
@@ -11,7 +11,14 @@ exports[`Search Block renders block with button inside option 1`] = `
11
11
  accessibilityRole="none"
12
12
  accessible={true}
13
13
  >
14
- <View>
14
+ <View
15
+ style={
16
+ Array [
17
+ undefined,
18
+ undefined,
19
+ ]
20
+ }
21
+ >
15
22
  <RCTAztecView
16
23
  accessible={true}
17
24
  activeFormats={Array []}
@@ -119,7 +126,14 @@ exports[`Search Block renders block with button inside option 1`] = `
119
126
  accessible={true}
120
127
  onLayout={[Function]}
121
128
  >
122
- <View>
129
+ <View
130
+ style={
131
+ Array [
132
+ undefined,
133
+ undefined,
134
+ ]
135
+ }
136
+ >
123
137
  <RCTAztecView
124
138
  accessible={true}
125
139
  activeFormats={Array []}
@@ -191,7 +205,14 @@ exports[`Search Block renders block with icon button option matches snapshot 1`]
191
205
  accessibilityRole="none"
192
206
  accessible={true}
193
207
  >
194
- <View>
208
+ <View
209
+ style={
210
+ Array [
211
+ undefined,
212
+ undefined,
213
+ ]
214
+ }
215
+ >
195
216
  <RCTAztecView
196
217
  accessible={true}
197
218
  activeFormats={Array []}
@@ -359,7 +380,14 @@ exports[`Search Block renders block with label hidden matches snapshot 1`] = `
359
380
  accessible={true}
360
381
  onLayout={[Function]}
361
382
  >
362
- <View>
383
+ <View
384
+ style={
385
+ Array [
386
+ undefined,
387
+ undefined,
388
+ ]
389
+ }
390
+ >
363
391
  <RCTAztecView
364
392
  accessible={true}
365
393
  activeFormats={Array []}
@@ -431,7 +459,14 @@ exports[`Search Block renders with default configuration matches snapshot 1`] =
431
459
  accessibilityRole="none"
432
460
  accessible={true}
433
461
  >
434
- <View>
462
+ <View
463
+ style={
464
+ Array [
465
+ undefined,
466
+ undefined,
467
+ ]
468
+ }
469
+ >
435
470
  <RCTAztecView
436
471
  accessible={true}
437
472
  activeFormats={Array []}
@@ -539,7 +574,14 @@ exports[`Search Block renders with default configuration matches snapshot 1`] =
539
574
  accessible={true}
540
575
  onLayout={[Function]}
541
576
  >
542
- <View>
577
+ <View
578
+ style={
579
+ Array [
580
+ undefined,
581
+ undefined,
582
+ ]
583
+ }
584
+ >
543
585
  <RCTAztecView
544
586
  accessible={true}
545
587
  activeFormats={Array []}
@@ -611,7 +653,14 @@ exports[`Search Block renders with no-button option matches snapshot 1`] = `
611
653
  accessibilityRole="none"
612
654
  accessible={true}
613
655
  >
614
- <View>
656
+ <View
657
+ style={
658
+ Array [
659
+ undefined,
660
+ undefined,
661
+ ]
662
+ }
663
+ >
615
664
  <RCTAztecView
616
665
  accessible={true}
617
666
  activeFormats={Array []}
@@ -37,7 +37,7 @@ export default function SeparatorEdit( { attributes, setAttributes } ) {
37
37
  'has-css-opacity': opacity === 'css',
38
38
  'has-alpha-channel-opacity': opacity === 'alpha-channel',
39
39
  },
40
- colorProps.classname
40
+ colorProps.className
41
41
  );
42
42
 
43
43
  const styles = {
@@ -66,7 +66,8 @@ describe( 'Separator block edit method', () => {
66
66
  expect( useBlockProps ).toHaveBeenCalledWith( {
67
67
  // For backwards compatibility the has-text-color class is also added even though it is only needed for
68
68
  // is-style-dots as this class was always added to v1 blocks, so may be expected by themes and plugins.
69
- className: 'has-text-color has-alpha-channel-opacity',
69
+ className:
70
+ 'has-text-color has-alpha-channel-opacity has-background',
70
71
  style: {
71
72
  backgroundColor: '#ff0000',
72
73
  color: '#ff0000',
@@ -85,7 +86,8 @@ describe( 'Separator block edit method', () => {
85
86
  };
86
87
  render( <SeparatorEdit { ...props } /> );
87
88
  expect( useBlockProps ).toHaveBeenCalledWith( {
88
- className: 'has-text-color has-alpha-channel-opacity',
89
+ className:
90
+ 'has-text-color has-alpha-channel-opacity has-background',
89
91
  style: {
90
92
  backgroundColor: '#ff0000',
91
93
  color: '#ff0000',
@@ -106,7 +108,7 @@ describe( 'Separator block edit method', () => {
106
108
  // background color classes are added by useBlockProps which has to be mocked.
107
109
  expect( useBlockProps ).toHaveBeenCalledWith( {
108
110
  className:
109
- 'has-text-color has-banana-color has-alpha-channel-opacity',
111
+ 'has-text-color has-banana-color has-alpha-channel-opacity has-banana-background-color has-background',
110
112
  style: undefined,
111
113
  } );
112
114
  } );
@@ -21,22 +21,21 @@ function render_block_core_site_title( $attributes ) {
21
21
  $tag_name = 'h1';
22
22
  $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
23
23
 
24
- $aria_current = is_home() || ( is_front_page() && 'page' === get_option( 'show_on_front' ) ) ? ' aria-current="page"' : '';
25
-
26
24
  if ( isset( $attributes['level'] ) ) {
27
25
  $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . (int) $attributes['level'];
28
26
  }
29
27
 
30
28
  if ( $attributes['isLink'] ) {
31
- $link_attrs = array(
32
- 'href="' . esc_url( get_bloginfo( 'url' ) ) . '"',
33
- 'rel="' . esc_attr( 'home' ) . '"',
29
+ $aria_current = is_home() || ( is_front_page() && 'page' === get_option( 'show_on_front' ) ) ? ' aria-current="page"' : '';
30
+ $link_target = ! empty( $attributes['linkTarget'] ) ? $attributes['linkTarget'] : '_self';
31
+
32
+ $site_title = sprintf(
33
+ '<a href="%1$s" target="%2$s" rel="home"%3$s>%4$s</a>',
34
+ esc_url( home_url() ),
35
+ esc_attr( $link_target ),
34
36
  $aria_current,
37
+ esc_html( $site_title )
35
38
  );
36
- if ( '_blank' === $attributes['linkTarget'] ) {
37
- $link_attrs[] = 'target="_blank"';
38
- }
39
- $site_title = sprintf( '<a %1$s>%2$s</a>', implode( ' ', $link_attrs ), esc_html( $site_title ) );
40
39
  }
41
40
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
42
41
 
@@ -296,7 +296,7 @@ function block_core_social_link_services( $service = '', $field = '' ) {
296
296
  ),
297
297
  'share' => array(
298
298
  'name' => 'Share Icon',
299
- 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"/></svg>',
299
+ 'icon' => '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"/></svg>',
300
300
  ),
301
301
  );
302
302
 
@@ -108,6 +108,7 @@ export function SocialLinksEdit( props ) {
108
108
  // Fallback color values are used maintain selections in case switching
109
109
  // themes and named colors in palette do not match.
110
110
  const className = classNames( size, {
111
+ 'has-visible-labels': showLabels,
111
112
  'has-icon-color': iconColor.color || iconColorValue,
112
113
  'has-icon-background-color':
113
114
  iconBackgroundColor.color || iconBackgroundColorValue,
@@ -1,6 +1,7 @@
1
1
  .wp-block-tag-cloud {
2
2
  &.aligncenter {
3
3
  text-align: center;
4
+ justify-content: center;
4
5
  }
5
6
 
6
7
  &.alignfull {
@@ -13,7 +13,8 @@ import {
13
13
  useBlockProps,
14
14
  Warning,
15
15
  store as blockEditorStore,
16
- __experimentalUseNoRecursiveRenders as useNoRecursiveRenders,
16
+ __experimentalRecursionProvider as RecursionProvider,
17
+ __experimentalUseHasRecursion as useHasRecursion,
17
18
  __experimentalUseBlockOverlayActive as useBlockOverlayActive,
18
19
  } from '@wordpress/block-editor';
19
20
  import { Spinner, Modal, MenuItem } from '@wordpress/components';
@@ -43,8 +44,7 @@ export default function TemplatePartEdit( {
43
44
  } ) {
44
45
  const { slug, theme, tagName, layout = {} } = attributes;
45
46
  const templatePartId = createTemplatePartId( theme, slug );
46
- const [ hasAlreadyRendered, RecursionProvider ] =
47
- useNoRecursiveRenders( templatePartId );
47
+ const hasAlreadyRendered = useHasRecursion( templatePartId );
48
48
  const [ isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen ] =
49
49
  useState( false );
50
50
 
@@ -142,7 +142,7 @@ export default function TemplatePartEdit( {
142
142
  }
143
143
 
144
144
  return (
145
- <RecursionProvider>
145
+ <RecursionProvider uniqueId={ templatePartId }>
146
146
  <TemplatePartAdvancedControls
147
147
  tagName={ tagName }
148
148
  setAttributes={ setAttributes }