@wordpress/block-library 9.21.0 → 9.23.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 (201) 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/comments/edit/comments-inspector-controls.js +13 -13
  5. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  6. package/build/comments/edit/index.js +4 -2
  7. package/build/comments/edit/index.js.map +1 -1
  8. package/build/cover/edit/inspector-controls.js +9 -12
  9. package/build/cover/edit/inspector-controls.js.map +1 -1
  10. package/build/cover/index.js +1 -1
  11. package/build/cover/index.js.map +1 -1
  12. package/build/details/edit.js +1 -5
  13. package/build/details/edit.js.map +1 -1
  14. package/build/details/index.js +1 -1
  15. package/build/details/index.js.map +1 -1
  16. package/build/group/edit.js +17 -13
  17. package/build/group/edit.js.map +1 -1
  18. package/build/image/edit.js +0 -6
  19. package/build/image/edit.js.map +1 -1
  20. package/build/latest-posts/edit.js +100 -54
  21. package/build/latest-posts/edit.js.map +1 -1
  22. package/build/navigation/view.js +2 -1
  23. package/build/navigation/view.js.map +1 -1
  24. package/build/navigation-link/edit.js +0 -21
  25. package/build/navigation-link/edit.js.map +1 -1
  26. package/build/navigation-link/index.js +0 -3
  27. package/build/navigation-link/index.js.map +1 -1
  28. package/build/navigation-link/transforms.js +0 -2
  29. package/build/navigation-link/transforms.js.map +1 -1
  30. package/build/navigation-link/update-attributes.js +0 -1
  31. package/build/navigation-link/update-attributes.js.map +1 -1
  32. package/build/navigation-submenu/edit.js +1 -24
  33. package/build/navigation-submenu/edit.js.map +1 -1
  34. package/build/navigation-submenu/index.js +0 -3
  35. package/build/navigation-submenu/index.js.map +1 -1
  36. package/build/post-comments-count/index.js +0 -1
  37. package/build/post-comments-count/index.js.map +1 -1
  38. package/build/post-comments-link/index.js +0 -1
  39. package/build/post-comments-link/index.js.map +1 -1
  40. package/build/post-featured-image/edit.js +15 -5
  41. package/build/post-featured-image/edit.js.map +1 -1
  42. package/build/query/edit/inspector-controls/index.js +47 -59
  43. package/build/query/edit/inspector-controls/index.js.map +1 -1
  44. package/build/query/edit/inspector-controls/parent-control.js +2 -2
  45. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  46. package/build/query/edit/inspector-controls/taxonomy-controls.js +2 -2
  47. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  48. package/build/query/edit/query-content.js +15 -29
  49. package/build/query/edit/query-content.js.map +1 -1
  50. package/build/quote/index.js +1 -1
  51. package/build/quote/index.js.map +1 -1
  52. package/build/separator/edit.js +13 -12
  53. package/build/separator/edit.js.map +1 -1
  54. package/build/social-links/edit.js +29 -31
  55. package/build/social-links/edit.js.map +1 -1
  56. package/build/table/index.js +3 -3
  57. package/build/table/index.js.map +1 -1
  58. package/build/table/transforms.js +11 -3
  59. package/build/table/transforms.js.map +1 -1
  60. package/build/table-of-contents/edit.js +1 -1
  61. package/build/table-of-contents/edit.js.map +1 -1
  62. package/build/table-of-contents/hooks.js +6 -3
  63. package/build/table-of-contents/hooks.js.map +1 -1
  64. package/build/template-part/edit/advanced-controls.js +14 -12
  65. package/build/template-part/edit/advanced-controls.js.map +1 -1
  66. package/build/template-part/edit/index.js +2 -1
  67. package/build/template-part/edit/index.js.map +1 -1
  68. package/build-module/calendar/index.js +1 -0
  69. package/build-module/calendar/index.js.map +1 -1
  70. package/build-module/comments/edit/comments-inspector-controls.js +14 -14
  71. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  72. package/build-module/comments/edit/index.js +4 -2
  73. package/build-module/comments/edit/index.js.map +1 -1
  74. package/build-module/cover/edit/inspector-controls.js +10 -13
  75. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  76. package/build-module/cover/index.js +1 -1
  77. package/build-module/cover/index.js.map +1 -1
  78. package/build-module/details/edit.js +1 -5
  79. package/build-module/details/edit.js.map +1 -1
  80. package/build-module/details/index.js +1 -1
  81. package/build-module/details/index.js.map +1 -1
  82. package/build-module/group/edit.js +16 -14
  83. package/build-module/group/edit.js.map +1 -1
  84. package/build-module/image/edit.js +0 -6
  85. package/build-module/image/edit.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/navigation/view.js +2 -1
  89. package/build-module/navigation/view.js.map +1 -1
  90. package/build-module/navigation-link/edit.js +0 -21
  91. package/build-module/navigation-link/edit.js.map +1 -1
  92. package/build-module/navigation-link/index.js +0 -3
  93. package/build-module/navigation-link/index.js.map +1 -1
  94. package/build-module/navigation-link/transforms.js +0 -2
  95. package/build-module/navigation-link/transforms.js.map +1 -1
  96. package/build-module/navigation-link/update-attributes.js +0 -1
  97. package/build-module/navigation-link/update-attributes.js.map +1 -1
  98. package/build-module/navigation-submenu/edit.js +1 -24
  99. package/build-module/navigation-submenu/edit.js.map +1 -1
  100. package/build-module/navigation-submenu/index.js +0 -3
  101. package/build-module/navigation-submenu/index.js.map +1 -1
  102. package/build-module/post-comments-count/index.js +0 -1
  103. package/build-module/post-comments-count/index.js.map +1 -1
  104. package/build-module/post-comments-link/index.js +0 -1
  105. package/build-module/post-comments-link/index.js.map +1 -1
  106. package/build-module/post-featured-image/edit.js +15 -5
  107. package/build-module/post-featured-image/edit.js.map +1 -1
  108. package/build-module/query/edit/inspector-controls/index.js +49 -61
  109. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  110. package/build-module/query/edit/inspector-controls/parent-control.js +2 -2
  111. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  112. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +2 -2
  113. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  114. package/build-module/query/edit/query-content.js +16 -30
  115. package/build-module/query/edit/query-content.js.map +1 -1
  116. package/build-module/quote/index.js +1 -1
  117. package/build-module/quote/index.js.map +1 -1
  118. package/build-module/separator/edit.js +15 -14
  119. package/build-module/separator/edit.js.map +1 -1
  120. package/build-module/social-links/edit.js +30 -32
  121. package/build-module/social-links/edit.js.map +1 -1
  122. package/build-module/table/index.js +3 -3
  123. package/build-module/table/index.js.map +1 -1
  124. package/build-module/table/transforms.js +11 -3
  125. package/build-module/table/transforms.js.map +1 -1
  126. package/build-module/table-of-contents/edit.js +1 -1
  127. package/build-module/table-of-contents/edit.js.map +1 -1
  128. package/build-module/table-of-contents/hooks.js +6 -3
  129. package/build-module/table-of-contents/hooks.js.map +1 -1
  130. package/build-module/template-part/edit/advanced-controls.js +14 -12
  131. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  132. package/build-module/template-part/edit/index.js +2 -1
  133. package/build-module/template-part/edit/index.js.map +1 -1
  134. package/build-style/editor-rtl.css +1 -50
  135. package/build-style/editor.css +1 -50
  136. package/build-style/media-text/style-rtl.css +0 -2
  137. package/build-style/media-text/style.css +0 -2
  138. package/build-style/search/style-rtl.css +1 -0
  139. package/build-style/search/style.css +1 -0
  140. package/build-style/social-links/editor-rtl.css +1 -50
  141. package/build-style/social-links/editor.css +1 -50
  142. package/build-style/style-rtl.css +1 -6
  143. package/build-style/style.css +1 -6
  144. package/build-style/tag-cloud/style-rtl.css +0 -4
  145. package/build-style/tag-cloud/style.css +0 -4
  146. package/package.json +35 -35
  147. package/src/button/index.php +2 -3
  148. package/src/calendar/block.json +1 -0
  149. package/src/comments/edit/comments-inspector-controls.js +14 -12
  150. package/src/comments/edit/index.js +2 -1
  151. package/src/cover/edit/inspector-controls.js +9 -12
  152. package/src/cover/index.js +1 -1
  153. package/src/details/edit.js +6 -8
  154. package/src/details/index.js +1 -1
  155. package/src/file/index.php +2 -3
  156. package/src/group/edit.js +11 -10
  157. package/src/image/edit.js +0 -4
  158. package/src/latest-comments/index.php +1 -1
  159. package/src/latest-posts/edit.js +113 -81
  160. package/src/latest-posts/index.php +3 -0
  161. package/src/loginout/index.php +5 -1
  162. package/src/media-text/style.scss +0 -2
  163. package/src/navigation/index.php +1 -2
  164. package/src/navigation/view.js +2 -1
  165. package/src/navigation-link/block.json +0 -3
  166. package/src/navigation-link/edit.js +1 -22
  167. package/src/navigation-link/index.php +2 -6
  168. package/src/navigation-link/transforms.js +1 -2
  169. package/src/navigation-link/update-attributes.js +0 -1
  170. package/src/navigation-submenu/block.json +0 -3
  171. package/src/navigation-submenu/edit.js +1 -24
  172. package/src/navigation-submenu/index.php +1 -5
  173. package/src/post-author/index.php +1 -1
  174. package/src/post-author-name/index.php +1 -1
  175. package/src/post-comments-count/block.json +0 -1
  176. package/src/post-comments-count/index.php +4 -0
  177. package/src/post-comments-link/block.json +0 -1
  178. package/src/post-comments-link/index.php +4 -0
  179. package/src/post-featured-image/edit.js +94 -77
  180. package/src/query/edit/inspector-controls/index.js +66 -91
  181. package/src/query/edit/inspector-controls/parent-control.js +2 -2
  182. package/src/query/edit/inspector-controls/taxonomy-controls.js +2 -2
  183. package/src/query/edit/query-content.js +17 -27
  184. package/src/quote/index.js +1 -1
  185. package/src/search/index.php +12 -9
  186. package/src/search/style.scss +1 -0
  187. package/src/separator/edit.js +16 -12
  188. package/src/social-links/edit.js +29 -30
  189. package/src/social-links/editor.scss +1 -59
  190. package/src/table/index.js +3 -3
  191. package/src/table/transforms.js +14 -2
  192. package/src/table-of-contents/edit.js +1 -1
  193. package/src/table-of-contents/hooks.js +5 -2
  194. package/src/tag-cloud/style.scss +0 -5
  195. package/src/template-part/edit/advanced-controls.js +9 -8
  196. package/src/template-part/edit/index.js +1 -0
  197. package/build/utils/messages.js +0 -22
  198. package/build/utils/messages.js.map +0 -1
  199. package/build-module/utils/messages.js +0 -15
  200. package/build-module/utils/messages.js.map +0 -1
  201. package/src/utils/messages.js +0 -31
