@wordpress/block-library 9.18.0 → 9.19.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.
- package/CHANGELOG.md +2 -0
- package/build/cover/edit/index.js +3 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/form/edit.js +4 -2
- package/build/form/edit.js.map +1 -1
- package/build/image/view.js +4 -4
- package/build/image/view.js.map +1 -1
- package/build/navigation/view.js +2 -2
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +2 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/post-comments-count/index.js +8 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/query/view.js +2 -2
- package/build/query/view.js.map +1 -1
- package/build/search/view.js +2 -2
- package/build/search/view.js.map +1 -1
- package/build/site-logo/edit.js +2 -5
- package/build/site-logo/edit.js.map +1 -1
- package/build/video/edit-common-settings.js +10 -3
- package/build/video/edit-common-settings.js.map +1 -1
- package/build-module/cover/edit/index.js +3 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/form/edit.js +4 -2
- package/build-module/form/edit.js.map +1 -1
- package/build-module/image/view.js +5 -5
- package/build-module/image/view.js.map +1 -1
- package/build-module/navigation/view.js +3 -3
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +2 -1
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +8 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -1
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/query/view.js +3 -3
- package/build-module/query/view.js.map +1 -1
- package/build-module/search/view.js +3 -3
- package/build-module/search/view.js.map +1 -1
- package/build-module/site-logo/edit.js +2 -5
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/video/edit-common-settings.js +10 -3
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-style/editor-rtl.css +6 -9
- package/build-style/editor.css +6 -9
- package/build-style/navigation-link/editor-rtl.css +5 -9
- package/build-style/navigation-link/editor.css +5 -9
- package/build-style/post-comments-count/style-rtl.css +103 -0
- package/build-style/post-comments-count/style.css +103 -0
- package/build-style/pullquote/style-rtl.css +4 -0
- package/build-style/pullquote/style.css +4 -0
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/style-rtl.css +8 -0
- package/build-style/style.css +8 -0
- package/package.json +35 -35
- package/src/cover/edit/index.js +2 -0
- package/src/cover/test/edit.js +6 -6
- package/src/form/edit.js +2 -0
- package/src/image/view.js +10 -5
- package/src/navigation/view.js +8 -3
- package/src/navigation-link/edit.js +1 -0
- package/src/navigation-link/editor.scss +3 -24
- package/src/navigation-submenu/edit.js +1 -0
- package/src/post-comments-count/block.json +8 -1
- package/src/post-comments-count/style.scss +4 -0
- package/src/post-navigation-link/edit.js +1 -1
- package/src/pullquote/style.scss +4 -0
- package/src/query/view.js +8 -3
- package/src/query-total/index.php +2 -0
- package/src/search/view.js +8 -3
- package/src/site-logo/edit.js +1 -5
- package/src/social-link/editor.scss +1 -0
- package/src/style.scss +1 -0
- package/src/template-part/index.php +3 -1
- package/src/video/edit-common-settings.js +11 -2
|
@@ -2931,6 +2931,10 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
2931
2931
|
margin-right: 0.5em;
|
|
2932
2932
|
}
|
|
2933
2933
|
|
|
2934
|
+
.wp-block-post-comments-count {
|
|
2935
|
+
box-sizing: border-box;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2934
2938
|
.wp-block-post-content {
|
|
2935
2939
|
display: flow-root;
|
|
2936
2940
|
}
|
|
@@ -3127,6 +3131,10 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3127
3131
|
text-align: left;
|
|
3128
3132
|
}
|
|
3129
3133
|
|
|
3134
|
+
.wp-block-pullquote.has-text-align-center blockquote {
|
|
3135
|
+
text-align: center;
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3130
3138
|
.wp-block-pullquote.is-style-solid-color {
|
|
3131
3139
|
border: none;
|
|
3132
3140
|
}
|
package/build-style/style.css
CHANGED
|
@@ -2963,6 +2963,10 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
2963
2963
|
margin-left: 0.5em;
|
|
2964
2964
|
}
|
|
2965
2965
|
|
|
2966
|
+
.wp-block-post-comments-count {
|
|
2967
|
+
box-sizing: border-box;
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2966
2970
|
.wp-block-post-content {
|
|
2967
2971
|
display: flow-root;
|
|
2968
2972
|
}
|
|
@@ -3159,6 +3163,10 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3159
3163
|
text-align: right;
|
|
3160
3164
|
}
|
|
3161
3165
|
|
|
3166
|
+
.wp-block-pullquote.has-text-align-center blockquote {
|
|
3167
|
+
text-align: center;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3162
3170
|
.wp-block-pullquote.is-style-solid-color {
|
|
3163
3171
|
border: none;
|
|
3164
3172
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.19.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.
|
|
45
|
-
"@wordpress/api-fetch": "^7.
|
|
46
|
-
"@wordpress/autop": "^4.
|
|
47
|
-
"@wordpress/blob": "^4.
|
|
48
|
-
"@wordpress/block-editor": "^14.
|
|
49
|
-
"@wordpress/blocks": "^14.
|
|
50
|
-
"@wordpress/components": "^29.
|
|
51
|
-
"@wordpress/compose": "^7.
|
|
52
|
-
"@wordpress/core-data": "^7.
|
|
53
|
-
"@wordpress/data": "^10.
|
|
54
|
-
"@wordpress/date": "^5.
|
|
55
|
-
"@wordpress/deprecated": "^4.
|
|
56
|
-
"@wordpress/dom": "^4.
|
|
57
|
-
"@wordpress/element": "^6.
|
|
58
|
-
"@wordpress/escape-html": "^3.
|
|
59
|
-
"@wordpress/hooks": "^4.
|
|
60
|
-
"@wordpress/html-entities": "^4.
|
|
61
|
-
"@wordpress/i18n": "^5.
|
|
62
|
-
"@wordpress/icons": "^10.
|
|
63
|
-
"@wordpress/interactivity": "^6.
|
|
64
|
-
"@wordpress/interactivity-router": "^2.
|
|
65
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
66
|
-
"@wordpress/keycodes": "^4.
|
|
67
|
-
"@wordpress/notices": "^5.
|
|
68
|
-
"@wordpress/patterns": "^2.
|
|
69
|
-
"@wordpress/primitives": "^4.
|
|
70
|
-
"@wordpress/private-apis": "^1.
|
|
71
|
-
"@wordpress/reusable-blocks": "^5.
|
|
72
|
-
"@wordpress/rich-text": "^7.
|
|
73
|
-
"@wordpress/server-side-render": "^5.
|
|
74
|
-
"@wordpress/url": "^4.
|
|
75
|
-
"@wordpress/viewport": "^6.
|
|
76
|
-
"@wordpress/wordcount": "^4.
|
|
44
|
+
"@wordpress/a11y": "^4.19.0",
|
|
45
|
+
"@wordpress/api-fetch": "^7.19.0",
|
|
46
|
+
"@wordpress/autop": "^4.19.0",
|
|
47
|
+
"@wordpress/blob": "^4.19.0",
|
|
48
|
+
"@wordpress/block-editor": "^14.14.0",
|
|
49
|
+
"@wordpress/blocks": "^14.8.0",
|
|
50
|
+
"@wordpress/components": "^29.5.0",
|
|
51
|
+
"@wordpress/compose": "^7.19.0",
|
|
52
|
+
"@wordpress/core-data": "^7.19.0",
|
|
53
|
+
"@wordpress/data": "^10.19.0",
|
|
54
|
+
"@wordpress/date": "^5.19.0",
|
|
55
|
+
"@wordpress/deprecated": "^4.19.0",
|
|
56
|
+
"@wordpress/dom": "^4.19.0",
|
|
57
|
+
"@wordpress/element": "^6.19.0",
|
|
58
|
+
"@wordpress/escape-html": "^3.19.0",
|
|
59
|
+
"@wordpress/hooks": "^4.19.0",
|
|
60
|
+
"@wordpress/html-entities": "^4.19.0",
|
|
61
|
+
"@wordpress/i18n": "^5.19.0",
|
|
62
|
+
"@wordpress/icons": "^10.19.0",
|
|
63
|
+
"@wordpress/interactivity": "^6.19.0",
|
|
64
|
+
"@wordpress/interactivity-router": "^2.19.0",
|
|
65
|
+
"@wordpress/keyboard-shortcuts": "^5.19.0",
|
|
66
|
+
"@wordpress/keycodes": "^4.19.0",
|
|
67
|
+
"@wordpress/notices": "^5.19.0",
|
|
68
|
+
"@wordpress/patterns": "^2.19.0",
|
|
69
|
+
"@wordpress/primitives": "^4.19.0",
|
|
70
|
+
"@wordpress/private-apis": "^1.19.0",
|
|
71
|
+
"@wordpress/reusable-blocks": "^5.19.0",
|
|
72
|
+
"@wordpress/rich-text": "^7.19.0",
|
|
73
|
+
"@wordpress/server-side-render": "^5.19.0",
|
|
74
|
+
"@wordpress/url": "^4.19.0",
|
|
75
|
+
"@wordpress/viewport": "^6.19.0",
|
|
76
|
+
"@wordpress/wordcount": "^4.19.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": "
|
|
94
|
+
"gitHead": "d6b0b20fa927b110140dc7fdd906a7e0bf662004"
|
|
95
95
|
}
|
package/src/cover/edit/index.js
CHANGED
package/src/cover/test/edit.js
CHANGED
|
@@ -47,7 +47,7 @@ async function setup( attributes, useCoreBlocks, customSettings ) {
|
|
|
47
47
|
|
|
48
48
|
async function createAndSelectBlock() {
|
|
49
49
|
await userEvent.click(
|
|
50
|
-
screen.getByRole( '
|
|
50
|
+
screen.getByRole( 'button', {
|
|
51
51
|
name: 'Black',
|
|
52
52
|
} )
|
|
53
53
|
);
|
|
@@ -72,7 +72,7 @@ describe( 'Cover block', () => {
|
|
|
72
72
|
|
|
73
73
|
test( 'can set overlay color using color picker on block placeholder', async () => {
|
|
74
74
|
const { container } = await setup();
|
|
75
|
-
const colorPicker = screen.getByRole( '
|
|
75
|
+
const colorPicker = screen.getByRole( 'button', {
|
|
76
76
|
name: 'Black',
|
|
77
77
|
} );
|
|
78
78
|
await userEvent.click( colorPicker );
|
|
@@ -96,7 +96,7 @@ describe( 'Cover block', () => {
|
|
|
96
96
|
await setup();
|
|
97
97
|
|
|
98
98
|
await userEvent.click(
|
|
99
|
-
screen.getByRole( '
|
|
99
|
+
screen.getByRole( 'button', {
|
|
100
100
|
name: 'Black',
|
|
101
101
|
} )
|
|
102
102
|
);
|
|
@@ -389,7 +389,7 @@ describe( 'Cover block', () => {
|
|
|
389
389
|
describe( 'isDark settings', () => {
|
|
390
390
|
test( 'should toggle is-light class if background changed from light to dark', async () => {
|
|
391
391
|
await setup();
|
|
392
|
-
const colorPicker = screen.getByRole( '
|
|
392
|
+
const colorPicker = screen.getByRole( 'button', {
|
|
393
393
|
name: 'White',
|
|
394
394
|
} );
|
|
395
395
|
await userEvent.click( colorPicker );
|
|
@@ -413,7 +413,7 @@ describe( 'Cover block', () => {
|
|
|
413
413
|
} );
|
|
414
414
|
test( 'should remove is-light class if overlay color is removed', async () => {
|
|
415
415
|
await setup();
|
|
416
|
-
const colorPicker = screen.getByRole( '
|
|
416
|
+
const colorPicker = screen.getByRole( 'button', {
|
|
417
417
|
name: 'White',
|
|
418
418
|
} );
|
|
419
419
|
await userEvent.click( colorPicker );
|
|
@@ -426,7 +426,7 @@ describe( 'Cover block', () => {
|
|
|
426
426
|
} )
|
|
427
427
|
);
|
|
428
428
|
await userEvent.click( screen.getByText( 'Overlay' ) );
|
|
429
|
-
// The default color is black, so clicking the black color
|
|
429
|
+
// The default color is black, so clicking the black color button will remove the background color,
|
|
430
430
|
// which should remove the isDark setting and assign the is-light class.
|
|
431
431
|
const popupColorPicker = screen.getByRole( 'option', {
|
|
432
432
|
name: 'White',
|
package/src/form/edit.js
CHANGED
|
@@ -123,6 +123,7 @@ const Edit = ( { attributes, setAttributes, clientId } ) => {
|
|
|
123
123
|
help={ __(
|
|
124
124
|
'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'
|
|
125
125
|
) }
|
|
126
|
+
type="email"
|
|
126
127
|
/>
|
|
127
128
|
) }
|
|
128
129
|
</PanelBody>
|
|
@@ -159,6 +160,7 @@ const Edit = ( { attributes, setAttributes, clientId } ) => {
|
|
|
159
160
|
help={ __(
|
|
160
161
|
'The URL where the form should be submitted.'
|
|
161
162
|
) }
|
|
163
|
+
type="url"
|
|
162
164
|
/>
|
|
163
165
|
</InspectorControls>
|
|
164
166
|
) }
|
package/src/image/view.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
store,
|
|
6
|
+
getContext,
|
|
7
|
+
getElement,
|
|
8
|
+
withSyncEvent,
|
|
9
|
+
} from '@wordpress/interactivity';
|
|
5
10
|
|
|
6
11
|
/**
|
|
7
12
|
* Tracks whether user is touching screen; used to differentiate behavior for
|
|
@@ -128,7 +133,7 @@ const { state, actions, callbacks } = store(
|
|
|
128
133
|
}, 450 );
|
|
129
134
|
}
|
|
130
135
|
},
|
|
131
|
-
handleKeydown( event ) {
|
|
136
|
+
handleKeydown: withSyncEvent( ( event ) => {
|
|
132
137
|
if ( state.overlayEnabled ) {
|
|
133
138
|
// Focuses the close button when the user presses the tab key.
|
|
134
139
|
if ( event.key === 'Tab' ) {
|
|
@@ -141,8 +146,8 @@ const { state, actions, callbacks } = store(
|
|
|
141
146
|
actions.hideLightbox();
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
|
-
},
|
|
145
|
-
handleTouchMove( event ) {
|
|
149
|
+
} ),
|
|
150
|
+
handleTouchMove: withSyncEvent( ( event ) => {
|
|
146
151
|
// On mobile devices, prevents triggering the scroll event because
|
|
147
152
|
// otherwise the page jumps around when it resets the scroll position.
|
|
148
153
|
// This also means that closing the lightbox requires that a user
|
|
@@ -152,7 +157,7 @@ const { state, actions, callbacks } = store(
|
|
|
152
157
|
if ( state.overlayEnabled ) {
|
|
153
158
|
event.preventDefault();
|
|
154
159
|
}
|
|
155
|
-
},
|
|
160
|
+
} ),
|
|
156
161
|
handleTouchStart() {
|
|
157
162
|
isTouching = true;
|
|
158
163
|
},
|
package/src/navigation/view.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
store,
|
|
6
|
+
getContext,
|
|
7
|
+
getElement,
|
|
8
|
+
withSyncEvent,
|
|
9
|
+
} from '@wordpress/interactivity';
|
|
5
10
|
|
|
6
11
|
const focusableSelectors = [
|
|
7
12
|
'a[href]',
|
|
@@ -106,7 +111,7 @@ const { state, actions } = store(
|
|
|
106
111
|
actions.openMenu( 'click' );
|
|
107
112
|
}
|
|
108
113
|
},
|
|
109
|
-
handleMenuKeydown( event ) {
|
|
114
|
+
handleMenuKeydown: withSyncEvent( ( event ) => {
|
|
110
115
|
const { type, firstFocusableElement, lastFocusableElement } =
|
|
111
116
|
getContext();
|
|
112
117
|
if ( state.menuOpenedBy.click ) {
|
|
@@ -137,7 +142,7 @@ const { state, actions } = store(
|
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
|
-
},
|
|
145
|
+
} ),
|
|
141
146
|
handleMenuFocusout( event ) {
|
|
142
147
|
const { modal, type } = getContext();
|
|
143
148
|
// If focus is outside modal, and in the document, close menu
|
|
@@ -82,30 +82,9 @@
|
|
|
82
82
|
// Draw a wavy underline.
|
|
83
83
|
.wp-block-navigation-link__placeholder-text {
|
|
84
84
|
span {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
$stop2: 64%;
|
|
89
|
-
|
|
90
|
-
--wp-underline-color: var(--wp-admin-theme-color);
|
|
91
|
-
|
|
92
|
-
background-image:
|
|
93
|
-
linear-gradient(45deg, transparent ($stop1 - $blur), var(--wp-underline-color) $stop1, var(--wp-underline-color) ($stop1 + $width), transparent ($stop1 + $width + $blur)),
|
|
94
|
-
linear-gradient(135deg, transparent ($stop2 - $blur), var(--wp-underline-color) $stop2, var(--wp-underline-color) ($stop2 + $width), transparent ($stop2 + $width + $blur));
|
|
95
|
-
background-position: 0 100%;
|
|
96
|
-
background-size: 6px 3px;
|
|
97
|
-
background-repeat: repeat-x;
|
|
98
|
-
|
|
99
|
-
// Since applied to a span, it doesn't change the footprint of the item,
|
|
100
|
-
// but it does vertically shift the underline to better align.
|
|
101
|
-
padding-bottom: 0.1em;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&.is-invalid,
|
|
105
|
-
&.is-draft {
|
|
106
|
-
span {
|
|
107
|
-
--wp-underline-color: #{$alert-red};
|
|
108
|
-
}
|
|
85
|
+
text-decoration: wavy underline;
|
|
86
|
+
text-decoration-skip-ink: none;
|
|
87
|
+
text-underline-offset: 0.25rem;
|
|
109
88
|
}
|
|
110
89
|
}
|
|
111
90
|
|
|
@@ -39,8 +39,15 @@
|
|
|
39
39
|
"fontSize": true
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
"__experimentalBorder": {
|
|
43
|
+
"radius": true,
|
|
44
|
+
"color": true,
|
|
45
|
+
"width": true,
|
|
46
|
+
"style": true
|
|
47
|
+
},
|
|
42
48
|
"interactivity": {
|
|
43
49
|
"clientNavigation": true
|
|
44
50
|
}
|
|
45
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"style": "wp-block-post-comments-count"
|
|
46
53
|
}
|
|
@@ -198,7 +198,7 @@ export default function PostNavigationLinkEdit( {
|
|
|
198
198
|
aria-label={ ariaLabel }
|
|
199
199
|
placeholder={ placeholder }
|
|
200
200
|
value={ label }
|
|
201
|
-
|
|
201
|
+
withoutInteractiveFormatting
|
|
202
202
|
onChange={ ( newLabel ) =>
|
|
203
203
|
setAttributes( { label: newLabel } )
|
|
204
204
|
}
|
package/src/pullquote/style.scss
CHANGED
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
.wp-block-pullquote.has-text-align-right blockquote {
|
|
47
47
|
text-align: right;
|
|
48
48
|
}
|
|
49
|
+
// Ensure that we are reasonably specific to override theme defaults.
|
|
50
|
+
.wp-block-pullquote.has-text-align-center blockquote {
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
49
53
|
|
|
50
54
|
// .is-style-solid-color is deprecated.
|
|
51
55
|
// This selector has not been scoped with `:root :where`, as global styles
|
package/src/query/view.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
store,
|
|
6
|
+
getContext,
|
|
7
|
+
getElement,
|
|
8
|
+
withSyncEvent,
|
|
9
|
+
} from '@wordpress/interactivity';
|
|
5
10
|
|
|
6
11
|
const isValidLink = ( ref ) =>
|
|
7
12
|
ref &&
|
|
@@ -22,7 +27,7 @@ store(
|
|
|
22
27
|
'core/query',
|
|
23
28
|
{
|
|
24
29
|
actions: {
|
|
25
|
-
|
|
30
|
+
navigate: withSyncEvent( function* ( event ) {
|
|
26
31
|
const ctx = getContext();
|
|
27
32
|
const { ref } = getElement();
|
|
28
33
|
const queryRef = ref.closest(
|
|
@@ -42,7 +47,7 @@ store(
|
|
|
42
47
|
const firstAnchor = `.wp-block-post-template a[href]`;
|
|
43
48
|
queryRef.querySelector( firstAnchor )?.focus();
|
|
44
49
|
}
|
|
45
|
-
},
|
|
50
|
+
} ),
|
|
46
51
|
*prefetch() {
|
|
47
52
|
const { ref } = getElement();
|
|
48
53
|
if ( isValidLink( ref ) ) {
|
package/src/search/view.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
store,
|
|
6
|
+
getContext,
|
|
7
|
+
getElement,
|
|
8
|
+
withSyncEvent,
|
|
9
|
+
} from '@wordpress/interactivity';
|
|
5
10
|
|
|
6
11
|
const { actions } = store(
|
|
7
12
|
'core/search',
|
|
@@ -31,7 +36,7 @@ const { actions } = store(
|
|
|
31
36
|
},
|
|
32
37
|
},
|
|
33
38
|
actions: {
|
|
34
|
-
openSearchInput( event ) {
|
|
39
|
+
openSearchInput: withSyncEvent( ( event ) => {
|
|
35
40
|
const ctx = getContext();
|
|
36
41
|
const { ref } = getElement();
|
|
37
42
|
if ( ! ctx.isSearchInputVisible ) {
|
|
@@ -39,7 +44,7 @@ const { actions } = store(
|
|
|
39
44
|
ctx.isSearchInputVisible = true;
|
|
40
45
|
ref.parentElement.querySelector( 'input' ).focus();
|
|
41
46
|
}
|
|
42
|
-
},
|
|
47
|
+
} ),
|
|
43
48
|
closeSearchInput() {
|
|
44
49
|
const ctx = getContext();
|
|
45
50
|
ctx.isSearchInputVisible = false;
|
package/src/site-logo/edit.js
CHANGED
|
@@ -499,11 +499,6 @@ export default function LogoEdit( {
|
|
|
499
499
|
};
|
|
500
500
|
|
|
501
501
|
const onFilesDrop = ( filesList ) => {
|
|
502
|
-
if ( filesList?.length > 1 ) {
|
|
503
|
-
onUploadError( __( 'Only one image can be used as a site logo.' ) );
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
502
|
getSettings().mediaUpload( {
|
|
508
503
|
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
509
504
|
filesList,
|
|
@@ -515,6 +510,7 @@ export default function LogoEdit( {
|
|
|
515
510
|
onInitialSelectLogo( image );
|
|
516
511
|
},
|
|
517
512
|
onError: onUploadError,
|
|
513
|
+
multiple: false,
|
|
518
514
|
} );
|
|
519
515
|
};
|
|
520
516
|
|
package/src/style.scss
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
@import "./post-author/style.scss";
|
|
37
37
|
@import "./post-author-biography/style.scss";
|
|
38
38
|
@import "./post-comments-form/style.scss";
|
|
39
|
+
@import "./post-comments-count/style.scss";
|
|
39
40
|
@import "./post-content/style.scss";
|
|
40
41
|
@import "./post-comments-link/style.scss";
|
|
41
42
|
@import "./post-date/style.scss";
|
|
@@ -70,7 +70,9 @@ function render_block_core_template_part( $attributes ) {
|
|
|
70
70
|
if ( 0 === validate_file( $attributes['slug'] ) ) {
|
|
71
71
|
$block_template = get_block_file_template( $template_part_id, 'wp_template_part' );
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
if ( isset( $block_template->content ) ) {
|
|
74
|
+
$content = $block_template->content;
|
|
75
|
+
}
|
|
74
76
|
if ( isset( $block_template->area ) ) {
|
|
75
77
|
$area = $block_template->area;
|
|
76
78
|
}
|
|
@@ -22,6 +22,7 @@ const VideoSettings = ( { setAttributes, attributes } ) => {
|
|
|
22
22
|
const autoPlayHelpText = __(
|
|
23
23
|
'Autoplay may cause usability issues for some users.'
|
|
24
24
|
);
|
|
25
|
+
|
|
25
26
|
const getAutoplayHelp = Platform.select( {
|
|
26
27
|
web: useCallback( ( checked ) => {
|
|
27
28
|
return checked ? autoPlayHelpText : null;
|
|
@@ -32,7 +33,11 @@ const VideoSettings = ( { setAttributes, attributes } ) => {
|
|
|
32
33
|
const toggleFactory = useMemo( () => {
|
|
33
34
|
const toggleAttribute = ( attribute ) => {
|
|
34
35
|
return ( newValue ) => {
|
|
35
|
-
setAttributes( {
|
|
36
|
+
setAttributes( {
|
|
37
|
+
[ attribute ]: newValue,
|
|
38
|
+
// Set muted when autoplay changes
|
|
39
|
+
...( attribute === 'autoplay' && { muted: newValue } ),
|
|
40
|
+
} );
|
|
36
41
|
};
|
|
37
42
|
};
|
|
38
43
|
|
|
@@ -56,7 +61,7 @@ const VideoSettings = ( { setAttributes, attributes } ) => {
|
|
|
56
61
|
isShownByDefault
|
|
57
62
|
hasValue={ () => !! autoplay }
|
|
58
63
|
onDeselect={ () => {
|
|
59
|
-
setAttributes( { autoplay: false } );
|
|
64
|
+
setAttributes( { autoplay: false, muted: false } );
|
|
60
65
|
} }
|
|
61
66
|
>
|
|
62
67
|
<ToggleControl
|
|
@@ -95,6 +100,10 @@ const VideoSettings = ( { setAttributes, attributes } ) => {
|
|
|
95
100
|
label={ __( 'Muted' ) }
|
|
96
101
|
onChange={ toggleFactory.muted }
|
|
97
102
|
checked={ !! muted }
|
|
103
|
+
disabled={ autoplay }
|
|
104
|
+
help={
|
|
105
|
+
autoplay ? __( 'Muted because of Autoplay.' ) : null
|
|
106
|
+
}
|
|
98
107
|
/>
|
|
99
108
|
</ToolsPanelItem>
|
|
100
109
|
<ToolsPanelItem
|