@wordpress/block-library 6.1.0 → 7.0.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 +10 -0
- package/README.md +7 -1
- package/build/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/calendar/index.js +4 -1
- package/build/calendar/index.js.map +1 -1
- package/build/calendar/transforms.js +27 -0
- package/build/calendar/transforms.js.map +1 -0
- package/build/code/index.js +5 -1
- package/build/code/index.js.map +1 -1
- package/build/code/transforms.js +1 -1
- package/build/code/transforms.js.map +1 -1
- package/build/column/index.js +5 -1
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +5 -1
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/index.js +4 -1
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +6 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +5 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +6 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +5 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +5 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +49 -11
- package/build/comment-template/edit.js.map +1 -1
- package/build/comments-pagination/index.js +6 -1
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +4 -1
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +4 -1
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/comments-query-loop/index.js +6 -1
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/deprecated.js +181 -15
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +7 -4
- package/build/cover/edit.js.map +1 -1
- package/build/cover/save.js +8 -3
- package/build/cover/save.js.map +1 -1
- package/build/gallery/constants.js +5 -1
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/edit.js +26 -14
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/shared.js +1 -1
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +8 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/utils.js +4 -3
- package/build/gallery/utils.js.map +1 -1
- package/build/group/index.js +5 -1
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +18 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/index.js +5 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +7 -5
- package/build/heading/transforms.js.map +1 -1
- package/build/image/edit.native.js +55 -15
- package/build/image/edit.native.js.map +1 -1
- package/build/index.js +7 -3
- package/build/index.js.map +1 -1
- package/build/latest-posts/edit.js +46 -57
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/index.js +5 -1
- package/build/list/index.js.map +1 -1
- package/build/media-text/index.js +5 -1
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/edit/existing-menus-options.js +62 -0
- package/build/navigation/edit/existing-menus-options.js.map +1 -0
- package/build/navigation/edit/index.js +4 -5
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +7 -3
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +25 -33
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +0 -1
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +26 -71
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/placeholder/placeholder-preview.js +8 -12
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build/paragraph/index.js +5 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +5 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +5 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/edit.js +76 -0
- package/build/post-author-biography/edit.js.map +1 -0
- package/build/post-author-biography/index.js +68 -0
- package/build/post-author-biography/index.js.map +1 -0
- package/build/post-author-name/index.js +6 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments/index.js +5 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +5 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +5 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +5 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +9 -3
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/index.js +6 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/index.js +6 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-terms/index.js +9 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +10 -7
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +6 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/index.js +5 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +5 -1
- package/build/pullquote/index.js.map +1 -1
- package/build/query/index.js +5 -1
- package/build/query/index.js.map +1 -1
- package/build/query-pagination/index.js +6 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +4 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +4 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +8 -1
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -5
- package/build/quote/index.js.map +1 -1
- package/build/read-more/edit.js +55 -0
- package/build/read-more/edit.js.map +1 -0
- package/build/read-more/index.js +87 -0
- package/build/read-more/index.js.map +1 -0
- package/build/search/edit.js +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/index.js +5 -1
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +4 -8
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +7 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +5 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +6 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +8 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +1 -1
- package/build/social-links/edit.js +7 -2
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +5 -0
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +2 -0
- package/build/social-links/save.js.map +1 -1
- package/build/table/index.js +5 -1
- package/build/table/index.js.map +1 -1
- package/build/tag-cloud/index.js +12 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/tag-cloud/transforms.js +27 -0
- package/build/tag-cloud/transforms.js.map +1 -0
- package/build/term-description/index.js +5 -1
- package/build/term-description/index.js.map +1 -1
- package/build/verse/index.js +5 -1
- package/build/verse/index.js.map +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/calendar/index.js +3 -1
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/calendar/transforms.js +18 -0
- package/build-module/calendar/transforms.js.map +1 -0
- package/build-module/code/index.js +5 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/code/transforms.js +1 -1
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/column/index.js +5 -1
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +5 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +4 -1
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +6 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +5 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +6 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +5 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +5 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +48 -13
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comments-pagination/index.js +6 -1
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +4 -1
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +4 -1
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/comments-query-loop/index.js +6 -1
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/deprecated.js +185 -17
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +7 -4
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/save.js +8 -3
- package/build-module/cover/save.js.map +1 -1
- package/build-module/gallery/constants.js +2 -0
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/edit.js +25 -14
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/shared.js +1 -1
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +8 -2
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/utils.js +5 -4
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/index.js +5 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +18 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/index.js +5 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +7 -5
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/edit.native.js +54 -15
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/index.js +5 -3
- package/build-module/index.js.map +1 -1
- package/build-module/latest-posts/edit.js +47 -58
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/index.js +5 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/media-text/index.js +5 -1
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/edit/existing-menus-options.js +53 -0
- package/build-module/navigation/edit/existing-menus-options.js.map +1 -0
- package/build-module/navigation/edit/index.js +4 -5
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +8 -4
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +26 -33
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +0 -1
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +26 -71
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +8 -13
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build-module/paragraph/index.js +5 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +5 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +5 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/edit.js +64 -0
- package/build-module/post-author-biography/edit.js.map +1 -0
- package/build-module/post-author-biography/index.js +59 -0
- package/build-module/post-author-biography/index.js.map +1 -0
- package/build-module/post-author-name/index.js +6 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments/index.js +5 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +5 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +5 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +5 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +6 -4
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/index.js +6 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/index.js +6 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-terms/index.js +12 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +10 -8
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +6 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/index.js +5 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +5 -1
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/index.js +5 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/query-pagination/index.js +6 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +4 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +4 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +11 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -5
- package/build-module/quote/index.js.map +1 -1
- package/build-module/read-more/edit.js +41 -0
- package/build-module/read-more/edit.js.map +1 -0
- package/build-module/read-more/index.js +74 -0
- package/build-module/read-more/index.js.map +1 -0
- package/build-module/search/edit.js +1 -1
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/index.js +5 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -8
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +6 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +5 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +6 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +8 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +1 -1
- package/build-module/social-links/edit.js +7 -2
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +5 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +2 -0
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/table/index.js +5 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +11 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/tag-cloud/transforms.js +18 -0
- package/build-module/tag-cloud/transforms.js.map +1 -0
- package/build-module/term-description/index.js +5 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/verse/index.js +5 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-style/common-rtl.css +8 -0
- package/build-style/common.css +8 -0
- package/build-style/cover/style-rtl.css +115 -11
- package/build-style/cover/style.css +115 -11
- package/build-style/editor-rtl.css +77 -67
- package/build-style/editor.css +77 -67
- package/build-style/gallery/style-rtl.css +2 -1
- package/build-style/gallery/style.css +2 -1
- package/build-style/image/style-rtl.css +0 -2
- package/build-style/image/style.css +0 -2
- package/build-style/navigation/editor-rtl.css +77 -67
- package/build-style/navigation/editor.css +77 -67
- package/build-style/quote/style-rtl.css +5 -5
- package/build-style/quote/style.css +5 -5
- package/build-style/read-more/style-rtl.css +87 -0
- package/build-style/read-more/style.css +87 -0
- package/build-style/separator/style-rtl.css +0 -3
- package/build-style/separator/style.css +0 -3
- package/build-style/social-links/style-rtl.css +7 -1
- package/build-style/social-links/style.css +7 -1
- package/build-style/style-rtl.css +149 -23
- package/build-style/style.css +149 -23
- package/package.json +28 -30
- package/src/audio/edit.js +1 -1
- package/src/block/test/edit.native.js +7 -3
- package/src/button/block.json +5 -1
- package/src/buttons/test/edit.native.js +2 -2
- package/src/calendar/index.js +2 -0
- package/src/calendar/transforms.js +23 -0
- package/src/code/block.json +5 -1
- package/src/code/transforms.js +1 -1
- package/src/column/block.json +5 -1
- package/src/columns/block.json +5 -1
- package/src/comment-author-avatar/block.json +4 -1
- package/src/comment-author-name/block.json +6 -1
- package/src/comment-content/block.json +5 -1
- package/src/comment-date/block.json +6 -1
- package/src/comment-date/index.php +1 -1
- package/src/comment-edit-link/block.json +5 -1
- package/src/comment-reply-link/block.json +5 -1
- package/src/comment-template/edit.js +59 -14
- package/src/comments-pagination/block.json +6 -1
- package/src/comments-pagination-next/block.json +4 -1
- package/src/comments-pagination-previous/block.json +4 -1
- package/src/comments-query-loop/block.json +6 -1
- package/src/common.scss +9 -0
- package/src/cover/deprecated.js +211 -1
- package/src/cover/edit.js +8 -4
- package/src/cover/save.js +10 -4
- package/src/cover/style.scss +20 -2
- package/src/cover/test/__snapshots__/edit.native.js.snap +4 -4
- package/src/cover/test/edit.native.js +8 -4
- package/src/embed/test/index.native.js +6 -6
- package/src/gallery/constants.js +2 -0
- package/src/gallery/edit.js +31 -13
- package/src/gallery/shared.js +1 -1
- package/src/gallery/style.scss +4 -1
- package/src/gallery/test/__snapshots__/index.native.js.snap +7 -0
- package/src/gallery/test/index.native.js +128 -0
- package/src/gallery/transforms.js +7 -1
- package/src/gallery/utils.js +7 -3
- package/src/group/block.json +5 -1
- package/src/group/variations.js +11 -1
- package/src/heading/block.json +5 -1
- package/src/heading/transforms.js +2 -5
- package/src/image/edit.native.js +65 -15
- package/src/image/index.php +1 -1
- package/src/image/style.scss +0 -2
- package/src/image/test/edit.native.js +157 -8
- package/src/index.js +35 -31
- package/src/latest-comments/index.php +4 -4
- package/src/latest-posts/edit.js +51 -63
- package/src/latest-posts/index.php +3 -3
- package/src/list/block.json +5 -1
- package/src/media-text/block.json +5 -1
- package/src/missing/test/edit-integration.native.js +2 -2
- package/src/navigation/edit/existing-menus-options.js +70 -0
- package/src/navigation/edit/index.js +4 -3
- package/src/navigation/edit/inner-blocks.js +16 -3
- package/src/navigation/edit/navigation-menu-selector.js +38 -62
- package/src/navigation/edit/overlay-menu-icon.js +0 -1
- package/src/navigation/edit/placeholder/index.js +39 -108
- package/src/navigation/edit/placeholder/placeholder-preview.js +8 -10
- package/src/navigation/editor.scss +119 -100
- package/src/navigation/index.php +3 -3
- package/src/navigation-link/index.php +1 -1
- package/src/navigation-submenu/index.php +1 -1
- package/src/page-list/index.php +5 -5
- package/src/paragraph/block.json +5 -1
- package/src/post-author/block.json +5 -1
- package/src/post-author-biography/block.json +41 -0
- package/src/post-author-biography/edit.js +63 -0
- package/src/post-author-biography/index.js +18 -0
- package/src/post-author-biography/index.php +48 -0
- package/src/post-author-name/block.json +6 -1
- package/src/post-comments/block.json +5 -1
- package/src/post-comments-count/block.json +5 -1
- package/src/post-comments-form/block.json +5 -1
- package/src/post-comments-link/block.json +5 -1
- package/src/post-comments-link/index.php +2 -2
- package/src/post-content/edit.js +4 -4
- package/src/post-date/block.json +6 -1
- package/src/post-date/index.php +1 -1
- package/src/post-excerpt/block.json +6 -1
- package/src/post-excerpt/index.php +1 -1
- package/src/post-terms/block.json +6 -1
- package/src/post-terms/index.js +6 -0
- package/src/post-title/block.json +6 -1
- package/src/post-title/edit.js +8 -7
- package/src/post-title/index.php +1 -1
- package/src/preformatted/block.json +5 -1
- package/src/pullquote/block.json +5 -1
- package/src/query/block.json +5 -1
- package/src/query-pagination/block.json +6 -1
- package/src/query-pagination-next/block.json +4 -1
- package/src/query-pagination-next/index.php +2 -2
- package/src/query-pagination-previous/block.json +4 -1
- package/src/query-pagination-previous/index.php +2 -2
- package/src/query-title/block.json +5 -1
- package/src/query-title/index.js +6 -0
- package/src/quote/block.json +1 -2
- package/src/quote/index.js +0 -1
- package/src/quote/style.scss +3 -3
- package/src/quote/theme.scss +1 -1
- package/src/read-more/block.json +56 -0
- package/src/read-more/edit.js +50 -0
- package/src/read-more/index.js +18 -0
- package/src/read-more/index.php +45 -0
- package/src/read-more/style.scss +12 -0
- package/src/search/block.json +5 -1
- package/src/search/edit.js +2 -1
- package/src/search/index.php +5 -3
- package/src/separator/style.scss +0 -5
- package/src/site-logo/edit.js +4 -8
- package/src/site-tagline/block.json +5 -1
- package/src/site-tagline/edit.js +10 -1
- package/src/site-tagline/index.php +1 -1
- package/src/site-title/block.json +6 -1
- package/src/site-title/index.php +2 -2
- package/src/social-link/block.json +1 -0
- package/src/social-link/edit.js +14 -2
- package/src/social-link/index.php +55 -52
- package/src/social-links/block.json +5 -0
- package/src/social-links/edit.js +8 -1
- package/src/social-links/save.js +7 -1
- package/src/social-links/style.scss +8 -1
- package/src/style.scss +1 -0
- package/src/table/block.json +5 -1
- package/src/tag-cloud/block.json +4 -0
- package/src/tag-cloud/index.js +2 -0
- package/src/tag-cloud/index.php +0 -9
- package/src/tag-cloud/transforms.js +23 -0
- package/src/term-description/block.json +5 -1
- package/src/verse/block.json +5 -1
|
@@ -74,7 +74,11 @@ describe( 'Reusable block', () => {
|
|
|
74
74
|
return Promise.resolve( response );
|
|
75
75
|
} );
|
|
76
76
|
|
|
77
|
-
const {
|
|
77
|
+
const {
|
|
78
|
+
getByA11yLabel,
|
|
79
|
+
getByTestId,
|
|
80
|
+
getByText,
|
|
81
|
+
} = await initializeEditor( {
|
|
78
82
|
initialHtml: '',
|
|
79
83
|
capabilities: { reusableBlock: true },
|
|
80
84
|
} );
|
|
@@ -123,7 +127,7 @@ describe( 'Reusable block', () => {
|
|
|
123
127
|
const id = 3;
|
|
124
128
|
const initialHtml = `<!-- wp:block {"ref":${ id }} /-->`;
|
|
125
129
|
|
|
126
|
-
const { getByA11yLabel } = initializeEditor( {
|
|
130
|
+
const { getByA11yLabel } = await initializeEditor( {
|
|
127
131
|
initialHtml,
|
|
128
132
|
} );
|
|
129
133
|
|
|
@@ -158,7 +162,7 @@ describe( 'Reusable block', () => {
|
|
|
158
162
|
return Promise.resolve( response );
|
|
159
163
|
} );
|
|
160
164
|
|
|
161
|
-
const { getByA11yLabel } = initializeEditor( {
|
|
165
|
+
const { getByA11yLabel } = await initializeEditor( {
|
|
162
166
|
initialHtml,
|
|
163
167
|
} );
|
|
164
168
|
|
package/src/button/block.json
CHANGED
|
@@ -60,7 +60,11 @@
|
|
|
60
60
|
"alignWide": false,
|
|
61
61
|
"color": {
|
|
62
62
|
"__experimentalSkipSerialization": true,
|
|
63
|
-
"gradients": true
|
|
63
|
+
"gradients": true,
|
|
64
|
+
"__experimentalDefaultControls": {
|
|
65
|
+
"background": true,
|
|
66
|
+
"text": true
|
|
67
|
+
}
|
|
64
68
|
},
|
|
65
69
|
"typography": {
|
|
66
70
|
"fontSize": true,
|
|
@@ -35,7 +35,7 @@ describe( 'Buttons block', () => {
|
|
|
35
35
|
<div class="wp-block-button"><a class="wp-block-button__link" style="border-radius:5px" >Hello</a></div>
|
|
36
36
|
<!-- /wp:button --></div>
|
|
37
37
|
<!-- /wp:buttons -->`;
|
|
38
|
-
const { getByA11yLabel } = initializeEditor( {
|
|
38
|
+
const { getByA11yLabel } = await initializeEditor( {
|
|
39
39
|
initialHtml,
|
|
40
40
|
} );
|
|
41
41
|
|
|
@@ -90,7 +90,7 @@ describe( 'Buttons block', () => {
|
|
|
90
90
|
const initialHtml = `<!-- wp:buttons -->
|
|
91
91
|
<div class="wp-block-buttons"><!-- wp:button /--></div>
|
|
92
92
|
<!-- /wp:buttons -->`;
|
|
93
|
-
const { getByA11yLabel, getByText } = initializeEditor( {
|
|
93
|
+
const { getByA11yLabel, getByText } = await initializeEditor( {
|
|
94
94
|
initialHtml,
|
|
95
95
|
} );
|
|
96
96
|
|
package/src/calendar/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { calendar as icon } from '@wordpress/icons';
|
|
|
8
8
|
*/
|
|
9
9
|
import metadata from './block.json';
|
|
10
10
|
import edit from './edit';
|
|
11
|
+
import transforms from './transforms';
|
|
11
12
|
|
|
12
13
|
const { name } = metadata;
|
|
13
14
|
|
|
@@ -17,4 +18,5 @@ export const settings = {
|
|
|
17
18
|
icon,
|
|
18
19
|
example: {},
|
|
19
20
|
edit,
|
|
21
|
+
transforms,
|
|
20
22
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createBlock } from '@wordpress/blocks';
|
|
5
|
+
|
|
6
|
+
const transforms = {
|
|
7
|
+
from: [
|
|
8
|
+
{
|
|
9
|
+
type: 'block',
|
|
10
|
+
blocks: [ 'core/archives' ],
|
|
11
|
+
transform: () => createBlock( 'core/calendar' ),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
to: [
|
|
15
|
+
{
|
|
16
|
+
type: 'block',
|
|
17
|
+
blocks: [ 'core/archives' ],
|
|
18
|
+
transform: () => createBlock( 'core/archives' ),
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default transforms;
|
package/src/code/block.json
CHANGED
package/src/code/transforms.js
CHANGED
package/src/column/block.json
CHANGED
package/src/columns/block.json
CHANGED
|
@@ -31,7 +31,7 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
|
|
|
31
31
|
$link = get_comment_link( $comment );
|
|
32
32
|
|
|
33
33
|
if ( ! empty( $attributes['isLink'] ) ) {
|
|
34
|
-
$formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ),
|
|
34
|
+
$formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ), $formatted_date );
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return sprintf(
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useState, useMemo } from '@wordpress/element';
|
|
4
|
+
import { useState, useMemo, memo } from '@wordpress/element';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
import {
|
|
8
8
|
BlockContextProvider,
|
|
9
|
-
BlockPreview,
|
|
10
9
|
useBlockProps,
|
|
11
10
|
useInnerBlocksProps,
|
|
12
11
|
store as blockEditorStore,
|
|
12
|
+
__experimentalUseBlockPreview as useBlockPreview,
|
|
13
13
|
} from '@wordpress/block-editor';
|
|
14
14
|
import { Spinner } from '@wordpress/components';
|
|
15
15
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -35,7 +35,7 @@ const TEMPLATE = [
|
|
|
35
35
|
* @param {Array} [props.comment] - A comment object.
|
|
36
36
|
* @param {Array} [props.activeComment] - The block that is currently active.
|
|
37
37
|
* @param {Array} [props.setActiveComment] - The setter for activeComment.
|
|
38
|
-
* @param {Array} [props.
|
|
38
|
+
* @param {Array} [props.firstComment] - First comment in the array.
|
|
39
39
|
* @param {Array} [props.blocks] - Array of blocks returned from
|
|
40
40
|
* getBlocks() in parent .
|
|
41
41
|
* @return {WPElement} Inner blocks of the Comment Template
|
|
@@ -44,7 +44,7 @@ function CommentTemplateInnerBlocks( {
|
|
|
44
44
|
comment,
|
|
45
45
|
activeComment,
|
|
46
46
|
setActiveComment,
|
|
47
|
-
|
|
47
|
+
firstComment,
|
|
48
48
|
blocks,
|
|
49
49
|
} ) {
|
|
50
50
|
const { children, ...innerBlocksProps } = useInnerBlocksProps(
|
|
@@ -53,15 +53,22 @@ function CommentTemplateInnerBlocks( {
|
|
|
53
53
|
);
|
|
54
54
|
return (
|
|
55
55
|
<li { ...innerBlocksProps }>
|
|
56
|
-
{ comment === ( activeComment ||
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
{ comment === ( activeComment || firstComment ) ? children : null }
|
|
57
|
+
|
|
58
|
+
{ /* To avoid flicker when switching active block contexts, a preview
|
|
59
|
+
is ALWAYS rendered and the preview for the active block is hidden.
|
|
60
|
+
This ensures that when switching the active block, the component is not
|
|
61
|
+
mounted again but rather it only toggles the `isHidden` prop.
|
|
62
|
+
|
|
63
|
+
The same strategy is used for preventing the flicker in the Post Template
|
|
64
|
+
block. */ }
|
|
65
|
+
<MemoizedCommentTemplatePreview
|
|
66
|
+
blocks={ blocks }
|
|
67
|
+
comment={ comment }
|
|
68
|
+
setActiveComment={ setActiveComment }
|
|
69
|
+
isHidden={ comment === ( activeComment || firstComment ) }
|
|
70
|
+
/>
|
|
71
|
+
|
|
65
72
|
{ comment?.children?.length > 0 ? (
|
|
66
73
|
<CommentsList
|
|
67
74
|
comments={ comment.children }
|
|
@@ -74,6 +81,44 @@ function CommentTemplateInnerBlocks( {
|
|
|
74
81
|
);
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
const CommentTemplatePreview = ( {
|
|
85
|
+
blocks,
|
|
86
|
+
comment,
|
|
87
|
+
setActiveComment,
|
|
88
|
+
isHidden,
|
|
89
|
+
} ) => {
|
|
90
|
+
const blockPreviewProps = useBlockPreview( {
|
|
91
|
+
blocks,
|
|
92
|
+
} );
|
|
93
|
+
|
|
94
|
+
const handleOnClick = () => {
|
|
95
|
+
setActiveComment( comment );
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// We have to hide the preview block if the `comment` props points to
|
|
99
|
+
// the curently active block!
|
|
100
|
+
|
|
101
|
+
// Or, to put it differently, every preview block is visible unless it is the
|
|
102
|
+
// currently active block - in this case we render its inner blocks.
|
|
103
|
+
const style = {
|
|
104
|
+
display: isHidden ? 'none' : undefined,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<div
|
|
109
|
+
{ ...blockPreviewProps }
|
|
110
|
+
tabIndex={ 0 }
|
|
111
|
+
role="button"
|
|
112
|
+
style={ style }
|
|
113
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
|
|
114
|
+
onClick={ handleOnClick }
|
|
115
|
+
onKeyPress={ handleOnClick }
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const MemoizedCommentTemplatePreview = memo( CommentTemplatePreview );
|
|
121
|
+
|
|
77
122
|
/**
|
|
78
123
|
* Component that renders a list of (nested) comments. It is called recursively.
|
|
79
124
|
*
|
|
@@ -105,7 +150,7 @@ const CommentsList = ( {
|
|
|
105
150
|
activeComment={ activeComment }
|
|
106
151
|
setActiveComment={ setActiveComment }
|
|
107
152
|
blocks={ blocks }
|
|
108
|
-
|
|
153
|
+
firstComment={ comments[ 0 ] }
|
|
109
154
|
/>
|
|
110
155
|
</BlockContextProvider>
|
|
111
156
|
) ) }
|
package/src/common.scss
CHANGED
package/src/cover/deprecated.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
InnerBlocks,
|
|
15
15
|
__experimentalGetGradientClass,
|
|
16
16
|
useBlockProps,
|
|
17
|
+
useInnerBlocksProps,
|
|
17
18
|
} from '@wordpress/block-editor';
|
|
18
19
|
import { __ } from '@wordpress/i18n';
|
|
19
20
|
|
|
@@ -26,6 +27,7 @@ import {
|
|
|
26
27
|
backgroundImageStyles,
|
|
27
28
|
getPositionClassName,
|
|
28
29
|
isContentPositionCenter,
|
|
30
|
+
dimRatioToClass,
|
|
29
31
|
} from './shared';
|
|
30
32
|
|
|
31
33
|
/**
|
|
@@ -79,6 +81,214 @@ const blockAttributes = {
|
|
|
79
81
|
},
|
|
80
82
|
};
|
|
81
83
|
|
|
84
|
+
// v8: deprecated to remove duplicated gradient classes and swap `wp-block-cover__gradient-background` for `wp-block-cover__background`.
|
|
85
|
+
const v8 = {
|
|
86
|
+
attributes: {
|
|
87
|
+
url: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
},
|
|
90
|
+
id: {
|
|
91
|
+
type: 'number',
|
|
92
|
+
},
|
|
93
|
+
alt: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
source: 'attribute',
|
|
96
|
+
selector: 'img',
|
|
97
|
+
attribute: 'alt',
|
|
98
|
+
default: '',
|
|
99
|
+
},
|
|
100
|
+
hasParallax: {
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
104
|
+
isRepeated: {
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
default: false,
|
|
107
|
+
},
|
|
108
|
+
dimRatio: {
|
|
109
|
+
type: 'number',
|
|
110
|
+
default: 100,
|
|
111
|
+
},
|
|
112
|
+
overlayColor: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
},
|
|
115
|
+
customOverlayColor: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
},
|
|
118
|
+
backgroundType: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
default: 'image',
|
|
121
|
+
},
|
|
122
|
+
focalPoint: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
},
|
|
125
|
+
minHeight: {
|
|
126
|
+
type: 'number',
|
|
127
|
+
},
|
|
128
|
+
minHeightUnit: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
},
|
|
131
|
+
gradient: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
},
|
|
134
|
+
customGradient: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
},
|
|
137
|
+
contentPosition: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
},
|
|
140
|
+
isDark: {
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
default: true,
|
|
143
|
+
},
|
|
144
|
+
allowedBlocks: {
|
|
145
|
+
type: 'array',
|
|
146
|
+
},
|
|
147
|
+
templateLock: {
|
|
148
|
+
type: [ 'string', 'boolean' ],
|
|
149
|
+
enum: [ 'all', 'insert', false ],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
supports: {
|
|
153
|
+
anchor: true,
|
|
154
|
+
align: true,
|
|
155
|
+
html: false,
|
|
156
|
+
spacing: {
|
|
157
|
+
padding: true,
|
|
158
|
+
__experimentalDefaultControls: {
|
|
159
|
+
padding: true,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
color: {
|
|
163
|
+
__experimentalDuotone:
|
|
164
|
+
'> .wp-block-cover__image-background, > .wp-block-cover__video-background',
|
|
165
|
+
text: false,
|
|
166
|
+
background: false,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
save( { attributes } ) {
|
|
170
|
+
const {
|
|
171
|
+
backgroundType,
|
|
172
|
+
gradient,
|
|
173
|
+
contentPosition,
|
|
174
|
+
customGradient,
|
|
175
|
+
customOverlayColor,
|
|
176
|
+
dimRatio,
|
|
177
|
+
focalPoint,
|
|
178
|
+
hasParallax,
|
|
179
|
+
isDark,
|
|
180
|
+
isRepeated,
|
|
181
|
+
overlayColor,
|
|
182
|
+
url,
|
|
183
|
+
alt,
|
|
184
|
+
id,
|
|
185
|
+
minHeight: minHeightProp,
|
|
186
|
+
minHeightUnit,
|
|
187
|
+
} = attributes;
|
|
188
|
+
const overlayColorClass = getColorClassName(
|
|
189
|
+
'background-color',
|
|
190
|
+
overlayColor
|
|
191
|
+
);
|
|
192
|
+
const gradientClass = __experimentalGetGradientClass( gradient );
|
|
193
|
+
const minHeight = minHeightUnit
|
|
194
|
+
? `${ minHeightProp }${ minHeightUnit }`
|
|
195
|
+
: minHeightProp;
|
|
196
|
+
|
|
197
|
+
const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
|
|
198
|
+
const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
|
|
199
|
+
|
|
200
|
+
const isImgElement = ! ( hasParallax || isRepeated );
|
|
201
|
+
|
|
202
|
+
const style = {
|
|
203
|
+
...( isImageBackground && ! isImgElement
|
|
204
|
+
? backgroundImageStyles( url )
|
|
205
|
+
: {} ),
|
|
206
|
+
minHeight: minHeight || undefined,
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const bgStyle = {
|
|
210
|
+
backgroundColor: ! overlayColorClass
|
|
211
|
+
? customOverlayColor
|
|
212
|
+
: undefined,
|
|
213
|
+
background: customGradient ? customGradient : undefined,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
const objectPosition =
|
|
217
|
+
// prettier-ignore
|
|
218
|
+
focalPoint && isImgElement
|
|
219
|
+
? `${ Math.round( focalPoint.x * 100 ) }% ${ Math.round( focalPoint.y * 100 ) }%`
|
|
220
|
+
: undefined;
|
|
221
|
+
|
|
222
|
+
const classes = classnames(
|
|
223
|
+
{
|
|
224
|
+
'is-light': ! isDark,
|
|
225
|
+
'has-parallax': hasParallax,
|
|
226
|
+
'is-repeated': isRepeated,
|
|
227
|
+
'has-custom-content-position': ! isContentPositionCenter(
|
|
228
|
+
contentPosition
|
|
229
|
+
),
|
|
230
|
+
},
|
|
231
|
+
getPositionClassName( contentPosition )
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
<div { ...useBlockProps.save( { className: classes, style } ) }>
|
|
236
|
+
<span
|
|
237
|
+
aria-hidden="true"
|
|
238
|
+
className={ classnames(
|
|
239
|
+
overlayColorClass,
|
|
240
|
+
dimRatioToClass( dimRatio ),
|
|
241
|
+
'wp-block-cover__gradient-background',
|
|
242
|
+
gradientClass,
|
|
243
|
+
{
|
|
244
|
+
'has-background-dim': dimRatio !== undefined,
|
|
245
|
+
'has-background-gradient':
|
|
246
|
+
gradient || customGradient,
|
|
247
|
+
[ gradientClass ]: ! url && gradientClass,
|
|
248
|
+
}
|
|
249
|
+
) }
|
|
250
|
+
style={ bgStyle }
|
|
251
|
+
/>
|
|
252
|
+
|
|
253
|
+
{ isImageBackground && isImgElement && url && (
|
|
254
|
+
<img
|
|
255
|
+
className={ classnames(
|
|
256
|
+
'wp-block-cover__image-background',
|
|
257
|
+
id ? `wp-image-${ id }` : null
|
|
258
|
+
) }
|
|
259
|
+
alt={ alt }
|
|
260
|
+
src={ url }
|
|
261
|
+
style={ { objectPosition } }
|
|
262
|
+
data-object-fit="cover"
|
|
263
|
+
data-object-position={ objectPosition }
|
|
264
|
+
/>
|
|
265
|
+
) }
|
|
266
|
+
{ isVideoBackground && url && (
|
|
267
|
+
<video
|
|
268
|
+
className={ classnames(
|
|
269
|
+
'wp-block-cover__video-background',
|
|
270
|
+
'intrinsic-ignore'
|
|
271
|
+
) }
|
|
272
|
+
autoPlay
|
|
273
|
+
muted
|
|
274
|
+
loop
|
|
275
|
+
playsInline
|
|
276
|
+
src={ url }
|
|
277
|
+
style={ { objectPosition } }
|
|
278
|
+
data-object-fit="cover"
|
|
279
|
+
data-object-position={ objectPosition }
|
|
280
|
+
/>
|
|
281
|
+
) }
|
|
282
|
+
<div
|
|
283
|
+
{ ...useInnerBlocksProps.save( {
|
|
284
|
+
className: 'wp-block-cover__inner-container',
|
|
285
|
+
} ) }
|
|
286
|
+
/>
|
|
287
|
+
</div>
|
|
288
|
+
);
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
82
292
|
const v7 = {
|
|
83
293
|
attributes: {
|
|
84
294
|
...blockAttributes,
|
|
@@ -808,4 +1018,4 @@ const v1 = {
|
|
|
808
1018
|
},
|
|
809
1019
|
};
|
|
810
1020
|
|
|
811
|
-
export default [ v7, v6, v5, v4, v3, v2, v1 ];
|
|
1021
|
+
export default [ v8, v7, v6, v5, v4, v3, v2, v1 ];
|