@wordpress/block-library 8.21.1-next.f8d8eceb.0 → 8.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.
- package/CHANGELOG.md +4 -0
- package/build/block/edit.js +6 -5
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +57 -2
- package/build/button/edit.js.map +1 -1
- package/build/code/transforms.js +20 -7
- package/build/code/transforms.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -0
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +1 -0
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/edit.js +1 -2
- package/build/details/edit.js.map +1 -1
- package/build/form/edit.js +1 -1
- package/build/form/edit.js.map +1 -1
- package/build/form/index.js +25 -5
- package/build/form/index.js.map +1 -1
- package/build/form-input/index.js +1 -1
- package/build/form-input/index.js.map +1 -1
- package/build/form-submission-notification/index.js +1 -1
- package/build/form-submission-notification/index.js.map +1 -1
- package/build/form-submit-button/edit.js +2 -1
- package/build/form-submit-button/edit.js.map +1 -1
- package/build/form-submit-button/index.js +1 -1
- package/build/form-submit-button/index.js.map +1 -1
- package/build/gallery/gap-styles.js +12 -7
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/group/edit.js +1 -0
- package/build/group/edit.js.map +1 -1
- package/build/html/transforms.js +7 -2
- package/build/html/transforms.js.map +1 -1
- package/build/image/deprecated.js +8 -0
- package/build/image/deprecated.js.map +1 -1
- package/build/image/view.js +10 -7
- package/build/image/view.js.map +1 -1
- package/build/missing/index.js +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +1 -1
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +2 -1
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/pattern/edit.js +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +0 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +21 -6
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-template/edit.js +2 -8
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -1
- package/build/post-terms/edit.js +2 -4
- package/build/post-terms/edit.js.map +1 -1
- package/build/preformatted/transforms.js +1 -4
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/query-content.js +1 -0
- package/build/query/edit/query-content.js.map +1 -1
- package/build/quote/index.js +6 -0
- package/build/quote/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +1 -0
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +3 -7
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/index.js +6 -2
- package/build/template-part/index.js.map +1 -1
- package/build/template-part/variations.js +5 -1
- package/build/template-part/variations.js.map +1 -1
- package/build-module/block/edit.js +6 -5
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +61 -6
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/transforms.js +20 -7
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -0
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -0
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/edit.js +1 -2
- package/build-module/details/edit.js.map +1 -1
- package/build-module/form/edit.js +1 -1
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form/index.js +29 -5
- package/build-module/form/index.js.map +1 -1
- package/build-module/form-input/index.js +1 -1
- package/build-module/form-input/index.js.map +1 -1
- package/build-module/form-submission-notification/index.js +1 -1
- package/build-module/form-submission-notification/index.js.map +1 -1
- package/build-module/form-submit-button/edit.js +2 -1
- package/build-module/form-submit-button/edit.js.map +1 -1
- package/build-module/form-submit-button/index.js +1 -1
- package/build-module/form-submit-button/index.js.map +1 -1
- package/build-module/gallery/gap-styles.js +13 -8
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/group/edit.js +1 -0
- package/build-module/group/edit.js.map +1 -1
- package/build-module/html/transforms.js +7 -2
- package/build-module/html/transforms.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 +10 -7
- package/build-module/image/view.js.map +1 -1
- package/build-module/missing/index.js +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +2 -1
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/navigation-link/edit.js +2 -2
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/pattern/edit.js +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +0 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +21 -6
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-template/edit.js +2 -8
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -1
- package/build-module/post-terms/edit.js +2 -4
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +1 -4
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -0
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/quote/index.js +6 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +1 -0
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +5 -9
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/index.js +6 -2
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/template-part/variations.js +5 -1
- package/build-module/template-part/variations.js.map +1 -1
- package/build-style/editor-rtl.css +12 -0
- package/build-style/editor.css +12 -0
- package/build-style/image/editor-rtl.css +3 -0
- package/build-style/image/editor.css +3 -0
- package/build-style/image/style-rtl.css +19 -13
- package/build-style/image/style.css +19 -13
- package/build-style/post-featured-image/editor-rtl.css +9 -0
- package/build-style/post-featured-image/editor.css +9 -0
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/read-more/style-rtl.css +2 -2
- package/build-style/read-more/style.css +2 -2
- package/build-style/style-rtl.css +24 -15
- package/build-style/style.css +24 -15
- package/package.json +32 -32
- package/src/block/edit.js +3 -2
- package/src/button/edit.js +70 -4
- package/src/code/transforms.js +14 -8
- package/src/comments/edit/comments-inspector-controls.js +1 -0
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/details/edit.js +0 -1
- package/src/form/edit.js +2 -0
- package/src/form/index.js +38 -1
- package/src/form-input/block.json +1 -1
- package/src/form-submission-notification/block.json +1 -1
- package/src/form-submit-button/block.json +1 -1
- package/src/form-submit-button/edit.js +1 -0
- package/src/gallery/gap-styles.js +10 -9
- package/src/group/edit.js +1 -0
- package/src/html/transforms.js +5 -2
- package/src/image/deprecated.js +8 -0
- package/src/image/editor.scss +7 -0
- package/src/image/index.php +3 -4
- package/src/image/style.scss +18 -13
- package/src/image/view.js +24 -11
- package/src/missing/block.json +1 -1
- package/src/navigation/edit/overlay-menu-preview.js +1 -1
- package/src/navigation/index.php +37 -402
- package/src/navigation/use-template-part-area-label.js +4 -2
- package/src/navigation-link/edit.js +2 -2
- package/src/navigation-link/index.php +57 -0
- package/src/paragraph/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/paragraph/test/transforms.native.js +1 -0
- package/src/pattern/edit.js +2 -1
- package/src/pattern/index.php +6 -1
- package/src/post-author/edit.js +0 -1
- package/src/post-featured-image/edit.js +38 -5
- package/src/post-featured-image/editor.scss +19 -0
- package/src/post-template/block.json +0 -1
- package/src/post-template/edit.js +1 -5
- package/src/post-terms/edit.js +2 -4
- package/src/preformatted/transforms.js +1 -4
- package/src/query/edit/query-content.js +1 -0
- package/src/query/index.php +6 -2
- package/src/quote/block.json +6 -0
- package/src/quote/style.scss +4 -0
- package/src/read-more/style.scss +1 -1
- package/src/template-part/edit/advanced-controls.js +1 -0
- package/src/template-part/edit/index.js +7 -14
- package/src/template-part/index.js +4 -3
- package/src/template-part/index.php +4 -4
- package/src/template-part/variations.js +4 -2
|
@@ -219,22 +219,28 @@
|
|
|
219
219
|
.wp-lightbox-container button {
|
|
220
220
|
opacity: 0;
|
|
221
221
|
border: none;
|
|
222
|
-
background:
|
|
222
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
223
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
224
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
223
225
|
cursor: zoom-in;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
display: flex;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
align-items: center;
|
|
229
|
+
width: 20px;
|
|
230
|
+
height: 20px;
|
|
226
231
|
position: absolute;
|
|
227
232
|
z-index: 100;
|
|
228
|
-
top:
|
|
229
|
-
right:
|
|
233
|
+
top: 16px;
|
|
234
|
+
right: 16px;
|
|
230
235
|
text-align: center;
|
|
231
236
|
padding: 0;
|
|
232
|
-
border-radius:
|
|
237
|
+
border-radius: 4px;
|
|
238
|
+
transition: opacity 0.2s ease;
|
|
233
239
|
}
|
|
234
240
|
.wp-lightbox-container button:focus-visible {
|
|
235
|
-
outline:
|
|
236
|
-
outline:
|
|
237
|
-
outline-offset:
|
|
241
|
+
outline: 3px auto rgba(90, 90, 90, 0.25);
|
|
242
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
243
|
+
outline-offset: 3px;
|
|
238
244
|
}
|
|
239
245
|
.wp-lightbox-container button:hover {
|
|
240
246
|
cursor: pointer;
|
|
@@ -244,7 +250,7 @@
|
|
|
244
250
|
opacity: 1;
|
|
245
251
|
}
|
|
246
252
|
.wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
|
|
247
|
-
background:
|
|
253
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
248
254
|
border: none;
|
|
249
255
|
}
|
|
250
256
|
|
|
@@ -254,7 +260,7 @@
|
|
|
254
260
|
left: 0;
|
|
255
261
|
z-index: 100000;
|
|
256
262
|
overflow: hidden;
|
|
257
|
-
width:
|
|
263
|
+
width: 100%;
|
|
258
264
|
height: 100vh;
|
|
259
265
|
box-sizing: border-box;
|
|
260
266
|
visibility: hidden;
|
|
@@ -387,7 +393,7 @@
|
|
|
387
393
|
}
|
|
388
394
|
@keyframes lightbox-zoom-in {
|
|
389
395
|
0% {
|
|
390
|
-
transform: translate(calc(-
|
|
396
|
+
transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
391
397
|
}
|
|
392
398
|
100% {
|
|
393
399
|
transform: translate(-50%, -50%) scale(1, 1);
|
|
@@ -403,6 +409,6 @@
|
|
|
403
409
|
}
|
|
404
410
|
100% {
|
|
405
411
|
visibility: hidden;
|
|
406
|
-
transform: translate(calc(-
|
|
412
|
+
transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
407
413
|
}
|
|
408
414
|
}
|
|
@@ -178,6 +178,15 @@
|
|
|
178
178
|
height: 100%;
|
|
179
179
|
width: 100%;
|
|
180
180
|
}
|
|
181
|
+
.wp-block-post-featured-image > a {
|
|
182
|
+
cursor: default;
|
|
183
|
+
}
|
|
184
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-button,
|
|
185
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-placeholder__instructions,
|
|
186
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-placeholder__label {
|
|
187
|
+
opacity: 1;
|
|
188
|
+
pointer-events: auto;
|
|
189
|
+
}
|
|
181
190
|
|
|
182
191
|
div[data-type="core/post-featured-image"] img {
|
|
183
192
|
max-width: 100%;
|
|
@@ -178,6 +178,15 @@
|
|
|
178
178
|
height: 100%;
|
|
179
179
|
width: 100%;
|
|
180
180
|
}
|
|
181
|
+
.wp-block-post-featured-image > a {
|
|
182
|
+
cursor: default;
|
|
183
|
+
}
|
|
184
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-button,
|
|
185
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-placeholder__instructions,
|
|
186
|
+
.wp-block-post-featured-image.is-selected .components-placeholder.has-illustration .components-placeholder__label {
|
|
187
|
+
opacity: 1;
|
|
188
|
+
pointer-events: auto;
|
|
189
|
+
}
|
|
181
190
|
|
|
182
191
|
div[data-type="core/post-featured-image"] img {
|
|
183
192
|
max-width: 100%;
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
width: -moz-fit-content;
|
|
92
92
|
width: fit-content;
|
|
93
93
|
}
|
|
94
|
-
.wp-block-read-more:not([style*=text-decoration]) {
|
|
94
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])) {
|
|
95
95
|
text-decoration: none;
|
|
96
96
|
}
|
|
97
|
-
.wp-block-read-more:not([style*=text-decoration]):focus, .wp-block-read-more:not([style*=text-decoration]):active {
|
|
97
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])):focus, .wp-block-read-more:where(:not([style*="text-decoration"])):active {
|
|
98
98
|
text-decoration: none;
|
|
99
99
|
}
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
width: -moz-fit-content;
|
|
92
92
|
width: fit-content;
|
|
93
93
|
}
|
|
94
|
-
.wp-block-read-more:not([style*=text-decoration]) {
|
|
94
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])) {
|
|
95
95
|
text-decoration: none;
|
|
96
96
|
}
|
|
97
|
-
.wp-block-read-more:not([style*=text-decoration]):focus, .wp-block-read-more:not([style*=text-decoration]):active {
|
|
97
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])):focus, .wp-block-read-more:where(:not([style*="text-decoration"])):active {
|
|
98
98
|
text-decoration: none;
|
|
99
99
|
}
|
|
@@ -1672,22 +1672,28 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1672
1672
|
.wp-lightbox-container button {
|
|
1673
1673
|
opacity: 0;
|
|
1674
1674
|
border: none;
|
|
1675
|
-
background:
|
|
1675
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1676
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
1677
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1676
1678
|
cursor: zoom-in;
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
+
display: flex;
|
|
1680
|
+
justify-content: center;
|
|
1681
|
+
align-items: center;
|
|
1682
|
+
width: 20px;
|
|
1683
|
+
height: 20px;
|
|
1679
1684
|
position: absolute;
|
|
1680
1685
|
z-index: 100;
|
|
1681
|
-
top:
|
|
1682
|
-
left:
|
|
1686
|
+
top: 16px;
|
|
1687
|
+
left: 16px;
|
|
1683
1688
|
text-align: center;
|
|
1684
1689
|
padding: 0;
|
|
1685
|
-
border-radius:
|
|
1690
|
+
border-radius: 4px;
|
|
1691
|
+
transition: opacity 0.2s ease;
|
|
1686
1692
|
}
|
|
1687
1693
|
.wp-lightbox-container button:focus-visible {
|
|
1688
|
-
outline:
|
|
1689
|
-
outline:
|
|
1690
|
-
outline-offset:
|
|
1694
|
+
outline: 3px auto rgba(90, 90, 90, 0.25);
|
|
1695
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
1696
|
+
outline-offset: 3px;
|
|
1691
1697
|
}
|
|
1692
1698
|
.wp-lightbox-container button:hover {
|
|
1693
1699
|
cursor: pointer;
|
|
@@ -1697,7 +1703,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1697
1703
|
opacity: 1;
|
|
1698
1704
|
}
|
|
1699
1705
|
.wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
|
|
1700
|
-
background:
|
|
1706
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1701
1707
|
border: none;
|
|
1702
1708
|
}
|
|
1703
1709
|
|
|
@@ -1707,7 +1713,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1707
1713
|
right: 0;
|
|
1708
1714
|
z-index: 100000;
|
|
1709
1715
|
overflow: hidden;
|
|
1710
|
-
width:
|
|
1716
|
+
width: 100%;
|
|
1711
1717
|
height: 100vh;
|
|
1712
1718
|
box-sizing: border-box;
|
|
1713
1719
|
visibility: hidden;
|
|
@@ -1840,7 +1846,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1840
1846
|
}
|
|
1841
1847
|
@keyframes lightbox-zoom-in {
|
|
1842
1848
|
0% {
|
|
1843
|
-
transform: translate(calc(-1*(-
|
|
1849
|
+
transform: translate(calc(-1*((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position))), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
1844
1850
|
}
|
|
1845
1851
|
100% {
|
|
1846
1852
|
transform: translate(50%, -50%) scale(1, 1);
|
|
@@ -1856,7 +1862,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1856
1862
|
}
|
|
1857
1863
|
100% {
|
|
1858
1864
|
visibility: hidden;
|
|
1859
|
-
transform: translate(calc(-1*(-
|
|
1865
|
+
transform: translate(calc(-1*((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position))), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
1860
1866
|
}
|
|
1861
1867
|
}
|
|
1862
1868
|
ol.wp-block-latest-comments {
|
|
@@ -3118,16 +3124,19 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3118
3124
|
font-size: 1.125em;
|
|
3119
3125
|
text-align: left;
|
|
3120
3126
|
}
|
|
3127
|
+
.wp-block-quote > cite {
|
|
3128
|
+
display: block;
|
|
3129
|
+
}
|
|
3121
3130
|
|
|
3122
3131
|
.wp-block-read-more {
|
|
3123
3132
|
display: block;
|
|
3124
3133
|
width: -moz-fit-content;
|
|
3125
3134
|
width: fit-content;
|
|
3126
3135
|
}
|
|
3127
|
-
.wp-block-read-more:not([style*=text-decoration]) {
|
|
3136
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])) {
|
|
3128
3137
|
text-decoration: none;
|
|
3129
3138
|
}
|
|
3130
|
-
.wp-block-read-more:not([style*=text-decoration]):focus, .wp-block-read-more:not([style*=text-decoration]):active {
|
|
3139
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])):focus, .wp-block-read-more:where(:not([style*="text-decoration"])):active {
|
|
3131
3140
|
text-decoration: none;
|
|
3132
3141
|
}
|
|
3133
3142
|
|
package/build-style/style.css
CHANGED
|
@@ -1686,22 +1686,28 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1686
1686
|
.wp-lightbox-container button {
|
|
1687
1687
|
opacity: 0;
|
|
1688
1688
|
border: none;
|
|
1689
|
-
background:
|
|
1689
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1690
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
1691
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1690
1692
|
cursor: zoom-in;
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
+
display: flex;
|
|
1694
|
+
justify-content: center;
|
|
1695
|
+
align-items: center;
|
|
1696
|
+
width: 20px;
|
|
1697
|
+
height: 20px;
|
|
1693
1698
|
position: absolute;
|
|
1694
1699
|
z-index: 100;
|
|
1695
|
-
top:
|
|
1696
|
-
right:
|
|
1700
|
+
top: 16px;
|
|
1701
|
+
right: 16px;
|
|
1697
1702
|
text-align: center;
|
|
1698
1703
|
padding: 0;
|
|
1699
|
-
border-radius:
|
|
1704
|
+
border-radius: 4px;
|
|
1705
|
+
transition: opacity 0.2s ease;
|
|
1700
1706
|
}
|
|
1701
1707
|
.wp-lightbox-container button:focus-visible {
|
|
1702
|
-
outline:
|
|
1703
|
-
outline:
|
|
1704
|
-
outline-offset:
|
|
1708
|
+
outline: 3px auto rgba(90, 90, 90, 0.25);
|
|
1709
|
+
outline: 3px auto -webkit-focus-ring-color;
|
|
1710
|
+
outline-offset: 3px;
|
|
1705
1711
|
}
|
|
1706
1712
|
.wp-lightbox-container button:hover {
|
|
1707
1713
|
cursor: pointer;
|
|
@@ -1711,7 +1717,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1711
1717
|
opacity: 1;
|
|
1712
1718
|
}
|
|
1713
1719
|
.wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
|
|
1714
|
-
background:
|
|
1720
|
+
background-color: rgba(90, 90, 90, 0.25);
|
|
1715
1721
|
border: none;
|
|
1716
1722
|
}
|
|
1717
1723
|
|
|
@@ -1721,7 +1727,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1721
1727
|
left: 0;
|
|
1722
1728
|
z-index: 100000;
|
|
1723
1729
|
overflow: hidden;
|
|
1724
|
-
width:
|
|
1730
|
+
width: 100%;
|
|
1725
1731
|
height: 100vh;
|
|
1726
1732
|
box-sizing: border-box;
|
|
1727
1733
|
visibility: hidden;
|
|
@@ -1854,7 +1860,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1854
1860
|
}
|
|
1855
1861
|
@keyframes lightbox-zoom-in {
|
|
1856
1862
|
0% {
|
|
1857
|
-
transform: translate(calc(-
|
|
1863
|
+
transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
1858
1864
|
}
|
|
1859
1865
|
100% {
|
|
1860
1866
|
transform: translate(-50%, -50%) scale(1, 1);
|
|
@@ -1870,7 +1876,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
|
|
|
1870
1876
|
}
|
|
1871
1877
|
100% {
|
|
1872
1878
|
visibility: hidden;
|
|
1873
|
-
transform: translate(calc(-
|
|
1879
|
+
transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
|
1874
1880
|
}
|
|
1875
1881
|
}
|
|
1876
1882
|
ol.wp-block-latest-comments {
|
|
@@ -3150,16 +3156,19 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3150
3156
|
font-size: 1.125em;
|
|
3151
3157
|
text-align: right;
|
|
3152
3158
|
}
|
|
3159
|
+
.wp-block-quote > cite {
|
|
3160
|
+
display: block;
|
|
3161
|
+
}
|
|
3153
3162
|
|
|
3154
3163
|
.wp-block-read-more {
|
|
3155
3164
|
display: block;
|
|
3156
3165
|
width: -moz-fit-content;
|
|
3157
3166
|
width: fit-content;
|
|
3158
3167
|
}
|
|
3159
|
-
.wp-block-read-more:not([style*=text-decoration]) {
|
|
3168
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])) {
|
|
3160
3169
|
text-decoration: none;
|
|
3161
3170
|
}
|
|
3162
|
-
.wp-block-read-more:not([style*=text-decoration]):focus, .wp-block-read-more:not([style*=text-decoration]):active {
|
|
3171
|
+
.wp-block-read-more:where(:not([style*="text-decoration"])):focus, .wp-block-read-more:where(:not([style*="text-decoration"])):active {
|
|
3163
3172
|
text-decoration: none;
|
|
3164
3173
|
}
|
|
3165
3174
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.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",
|
|
@@ -31,36 +31,36 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/a11y": "^3.
|
|
35
|
-
"@wordpress/api-fetch": "^6.
|
|
36
|
-
"@wordpress/autop": "^3.
|
|
37
|
-
"@wordpress/blob": "^3.
|
|
38
|
-
"@wordpress/block-editor": "^12.
|
|
39
|
-
"@wordpress/blocks": "^12.
|
|
40
|
-
"@wordpress/components": "^25.
|
|
41
|
-
"@wordpress/compose": "^6.
|
|
42
|
-
"@wordpress/core-data": "^6.
|
|
43
|
-
"@wordpress/data": "^9.
|
|
44
|
-
"@wordpress/date": "^4.
|
|
45
|
-
"@wordpress/deprecated": "^3.
|
|
46
|
-
"@wordpress/dom": "^3.
|
|
47
|
-
"@wordpress/element": "^5.
|
|
48
|
-
"@wordpress/escape-html": "^2.
|
|
49
|
-
"@wordpress/hooks": "^3.
|
|
50
|
-
"@wordpress/html-entities": "^3.
|
|
51
|
-
"@wordpress/i18n": "^4.
|
|
52
|
-
"@wordpress/icons": "^9.
|
|
53
|
-
"@wordpress/interactivity": "^2.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/notices": "^4.
|
|
56
|
-
"@wordpress/primitives": "^3.
|
|
57
|
-
"@wordpress/private-apis": "^0.
|
|
58
|
-
"@wordpress/reusable-blocks": "^4.
|
|
59
|
-
"@wordpress/rich-text": "^6.
|
|
60
|
-
"@wordpress/server-side-render": "^4.
|
|
61
|
-
"@wordpress/url": "^3.
|
|
62
|
-
"@wordpress/viewport": "^5.
|
|
63
|
-
"@wordpress/wordcount": "^3.
|
|
34
|
+
"@wordpress/a11y": "^3.46.0",
|
|
35
|
+
"@wordpress/api-fetch": "^6.43.0",
|
|
36
|
+
"@wordpress/autop": "^3.46.0",
|
|
37
|
+
"@wordpress/blob": "^3.46.0",
|
|
38
|
+
"@wordpress/block-editor": "^12.14.0",
|
|
39
|
+
"@wordpress/blocks": "^12.23.0",
|
|
40
|
+
"@wordpress/components": "^25.12.0",
|
|
41
|
+
"@wordpress/compose": "^6.23.0",
|
|
42
|
+
"@wordpress/core-data": "^6.23.0",
|
|
43
|
+
"@wordpress/data": "^9.16.0",
|
|
44
|
+
"@wordpress/date": "^4.46.0",
|
|
45
|
+
"@wordpress/deprecated": "^3.46.0",
|
|
46
|
+
"@wordpress/dom": "^3.46.0",
|
|
47
|
+
"@wordpress/element": "^5.23.0",
|
|
48
|
+
"@wordpress/escape-html": "^2.46.0",
|
|
49
|
+
"@wordpress/hooks": "^3.46.0",
|
|
50
|
+
"@wordpress/html-entities": "^3.46.0",
|
|
51
|
+
"@wordpress/i18n": "^4.46.0",
|
|
52
|
+
"@wordpress/icons": "^9.37.0",
|
|
53
|
+
"@wordpress/interactivity": "^2.7.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.46.0",
|
|
55
|
+
"@wordpress/notices": "^4.14.0",
|
|
56
|
+
"@wordpress/primitives": "^3.44.0",
|
|
57
|
+
"@wordpress/private-apis": "^0.28.0",
|
|
58
|
+
"@wordpress/reusable-blocks": "^4.23.0",
|
|
59
|
+
"@wordpress/rich-text": "^6.23.0",
|
|
60
|
+
"@wordpress/server-side-render": "^4.23.0",
|
|
61
|
+
"@wordpress/url": "^3.47.0",
|
|
62
|
+
"@wordpress/viewport": "^5.23.0",
|
|
63
|
+
"@wordpress/wordcount": "^3.46.0",
|
|
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": "839018ff6029ba749780e288e08ff9cd898e50e8"
|
|
82
82
|
}
|
package/src/block/edit.js
CHANGED
|
@@ -35,6 +35,7 @@ import { useRef, useMemo } from '@wordpress/element';
|
|
|
35
35
|
*/
|
|
36
36
|
import { unlock } from '../lock-unlock';
|
|
37
37
|
|
|
38
|
+
const { useLayoutClasses } = unlock( blockEditorPrivateApis );
|
|
38
39
|
const fullAlignments = [ 'full', 'wide', 'left', 'right' ];
|
|
39
40
|
|
|
40
41
|
const useInferredLayout = ( blocks, parentLayout ) => {
|
|
@@ -71,7 +72,6 @@ export default function ReusableBlockEdit( {
|
|
|
71
72
|
attributes: { ref },
|
|
72
73
|
__unstableParentLayout: parentLayout,
|
|
73
74
|
} ) {
|
|
74
|
-
const { useLayoutClasses } = unlock( blockEditorPrivateApis );
|
|
75
75
|
const hasAlreadyRendered = useHasRecursion( ref );
|
|
76
76
|
const { record, hasResolved } = useEntityRecord(
|
|
77
77
|
'postType',
|
|
@@ -149,10 +149,11 @@ export default function ReusableBlockEdit( {
|
|
|
149
149
|
<InspectorControls>
|
|
150
150
|
<PanelBody>
|
|
151
151
|
<TextControl
|
|
152
|
-
__nextHasNoMarginBottom
|
|
153
152
|
label={ __( 'Name' ) }
|
|
154
153
|
value={ title }
|
|
155
154
|
onChange={ setTitle }
|
|
155
|
+
__nextHasNoMarginBottom
|
|
156
|
+
__next40pxDefaultSize
|
|
156
157
|
/>
|
|
157
158
|
</PanelBody>
|
|
158
159
|
</InspectorControls>
|
package/src/button/edit.js
CHANGED
|
@@ -33,11 +33,17 @@ import {
|
|
|
33
33
|
__experimentalGetSpacingClassesAndStyles as useSpacingProps,
|
|
34
34
|
__experimentalLinkControl as LinkControl,
|
|
35
35
|
__experimentalGetElementClassName,
|
|
36
|
+
store as blockEditorStore,
|
|
36
37
|
} from '@wordpress/block-editor';
|
|
37
|
-
import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
|
|
38
|
+
import { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';
|
|
38
39
|
import { link, linkOff } from '@wordpress/icons';
|
|
39
|
-
import {
|
|
40
|
-
|
|
40
|
+
import {
|
|
41
|
+
createBlock,
|
|
42
|
+
cloneBlock,
|
|
43
|
+
getDefaultBlockName,
|
|
44
|
+
} from '@wordpress/blocks';
|
|
45
|
+
import { useMergeRefs, useRefEffect } from '@wordpress/compose';
|
|
46
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
41
47
|
|
|
42
48
|
const LINK_SETTINGS = [
|
|
43
49
|
...LinkControl.DEFAULT_LINK_SETTINGS,
|
|
@@ -47,6 +53,62 @@ const LINK_SETTINGS = [
|
|
|
47
53
|
},
|
|
48
54
|
];
|
|
49
55
|
|
|
56
|
+
function useEnter( props ) {
|
|
57
|
+
const { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );
|
|
58
|
+
const { getBlock, getBlockRootClientId, getBlockIndex } =
|
|
59
|
+
useSelect( blockEditorStore );
|
|
60
|
+
const propsRef = useRef( props );
|
|
61
|
+
propsRef.current = props;
|
|
62
|
+
return useRefEffect( ( element ) => {
|
|
63
|
+
function onKeyDown( event ) {
|
|
64
|
+
if ( event.defaultPrevented || event.keyCode !== ENTER ) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const { content, clientId } = propsRef.current;
|
|
68
|
+
if ( content.length ) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
const topParentListBlock = getBlock(
|
|
73
|
+
getBlockRootClientId( clientId )
|
|
74
|
+
);
|
|
75
|
+
const blockIndex = getBlockIndex( clientId );
|
|
76
|
+
const head = cloneBlock( {
|
|
77
|
+
...topParentListBlock,
|
|
78
|
+
innerBlocks: topParentListBlock.innerBlocks.slice(
|
|
79
|
+
0,
|
|
80
|
+
blockIndex
|
|
81
|
+
),
|
|
82
|
+
} );
|
|
83
|
+
const middle = createBlock( getDefaultBlockName() );
|
|
84
|
+
const after = topParentListBlock.innerBlocks.slice(
|
|
85
|
+
blockIndex + 1
|
|
86
|
+
);
|
|
87
|
+
const tail = after.length
|
|
88
|
+
? [
|
|
89
|
+
cloneBlock( {
|
|
90
|
+
...topParentListBlock,
|
|
91
|
+
innerBlocks: after,
|
|
92
|
+
} ),
|
|
93
|
+
]
|
|
94
|
+
: [];
|
|
95
|
+
replaceBlocks(
|
|
96
|
+
topParentListBlock.clientId,
|
|
97
|
+
[ head, middle, ...tail ],
|
|
98
|
+
1
|
|
99
|
+
);
|
|
100
|
+
// We manually change the selection here because we are replacing
|
|
101
|
+
// a different block than the selected one.
|
|
102
|
+
selectionChange( middle.clientId );
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
element.addEventListener( 'keydown', onKeyDown );
|
|
106
|
+
return () => {
|
|
107
|
+
element.removeEventListener( 'keydown', onKeyDown );
|
|
108
|
+
};
|
|
109
|
+
}, [] );
|
|
110
|
+
}
|
|
111
|
+
|
|
50
112
|
function WidthPanel( { selectedWidth, setAttributes } ) {
|
|
51
113
|
function handleChange( newWidth ) {
|
|
52
114
|
// Check if we are toggling the width off
|
|
@@ -88,6 +150,7 @@ function ButtonEdit( props ) {
|
|
|
88
150
|
isSelected,
|
|
89
151
|
onReplace,
|
|
90
152
|
mergeBlocks,
|
|
153
|
+
clientId,
|
|
91
154
|
} = props;
|
|
92
155
|
const {
|
|
93
156
|
tagName,
|
|
@@ -164,6 +227,9 @@ function ButtonEdit( props ) {
|
|
|
164
227
|
[ url, opensInNewTab, nofollow ]
|
|
165
228
|
);
|
|
166
229
|
|
|
230
|
+
const useEnterRef = useEnter( { content: text, clientId } );
|
|
231
|
+
const mergedRef = useMergeRefs( [ useEnterRef, richTextRef ] );
|
|
232
|
+
|
|
167
233
|
return (
|
|
168
234
|
<>
|
|
169
235
|
<div
|
|
@@ -175,7 +241,7 @@ function ButtonEdit( props ) {
|
|
|
175
241
|
} ) }
|
|
176
242
|
>
|
|
177
243
|
<RichText
|
|
178
|
-
ref={
|
|
244
|
+
ref={ mergedRef }
|
|
179
245
|
aria-label={ __( 'Button text' ) }
|
|
180
246
|
placeholder={ placeholder || __( 'Add text…' ) }
|
|
181
247
|
value={ text }
|
package/src/code/transforms.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { createBlock } from '@wordpress/blocks';
|
|
5
|
+
import { create, toHTMLString } from '@wordpress/rich-text';
|
|
5
6
|
|
|
6
7
|
const transforms = {
|
|
7
8
|
from: [
|
|
@@ -12,10 +13,18 @@ const transforms = {
|
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
15
|
type: 'block',
|
|
15
|
-
blocks: [ 'core/
|
|
16
|
-
transform: ( { content } ) =>
|
|
16
|
+
blocks: [ 'core/paragraph' ],
|
|
17
|
+
transform: ( { content } ) =>
|
|
18
|
+
createBlock( 'core/code', { content } ),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: 'block',
|
|
22
|
+
blocks: [ 'core/html' ],
|
|
23
|
+
transform: ( { content: text } ) => {
|
|
17
24
|
return createBlock( 'core/code', {
|
|
18
|
-
|
|
25
|
+
// The HTML is plain text (with plain line breaks), so
|
|
26
|
+
// convert it to rich text.
|
|
27
|
+
content: toHTMLString( { value: create( { text } ) } ),
|
|
19
28
|
} );
|
|
20
29
|
},
|
|
21
30
|
},
|
|
@@ -42,11 +51,8 @@ const transforms = {
|
|
|
42
51
|
{
|
|
43
52
|
type: 'block',
|
|
44
53
|
blocks: [ 'core/paragraph' ],
|
|
45
|
-
transform: ( { content } ) =>
|
|
46
|
-
|
|
47
|
-
content: content.replace( /\n/g, '<br>' ),
|
|
48
|
-
} );
|
|
49
|
-
},
|
|
54
|
+
transform: ( { content } ) =>
|
|
55
|
+
createBlock( 'core/paragraph', { content } ),
|
|
50
56
|
},
|
|
51
57
|
],
|
|
52
58
|
};
|
|
@@ -22,6 +22,7 @@ export default function CommentsInspectorControls( {
|
|
|
22
22
|
<InspectorControls group="advanced">
|
|
23
23
|
<SelectControl
|
|
24
24
|
__nextHasNoMarginBottom
|
|
25
|
+
__next40pxDefaultSize
|
|
25
26
|
label={ __( 'HTML element' ) }
|
|
26
27
|
options={ [
|
|
27
28
|
{ label: __( 'Default (<div>)' ), value: 'div' },
|
|
@@ -319,6 +319,7 @@ export default function CoverInspectorControls( {
|
|
|
319
319
|
<InspectorControls group="advanced">
|
|
320
320
|
<SelectControl
|
|
321
321
|
__nextHasNoMarginBottom
|
|
322
|
+
__next40pxDefaultSize
|
|
322
323
|
label={ __( 'HTML element' ) }
|
|
323
324
|
options={ [
|
|
324
325
|
{ label: __( 'Default (<div>)' ), value: 'div' },
|
package/src/details/edit.js
CHANGED