@wordpress/block-library 6.0.25 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +1 -1
- package/build/archives/index.js +1 -0
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.js +19 -4
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +1 -0
- package/build/audio/index.js.map +1 -1
- package/build/block/index.js +1 -0
- package/build/block/index.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +6 -0
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js +16 -6
- package/build/buttons/edit.native.js.map +1 -1
- package/build/buttons/index.js +1 -0
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/transforms.js +1 -0
- package/build/buttons/transforms.js.map +1 -1
- package/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +6 -1
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +1 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +11 -0
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/edit.js +5 -2
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +7 -2
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +1 -0
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +1 -0
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +2 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +1 -0
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +117 -26
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/index.js +4 -2
- package/build/comment-template/index.js.map +1 -1
- package/build/comment-template/util.js +68 -0
- package/build/comment-template/util.js.map +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js +39 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build/comments-pagination/edit.js +79 -0
- package/build/comments-pagination/edit.js.map +1 -0
- package/build/comments-pagination/index.js +71 -0
- package/build/comments-pagination/index.js.map +1 -0
- package/build/comments-pagination/save.js +18 -0
- package/build/comments-pagination/save.js.map +1 -0
- package/build/comments-pagination-next/edit.js +54 -0
- package/build/comments-pagination-next/edit.js.map +1 -0
- package/build/comments-pagination-next/index.js +66 -0
- package/build/comments-pagination-next/index.js.map +1 -0
- package/build/comments-pagination-numbers/edit.js +47 -0
- package/build/comments-pagination-numbers/edit.js.map +1 -0
- package/build/comments-pagination-numbers/index.js +46 -0
- package/build/comments-pagination-numbers/index.js.map +1 -0
- package/build/comments-pagination-previous/edit.js +54 -0
- package/build/comments-pagination-previous/edit.js.map +1 -0
- package/build/comments-pagination-previous/index.js +66 -0
- package/build/comments-pagination-previous/index.js.map +1 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js +102 -0
- package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build/comments-query-loop/edit.js +23 -28
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +15 -7
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/edit.js +2 -1
- package/build/cover/edit.js.map +1 -1
- package/build/cover/edit.native.js +40 -32
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/overlay-color-settings.native.js +11 -1
- package/build/cover/overlay-color-settings.native.js.map +1 -1
- package/build/embed/deprecated.js +1 -0
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.native.js +23 -20
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js +69 -0
- package/build/embed/embed-controls.native.js.map +1 -0
- package/build/embed/embed-link-settings.native.js +101 -0
- package/build/embed/embed-link-settings.native.js.map +1 -0
- package/build/embed/embed-loading.js +1 -3
- package/build/embed/embed-loading.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +9 -2
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/index.js +1 -0
- package/build/embed/index.js.map +1 -1
- package/build/embed/transforms.js +1 -0
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +1 -0
- package/build/embed/util.js.map +1 -1
- package/build/file/edit.native.js +5 -2
- package/build/file/edit.native.js.map +1 -1
- package/build/file/index.js +1 -0
- package/build/file/index.js.map +1 -1
- package/build/freeform/index.js +1 -0
- package/build/freeform/index.js.map +1 -1
- package/build/gallery/deprecated.js +4 -0
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +31 -12
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +1 -0
- package/build/gallery/index.js.map +1 -1
- package/build/group/index.js +19 -1
- package/build/group/index.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +1 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +1 -0
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/index.js +1 -0
- package/build/home-link/index.js.map +1 -1
- package/build/html/index.js +1 -0
- package/build/html/index.js.map +1 -1
- package/build/image/edit.js +56 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +4 -4
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +15 -4
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +5 -1
- package/build/image/index.js.map +1 -1
- package/build/index.js +12 -2
- package/build/index.js.map +1 -1
- package/build/latest-comments/index.js +1 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +1 -0
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/edit.js +1 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/index.js +1 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/index.js +1 -0
- package/build/list/index.js.map +1 -1
- package/build/loginout/index.js +1 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/index.js +1 -0
- package/build/media-text/index.js.map +1 -1
- package/build/missing/index.js +1 -0
- package/build/missing/index.js.map +1 -1
- package/build/more/index.js +1 -0
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +37 -9
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +3 -1
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +36 -0
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build/navigation/edit/placeholder/index.js +11 -7
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +11 -22
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/index.js +10 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +4 -1
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-navigation-entities.js +6 -3
- package/build/navigation/use-navigation-entities.js.map +1 -1
- package/build/navigation-area/edit.js +2 -1
- package/build/navigation-area/edit.js.map +1 -1
- package/build/navigation-area/index.js +2 -1
- package/build/navigation-area/index.js.map +1 -1
- package/build/navigation-link/edit.js +7 -0
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +1 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +1 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/nextpage/index.js +1 -0
- package/build/nextpage/index.js.map +1 -1
- package/build/page-list/edit.js +37 -10
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +6 -1
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +12 -2
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +2 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +2 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/index.js +1 -0
- package/build/pattern/index.js.map +1 -1
- package/build/post-author/index.js +2 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-name/edit.js +98 -0
- package/build/post-author-name/edit.js.map +1 -0
- package/build/post-author-name/index.js +70 -0
- package/build/post-author-name/index.js.map +1 -0
- package/build/post-comment/index.js +1 -0
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/index.js +1 -0
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +1 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +1 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +1 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +2 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +4 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-excerpt/transforms.js +27 -0
- package/build/post-excerpt/transforms.js.map +1 -0
- package/build/post-featured-image/dimension-controls.js +74 -32
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +52 -20
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +4 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +1 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +34 -7
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +2 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +1 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.native.js +3 -6
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +1 -0
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +8 -1
- package/build/pullquote/index.js.map +1 -1
- package/build/query/deprecated.js +96 -3
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +4 -4
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +102 -0
- package/build/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build/query/edit/inspector-controls/index.js +166 -0
- package/build/query/edit/inspector-controls/index.js.map +1 -0
- package/build/query/edit/inspector-controls/order-control.js +55 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js +158 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build/query/index.js +3 -3
- package/build/query/utils.js +49 -38
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +0 -4
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination/index.js +2 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +2 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +2 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +2 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -0
- package/build/quote/index.js.map +1 -1
- package/build/rss/index.js +1 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +5 -3
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/search/index.js +8 -1
- package/build/search/index.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.js.map +1 -1
- package/build/shortcode/index.js +1 -0
- package/build/shortcode/index.js.map +1 -1
- package/build/site-logo/edit.js +0 -25
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +5 -1
- package/build/site-logo/index.js.map +1 -1
- package/build/site-logo/transforms.js +31 -0
- package/build/site-logo/transforms.js.map +1 -0
- package/build/site-tagline/index.js +2 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +4 -0
- package/build/site-title/index.js.map +1 -1
- package/build/site-title/transforms.js +31 -0
- package/build/site-title/transforms.js.map +1 -0
- package/build/social-link/index.js +2 -1
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/edit.js +29 -23
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +2 -1
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/controls.js +111 -0
- package/build/spacer/controls.js.map +1 -0
- package/build/spacer/controls.native.js +95 -0
- package/build/spacer/controls.native.js.map +1 -0
- package/build/spacer/deprecated.js +53 -0
- package/build/spacer/deprecated.js.map +1 -0
- package/build/spacer/edit.js +117 -98
- package/build/spacer/edit.js.map +1 -1
- package/build/spacer/edit.native.js +76 -0
- package/build/spacer/edit.native.js.map +1 -0
- package/build/spacer/index.js +8 -4
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/save.js +6 -3
- package/build/spacer/save.js.map +1 -1
- package/build/table/index.js +7 -1
- package/build/table/index.js.map +1 -1
- package/build/table-of-contents/index.js +1 -0
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +1 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/index.js +1 -0
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +1 -0
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/index.js +1 -0
- package/build/text-columns/index.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +1 -0
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +1 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/edit.js +17 -5
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +1 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/block/index.js +1 -0
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +6 -0
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js +17 -7
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/buttons/index.js +1 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/transforms.js +1 -0
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +6 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +1 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +11 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +6 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +7 -2
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +1 -0
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +1 -0
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +2 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +1 -0
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +116 -26
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/index.js +4 -2
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comment-template/util.js +59 -0
- package/build-module/comment-template/util.js.map +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +30 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
- package/build-module/comments-pagination/edit.js +66 -0
- package/build-module/comments-pagination/edit.js.map +1 -0
- package/build-module/comments-pagination/index.js +57 -0
- package/build-module/comments-pagination/index.js.map +1 -0
- package/build-module/comments-pagination/save.js +10 -0
- package/build-module/comments-pagination/save.js.map +1 -0
- package/build-module/comments-pagination-next/edit.js +41 -0
- package/build-module/comments-pagination-next/edit.js.map +1 -0
- package/build-module/comments-pagination-next/index.js +53 -0
- package/build-module/comments-pagination-next/index.js.map +1 -0
- package/build-module/comments-pagination-numbers/edit.js +40 -0
- package/build-module/comments-pagination-numbers/edit.js.map +1 -0
- package/build-module/comments-pagination-numbers/index.js +33 -0
- package/build-module/comments-pagination-numbers/index.js.map +1 -0
- package/build-module/comments-pagination-previous/edit.js +41 -0
- package/build-module/comments-pagination-previous/edit.js.map +1 -0
- package/build-module/comments-pagination-previous/index.js +53 -0
- package/build-module/comments-pagination-previous/index.js.map +1 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js +91 -0
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +24 -28
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +15 -7
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/edit.js +2 -1
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/edit.native.js +41 -34
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/overlay-color-settings.native.js +11 -1
- package/build-module/cover/overlay-color-settings.native.js.map +1 -1
- package/build-module/embed/deprecated.js +1 -0
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.native.js +24 -21
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js +54 -0
- package/build-module/embed/embed-controls.native.js.map +1 -0
- package/build-module/embed/embed-link-settings.native.js +90 -0
- package/build-module/embed/embed-link-settings.native.js.map +1 -0
- package/build-module/embed/embed-loading.js +1 -2
- package/build-module/embed/embed-loading.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +9 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/index.js +1 -0
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/transforms.js +1 -0
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +1 -0
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/edit.native.js +4 -2
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/index.js +1 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/freeform/index.js +1 -0
- package/build-module/freeform/index.js.map +1 -1
- package/build-module/gallery/deprecated.js +4 -0
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +32 -13
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +1 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/group/index.js +19 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/edit.js +3 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +1 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +1 -0
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/index.js +1 -0
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/html/index.js +1 -0
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/edit.js +52 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +4 -4
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +16 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +5 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.js +7 -2
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/index.js +1 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +1 -0
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/index.js +1 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/index.js +1 -0
- package/build-module/list/index.js.map +1 -1
- package/build-module/loginout/index.js +1 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/index.js +1 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/missing/index.js +1 -0
- package/build-module/missing/index.js.map +1 -1
- package/build-module/more/index.js +1 -0
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +36 -9
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +3 -1
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +28 -0
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -0
- package/build-module/navigation/edit/placeholder/index.js +11 -7
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +10 -21
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/index.js +10 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +4 -1
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-navigation-entities.js +6 -3
- package/build-module/navigation/use-navigation-entities.js.map +1 -1
- package/build-module/navigation-area/edit.js +2 -1
- package/build-module/navigation-area/edit.js.map +1 -1
- package/build-module/navigation-area/index.js +2 -1
- package/build-module/navigation-area/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +7 -0
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +1 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +1 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/nextpage/index.js +1 -0
- package/build-module/nextpage/index.js.map +1 -1
- package/build-module/page-list/edit.js +38 -11
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +6 -1
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +13 -3
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +2 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +2 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/index.js +1 -0
- package/build-module/pattern/index.js.map +1 -1
- package/build-module/post-author/index.js +2 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-name/edit.js +85 -0
- package/build-module/post-author-name/edit.js.map +1 -0
- package/build-module/post-author-name/index.js +61 -0
- package/build-module/post-author-name/index.js.map +1 -0
- package/build-module/post-comment/index.js +1 -0
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comments/index.js +1 -0
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +1 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +1 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +1 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +2 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +3 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-excerpt/transforms.js +18 -0
- package/build-module/post-excerpt/transforms.js.map +1 -0
- package/build-module/post-featured-image/dimension-controls.js +76 -31
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +54 -22
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +4 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +1 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +34 -7
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +2 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +1 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +1 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.native.js +3 -3
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +1 -0
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +8 -1
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/deprecated.js +95 -4
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +3 -3
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +89 -0
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/index.js +149 -0
- package/build-module/query/edit/inspector-controls/index.js.map +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js +45 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +145 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
- package/build-module/query/index.js +3 -3
- package/build-module/query/utils.js +43 -35
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +0 -4
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination/index.js +2 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +2 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +2 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +2 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/rss/index.js +1 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +5 -3
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/search/index.js +8 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/separator/index.js +1 -0
- package/build-module/separator/index.js.map +1 -1
- package/build-module/shortcode/index.js +1 -0
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/site-logo/edit.js +0 -25
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +4 -1
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-logo/transforms.js +22 -0
- package/build-module/site-logo/transforms.js.map +1 -0
- package/build-module/site-tagline/index.js +2 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +3 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/site-title/transforms.js +22 -0
- package/build-module/site-title/transforms.js.map +1 -0
- package/build-module/social-link/index.js +2 -1
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/edit.js +29 -23
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +2 -1
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/controls.js +101 -0
- package/build-module/spacer/controls.js.map +1 -0
- package/build-module/spacer/controls.native.js +82 -0
- package/build-module/spacer/controls.native.js.map +1 -0
- package/build-module/spacer/deprecated.js +44 -0
- package/build-module/spacer/deprecated.js.map +1 -0
- package/build-module/spacer/edit.js +114 -95
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/spacer/edit.native.js +61 -0
- package/build-module/spacer/edit.native.js.map +1 -0
- package/build-module/spacer/index.js +7 -4
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/save.js +6 -3
- package/build-module/spacer/save.js.map +1 -1
- package/build-module/table/index.js +7 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table-of-contents/index.js +1 -0
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/index.js +1 -0
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +1 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/index.js +1 -0
- package/build-module/text-columns/index.js.map +1 -1
- package/build-module/verse/index.js +1 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/index.js +1 -0
- package/build-module/video/index.js.map +1 -1
- package/build-style/audio/editor-rtl.css +11 -0
- package/build-style/audio/editor.css +11 -0
- package/build-style/code/theme-rtl.css +5 -3
- package/build-style/code/theme.css +5 -3
- package/build-style/columns/editor-rtl.css +0 -10
- package/build-style/columns/editor.css +0 -10
- package/build-style/columns/style-rtl.css +8 -21
- package/build-style/columns/style.css +8 -21
- package/build-style/comment-template/style-rtl.css +91 -0
- package/build-style/comment-template/style.css +91 -0
- package/build-style/{home-link/style.css → comments-pagination/editor-rtl.css} +18 -22
- package/build-style/comments-pagination/editor.css +102 -0
- package/build-style/{home-link → comments-pagination}/style-rtl.css +21 -21
- package/build-style/comments-pagination/style.css +106 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +85 -0
- package/build-style/comments-pagination-numbers/editor.css +86 -0
- package/build-style/comments-query-loop/editor-rtl.css +79 -0
- package/build-style/comments-query-loop/editor.css +79 -0
- package/build-style/common-rtl.css +19 -0
- package/build-style/common.css +19 -0
- package/build-style/cover/style-rtl.css +4 -0
- package/build-style/cover/style.css +4 -0
- package/build-style/editor-rtl.css +96 -58
- package/build-style/editor.css +99 -58
- package/build-style/embed/editor-rtl.css +0 -12
- package/build-style/embed/editor.css +0 -12
- package/build-style/gallery/editor-rtl.css +7 -18
- package/build-style/gallery/editor.css +7 -18
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/group/theme-rtl.css +1 -1
- package/build-style/group/theme.css +1 -1
- package/build-style/latest-posts/editor-rtl.css +7 -0
- package/build-style/latest-posts/editor.css +7 -0
- package/build-style/latest-posts/style-rtl.css +0 -9
- package/build-style/latest-posts/style.css +0 -9
- package/build-style/navigation/editor-rtl.css +16 -2
- package/build-style/navigation/editor.css +16 -2
- package/build-style/navigation/style-rtl.css +18 -7
- package/build-style/navigation/style.css +18 -7
- package/build-style/page-list/editor-rtl.css +9 -5
- package/build-style/page-list/editor.css +9 -5
- package/build-style/post-comments/style-rtl.css +9 -4
- package/build-style/post-comments/style.css +9 -4
- package/build-style/post-featured-image/editor-rtl.css +0 -7
- package/build-style/post-featured-image/editor.css +0 -7
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/post-template/style-rtl.css +4 -0
- package/build-style/post-template/style.css +4 -0
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/pullquote/style-rtl.css +1 -0
- package/build-style/pullquote/style.css +1 -0
- package/build-style/query-pagination/editor-rtl.css +0 -4
- package/build-style/query-pagination/editor.css +0 -4
- package/build-style/social-links/editor-rtl.css +3 -0
- package/build-style/social-links/editor.css +3 -0
- package/build-style/social-links/style-rtl.css +1 -0
- package/build-style/social-links/style.css +1 -0
- package/build-style/spacer/editor-rtl.css +4 -0
- package/build-style/spacer/editor.css +4 -0
- package/build-style/style-rtl.css +141 -87
- package/build-style/style.css +143 -87
- package/build-style/table/style-rtl.css +1 -0
- package/build-style/table/style.css +1 -0
- package/build-style/tag-cloud/style-rtl.css +8 -0
- package/build-style/tag-cloud/style.css +8 -0
- package/build-style/theme-rtl.css +6 -4
- package/build-style/theme.css +6 -4
- package/package.json +30 -30
- package/src/archives/block.json +1 -0
- package/src/archives/index.php +5 -9
- package/src/audio/block.json +1 -0
- package/src/audio/edit.js +18 -2
- package/src/audio/editor.scss +14 -0
- package/src/audio/test/__snapshots__/edit.native.js.snap +22 -0
- package/src/audio/test/edit.native.js +24 -11
- package/src/block/block.json +1 -0
- package/src/block/index.php +7 -2
- package/src/block/test/edit.native.js +10 -12
- package/src/button/block.json +5 -1
- package/src/button/edit.native.js +1 -1
- package/src/buttons/block.json +2 -1
- package/src/buttons/edit.js +17 -0
- package/src/buttons/edit.native.js +17 -5
- package/src/buttons/test/__snapshots__/edit.native.js.snap +27 -0
- package/src/buttons/test/edit.native.js +75 -45
- package/src/calendar/block.json +1 -0
- package/src/calendar/index.php +35 -39
- package/src/categories/block.json +1 -0
- package/src/categories/index.php +1 -1
- package/src/code/block.json +6 -1
- package/src/code/theme.scss +6 -4
- package/src/column/block.json +1 -0
- package/src/columns/block.json +11 -0
- package/src/columns/editor.scss +0 -15
- package/src/columns/style.scss +15 -36
- package/src/comment-author-avatar/block.json +7 -2
- package/src/comment-author-avatar/edit.js +9 -2
- package/src/comment-author-avatar/index.php +25 -6
- package/src/comment-author-name/block.json +1 -0
- package/src/comment-content/block.json +1 -0
- package/src/comment-date/block.json +1 -0
- package/src/comment-date/index.php +2 -2
- package/src/comment-edit-link/block.json +1 -0
- package/src/comment-edit-link/index.js +1 -1
- package/src/comment-reply-link/block.json +1 -0
- package/src/comment-template/block.json +4 -2
- package/src/comment-template/edit.js +127 -42
- package/src/comment-template/index.php +46 -19
- package/src/comment-template/style.scss +17 -0
- package/src/comment-template/test/index.js +45 -0
- package/src/comment-template/util.js +56 -0
- package/src/comments-pagination/block.json +37 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
- package/src/comments-pagination/edit.js +83 -0
- package/src/comments-pagination/editor.scss +34 -0
- package/src/comments-pagination/index.js +20 -0
- package/src/comments-pagination/index.php +39 -0
- package/src/comments-pagination/save.js +8 -0
- package/src/comments-pagination/style.scss +38 -0
- package/src/comments-pagination-next/block.json +35 -0
- package/src/comments-pagination-next/edit.js +44 -0
- package/src/comments-pagination-next/index.js +18 -0
- package/src/comments-pagination-next/index.php +62 -0
- package/src/comments-pagination-numbers/block.json +15 -0
- package/src/comments-pagination-numbers/edit.js +22 -0
- package/src/comments-pagination-numbers/editor.scss +12 -0
- package/src/comments-pagination-numbers/index.js +18 -0
- package/src/comments-pagination-numbers/index.php +69 -0
- package/src/comments-pagination-previous/block.json +35 -0
- package/src/comments-pagination-previous/edit.js +44 -0
- package/src/comments-pagination-previous/index.js +18 -0
- package/src/comments-pagination-previous/index.php +52 -0
- package/src/comments-query-loop/block.json +15 -7
- package/src/comments-query-loop/edit/comments-inspector-controls.js +93 -0
- package/src/comments-query-loop/edit.js +22 -27
- package/src/comments-query-loop/editor.scss +3 -0
- package/src/common.scss +19 -0
- package/src/cover/block.json +1 -0
- package/src/cover/edit.js +1 -0
- package/src/cover/edit.native.js +35 -19
- package/src/cover/overlay-color-settings.native.js +10 -0
- package/src/cover/style.scss +4 -0
- package/src/cover/test/__snapshots__/edit.native.js.snap +33 -0
- package/src/cover/test/edit.native.js +280 -17
- package/src/editor.scss +3 -0
- package/src/embed/block.json +1 -0
- package/src/embed/edit.native.js +23 -18
- package/src/embed/editor.scss +0 -15
- package/src/embed/embed-controls.native.js +65 -0
- package/src/embed/embed-link-settings.native.js +100 -0
- package/src/embed/embed-loading.js +0 -2
- package/src/embed/embed-placeholder.native.js +8 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +10 -0
- package/src/embed/test/index.native.js +236 -95
- package/src/file/block.json +1 -0
- package/src/file/edit.native.js +6 -2
- package/src/file/index.php +2 -2
- package/src/file/test/__snapshots__/edit.native.js.snap +18 -5
- package/src/file/test/edit.native.js +30 -12
- package/src/freeform/block.json +1 -0
- package/src/gallery/block.json +1 -0
- package/src/gallery/deprecated.js +4 -0
- package/src/gallery/edit.js +42 -11
- package/src/gallery/editor.scss +8 -22
- package/src/gallery/gallery.native.js +1 -1
- package/src/gallery/style.scss +4 -0
- package/src/gallery/test/use-get-new-images.js +93 -0
- package/src/group/block.json +19 -1
- package/src/group/theme.scss +4 -5
- package/src/heading/block.json +1 -0
- package/src/heading/edit.js +2 -1
- package/src/home-link/block.json +1 -0
- package/src/home-link/index.php +3 -3
- package/src/html/block.json +1 -0
- package/src/image/block.json +5 -1
- package/src/image/edit.js +44 -0
- package/src/image/edit.native.js +4 -4
- package/src/image/image.js +14 -3
- package/src/image/index.php +2 -2
- package/src/image/test/edit.native.js +27 -7
- package/src/index.js +10 -0
- package/src/latest-comments/block.json +1 -0
- package/src/latest-comments/index.php +5 -5
- package/src/latest-posts/block.json +1 -0
- package/src/latest-posts/edit.js +1 -1
- package/src/latest-posts/editor.scss +10 -0
- package/src/latest-posts/index.php +14 -12
- package/src/latest-posts/style.scss +0 -12
- package/src/list/block.json +1 -0
- package/src/list/test/edit.native.js +3 -3
- package/src/loginout/block.json +1 -0
- package/src/media-text/block.json +1 -0
- package/src/missing/block.json +1 -0
- package/src/missing/test/__snapshots__/edit.native.js.snap +5 -0
- package/src/missing/test/edit-integration.native.js +2 -2
- package/src/missing/test/edit.native.js +26 -30
- package/src/more/block.json +1 -0
- package/src/navigation/README.md +13 -0
- package/src/navigation/block.json +12 -10
- package/src/navigation/edit/index.js +71 -21
- package/src/navigation/edit/inner-blocks.js +3 -1
- package/src/navigation/edit/overlay-menu-icon.js +21 -0
- package/src/navigation/edit/placeholder/index.js +20 -9
- package/src/navigation/edit/responsive-wrapper.js +12 -13
- package/src/navigation/editor.scss +18 -3
- package/src/navigation/index.php +17 -10
- package/src/navigation/menu-items-to-blocks.js +2 -1
- package/src/navigation/style.scss +24 -7
- package/src/navigation/use-navigation-entities.js +3 -1
- package/src/navigation-area/block.json +3 -7
- package/src/navigation-area/edit.js +2 -1
- package/src/navigation-link/block.json +2 -3
- package/src/navigation-link/edit.js +5 -0
- package/src/navigation-link/index.php +3 -3
- package/src/navigation-submenu/block.json +2 -3
- package/src/navigation-submenu/edit.js +3 -1
- package/src/navigation-submenu/index.php +7 -7
- package/src/nextpage/block.json +1 -0
- package/src/page-list/block.json +4 -0
- package/src/page-list/edit.js +47 -9
- package/src/page-list/editor.scss +8 -5
- package/src/page-list/index.php +15 -10
- package/src/paragraph/block.json +2 -1
- package/src/paragraph/edit.js +12 -4
- package/src/paragraph/test/edit.native.js +4 -13
- package/src/pattern/block.json +1 -0
- package/src/post-author/block.json +2 -1
- package/src/post-author/index.php +1 -1
- package/src/post-author-name/block.json +43 -0
- package/src/post-author-name/edit.js +95 -0
- package/src/post-author-name/index.js +18 -0
- package/src/post-author-name/index.php +49 -0
- package/src/post-comment/block.json +1 -0
- package/src/post-comments/block.json +1 -0
- package/src/post-comments/style.scss +10 -4
- package/src/post-comments-count/block.json +1 -0
- package/src/post-comments-form/block.json +6 -1
- package/src/post-comments-link/block.json +1 -0
- package/src/post-comments-link/index.php +7 -7
- package/src/post-content/block.json +1 -0
- package/src/post-content/index.php +1 -1
- package/src/post-date/block.json +1 -0
- package/src/post-date/index.php +2 -2
- package/src/post-excerpt/block.json +1 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.js +2 -0
- package/src/post-excerpt/index.php +1 -1
- package/src/post-excerpt/transforms.js +23 -0
- package/src/post-featured-image/block.json +4 -0
- package/src/post-featured-image/dimension-controls.js +103 -51
- package/src/post-featured-image/edit.js +61 -22
- package/src/post-featured-image/editor.scss +0 -8
- package/src/post-featured-image/index.php +3 -2
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +1 -0
- package/src/post-navigation-link/index.php +4 -4
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +27 -7
- package/src/post-template/index.php +2 -2
- package/src/post-template/style.scss +5 -0
- package/src/post-terms/block.json +1 -0
- package/src/post-terms/index.php +1 -1
- package/src/post-title/block.json +1 -0
- package/src/post-title/index.php +1 -1
- package/src/post-title/style.scss +6 -2
- package/src/preformatted/block.json +1 -0
- package/src/preformatted/edit.native.js +4 -4
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +53 -14
- package/src/preformatted/test/edit.native.js +11 -10
- package/src/pullquote/block.json +8 -1
- package/src/pullquote/style.scss +1 -0
- package/src/query/block.json +3 -3
- package/src/query/deprecated.js +80 -3
- package/src/query/edit/index.js +3 -3
- package/src/query/edit/inspector-controls/author-control.js +78 -0
- package/src/query/edit/inspector-controls/index.js +163 -0
- package/src/query/edit/inspector-controls/order-control.js +41 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +118 -0
- package/src/query/test/utils.js +6 -4
- package/src/query/utils.js +45 -35
- package/src/query/variations.js +0 -4
- package/src/query-pagination/block.json +2 -1
- package/src/query-pagination/editor.scss +0 -4
- package/src/query-pagination-next/block.json +2 -1
- package/src/query-pagination-next/index.php +2 -1
- package/src/query-pagination-numbers/block.json +2 -1
- package/src/query-pagination-previous/block.json +2 -1
- package/src/query-pagination-previous/index.php +2 -1
- package/src/query-title/block.json +1 -0
- package/src/quote/block.json +1 -0
- package/src/rss/block.json +1 -0
- package/src/search/block.json +8 -1
- package/src/search/edit.js +2 -1
- package/src/search/edit.native.js +2 -5
- package/src/search/index.php +21 -11
- package/src/search/test/__snapshots__/edit.native.js.snap +7 -15
- package/src/search/test/edit.native.js +32 -24
- package/src/separator/block.json +1 -0
- package/src/shortcode/block.json +1 -0
- package/src/site-logo/block.json +1 -0
- package/src/site-logo/edit.js +1 -32
- package/src/site-logo/index.js +2 -0
- package/src/site-logo/index.php +1 -1
- package/src/site-logo/transforms.js +21 -0
- package/src/site-tagline/block.json +2 -1
- package/src/site-tagline/index.php +1 -1
- package/src/site-title/block.json +1 -0
- package/src/site-title/index.js +2 -0
- package/src/site-title/index.php +4 -4
- package/src/site-title/transforms.js +21 -0
- package/src/social-link/block.json +2 -1
- package/src/social-link/index.php +3 -3
- package/src/social-links/block.json +3 -8
- package/src/social-links/edit.js +29 -26
- package/src/social-links/editor.scss +7 -0
- package/src/social-links/style.scss +3 -0
- package/src/spacer/block.json +4 -3
- package/src/spacer/controls.js +108 -0
- package/src/spacer/controls.native.js +82 -0
- package/src/spacer/deprecated.js +41 -0
- package/src/spacer/edit.js +133 -132
- package/src/spacer/edit.native.js +68 -0
- package/src/spacer/editor.scss +6 -0
- package/src/spacer/index.js +2 -0
- package/src/spacer/save.js +5 -2
- package/src/style.scss +3 -2
- package/src/table/block.json +7 -1
- package/src/table/style.scss +1 -0
- package/src/table-of-contents/block.json +1 -0
- package/src/table-of-contents/index.php +3 -3
- package/src/tag-cloud/block.json +1 -0
- package/src/tag-cloud/index.php +9 -0
- package/src/tag-cloud/style.scss +9 -0
- package/src/template-part/block.json +1 -0
- package/src/template-part/index.php +6 -6
- package/src/term-description/block.json +1 -0
- package/src/text-columns/block.json +1 -0
- package/src/verse/block.json +1 -0
- package/src/verse/test/edit.native.js +7 -10
- package/src/video/block.json +1 -0
- package/build/comments-query-loop/toolbar.js +0 -58
- package/build/comments-query-loop/toolbar.js.map +0 -1
- package/build/embed/embed-bottom-sheet.native.js +0 -85
- package/build/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build/query/edit/query-inspector-controls.js +0 -275
- package/build/query/edit/query-inspector-controls.js.map +0 -1
- package/build-module/comments-query-loop/toolbar.js +0 -48
- package/build-module/comments-query-loop/toolbar.js.map +0 -1
- package/build-module/embed/embed-bottom-sheet.native.js +0 -74
- package/build-module/embed/embed-bottom-sheet.native.js.map +0 -1
- package/build-module/query/edit/query-inspector-controls.js +0 -261
- package/build-module/query/edit/query-inspector-controls.js.map +0 -1
- package/src/comments-query-loop/toolbar.js +0 -57
- package/src/embed/embed-bottom-sheet.native.js +0 -78
- package/src/home-link/style.scss +0 -51
- package/src/query/edit/query-inspector-controls.js +0 -281
package/src/social-links/edit.js
CHANGED
|
@@ -116,6 +116,34 @@ export function SocialLinksEdit( props ) {
|
|
|
116
116
|
position: 'bottom right',
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
const colorSettings = [
|
|
120
|
+
{
|
|
121
|
+
// Use custom attribute as fallback to prevent loss of named color selection when
|
|
122
|
+
// switching themes to a new theme that does not have a matching named color.
|
|
123
|
+
value: iconColor.color || iconColorValue,
|
|
124
|
+
onChange: ( colorValue ) => {
|
|
125
|
+
setIconColor( colorValue );
|
|
126
|
+
setAttributes( { iconColorValue: colorValue } );
|
|
127
|
+
},
|
|
128
|
+
label: __( 'Icon color' ),
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
if ( ! logosOnly ) {
|
|
133
|
+
colorSettings.push( {
|
|
134
|
+
// Use custom attribute as fallback to prevent loss of named color selection when
|
|
135
|
+
// switching themes to a new theme that does not have a matching named color.
|
|
136
|
+
value: iconBackgroundColor.color || iconBackgroundColorValue,
|
|
137
|
+
onChange: ( colorValue ) => {
|
|
138
|
+
setIconBackgroundColor( colorValue );
|
|
139
|
+
setAttributes( {
|
|
140
|
+
iconBackgroundColorValue: colorValue,
|
|
141
|
+
} );
|
|
142
|
+
},
|
|
143
|
+
label: __( 'Icon background' ),
|
|
144
|
+
} );
|
|
145
|
+
}
|
|
146
|
+
|
|
119
147
|
return (
|
|
120
148
|
<Fragment>
|
|
121
149
|
<BlockControls group="other">
|
|
@@ -169,32 +197,7 @@ export function SocialLinksEdit( props ) {
|
|
|
169
197
|
__experimentalHasMultipleOrigins
|
|
170
198
|
__experimentalIsRenderedInSidebar
|
|
171
199
|
title={ __( 'Color' ) }
|
|
172
|
-
colorSettings={
|
|
173
|
-
{
|
|
174
|
-
// Use custom attribute as fallback to prevent loss of named color selection when
|
|
175
|
-
// switching themes to a new theme that does not have a matching named color.
|
|
176
|
-
value: iconColor.color || iconColorValue,
|
|
177
|
-
onChange: ( colorValue ) => {
|
|
178
|
-
setIconColor( colorValue );
|
|
179
|
-
setAttributes( { iconColorValue: colorValue } );
|
|
180
|
-
},
|
|
181
|
-
label: __( 'Icon color' ),
|
|
182
|
-
},
|
|
183
|
-
! logosOnly && {
|
|
184
|
-
// Use custom attribute as fallback to prevent loss of named color selection when
|
|
185
|
-
// switching themes to a new theme that does not have a matching named color.
|
|
186
|
-
value:
|
|
187
|
-
iconBackgroundColor.color ||
|
|
188
|
-
iconBackgroundColorValue,
|
|
189
|
-
onChange: ( colorValue ) => {
|
|
190
|
-
setIconBackgroundColor( colorValue );
|
|
191
|
-
setAttributes( {
|
|
192
|
-
iconBackgroundColorValue: colorValue,
|
|
193
|
-
} );
|
|
194
|
-
},
|
|
195
|
-
label: __( 'Icon background color' ),
|
|
196
|
-
},
|
|
197
|
-
] }
|
|
200
|
+
colorSettings={ colorSettings }
|
|
198
201
|
/>
|
|
199
202
|
{ ! logosOnly && (
|
|
200
203
|
<ContrastChecker
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
display: inline-block;
|
|
5
5
|
margin-left: $grid-unit-10;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
// Unset background colors that can be inherited from Global Styles.
|
|
9
|
+
// This is a duplicate of a rule in style.scss, as it needs higher specificity in the editor.
|
|
10
|
+
// The rule can be removed if editor styles get lowered in specificity.
|
|
11
|
+
&.wp-block-social-links {
|
|
12
|
+
background: none;
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
|
|
9
16
|
// Prevent toolbar from jumping when selecting / hovering a link.
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
// Some themes give all <ul> default margin instead of padding.
|
|
7
7
|
margin-left: 0;
|
|
8
8
|
|
|
9
|
+
// Unset background colors that can be inherited from Global Styles.
|
|
10
|
+
background: none;
|
|
11
|
+
|
|
9
12
|
// Some themes add underlines, false underlines (via shadows), and borders to <a>.
|
|
10
13
|
.wp-social-link a,
|
|
11
14
|
.wp-social-link a:hover {
|
package/src/spacer/block.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
2
3
|
"apiVersion": 2,
|
|
3
4
|
"name": "core/spacer",
|
|
4
5
|
"title": "Spacer",
|
|
@@ -7,11 +8,11 @@
|
|
|
7
8
|
"textdomain": "default",
|
|
8
9
|
"attributes": {
|
|
9
10
|
"height": {
|
|
10
|
-
"type": "
|
|
11
|
-
"default":
|
|
11
|
+
"type": "string",
|
|
12
|
+
"default": "100px"
|
|
12
13
|
},
|
|
13
14
|
"width": {
|
|
14
|
-
"type": "
|
|
15
|
+
"type": "string"
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
18
|
"usesContext": [ "orientation" ],
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { InspectorControls, useSetting } from '@wordpress/block-editor';
|
|
6
|
+
import {
|
|
7
|
+
BaseControl,
|
|
8
|
+
PanelBody,
|
|
9
|
+
__experimentalUseCustomUnits as useCustomUnits,
|
|
10
|
+
__experimentalUnitControl as UnitControl,
|
|
11
|
+
} from '@wordpress/components';
|
|
12
|
+
import { useInstanceId } from '@wordpress/compose';
|
|
13
|
+
import { useState } from '@wordpress/element';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import { MAX_SPACER_SIZE } from './edit';
|
|
19
|
+
|
|
20
|
+
function DimensionInput( { label, onChange, isResizing, value = '' } ) {
|
|
21
|
+
const [ temporaryInput, setTemporaryInput ] = useState( null );
|
|
22
|
+
|
|
23
|
+
const inputId = useInstanceId( UnitControl, 'block-spacer-height-input' );
|
|
24
|
+
|
|
25
|
+
// In most contexts the spacer size cannot meaningfully be set to a
|
|
26
|
+
// percentage, since this is relative to the parent container. This
|
|
27
|
+
// unit is disabled from the UI.
|
|
28
|
+
const availableUnitSettings = (
|
|
29
|
+
useSetting( 'spacing.units' ) || undefined
|
|
30
|
+
)?.filter( ( availableUnit ) => availableUnit !== '%' );
|
|
31
|
+
|
|
32
|
+
const units = useCustomUnits( {
|
|
33
|
+
availableUnits: availableUnitSettings || [
|
|
34
|
+
'px',
|
|
35
|
+
'em',
|
|
36
|
+
'rem',
|
|
37
|
+
'vw',
|
|
38
|
+
'vh',
|
|
39
|
+
],
|
|
40
|
+
defaultValues: { px: '100', em: '10', rem: '10', vw: '10', vh: '25' },
|
|
41
|
+
} );
|
|
42
|
+
|
|
43
|
+
const handleOnChange = ( unprocessedValue ) => {
|
|
44
|
+
setTemporaryInput( null );
|
|
45
|
+
onChange( unprocessedValue );
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleOnBlur = () => {
|
|
49
|
+
if ( temporaryInput !== null ) {
|
|
50
|
+
setTemporaryInput( null );
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const inputValue = temporaryInput !== null ? temporaryInput : value;
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<BaseControl label={ label } id={ inputId }>
|
|
58
|
+
<UnitControl
|
|
59
|
+
id={ inputId }
|
|
60
|
+
isResetValueOnUnitChange
|
|
61
|
+
min={ 0 }
|
|
62
|
+
max={ MAX_SPACER_SIZE }
|
|
63
|
+
onBlur={ handleOnBlur }
|
|
64
|
+
onChange={ handleOnChange }
|
|
65
|
+
style={ { maxWidth: 80 } }
|
|
66
|
+
value={ inputValue }
|
|
67
|
+
units={ units }
|
|
68
|
+
// Force the unit to update to `px` when the Spacer is being resized.
|
|
69
|
+
unit={ isResizing ? 'px' : undefined }
|
|
70
|
+
/>
|
|
71
|
+
</BaseControl>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default function SpacerControls( {
|
|
76
|
+
setAttributes,
|
|
77
|
+
orientation,
|
|
78
|
+
height,
|
|
79
|
+
width,
|
|
80
|
+
isResizing,
|
|
81
|
+
} ) {
|
|
82
|
+
return (
|
|
83
|
+
<InspectorControls>
|
|
84
|
+
<PanelBody title={ __( 'Spacer settings' ) }>
|
|
85
|
+
{ orientation === 'horizontal' && (
|
|
86
|
+
<DimensionInput
|
|
87
|
+
label={ __( 'Width' ) }
|
|
88
|
+
value={ width }
|
|
89
|
+
onChange={ ( nextWidth ) =>
|
|
90
|
+
setAttributes( { width: nextWidth } )
|
|
91
|
+
}
|
|
92
|
+
isResizing={ isResizing }
|
|
93
|
+
/>
|
|
94
|
+
) }
|
|
95
|
+
{ orientation !== 'horizontal' && (
|
|
96
|
+
<DimensionInput
|
|
97
|
+
label={ __( 'Height' ) }
|
|
98
|
+
value={ height }
|
|
99
|
+
onChange={ ( nextHeight ) =>
|
|
100
|
+
setAttributes( { height: nextHeight } )
|
|
101
|
+
}
|
|
102
|
+
isResizing={ isResizing }
|
|
103
|
+
/>
|
|
104
|
+
) }
|
|
105
|
+
</PanelBody>
|
|
106
|
+
</InspectorControls>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
PanelBody,
|
|
6
|
+
UnitControl,
|
|
7
|
+
getValueAndUnit,
|
|
8
|
+
__experimentalUseCustomUnits as useCustomUnits,
|
|
9
|
+
} from '@wordpress/components';
|
|
10
|
+
import { useCallback } from '@wordpress/element';
|
|
11
|
+
import { useSetting } from '@wordpress/block-editor';
|
|
12
|
+
import { __ } from '@wordpress/i18n';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Internal dependencies
|
|
16
|
+
*/
|
|
17
|
+
import styles from './style.scss';
|
|
18
|
+
|
|
19
|
+
const DEFAULT_VALUES = { px: '100', em: '10', rem: '10', vw: '10', vh: '25' };
|
|
20
|
+
|
|
21
|
+
function Controls( { attributes, context, setAttributes } ) {
|
|
22
|
+
const { orientation } = context;
|
|
23
|
+
const label = orientation !== 'horizontal' ? __( 'Height' ) : __( 'Width' );
|
|
24
|
+
|
|
25
|
+
const { height, width } = attributes;
|
|
26
|
+
const { valueToConvert, valueUnit: unit } =
|
|
27
|
+
getValueAndUnit( orientation !== 'horizontal' ? height : width ) || {};
|
|
28
|
+
const value = Number( valueToConvert );
|
|
29
|
+
|
|
30
|
+
const setNewDimensions = ( nextValue, nextUnit ) => {
|
|
31
|
+
const valueWithUnit = `${ nextValue }${ nextUnit }`;
|
|
32
|
+
if ( orientation === 'horizontal' ) {
|
|
33
|
+
setAttributes( { width: valueWithUnit } );
|
|
34
|
+
} else {
|
|
35
|
+
setAttributes( { height: valueWithUnit } );
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const handleChange = useCallback(
|
|
40
|
+
( nextValue ) => {
|
|
41
|
+
setNewDimensions( nextValue, unit );
|
|
42
|
+
},
|
|
43
|
+
[ height, width ]
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const handleUnitChange = useCallback(
|
|
47
|
+
( nextUnit ) => {
|
|
48
|
+
setNewDimensions( value, nextUnit );
|
|
49
|
+
},
|
|
50
|
+
[ height, width ]
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const units = useCustomUnits( {
|
|
54
|
+
availableUnits: useSetting( 'spacing.units' ) || [
|
|
55
|
+
'px',
|
|
56
|
+
'em',
|
|
57
|
+
'rem',
|
|
58
|
+
'vw',
|
|
59
|
+
'vh',
|
|
60
|
+
],
|
|
61
|
+
defaultValues: DEFAULT_VALUES,
|
|
62
|
+
} );
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<>
|
|
66
|
+
<PanelBody title={ __( 'Dimensions' ) }>
|
|
67
|
+
<UnitControl
|
|
68
|
+
label={ label }
|
|
69
|
+
min={ 1 }
|
|
70
|
+
value={ value }
|
|
71
|
+
onChange={ handleChange }
|
|
72
|
+
onUnitChange={ handleUnitChange }
|
|
73
|
+
units={ units }
|
|
74
|
+
unit={ unit }
|
|
75
|
+
style={ styles.rangeCellContainer }
|
|
76
|
+
/>
|
|
77
|
+
</PanelBody>
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default Controls;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useBlockProps } from '@wordpress/block-editor';
|
|
5
|
+
|
|
6
|
+
const deprecated = [
|
|
7
|
+
{
|
|
8
|
+
attributes: {
|
|
9
|
+
height: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
default: 100,
|
|
12
|
+
},
|
|
13
|
+
width: {
|
|
14
|
+
type: 'number',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
migrate( attributes ) {
|
|
18
|
+
const { height, width } = attributes;
|
|
19
|
+
return {
|
|
20
|
+
...attributes,
|
|
21
|
+
width: width !== undefined ? `${ width }px` : undefined,
|
|
22
|
+
height: height !== undefined ? `${ height }px` : undefined,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
save( { attributes } ) {
|
|
26
|
+
return (
|
|
27
|
+
<div
|
|
28
|
+
{ ...useBlockProps.save( {
|
|
29
|
+
style: {
|
|
30
|
+
height: attributes.height,
|
|
31
|
+
width: attributes.width,
|
|
32
|
+
},
|
|
33
|
+
'aria-hidden': true,
|
|
34
|
+
} ) }
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export default deprecated;
|
package/src/spacer/edit.js
CHANGED
|
@@ -6,87 +6,123 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
InspectorControls,
|
|
12
|
-
useBlockProps,
|
|
13
|
-
store as blockEditorStore,
|
|
14
|
-
} from '@wordpress/block-editor';
|
|
15
|
-
import { PanelBody, ResizableBox, RangeControl } from '@wordpress/components';
|
|
16
|
-
import { compose, withInstanceId } from '@wordpress/compose';
|
|
17
|
-
import { withDispatch } from '@wordpress/data';
|
|
9
|
+
import { useBlockProps } from '@wordpress/block-editor';
|
|
10
|
+
import { ResizableBox } from '@wordpress/components';
|
|
18
11
|
import { useState, useEffect } from '@wordpress/element';
|
|
19
12
|
import { View } from '@wordpress/primitives';
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Internal dependencies
|
|
16
|
+
*/
|
|
17
|
+
import SpacerControls from './controls';
|
|
18
|
+
|
|
19
|
+
export const MIN_SPACER_SIZE = 1;
|
|
20
|
+
export const MAX_SPACER_SIZE = 500;
|
|
21
|
+
|
|
22
|
+
const ResizableSpacer = ( {
|
|
23
|
+
orientation,
|
|
24
|
+
onResizeStart,
|
|
25
|
+
onResize,
|
|
26
|
+
onResizeStop,
|
|
27
|
+
isSelected,
|
|
28
|
+
isResizing,
|
|
29
|
+
setIsResizing,
|
|
30
|
+
...props
|
|
31
|
+
} ) => {
|
|
32
|
+
const getCurrentSize = ( elt ) => {
|
|
33
|
+
return orientation === 'horizontal'
|
|
34
|
+
? elt.clientWidth
|
|
35
|
+
: elt.clientHeight;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const getNextVal = ( elt ) => {
|
|
39
|
+
return `${ getCurrentSize( elt ) }px`;
|
|
40
|
+
};
|
|
23
41
|
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
return (
|
|
43
|
+
<ResizableBox
|
|
44
|
+
className={ classnames( 'block-library-spacer__resize-container', {
|
|
45
|
+
'resize-horizontal': orientation === 'horizontal',
|
|
46
|
+
'is-resizing': isResizing,
|
|
47
|
+
'is-selected': isSelected,
|
|
48
|
+
} ) }
|
|
49
|
+
onResizeStart={ ( _event, _direction, elt ) => {
|
|
50
|
+
const nextVal = getNextVal( elt );
|
|
51
|
+
onResizeStart( nextVal );
|
|
52
|
+
onResize( nextVal );
|
|
53
|
+
} }
|
|
54
|
+
onResize={ ( _event, _direction, elt ) => {
|
|
55
|
+
onResize( getNextVal( elt ) );
|
|
56
|
+
if ( ! isResizing ) {
|
|
57
|
+
setIsResizing( true );
|
|
58
|
+
}
|
|
59
|
+
} }
|
|
60
|
+
onResizeStop={ ( _event, _direction, elt ) => {
|
|
61
|
+
const nextVal = Math.min(
|
|
62
|
+
MAX_SPACER_SIZE,
|
|
63
|
+
getCurrentSize( elt )
|
|
64
|
+
);
|
|
65
|
+
onResizeStop( `${ nextVal }px` );
|
|
66
|
+
setIsResizing( false );
|
|
67
|
+
} }
|
|
68
|
+
__experimentalShowTooltip={ true }
|
|
69
|
+
__experimentalTooltipProps={ {
|
|
70
|
+
axis: orientation === 'horizontal' ? 'x' : 'y',
|
|
71
|
+
position: 'corner',
|
|
72
|
+
isVisible: isResizing,
|
|
73
|
+
} }
|
|
74
|
+
showHandle={ isSelected }
|
|
75
|
+
{ ...props }
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
26
79
|
|
|
27
80
|
const SpacerEdit = ( {
|
|
28
81
|
attributes,
|
|
29
82
|
isSelected,
|
|
30
83
|
setAttributes,
|
|
31
|
-
|
|
32
|
-
onResizeStop,
|
|
84
|
+
toggleSelection,
|
|
33
85
|
context,
|
|
34
86
|
} ) => {
|
|
35
87
|
const { orientation } = context;
|
|
36
|
-
const [ isResizing, setIsResizing ] = useState( false );
|
|
37
88
|
const { height, width } = attributes;
|
|
38
|
-
const updateHeight = ( value ) => {
|
|
39
|
-
setAttributes( {
|
|
40
|
-
height: value,
|
|
41
|
-
} );
|
|
42
|
-
};
|
|
43
|
-
const updateWidth = ( value ) => {
|
|
44
|
-
setAttributes( {
|
|
45
|
-
width: value,
|
|
46
|
-
} );
|
|
47
|
-
};
|
|
48
89
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
90
|
+
const [ isResizing, setIsResizing ] = useState( false );
|
|
91
|
+
const [ temporaryHeight, setTemporaryHeight ] = useState( null );
|
|
92
|
+
const [ temporaryWidth, setTemporaryWidth ] = useState( null );
|
|
93
|
+
|
|
94
|
+
const onResizeStart = () => toggleSelection( false );
|
|
95
|
+
const onResizeStop = () => toggleSelection( true );
|
|
53
96
|
|
|
54
|
-
const handleOnVerticalResizeStop = (
|
|
97
|
+
const handleOnVerticalResizeStop = ( newHeight ) => {
|
|
55
98
|
onResizeStop();
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
60
|
-
updateHeight( spacerHeight );
|
|
61
|
-
setIsResizing( false );
|
|
99
|
+
|
|
100
|
+
setAttributes( { height: newHeight } );
|
|
101
|
+
setTemporaryHeight( null );
|
|
62
102
|
};
|
|
63
103
|
|
|
64
|
-
const handleOnHorizontalResizeStop = (
|
|
104
|
+
const handleOnHorizontalResizeStop = ( newWidth ) => {
|
|
65
105
|
onResizeStop();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
106
|
+
setAttributes( { width: newWidth } );
|
|
107
|
+
setTemporaryWidth( null );
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const style = {
|
|
111
|
+
height:
|
|
112
|
+
orientation === 'horizontal'
|
|
113
|
+
? 24
|
|
114
|
+
: temporaryHeight || height || undefined,
|
|
115
|
+
width:
|
|
116
|
+
orientation === 'horizontal'
|
|
117
|
+
? temporaryWidth || width || undefined
|
|
118
|
+
: undefined,
|
|
72
119
|
};
|
|
73
120
|
|
|
74
121
|
const resizableBoxWithOrientation = ( blockOrientation ) => {
|
|
75
122
|
if ( blockOrientation === 'horizontal' ) {
|
|
76
123
|
return (
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
'block-library-spacer__resize-container',
|
|
80
|
-
'resize-horizontal',
|
|
81
|
-
{
|
|
82
|
-
'is-selected': isSelected,
|
|
83
|
-
}
|
|
84
|
-
) }
|
|
85
|
-
size={ {
|
|
86
|
-
width,
|
|
87
|
-
height: 24,
|
|
88
|
-
} }
|
|
89
|
-
minWidth={ MIN_SPACER_WIDTH }
|
|
124
|
+
<ResizableSpacer
|
|
125
|
+
minWidth={ MIN_SPACER_SIZE }
|
|
90
126
|
enable={ {
|
|
91
127
|
top: false,
|
|
92
128
|
right: true,
|
|
@@ -97,100 +133,65 @@ const SpacerEdit = ( {
|
|
|
97
133
|
bottomLeft: false,
|
|
98
134
|
topLeft: false,
|
|
99
135
|
} }
|
|
100
|
-
|
|
136
|
+
orientation={ blockOrientation }
|
|
137
|
+
onResizeStart={ onResizeStart }
|
|
138
|
+
onResize={ setTemporaryWidth }
|
|
101
139
|
onResizeStop={ handleOnHorizontalResizeStop }
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
axis: 'x',
|
|
106
|
-
position: 'corner',
|
|
107
|
-
isVisible: isResizing,
|
|
108
|
-
} }
|
|
140
|
+
isSelected={ isSelected }
|
|
141
|
+
isResizing={ isResizing }
|
|
142
|
+
setIsResizing={ setIsResizing }
|
|
109
143
|
/>
|
|
110
144
|
);
|
|
111
145
|
}
|
|
112
146
|
|
|
113
147
|
return (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onResizeStart={ handleOnResizeStart }
|
|
136
|
-
onResizeStop={ handleOnVerticalResizeStop }
|
|
137
|
-
showHandle={ isSelected }
|
|
138
|
-
__experimentalShowTooltip={ true }
|
|
139
|
-
__experimentalTooltipProps={ {
|
|
140
|
-
axis: 'y',
|
|
141
|
-
position: 'bottom',
|
|
142
|
-
isVisible: isResizing,
|
|
143
|
-
} }
|
|
144
|
-
/>
|
|
148
|
+
<>
|
|
149
|
+
<ResizableSpacer
|
|
150
|
+
enable={ {
|
|
151
|
+
top: false,
|
|
152
|
+
right: false,
|
|
153
|
+
bottom: true,
|
|
154
|
+
left: false,
|
|
155
|
+
topRight: false,
|
|
156
|
+
bottomRight: false,
|
|
157
|
+
bottomLeft: false,
|
|
158
|
+
topLeft: false,
|
|
159
|
+
} }
|
|
160
|
+
orientation={ blockOrientation }
|
|
161
|
+
onResizeStart={ onResizeStart }
|
|
162
|
+
onResize={ setTemporaryHeight }
|
|
163
|
+
onResizeStop={ handleOnVerticalResizeStop }
|
|
164
|
+
isSelected={ isSelected }
|
|
165
|
+
isResizing={ isResizing }
|
|
166
|
+
setIsResizing={ setIsResizing }
|
|
167
|
+
/>
|
|
168
|
+
</>
|
|
145
169
|
);
|
|
146
170
|
};
|
|
147
171
|
|
|
148
172
|
useEffect( () => {
|
|
149
173
|
if ( orientation === 'horizontal' && ! width ) {
|
|
150
|
-
|
|
151
|
-
|
|
174
|
+
setAttributes( {
|
|
175
|
+
height: '0px',
|
|
176
|
+
width: '72px',
|
|
177
|
+
} );
|
|
152
178
|
}
|
|
153
179
|
}, [] );
|
|
154
180
|
|
|
155
181
|
return (
|
|
156
182
|
<>
|
|
157
|
-
<View { ...useBlockProps() }>
|
|
183
|
+
<View { ...useBlockProps( { style } ) }>
|
|
158
184
|
{ resizableBoxWithOrientation( orientation ) }
|
|
159
185
|
</View>
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
value={ width }
|
|
168
|
-
onChange={ updateWidth }
|
|
169
|
-
/>
|
|
170
|
-
) }
|
|
171
|
-
{ orientation !== 'horizontal' && (
|
|
172
|
-
<RangeControl
|
|
173
|
-
label={ __( 'Height in pixels' ) }
|
|
174
|
-
min={ MIN_SPACER_HEIGHT }
|
|
175
|
-
max={ Math.max( MAX_SPACER_HEIGHT, height ) }
|
|
176
|
-
value={ height }
|
|
177
|
-
onChange={ updateHeight }
|
|
178
|
-
/>
|
|
179
|
-
) }
|
|
180
|
-
</PanelBody>
|
|
181
|
-
</InspectorControls>
|
|
186
|
+
<SpacerControls
|
|
187
|
+
setAttributes={ setAttributes }
|
|
188
|
+
height={ temporaryHeight || height }
|
|
189
|
+
width={ temporaryWidth || width }
|
|
190
|
+
orientation={ orientation }
|
|
191
|
+
isResizing={ isResizing }
|
|
192
|
+
/>
|
|
182
193
|
</>
|
|
183
194
|
);
|
|
184
195
|
};
|
|
185
196
|
|
|
186
|
-
export default
|
|
187
|
-
withDispatch( ( dispatch ) => {
|
|
188
|
-
const { toggleSelection } = dispatch( blockEditorStore );
|
|
189
|
-
|
|
190
|
-
return {
|
|
191
|
-
onResizeStart: () => toggleSelection( false ),
|
|
192
|
-
onResizeStop: () => toggleSelection( true ),
|
|
193
|
-
};
|
|
194
|
-
} ),
|
|
195
|
-
withInstanceId,
|
|
196
|
-
] )( SpacerEdit );
|
|
197
|
+
export default SpacerEdit;
|