@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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import useGetNewImages from '../use-get-new-images';
|
|
10
|
+
|
|
11
|
+
const TestComponent = ( { images, imageData } ) => {
|
|
12
|
+
const newImages = useGetNewImages( images, imageData );
|
|
13
|
+
return <div title="testResult">{ JSON.stringify( newImages ) }</div>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
describe( 'gallery block useGetNewImages hook', () => {
|
|
17
|
+
it( 'returns null if no images currently in the gallery', () => {
|
|
18
|
+
render( <TestComponent images={ [] } imageData={ [] } /> );
|
|
19
|
+
expect( screen.getByTitle( 'testResult' ) ).toHaveTextContent( 'null' );
|
|
20
|
+
} );
|
|
21
|
+
|
|
22
|
+
it( 'should not return images that have been loaded from the saved post content', () => {
|
|
23
|
+
render(
|
|
24
|
+
<TestComponent
|
|
25
|
+
images={ [
|
|
26
|
+
{ clientId: 'abc123', id: 1, fromSavedContent: true },
|
|
27
|
+
] }
|
|
28
|
+
imageData={ [ { id: 1 } ] }
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
expect( screen.getByTitle( 'testResult' ) ).toHaveTextContent( 'null' );
|
|
32
|
+
} );
|
|
33
|
+
|
|
34
|
+
it( 'returns array of new images that have been added since the last render', () => {
|
|
35
|
+
const { rerender } = render(
|
|
36
|
+
<TestComponent
|
|
37
|
+
images={ [ { clientId: 'abc123', id: 1 } ] }
|
|
38
|
+
imageData={ [ { id: 1 } ] }
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
expect( screen.getByTitle( 'testResult' ) ).toHaveTextContent(
|
|
43
|
+
'[{"clientId":"abc123","id":1}]'
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
rerender(
|
|
47
|
+
<TestComponent
|
|
48
|
+
images={ [
|
|
49
|
+
{ clientId: 'abc123', id: 1 },
|
|
50
|
+
{ clientId: 'efg456', id: 2 },
|
|
51
|
+
] }
|
|
52
|
+
imageData={ [ { id: 1 }, { id: 2 } ] }
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
expect( screen.getByTitle( 'testResult' ) ).toHaveTextContent(
|
|
57
|
+
'[{"clientId":"efg456","id":2}]'
|
|
58
|
+
);
|
|
59
|
+
} );
|
|
60
|
+
|
|
61
|
+
it( 'sees an image as new if it has been deleted and added again', () => {
|
|
62
|
+
const { rerender } = render(
|
|
63
|
+
<TestComponent
|
|
64
|
+
images={ [
|
|
65
|
+
{ clientId: 'abc123', id: 1 },
|
|
66
|
+
{ clientId: 'efg456', id: 2 },
|
|
67
|
+
] }
|
|
68
|
+
imageData={ [ { id: 1 }, { id: 2 } ] }
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
rerender(
|
|
73
|
+
<TestComponent
|
|
74
|
+
images={ [ { clientId: 'abc123', id: 1 } ] }
|
|
75
|
+
imageData={ [ { id: 1 } ] }
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
rerender(
|
|
80
|
+
<TestComponent
|
|
81
|
+
images={ [
|
|
82
|
+
{ clientId: 'abc123', id: 1 },
|
|
83
|
+
{ clientId: 'efg456', id: 2 },
|
|
84
|
+
] }
|
|
85
|
+
imageData={ [ { id: 1 }, { id: 2 } ] }
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
expect( screen.getByTitle( 'testResult' ) ).toHaveTextContent(
|
|
90
|
+
'[{"clientId":"efg456","id":2}]'
|
|
91
|
+
);
|
|
92
|
+
} );
|
|
93
|
+
} );
|
package/src/group/block.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/group",
|
|
4
5
|
"title": "Group",
|
|
@@ -34,7 +35,13 @@
|
|
|
34
35
|
"color": true,
|
|
35
36
|
"radius": true,
|
|
36
37
|
"style": true,
|
|
37
|
-
"width": true
|
|
38
|
+
"width": true,
|
|
39
|
+
"__experimentalDefaultControls": {
|
|
40
|
+
"color": true,
|
|
41
|
+
"radius": true,
|
|
42
|
+
"style": true,
|
|
43
|
+
"width": true
|
|
44
|
+
}
|
|
38
45
|
},
|
|
39
46
|
"__experimentalLayout": true
|
|
40
47
|
},
|
package/src/group/theme.scss
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
// Add low specificity default padding to groups with backgrounds.
|
|
2
|
+
:where(.wp-block-group.has-background) {
|
|
3
|
+
// Matches paragraph block padding.
|
|
4
|
+
padding: $block-bg-padding--v $block-bg-padding--h;
|
|
6
5
|
}
|
package/src/heading/block.json
CHANGED
package/src/home-link/block.json
CHANGED
package/src/home-link/index.php
CHANGED
|
@@ -79,7 +79,7 @@ function block_core_home_link_build_css_font_sizes( $context ) {
|
|
|
79
79
|
$font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
|
|
80
80
|
} elseif ( $has_custom_font_size ) {
|
|
81
81
|
// Add the custom font size inline style.
|
|
82
|
-
$font_sizes['inline_styles'] = sprintf( 'font-size: %
|
|
82
|
+
$font_sizes['inline_styles'] = sprintf( 'font-size: %s;', $context['style']['typography']['fontSize'] );
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
return $font_sizes;
|
|
@@ -114,9 +114,9 @@ function block_core_home_link_build_li_wrapper_attributes( $context ) {
|
|
|
114
114
|
/**
|
|
115
115
|
* Renders the `core/home-link` block.
|
|
116
116
|
*
|
|
117
|
-
* @param array
|
|
118
|
-
* @param array
|
|
119
|
-
* @param
|
|
117
|
+
* @param array $attributes The block attributes.
|
|
118
|
+
* @param array $content The saved content.
|
|
119
|
+
* @param WP_Block $block The parsed block.
|
|
120
120
|
*
|
|
121
121
|
* @return string Returns the post content with the home url added.
|
|
122
122
|
*/
|
package/src/html/block.json
CHANGED
package/src/image/block.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/image",
|
|
4
5
|
"title": "Image",
|
|
@@ -83,7 +84,10 @@
|
|
|
83
84
|
"background": false
|
|
84
85
|
},
|
|
85
86
|
"__experimentalBorder": {
|
|
86
|
-
"radius": true
|
|
87
|
+
"radius": true,
|
|
88
|
+
"__experimentalDefaultControls": {
|
|
89
|
+
"radius": true
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
93
|
"styles": [
|
package/src/image/edit.js
CHANGED
|
@@ -87,6 +87,20 @@ function hasDefaultSize( image, defaultSize ) {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Checks if a media attachment object has been "destroyed",
|
|
92
|
+
* that is, removed from the media library. The core Media Library
|
|
93
|
+
* adds a `destroyed` property to a deleted attachment object in the media collection.
|
|
94
|
+
*
|
|
95
|
+
* @param {number} id The attachment id.
|
|
96
|
+
*
|
|
97
|
+
* @return {boolean} Whether the image has been destroyed.
|
|
98
|
+
*/
|
|
99
|
+
export function isMediaDestroyed( id ) {
|
|
100
|
+
const attachment = wp?.media?.attachment( id ) || {};
|
|
101
|
+
return attachment.destroyed;
|
|
102
|
+
}
|
|
103
|
+
|
|
90
104
|
export function ImageEdit( {
|
|
91
105
|
attributes,
|
|
92
106
|
setAttributes,
|
|
@@ -127,6 +141,33 @@ export function ImageEdit( {
|
|
|
127
141
|
return pick( getSettings(), [ 'imageDefaultSize', 'mediaUpload' ] );
|
|
128
142
|
}, [] );
|
|
129
143
|
|
|
144
|
+
// A callback passed to MediaUpload,
|
|
145
|
+
// fired when the media modal closes.
|
|
146
|
+
function onCloseModal() {
|
|
147
|
+
if ( isMediaDestroyed( attributes?.id ) ) {
|
|
148
|
+
setAttributes( {
|
|
149
|
+
url: undefined,
|
|
150
|
+
id: undefined,
|
|
151
|
+
} );
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
Runs an error callback if the image does not load.
|
|
157
|
+
If the error callback is triggered, we infer that that image
|
|
158
|
+
has been deleted.
|
|
159
|
+
*/
|
|
160
|
+
function onImageError( isReplaced = false ) {
|
|
161
|
+
// If the image block was not replaced with an embed,
|
|
162
|
+
// clear the attributes and trigger the placeholder.
|
|
163
|
+
if ( ! isReplaced ) {
|
|
164
|
+
setAttributes( {
|
|
165
|
+
url: undefined,
|
|
166
|
+
id: undefined,
|
|
167
|
+
} );
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
130
171
|
function onUploadError( message ) {
|
|
131
172
|
noticeOperations.removeAllNotices();
|
|
132
173
|
noticeOperations.createErrorNotice( message );
|
|
@@ -324,6 +365,8 @@ export function ImageEdit( {
|
|
|
324
365
|
containerRef={ ref }
|
|
325
366
|
context={ context }
|
|
326
367
|
clientId={ clientId }
|
|
368
|
+
onCloseModal={ onCloseModal }
|
|
369
|
+
onImageLoadError={ onImageError }
|
|
327
370
|
/>
|
|
328
371
|
) }
|
|
329
372
|
{ ! url && (
|
|
@@ -340,6 +383,7 @@ export function ImageEdit( {
|
|
|
340
383
|
onSelectURL={ onSelectURL }
|
|
341
384
|
notices={ noticeUI }
|
|
342
385
|
onError={ onUploadError }
|
|
386
|
+
onClose={ onCloseModal }
|
|
343
387
|
accept="image/*"
|
|
344
388
|
allowedTypes={ ALLOWED_MEDIA_TYPES }
|
|
345
389
|
value={ { id, src } }
|
package/src/image/edit.native.js
CHANGED
package/src/image/editor.scss
CHANGED
|
@@ -70,6 +70,24 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
*:not([data-align]) {
|
|
74
|
+
> .wp-block-image {
|
|
75
|
+
display: grid;
|
|
76
|
+
grid-template-columns: [image] minmax(0, max-content) [placeholder] auto;
|
|
77
|
+
.components-placeholder {
|
|
78
|
+
grid-column: placeholder;
|
|
79
|
+
}
|
|
80
|
+
> div:not(.components-placeholder) {
|
|
81
|
+
grid-column: image;
|
|
82
|
+
}
|
|
83
|
+
> figcaption {
|
|
84
|
+
grid-column: image;
|
|
85
|
+
display: table-caption;
|
|
86
|
+
caption-side: bottom;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
73
91
|
.wp-block[data-align="left"] > .wp-block-image {
|
|
74
92
|
margin-right: 1em;
|
|
75
93
|
margin-left: 0;
|
package/src/image/image.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
__experimentalImageEditor as ImageEditor,
|
|
31
31
|
__experimentalImageEditingProvider as ImageEditingProvider,
|
|
32
32
|
} from '@wordpress/block-editor';
|
|
33
|
-
import { useEffect, useState, useRef } from '@wordpress/element';
|
|
33
|
+
import { useEffect, useMemo, useState, useRef } from '@wordpress/element';
|
|
34
34
|
import { __, sprintf, isRTL } from '@wordpress/i18n';
|
|
35
35
|
import { getFilename } from '@wordpress/url';
|
|
36
36
|
import { createBlock, switchToBlockType } from '@wordpress/blocks';
|
|
@@ -43,7 +43,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
43
43
|
*/
|
|
44
44
|
import { createUpgradedEmbedBlock } from '../embed/util';
|
|
45
45
|
import useClientWidth from './use-client-width';
|
|
46
|
-
import { isExternalImage } from './edit';
|
|
46
|
+
import { isExternalImage, isMediaDestroyed } from './edit';
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Module constants
|
|
@@ -72,13 +72,16 @@ export default function Image( {
|
|
|
72
72
|
isSelected,
|
|
73
73
|
insertBlocksAfter,
|
|
74
74
|
onReplace,
|
|
75
|
+
onCloseModal,
|
|
75
76
|
onSelectImage,
|
|
76
77
|
onSelectURL,
|
|
77
78
|
onUploadError,
|
|
78
79
|
containerRef,
|
|
79
80
|
context,
|
|
80
81
|
clientId,
|
|
82
|
+
onImageLoadError,
|
|
81
83
|
} ) {
|
|
84
|
+
const imageRef = useRef();
|
|
82
85
|
const captionRef = useRef();
|
|
83
86
|
const prevUrl = usePrevious( url );
|
|
84
87
|
const { allowResize = true } = context;
|
|
@@ -141,7 +144,10 @@ export default function Image( {
|
|
|
141
144
|
);
|
|
142
145
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
143
146
|
const isWideAligned = includes( [ 'wide', 'full' ], align );
|
|
144
|
-
const [
|
|
147
|
+
const [
|
|
148
|
+
{ loadedNaturalWidth, loadedNaturalHeight },
|
|
149
|
+
setLoadedNaturalSize,
|
|
150
|
+
] = useState( {} );
|
|
145
151
|
const [ isEditingImage, setIsEditingImage ] = useState( false );
|
|
146
152
|
const [ externalBlob, setExternalBlob ] = useState();
|
|
147
153
|
const clientWidth = useClientWidth( containerRef, [ align ] );
|
|
@@ -179,6 +185,27 @@ export default function Image( {
|
|
|
179
185
|
}
|
|
180
186
|
}, [ url, prevUrl ] );
|
|
181
187
|
|
|
188
|
+
// Get naturalWidth and naturalHeight from image ref, and fall back to loaded natural
|
|
189
|
+
// width and height. This resolves an issue in Safari where the loaded natural
|
|
190
|
+
// witdth and height is otherwise lost when switching between alignments.
|
|
191
|
+
// See: https://github.com/WordPress/gutenberg/pull/37210.
|
|
192
|
+
const { naturalWidth, naturalHeight } = useMemo( () => {
|
|
193
|
+
return {
|
|
194
|
+
naturalWidth:
|
|
195
|
+
imageRef.current?.naturalWidth ||
|
|
196
|
+
loadedNaturalWidth ||
|
|
197
|
+
undefined,
|
|
198
|
+
naturalHeight:
|
|
199
|
+
imageRef.current?.naturalHeight ||
|
|
200
|
+
loadedNaturalHeight ||
|
|
201
|
+
undefined,
|
|
202
|
+
};
|
|
203
|
+
}, [
|
|
204
|
+
loadedNaturalWidth,
|
|
205
|
+
loadedNaturalHeight,
|
|
206
|
+
imageRef.current?.complete,
|
|
207
|
+
] );
|
|
208
|
+
|
|
182
209
|
function onResizeStart() {
|
|
183
210
|
toggleSelection( false );
|
|
184
211
|
}
|
|
@@ -188,11 +215,16 @@ export default function Image( {
|
|
|
188
215
|
}
|
|
189
216
|
|
|
190
217
|
function onImageError() {
|
|
191
|
-
// Check if there's an embed block that handles this URL.
|
|
218
|
+
// Check if there's an embed block that handles this URL, e.g., instagram URL.
|
|
219
|
+
// See: https://github.com/WordPress/gutenberg/pull/11472
|
|
192
220
|
const embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );
|
|
193
|
-
|
|
221
|
+
const shouldReplace = undefined !== embedBlock;
|
|
222
|
+
|
|
223
|
+
if ( shouldReplace ) {
|
|
194
224
|
onReplace( embedBlock );
|
|
195
225
|
}
|
|
226
|
+
|
|
227
|
+
onImageLoadError( shouldReplace );
|
|
196
228
|
}
|
|
197
229
|
|
|
198
230
|
function onSetHref( props ) {
|
|
@@ -264,6 +296,9 @@ export default function Image( {
|
|
|
264
296
|
if ( ! isSelected ) {
|
|
265
297
|
setIsEditingImage( false );
|
|
266
298
|
}
|
|
299
|
+
if ( isSelected && isMediaDestroyed( id ) ) {
|
|
300
|
+
onImageLoadError();
|
|
301
|
+
}
|
|
267
302
|
}, [ isSelected ] );
|
|
268
303
|
|
|
269
304
|
const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
|
|
@@ -327,6 +362,7 @@ export default function Image( {
|
|
|
327
362
|
onSelect={ onSelectImage }
|
|
328
363
|
onSelectURL={ onSelectURL }
|
|
329
364
|
onError={ onUploadError }
|
|
365
|
+
onCloseModal={ onCloseModal }
|
|
330
366
|
/>
|
|
331
367
|
</BlockControls>
|
|
332
368
|
) }
|
|
@@ -411,13 +447,12 @@ export default function Image( {
|
|
|
411
447
|
alt={ defaultedAlt }
|
|
412
448
|
onError={ () => onImageError() }
|
|
413
449
|
onLoad={ ( event ) => {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
] )
|
|
419
|
-
);
|
|
450
|
+
setLoadedNaturalSize( {
|
|
451
|
+
loadedNaturalWidth: event.target?.naturalWidth,
|
|
452
|
+
loadedNaturalHeight: event.target?.naturalHeight,
|
|
453
|
+
} );
|
|
420
454
|
} }
|
|
455
|
+
ref={ imageRef }
|
|
421
456
|
/>
|
|
422
457
|
{ temporaryURL && <Spinner /> }
|
|
423
458
|
</>
|
package/src/image/index.php
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @param array $attributes The block attributes.
|
|
13
13
|
* @param array $content The block content.
|
|
14
|
-
* @return string
|
|
14
|
+
* @return string Returns the block content with the data-id attribute added.
|
|
15
15
|
*/
|
|
16
16
|
function render_block_core_image( $attributes, $content ) {
|
|
17
17
|
if ( isset( $attributes['data-id'] ) ) {
|
package/src/index.js
CHANGED
|
@@ -30,6 +30,8 @@ import * as commentEditLink from './comment-edit-link';
|
|
|
30
30
|
import * as commentReplyLink from './comment-reply-link';
|
|
31
31
|
import * as commentTemplate from './comment-template';
|
|
32
32
|
import * as commentsQueryLoop from './comments-query-loop';
|
|
33
|
+
import * as commentsPagination from './comments-pagination';
|
|
34
|
+
import * as commentsPaginationNumbers from './comments-pagination-numbers';
|
|
33
35
|
import * as cover from './cover';
|
|
34
36
|
import * as embed from './embed';
|
|
35
37
|
import * as file from './file';
|
|
@@ -254,6 +256,8 @@ export const __experimentalRegisterExperimentalCoreBlocks =
|
|
|
254
256
|
commentReplyLink,
|
|
255
257
|
commentTemplate,
|
|
256
258
|
commentsQueryLoop,
|
|
259
|
+
commentsPagination,
|
|
260
|
+
commentsPaginationNumbers,
|
|
257
261
|
navigationArea,
|
|
258
262
|
postComment,
|
|
259
263
|
postCommentsCount,
|
package/src/list/block.json
CHANGED
package/src/loginout/block.json
CHANGED
package/src/missing/block.json
CHANGED
package/src/more/block.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Navigation block
|
|
2
|
+
|
|
3
|
+
The Navigation block is a container block for the collection of blocks that allow visitors to get around your site. See also the Navigation Link block and Navigation Submenu block.
|
|
4
|
+
|
|
5
|
+
## CSS Classes
|
|
6
|
+
|
|
7
|
+
The structural CSS for the navigation block targets generic classnames across menu items of multiple types including those automatically generated by the Page List block. Here are some of the notable classnames and what they are used for:
|
|
8
|
+
|
|
9
|
+
- `.wp-block-navigation__submenu-container` is applied to submenus to main menu items.
|
|
10
|
+
- `.wp-block-navigation-item` is applied to every menu item.
|
|
11
|
+
- `.wp-block-navigation-item__content` is applied to the link inside a menu item.
|
|
12
|
+
- `.wp-block-navigation-item__label` is applied to the innermost container around the menu item text label.
|
|
13
|
+
- `.wp-block-navigation__submenu-icon` is applied to the submenu indicator (chevron).
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/navigation",
|
|
4
5
|
"title": "Navigation",
|
|
5
6
|
"category": "theme",
|
|
6
7
|
"description": "A collection of blocks that allow visitors to get around your site.",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"menu",
|
|
9
|
-
"navigation",
|
|
10
|
-
"links"
|
|
11
|
-
],
|
|
8
|
+
"keywords": [ "menu", "navigation", "links" ],
|
|
12
9
|
"textdomain": "default",
|
|
13
10
|
"attributes": {
|
|
14
11
|
"ref": {
|
|
@@ -78,10 +75,7 @@
|
|
|
78
75
|
"orientation": "orientation"
|
|
79
76
|
},
|
|
80
77
|
"supports": {
|
|
81
|
-
"align": [
|
|
82
|
-
"wide",
|
|
83
|
-
"full"
|
|
84
|
-
],
|
|
78
|
+
"align": [ "wide", "full" ],
|
|
85
79
|
"anchor": true,
|
|
86
80
|
"html": false,
|
|
87
81
|
"inserter": true,
|
|
@@ -99,13 +93,7 @@
|
|
|
99
93
|
},
|
|
100
94
|
"spacing": {
|
|
101
95
|
"blockGap": true,
|
|
102
|
-
"units": [
|
|
103
|
-
"px",
|
|
104
|
-
"em",
|
|
105
|
-
"rem",
|
|
106
|
-
"vh",
|
|
107
|
-
"vw"
|
|
108
|
-
],
|
|
96
|
+
"units": [ "px", "em", "rem", "vh", "vw" ],
|
|
109
97
|
"__experimentalDefaultControls": {
|
|
110
98
|
"blockGap": true
|
|
111
99
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
+
import noop from 'lodash';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -109,12 +110,19 @@ function Navigation( {
|
|
|
109
110
|
layout: { justifyContent, orientation = 'horizontal' } = {},
|
|
110
111
|
} = attributes;
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
let areaMenu,
|
|
114
|
+
setAreaMenu = noop;
|
|
115
|
+
// Navigation areas are deprecated and on their way out. Let's not perform
|
|
116
|
+
// the request unless we're in an environment where the endpoint exists.
|
|
117
|
+
if ( process.env.GUTENBERG_PHASE === 2 ) {
|
|
118
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
119
|
+
[ areaMenu, setAreaMenu ] = useEntityProp(
|
|
120
|
+
'root',
|
|
121
|
+
'navigationArea',
|
|
122
|
+
'navigation',
|
|
123
|
+
navigationArea
|
|
124
|
+
);
|
|
125
|
+
}
|
|
118
126
|
|
|
119
127
|
const navigationAreaMenu = areaMenu === 0 ? undefined : areaMenu;
|
|
120
128
|
|
|
@@ -134,13 +142,19 @@ function Navigation( {
|
|
|
134
142
|
`navigationMenu/${ ref }`
|
|
135
143
|
);
|
|
136
144
|
|
|
137
|
-
const { innerBlocks, isInnerBlockSelected } = useSelect(
|
|
145
|
+
const { innerBlocks, isInnerBlockSelected, hasSubmenus } = useSelect(
|
|
138
146
|
( select ) => {
|
|
139
147
|
const { getBlocks, hasSelectedInnerBlock } = select(
|
|
140
148
|
blockEditorStore
|
|
141
149
|
);
|
|
150
|
+
const blocks = getBlocks( clientId );
|
|
151
|
+
const firstSubmenu = !! blocks.find(
|
|
152
|
+
( block ) => block.name === 'core/navigation-submenu'
|
|
153
|
+
);
|
|
154
|
+
|
|
142
155
|
return {
|
|
143
|
-
|
|
156
|
+
hasSubmenus: firstSubmenu,
|
|
157
|
+
innerBlocks: blocks,
|
|
144
158
|
isInnerBlockSelected: hasSelectedInnerBlock( clientId, true ),
|
|
145
159
|
};
|
|
146
160
|
},
|
|
@@ -411,26 +425,35 @@ function Navigation( {
|
|
|
411
425
|
label={ __( 'Always' ) }
|
|
412
426
|
/>
|
|
413
427
|
</ToggleGroupControl>
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
428
|
+
{ hasSubmenus && (
|
|
429
|
+
<>
|
|
430
|
+
<h3>{ __( 'Submenus' ) }</h3>
|
|
431
|
+
<ToggleControl
|
|
432
|
+
checked={ openSubmenusOnClick }
|
|
433
|
+
onChange={ ( value ) => {
|
|
434
|
+
setAttributes( {
|
|
435
|
+
openSubmenusOnClick: value,
|
|
436
|
+
...( value && {
|
|
437
|
+
showSubmenuIcon: true,
|
|
438
|
+
} ), // Make sure arrows are shown when we toggle this on.
|
|
439
|
+
} );
|
|
440
|
+
} }
|
|
441
|
+
label={ __( 'Open on click' ) }
|
|
442
|
+
/>
|
|
443
|
+
|
|
444
|
+
<ToggleControl
|
|
445
|
+
checked={ showSubmenuIcon }
|
|
446
|
+
onChange={ ( value ) => {
|
|
447
|
+
setAttributes( {
|
|
448
|
+
showSubmenuIcon: value,
|
|
449
|
+
} );
|
|
450
|
+
} }
|
|
451
|
+
disabled={
|
|
452
|
+
attributes.openSubmenusOnClick
|
|
453
|
+
}
|
|
454
|
+
label={ __( 'Show arrow' ) }
|
|
455
|
+
/>
|
|
456
|
+
</>
|
|
434
457
|
) }
|
|
435
458
|
</PanelBody>
|
|
436
459
|
) }
|