@@ -105,10 +105,6 @@
105
105
  text-align: center;
106
106
  justify-content: center;
107
107
  }
108
- .wp-block-tag-cloud.alignfull {
109
- padding-right: 1em;
110
- padding-left: 1em;
111
- }
112
108
  .wp-block-tag-cloud a {
113
109
  display: inline-block;
114
110
  margin-left: 5px;
@@ -105,10 +105,6 @@
105
105
  text-align: center;
106
106
  justify-content: center;
107
107
  }
108
- .wp-block-tag-cloud.alignfull {
109
- padding-left: 1em;
110
- padding-right: 1em;
111
- }
112
108
  .wp-block-tag-cloud a {
113
109
  display: inline-block;
114
110
  margin-right: 5px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.21.0",
3
+ "version": "9.23.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -41,39 +41,39 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@babel/runtime": "7.25.7",
44
- "@wordpress/a11y": "^4.21.0",
45
- "@wordpress/api-fetch": "^7.21.0",
46
- "@wordpress/autop": "^4.21.0",
47
- "@wordpress/blob": "^4.21.0",
48
- "@wordpress/block-editor": "^14.16.0",
49
- "@wordpress/blocks": "^14.10.0",
50
- "@wordpress/components": "^29.7.0",
51
- "@wordpress/compose": "^7.21.0",
52
- "@wordpress/core-data": "^7.21.0",
53
- "@wordpress/data": "^10.21.0",
54
- "@wordpress/date": "^5.21.0",
55
- "@wordpress/deprecated": "^4.21.0",
56
- "@wordpress/dom": "^4.21.0",
57
- "@wordpress/element": "^6.21.0",
58
- "@wordpress/escape-html": "^3.21.0",
59
- "@wordpress/hooks": "^4.21.0",
60
- "@wordpress/html-entities": "^4.21.0",
61
- "@wordpress/i18n": "^5.21.0",
62
- "@wordpress/icons": "^10.21.0",
63
- "@wordpress/interactivity": "^6.21.0",
64
- "@wordpress/interactivity-router": "^2.21.0",
65
- "@wordpress/keyboard-shortcuts": "^5.21.0",
66
- "@wordpress/keycodes": "^4.21.0",
67
- "@wordpress/notices": "^5.21.0",
68
- "@wordpress/patterns": "^2.21.0",
69
- "@wordpress/primitives": "^4.21.0",
70
- "@wordpress/private-apis": "^1.21.0",
71
- "@wordpress/reusable-blocks": "^5.21.0",
72
- "@wordpress/rich-text": "^7.21.0",
73
- "@wordpress/server-side-render": "^5.21.0",
74
- "@wordpress/url": "^4.21.0",
75
- "@wordpress/viewport": "^6.21.0",
76
- "@wordpress/wordcount": "^4.21.0",
44
+ "@wordpress/a11y": "^4.23.0",
45
+ "@wordpress/api-fetch": "^7.23.0",
46
+ "@wordpress/autop": "^4.23.0",
47
+ "@wordpress/blob": "^4.23.0",
48
+ "@wordpress/block-editor": "^14.18.0",
49
+ "@wordpress/blocks": "^14.12.0",
50
+ "@wordpress/components": "^29.9.0",
51
+ "@wordpress/compose": "^7.23.0",
52
+ "@wordpress/core-data": "^7.23.0",
53
+ "@wordpress/data": "^10.23.0",
54
+ "@wordpress/date": "^5.23.0",
55
+ "@wordpress/deprecated": "^4.23.0",
56
+ "@wordpress/dom": "^4.23.0",
57
+ "@wordpress/element": "^6.23.0",
58
+ "@wordpress/escape-html": "^3.23.0",
59
+ "@wordpress/hooks": "^4.23.0",
60
+ "@wordpress/html-entities": "^4.23.0",
61
+ "@wordpress/i18n": "^5.23.0",
62
+ "@wordpress/icons": "^10.23.0",
63
+ "@wordpress/interactivity": "^6.23.0",
64
+ "@wordpress/interactivity-router": "^2.23.0",
65
+ "@wordpress/keyboard-shortcuts": "^5.23.0",
66
+ "@wordpress/keycodes": "^4.23.0",
67
+ "@wordpress/notices": "^5.23.0",
68
+ "@wordpress/patterns": "^2.23.0",
69
+ "@wordpress/primitives": "^4.23.0",
70
+ "@wordpress/private-apis": "^1.23.0",
71
+ "@wordpress/reusable-blocks": "^5.23.0",
72
+ "@wordpress/rich-text": "^7.23.0",
73
+ "@wordpress/server-side-render": "^5.23.0",
74
+ "@wordpress/url": "^4.23.0",
75
+ "@wordpress/viewport": "^6.23.0",
76
+ "@wordpress/wordcount": "^4.23.0",
77
77
  "change-case": "^4.1.2",
78
78
  "clsx": "^2.1.1",
79
79
  "colord": "^2.7.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "104af00f9abcd7a4d36b87e648f148c72cc4ea5f"
94
+ "gitHead": "ab5c79cd40adbb68898536c50e035b0a734338ea"
95
95
  }
