@wordpress/block-library 8.15.0 → 8.16.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 (156) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/avatar/index.js +3 -0
  3. package/build/avatar/index.js.map +1 -1
  4. package/build/block/edit.js +2 -30
  5. package/build/block/edit.js.map +1 -1
  6. package/build/cover/index.js +2 -1
  7. package/build/cover/index.js.map +1 -1
  8. package/build/footnotes/edit.js +11 -0
  9. package/build/footnotes/edit.js.map +1 -1
  10. package/build/footnotes/format.js +101 -8
  11. package/build/footnotes/format.js.map +1 -1
  12. package/build/footnotes/index.js +45 -3
  13. package/build/footnotes/index.js.map +1 -1
  14. package/build/gallery/edit.js +7 -5
  15. package/build/gallery/edit.js.map +1 -1
  16. package/build/image/deprecated.js +106 -2
  17. package/build/image/deprecated.js.map +1 -1
  18. package/build/image/image.js +2 -2
  19. package/build/image/image.js.map +1 -1
  20. package/build/image/index.js +2 -1
  21. package/build/image/index.js.map +1 -1
  22. package/build/index.js +3 -1
  23. package/build/index.js.map +1 -1
  24. package/build/list-item/hooks/use-merge.js +10 -1
  25. package/build/list-item/hooks/use-merge.js.map +1 -1
  26. package/build/navigation/edit/menu-inspector-controls.js +1 -1
  27. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  28. package/build/navigation/edit/navigation-menu-selector.js +4 -4
  29. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  30. package/build/navigation/view-modal.js +93 -32
  31. package/build/navigation/view-modal.js.map +1 -1
  32. package/build/navigation/view.js +63 -31
  33. package/build/navigation/view.js.map +1 -1
  34. package/build/pattern/edit.js +28 -4
  35. package/build/pattern/edit.js.map +1 -1
  36. package/build/preformatted/index.js +4 -0
  37. package/build/preformatted/index.js.map +1 -1
  38. package/build/search/view.js +166 -62
  39. package/build/search/view.js.map +1 -1
  40. package/build/social-link/icons/index.js +13 -0
  41. package/build/social-link/icons/index.js.map +1 -1
  42. package/build/social-link/icons/threads.js +25 -0
  43. package/build/social-link/icons/threads.js.map +1 -0
  44. package/build/social-link/variations.js +7 -0
  45. package/build/social-link/variations.js.map +1 -1
  46. package/build/template-part/edit/import-controls.js +1 -1
  47. package/build/template-part/edit/import-controls.js.map +1 -1
  48. package/build-module/avatar/index.js +3 -0
  49. package/build-module/avatar/index.js.map +1 -1
  50. package/build-module/block/edit.js +4 -29
  51. package/build-module/block/edit.js.map +1 -1
  52. package/build-module/cover/index.js +2 -1
  53. package/build-module/cover/index.js.map +1 -1
  54. package/build-module/footnotes/edit.js +11 -0
  55. package/build-module/footnotes/edit.js.map +1 -1
  56. package/build-module/footnotes/format.js +102 -10
  57. package/build-module/footnotes/format.js.map +1 -1
  58. package/build-module/footnotes/index.js +45 -3
  59. package/build-module/footnotes/index.js.map +1 -1
  60. package/build-module/gallery/edit.js +7 -5
  61. package/build-module/gallery/edit.js.map +1 -1
  62. package/build-module/image/deprecated.js +107 -3
  63. package/build-module/image/deprecated.js.map +1 -1
  64. package/build-module/image/image.js +2 -2
  65. package/build-module/image/image.js.map +1 -1
  66. package/build-module/image/index.js +2 -1
  67. package/build-module/image/index.js.map +1 -1
  68. package/build-module/index.js +3 -1
  69. package/build-module/index.js.map +1 -1
  70. package/build-module/list-item/hooks/use-merge.js +10 -1
  71. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  72. package/build-module/navigation/edit/menu-inspector-controls.js +1 -1
  73. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  74. package/build-module/navigation/edit/navigation-menu-selector.js +4 -4
  75. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  76. package/build-module/navigation/view-modal.js +93 -31
  77. package/build-module/navigation/view-modal.js.map +1 -1
  78. package/build-module/navigation/view.js +63 -31
  79. package/build-module/navigation/view.js.map +1 -1
  80. package/build-module/pattern/edit.js +27 -4
  81. package/build-module/pattern/edit.js.map +1 -1
  82. package/build-module/preformatted/index.js +4 -0
  83. package/build-module/preformatted/index.js.map +1 -1
  84. package/build-module/search/view.js +166 -62
  85. package/build-module/search/view.js.map +1 -1
  86. package/build-module/social-link/icons/index.js +1 -0
  87. package/build-module/social-link/icons/index.js.map +1 -1
  88. package/build-module/social-link/icons/threads.js +15 -0
  89. package/build-module/social-link/icons/threads.js.map +1 -0
  90. package/build-module/social-link/variations.js +8 -1
  91. package/build-module/social-link/variations.js.map +1 -1
  92. package/build-module/template-part/edit/import-controls.js +2 -2
  93. package/build-module/template-part/edit/import-controls.js.map +1 -1
  94. package/build-style/preformatted/style-rtl.css +2 -1
  95. package/build-style/preformatted/style.css +2 -1
  96. package/build-style/social-links/style-rtl.css +7 -0
  97. package/build-style/social-links/style.css +7 -0
  98. package/build-style/style-rtl.css +10 -1
  99. package/build-style/style.css +10 -1
  100. package/build-style/video/style-rtl.css +1 -0
  101. package/build-style/video/style.css +1 -0
  102. package/package.json +32 -32
  103. package/src/audio/test/__snapshots__/edit.native.js.snap +60 -0
  104. package/src/avatar/block.json +3 -0
  105. package/src/block/edit.js +1 -39
  106. package/src/buttons/test/edit.native.js +4 -0
  107. package/src/columns/test/edit.native.js +5 -0
  108. package/src/comment-template/index.php +2 -0
  109. package/src/cover/block.json +2 -1
  110. package/src/cover/test/edit.native.js +8 -0
  111. package/src/embed/test/index.native.js +8 -0
  112. package/src/file/index.php +1 -1
  113. package/src/file/test/__snapshots__/edit.native.js.snap +61 -0
  114. package/src/footnotes/block.json +44 -1
  115. package/src/footnotes/edit.js +12 -0
  116. package/src/footnotes/format.js +70 -7
  117. package/src/footnotes/index.js +0 -1
  118. package/src/footnotes/index.php +207 -0
  119. package/src/gallery/edit.js +41 -37
  120. package/src/gallery/test/index.native.js +15 -3
  121. package/src/heading/test/index.native.js +4 -0
  122. package/src/image/block.json +2 -1
  123. package/src/image/deprecated.js +109 -3
  124. package/src/image/image.js +2 -2
  125. package/src/image/index.php +1 -3
  126. package/src/image/test/edit.native.js +0 -1
  127. package/src/index.js +5 -1
  128. package/src/list/test/edit.native.js +5 -0
  129. package/src/list-item/hooks/use-merge.js +12 -5
  130. package/src/missing/test/__snapshots__/edit.native.js.snap +21 -0
  131. package/src/navigation/edit/menu-inspector-controls.js +1 -1
  132. package/src/navigation/edit/navigation-menu-selector.js +8 -4
  133. package/src/navigation/index.php +27 -13
  134. package/src/navigation/view-modal.js +88 -39
  135. package/src/navigation/view.js +69 -36
  136. package/src/paragraph/test/edit.native.js +55 -35
  137. package/src/pattern/edit.js +21 -0
  138. package/src/pattern/index.php +13 -1
  139. package/src/post-template/index.php +2 -0
  140. package/src/post-title/index.php +2 -0
  141. package/src/preformatted/block.json +4 -0
  142. package/src/preformatted/style.scss +4 -1
  143. package/src/pullquote/test/edit.native.js +12 -4
  144. package/src/quote/test/edit.native.js +12 -4
  145. package/src/search/index.php +4 -0
  146. package/src/search/test/__snapshots__/edit.native.js.snap +63 -0
  147. package/src/search/view.js +171 -67
  148. package/src/social-link/icons/index.js +1 -0
  149. package/src/social-link/icons/threads.js +10 -0
  150. package/src/social-link/index.php +4 -0
  151. package/src/social-link/socials-with-bg.scss +5 -0
  152. package/src/social-link/socials-without-bg.scss +4 -0
  153. package/src/social-link/variations.js +7 -0
  154. package/src/template-part/edit/import-controls.js +2 -2
  155. package/src/template-part/index.php +6 -9
  156. package/src/video/style.scss +1 -0
