@wordpress/block-library 7.12.0 → 7.12.2-next.d6164808d3.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 +7 -1
- package/build/archives/index.js +5 -1
- package/build/archives/index.js.map +1 -1
- package/build/audio/index.js +4 -0
- package/build/audio/index.js.map +1 -1
- package/build/button/deprecated.js +14 -5
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +1 -1
- package/build/categories/edit.js +3 -1
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +14 -1
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +4 -2
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +13 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/deprecated.js +16 -5
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +6 -2
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +6 -2
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/index.js +13 -0
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-name/index.js +5 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +5 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +5 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +5 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/index.js +14 -1
- package/build/comment-template/index.js.map +1 -1
- package/build/comments/index.js +13 -0
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination/index.js +13 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +4 -2
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js +5 -1
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-numbers/index.js +14 -1
- package/build/comments-pagination-numbers/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +4 -2
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/comments-title/deprecated.js +4 -2
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/index.js +4 -2
- package/build/comments-title/index.js.map +1 -1
- package/build/cover/deprecated.js +20 -5
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/index.js +13 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/shared.js +1 -1
- package/build/cover/shared.js.map +1 -1
- package/build/embed/icons.js +1 -1
- package/build/embed/icons.js.map +1 -1
- package/build/gallery/deprecated.js +6 -1
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +15 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/index.js +5 -0
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/transforms.js +20 -7
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/utils.js +7 -6
- package/build/gallery/utils.js.map +1 -1
- package/build/group/deprecated.js +108 -12
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +23 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +10 -2
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +8 -8
- package/build/group/variations.js.map +1 -1
- package/build/heading/deprecated.js +5 -3
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/index.js +3 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +3 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/edit.js +8 -4
- package/build/home-link/edit.js.map +1 -1
- package/build/image/edit.js +13 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/index.js +13 -7
- package/build/image/index.js.map +1 -1
- package/build/index.native.js +6 -3
- package/build/index.native.js.map +1 -1
- package/build/list-item/edit.js +3 -1
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +8 -0
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-copy.js +42 -0
- package/build/list-item/hooks/use-copy.js.map +1 -0
- package/build/list-item/list-style-type.native.js +4 -1
- package/build/list-item/list-style-type.native.js.map +1 -1
- package/build/media-text/deprecated.js +5 -1
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/index.js +13 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/deprecated.js +6 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +119 -38
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +2 -1
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +1 -7
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +8 -7
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +6 -8
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -6
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +7 -3
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +18 -10
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +1 -0
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +5 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +5 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +4 -2
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +1 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +5 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments-count/edit.js +11 -1
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-count/index.js +4 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-link/index.js +4 -2
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-date/edit.js +9 -2
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +9 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-featured-image/edit.js +27 -12
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +12 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +3 -2
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +8 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +14 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +5 -3
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +2 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/index.js +4 -2
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/deprecated.js +135 -25
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +1 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/edit.native.js +0 -1
- package/build/pullquote/edit.native.js.map +1 -1
- package/build/pullquote/index.js +13 -6
- package/build/pullquote/index.js.map +1 -1
- package/build/pullquote/save.js +2 -2
- package/build/pullquote/save.js.map +1 -1
- package/build/pullquote/transforms.js +14 -33
- package/build/pullquote/transforms.js.map +1 -1
- package/build/query/deprecated.js +10 -9
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +19 -8
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-placeholder.js +6 -1
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/utils.js +35 -9
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-title/edit.js +10 -1
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +7 -2
- package/build/query-title/index.js.map +1 -1
- package/build/quote/deprecated.js +13 -6
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/transforms.js +22 -37
- package/build/quote/transforms.js.map +1 -1
- package/build/separator/deprecated.js +3 -4
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.js.map +1 -1
- package/build/social-link/icons/reddit.js +1 -1
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/social-links/edit.js +2 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/index.js +7 -1
- package/build/spacer/index.js.map +1 -1
- package/build/table/index.js +4 -0
- package/build/table/index.js.map +1 -1
- package/build/table/state.js +9 -3
- package/build/table/state.js.map +1 -1
- package/build/table-of-contents/index.js +11 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +5 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/index.js +2 -2
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +4 -0
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/edit.js +3 -1
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js +3 -1
- package/build/text-columns/save.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +4 -0
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +5 -1
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/index.js +4 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/button/deprecated.js +14 -4
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/categories/edit.js +4 -2
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +14 -1
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +4 -2
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +13 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/deprecated.js +16 -4
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +7 -3
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +7 -3
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js +13 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +5 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +5 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +5 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +5 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/index.js +14 -1
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments/index.js +13 -0
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/index.js +13 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +4 -2
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-numbers/edit.js +5 -1
- package/build-module/comments-pagination-numbers/edit.js.map +1 -1
- package/build-module/comments-pagination-numbers/index.js +14 -1
- package/build-module/comments-pagination-numbers/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +4 -2
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/comments-title/deprecated.js +4 -2
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/index.js +4 -2
- package/build-module/comments-title/index.js.map +1 -1
- package/build-module/cover/deprecated.js +20 -4
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/index.js +13 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/shared.js +1 -1
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/icons.js +1 -1
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/gallery/deprecated.js +7 -2
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +15 -2
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/index.js +5 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/transforms.js +20 -7
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/utils.js +7 -6
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/deprecated.js +109 -12
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/edit.js +25 -2
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +10 -2
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +8 -8
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/deprecated.js +5 -2
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/index.js +3 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +3 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/edit.js +10 -6
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/image/edit.js +14 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/index.js +13 -7
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.native.js +6 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/list-item/edit.js +4 -2
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +1 -0
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-copy.js +32 -0
- package/build-module/list-item/hooks/use-copy.js.map +1 -0
- package/build-module/list-item/list-style-type.native.js +3 -1
- package/build-module/list-item/list-style-type.native.js.map +1 -1
- package/build-module/media-text/deprecated.js +6 -2
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/index.js +13 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/deprecated.js +7 -2
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +120 -40
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +2 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +1 -6
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +8 -7
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +7 -9
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +5 -7
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +7 -2
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +18 -9
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -0
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +5 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +5 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +4 -2
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +1 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +5 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments-count/edit.js +10 -1
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +4 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +4 -2
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-date/edit.js +9 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +9 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +28 -13
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +12 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +3 -2
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +8 -4
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +14 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +5 -3
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +2 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/index.js +4 -2
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/deprecated.js +134 -25
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +1 -1
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +0 -1
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/pullquote/index.js +13 -6
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/pullquote/save.js +2 -2
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/pullquote/transforms.js +15 -34
- package/build-module/pullquote/transforms.js.map +1 -1
- package/build-module/query/deprecated.js +10 -8
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +23 -12
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +6 -1
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/utils.js +32 -7
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/edit.js +1 -1
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-title/edit.js +10 -1
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +7 -2
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/deprecated.js +13 -5
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/transforms.js +23 -38
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/separator/deprecated.js +3 -3
- package/build-module/separator/deprecated.js.map +1 -1
- package/build-module/separator/index.js +1 -0
- package/build-module/separator/index.js.map +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/reddit.js.map +1 -1
- package/build-module/social-links/edit.js +2 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/index.js +7 -1
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/table/index.js +4 -0
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/state.js +10 -4
- package/build-module/table/state.js.map +1 -1
- package/build-module/table-of-contents/index.js +11 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +5 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/index.js +2 -2
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +4 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/edit.js +4 -2
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js +4 -2
- package/build-module/text-columns/save.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 +4 -0
- package/build-module/video/index.js.map +1 -1
- package/build-style/audio/style-rtl.css +3 -0
- package/build-style/audio/style.css +3 -0
- package/build-style/button/style-rtl.css +6 -6
- package/build-style/button/style.css +6 -6
- package/build-style/editor-rtl.css +105 -122
- package/build-style/editor.css +105 -122
- package/build-style/group/editor-rtl.css +27 -8
- package/build-style/group/editor.css +27 -8
- package/build-style/image/editor-rtl.css +21 -2
- package/build-style/image/editor.css +21 -2
- package/build-style/navigation/editor-rtl.css +8 -4
- package/build-style/navigation/editor.css +8 -4
- package/build-style/navigation/style-rtl.css +2 -2
- package/build-style/navigation/style.css +2 -2
- package/build-style/paragraph/editor-rtl.css +1 -1
- package/build-style/paragraph/editor.css +1 -1
- package/build-style/post-date/style-rtl.css +79 -0
- package/build-style/post-date/style.css +79 -0
- package/build-style/post-featured-image/editor-rtl.css +45 -43
- package/build-style/post-featured-image/editor.css +45 -43
- package/build-style/post-featured-image/style-rtl.css +1 -0
- package/build-style/post-featured-image/style.css +1 -0
- package/build-style/post-title/style-rtl.css +1 -0
- package/build-style/post-title/style.css +1 -0
- package/build-style/pullquote/editor-rtl.css +0 -12
- package/build-style/pullquote/editor.css +0 -12
- package/build-style/pullquote/style-rtl.css +1 -8
- package/build-style/pullquote/style.css +1 -8
- package/build-style/query-title/style-rtl.css +79 -0
- package/build-style/query-title/style.css +79 -0
- package/build-style/site-logo/editor-rtl.css +3 -52
- package/build-style/site-logo/editor.css +3 -52
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +27 -18
- package/build-style/style.css +27 -18
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/package.json +30 -29
- package/src/archives/block.json +5 -1
- package/src/audio/block.json +4 -0
- package/src/audio/style.scss +2 -0
- package/src/button/block.json +1 -1
- package/src/button/deprecated.js +21 -22
- package/src/button/style.scss +6 -6
- package/src/calendar/index.php +2 -2
- package/src/categories/block.json +14 -1
- package/src/categories/edit.js +2 -2
- package/src/code/block.json +4 -2
- package/src/column/block.json +13 -0
- package/src/columns/block.json +13 -0
- package/src/columns/deprecated.js +10 -4
- package/src/columns/edit.js +7 -3
- package/src/columns/edit.native.js +7 -3
- package/src/comment-author-name/block.json +5 -1
- package/src/comment-content/block.json +5 -1
- package/src/comment-date/block.json +1 -0
- package/src/comment-edit-link/block.json +5 -1
- package/src/comment-reply-link/block.json +5 -1
- package/src/comment-template/block.json +14 -1
- package/src/comments/block.json +13 -0
- package/src/comments/index.php +6 -5
- package/src/comments-pagination/block.json +13 -0
- package/src/comments-pagination-next/block.json +4 -2
- package/src/comments-pagination-numbers/block.json +14 -1
- package/src/comments-pagination-numbers/edit.js +12 -3
- package/src/comments-pagination-previous/block.json +4 -2
- package/src/comments-title/block.json +4 -2
- package/src/cover/block.json +13 -0
- package/src/cover/deprecated.js +11 -4
- package/src/cover/shared.js +2 -1
- package/src/embed/icons.js +1 -1
- package/src/gallery/block.json +5 -0
- package/src/gallery/deprecated.js +4 -2
- package/src/gallery/edit.js +22 -2
- package/src/gallery/transforms.js +18 -5
- package/src/gallery/utils.js +11 -7
- package/src/group/block.json +10 -2
- package/src/group/deprecated.js +89 -2
- package/src/group/edit.js +15 -2
- package/src/group/editor.scss +28 -3
- package/src/group/variations.js +4 -3
- package/src/heading/block.json +3 -1
- package/src/heading/deprecated.js +4 -2
- package/src/home-link/edit.js +19 -20
- package/src/image/block.json +13 -7
- package/src/image/edit.js +19 -1
- package/src/image/editor.scss +39 -3
- package/src/image/index.php +1 -1
- package/src/index.native.js +15 -10
- package/src/list-item/edit.js +2 -1
- package/src/list-item/hooks/index.js +1 -0
- package/src/list-item/hooks/use-copy.js +36 -0
- package/src/list-item/list-style-type.native.js +8 -1
- package/src/list-item/style.native.scss +4 -0
- package/src/media-text/block.json +13 -0
- package/src/media-text/deprecated.js +3 -2
- package/src/navigation/deprecated.js +4 -2
- package/src/navigation/edit/index.js +159 -81
- package/src/navigation/edit/unsaved-inner-blocks.js +3 -1
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +31 -37
- package/src/navigation/editor.scss +3 -2
- package/src/navigation/index.php +11 -16
- package/src/navigation/menu-items-to-blocks.js +3 -6
- package/src/navigation/style.scss +3 -2
- package/src/navigation/use-navigation-menu.js +11 -8
- package/src/navigation-link/edit.js +9 -13
- package/src/navigation-submenu/edit.js +9 -13
- package/src/page-list/edit.js +6 -2
- package/src/paragraph/block.json +5 -0
- package/src/paragraph/deprecated.js +33 -35
- package/src/paragraph/edit.js +1 -0
- package/src/paragraph/editor.scss +5 -3
- package/src/post-author/block.json +4 -2
- package/src/post-author-biography/block.json +1 -0
- package/src/post-author-name/block.json +5 -1
- package/src/post-comments-count/block.json +4 -1
- package/src/post-comments-count/edit.js +10 -2
- package/src/post-comments-link/block.json +4 -2
- package/src/post-date/block.json +9 -0
- package/src/post-date/edit.js +12 -2
- package/src/post-date/index.php +10 -2
- package/src/post-date/style.scss +4 -0
- package/src/post-featured-image/block.json +12 -0
- package/src/post-featured-image/edit.js +43 -13
- package/src/post-featured-image/editor.scss +44 -53
- package/src/post-featured-image/index.php +61 -4
- package/src/post-featured-image/style.scss +1 -0
- package/src/post-navigation-link/block.json +3 -2
- package/src/post-template/block.json +15 -1
- package/src/post-template/edit.js +6 -1
- package/src/post-template/index.php +7 -4
- package/src/post-terms/block.json +5 -3
- package/src/post-title/block.json +2 -1
- package/src/post-title/style.scss +2 -0
- package/src/preformatted/block.json +4 -2
- package/src/pullquote/block.json +11 -4
- package/src/pullquote/deprecated.js +490 -412
- package/src/pullquote/edit.js +1 -1
- package/src/pullquote/edit.native.js +0 -1
- package/src/pullquote/editor.scss +0 -16
- package/src/pullquote/index.js +1 -3
- package/src/pullquote/save.js +1 -1
- package/src/pullquote/style.scss +0 -11
- package/src/pullquote/transforms.js +17 -33
- package/src/query/deprecated.js +4 -9
- package/src/query/edit/index.js +28 -15
- package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -1
- package/src/query/edit/query-placeholder.js +17 -2
- package/src/query/utils.js +29 -7
- package/src/query-no-results/edit.js +1 -1
- package/src/query-title/block.json +7 -2
- package/src/query-title/edit.js +19 -2
- package/src/query-title/index.php +11 -1
- package/src/query-title/style.scss +4 -0
- package/src/quote/deprecated.js +6 -5
- package/src/quote/transforms.js +4 -18
- package/src/search/index.php +1 -1
- package/src/separator/block.json +1 -0
- package/src/separator/deprecated.js +2 -3
- package/src/site-logo/editor.scss +8 -66
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +1 -1
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/edit.js +1 -0
- package/src/spacer/block.json +7 -1
- package/src/style.scss +2 -0
- package/src/table/block.json +4 -0
- package/src/table/state.js +21 -19
- package/src/table-of-contents/block.json +11 -1
- package/src/tag-cloud/block.json +5 -1
- package/src/template-part/index.js +3 -2
- package/src/term-description/block.json +4 -0
- package/src/text-columns/edit.js +2 -2
- package/src/text-columns/save.js +2 -2
- package/src/verse/block.json +1 -0
- package/src/video/block.json +4 -0
- package/src/video/style.scss +2 -0
package/src/pullquote/edit.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
.wp-block-pullquote.has-text-align-left,
|
|
2
|
-
.wp-block-pullquote.has-text-align-right,
|
|
3
|
-
.wp-block[data-align="left"] > .wp-block-pullquote,
|
|
4
|
-
.wp-block[data-align="right"] > .wp-block-pullquote {
|
|
5
|
-
& p {
|
|
6
|
-
font-size: 20px;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.wp-block-pullquote {
|
|
11
|
-
& blockquote p {
|
|
12
|
-
font-size: 28px;
|
|
13
|
-
line-height: 1.6;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
1
|
// .is-style-solid-color is deprecated.
|
|
18
2
|
.wp-block-pullquote.is-style-solid-color {
|
|
19
3
|
& blockquote p {
|
package/src/pullquote/index.js
CHANGED
|
@@ -22,12 +22,10 @@ export const settings = {
|
|
|
22
22
|
example: {
|
|
23
23
|
attributes: {
|
|
24
24
|
value:
|
|
25
|
-
'<p>' +
|
|
26
25
|
// translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
|
|
27
26
|
__(
|
|
28
27
|
'One of the hardest things to do in technology is disrupt yourself.'
|
|
29
|
-
)
|
|
30
|
-
'</p>',
|
|
28
|
+
),
|
|
31
29
|
citation: __( 'Matt Mullenweg' ),
|
|
32
30
|
},
|
|
33
31
|
},
|
package/src/pullquote/save.js
CHANGED
|
@@ -21,7 +21,7 @@ export default function save( { attributes } ) {
|
|
|
21
21
|
} ) }
|
|
22
22
|
>
|
|
23
23
|
<blockquote>
|
|
24
|
-
<RichText.Content value={ value }
|
|
24
|
+
<RichText.Content tagName="p" value={ value } />
|
|
25
25
|
{ shouldShowCitation && (
|
|
26
26
|
<RichText.Content tagName="cite" value={ citation } />
|
|
27
27
|
) }
|
package/src/pullquote/style.scss
CHANGED
|
@@ -11,20 +11,9 @@
|
|
|
11
11
|
color: inherit;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
&.has-text-align-left,
|
|
15
|
-
&.has-text-align-right,
|
|
16
14
|
&.alignleft,
|
|
17
15
|
&.alignright {
|
|
18
16
|
max-width: $content-width * 0.5;
|
|
19
|
-
|
|
20
|
-
p {
|
|
21
|
-
font-size: 1.25em;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
p {
|
|
26
|
-
font-size: 1.75em;
|
|
27
|
-
line-height: 1.6;
|
|
28
17
|
}
|
|
29
18
|
|
|
30
19
|
cite,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { createBlock } from '@wordpress/blocks';
|
|
5
|
-
import { create, join,
|
|
5
|
+
import { create, join, toHTMLString } from '@wordpress/rich-text';
|
|
6
6
|
|
|
7
7
|
const transforms = {
|
|
8
8
|
from: [
|
|
@@ -17,9 +17,8 @@ const transforms = {
|
|
|
17
17
|
attributes.map( ( { content } ) =>
|
|
18
18
|
create( { html: content } )
|
|
19
19
|
),
|
|
20
|
-
'\
|
|
20
|
+
'\n'
|
|
21
21
|
),
|
|
22
|
-
multilineTag: 'p',
|
|
23
22
|
} ),
|
|
24
23
|
anchor: attributes.anchor,
|
|
25
24
|
} );
|
|
@@ -30,7 +29,7 @@ const transforms = {
|
|
|
30
29
|
blocks: [ 'core/heading' ],
|
|
31
30
|
transform: ( { content, anchor } ) => {
|
|
32
31
|
return createBlock( 'core/pullquote', {
|
|
33
|
-
value:
|
|
32
|
+
value: content,
|
|
34
33
|
anchor,
|
|
35
34
|
} );
|
|
36
35
|
},
|
|
@@ -42,19 +41,14 @@ const transforms = {
|
|
|
42
41
|
blocks: [ 'core/paragraph' ],
|
|
43
42
|
transform: ( { value, citation } ) => {
|
|
44
43
|
const paragraphs = [];
|
|
45
|
-
if ( value
|
|
44
|
+
if ( value ) {
|
|
46
45
|
paragraphs.push(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
).map( ( piece ) =>
|
|
51
|
-
createBlock( 'core/paragraph', {
|
|
52
|
-
content: toHTMLString( { value: piece } ),
|
|
53
|
-
} )
|
|
54
|
-
)
|
|
46
|
+
createBlock( 'core/paragraph', {
|
|
47
|
+
content: value,
|
|
48
|
+
} )
|
|
55
49
|
);
|
|
56
50
|
}
|
|
57
|
-
if ( citation
|
|
51
|
+
if ( citation ) {
|
|
58
52
|
paragraphs.push(
|
|
59
53
|
createBlock( 'core/paragraph', {
|
|
60
54
|
content: citation,
|
|
@@ -72,37 +66,27 @@ const transforms = {
|
|
|
72
66
|
{
|
|
73
67
|
type: 'block',
|
|
74
68
|
blocks: [ 'core/heading' ],
|
|
75
|
-
transform: ( { value, citation
|
|
69
|
+
transform: ( { value, citation } ) => {
|
|
76
70
|
// If there is no pullquote content, use the citation as the
|
|
77
71
|
// content of the resulting heading. A nonexistent citation
|
|
78
72
|
// will result in an empty heading.
|
|
79
|
-
if ( value
|
|
73
|
+
if ( ! value ) {
|
|
80
74
|
return createBlock( 'core/heading', {
|
|
81
75
|
content: citation,
|
|
82
76
|
} );
|
|
83
77
|
}
|
|
84
|
-
const pieces = split(
|
|
85
|
-
create( { html: value, multilineTag: 'p' } ),
|
|
86
|
-
'\u2028'
|
|
87
|
-
);
|
|
88
78
|
const headingBlock = createBlock( 'core/heading', {
|
|
89
|
-
content:
|
|
79
|
+
content: value,
|
|
90
80
|
} );
|
|
91
|
-
if ( ! citation
|
|
81
|
+
if ( ! citation ) {
|
|
92
82
|
return headingBlock;
|
|
93
83
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
value: toHTMLString( {
|
|
99
|
-
value: quotePieces.length
|
|
100
|
-
? join( pieces.slice( 1 ), '\u2028' )
|
|
101
|
-
: create(),
|
|
102
|
-
multilineTag: 'p',
|
|
84
|
+
return [
|
|
85
|
+
headingBlock,
|
|
86
|
+
createBlock( 'core/heading', {
|
|
87
|
+
content: citation,
|
|
103
88
|
} ),
|
|
104
|
-
|
|
105
|
-
return [ headingBlock, pullquoteBlock ];
|
|
89
|
+
];
|
|
106
90
|
},
|
|
107
91
|
},
|
|
108
92
|
],
|
package/src/query/deprecated.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { omit } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -14,9 +9,8 @@ import {
|
|
|
14
9
|
|
|
15
10
|
const migrateToTaxQuery = ( attributes ) => {
|
|
16
11
|
const { query } = attributes;
|
|
17
|
-
const newQuery =
|
|
18
|
-
|
|
19
|
-
};
|
|
12
|
+
const { categoryIds, tagIds, ...newQuery } = query;
|
|
13
|
+
|
|
20
14
|
if ( query.categoryIds?.length || query.tagIds?.length ) {
|
|
21
15
|
newQuery.taxQuery = {
|
|
22
16
|
category: !! query.categoryIds?.length
|
|
@@ -121,8 +115,9 @@ const deprecated = [
|
|
|
121
115
|
},
|
|
122
116
|
migrate( attributes ) {
|
|
123
117
|
const withTaxQuery = migrateToTaxQuery( attributes );
|
|
118
|
+
const { layout, ...restWithTaxQuery } = withTaxQuery;
|
|
124
119
|
return {
|
|
125
|
-
...
|
|
120
|
+
...restWithTaxQuery,
|
|
126
121
|
displayLayout: withTaxQuery.layout,
|
|
127
122
|
};
|
|
128
123
|
},
|
package/src/query/edit/index.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
-
import { store as blocksStore
|
|
5
|
+
import { store as blocksStore } from '@wordpress/blocks';
|
|
6
6
|
import { useInstanceId } from '@wordpress/compose';
|
|
7
|
-
import { useState, useEffect } from '@wordpress/element';
|
|
7
|
+
import { useState, useEffect, useMemo } from '@wordpress/element';
|
|
8
8
|
import {
|
|
9
9
|
BlockControls,
|
|
10
|
+
BlockContextProvider,
|
|
10
11
|
InspectorControls,
|
|
11
12
|
useBlockProps,
|
|
12
13
|
useSetting,
|
|
@@ -30,7 +31,7 @@ import QueryToolbar from './query-toolbar';
|
|
|
30
31
|
import QueryInspectorControls from './inspector-controls';
|
|
31
32
|
import QueryPlaceholder from './query-placeholder';
|
|
32
33
|
import { DEFAULTS_POSTS_PER_PAGE } from '../constants';
|
|
33
|
-
import {
|
|
34
|
+
import { getTransformedBlocksFromPattern } from '../utils';
|
|
34
35
|
|
|
35
36
|
const TEMPLATE = [ [ 'core/post-template' ] ];
|
|
36
37
|
export function QueryContent( {
|
|
@@ -177,6 +178,7 @@ function QueryPatternSetup( {
|
|
|
177
178
|
<QueryPlaceholder
|
|
178
179
|
clientId={ clientId }
|
|
179
180
|
name={ name }
|
|
181
|
+
attributes={ attributes }
|
|
180
182
|
setAttributes={ setAttributes }
|
|
181
183
|
icon={ icon }
|
|
182
184
|
label={ label }
|
|
@@ -215,7 +217,7 @@ function QueryPatternSetup( {
|
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
const QueryEdit = ( props ) => {
|
|
218
|
-
const { clientId, name } = props;
|
|
220
|
+
const { clientId, name, attributes } = props;
|
|
219
221
|
const [ isPatternSelectionModalOpen, setIsPatternSelectionModalOpen ] =
|
|
220
222
|
useState( false );
|
|
221
223
|
const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
|
|
@@ -226,14 +228,23 @@ const QueryEdit = ( props ) => {
|
|
|
226
228
|
);
|
|
227
229
|
const Component = hasInnerBlocks ? QueryContent : QueryPatternSetup;
|
|
228
230
|
const onBlockPatternSelect = ( blocks ) => {
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
|
|
232
|
+
blocks,
|
|
233
|
+
attributes
|
|
234
|
+
);
|
|
235
|
+
replaceBlock( clientId, newBlocks );
|
|
236
|
+
if ( queryClientIds[ 0 ] ) {
|
|
237
|
+
selectBlock( queryClientIds[ 0 ] );
|
|
235
238
|
}
|
|
236
239
|
};
|
|
240
|
+
// When we preview Query Loop blocks we should prefer the current
|
|
241
|
+
// block's postType, which is passed through block context.
|
|
242
|
+
const blockPreviewContext = useMemo(
|
|
243
|
+
() => ( {
|
|
244
|
+
previewPostType: attributes.query.postType,
|
|
245
|
+
} ),
|
|
246
|
+
[ attributes.query.postType ]
|
|
247
|
+
);
|
|
237
248
|
return (
|
|
238
249
|
<>
|
|
239
250
|
<Component
|
|
@@ -251,11 +262,13 @@ const QueryEdit = ( props ) => {
|
|
|
251
262
|
setIsPatternSelectionModalOpen( false )
|
|
252
263
|
}
|
|
253
264
|
>
|
|
254
|
-
<
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
265
|
+
<BlockContextProvider value={ blockPreviewContext }>
|
|
266
|
+
<BlockPatternSetup
|
|
267
|
+
blockName={ name }
|
|
268
|
+
clientId={ clientId }
|
|
269
|
+
onBlockPatternSelect={ onBlockPatternSelect }
|
|
270
|
+
/>
|
|
271
|
+
</BlockContextProvider>
|
|
259
272
|
</Modal>
|
|
260
273
|
) }
|
|
261
274
|
</>
|
|
@@ -38,7 +38,7 @@ export const useTaxonomiesInfo = ( postType ) => {
|
|
|
38
38
|
const taxonomiesInfo = useSelect(
|
|
39
39
|
( select ) => {
|
|
40
40
|
const { getEntityRecords } = select( coreStore );
|
|
41
|
-
const termsQuery = { per_page: MAX_FETCHED_TERMS };
|
|
41
|
+
const termsQuery = { context: 'view', per_page: MAX_FETCHED_TERMS };
|
|
42
42
|
const _taxonomiesInfo = taxonomies?.map( ( { slug, name } ) => {
|
|
43
43
|
const _terms = getEntityRecords( 'taxonomy', slug, termsQuery );
|
|
44
44
|
return {
|
|
@@ -12,7 +12,14 @@ import {
|
|
|
12
12
|
store as blocksStore,
|
|
13
13
|
} from '@wordpress/blocks';
|
|
14
14
|
|
|
15
|
-
function QueryPlaceholder( {
|
|
15
|
+
function QueryPlaceholder( {
|
|
16
|
+
clientId,
|
|
17
|
+
name,
|
|
18
|
+
attributes,
|
|
19
|
+
setAttributes,
|
|
20
|
+
icon,
|
|
21
|
+
label,
|
|
22
|
+
} ) {
|
|
16
23
|
const { defaultVariation, scopeVariations } = useSelect(
|
|
17
24
|
( select ) => {
|
|
18
25
|
const {
|
|
@@ -39,7 +46,15 @@ function QueryPlaceholder( { clientId, name, setAttributes, icon, label } ) {
|
|
|
39
46
|
variations={ scopeVariations }
|
|
40
47
|
onSelect={ ( nextVariation = defaultVariation ) => {
|
|
41
48
|
if ( nextVariation.attributes ) {
|
|
42
|
-
setAttributes(
|
|
49
|
+
setAttributes( {
|
|
50
|
+
...nextVariation.attributes,
|
|
51
|
+
query: {
|
|
52
|
+
...nextVariation.attributes.query,
|
|
53
|
+
postType:
|
|
54
|
+
attributes.query.postType ||
|
|
55
|
+
nextVariation.attributes.query.postType,
|
|
56
|
+
},
|
|
57
|
+
} );
|
|
43
58
|
}
|
|
44
59
|
if ( nextVariation.innerBlocks ) {
|
|
45
60
|
replaceInnerBlocks(
|
package/src/query/utils.js
CHANGED
|
@@ -10,6 +10,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
10
10
|
import { useMemo } from '@wordpress/element';
|
|
11
11
|
import { store as coreStore } from '@wordpress/core-data';
|
|
12
12
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
13
|
+
import { cloneBlock } from '@wordpress/blocks';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @typedef IHasNameAndId
|
|
@@ -127,21 +128,42 @@ export const useTaxonomies = ( postType ) => {
|
|
|
127
128
|
};
|
|
128
129
|
|
|
129
130
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
131
|
+
* Clones a pattern's blocks and then recurses over that list of blocks,
|
|
132
|
+
* transforming them to retain some `query` attribute properties.
|
|
133
|
+
* For now we retain the `postType` and `inherit` properties as they are
|
|
134
|
+
* fundamental for the expected functionality of the block and don't affect
|
|
135
|
+
* its design and presentation.
|
|
132
136
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
137
|
+
* Returns the cloned/transformed blocks and array of existing Query Loop
|
|
138
|
+
* client ids for further manipulation, in order to avoid multiple recursions.
|
|
139
|
+
*
|
|
140
|
+
* @param {WPBlock[]} blocks The list of blocks to look through and transform(mutate).
|
|
141
|
+
* @param {Record<string,*>} queryBlockAttributes The existing Query Loop's attributes.
|
|
142
|
+
* @return {{ newBlocks: WPBlock[], queryClientIds: string[] }} An object with the cloned/transformed blocks and all the Query Loop clients from these blocks.
|
|
135
143
|
*/
|
|
136
|
-
export const
|
|
137
|
-
|
|
144
|
+
export const getTransformedBlocksFromPattern = (
|
|
145
|
+
blocks,
|
|
146
|
+
queryBlockAttributes
|
|
147
|
+
) => {
|
|
148
|
+
const {
|
|
149
|
+
query: { postType, inherit },
|
|
150
|
+
} = queryBlockAttributes;
|
|
151
|
+
const clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );
|
|
152
|
+
const queryClientIds = [];
|
|
153
|
+
const blocksQueue = [ ...clonedBlocks ];
|
|
138
154
|
while ( blocksQueue.length > 0 ) {
|
|
139
155
|
const block = blocksQueue.shift();
|
|
140
156
|
if ( block.name === 'core/query' ) {
|
|
141
|
-
|
|
157
|
+
block.attributes.query = {
|
|
158
|
+
...block.attributes.query,
|
|
159
|
+
postType,
|
|
160
|
+
inherit,
|
|
161
|
+
};
|
|
162
|
+
queryClientIds.push( block.clientId );
|
|
142
163
|
}
|
|
143
164
|
block.innerBlocks?.forEach( ( innerBlock ) => {
|
|
144
165
|
blocksQueue.push( innerBlock );
|
|
145
166
|
} );
|
|
146
167
|
}
|
|
168
|
+
return { newBlocks: clonedBlocks, queryClientIds };
|
|
147
169
|
};
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"type": "number",
|
|
18
18
|
"default": 1
|
|
19
19
|
},
|
|
20
|
+
"showPrefix": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": true
|
|
23
|
+
},
|
|
20
24
|
"showSearchTerm": {
|
|
21
25
|
"type": "boolean",
|
|
22
26
|
"default": true
|
|
@@ -33,7 +37,8 @@
|
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"spacing": {
|
|
36
|
-
"margin": true
|
|
40
|
+
"margin": true,
|
|
41
|
+
"padding": true
|
|
37
42
|
},
|
|
38
43
|
"typography": {
|
|
39
44
|
"fontSize": true,
|
|
@@ -50,5 +55,5 @@
|
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
},
|
|
53
|
-
"
|
|
58
|
+
"style": "wp-block-query-title"
|
|
54
59
|
}
|
package/src/query-title/edit.js
CHANGED
|
@@ -24,7 +24,7 @@ import HeadingLevelDropdown from '../heading/heading-level-dropdown';
|
|
|
24
24
|
const SUPPORTED_TYPES = [ 'archive', 'search' ];
|
|
25
25
|
|
|
26
26
|
export default function QueryTitleEdit( {
|
|
27
|
-
attributes: { type, level, textAlign, showSearchTerm },
|
|
27
|
+
attributes: { type, level, textAlign, showPrefix, showSearchTerm },
|
|
28
28
|
setAttributes,
|
|
29
29
|
} ) {
|
|
30
30
|
const TagName = `h${ level }`;
|
|
@@ -45,7 +45,24 @@ export default function QueryTitleEdit( {
|
|
|
45
45
|
let titleElement;
|
|
46
46
|
if ( type === 'archive' ) {
|
|
47
47
|
titleElement = (
|
|
48
|
-
|
|
48
|
+
<>
|
|
49
|
+
<InspectorControls>
|
|
50
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
51
|
+
<ToggleControl
|
|
52
|
+
label={ __( 'Show archive type in title' ) }
|
|
53
|
+
onChange={ () =>
|
|
54
|
+
setAttributes( { showPrefix: ! showPrefix } )
|
|
55
|
+
}
|
|
56
|
+
checked={ showPrefix }
|
|
57
|
+
/>
|
|
58
|
+
</PanelBody>
|
|
59
|
+
</InspectorControls>
|
|
60
|
+
<TagName { ...blockProps }>
|
|
61
|
+
{ showPrefix
|
|
62
|
+
? __( 'Archive type: Name' )
|
|
63
|
+
: __( 'Archive title' ) }
|
|
64
|
+
</TagName>
|
|
65
|
+
</>
|
|
49
66
|
);
|
|
50
67
|
}
|
|
51
68
|
|
|
@@ -26,7 +26,17 @@ function render_block_core_query_title( $attributes ) {
|
|
|
26
26
|
}
|
|
27
27
|
$title = '';
|
|
28
28
|
if ( $is_archive ) {
|
|
29
|
-
$
|
|
29
|
+
$show_prefix = isset( $attributes['showPrefix'] ) ? $attributes['showPrefix'] : true;
|
|
30
|
+
if ( ! $show_prefix ) {
|
|
31
|
+
$filter_title = function( $title, $original_title ) {
|
|
32
|
+
return $original_title;
|
|
33
|
+
};
|
|
34
|
+
add_filter( 'get_the_archive_title', $filter_title, 10, 2 );
|
|
35
|
+
$title = get_the_archive_title();
|
|
36
|
+
remove_filter( 'get_the_archive_title', $filter_title, 10, 2 );
|
|
37
|
+
} else {
|
|
38
|
+
$title = get_the_archive_title();
|
|
39
|
+
}
|
|
30
40
|
}
|
|
31
41
|
if ( $is_search ) {
|
|
32
42
|
$title = __( 'Search results' );
|
package/src/quote/deprecated.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { omit } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -11,11 +10,11 @@ import { createBlock, parseWithAttributeSchema } from '@wordpress/blocks';
|
|
|
11
10
|
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
12
11
|
|
|
13
12
|
export const migrateToQuoteV2 = ( attributes ) => {
|
|
14
|
-
const { value } = attributes;
|
|
13
|
+
const { value, ...restAttributes } = attributes;
|
|
15
14
|
|
|
16
15
|
return [
|
|
17
16
|
{
|
|
18
|
-
...
|
|
17
|
+
...restAttributes,
|
|
19
18
|
},
|
|
20
19
|
value
|
|
21
20
|
? parseWithAttributeSchema( value, {
|
|
@@ -151,8 +150,9 @@ const v1 = {
|
|
|
151
150
|
|
|
152
151
|
migrate( attributes ) {
|
|
153
152
|
if ( attributes.style === 2 ) {
|
|
153
|
+
const { style, ...restAttributes } = attributes;
|
|
154
154
|
return migrateToQuoteV2( {
|
|
155
|
-
...
|
|
155
|
+
...restAttributes,
|
|
156
156
|
className: attributes.className
|
|
157
157
|
? attributes.className + ' is-style-large'
|
|
158
158
|
: 'is-style-large',
|
|
@@ -205,8 +205,9 @@ const v0 = {
|
|
|
205
205
|
|
|
206
206
|
migrate( attributes ) {
|
|
207
207
|
if ( ! isNaN( parseInt( attributes.style ) ) ) {
|
|
208
|
+
const { style, ...restAttributes } = attributes;
|
|
208
209
|
return migrateToQuoteV2( {
|
|
209
|
-
...
|
|
210
|
+
...restAttributes,
|
|
210
211
|
} );
|
|
211
212
|
}
|
|
212
213
|
|
package/src/quote/transforms.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { createBlock
|
|
4
|
+
import { createBlock } from '@wordpress/blocks';
|
|
5
5
|
|
|
6
6
|
const transforms = {
|
|
7
7
|
from: [
|
|
@@ -17,19 +17,7 @@ const transforms = {
|
|
|
17
17
|
fontSize,
|
|
18
18
|
style,
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
type: 'array',
|
|
22
|
-
source: 'query',
|
|
23
|
-
selector: 'p',
|
|
24
|
-
query: {
|
|
25
|
-
content: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
source: 'html',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
} ).map( ( { content } ) =>
|
|
31
|
-
createBlock( 'core/paragraph', { content } )
|
|
32
|
-
)
|
|
20
|
+
createBlock( 'core/paragraph', { content: value } )
|
|
33
21
|
);
|
|
34
22
|
},
|
|
35
23
|
},
|
|
@@ -106,10 +94,8 @@ const transforms = {
|
|
|
106
94
|
innerBlocks
|
|
107
95
|
) => {
|
|
108
96
|
const value = innerBlocks
|
|
109
|
-
.map(
|
|
110
|
-
|
|
111
|
-
)
|
|
112
|
-
.join( '' );
|
|
97
|
+
.map( ( { attributes } ) => `${ attributes.content }` )
|
|
98
|
+
.join( '<br>' );
|
|
113
99
|
return createBlock( 'core/pullquote', {
|
|
114
100
|
value,
|
|
115
101
|
citation,
|
package/src/search/index.php
CHANGED
|
@@ -217,7 +217,7 @@ function apply_block_core_search_border_style( $attributes, $property, $side, &$
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
if ( 'color' === $property && $side ) {
|
|
220
|
-
$has_color_preset =
|
|
220
|
+
$has_color_preset = str_contains( $value, 'var:preset|color|' );
|
|
221
221
|
if ( $has_color_preset ) {
|
|
222
222
|
$named_color_value = substr( $value, strrpos( $value, '|' ) + 1 );
|
|
223
223
|
$value = sprintf( 'var(--wp--preset--color--%s)', $named_color_value );
|
package/src/separator/block.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { omit } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -42,9 +41,9 @@ const v1 = {
|
|
|
42
41
|
return <hr { ...useBlockProps.save( { className, style } ) } />;
|
|
43
42
|
},
|
|
44
43
|
migrate( attributes ) {
|
|
45
|
-
const { color, customColor } = attributes;
|
|
44
|
+
const { color, customColor, ...restAttributes } = attributes;
|
|
46
45
|
return {
|
|
47
|
-
...
|
|
46
|
+
...restAttributes,
|
|
48
47
|
backgroundColor: color ? color : undefined,
|
|
49
48
|
opacity: 'css',
|
|
50
49
|
style: customColor
|