@@ -10,9 +10,8 @@
10
10
  *
11
11
  * @since 6.6.0
12
12
  *
13
- * @param array $attributes The block attributes.
14
- * @param string $content The block content.
15
- * @param WP_Block $block The block object.
13
+ * @param array $attributes The block attributes.
14
+ * @param string $content The block content.
16
15
  *
17
16
  * @return string The block content.
18
17
  */
@@ -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" ],
@@ -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
  </>
@@ -39,7 +39,7 @@ export const settings = {
39
39
  {
40
40
  name: 'core/paragraph',
41
41
  attributes: {
42
- content: __( '<strong>Snow Patrol</strong>' ),
42
+ content: `<strong>${ __( 'Snow Patrol' ) }</strong>`,
43
43
  align: 'center',
44
44
  },
45
45
  },
@@ -91,18 +91,16 @@ function DetailsEdit( { attributes, setAttributes } ) {
91
91
  ) }
92
92
  />
93
93
  </InspectorControls>
94
- <details { ...innerBlocksProps } open={ isOpen }>
95
- <summary
96
- onClick={ ( event ) => {
97
- event.preventDefault();
98
- setIsOpen( ! isOpen );
99
- } }
100
- >
94
+ <details
95
+ { ...innerBlocksProps }
96
+ open={ isOpen }
97
+ onToggle={ ( event ) => setIsOpen( event.target.open ) }
98
+ >
99
+ <summary>
101
100
  <RichText
