@wordpress/block-library 7.2.0 → 7.3.2
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 +2 -0
- package/README.md +1 -1
- package/build/archives/edit.js +21 -1
- package/build/archives/edit.js.map +1 -1
- package/build/archives/index.js +5 -1
- package/build/archives/index.js.map +1 -1
- package/build/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/audio/edit.native.js +0 -5
- package/build/audio/edit.native.js.map +1 -1
- package/build/avatar/edit.js +17 -11
- package/build/avatar/edit.js.map +1 -1
- package/build/block/edit.js +2 -1
- package/build/block/edit.js.map +1 -1
- package/build/column/index.js +1 -0
- package/build/column/index.js.map +1 -1
- package/build/comment-author-avatar/index.js +3 -3
- package/build/comment-author-name/index.js +7 -3
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +1 -1
- package/build/comment-date/index.js +7 -3
- 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/edit.js +10 -15
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/hooks.js +10 -24
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comment-template/index.js +2 -2
- package/build/comments-pagination-next/index.js +2 -2
- package/build/comments-pagination-numbers/index.js +1 -1
- package/build/comments-pagination-previous/index.js +1 -1
- package/build/comments-query-loop/edit/comments-inspector-controls.js +2 -69
- package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-query-loop/edit.js +22 -1
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +1 -23
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/edit.js +35 -6
- package/build/cover/edit.js.map +1 -1
- package/build/cover/index.js +5 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +3 -2
- package/build/cover/save.js.map +1 -1
- package/build/cover/transforms.js +33 -32
- package/build/cover/transforms.js.map +1 -1
- package/build/gallery/gap-styles.js +8 -2
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/index.js +1 -0
- package/build/gallery/index.js.map +1 -1
- package/build/group/edit.js +3 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +2 -4
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +31 -9
- package/build/group/variations.js.map +1 -1
- package/build/heading/edit.js +1 -1
- package/build/heading/edit.js.map +1 -1
- package/build/html/edit.js +3 -2
- package/build/html/edit.js.map +1 -1
- package/build/image/edit.native.js +8 -10
- package/build/image/edit.native.js.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/list/deprecated.js +2 -2
- package/build/list/deprecated.js.map +1 -1
- package/build/list/index.js +13 -2
- package/build/list/index.js.map +1 -1
- package/build/list/v2/deprecated.js +117 -0
- package/build/list/v2/deprecated.js.map +1 -0
- package/build/list/v2/edit.js +106 -3
- package/build/list/v2/edit.js.map +1 -1
- package/build/list/v2/index.js +4 -1
- package/build/list/v2/index.js.map +1 -1
- package/build/list/v2/migrate.js +85 -0
- package/build/list/v2/migrate.js.map +1 -0
- package/build/list-item/edit.js +59 -10
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +32 -0
- package/build/list-item/hooks/index.js.map +1 -0
- package/build/list-item/hooks/use-enter.js +93 -0
- package/build/list-item/hooks/use-enter.js.map +1 -0
- package/build/list-item/hooks/use-indent-list-item.js +74 -0
- package/build/list-item/hooks/use-indent-list-item.js.map +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js +77 -0
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -0
- package/build/list-item/index.js +1 -1
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/utils.js +16 -0
- package/build/list-item/utils.js.map +1 -0
- package/build/media-text/media-container.native.js +1 -16
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/navigation/edit/index.js +36 -17
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +34 -7
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/index.js +9 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +1 -0
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +9 -5
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +1 -1
- package/build/navigation-submenu/edit.js +5 -9
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +1 -1
- package/build/post-comment/edit.js +2 -2
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comments/index.js +4 -3
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-form/edit.js +3 -2
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +19 -7
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +1 -1
- package/build/post-template/edit.js +7 -2
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/variations.js +1 -1
- package/build/post-terms/variations.js.map +1 -1
- package/build/query/edit/index.js +84 -22
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/query-placeholder.js +7 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +6 -1
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query-pagination/edit.js +1 -1
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination-numbers/index.js +19 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/quote/index.js +20 -2
- package/build/quote/index.js.map +1 -1
- package/build/quote/v2/deprecated.js +133 -0
- package/build/quote/v2/deprecated.js.map +1 -0
- package/build/quote/v2/edit.js +131 -0
- package/build/quote/v2/edit.js.map +1 -0
- package/build/quote/v2/index.js +49 -0
- package/build/quote/v2/index.js.map +1 -0
- package/build/quote/v2/save.js +43 -0
- package/build/quote/v2/save.js.map +1 -0
- package/build/quote/v2/transforms.js +156 -0
- package/build/quote/v2/transforms.js.map +1 -0
- package/build/read-more/index.js +1 -1
- package/build/rss/edit.js +6 -1
- package/build/rss/edit.js.map +1 -1
- package/build/site-logo/edit.js +3 -2
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +1 -1
- package/build/social-links/index.js +1 -0
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/controls.native.js +1 -1
- package/build/spacer/controls.native.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +5 -2
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/archives/edit.js +22 -2
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/archives/index.js +5 -1
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js +0 -5
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/avatar/edit.js +16 -11
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/edit.js +4 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/column/index.js +1 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +3 -3
- package/build-module/comment-author-name/index.js +7 -3
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +1 -1
- package/build-module/comment-date/index.js +7 -3
- 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/edit.js +10 -15
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js +10 -24
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comment-template/index.js +2 -2
- package/build-module/comments-pagination-next/index.js +2 -2
- package/build-module/comments-pagination-numbers/index.js +1 -1
- package/build-module/comments-pagination-previous/index.js +1 -1
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js +4 -70
- package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-query-loop/edit.js +22 -1
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +1 -23
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/edit.js +36 -8
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/index.js +5 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +3 -2
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/transforms.js +33 -32
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/gallery/gap-styles.js +8 -2
- package/build-module/gallery/gap-styles.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/edit.js +3 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +2 -4
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +30 -9
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/edit.js +1 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/html/edit.js +4 -3
- package/build-module/html/edit.js.map +1 -1
- package/build-module/image/edit.native.js +8 -10
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/index.js +4 -4
- package/build-module/index.js.map +1 -1
- package/build-module/list/deprecated.js +2 -2
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/index.js +9 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/v2/deprecated.js +104 -0
- package/build-module/list/v2/deprecated.js.map +1 -0
- package/build-module/list/v2/edit.js +104 -5
- package/build-module/list/v2/edit.js.map +1 -1
- package/build-module/list/v2/index.js +3 -1
- package/build-module/list/v2/index.js.map +1 -1
- package/build-module/list/v2/migrate.js +77 -0
- package/build-module/list/v2/migrate.js.map +1 -0
- package/build-module/list-item/edit.js +59 -13
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +4 -0
- package/build-module/list-item/hooks/index.js.map +1 -0
- package/build-module/list-item/hooks/use-enter.js +77 -0
- package/build-module/list-item/hooks/use-enter.js.map +1 -0
- package/build-module/list-item/hooks/use-indent-list-item.js +62 -0
- package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js +66 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -0
- package/build-module/list-item/index.js +1 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/utils.js +8 -0
- package/build-module/list-item/utils.js.map +1 -0
- package/build-module/media-text/media-container.native.js +1 -14
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/navigation/edit/index.js +37 -17
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +35 -8
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/index.js +9 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +1 -0
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +9 -5
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +1 -1
- package/build-module/navigation-submenu/edit.js +6 -10
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +1 -1
- package/build-module/post-comment/edit.js +2 -2
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comments/index.js +4 -3
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-form/edit.js +3 -2
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +19 -7
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +1 -1
- package/build-module/post-template/edit.js +7 -2
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/variations.js +3 -3
- package/build-module/post-terms/variations.js.map +1 -1
- package/build-module/query/edit/index.js +87 -26
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +8 -15
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +6 -1
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query-pagination/edit.js +1 -1
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +19 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/quote/index.js +19 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/v2/deprecated.js +116 -0
- package/build-module/quote/v2/deprecated.js.map +1 -0
- package/build-module/quote/v2/edit.js +115 -0
- package/build-module/quote/v2/edit.js.map +1 -0
- package/build-module/quote/v2/index.js +33 -0
- package/build-module/quote/v2/index.js.map +1 -0
- package/build-module/quote/v2/save.js +30 -0
- package/build-module/quote/v2/save.js.map +1 -0
- package/build-module/quote/v2/transforms.js +147 -0
- package/build-module/quote/v2/transforms.js.map +1 -0
- package/build-module/read-more/index.js +1 -1
- package/build-module/rss/edit.js +5 -1
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +3 -2
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +1 -1
- package/build-module/social-links/index.js +1 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/controls.native.js +1 -1
- package/build-module/spacer/controls.native.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +5 -2
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-style/avatar/editor-rtl.css +4 -0
- package/build-style/avatar/editor.css +4 -0
- package/build-style/avatar/style-rtl.css +79 -0
- package/build-style/avatar/style.css +79 -0
- package/build-style/editor-rtl.css +69 -9
- package/build-style/editor.css +69 -9
- package/build-style/group/editor-rtl.css +26 -0
- package/build-style/group/editor.css +26 -0
- package/build-style/heading/style-rtl.css +0 -8
- package/build-style/heading/style.css +0 -8
- package/build-style/list/style-rtl.css +1 -1
- package/build-style/list/style.css +1 -1
- package/build-style/navigation/style-rtl.css +11 -9
- package/build-style/navigation/style.css +11 -9
- package/build-style/navigation-link/style-rtl.css +3 -0
- package/build-style/navigation-link/style.css +3 -0
- package/build-style/paragraph/style-rtl.css +0 -4
- package/build-style/paragraph/style.css +0 -4
- package/build-style/query/editor-rtl.css +39 -0
- package/build-style/query/editor.css +39 -0
- package/build-style/quote/style-rtl.css +1 -0
- package/build-style/quote/style.css +1 -0
- package/build-style/reset-rtl.css +1 -1
- package/build-style/reset.css +1 -1
- package/build-style/style-rtl.css +20 -22
- package/build-style/style.css +20 -22
- package/build-style/template-part/editor-rtl.css +0 -9
- package/build-style/template-part/editor.css +0 -9
- package/package.json +28 -28
- package/src/archives/block.json +5 -1
- package/src/archives/edit.js +20 -2
- package/src/archives/index.php +4 -4
- package/src/audio/edit.js +1 -1
- package/src/audio/edit.native.js +0 -5
- package/src/avatar/edit.js +21 -13
- package/src/avatar/editor.scss +6 -0
- package/src/avatar/index.php +2 -2
- package/src/avatar/style.scss +5 -0
- package/src/block/edit.js +21 -11
- package/src/column/block.json +1 -0
- package/src/comment-author-avatar/block.json +3 -3
- package/src/comment-author-name/block.json +7 -3
- package/src/comment-author-name/index.php +3 -0
- package/src/comment-content/block.json +1 -1
- package/src/comment-date/block.json +7 -3
- package/src/comment-date/index.php +6 -1
- package/src/comment-edit-link/block.json +5 -1
- package/src/comment-edit-link/index.php +3 -0
- package/src/comment-reply-link/block.json +5 -1
- package/src/comment-reply-link/index.php +4 -1
- package/src/comment-template/block.json +2 -8
- package/src/comment-template/edit.js +17 -22
- package/src/comment-template/hooks.js +10 -25
- package/src/comment-template/index.php +15 -5
- package/src/comments-pagination-next/block.json +2 -9
- package/src/comments-pagination-numbers/block.json +2 -8
- package/src/comments-pagination-previous/block.json +2 -2
- package/src/comments-query-loop/block.json +1 -23
- package/src/comments-query-loop/edit/comments-inspector-controls.js +2 -83
- package/src/comments-query-loop/edit.js +54 -1
- package/src/cover/block.json +5 -0
- package/src/cover/edit.js +77 -29
- package/src/cover/index.php +85 -0
- package/src/cover/save.js +18 -14
- package/src/cover/transforms.js +51 -28
- package/src/gallery/block.json +1 -0
- package/src/gallery/gap-styles.js +9 -4
- package/src/gallery/index.php +7 -6
- package/src/group/block.json +2 -4
- package/src/group/edit.js +4 -1
- package/src/group/editor.scss +31 -0
- package/src/group/variations.js +21 -4
- package/src/heading/edit.js +1 -1
- package/src/heading/style.scss +0 -3
- package/src/html/edit.js +22 -30
- package/src/image/edit.native.js +7 -11
- package/src/index.js +19 -16
- package/src/list/deprecated.js +2 -2
- package/src/list/index.js +7 -3
- package/src/list/style.scss +1 -2
- package/src/list/test/migrate.js +159 -0
- package/src/list/v2/deprecated.js +89 -0
- package/src/list/v2/edit.js +110 -1
- package/src/list/v2/index.js +2 -0
- package/src/list/v2/migrate.js +87 -0
- package/src/list-item/edit.js +69 -23
- package/src/list-item/hooks/index.js +3 -0
- package/src/list-item/hooks/use-enter.js +94 -0
- package/src/list-item/hooks/use-indent-list-item.js +89 -0
- package/src/list-item/hooks/use-outdent-list-item.js +95 -0
- package/src/list-item/index.js +1 -1
- package/src/list-item/utils.js +14 -0
- package/src/media-text/media-container.native.js +1 -14
- package/src/navigation/block.json +9 -1
- package/src/navigation/edit/index.js +50 -14
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -1
- package/src/navigation/edit/unsaved-inner-blocks.js +57 -8
- package/src/navigation/index.php +6 -1
- package/src/navigation/style.scss +15 -13
- package/src/navigation/use-navigation-menu.js +4 -0
- package/src/navigation-link/block.json +1 -0
- package/src/navigation-link/edit.js +43 -35
- package/src/navigation-link/index.php +8 -0
- package/src/navigation-link/style.scss +6 -0
- package/src/navigation-submenu/block.json +1 -0
- package/src/navigation-submenu/edit.js +7 -9
- package/src/paragraph/style.scss +0 -5
- package/src/post-author/index.php +0 -1
- package/src/post-comment/edit.js +2 -2
- package/src/post-comments/block.json +4 -3
- package/src/post-comments-form/edit.js +6 -3
- package/src/post-comments-form/index.php +12 -4
- package/src/post-featured-image/block.json +1 -1
- package/src/post-featured-image/edit.js +24 -12
- package/src/post-template/edit.js +7 -1
- package/src/post-terms/edit.js +4 -1
- package/src/post-terms/variations.js +3 -3
- package/src/query/edit/index.js +125 -26
- package/src/query/edit/query-placeholder.js +3 -13
- package/src/query/edit/query-toolbar.js +6 -0
- package/src/query/editor.scss +38 -0
- package/src/query-pagination/edit.js +1 -1
- package/src/query-pagination/index.php +9 -2
- package/src/query-pagination-numbers/block.json +19 -1
- package/src/quote/block.json +8 -0
- package/src/quote/index.js +10 -1
- package/src/quote/style.scss +1 -0
- package/src/quote/v2/deprecated.js +107 -0
- package/src/quote/v2/edit.js +136 -0
- package/src/quote/v2/index.js +36 -0
- package/src/quote/v2/save.js +26 -0
- package/src/quote/v2/test/migrate.js +92 -0
- package/src/quote/v2/transforms.js +155 -0
- package/src/read-more/block.json +1 -1
- package/src/reset.scss +1 -1
- package/src/rss/edit.js +3 -1
- package/src/rss/index.php +14 -1
- package/src/site-logo/block.json +1 -1
- package/src/site-logo/edit.js +2 -1
- package/src/site-logo/index.php +0 -4
- package/src/social-link/index.php +1 -2
- package/src/social-links/block.json +1 -0
- package/src/spacer/controls.native.js +1 -1
- package/src/spacer/test/__snapshots__/index.native.js.snap +31 -0
- package/src/spacer/test/index.native.js +180 -0
- package/src/style.scss +1 -0
- package/src/template-part/edit/utils/hooks.js +6 -1
- package/src/template-part/editor.scss +0 -10
- package/build/navigation/edit/use-list-view-modal.js +0 -73
- package/build/navigation/edit/use-list-view-modal.js.map +0 -1
- package/build-module/navigation/edit/use-list-view-modal.js +0 -63
- package/build-module/navigation/edit/use-list-view-modal.js.map +0 -1
- package/src/navigation/edit/use-list-view-modal.js +0 -72
|
@@ -18,20 +18,28 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) {
|
|
|
18
18
|
return '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
$classes = '';
|
|
21
|
+
$classes = 'comment-respond'; // See comment further below.
|
|
22
22
|
if ( isset( $attributes['textAlign'] ) ) {
|
|
23
23
|
$classes .= 'has-text-align-' . $attributes['textAlign'];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
|
27
|
+
|
|
26
28
|
ob_start();
|
|
27
29
|
comment_form( array(), $block->context['postId'] );
|
|
28
|
-
$form
|
|
29
|
-
|
|
30
|
+
$form = ob_get_clean();
|
|
31
|
+
|
|
32
|
+
// We use the outermost wrapping `<div />` returned by `comment_form()`
|
|
33
|
+
// which is identified by its default classname `comment-respond` to inject
|
|
34
|
+
// our wrapper attributes. This way, it is guaranteed that all styling applied
|
|
35
|
+
// to the block is carried along when the comment form is moved to the location
|
|
36
|
+
// of the 'Reply' link that the user clicked by Core's `comment-reply.js` script.
|
|
37
|
+
$form = str_replace( 'class="comment-respond"', $wrapper_attributes, $form );
|
|
30
38
|
|
|
31
39
|
// Enqueue the comment-reply script.
|
|
32
40
|
wp_enqueue_script( 'comment-reply' );
|
|
33
41
|
|
|
34
|
-
return
|
|
42
|
+
return $form;
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
/**
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"supports": {
|
|
30
30
|
"align": [ "left", "right", "center", "wide", "full" ],
|
|
31
31
|
"color": {
|
|
32
|
-
"__experimentalDuotone": "img",
|
|
32
|
+
"__experimentalDuotone": "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
|
|
33
33
|
"text": false,
|
|
34
34
|
"background": false
|
|
35
35
|
},
|
|
@@ -57,22 +57,30 @@ function PostFeaturedImageDisplay( {
|
|
|
57
57
|
clientId,
|
|
58
58
|
attributes,
|
|
59
59
|
setAttributes,
|
|
60
|
-
context: { postId, postType, queryId },
|
|
60
|
+
context: { postId, postType: postTypeSlug, queryId },
|
|
61
61
|
} ) {
|
|
62
62
|
const isDescendentOfQueryLoop = Number.isFinite( queryId );
|
|
63
63
|
const { isLink, height, width, scale, sizeSlug } = attributes;
|
|
64
64
|
const [ featuredImage, setFeaturedImage ] = useEntityProp(
|
|
65
65
|
'postType',
|
|
66
|
-
|
|
66
|
+
postTypeSlug,
|
|
67
67
|
'featured_media',
|
|
68
68
|
postId
|
|
69
69
|
);
|
|
70
70
|
|
|
71
|
-
const media = useSelect(
|
|
72
|
-
( select ) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const { media, postType } = useSelect(
|
|
72
|
+
( select ) => {
|
|
73
|
+
const { getMedia, getPostType } = select( coreStore );
|
|
74
|
+
return {
|
|
75
|
+
media:
|
|
76
|
+
featuredImage &&
|
|
77
|
+
getMedia( featuredImage, {
|
|
78
|
+
context: 'view',
|
|
79
|
+
} ),
|
|
80
|
+
postType: postTypeSlug && getPostType( postTypeSlug ),
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
[ featuredImage, postTypeSlug ]
|
|
76
84
|
);
|
|
77
85
|
const mediaUrl = getMediaSourceUrlBySizeSlug( media, sizeSlug );
|
|
78
86
|
|
|
@@ -124,11 +132,15 @@ function PostFeaturedImageDisplay( {
|
|
|
124
132
|
<InspectorControls>
|
|
125
133
|
<PanelBody title={ __( 'Link settings' ) }>
|
|
126
134
|
<ToggleControl
|
|
127
|
-
label={
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
label={
|
|
136
|
+
postType?.labels.singular_name
|
|
137
|
+
? sprintf(
|
|
138
|
+
// translators: %s: Name of the post type e.g: "post".
|
|
139
|
+
__( 'Link to %s' ),
|
|
140
|
+
postType.labels.singular_name.toLowerCase()
|
|
141
|
+
)
|
|
142
|
+
: __( 'Link to post' )
|
|
143
|
+
}
|
|
132
144
|
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
133
145
|
checked={ isLink }
|
|
134
146
|
/>
|
|
@@ -26,7 +26,10 @@ const TEMPLATE = [
|
|
|
26
26
|
];
|
|
27
27
|
|
|
28
28
|
function PostTemplateInnerBlocks() {
|
|
29
|
-
const innerBlocksProps = useInnerBlocksProps(
|
|
29
|
+
const innerBlocksProps = useInnerBlocksProps(
|
|
30
|
+
{ className: 'wp-block-post' },
|
|
31
|
+
{ template: TEMPLATE }
|
|
32
|
+
);
|
|
30
33
|
return <li { ...innerBlocksProps } />;
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -38,6 +41,9 @@ function PostTemplateBlockPreview( {
|
|
|
38
41
|
} ) {
|
|
39
42
|
const blockPreviewProps = useBlockPreview( {
|
|
40
43
|
blocks,
|
|
44
|
+
props: {
|
|
45
|
+
className: 'wp-block-post',
|
|
46
|
+
},
|
|
41
47
|
} );
|
|
42
48
|
|
|
43
49
|
const handleOnClick = () => {
|
package/src/post-terms/edit.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
InspectorControls,
|
|
13
13
|
BlockControls,
|
|
14
14
|
useBlockProps,
|
|
15
|
+
useBlockDisplayInformation,
|
|
15
16
|
} from '@wordpress/block-editor';
|
|
16
17
|
import { Spinner, TextControl } from '@wordpress/components';
|
|
17
18
|
import { useSelect } from '@wordpress/data';
|
|
@@ -25,6 +26,7 @@ import usePostTerms from './use-post-terms';
|
|
|
25
26
|
|
|
26
27
|
export default function PostTermsEdit( {
|
|
27
28
|
attributes,
|
|
29
|
+
clientId,
|
|
28
30
|
context,
|
|
29
31
|
setAttributes,
|
|
30
32
|
} ) {
|
|
@@ -46,6 +48,7 @@ export default function PostTermsEdit( {
|
|
|
46
48
|
term: selectedTerm,
|
|
47
49
|
} );
|
|
48
50
|
const hasPost = postId && postType;
|
|
51
|
+
const blockInformation = useBlockDisplayInformation( clientId );
|
|
49
52
|
const blockProps = useBlockProps( {
|
|
50
53
|
className: classnames( {
|
|
51
54
|
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
@@ -54,7 +57,7 @@ export default function PostTermsEdit( {
|
|
|
54
57
|
} );
|
|
55
58
|
|
|
56
59
|
if ( ! hasPost || ! term ) {
|
|
57
|
-
return <div { ...blockProps }>{
|
|
60
|
+
return <div { ...blockProps }>{ blockInformation.title }</div>;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
return (
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { postCategories
|
|
5
|
+
import { postCategories, postTerms } from '@wordpress/icons';
|
|
6
6
|
|
|
7
7
|
const variations = [
|
|
8
8
|
{
|
|
9
9
|
name: 'category',
|
|
10
10
|
title: __( 'Post Categories' ),
|
|
11
11
|
description: __( "Display a post's categories." ),
|
|
12
|
-
icon,
|
|
12
|
+
icon: postCategories,
|
|
13
13
|
isDefault: true,
|
|
14
14
|
attributes: { term: 'category' },
|
|
15
15
|
isActive: ( blockAttributes ) => blockAttributes.term === 'category',
|
|
@@ -19,7 +19,7 @@ const variations = [
|
|
|
19
19
|
name: 'post_tag',
|
|
20
20
|
title: __( 'Post Tags' ),
|
|
21
21
|
description: __( "Display a post's tags." ),
|
|
22
|
-
icon,
|
|
22
|
+
icon: postTerms,
|
|
23
23
|
attributes: { term: 'post_tag' },
|
|
24
24
|
isActive: ( blockAttributes ) => blockAttributes.term === 'post_tag',
|
|
25
25
|
},
|
package/src/query/edit/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
-
import { cloneBlock } from '@wordpress/blocks';
|
|
5
|
+
import { store as blocksStore, cloneBlock } from '@wordpress/blocks';
|
|
6
6
|
import { useInstanceId } from '@wordpress/compose';
|
|
7
|
-
import { useEffect } from '@wordpress/element';
|
|
7
|
+
import { useState, useEffect } from '@wordpress/element';
|
|
8
8
|
import {
|
|
9
9
|
BlockControls,
|
|
10
10
|
InspectorControls,
|
|
@@ -12,9 +12,15 @@ import {
|
|
|
12
12
|
useSetting,
|
|
13
13
|
store as blockEditorStore,
|
|
14
14
|
useInnerBlocksProps,
|
|
15
|
+
__experimentalGetMatchingVariation as getMatchingVariation,
|
|
15
16
|
__experimentalBlockPatternSetup as BlockPatternSetup,
|
|
16
17
|
} from '@wordpress/block-editor';
|
|
17
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
Button,
|
|
20
|
+
SelectControl,
|
|
21
|
+
Placeholder,
|
|
22
|
+
Modal,
|
|
23
|
+
} from '@wordpress/components';
|
|
18
24
|
import { __ } from '@wordpress/i18n';
|
|
19
25
|
|
|
20
26
|
/**
|
|
@@ -27,7 +33,11 @@ import { DEFAULTS_POSTS_PER_PAGE } from '../constants';
|
|
|
27
33
|
import { getFirstQueryClientIdFromBlocks } from '../utils';
|
|
28
34
|
|
|
29
35
|
const TEMPLATE = [ [ 'core/post-template' ] ];
|
|
30
|
-
export function QueryContent( {
|
|
36
|
+
export function QueryContent( {
|
|
37
|
+
attributes,
|
|
38
|
+
setAttributes,
|
|
39
|
+
openPatternSelectionModal,
|
|
40
|
+
} ) {
|
|
31
41
|
const {
|
|
32
42
|
queryId,
|
|
33
43
|
query,
|
|
@@ -102,6 +112,7 @@ export function QueryContent( { attributes, setAttributes } ) {
|
|
|
102
112
|
attributes={ attributes }
|
|
103
113
|
setQuery={ updateQuery }
|
|
104
114
|
setDisplayLayout={ updateDisplayLayout }
|
|
115
|
+
openPatternSelectionModal={ openPatternSelectionModal }
|
|
105
116
|
/>
|
|
106
117
|
</BlockControls>
|
|
107
118
|
<InspectorControls __experimentalGroup="advanced">
|
|
@@ -124,43 +135,131 @@ export function QueryContent( { attributes, setAttributes } ) {
|
|
|
124
135
|
);
|
|
125
136
|
}
|
|
126
137
|
|
|
127
|
-
function QueryPatternSetup(
|
|
128
|
-
|
|
138
|
+
function QueryPatternSetup( {
|
|
139
|
+
attributes,
|
|
140
|
+
clientId,
|
|
141
|
+
name,
|
|
142
|
+
openPatternSelectionModal,
|
|
143
|
+
setAttributes,
|
|
144
|
+
} ) {
|
|
145
|
+
const [ isStartingBlank, setIsStartingBlank ] = useState( false );
|
|
129
146
|
const blockProps = useBlockProps();
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
147
|
+
|
|
148
|
+
const { blockType, allVariations, hasPatterns } = useSelect(
|
|
149
|
+
( select ) => {
|
|
150
|
+
const { getBlockVariations, getBlockType } = select( blocksStore );
|
|
151
|
+
const {
|
|
152
|
+
getBlockRootClientId,
|
|
153
|
+
__experimentalGetPatternsByBlockTypes,
|
|
154
|
+
} = select( blockEditorStore );
|
|
155
|
+
const rootClientId = getBlockRootClientId( clientId );
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
blockType: getBlockType( name ),
|
|
159
|
+
allVariations: getBlockVariations( name ),
|
|
160
|
+
hasPatterns: !! __experimentalGetPatternsByBlockTypes(
|
|
161
|
+
name,
|
|
162
|
+
rootClientId
|
|
163
|
+
).length,
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
[ name, clientId ]
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
const matchingVariation = getMatchingVariation( attributes, allVariations );
|
|
170
|
+
const icon = matchingVariation?.icon || blockType?.icon?.src;
|
|
171
|
+
const label = matchingVariation?.title || blockType?.title;
|
|
172
|
+
if ( isStartingBlank ) {
|
|
173
|
+
return (
|
|
174
|
+
<QueryPlaceholder
|
|
175
|
+
clientId={ clientId }
|
|
176
|
+
name={ name }
|
|
177
|
+
setAttributes={ setAttributes }
|
|
178
|
+
icon={ icon }
|
|
179
|
+
label={ label }
|
|
180
|
+
/>
|
|
135
181
|
);
|
|
136
|
-
|
|
137
|
-
if ( firstQueryClientId ) {
|
|
138
|
-
selectBlock( firstQueryClientId );
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
// `startBlankComponent` is what to render when clicking `Start blank`
|
|
142
|
-
// or if no matched patterns are found.
|
|
182
|
+
}
|
|
143
183
|
return (
|
|
144
184
|
<div { ...blockProps }>
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
185
|
+
<Placeholder
|
|
186
|
+
icon={ icon }
|
|
187
|
+
label={ label }
|
|
188
|
+
instructions={ __(
|
|
189
|
+
'Choose a pattern for the query loop or start blank.'
|
|
190
|
+
) }
|
|
191
|
+
>
|
|
192
|
+
{ !! hasPatterns && (
|
|
193
|
+
<Button
|
|
194
|
+
variant="primary"
|
|
195
|
+
onClick={ openPatternSelectionModal }
|
|
196
|
+
>
|
|
197
|
+
{ __( 'Choose' ) }
|
|
198
|
+
</Button>
|
|
199
|
+
) }
|
|
200
|
+
|
|
201
|
+
<Button
|
|
202
|
+
variant="secondary"
|
|
203
|
+
onClick={ () => {
|
|
204
|
+
setIsStartingBlank( true );
|
|
205
|
+
} }
|
|
206
|
+
>
|
|
207
|
+
{ __( 'Start blank' ) }
|
|
208
|
+
</Button>
|
|
209
|
+
</Placeholder>
|
|
151
210
|
</div>
|
|
152
211
|
);
|
|
153
212
|
}
|
|
154
213
|
|
|
155
214
|
const QueryEdit = ( props ) => {
|
|
156
|
-
const { clientId } = props;
|
|
215
|
+
const { clientId, name } = props;
|
|
216
|
+
const [
|
|
217
|
+
isPatternSelectionModalOpen,
|
|
218
|
+
setIsPatternSelectionModalOpen,
|
|
219
|
+
] = useState( false );
|
|
220
|
+
const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
|
|
157
221
|
const hasInnerBlocks = useSelect(
|
|
158
222
|
( select ) =>
|
|
159
223
|
!! select( blockEditorStore ).getBlocks( clientId ).length,
|
|
160
224
|
[ clientId ]
|
|
161
225
|
);
|
|
162
226
|
const Component = hasInnerBlocks ? QueryContent : QueryPatternSetup;
|
|
163
|
-
|
|
227
|
+
const onBlockPatternSelect = ( blocks ) => {
|
|
228
|
+
const clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );
|
|
229
|
+
const firstQueryClientId = getFirstQueryClientIdFromBlocks(
|
|
230
|
+
clonedBlocks
|
|
231
|
+
);
|
|
232
|
+
replaceBlock( clientId, clonedBlocks );
|
|
233
|
+
if ( firstQueryClientId ) {
|
|
234
|
+
selectBlock( firstQueryClientId );
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
return (
|
|
238
|
+
<>
|
|
239
|
+
<Component
|
|
240
|
+
{ ...props }
|
|
241
|
+
openPatternSelectionModal={ () =>
|
|
242
|
+
setIsPatternSelectionModalOpen( true )
|
|
243
|
+
}
|
|
244
|
+
/>
|
|
245
|
+
{ isPatternSelectionModalOpen && (
|
|
246
|
+
<Modal
|
|
247
|
+
className="block-editor-query-pattern__selection-modal"
|
|
248
|
+
title={ __( 'Choose a pattern' ) }
|
|
249
|
+
closeLabel={ __( 'Cancel' ) }
|
|
250
|
+
onRequestClose={ () =>
|
|
251
|
+
setIsPatternSelectionModalOpen( false )
|
|
252
|
+
}
|
|
253
|
+
>
|
|
254
|
+
<BlockPatternSetup
|
|
255
|
+
blockName={ name }
|
|
256
|
+
clientId={ clientId }
|
|
257
|
+
onBlockPatternSelect={ onBlockPatternSelect }
|
|
258
|
+
/>
|
|
259
|
+
</Modal>
|
|
260
|
+
) }
|
|
261
|
+
</>
|
|
262
|
+
);
|
|
164
263
|
};
|
|
165
264
|
|
|
166
265
|
export default QueryEdit;
|
|
@@ -5,7 +5,6 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|
|
5
5
|
import {
|
|
6
6
|
useBlockProps,
|
|
7
7
|
__experimentalBlockVariationPicker,
|
|
8
|
-
__experimentalGetMatchingVariation as getMatchingVariation,
|
|
9
8
|
store as blockEditorStore,
|
|
10
9
|
} from '@wordpress/block-editor';
|
|
11
10
|
import {
|
|
@@ -13,13 +12,8 @@ import {
|
|
|
13
12
|
store as blocksStore,
|
|
14
13
|
} from '@wordpress/blocks';
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
blockType,
|
|
19
|
-
defaultVariation,
|
|
20
|
-
scopeVariations,
|
|
21
|
-
allVariations,
|
|
22
|
-
} = useSelect(
|
|
15
|
+
function QueryPlaceholder( { clientId, name, setAttributes, icon, label } ) {
|
|
16
|
+
const { defaultVariation, scopeVariations } = useSelect(
|
|
23
17
|
( select ) => {
|
|
24
18
|
const {
|
|
25
19
|
getBlockVariations,
|
|
@@ -31,16 +25,12 @@ const QueryPlaceholder = ( { clientId, name, attributes, setAttributes } ) => {
|
|
|
31
25
|
blockType: getBlockType( name ),
|
|
32
26
|
defaultVariation: getDefaultBlockVariation( name, 'block' ),
|
|
33
27
|
scopeVariations: getBlockVariations( name, 'block' ),
|
|
34
|
-
allVariations: getBlockVariations( name ),
|
|
35
28
|
};
|
|
36
29
|
},
|
|
37
30
|
[ name ]
|
|
38
31
|
);
|
|
39
32
|
const { replaceInnerBlocks } = useDispatch( blockEditorStore );
|
|
40
33
|
const blockProps = useBlockProps();
|
|
41
|
-
const matchingVariation = getMatchingVariation( attributes, allVariations );
|
|
42
|
-
const icon = matchingVariation?.icon || blockType?.icon?.src;
|
|
43
|
-
const label = matchingVariation?.title || blockType?.title;
|
|
44
34
|
return (
|
|
45
35
|
<div { ...blockProps }>
|
|
46
36
|
<__experimentalBlockVariationPicker
|
|
@@ -64,6 +54,6 @@ const QueryPlaceholder = ( { clientId, name, attributes, setAttributes } ) => {
|
|
|
64
54
|
/>
|
|
65
55
|
</div>
|
|
66
56
|
);
|
|
67
|
-
}
|
|
57
|
+
}
|
|
68
58
|
|
|
69
59
|
export default QueryPlaceholder;
|
|
@@ -16,6 +16,7 @@ export default function QueryToolbar( {
|
|
|
16
16
|
attributes: { query, displayLayout },
|
|
17
17
|
setQuery,
|
|
18
18
|
setDisplayLayout,
|
|
19
|
+
openPatternSelectionModal,
|
|
19
20
|
} ) {
|
|
20
21
|
const maxPageInputId = useInstanceId(
|
|
21
22
|
QueryToolbar,
|
|
@@ -128,6 +129,11 @@ export default function QueryToolbar( {
|
|
|
128
129
|
/>
|
|
129
130
|
</ToolbarGroup>
|
|
130
131
|
) }
|
|
132
|
+
<ToolbarGroup className="wp-block-template-part__block-control-group">
|
|
133
|
+
<ToolbarButton onClick={ openPatternSelectionModal }>
|
|
134
|
+
{ __( 'Replace' ) }
|
|
135
|
+
</ToolbarButton>
|
|
136
|
+
</ToolbarGroup>
|
|
131
137
|
<ToolbarGroup controls={ displayLayoutControls } />
|
|
132
138
|
</>
|
|
133
139
|
);
|
package/src/query/editor.scss
CHANGED
|
@@ -5,3 +5,41 @@
|
|
|
5
5
|
.wp-block-query__create-new-link {
|
|
6
6
|
padding: 0 $grid-unit-20 $grid-unit-20 56px;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
12
|
+
grid-gap: $grid-unit-10;
|
|
13
|
+
|
|
14
|
+
.block-editor-block-patterns-list__list-item {
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
.block-editor-block-preview__container {
|
|
17
|
+
max-height: 250px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.block-editor-query-pattern__selection-modal .components-modal__content {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
padding: 0;
|
|
25
|
+
&::before {
|
|
26
|
+
margin-bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.block-editor-query-pattern__selection-modal {
|
|
31
|
+
// To keep modal dimensions consistent as subsections are navigated, width
|
|
32
|
+
// and height are used instead of max-(width/height).
|
|
33
|
+
@include break-small() {
|
|
34
|
+
width: calc(100% - #{ $grid-unit-20 * 2 });
|
|
35
|
+
height: calc(100% - #{ $header-height * 2 });
|
|
36
|
+
}
|
|
37
|
+
@include break-medium() {
|
|
38
|
+
width: $break-medium - $grid-unit-20 * 2;
|
|
39
|
+
}
|
|
40
|
+
@include break-large() {
|
|
41
|
+
height: 80%;
|
|
42
|
+
width: 80%;
|
|
43
|
+
max-height: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -18,9 +18,16 @@ function render_block_core_query_pagination( $attributes, $content ) {
|
|
|
18
18
|
return '';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
$wrapper_attributes = get_block_wrapper_attributes(
|
|
22
|
+
array(
|
|
23
|
+
'role' => 'navigation',
|
|
24
|
+
'aria-label' => __( 'Pagination' ),
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
|
|
21
28
|
return sprintf(
|
|
22
|
-
'<
|
|
23
|
-
|
|
29
|
+
'<nav %1$s>%2$s</nav>',
|
|
30
|
+
$wrapper_attributes,
|
|
24
31
|
$content
|
|
25
32
|
);
|
|
26
33
|
}
|
|
@@ -10,7 +10,25 @@
|
|
|
10
10
|
"usesContext": [ "queryId", "query" ],
|
|
11
11
|
"supports": {
|
|
12
12
|
"reusable": false,
|
|
13
|
-
"html": false
|
|
13
|
+
"html": false,
|
|
14
|
+
"color": {
|
|
15
|
+
"gradients": true,
|
|
16
|
+
"text": false,
|
|
17
|
+
"__experimentalDefaultControls": {
|
|
18
|
+
"background": true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"typography": {
|
|
22
|
+
"fontSize": true,
|
|
23
|
+
"lineHeight": true,
|
|
24
|
+
"__experimentalFontStyle": true,
|
|
25
|
+
"__experimentalFontWeight": true,
|
|
26
|
+
"__experimentalLetterSpacing": true,
|
|
27
|
+
"__experimentalTextTransform": true,
|
|
28
|
+
"__experimentalDefaultControls": {
|
|
29
|
+
"fontSize": true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
14
32
|
},
|
|
15
33
|
"editorStyle": "query-pagination-numbers-editor"
|
|
16
34
|
}
|
package/src/quote/block.json
CHANGED
package/src/quote/index.js
CHANGED
|
@@ -12,12 +12,13 @@ import edit from './edit';
|
|
|
12
12
|
import metadata from './block.json';
|
|
13
13
|
import save from './save';
|
|
14
14
|
import transforms from './transforms';
|
|
15
|
+
import settingsV2 from './v2';
|
|
15
16
|
|
|
16
17
|
const { name } = metadata;
|
|
17
18
|
|
|
18
19
|
export { metadata, name };
|
|
19
20
|
|
|
20
|
-
export const
|
|
21
|
+
export const settingsV1 = {
|
|
21
22
|
icon,
|
|
22
23
|
example: {
|
|
23
24
|
attributes: {
|
|
@@ -51,3 +52,11 @@ export const settings = {
|
|
|
51
52
|
},
|
|
52
53
|
deprecated,
|
|
53
54
|
};
|
|
55
|
+
|
|
56
|
+
let settings = settingsV1;
|
|
57
|
+
if ( process.env.IS_GUTENBERG_PLUGIN ) {
|
|
58
|
+
settings = window?.__experimentalEnableQuoteBlockV2
|
|
59
|
+
? settingsV2
|
|
60
|
+
: settingsV1;
|
|
61
|
+
}
|
|
62
|
+
export { settings };
|
package/src/quote/style.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.wp-block-quote {
|
|
2
|
+
box-sizing: border-box;
|
|
2
3
|
overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block.
|
|
3
4
|
// .is-style-large and .is-large are kept for backwards compatibility. The :not pseudo-class is used to enable switching styles. See PR #37580.
|
|
4
5
|
&.is-style-large:not(.is-style-plain),
|