@wordpress/block-library 9.15.1 → 9.17.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/build/archives/edit.js +2 -2
- package/build/archives/edit.js.map +1 -1
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/categories/edit.js +115 -37
- package/build/categories/edit.js.map +1 -1
- package/build/columns/edit.js +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/comment-template/edit.js +2 -2
- package/build/comment-template/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +6 -5
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/index.js +5 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +7 -6
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +7 -6
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/cover/deprecated.js +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +2 -9
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/edit.js +27 -18
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +12 -0
- package/build/details/index.js.map +1 -1
- package/build/details/save.js +2 -0
- package/build/details/save.js.map +1 -1
- package/build/embed/transforms.js +5 -2
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +1 -1
- package/build/embed/util.js.map +1 -1
- package/build/file/edit.js +7 -4
- package/build/file/edit.js.map +1 -1
- package/build/file/transforms.js +1 -1
- package/build/file/transforms.js.map +1 -1
- package/build/file/utils/index.js +1 -1
- package/build/file/utils/index.js.map +1 -1
- package/build/form/variations.js +1 -1
- package/build/form/variations.js.map +1 -1
- package/build/form-input/edit.js +1 -1
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/transforms.js +2 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-new-images.js +1 -1
- package/build/gallery/use-get-new-images.js.map +1 -1
- package/build/group/edit.js +2 -9
- package/build/group/edit.js.map +1 -1
- package/build/home-link/edit.js +1 -2
- package/build/home-link/edit.js.map +1 -1
- package/build/latest-comments/edit.js +73 -26
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/constants.js +2 -1
- package/build/latest-posts/constants.js.map +1 -1
- package/build/latest-posts/edit.js +91 -38
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list-item/edit.native.js +2 -2
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/index.js +1 -1
- package/build/media-text/edit.native.js +2 -2
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/media-container.native.js +4 -4
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/navigation/edit/index.js +8 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build/navigation/index.js +15 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation-link/edit.js +15 -20
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js +9 -18
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +7 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/page-list/edit.js +1 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +11 -0
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +4 -14
- package/build/paragraph/edit.js.map +1 -1
- package/build/pattern/index.js +1 -1
- package/build/post-author-name/edit.js +41 -12
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comments-link/index.js +7 -1
- 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/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +0 -6
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/overlay-controls.js +2 -1
- package/build/post-featured-image/overlay-controls.js.map +1 -1
- package/build/post-navigation-link/variations.js +2 -2
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-terms/edit.js +1 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/index.js +1 -1
- package/build/query/edit/inspector-controls/author-control.js +1 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +110 -61
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +2 -6
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/utils.js +1 -1
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/index.js +1 -1
- package/build/query-pagination-numbers/edit.js +1 -1
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/edit.js +40 -14
- package/build/query-title/edit.js.map +1 -1
- package/build/query-total/index.js +7 -1
- package/build/query-total/index.js.map +1 -1
- package/build/quote/transforms.js +1 -1
- package/build/quote/transforms.js.map +1 -1
- package/build/read-more/edit.js +25 -7
- package/build/read-more/edit.js.map +1 -1
- package/build/rss/edit.js +1 -0
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +6 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +67 -48
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +2 -4
- package/build/separator/edit.js.map +1 -1
- package/build/site-logo/edit.js +26 -35
- package/build/site-logo/edit.js.map +1 -1
- package/build/social-links/edit.js +2 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/controls.js +13 -9
- package/build/spacer/controls.js.map +1 -1
- package/build/spacer/edit.js +23 -21
- package/build/spacer/edit.js.map +1 -1
- package/build/table-of-contents/edit.js +24 -8
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -9
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/utils/messages.js +22 -0
- package/build/utils/messages.js.map +1 -0
- package/build/video/edit-common-settings.js +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.native.js +3 -3
- package/build/video/edit.native.js.map +1 -1
- package/build-module/archives/edit.js +2 -2
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/button/edit.js +3 -2
- package/build-module/button/edit.js.map +1 -1
- package/build-module/categories/edit.js +116 -38
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/columns/edit.js +1 -1
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +1 -1
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/comment-template/edit.js +2 -2
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +5 -4
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/index.js +5 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +7 -6
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +7 -6
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -1
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -8
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/edit.js +29 -20
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +12 -0
- package/build-module/details/index.js.map +1 -1
- package/build-module/details/save.js +2 -0
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/transforms.js +5 -2
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +1 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/edit.js +7 -4
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/transforms.js +1 -1
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/file/utils/index.js +1 -1
- package/build-module/file/utils/index.js.map +1 -1
- package/build-module/form/variations.js +1 -1
- package/build-module/form/variations.js.map +1 -1
- package/build-module/form-input/edit.js +1 -1
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/transforms.js +2 -2
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-new-images.js +1 -1
- package/build-module/gallery/use-get-new-images.js.map +1 -1
- package/build-module/group/edit.js +1 -8
- package/build-module/group/edit.js.map +1 -1
- package/build-module/home-link/edit.js +1 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/latest-comments/edit.js +74 -27
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/constants.js +1 -0
- package/build-module/latest-posts/constants.js.map +1 -1
- package/build-module/latest-posts/edit.js +93 -40
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +2 -2
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/index.js +1 -1
- package/build-module/media-text/edit.native.js +2 -2
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/media-container.native.js +4 -4
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/navigation/edit/index.js +8 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build-module/navigation/index.js +15 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +16 -21
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +9 -18
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +7 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/page-list/edit.js +1 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +11 -0
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +5 -15
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/pattern/index.js +1 -1
- package/build-module/post-author-name/edit.js +42 -13
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-comments-link/index.js +7 -1
- 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/edit.js +1 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +0 -6
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +2 -1
- package/build-module/post-featured-image/overlay-controls.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +2 -2
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-time-to-read/index.js +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +111 -62
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -5
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/utils.js +1 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/index.js +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -1
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/edit.js +41 -15
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-total/index.js +7 -1
- package/build-module/query-total/index.js.map +1 -1
- package/build-module/quote/transforms.js +1 -1
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/read-more/edit.js +26 -8
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/rss/edit.js +1 -0
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +6 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +69 -50
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +1 -3
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +27 -36
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/social-links/edit.js +2 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/controls.js +13 -9
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/spacer/edit.js +24 -22
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table-of-contents/edit.js +25 -9
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +1 -8
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/utils/messages.js +15 -0
- package/build-module/utils/messages.js.map +1 -0
- package/build-module/video/edit-common-settings.js +1 -1
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.native.js +3 -3
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/editor-rtl.css +12 -86
- package/build-style/editor.css +12 -86
- package/build-style/freeform/editor-rtl.css +2 -4
- package/build-style/freeform/editor.css +2 -4
- package/build-style/gallery/editor-rtl.css +0 -46
- package/build-style/gallery/editor.css +0 -46
- package/build-style/image/style-rtl.css +24 -10
- package/build-style/image/style.css +24 -10
- package/build-style/navigation/style-rtl.css +8 -6
- package/build-style/navigation/style.css +8 -6
- package/build-style/navigation-link/editor-rtl.css +3 -0
- package/build-style/navigation-link/editor.css +3 -0
- package/build-style/paragraph/editor-rtl.css +4 -0
- package/build-style/paragraph/editor.css +4 -0
- package/build-style/post-featured-image/editor-rtl.css +1 -1
- package/build-style/post-featured-image/editor.css +1 -1
- package/build-style/query/editor-rtl.css +0 -27
- package/build-style/query/editor.css +0 -27
- package/build-style/site-logo/editor-rtl.css +2 -8
- package/build-style/site-logo/editor.css +2 -8
- package/build-style/social-links/style-rtl.css +2 -5
- package/build-style/social-links/style.css +2 -5
- package/build-style/style-rtl.css +34 -21
- package/build-style/style.css +34 -21
- package/package.json +35 -35
- package/src/archives/edit.js +2 -2
- package/src/audio/test/transforms.native.js +4 -3
- package/src/button/edit.js +6 -2
- package/src/categories/edit.js +133 -45
- package/src/columns/edit.js +1 -1
- package/src/columns/edit.native.js +1 -1
- package/src/comment-template/edit.js +2 -2
- package/src/comments/edit/comments-inspector-controls.js +5 -8
- package/src/comments-pagination/block.json +5 -0
- package/src/comments-pagination-next/block.json +0 -5
- package/src/comments-pagination-next/index.js +6 -0
- package/src/comments-pagination-previous/block.json +0 -5
- package/src/comments-pagination-previous/index.js +6 -0
- package/src/cover/deprecated.js +1 -1
- package/src/cover/edit/inspector-controls.js +1 -21
- package/src/cover/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/cover/test/edit.js +7 -7
- package/src/cover/test/edit.native.js +2 -2
- package/src/cover/test/transforms.native.js +9 -5
- package/src/details/block.json +12 -0
- package/src/details/edit.js +29 -24
- package/src/details/save.js +6 -2
- package/src/editor.scss +1 -1
- package/src/embed/test/index.js +1 -1
- package/src/embed/transforms.js +3 -1
- package/src/embed/util.js +1 -1
- package/src/file/edit.js +4 -3
- package/src/file/test/transforms.native.js +4 -3
- package/src/file/transforms.js +1 -1
- package/src/file/utils/index.js +1 -1
- package/src/form/variations.js +1 -1
- package/src/form-input/edit.js +1 -1
- package/src/freeform/editor.scss +4 -3
- package/src/gallery/edit.js +1 -1
- package/src/gallery/editor.scss +0 -54
- package/src/gallery/test/transforms.native.js +4 -3
- package/src/gallery/transforms.js +2 -2
- package/src/gallery/use-get-new-images.js +1 -1
- package/src/group/edit.js +1 -20
- package/src/home-link/edit.js +0 -6
- package/src/image/block.json +8 -1
- package/src/image/editor.scss +1 -1
- package/src/image/index.php +9 -13
- package/src/image/style.scss +17 -7
- package/src/image/test/edit.native.js +1 -1
- package/src/image/test/transforms.native.js +4 -3
- package/src/latest-comments/edit.js +93 -33
- package/src/latest-posts/constants.js +1 -0
- package/src/latest-posts/edit.js +119 -44
- package/src/list/test/edit.native.js +10 -10
- package/src/list-item/block.json +1 -1
- package/src/list-item/edit.native.js +2 -2
- package/src/media-text/edit.native.js +2 -2
- package/src/media-text/media-container.native.js +4 -4
- package/src/media-text/test/transforms.native.js +9 -5
- package/src/navigation/edit/index.js +4 -0
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/src/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/src/navigation/index.js +20 -0
- package/src/navigation/style.scss +7 -4
- package/src/navigation-link/edit.js +26 -30
- package/src/navigation-link/editor.scss +27 -18
- package/src/navigation-link/link-ui.js +7 -13
- package/src/navigation-submenu/edit.js +1 -1
- package/src/navigation-submenu/index.js +7 -0
- package/src/navigation-submenu/index.php +21 -4
- package/src/page-list/block.json +11 -0
- package/src/page-list/edit.js +52 -50
- package/src/paragraph/edit.js +3 -18
- package/src/paragraph/editor.scss +7 -0
- package/src/paragraph/style.scss +1 -1
- package/src/pattern/block.json +1 -1
- package/src/post-author-name/edit.js +53 -15
- package/src/post-comments-link/block.json +7 -1
- package/src/post-content/block.json +2 -1
- package/src/post-date/edit.js +1 -3
- package/src/post-featured-image/edit.js +2 -15
- package/src/post-featured-image/editor.scss +2 -2
- package/src/post-featured-image/overlay-controls.js +1 -0
- package/src/post-navigation-link/variations.js +2 -2
- package/src/post-terms/edit.js +1 -0
- package/src/post-time-to-read/block.json +1 -1
- package/src/query/edit/inspector-controls/author-control.js +1 -1
- package/src/query/edit/inspector-controls/index.js +148 -88
- package/src/query/edit/query-content.js +1 -11
- package/src/query/editor.scss +0 -31
- package/src/query/utils.js +1 -1
- package/src/query-no-results/block.json +1 -1
- package/src/query-pagination-numbers/edit.js +1 -1
- package/src/query-title/edit.js +61 -19
- package/src/query-total/block.json +7 -1
- package/src/quote/transforms.js +1 -1
- package/src/read-more/edit.js +35 -11
- package/src/rss/block.json +6 -0
- package/src/rss/edit.js +1 -0
- package/src/search/edit.js +100 -71
- package/src/separator/deprecated.scss +1 -1
- package/src/separator/edit.js +1 -6
- package/src/site-logo/edit.js +34 -47
- package/src/site-logo/editor.scss +3 -6
- package/src/social-link/index.php +2 -2
- package/src/social-links/edit.js +1 -0
- package/src/social-links/style.scss +3 -3
- package/src/spacer/controls.js +10 -9
- package/src/spacer/edit.js +25 -23
- package/src/table-of-contents/edit.js +38 -19
- package/src/template-part/edit/advanced-controls.js +1 -21
- package/src/utils/messages.js +31 -0
- package/src/video/edit-common-settings.js +1 -1
- package/src/video/edit.native.js +3 -3
- package/src/video/test/transforms.native.js +4 -3
|
@@ -36,6 +36,7 @@ import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
|
|
|
36
36
|
import { unlock } from '../../lock-unlock';
|
|
37
37
|
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
|
|
38
38
|
import { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';
|
|
39
|
+
import { htmlElementMessages } from '../../utils/messages';
|
|
39
40
|
|
|
40
41
|
const { cleanEmptyObject, ResolutionTool } = unlock( blockEditorPrivateApis );
|
|
41
42
|
|
|
@@ -183,27 +184,6 @@ export default function CoverInspectorControls( {
|
|
|
183
184
|
|
|
184
185
|
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
185
186
|
|
|
186
|
-
const htmlElementMessages = {
|
|
187
|
-
header: __(
|
|
188
|
-
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
|
|
189
|
-
),
|
|
190
|
-
main: __(
|
|
191
|
-
'The <main> element should be used for the primary content of your document only.'
|
|
192
|
-
),
|
|
193
|
-
section: __(
|
|
194
|
-
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
|
|
195
|
-
),
|
|
196
|
-
article: __(
|
|
197
|
-
'The <article> element should represent a self-contained, syndicatable portion of the document.'
|
|
198
|
-
),
|
|
199
|
-
aside: __(
|
|
200
|
-
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
|
|
201
|
-
),
|
|
202
|
-
footer: __(
|
|
203
|
-
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
|
|
204
|
-
),
|
|
205
|
-
};
|
|
206
|
-
|
|
207
187
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
208
188
|
|
|
209
189
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`color settings clears the selected overlay color and
|
|
3
|
+
exports[`color settings clears the selected overlay color and maintains the inner blocks 1`] = `
|
|
4
4
|
"<!-- wp:cover {"isUserOverlayColor":true,"isDark":false} -->
|
|
5
5
|
<div class="wp-block-cover is-light"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…"} -->
|
|
6
6
|
<p class="has-text-align-center"></p>
|
package/src/cover/test/edit.js
CHANGED
|
@@ -48,7 +48,7 @@ async function setup( attributes, useCoreBlocks, customSettings ) {
|
|
|
48
48
|
async function createAndSelectBlock() {
|
|
49
49
|
await userEvent.click(
|
|
50
50
|
screen.getByRole( 'option', {
|
|
51
|
-
name: '
|
|
51
|
+
name: 'Black',
|
|
52
52
|
} )
|
|
53
53
|
);
|
|
54
54
|
await userEvent.click(
|
|
@@ -73,7 +73,7 @@ describe( 'Cover block', () => {
|
|
|
73
73
|
test( 'can set overlay color using color picker on block placeholder', async () => {
|
|
74
74
|
const { container } = await setup();
|
|
75
75
|
const colorPicker = screen.getByRole( 'option', {
|
|
76
|
-
name: '
|
|
76
|
+
name: 'Black',
|
|
77
77
|
} );
|
|
78
78
|
await userEvent.click( colorPicker );
|
|
79
79
|
const color = colorPicker.style.backgroundColor;
|
|
@@ -97,7 +97,7 @@ describe( 'Cover block', () => {
|
|
|
97
97
|
|
|
98
98
|
await userEvent.click(
|
|
99
99
|
screen.getByRole( 'option', {
|
|
100
|
-
name: '
|
|
100
|
+
name: 'Black',
|
|
101
101
|
} )
|
|
102
102
|
);
|
|
103
103
|
|
|
@@ -390,7 +390,7 @@ describe( 'Cover block', () => {
|
|
|
390
390
|
test( 'should toggle is-light class if background changed from light to dark', async () => {
|
|
391
391
|
await setup();
|
|
392
392
|
const colorPicker = screen.getByRole( 'option', {
|
|
393
|
-
name: '
|
|
393
|
+
name: 'White',
|
|
394
394
|
} );
|
|
395
395
|
await userEvent.click( colorPicker );
|
|
396
396
|
|
|
@@ -406,7 +406,7 @@ describe( 'Cover block', () => {
|
|
|
406
406
|
);
|
|
407
407
|
await userEvent.click( screen.getByText( 'Overlay' ) );
|
|
408
408
|
const popupColorPicker = screen.getByRole( 'option', {
|
|
409
|
-
name: '
|
|
409
|
+
name: 'Black',
|
|
410
410
|
} );
|
|
411
411
|
await userEvent.click( popupColorPicker );
|
|
412
412
|
expect( coverBlock ).not.toHaveClass( 'is-light' );
|
|
@@ -414,7 +414,7 @@ describe( 'Cover block', () => {
|
|
|
414
414
|
test( 'should remove is-light class if overlay color is removed', async () => {
|
|
415
415
|
await setup();
|
|
416
416
|
const colorPicker = screen.getByRole( 'option', {
|
|
417
|
-
name: '
|
|
417
|
+
name: 'White',
|
|
418
418
|
} );
|
|
419
419
|
await userEvent.click( colorPicker );
|
|
420
420
|
const coverBlock = screen.getByLabelText( 'Block: Cover' );
|
|
@@ -429,7 +429,7 @@ describe( 'Cover block', () => {
|
|
|
429
429
|
// The default color is black, so clicking the black color option will remove the background color,
|
|
430
430
|
// which should remove the isDark setting and assign the is-light class.
|
|
431
431
|
const popupColorPicker = screen.getByRole( 'option', {
|
|
432
|
-
name: '
|
|
432
|
+
name: 'White',
|
|
433
433
|
} );
|
|
434
434
|
await userEvent.click( popupColorPicker );
|
|
435
435
|
expect( coverBlock ).not.toHaveClass( 'is-light' );
|
|
@@ -101,7 +101,7 @@ const attributes = {
|
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
beforeAll( () => {
|
|
104
|
-
// Mock Image.getSize to avoid failed attempt to size non-
|
|
104
|
+
// Mock Image.getSize to avoid failed attempt to size non-existent image.
|
|
105
105
|
const getSizeSpy = jest.spyOn( Image, 'getSize' );
|
|
106
106
|
getSizeSpy.mockImplementation( ( _url, callback ) => callback( 300, 200 ) );
|
|
107
107
|
|
|
@@ -541,7 +541,7 @@ describe( 'color settings', () => {
|
|
|
541
541
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
542
542
|
} );
|
|
543
543
|
|
|
544
|
-
it( 'clears the selected overlay color and
|
|
544
|
+
it( 'clears the selected overlay color and maintains the inner blocks', async () => {
|
|
545
545
|
const screen = await initializeEditor( {
|
|
546
546
|
initialHtml: COVER_BLOCK_SOLID_COLOR_HTML,
|
|
547
547
|
} );
|
|
@@ -23,16 +23,16 @@ const initialHtmlWithVideo = `
|
|
|
23
23
|
<!-- /wp:paragraph --></div></div>
|
|
24
24
|
<!-- /wp:cover -->`;
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
|
|
27
27
|
const blockTransformsWithImage = [
|
|
28
28
|
'Image',
|
|
29
29
|
'Media & Text',
|
|
30
|
-
...
|
|
30
|
+
...transformsWithInnerBlocks,
|
|
31
31
|
];
|
|
32
32
|
const blockTransformsWithVideo = [
|
|
33
33
|
'Video',
|
|
34
34
|
'Media & Text',
|
|
35
|
-
...
|
|
35
|
+
...transformsWithInnerBlocks,
|
|
36
36
|
];
|
|
37
37
|
|
|
38
38
|
setupCoreBlocks();
|
|
@@ -52,7 +52,9 @@ describe( `${ block } block transformations`, () => {
|
|
|
52
52
|
{
|
|
53
53
|
isMediaBlock: true,
|
|
54
54
|
hasInnerBlocks:
|
|
55
|
-
|
|
55
|
+
transformsWithInnerBlocks.includes(
|
|
56
|
+
blockTransform
|
|
57
|
+
),
|
|
56
58
|
}
|
|
57
59
|
);
|
|
58
60
|
expect( newBlock ).toBeVisible();
|
|
@@ -88,7 +90,9 @@ describe( `${ block } block transformations`, () => {
|
|
|
88
90
|
{
|
|
89
91
|
isMediaBlock: true,
|
|
90
92
|
hasInnerBlocks:
|
|
91
|
-
|
|
93
|
+
transformsWithInnerBlocks.includes(
|
|
94
|
+
blockTransform
|
|
95
|
+
),
|
|
92
96
|
}
|
|
93
97
|
);
|
|
94
98
|
expect( newBlock ).toBeVisible();
|
package/src/details/block.json
CHANGED
|
@@ -16,6 +16,18 @@
|
|
|
16
16
|
"type": "rich-text",
|
|
17
17
|
"source": "rich-text",
|
|
18
18
|
"selector": "summary"
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"source": "attribute",
|
|
23
|
+
"attribute": "name",
|
|
24
|
+
"selector": ".wp-block-details"
|
|
25
|
+
},
|
|
26
|
+
"allowedBlocks": {
|
|
27
|
+
"type": "array"
|
|
28
|
+
},
|
|
29
|
+
"placeholder": {
|
|
30
|
+
"type": "string"
|
|
19
31
|
}
|
|
20
32
|
},
|
|
21
33
|
"supports": {
|
package/src/details/edit.js
CHANGED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
RichText,
|
|
6
6
|
useBlockProps,
|
|
7
7
|
useInnerBlocksProps,
|
|
8
|
-
store as blockEditorStore,
|
|
9
8
|
InspectorControls,
|
|
10
9
|
} from '@wordpress/block-editor';
|
|
11
|
-
import { useSelect } from '@wordpress/data';
|
|
12
10
|
import {
|
|
11
|
+
TextControl,
|
|
13
12
|
ToggleControl,
|
|
14
13
|
__experimentalToolsPanel as ToolsPanel,
|
|
15
14
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
16
15
|
} from '@wordpress/components';
|
|
17
16
|
import { __ } from '@wordpress/i18n';
|
|
17
|
+
import { useState } from '@wordpress/element';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Internal dependencies
|
|
@@ -30,29 +30,18 @@ const TEMPLATE = [
|
|
|
30
30
|
],
|
|
31
31
|
];
|
|
32
32
|
|
|
33
|
-
function DetailsEdit( { attributes, setAttributes
|
|
34
|
-
const { showContent, summary } =
|
|
33
|
+
function DetailsEdit( { attributes, setAttributes } ) {
|
|
34
|
+
const { name, showContent, summary, allowedBlocks, placeholder } =
|
|
35
|
+
attributes;
|
|
35
36
|
const blockProps = useBlockProps();
|
|
36
37
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
37
38
|
template: TEMPLATE,
|
|
38
39
|
__experimentalCaptureToolbars: true,
|
|
40
|
+
allowedBlocks,
|
|
39
41
|
} );
|
|
42
|
+
const [ isOpen, setIsOpen ] = useState( showContent );
|
|
40
43
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
41
44
|
|
|
42
|
-
// Check if either the block or the inner blocks are selected.
|
|
43
|
-
const hasSelection = useSelect(
|
|
44
|
-
( select ) => {
|
|
45
|
-
const { isBlockSelected, hasSelectedInnerBlock } =
|
|
46
|
-
select( blockEditorStore );
|
|
47
|
-
/* Sets deep to true to also find blocks inside the details content block. */
|
|
48
|
-
return (
|
|
49
|
-
hasSelectedInnerBlock( clientId, true ) ||
|
|
50
|
-
isBlockSelected( clientId )
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
[ clientId ]
|
|
54
|
-
);
|
|
55
|
-
|
|
56
45
|
return (
|
|
57
46
|
<>
|
|
58
47
|
<InspectorControls>
|
|
@@ -88,15 +77,31 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) {
|
|
|
88
77
|
</ToolsPanelItem>
|
|
89
78
|
</ToolsPanel>
|
|
90
79
|
</InspectorControls>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
<InspectorControls group="advanced">
|
|
81
|
+
<TextControl
|
|
82
|
+
__next40pxDefaultSize
|
|
83
|
+
__nextHasNoMarginBottom
|
|
84
|
+
label={ __( 'Name attribute' ) }
|
|
85
|
+
value={ name || '' }
|
|
86
|
+
onChange={ ( newName ) =>
|
|
87
|
+
setAttributes( { name: newName } )
|
|
88
|
+
}
|
|
89
|
+
help={ __(
|
|
90
|
+
'Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.'
|
|
91
|
+
) }
|
|
92
|
+
/>
|
|
93
|
+
</InspectorControls>
|
|
94
|
+
<details { ...innerBlocksProps } open={ isOpen }>
|
|
95
|
+
<summary
|
|
96
|
+
onClick={ ( event ) => {
|
|
97
|
+
event.preventDefault();
|
|
98
|
+
setIsOpen( ! isOpen );
|
|
99
|
+
} }
|
|
100
|
+
>
|
|
96
101
|
<RichText
|
|
97
102
|
identifier="summary"
|
|
98
103
|
aria-label={ __( 'Write summary' ) }
|
|
99
|
-
placeholder={ __( 'Write summary…' ) }
|
|
104
|
+
placeholder={ placeholder || __( 'Write summary…' ) }
|
|
100
105
|
allowedFormats={ [] }
|
|
101
106
|
withoutInteractiveFormatting
|
|
102
107
|
value={ summary }
|
package/src/details/save.js
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
import { RichText, useBlockProps, InnerBlocks } from '@wordpress/block-editor';
|
|
5
5
|
|
|
6
6
|
export default function save( { attributes } ) {
|
|
7
|
-
const { showContent } = attributes;
|
|
7
|
+
const { name, showContent } = attributes;
|
|
8
8
|
const summary = attributes.summary ? attributes.summary : 'Details';
|
|
9
9
|
const blockProps = useBlockProps.save();
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<details
|
|
12
|
+
<details
|
|
13
|
+
{ ...blockProps }
|
|
14
|
+
name={ name || undefined }
|
|
15
|
+
open={ showContent }
|
|
16
|
+
>
|
|
13
17
|
<summary>
|
|
14
18
|
<RichText.Content value={ summary } />
|
|
15
19
|
</summary>
|
package/src/editor.scss
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
// Font sizes (not used now, kept because of backward compatibility).
|
|
66
66
|
//
|
|
67
67
|
// The reason we add the editor class wrapper here is
|
|
68
|
-
// to avoid
|
|
68
|
+
// to avoid enqueuing the classes twice: here and in ./editor.scss
|
|
69
69
|
:where(.editor-styles-wrapper) .has-regular-font-size {
|
|
70
70
|
font-size: 16px;
|
|
71
71
|
}
|
package/src/embed/test/index.js
CHANGED
|
@@ -69,7 +69,7 @@ describe( 'utils', () => {
|
|
|
69
69
|
expect( getClassNames( html, '', false ) ).toEqual( expected );
|
|
70
70
|
} );
|
|
71
71
|
|
|
72
|
-
it( 'should preserve
|
|
72
|
+
it( 'should preserve existing class names when removing responsive classes', () => {
|
|
73
73
|
const html = '<iframe height="9" width="16"></iframe>';
|
|
74
74
|
const expected = 'lovely';
|
|
75
75
|
expect(
|
package/src/embed/transforms.js
CHANGED
|
@@ -7,6 +7,7 @@ import { createBlock } from '@wordpress/blocks';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import metadata from './block.json';
|
|
10
|
+
import { removeAspectRatioClasses } from './util';
|
|
10
11
|
|
|
11
12
|
const { name: EMBED_BLOCK } = metadata;
|
|
12
13
|
|
|
@@ -33,13 +34,14 @@ const transforms = {
|
|
|
33
34
|
type: 'block',
|
|
34
35
|
blocks: [ 'core/paragraph' ],
|
|
35
36
|
isMatch: ( { url } ) => !! url,
|
|
36
|
-
transform: ( { url, caption } ) => {
|
|
37
|
+
transform: ( { url, caption, className } ) => {
|
|
37
38
|
let value = `<a href="${ url }">${ url }</a>`;
|
|
38
39
|
if ( caption?.trim() ) {
|
|
39
40
|
value += `<br />${ caption }`;
|
|
40
41
|
}
|
|
41
42
|
return createBlock( 'core/paragraph', {
|
|
42
43
|
content: value,
|
|
44
|
+
className: removeAspectRatioClasses( className ),
|
|
43
45
|
} );
|
|
44
46
|
},
|
|
45
47
|
},
|
package/src/embed/util.js
CHANGED
|
@@ -42,7 +42,7 @@ export const getEmbedInfoByProvider = ( provider ) =>
|
|
|
42
42
|
* Returns true if any of the regular expressions match the URL.
|
|
43
43
|
*
|
|
44
44
|
* @param {string} url The URL to test.
|
|
45
|
-
* @param {Array} patterns The list of regular expressions to test
|
|
45
|
+
* @param {Array} patterns The list of regular expressions to test against.
|
|
46
46
|
* @return {boolean} True if any of the regular expressions match the URL.
|
|
47
47
|
*/
|
|
48
48
|
export const matchesPatterns = ( url, patterns = [] ) =>
|
package/src/file/edit.js
CHANGED
|
@@ -255,11 +255,12 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
255
255
|
<div { ...blockProps }>
|
|
256
256
|
{ displayPreviewInEditor && (
|
|
257
257
|
<ResizableBox
|
|
258
|
-
size={ { height: previewHeight } }
|
|
258
|
+
size={ { height: previewHeight, width: '100%' } }
|
|
259
259
|
minHeight={ MIN_PREVIEW_HEIGHT }
|
|
260
260
|
maxHeight={ MAX_PREVIEW_HEIGHT }
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
// The horizontal grid value must be 1 or else the width may snap during a
|
|
262
|
+
// resize even though only vertical resizing is enabled.
|
|
263
|
+
grid={ [ 1, 10 ] }
|
|
263
264
|
enable={ {
|
|
264
265
|
top: false,
|
|
265
266
|
right: false,
|
|
@@ -15,8 +15,8 @@ const initialHtml = `
|
|
|
15
15
|
<div class="wp-block-file"><a href="https://wordpress.org/latest.zip">WordPress.zip</a><a href="https://wordpress.org/latest.zip" class="wp-block-file__button wp-element-button" download>Download</a></div>
|
|
16
16
|
<!-- /wp:file -->`;
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
const blockTransforms = [ ...
|
|
18
|
+
const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
|
|
19
|
+
const blockTransforms = [ ...transformsWithInnerBlocks ];
|
|
20
20
|
|
|
21
21
|
setupCoreBlocks();
|
|
22
22
|
|
|
@@ -25,7 +25,8 @@ describe( `${ block } block transformations`, () => {
|
|
|
25
25
|
const screen = await initializeEditor( { initialHtml } );
|
|
26
26
|
const newBlock = await transformBlock( screen, block, blockTransform, {
|
|
27
27
|
isMediaBlock: false,
|
|
28
|
-
hasInnerBlocks:
|
|
28
|
+
hasInnerBlocks:
|
|
29
|
+
transformsWithInnerBlocks.includes( blockTransform ),
|
|
29
30
|
} );
|
|
30
31
|
expect( newBlock ).toBeVisible();
|
|
31
32
|
expect( getEditorHtml() ).toMatchSnapshot();
|
package/src/file/transforms.js
CHANGED
|
@@ -14,7 +14,7 @@ const transforms = {
|
|
|
14
14
|
isMatch( files ) {
|
|
15
15
|
return files.length > 0;
|
|
16
16
|
},
|
|
17
|
-
// We define a lower
|
|
17
|
+
// We define a lower priority (higher number) than the default of 10. This
|
|
18
18
|
// ensures that the File block is only created as a fallback.
|
|
19
19
|
priority: 15,
|
|
20
20
|
transform: ( files ) => {
|
package/src/file/utils/index.js
CHANGED
package/src/form/variations.js
CHANGED
|
@@ -61,7 +61,7 @@ const variations = [
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
name: 'wp-privacy-form',
|
|
64
|
-
title: __( 'Experimental
|
|
64
|
+
title: __( 'Experimental Privacy Request Form' ),
|
|
65
65
|
keywords: [ 'GDPR' ],
|
|
66
66
|
description: __( 'A form to request data exports and/or deletion.' ),
|
|
67
67
|
attributes: {
|
package/src/form-input/edit.js
CHANGED
|
@@ -77,7 +77,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
77
77
|
} );
|
|
78
78
|
} }
|
|
79
79
|
help={ __(
|
|
80
|
-
'Affects the "name"
|
|
80
|
+
'Affects the "name" attribute of the input element, and is used as a name for the form submission results.'
|
|
81
81
|
) }
|
|
82
82
|
/>
|
|
83
83
|
</InspectorControls>
|
package/src/freeform/editor.scss
CHANGED
|
@@ -240,12 +240,13 @@
|
|
|
240
240
|
|
|
241
241
|
div[data-type="core/freeform"] {
|
|
242
242
|
&::before {
|
|
243
|
-
transition: border-color 0.1s linear, box-shadow 0.1s linear;
|
|
244
|
-
@include reduce-motion("transition");
|
|
245
243
|
border: $border-width solid $gray-300;
|
|
246
|
-
|
|
247
244
|
// Windows High Contrast mode will show this outline.
|
|
248
245
|
outline: $border-width solid transparent;
|
|
246
|
+
|
|
247
|
+
@media not (prefers-reduced-motion) {
|
|
248
|
+
transition: border-color 0.1s linear, box-shadow 0.1s linear;
|
|
249
|
+
}
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
&.is-selected::before {
|
package/src/gallery/edit.js
CHANGED
|
@@ -80,7 +80,7 @@ const LINK_OPTIONS = [
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
icon: fullscreen,
|
|
83
|
-
label: __( '
|
|
83
|
+
label: __( 'Enlarge on click' ),
|
|
84
84
|
value: LINK_DESTINATION_LIGHTBOX,
|
|
85
85
|
noticeText: __( 'Lightbox effect' ),
|
|
86
86
|
infoText: __( 'Scale images with a lightbox effect' ),
|
package/src/gallery/editor.scss
CHANGED
|
@@ -117,10 +117,6 @@
|
|
|
117
117
|
opacity: 0.3;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.is-selected .block-library-gallery-item__inline-menu {
|
|
121
|
-
display: inline-flex;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
120
|
.block-editor-media-placeholder {
|
|
125
121
|
margin: 0;
|
|
126
122
|
height: 100%;
|
|
@@ -131,56 +127,6 @@
|
|
|
131
127
|
}
|
|
132
128
|
}
|
|
133
129
|
|
|
134
|
-
.block-library-gallery-item__inline-menu {
|
|
135
|
-
display: none;
|
|
136
|
-
position: absolute;
|
|
137
|
-
top: -2px;
|
|
138
|
-
margin: $grid-unit-10;
|
|
139
|
-
z-index: z-index(".block-library-gallery-item__inline-menu");
|
|
140
|
-
transition: box-shadow 0.2s ease-out;
|
|
141
|
-
@include reduce-motion("transition");
|
|
142
|
-
border-radius: $radius-small;
|
|
143
|
-
background: $white;
|
|
144
|
-
border: $border-width solid $gray-900;
|
|
145
|
-
|
|
146
|
-
&:hover {
|
|
147
|
-
box-shadow: $elevation-x-small;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
@include break-small() {
|
|
151
|
-
// Use smaller buttons to fit when there are many columns.
|
|
152
|
-
.columns-7 &,
|
|
153
|
-
.columns-8 & {
|
|
154
|
-
padding: $grid-unit-05 * 0.5;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.components-button.has-icon {
|
|
159
|
-
&:not(:focus) {
|
|
160
|
-
border: none;
|
|
161
|
-
box-shadow: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@include break-small() {
|
|
165
|
-
// Use smaller buttons to fit when there are many columns.
|
|
166
|
-
.columns-7 &,
|
|
167
|
-
.columns-8 & {
|
|
168
|
-
padding: 0;
|
|
169
|
-
width: inherit;
|
|
170
|
-
height: inherit;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&.is-left {
|
|
176
|
-
left: -2px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&.is-right {
|
|
180
|
-
right: -2px;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
130
|
.wp-block-gallery ul.blocks-gallery-grid {
|
|
185
131
|
padding: 0;
|
|
186
132
|
// Some themes give all <ul> default margin instead of padding.
|
|
@@ -25,8 +25,8 @@ const initialHtml = `
|
|
|
25
25
|
<!-- /wp:image --></figure>
|
|
26
26
|
<!-- /wp:gallery -->`;
|
|
27
27
|
|
|
28
|
-
const
|
|
29
|
-
const blockTransforms = [ 'Image', ...
|
|
28
|
+
const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
|
|
29
|
+
const blockTransforms = [ 'Image', ...transformsWithInnerBlocks ];
|
|
30
30
|
|
|
31
31
|
setupCoreBlocks();
|
|
32
32
|
|
|
@@ -35,7 +35,8 @@ describe( `${ block } block transformations`, () => {
|
|
|
35
35
|
const screen = await initializeEditor( { initialHtml } );
|
|
36
36
|
const newBlock = await transformBlock( screen, block, blockTransform, {
|
|
37
37
|
isMediaBlock: true,
|
|
38
|
-
hasInnerBlocks:
|
|
38
|
+
hasInnerBlocks:
|
|
39
|
+
transformsWithInnerBlocks.includes( blockTransform ),
|
|
39
40
|
} );
|
|
40
41
|
expect( newBlock ).toBeVisible();
|
|
41
42
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -25,7 +25,7 @@ const parseShortcodeIds = ( ids ) => {
|
|
|
25
25
|
/**
|
|
26
26
|
* Third party block plugins don't have an easy way to detect if the
|
|
27
27
|
* innerBlocks version of the Gallery is running when they run a
|
|
28
|
-
* 3rdPartyBlock -> GalleryBlock transform so this
|
|
28
|
+
* 3rdPartyBlock -> GalleryBlock transform so this transform filter
|
|
29
29
|
* will handle this. Once the innerBlocks version is the default
|
|
30
30
|
* in a core release, this could be deprecated and removed after
|
|
31
31
|
* plugin authors have been given time to update transforms.
|
|
@@ -189,7 +189,7 @@ const transforms = {
|
|
|
189
189
|
// When created by drag and dropping multiple files on an insertion point. Because multiple
|
|
190
190
|
// files must not be transformed to a gallery when dropped within a gallery there is another transform
|
|
191
191
|
// within the image block to handle that case. Therefore this transform has to have priority 1
|
|
192
|
-
// set so that it
|
|
192
|
+
// set so that it overrides the image block transformation when multiple images are dropped outside
|
|
193
193
|
// of a gallery block.
|
|
194
194
|
type: 'files',
|
|
195
195
|
priority: 1,
|
|
@@ -56,7 +56,7 @@ export default function useGetNewImages( images, imageData ) {
|
|
|
56
56
|
currentImage.clientId === image.clientId
|
|
57
57
|
) &&
|
|
58
58
|
imageData?.find( ( img ) => img.id === image.id ) &&
|
|
59
|
-
! image.
|
|
59
|
+
! image.fromSavedContent
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
if ( imagesUpdated || newImages?.length > 0 ) {
|
package/src/group/edit.js
CHANGED
|
@@ -18,6 +18,7 @@ import { View } from '@wordpress/primitives';
|
|
|
18
18
|
* Internal dependencies
|
|
19
19
|
*/
|
|
20
20
|
import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
|
|
21
|
+
import { htmlElementMessages } from '../utils/messages';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Render inspector controls for the Group block.
|
|
@@ -29,26 +30,6 @@ import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
|
|
|
29
30
|
* @return {JSX.Element} The control group.
|
|
30
31
|
*/
|
|
31
32
|
function GroupEditControls( { tagName, onSelectTagName } ) {
|
|
32
|
-
const htmlElementMessages = {
|
|
33
|
-
header: __(
|
|
34
|
-
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
|
|
35
|
-
),
|
|
36
|
-
main: __(
|
|
37
|
-
'The <main> element should be used for the primary content of your document only.'
|
|
38
|
-
),
|
|
39
|
-
section: __(
|
|
40
|
-
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
|
|
41
|
-
),
|
|
42
|
-
article: __(
|
|
43
|
-
'The <article> element should represent a self-contained, syndicatable portion of the document.'
|
|
44
|
-
),
|
|
45
|
-
aside: __(
|
|
46
|
-
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
|
|
47
|
-
),
|
|
48
|
-
footer: __(
|
|
49
|
-
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
|
|
50
|
-
),
|
|
51
|
-
};
|
|
52
33
|
return (
|
|
53
34
|
<InspectorControls group="advanced">
|
|
54
35
|
<SelectControl
|
package/src/home-link/edit.js
CHANGED
|
@@ -51,12 +51,6 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
|
|
|
51
51
|
aria-label={ __( 'Home link text' ) }
|
|
52
52
|
placeholder={ __( 'Add home link' ) }
|
|
53
53
|
withoutInteractiveFormatting
|
|
54
|
-
allowedFormats={ [
|
|
55
|
-
'core/bold',
|
|
56
|
-
'core/italic',
|
|
57
|
-
'core/image',
|
|
58
|
-
'core/strikethrough',
|
|
59
|
-
] }
|
|
60
54
|
/>
|
|
61
55
|
</a>
|
|
62
56
|
</div>
|
package/src/image/block.json
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
"name": "core/image",
|
|
5
5
|
"title": "Image",
|
|
6
6
|
"category": "media",
|
|
7
|
-
"usesContext": [
|
|
7
|
+
"usesContext": [
|
|
8
|
+
"allowResize",
|
|
9
|
+
"imageCrop",
|
|
10
|
+
"fixedHeight",
|
|
11
|
+
"postId",
|
|
12
|
+
"postType",
|
|
13
|
+
"queryId"
|
|
14
|
+
],
|
|
8
15
|
"description": "Insert an image to make a visual statement.",
|
|
9
16
|
"keywords": [ "img", "photo", "picture" ],
|
|
10
17
|
"textdomain": "default",
|
package/src/image/editor.scss
CHANGED