102
101
  identifier="summary"
103
102
  aria-label={ __( 'Write summary' ) }
104
103
  placeholder={ placeholder || __( 'Write summary…' ) }
105
- allowedFormats={ [] }
106
104
  withoutInteractiveFormatting
107
105
  value={ summary }
108
106
  onChange={ ( newSummary ) =>
@@ -20,7 +20,7 @@ export const settings = {
20
20
  icon,
21
21
  example: {
22
22
  attributes: {
23
- summary: 'La Mancha',
23
+ summary: __( 'La Mancha' ),
24
24
  showContent: true,
25
25
  },
26
26
  innerBlocks: [
@@ -10,9 +10,8 @@
10
10
  *
11
11
  * @since 5.8.0
12
12
  *
13
- * @param array $attributes The block attributes.
14
- * @param string $content The block content.
15
- * @param WP_Block $block The parsed block.
13
+ * @param array $attributes The block attributes.
14
+ * @param string $content The block content.
16
15
  *
17
16
  * @return string Returns the block content.
18
17
  */
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>
package/src/image/edit.js CHANGED
@@ -262,10 +262,6 @@ export function ImageEdit( {
262
262
  additionalAttributes = {
263
263
  sizeSlug: newSize,
264
264
  };
265
- } else {
266
- // Keep the same url when selecting the same file, so "Resolution"
267
- // option is not changed.
268
- additionalAttributes = { url };
269
265
  }
270
266
 
271
267
  // Check if default link setting should be used.
@@ -42,7 +42,7 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) {
42
42
  *
43
43
  * @return string Returns the post content with latest comments added.
44
44
  */
45
- function render_block_core_latest_comments( $attributes = array() ) {
45
+ function render_block_core_latest_comments( $attributes ) {
46
46
  $comments = get_comments(
47
47
  /** This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php */
48
48
  apply_filters(