@wordpress/block-library 7.7.0 → 7.10.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 +6 -0
- package/build/audio/edit.js +1 -0
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +6 -1
- package/build/audio/index.js.map +1 -1
- package/build/audio/save.js +2 -1
- package/build/audio/save.js.map +1 -1
- package/build/avatar/hooks.js +2 -2
- package/build/avatar/hooks.js.map +1 -1
- package/build/block/edit.js.map +1 -1
- package/build/block/edit.native.js.map +1 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/save.js +1 -1
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/edit.native.js.map +1 -1
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js.map +1 -1
- package/build/column/edit.native.js.map +1 -1
- package/build/columns/deprecated.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/columns/index.js.map +1 -1
- package/build/columns/utils.js +1 -1
- package/build/columns/utils.js.map +1 -1
- package/build/columns/variations.js +2 -2
- package/build/columns/variations.js.map +1 -1
- package/build/comment-author-name/edit.js +3 -3
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-author-name/index.js +0 -4
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-date/edit.js +4 -4
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-date/index.js +0 -4
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +0 -4
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +0 -4
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/index.js +1 -1
- package/build/comments/deprecated.js +65 -0
- package/build/comments/deprecated.js.map +1 -0
- package/build/comments/edit.js +10 -2
- package/build/comments/edit.js.map +1 -1
- package/build/comments/index.js +5 -2
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination/index.js +1 -1
- package/build/comments-title/deprecated.js +1 -4
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/edit.js +1 -1
- package/build/comments-title/edit.js.map +1 -1
- package/build/comments-title/index.js +1 -1
- package/build/cover/controls.native.js.map +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +5 -22
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/edit/cover-placeholder.js +3 -1
- package/build/cover/edit/cover-placeholder.js.map +1 -1
- package/build/cover/edit/index.js +38 -30
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +34 -6
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js.map +1 -1
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/deprecated.js +6 -1
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-controls.native.js.map +1 -1
- package/build/embed/embed-preview.js +1 -0
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/icons.js +21 -1
- package/build/embed/icons.js.map +1 -1
- package/build/embed/index.js +6 -1
- package/build/embed/index.js.map +1 -1
- package/build/embed/save.js +1 -0
- package/build/embed/save.js.map +1 -1
- package/build/embed/transforms.js +6 -1
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +6 -1
- package/build/embed/util.js.map +1 -1
- package/build/embed/variations.js +11 -0
- package/build/embed/variations.js.map +1 -1
- package/build/file/edit.js +1 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/edit.native.js.map +1 -1
- package/build/file/index.js.map +1 -1
- package/build/file/save.js +1 -1
- package/build/file/save.js.map +1 -1
- package/build/gallery/edit.js +10 -18
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +1 -1
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +27 -10
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +32 -22
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-media.js +7 -18
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/v1/edit.js +3 -3
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery-image.js +1 -0
- package/build/gallery/v1/gallery-image.js.map +1 -1
- package/build/gallery/v1/gallery-image.native.js.map +1 -1
- package/build/gallery/v1/gallery.js +1 -1
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/gallery/v1/save.js +10 -2
- package/build/gallery/v1/save.js.map +1 -1
- package/build/group/edit.js +1 -3
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/heading/autogenerate-anchors.js +7 -2
- package/build/heading/autogenerate-anchors.js.map +1 -1
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js.map +1 -1
- package/build/heading/heading-level-dropdown.js +2 -1
- package/build/heading/heading-level-dropdown.js.map +1 -1
- package/build/heading/index.js +9 -4
- package/build/heading/index.js.map +1 -1
- package/build/html/edit.js +11 -20
- package/build/html/edit.js.map +1 -1
- package/build/html/preview.js +48 -0
- package/build/html/preview.js.map +1 -0
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.native.js +2 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +1 -0
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +5 -0
- package/build/image/index.js.map +1 -1
- package/build/image/save.js +1 -0
- package/build/image/save.js.map +1 -1
- package/build/image/transforms.js.map +1 -1
- package/build/image/utils.js +2 -1
- package/build/image/utils.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/edit.js +2 -2
- package/build/latest-posts/edit.js.map +1 -1
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/list/index.js.map +1 -1
- package/build/list/v2/edit.js.map +1 -1
- package/build/list/v2/transforms.js +33 -17
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/hooks/use-backspace.js.map +1 -1
- package/build/list-item/hooks/use-enter.js +7 -4
- package/build/list-item/hooks/use-enter.js.map +1 -1
- package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +36 -15
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-space.js.map +1 -1
- package/build/media-text/deprecated.js +5 -3
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/media-container.js +3 -3
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +3 -1
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.native.js.map +1 -1
- package/build/more/edit.js +2 -4
- package/build/more/edit.js.map +1 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +1 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/index.js +9 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/use-navigation-entities.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +72 -38
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +4 -1
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/navigation/view.js +6 -1
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +14 -8
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/hooks.js +0 -16
- package/build/navigation-link/hooks.js.map +1 -1
- package/build/navigation-link/index.js +1 -1
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/view.js +6 -1
- package/build/navigation-submenu/view.js.map +1 -1
- package/build/nextpage/edit.js +1 -3
- package/build/nextpage/edit.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +2 -2
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +1 -1
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +14 -6
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +1 -1
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +10 -24
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +4 -0
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-terms/index.js +1 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/index.js +1 -0
- package/build/post-title/index.js.map +1 -1
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/query/edit/index.js +5 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -1
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/query-toolbar.js +16 -2
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +1 -1
- package/build/query/index.js.map +1 -1
- package/build/quote/v2/edit.js.map +1 -1
- package/build/search/edit.js +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js.map +1 -1
- package/build/separator/use-deprecated-opacity.js.map +1 -1
- package/build/shortcode/edit.native.js.map +1 -1
- package/build/site-logo/edit.js +8 -25
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/edit/level-toolbar.js +2 -1
- package/build/site-title/edit/level-toolbar.js.map +1 -1
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.native.js.map +1 -1
- package/build/spacer/controls.js.map +1 -1
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +1 -0
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +6 -1
- package/build/table/index.js.map +1 -1
- package/build/table/save.js +2 -1
- package/build/table/save.js.map +1 -1
- package/build/table/state.js.map +1 -1
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +4 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/utils/hooks.js +4 -1
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/index.js +1 -1
- package/build/template-part/index.js.map +1 -1
- package/build/template-part/variations.js +0 -16
- package/build/template-part/variations.js.map +1 -1
- package/build/transformationCategories.native.js.map +1 -1
- package/build/utils/clean-empty-object.js +5 -3
- package/build/utils/clean-empty-object.js.map +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +1 -0
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +43 -0
- package/build/video/edit.native.js.map +1 -1
- package/build/video/index.js +6 -1
- package/build/video/index.js.map +1 -1
- package/build/video/save.js +1 -0
- package/build/video/save.js.map +1 -1
- package/build/video/tracks-editor.js +9 -11
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/audio/edit.js +2 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +6 -1
- package/build-module/audio/index.js.map +1 -1
- package/build-module/audio/save.js +3 -2
- package/build-module/audio/save.js.map +1 -1
- package/build-module/avatar/hooks.js +2 -2
- package/build-module/avatar/hooks.js.map +1 -1
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/edit.native.js.map +1 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +2 -2
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/save.js +2 -2
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/column/deprecated.js.map +1 -1
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/edit.native.js.map +1 -1
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +2 -2
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -2
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/columns/utils.js +2 -2
- package/build-module/columns/utils.js.map +1 -1
- package/build-module/columns/variations.js +2 -2
- package/build-module/columns/variations.js.map +1 -1
- package/build-module/comment-author-name/edit.js +3 -3
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-author-name/index.js +0 -4
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-date/edit.js +4 -4
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-date/index.js +0 -4
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +0 -4
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +0 -4
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/index.js +1 -1
- package/build-module/comments/deprecated.js +54 -0
- package/build-module/comments/deprecated.js.map +1 -0
- package/build-module/comments/edit.js +10 -2
- package/build-module/comments/edit.js.map +1 -1
- package/build-module/comments/index.js +4 -2
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/index.js +1 -1
- package/build-module/comments-title/deprecated.js +1 -4
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/edit.js +1 -1
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/comments-title/index.js +1 -1
- package/build-module/cover/controls.native.js.map +1 -1
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +6 -21
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/cover-placeholder.js +3 -1
- package/build-module/cover/edit/cover-placeholder.js.map +1 -1
- package/build-module/cover/edit/index.js +39 -31
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +32 -7
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/deprecated.js +6 -1
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-controls.native.js.map +1 -1
- package/build-module/embed/embed-preview.js +2 -1
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/icons.js +19 -0
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/index.js +6 -1
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/save.js +2 -1
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/transforms.js +6 -1
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +6 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/embed/variations.js +12 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/file/edit.js +2 -2
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/save.js +2 -2
- package/build-module/file/save.js.map +1 -1
- package/build-module/gallery/edit.js +11 -18
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +2 -2
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +2 -2
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +25 -8
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +33 -23
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-media.js +6 -16
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/v1/edit.js +4 -4
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.js +2 -1
- package/build-module/gallery/v1/gallery-image.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.native.js.map +1 -1
- package/build-module/gallery/v1/gallery.js +2 -2
- package/build-module/gallery/v1/gallery.js.map +1 -1
- package/build-module/gallery/v1/save.js +8 -3
- package/build-module/gallery/v1/save.js.map +1 -1
- package/build-module/group/edit.js +1 -3
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/autogenerate-anchors.js +5 -2
- package/build-module/heading/autogenerate-anchors.js.map +1 -1
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/heading-level-dropdown.js +2 -1
- package/build-module/heading/heading-level-dropdown.js.map +1 -1
- package/build-module/heading/index.js +9 -4
- package/build-module/heading/index.js.map +1 -1
- package/build-module/html/edit.js +12 -23
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +38 -0
- package/build-module/html/preview.js.map +1 -0
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.native.js +2 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +2 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +5 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/save.js +2 -1
- package/build-module/image/save.js.map +1 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/utils.js +2 -2
- package/build-module/image/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +3 -3
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/v2/edit.js.map +1 -1
- package/build-module/list/v2/transforms.js +32 -17
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/hooks/use-backspace.js.map +1 -1
- package/build-module/list-item/hooks/use-enter.js +7 -4
- package/build-module/list-item/hooks/use-enter.js.map +1 -1
- package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +34 -15
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-space.js.map +1 -1
- package/build-module/media-text/deprecated.js +3 -1
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/media-container.js +3 -1
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +4 -1
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/more/edit.js +2 -4
- package/build-module/more/edit.js.map +1 -1
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +1 -1
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/index.js +9 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/use-navigation-entities.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +73 -39
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +4 -1
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/navigation/view.js +6 -1
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +14 -8
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/hooks.js +0 -13
- package/build-module/navigation-link/hooks.js.map +1 -1
- package/build-module/navigation-link/index.js +1 -1
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/view.js +6 -1
- package/build-module/navigation-submenu/view.js.map +1 -1
- package/build-module/nextpage/edit.js +1 -3
- package/build-module/nextpage/edit.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +2 -2
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +2 -2
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +14 -7
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -2
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +10 -23
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +4 -0
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-terms/index.js +1 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/index.js +1 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +5 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +14 -2
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +1 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/quote/v2/edit.js.map +1 -1
- package/build-module/search/edit.js +2 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/separator/use-deprecated-opacity.js.map +1 -1
- package/build-module/shortcode/edit.native.js.map +1 -1
- package/build-module/site-logo/edit.js +8 -24
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/edit/level-toolbar.js +2 -1
- package/build-module/site-title/edit/level-toolbar.js.map +1 -1
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.native.js.map +1 -1
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +2 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +6 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/save.js +3 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/table/state.js.map +1 -1
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +4 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/utils/hooks.js +4 -1
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/index.js +1 -1
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/template-part/variations.js +0 -13
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/transformationCategories.native.js.map +1 -1
- package/build-module/utils/clean-empty-object.js +5 -2
- package/build-module/utils/clean-empty-object.js.map +1 -1
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +2 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +42 -1
- package/build-module/video/edit.native.js.map +1 -1
- package/build-module/video/index.js +6 -1
- package/build-module/video/index.js.map +1 -1
- package/build-module/video/save.js +2 -1
- package/build-module/video/save.js.map +1 -1
- package/build-module/video/tracks-editor.js +9 -11
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/audio/style-rtl.css +0 -3
- package/build-style/audio/style.css +0 -3
- package/build-style/button/style-rtl.css +5 -5
- package/build-style/button/style.css +5 -5
- package/build-style/comment-template/style-rtl.css +12 -0
- package/build-style/comment-template/style.css +12 -0
- package/build-style/common-rtl.css +1 -3
- package/build-style/common.css +1 -3
- package/build-style/cover/editor-rtl.css +11 -0
- package/build-style/cover/editor.css +11 -0
- package/build-style/cover/style-rtl.css +1 -2
- package/build-style/cover/style.css +1 -2
- package/build-style/editor-rtl.css +15 -40
- package/build-style/editor.css +15 -40
- package/build-style/elements-rtl.css +82 -0
- package/build-style/elements.css +82 -0
- package/build-style/embed/style-rtl.css +0 -1
- package/build-style/embed/style.css +0 -1
- package/build-style/file/style-rtl.css +11 -12
- package/build-style/file/style.css +11 -12
- package/build-style/gallery/style-rtl.css +2 -4
- package/build-style/gallery/style.css +2 -4
- package/build-style/image/style-rtl.css +0 -3
- package/build-style/image/style.css +0 -3
- package/build-style/navigation/style-rtl.css +9 -1
- package/build-style/navigation/style.css +9 -1
- package/build-style/post-comments/style-rtl.css +2 -1
- package/build-style/post-comments/style.css +2 -1
- package/build-style/post-comments-form/editor-rtl.css +3 -0
- package/build-style/post-comments-form/editor.css +3 -0
- package/build-style/post-featured-image/editor-rtl.css +0 -27
- package/build-style/post-featured-image/editor.css +0 -27
- package/build-style/post-template/style-rtl.css +9 -18
- package/build-style/post-template/style.css +9 -18
- package/build-style/query/editor-rtl.css +1 -1
- package/build-style/query/editor.css +1 -1
- package/build-style/search/style-rtl.css +9 -11
- package/build-style/search/style.css +9 -11
- package/build-style/search/theme-rtl.css +5 -0
- package/build-style/search/theme.css +5 -0
- package/build-style/site-logo/editor-rtl.css +0 -12
- package/build-style/site-logo/editor.css +0 -12
- package/build-style/style-rtl.css +69 -70
- package/build-style/style.css +69 -70
- package/build-style/table/style-rtl.css +0 -1
- package/build-style/table/style.css +0 -1
- package/build-style/theme-rtl.css +5 -0
- package/build-style/theme.css +5 -0
- package/build-style/video/style-rtl.css +1 -5
- package/build-style/video/style.css +1 -5
- package/package.json +30 -29
- package/src/audio/block.json +6 -1
- package/src/audio/edit.js +4 -0
- package/src/audio/index.js +1 -2
- package/src/audio/save.js +12 -2
- package/src/audio/style.scss +0 -2
- package/src/avatar/hooks.js +2 -2
- package/src/block/edit.js +4 -6
- package/src/block/edit.native.js +12 -16
- package/src/block/test/edit.native.js +5 -8
- package/src/button/deprecated.js +10 -46
- package/src/button/edit.js +6 -12
- package/src/button/edit.native.js +2 -3
- package/src/button/save.js +4 -12
- package/src/button/style.scss +10 -5
- package/src/buttons/deprecated.js +4 -6
- package/src/buttons/edit.js +3 -3
- package/src/buttons/edit.native.js +7 -11
- package/src/column/deprecated.js +2 -1
- package/src/column/edit.js +2 -3
- package/src/column/edit.native.js +2 -2
- package/src/columns/deprecated.js +4 -2
- package/src/columns/edit.js +6 -7
- package/src/columns/edit.native.js +12 -16
- package/src/columns/index.js +1 -2
- package/src/columns/utils.js +5 -3
- package/src/columns/variations.js +2 -2
- package/src/comment-author-name/block.json +0 -4
- package/src/comment-author-name/edit.js +3 -12
- package/src/comment-date/block.json +0 -4
- package/src/comment-date/edit.js +10 -14
- package/src/comment-date/index.php +0 -3
- package/src/comment-edit-link/block.json +0 -4
- package/src/comment-reply-link/block.json +0 -4
- package/src/comment-template/block.json +1 -1
- package/src/comment-template/style.scss +14 -0
- package/src/comments/block.json +1 -1
- package/src/comments/deprecated.js +53 -0
- package/src/comments/edit.js +24 -4
- package/src/comments/index.js +2 -0
- package/src/comments-pagination/block.json +1 -1
- package/src/comments-title/block.json +1 -1
- package/src/comments-title/deprecated.js +0 -2
- package/src/comments-title/edit.js +1 -1
- package/src/comments-title/index.php +1 -1
- package/src/cover/block.json +1 -0
- package/src/cover/controls.native.js +2 -4
- package/src/cover/deprecated.js +10 -15
- package/src/cover/edit/block-controls.js +15 -40
- package/src/cover/edit/cover-placeholder.js +2 -0
- package/src/cover/edit/index.js +74 -55
- package/src/cover/edit/inspector-controls.js +38 -7
- package/src/cover/edit.native.js +8 -13
- package/src/cover/editor.scss +13 -0
- package/src/cover/index.php +21 -8
- package/src/cover/save.js +2 -3
- package/src/cover/test/edit.native.js +4 -7
- package/src/cover/transforms.js +2 -7
- package/src/elements.scss +6 -0
- package/src/embed/block.json +6 -1
- package/src/embed/edit.js +38 -40
- package/src/embed/edit.native.js +46 -49
- package/src/embed/embed-controls.native.js +2 -3
- package/src/embed/embed-preview.js +8 -1
- package/src/embed/icons.js +25 -0
- package/src/embed/save.js +10 -2
- package/src/embed/style.scss +0 -1
- package/src/embed/test/__snapshots__/index.native.js.snap +1 -1
- package/src/embed/test/index.native.js +24 -50
- package/src/embed/variations.js +10 -0
- package/src/file/edit.js +6 -6
- package/src/file/edit.native.js +14 -25
- package/src/file/index.js +1 -2
- package/src/file/save.js +2 -2
- package/src/file/style.scss +16 -15
- package/src/freeform/editor.scss +0 -2
- package/src/gallery/edit.js +16 -27
- package/src/gallery/gallery.js +9 -2
- package/src/gallery/gallery.native.js +2 -4
- package/src/gallery/index.js +2 -4
- package/src/gallery/index.php +5 -1
- package/src/gallery/save.js +5 -1
- package/src/gallery/shared.js +22 -9
- package/src/gallery/test/__snapshots__/index.native.js.snap +2 -2
- package/src/gallery/test/helpers.native.js +11 -198
- package/src/gallery/test/index.native.js +37 -63
- package/src/gallery/transforms.js +28 -13
- package/src/gallery/use-get-media.js +11 -28
- package/src/gallery/v1/edit.js +18 -24
- package/src/gallery/v1/gallery-image.js +10 -11
- package/src/gallery/v1/gallery-image.native.js +8 -17
- package/src/gallery/v1/gallery.js +8 -2
- package/src/gallery/v1/save.js +20 -3
- package/src/group/block.json +1 -0
- package/src/group/edit.js +1 -3
- package/src/heading/autogenerate-anchors.js +8 -5
- package/src/heading/deprecated.js +6 -21
- package/src/heading/edit.js +2 -3
- package/src/heading/heading-level-dropdown.js +1 -0
- package/src/heading/index.js +8 -2
- package/src/html/edit.js +10 -40
- package/src/html/preview.js +46 -0
- package/src/image/block.json +5 -0
- package/src/image/deprecated.js +6 -29
- package/src/image/edit.native.js +15 -26
- package/src/image/image.js +33 -38
- package/src/image/save.js +10 -2
- package/src/image/style.scss +0 -2
- package/src/image/test/edit.native.js +51 -19
- package/src/image/transforms.js +4 -3
- package/src/image/utils.js +2 -2
- package/src/index.js +1 -1
- package/src/latest-comments/edit.js +2 -6
- package/src/latest-posts/edit.js +7 -12
- package/src/latest-posts/edit.native.js +10 -15
- package/src/list/index.js +1 -2
- package/src/list/test/migrate.js +1 -2
- package/src/list/v2/edit.js +6 -9
- package/src/list/v2/transforms.js +22 -7
- package/src/list-item/hooks/use-backspace.js +2 -3
- package/src/list-item/hooks/use-enter.js +11 -9
- package/src/list-item/hooks/use-indent-list-item.js +2 -3
- package/src/list-item/hooks/use-outdent-list-item.js +50 -24
- package/src/list-item/hooks/use-space.js +2 -3
- package/src/media-text/deprecated.js +6 -3
- package/src/media-text/edit.native.js +2 -5
- package/src/media-text/media-container.js +1 -1
- package/src/media-text/media-container.native.js +6 -9
- package/src/media-text/save.js +2 -1
- package/src/missing/edit.native.js +2 -3
- package/src/missing/test/edit-integration.native.js +2 -3
- package/src/missing/test/edit.native.js +6 -9
- package/src/more/edit.js +9 -11
- package/src/navigation/block.json +9 -0
- package/src/navigation/deprecated.js +2 -5
- package/src/navigation/edit/index.js +25 -36
- package/src/navigation/edit/navigation-menu-delete-control.js +2 -3
- package/src/navigation/edit/unsaved-inner-blocks.js +31 -30
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
- package/src/navigation/style.scss +11 -2
- package/src/navigation/test/use-navigation-menu.js +241 -0
- package/src/navigation/use-navigation-entities.js +11 -13
- package/src/navigation/use-navigation-menu.js +95 -82
- package/src/navigation/use-template-part-area-label.js +8 -7
- package/src/navigation/view.js +6 -1
- package/src/navigation-link/edit.js +24 -20
- package/src/navigation-link/hooks.js +0 -14
- package/src/navigation-link/index.js +1 -1
- package/src/navigation-link/test/__snapshots__/hooks.js.snap +0 -93
- package/src/navigation-link/test/edit.js +2 -4
- package/src/navigation-link/test/hooks.js +0 -12
- package/src/navigation-submenu/edit.js +10 -20
- package/src/navigation-submenu/view.js +6 -1
- package/src/nextpage/edit.js +1 -3
- package/src/page-list/convert-to-links-modal.js +51 -54
- package/src/page-list/edit.js +9 -11
- package/src/page-list/test/convert-to-links-modal.js +6 -12
- package/src/paragraph/deprecated.js +2 -2
- package/src/pattern/edit.js +2 -4
- package/src/post-author/edit.js +2 -3
- package/src/post-comments/index.php +1 -1
- package/src/post-comments/style.scss +7 -3
- package/src/post-comments-form/edit.js +24 -10
- package/src/post-comments-form/editor.scss +4 -0
- package/src/post-comments-form/form.js +2 -2
- package/src/post-comments-form/index.php +1 -1
- package/src/post-content/edit.js +2 -3
- package/src/post-featured-image/edit.js +14 -30
- package/src/post-featured-image/editor.scss +0 -29
- package/src/post-featured-image/index.php +4 -2
- package/src/post-navigation-link/block.json +4 -0
- package/src/post-template/index.php +23 -17
- package/src/post-template/style.scss +1 -7
- package/src/post-terms/index.js +1 -1
- package/src/post-title/block.json +1 -0
- package/src/pullquote/deprecated.js +2 -1
- package/src/query/edit/index.js +10 -10
- package/src/query/edit/inspector-controls/index.js +1 -1
- package/src/query/edit/inspector-controls/parent-control.js +2 -3
- package/src/query/edit/query-toolbar.js +25 -5
- package/src/query/editor.scss +1 -1
- package/src/query/index.js +1 -1
- package/src/query-no-results/index.php +10 -8
- package/src/quote/v2/edit.js +4 -6
- package/src/quote/v2/test/migrate.js +1 -2
- package/src/search/edit.js +8 -14
- package/src/search/edit.native.js +4 -6
- package/src/search/index.php +12 -10
- package/src/search/style.scss +11 -9
- package/src/search/theme.scss +5 -0
- package/src/separator/use-deprecated-opacity.js +2 -4
- package/src/shortcode/edit.native.js +4 -3
- package/src/shortcode/test/edit.native.js +2 -5
- package/src/site-logo/edit.js +5 -28
- package/src/site-logo/editor.scss +0 -14
- package/src/site-title/edit/level-toolbar.js +1 -0
- package/src/social-link/index.php +16 -0
- package/src/social-links/deprecated.js +4 -2
- package/src/social-links/edit.native.js +3 -5
- package/src/spacer/controls.js +2 -3
- package/src/spacer/test/index.native.js +10 -21
- package/src/style.scss +1 -0
- package/src/table/block.json +6 -1
- package/src/table/deprecated.js +4 -8
- package/src/table/edit.js +2 -0
- package/src/table/save.js +6 -1
- package/src/table/state.js +2 -4
- package/src/table/style.scss +0 -1
- package/src/table-of-contents/edit.js +6 -10
- package/src/tag-cloud/edit.js +4 -7
- package/src/template-part/edit/advanced-controls.js +4 -4
- package/src/template-part/edit/index.js +6 -10
- package/src/template-part/edit/utils/hooks.js +8 -7
- package/src/template-part/index.js +1 -1
- package/src/template-part/variations.js +0 -11
- package/src/transformationCategories.native.js +3 -3
- package/src/utils/clean-empty-object.js +8 -2
- package/src/video/block.json +6 -1
- package/src/video/edit-common-settings.js +2 -8
- package/src/video/edit.js +4 -0
- package/src/video/edit.native.js +38 -16
- package/src/video/index.js +1 -2
- package/src/video/save.js +10 -2
- package/src/video/style.scss +0 -2
- package/src/video/tracks-editor.js +1 -1
- package/build/gallery/use-short-code-transform.js +0 -64
- package/build/gallery/use-short-code-transform.js.map +0 -1
- package/build/navigation-link/fallback-variations.js +0 -75
- package/build/navigation-link/fallback-variations.js.map +0 -1
- package/build/template-part/fallback-variations.js +0 -59
- package/build/template-part/fallback-variations.js.map +0 -1
- package/build-module/gallery/use-short-code-transform.js +0 -54
- package/build-module/gallery/use-short-code-transform.js.map +0 -1
- package/build-module/navigation-link/fallback-variations.js +0 -65
- package/build-module/navigation-link/fallback-variations.js.map +0 -1
- package/build-module/template-part/fallback-variations.js +0 -47
- package/build-module/template-part/fallback-variations.js.map +0 -1
- package/src/gallery/use-short-code-transform.js +0 -55
- package/src/navigation-link/fallback-variations.js +0 -65
- package/src/template-part/fallback-variations.js +0 -51
package/src/search/theme.scss
CHANGED
|
@@ -9,10 +9,8 @@ export default function useDeprecatedOpacity(
|
|
|
9
9
|
currentColor,
|
|
10
10
|
setAttributes
|
|
11
11
|
) {
|
|
12
|
-
const [
|
|
13
|
-
|
|
14
|
-
setDeprecatedOpacityWithNoColor,
|
|
15
|
-
] = useState( false );
|
|
12
|
+
const [ deprecatedOpacityWithNoColor, setDeprecatedOpacityWithNoColor ] =
|
|
13
|
+
useState( false );
|
|
16
14
|
const previousColor = usePrevious( currentColor );
|
|
17
15
|
|
|
18
16
|
// A separator with no color set will always have previousColor set to undefined,
|
|
@@ -48,9 +48,10 @@ export function ShortcodeEdit( props ) {
|
|
|
48
48
|
shortcodeContainerStyle.paddingLeft +
|
|
49
49
|
shortcodeContainerStyle.paddingRight;
|
|
50
50
|
|
|
51
|
-
const onChange = useCallback(
|
|
52
|
-
setAttributes,
|
|
53
|
-
|
|
51
|
+
const onChange = useCallback(
|
|
52
|
+
( text ) => setAttributes( { text } ),
|
|
53
|
+
[ setAttributes ]
|
|
54
|
+
);
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
57
|
<View>
|
|
@@ -28,11 +28,8 @@ afterAll( () => {
|
|
|
28
28
|
|
|
29
29
|
describe( 'Shortcode block', () => {
|
|
30
30
|
it( 'inserts block', async () => {
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
getByTestId,
|
|
34
|
-
getByText,
|
|
35
|
-
} = await initializeEditor();
|
|
31
|
+
const { getByA11yLabel, getByTestId, getByText } =
|
|
32
|
+
await initializeEditor();
|
|
36
33
|
|
|
37
34
|
fireEvent.press( getByA11yLabel( 'Add block' ) );
|
|
38
35
|
|
package/src/site-logo/edit.js
CHANGED
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
41
41
|
import { store as coreStore } from '@wordpress/core-data';
|
|
42
42
|
import { crop, upload } from '@wordpress/icons';
|
|
43
|
-
import { SVG, Path } from '@wordpress/primitives';
|
|
44
43
|
import { store as noticesStore } from '@wordpress/notices';
|
|
45
44
|
|
|
46
45
|
/**
|
|
@@ -359,7 +358,6 @@ export default function LogoEdit( {
|
|
|
359
358
|
isSelected,
|
|
360
359
|
} ) {
|
|
361
360
|
const { width, shouldSyncIcon } = attributes;
|
|
362
|
-
const [ logoUrl, setLogoUrl ] = useState();
|
|
363
361
|
const ref = useRef();
|
|
364
362
|
|
|
365
363
|
const {
|
|
@@ -370,9 +368,8 @@ export default function LogoEdit( {
|
|
|
370
368
|
mediaItemData,
|
|
371
369
|
isRequestingMediaItem,
|
|
372
370
|
} = useSelect( ( select ) => {
|
|
373
|
-
const { canUser, getEntityRecord, getEditedEntityRecord } =
|
|
374
|
-
coreStore
|
|
375
|
-
);
|
|
371
|
+
const { canUser, getEntityRecord, getEditedEntityRecord } =
|
|
372
|
+
select( coreStore );
|
|
376
373
|
const siteSettings = getEditedEntityRecord( 'root', 'site' );
|
|
377
374
|
const siteData = getEntityRecord( 'root', '__unstableBase' );
|
|
378
375
|
const _siteLogo = siteSettings?.site_logo;
|
|
@@ -422,13 +419,7 @@ export default function LogoEdit( {
|
|
|
422
419
|
site_icon: newValue ?? null,
|
|
423
420
|
} );
|
|
424
421
|
|
|
425
|
-
|
|
426
|
-
if ( mediaItemData ) {
|
|
427
|
-
alt = mediaItemData.alt_text;
|
|
428
|
-
if ( logoUrl !== mediaItemData.source_url ) {
|
|
429
|
-
setLogoUrl( mediaItemData.source_url );
|
|
430
|
-
}
|
|
431
|
-
}
|
|
422
|
+
const { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};
|
|
432
423
|
|
|
433
424
|
const onInitialSelectLogo = ( media ) => {
|
|
434
425
|
// Initialize the syncSiteIcon toggle. If we currently have no Site logo and no
|
|
@@ -454,7 +445,6 @@ export default function LogoEdit( {
|
|
|
454
445
|
if ( ! media.id && media.url ) {
|
|
455
446
|
// This is a temporary blob image.
|
|
456
447
|
setLogo( undefined );
|
|
457
|
-
setLogoUrl( media.url );
|
|
458
448
|
return;
|
|
459
449
|
}
|
|
460
450
|
|
|
@@ -463,7 +453,6 @@ export default function LogoEdit( {
|
|
|
463
453
|
|
|
464
454
|
const onRemoveLogo = () => {
|
|
465
455
|
setLogo( null );
|
|
466
|
-
setLogoUrl( undefined );
|
|
467
456
|
setAttributes( { width: undefined } );
|
|
468
457
|
};
|
|
469
458
|
|
|
@@ -520,20 +509,8 @@ export default function LogoEdit( {
|
|
|
520
509
|
<Placeholder
|
|
521
510
|
className={ placeholderClassName }
|
|
522
511
|
preview={ logoImage }
|
|
512
|
+
withIllustration={ true }
|
|
523
513
|
>
|
|
524
|
-
{
|
|
525
|
-
<SVG
|
|
526
|
-
className="components-placeholder__illustration"
|
|
527
|
-
fill="none"
|
|
528
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
529
|
-
viewBox="0 0 60 60"
|
|
530
|
-
>
|
|
531
|
-
<Path
|
|
532
|
-
vectorEffect="non-scaling-stroke"
|
|
533
|
-
d="m61 32.622-13.555-9.137-15.888 9.859a5 5 0 0 1-5.386-.073l-9.095-5.989L1 37.5"
|
|
534
|
-
/>
|
|
535
|
-
</SVG>
|
|
536
|
-
}
|
|
537
514
|
{ content }
|
|
538
515
|
</Placeholder>
|
|
539
516
|
);
|
|
@@ -556,7 +533,7 @@ export default function LogoEdit( {
|
|
|
556
533
|
{ !! logoUrl && logoImage }
|
|
557
534
|
{ ! logoUrl && ! canUserEdit && (
|
|
558
535
|
<Placeholder className="site-logo_placeholder">
|
|
559
|
-
{ isLoading && (
|
|
536
|
+
{ !! isLoading && (
|
|
560
537
|
<span className="components-placeholder__preview">
|
|
561
538
|
<Spinner />
|
|
562
539
|
</span>
|
|
@@ -131,20 +131,6 @@
|
|
|
131
131
|
.components-button.components-button > svg {
|
|
132
132
|
color: $white;
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
// Style the placeholder illustration.
|
|
136
|
-
.components-placeholder__illustration {
|
|
137
|
-
position: absolute;
|
|
138
|
-
top: 0;
|
|
139
|
-
right: 0;
|
|
140
|
-
bottom: 0;
|
|
141
|
-
left: 0;
|
|
142
|
-
width: 100%;
|
|
143
|
-
height: 100%;
|
|
144
|
-
stroke: currentColor;
|
|
145
|
-
stroke-dasharray: 3;
|
|
146
|
-
opacity: 0.4;
|
|
147
|
-
}
|
|
148
134
|
}
|
|
149
135
|
|
|
150
136
|
// Show upload button on block selection.
|
|
@@ -27,6 +27,22 @@ function render_block_core_social_link( $attributes, $content, $block ) {
|
|
|
27
27
|
return '';
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Prepend emails with `mailto:` if not set.
|
|
32
|
+
* The `is_email` returns false for emails with schema.
|
|
33
|
+
*/
|
|
34
|
+
if ( is_email( $url ) ) {
|
|
35
|
+
$url = 'mailto:' . $url;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Prepend URL with https:// if it doesn't appear to contain a scheme
|
|
40
|
+
* and it's not a relative link starting with //.
|
|
41
|
+
*/
|
|
42
|
+
if ( ! parse_url( $url, PHP_URL_SCHEME ) && ! str_starts_with( $url, '//' ) ) {
|
|
43
|
+
$url = 'https://' . $url;
|
|
44
|
+
}
|
|
45
|
+
|
|
30
46
|
$rel_target_attributes = '';
|
|
31
47
|
if ( $open_in_new_tab ) {
|
|
32
48
|
$rel_target_attributes = 'rel="noopener nofollow" target="_blank"';
|
|
@@ -99,12 +99,14 @@ const deprecated = [
|
|
|
99
99
|
const className = classNames( size, {
|
|
100
100
|
'has-icon-color': iconColorValue,
|
|
101
101
|
'has-icon-background-color': iconBackgroundColorValue,
|
|
102
|
-
[ `items-justified-${ itemsJustification }` ]:
|
|
102
|
+
[ `items-justified-${ itemsJustification }` ]:
|
|
103
|
+
itemsJustification,
|
|
103
104
|
} );
|
|
104
105
|
|
|
105
106
|
const style = {
|
|
106
107
|
'--wp--social-links--icon-color': iconColorValue,
|
|
107
|
-
'--wp--social-links--icon-background-color':
|
|
108
|
+
'--wp--social-links--icon-background-color':
|
|
109
|
+
iconBackgroundColorValue,
|
|
108
110
|
};
|
|
109
111
|
|
|
110
112
|
return (
|
|
@@ -68,11 +68,9 @@ function SocialLinksEdit( {
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
function renderPlaceholder() {
|
|
71
|
-
return [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<View style={ placeholderStyle } key={ index } />
|
|
75
|
-
) );
|
|
71
|
+
return [ ...new Array( innerBlocks.length || 1 ) ].map(
|
|
72
|
+
( _, index ) => <View style={ placeholderStyle } key={ index } />
|
|
73
|
+
);
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
function filterInnerBlocks( blockIds ) {
|
package/src/spacer/controls.js
CHANGED
|
@@ -43,9 +43,8 @@ function DimensionInput( { label, onChange, isResizing, value = '' } ) {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
// Force the unit to update to `px` when the Spacer is being resized.
|
|
46
|
-
const [ parsedQuantity, parsedUnit ] =
|
|
47
|
-
value
|
|
48
|
-
);
|
|
46
|
+
const [ parsedQuantity, parsedUnit ] =
|
|
47
|
+
parseQuantityAndUnitFromRawValue( value );
|
|
49
48
|
const computedValue = [
|
|
50
49
|
parsedQuantity,
|
|
51
50
|
isResizing ? 'px' : parsedUnit,
|
|
@@ -28,11 +28,8 @@ afterAll( () => {
|
|
|
28
28
|
|
|
29
29
|
describe( 'Spacer block', () => {
|
|
30
30
|
it( 'inserts block', async () => {
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
getByTestId,
|
|
34
|
-
getByText,
|
|
35
|
-
} = await initializeEditor();
|
|
31
|
+
const { getByA11yLabel, getByTestId, getByText } =
|
|
32
|
+
await initializeEditor();
|
|
36
33
|
|
|
37
34
|
fireEvent.press( getByA11yLabel( 'Add block' ) );
|
|
38
35
|
|
|
@@ -56,14 +53,10 @@ describe( 'Spacer block', () => {
|
|
|
56
53
|
const initialHtml = `<!-- wp:spacer -->
|
|
57
54
|
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
58
55
|
<!-- /wp:spacer -->`;
|
|
59
|
-
const {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
getByText,
|
|
64
|
-
} = await initializeEditor( {
|
|
65
|
-
initialHtml,
|
|
66
|
-
} );
|
|
56
|
+
const { getByA11yLabel, getByDisplayValue, getByTestId, getByText } =
|
|
57
|
+
await initializeEditor( {
|
|
58
|
+
initialHtml,
|
|
59
|
+
} );
|
|
67
60
|
|
|
68
61
|
// Select Spacer block
|
|
69
62
|
const spacerBlock = getByA11yLabel( /Spacer Block\. Row 1/ );
|
|
@@ -87,14 +80,10 @@ describe( 'Spacer block', () => {
|
|
|
87
80
|
const initialHtml = `<!-- wp:spacer -->
|
|
88
81
|
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
|
|
89
82
|
<!-- /wp:spacer -->`;
|
|
90
|
-
const {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
getByText,
|
|
95
|
-
} = await initializeEditor( {
|
|
96
|
-
initialHtml,
|
|
97
|
-
} );
|
|
83
|
+
const { getByA11yLabel, getByDisplayValue, getByTestId, getByText } =
|
|
84
|
+
await initializeEditor( {
|
|
85
|
+
initialHtml,
|
|
86
|
+
} );
|
|
98
87
|
|
|
99
88
|
// Select Spacer block
|
|
100
89
|
const spacerBlock = getByA11yLabel( /Spacer Block\. Row 1/ );
|
package/src/style.scss
CHANGED
package/src/table/block.json
CHANGED
|
@@ -156,7 +156,12 @@
|
|
|
156
156
|
"width": true
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
"__experimentalSelector": ".wp-block-table > table"
|
|
159
|
+
"__experimentalSelector": ".wp-block-table > table",
|
|
160
|
+
"__experimentalStyle": {
|
|
161
|
+
"spacing": {
|
|
162
|
+
"margin": "0 0 1em 0"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
160
165
|
},
|
|
161
166
|
"styles": [
|
|
162
167
|
{
|
package/src/table/deprecated.js
CHANGED
|
@@ -198,7 +198,8 @@ const deprecated = [
|
|
|
198
198
|
cellIndex
|
|
199
199
|
) => {
|
|
200
200
|
const cellClasses = classnames( {
|
|
201
|
-
[ `has-text-align-${ align }` ]:
|
|
201
|
+
[ `has-text-align-${ align }` ]:
|
|
202
|
+
align,
|
|
202
203
|
} );
|
|
203
204
|
|
|
204
205
|
return (
|
|
@@ -367,13 +368,8 @@ const deprecated = [
|
|
|
367
368
|
},
|
|
368
369
|
supports,
|
|
369
370
|
save( { attributes } ) {
|
|
370
|
-
const {
|
|
371
|
-
|
|
372
|
-
head,
|
|
373
|
-
body,
|
|
374
|
-
foot,
|
|
375
|
-
backgroundColor,
|
|
376
|
-
} = attributes;
|
|
371
|
+
const { hasFixedLayout, head, body, foot, backgroundColor } =
|
|
372
|
+
attributes;
|
|
377
373
|
const isEmpty = ! head.length && ! body.length && ! foot.length;
|
|
378
374
|
|
|
379
375
|
if ( isEmpty ) {
|
package/src/table/edit.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
useBlockProps,
|
|
17
17
|
__experimentalUseColorProps as useColorProps,
|
|
18
18
|
__experimentalUseBorderProps as useBorderProps,
|
|
19
|
+
__experimentalGetElementClassName,
|
|
19
20
|
} from '@wordpress/block-editor';
|
|
20
21
|
import { __ } from '@wordpress/i18n';
|
|
21
22
|
import {
|
|
@@ -509,6 +510,7 @@ function TableEdit( {
|
|
|
509
510
|
{ ! isEmpty && (
|
|
510
511
|
<RichText
|
|
511
512
|
tagName="figcaption"
|
|
513
|
+
className={ __experimentalGetElementClassName( 'caption' ) }
|
|
512
514
|
aria-label={ __( 'Table caption text' ) }
|
|
513
515
|
placeholder={ __( 'Add caption' ) }
|
|
514
516
|
value={ caption }
|
package/src/table/save.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
useBlockProps,
|
|
12
12
|
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
|
|
13
13
|
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
|
|
14
|
+
__experimentalGetElementClassName,
|
|
14
15
|
} from '@wordpress/block-editor';
|
|
15
16
|
|
|
16
17
|
export default function save( { attributes } ) {
|
|
@@ -82,7 +83,11 @@ export default function save( { attributes } ) {
|
|
|
82
83
|
<Section type="foot" rows={ foot } />
|
|
83
84
|
</table>
|
|
84
85
|
{ hasCaption && (
|
|
85
|
-
<RichText.Content
|
|
86
|
+
<RichText.Content
|
|
87
|
+
tagName="figcaption"
|
|
88
|
+
value={ caption }
|
|
89
|
+
className={ __experimentalGetElementClassName( 'caption' ) }
|
|
90
|
+
/>
|
|
86
91
|
) }
|
|
87
92
|
</figure>
|
|
88
93
|
);
|
package/src/table/state.js
CHANGED
|
@@ -79,10 +79,8 @@ export function updateSelectedCell( state, selection, updateCell ) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
const tableSections = pick( state, [ 'head', 'body', 'foot' ] );
|
|
82
|
-
const {
|
|
83
|
-
|
|
84
|
-
rowIndex: selectionRowIndex,
|
|
85
|
-
} = selection;
|
|
82
|
+
const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } =
|
|
83
|
+
selection;
|
|
86
84
|
|
|
87
85
|
return mapValues( tableSections, ( section, sectionName ) => {
|
|
88
86
|
if ( selectionSectionName && selectionSectionName !== sectionName ) {
|
package/src/table/style.scss
CHANGED
|
@@ -59,9 +59,8 @@ export default function TableOfContentsEdit( {
|
|
|
59
59
|
|
|
60
60
|
const canInsertList = useSelect(
|
|
61
61
|
( select ) => {
|
|
62
|
-
const { getBlockRootClientId, canInsertBlockType } =
|
|
63
|
-
blockEditorStore
|
|
64
|
-
);
|
|
62
|
+
const { getBlockRootClientId, canInsertBlockType } =
|
|
63
|
+
select( blockEditorStore );
|
|
65
64
|
const rootClientId = getBlockRootClientId( clientId );
|
|
66
65
|
|
|
67
66
|
return canInsertBlockType( 'core/list', rootClientId );
|
|
@@ -69,10 +68,8 @@ export default function TableOfContentsEdit( {
|
|
|
69
68
|
[ clientId ]
|
|
70
69
|
);
|
|
71
70
|
|
|
72
|
-
const {
|
|
73
|
-
|
|
74
|
-
replaceBlocks,
|
|
75
|
-
} = useDispatch( blockEditorStore );
|
|
71
|
+
const { __unstableMarkNextChangeAsNotPersistent, replaceBlocks } =
|
|
72
|
+
useDispatch( blockEditorStore );
|
|
76
73
|
|
|
77
74
|
/**
|
|
78
75
|
* The latest heading data, or null if the new data deeply equals the saved
|
|
@@ -184,9 +181,8 @@ export default function TableOfContentsEdit( {
|
|
|
184
181
|
headingPage === tocPage
|
|
185
182
|
) {
|
|
186
183
|
if ( blockName === 'core/heading' ) {
|
|
187
|
-
const headingAttributes =
|
|
188
|
-
blockClientId
|
|
189
|
-
);
|
|
184
|
+
const headingAttributes =
|
|
185
|
+
getBlockAttributes( blockClientId );
|
|
190
186
|
|
|
191
187
|
const canBeLinked =
|
|
192
188
|
typeof headingPageLink === 'string' &&
|
package/src/tag-cloud/edit.js
CHANGED
|
@@ -83,9 +83,8 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
|
|
|
83
83
|
|
|
84
84
|
const onFontSizeChange = ( fontSizeLabel, newValue ) => {
|
|
85
85
|
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
|
86
|
-
const [ quantity, newUnit ] =
|
|
87
|
-
newValue
|
|
88
|
-
);
|
|
86
|
+
const [ quantity, newUnit ] =
|
|
87
|
+
parseQuantityAndUnitFromRawValue( newValue );
|
|
89
88
|
if ( ! Number.isFinite( quantity ) ) {
|
|
90
89
|
return;
|
|
91
90
|
}
|
|
@@ -96,10 +95,8 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
|
|
|
96
95
|
smallestFontSize,
|
|
97
96
|
largestFontSize,
|
|
98
97
|
} ).forEach( ( [ attribute, currentValue ] ) => {
|
|
99
|
-
const [
|
|
100
|
-
|
|
101
|
-
currentUnit,
|
|
102
|
-
] = parseQuantityAndUnitFromRawValue( currentValue );
|
|
98
|
+
const [ currentQuantity, currentUnit ] =
|
|
99
|
+
parseQuantityAndUnitFromRawValue( currentValue );
|
|
103
100
|
// Only add an update if the other font size attribute has a different unit.
|
|
104
101
|
if ( attribute !== fontSizeLabel && currentUnit !== newUnit ) {
|
|
105
102
|
updateObj[ attribute ] = `${ currentQuantity }${ newUnit }`;
|
|
@@ -31,10 +31,10 @@ export function TemplatePartAdvancedControls( {
|
|
|
31
31
|
const { areaOptions } = useSelect( ( select ) => {
|
|
32
32
|
// FIXME: @wordpress/block-library should not depend on @wordpress/editor.
|
|
33
33
|
// Blocks can be loaded into a *non-post* block editor.
|
|
34
|
-
|
|
35
|
-
const definedAreas =
|
|
36
|
-
'core/editor'
|
|
37
|
-
|
|
34
|
+
/* eslint-disable @wordpress/data-no-store-string-literals */
|
|
35
|
+
const definedAreas =
|
|
36
|
+
select( 'core/editor' ).__experimentalGetDefaultTemplatePartAreas();
|
|
37
|
+
/* eslint-enable @wordpress/data-no-store-string-literals */
|
|
38
38
|
return {
|
|
39
39
|
areaOptions: definedAreas.map( ( { label, area: _area } ) => ( {
|
|
40
40
|
label,
|
|
@@ -46,22 +46,18 @@ export default function TemplatePartEdit( {
|
|
|
46
46
|
} ) {
|
|
47
47
|
const { slug, theme, tagName, layout = {} } = attributes;
|
|
48
48
|
const templatePartId = createTemplatePartId( theme, slug );
|
|
49
|
-
const [ hasAlreadyRendered, RecursionProvider ] =
|
|
50
|
-
templatePartId
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
isTemplatePartSelectionOpen,
|
|
54
|
-
setIsTemplatePartSelectionOpen,
|
|
55
|
-
] = useState( false );
|
|
49
|
+
const [ hasAlreadyRendered, RecursionProvider ] =
|
|
50
|
+
useNoRecursiveRenders( templatePartId );
|
|
51
|
+
const [ isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen ] =
|
|
52
|
+
useState( false );
|
|
56
53
|
|
|
57
54
|
// Set the postId block attribute if it did not exist,
|
|
58
55
|
// but wait until the inner blocks have loaded to allow
|
|
59
56
|
// new edits to trigger this.
|
|
60
57
|
const { isResolved, innerBlocks, isMissing, area } = useSelect(
|
|
61
58
|
( select ) => {
|
|
62
|
-
const { getEditedEntityRecord, hasFinishedResolution } =
|
|
63
|
-
coreStore
|
|
64
|
-
);
|
|
59
|
+
const { getEditedEntityRecord, hasFinishedResolution } =
|
|
60
|
+
select( coreStore );
|
|
65
61
|
const { getBlocks } = select( blockEditorStore );
|
|
66
62
|
|
|
67
63
|
const getEntityArgs = [
|
|
@@ -28,9 +28,8 @@ import { createTemplatePartId } from './create-template-part-id';
|
|
|
28
28
|
*/
|
|
29
29
|
export function useAlternativeTemplateParts( area, excludedId ) {
|
|
30
30
|
const { templateParts, isResolving } = useSelect( ( select ) => {
|
|
31
|
-
const { getEntityRecords, isResolving: _isResolving } =
|
|
32
|
-
coreStore
|
|
33
|
-
);
|
|
31
|
+
const { getEntityRecords, isResolving: _isResolving } =
|
|
32
|
+
select( coreStore );
|
|
34
33
|
const query = { per_page: -1 };
|
|
35
34
|
return {
|
|
36
35
|
templateParts: getEntityRecords(
|
|
@@ -144,10 +143,12 @@ export function useTemplatePartArea( area ) {
|
|
|
144
143
|
( select ) => {
|
|
145
144
|
// FIXME: @wordpress/block-library should not depend on @wordpress/editor.
|
|
146
145
|
// Blocks can be loaded into a *non-post* block editor.
|
|
147
|
-
|
|
148
|
-
const definedAreas =
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
/* eslint-disable @wordpress/data-no-store-string-literals */
|
|
147
|
+
const definedAreas =
|
|
148
|
+
select(
|
|
149
|
+
'core/editor'
|
|
150
|
+
).__experimentalGetDefaultTemplatePartAreas();
|
|
151
|
+
/* eslint-enable @wordpress/data-no-store-string-literals */
|
|
151
152
|
|
|
152
153
|
const selectedArea = find( definedAreas, { area } );
|
|
153
154
|
const defaultArea = find( definedAreas, { area: 'uncategorized' } );
|
|
@@ -47,7 +47,7 @@ export const settings = {
|
|
|
47
47
|
edit,
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
// Importing this file includes side effects. This is
|
|
50
|
+
// Importing this file includes side effects. This is added in block-library/package.json under sideEffects
|
|
51
51
|
addFilter(
|
|
52
52
|
'blocks.registerBlockType',
|
|
53
53
|
'core/template-part',
|
|
@@ -10,11 +10,6 @@ import {
|
|
|
10
10
|
symbolFilled as symbolFilledIcon,
|
|
11
11
|
} from '@wordpress/icons';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
|
-
import fallbackVariations from './fallback-variations';
|
|
17
|
-
|
|
18
13
|
function getTemplatePartIcon( iconName ) {
|
|
19
14
|
if ( 'header' === iconName ) {
|
|
20
15
|
return headerIcon;
|
|
@@ -31,12 +26,6 @@ export function enhanceTemplatePartVariations( settings, name ) {
|
|
|
31
26
|
return settings;
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
// WordPress versions pre-5.8 do not support server side variation registration.
|
|
35
|
-
// So we must register the fallback variations until those versions are no longer supported.
|
|
36
|
-
if ( ! ( settings.variations && settings.variations.length ) ) {
|
|
37
|
-
return { ...settings, variations: fallbackVariations };
|
|
38
|
-
}
|
|
39
|
-
|
|
40
29
|
if ( settings.variations ) {
|
|
41
30
|
const isActive = ( blockAttributes, variationAttributes ) => {
|
|
42
31
|
const { area, theme, slug } = blockAttributes;
|
|
@@ -32,9 +32,9 @@ const transformationCategories = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const transformationCategory = ( blockName ) => {
|
|
35
|
-
const found = Object.entries(
|
|
36
|
-
|
|
37
|
-
)
|
|
35
|
+
const found = Object.entries( transformationCategories ).find(
|
|
36
|
+
( [ , value ] ) => value.includes( blockName )
|
|
37
|
+
);
|
|
38
38
|
if ( ! found ) {
|
|
39
39
|
return [];
|
|
40
40
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { isEmpty,
|
|
4
|
+
import { isEmpty, mapValues, pickBy } from 'lodash';
|
|
5
|
+
|
|
6
|
+
const identity = ( x ) => x;
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Removed empty nodes from nested objects.
|
|
@@ -10,7 +12,11 @@ import { isEmpty, isObject, identity, mapValues, pickBy } from 'lodash';
|
|
|
10
12
|
* @return {Object} Object cleaned from empty nodes.
|
|
11
13
|
*/
|
|
12
14
|
const cleanEmptyObject = ( object ) => {
|
|
13
|
-
if (
|
|
15
|
+
if (
|
|
16
|
+
object === null ||
|
|
17
|
+
typeof object !== 'object' ||
|
|
18
|
+
Array.isArray( object )
|
|
19
|
+
) {
|
|
14
20
|
return object;
|
|
15
21
|
}
|
|
16
22
|
const cleanedNestedObjects = pickBy(
|
package/src/video/block.json
CHANGED
|
@@ -12,14 +12,8 @@ const options = [
|
|
|
12
12
|
];
|
|
13
13
|
|
|
14
14
|
const VideoSettings = ( { setAttributes, attributes } ) => {
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
controls,
|
|
18
|
-
loop,
|
|
19
|
-
muted,
|
|
20
|
-
playsInline,
|
|
21
|
-
preload,
|
|
22
|
-
} = attributes;
|
|
15
|
+
const { autoplay, controls, loop, muted, playsInline, preload } =
|
|
16
|
+
attributes;
|
|
23
17
|
|
|
24
18
|
const autoPlayHelpText = __(
|
|
25
19
|
'Autoplay may cause usability issues for some users.'
|
package/src/video/edit.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
RichText,
|
|
27
27
|
useBlockProps,
|
|
28
28
|
store as blockEditorStore,
|
|
29
|
+
__experimentalGetElementClassName,
|
|
29
30
|
} from '@wordpress/block-editor';
|
|
30
31
|
import { useRef, useEffect } from '@wordpress/element';
|
|
31
32
|
import { __, sprintf } from '@wordpress/i18n';
|
|
@@ -266,6 +267,9 @@ function VideoEdit( {
|
|
|
266
267
|
{ ( ! RichText.isEmpty( caption ) || isSelected ) && (
|
|
267
268
|
<RichText
|
|
268
269
|
tagName="figcaption"
|
|
270
|
+
className={ __experimentalGetElementClassName(
|
|
271
|
+
'caption'
|
|
272
|
+
) }
|
|
269
273
|
aria-label={ __( 'Video caption text' ) }
|
|
270
274
|
placeholder={ __( 'Add caption' ) }
|
|
271
275
|
value={ caption }
|