@wordpress/block-library 6.1.0 → 7.0.1
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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
InspectorControls,
|
|
6
|
+
RichText,
|
|
7
|
+
useBlockProps,
|
|
8
|
+
} from '@wordpress/block-editor';
|
|
9
|
+
import { ToggleControl, PanelBody } from '@wordpress/components';
|
|
10
|
+
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
11
|
+
import { __ } from '@wordpress/i18n';
|
|
12
|
+
|
|
13
|
+
export default function ReadMore( {
|
|
14
|
+
attributes: { content, linkTarget },
|
|
15
|
+
setAttributes,
|
|
16
|
+
insertBlocksAfter,
|
|
17
|
+
} ) {
|
|
18
|
+
const blockProps = useBlockProps();
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<InspectorControls>
|
|
22
|
+
<PanelBody title={ __( 'Link settings' ) }>
|
|
23
|
+
<ToggleControl
|
|
24
|
+
label={ __( 'Open in new tab' ) }
|
|
25
|
+
onChange={ ( value ) =>
|
|
26
|
+
setAttributes( {
|
|
27
|
+
linkTarget: value ? '_blank' : '_self',
|
|
28
|
+
} )
|
|
29
|
+
}
|
|
30
|
+
checked={ linkTarget === '_blank' }
|
|
31
|
+
/>
|
|
32
|
+
</PanelBody>
|
|
33
|
+
</InspectorControls>
|
|
34
|
+
<RichText
|
|
35
|
+
tagName="a"
|
|
36
|
+
aria-label={ __( '"Read more" link text' ) }
|
|
37
|
+
placeholder={ __( 'Read more' ) }
|
|
38
|
+
value={ content }
|
|
39
|
+
onChange={ ( newValue ) =>
|
|
40
|
+
setAttributes( { content: newValue } )
|
|
41
|
+
}
|
|
42
|
+
__unstableOnSplitAtEnd={ () =>
|
|
43
|
+
insertBlocksAfter( createBlock( getDefaultBlockName() ) )
|
|
44
|
+
}
|
|
45
|
+
withoutInteractiveFormatting={ true }
|
|
46
|
+
{ ...blockProps }
|
|
47
|
+
/>
|
|
48
|
+
</>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { link as icon } from '@wordpress/icons';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import metadata from './block.json';
|
|
10
|
+
import edit from './edit';
|
|
11
|
+
|
|
12
|
+
const { name } = metadata;
|
|
13
|
+
export { metadata, name };
|
|
14
|
+
|
|
15
|
+
export const settings = {
|
|
16
|
+
icon,
|
|
17
|
+
edit,
|
|
18
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Server-side rendering of the `core/read-more` block.
|
|
4
|
+
*
|
|
5
|
+
* @package WordPress
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Renders the `core/read-more` block on the server.
|
|
10
|
+
*
|
|
11
|
+
* @param array $attributes Block attributes.
|
|
12
|
+
* @param string $content Block default content.
|
|
13
|
+
* @param WP_Block $block Block instance.
|
|
14
|
+
* @return string Returns the post link.
|
|
15
|
+
*/
|
|
16
|
+
function render_block_core_read_more( $attributes, $content, $block ) {
|
|
17
|
+
if ( ! isset( $block->context['postId'] ) ) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$post_ID = $block->context['postId'];
|
|
22
|
+
$justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}";
|
|
23
|
+
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) );
|
|
24
|
+
$more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' );
|
|
25
|
+
return sprintf(
|
|
26
|
+
'<a %1s href="%2s" target="%3s">%4s</a>',
|
|
27
|
+
$wrapper_attributes,
|
|
28
|
+
get_the_permalink( $post_ID ),
|
|
29
|
+
esc_attr( $attributes['linkTarget'] ),
|
|
30
|
+
$more_text
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Registers the `core/read-more` block on the server.
|
|
36
|
+
*/
|
|
37
|
+
function register_block_core_read_more() {
|
|
38
|
+
register_block_type_from_metadata(
|
|
39
|
+
__DIR__ . '/read-more',
|
|
40
|
+
array(
|
|
41
|
+
'render_callback' => 'render_block_core_read_more',
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
add_action( 'init', 'register_block_core_read_more' );
|
package/src/search/block.json
CHANGED
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
"align": [ "left", "center", "right" ],
|
|
45
45
|
"color": {
|
|
46
46
|
"gradients": true,
|
|
47
|
-
"__experimentalSkipSerialization": true
|
|
47
|
+
"__experimentalSkipSerialization": true,
|
|
48
|
+
"__experimentalDefaultControls": {
|
|
49
|
+
"background": true,
|
|
50
|
+
"text": true
|
|
51
|
+
}
|
|
48
52
|
},
|
|
49
53
|
"__experimentalBorder": {
|
|
50
54
|
"color": true,
|
package/src/search/edit.js
CHANGED
|
@@ -392,7 +392,8 @@ export default function SearchEdit( {
|
|
|
392
392
|
borderWidth: isButtonPositionInside ? borderWidth : undefined,
|
|
393
393
|
};
|
|
394
394
|
|
|
395
|
-
const isNonZeroBorderRadius =
|
|
395
|
+
const isNonZeroBorderRadius =
|
|
396
|
+
borderRadius !== undefined && parseInt( borderRadius, 10 ) !== 0;
|
|
396
397
|
|
|
397
398
|
if ( isButtonPositionInside && isNonZeroBorderRadius ) {
|
|
398
399
|
// We have button inside wrapper and a border radius value to apply.
|
package/src/search/index.php
CHANGED
|
@@ -42,16 +42,18 @@ function render_block_core_search( $attributes ) {
|
|
|
42
42
|
// Border color classes need to be applied to the elements that have a border color.
|
|
43
43
|
$border_color_classes = get_border_color_classes_for_block_core_search( $attributes );
|
|
44
44
|
|
|
45
|
+
$label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] );
|
|
46
|
+
|
|
45
47
|
$label_markup = sprintf(
|
|
46
48
|
'<label for="%1$s" class="wp-block-search__label screen-reader-text">%2$s</label>',
|
|
47
49
|
esc_attr( $input_id ),
|
|
48
|
-
|
|
50
|
+
$label_inner_html
|
|
49
51
|
);
|
|
50
52
|
if ( $show_label && ! empty( $attributes['label'] ) ) {
|
|
51
53
|
$label_markup = sprintf(
|
|
52
54
|
'<label for="%1$s" class="wp-block-search__label">%2$s</label>',
|
|
53
55
|
$input_id,
|
|
54
|
-
|
|
56
|
+
$label_inner_html
|
|
55
57
|
);
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -76,7 +78,7 @@ function render_block_core_search( $attributes ) {
|
|
|
76
78
|
}
|
|
77
79
|
if ( ! $use_icon_button ) {
|
|
78
80
|
if ( ! empty( $attributes['buttonText'] ) ) {
|
|
79
|
-
$button_internal_markup =
|
|
81
|
+
$button_internal_markup = wp_kses_post( $attributes['buttonText'] );
|
|
80
82
|
}
|
|
81
83
|
} else {
|
|
82
84
|
$button_classes .= ' has-icon';
|
package/src/separator/style.scss
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
border-bottom: 1px solid currentColor;
|
|
4
4
|
// Default, thin style, is stored in theme.scss so it can be opted out of
|
|
5
5
|
|
|
6
|
-
// Wide style
|
|
7
|
-
&.is-style-wide {
|
|
8
|
-
border-bottom-width: 1px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
// Dots style
|
|
12
7
|
&.is-style-dots {
|
|
13
8
|
// Override any background themes often set on the hr tag for this style.
|
package/src/site-logo/edit.js
CHANGED
|
@@ -396,11 +396,7 @@ export default function LogoEdit( {
|
|
|
396
396
|
siteLogoId: _siteLogoId,
|
|
397
397
|
canUserEdit: _canUserEdit,
|
|
398
398
|
url: siteData?.url,
|
|
399
|
-
mediaItemData: mediaItem
|
|
400
|
-
id: mediaItem.id,
|
|
401
|
-
url: mediaItem.source_url,
|
|
402
|
-
alt: mediaItem.alt_text,
|
|
403
|
-
},
|
|
399
|
+
mediaItemData: mediaItem,
|
|
404
400
|
isRequestingMediaItem: _isRequestingMediaItem,
|
|
405
401
|
siteIconId: _siteIconId,
|
|
406
402
|
};
|
|
@@ -427,9 +423,9 @@ export default function LogoEdit( {
|
|
|
427
423
|
|
|
428
424
|
let alt = null;
|
|
429
425
|
if ( mediaItemData ) {
|
|
430
|
-
alt = mediaItemData.
|
|
431
|
-
if ( logoUrl !== mediaItemData.
|
|
432
|
-
setLogoUrl( mediaItemData.
|
|
426
|
+
alt = mediaItemData.alt_text;
|
|
427
|
+
if ( logoUrl !== mediaItemData.source_url ) {
|
|
428
|
+
setLogoUrl( mediaItemData.source_url );
|
|
433
429
|
}
|
|
434
430
|
}
|
|
435
431
|
|
package/src/site-tagline/edit.js
CHANGED
|
@@ -15,8 +15,13 @@ import {
|
|
|
15
15
|
RichText,
|
|
16
16
|
} from '@wordpress/block-editor';
|
|
17
17
|
import { __ } from '@wordpress/i18n';
|
|
18
|
+
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
18
19
|
|
|
19
|
-
export default function SiteTaglineEdit( {
|
|
20
|
+
export default function SiteTaglineEdit( {
|
|
21
|
+
attributes,
|
|
22
|
+
setAttributes,
|
|
23
|
+
insertBlocksAfter,
|
|
24
|
+
} ) {
|
|
20
25
|
const { textAlign } = attributes;
|
|
21
26
|
const [ siteTagline, setSiteTagline ] = useEntityProp(
|
|
22
27
|
'root',
|
|
@@ -46,6 +51,10 @@ export default function SiteTaglineEdit( { attributes, setAttributes } ) {
|
|
|
46
51
|
placeholder={ __( 'Write site tagline…' ) }
|
|
47
52
|
tagName="p"
|
|
48
53
|
value={ siteTagline }
|
|
54
|
+
disableLineBreaks
|
|
55
|
+
__unstableOnSplitAtEnd={ () =>
|
|
56
|
+
insertBlocksAfter( createBlock( getDefaultBlockName() ) )
|
|
57
|
+
}
|
|
49
58
|
{ ...blockProps }
|
|
50
59
|
/>
|
|
51
60
|
) : (
|
package/src/site-title/index.php
CHANGED
|
@@ -35,7 +35,6 @@ function render_block_core_site_title( $attributes ) {
|
|
|
35
35
|
);
|
|
36
36
|
if ( '_blank' === $attributes['linkTarget'] ) {
|
|
37
37
|
$link_attrs[] = 'target="_blank"';
|
|
38
|
-
$link_attrs[] = 'aria-label="' . esc_attr__( '(opens in a new tab)' ) . '"';
|
|
39
38
|
}
|
|
40
39
|
$site_title = sprintf( '<a %1$s>%2$s</a>', implode( ' ', $link_attrs ), esc_html( $site_title ) );
|
|
41
40
|
}
|
|
@@ -45,7 +44,8 @@ function render_block_core_site_title( $attributes ) {
|
|
|
45
44
|
'<%1$s %2$s>%3$s</%1$s>',
|
|
46
45
|
$tag_name,
|
|
47
46
|
$wrapper_attributes,
|
|
48
|
-
|
|
47
|
+
// already pre-escaped if it is a link.
|
|
48
|
+
$attributes['isLink'] ? $site_title : esc_html( $site_title )
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
package/src/social-link/edit.js
CHANGED
|
@@ -70,7 +70,7 @@ const SocialLinkEdit = ( {
|
|
|
70
70
|
setAttributes,
|
|
71
71
|
} ) => {
|
|
72
72
|
const { url, service, label } = attributes;
|
|
73
|
-
const { iconColorValue, iconBackgroundColorValue } = context;
|
|
73
|
+
const { showLabels, iconColorValue, iconBackgroundColorValue } = context;
|
|
74
74
|
const [ showURLPopover, setPopover ] = useState( false );
|
|
75
75
|
const classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {
|
|
76
76
|
'wp-social-link__is-incomplete': ! url,
|
|
@@ -79,6 +79,7 @@ const SocialLinkEdit = ( {
|
|
|
79
79
|
const ref = useRef();
|
|
80
80
|
const IconComponent = getIconBySite( service );
|
|
81
81
|
const socialLinkName = getNameBySite( service );
|
|
82
|
+
const socialLinkLabel = label ?? socialLinkName;
|
|
82
83
|
const blockProps = useBlockProps( {
|
|
83
84
|
className: classes,
|
|
84
85
|
style: {
|
|
@@ -113,8 +114,19 @@ const SocialLinkEdit = ( {
|
|
|
113
114
|
</PanelBody>
|
|
114
115
|
</InspectorControls>
|
|
115
116
|
<li { ...blockProps }>
|
|
116
|
-
<Button
|
|
117
|
+
<Button
|
|
118
|
+
className="wp-block-social-link-anchor"
|
|
119
|
+
ref={ ref }
|
|
120
|
+
onClick={ () => setPopover( true ) }
|
|
121
|
+
>
|
|
117
122
|
<IconComponent />
|
|
123
|
+
<span
|
|
124
|
+
className={ classNames( 'wp-block-social-link-label', {
|
|
125
|
+
'screen-reader-text': ! showLabels,
|
|
126
|
+
} ) }
|
|
127
|
+
>
|
|
128
|
+
{ socialLinkLabel }
|
|
129
|
+
</span>
|
|
118
130
|
{ isSelected && showURLPopover && (
|
|
119
131
|
<SocialLinkURLPopover
|
|
120
132
|
url={ url }
|