@wordpress/block-library 10.4.0 → 10.5.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 +36 -0
- package/build/accordion/view.cjs +2 -5
- package/build/accordion/view.cjs.map +2 -2
- package/build/accordion-heading/block.json +1 -0
- package/build/audio/edit.cjs.map +2 -2
- package/build/avatar/edit.cjs.map +2 -2
- package/build/block/block.json +2 -1
- package/build/column/edit.cjs +1 -1
- package/build/column/edit.cjs.map +2 -2
- package/build/columns/edit.cjs.map +2 -2
- package/build/columns/transforms.cjs +161 -2
- package/build/columns/transforms.cjs.map +2 -2
- package/build/cover/edit/block-controls.cjs +1 -1
- package/build/cover/edit/block-controls.cjs.map +2 -2
- package/build/cover/edit/index.cjs +1 -1
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs.map +3 -3
- package/build/embed/embed-placeholder.cjs.map +2 -2
- package/build/gallery/transforms.cjs +8 -0
- package/build/gallery/transforms.cjs.map +2 -2
- package/build/group/block.json +1 -1
- package/build/heading/transforms.cjs +36 -0
- package/build/heading/transforms.cjs.map +2 -2
- package/build/heading/variations.cjs +13 -1
- package/build/heading/variations.cjs.map +2 -2
- package/build/home-link/edit.cjs.map +3 -3
- package/build/icon/edit.cjs +7 -1
- package/build/icon/edit.cjs.map +2 -2
- package/build/image/image.cjs +1 -1
- package/build/image/image.cjs.map +3 -3
- package/build/list/block.json +1 -0
- package/build/math/edit.cjs +4 -5
- package/build/math/edit.cjs.map +3 -3
- package/build/media-text/edit.cjs.map +3 -3
- package/build/more/block.json +1 -1
- package/build/navigation-link/shared/controls.cjs.map +3 -3
- package/build/playlist/block.json +0 -1
- package/build/playlist/edit.cjs +46 -22
- package/build/playlist/edit.cjs.map +2 -2
- package/build/playlist-track/block.json +16 -8
- package/build/playlist-track/edit.cjs +74 -67
- package/build/playlist-track/edit.cjs.map +3 -3
- package/build/post-template/edit.cjs +5 -1
- package/build/post-template/edit.cjs.map +2 -2
- package/build/post-title/edit.cjs +3 -8
- package/build/post-title/edit.cjs.map +2 -2
- package/build/private-apis.cjs +0 -12
- package/build/private-apis.cjs.map +3 -3
- package/build/query/block.json +3 -0
- package/build/query-no-results/block.json +16 -1
- package/build/rss/edit.cjs.map +2 -2
- package/build/site-logo/edit.cjs +1 -1
- package/build/site-logo/edit.cjs.map +2 -2
- package/build/site-title/edit.cjs +2 -6
- package/build/site-title/edit.cjs.map +2 -2
- package/build/table-of-contents/block.json +2 -1
- package/build/table-of-contents/deprecated.cjs +165 -0
- package/build/table-of-contents/deprecated.cjs.map +7 -0
- package/build/table-of-contents/index.cjs +2 -2
- package/build/table-of-contents/index.cjs.map +3 -3
- package/build/tabs/view.cjs +32 -2
- package/build/tabs/view.cjs.map +2 -2
- package/build/term-template/edit.cjs +5 -1
- package/build/term-template/edit.cjs.map +2 -2
- package/build-module/accordion/view.mjs +2 -5
- package/build-module/accordion/view.mjs.map +2 -2
- package/build-module/accordion-heading/block.json +1 -0
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/avatar/edit.mjs.map +2 -2
- package/build-module/block/block.json +2 -1
- package/build-module/column/edit.mjs +1 -1
- package/build-module/column/edit.mjs.map +2 -2
- package/build-module/columns/edit.mjs.map +2 -2
- package/build-module/columns/transforms.mjs +164 -3
- package/build-module/columns/transforms.mjs.map +2 -2
- package/build-module/cover/edit/block-controls.mjs +1 -1
- package/build-module/cover/edit/block-controls.mjs.map +2 -2
- package/build-module/cover/edit/index.mjs +1 -1
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +2 -2
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/embed/embed-placeholder.mjs +2 -2
- package/build-module/embed/embed-placeholder.mjs.map +1 -1
- package/build-module/gallery/transforms.mjs +8 -0
- package/build-module/gallery/transforms.mjs.map +2 -2
- package/build-module/group/block.json +1 -1
- package/build-module/heading/transforms.mjs +36 -0
- package/build-module/heading/transforms.mjs.map +2 -2
- package/build-module/heading/variations.mjs +13 -1
- package/build-module/heading/variations.mjs.map +2 -2
- package/build-module/home-link/edit.mjs +2 -2
- package/build-module/home-link/edit.mjs.map +2 -2
- package/build-module/icon/edit.mjs +7 -1
- package/build-module/icon/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +4 -4
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/list/block.json +1 -0
- package/build-module/math/edit.mjs +4 -8
- package/build-module/math/edit.mjs.map +2 -2
- package/build-module/media-text/edit.mjs +2 -2
- package/build-module/media-text/edit.mjs.map +2 -2
- package/build-module/more/block.json +1 -1
- package/build-module/navigation-link/shared/controls.mjs +2 -2
- package/build-module/navigation-link/shared/controls.mjs.map +2 -2
- package/build-module/playlist/block.json +0 -1
- package/build-module/playlist/edit.mjs +46 -22
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/playlist-track/block.json +16 -8
- package/build-module/playlist-track/edit.mjs +76 -69
- package/build-module/playlist-track/edit.mjs.map +2 -2
- package/build-module/post-template/edit.mjs +5 -1
- package/build-module/post-template/edit.mjs.map +2 -2
- package/build-module/post-title/edit.mjs +3 -8
- package/build-module/post-title/edit.mjs.map +2 -2
- package/build-module/private-apis.mjs +0 -2
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/query/block.json +3 -0
- package/build-module/query-no-results/block.json +16 -1
- package/build-module/rss/edit.mjs +2 -2
- package/build-module/rss/edit.mjs.map +1 -1
- package/build-module/site-logo/edit.mjs +1 -1
- package/build-module/site-logo/edit.mjs.map +2 -2
- package/build-module/site-title/edit.mjs +2 -6
- package/build-module/site-title/edit.mjs.map +2 -2
- package/build-module/table-of-contents/block.json +2 -1
- package/build-module/table-of-contents/deprecated.mjs +144 -0
- package/build-module/table-of-contents/deprecated.mjs.map +7 -0
- package/build-module/table-of-contents/index.mjs +2 -2
- package/build-module/table-of-contents/index.mjs.map +2 -2
- package/build-module/tabs/view.mjs +32 -2
- package/build-module/tabs/view.mjs.map +2 -2
- package/build-module/term-template/edit.mjs +5 -1
- package/build-module/term-template/edit.mjs.map +2 -2
- package/build-style/categories/style-rtl.css +2 -1
- package/build-style/categories/style.css +2 -1
- package/build-style/comments/editor-rtl.css +8 -10
- package/build-style/comments/editor.css +8 -10
- package/build-style/comments/style-rtl.css +8 -7
- package/build-style/comments/style.css +8 -7
- package/build-style/editor-rtl.css +8 -10
- package/build-style/editor.css +8 -10
- package/build-style/form-input/style-rtl.css +7 -7
- package/build-style/form-input/style.css +7 -7
- package/build-style/post-comments-form/style-rtl.css +7 -6
- package/build-style/post-comments-form/style.css +7 -6
- package/build-style/query-no-results/style-rtl.css +3 -0
- package/build-style/query-no-results/style.css +3 -0
- package/build-style/search/style-rtl.css +1 -1
- package/build-style/search/style.css +1 -1
- package/build-style/search/theme-rtl.css +1 -1
- package/build-style/search/theme.css +1 -1
- package/build-style/style-rtl.css +34 -23
- package/build-style/style.css +34 -23
- package/build-style/tab-panel/style-rtl.css +5 -1
- package/build-style/tab-panel/style.css +5 -1
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/package.json +43 -43
- package/src/accordion/view.js +2 -5
- package/src/accordion-heading/README.md +1 -0
- package/src/accordion-heading/block.json +1 -0
- package/src/audio/edit.js +13 -0
- package/src/avatar/edit.js +78 -0
- package/src/block/README.md +1 -0
- package/src/block/block.json +2 -1
- package/src/categories/style.scss +4 -4
- package/src/column/edit.js +15 -1
- package/src/columns/edit.js +18 -0
- package/src/columns/test/transforms.js +517 -1
- package/src/columns/transforms.js +207 -2
- package/src/comments/style.scss +7 -10
- package/src/cover/edit/block-controls.js +1 -1
- package/src/cover/edit/index.js +1 -1
- package/src/cover/edit/inspector-controls.js +2 -2
- package/src/embed/embed-placeholder.js +2 -2
- package/src/form-input/style.scss +2 -2
- package/src/gallery/test/edit.js +57 -0
- package/src/gallery/test/transforms.js +57 -0
- package/src/gallery/transforms.js +8 -0
- package/src/group/README.md +1 -1
- package/src/group/block.json +1 -1
- package/src/heading/transforms.js +36 -0
- package/src/heading/variations.js +12 -0
- package/src/home-link/edit.js +2 -2
- package/src/icon/edit.js +9 -1
- package/src/image/image.js +4 -4
- package/src/list/README.md +1 -0
- package/src/list/block.json +1 -0
- package/src/math/edit.js +4 -9
- package/src/media-text/edit.js +2 -2
- package/src/more/README.md +1 -1
- package/src/more/block.json +1 -1
- package/src/navigation/index.php +8 -2
- package/src/navigation-link/shared/controls.js +2 -2
- package/src/playlist/block.json +0 -1
- package/src/playlist/edit.js +54 -21
- package/src/playlist/test/edit-component.js +78 -27
- package/src/playlist-track/README.md +8 -8
- package/src/playlist-track/block.json +16 -8
- package/src/playlist-track/edit.js +56 -27
- package/src/playlist-track/test/edit.js +145 -41
- package/src/post-comments-form/style.scss +7 -9
- package/src/post-template/edit.js +10 -1
- package/src/post-title/edit.js +2 -9
- package/src/private-apis.js +0 -2
- package/src/query/README.md +2 -0
- package/src/query/block.json +3 -0
- package/src/query-no-results/README.md +3 -0
- package/src/query-no-results/block.json +16 -1
- package/src/query-no-results/style.scss +5 -0
- package/src/rss/edit.js +2 -2
- package/src/search/style.scss +1 -1
- package/src/search/theme.scss +2 -4
- package/src/site-logo/edit.js +1 -1
- package/src/site-title/edit.js +1 -10
- package/src/social-link/index.php +6 -13
- package/src/style.scss +1 -0
- package/src/tab-panel/index.php +14 -5
- package/src/tab-panel/style.scss +7 -1
- package/src/table-of-contents/README.md +6 -6
- package/src/table-of-contents/block.json +2 -1
- package/src/table-of-contents/deprecated.js +173 -0
- package/src/table-of-contents/index.js +2 -2
- package/src/table-of-contents/index.php +16 -3
- package/src/tabs/index.php +5 -5
- package/src/tabs/view.js +32 -2
- package/src/term-description/index.php +1 -1
- package/src/term-template/edit.js +10 -1
- package/src/utils/test/waveform-player-dependency.js +0 -74
- package/build/block-keyboard-shortcuts/index.cjs +0 -131
- package/build/block-keyboard-shortcuts/index.cjs.map +0 -7
- package/build/table-of-contents/save.cjs +0 -55
- package/build/table-of-contents/save.cjs.map +0 -7
- package/build-module/block-keyboard-shortcuts/index.mjs +0 -113
- package/build-module/block-keyboard-shortcuts/index.mjs.map +0 -7
- package/build-module/table-of-contents/save.mjs +0 -24
- package/build-module/table-of-contents/save.mjs.map +0 -7
- package/src/block-keyboard-shortcuts/index.js +0 -135
- package/src/table-of-contents/save.js +0 -22
package/build-style/style.css
CHANGED
|
@@ -423,7 +423,8 @@
|
|
|
423
423
|
.wp-block-categories.wp-block-categories-dropdown.aligncenter {
|
|
424
424
|
text-align: center;
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
|
|
427
|
+
:where(.wp-block-categories__label:not(.screen-reader-text)) {
|
|
427
428
|
width: 100%;
|
|
428
429
|
display: block;
|
|
429
430
|
}
|
|
@@ -594,13 +595,6 @@
|
|
|
594
595
|
.wp-block-post-comments .comment-body .commentmetadata {
|
|
595
596
|
font-size: 0.875em;
|
|
596
597
|
}
|
|
597
|
-
.wp-block-post-comments .comment-form-comment label,
|
|
598
|
-
.wp-block-post-comments .comment-form-author label,
|
|
599
|
-
.wp-block-post-comments .comment-form-email label,
|
|
600
|
-
.wp-block-post-comments .comment-form-url label {
|
|
601
|
-
display: block;
|
|
602
|
-
margin-bottom: 0.25em;
|
|
603
|
-
}
|
|
604
598
|
.wp-block-post-comments .comment-form textarea,
|
|
605
599
|
.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]) {
|
|
606
600
|
display: block;
|
|
@@ -636,6 +630,14 @@
|
|
|
636
630
|
padding: calc(0.667em + 2px);
|
|
637
631
|
}
|
|
638
632
|
|
|
633
|
+
:where(.wp-block-post-comments .comment-form-comment label),
|
|
634
|
+
:where(.wp-block-post-comments .comment-form-author label),
|
|
635
|
+
:where(.wp-block-post-comments .comment-form-email label),
|
|
636
|
+
:where(.wp-block-post-comments .comment-form-url label) {
|
|
637
|
+
display: block;
|
|
638
|
+
margin-bottom: 0.25em;
|
|
639
|
+
}
|
|
640
|
+
|
|
639
641
|
:where(.wp-block-post-comments input[type=submit]) {
|
|
640
642
|
border: none;
|
|
641
643
|
}
|
|
@@ -1311,35 +1313,35 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
|
|
|
1311
1313
|
text-decoration: none;
|
|
1312
1314
|
}
|
|
1313
1315
|
|
|
1314
|
-
.wp-block-form-input__label {
|
|
1316
|
+
:where(.wp-block-form-input__label) {
|
|
1315
1317
|
width: 100%;
|
|
1316
1318
|
display: flex;
|
|
1317
1319
|
flex-direction: column;
|
|
1318
1320
|
gap: 0.25em;
|
|
1319
1321
|
margin-bottom: 0.5em;
|
|
1320
1322
|
}
|
|
1321
|
-
.wp-block-form-input__label.is-label-inline {
|
|
1323
|
+
:where(.wp-block-form-input__label).is-label-inline {
|
|
1322
1324
|
flex-direction: row;
|
|
1323
1325
|
gap: 0.5em;
|
|
1324
1326
|
align-items: center;
|
|
1325
1327
|
}
|
|
1326
|
-
.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content {
|
|
1328
|
+
:where(.wp-block-form-input__label).is-label-inline .wp-block-form-input__label-content {
|
|
1327
1329
|
margin-bottom: 0.5em;
|
|
1328
1330
|
}
|
|
1329
|
-
.wp-block-form-input__label:has(input[type=checkbox]) {
|
|
1331
|
+
:where(.wp-block-form-input__label):has(input[type=checkbox]) {
|
|
1330
1332
|
flex-direction: row;
|
|
1331
1333
|
width: -moz-fit-content;
|
|
1332
1334
|
width: fit-content;
|
|
1333
1335
|
}
|
|
1334
|
-
.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content {
|
|
1336
|
+
:where(.wp-block-form-input__label):has(input[type=checkbox]) .wp-block-form-input__label-content {
|
|
1335
1337
|
margin: 0;
|
|
1336
1338
|
}
|
|
1337
|
-
.wp-block-form-input__label:has(.wp-block-form-input__label-content + input[type=checkbox]) {
|
|
1339
|
+
:where(.wp-block-form-input__label):has(.wp-block-form-input__label-content + input[type=checkbox]) {
|
|
1338
1340
|
/* stylelint-disable-next-line declaration-property-value-allowed-list -- This style is required for old markup. */
|
|
1339
1341
|
flex-direction: row-reverse;
|
|
1340
1342
|
}
|
|
1341
1343
|
|
|
1342
|
-
.wp-block-form-input__label-content {
|
|
1344
|
+
:where(.wp-block-form-input__label-content) {
|
|
1343
1345
|
width: -moz-fit-content;
|
|
1344
1346
|
width: fit-content;
|
|
1345
1347
|
}
|
|
@@ -3941,12 +3943,6 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3941
3943
|
box-sizing: border-box;
|
|
3942
3944
|
width: 100%;
|
|
3943
3945
|
}
|
|
3944
|
-
.wp-block-post-comments-form .comment-form-author label,
|
|
3945
|
-
.wp-block-post-comments-form .comment-form-email label,
|
|
3946
|
-
.wp-block-post-comments-form .comment-form-url label {
|
|
3947
|
-
display: block;
|
|
3948
|
-
margin-bottom: 0.25em;
|
|
3949
|
-
}
|
|
3950
3946
|
.wp-block-post-comments-form .comment-form-cookies-consent {
|
|
3951
3947
|
display: flex;
|
|
3952
3948
|
gap: 0.25em;
|
|
@@ -3962,6 +3958,13 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3962
3958
|
margin-left: 0.5em;
|
|
3963
3959
|
}
|
|
3964
3960
|
|
|
3961
|
+
:where(.wp-block-post-comments-form .comment-form-author label),
|
|
3962
|
+
:where(.wp-block-post-comments-form .comment-form-email label),
|
|
3963
|
+
:where(.wp-block-post-comments-form .comment-form-url label) {
|
|
3964
|
+
display: block;
|
|
3965
|
+
margin-bottom: 0.25em;
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3965
3968
|
.wp-block-post-comments-count {
|
|
3966
3969
|
box-sizing: border-box;
|
|
3967
3970
|
}
|
|
@@ -4249,6 +4252,10 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
4249
4252
|
margin-inline-end: auto;
|
|
4250
4253
|
}
|
|
4251
4254
|
|
|
4255
|
+
:where(.wp-block-query-no-results) {
|
|
4256
|
+
box-sizing: border-box;
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4252
4259
|
.wp-block-query-pagination.is-content-justification-space-between > .wp-block-query-pagination-next:last-of-type {
|
|
4253
4260
|
margin-inline-start: auto;
|
|
4254
4261
|
}
|
|
@@ -4391,7 +4398,7 @@ ul.wp-block-rss.is-grid li {
|
|
|
4391
4398
|
max-width: 100%;
|
|
4392
4399
|
}
|
|
4393
4400
|
|
|
4394
|
-
.wp-block-search__label {
|
|
4401
|
+
:where(.wp-block-search__label) {
|
|
4395
4402
|
width: 100%;
|
|
4396
4403
|
}
|
|
4397
4404
|
|
|
@@ -5049,9 +5056,13 @@ ul.wp-block-rss.is-grid li {
|
|
|
5049
5056
|
bottom: 0;
|
|
5050
5057
|
}
|
|
5051
5058
|
|
|
5052
|
-
.wp-block-tab-panel
|
|
5059
|
+
.wp-block-tab-panel:empty {
|
|
5053
5060
|
display: none !important;
|
|
5054
5061
|
}
|
|
5062
|
+
.wp-block-tab-panel[hidden] {
|
|
5063
|
+
margin-block-start: 0;
|
|
5064
|
+
padding: 0 !important;
|
|
5065
|
+
}
|
|
5055
5066
|
|
|
5056
5067
|
.wp-block-table {
|
|
5057
5068
|
overflow-x: auto;
|
package/build-style/theme.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -92,47 +92,47 @@
|
|
|
92
92
|
"build-module/*/init.mjs"
|
|
93
93
|
],
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@arraypress/waveform-player": "^1.
|
|
96
|
-
"@wordpress/a11y": "^4.
|
|
97
|
-
"@wordpress/api-fetch": "^7.
|
|
98
|
-
"@wordpress/autop": "^4.
|
|
99
|
-
"@wordpress/base-styles": "^
|
|
100
|
-
"@wordpress/blob": "^4.
|
|
101
|
-
"@wordpress/block-editor": "^
|
|
102
|
-
"@wordpress/blocks": "^15.
|
|
103
|
-
"@wordpress/components": "^
|
|
104
|
-
"@wordpress/compose": "^8.
|
|
105
|
-
"@wordpress/core-data": "^7.
|
|
106
|
-
"@wordpress/data": "^10.
|
|
107
|
-
"@wordpress/date": "^5.
|
|
108
|
-
"@wordpress/deprecated": "^4.
|
|
109
|
-
"@wordpress/dom": "^4.
|
|
110
|
-
"@wordpress/element": "^8.
|
|
111
|
-
"@wordpress/escape-html": "^3.
|
|
112
|
-
"@wordpress/global-styles-engine": "^1.
|
|
113
|
-
"@wordpress/hooks": "^4.
|
|
114
|
-
"@wordpress/html-entities": "^4.
|
|
115
|
-
"@wordpress/i18n": "^6.
|
|
116
|
-
"@wordpress/icons": "^15.
|
|
117
|
-
"@wordpress/interactivity": "^6.
|
|
118
|
-
"@wordpress/interactivity-router": "^2.
|
|
119
|
-
"@wordpress/kebab-case": "^1.
|
|
120
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
121
|
-
"@wordpress/keycodes": "^4.
|
|
122
|
-
"@wordpress/latex-to-mathml": "^1.
|
|
123
|
-
"@wordpress/notices": "^5.
|
|
124
|
-
"@wordpress/patterns": "^2.
|
|
125
|
-
"@wordpress/primitives": "^4.
|
|
126
|
-
"@wordpress/private-apis": "^1.
|
|
127
|
-
"@wordpress/reusable-blocks": "^5.
|
|
128
|
-
"@wordpress/rich-text": "^7.
|
|
129
|
-
"@wordpress/server-side-render": "^6.
|
|
130
|
-
"@wordpress/shortcode": "^4.
|
|
131
|
-
"@wordpress/ui": "^0.
|
|
132
|
-
"@wordpress/upload-media": "^0.
|
|
133
|
-
"@wordpress/url": "^4.
|
|
134
|
-
"@wordpress/viewport": "^6.
|
|
135
|
-
"@wordpress/wordcount": "^4.
|
|
95
|
+
"@arraypress/waveform-player": "^1.26.0",
|
|
96
|
+
"@wordpress/a11y": "^4.54.0",
|
|
97
|
+
"@wordpress/api-fetch": "^7.54.0",
|
|
98
|
+
"@wordpress/autop": "^4.54.0",
|
|
99
|
+
"@wordpress/base-styles": "^13.0.0",
|
|
100
|
+
"@wordpress/blob": "^4.54.0",
|
|
101
|
+
"@wordpress/block-editor": "^17.0.0",
|
|
102
|
+
"@wordpress/blocks": "^15.27.0",
|
|
103
|
+
"@wordpress/components": "^40.0.0",
|
|
104
|
+
"@wordpress/compose": "^8.7.0",
|
|
105
|
+
"@wordpress/core-data": "^7.54.0",
|
|
106
|
+
"@wordpress/data": "^10.54.0",
|
|
107
|
+
"@wordpress/date": "^5.54.0",
|
|
108
|
+
"@wordpress/deprecated": "^4.54.0",
|
|
109
|
+
"@wordpress/dom": "^4.54.0",
|
|
110
|
+
"@wordpress/element": "^8.6.0",
|
|
111
|
+
"@wordpress/escape-html": "^3.54.0",
|
|
112
|
+
"@wordpress/global-styles-engine": "^1.21.0",
|
|
113
|
+
"@wordpress/hooks": "^4.54.0",
|
|
114
|
+
"@wordpress/html-entities": "^4.54.0",
|
|
115
|
+
"@wordpress/i18n": "^6.27.0",
|
|
116
|
+
"@wordpress/icons": "^15.5.0",
|
|
117
|
+
"@wordpress/interactivity": "^6.54.0",
|
|
118
|
+
"@wordpress/interactivity-router": "^2.54.0",
|
|
119
|
+
"@wordpress/kebab-case": "^1.1.0",
|
|
120
|
+
"@wordpress/keyboard-shortcuts": "^5.54.0",
|
|
121
|
+
"@wordpress/keycodes": "^4.54.0",
|
|
122
|
+
"@wordpress/latex-to-mathml": "^1.22.0",
|
|
123
|
+
"@wordpress/notices": "^5.54.0",
|
|
124
|
+
"@wordpress/patterns": "^2.54.0",
|
|
125
|
+
"@wordpress/primitives": "^4.54.0",
|
|
126
|
+
"@wordpress/private-apis": "^1.54.0",
|
|
127
|
+
"@wordpress/reusable-blocks": "^5.54.0",
|
|
128
|
+
"@wordpress/rich-text": "^7.54.0",
|
|
129
|
+
"@wordpress/server-side-render": "^6.30.0",
|
|
130
|
+
"@wordpress/shortcode": "^4.54.0",
|
|
131
|
+
"@wordpress/ui": "^0.21.0",
|
|
132
|
+
"@wordpress/upload-media": "^0.39.0",
|
|
133
|
+
"@wordpress/url": "^4.54.0",
|
|
134
|
+
"@wordpress/viewport": "^6.54.0",
|
|
135
|
+
"@wordpress/wordcount": "^4.54.0",
|
|
136
136
|
"change-case": "^4.1.2",
|
|
137
137
|
"clsx": "^2.1.1",
|
|
138
138
|
"colord": "^2.9.3",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"publishConfig": {
|
|
166
166
|
"access": "public"
|
|
167
167
|
},
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "5ef24f60261976bb198ad035db24bf81c1fb92b4"
|
|
169
169
|
}
|
package/src/accordion/view.js
CHANGED
|
@@ -41,16 +41,13 @@ const { actions } = store(
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
openPanelByHash: () => {
|
|
44
|
-
if ( hashHandled
|
|
44
|
+
if ( hashHandled ) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const context = getContext();
|
|
49
49
|
const { id, accordionItems, autoclose } = context;
|
|
50
|
-
const
|
|
51
|
-
window.location.hash.slice( 1 )
|
|
52
|
-
);
|
|
53
|
-
const targetElement = window.document.getElementById( hash );
|
|
50
|
+
const targetElement = document.querySelector( ':target' );
|
|
54
51
|
|
|
55
52
|
if ( ! targetElement ) {
|
|
56
53
|
return;
|
|
@@ -57,6 +57,7 @@ _Defined via the [`usesContext` and `providesContext`](https://developer.wordpre
|
|
|
57
57
|
|
|
58
58
|
_Defined via the [`selectors`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-selectors/) property in block.json._
|
|
59
59
|
|
|
60
|
+
- **spacing**: `.wp-block-accordion-heading .wp-block-accordion-heading__toggle`
|
|
60
61
|
- **typography**:
|
|
61
62
|
- letterSpacing: `.wp-block-accordion-heading .wp-block-accordion-heading__toggle-title`
|
|
62
63
|
- textDecoration: `.wp-block-accordion-heading .wp-block-accordion-heading__toggle-title`
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"lock": false
|
|
62
62
|
},
|
|
63
63
|
"selectors": {
|
|
64
|
+
"spacing": ".wp-block-accordion-heading .wp-block-accordion-heading__toggle",
|
|
64
65
|
"typography": {
|
|
65
66
|
"letterSpacing": ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title",
|
|
66
67
|
"textDecoration": ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"
|
package/src/audio/edit.js
CHANGED
|
@@ -30,6 +30,19 @@ import { Caption } from '../utils/caption';
|
|
|
30
30
|
|
|
31
31
|
const ALLOWED_MEDIA_TYPES = [ 'audio' ];
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Renders the `core/audio` block on the editor.
|
|
35
|
+
*
|
|
36
|
+
* @param {Object} props React props.
|
|
37
|
+
* @param {Object} props.attributes Block attributes: `blob`, `src`, `caption`, `id`, `autoplay`, `loop` and `preload`.
|
|
38
|
+
* @param {string} props.className Class name generated for the block.
|
|
39
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
40
|
+
* @param {Function} props.onReplace Callback for replacing this block with other blocks.
|
|
41
|
+
* @param {boolean} props.isSelected Whether the block is the only selected block.
|
|
42
|
+
* @param {Function} props.insertBlocksAfter Callback for inserting blocks after this one.
|
|
43
|
+
*
|
|
44
|
+
* @return {React.JSX.Element} React element.
|
|
45
|
+
*/
|
|
33
46
|
function AudioEdit( {
|
|
34
47
|
attributes,
|
|
35
48
|
className,
|
package/src/avatar/edit.js
CHANGED
|
@@ -17,6 +17,17 @@ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
|
17
17
|
import { useCommentAvatar, useUserAvatar } from './hooks';
|
|
18
18
|
import UserControl from './user-control';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Renders the inspector controls for the `core/avatar` block.
|
|
22
|
+
*
|
|
23
|
+
* @param {Object} props React props.
|
|
24
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
25
|
+
* @param {Object} props.avatar Avatar data returned by `useCommentAvatar` or `useUserAvatar`, with the `minSize` and `maxSize` bounds of the size control.
|
|
26
|
+
* @param {Object} props.attributes Block attributes: `size`, `isLink`, `linkTarget` and `userId`.
|
|
27
|
+
* @param {boolean} props.selectUser Whether to render the user selection control.
|
|
28
|
+
*
|
|
29
|
+
* @return {React.JSX.Element} React element.
|
|
30
|
+
*/
|
|
20
31
|
const AvatarInspectorControls = ( {
|
|
21
32
|
setAttributes,
|
|
22
33
|
avatar,
|
|
@@ -115,6 +126,17 @@ const AvatarInspectorControls = ( {
|
|
|
115
126
|
);
|
|
116
127
|
};
|
|
117
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Wraps the avatar image in a placeholder link when the block links to the user
|
|
131
|
+
* profile. The link is inert in the editor: it points at a fragment and its
|
|
132
|
+
* click handler prevents navigation.
|
|
133
|
+
*
|
|
134
|
+
* @param {Object} props React props.
|
|
135
|
+
* @param {React.ReactNode} props.children Avatar image to wrap.
|
|
136
|
+
* @param {boolean} props.isLink Whether to wrap the children in a link.
|
|
137
|
+
*
|
|
138
|
+
* @return {React.ReactNode} The children, wrapped in a link when `isLink` is true.
|
|
139
|
+
*/
|
|
118
140
|
const AvatarLinkWrapper = ( { children, isLink } ) =>
|
|
119
141
|
isLink ? (
|
|
120
142
|
<a
|
|
@@ -128,6 +150,19 @@ const AvatarLinkWrapper = ( { children, isLink } ) =>
|
|
|
128
150
|
children
|
|
129
151
|
);
|
|
130
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Renders the avatar image inside a `ResizableBox` so its size can be adjusted
|
|
155
|
+
* by dragging. Resizing keeps the aspect ratio and updates the `size` attribute.
|
|
156
|
+
*
|
|
157
|
+
* @param {Object} props React props.
|
|
158
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
159
|
+
* @param {Object} props.attributes Block attributes: `size` and `isLink`, plus the border support values read by `useBorderProps`.
|
|
160
|
+
* @param {Object} props.avatar Avatar data returned by `useCommentAvatar` or `useUserAvatar`, with the image `src` and `alt` and the `minSize` and `maxSize` resize bounds.
|
|
161
|
+
* @param {Object} props.blockProps Props returned by `useBlockProps`, applied to the wrapper element.
|
|
162
|
+
* @param {boolean} props.isSelected Whether the block is selected. Resize handles are only shown when it is.
|
|
163
|
+
*
|
|
164
|
+
* @return {React.JSX.Element} React element.
|
|
165
|
+
*/
|
|
131
166
|
const ResizableAvatar = ( {
|
|
132
167
|
setAttributes,
|
|
133
168
|
attributes,
|
|
@@ -187,6 +222,20 @@ const ResizableAvatar = ( {
|
|
|
187
222
|
</div>
|
|
188
223
|
);
|
|
189
224
|
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Renders the block for a comment author, resolving the avatar from the
|
|
228
|
+
* `commentId` context. The user selection control is not offered here because
|
|
229
|
+
* the author is determined by the comment.
|
|
230
|
+
*
|
|
231
|
+
* @param {Object} props React props.
|
|
232
|
+
* @param {Object} props.attributes Block attributes.
|
|
233
|
+
* @param {Object} props.context Inherited context, from which the comment ID is read.
|
|
234
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
235
|
+
* @param {boolean} props.isSelected Whether the block is selected.
|
|
236
|
+
*
|
|
237
|
+
* @return {React.JSX.Element} React element.
|
|
238
|
+
*/
|
|
190
239
|
const CommentEdit = ( { attributes, context, setAttributes, isSelected } ) => {
|
|
191
240
|
const { commentId } = context;
|
|
192
241
|
const blockProps = useBlockProps();
|
|
@@ -210,6 +259,19 @@ const CommentEdit = ( { attributes, context, setAttributes, isSelected } ) => {
|
|
|
210
259
|
);
|
|
211
260
|
};
|
|
212
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Renders the block for a user, resolving the avatar from the `userId`
|
|
264
|
+
* attribute when set, and otherwise from the author of the post identified by
|
|
265
|
+
* the `postType` and `postId` context.
|
|
266
|
+
*
|
|
267
|
+
* @param {Object} props React props.
|
|
268
|
+
* @param {Object} props.attributes Block attributes, from which the `userId` is read.
|
|
269
|
+
* @param {Object} props.context Inherited context, from which the post type and post ID are read.
|
|
270
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
271
|
+
* @param {boolean} props.isSelected Whether the block is selected.
|
|
272
|
+
*
|
|
273
|
+
* @return {React.JSX.Element} React element.
|
|
274
|
+
*/
|
|
213
275
|
const UserEdit = ( { attributes, context, setAttributes, isSelected } ) => {
|
|
214
276
|
const { postId, postType } = context;
|
|
215
277
|
const avatar = useUserAvatar( {
|
|
@@ -238,6 +300,22 @@ const UserEdit = ( { attributes, context, setAttributes, isSelected } ) => {
|
|
|
238
300
|
);
|
|
239
301
|
};
|
|
240
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Renders the `core/avatar` block on the editor. All props are forwarded to
|
|
305
|
+
* either `CommentEdit` or `UserEdit`, depending on whether the block is used
|
|
306
|
+
* inside a comment.
|
|
307
|
+
*
|
|
308
|
+
* @param {Object} props React props.
|
|
309
|
+
* @param {Object} props.attributes Block attributes.
|
|
310
|
+
* @param {Object} props.context Inherited context.
|
|
311
|
+
* @param {number|null} [props.context.commentId] The comment ID when the block is used inside a comment. `null` in the Site Editor, where no comment is resolved but the comment variant is still rendered.
|
|
312
|
+
* @param {string} [props.context.postType] The post type of the current post.
|
|
313
|
+
* @param {number} [props.context.postId] The ID of the current post.
|
|
314
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
315
|
+
* @param {boolean} props.isSelected Whether the block is selected.
|
|
316
|
+
*
|
|
317
|
+
* @return {React.JSX.Element} React element.
|
|
318
|
+
*/
|
|
241
319
|
export default function Edit( props ) {
|
|
242
320
|
// Don't show the Comment Edit controls if we have a comment ID set, or if we're in the Site Editor (where it is `null`).
|
|
243
321
|
if ( props?.context?.commentId || props?.context?.commentId === null ) {
|
package/src/block/README.md
CHANGED
|
@@ -29,6 +29,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
29
29
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
30
30
|
- `clientNavigation`: `true`
|
|
31
31
|
- `customCSS`: `false`
|
|
32
|
+
- [`visibility`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#visibility): `false`
|
|
32
33
|
|
|
33
34
|
## Context
|
|
34
35
|
|
package/src/block/block.json
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
&.wp-block-categories-dropdown.aligncenter {
|
|
15
15
|
text-align: center;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
}
|
|
18
|
+
:where(.wp-block-categories__label:not(.screen-reader-text)) {
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: block;
|
|
21
21
|
}
|
package/src/column/edit.js
CHANGED
|
@@ -55,6 +55,20 @@ function ColumnInspectorControls( { width, setAttributes } ) {
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Renders the `core/column` block in the editor.
|
|
60
|
+
*
|
|
61
|
+
* @param {Object} props Component props.
|
|
62
|
+
* @param {Object} props.attributes Block attributes.
|
|
63
|
+
* @param {string} [props.attributes.verticalAlignment] Vertical alignment of the column, one of `top`, `center`, `bottom` or `stretch`. Setting it resets the alignment on the parent Columns block.
|
|
64
|
+
* @param {string|number} [props.attributes.width] Column width, used as its `flex-basis`. A number is treated as a percentage, for content saved before the attribute became a CSS length.
|
|
65
|
+
* @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.
|
|
66
|
+
* @param {string[]} [props.attributes.allowedBlocks] Names of the blocks allowed as inner blocks, added by the `allowedBlocks` block support.
|
|
67
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
68
|
+
* @param {string} props.clientId Client ID of the block.
|
|
69
|
+
*
|
|
70
|
+
* @return {React.JSX.Element} React element.
|
|
71
|
+
*/
|
|
58
72
|
function ColumnEdit( {
|
|
59
73
|
attributes: { verticalAlignment, width, templateLock, allowedBlocks },
|
|
60
74
|
setAttributes,
|
|
@@ -113,7 +127,7 @@ function ColumnEdit( {
|
|
|
113
127
|
templateLock,
|
|
114
128
|
allowedBlocks,
|
|
115
129
|
renderAppender: hasChildBlocks
|
|
116
|
-
?
|
|
130
|
+
? false
|
|
117
131
|
: InnerBlocks.ButtonBlockAppender,
|
|
118
132
|
}
|
|
119
133
|
);
|
package/src/columns/edit.js
CHANGED
|
@@ -294,6 +294,24 @@ function Placeholder( { clientId, name, setAttributes } ) {
|
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Renders the `core/columns` block in the editor.
|
|
299
|
+
*
|
|
300
|
+
* Until the block has inner blocks it renders a variation picker; afterwards it
|
|
301
|
+
* renders the columns container. Every prop is forwarded to whichever of the two
|
|
302
|
+
* is rendered.
|
|
303
|
+
*
|
|
304
|
+
* @param {Object} props Component props.
|
|
305
|
+
* @param {string} props.clientId Client ID of the block.
|
|
306
|
+
* @param {string} props.name Block name, used to look up the variations offered by the picker.
|
|
307
|
+
* @param {Object} props.attributes Block attributes.
|
|
308
|
+
* @param {string} [props.attributes.verticalAlignment] Vertical alignment applied to the block and to every child Column block.
|
|
309
|
+
* @param {boolean} [props.attributes.isStackedOnMobile] Whether the columns stack on small viewports. Defaults to `true`.
|
|
310
|
+
* @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.
|
|
311
|
+
* @param {Function} props.setAttributes Callback for updating block attributes.
|
|
312
|
+
*
|
|
313
|
+
* @return {React.JSX.Element} React element.
|
|
314
|
+
*/
|
|
297
315
|
const ColumnsEdit = ( props ) => {
|
|
298
316
|
const { clientId } = props;
|
|
299
317
|
const hasInnerBlocks = useSelect(
|