@wordpress/block-library 6.0.23 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/LICENSE.md +1 -1
- package/README.md +7 -1
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.js +20 -5
- package/build/audio/edit.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 +10 -2
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +6 -0
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js +16 -6
- package/build/buttons/edit.native.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 +5 -1
- package/build/calendar/index.js.map +1 -1
- package/build/calendar/transforms.js +27 -0
- package/build/calendar/transforms.js.map +1 -0
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +11 -2
- package/build/code/index.js.map +1 -1
- package/build/code/transforms.js +1 -1
- package/build/code/transforms.js.map +1 -1
- package/build/column/index.js +6 -1
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +16 -1
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/edit.js +5 -2
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +9 -1
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +7 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +6 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +7 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +7 -2
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +6 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +155 -26
- 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 +68 -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 +79 -0
- package/build/comments-pagination/edit.js.map +1 -0
- package/build/comments-pagination/index.js +76 -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-next/edit.js +54 -0
- package/build/comments-pagination-next/edit.js.map +1 -0
- package/build/comments-pagination-next/index.js +69 -0
- package/build/comments-pagination-next/index.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 +46 -0
- package/build/comments-pagination-numbers/index.js.map +1 -0
- package/build/comments-pagination-previous/edit.js +54 -0
- package/build/comments-pagination-previous/edit.js.map +1 -0
- package/build/comments-pagination-previous/index.js +69 -0
- package/build/comments-pagination-previous/index.js.map +1 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js +102 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build/comments-query-loop/edit.js +23 -28
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +21 -8
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/deprecated.js +181 -15
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +9 -5
- package/build/cover/edit.js.map +1 -1
- package/build/cover/edit.native.js +40 -32
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/overlay-color-settings.native.js +11 -1
- package/build/cover/overlay-color-settings.native.js.map +1 -1
- package/build/cover/save.js +8 -3
- package/build/cover/save.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-loading.js +1 -3
- package/build/embed/embed-loading.js.map +1 -1
- 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/edit.native.js +5 -2
- package/build/file/edit.native.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/constants.js +5 -1
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/deprecated.js +4 -0
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +45 -14
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +1 -0
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/shared.js +1 -1
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +8 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/utils.js +4 -3
- package/build/gallery/utils.js.map +1 -1
- package/build/group/index.js +24 -2
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +18 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +6 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +8 -5
- 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 +59 -19
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +15 -4
- 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 +17 -3
- 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/edit.js +47 -58
- package/build/latest-posts/edit.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 +6 -1
- 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 +6 -1
- 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/existing-menus-options.js +62 -0
- package/build/navigation/edit/existing-menus-options.js.map +1 -0
- package/build/navigation/edit/index.js +48 -15
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +10 -4
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +51 -21
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +35 -0
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build/navigation/edit/placeholder/index.js +33 -109
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/placeholder/placeholder-preview.js +8 -12
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +11 -22
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/index.js +10 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +4 -1
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-convert-classic-menu.js +59 -0
- package/build/navigation/use-convert-classic-menu.js.map +1 -0
- package/build/navigation/use-navigation-entities.js +6 -3
- package/build/navigation/use-navigation-entities.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 +4 -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/edit.js +37 -10
- package/build/page-list/edit.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 +7 -2
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +7 -2
- 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 +7 -2
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/edit.js +76 -0
- package/build/post-author-biography/edit.js.map +1 -0
- package/build/post-author-biography/index.js +68 -0
- package/build/post-author-biography/index.js.map +1 -0
- package/build/post-author-name/edit.js +98 -0
- package/build/post-author-name/edit.js.map +1 -0
- package/build/post-author-name/index.js +75 -0
- package/build/post-author-name/index.js.map +1 -0
- package/build/post-comment/index.js +1 -0
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/index.js +6 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +6 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +6 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +6 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +9 -3
- package/build/post-content/edit.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +7 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +2 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +10 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-excerpt/transforms.js +27 -0
- package/build/post-excerpt/transforms.js.map +1 -0
- package/build/post-featured-image/dimension-controls.js +74 -32
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +52 -20
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +4 -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 +34 -7
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +2 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +10 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +10 -7
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +7 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.native.js +3 -6
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +6 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +13 -2
- package/build/pullquote/index.js.map +1 -1
- package/build/query/deprecated.js +96 -3
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +4 -4
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +102 -0
- package/build/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build/query/edit/inspector-controls/index.js +166 -0
- package/build/query/edit/inspector-controls/index.js.map +1 -0
- package/build/query/edit/inspector-controls/order-control.js +55 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js +158 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build/query/index.js +8 -4
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +49 -38
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +0 -4
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination/index.js +8 -2
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +6 -2
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +2 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +6 -2
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +9 -1
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +2 -5
- package/build/quote/index.js.map +1 -1
- package/build/read-more/edit.js +55 -0
- package/build/read-more/edit.js.map +1 -0
- package/build/read-more/index.js +87 -0
- package/build/read-more/index.js.map +1 -0
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +6 -4
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +13 -2
- 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/edit.js +4 -33
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +5 -1
- package/build/site-logo/index.js.map +1 -1
- package/build/site-logo/transforms.js +31 -0
- package/build/site-logo/transforms.js.map +1 -0
- package/build/site-tagline/edit.js +7 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +7 -2
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +10 -1
- package/build/site-title/index.js.map +1 -1
- package/build/site-title/transforms.js +31 -0
- package/build/site-title/transforms.js.map +1 -0
- package/build/social-link/edit.js +8 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +3 -2
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/edit.js +36 -25
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +7 -1
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +2 -0
- package/build/social-links/save.js.map +1 -1
- package/build/spacer/controls.js +111 -0
- package/build/spacer/controls.js.map +1 -0
- package/build/spacer/controls.native.js +95 -0
- package/build/spacer/controls.native.js.map +1 -0
- package/build/spacer/deprecated.js +53 -0
- package/build/spacer/deprecated.js.map +1 -0
- package/build/spacer/edit.js +117 -98
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/edit.native.js +76 -0
- package/build/spacer/edit.native.js.map +1 -0
- package/build/spacer/index.js +8 -4
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/save.js +6 -3
- package/build/spacer/save.js.map +1 -1
- package/build/table/index.js +12 -2
- 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 +13 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/tag-cloud/transforms.js +27 -0
- package/build/tag-cloud/transforms.js.map +1 -0
- package/build/template-part/index.js +1 -0
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +6 -1
- 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 +6 -1
- 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/edit.js +18 -6
- package/build-module/audio/edit.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 +10 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +6 -0
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js +17 -7
- package/build-module/buttons/edit.native.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 +4 -1
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/calendar/transforms.js +18 -0
- package/build-module/calendar/transforms.js.map +1 -0
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +11 -2
- package/build-module/code/index.js.map +1 -1
- package/build-module/code/transforms.js +1 -1
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/column/index.js +6 -1
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +16 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +6 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +9 -1
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +7 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +6 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +7 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +7 -2
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +6 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +153 -28
- 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 +59 -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 +66 -0
- package/build-module/comments-pagination/edit.js.map +1 -0
- package/build-module/comments-pagination/index.js +62 -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-next/edit.js +41 -0
- package/build-module/comments-pagination-next/edit.js.map +1 -0
- package/build-module/comments-pagination-next/index.js +56 -0
- package/build-module/comments-pagination-next/index.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 +33 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -0
- package/build-module/comments-pagination-previous/edit.js +41 -0
- package/build-module/comments-pagination-previous/edit.js.map +1 -0
- package/build-module/comments-pagination-previous/index.js +56 -0
- package/build-module/comments-pagination-previous/index.js.map +1 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js +91 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +24 -28
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +21 -8
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/deprecated.js +185 -17
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +9 -5
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/edit.native.js +41 -34
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/overlay-color-settings.native.js +11 -1
- package/build-module/cover/overlay-color-settings.native.js.map +1 -1
- package/build-module/cover/save.js +8 -3
- package/build-module/cover/save.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-loading.js +1 -2
- package/build-module/embed/embed-loading.js.map +1 -1
- 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/edit.native.js +4 -2
- package/build-module/file/edit.native.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/constants.js +2 -0
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/deprecated.js +4 -0
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +45 -15
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +1 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/shared.js +1 -1
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +8 -2
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/utils.js +5 -4
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/index.js +24 -2
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +18 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/edit.js +3 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +6 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +8 -5
- 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 +58 -19
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +16 -5
- 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 +10 -3
- 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/edit.js +48 -59
- package/build-module/latest-posts/edit.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 +6 -1
- 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 +6 -1
- 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/existing-menus-options.js +53 -0
- package/build-module/navigation/edit/existing-menus-options.js.map +1 -0
- package/build-module/navigation/edit/index.js +46 -15
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +11 -5
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +49 -21
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +27 -0
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build-module/navigation/edit/placeholder/index.js +32 -109
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +8 -13
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +10 -21
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/index.js +10 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +4 -1
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-convert-classic-menu.js +47 -0
- package/build-module/navigation/use-convert-classic-menu.js.map +1 -0
- package/build-module/navigation/use-navigation-entities.js +6 -3
- package/build-module/navigation/use-navigation-entities.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 +4 -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/edit.js +38 -11
- package/build-module/page-list/edit.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 +7 -2
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +7 -2
- 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 +7 -2
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/edit.js +64 -0
- package/build-module/post-author-biography/edit.js.map +1 -0
- package/build-module/post-author-biography/index.js +59 -0
- package/build-module/post-author-biography/index.js.map +1 -0
- package/build-module/post-author-name/edit.js +85 -0
- package/build-module/post-author-name/edit.js.map +1 -0
- package/build-module/post-author-name/index.js +66 -0
- package/build-module/post-author-name/index.js.map +1 -0
- 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 +6 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +6 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +6 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +6 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +6 -4
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +7 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +2 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +9 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-excerpt/transforms.js +18 -0
- package/build-module/post-excerpt/transforms.js.map +1 -0
- package/build-module/post-featured-image/dimension-controls.js +76 -31
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +54 -22
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +4 -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 +34 -7
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +2 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +13 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +10 -8
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +7 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.native.js +3 -3
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +6 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +13 -2
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/deprecated.js +95 -4
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +3 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +89 -0
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/index.js +149 -0
- package/build-module/query/edit/inspector-controls/index.js.map +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js +45 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +145 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build-module/query/index.js +8 -4
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +43 -35
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +0 -4
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination/index.js +8 -2
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +6 -2
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +2 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +6 -2
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +12 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +2 -5
- package/build-module/quote/index.js.map +1 -1
- package/build-module/read-more/edit.js +41 -0
- package/build-module/read-more/edit.js.map +1 -0
- package/build-module/read-more/index.js +74 -0
- package/build-module/read-more/index.js.map +1 -0
- package/build-module/rss/index.js +1 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +6 -4
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/index.js +13 -2
- 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/edit.js +4 -33
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +4 -1
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-logo/transforms.js +22 -0
- package/build-module/site-logo/transforms.js.map +1 -0
- package/build-module/site-tagline/edit.js +6 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +7 -2
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +9 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/site-title/transforms.js +22 -0
- package/build-module/site-title/transforms.js.map +1 -0
- package/build-module/social-link/edit.js +8 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +3 -2
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/edit.js +36 -25
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +7 -1
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +2 -0
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/spacer/controls.js +101 -0
- package/build-module/spacer/controls.js.map +1 -0
- package/build-module/spacer/controls.native.js +82 -0
- package/build-module/spacer/controls.native.js.map +1 -0
- package/build-module/spacer/deprecated.js +44 -0
- package/build-module/spacer/deprecated.js.map +1 -0
- package/build-module/spacer/edit.js +114 -95
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/spacer/edit.native.js +61 -0
- package/build-module/spacer/edit.native.js.map +1 -0
- package/build-module/spacer/index.js +7 -4
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/save.js +6 -3
- package/build-module/spacer/save.js.map +1 -1
- package/build-module/table/index.js +12 -2
- 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 +12 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/tag-cloud/transforms.js +18 -0
- package/build-module/tag-cloud/transforms.js.map +1 -0
- package/build-module/template-part/index.js +1 -0
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +6 -1
- 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 +6 -1
- 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/audio/editor-rtl.css +11 -0
- package/build-style/audio/editor.css +11 -0
- package/build-style/code/theme-rtl.css +5 -3
- package/build-style/code/theme.css +5 -3
- package/build-style/columns/editor-rtl.css +0 -10
- package/build-style/columns/editor.css +0 -10
- package/build-style/columns/style-rtl.css +8 -21
- package/build-style/columns/style.css +8 -21
- package/build-style/comment-template/style-rtl.css +91 -0
- package/build-style/comment-template/style.css +91 -0
- package/build-style/comments-pagination/editor-rtl.css +100 -0
- package/build-style/comments-pagination/editor.css +102 -0
- package/build-style/comments-pagination/style-rtl.css +104 -0
- 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/comments-query-loop/editor-rtl.css +79 -0
- package/build-style/comments-query-loop/editor.css +79 -0
- package/build-style/common-rtl.css +27 -0
- package/build-style/common.css +27 -0
- package/build-style/cover/style-rtl.css +119 -11
- package/build-style/cover/style.css +119 -11
- package/build-style/editor-rtl.css +173 -125
- package/build-style/editor.css +176 -125
- package/build-style/embed/editor-rtl.css +0 -12
- package/build-style/embed/editor.css +0 -12
- package/build-style/gallery/editor-rtl.css +7 -18
- package/build-style/gallery/editor.css +7 -18
- package/build-style/gallery/style-rtl.css +5 -1
- package/build-style/gallery/style.css +5 -1
- package/build-style/group/theme-rtl.css +1 -1
- package/build-style/group/theme.css +1 -1
- package/build-style/image/style-rtl.css +0 -2
- package/build-style/image/style.css +0 -2
- package/build-style/latest-posts/editor-rtl.css +7 -0
- package/build-style/latest-posts/editor.css +7 -0
- package/build-style/latest-posts/style-rtl.css +0 -9
- package/build-style/latest-posts/style.css +0 -9
- package/build-style/navigation/editor-rtl.css +93 -69
- package/build-style/navigation/editor.css +93 -69
- package/build-style/navigation/style-rtl.css +18 -7
- package/build-style/navigation/style.css +18 -7
- package/build-style/page-list/editor-rtl.css +9 -5
- package/build-style/page-list/editor.css +9 -5
- package/build-style/post-comments/style-rtl.css +9 -4
- package/build-style/post-comments/style.css +9 -4
- 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-template/style-rtl.css +4 -0
- package/build-style/post-template/style.css +4 -0
- 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/quote/style-rtl.css +5 -5
- package/build-style/quote/style.css +5 -5
- package/build-style/{home-link → read-more}/style-rtl.css +5 -22
- package/build-style/{home-link → read-more}/style.css +5 -22
- package/build-style/separator/style-rtl.css +0 -3
- package/build-style/separator/style.css +0 -3
- package/build-style/social-links/editor-rtl.css +3 -0
- package/build-style/social-links/editor.css +3 -0
- package/build-style/social-links/style-rtl.css +8 -1
- package/build-style/social-links/style.css +8 -1
- package/build-style/spacer/editor-rtl.css +4 -0
- package/build-style/spacer/editor.css +4 -0
- package/build-style/style-rtl.css +290 -110
- package/build-style/style.css +292 -110
- package/build-style/table/style-rtl.css +1 -0
- package/build-style/table/style.css +1 -0
- package/build-style/tag-cloud/style-rtl.css +8 -0
- package/build-style/tag-cloud/style.css +8 -0
- package/build-style/theme-rtl.css +6 -4
- package/build-style/theme.css +6 -4
- package/package.json +28 -30
- package/src/archives/block.json +1 -0
- package/src/archives/index.php +5 -9
- package/src/audio/block.json +1 -0
- package/src/audio/edit.js +19 -3
- package/src/audio/editor.scss +14 -0
- package/src/audio/test/__snapshots__/edit.native.js.snap +22 -0
- package/src/audio/test/edit.native.js +24 -11
- package/src/block/block.json +1 -0
- package/src/block/index.php +7 -2
- package/src/block/test/edit.native.js +7 -5
- package/src/button/block.json +10 -2
- package/src/button/edit.native.js +1 -1
- package/src/buttons/block.json +2 -1
- package/src/buttons/edit.js +17 -0
- package/src/buttons/edit.native.js +17 -5
- package/src/buttons/test/__snapshots__/edit.native.js.snap +27 -0
- package/src/buttons/test/edit.native.js +75 -45
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.js +2 -0
- package/src/calendar/index.php +35 -39
- package/src/calendar/transforms.js +23 -0
- package/src/categories/block.json +1 -0
- package/src/categories/index.php +1 -1
- package/src/code/block.json +11 -2
- package/src/code/theme.scss +6 -4
- package/src/code/transforms.js +1 -1
- package/src/column/block.json +6 -1
- package/src/columns/block.json +16 -1
- package/src/columns/editor.scss +0 -15
- package/src/columns/style.scss +15 -36
- package/src/comment-author-avatar/block.json +9 -1
- package/src/comment-author-avatar/edit.js +9 -2
- package/src/comment-author-avatar/index.php +25 -6
- package/src/comment-author-name/block.json +7 -1
- package/src/comment-content/block.json +6 -1
- package/src/comment-date/block.json +7 -1
- package/src/comment-date/index.php +2 -2
- package/src/comment-edit-link/block.json +6 -1
- package/src/comment-edit-link/index.js +1 -1
- package/src/comment-reply-link/block.json +6 -1
- package/src/comment-template/block.json +4 -2
- package/src/comment-template/edit.js +174 -44
- 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 +42 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
- package/src/comments-pagination/edit.js +83 -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-next/block.json +38 -0
- package/src/comments-pagination-next/edit.js +44 -0
- package/src/comments-pagination-next/index.js +18 -0
- package/src/comments-pagination-next/index.php +62 -0
- package/src/comments-pagination-numbers/block.json +15 -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-pagination-previous/block.json +38 -0
- package/src/comments-pagination-previous/edit.js +44 -0
- package/src/comments-pagination-previous/index.js +18 -0
- package/src/comments-pagination-previous/index.php +52 -0
- package/src/comments-query-loop/block.json +21 -8
- package/src/comments-query-loop/edit/comments-inspector-controls.js +93 -0
- package/src/comments-query-loop/edit.js +22 -27
- package/src/comments-query-loop/editor.scss +3 -0
- package/src/common.scss +28 -0
- package/src/cover/block.json +1 -0
- package/src/cover/deprecated.js +211 -1
- package/src/cover/edit.js +9 -4
- package/src/cover/edit.native.js +35 -19
- package/src/cover/overlay-color-settings.native.js +10 -0
- package/src/cover/save.js +10 -4
- package/src/cover/style.scss +24 -2
- package/src/cover/test/__snapshots__/edit.native.js.snap +33 -0
- package/src/cover/test/edit.native.js +284 -17
- package/src/editor.scss +3 -0
- package/src/embed/block.json +1 -0
- package/src/embed/edit.native.js +23 -18
- package/src/embed/editor.scss +0 -15
- package/src/embed/embed-controls.native.js +65 -0
- package/src/embed/embed-link-settings.native.js +100 -0
- package/src/embed/embed-loading.js +0 -2
- 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 +230 -89
- package/src/file/block.json +1 -0
- package/src/file/edit.native.js +6 -2
- package/src/file/index.php +2 -2
- package/src/file/test/__snapshots__/edit.native.js.snap +18 -5
- package/src/file/test/edit.native.js +30 -12
- package/src/freeform/block.json +1 -0
- package/src/gallery/block.json +1 -0
- package/src/gallery/constants.js +2 -0
- package/src/gallery/deprecated.js +4 -0
- package/src/gallery/edit.js +60 -11
- package/src/gallery/editor.scss +8 -22
- package/src/gallery/gallery.native.js +1 -1
- package/src/gallery/shared.js +1 -1
- package/src/gallery/style.scss +8 -1
- package/src/gallery/test/__snapshots__/index.native.js.snap +7 -0
- package/src/gallery/test/index.native.js +128 -0
- package/src/gallery/test/use-get-new-images.js +93 -0
- package/src/gallery/transforms.js +7 -1
- package/src/gallery/utils.js +7 -3
- package/src/group/block.json +24 -2
- package/src/group/theme.scss +4 -5
- package/src/group/variations.js +11 -1
- package/src/heading/block.json +6 -1
- package/src/heading/edit.js +2 -1
- package/src/heading/transforms.js +2 -5
- package/src/home-link/block.json +1 -0
- package/src/home-link/index.php +3 -3
- 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 +69 -19
- package/src/image/image.js +14 -3
- package/src/image/index.php +3 -3
- package/src/image/style.scss +0 -2
- package/src/image/test/edit.native.js +170 -1
- package/src/index.js +41 -27
- package/src/latest-comments/block.json +1 -0
- package/src/latest-comments/index.php +1 -1
- package/src/latest-posts/block.json +1 -0
- package/src/latest-posts/edit.js +52 -64
- package/src/latest-posts/editor.scss +10 -0
- package/src/latest-posts/index.php +15 -13
- package/src/latest-posts/style.scss +0 -12
- package/src/list/block.json +6 -1
- package/src/list/test/edit.native.js +3 -3
- package/src/loginout/block.json +1 -0
- package/src/media-text/block.json +6 -1
- package/src/missing/block.json +1 -0
- package/src/missing/test/__snapshots__/edit.native.js.snap +5 -0
- package/src/missing/test/edit.native.js +26 -30
- package/src/more/block.json +1 -0
- package/src/navigation/README.md +13 -0
- package/src/navigation/block.json +12 -10
- package/src/navigation/edit/existing-menus-options.js +70 -0
- package/src/navigation/edit/index.js +84 -25
- package/src/navigation/edit/inner-blocks.js +19 -4
- package/src/navigation/edit/navigation-menu-selector.js +58 -32
- package/src/navigation/edit/overlay-menu-icon.js +20 -0
- package/src/navigation/edit/placeholder/index.js +49 -142
- package/src/navigation/edit/placeholder/placeholder-preview.js +8 -10
- package/src/navigation/edit/responsive-wrapper.js +12 -13
- package/src/navigation/editor.scss +137 -103
- package/src/navigation/index.php +19 -12
- package/src/navigation/menu-items-to-blocks.js +2 -1
- package/src/navigation/style.scss +24 -7
- package/src/navigation/use-convert-classic-menu.js +58 -0
- package/src/navigation/use-navigation-entities.js +3 -1
- 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 +3 -1
- package/src/navigation-submenu/index.php +8 -8
- package/src/nextpage/block.json +1 -0
- package/src/page-list/block.json +4 -0
- package/src/page-list/edit.js +47 -9
- package/src/page-list/editor.scss +8 -5
- package/src/page-list/index.php +14 -9
- package/src/paragraph/block.json +7 -2
- package/src/paragraph/edit.js +12 -4
- package/src/paragraph/test/edit.native.js +4 -13
- package/src/pattern/block.json +1 -0
- package/src/post-author/block.json +7 -2
- package/src/post-author/index.php +1 -1
- package/src/post-author-biography/block.json +41 -0
- package/src/post-author-biography/edit.js +63 -0
- package/src/post-author-biography/index.js +18 -0
- package/src/post-author-biography/index.php +48 -0
- package/src/post-author-name/block.json +48 -0
- package/src/post-author-name/edit.js +95 -0
- package/src/post-author-name/index.js +18 -0
- package/src/post-author-name/index.php +49 -0
- package/src/post-comment/block.json +1 -0
- package/src/post-comments/block.json +6 -1
- package/src/post-comments/style.scss +10 -4
- package/src/post-comments-count/block.json +6 -1
- package/src/post-comments-form/block.json +11 -2
- package/src/post-comments-link/block.json +6 -1
- package/src/post-comments-link/index.php +5 -5
- package/src/post-content/block.json +1 -0
- package/src/post-content/edit.js +4 -4
- package/src/post-content/index.php +1 -1
- package/src/post-date/block.json +7 -1
- package/src/post-date/index.php +1 -1
- package/src/post-excerpt/block.json +7 -1
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.js +2 -0
- package/src/post-excerpt/index.php +1 -1
- package/src/post-excerpt/transforms.js +23 -0
- package/src/post-featured-image/block.json +4 -0
- package/src/post-featured-image/dimension-controls.js +103 -51
- package/src/post-featured-image/edit.js +61 -22
- package/src/post-featured-image/editor.scss +0 -8
- package/src/post-featured-image/index.php +3 -2
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-navigation-link/index.php +4 -4
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +27 -7
- package/src/post-template/index.php +2 -2
- package/src/post-template/style.scss +5 -0
- package/src/post-terms/block.json +7 -1
- package/src/post-terms/index.js +6 -0
- package/src/post-terms/index.php +1 -1
- package/src/post-title/block.json +7 -1
- package/src/post-title/edit.js +8 -7
- package/src/post-title/index.php +1 -1
- package/src/post-title/style.scss +6 -2
- package/src/preformatted/block.json +6 -1
- package/src/preformatted/edit.native.js +4 -4
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +53 -14
- package/src/preformatted/test/edit.native.js +11 -10
- package/src/pullquote/block.json +13 -2
- package/src/pullquote/style.scss +1 -0
- package/src/query/block.json +8 -4
- package/src/query/deprecated.js +80 -3
- package/src/query/edit/index.js +3 -3
- package/src/query/edit/inspector-controls/author-control.js +78 -0
- package/src/query/edit/inspector-controls/index.js +163 -0
- package/src/query/edit/inspector-controls/order-control.js +41 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +118 -0
- package/src/query/test/utils.js +6 -4
- package/src/query/utils.js +45 -35
- package/src/query/variations.js +0 -4
- package/src/query-pagination/block.json +8 -2
- package/src/query-pagination/editor.scss +0 -4
- package/src/query-pagination-next/block.json +6 -2
- package/src/query-pagination-next/index.php +2 -1
- package/src/query-pagination-numbers/block.json +2 -1
- package/src/query-pagination-previous/block.json +6 -2
- package/src/query-pagination-previous/index.php +2 -1
- package/src/query-title/block.json +6 -1
- package/src/query-title/index.js +6 -0
- package/src/quote/block.json +2 -2
- package/src/quote/index.js +0 -1
- package/src/quote/style.scss +3 -3
- package/src/quote/theme.scss +1 -1
- package/src/read-more/block.json +56 -0
- package/src/read-more/edit.js +50 -0
- package/src/read-more/index.js +18 -0
- package/src/read-more/index.php +45 -0
- package/src/read-more/style.scss +12 -0
- package/src/rss/block.json +1 -0
- package/src/search/block.json +13 -2
- package/src/search/edit.js +4 -2
- package/src/search/edit.native.js +2 -5
- package/src/search/index.php +26 -14
- package/src/search/test/__snapshots__/edit.native.js.snap +7 -15
- package/src/search/test/edit.native.js +32 -24
- package/src/separator/block.json +1 -0
- package/src/separator/style.scss +0 -5
- package/src/shortcode/block.json +1 -0
- package/src/site-logo/block.json +1 -0
- package/src/site-logo/edit.js +5 -40
- package/src/site-logo/index.js +2 -0
- package/src/site-logo/index.php +1 -1
- package/src/site-logo/transforms.js +21 -0
- package/src/site-tagline/block.json +7 -2
- package/src/site-tagline/edit.js +10 -1
- package/src/site-title/block.json +7 -1
- package/src/site-title/index.js +2 -0
- package/src/site-title/index.php +6 -6
- package/src/site-title/transforms.js +21 -0
- package/src/social-link/block.json +3 -1
- package/src/social-link/edit.js +14 -2
- package/src/social-link/index.php +57 -54
- package/src/social-links/block.json +8 -8
- package/src/social-links/edit.js +37 -27
- package/src/social-links/editor.scss +7 -0
- package/src/social-links/save.js +7 -1
- package/src/social-links/style.scss +11 -1
- package/src/spacer/block.json +4 -3
- package/src/spacer/controls.js +108 -0
- package/src/spacer/controls.native.js +82 -0
- package/src/spacer/deprecated.js +41 -0
- package/src/spacer/edit.js +133 -132
- package/src/spacer/edit.native.js +68 -0
- package/src/spacer/editor.scss +6 -0
- package/src/spacer/index.js +2 -0
- package/src/spacer/save.js +5 -2
- package/src/style.scss +4 -2
- package/src/table/block.json +12 -2
- package/src/table/style.scss +1 -0
- package/src/table-of-contents/block.json +1 -0
- package/src/table-of-contents/index.php +3 -3
- package/src/tag-cloud/block.json +5 -0
- package/src/tag-cloud/index.js +2 -0
- package/src/tag-cloud/style.scss +9 -0
- package/src/tag-cloud/transforms.js +23 -0
- package/src/template-part/block.json +1 -0
- package/src/template-part/index.php +6 -6
- package/src/term-description/block.json +6 -1
- package/src/text-columns/block.json +1 -0
- package/src/verse/block.json +6 -1
- package/src/verse/test/edit.native.js +7 -10
- package/src/video/block.json +1 -0
- package/build/comments-query-loop/toolbar.js +0 -58
- package/build/comments-query-loop/toolbar.js.map +0 -1
- package/build/embed/embed-bottom-sheet.native.js +0 -85
- package/build/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build/query/edit/query-inspector-controls.js +0 -275
- package/build/query/edit/query-inspector-controls.js.map +0 -1
- package/build-module/comments-query-loop/toolbar.js +0 -48
- package/build-module/comments-query-loop/toolbar.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/build-module/query/edit/query-inspector-controls.js +0 -261
- package/build-module/query/edit/query-inspector-controls.js.map +0 -1
- package/src/comments-query-loop/toolbar.js +0 -57
- package/src/embed/embed-bottom-sheet.native.js +0 -78
- package/src/home-link/style.scss +0 -51
- package/src/query/edit/query-inspector-controls.js +0 -281
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
act,
|
|
6
|
+
fireEvent,
|
|
7
|
+
initializeEditor,
|
|
8
|
+
getEditorHtml,
|
|
9
|
+
render,
|
|
10
|
+
} from 'test/helpers';
|
|
5
11
|
import { Image } from 'react-native';
|
|
12
|
+
import Clipboard from '@react-native-clipboard/clipboard';
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* WordPress dependencies
|
|
9
16
|
*/
|
|
10
17
|
import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks';
|
|
11
18
|
import { apiFetch } from '@wordpress/data-controls';
|
|
19
|
+
import {
|
|
20
|
+
setFeaturedImage,
|
|
21
|
+
sendMediaUpload,
|
|
22
|
+
subscribeMediaUpload,
|
|
23
|
+
} from '@wordpress/react-native-bridge';
|
|
24
|
+
import { select } from '@wordpress/data';
|
|
25
|
+
import { store as editorStore } from '@wordpress/editor';
|
|
26
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
27
|
+
import '@wordpress/jest-console';
|
|
12
28
|
|
|
13
29
|
/**
|
|
14
30
|
* Internal dependencies
|
|
15
31
|
*/
|
|
16
32
|
import { registerCoreBlocks } from '../..';
|
|
33
|
+
import ImageEdit from '../edit';
|
|
34
|
+
|
|
35
|
+
let uploadCallBack;
|
|
36
|
+
subscribeMediaUpload.mockImplementation( ( callback ) => {
|
|
37
|
+
uploadCallBack = callback;
|
|
38
|
+
} );
|
|
39
|
+
sendMediaUpload.mockImplementation( ( payload ) => {
|
|
40
|
+
uploadCallBack( payload );
|
|
41
|
+
} );
|
|
17
42
|
|
|
18
43
|
jest.mock( '@wordpress/data-controls', () => {
|
|
19
44
|
const dataControls = jest.requireActual( '@wordpress/data-controls' );
|
|
@@ -23,9 +48,22 @@ jest.mock( '@wordpress/data-controls', () => {
|
|
|
23
48
|
};
|
|
24
49
|
} );
|
|
25
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Immediately invoke delayed functions. A better alternative would be using
|
|
53
|
+
* fake timers and test the delay itself. However, fake timers does not work
|
|
54
|
+
* with our custom waitFor implementation.
|
|
55
|
+
*/
|
|
56
|
+
jest.mock( 'lodash', () => {
|
|
57
|
+
const actual = jest.requireActual( 'lodash' );
|
|
58
|
+
return { ...actual, delay: ( cb ) => cb() };
|
|
59
|
+
} );
|
|
60
|
+
|
|
26
61
|
const apiFetchPromise = Promise.resolve( {} );
|
|
27
62
|
apiFetch.mockImplementation( () => apiFetchPromise );
|
|
28
63
|
|
|
64
|
+
const clipboardPromise = Promise.resolve( '' );
|
|
65
|
+
Clipboard.getString.mockImplementation( () => clipboardPromise );
|
|
66
|
+
|
|
29
67
|
beforeAll( () => {
|
|
30
68
|
registerCoreBlocks();
|
|
31
69
|
|
|
@@ -117,6 +155,8 @@ describe( 'Image Block', () => {
|
|
|
117
155
|
);
|
|
118
156
|
fireEvent.press( screen.getByText( 'None' ) );
|
|
119
157
|
fireEvent.press( screen.getByText( 'Custom URL' ) );
|
|
158
|
+
// Await asynchronous fetch of clipboard
|
|
159
|
+
await act( () => clipboardPromise );
|
|
120
160
|
fireEvent.changeText(
|
|
121
161
|
screen.getByPlaceholderText( 'Search or type URL' ),
|
|
122
162
|
'wordpress.org'
|
|
@@ -149,12 +189,16 @@ describe( 'Image Block', () => {
|
|
|
149
189
|
fireEvent.press( screen.getByText( 'None' ) );
|
|
150
190
|
fireEvent.press( screen.getByText( 'Media File' ) );
|
|
151
191
|
fireEvent.press( screen.getByText( 'Custom URL' ) );
|
|
192
|
+
// Await asynchronous fetch of clipboard
|
|
193
|
+
await act( () => clipboardPromise );
|
|
152
194
|
fireEvent.changeText(
|
|
153
195
|
screen.getByPlaceholderText( 'Search or type URL' ),
|
|
154
196
|
'wordpress.org'
|
|
155
197
|
);
|
|
156
198
|
fireEvent.press( screen.getByA11yLabel( 'Apply' ) );
|
|
157
199
|
fireEvent.press( screen.getByText( 'Custom URL' ) );
|
|
200
|
+
// Await asynchronous fetch of clipboard
|
|
201
|
+
await act( () => clipboardPromise );
|
|
158
202
|
fireEvent.press( screen.getByText( 'Media File' ) );
|
|
159
203
|
|
|
160
204
|
const expectedHtml = `<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"media","className":"is-style-default"} -->
|
|
@@ -247,4 +291,129 @@ describe( 'Image Block', () => {
|
|
|
247
291
|
<!-- /wp:image -->`;
|
|
248
292
|
expect( getEditorHtml() ).toBe( expectedHtml );
|
|
249
293
|
} );
|
|
294
|
+
|
|
295
|
+
describe( "when replacing media for an image set as the post's featured image", () => {
|
|
296
|
+
function mockFeaturedMedia( featuredImageId ) {
|
|
297
|
+
jest.spyOn(
|
|
298
|
+
select( editorStore ),
|
|
299
|
+
'getEditedPostAttribute'
|
|
300
|
+
).mockImplementation( ( attributeName ) =>
|
|
301
|
+
attributeName === 'featured_media' ? featuredImageId : undefined
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function mockGetMedia( media ) {
|
|
306
|
+
jest.spyOn( select( coreStore ), 'getMedia' ).mockReturnValueOnce(
|
|
307
|
+
media
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
it( 'does not prompt to replace featured image during a new image upload', () => {
|
|
312
|
+
// Arrange
|
|
313
|
+
const INITIAL_IMAGE = { id: 1, url: 'mock-url-1' };
|
|
314
|
+
const NEW_IMAGE_PENDING = { id: 2, url: 'mock-url-2' };
|
|
315
|
+
mockFeaturedMedia( INITIAL_IMAGE.id );
|
|
316
|
+
const screen = render( <ImageEdit attributes={ INITIAL_IMAGE } /> );
|
|
317
|
+
|
|
318
|
+
// Act
|
|
319
|
+
screen.update( <ImageEdit attributes={ NEW_IMAGE_PENDING } /> );
|
|
320
|
+
const MEDIA_UPLOAD_STATE_UPLOADING = 1;
|
|
321
|
+
sendMediaUpload( {
|
|
322
|
+
state: MEDIA_UPLOAD_STATE_UPLOADING,
|
|
323
|
+
mediaId: NEW_IMAGE_PENDING.id,
|
|
324
|
+
progress: 0.1,
|
|
325
|
+
} );
|
|
326
|
+
|
|
327
|
+
// Assert
|
|
328
|
+
expect( setFeaturedImage ).not.toHaveBeenCalled();
|
|
329
|
+
} );
|
|
330
|
+
|
|
331
|
+
it( 'does not prompt to replace featured image after a new image upload fails', () => {
|
|
332
|
+
// Arrange
|
|
333
|
+
const INITIAL_IMAGE = { id: 1, url: 'mock-url-1' };
|
|
334
|
+
const NEW_IMAGE_PENDING = { id: 2, url: 'mock-url-2' };
|
|
335
|
+
mockFeaturedMedia( INITIAL_IMAGE.id );
|
|
336
|
+
const screen = render(
|
|
337
|
+
<ImageEdit
|
|
338
|
+
attributes={ INITIAL_IMAGE }
|
|
339
|
+
setAttributes={ () => {} }
|
|
340
|
+
/>
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
// Act
|
|
344
|
+
screen.update(
|
|
345
|
+
<ImageEdit
|
|
346
|
+
attributes={ NEW_IMAGE_PENDING }
|
|
347
|
+
setAttributes={ () => {} }
|
|
348
|
+
/>
|
|
349
|
+
);
|
|
350
|
+
const MEDIA_UPLOAD_STATE_UPLOADING = 1;
|
|
351
|
+
sendMediaUpload( {
|
|
352
|
+
state: MEDIA_UPLOAD_STATE_UPLOADING,
|
|
353
|
+
mediaId: NEW_IMAGE_PENDING.id,
|
|
354
|
+
progress: 0.1,
|
|
355
|
+
} );
|
|
356
|
+
const MEDIA_UPLOAD_STATE_FAILED = 3;
|
|
357
|
+
sendMediaUpload( {
|
|
358
|
+
state: MEDIA_UPLOAD_STATE_FAILED,
|
|
359
|
+
mediaId: NEW_IMAGE_PENDING.id,
|
|
360
|
+
} );
|
|
361
|
+
|
|
362
|
+
// Assert
|
|
363
|
+
expect( setFeaturedImage ).not.toHaveBeenCalled();
|
|
364
|
+
} );
|
|
365
|
+
|
|
366
|
+
it( 'prompts to replace featured image after a new image upload succeeds', () => {
|
|
367
|
+
// Arrange
|
|
368
|
+
const INITIAL_IMAGE = { id: 1, url: 'mock-url-1' };
|
|
369
|
+
const NEW_IMAGE_PENDING = { id: 2, url: 'mock-url-2' };
|
|
370
|
+
const NEW_IMAGE_RESOLVED = { id: 3, url: 'mock-url-2' };
|
|
371
|
+
mockFeaturedMedia( INITIAL_IMAGE.id );
|
|
372
|
+
const screen = render( <ImageEdit attributes={ INITIAL_IMAGE } /> );
|
|
373
|
+
|
|
374
|
+
// Act
|
|
375
|
+
screen.update( <ImageEdit attributes={ NEW_IMAGE_PENDING } /> );
|
|
376
|
+
mockGetMedia( { id: NEW_IMAGE_RESOLVED.id } );
|
|
377
|
+
screen.update(
|
|
378
|
+
<ImageEdit
|
|
379
|
+
attributes={ NEW_IMAGE_RESOLVED }
|
|
380
|
+
setAttributes={ () => {} }
|
|
381
|
+
/>
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
// Assert
|
|
385
|
+
expect( setFeaturedImage ).toHaveBeenCalledTimes( 1 );
|
|
386
|
+
expect( setFeaturedImage ).toHaveBeenCalledWith(
|
|
387
|
+
NEW_IMAGE_RESOLVED.id
|
|
388
|
+
);
|
|
389
|
+
} );
|
|
390
|
+
|
|
391
|
+
it( 'prompts to replace featured image for a cached image', () => {
|
|
392
|
+
// Arrange
|
|
393
|
+
const INITIAL_IMAGE = { id: 1, url: 'mock-url-1' };
|
|
394
|
+
const NEW_IMAGE_RESOLVED = { id: 3, url: 'mock-url-2' };
|
|
395
|
+
mockFeaturedMedia( INITIAL_IMAGE.id );
|
|
396
|
+
const screen = render(
|
|
397
|
+
<ImageEdit
|
|
398
|
+
attributes={ INITIAL_IMAGE }
|
|
399
|
+
setAttributes={ () => {} }
|
|
400
|
+
/>
|
|
401
|
+
);
|
|
402
|
+
|
|
403
|
+
// Act
|
|
404
|
+
mockGetMedia( { id: NEW_IMAGE_RESOLVED.id } );
|
|
405
|
+
screen.update(
|
|
406
|
+
<ImageEdit
|
|
407
|
+
attributes={ NEW_IMAGE_RESOLVED }
|
|
408
|
+
setAttributes={ () => {} }
|
|
409
|
+
/>
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
// Assert
|
|
413
|
+
expect( setFeaturedImage ).toHaveBeenCalledTimes( 1 );
|
|
414
|
+
expect( setFeaturedImage ).toHaveBeenCalledWith(
|
|
415
|
+
NEW_IMAGE_RESOLVED.id
|
|
416
|
+
);
|
|
417
|
+
} );
|
|
418
|
+
} );
|
|
250
419
|
} );
|
package/src/index.js
CHANGED
|
@@ -29,7 +29,11 @@ import * as commentDate from './comment-date';
|
|
|
29
29
|
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
|
+
import * as commentsPaginationPrevious from './comments-pagination-previous';
|
|
32
33
|
import * as commentsQueryLoop from './comments-query-loop';
|
|
34
|
+
import * as commentsPagination from './comments-pagination';
|
|
35
|
+
import * as commentsPaginationNext from './comments-pagination-next';
|
|
36
|
+
import * as commentsPaginationNumbers from './comments-pagination-numbers';
|
|
33
37
|
import * as cover from './cover';
|
|
34
38
|
import * as embed from './embed';
|
|
35
39
|
import * as file from './file';
|
|
@@ -55,6 +59,8 @@ import * as pattern from './pattern';
|
|
|
55
59
|
import * as pageList from './page-list';
|
|
56
60
|
import * as paragraph from './paragraph';
|
|
57
61
|
import * as postAuthor from './post-author';
|
|
62
|
+
import * as postAuthorName from './post-author-name';
|
|
63
|
+
import * as postAuthorBiography from './post-author-biography';
|
|
58
64
|
import * as postComment from './post-comment';
|
|
59
65
|
import * as postComments from './post-comments';
|
|
60
66
|
import * as postCommentsCount from './post-comments-count';
|
|
@@ -78,6 +84,7 @@ import * as queryPaginationPrevious from './query-pagination-previous';
|
|
|
78
84
|
import * as queryTitle from './query-title';
|
|
79
85
|
import * as quote from './quote';
|
|
80
86
|
import * as reusableBlock from './block';
|
|
87
|
+
import * as readMore from './read-more';
|
|
81
88
|
import * as rss from './rss';
|
|
82
89
|
import * as search from './search';
|
|
83
90
|
import * as separator from './separator';
|
|
@@ -198,6 +205,8 @@ export const __experimentalGetCoreBlocks = () => [
|
|
|
198
205
|
logInOut,
|
|
199
206
|
termDescription,
|
|
200
207
|
queryTitle,
|
|
208
|
+
postAuthorName,
|
|
209
|
+
postAuthorBiography,
|
|
201
210
|
];
|
|
202
211
|
|
|
203
212
|
/**
|
|
@@ -236,31 +245,36 @@ export const registerCoreBlocks = (
|
|
|
236
245
|
* __experimentalRegisterExperimentalCoreBlocks( settings );
|
|
237
246
|
* ```
|
|
238
247
|
*/
|
|
239
|
-
export const __experimentalRegisterExperimentalCoreBlocks =
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
248
|
+
export const __experimentalRegisterExperimentalCoreBlocks = process.env
|
|
249
|
+
.IS_GUTENBERG_PLUGIN
|
|
250
|
+
? ( { enableFSEBlocks } = {} ) => {
|
|
251
|
+
[
|
|
252
|
+
// Experimental blocks.
|
|
253
|
+
homeLink,
|
|
245
254
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
255
|
+
// Full Site Editing blocks.
|
|
256
|
+
...( enableFSEBlocks
|
|
257
|
+
? [
|
|
258
|
+
commentAuthorAvatar,
|
|
259
|
+
commentAuthorName,
|
|
260
|
+
commentContent,
|
|
261
|
+
commentDate,
|
|
262
|
+
commentEditLink,
|
|
263
|
+
commentReplyLink,
|
|
264
|
+
commentTemplate,
|
|
265
|
+
commentsQueryLoop,
|
|
266
|
+
commentsPagination,
|
|
267
|
+
commentsPaginationNext,
|
|
268
|
+
commentsPaginationNumbers,
|
|
269
|
+
commentsPaginationPrevious,
|
|
270
|
+
navigationArea,
|
|
271
|
+
postComment,
|
|
272
|
+
postCommentsCount,
|
|
273
|
+
postCommentsForm,
|
|
274
|
+
postCommentsLink,
|
|
275
|
+
readMore,
|
|
276
|
+
]
|
|
277
|
+
: [] ),
|
|
278
|
+
].forEach( registerBlock );
|
|
279
|
+
}
|
|
280
|
+
: undefined;
|
package/src/latest-posts/edit.js
CHANGED
|
@@ -7,7 +7,6 @@ import classnames from 'classnames';
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { RawHTML } from '@wordpress/element';
|
|
11
10
|
import {
|
|
12
11
|
BaseControl,
|
|
13
12
|
PanelBody,
|
|
@@ -55,6 +54,17 @@ const USERS_LIST_QUERY = {
|
|
|
55
54
|
context: 'view',
|
|
56
55
|
};
|
|
57
56
|
|
|
57
|
+
function getFeaturedImageDetails( post, size ) {
|
|
58
|
+
const image = get( post, [ '_embedded', 'wp:featuredmedia', '0' ] );
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
url:
|
|
62
|
+
image?.media_details?.sizes?.[ size ]?.source_url ??
|
|
63
|
+
image?.source_url,
|
|
64
|
+
alt: image?.alt_text,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
59
69
|
const {
|
|
60
70
|
postsToShow,
|
|
@@ -77,7 +87,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
77
87
|
addLinkToFeaturedImage,
|
|
78
88
|
} = attributes;
|
|
79
89
|
const {
|
|
80
|
-
|
|
90
|
+
imageSizes,
|
|
81
91
|
latestPosts,
|
|
82
92
|
defaultImageWidth,
|
|
83
93
|
defaultImageHeight,
|
|
@@ -85,11 +95,8 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
85
95
|
authorList,
|
|
86
96
|
} = useSelect(
|
|
87
97
|
( select ) => {
|
|
88
|
-
const { getEntityRecords,
|
|
89
|
-
|
|
90
|
-
);
|
|
91
|
-
const { getSettings } = select( blockEditorStore );
|
|
92
|
-
const { imageSizes, imageDimensions } = getSettings();
|
|
98
|
+
const { getEntityRecords, getUsers } = select( coreStore );
|
|
99
|
+
const settings = select( blockEditorStore ).getSettings();
|
|
93
100
|
const catIds =
|
|
94
101
|
categories && categories.length > 0
|
|
95
102
|
? categories.map( ( cat ) => cat.id )
|
|
@@ -101,59 +108,28 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
101
108
|
order,
|
|
102
109
|
orderby: orderBy,
|
|
103
110
|
per_page: postsToShow,
|
|
111
|
+
_embed: 'wp:featuredmedia',
|
|
104
112
|
},
|
|
105
113
|
( value ) => ! isUndefined( value )
|
|
106
114
|
);
|
|
107
115
|
|
|
108
|
-
const posts = getEntityRecords(
|
|
109
|
-
'postType',
|
|
110
|
-
'post',
|
|
111
|
-
latestPostsQuery
|
|
112
|
-
);
|
|
113
|
-
|
|
114
116
|
return {
|
|
115
117
|
defaultImageWidth: get(
|
|
116
|
-
imageDimensions,
|
|
118
|
+
settings.imageDimensions,
|
|
117
119
|
[ featuredImageSizeSlug, 'width' ],
|
|
118
120
|
0
|
|
119
121
|
),
|
|
120
122
|
defaultImageHeight: get(
|
|
121
|
-
imageDimensions,
|
|
123
|
+
settings.imageDimensions,
|
|
122
124
|
[ featuredImageSizeSlug, 'height' ],
|
|
123
125
|
0
|
|
124
126
|
),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
latestPosts: ! Array.isArray( posts )
|
|
132
|
-
? posts
|
|
133
|
-
: posts.map( ( post ) => {
|
|
134
|
-
if ( ! post.featured_media ) return post;
|
|
135
|
-
|
|
136
|
-
const image = getMedia( post.featured_media );
|
|
137
|
-
let url = get(
|
|
138
|
-
image,
|
|
139
|
-
[
|
|
140
|
-
'media_details',
|
|
141
|
-
'sizes',
|
|
142
|
-
featuredImageSizeSlug,
|
|
143
|
-
'source_url',
|
|
144
|
-
],
|
|
145
|
-
null
|
|
146
|
-
);
|
|
147
|
-
if ( ! url ) {
|
|
148
|
-
url = get( image, 'source_url', null );
|
|
149
|
-
}
|
|
150
|
-
const featuredImageInfo = {
|
|
151
|
-
url,
|
|
152
|
-
// eslint-disable-next-line camelcase
|
|
153
|
-
alt: image?.alt_text,
|
|
154
|
-
};
|
|
155
|
-
return { ...post, featuredImageInfo };
|
|
156
|
-
} ),
|
|
127
|
+
imageSizes: settings.imageSizes,
|
|
128
|
+
latestPosts: getEntityRecords(
|
|
129
|
+
'postType',
|
|
130
|
+
'post',
|
|
131
|
+
latestPostsQuery
|
|
132
|
+
),
|
|
157
133
|
categoriesList: getEntityRecords(
|
|
158
134
|
'taxonomy',
|
|
159
135
|
'category',
|
|
@@ -171,6 +147,13 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
171
147
|
selectedAuthor,
|
|
172
148
|
]
|
|
173
149
|
);
|
|
150
|
+
|
|
151
|
+
const imageSizeOptions = imageSizes
|
|
152
|
+
.filter( ( { slug } ) => slug !== 'full' )
|
|
153
|
+
.map( ( { name, slug } ) => ( {
|
|
154
|
+
value: slug,
|
|
155
|
+
label: name,
|
|
156
|
+
} ) );
|
|
174
157
|
const categorySuggestions =
|
|
175
158
|
categoriesList?.reduce(
|
|
176
159
|
( accumulator, category ) => ( {
|
|
@@ -299,7 +282,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
299
282
|
} )
|
|
300
283
|
}
|
|
301
284
|
/>
|
|
302
|
-
<BaseControl className="
|
|
285
|
+
<BaseControl className="editor-latest-posts-image-alignment-control">
|
|
303
286
|
<BaseControl.VisualLabel>
|
|
304
287
|
{ __( 'Image alignment' ) }
|
|
305
288
|
</BaseControl.VisualLabel>
|
|
@@ -451,11 +434,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
451
434
|
'';
|
|
452
435
|
|
|
453
436
|
const {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
} = {},
|
|
458
|
-
} = post;
|
|
437
|
+
url: imageSourceUrl,
|
|
438
|
+
alt: featuredImageAlt,
|
|
439
|
+
} = getFeaturedImageDetails( post, featuredImageSizeSlug );
|
|
459
440
|
const imageClasses = classnames( {
|
|
460
441
|
'wp-block-latest-posts__featured-image': true,
|
|
461
442
|
[ `align${ featuredImageAlign }` ]: !! featuredImageAlign,
|
|
@@ -509,12 +490,18 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
509
490
|
) }
|
|
510
491
|
</div>
|
|
511
492
|
) }
|
|
512
|
-
<a
|
|
513
|
-
{
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
493
|
+
<a
|
|
494
|
+
href={ post.link }
|
|
495
|
+
rel="noreferrer noopener"
|
|
496
|
+
dangerouslySetInnerHTML={
|
|
497
|
+
!! titleTrimmed
|
|
498
|
+
? {
|
|
499
|
+
__html: titleTrimmed,
|
|
500
|
+
}
|
|
501
|
+
: undefined
|
|
502
|
+
}
|
|
503
|
+
>
|
|
504
|
+
{ ! titleTrimmed ? __( '(no title)' ) : null }
|
|
518
505
|
</a>
|
|
519
506
|
{ displayAuthor && currentAuthor && (
|
|
520
507
|
<div className="wp-block-latest-posts__post-author">
|
|
@@ -541,11 +528,12 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
541
528
|
) }
|
|
542
529
|
{ displayPostContent &&
|
|
543
530
|
displayPostContentRadio === 'full_post' && (
|
|
544
|
-
<div
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
531
|
+
<div
|
|
532
|
+
className="wp-block-latest-posts__post-full-content"
|
|
533
|
+
dangerouslySetInnerHTML={ {
|
|
534
|
+
__html: post.content.raw.trim(),
|
|
535
|
+
} }
|
|
536
|
+
/>
|
|
549
537
|
) }
|
|
550
538
|
</li>
|
|
551
539
|
);
|
|
@@ -12,3 +12,13 @@
|
|
|
12
12
|
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
|
|
13
13
|
margin-bottom: 20px;
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
.editor-latest-posts-image-alignment-control {
|
|
17
|
+
.components-base-control__label {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.components-toolbar {
|
|
22
|
+
border-radius: $radius-block-ui;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -60,6 +60,11 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
60
60
|
|
|
61
61
|
foreach ( $recent_posts as $post ) {
|
|
62
62
|
$post_link = esc_url( get_permalink( $post ) );
|
|
63
|
+
$title = get_the_title( $post );
|
|
64
|
+
|
|
65
|
+
if ( ! $title ) {
|
|
66
|
+
$title = __( '(no title)' );
|
|
67
|
+
}
|
|
63
68
|
|
|
64
69
|
$list_items_markup .= '<li>';
|
|
65
70
|
|
|
@@ -81,30 +86,27 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
81
86
|
$post,
|
|
82
87
|
$attributes['featuredImageSizeSlug'],
|
|
83
88
|
array(
|
|
84
|
-
'style' => $image_style,
|
|
89
|
+
'style' => esc_attr( $image_style ),
|
|
85
90
|
)
|
|
86
91
|
);
|
|
87
92
|
if ( $attributes['addLinkToFeaturedImage'] ) {
|
|
88
93
|
$featured_image = sprintf(
|
|
89
|
-
'<a href="%1$s"
|
|
90
|
-
$post_link,
|
|
94
|
+
'<a href="%1$s" aria-label="%2$s">%3$s</a>',
|
|
95
|
+
esc_url( $post_link ),
|
|
96
|
+
esc_attr( $title ),
|
|
91
97
|
$featured_image
|
|
92
98
|
);
|
|
93
99
|
}
|
|
94
100
|
$list_items_markup .= sprintf(
|
|
95
101
|
'<div class="%1$s">%2$s</div>',
|
|
96
|
-
$image_classes,
|
|
102
|
+
esc_attr( $image_classes ),
|
|
97
103
|
$featured_image
|
|
98
104
|
);
|
|
99
105
|
}
|
|
100
106
|
|
|
101
|
-
$title = get_the_title( $post );
|
|
102
|
-
if ( ! $title ) {
|
|
103
|
-
$title = __( '(no title)' );
|
|
104
|
-
}
|
|
105
107
|
$list_items_markup .= sprintf(
|
|
106
108
|
'<a href="%1$s">%2$s</a>',
|
|
107
|
-
$post_link,
|
|
109
|
+
esc_url( $post_link ),
|
|
108
110
|
$title
|
|
109
111
|
);
|
|
110
112
|
|
|
@@ -117,7 +119,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
117
119
|
if ( ! empty( $author_display_name ) ) {
|
|
118
120
|
$list_items_markup .= sprintf(
|
|
119
121
|
'<div class="wp-block-latest-posts__post-author">%1$s</div>',
|
|
120
|
-
|
|
122
|
+
$byline
|
|
121
123
|
);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
@@ -126,7 +128,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
126
128
|
$list_items_markup .= sprintf(
|
|
127
129
|
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
|
|
128
130
|
esc_attr( get_the_date( 'c', $post ) ),
|
|
129
|
-
|
|
131
|
+
get_the_date( '', $post )
|
|
130
132
|
);
|
|
131
133
|
}
|
|
132
134
|
|
|
@@ -148,7 +150,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
148
150
|
if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
|
|
149
151
|
&& isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) {
|
|
150
152
|
|
|
151
|
-
$post_content =
|
|
153
|
+
$post_content = html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) );
|
|
152
154
|
|
|
153
155
|
if ( post_password_required( $post ) ) {
|
|
154
156
|
$post_content = __( 'This content is password protected.' );
|
|
@@ -156,7 +158,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
156
158
|
|
|
157
159
|
$list_items_markup .= sprintf(
|
|
158
160
|
'<div class="wp-block-latest-posts__post-full-content">%1$s</div>',
|
|
159
|
-
$post_content
|
|
161
|
+
wp_kses_post( $post_content )
|
|
160
162
|
);
|
|
161
163
|
}
|
|
162
164
|
|
|
@@ -73,15 +73,3 @@
|
|
|
73
73
|
text-align: center;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
.block-editor-image-alignment-control__row {
|
|
78
|
-
.components-base-control__field {
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: space-between;
|
|
81
|
-
align-items: center;
|
|
82
|
-
|
|
83
|
-
.components-base-control__label {
|
|
84
|
-
margin-bottom: 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
package/src/list/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/list",
|
|
4
5
|
"title": "List",
|
|
@@ -51,7 +52,11 @@
|
|
|
51
52
|
},
|
|
52
53
|
"color": {
|
|
53
54
|
"gradients": true,
|
|
54
|
-
"link": true
|
|
55
|
+
"link": true,
|
|
56
|
+
"__experimentalDefaultControls": {
|
|
57
|
+
"background": true,
|
|
58
|
+
"text": true
|
|
59
|
+
}
|
|
55
60
|
},
|
|
56
61
|
"__unstablePasteTextInline": true,
|
|
57
62
|
"__experimentalSelector": "ol,ul",
|