@wordpress/block-library 8.19.11 → 8.19.13
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/build/image/deprecated.js +8 -0
- package/build/image/deprecated.js.map +1 -1
- package/build/image/view.js +6 -6
- package/build/image/view.js.map +1 -1
- package/build/pattern/edit.js +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build-module/image/deprecated.js +8 -0
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/view.js +6 -6
- package/build-module/image/view.js.map +1 -1
- package/build-module/pattern/edit.js +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-style/image/style-rtl.css +16 -10
- package/build-style/image/style.css +16 -10
- package/build-style/style-rtl.css +16 -10
- package/build-style/style.css +16 -10
- package/package.json +32 -32
- package/src/image/deprecated.js +8 -0
- package/src/image/index.php +3 -4
- package/src/image/style.scss +15 -10
- package/src/image/view.js +6 -6
- package/src/pattern/edit.js +1 -1
- package/src/query/index.php +7 -3
|
@@ -1621,22 +1621,28 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1621
1621
|
.wp-lightbox-container button {
|
|
1622
1622
|
opacity: 0;
|
|
1623
1623
|
border: none;
|
|
1624
|
-
background:
|
|
1624
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1625
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
1626
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1625
1627
|
cursor: zoom-in;
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
+
display: flex;
|
|
1629
|
+
justify-content: center;
|
|
1630
|
+
align-items: center;
|
|
1631
|
+
width: 20px;
|
|
1632
|
+
height: 20px;
|
|
1628
1633
|
position: absolute;
|
|
1629
1634
|
z-index: 100;
|
|
1630
|
-
top:
|
|
1631
|
-
left:
|
|
1635
|
+
top: 16px;
|
|
1636
|
+
left: 16px;
|
|
1632
1637
|
text-align: center;
|
|
1633
1638
|
padding: 0;
|
|
1634
|
-
border-radius:
|
|
1639
|
+
border-radius: 4px;
|
|
1640
|
+
transition: opacity 0.2s ease;
|
|
1635
1641
|
}
|
|
1636
1642
|
.wp-lightbox-container button:focus-visible {
|
|
1637
|
-
outline:
|
|
1638
|
-
outline:
|
|
1639
|
-
outline-offset:
|
|
1643
|
+
outline: 3px auto rgba(90, 90, 90, 0.25);
|
|
1644
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
1645
|
+
outline-offset: 3px;
|
|
1640
1646
|
}
|
|
1641
1647
|
.wp-lightbox-container button:hover {
|
|
1642
1648
|
cursor: pointer;
|
|
@@ -1646,7 +1652,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1646
1652
|
opacity: 1;
|
|
1647
1653
|
}
|
|
1648
1654
|
.wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
|
|
1649
|
-
background:
|
|
1655
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1650
1656
|
border: none;
|
|
1651
1657
|
}
|
|
1652
1658
|
|
package/build-style/style.css
CHANGED
|
@@ -1635,22 +1635,28 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1635
1635
|
.wp-lightbox-container button {
|
|
1636
1636
|
opacity: 0;
|
|
1637
1637
|
border: none;
|
|
1638
|
-
background:
|
|
1638
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1639
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
1640
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1639
1641
|
cursor: zoom-in;
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
+
display: flex;
|
|
1643
|
+
justify-content: center;
|
|
1644
|
+
align-items: center;
|
|
1645
|
+
width: 20px;
|
|
1646
|
+
height: 20px;
|
|
1642
1647
|
position: absolute;
|
|
1643
1648
|
z-index: 100;
|
|
1644
|
-
top:
|
|
1645
|
-
right:
|
|
1649
|
+
top: 16px;
|
|
1650
|
+
right: 16px;
|
|
1646
1651
|
text-align: center;
|
|
1647
1652
|
padding: 0;
|
|
1648
|
-
border-radius:
|
|
1653
|
+
border-radius: 4px;
|
|
1654
|
+
transition: opacity 0.2s ease;
|
|
1649
1655
|
}
|
|
1650
1656
|
.wp-lightbox-container button:focus-visible {
|
|
1651
|
-
outline:
|
|
1652
|
-
outline:
|
|
1653
|
-
outline-offset:
|
|
1657
|
+
outline: 3px auto rgba(90, 90, 90, 0.25);
|
|
1658
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
1659
|
+
outline-offset: 3px;
|
|
1654
1660
|
}
|
|
1655
1661
|
.wp-lightbox-container button:hover {
|
|
1656
1662
|
cursor: pointer;
|
|
@@ -1660,7 +1666,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1660
1666
|
opacity: 1;
|
|
1661
1667
|
}
|
|
1662
1668
|
.wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
|
|
1663
|
-
background:
|
|
1669
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1664
1670
|
border: none;
|
|
1665
1671
|
}
|
|
1666
1672
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.13",
|
|
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.42.
|
|
35
|
-
"@wordpress/api-fetch": "^6.39.
|
|
36
|
-
"@wordpress/autop": "^3.42.
|
|
37
|
-
"@wordpress/blob": "^3.42.
|
|
38
|
-
"@wordpress/block-editor": "^12.10.
|
|
39
|
-
"@wordpress/blocks": "^12.19.
|
|
40
|
-
"@wordpress/components": "^25.8.
|
|
41
|
-
"@wordpress/compose": "^6.19.
|
|
42
|
-
"@wordpress/core-data": "^6.19.
|
|
43
|
-
"@wordpress/data": "^9.12.
|
|
44
|
-
"@wordpress/date": "^4.42.
|
|
45
|
-
"@wordpress/deprecated": "^3.42.
|
|
46
|
-
"@wordpress/dom": "^3.42.
|
|
47
|
-
"@wordpress/element": "^5.19.
|
|
48
|
-
"@wordpress/escape-html": "^2.42.
|
|
49
|
-
"@wordpress/hooks": "^3.42.
|
|
50
|
-
"@wordpress/html-entities": "^3.42.
|
|
51
|
-
"@wordpress/i18n": "^4.42.
|
|
52
|
-
"@wordpress/icons": "^9.33.
|
|
53
|
-
"@wordpress/interactivity": "^2.3.
|
|
54
|
-
"@wordpress/keycodes": "^3.42.
|
|
55
|
-
"@wordpress/notices": "^4.10.
|
|
56
|
-
"@wordpress/primitives": "^3.40.
|
|
57
|
-
"@wordpress/private-apis": "^0.24.
|
|
58
|
-
"@wordpress/reusable-blocks": "^4.19.
|
|
59
|
-
"@wordpress/rich-text": "^6.19.
|
|
60
|
-
"@wordpress/server-side-render": "^4.19.
|
|
61
|
-
"@wordpress/url": "^3.43.
|
|
62
|
-
"@wordpress/viewport": "^5.19.
|
|
63
|
-
"@wordpress/wordcount": "^3.42.
|
|
34
|
+
"@wordpress/a11y": "^3.42.13",
|
|
35
|
+
"@wordpress/api-fetch": "^6.39.13",
|
|
36
|
+
"@wordpress/autop": "^3.42.13",
|
|
37
|
+
"@wordpress/blob": "^3.42.13",
|
|
38
|
+
"@wordpress/block-editor": "^12.10.13",
|
|
39
|
+
"@wordpress/blocks": "^12.19.13",
|
|
40
|
+
"@wordpress/components": "^25.8.13",
|
|
41
|
+
"@wordpress/compose": "^6.19.13",
|
|
42
|
+
"@wordpress/core-data": "^6.19.13",
|
|
43
|
+
"@wordpress/data": "^9.12.13",
|
|
44
|
+
"@wordpress/date": "^4.42.13",
|
|
45
|
+
"@wordpress/deprecated": "^3.42.13",
|
|
46
|
+
"@wordpress/dom": "^3.42.13",
|
|
47
|
+
"@wordpress/element": "^5.19.13",
|
|
48
|
+
"@wordpress/escape-html": "^2.42.13",
|
|
49
|
+
"@wordpress/hooks": "^3.42.13",
|
|
50
|
+
"@wordpress/html-entities": "^3.42.13",
|
|
51
|
+
"@wordpress/i18n": "^4.42.13",
|
|
52
|
+
"@wordpress/icons": "^9.33.13",
|
|
53
|
+
"@wordpress/interactivity": "^2.3.13",
|
|
54
|
+
"@wordpress/keycodes": "^3.42.13",
|
|
55
|
+
"@wordpress/notices": "^4.10.13",
|
|
56
|
+
"@wordpress/primitives": "^3.40.13",
|
|
57
|
+
"@wordpress/private-apis": "^0.24.13",
|
|
58
|
+
"@wordpress/reusable-blocks": "^4.19.13",
|
|
59
|
+
"@wordpress/rich-text": "^6.19.13",
|
|
60
|
+
"@wordpress/server-side-render": "^4.19.13",
|
|
61
|
+
"@wordpress/url": "^3.43.13",
|
|
62
|
+
"@wordpress/viewport": "^5.19.13",
|
|
63
|
+
"@wordpress/wordcount": "^3.42.13",
|
|
64
64
|
"change-case": "^4.1.2",
|
|
65
65
|
"classnames": "^2.3.1",
|
|
66
66
|
"colord": "^2.7.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "70b30e9461372ae518e3d0e50f7e5085eda8b46e"
|
|
82
82
|
}
|
package/src/image/deprecated.js
CHANGED
|
@@ -1047,6 +1047,14 @@ const v8 = {
|
|
|
1047
1047
|
},
|
|
1048
1048
|
},
|
|
1049
1049
|
migrate( { width, height, ...attributes } ) {
|
|
1050
|
+
// We need to perform a check here because in cases
|
|
1051
|
+
// where attributes are added dynamically to blocks,
|
|
1052
|
+
// block invalidation overrides the isEligible() method
|
|
1053
|
+
// and forces the migration to run, so it's not guaranteed
|
|
1054
|
+
// that `behaviors` or `behaviors.lightbox` will be defined.
|
|
1055
|
+
if ( ! attributes.behaviors?.lightbox ) {
|
|
1056
|
+
return attributes;
|
|
1057
|
+
}
|
|
1050
1058
|
const {
|
|
1051
1059
|
behaviors: {
|
|
1052
1060
|
lightbox: { enabled },
|
package/src/image/index.php
CHANGED
|
@@ -242,10 +242,9 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
|
|
242
242
|
data-wp-on--click="actions.core.image.showLightbox"
|
|
243
243
|
data-wp-style--right="context.core.image.imageButtonRight"
|
|
244
244
|
data-wp-style--top="context.core.image.imageButtonTop"
|
|
245
|
-
style="background: #000"
|
|
246
245
|
>
|
|
247
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
248
|
-
<
|
|
246
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
|
|
247
|
+
<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
|
|
249
248
|
</svg>
|
|
250
249
|
</button>';
|
|
251
250
|
|
|
@@ -303,7 +302,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
|
|
303
302
|
}
|
|
304
303
|
}
|
|
305
304
|
|
|
306
|
-
$close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="
|
|
305
|
+
$close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>';
|
|
307
306
|
$close_button_label = esc_attr__( 'Close' );
|
|
308
307
|
|
|
309
308
|
$lightbox_html = <<<HTML
|
package/src/image/style.scss
CHANGED
|
@@ -168,22 +168,27 @@
|
|
|
168
168
|
button {
|
|
169
169
|
opacity: 0;
|
|
170
170
|
border: none;
|
|
171
|
-
background:
|
|
171
|
+
background-color: rgb(90 90 90 / 25%);
|
|
172
|
+
backdrop-filter: blur($grid-unit-20) saturate(180%);
|
|
172
173
|
cursor: zoom-in;
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
align-items: center;
|
|
177
|
+
width: 20px;
|
|
178
|
+
height: 20px;
|
|
175
179
|
position: absolute;
|
|
176
180
|
z-index: 100;
|
|
177
|
-
top:
|
|
178
|
-
right:
|
|
181
|
+
top: 16px;
|
|
182
|
+
right: 16px;
|
|
179
183
|
text-align: center;
|
|
180
184
|
padding: 0;
|
|
181
|
-
border-radius:
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
transition: opacity 0.2s ease;
|
|
182
187
|
|
|
183
188
|
&:focus-visible {
|
|
184
|
-
outline:
|
|
185
|
-
outline:
|
|
186
|
-
outline-offset:
|
|
189
|
+
outline: 3px auto rgb(90 90 90 / 25%);
|
|
190
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
191
|
+
outline-offset: 3px;
|
|
187
192
|
}
|
|
188
193
|
|
|
189
194
|
&:hover {
|
|
@@ -198,7 +203,7 @@
|
|
|
198
203
|
&:hover,
|
|
199
204
|
&:focus,
|
|
200
205
|
&:not(:hover):not(:active):not(.has-background) {
|
|
201
|
-
background:
|
|
206
|
+
background-color: rgb(90 90 90 / 25%);
|
|
202
207
|
border: none;
|
|
203
208
|
}
|
|
204
209
|
}
|
package/src/image/view.js
CHANGED
|
@@ -340,26 +340,26 @@ store(
|
|
|
340
340
|
context.core.image.imageButtonTop =
|
|
341
341
|
( offsetHeight - referenceHeight ) / 2 +
|
|
342
342
|
buttonOffsetTop +
|
|
343
|
-
|
|
343
|
+
16;
|
|
344
344
|
context.core.image.imageButtonRight =
|
|
345
|
-
buttonOffsetRight +
|
|
345
|
+
buttonOffsetRight + 16;
|
|
346
346
|
} else {
|
|
347
347
|
// If it reaches the height first, keep
|
|
348
348
|
// the height and compute the width.
|
|
349
349
|
const referenceWidth =
|
|
350
350
|
offsetHeight * naturalRatio;
|
|
351
351
|
context.core.image.imageButtonTop =
|
|
352
|
-
buttonOffsetTop +
|
|
352
|
+
buttonOffsetTop + 16;
|
|
353
353
|
context.core.image.imageButtonRight =
|
|
354
354
|
( offsetWidth - referenceWidth ) / 2 +
|
|
355
355
|
buttonOffsetRight +
|
|
356
|
-
|
|
356
|
+
16;
|
|
357
357
|
}
|
|
358
358
|
} else {
|
|
359
359
|
context.core.image.imageButtonTop =
|
|
360
|
-
buttonOffsetTop +
|
|
360
|
+
buttonOffsetTop + 16;
|
|
361
361
|
context.core.image.imageButtonRight =
|
|
362
|
-
buttonOffsetRight +
|
|
362
|
+
buttonOffsetRight + 16;
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
setStylesOnResize: ( { state, context, ref } ) => {
|
package/src/pattern/edit.js
CHANGED
|
@@ -20,7 +20,7 @@ const PatternEdit = ( { attributes, clientId } ) => {
|
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const currentThemeStylesheet = useSelect(
|
|
23
|
-
( select ) => select( coreStore ).getCurrentTheme()
|
|
23
|
+
( select ) => select( coreStore ).getCurrentTheme()?.stylesheet
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const { replaceBlocks, __unstableMarkNextChangeAsNotPersistent } =
|
package/src/query/index.php
CHANGED
|
@@ -44,11 +44,15 @@ function render_block_core_query( $attributes, $content, $block ) {
|
|
|
44
44
|
$block->block_type->supports['interactivity'] = true;
|
|
45
45
|
|
|
46
46
|
// Add a div to announce messages using `aria-live`.
|
|
47
|
-
$
|
|
47
|
+
$html_tag = 'div';
|
|
48
|
+
if ( ! empty( $attributes['tagName'] ) ) {
|
|
49
|
+
$html_tag = esc_attr( $attributes['tagName'] );
|
|
50
|
+
}
|
|
51
|
+
$last_tag_position = strripos( $content, '</' . $html_tag . '>' );
|
|
48
52
|
$content = substr_replace(
|
|
49
53
|
$content,
|
|
50
54
|
'<div
|
|
51
|
-
class="
|
|
55
|
+
class="screen-reader-text"
|
|
52
56
|
aria-live="polite"
|
|
53
57
|
data-wp-text="context.core.query.message"
|
|
54
58
|
></div>
|
|
@@ -57,7 +61,7 @@ function render_block_core_query( $attributes, $content, $block ) {
|
|
|
57
61
|
data-wp-class--start-animation="selectors.core.query.startAnimation"
|
|
58
62
|
data-wp-class--finish-animation="selectors.core.query.finishAnimation"
|
|
59
63
|
></div>',
|
|
60
|
-
$
|
|
64
|
+
$last_tag_position,
|
|
61
65
|
0
|
|
62
66
|
);
|
|
63
67
|
}
|