@wordpress/block-library 6.0.12 → 6.0.17-next.33ec3857e2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/audio/index.js +1 -0
- package/build/audio/index.js.map +1 -1
- package/build/block/index.js +1 -0
- package/build/block/index.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/index.js +1 -0
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/transforms.js +1 -0
- package/build/buttons/transforms.js.map +1 -1
- package/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +6 -1
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +1 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +1 -0
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/edit.js +2 -1
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +7 -2
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +1 -0
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +1 -0
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +2 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +1 -0
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +98 -23
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/index.js +4 -2
- package/build/comment-template/index.js.map +1 -1
- package/build/comment-template/util.js +66 -0
- package/build/comment-template/util.js.map +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js +39 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build/comments-pagination/edit.js +80 -0
- package/build/comments-pagination/edit.js.map +1 -0
- package/build/comments-pagination/index.js +71 -0
- package/build/comments-pagination/index.js.map +1 -0
- package/build/comments-pagination/save.js +18 -0
- package/build/comments-pagination/save.js.map +1 -0
- package/build/comments-pagination-numbers/edit.js +47 -0
- package/build/comments-pagination-numbers/edit.js.map +1 -0
- package/build/comments-pagination-numbers/index.js +47 -0
- package/build/comments-pagination-numbers/index.js.map +1 -0
- package/build/comments-query-loop/edit.js +2 -2
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +4 -7
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/comments-query-loop/toolbar.js +3 -3
- package/build/comments-query-loop/toolbar.js.map +1 -1
- package/build/cover/edit.js +2 -1
- package/build/cover/edit.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/embed/deprecated.js +1 -0
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.native.js +23 -20
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js +69 -0
- package/build/embed/embed-controls.native.js.map +1 -0
- package/build/embed/embed-link-settings.native.js +101 -0
- package/build/embed/embed-link-settings.native.js.map +1 -0
- package/build/embed/embed-placeholder.native.js +9 -2
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/index.js +1 -0
- package/build/embed/index.js.map +1 -1
- package/build/embed/transforms.js +1 -0
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +1 -0
- package/build/embed/util.js.map +1 -1
- package/build/file/index.js +1 -0
- package/build/file/index.js.map +1 -1
- package/build/freeform/index.js +1 -0
- package/build/freeform/index.js.map +1 -1
- package/build/gallery/edit.js +5 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/index.js +1 -0
- package/build/gallery/index.js.map +1 -1
- package/build/group/index.js +8 -1
- package/build/group/index.js.map +1 -1
- package/build/heading/index.js +1 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +1 -0
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/index.js +1 -0
- package/build/home-link/index.js.map +1 -1
- package/build/html/index.js +1 -0
- package/build/html/index.js.map +1 -1
- package/build/image/edit.js +56 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +1 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +45 -10
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +5 -1
- package/build/image/index.js.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/latest-comments/index.js +1 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +1 -0
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +1 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/index.js +1 -0
- package/build/list/index.js.map +1 -1
- package/build/loginout/index.js +1 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/index.js +1 -0
- package/build/media-text/index.js.map +1 -1
- package/build/missing/index.js +1 -0
- package/build/missing/index.js.map +1 -1
- package/build/more/index.js +1 -0
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +27 -8
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +7 -1
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/index.js +1 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +8 -2
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/view.js +2 -2
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-area/edit.js +2 -1
- package/build/navigation-area/edit.js.map +1 -1
- package/build/navigation-area/index.js +2 -1
- package/build/navigation-area/index.js.map +1 -1
- package/build/navigation-link/edit.js +7 -0
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +1 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +1 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/nextpage/index.js +1 -0
- package/build/nextpage/index.js.map +1 -1
- package/build/page-list/index.js +6 -1
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +12 -2
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +1 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +1 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/index.js +1 -0
- package/build/pattern/index.js.map +1 -1
- package/build/post-author/index.js +1 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-comment/index.js +1 -0
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/index.js +2 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +1 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +1 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +1 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/index.js +1 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +50 -30
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +7 -3
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +1 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +1 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +54 -13
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -0
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +1 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.native.js +2 -1
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +1 -0
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +8 -1
- package/build/pullquote/index.js.map +1 -1
- package/build/query/index.js +1 -0
- package/build/query/index.js.map +1 -1
- package/build/query-pagination/index.js +1 -0
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +1 -0
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +1 -0
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -0
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -0
- package/build/quote/index.js.map +1 -1
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +5 -3
- package/build/search/edit.js.map +1 -1
- package/build/search/index.js +8 -1
- package/build/search/index.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.js.map +1 -1
- package/build/shortcode/index.js +1 -0
- package/build/shortcode/index.js.map +1 -1
- package/build/site-logo/index.js +1 -0
- package/build/site-logo/index.js.map +1 -1
- package/build/site-tagline/index.js +2 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +1 -0
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/index.js +2 -1
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/index.js +2 -1
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/index.js +1 -0
- package/build/spacer/index.js.map +1 -1
- package/build/table/index.js +7 -1
- package/build/table/index.js.map +1 -1
- package/build/table-of-contents/index.js +1 -0
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +1 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/edit/index.js +7 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/index.js +26 -9
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +1 -0
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/index.js +1 -0
- package/build/text-columns/index.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +1 -0
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +1 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/index.js +1 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/block/index.js +1 -0
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/index.js +1 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/transforms.js +1 -0
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +6 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +1 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +1 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +3 -2
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +7 -2
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +1 -0
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +1 -0
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +2 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +1 -0
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +97 -23
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/index.js +4 -2
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comment-template/util.js +57 -0
- package/build-module/comment-template/util.js.map +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +30 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build-module/comments-pagination/edit.js +67 -0
- package/build-module/comments-pagination/edit.js.map +1 -0
- package/build-module/comments-pagination/index.js +57 -0
- package/build-module/comments-pagination/index.js.map +1 -0
- package/build-module/comments-pagination/save.js +10 -0
- package/build-module/comments-pagination/save.js.map +1 -0
- package/build-module/comments-pagination-numbers/edit.js +40 -0
- package/build-module/comments-pagination-numbers/edit.js.map +1 -0
- package/build-module/comments-pagination-numbers/index.js +34 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +2 -2
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +4 -7
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/comments-query-loop/toolbar.js +3 -3
- package/build-module/comments-query-loop/toolbar.js.map +1 -1
- package/build-module/cover/edit.js +2 -1
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/embed/deprecated.js +1 -0
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.native.js +24 -21
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +54 -0
- package/build-module/embed/embed-controls.native.js.map +1 -0
- package/build-module/embed/embed-link-settings.native.js +90 -0
- package/build-module/embed/embed-link-settings.native.js.map +1 -0
- package/build-module/embed/embed-placeholder.native.js +9 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/index.js +1 -0
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/transforms.js +1 -0
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +1 -0
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/index.js +1 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/freeform/index.js +1 -0
- package/build-module/freeform/index.js.map +1 -1
- package/build-module/gallery/edit.js +5 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/index.js +1 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/group/index.js +8 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/index.js +1 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +1 -0
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/index.js +1 -0
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/html/index.js +1 -0
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/edit.js +52 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +1 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +47 -12
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +5 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.js +3 -1
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/index.js +1 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +1 -0
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +1 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/index.js +1 -0
- package/build-module/list/index.js.map +1 -1
- package/build-module/loginout/index.js +1 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/index.js +1 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/missing/index.js +1 -0
- package/build-module/missing/index.js.map +1 -1
- package/build-module/more/index.js +1 -0
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +26 -8
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +6 -1
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/index.js +1 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +7 -2
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/view.js +2 -2
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-area/edit.js +2 -1
- package/build-module/navigation-area/edit.js.map +1 -1
- package/build-module/navigation-area/index.js +2 -1
- package/build-module/navigation-area/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +7 -0
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +1 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +1 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/nextpage/index.js +1 -0
- package/build-module/nextpage/index.js.map +1 -1
- package/build-module/page-list/index.js +6 -1
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +13 -3
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +1 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +1 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/index.js +1 -0
- package/build-module/pattern/index.js.map +1 -1
- package/build-module/post-author/index.js +1 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comment/index.js +1 -0
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comments/index.js +2 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +1 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +1 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +1 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/index.js +1 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +52 -29
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +8 -4
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +1 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +1 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +54 -15
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -0
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +1 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +1 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.native.js +2 -1
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +1 -0
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +8 -1
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/index.js +1 -0
- package/build-module/query/index.js.map +1 -1
- package/build-module/query-pagination/index.js +1 -0
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +1 -0
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +1 -0
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -0
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/rss/index.js +1 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +5 -3
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/index.js +8 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/separator/index.js +1 -0
- package/build-module/separator/index.js.map +1 -1
- package/build-module/shortcode/index.js +1 -0
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/site-logo/index.js +1 -0
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/index.js +2 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +1 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/index.js +2 -1
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/index.js +2 -1
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/index.js +1 -0
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/table/index.js +7 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table-of-contents/index.js +1 -0
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/edit/index.js +6 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/index.js +26 -9
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +1 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/index.js +1 -0
- package/build-module/text-columns/index.js.map +1 -1
- package/build-module/verse/index.js +1 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/index.js +1 -0
- package/build-module/video/index.js.map +1 -1
- package/build-style/columns/style-rtl.css +4 -3
- package/build-style/columns/style.css +4 -3
- package/build-style/comment-template/style-rtl.css +91 -0
- package/build-style/comment-template/style.css +91 -0
- package/build-style/{home-link/style.css → comments-pagination/editor-rtl.css} +18 -22
- package/build-style/comments-pagination/editor.css +102 -0
- package/build-style/{home-link → comments-pagination}/style-rtl.css +21 -21
- package/build-style/comments-pagination/style.css +106 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +85 -0
- package/build-style/comments-pagination-numbers/editor.css +86 -0
- package/build-style/common-rtl.css +29 -0
- package/build-style/common.css +29 -0
- package/build-style/cover/style-rtl.css +4 -0
- package/build-style/cover/style.css +4 -0
- package/build-style/editor-rtl.css +70 -23
- package/build-style/editor.css +73 -23
- package/build-style/gallery/editor-rtl.css +0 -12
- package/build-style/gallery/editor.css +0 -12
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/group/theme-rtl.css +1 -1
- package/build-style/group/theme.css +1 -1
- package/build-style/image/editor-rtl.css +16 -0
- package/build-style/image/editor.css +16 -0
- package/build-style/navigation/editor-rtl.css +9 -0
- package/build-style/navigation/editor.css +9 -0
- package/build-style/navigation/style-rtl.css +13 -7
- package/build-style/navigation/style.css +13 -7
- package/build-style/post-comments/style-rtl.css +3 -1
- package/build-style/post-comments/style.css +3 -1
- package/build-style/post-comments-form/style-rtl.css +2 -2
- package/build-style/post-comments-form/style.css +2 -2
- package/build-style/post-featured-image/editor-rtl.css +0 -7
- package/build-style/post-featured-image/editor.css +0 -7
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/pullquote/style-rtl.css +1 -0
- package/build-style/pullquote/style.css +1 -0
- package/build-style/query-pagination/editor-rtl.css +0 -4
- package/build-style/query-pagination/editor.css +0 -4
- package/build-style/query-pagination/style-rtl.css +6 -2
- package/build-style/query-pagination/style.css +6 -2
- package/build-style/style-rtl.css +131 -61
- package/build-style/style.css +133 -61
- package/build-style/table/style-rtl.css +1 -0
- package/build-style/table/style.css +1 -0
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/package.json +31 -31
- package/src/archives/block.json +1 -0
- package/src/audio/block.json +1 -0
- package/src/block/block.json +1 -0
- package/src/button/block.json +5 -1
- package/src/button/edit.native.js +1 -1
- package/src/buttons/block.json +2 -1
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.php +35 -39
- package/src/categories/block.json +1 -0
- package/src/code/block.json +6 -1
- package/src/column/block.json +1 -0
- package/src/columns/block.json +1 -0
- package/src/columns/style.scss +8 -5
- package/src/comment-author-avatar/block.json +7 -2
- package/src/comment-author-avatar/edit.js +7 -2
- package/src/comment-author-avatar/index.php +25 -6
- package/src/comment-author-name/block.json +1 -0
- package/src/comment-content/block.json +1 -0
- package/src/comment-date/block.json +1 -0
- package/src/comment-edit-link/block.json +1 -0
- package/src/comment-edit-link/index.js +1 -1
- package/src/comment-reply-link/block.json +1 -0
- package/src/comment-template/block.json +4 -2
- package/src/comment-template/edit.js +111 -37
- package/src/comment-template/index.php +46 -19
- package/src/comment-template/style.scss +17 -0
- package/src/comment-template/test/index.js +45 -0
- package/src/comment-template/util.js +56 -0
- package/src/comments-pagination/block.json +37 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
- package/src/comments-pagination/edit.js +78 -0
- package/src/comments-pagination/editor.scss +34 -0
- package/src/comments-pagination/index.js +20 -0
- package/src/comments-pagination/index.php +39 -0
- package/src/comments-pagination/save.js +8 -0
- package/src/comments-pagination/style.scss +38 -0
- package/src/comments-pagination-numbers/block.json +16 -0
- package/src/comments-pagination-numbers/edit.js +22 -0
- package/src/comments-pagination-numbers/editor.scss +12 -0
- package/src/comments-pagination-numbers/index.js +18 -0
- package/src/comments-pagination-numbers/index.php +69 -0
- package/src/comments-query-loop/block.json +4 -7
- package/src/comments-query-loop/edit.js +2 -5
- package/src/comments-query-loop/toolbar.js +3 -3
- package/src/common.scss +31 -0
- package/src/cover/block.json +1 -0
- package/src/cover/edit.js +1 -0
- package/src/cover/style.scss +4 -0
- package/src/editor.scss +14 -0
- package/src/embed/block.json +1 -0
- package/src/embed/edit.native.js +23 -18
- package/src/embed/embed-controls.native.js +65 -0
- package/src/embed/embed-link-settings.native.js +100 -0
- package/src/embed/embed-placeholder.native.js +8 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +10 -0
- package/src/embed/test/index.native.js +228 -88
- package/src/file/block.json +1 -0
- package/src/freeform/block.json +1 -0
- package/src/gallery/block.json +1 -0
- package/src/gallery/edit.js +13 -0
- package/src/gallery/editor.scss +0 -14
- package/src/gallery/index.php +7 -8
- package/src/gallery/style.scss +4 -0
- package/src/gallery/test/use-get-new-images.js +93 -0
- package/src/group/block.json +8 -1
- package/src/group/theme.scss +4 -5
- package/src/heading/block.json +1 -0
- package/src/home-link/block.json +1 -0
- package/src/home-link/index.php +4 -4
- package/src/html/block.json +1 -0
- package/src/image/block.json +5 -1
- package/src/image/edit.js +44 -0
- package/src/image/edit.native.js +1 -1
- package/src/image/editor.scss +18 -0
- package/src/image/image.js +46 -11
- package/src/image/index.php +1 -1
- package/src/index.js +4 -0
- package/src/latest-comments/block.json +1 -0
- package/src/latest-posts/block.json +1 -0
- package/src/list/block.json +1 -0
- package/src/loginout/block.json +1 -0
- package/src/media-text/block.json +1 -0
- package/src/missing/block.json +1 -0
- package/src/more/block.json +1 -0
- package/src/navigation/README.md +13 -0
- package/src/navigation/block.json +4 -16
- package/src/navigation/edit/index.js +51 -28
- package/src/navigation/edit/navigation-menu-selector.js +8 -0
- package/src/navigation/editor.scss +12 -0
- package/src/navigation/index.php +4 -4
- package/src/navigation/menu-items-to-blocks.js +9 -2
- package/src/navigation/style.scss +26 -14
- package/src/navigation/view.js +2 -2
- package/src/navigation-area/block.json +3 -7
- package/src/navigation-area/edit.js +2 -1
- package/src/navigation-link/block.json +2 -3
- package/src/navigation-link/edit.js +5 -0
- package/src/navigation-link/index.php +4 -4
- package/src/navigation-submenu/block.json +2 -3
- package/src/navigation-submenu/edit.js +1 -1
- package/src/navigation-submenu/index.php +12 -6
- package/src/nextpage/block.json +1 -0
- package/src/page-list/block.json +4 -0
- package/src/page-list/index.php +12 -7
- package/src/paragraph/block.json +1 -0
- package/src/paragraph/edit.js +12 -4
- package/src/pattern/block.json +1 -0
- package/src/post-author/block.json +1 -0
- package/src/post-comment/block.json +1 -0
- package/src/post-comments/block.json +6 -1
- package/src/post-comments/index.php +17 -0
- package/src/post-comments/style.scss +7 -3
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/block.json +6 -1
- package/src/post-comments-form/index.php +6 -4
- package/src/post-comments-form/style.scss +7 -5
- package/src/post-comments-link/block.json +1 -0
- package/src/post-content/block.json +1 -0
- package/src/post-date/block.json +1 -0
- package/src/post-excerpt/block.json +1 -0
- package/src/post-featured-image/block.json +1 -0
- package/src/post-featured-image/dimension-controls.js +75 -50
- package/src/post-featured-image/edit.js +12 -5
- package/src/post-featured-image/editor.scss +0 -8
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-template/block.json +1 -0
- package/src/post-template/edit.js +54 -17
- package/src/post-terms/block.json +1 -0
- package/src/post-title/block.json +1 -0
- package/src/post-title/style.scss +6 -2
- package/src/preformatted/block.json +1 -0
- package/src/preformatted/edit.native.js +3 -1
- package/src/pullquote/block.json +8 -1
- package/src/pullquote/style.scss +1 -0
- package/src/query/block.json +1 -0
- package/src/query-pagination/block.json +1 -0
- package/src/query-pagination/editor.scss +0 -4
- package/src/query-pagination/style.scss +12 -2
- package/src/query-pagination-next/block.json +1 -0
- package/src/query-pagination-next/index.php +42 -19
- package/src/query-pagination-numbers/block.json +1 -0
- package/src/query-pagination-previous/block.json +1 -0
- package/src/query-pagination-previous/index.php +45 -13
- package/src/query-title/block.json +1 -0
- package/src/quote/block.json +1 -0
- package/src/rss/block.json +1 -0
- package/src/search/block.json +8 -1
- package/src/search/edit.js +2 -1
- package/src/search/index.php +20 -10
- package/src/separator/block.json +1 -0
- package/src/shortcode/block.json +1 -0
- package/src/site-logo/block.json +1 -0
- package/src/site-tagline/block.json +2 -1
- package/src/site-title/block.json +1 -0
- package/src/social-link/block.json +2 -1
- package/src/social-links/block.json +3 -8
- package/src/spacer/block.json +1 -0
- package/src/style.scss +3 -2
- package/src/table/block.json +7 -1
- package/src/table/style.scss +1 -0
- package/src/table-of-contents/block.json +1 -0
- package/src/tag-cloud/block.json +1 -0
- package/src/template-part/block.json +1 -8
- package/src/template-part/edit/index.js +6 -1
- package/src/template-part/index.js +28 -0
- package/src/template-part/index.php +5 -2
- package/src/term-description/block.json +1 -0
- package/src/text-columns/block.json +1 -0
- package/src/verse/block.json +1 -0
- package/src/video/block.json +1 -0
- package/build/embed/embed-bottom-sheet.native.js +0 -85
- package/build/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build-module/embed/embed-bottom-sheet.native.js +0 -74
- package/build-module/embed/embed-bottom-sheet.native.js.map +0 -1
- package/src/embed/embed-bottom-sheet.native.js +0 -78
- package/src/home-link/style.scss +0 -51
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import {
|
|
6
|
+
InspectorControls,
|
|
7
|
+
useBlockProps,
|
|
8
|
+
useInnerBlocksProps,
|
|
9
|
+
store as blockEditorStore,
|
|
10
|
+
} from '@wordpress/block-editor';
|
|
11
|
+
import { useSelect } from '@wordpress/data';
|
|
12
|
+
import { getBlockSupport } from '@wordpress/blocks';
|
|
13
|
+
import { PanelBody } from '@wordpress/components';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';
|
|
19
|
+
|
|
20
|
+
// TODO: add pagination-previous/next blocks once they are implemented.
|
|
21
|
+
const TEMPLATE = [ [ 'core/comments-pagination-numbers' ] ];
|
|
22
|
+
|
|
23
|
+
const getDefaultBlockLayout = ( blockTypeOrName ) => {
|
|
24
|
+
const layoutBlockSupportConfig = getBlockSupport(
|
|
25
|
+
blockTypeOrName,
|
|
26
|
+
'__experimentalLayout'
|
|
27
|
+
);
|
|
28
|
+
return layoutBlockSupportConfig?.default;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default function QueryPaginationEdit( {
|
|
32
|
+
attributes: { paginationArrow, layout },
|
|
33
|
+
setAttributes,
|
|
34
|
+
clientId,
|
|
35
|
+
name,
|
|
36
|
+
} ) {
|
|
37
|
+
const usedLayout = layout || getDefaultBlockLayout( name );
|
|
38
|
+
const hasNextPreviousBlocks = useSelect( ( select ) => {
|
|
39
|
+
const { getBlocks } = select( blockEditorStore );
|
|
40
|
+
const innerBlocks = getBlocks( clientId );
|
|
41
|
+
/**
|
|
42
|
+
* Show the `paginationArrow` control only if a
|
|
43
|
+
* `QueryPaginationNext/Previous` block exists.
|
|
44
|
+
*/
|
|
45
|
+
return innerBlocks?.find( ( innerBlock ) => {
|
|
46
|
+
return [
|
|
47
|
+
'core/query-pagination-next',
|
|
48
|
+
'core/query-pagination-previous',
|
|
49
|
+
].includes( innerBlock.name );
|
|
50
|
+
} );
|
|
51
|
+
}, [] );
|
|
52
|
+
const blockProps = useBlockProps();
|
|
53
|
+
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
54
|
+
template: TEMPLATE,
|
|
55
|
+
allowedBlocks: [
|
|
56
|
+
// TODO: add pagination-previous/next blocks once they are implemented.
|
|
57
|
+
'core/comments-pagination-numbers',
|
|
58
|
+
],
|
|
59
|
+
__experimentalLayout: usedLayout,
|
|
60
|
+
} );
|
|
61
|
+
return (
|
|
62
|
+
<>
|
|
63
|
+
{ hasNextPreviousBlocks && (
|
|
64
|
+
<InspectorControls>
|
|
65
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
66
|
+
<CommentsPaginationArrowControls
|
|
67
|
+
value={ paginationArrow }
|
|
68
|
+
onChange={ ( value ) => {
|
|
69
|
+
setAttributes( { paginationArrow: value } );
|
|
70
|
+
} }
|
|
71
|
+
/>
|
|
72
|
+
</PanelBody>
|
|
73
|
+
</InspectorControls>
|
|
74
|
+
) }
|
|
75
|
+
<div { ...innerBlocksProps } />
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
$pagination-margin: 0.5em;
|
|
2
|
+
|
|
3
|
+
// Center flex items. This has an equivalent in style.scss.
|
|
4
|
+
.wp-block[data-align="center"] > .wp-block-comments-pagination {
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.editor-styles-wrapper {
|
|
9
|
+
.wp-block-comments-pagination {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
&.block-editor-block-list__layout {
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.wp-block-comments-pagination {
|
|
18
|
+
> .wp-block-comments-pagination-next,
|
|
19
|
+
> .wp-block-comments-pagination-previous,
|
|
20
|
+
> .wp-block-comments-pagination-numbers {
|
|
21
|
+
// Override editor auto block margins.
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
margin-top: $pagination-margin;
|
|
24
|
+
|
|
25
|
+
/*rtl:ignore*/
|
|
26
|
+
margin-right: $pagination-margin;
|
|
27
|
+
margin-bottom: $pagination-margin;
|
|
28
|
+
|
|
29
|
+
&:last-child {
|
|
30
|
+
/*rtl:ignore*/
|
|
31
|
+
margin-right: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { queryPagination as icon } from '@wordpress/icons';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import metadata from './block.json';
|
|
10
|
+
import edit from './edit';
|
|
11
|
+
import save from './save';
|
|
12
|
+
|
|
13
|
+
const { name } = metadata;
|
|
14
|
+
export { metadata, name };
|
|
15
|
+
|
|
16
|
+
export const settings = {
|
|
17
|
+
icon,
|
|
18
|
+
edit,
|
|
19
|
+
save,
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Server-side rendering of the `core/comments-pagination` block.
|
|
4
|
+
*
|
|
5
|
+
* @package WordPress
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Renders the `core/comments-pagination` block on the server.
|
|
10
|
+
*
|
|
11
|
+
* @param array $attributes Block attributes.
|
|
12
|
+
* @param string $content Block default content.
|
|
13
|
+
*
|
|
14
|
+
* @return string Returns the wrapper for the Comments pagination.
|
|
15
|
+
*/
|
|
16
|
+
function render_block_core_comments_pagination( $attributes, $content ) {
|
|
17
|
+
if ( empty( trim( $content ) ) ) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return sprintf(
|
|
22
|
+
'<div %1$s>%2$s</div>',
|
|
23
|
+
get_block_wrapper_attributes(),
|
|
24
|
+
$content
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Registers the `core/comments-pagination` block on the server.
|
|
30
|
+
*/
|
|
31
|
+
function register_block_core_comments_pagination() {
|
|
32
|
+
register_block_type_from_metadata(
|
|
33
|
+
__DIR__ . '/comments-pagination',
|
|
34
|
+
array(
|
|
35
|
+
'render_callback' => 'render_block_core_comments_pagination',
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
add_action( 'init', 'register_block_core_comments_pagination' );
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$pagination-margin: 0.5em;
|
|
2
|
+
.wp-block-comments-pagination {
|
|
3
|
+
// Increased specificity to override blocks default margin.
|
|
4
|
+
> .wp-block-comments-pagination-next,
|
|
5
|
+
> .wp-block-comments-pagination-previous,
|
|
6
|
+
> .wp-block-comments-pagination-numbers {
|
|
7
|
+
/*rtl:ignore*/
|
|
8
|
+
margin-right: $pagination-margin;
|
|
9
|
+
margin-bottom: $pagination-margin;
|
|
10
|
+
|
|
11
|
+
&:last-child {
|
|
12
|
+
/*rtl:ignore*/
|
|
13
|
+
margin-right: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.wp-block-comments-pagination-previous-arrow {
|
|
17
|
+
margin-right: 1ch;
|
|
18
|
+
display: inline-block; // Needed so that the transform works.
|
|
19
|
+
// chevron(`»`) symbol doesn't need the mirroring by us.
|
|
20
|
+
&:not(.is-arrow-chevron) {
|
|
21
|
+
// Flip for RTL.
|
|
22
|
+
transform: scaleX(1) #{"/*rtl:scaleX(-1);*/"}; // This points the arrow right for LTR and left for RTL.
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.wp-block-comments-pagination-next-arrow {
|
|
26
|
+
margin-left: 1ch;
|
|
27
|
+
display: inline-block; // Needed so that the transform works.
|
|
28
|
+
// chevron(`»`) symbol doesn't need the mirroring by us.
|
|
29
|
+
&:not(.is-arrow-chevron) {
|
|
30
|
+
// Flip for RTL.
|
|
31
|
+
transform: scaleX(1) #{"/*rtl:scaleX(-1);*/"}; // This points the arrow right for LTR and left for RTL.
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.aligncenter {
|
|
36
|
+
justify-content: center;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
|
+
"apiVersion": 2,
|
|
4
|
+
"name": "core/comments-pagination-numbers",
|
|
5
|
+
"title": "Comments Pagination Numbers",
|
|
6
|
+
"category": "theme",
|
|
7
|
+
"parent": [ "core/comments-pagination" ],
|
|
8
|
+
"description": "Displays a list of page numbers for comments pagination.",
|
|
9
|
+
"textdomain": "default",
|
|
10
|
+
"usesContext": [ "comments/perPage", "postId" ],
|
|
11
|
+
"supports": {
|
|
12
|
+
"reusable": false,
|
|
13
|
+
"html": false
|
|
14
|
+
},
|
|
15
|
+
"editorStyle": "comments-pagination-numbers-editor"
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useBlockProps } from '@wordpress/block-editor';
|
|
5
|
+
|
|
6
|
+
const PaginationItem = ( { content, tag: Tag = 'a', extraClass = '' } ) => (
|
|
7
|
+
<Tag className={ `page-numbers ${ extraClass }` }>{ content }</Tag>
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
export default function CommentsPaginationNumbersEdit() {
|
|
11
|
+
return (
|
|
12
|
+
<div { ...useBlockProps() }>
|
|
13
|
+
<PaginationItem content="1" />
|
|
14
|
+
<PaginationItem content="2" />
|
|
15
|
+
<PaginationItem content="3" tag="span" extraClass="current" />
|
|
16
|
+
<PaginationItem content="4" />
|
|
17
|
+
<PaginationItem content="5" />
|
|
18
|
+
<PaginationItem content="..." tag="span" extraClass="dots" />
|
|
19
|
+
<PaginationItem content="8" />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { queryPaginationNumbers 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,69 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Server-side rendering of the `core/comments-pagination-numbers` block.
|
|
4
|
+
*
|
|
5
|
+
* @package WordPress
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Renders the `core/comments-pagination-numbers` 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
|
+
*
|
|
15
|
+
* @return string Returns the pagination numbers for the comments.
|
|
16
|
+
*/
|
|
17
|
+
function render_block_core_comments_pagination_numbers( $attributes, $content, $block ) {
|
|
18
|
+
// Bail out early if the post ID is not set for some reason.
|
|
19
|
+
if ( empty( $block->context['postId'] ) ) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
$comments_query = new WP_Comment_Query(
|
|
24
|
+
build_comment_query_vars_from_block( $block )
|
|
25
|
+
);
|
|
26
|
+
$total = $comments_query->max_num_pages;
|
|
27
|
+
|
|
28
|
+
// Get the current comment page from the URL.
|
|
29
|
+
$current = get_query_var( 'cpage' );
|
|
30
|
+
if ( ! $current ) {
|
|
31
|
+
// Get the number of the default page.
|
|
32
|
+
$current = 'newest' === get_option( 'default_comments_page' ) ? $total : 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Render links.
|
|
36
|
+
$content = paginate_comments_links(
|
|
37
|
+
array(
|
|
38
|
+
'total' => $total,
|
|
39
|
+
'current' => $current,
|
|
40
|
+
'prev_next' => false,
|
|
41
|
+
'echo' => false,
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
if ( empty( $content ) ) {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$wrapper_attributes = get_block_wrapper_attributes();
|
|
50
|
+
|
|
51
|
+
return sprintf(
|
|
52
|
+
'<div %1$s>%2$s</div>',
|
|
53
|
+
$wrapper_attributes,
|
|
54
|
+
$content
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Registers the `core/comments-pagination-numbers` block on the server.
|
|
60
|
+
*/
|
|
61
|
+
function register_block_core_comments_pagination_numbers() {
|
|
62
|
+
register_block_type_from_metadata(
|
|
63
|
+
__DIR__ . '/comments-pagination-numbers',
|
|
64
|
+
array(
|
|
65
|
+
'render_callback' => 'render_block_core_comments_pagination_numbers',
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
add_action( 'init', 'register_block_core_comments_pagination_numbers' );
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/comments-query-loop",
|
|
4
5
|
"title": "Comments Query Loop",
|
|
@@ -6,12 +7,9 @@
|
|
|
6
7
|
"description": "An advanced block that allows displaying post comments based on different query parameters and visual configurations.",
|
|
7
8
|
"textdomain": "default",
|
|
8
9
|
"attributes": {
|
|
9
|
-
"
|
|
10
|
-
"type": "number"
|
|
11
|
-
},
|
|
12
|
-
"queryPerPage": {
|
|
10
|
+
"perPage": {
|
|
13
11
|
"type": "number",
|
|
14
|
-
"default":
|
|
12
|
+
"default": null
|
|
15
13
|
},
|
|
16
14
|
"tagName": {
|
|
17
15
|
"type": "string",
|
|
@@ -19,8 +17,7 @@
|
|
|
19
17
|
}
|
|
20
18
|
},
|
|
21
19
|
"providesContext": {
|
|
22
|
-
"
|
|
23
|
-
"queryPerPage": "queryPerPage"
|
|
20
|
+
"comments/perPage": "perPage"
|
|
24
21
|
},
|
|
25
22
|
"supports": {
|
|
26
23
|
"align": [ "wide", "full" ],
|
|
@@ -18,7 +18,7 @@ import QueryToolbar from './toolbar';
|
|
|
18
18
|
const TEMPLATE = [ [ 'core/comment-template' ] ];
|
|
19
19
|
|
|
20
20
|
export default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {
|
|
21
|
-
const {
|
|
21
|
+
const { perPage, tagName: TagName } = attributes;
|
|
22
22
|
|
|
23
23
|
const blockProps = useBlockProps();
|
|
24
24
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
@@ -28,10 +28,7 @@ export default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {
|
|
|
28
28
|
return (
|
|
29
29
|
<>
|
|
30
30
|
<BlockControls>
|
|
31
|
-
<QueryToolbar
|
|
32
|
-
queryPerPage={ queryPerPage }
|
|
33
|
-
setQuery={ setAttributes }
|
|
34
|
-
/>
|
|
31
|
+
<QueryToolbar perPage={ perPage } setQuery={ setAttributes } />
|
|
35
32
|
</BlockControls>
|
|
36
33
|
<InspectorControls __experimentalGroup="advanced">
|
|
37
34
|
<SelectControl
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
import { settings } from '@wordpress/icons';
|
|
13
13
|
|
|
14
|
-
export default function CommentsQueryLoopToolbar( {
|
|
14
|
+
export default function CommentsQueryLoopToolbar( { perPage, setQuery } ) {
|
|
15
15
|
return (
|
|
16
16
|
<ToolbarGroup>
|
|
17
17
|
<Dropdown
|
|
@@ -41,11 +41,11 @@ export default function CommentsQueryLoopToolbar( { queryPerPage, setQuery } ) {
|
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
setQuery( {
|
|
44
|
-
|
|
44
|
+
perPage: num,
|
|
45
45
|
} );
|
|
46
46
|
} }
|
|
47
47
|
step="1"
|
|
48
|
-
value={
|
|
48
|
+
value={ perPage }
|
|
49
49
|
isDragEnabled={ false }
|
|
50
50
|
/>
|
|
51
51
|
</BaseControl>
|
package/src/common.scss
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
@include background-colors-deprecated();
|
|
7
7
|
@include foreground-colors-deprecated();
|
|
8
8
|
@include gradient-colors-deprecated();
|
|
9
|
+
// This CSS Custom Properties aren't used anymore as defaults,
|
|
10
|
+
// but we still need to keep them for backward compatibility.
|
|
11
|
+
--wp--preset--font-size--normal: 16px;
|
|
12
|
+
--wp--preset--font-size--huge: 42px;
|
|
9
13
|
}
|
|
10
14
|
|
|
11
15
|
// Font sizes (not used now, kept because of backward compatibility).
|
|
@@ -17,6 +21,14 @@
|
|
|
17
21
|
font-size: 2.625em;
|
|
18
22
|
}
|
|
19
23
|
|
|
24
|
+
.has-normal-font-size {
|
|
25
|
+
font-size: var(--wp--preset--font-size--normal) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.has-huge-font-size {
|
|
29
|
+
font-size: var(--wp--preset--font-size--huge) !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
// Text alignments.
|
|
21
33
|
.has-text-align-center {
|
|
22
34
|
text-align: center;
|
|
@@ -89,3 +101,22 @@
|
|
|
89
101
|
width: auto;
|
|
90
102
|
z-index: 100000;
|
|
91
103
|
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The following provide a simple means of applying a default border style when
|
|
107
|
+
* a user first makes a selection in the border block support panel.
|
|
108
|
+
* This prevents issues such as where the user could set a border width
|
|
109
|
+
* and see no border due there being no border style set.
|
|
110
|
+
*
|
|
111
|
+
* This is intended to be removed once intelligent defaults can be set while
|
|
112
|
+
* making border selections via the block support.
|
|
113
|
+
*
|
|
114
|
+
* See: https://github.com/WordPress/gutenberg/pull/33743
|
|
115
|
+
*/
|
|
116
|
+
html :where(.has-border-color) {
|
|
117
|
+
border-style: solid;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
html :where([style*="border-width"]) {
|
|
121
|
+
border-style: solid;
|
|
122
|
+
}
|
package/src/cover/block.json
CHANGED
package/src/cover/edit.js
CHANGED
|
@@ -706,6 +706,7 @@ function CoverEdit( {
|
|
|
706
706
|
<BoxControlVisualizer
|
|
707
707
|
values={ styleAttribute?.spacing?.padding }
|
|
708
708
|
showValues={ styleAttribute?.visualizers?.padding }
|
|
709
|
+
className="block-library-cover__padding-visualizer"
|
|
709
710
|
/>
|
|
710
711
|
<ResizableCover
|
|
711
712
|
className="block-library-cover__resize-container"
|
package/src/cover/style.scss
CHANGED
package/src/editor.scss
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
@import "./buttons/editor.scss";
|
|
6
6
|
@import "./categories/editor.scss";
|
|
7
7
|
@import "./columns/editor.scss";
|
|
8
|
+
@import "./comments-pagination/editor.scss";
|
|
9
|
+
@import "./comments-pagination-numbers/editor.scss";
|
|
8
10
|
@import "./cover/editor.scss";
|
|
9
11
|
@import "./embed/editor.scss";
|
|
10
12
|
@import "./file/editor.scss";
|
|
@@ -48,6 +50,10 @@
|
|
|
48
50
|
@include background-colors-deprecated();
|
|
49
51
|
@include foreground-colors-deprecated();
|
|
50
52
|
@include gradient-colors-deprecated();
|
|
53
|
+
// This CSS Custom Properties aren't used anymore as defaults,
|
|
54
|
+
// but we still need to keep them for backward compatibility.
|
|
55
|
+
--wp--preset--font-size--normal: 16px;
|
|
56
|
+
--wp--preset--font-size--huge: 42px;
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
// Font sizes (not used now, kept because of backward compatibility).
|
|
@@ -62,6 +68,14 @@
|
|
|
62
68
|
font-size: 42px;
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
.editor-styles-wrapper .has-normal-font-size {
|
|
72
|
+
font-size: var(--wp--preset--font-size--normal) !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.editor-styles-wrapper .has-huge-font-size {
|
|
76
|
+
font-size: var(--wp--preset--font-size--huge) !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
65
79
|
/**
|
|
66
80
|
* Editor Normalization Styles
|
|
67
81
|
*
|
package/src/embed/block.json
CHANGED
package/src/embed/edit.native.js
CHANGED
|
@@ -13,7 +13,7 @@ import { embedContentIcon } from './icons';
|
|
|
13
13
|
import EmbedLoading from './embed-loading';
|
|
14
14
|
import EmbedPlaceholder from './embed-placeholder';
|
|
15
15
|
import EmbedPreview from './embed-preview';
|
|
16
|
-
import
|
|
16
|
+
import EmbedLinkSettings from './embed-link-settings';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* External dependencies
|
|
@@ -24,7 +24,7 @@ import classnames from 'classnames';
|
|
|
24
24
|
* WordPress dependencies
|
|
25
25
|
*/
|
|
26
26
|
import { _x } from '@wordpress/i18n';
|
|
27
|
-
import { useState, useEffect } from '@wordpress/element';
|
|
27
|
+
import { useCallback, useState, useEffect } from '@wordpress/element';
|
|
28
28
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
29
29
|
import {
|
|
30
30
|
useBlockProps,
|
|
@@ -196,6 +196,14 @@ const EmbedEdit = ( props ) => {
|
|
|
196
196
|
isEditingURL,
|
|
197
197
|
] );
|
|
198
198
|
|
|
199
|
+
const onEditURL = useCallback( ( value ) => {
|
|
200
|
+
// The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,
|
|
201
|
+
// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL
|
|
202
|
+
// for creating the new block.
|
|
203
|
+
setAttributes( { url: value } );
|
|
204
|
+
setIsEditingURL( false );
|
|
205
|
+
}, [] );
|
|
206
|
+
|
|
199
207
|
const blockProps = useBlockProps();
|
|
200
208
|
|
|
201
209
|
if ( fetching ) {
|
|
@@ -230,16 +238,12 @@ const EmbedEdit = ( props ) => {
|
|
|
230
238
|
( WP_EMBED_TYPE === type &&
|
|
231
239
|
! NOT_PREVIEWABLE_WP_EMBED_PROVIDERS.includes( providerNameSlug ) );
|
|
232
240
|
|
|
233
|
-
const
|
|
241
|
+
const linkLabel = WP_EMBED_TYPE === type ? 'WordPress' : title;
|
|
234
242
|
|
|
235
243
|
return (
|
|
236
244
|
<>
|
|
237
245
|
{ showEmbedPlaceholder ? (
|
|
238
246
|
<>
|
|
239
|
-
<EmbedControls
|
|
240
|
-
showEditButton={ cannotEmbed }
|
|
241
|
-
switchBackToURLInput={ () => setIsEditingURL( true ) }
|
|
242
|
-
/>
|
|
243
247
|
<View { ...blockProps }>
|
|
244
248
|
<EmbedPlaceholder
|
|
245
249
|
icon={ icon }
|
|
@@ -256,18 +260,22 @@ const EmbedEdit = ( props ) => {
|
|
|
256
260
|
url,
|
|
257
261
|
] );
|
|
258
262
|
} }
|
|
263
|
+
openEmbedLinkSettings={ () =>
|
|
264
|
+
setShowEmbedBottomSheet( true )
|
|
265
|
+
}
|
|
259
266
|
/>
|
|
260
267
|
</View>
|
|
261
268
|
</>
|
|
262
269
|
) : (
|
|
263
270
|
<>
|
|
264
271
|
<EmbedControls
|
|
265
|
-
showEditButton={ preview && ! cannotEmbed }
|
|
266
272
|
themeSupportsResponsive={ themeSupportsResponsive }
|
|
267
273
|
blockSupportsResponsive={ responsive }
|
|
268
274
|
allowResponsive={ allowResponsive }
|
|
269
275
|
toggleResponsive={ toggleResponsive }
|
|
270
|
-
|
|
276
|
+
url={ url }
|
|
277
|
+
linkLabel={ linkLabel }
|
|
278
|
+
onEditURL={ onEditURL }
|
|
271
279
|
/>
|
|
272
280
|
<View { ...blockProps }>
|
|
273
281
|
<EmbedPreview
|
|
@@ -289,18 +297,15 @@ const EmbedEdit = ( props ) => {
|
|
|
289
297
|
</View>
|
|
290
298
|
</>
|
|
291
299
|
) }
|
|
292
|
-
<
|
|
300
|
+
<EmbedLinkSettings
|
|
301
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
302
|
+
autoFocus
|
|
293
303
|
value={ url }
|
|
294
|
-
label={
|
|
304
|
+
label={ linkLabel }
|
|
295
305
|
isVisible={ showEmbedBottomSheet }
|
|
296
306
|
onClose={ () => setShowEmbedBottomSheet( false ) }
|
|
297
|
-
onSubmit={
|
|
298
|
-
|
|
299
|
-
// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL
|
|
300
|
-
// for creating the new block.
|
|
301
|
-
setAttributes( { url: value } );
|
|
302
|
-
setIsEditingURL( false );
|
|
303
|
-
} }
|
|
307
|
+
onSubmit={ onEditURL }
|
|
308
|
+
withBottomSheet
|
|
304
309
|
/>
|
|
305
310
|
</>
|
|
306
311
|
);
|