@@ -2860,10 +2860,11 @@ p.has-background {
2860
2860
  }
2861
2861
 
2862
2862
  .wp-block-preformatted {
2863
+ box-sizing: border-box;
2863
2864
  white-space: pre-wrap;
2864
2865
  }
2865
2866
 
2866
- .wp-block-preformatted.has-background {
2867
+ :where(.wp-block-preformatted.has-background) {
2867
2868
  padding: 1.25em 2.375em;
2868
2869
  }
2869
2870
 
@@ -3441,6 +3442,10 @@ ul.wp-block-rss.is-grid li {
3441
3442
  background-color: #2aabee;
3442
3443
  color: #fff;
3443
3444
  }
3445
+ .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads {
3446
+ background-color: #000;
3447
+ color: #fff;
3448
+ }
3444
3449
  .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok {
3445
3450
  background-color: #000;
3446
3451
  color: #fff;
@@ -3583,6 +3588,9 @@ ul.wp-block-rss.is-grid li {
3583
3588
  .wp-block-social-links.is-style-logos-only .wp-social-link-telegram {
3584
3589
  color: #2aabee;
3585
3590
  }
3591
+ .wp-block-social-links.is-style-logos-only .wp-social-link-threads {
3592
+ color: #000;
3593
+ }
3586
3594
  .wp-block-social-links.is-style-logos-only .wp-social-link-tiktok {
3587
3595
  color: #000;
3588
3596
  }
@@ -3844,6 +3852,7 @@ pre.wp-block-verse {
3844
3852
  }
3845
3853
  .wp-block-video video {
3846
3854
  width: 100%;
3855
+ vertical-align: middle;
3847
3856
  }
3848
3857
  @supports (position: sticky) {
3849
3858
  .wp-block-video [poster] {
@@ -91,6 +91,7 @@
91
91
  }
92
92
  .wp-block-video video {
93
93
  width: 100%;
94
+ vertical-align: middle;
94
95
  }
95
96
  @supports (position: sticky) {
96
97
  .wp-block-video [poster] {
@@ -91,6 +91,7 @@
91
91
  }
92
92
  .wp-block-video video {
93
93
  width: 100%;
94
+ vertical-align: middle;
94
95
  }
95
96
  @supports (position: sticky) {
96
97
  .wp-block-video [poster] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "8.15.0",
3
+ "version": "8.16.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,36 +31,36 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.38.0",
35
- "@wordpress/api-fetch": "^6.35.0",
36
- "@wordpress/autop": "^3.38.0",
37
- "@wordpress/blob": "^3.38.0",
38
- "@wordpress/block-editor": "^12.6.0",
39
- "@wordpress/blocks": "^12.15.0",
40
- "@wordpress/components": "^25.4.0",
41
- "@wordpress/compose": "^6.15.0",
42
- "@wordpress/core-data": "^6.15.0",
43
- "@wordpress/data": "^9.8.0",
44
- "@wordpress/date": "^4.38.0",
45
- "@wordpress/deprecated": "^3.38.0",
46
- "@wordpress/dom": "^3.38.0",
47
- "@wordpress/element": "^5.15.0",
48
- "@wordpress/escape-html": "^2.38.0",
49
- "@wordpress/hooks": "^3.38.0",
50
- "@wordpress/html-entities": "^3.38.0",
51
- "@wordpress/i18n": "^4.38.0",
52
- "@wordpress/icons": "^9.29.0",
53
- "@wordpress/interactivity": "^1.2.0",
54
- "@wordpress/keycodes": "^3.38.0",
55
- "@wordpress/notices": "^4.6.0",
56
- "@wordpress/primitives": "^3.36.0",
57
- "@wordpress/private-apis": "^0.20.0",
58
- "@wordpress/reusable-blocks": "^4.15.0",
59
- "@wordpress/rich-text": "^6.15.0",
60
- "@wordpress/server-side-render": "^4.15.0",
61
- "@wordpress/url": "^3.39.0",
62
- "@wordpress/viewport": "^5.15.0",
63
- "@wordpress/wordcount": "^3.38.0",
34
+ "@wordpress/a11y": "^3.39.0",
35
+ "@wordpress/api-fetch": "^6.36.0",
36
+ "@wordpress/autop": "^3.39.0",
37
+ "@wordpress/blob": "^3.39.0",
38
+ "@wordpress/block-editor": "^12.7.0",
39
+ "@wordpress/blocks": "^12.16.0",
40
+ "@wordpress/components": "^25.5.0",
41
+ "@wordpress/compose": "^6.16.0",
42
+ "@wordpress/core-data": "^6.16.0",
43
+ "@wordpress/data": "^9.9.0",
44
+ "@wordpress/date": "^4.39.0",
45
+ "@wordpress/deprecated": "^3.39.0",
46
+ "@wordpress/dom": "^3.39.0",
47
+ "@wordpress/element": "^5.16.0",
48
+ "@wordpress/escape-html": "^2.39.0",
49
+ "@wordpress/hooks": "^3.39.0",
50
+ "@wordpress/html-entities": "^3.39.0",
51
+ "@wordpress/i18n": "^4.39.0",
52
+ "@wordpress/icons": "^9.30.0",
53
+ "@wordpress/interactivity": "^2.0.0",
54
+ "@wordpress/keycodes": "^3.39.0",
55
+ "@wordpress/notices": "^4.7.0",
56
+ "@wordpress/primitives": "^3.37.0",
57
+ "@wordpress/private-apis": "^0.21.0",
58
+ "@wordpress/reusable-blocks": "^4.16.0",
59
+ "@wordpress/rich-text": "^6.16.0",
60
+ "@wordpress/server-side-render": "^4.16.0",
61
+ "@wordpress/url": "^3.40.0",
62
+ "@wordpress/viewport": "^5.16.0",
63
+ "@wordpress/wordcount": "^3.39.0",
64
64
  "change-case": "^4.1.2",
65
65
  "classnames": "^2.3.1",
66
66
  "colord": "^2.7.0",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
82
+ "gitHead": "b898cf1dc8e70841d1647ea0994ac6278acc18a7"
83
83
  }
@@ -4,7 +4,11 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
4
4
  <View
5
5
  accessibilityState={
6
6
  {
7
+ "busy": undefined,
8
+ "checked": undefined,
7
9
  "disabled": true,
10
+ "expanded": undefined,
11
+ "selected": undefined,
8
12
  }
9
13
  }
10
14
  accessible={true}
@@ -38,7 +42,11 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
38
42
  <View
39
43
  accessibilityState={
40
44
  {
45
+ "busy": undefined,
46
+ "checked": undefined,
41
47
  "disabled": true,
48
+ "expanded": undefined,
49
+ "selected": undefined,
42
50
  }
43
51
  }
44
52
  accessible={true}
@@ -126,6 +134,15 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
126
134
  }
127
135
  >
128
136
  <RCTAztecView
137
+ accessibilityState={
138
+ {
139
+ "busy": undefined,
140
+ "checked": undefined,
141
+ "disabled": undefined,
142
+ "expanded": undefined,
143
+ "selected": undefined,
144
+ }
145
+ }
129
146
  accessible={true}
130
147
  activeFormats={[]}
131
148
  blockType={
@@ -189,7 +206,11 @@ exports[`Audio block renders audio file without crashing 1`] = `
189
206
  <View
190
207
  accessibilityState={
191
208
  {
209
+ "busy": undefined,
210
+ "checked": undefined,
192
211
  "disabled": true,
212
+ "expanded": undefined,
213
+ "selected": undefined,
193
214
  }
194
215
  }
195
216
  accessible={true}
@@ -223,7 +244,11 @@ exports[`Audio block renders audio file without crashing 1`] = `
223
244
  <View
224
245
  accessibilityState={
225
246
  {
247
+ "busy": undefined,
248
+ "checked": undefined,
226
249
  "disabled": true,
250
+ "expanded": undefined,
251
+ "selected": undefined,
227
252
  }
228
253
  }
229
254
  accessible={true}
@@ -274,6 +299,15 @@ exports[`Audio block renders audio file without crashing 1`] = `
274
299
  accessibilityHint="Double tap to listen the audio file"
275
300
  accessibilityLabel="Audio Player"
276
301
  accessibilityRole="button"
302
+ accessibilityState={
303
+ {
304
+ "busy": undefined,
305
+ "checked": undefined,
306
+ "disabled": undefined,
307
+ "expanded": undefined,
308
+ "selected": undefined,
309
+ }
310
+ }
277
311
  accessible={true}
278
312
  focusable={true}
279
313
  onClick={[Function]}
@@ -326,6 +360,15 @@ exports[`Audio block renders audio file without crashing 1`] = `
326
360
  }
327
361
  >
328
362
  <RCTAztecView
363
+ accessibilityState={
364
+ {
365
+ "busy": undefined,
366
+ "checked": undefined,
367
+ "disabled": undefined,
368
+ "expanded": undefined,
369
+ "selected": undefined,
370
+ }
371
+ }
329
372
  accessible={true}
330
373
  activeFormats={[]}
331
374
  blockType={
@@ -440,6 +483,23 @@ exports[`Audio block renders placeholder without crashing 1`] = `
440
483
  accessibilityHint="Double tap to select an audio file"
441
484
  accessibilityLabel="Audio block. Empty"
442
485
  accessibilityRole="button"
486
+ accessibilityState={
487
+ {
488
+ "busy": undefined,
489
+ "checked": undefined,
490
+ "disabled": undefined,
491
+ "expanded": undefined,
492
+ "selected": undefined,
493
+ }
494
+ }
495
+ accessibilityValue={
496
+ {
497
+ "max": undefined,
498
+ "min": undefined,
499
+ "now": undefined,
500
+ "text": undefined,
501
+ }
502
+ }
443
503
  accessible={true}
444
504
  collapsable={false}
445
505
  focusable={true}
@@ -48,6 +48,9 @@
48
48
  "__experimentalDuotone": "img"
49
49
  }
50
50
  },
51
+ "selectors": {
52
+ "border": ".wp-block-avatar img"
53
+ },
51
54
  "editorStyle": "wp-block-avatar-editor",
52
55
  "style": "wp-block-avatar"
53
56
  }
package/src/block/edit.js CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useDispatch, useSelect } from '@wordpress/data';
5
4
  import {
6
5
  useEntityBlockEditor,
7
6
  useEntityProp,
@@ -10,8 +9,6 @@ import {
10
9
  import {
11
10
  Placeholder,
12
11
  Spinner,
13
- ToolbarGroup,
14
- ToolbarButton,
15
12
  TextControl,
16
13
  PanelBody,
17
14
  } from '@wordpress/components';
@@ -21,16 +18,12 @@ import {
21
18
  __experimentalRecursionProvider as RecursionProvider,
22
19
  __experimentalUseHasRecursion as useHasRecursion,
23
20
  InnerBlocks,
24
- BlockControls,
25
21
  InspectorControls,
26
22
  useBlockProps,
27
23
  Warning,
28
- store as blockEditorStore,
29
24
  } from '@wordpress/block-editor';
30
- import { store as reusableBlocksStore } from '@wordpress/reusable-blocks';
31
- import { ungroup } from '@wordpress/icons';
32
25
 
33
- export default function ReusableBlockEdit( { attributes: { ref }, clientId } ) {
26
+ export default function ReusableBlockEdit( { attributes: { ref } } ) {
34
27
  const hasAlreadyRendered = useHasRecursion( ref );
35
28
  const { record, hasResolved } = useEntityRecord(
36
29
  'postType',
@@ -39,21 +32,6 @@ export default function ReusableBlockEdit( { attributes: { ref }, clientId } ) {
39
32
  );
40
33
  const isMissing = hasResolved && ! record;
41
34
 
42
- const { canRemove, innerBlockCount } = useSelect(
43
- ( select ) => {
44
- const { canRemoveBlock, getBlockCount } =
45
- select( blockEditorStore );
46
- return {
47
- canRemove: canRemoveBlock( clientId ),
48
- innerBlockCount: getBlockCount( clientId ),
49
- };
50
- },
51
- [ clientId ]
52
- );
53
-
54
- const { __experimentalConvertBlockToStatic: convertBlockToStatic } =
55
- useDispatch( reusableBlocksStore );
56
-
57
35
  const [ blocks, onInput, onChange ] = useEntityBlockEditor(
58
36
  'postType',
59
37
  'wp_block',
@@ -112,22 +90,6 @@ export default function ReusableBlockEdit( { attributes: { ref }, clientId } ) {
112
90
 
113
91
  return (
114
92
  <RecursionProvider uniqueId={ ref }>
115
- { canRemove && (
116
- <BlockControls>
117
- <ToolbarGroup>
118
- <ToolbarButton
119
- onClick={ () => convertBlockToStatic( clientId ) }
120
- label={
121
- innerBlockCount > 1
122
- ? __( 'Detach patterns' )
123
- : __( 'Detach pattern' )
124
- }
125
- icon={ ungroup }
126
- showTooltip
127
- />
128
- </ToolbarGroup>
129
- </BlockControls>
130
- ) }
131
93
  <InspectorControls>
132
94
  <PanelBody>
133
95
  <TextControl
@@ -324,6 +324,10 @@ describe( 'Buttons block', () => {
324
324
 
325
325
  // Tap one color
326
326
  fireEvent.press( screen.getByLabelText( 'Pale pink' ) );
327
+ // TODO(jest-console): Fix the warning and remove the expect below.
328
+ expect( console ).toHaveWarnedWith(
329
+ `Non-serializable values were found in the navigation state. Check:\n\nColor > params.onColorChange (Function)\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`
330
+ );
327
331
 
328
332
  // Dismiss the Block Settings modal.
329
333
  fireEvent( blockSettingsModal, 'backdropPress' );
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import {
5
+ act,
5
6
  addBlock,
6
7
  fireEvent,
7
8
  getEditorHtml,
@@ -290,6 +291,10 @@ describe( 'Columns block', () => {
290
291
  // Get the first column
291
292
  const firstColumnBlock = await getBlock( screen, 'Column' );
292
293
  fireEvent.press( firstColumnBlock );
294
+ // Inner blocks batch store updates with microtasks.
295
+ // To avoid `act` warnings, we let queued microtasks to be executed.
296
+ // Reference: https://t.ly/b95nA
297
+ await act( async () => {} );
293
298
 
294
299
  // Open vertical alignment menu
295
300
  fireEvent.press( verticalAlignmentButton );
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Function that recursively renders a list of nested comments.
10
10
  *
11
+ * @since 6.3.0 Changed render_block_context priority to `1`.
12
+ *
11
13
  * @global int $comment_depth
12
14
  *
13
15
  * @param WP_Comment[] $comments The array of comments.
@@ -111,7 +111,8 @@
111
111
  "heading": true,
112
112
  "text": true,
113
113
  "background": false,
114
- "__experimentalSkipSerialization": [ "gradients" ]
114
+ "__experimentalSkipSerialization": [ "gradients" ],
115
+ "enableContrastChecker": false
115
116
  },
116
117
  "typography": {
117
118
  "fontSize": true,
@@ -220,6 +220,10 @@ describe( 'when an image is attached', () => {
220
220
  '52'
221
221
  );
222
222
  fireEvent.press( screen.getByLabelText( 'Apply' ) );
223
+ // TODO(jest-console): Fix the warning and remove the expect below.
224
+ expect( console ).toHaveWarnedWith(
225
+ `Non-serializable values were found in the navigation state. Check:\n\nFocalPoint > params.onFocalPointChange (Function)\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`
226
+ );
223
227
 
224
228
  expect( setAttributes ).toHaveBeenCalledWith(
225
229
  expect.objectContaining( {
@@ -377,6 +381,10 @@ describe( 'color settings', () => {
377
381
  // Find the selected color.
378
382
  const colorPaletteButton = await screen.findByTestId( COLOR_PINK );
379
383
  expect( colorPaletteButton ).toBeDefined();
384
+ // TODO(jest-console): Fix the warning and remove the expect below.
385
+ expect( console ).toHaveWarnedWith(
386
+ `Non-serializable values were found in the navigation state. Check:\n\nColor > params.onColorChange (Function)\n\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`
387
+ );
380
388
 
381
389
  // Select another color.
382
390
  const newColorButton = await screen.findByTestId( COLOR_RED );
@@ -898,6 +898,10 @@ describe( 'Embed block', () => {
898
898
 
899
899
  // Select create embed option.
900
900
  fireEvent.press( editor.getByText( 'Create embed' ) );
901
+ expect( console ).toHaveLoggedWith(
902
+ 'Processed HTML piece:\n\n',
903
+ `<p>${ expectedURL }</p>`
904
+ );
901
905
 
902
906
  // Get the created embed block.
903
907
  const [ embedBlock ] = await editor.findAllByLabelText(
@@ -942,6 +946,10 @@ describe( 'Embed block', () => {
942
946
 
943
947
  // Select create link option.
944
948
  fireEvent.press( editor.getByText( 'Create link' ) );
949
+ expect( console ).toHaveLoggedWith(
950
+ 'Processed HTML piece:\n\n',
951
+ `<p>${ expectedURL }</p>`
952
+ );
945
953
 
946
954
  // Get the link text.
947
955
  const linkText = await editor.findByDisplayValue(
@@ -24,7 +24,7 @@ if ( gutenberg_should_block_use_interactivity_api( 'core/file' ) ) {
24
24
  }
25
25
 
26
26
  /**
27
- * When the `core/file` block is rendering, check if we need to enqueue the `'wp-block-file-view` script.
27
+ * When the `core/file` block is rendering, check if we need to enqueue the `wp-block-file-view` script.
28
28
  *
29
29
  * @param array $attributes The block attributes.
30
30
  * @param string $content The block content.
@@ -22,7 +22,11 @@ exports[`File block renders file error state without crashing 1`] = `
22
22
  <View
23
23
  accessibilityState={
24
24
  {
25
+ "busy": undefined,
26
+ "checked": undefined,
25
27
  "disabled": false,
28
+ "expanded": undefined,
29
+ "selected": undefined,
26
30
  }
27
31
  }
28
32
  accessible={false}
@@ -61,6 +65,15 @@ exports[`File block renders file error state without crashing 1`] = `
61
65
  }
62
66
  >
63
67
  <RCTAztecView
68
+ accessibilityState={
69
+ {
70
+ "busy": undefined,
71
+ "checked": undefined,
72
+ "disabled": undefined,
73
+ "expanded": undefined,
74
+ "selected": undefined,
75
+ }
76
+ }
64
77
  accessible={true}
65
78
  activeFormats={[]}
66
79
  blockType={
@@ -167,6 +180,15 @@ exports[`File block renders file error state without crashing 1`] = `
167
180
  }
168
181
  >
169
182
  <RCTAztecView
183
+ accessibilityState={
184
+ {
185
+ "busy": undefined,
186
+ "checked": undefined,
187
+ "disabled": undefined,
188
+ "expanded": undefined,
189
+ "selected": undefined,
190
+ }
191
+ }
170
192
  accessible={true}
171
193
  activeFormats={[]}
172
194
  blockType={
@@ -251,7 +273,11 @@ exports[`File block renders file without crashing 1`] = `
251
273
  <View
252
274
  accessibilityState={
253
275
  {
276
+ "busy": undefined,
277
+ "checked": undefined,
254
278
  "disabled": false,
279
+ "expanded": undefined,
280
+ "selected": undefined,
255
281
  }
256
282
  }
257
283
  accessible={false}
@@ -290,6 +316,15 @@ exports[`File block renders file without crashing 1`] = `
290
316
  }
291
317
  >
292
318
  <RCTAztecView
319
+ accessibilityState={
320
+ {
321
+ "busy": undefined,
322
+ "checked": undefined,
323
+ "disabled": undefined,
324
+ "expanded": undefined,
325
+ "selected": undefined,
326
+ }
327
+ }
293
328
  accessible={true}
294
329
  activeFormats={[]}
295
330
  blockType={
@@ -370,6 +405,15 @@ exports[`File block renders file without crashing 1`] = `
370
405
  }
371
406
  >
372
407
  <RCTAztecView
408
+ accessibilityState={
409
+ {
410
+ "busy": undefined,
411
+ "checked": undefined,
412
+ "disabled": undefined,
413
+ "expanded": undefined,
414
+ "selected": undefined,
415
+ }
416
+ }
373
417
  accessible={true}
374
418
  activeFormats={[]}
375
419
  blockType={
@@ -486,6 +530,23 @@ exports[`File block renders placeholder without crashing 1`] = `
486
530
  accessibilityHint="Double tap to select"
487
531
  accessibilityLabel="File block. Empty"
488
532
  accessibilityRole="button"
533
+ accessibilityState={
534
+ {
535
+ "busy": undefined,
536
+ "checked": undefined,
537
+ "disabled": undefined,
538
+ "expanded": undefined,
539
+ "selected": undefined,
540
+ }
541
+ }
542
+ accessibilityValue={
543
+ {
544
+ "max": undefined,
545
+ "min": undefined,
546
+ "now": undefined,
547
+ "text": undefined,
548
+ }
549
+ }
489
550
  accessible={true}
490
551
  collapsable={false}
491
552
  focusable={true}
@@ -9,9 +9,52 @@
9
9
  "textdomain": "default",
10
10
  "usesContext": [ "postId", "postType" ],
11
11
  "supports": {
12
+ "__experimentalBorder": {
13
+ "radius": true,
14
+ "color": true,
15
+ "width": true,
16
+ "style": true,
17
+ "__experimentalDefaultControls": {
18
+ "radius": false,
19
+ "color": false,
20
+ "width": false,
21
+ "style": false
22
+ }
23
+ },
24
+ "color": {
25
+ "background": true,
26
+ "link": true,
27
+ "text": true,
28
+ "__experimentalDefaultControls": {
29
+ "link": true,
30
+ "text": true
31
+ }
32
+ },
12
33
  "html": false,
13
34
  "multiple": false,
14
- "reusable": false
35
+ "reusable": false,
36
+ "spacing": {
37
+ "margin": true,
38
+ "padding": true,
39
+ "__experimentalDefaultControls": {
40
+ "margin": false,
41
+ "padding": false
42
+ }
43
+ },
44
+ "typography": {
45
+ "fontSize": true,
46
+ "lineHeight": true,
47
+ "__experimentalFontFamily": true,
48
+ "__experimentalTextDecoration": true,
49
+ "__experimentalFontStyle": true,
50
+ "__experimentalFontWeight": true,
51
+ "__experimentalLetterSpacing": true,
52
+ "__experimentalTextTransform": true,
53
+ "__experimentalWritingMode": true,
54
+ "__experimentalDefaultControls": {
55
+ "fontSize": true
56
+ }
57
+ }
15
58
  },
16
59
  "style": "wp-block-footnotes"
17
60
  }
@@ -17,6 +17,18 @@ export default function FootnotesEdit( { context: { postType, postId } } ) {
17
17
  const footnotes = meta?.footnotes ? JSON.parse( meta.footnotes ) : [];
18
18
  const blockProps = useBlockProps();
19
19
 
20
+ if ( postType !== 'post' && postType !== 'page' ) {
21
+ return (
22
+ <div { ...blockProps }>
23
+ <Placeholder
24
+ icon={ <BlockIcon icon={ icon } /> }
25
+ label={ __( 'Footnotes' ) }
26
+ // To do: add instructions. We can't add new string in RC.
27
+ />
28
+ </div>
29
+ );
30
+ }
31
+
20
32
  if ( ! footnotes.length ) {
21
33
  return (
22
34
  <div { ...blockProps }>