@wordpress/block-library 7.10.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 +11 -1
- package/build/archives/edit.js +7 -0
- package/build/archives/edit.js.map +1 -1
- package/build/archives/index.js +9 -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/block/edit.js +4 -2
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js +4 -2
- package/build/block/edit.native.js.map +1 -1
- package/build/button/deprecated.js +14 -5
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -1
- package/build/buttons/edit.js +1 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/calendar/edit.js +12 -5
- package/build/calendar/edit.js.map +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 +9 -4
- 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/edit/comments-legacy.js +73 -0
- package/build/comments/edit/comments-legacy.js.map +1 -0
- package/build/comments/{edit.js → edit/index.js} +17 -38
- package/build/comments/edit/index.js.map +1 -0
- package/build/comments/edit/placeholder.js +117 -0
- package/build/comments/edit/placeholder.js.map +1 -0
- package/build/comments/edit/template.js +39 -0
- package/build/comments/edit/template.js.map +1 -0
- package/build/comments/index.js +19 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments/save.js +12 -4
- package/build/comments/save.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/edit/resizable-cover.js +6 -0
- package/build/cover/edit/resizable-cover.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/cover/transforms.js +3 -2
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +1 -3
- package/build/embed/embed-placeholder.native.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 +17 -4
- 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/use-get-media.native.js +59 -0
- package/build/gallery/use-get-media.native.js.map +1 -0
- 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 +11 -2
- package/build/group/index.js.map +1 -1
- package/build/group/transforms.js +5 -0
- package/build/group/transforms.js.map +1 -1
- package/build/group/variations.js +9 -9
- 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/deprecated.js +77 -9
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +16 -2
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +18 -8
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +27 -20
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +20 -8
- package/build/image/index.js.map +1 -1
- package/build/image/save.js +8 -2
- package/build/image/save.js.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/index.native.js +16 -10
- package/build/index.native.js.map +1 -1
- package/build/list/index.js +6 -0
- package/build/list/index.js.map +1 -1
- package/build/list/transforms.js +4 -63
- package/build/list/transforms.js.map +1 -1
- package/build/list/v2/edit.js +16 -5
- package/build/list/v2/edit.js.map +1 -1
- package/build/list/v2/tag-name.js +31 -0
- package/build/list/v2/tag-name.js.map +1 -0
- package/build/list/v2/tag-name.native.js +32 -0
- package/build/list/v2/tag-name.native.js.map +1 -0
- package/build/list/v2/transforms.js +1 -38
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/edit.js +18 -10
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js +158 -0
- package/build/list-item/edit.native.js.map +1 -0
- package/build/list-item/hooks/index.js +12 -4
- 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/hooks/use-merge.js +174 -0
- package/build/list-item/hooks/use-merge.js.map +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js +86 -50
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/icons.native.js +53 -0
- package/build/list-item/icons.native.js.map +1 -0
- package/build/list-item/list-style-type.native.js +139 -0
- package/build/list-item/list-style-type.native.js.map +1 -0
- package/build/list-item/utils.js +125 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +270 -17
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +4 -3
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +13 -0
- package/build/media-text/index.js.map +1 -1
- package/build/media-text/media-container.js +1 -1
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/save.js +13 -0
- package/build/media-text/save.js.map +1 -1
- package/build/more/save.js +1 -7
- package/build/more/save.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 +180 -154
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +11 -14
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +4 -2
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +13 -3
- package/build/navigation/edit/responsive-wrapper.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/edit/use-create-navigation-menu.js +5 -1
- package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build/navigation/edit/use-inner-blocks.js +43 -0
- package/build/navigation/edit/use-inner-blocks.js.map +1 -0
- package/build/navigation/edit/utils.js +28 -0
- package/build/navigation/edit/utils.js.map +1 -0
- 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 +15 -10
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +11 -12
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +6 -7
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +15 -4
- 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 +8 -11
- 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/edit.js +5 -2
- package/build/post-author/edit.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/edit.js +7 -1
- package/build/post-author-biography/edit.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-form/edit.js +4 -45
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +47 -3
- package/build/post-comments-form/form.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-content/edit.js +4 -2
- package/build/post-content/edit.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 +43 -14
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +21 -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/edit.js +3 -2
- package/build/post-terms/edit.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/index.js +42 -9
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +22 -14
- 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 +2 -2
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-pagination-next/edit.js +2 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js +2 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-title/edit.js +30 -8
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +11 -2
- package/build/query-title/index.js.map +1 -1
- package/build/query-title/variations.js +10 -0
- package/build/query-title/variations.js.map +1 -1
- package/build/quote/deprecated.js +176 -37
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +76 -39
- package/build/quote/edit.js.map +1 -1
- package/build/quote/index.js +9 -45
- package/build/quote/index.js.map +1 -1
- package/build/quote/save.js +1 -5
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js +96 -159
- 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/edit.js +1 -1
- package/build/separator/edit.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.js.map +1 -1
- package/build/social-link/icons/index.js +13 -0
- package/build/social-link/icons/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-link/icons/whatsapp.js +25 -0
- package/build/social-link/icons/whatsapp.js.map +1 -0
- package/build/social-link/variations.js +7 -0
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +3 -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/edit/index.js +21 -10
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +33 -13
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/search.js +94 -0
- package/build/template-part/edit/utils/search.js.map +1 -0
- 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/edit.js +7 -0
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/archives/index.js +9 -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/block/edit.js +5 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js +5 -3
- package/build-module/block/edit.native.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/edit.js +2 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/buttons/edit.js +2 -2
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/calendar/edit.js +12 -4
- package/build-module/calendar/edit.js.map +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 +10 -5
- 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/edit/comments-legacy.js +59 -0
- package/build-module/comments/edit/comments-legacy.js.map +1 -0
- package/build-module/comments/edit/index.js +37 -0
- package/build-module/comments/edit/index.js.map +1 -0
- package/build-module/comments/edit/placeholder.js +102 -0
- package/build-module/comments/edit/placeholder.js.map +1 -0
- package/build-module/comments/edit/template.js +32 -0
- package/build-module/comments/edit/template.js.map +1 -0
- package/build-module/comments/index.js +19 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments/save.js +9 -4
- package/build-module/comments/save.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/edit/resizable-cover.js +6 -0
- package/build-module/cover/edit/resizable-cover.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/cover/transforms.js +3 -2
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -2
- package/build-module/embed/embed-placeholder.native.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 +17 -4
- 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/use-get-media.native.js +50 -0
- package/build-module/gallery/use-get-media.native.js.map +1 -0
- 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 +11 -2
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/transforms.js +5 -0
- package/build-module/group/transforms.js.map +1 -1
- package/build-module/group/variations.js +10 -10
- 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/deprecated.js +77 -9
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +19 -5
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +18 -8
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +29 -22
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +20 -8
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/save.js +9 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/index.js +1 -2
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +15 -9
- package/build-module/index.native.js.map +1 -1
- package/build-module/list/index.js +1 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/transforms.js +4 -63
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/v2/edit.js +15 -5
- package/build-module/list/v2/edit.js.map +1 -1
- package/build-module/list/v2/tag-name.js +21 -0
- package/build-module/list/v2/tag-name.js.map +1 -0
- package/build-module/list/v2/tag-name.native.js +21 -0
- package/build-module/list/v2/tag-name.native.js.map +1 -0
- package/build-module/list/v2/transforms.js +3 -39
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +18 -14
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +141 -0
- package/build-module/list-item/edit.native.js.map +1 -0
- package/build-module/list-item/hooks/index.js +2 -1
- 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/hooks/use-merge.js +160 -0
- package/build-module/list-item/hooks/use-merge.js.map +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js +82 -46
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/icons.native.js +37 -0
- package/build-module/list-item/icons.native.js.map +1 -0
- package/build-module/list-item/list-style-type.native.js +126 -0
- package/build-module/list-item/list-style-type.native.js.map +1 -0
- package/build-module/list-item/utils.js +123 -2
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +273 -19
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +4 -3
- package/build-module/media-text/edit.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/media-text/media-container.js +1 -1
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/save.js +13 -0
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/more/save.js +1 -6
- package/build-module/more/save.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 +178 -154
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +12 -15
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +4 -2
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +12 -3
- package/build-module/navigation/edit/responsive-wrapper.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/edit/use-create-navigation-menu.js +5 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build-module/navigation/edit/use-inner-blocks.js +33 -0
- package/build-module/navigation/edit/use-inner-blocks.js.map +1 -0
- package/build-module/navigation/edit/utils.js +21 -0
- package/build-module/navigation/edit/utils.js.map +1 -0
- 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 +15 -10
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +12 -13
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +7 -8
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +15 -3
- 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 +9 -12
- 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/edit.js +5 -2
- package/build-module/post-author/edit.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/edit.js +6 -1
- package/build-module/post-author-biography/edit.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-form/edit.js +5 -42
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +46 -5
- package/build-module/post-comments-form/form.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-content/edit.js +5 -3
- package/build-module/post-content/edit.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 +45 -16
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +21 -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/edit.js +3 -2
- package/build-module/post-terms/edit.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/index.js +42 -9
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +17 -12
- 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 +3 -3
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +2 -1
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +2 -1
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/query-title/edit.js +30 -9
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +11 -2
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/query-title/variations.js +10 -0
- package/build-module/query-title/variations.js.map +1 -1
- package/build-module/quote/deprecated.js +171 -37
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +77 -43
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -39
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/save.js +4 -8
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js +96 -158
- 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/edit.js +1 -1
- package/build-module/separator/edit.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/index.js +1 -0
- package/build-module/social-link/icons/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-link/icons/whatsapp.js +15 -0
- package/build-module/social-link/icons/whatsapp.js.map +1 -0
- package/build-module/social-link/variations.js +8 -1
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +3 -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/edit/index.js +24 -13
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +33 -15
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/search.js +84 -0
- package/build-module/template-part/edit/utils/search.js.map +1 -0
- 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 +7 -7
- package/build-style/button/style.css +7 -7
- package/build-style/comments/editor-rtl.css +122 -0
- package/build-style/comments/editor.css +122 -0
- package/build-style/{post-comments → comments}/style-rtl.css +1 -0
- package/build-style/{post-comments → comments}/style.css +1 -0
- package/build-style/common-rtl.css +7 -0
- package/build-style/common.css +7 -0
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/editor-elements-rtl.css +85 -0
- package/build-style/editor-elements.css +85 -0
- package/build-style/editor-rtl.css +266 -132
- package/build-style/editor.css +266 -132
- package/build-style/gallery/style-rtl.css +7 -2
- package/build-style/gallery/style.css +7 -2
- package/build-style/group/editor-rtl.css +27 -8
- package/build-style/group/editor.css +27 -8
- package/build-style/image/editor-rtl.css +25 -5
- package/build-style/image/editor.css +25 -5
- package/build-style/image/style-rtl.css +33 -3
- package/build-style/image/style.css +33 -3
- package/build-style/latest-posts/editor-rtl.css +3 -0
- package/build-style/latest-posts/editor.css +3 -0
- package/build-style/navigation/editor-rtl.css +8 -4
- package/build-style/navigation/editor.css +8 -4
- package/build-style/navigation/style-rtl.css +17 -19
- package/build-style/navigation/style.css +17 -19
- package/build-style/paragraph/editor-rtl.css +1 -1
- package/build-style/paragraph/editor.css +1 -1
- package/build-style/post-comments-form/style-rtl.css +0 -1
- package/build-style/post-comments-form/style.css +0 -1
- package/build-style/{post-comments/editor-rtl.css → post-date/style-rtl.css} +2 -2
- package/build-style/{post-comments/editor.css → post-date/style.css} +2 -2
- 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/editor-rtl.css +7 -0
- package/build-style/query/editor.css +7 -0
- package/build-style/query-pagination/style-rtl.css +6 -0
- package/build-style/query-pagination/style.css +6 -0
- package/build-style/query-title/style-rtl.css +79 -0
- package/build-style/query-title/style.css +79 -0
- package/build-style/search/style-rtl.css +2 -0
- package/build-style/search/style.css +2 -0
- package/build-style/site-logo/editor-rtl.css +3 -52
- package/build-style/site-logo/editor.css +3 -52
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/social-links/style-rtl.css +10 -2
- package/build-style/social-links/style.css +10 -2
- package/build-style/style-rtl.css +221 -162
- package/build-style/style.css +221 -162
- package/build-style/tag-cloud/style-rtl.css +1 -0
- package/build-style/tag-cloud/style.css +1 -0
- package/build-style/template-part/editor-rtl.css +14 -3
- package/build-style/template-part/editor.css +14 -3
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/package.json +30 -30
- package/src/archives/block.json +9 -1
- package/src/archives/edit.js +12 -1
- package/src/archives/index.php +5 -3
- package/src/audio/block.json +4 -0
- package/src/audio/style.scss +2 -0
- package/src/audio/test/__snapshots__/edit.native.js.snap +16 -2
- package/src/block/edit.js +4 -4
- package/src/block/edit.native.js +4 -4
- package/src/button/block.json +1 -1
- package/src/button/deprecated.js +21 -22
- package/src/button/edit.js +1 -0
- package/src/button/style.scss +9 -7
- package/src/buttons/edit.js +1 -5
- package/src/calendar/edit.js +11 -4
- 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 +11 -5
- 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 +19 -1
- package/src/comments/edit/comments-legacy.js +71 -0
- package/src/comments/edit/index.js +35 -0
- package/src/comments/edit/placeholder.js +124 -0
- package/src/comments/{edit.js → edit/template.js} +1 -28
- package/src/comments/editor.scss +9 -0
- package/src/comments/index.php +220 -0
- package/src/comments/save.js +8 -7
- package/src/{post-comments → comments}/style.scss +7 -0
- 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/common.scss +2 -0
- package/src/cover/block.json +13 -0
- package/src/cover/deprecated.js +11 -4
- package/src/cover/edit/resizable-cover.js +6 -0
- package/src/cover/index.php +2 -2
- package/src/cover/shared.js +2 -1
- package/src/cover/style.scss +2 -2
- package/src/cover/transforms.js +2 -2
- package/src/editor-elements.scss +10 -0
- package/src/editor.scss +2 -1
- package/src/embed/embed-placeholder.native.js +2 -3
- package/src/embed/icons.js +1 -1
- package/src/file/test/__snapshots__/edit.native.js.snap +32 -4
- package/src/gallery/block.json +5 -0
- package/src/gallery/deprecated.js +4 -2
- package/src/gallery/edit.js +26 -4
- package/src/gallery/style.scss +10 -1
- package/src/gallery/transforms.js +18 -5
- package/src/gallery/use-get-media.native.js +44 -0
- package/src/gallery/utils.js +11 -7
- package/src/group/block.json +11 -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/transforms.js +7 -0
- package/src/group/variations.js +6 -5
- package/src/heading/block.json +3 -1
- package/src/heading/deprecated.js +4 -2
- package/src/home-link/edit.js +19 -20
- package/src/home-link/index.php +8 -17
- package/src/image/block.json +20 -8
- package/src/image/deprecated.js +86 -0
- package/src/image/edit.js +25 -2
- package/src/image/edit.native.js +18 -7
- package/src/image/editor.scss +48 -7
- package/src/image/image.js +26 -16
- package/src/image/index.php +1 -1
- package/src/image/save.js +10 -1
- package/src/image/style.scss +39 -3
- package/src/image/test/edit.native.js +6 -10
- package/src/index.js +0 -2
- package/src/index.native.js +26 -17
- package/src/latest-posts/editor.scss +5 -0
- package/src/list/index.js +1 -1
- package/src/list/test/__snapshots__/edit.native.js.snap +133 -0
- package/src/list/test/edit.native.js +511 -7
- package/src/list/transforms.js +0 -47
- package/src/list/v2/edit.js +12 -4
- package/src/list/v2/tag-name.js +13 -0
- package/src/list/v2/tag-name.native.js +12 -0
- package/src/list/v2/transforms.js +3 -49
- package/src/list-item/edit.js +13 -14
- package/src/list-item/edit.native.js +148 -0
- package/src/list-item/hooks/index.js +2 -1
- package/src/list-item/hooks/use-copy.js +36 -0
- package/src/list-item/hooks/use-merge.js +141 -0
- package/src/list-item/hooks/use-outdent-list-item.js +72 -74
- package/src/list-item/icons.native.js +34 -0
- package/src/list-item/list-style-type.native.js +146 -0
- package/src/list-item/style.native.scss +49 -0
- package/src/list-item/utils.js +27 -3
- package/src/media-text/block.json +13 -0
- package/src/media-text/deprecated.js +584 -290
- package/src/media-text/edit.js +3 -1
- package/src/media-text/media-container.js +3 -1
- package/src/media-text/save.js +18 -0
- package/src/media-text/test/media-container.js +24 -0
- package/src/more/save.js +3 -6
- package/src/navigation/deprecated.js +4 -2
- package/src/navigation/edit/index.js +234 -237
- package/src/navigation/edit/navigation-menu-selector.js +12 -26
- package/src/navigation/edit/placeholder/index.js +4 -2
- package/src/navigation/edit/responsive-wrapper.js +24 -3
- 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/edit/use-create-navigation-menu.js +4 -0
- package/src/navigation/edit/use-inner-blocks.js +39 -0
- package/src/navigation/edit/utils.js +30 -0
- package/src/navigation/editor.scss +3 -2
- package/src/navigation/index.php +17 -16
- package/src/navigation/menu-items-to-blocks.js +3 -6
- package/src/navigation/style.scss +13 -22
- package/src/navigation/use-navigation-menu.js +20 -13
- package/src/navigation-link/edit.js +13 -16
- package/src/navigation-link/index.php +1 -1
- package/src/navigation-submenu/edit.js +10 -13
- package/src/navigation-submenu/index.php +1 -1
- package/src/page-list/edit.js +15 -2
- package/src/page-list/index.php +4 -4
- package/src/paragraph/block.json +5 -0
- package/src/paragraph/deprecated.js +33 -35
- package/src/paragraph/edit.js +9 -14
- package/src/paragraph/editor.scss +5 -3
- package/src/post-author/block.json +4 -2
- package/src/post-author/edit.js +6 -3
- package/src/post-author-biography/block.json +1 -0
- package/src/post-author-biography/edit.js +4 -1
- 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-form/edit.js +2 -71
- package/src/post-comments-form/form.js +80 -5
- package/src/post-comments-form/index.php +1 -1
- package/src/post-comments-form/style.scss +0 -1
- package/src/post-comments-link/block.json +4 -2
- package/src/post-content/edit.js +4 -4
- 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 +21 -0
- package/src/post-featured-image/edit.js +66 -14
- package/src/post-featured-image/editor.scss +44 -53
- package/src/post-featured-image/index.php +64 -5
- 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-terms/edit.js +3 -2
- package/src/post-title/block.json +2 -1
- package/src/post-title/index.php +2 -1
- package/src/post-title/style.scss +2 -0
- package/src/preformatted/block.json +4 -2
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +16 -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/index.js +129 -65
- package/src/query/edit/inspector-controls/taxonomy-controls.js +18 -11
- package/src/query/edit/query-placeholder.js +17 -2
- package/src/query/editor.scss +9 -0
- package/src/query/utils.js +29 -7
- package/src/query-no-results/edit.js +3 -6
- package/src/query-pagination/style.scss +14 -0
- package/src/query-pagination-next/edit.js +1 -0
- package/src/query-pagination-previous/edit.js +1 -0
- package/src/query-title/block.json +11 -2
- package/src/query-title/edit.js +51 -7
- package/src/query-title/index.php +28 -2
- package/src/query-title/style.scss +4 -0
- package/src/query-title/variations.js +13 -0
- package/src/quote/deprecated.js +215 -100
- package/src/quote/edit.js +77 -52
- package/src/quote/index.js +10 -33
- package/src/quote/save.js +5 -5
- package/src/quote/{v2/test → test}/migrate.js +2 -7
- package/src/quote/transforms.js +98 -146
- package/src/search/index.php +1 -1
- package/src/search/style.scss +2 -0
- package/src/search/test/__snapshots__/edit.native.js.snap +56 -7
- package/src/separator/block.json +1 -0
- package/src/separator/deprecated.js +2 -3
- package/src/separator/edit.js +1 -1
- package/src/separator/test/edit.js +5 -3
- package/src/site-logo/editor.scss +8 -66
- package/src/site-title/index.php +8 -9
- package/src/social-link/editor.scss +3 -0
- package/src/social-link/icons/index.js +1 -0
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/icons/whatsapp.js +10 -0
- package/src/social-link/index.php +6 -2
- package/src/social-link/socials-with-bg.scss +6 -1
- package/src/social-link/socials-without-bg.scss +6 -1
- package/src/social-link/variations.js +7 -0
- package/src/social-links/edit.js +2 -0
- package/src/spacer/block.json +7 -1
- package/src/style.scss +3 -2
- 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/tag-cloud/style.scss +1 -0
- package/src/template-part/edit/index.js +40 -27
- package/src/template-part/edit/selection-modal.js +68 -40
- package/src/template-part/edit/utils/search.js +76 -0
- package/src/template-part/editor.scss +21 -9
- package/src/template-part/index.js +3 -2
- package/src/template-part/index.php +56 -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/build/comments/edit.js.map +0 -1
- package/build/list-item/hooks/use-backspace.js +0 -59
- package/build/list-item/hooks/use-backspace.js.map +0 -1
- package/build/post-comments/edit.js +0 -184
- package/build/post-comments/edit.js.map +0 -1
- package/build/post-comments/index.js +0 -72
- package/build/post-comments/index.js.map +0 -1
- package/build/quote/v2/deprecated.js +0 -133
- package/build/quote/v2/deprecated.js.map +0 -1
- package/build/quote/v2/edit.js +0 -139
- package/build/quote/v2/edit.js.map +0 -1
- package/build/quote/v2/index.js +0 -49
- package/build/quote/v2/index.js.map +0 -1
- package/build/quote/v2/save.js +0 -43
- package/build/quote/v2/save.js.map +0 -1
- package/build/quote/v2/transforms.js +0 -156
- package/build/quote/v2/transforms.js.map +0 -1
- package/build-module/comments/edit.js +0 -59
- package/build-module/comments/edit.js.map +0 -1
- package/build-module/list-item/hooks/use-backspace.js +0 -44
- package/build-module/list-item/hooks/use-backspace.js.map +0 -1
- package/build-module/post-comments/edit.js +0 -171
- package/build-module/post-comments/edit.js.map +0 -1
- package/build-module/post-comments/index.js +0 -59
- package/build-module/post-comments/index.js.map +0 -1
- package/build-module/quote/v2/deprecated.js +0 -116
- package/build-module/quote/v2/deprecated.js.map +0 -1
- package/build-module/quote/v2/edit.js +0 -122
- package/build-module/quote/v2/edit.js.map +0 -1
- package/build-module/quote/v2/index.js +0 -33
- package/build-module/quote/v2/index.js.map +0 -1
- package/build-module/quote/v2/save.js +0 -30
- package/build-module/quote/v2/save.js.map +0 -1
- package/build-module/quote/v2/transforms.js +0 -147
- package/build-module/quote/v2/transforms.js.map +0 -1
- package/src/list-item/hooks/use-backspace.js +0 -51
- package/src/post-comments/block.json +0 -45
- package/src/post-comments/edit.js +0 -247
- package/src/post-comments/editor.scss +0 -3
- package/src/post-comments/index.js +0 -18
- package/src/post-comments/index.php +0 -87
- package/src/quote/v2/deprecated.js +0 -107
- package/src/quote/v2/edit.js +0 -139
- package/src/quote/v2/index.js +0 -36
- package/src/quote/v2/save.js +0 -26
- package/src/quote/v2/transforms.js +0 -155
|
@@ -6,13 +6,20 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { __ } from '@wordpress/i18n';
|
|
10
|
-
import {
|
|
9
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
10
|
+
import {
|
|
11
|
+
Warning,
|
|
12
|
+
store as blockEditorStore,
|
|
13
|
+
__experimentalGetElementClassName,
|
|
14
|
+
} from '@wordpress/block-editor';
|
|
15
|
+
import { Button } from '@wordpress/components';
|
|
11
16
|
import { useDisabled, useInstanceId } from '@wordpress/compose';
|
|
17
|
+
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
18
|
+
import { useSelect } from '@wordpress/data';
|
|
12
19
|
|
|
13
|
-
const
|
|
20
|
+
const CommentsFormPlaceholder = () => {
|
|
14
21
|
const disabledFormRef = useDisabled();
|
|
15
|
-
const instanceId = useInstanceId(
|
|
22
|
+
const instanceId = useInstanceId( CommentsFormPlaceholder );
|
|
16
23
|
|
|
17
24
|
return (
|
|
18
25
|
<div className="comment-respond">
|
|
@@ -34,7 +41,6 @@ const CommentsForm = () => {
|
|
|
34
41
|
name="submit"
|
|
35
42
|
type="submit"
|
|
36
43
|
className={ classnames(
|
|
37
|
-
'submit',
|
|
38
44
|
'wp-block-button__link',
|
|
39
45
|
__experimentalGetElementClassName( 'button' )
|
|
40
46
|
) }
|
|
@@ -47,4 +53,73 @@ const CommentsForm = () => {
|
|
|
47
53
|
);
|
|
48
54
|
};
|
|
49
55
|
|
|
56
|
+
const CommentsForm = ( { postId, postType } ) => {
|
|
57
|
+
const [ commentStatus, setCommentStatus ] = useEntityProp(
|
|
58
|
+
'postType',
|
|
59
|
+
postType,
|
|
60
|
+
'comment_status',
|
|
61
|
+
postId
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const isSiteEditor = postType === undefined || postId === undefined;
|
|
65
|
+
|
|
66
|
+
const { defaultCommentStatus } = useSelect(
|
|
67
|
+
( select ) =>
|
|
68
|
+
select( blockEditorStore ).getSettings()
|
|
69
|
+
.__experimentalDiscussionSettings
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const postTypeSupportsComments = useSelect( ( select ) =>
|
|
73
|
+
postType
|
|
74
|
+
? !! select( coreStore ).getPostType( postType )?.supports.comments
|
|
75
|
+
: false
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
if ( ! isSiteEditor && 'open' !== commentStatus ) {
|
|
79
|
+
if ( 'closed' === commentStatus ) {
|
|
80
|
+
const actions = [
|
|
81
|
+
<Button
|
|
82
|
+
key="enableComments"
|
|
83
|
+
onClick={ () => setCommentStatus( 'open' ) }
|
|
84
|
+
variant="primary"
|
|
85
|
+
>
|
|
86
|
+
{ _x(
|
|
87
|
+
'Enable comments',
|
|
88
|
+
'action that affects the current post'
|
|
89
|
+
) }
|
|
90
|
+
</Button>,
|
|
91
|
+
];
|
|
92
|
+
return (
|
|
93
|
+
<Warning actions={ actions }>
|
|
94
|
+
{ __(
|
|
95
|
+
'Post Comments Form block: Comments are not enabled for this item.'
|
|
96
|
+
) }
|
|
97
|
+
</Warning>
|
|
98
|
+
);
|
|
99
|
+
} else if ( ! postTypeSupportsComments ) {
|
|
100
|
+
return (
|
|
101
|
+
<Warning>
|
|
102
|
+
{ sprintf(
|
|
103
|
+
/* translators: 1: Post type (i.e. "post", "page") */
|
|
104
|
+
__(
|
|
105
|
+
'Post Comments Form block: Comments are not enabled for this post type (%s).'
|
|
106
|
+
),
|
|
107
|
+
postType
|
|
108
|
+
) }
|
|
109
|
+
</Warning>
|
|
110
|
+
);
|
|
111
|
+
} else if ( 'open' !== defaultCommentStatus ) {
|
|
112
|
+
return (
|
|
113
|
+
<Warning>
|
|
114
|
+
{ __(
|
|
115
|
+
'Post Comments Form block: Comments are not enabled.'
|
|
116
|
+
) }
|
|
117
|
+
</Warning>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return <CommentsFormPlaceholder />;
|
|
123
|
+
};
|
|
124
|
+
|
|
50
125
|
export default CommentsForm;
|
|
@@ -72,7 +72,7 @@ add_action( 'init', 'register_block_core_post_comments_form' );
|
|
|
72
72
|
*/
|
|
73
73
|
function post_comments_form_block_form_defaults( $fields ) {
|
|
74
74
|
if ( wp_is_block_theme() ) {
|
|
75
|
-
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="
|
|
75
|
+
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />';
|
|
76
76
|
$fields['submit_field'] = '<p class="form-submit wp-block-button">%1$s %2$s</p>';
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"typography": {
|
|
27
27
|
"fontSize": true,
|
|
28
28
|
"lineHeight": true,
|
|
29
|
-
"
|
|
29
|
+
"__experimentalFontFamily": true,
|
|
30
30
|
"__experimentalFontWeight": true,
|
|
31
|
-
"
|
|
31
|
+
"__experimentalFontStyle": true,
|
|
32
32
|
"__experimentalTextTransform": true,
|
|
33
|
+
"__experimentalTextDecoration": true,
|
|
34
|
+
"__experimentalLetterSpacing": true,
|
|
33
35
|
"__experimentalDefaultControls": {
|
|
34
36
|
"fontSize": true
|
|
35
37
|
}
|
package/src/post-content/edit.js
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
useBlockProps,
|
|
8
8
|
useInnerBlocksProps,
|
|
9
9
|
useSetting,
|
|
10
|
-
|
|
10
|
+
__experimentalRecursionProvider as RecursionProvider,
|
|
11
|
+
__experimentalUseHasRecursion as useHasRecursion,
|
|
11
12
|
store as blockEditorStore,
|
|
12
13
|
Warning,
|
|
13
14
|
} from '@wordpress/block-editor';
|
|
@@ -118,15 +119,14 @@ function RecursionError() {
|
|
|
118
119
|
export default function PostContentEdit( { context, attributes } ) {
|
|
119
120
|
const { postId: contextPostId, postType: contextPostType } = context;
|
|
120
121
|
const { layout = {} } = attributes;
|
|
121
|
-
const
|
|
122
|
-
useNoRecursiveRenders( contextPostId );
|
|
122
|
+
const hasAlreadyRendered = useHasRecursion( contextPostId );
|
|
123
123
|
|
|
124
124
|
if ( contextPostId && contextPostType && hasAlreadyRendered ) {
|
|
125
125
|
return <RecursionError />;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
return (
|
|
129
|
-
<RecursionProvider>
|
|
129
|
+
<RecursionProvider uniqueId={ contextPostId }>
|
|
130
130
|
{ contextPostId && contextPostType ? (
|
|
131
131
|
<Content context={ context } layout={ layout } />
|
|
132
132
|
) : (
|
package/src/post-date/block.json
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"isLink": {
|
|
17
17
|
"type": "boolean",
|
|
18
18
|
"default": false
|
|
19
|
+
},
|
|
20
|
+
"displayType": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "date"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"usesContext": [ "postId", "postType", "queryId" ],
|
|
@@ -30,6 +34,10 @@
|
|
|
30
34
|
"link": true
|
|
31
35
|
}
|
|
32
36
|
},
|
|
37
|
+
"spacing": {
|
|
38
|
+
"margin": true,
|
|
39
|
+
"padding": true
|
|
40
|
+
},
|
|
33
41
|
"typography": {
|
|
34
42
|
"fontSize": true,
|
|
35
43
|
"lineHeight": true,
|
|
@@ -37,6 +45,7 @@
|
|
|
37
45
|
"__experimentalFontWeight": true,
|
|
38
46
|
"__experimentalFontStyle": true,
|
|
39
47
|
"__experimentalTextTransform": true,
|
|
48
|
+
"__experimentalTextDecoration": true,
|
|
40
49
|
"__experimentalLetterSpacing": true,
|
|
41
50
|
"__experimentalDefaultControls": {
|
|
42
51
|
"fontSize": true
|
package/src/post-date/edit.js
CHANGED
|
@@ -33,7 +33,7 @@ import { DOWN } from '@wordpress/keycodes';
|
|
|
33
33
|
import { useSelect } from '@wordpress/data';
|
|
34
34
|
|
|
35
35
|
export default function PostDateEdit( {
|
|
36
|
-
attributes: { textAlign, format, isLink },
|
|
36
|
+
attributes: { textAlign, format, isLink, displayType },
|
|
37
37
|
context: { postId, postType: postTypeSlug, queryId },
|
|
38
38
|
setAttributes,
|
|
39
39
|
} ) {
|
|
@@ -58,9 +58,10 @@ export default function PostDateEdit( {
|
|
|
58
58
|
const [ date, setDate ] = useEntityProp(
|
|
59
59
|
'postType',
|
|
60
60
|
postTypeSlug,
|
|
61
|
-
|
|
61
|
+
displayType,
|
|
62
62
|
postId
|
|
63
63
|
);
|
|
64
|
+
|
|
64
65
|
const postType = useSelect(
|
|
65
66
|
( select ) =>
|
|
66
67
|
postTypeSlug
|
|
@@ -155,6 +156,15 @@ export default function PostDateEdit( {
|
|
|
155
156
|
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
156
157
|
checked={ isLink }
|
|
157
158
|
/>
|
|
159
|
+
<ToggleControl
|
|
160
|
+
label={ __( 'Display last modified date' ) }
|
|
161
|
+
onChange={ ( value ) =>
|
|
162
|
+
setAttributes( {
|
|
163
|
+
displayType: value ? 'modified' : 'date',
|
|
164
|
+
} )
|
|
165
|
+
}
|
|
166
|
+
checked={ displayType === 'modified' }
|
|
167
|
+
/>
|
|
158
168
|
</PanelBody>
|
|
159
169
|
</InspectorControls>
|
|
160
170
|
|
package/src/post-date/index.php
CHANGED
|
@@ -21,7 +21,15 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
21
21
|
$post_ID = $block->context['postId'];
|
|
22
22
|
$align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
|
|
23
23
|
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
if ( isset( $attributes['displayType'] ) && 'modified' === $attributes['displayType'] ) {
|
|
26
|
+
$formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
27
|
+
$unformatted_date = esc_attr( get_the_modified_date( 'c', $post_ID ) );
|
|
28
|
+
} else {
|
|
29
|
+
$formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
30
|
+
$unformatted_date = esc_attr( get_the_date( 'c', $post_ID ) );
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
|
26
34
|
$formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $post_ID ), $formatted_date );
|
|
27
35
|
}
|
|
@@ -29,7 +37,7 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
29
37
|
return sprintf(
|
|
30
38
|
'<div %1$s><time datetime="%2$s">%3$s</time></div>',
|
|
31
39
|
$wrapper_attributes,
|
|
32
|
-
|
|
40
|
+
$unformatted_date,
|
|
33
41
|
$formatted_date
|
|
34
42
|
);
|
|
35
43
|
}
|
|
@@ -23,6 +23,15 @@
|
|
|
23
23
|
},
|
|
24
24
|
"sizeSlug": {
|
|
25
25
|
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"rel": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"attribute": "rel",
|
|
30
|
+
"default": ""
|
|
31
|
+
},
|
|
32
|
+
"linkTarget": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": "_self"
|
|
26
35
|
}
|
|
27
36
|
},
|
|
28
37
|
"usesContext": [ "postId", "postType", "queryId" ],
|
|
@@ -33,6 +42,18 @@
|
|
|
33
42
|
"text": false,
|
|
34
43
|
"background": false
|
|
35
44
|
},
|
|
45
|
+
"__experimentalBorder": {
|
|
46
|
+
"color": true,
|
|
47
|
+
"radius": true,
|
|
48
|
+
"width": true,
|
|
49
|
+
"__experimentalSelector": "img, .block-editor-media-placeholder",
|
|
50
|
+
"__experimentalSkipSerialization": true,
|
|
51
|
+
"__experimentalDefaultControls": {
|
|
52
|
+
"color": true,
|
|
53
|
+
"radius": true,
|
|
54
|
+
"width": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
36
57
|
"html": false,
|
|
37
58
|
"spacing": {
|
|
38
59
|
"margin": true,
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -9,6 +14,7 @@ import {
|
|
|
9
14
|
PanelBody,
|
|
10
15
|
Placeholder,
|
|
11
16
|
Button,
|
|
17
|
+
TextControl,
|
|
12
18
|
} from '@wordpress/components';
|
|
13
19
|
import {
|
|
14
20
|
InspectorControls,
|
|
@@ -17,6 +23,7 @@ import {
|
|
|
17
23
|
MediaReplaceFlow,
|
|
18
24
|
useBlockProps,
|
|
19
25
|
store as blockEditorStore,
|
|
26
|
+
__experimentalUseBorderProps as useBorderProps,
|
|
20
27
|
} from '@wordpress/block-editor';
|
|
21
28
|
import { __, sprintf } from '@wordpress/i18n';
|
|
22
29
|
import { upload } from '@wordpress/icons';
|
|
@@ -29,17 +36,6 @@ import DimensionControls from './dimension-controls';
|
|
|
29
36
|
|
|
30
37
|
const ALLOWED_MEDIA_TYPES = [ 'image' ];
|
|
31
38
|
|
|
32
|
-
const placeholder = ( content ) => {
|
|
33
|
-
return (
|
|
34
|
-
<Placeholder
|
|
35
|
-
className="block-editor-media-placeholder"
|
|
36
|
-
withIllustration={ true }
|
|
37
|
-
>
|
|
38
|
-
{ content }
|
|
39
|
-
</Placeholder>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
39
|
function getMediaSourceUrlBySizeSlug( media, slug ) {
|
|
44
40
|
return (
|
|
45
41
|
media?.media_details?.sizes?.[ slug ]?.source_url || media?.source_url
|
|
@@ -53,7 +49,8 @@ function PostFeaturedImageDisplay( {
|
|
|
53
49
|
context: { postId, postType: postTypeSlug, queryId },
|
|
54
50
|
} ) {
|
|
55
51
|
const isDescendentOfQueryLoop = Number.isFinite( queryId );
|
|
56
|
-
const { isLink, height, width, scale, sizeSlug } =
|
|
52
|
+
const { isLink, height, width, scale, sizeSlug, rel, linkTarget } =
|
|
53
|
+
attributes;
|
|
57
54
|
const [ featuredImage, setFeaturedImage ] = useEntityProp(
|
|
58
55
|
'postType',
|
|
59
56
|
postTypeSlug,
|
|
@@ -93,6 +90,22 @@ function PostFeaturedImageDisplay( {
|
|
|
93
90
|
const blockProps = useBlockProps( {
|
|
94
91
|
style: { width, height },
|
|
95
92
|
} );
|
|
93
|
+
const borderProps = useBorderProps( attributes );
|
|
94
|
+
|
|
95
|
+
const placeholder = ( content ) => {
|
|
96
|
+
return (
|
|
97
|
+
<Placeholder
|
|
98
|
+
className={ classnames(
|
|
99
|
+
'block-editor-media-placeholder',
|
|
100
|
+
borderProps.className
|
|
101
|
+
) }
|
|
102
|
+
withIllustration={ true }
|
|
103
|
+
style={ borderProps.style }
|
|
104
|
+
>
|
|
105
|
+
{ content }
|
|
106
|
+
</Placeholder>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
96
109
|
|
|
97
110
|
const onSelectImage = ( value ) => {
|
|
98
111
|
if ( value?.id ) {
|
|
@@ -128,6 +141,26 @@ function PostFeaturedImageDisplay( {
|
|
|
128
141
|
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
129
142
|
checked={ isLink }
|
|
130
143
|
/>
|
|
144
|
+
{ isLink && (
|
|
145
|
+
<>
|
|
146
|
+
<ToggleControl
|
|
147
|
+
label={ __( 'Open in new tab' ) }
|
|
148
|
+
onChange={ ( value ) =>
|
|
149
|
+
setAttributes( {
|
|
150
|
+
linkTarget: value ? '_blank' : '_self',
|
|
151
|
+
} )
|
|
152
|
+
}
|
|
153
|
+
checked={ linkTarget === '_blank' }
|
|
154
|
+
/>
|
|
155
|
+
<TextControl
|
|
156
|
+
label={ __( 'Link rel' ) }
|
|
157
|
+
value={ rel }
|
|
158
|
+
onChange={ ( newRel ) =>
|
|
159
|
+
setAttributes( { rel: newRel } )
|
|
160
|
+
}
|
|
161
|
+
/>
|
|
162
|
+
</>
|
|
163
|
+
) }
|
|
131
164
|
</PanelBody>
|
|
132
165
|
</InspectorControls>
|
|
133
166
|
</>
|
|
@@ -143,6 +176,11 @@ function PostFeaturedImageDisplay( {
|
|
|
143
176
|
}
|
|
144
177
|
|
|
145
178
|
const label = __( 'Add a featured image' );
|
|
179
|
+
const imageStyles = {
|
|
180
|
+
...borderProps.style,
|
|
181
|
+
height,
|
|
182
|
+
objectFit: height && scale,
|
|
183
|
+
};
|
|
146
184
|
|
|
147
185
|
if ( ! featuredImage ) {
|
|
148
186
|
image = (
|
|
@@ -174,6 +212,7 @@ function PostFeaturedImageDisplay( {
|
|
|
174
212
|
placeholder()
|
|
175
213
|
) : (
|
|
176
214
|
<img
|
|
215
|
+
className={ borderProps.className }
|
|
177
216
|
src={ mediaUrl }
|
|
178
217
|
alt={
|
|
179
218
|
media.alt_text
|
|
@@ -184,7 +223,7 @@ function PostFeaturedImageDisplay( {
|
|
|
184
223
|
)
|
|
185
224
|
: __( 'Featured image' )
|
|
186
225
|
}
|
|
187
|
-
style={
|
|
226
|
+
style={ imageStyles }
|
|
188
227
|
/>
|
|
189
228
|
);
|
|
190
229
|
}
|
|
@@ -215,8 +254,21 @@ function PostFeaturedImageDisplay( {
|
|
|
215
254
|
|
|
216
255
|
export default function PostFeaturedImageEdit( props ) {
|
|
217
256
|
const blockProps = useBlockProps();
|
|
257
|
+
const borderProps = useBorderProps( props.attributes );
|
|
258
|
+
|
|
218
259
|
if ( ! props.context?.postId ) {
|
|
219
|
-
return
|
|
260
|
+
return (
|
|
261
|
+
<div { ...blockProps }>
|
|
262
|
+
<Placeholder
|
|
263
|
+
className={ classnames(
|
|
264
|
+
'block-editor-media-placeholder',
|
|
265
|
+
borderProps.className
|
|
266
|
+
) }
|
|
267
|
+
withIllustration={ true }
|
|
268
|
+
style={ borderProps.style }
|
|
269
|
+
/>
|
|
270
|
+
</div>
|
|
271
|
+
);
|
|
220
272
|
}
|
|
221
273
|
return <PostFeaturedImageDisplay { ...props } />;
|
|
222
274
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
// @todo: this
|
|
3
|
-
// to create a new component for placeholders meant to inherit some theme styles.
|
|
1
|
+
// Provide special styling for the placeholder.
|
|
2
|
+
// @todo: this particular minimal style of placeholder could be componentized further.
|
|
4
3
|
.wp-block-post-featured-image.wp-block-post-featured-image {
|
|
5
|
-
// Inherit border radius from style variations.
|
|
6
|
-
.components-placeholder,
|
|
7
|
-
.components-resizable-box__container {
|
|
8
|
-
border-radius: inherit;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
4
|
// Style the placeholder.
|
|
12
5
|
.wp-block-post-featured-image__placeholder,
|
|
13
6
|
.components-placeholder {
|
|
14
7
|
justify-content: center;
|
|
15
8
|
align-items: center;
|
|
16
|
-
box-shadow: none;
|
|
17
9
|
padding: 0;
|
|
18
10
|
|
|
19
11
|
// Hide the upload button, as it's also available in the media library.
|
|
@@ -21,32 +13,8 @@
|
|
|
21
13
|
display: none;
|
|
22
14
|
}
|
|
23
15
|
|
|
24
|
-
// Position the spinner.
|
|
25
|
-
.components-placeholder__preview {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: $grid-unit-05;
|
|
28
|
-
right: $grid-unit-05;
|
|
29
|
-
bottom: $grid-unit-05;
|
|
30
|
-
left: $grid-unit-05;
|
|
31
|
-
background: rgba($white, 0.8);
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Draw the dashed outline.
|
|
38
|
-
// By setting the dashed border to currentColor, we ensure it's visible
|
|
39
|
-
// against any background color.
|
|
40
|
-
color: currentColor;
|
|
41
|
-
background: transparent;
|
|
42
|
-
|
|
43
16
|
// Style the upload button.
|
|
44
|
-
.components-placeholder__fieldset {
|
|
45
|
-
width: auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
17
|
.components-button.components-button {
|
|
49
|
-
color: inherit;
|
|
50
18
|
padding: 0;
|
|
51
19
|
display: flex;
|
|
52
20
|
justify-content: center;
|
|
@@ -55,20 +23,53 @@
|
|
|
55
23
|
height: $grid-unit-60;
|
|
56
24
|
border-radius: 50%;
|
|
57
25
|
position: relative;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
background: transparent;
|
|
62
|
-
transition: all 0.1s linear;
|
|
63
|
-
@include reduce-motion("transition");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.components-button.components-button > svg {
|
|
26
|
+
background: var(--wp-admin-theme-color);
|
|
27
|
+
border-color: var(--wp-admin-theme-color);
|
|
28
|
+
border-style: solid;
|
|
67
29
|
color: $white;
|
|
30
|
+
|
|
31
|
+
> svg {
|
|
32
|
+
color: inherit;
|
|
33
|
+
}
|
|
68
34
|
}
|
|
69
35
|
|
|
70
36
|
// Show default placeholder height when not resized.
|
|
71
37
|
min-height: 200px;
|
|
38
|
+
|
|
39
|
+
// The following override the default placeholder styles that remove
|
|
40
|
+
// its border so that a user selection for border color or width displays
|
|
41
|
+
// a visual border.
|
|
42
|
+
&:where(.has-border-color) {
|
|
43
|
+
border-style: solid;
|
|
44
|
+
}
|
|
45
|
+
&:where([style*="border-top-color"]) {
|
|
46
|
+
border-top-style: solid;
|
|
47
|
+
}
|
|
48
|
+
&:where([style*="border-right-color"]) {
|
|
49
|
+
border-right-style: solid;
|
|
50
|
+
}
|
|
51
|
+
&:where([style*="border-bottom-color"]) {
|
|
52
|
+
border-bottom-style: solid;
|
|
53
|
+
}
|
|
54
|
+
&:where([style*="border-left-color"]) {
|
|
55
|
+
border-left-style: solid;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:where([style*="border-width"]) {
|
|
59
|
+
border-style: solid;
|
|
60
|
+
}
|
|
61
|
+
&:where([style*="border-top-width"]) {
|
|
62
|
+
border-top-style: solid;
|
|
63
|
+
}
|
|
64
|
+
&:where([style*="border-right-width"]) {
|
|
65
|
+
border-right-style: solid;
|
|
66
|
+
}
|
|
67
|
+
&:where([style*="border-bottom-width"]) {
|
|
68
|
+
border-bottom-style: solid;
|
|
69
|
+
}
|
|
70
|
+
&:where([style*="border-left-width"]) {
|
|
71
|
+
border-left-style: solid;
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
// Provide a minimum size for the placeholder when resized.
|
|
@@ -80,16 +81,6 @@
|
|
|
80
81
|
height: 100%;
|
|
81
82
|
width: 100%;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
-
// Show upload button on block selection.
|
|
85
|
-
&.is-selected .components-button.components-button {
|
|
86
|
-
background: var(--wp-admin-theme-color);
|
|
87
|
-
border-color: var(--wp-admin-theme-color);
|
|
88
|
-
border-style: solid;
|
|
89
|
-
color: $white;
|
|
90
|
-
opacity: 1;
|
|
91
|
-
visibility: visible;
|
|
92
|
-
}
|
|
93
84
|
}
|
|
94
85
|
|
|
95
86
|
div[data-type="core/post-featured-image"] {
|
|
@@ -19,17 +19,24 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
19
19
|
}
|
|
20
20
|
$post_ID = $block->context['postId'];
|
|
21
21
|
|
|
22
|
-
$is_link
|
|
23
|
-
$size_slug
|
|
24
|
-
$post_title
|
|
25
|
-
$attr
|
|
22
|
+
$is_link = isset( $attributes['isLink'] ) && $attributes['isLink'];
|
|
23
|
+
$size_slug = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail';
|
|
24
|
+
$post_title = trim( strip_tags( get_the_title( $post_ID ) ) );
|
|
25
|
+
$attr = get_block_core_post_featured_image_border_attributes( $attributes );
|
|
26
|
+
|
|
27
|
+
if ( $is_link ) {
|
|
28
|
+
$attr['alt'] = $post_title;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
$featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr );
|
|
27
32
|
if ( ! $featured_image ) {
|
|
28
33
|
return '';
|
|
29
34
|
}
|
|
30
35
|
$wrapper_attributes = get_block_wrapper_attributes();
|
|
31
36
|
if ( $is_link ) {
|
|
32
|
-
$
|
|
37
|
+
$link_target = $attributes['linkTarget'];
|
|
38
|
+
$rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
|
|
39
|
+
$featured_image = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $post_ID ), esc_attr( $link_target ), $rel, $featured_image );
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
$has_width = ! empty( $attributes['width'] );
|
|
@@ -53,6 +60,58 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
53
60
|
return "<figure $wrapper_attributes>$featured_image</figure>";
|
|
54
61
|
}
|
|
55
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Generates class names and styles to apply the border support styles for
|
|
65
|
+
* the Post Featured Image block.
|
|
66
|
+
*
|
|
67
|
+
* @param array $attributes The block attributes.
|
|
68
|
+
* @return array The border-related classnames and styles for the block.
|
|
69
|
+
*/
|
|
70
|
+
function get_block_core_post_featured_image_border_attributes( $attributes ) {
|
|
71
|
+
$border_styles = array();
|
|
72
|
+
$sides = array( 'top', 'right', 'bottom', 'left' );
|
|
73
|
+
|
|
74
|
+
// Border radius.
|
|
75
|
+
if ( isset( $attributes['style']['border']['radius'] ) ) {
|
|
76
|
+
$border_styles['radius'] = $attributes['style']['border']['radius'];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Border style.
|
|
80
|
+
if ( isset( $attributes['style']['border']['style'] ) ) {
|
|
81
|
+
$border_styles['style'] = $attributes['style']['border']['style'];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Border width.
|
|
85
|
+
if ( isset( $attributes['style']['border']['width'] ) ) {
|
|
86
|
+
$border_styles['width'] = $attributes['style']['border']['width'];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Border color.
|
|
90
|
+
$preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null;
|
|
91
|
+
$custom_color = _wp_array_get( $attributes, array( 'style', 'border', 'color' ), null );
|
|
92
|
+
$border_styles['color'] = $preset_color ? $preset_color : $custom_color;
|
|
93
|
+
|
|
94
|
+
// Individual border styles e.g. top, left etc.
|
|
95
|
+
foreach ( $sides as $side ) {
|
|
96
|
+
$border = _wp_array_get( $attributes, array( 'style', 'border', $side ), null );
|
|
97
|
+
$border_styles[ $side ] = array(
|
|
98
|
+
'color' => isset( $border['color'] ) ? $border['color'] : null,
|
|
99
|
+
'style' => isset( $border['style'] ) ? $border['style'] : null,
|
|
100
|
+
'width' => isset( $border['width'] ) ? $border['width'] : null,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
$styles = gutenberg_style_engine_get_styles( array( 'border' => $border_styles ) );
|
|
105
|
+
$attributes = array();
|
|
106
|
+
if ( ! empty( $styles['classnames'] ) ) {
|
|
107
|
+
$attributes['class'] = $styles['classnames'];
|
|
108
|
+
}
|
|
109
|
+
if ( ! empty( $styles['css'] ) ) {
|
|
110
|
+
$attributes['style'] = $styles['css'];
|
|
111
|
+
}
|
|
112
|
+
return $attributes;
|
|
113
|
+
}
|
|
114
|
+
|
|
56
115
|
/**
|
|
57
116
|
* Registers the `core/post-featured-image` block on the server.
|
|
58
117
|
*/
|