@wordpress/block-library 11.0.2-next.v.202609171837.0 → 11.1.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 +12 -1
- package/build/accordion/block.json +4 -1
- package/build/accordion-item/block.json +7 -1
- package/build/accordion-panel/block.json +9 -1
- package/build/archives/block.json +9 -0
- package/build/audio/block.json +8 -0
- package/build/breadcrumbs/block.json +3 -0
- package/build/breadcrumbs/edit.cjs.map +3 -3
- package/build/buttons/block.json +9 -0
- package/build/categories/block.json +12 -1
- package/build/code/block.json +9 -0
- package/build/column/block.json +9 -0
- package/build/columns/block.json +9 -0
- package/build/comment-author-name/block.json +3 -0
- package/build/comment-content/block.json +5 -0
- package/build/comment-date/block.json +3 -0
- package/build/comment-edit-link/block.json +3 -0
- package/build/comment-reply-link/block.json +3 -0
- package/build/comments/block.json +10 -0
- package/build/comments-pagination/block.json +3 -0
- package/build/comments-pagination-next/block.json +3 -0
- package/build/comments-pagination-numbers/block.json +3 -0
- package/build/comments-pagination-previous/block.json +6 -0
- package/build/comments-title/block.json +3 -0
- package/build/cover/edit/index.cjs +4 -1
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +52 -13
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/details/block.json +11 -0
- package/build/file/block.json +9 -0
- package/build/footnotes/block.json +9 -0
- package/build/gallery/block.json +9 -0
- package/build/gallery/edit.cjs +1 -2
- package/build/gallery/edit.cjs.map +2 -2
- package/build/group/block.json +1 -0
- package/build/heading/block.json +9 -0
- package/build/home-link/block.json +18 -0
- package/build/home-link/edit.cjs.map +3 -3
- package/build/image/image.cjs +10 -8
- package/build/image/image.cjs.map +3 -3
- package/build/image/use-open-image-media-editor-modal.cjs +20 -0
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/latest-comments/block.json +10 -0
- package/build/latest-posts/block.json +10 -0
- package/build/loginout/block.json +10 -0
- package/build/math/block.json +10 -0
- package/build/media-text/block.json +1 -0
- package/build/navigation/edit/index.cjs +1 -4
- package/build/navigation/edit/index.cjs.map +2 -2
- package/build/navigation-link/link-ui/page-creator.cjs.map +3 -3
- package/build/navigation-link/shared/controls.cjs.map +3 -3
- package/build/navigation-link/shared/use-link-preview.cjs +13 -13
- package/build/navigation-link/shared/use-link-preview.cjs.map +2 -2
- package/build/navigation-overlay-close/block.json +7 -0
- package/build/navigation-submenu/block.json +6 -0
- package/build/navigation-submenu/edit.cjs +9 -1
- package/build/navigation-submenu/edit.cjs.map +3 -3
- package/build/page-list/block.json +10 -0
- package/build/paragraph/edit.cjs +1 -2
- package/build/paragraph/edit.cjs.map +2 -2
- package/build/playlist/block.json +1 -0
- package/build/post-author-biography/block.json +4 -0
- package/build/post-author-name/block.json +5 -0
- package/build/post-comments-count/block.json +3 -0
- package/build/post-comments-form/block.json +10 -0
- package/build/post-content/block.json +2 -0
- package/build/post-date/block.json +3 -0
- package/build/post-excerpt/block.json +5 -0
- package/build/post-featured-image/edit.cjs +11 -9
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-navigation-link/block.json +30 -0
- package/build/post-navigation-link/edit.cjs +13 -2
- package/build/post-navigation-link/edit.cjs.map +3 -3
- package/build/post-template/block.json +13 -1
- package/build/post-terms/block.json +6 -0
- package/build/post-time-to-read/block.json +6 -0
- package/build/post-title/block.json +10 -0
- package/build/preformatted/block.json +7 -0
- package/build/pullquote/block.json +1 -0
- package/build/query-no-results/block.json +10 -2
- package/build/query-pagination/block.json +3 -0
- package/build/query-pagination-next/block.json +3 -0
- package/build/query-pagination-numbers/block.json +3 -0
- package/build/query-pagination-previous/block.json +3 -0
- package/build/query-title/block.json +3 -0
- package/build/query-total/block.json +6 -0
- package/build/quote/block.json +1 -0
- package/build/read-more/block.json +6 -0
- package/build/rss/block.json +6 -0
- package/build/site-tagline/block.json +8 -1
- package/build/site-title/block.json +7 -1
- package/build/social-links/block.json +3 -0
- package/build/social-links/edit.cjs +2 -3
- package/build/social-links/edit.cjs.map +2 -2
- package/build/tab-panel/block.json +25 -0
- package/build/tab-panel/controls.cjs.map +3 -3
- package/build/tab-panels/block.json +18 -1
- package/build/table-of-contents/block.json +7 -0
- package/build/tabs/block.json +24 -1
- package/build/tag-cloud/block.json +19 -0
- package/build/template-part/edit/selection-modal.cjs.map +1 -1
- package/build/term-count/block.json +7 -0
- package/build/term-description/block.json +9 -0
- package/build/term-name/block.json +10 -0
- package/build/term-template/block.json +10 -1
- package/build/utils/search-patterns.cjs +7 -43
- package/build/utils/search-patterns.cjs.map +3 -3
- package/build/utils/style-state.cjs +4 -6
- package/build/utils/style-state.cjs.map +2 -2
- package/build/video/block.json +6 -0
- package/build/video/edit.cjs +23 -15
- package/build/video/edit.cjs.map +3 -3
- package/build/video/index.cjs +0 -2
- package/build/video/index.cjs.map +3 -3
- package/build/video/save.cjs +5 -1
- package/build/video/save.cjs.map +3 -3
- package/build-module/accordion/block.json +4 -1
- package/build-module/accordion-item/block.json +7 -1
- package/build-module/accordion-panel/block.json +9 -1
- package/build-module/archives/block.json +9 -0
- package/build-module/audio/block.json +8 -0
- package/build-module/breadcrumbs/block.json +3 -0
- package/build-module/breadcrumbs/edit.mjs +3 -3
- package/build-module/breadcrumbs/edit.mjs.map +2 -2
- package/build-module/buttons/block.json +9 -0
- package/build-module/categories/block.json +12 -1
- package/build-module/code/block.json +9 -0
- package/build-module/column/block.json +9 -0
- package/build-module/columns/block.json +9 -0
- package/build-module/comment-author-name/block.json +3 -0
- package/build-module/comment-content/block.json +5 -0
- package/build-module/comment-date/block.json +3 -0
- package/build-module/comment-edit-link/block.json +3 -0
- package/build-module/comment-reply-link/block.json +3 -0
- package/build-module/comments/block.json +10 -0
- package/build-module/comments-pagination/block.json +3 -0
- package/build-module/comments-pagination-next/block.json +3 -0
- package/build-module/comments-pagination-numbers/block.json +3 -0
- package/build-module/comments-pagination-previous/block.json +6 -0
- package/build-module/comments-title/block.json +3 -0
- package/build-module/cover/edit/index.mjs +4 -1
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +57 -14
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/details/block.json +11 -0
- package/build-module/file/block.json +9 -0
- package/build-module/footnotes/block.json +9 -0
- package/build-module/gallery/block.json +9 -0
- package/build-module/gallery/edit.mjs +1 -2
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/group/block.json +1 -0
- package/build-module/heading/block.json +9 -0
- package/build-module/home-link/block.json +18 -0
- package/build-module/home-link/edit.mjs +2 -2
- package/build-module/home-link/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +12 -10
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +20 -0
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/latest-comments/block.json +10 -0
- package/build-module/latest-posts/block.json +10 -0
- package/build-module/loginout/block.json +10 -0
- package/build-module/math/block.json +10 -0
- package/build-module/media-text/block.json +1 -0
- package/build-module/navigation/edit/index.mjs +1 -4
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation-link/link-ui/page-creator.mjs +2 -2
- package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
- package/build-module/navigation-link/shared/controls.mjs +2 -2
- package/build-module/navigation-link/shared/controls.mjs.map +2 -2
- package/build-module/navigation-link/shared/use-link-preview.mjs +13 -13
- package/build-module/navigation-link/shared/use-link-preview.mjs.map +2 -2
- package/build-module/navigation-overlay-close/block.json +7 -0
- package/build-module/navigation-submenu/block.json +6 -0
- package/build-module/navigation-submenu/edit.mjs +11 -2
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/page-list/block.json +10 -0
- package/build-module/paragraph/edit.mjs +1 -2
- package/build-module/paragraph/edit.mjs.map +2 -2
- package/build-module/playlist/block.json +1 -0
- package/build-module/post-author-biography/block.json +4 -0
- package/build-module/post-author-name/block.json +5 -0
- package/build-module/post-comments-count/block.json +3 -0
- package/build-module/post-comments-form/block.json +10 -0
- package/build-module/post-content/block.json +2 -0
- package/build-module/post-date/block.json +3 -0
- package/build-module/post-excerpt/block.json +5 -0
- package/build-module/post-featured-image/edit.mjs +11 -9
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-navigation-link/block.json +30 -0
- package/build-module/post-navigation-link/edit.mjs +17 -3
- package/build-module/post-navigation-link/edit.mjs.map +2 -2
- package/build-module/post-template/block.json +13 -1
- package/build-module/post-terms/block.json +6 -0
- package/build-module/post-time-to-read/block.json +6 -0
- package/build-module/post-title/block.json +10 -0
- package/build-module/preformatted/block.json +7 -0
- package/build-module/pullquote/block.json +1 -0
- package/build-module/query-no-results/block.json +10 -2
- package/build-module/query-pagination/block.json +3 -0
- package/build-module/query-pagination-next/block.json +3 -0
- package/build-module/query-pagination-numbers/block.json +3 -0
- package/build-module/query-pagination-previous/block.json +3 -0
- package/build-module/query-title/block.json +3 -0
- package/build-module/query-total/block.json +6 -0
- package/build-module/quote/block.json +1 -0
- package/build-module/read-more/block.json +6 -0
- package/build-module/rss/block.json +6 -0
- package/build-module/site-tagline/block.json +8 -1
- package/build-module/site-title/block.json +7 -1
- package/build-module/social-links/block.json +3 -0
- package/build-module/social-links/edit.mjs +2 -3
- package/build-module/social-links/edit.mjs.map +2 -2
- package/build-module/tab-panel/block.json +25 -0
- package/build-module/tab-panel/controls.mjs +2 -2
- package/build-module/tab-panel/controls.mjs.map +2 -2
- package/build-module/tab-panels/block.json +18 -1
- package/build-module/table-of-contents/block.json +7 -0
- package/build-module/tabs/block.json +24 -1
- package/build-module/tag-cloud/block.json +19 -0
- package/build-module/template-part/edit/selection-modal.mjs.map +1 -1
- package/build-module/term-count/block.json +7 -0
- package/build-module/term-description/block.json +9 -0
- package/build-module/term-name/block.json +10 -0
- package/build-module/term-template/block.json +10 -1
- package/build-module/utils/search-patterns.mjs +7 -32
- package/build-module/utils/search-patterns.mjs.map +2 -2
- package/build-module/utils/style-state.mjs +6 -4
- package/build-module/utils/style-state.mjs.map +2 -2
- package/build-module/video/block.json +6 -0
- package/build-module/video/edit.mjs +25 -16
- package/build-module/video/edit.mjs.map +2 -2
- package/build-module/video/index.mjs +0 -2
- package/build-module/video/index.mjs.map +2 -2
- package/build-module/video/save.mjs +7 -2
- package/build-module/video/save.mjs.map +2 -2
- package/build-style/editor-rtl.css +12 -2
- package/build-style/editor.css +12 -2
- package/build-style/image/editor-rtl.css +6 -0
- package/build-style/image/editor.css +6 -0
- package/build-style/navigation/style-rtl.css +18 -3
- package/build-style/navigation/style.css +18 -3
- package/build-style/navigation-link/editor-rtl.css +3 -1
- package/build-style/navigation-link/editor.css +3 -1
- package/build-style/navigation-overlay-close/style-rtl.css +1 -1
- package/build-style/navigation-overlay-close/style.css +1 -1
- package/build-style/navigation-submenu/editor-rtl.css +3 -1
- package/build-style/navigation-submenu/editor.css +3 -1
- package/build-style/post-navigation-link/style-rtl.css +3 -0
- package/build-style/post-navigation-link/style.css +3 -0
- package/build-style/style-rtl.css +24 -4
- package/build-style/style.css +24 -4
- package/build-style/tab-panel/style-rtl.css +2 -0
- package/build-style/tab-panel/style.css +2 -0
- package/package.json +41 -42
- package/src/accordion/README.md +3 -0
- package/src/accordion/block.json +4 -1
- package/src/accordion-item/README.md +5 -0
- package/src/accordion-item/block.json +7 -1
- package/src/accordion-panel/README.md +7 -0
- package/src/accordion-panel/block.json +9 -1
- package/src/archives/README.md +4 -0
- package/src/archives/block.json +9 -0
- package/src/audio/README.md +4 -0
- package/src/audio/block.json +8 -0
- package/src/breadcrumbs/README.md +2 -0
- package/src/breadcrumbs/block.json +3 -0
- package/src/breadcrumbs/edit.jsx +3 -3
- package/src/breadcrumbs/index.php +1 -1
- package/src/buttons/README.md +4 -0
- package/src/buttons/block.json +9 -0
- package/src/categories/README.md +6 -0
- package/src/categories/block.json +12 -1
- package/src/code/README.md +4 -0
- package/src/code/block.json +9 -0
- package/src/column/README.md +4 -0
- package/src/column/block.json +9 -0
- package/src/columns/README.md +4 -0
- package/src/columns/block.json +9 -0
- package/src/comment-author-name/README.md +2 -0
- package/src/comment-author-name/block.json +3 -0
- package/src/comment-content/README.md +4 -0
- package/src/comment-content/block.json +5 -0
- package/src/comment-date/README.md +2 -0
- package/src/comment-date/block.json +3 -0
- package/src/comment-edit-link/README.md +2 -0
- package/src/comment-edit-link/block.json +3 -0
- package/src/comment-reply-link/README.md +2 -0
- package/src/comment-reply-link/block.json +3 -0
- package/src/comments/README.md +5 -0
- package/src/comments/block.json +10 -0
- package/src/comments-pagination/README.md +2 -0
- package/src/comments-pagination/block.json +3 -0
- package/src/comments-pagination-next/README.md +2 -0
- package/src/comments-pagination-next/block.json +3 -0
- package/src/comments-pagination-numbers/README.md +2 -0
- package/src/comments-pagination-numbers/block.json +3 -0
- package/src/comments-pagination-previous/README.md +2 -0
- package/src/comments-pagination-previous/block.json +6 -0
- package/src/comments-title/README.md +2 -0
- package/src/comments-title/block.json +3 -0
- package/src/cover/edit/index.jsx +3 -0
- package/src/cover/edit/inspector-controls.jsx +64 -13
- package/src/cover/test/edit.browser.test.js +18 -2
- package/src/details/README.md +6 -0
- package/src/details/block.json +11 -0
- package/src/file/README.md +4 -0
- package/src/file/block.json +9 -0
- package/src/footnotes/README.md +4 -0
- package/src/footnotes/block.json +9 -0
- package/src/gallery/README.md +4 -0
- package/src/gallery/block.json +9 -0
- package/src/gallery/edit.jsx +1 -2
- package/src/group/README.md +1 -0
- package/src/group/block.json +1 -0
- package/src/heading/README.md +4 -0
- package/src/heading/block.json +9 -0
- package/src/home-link/README.md +5 -0
- package/src/home-link/block.json +18 -0
- package/src/home-link/edit.jsx +2 -2
- package/src/icon/index.php +9 -0
- package/src/image/editor.scss +8 -0
- package/src/image/image.jsx +13 -11
- package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +139 -0
- package/src/image/use-open-image-media-editor-modal.js +37 -0
- package/src/latest-comments/README.md +5 -0
- package/src/latest-comments/block.json +10 -0
- package/src/latest-posts/README.md +5 -0
- package/src/latest-posts/block.json +10 -0
- package/src/loginout/README.md +5 -0
- package/src/loginout/block.json +10 -0
- package/src/math/README.md +5 -0
- package/src/math/block.json +10 -0
- package/src/media-text/README.md +1 -0
- package/src/media-text/block.json +1 -0
- package/src/navigation/edit/index.jsx +2 -4
- package/src/navigation/style.scss +40 -4
- package/src/navigation-link/editor.scss +6 -1
- package/src/navigation-link/link-ui/page-creator.jsx +2 -2
- package/src/navigation-link/shared/controls.jsx +2 -2
- package/src/navigation-link/shared/test/use-link-preview.jsdom.test.js +22 -22
- package/src/navigation-link/shared/use-link-preview.js +15 -14
- package/src/navigation-overlay-close/README.md +1 -0
- package/src/navigation-overlay-close/block.json +7 -0
- package/src/navigation-overlay-close/style.scss +1 -1
- package/src/navigation-submenu/README.md +7 -0
- package/src/navigation-submenu/block.json +6 -0
- package/src/navigation-submenu/edit.jsx +11 -1
- package/src/navigation-submenu/editor.scss +6 -1
- package/src/navigation-submenu/index.php +11 -0
- package/src/page-list/README.md +5 -0
- package/src/page-list/block.json +10 -0
- package/src/paragraph/edit.jsx +1 -3
- package/src/playlist/README.md +1 -0
- package/src/playlist/block.json +1 -0
- package/src/post-author-biography/README.md +3 -0
- package/src/post-author-biography/block.json +4 -0
- package/src/post-author-name/README.md +4 -0
- package/src/post-author-name/block.json +5 -0
- package/src/post-comments-count/README.md +2 -0
- package/src/post-comments-count/block.json +3 -0
- package/src/post-comments-form/README.md +5 -0
- package/src/post-comments-form/block.json +10 -0
- package/src/post-content/README.md +2 -0
- package/src/post-content/block.json +2 -0
- package/src/post-date/README.md +2 -0
- package/src/post-date/block.json +3 -0
- package/src/post-excerpt/README.md +4 -0
- package/src/post-excerpt/block.json +5 -0
- package/src/post-featured-image/edit.jsx +11 -9
- package/src/post-navigation-link/README.md +12 -0
- package/src/post-navigation-link/block.json +30 -0
- package/src/post-navigation-link/edit.jsx +23 -2
- package/src/post-navigation-link/index.php +94 -5
- package/src/post-navigation-link/style.scss +2 -0
- package/src/post-template/README.md +7 -0
- package/src/post-template/block.json +13 -1
- package/src/post-terms/README.md +5 -0
- package/src/post-terms/block.json +6 -0
- package/src/post-time-to-read/README.md +5 -0
- package/src/post-time-to-read/block.json +6 -0
- package/src/post-title/README.md +5 -0
- package/src/post-title/block.json +10 -0
- package/src/preformatted/README.md +6 -0
- package/src/preformatted/block.json +7 -0
- package/src/pullquote/README.md +1 -0
- package/src/pullquote/block.json +1 -0
- package/src/query-no-results/README.md +7 -0
- package/src/query-no-results/block.json +10 -2
- package/src/query-pagination/README.md +2 -0
- package/src/query-pagination/block.json +3 -0
- package/src/query-pagination-next/README.md +2 -0
- package/src/query-pagination-next/block.json +3 -0
- package/src/query-pagination-numbers/README.md +2 -0
- package/src/query-pagination-numbers/block.json +3 -0
- package/src/query-pagination-previous/README.md +2 -0
- package/src/query-pagination-previous/block.json +3 -0
- package/src/query-title/README.md +2 -0
- package/src/query-title/block.json +3 -0
- package/src/query-total/README.md +5 -0
- package/src/query-total/block.json +6 -0
- package/src/quote/README.md +1 -0
- package/src/quote/block.json +1 -0
- package/src/read-more/README.md +5 -0
- package/src/read-more/block.json +6 -0
- package/src/rss/README.md +5 -0
- package/src/rss/block.json +6 -0
- package/src/site-tagline/README.md +6 -0
- package/src/site-tagline/block.json +8 -1
- package/src/site-title/README.md +5 -0
- package/src/site-title/block.json +7 -1
- package/src/social-links/README.md +2 -0
- package/src/social-links/block.json +3 -0
- package/src/social-links/edit.jsx +2 -3
- package/src/tab-panel/README.md +9 -0
- package/src/tab-panel/block.json +25 -0
- package/src/tab-panel/controls.jsx +2 -2
- package/src/tab-panel/style.scss +5 -2
- package/src/tab-panels/README.md +7 -0
- package/src/tab-panels/block.json +18 -1
- package/src/table-of-contents/README.md +6 -0
- package/src/table-of-contents/block.json +7 -0
- package/src/tabs/README.md +9 -0
- package/src/tabs/block.json +24 -1
- package/src/tag-cloud/README.md +9 -0
- package/src/tag-cloud/block.json +19 -0
- package/src/template-part/edit/selection-modal.jsx +1 -1
- package/src/term-count/README.md +6 -0
- package/src/term-count/block.json +7 -0
- package/src/term-description/README.md +5 -0
- package/src/term-description/block.json +9 -0
- package/src/term-name/README.md +5 -0
- package/src/term-name/block.json +10 -0
- package/src/term-name/index.php +1 -1
- package/src/term-template/README.md +5 -0
- package/src/term-template/block.json +10 -1
- package/src/utils/search-patterns.js +9 -53
- package/src/utils/style-state.js +6 -4
- package/src/utils/test/{search-patterns.js → search-patterns.jsdom.test.js} +1 -22
- package/src/video/README.md +7 -0
- package/src/video/block.json +6 -0
- package/src/video/edit.jsx +56 -51
- package/src/video/index.js +0 -2
- package/src/video/save.jsx +10 -1
- package/build/video/variations.cjs +0 -75
- package/build/video/variations.cjs.map +0 -7
- package/build-module/video/variations.mjs +0 -50
- package/build-module/video/variations.mjs.map +0 -7
- package/src/video/test/variations.js +0 -63
- package/src/video/variations.js +0 -62
package/src/comments/README.md
CHANGED
|
@@ -24,8 +24,13 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
24
24
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
25
25
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `"wide"`, `"full"`
|
|
26
26
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
27
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
28
|
+
- `backgroundImage`: `true`
|
|
29
|
+
- `backgroundSize`: `true`
|
|
30
|
+
- `gradient`: `true`
|
|
27
31
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
28
32
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
33
|
+
- [`button`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-button): `true`
|
|
29
34
|
- [`heading`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-heading): `true`
|
|
30
35
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
31
36
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
package/src/comments/block.json
CHANGED
|
@@ -20,8 +20,18 @@
|
|
|
20
20
|
"anchor": true,
|
|
21
21
|
"align": [ "wide", "full" ],
|
|
22
22
|
"html": false,
|
|
23
|
+
"background": {
|
|
24
|
+
"backgroundImage": true,
|
|
25
|
+
"backgroundSize": true,
|
|
26
|
+
"gradient": true,
|
|
27
|
+
"__experimentalDefaultControls": {
|
|
28
|
+
"backgroundImage": true,
|
|
29
|
+
"gradient": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
23
32
|
"color": {
|
|
24
33
|
"gradients": true,
|
|
34
|
+
"button": true,
|
|
25
35
|
"heading": true,
|
|
26
36
|
"link": true,
|
|
27
37
|
"__experimentalDefaultControls": {
|
|
@@ -34,6 +34,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
34
34
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
35
35
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
36
36
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
37
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
38
|
+
- `gradient`: `true`
|
|
37
39
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
38
40
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
39
41
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
@@ -28,6 +28,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
28
28
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
29
29
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
30
30
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
31
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
32
|
+
- `gradient`: `true`
|
|
31
33
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
32
34
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
33
35
|
- [`text`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-text): `false`
|
|
@@ -26,6 +26,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
26
26
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
27
27
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
28
28
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
29
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
30
|
+
- `gradient`: `true`
|
|
29
31
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
30
32
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
31
33
|
- [`text`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-text): `false`
|
|
@@ -28,6 +28,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
28
28
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
29
29
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
30
30
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
31
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
32
|
+
- `gradient`: `true`
|
|
31
33
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
32
34
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
33
35
|
- [`text`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-text): `false`
|
|
@@ -31,6 +31,8 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
31
31
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
32
32
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
33
33
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
34
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
35
|
+
- `gradient`: `true`
|
|
34
36
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
35
37
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
36
38
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
package/src/cover/edit/index.jsx
CHANGED
|
@@ -703,10 +703,13 @@ function CoverEdit( {
|
|
|
703
703
|
setOverlayColor={ onSetOverlayColor }
|
|
704
704
|
coverRef={ ref }
|
|
705
705
|
currentSettings={ currentSettings }
|
|
706
|
+
onSelectMedia={ onSelectMedia }
|
|
707
|
+
onUploadError={ onUploadError }
|
|
706
708
|
toggleUseFeaturedImage={ toggleUseFeaturedImage }
|
|
707
709
|
updateDimRatio={ onUpdateDimRatio }
|
|
708
710
|
onClearMedia={ onClearMedia }
|
|
709
711
|
featuredImage={ media }
|
|
712
|
+
isSelected={ isSelected }
|
|
710
713
|
/>
|
|
711
714
|
);
|
|
712
715
|
|
|
@@ -23,8 +23,13 @@ import {
|
|
|
23
23
|
import { __ } from '@wordpress/i18n';
|
|
24
24
|
import { useSelect } from '@wordpress/data';
|
|
25
25
|
import { store as coreStore } from '@wordpress/core-data';
|
|
26
|
+
import { getFilename } from '@wordpress/url';
|
|
26
27
|
import { Link } from '@wordpress/ui';
|
|
27
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
ALLOWED_MEDIA_TYPES,
|
|
30
|
+
COVER_MIN_HEIGHT,
|
|
31
|
+
mediaPosition,
|
|
32
|
+
} from '../shared';
|
|
28
33
|
import { unlock } from '../../lock-unlock';
|
|
29
34
|
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
|
|
30
35
|
import {
|
|
@@ -35,13 +40,11 @@ import {
|
|
|
35
40
|
} from '../../utils/style-state';
|
|
36
41
|
import { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';
|
|
37
42
|
import PosterImage from '../../utils/poster-image';
|
|
43
|
+
import { MediaControl } from '../../utils/media-control';
|
|
38
44
|
|
|
39
|
-
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
ResolutionTool,
|
|
43
|
-
HTMLElementControl,
|
|
44
|
-
} = unlock( blockEditorPrivateApis );
|
|
45
|
+
const { cleanEmptyObject, ResolutionTool, HTMLElementControl } = unlock(
|
|
46
|
+
blockEditorPrivateApis
|
|
47
|
+
);
|
|
45
48
|
|
|
46
49
|
function CoverHeightInput( {
|
|
47
50
|
onChange,
|
|
@@ -98,8 +101,13 @@ export default function CoverInspectorControls( {
|
|
|
98
101
|
setOverlayColor,
|
|
99
102
|
coverRef,
|
|
100
103
|
currentSettings,
|
|
104
|
+
onSelectMedia,
|
|
105
|
+
onUploadError,
|
|
106
|
+
toggleUseFeaturedImage,
|
|
101
107
|
updateDimRatio,
|
|
108
|
+
onClearMedia,
|
|
102
109
|
featuredImage,
|
|
110
|
+
isSelected,
|
|
103
111
|
} ) {
|
|
104
112
|
const {
|
|
105
113
|
useFeaturedImage,
|
|
@@ -125,21 +133,23 @@ export default function CoverInspectorControls( {
|
|
|
125
133
|
const sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
|
|
126
134
|
|
|
127
135
|
const { gradientValue, setGradient } = __experimentalUseGradient();
|
|
128
|
-
const { imageSizes, selectedStyleState } = useSelect(
|
|
136
|
+
const { imageSizes, selectedStyleState, hasSelectedStyleState } = useSelect(
|
|
129
137
|
( select ) => {
|
|
130
|
-
const {
|
|
131
|
-
|
|
132
|
-
|
|
138
|
+
const {
|
|
139
|
+
getSettings,
|
|
140
|
+
getSelectedBlockStyleState,
|
|
141
|
+
hasSelectedBlockStyleState,
|
|
142
|
+
} = select( blockEditorStore );
|
|
133
143
|
|
|
134
144
|
return {
|
|
135
145
|
imageSizes: getSettings()?.imageSizes,
|
|
136
146
|
selectedStyleState: getSelectedBlockStyleState( clientId ),
|
|
147
|
+
hasSelectedStyleState: hasSelectedBlockStyleState( clientId ),
|
|
137
148
|
};
|
|
138
149
|
},
|
|
139
150
|
[ clientId ]
|
|
140
151
|
);
|
|
141
|
-
|
|
142
|
-
! isDefaultBlockStyleState( selectedStyleState );
|
|
152
|
+
|
|
143
153
|
const selectedStyleStateKey = getStyleStateKey( selectedStyleState );
|
|
144
154
|
const stateMinHeight = getActiveDimensionValue( {
|
|
145
155
|
attributes,
|
|
@@ -277,8 +287,49 @@ export default function CoverInspectorControls( {
|
|
|
277
287
|
|
|
278
288
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
279
289
|
|
|
290
|
+
/*
|
|
291
|
+
* Rendered whether or not media has been set, so that a cover in its setup
|
|
292
|
+
* state can be given media from the inspector as well as from the toolbar.
|
|
293
|
+
* The settings below stay behind their own condition, having nothing to
|
|
294
|
+
* configure until there is media to configure.
|
|
295
|
+
*/
|
|
296
|
+
const mediaInspectorPanel = isSelected ? (
|
|
297
|
+
<InspectorControls group="content">
|
|
298
|
+
<ToolsPanel
|
|
299
|
+
label={ __( 'Media' ) }
|
|
300
|
+
resetAll={ onClearMedia }
|
|
301
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
302
|
+
>
|
|
303
|
+
<ToolsPanelItem
|
|
304
|
+
label={ __( 'Media' ) }
|
|
305
|
+
hasValue={ () => !! url || !! useFeaturedImage }
|
|
306
|
+
onDeselect={ onClearMedia }
|
|
307
|
+
isShownByDefault
|
|
308
|
+
>
|
|
309
|
+
<MediaControl
|
|
310
|
+
mediaId={ id }
|
|
311
|
+
mediaUrl={ url }
|
|
312
|
+
filename={
|
|
313
|
+
image?.media_details?.sizes?.full?.file ||
|
|
314
|
+
image?.slug ||
|
|
315
|
+
getFilename( url )
|
|
316
|
+
}
|
|
317
|
+
allowedTypes={ ALLOWED_MEDIA_TYPES }
|
|
318
|
+
onSelect={ onSelectMedia }
|
|
319
|
+
onError={ onUploadError }
|
|
320
|
+
onReset={ onClearMedia }
|
|
321
|
+
useFeaturedImage={ useFeaturedImage }
|
|
322
|
+
onToggleFeaturedImage={ toggleUseFeaturedImage }
|
|
323
|
+
emptyLabel={ __( 'Add media' ) }
|
|
324
|
+
/>
|
|
325
|
+
</ToolsPanelItem>
|
|
326
|
+
</ToolsPanel>
|
|
327
|
+
</InspectorControls>
|
|
328
|
+
) : null;
|
|
329
|
+
|
|
280
330
|
return (
|
|
281
331
|
<>
|
|
332
|
+
{ mediaInspectorPanel }
|
|
282
333
|
{ ( !! url || useFeaturedImage ) && (
|
|
283
334
|
<InspectorControls>
|
|
284
335
|
<ToolsPanel
|
|
@@ -66,6 +66,16 @@ async function openStylesTabIfAvailable() {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
async function openSettingsTabIfAvailable() {
|
|
70
|
+
const settingsTab = screen.queryByRole( 'tab', {
|
|
71
|
+
name: 'Settings',
|
|
72
|
+
} );
|
|
73
|
+
|
|
74
|
+
if ( settingsTab ) {
|
|
75
|
+
await userEvent.click( settingsTab );
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
69
79
|
describe( 'Cover block', () => {
|
|
70
80
|
beforeEach( () => registerCoreBlocks() );
|
|
71
81
|
|
|
@@ -207,11 +217,12 @@ describe( 'Cover block', () => {
|
|
|
207
217
|
} )
|
|
208
218
|
).not.toBeInTheDocument();
|
|
209
219
|
} );
|
|
210
|
-
test( 'does not display settings tab when
|
|
220
|
+
test( 'does not display settings panel in the settings tab when the block has no media', async () => {
|
|
211
221
|
await createAndSelectBlock();
|
|
212
222
|
|
|
223
|
+
await openSettingsTabIfAvailable();
|
|
213
224
|
expect(
|
|
214
|
-
screen.queryByRole( '
|
|
225
|
+
screen.queryByRole( 'heading', {
|
|
215
226
|
name: 'Settings',
|
|
216
227
|
} )
|
|
217
228
|
).not.toBeInTheDocument();
|
|
@@ -227,6 +238,7 @@ describe( 'Cover block', () => {
|
|
|
227
238
|
} );
|
|
228
239
|
|
|
229
240
|
await selectBlock( 'Block: Cover' );
|
|
241
|
+
await openSettingsTabIfAvailable();
|
|
230
242
|
expect(
|
|
231
243
|
await screen.findByRole( 'heading', { name: 'Settings' } )
|
|
232
244
|
).toBeInTheDocument();
|
|
@@ -241,6 +253,7 @@ describe( 'Cover block', () => {
|
|
|
241
253
|
'has-parallax'
|
|
242
254
|
);
|
|
243
255
|
await selectBlock( 'Block: Cover' );
|
|
256
|
+
await openSettingsTabIfAvailable();
|
|
244
257
|
await userEvent.click(
|
|
245
258
|
await screen.findByLabelText( 'Fixed background' )
|
|
246
259
|
);
|
|
@@ -257,6 +270,7 @@ describe( 'Cover block', () => {
|
|
|
257
270
|
'is-repeated'
|
|
258
271
|
);
|
|
259
272
|
await selectBlock( 'Block: Cover' );
|
|
273
|
+
await openSettingsTabIfAvailable();
|
|
260
274
|
await userEvent.click(
|
|
261
275
|
await screen.findByLabelText( 'Repeated background' )
|
|
262
276
|
);
|
|
@@ -271,6 +285,7 @@ describe( 'Cover block', () => {
|
|
|
271
285
|
} );
|
|
272
286
|
|
|
273
287
|
await selectBlock( 'Block: Cover' );
|
|
288
|
+
await openSettingsTabIfAvailable();
|
|
274
289
|
await userEvent.clear( await screen.findByLabelText( 'Left' ) );
|
|
275
290
|
await userEvent.type( screen.getByLabelText( 'Left' ), '100' );
|
|
276
291
|
|
|
@@ -288,6 +303,7 @@ describe( 'Cover block', () => {
|
|
|
288
303
|
} );
|
|
289
304
|
|
|
290
305
|
await selectBlock( 'Block: Cover' );
|
|
306
|
+
await openSettingsTabIfAvailable();
|
|
291
307
|
await userEvent.type(
|
|
292
308
|
await screen.findByLabelText( 'Alternative text' ),
|
|
293
309
|
'Me'
|
package/src/details/README.md
CHANGED
|
@@ -26,9 +26,15 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
26
26
|
|
|
27
27
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `"wide"`, `"full"`
|
|
28
28
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
29
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
30
|
+
- `backgroundImage`: `true`
|
|
31
|
+
- `backgroundSize`: `true`
|
|
32
|
+
- `gradient`: `true`
|
|
29
33
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
30
34
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
31
35
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
36
|
+
- [`heading`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-heading): `true`
|
|
37
|
+
- [`button`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-button): `true`
|
|
32
38
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
33
39
|
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
34
40
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
package/src/details/block.json
CHANGED
|
@@ -32,9 +32,20 @@
|
|
|
32
32
|
"__experimentalOnEnter": true,
|
|
33
33
|
"align": [ "wide", "full" ],
|
|
34
34
|
"anchor": true,
|
|
35
|
+
"background": {
|
|
36
|
+
"backgroundImage": true,
|
|
37
|
+
"backgroundSize": true,
|
|
38
|
+
"gradient": true,
|
|
39
|
+
"__experimentalDefaultControls": {
|
|
40
|
+
"backgroundImage": true,
|
|
41
|
+
"gradient": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
35
44
|
"color": {
|
|
36
45
|
"gradients": true,
|
|
37
46
|
"link": true,
|
|
47
|
+
"heading": true,
|
|
48
|
+
"button": true,
|
|
38
49
|
"__experimentalDefaultControls": {
|
|
39
50
|
"background": true,
|
|
40
51
|
"text": true
|
package/src/file/README.md
CHANGED
|
@@ -33,6 +33,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
33
33
|
|
|
34
34
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
35
35
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
36
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
37
|
+
- `backgroundImage`: `true`
|
|
38
|
+
- `backgroundSize`: `true`
|
|
39
|
+
- `gradient`: `true`
|
|
36
40
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
37
41
|
- `margin`: `true`
|
|
38
42
|
- `padding`: `true`
|
package/src/file/block.json
CHANGED
|
@@ -65,6 +65,15 @@
|
|
|
65
65
|
"supports": {
|
|
66
66
|
"anchor": true,
|
|
67
67
|
"align": true,
|
|
68
|
+
"background": {
|
|
69
|
+
"backgroundImage": true,
|
|
70
|
+
"backgroundSize": true,
|
|
71
|
+
"gradient": true,
|
|
72
|
+
"__experimentalDefaultControls": {
|
|
73
|
+
"backgroundImage": true,
|
|
74
|
+
"gradient": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
68
77
|
"spacing": {
|
|
69
78
|
"margin": true,
|
|
70
79
|
"padding": true
|
package/src/footnotes/README.md
CHANGED
|
@@ -20,6 +20,10 @@ _This block has no custom attributes._
|
|
|
20
20
|
_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/) property in block.json._
|
|
21
21
|
|
|
22
22
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
23
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
24
|
+
- `backgroundImage`: `true`
|
|
25
|
+
- `backgroundSize`: `true`
|
|
26
|
+
- `gradient`: `true`
|
|
23
27
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
24
28
|
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-background): `true`
|
|
25
29
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
package/src/footnotes/block.json
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"usesContext": [ "postId", "postType" ],
|
|
11
11
|
"supports": {
|
|
12
12
|
"anchor": true,
|
|
13
|
+
"background": {
|
|
14
|
+
"backgroundImage": true,
|
|
15
|
+
"backgroundSize": true,
|
|
16
|
+
"gradient": true,
|
|
17
|
+
"__experimentalDefaultControls": {
|
|
18
|
+
"backgroundImage": true,
|
|
19
|
+
"gradient": true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
13
22
|
"__experimentalBorder": {
|
|
14
23
|
"radius": true,
|
|
15
24
|
"color": true,
|
package/src/gallery/README.md
CHANGED
|
@@ -42,6 +42,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
42
42
|
|
|
43
43
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
44
44
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
45
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
46
|
+
- `backgroundImage`: `true`
|
|
47
|
+
- `backgroundSize`: `true`
|
|
48
|
+
- `gradient`: `true`
|
|
45
49
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
46
50
|
- `units`: `"px"`, `"em"`, `"rem"`, `"vh"`, `"vw"`
|
|
47
51
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
package/src/gallery/block.json
CHANGED
|
@@ -127,6 +127,15 @@
|
|
|
127
127
|
"supports": {
|
|
128
128
|
"anchor": true,
|
|
129
129
|
"align": true,
|
|
130
|
+
"background": {
|
|
131
|
+
"backgroundImage": true,
|
|
132
|
+
"backgroundSize": true,
|
|
133
|
+
"gradient": true,
|
|
134
|
+
"__experimentalDefaultControls": {
|
|
135
|
+
"backgroundImage": true,
|
|
136
|
+
"gradient": true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
130
139
|
"__experimentalBorder": {
|
|
131
140
|
"radius": true,
|
|
132
141
|
"color": true,
|
package/src/gallery/edit.jsx
CHANGED
|
@@ -65,7 +65,6 @@ import GalleryStyles from './gallery-styles';
|
|
|
65
65
|
import useDynamicGallery from './use-dynamic-gallery';
|
|
66
66
|
import { GallerySourcePanel, GalleryDynamicView } from './dynamic-gallery';
|
|
67
67
|
import { getDynamicSource, ATTACHED_MEDIA } from './dynamic-source';
|
|
68
|
-
import { unlock } from '../lock-unlock';
|
|
69
68
|
import {
|
|
70
69
|
getViewportGalleryStyle,
|
|
71
70
|
getUpdatedGalleryStyle,
|
|
@@ -238,7 +237,7 @@ export default function GalleryEdit( props ) {
|
|
|
238
237
|
getSettings: _getSettings,
|
|
239
238
|
getBlock: _getBlock,
|
|
240
239
|
getSelectedBlockStyleState,
|
|
241
|
-
} =
|
|
240
|
+
} = select( blockEditorStore );
|
|
242
241
|
const multiSelectedClientIds = getMultiSelectedBlockClientIds();
|
|
243
242
|
|
|
244
243
|
return {
|
package/src/group/README.md
CHANGED
|
@@ -48,6 +48,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
48
48
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
49
49
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
50
50
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
51
|
+
- `textColumns`: `true`
|
|
51
52
|
- [`layout`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout):
|
|
52
53
|
- [`allowSizingOnChildren`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowsizingonchildren): `true`
|
|
53
54
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
package/src/group/block.json
CHANGED
package/src/heading/README.md
CHANGED
|
@@ -28,6 +28,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
28
28
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
29
29
|
- [`className`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#classname): `true`
|
|
30
30
|
- [`splitting`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#splitting): `true`
|
|
31
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
32
|
+
- `backgroundImage`: `true`
|
|
33
|
+
- `backgroundSize`: `true`
|
|
34
|
+
- `gradient`: `true`
|
|
31
35
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
32
36
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
33
37
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
package/src/heading/block.json
CHANGED
|
@@ -30,6 +30,15 @@
|
|
|
30
30
|
"anchor": true,
|
|
31
31
|
"className": true,
|
|
32
32
|
"splitting": true,
|
|
33
|
+
"background": {
|
|
34
|
+
"backgroundImage": true,
|
|
35
|
+
"backgroundSize": true,
|
|
36
|
+
"gradient": true,
|
|
37
|
+
"__experimentalDefaultControls": {
|
|
38
|
+
"backgroundImage": true,
|
|
39
|
+
"gradient": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
33
42
|
"__experimentalBorder": {
|
|
34
43
|
"color": true,
|
|
35
44
|
"radius": true,
|
package/src/home-link/README.md
CHANGED
|
@@ -30,9 +30,14 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
30
30
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
31
31
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
32
32
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
33
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
34
|
+
- `backgroundImage`: `true`
|
|
35
|
+
- `backgroundSize`: `true`
|
|
36
|
+
- `gradient`: `true`
|
|
33
37
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
34
38
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
35
39
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
40
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
36
41
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
37
42
|
- `clientNavigation`: `true`
|
|
38
43
|
|
package/src/home-link/block.json
CHANGED
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
"anchor": true,
|
|
34
34
|
"reusable": false,
|
|
35
35
|
"html": false,
|
|
36
|
+
"background": {
|
|
37
|
+
"backgroundImage": true,
|
|
38
|
+
"backgroundSize": true,
|
|
39
|
+
"gradient": true
|
|
40
|
+
},
|
|
36
41
|
"typography": {
|
|
37
42
|
"fontSize": true,
|
|
38
43
|
"lineHeight": true,
|
|
@@ -46,6 +51,19 @@
|
|
|
46
51
|
"fontSize": true
|
|
47
52
|
}
|
|
48
53
|
},
|
|
54
|
+
"shadow": true,
|
|
55
|
+
"__experimentalBorder": {
|
|
56
|
+
"color": true,
|
|
57
|
+
"radius": true,
|
|
58
|
+
"style": true,
|
|
59
|
+
"width": true,
|
|
60
|
+
"__experimentalDefaultControls": {
|
|
61
|
+
"color": false,
|
|
62
|
+
"radius": false,
|
|
63
|
+
"style": false,
|
|
64
|
+
"width": false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
49
67
|
"interactivity": {
|
|
50
68
|
"clientNavigation": true
|
|
51
69
|
}
|
package/src/home-link/edit.jsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '@wordpress/block-editor';
|
|
8
8
|
import {
|
|
9
9
|
Button,
|
|
10
|
-
CheckboxControl,
|
|
10
|
+
CheckboxControl as WCCheckboxControl,
|
|
11
11
|
TextControl,
|
|
12
12
|
TextareaControl as WCTextareaControl,
|
|
13
13
|
__experimentalToolsPanel as ToolsPanel,
|
|
@@ -113,7 +113,7 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
|
|
|
113
113
|
}
|
|
114
114
|
isShownByDefault
|
|
115
115
|
>
|
|
116
|
-
<
|
|
116
|
+
<WCCheckboxControl
|
|
117
117
|
label={ __( 'Open in new tab' ) }
|
|
118
118
|
checked={ opensInNewTab }
|
|
119
119
|
onChange={ ( value ) =>
|
package/src/icon/index.php
CHANGED
|
@@ -19,6 +19,15 @@ function render_block_core_icon( $attributes ) {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Icons in non-public collections are not available in the editor, so do not render them either.
|
|
23
|
+
$registered_icon = WP_Icons_Registry::get_instance()->get_registered_icon( $attributes['icon'] );
|
|
24
|
+
if ( null !== $registered_icon ) {
|
|
25
|
+
$icon_collection = WP_Icon_Collections_Registry::get_instance()->get_registered( $registered_icon['collection'] );
|
|
26
|
+
if ( null !== $icon_collection && ! $icon_collection['public'] ) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
// Text color and background color.
|
|
23
32
|
$color_styles = array();
|
|
24
33
|
|
package/src/image/editor.scss
CHANGED
|
@@ -47,6 +47,14 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
47
47
|
transform: translate(-50%, -50%);
|
|
48
48
|
margin: 0;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
.components-resizable-box__container {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.components-resizable-box__handle {
|
|
56
|
+
pointer-events: auto;
|
|
57
|
+
}
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
// Shown while image is being uploaded but cannot be previewed.
|