@wordpress/block-library 7.8.0 → 7.11.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/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/button/edit.js +3 -2
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -24
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +1 -1
- package/build/button/save.js.map +1 -1
- package/build/buttons/edit.js +1 -1
- package/build/buttons/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/variations.js +2 -2
- package/build/columns/variations.js.map +1 -1
- package/build/comment-author-name/edit.js +3 -5
- 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/comments-legacy.js +73 -0
- package/build/comments/edit/comments-legacy.js.map +1 -0
- package/build/comments/{edit.js → edit/index.js} +17 -30
- package/build/comments/edit/index.js.map +1 -0
- package/build/comments/edit/placeholder.js +117 -0
- package/build/comments/edit/placeholder.js.map +1 -0
- package/build/comments/edit/template.js +39 -0
- package/build/comments/edit/template.js.map +1 -0
- package/build/comments/index.js +11 -3
- package/build/comments/index.js.map +1 -1
- package/build/comments/save.js +12 -4
- package/build/comments/save.js.map +1 -1
- package/build/comments-pagination/index.js +1 -1
- package/build/comments-title/deprecated.js +1 -4
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/index.js +1 -1
- package/build/cover/edit/block-controls.js +2 -12
- 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 +19 -4
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/transforms.js +3 -2
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +1 -3
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/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/save.js +1 -0
- package/build/embed/save.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/save.js +1 -1
- package/build/file/save.js.map +1 -1
- package/build/gallery/edit.js +11 -19
- 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/save.js +1 -1
- package/build/gallery/save.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/use-get-media.native.js +59 -0
- package/build/gallery/use-get-media.native.js.map +1 -0
- 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.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 +2 -0
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +1 -1
- package/build/group/variations.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 +77 -9
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +3 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +20 -9
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +28 -20
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +7 -1
- package/build/image/index.js.map +1 -1
- package/build/image/save.js +9 -2
- package/build/image/save.js.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -13
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/edit.js +1 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/transforms.js +4 -63
- package/build/list/transforms.js.map +1 -1
- package/build/list/v2/transforms.js +31 -42
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/edit.js +14 -9
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +8 -8
- package/build/list-item/hooks/index.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-merge.js +174 -0
- package/build/list-item/hooks/use-merge.js.map +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js +93 -36
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/utils.js +125 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +134 -7
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +2 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/save.js +13 -0
- package/build/media-text/save.js.map +1 -1
- package/build/more/edit.js +2 -4
- package/build/more/edit.js.map +1 -1
- package/build/more/save.js +1 -7
- package/build/more/save.js.map +1 -1
- package/build/navigation/edit/index.js +1 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/index.js +9 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +16 -74
- package/build/navigation/use-navigation-menu.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 +5 -4
- 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 +2 -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/edit.js +10 -3
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/edit.js +7 -11
- package/build/paragraph/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +4 -37
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +47 -3
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-terms/edit.js +3 -2
- package/build/post-terms/edit.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/query/edit/inspector-controls/index.js +1 -1
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/index.js +1 -1
- package/build/query/index.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-pagination-next/edit.js +2 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js +2 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/quote/deprecated.js +168 -36
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +76 -39
- package/build/quote/edit.js.map +1 -1
- package/build/quote/index.js +9 -45
- package/build/quote/index.js.map +1 -1
- package/build/quote/save.js +1 -5
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js +110 -158
- package/build/quote/transforms.js.map +1 -1
- package/build/search/edit.js +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/site-logo/edit.js +5 -13
- 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-link/icons/index.js +13 -0
- package/build/social-link/icons/index.js.map +1 -1
- package/build/social-link/icons/whatsapp.js +25 -0
- package/build/social-link/icons/whatsapp.js.map +1 -0
- package/build/social-link/variations.js +7 -0
- package/build/social-link/variations.js.map +1 -1
- package/build/table/edit.js +1 -0
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js +2 -1
- package/build/table/save.js.map +1 -1
- package/build/template-part/edit/index.js +17 -8
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +33 -13
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/search.js +94 -0
- package/build/template-part/edit/utils/search.js.map +1 -0
- package/build/template-part/index.js +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/utils/clean-empty-object.js +5 -3
- package/build/utils/clean-empty-object.js.map +1 -1
- package/build/video/edit.js +1 -0
- package/build/video/edit.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/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/button/edit.js +4 -3
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -24
- package/build-module/button/index.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/edit.js +2 -2
- package/build-module/buttons/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/variations.js +2 -2
- package/build-module/columns/variations.js.map +1 -1
- package/build-module/comment-author-name/edit.js +3 -5
- 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/comments-legacy.js +59 -0
- package/build-module/comments/edit/comments-legacy.js.map +1 -0
- package/build-module/comments/edit/index.js +37 -0
- package/build-module/comments/edit/index.js.map +1 -0
- package/build-module/comments/edit/placeholder.js +102 -0
- package/build-module/comments/edit/placeholder.js.map +1 -0
- package/build-module/comments/edit/template.js +32 -0
- package/build-module/comments/edit/template.js.map +1 -0
- package/build-module/comments/index.js +10 -3
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments/save.js +9 -4
- package/build-module/comments/save.js.map +1 -1
- package/build-module/comments-pagination/index.js +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/index.js +1 -1
- package/build-module/cover/edit/block-controls.js +3 -13
- 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 +19 -4
- package/build-module/cover/edit/index.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/transforms.js +3 -2
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/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/save.js +2 -1
- package/build-module/embed/save.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/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/save.js +2 -2
- package/build-module/gallery/save.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/use-get-media.native.js +50 -0
- package/build-module/gallery/use-get-media.native.js.map +1 -0
- 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.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 +2 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +2 -2
- package/build-module/group/variations.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 +77 -9
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +5 -3
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +20 -9
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +30 -22
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +7 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/save.js +10 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/index.js +1 -2
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +3 -13
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-posts/edit.js +2 -2
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/transforms.js +4 -63
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/v2/transforms.js +32 -44
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +14 -10
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +1 -1
- package/build-module/list-item/hooks/index.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-merge.js +160 -0
- package/build-module/list-item/hooks/use-merge.js.map +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js +88 -33
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/utils.js +123 -2
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +134 -8
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +2 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/save.js +13 -0
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/more/edit.js +2 -4
- package/build-module/more/edit.js.map +1 -1
- package/build-module/more/save.js +1 -6
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +1 -1
- package/build-module/navigation/edit/index.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-menu.js +17 -75
- package/build-module/navigation/use-navigation-menu.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 +5 -4
- 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 +2 -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/edit.js +10 -3
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/edit.js +8 -12
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +5 -35
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +46 -5
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-terms/edit.js +3 -2
- package/build-module/post-terms/edit.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/query/edit/inspector-controls/index.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/index.js +1 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/query-no-results/edit.js +2 -2
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +2 -1
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +2 -1
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +162 -36
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +77 -43
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -39
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/save.js +4 -8
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js +111 -158
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/search/edit.js +2 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +5 -13
- 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-link/icons/index.js +1 -0
- package/build-module/social-link/icons/index.js.map +1 -1
- package/build-module/social-link/icons/whatsapp.js +15 -0
- package/build-module/social-link/icons/whatsapp.js.map +1 -0
- package/build-module/social-link/variations.js +8 -1
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/table/edit.js +2 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +3 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/template-part/edit/index.js +20 -11
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +33 -15
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/search.js +84 -0
- package/build-module/template-part/edit/utils/search.js.map +1 -0
- package/build-module/template-part/index.js +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/utils/clean-empty-object.js +5 -2
- package/build-module/utils/clean-empty-object.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/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/button/style-rtl.css +6 -1
- package/build-style/button/style.css +6 -1
- package/build-style/comment-template/style-rtl.css +12 -0
- package/build-style/comment-template/style.css +12 -0
- package/build-style/comments/editor-rtl.css +122 -0
- package/build-style/comments/editor.css +122 -0
- package/build-style/{post-comments → comments}/style-rtl.css +3 -1
- package/build-style/{post-comments → comments}/style.css +3 -1
- package/build-style/common-rtl.css +7 -0
- package/build-style/common.css +7 -0
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/editor-elements-rtl.css +85 -0
- package/build-style/editor-elements.css +85 -0
- package/build-style/editor-rtl.css +154 -10
- package/build-style/editor.css +154 -10
- package/build-style/{post-comments/editor-rtl.css → elements-rtl.css} +5 -2
- package/build-style/{post-comments/editor.css → elements.css} +5 -2
- package/build-style/file/style-rtl.css +5 -8
- package/build-style/file/style.css +5 -8
- package/build-style/gallery/style-rtl.css +7 -2
- package/build-style/gallery/style.css +7 -2
- package/build-style/image/editor-rtl.css +4 -3
- package/build-style/image/editor.css +4 -3
- package/build-style/image/style-rtl.css +33 -3
- package/build-style/image/style.css +33 -3
- package/build-style/navigation/style-rtl.css +9 -1
- package/build-style/navigation/style.css +9 -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-comments-form/style-rtl.css +0 -1
- package/build-style/post-comments-form/style.css +0 -1
- 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 +6 -8
- package/build-style/search/style.css +6 -8
- package/build-style/search/theme-rtl.css +5 -0
- package/build-style/search/theme.css +5 -0
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/social-links/style-rtl.css +8 -0
- package/build-style/social-links/style.css +8 -0
- package/build-style/style-rtl.css +216 -154
- package/build-style/style.css +216 -154
- package/build-style/template-part/editor-rtl.css +14 -3
- package/build-style/template-part/editor.css +14 -3
- package/build-style/theme-rtl.css +5 -0
- package/build-style/theme.css +5 -0
- package/package.json +28 -28
- package/src/audio/edit.js +4 -0
- package/src/audio/save.js +12 -2
- package/src/avatar/hooks.js +6 -9
- package/src/button/block.json +1 -24
- package/src/button/edit.js +3 -2
- package/src/button/save.js +2 -2
- package/src/button/style.scss +13 -1
- package/src/buttons/edit.js +1 -5
- package/src/columns/edit.native.js +2 -2
- 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 +7 -2
- package/src/comments/deprecated.js +53 -0
- package/src/comments/edit/comments-legacy.js +71 -0
- package/src/comments/edit/index.js +35 -0
- package/src/comments/edit/placeholder.js +124 -0
- package/src/comments/{edit.js → edit/template.js} +25 -32
- package/src/comments/editor.scss +9 -0
- package/src/comments/index.js +2 -0
- package/src/comments/index.php +219 -0
- package/src/comments/save.js +8 -7
- package/src/{post-comments → comments}/style.scss +14 -3
- 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/common.scss +2 -0
- package/src/cover/block.json +1 -0
- package/src/cover/edit/block-controls.js +4 -20
- package/src/cover/edit/cover-placeholder.js +2 -0
- package/src/cover/edit/index.js +16 -0
- package/src/cover/index.php +21 -8
- package/src/cover/style.scss +2 -2
- package/src/cover/transforms.js +2 -2
- package/src/editor-elements.scss +10 -0
- package/src/editor.scss +2 -1
- package/src/elements.scss +6 -0
- package/src/embed/embed-placeholder.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/test/__snapshots__/index.native.js.snap +1 -1
- package/src/embed/variations.js +10 -0
- package/src/file/edit.js +4 -2
- package/src/file/save.js +2 -2
- package/src/file/style.scss +5 -5
- package/src/freeform/editor.scss +0 -2
- package/src/gallery/edit.js +12 -23
- package/src/gallery/gallery.js +9 -2
- package/src/gallery/index.php +5 -1
- package/src/gallery/save.js +5 -1
- package/src/gallery/style.scss +10 -1
- 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 +19 -29
- package/src/gallery/transforms.js +28 -13
- package/src/gallery/use-get-media.js +11 -28
- package/src/gallery/use-get-media.native.js +44 -0
- package/src/gallery/v1/edit.js +3 -4
- package/src/gallery/v1/gallery-image.js +4 -0
- package/src/gallery/v1/gallery.js +8 -2
- package/src/gallery/v1/save.js +20 -3
- package/src/group/block.json +2 -0
- package/src/group/edit.js +1 -3
- package/src/group/variations.js +2 -2
- 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 +7 -1
- package/src/image/deprecated.js +86 -0
- package/src/image/edit.js +6 -1
- package/src/image/edit.native.js +19 -7
- package/src/image/editor.scss +9 -4
- package/src/image/image.js +28 -16
- package/src/image/save.js +20 -3
- package/src/image/style.scss +39 -3
- package/src/image/test/edit.native.js +51 -19
- package/src/index.js +0 -2
- package/src/index.native.js +2 -11
- package/src/latest-posts/edit.js +2 -6
- package/src/list/transforms.js +0 -47
- package/src/list/v2/transforms.js +23 -46
- package/src/list-item/edit.js +10 -12
- package/src/list-item/hooks/index.js +1 -1
- package/src/list-item/hooks/use-enter.js +9 -6
- package/src/list-item/hooks/use-merge.js +141 -0
- package/src/list-item/hooks/use-outdent-list-item.js +79 -54
- package/src/list-item/utils.js +27 -3
- package/src/media-text/deprecated.js +148 -1
- package/src/media-text/edit.js +2 -1
- package/src/media-text/save.js +18 -0
- package/src/more/edit.js +9 -11
- package/src/more/save.js +3 -6
- package/src/navigation/block.json +9 -0
- package/src/navigation/edit/index.js +1 -0
- package/src/navigation/style.scss +11 -2
- package/src/navigation/test/use-navigation-menu.js +16 -11
- package/src/navigation/use-navigation-menu.js +26 -83
- package/src/navigation/view.js +6 -1
- package/src/navigation-link/edit.js +4 -3
- 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/hooks.js +0 -12
- package/src/navigation-submenu/edit.js +1 -0
- package/src/navigation-submenu/view.js +6 -1
- package/src/nextpage/edit.js +1 -3
- package/src/page-list/edit.js +12 -5
- package/src/paragraph/edit.js +8 -14
- package/src/post-comments-form/edit.js +3 -58
- package/src/post-comments-form/editor.scss +4 -0
- package/src/post-comments-form/form.js +81 -6
- package/src/post-comments-form/index.php +1 -1
- package/src/post-comments-form/style.scss +0 -1
- package/src/post-featured-image/index.php +4 -2
- package/src/post-template/index.php +23 -17
- package/src/post-template/style.scss +1 -7
- package/src/post-terms/edit.js +3 -2
- package/src/post-terms/index.js +1 -1
- package/src/post-title/block.json +1 -0
- package/src/query/edit/inspector-controls/index.js +1 -1
- package/src/query/editor.scss +1 -1
- package/src/query/index.js +1 -1
- package/src/query-no-results/edit.js +2 -5
- package/src/query-no-results/index.php +10 -8
- package/src/query-pagination-next/edit.js +1 -0
- package/src/query-pagination-previous/edit.js +1 -0
- package/src/quote/deprecated.js +213 -99
- package/src/quote/edit.js +77 -52
- package/src/quote/index.js +10 -33
- package/src/quote/save.js +5 -5
- package/src/quote/{v2/test → test}/migrate.js +2 -7
- package/src/quote/transforms.js +117 -147
- package/src/search/edit.js +2 -2
- package/src/search/index.php +12 -10
- package/src/search/style.scss +9 -8
- package/src/search/theme.scss +5 -0
- package/src/site-logo/edit.js +2 -11
- package/src/site-title/edit/level-toolbar.js +1 -0
- package/src/social-link/editor.scss +3 -0
- package/src/social-link/icons/index.js +1 -0
- package/src/social-link/icons/whatsapp.js +10 -0
- package/src/social-link/index.php +20 -0
- package/src/social-link/socials-with-bg.scss +5 -0
- package/src/social-link/socials-without-bg.scss +5 -0
- package/src/social-link/variations.js +7 -0
- package/src/style.scss +1 -1
- package/src/table/edit.js +2 -0
- package/src/table/save.js +6 -1
- package/src/template-part/edit/index.js +37 -24
- package/src/template-part/edit/selection-modal.js +68 -40
- package/src/template-part/edit/utils/search.js +76 -0
- package/src/template-part/editor.scss +21 -9
- package/src/template-part/index.js +1 -1
- package/src/template-part/index.php +56 -2
- package/src/template-part/variations.js +0 -11
- package/src/utils/clean-empty-object.js +8 -2
- package/src/video/edit.js +4 -0
- package/src/video/save.js +10 -2
- package/src/video/tracks-editor.js +1 -1
- package/build/comments/edit.js.map +0 -1
- package/build/gallery/use-short-code-transform.js +0 -64
- package/build/gallery/use-short-code-transform.js.map +0 -1
- package/build/list-item/hooks/use-backspace.js +0 -59
- package/build/list-item/hooks/use-backspace.js.map +0 -1
- package/build/navigation-link/fallback-variations.js +0 -75
- package/build/navigation-link/fallback-variations.js.map +0 -1
- package/build/post-comments/edit.js +0 -184
- package/build/post-comments/edit.js.map +0 -1
- package/build/post-comments/index.js +0 -72
- package/build/post-comments/index.js.map +0 -1
- package/build/quote/v2/deprecated.js +0 -133
- package/build/quote/v2/deprecated.js.map +0 -1
- package/build/quote/v2/edit.js +0 -139
- package/build/quote/v2/edit.js.map +0 -1
- package/build/quote/v2/index.js +0 -49
- package/build/quote/v2/index.js.map +0 -1
- package/build/quote/v2/save.js +0 -43
- package/build/quote/v2/save.js.map +0 -1
- package/build/quote/v2/transforms.js +0 -156
- package/build/quote/v2/transforms.js.map +0 -1
- package/build/template-part/fallback-variations.js +0 -59
- package/build/template-part/fallback-variations.js.map +0 -1
- package/build-module/comments/edit.js +0 -51
- package/build-module/comments/edit.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/list-item/hooks/use-backspace.js +0 -44
- package/build-module/list-item/hooks/use-backspace.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/post-comments/edit.js +0 -171
- package/build-module/post-comments/edit.js.map +0 -1
- package/build-module/post-comments/index.js +0 -59
- package/build-module/post-comments/index.js.map +0 -1
- package/build-module/quote/v2/deprecated.js +0 -116
- package/build-module/quote/v2/deprecated.js.map +0 -1
- package/build-module/quote/v2/edit.js +0 -122
- package/build-module/quote/v2/edit.js.map +0 -1
- package/build-module/quote/v2/index.js +0 -33
- package/build-module/quote/v2/index.js.map +0 -1
- package/build-module/quote/v2/save.js +0 -30
- package/build-module/quote/v2/save.js.map +0 -1
- package/build-module/quote/v2/transforms.js +0 -147
- package/build-module/quote/v2/transforms.js.map +0 -1
- package/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/list-item/hooks/use-backspace.js +0 -51
- package/src/navigation-link/fallback-variations.js +0 -65
- package/src/post-comments/block.json +0 -45
- package/src/post-comments/edit.js +0 -247
- package/src/post-comments/editor.scss +0 -3
- package/src/post-comments/index.js +0 -18
- package/src/post-comments/index.php +0 -87
- package/src/quote/v2/deprecated.js +0 -107
- package/src/quote/v2/edit.js +0 -139
- package/src/quote/v2/index.js +0 -36
- package/src/quote/v2/save.js +0 -26
- package/src/quote/v2/transforms.js +0 -155
- package/src/template-part/fallback-variations.js +0 -51
package/src/cover/index.php
CHANGED
|
@@ -32,20 +32,33 @@ function render_block_core_cover( $attributes, $content ) {
|
|
|
32
32
|
|
|
33
33
|
$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
/*
|
|
36
|
+
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
|
|
37
|
+
* and removes eventual withespace characters between the two (typically introduced at template level)
|
|
38
|
+
*/
|
|
39
|
+
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
|
|
40
|
+
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
|
|
41
|
+
$offset = $matches[0][1];
|
|
42
|
+
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
|
|
43
|
+
}
|
|
41
44
|
} else {
|
|
42
45
|
if ( in_the_loop() ) {
|
|
43
46
|
update_post_thumbnail_cache();
|
|
44
47
|
}
|
|
45
48
|
$current_featured_image = get_the_post_thumbnail_url();
|
|
46
|
-
|
|
49
|
+
|
|
50
|
+
$styles = 'background-image:url(' . esc_url( $current_featured_image ) . '); ';
|
|
51
|
+
|
|
52
|
+
if ( isset( $attributes['minHeight'] ) ) {
|
|
53
|
+
$height_unit = empty( $attributes['minHeightUnit'] ) ? 'px' : $attributes['minHeightUnit'];
|
|
54
|
+
$height = " min-height:{$attributes['minHeight']}{$height_unit}";
|
|
55
|
+
|
|
56
|
+
$styles .= $height;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$content = preg_replace(
|
|
47
60
|
'/class=\".*?\"/',
|
|
48
|
-
'${0} style="
|
|
61
|
+
'${0} style="' . $styles . '"',
|
|
49
62
|
$content,
|
|
50
63
|
1
|
|
51
64
|
);
|
package/src/cover/style.scss
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
.wp-block-cover-image,
|
|
2
2
|
.wp-block-cover {
|
|
3
3
|
position: relative;
|
|
4
|
-
background-size: cover;
|
|
5
4
|
background-position: center center;
|
|
6
5
|
min-height: 430px;
|
|
7
|
-
width: 100%;
|
|
8
6
|
display: flex;
|
|
9
7
|
justify-content: center;
|
|
10
8
|
align-items: center;
|
|
@@ -201,6 +199,8 @@
|
|
|
201
199
|
video.wp-block-cover__video-background {
|
|
202
200
|
&.has-parallax {
|
|
203
201
|
background-attachment: fixed;
|
|
202
|
+
background-size: cover;
|
|
203
|
+
background-repeat: no-repeat;
|
|
204
204
|
|
|
205
205
|
// Mobile Safari does not support fixed background attachment properly.
|
|
206
206
|
// See also https://stackoverflow.com/questions/24154666/background-size-cover-not-working-on-ios
|
package/src/cover/transforms.js
CHANGED
|
@@ -206,10 +206,10 @@ const transforms = {
|
|
|
206
206
|
{
|
|
207
207
|
type: 'block',
|
|
208
208
|
blocks: [ 'core/group' ],
|
|
209
|
-
isMatch: ( { url } ) => {
|
|
209
|
+
isMatch: ( { url, useFeaturedImage } ) => {
|
|
210
210
|
// If the Cover block uses background media, skip this transform,
|
|
211
211
|
// and instead use the Group block's default transform.
|
|
212
|
-
if ( url ) {
|
|
212
|
+
if ( url || useFeaturedImage ) {
|
|
213
213
|
return false;
|
|
214
214
|
}
|
|
215
215
|
return true;
|
package/src/editor.scss
CHANGED
|
@@ -49,9 +49,10 @@
|
|
|
49
49
|
@import "./query-pagination/editor.scss";
|
|
50
50
|
@import "./query-pagination-numbers/editor.scss";
|
|
51
51
|
@import "./post-featured-image/editor.scss";
|
|
52
|
-
@import "./post-comments/editor.scss";
|
|
53
52
|
@import "./post-comments-form/editor.scss";
|
|
54
53
|
|
|
54
|
+
@import "./editor-elements.scss";
|
|
55
|
+
|
|
55
56
|
:root .editor-styles-wrapper {
|
|
56
57
|
@include background-colors-deprecated();
|
|
57
58
|
@include foreground-colors-deprecated();
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { View, Text, TouchableWithoutFeedback } from 'react-native';
|
|
5
|
-
import { compact } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -68,11 +67,11 @@ const EmbedPlaceholder = ( {
|
|
|
68
67
|
},
|
|
69
68
|
};
|
|
70
69
|
|
|
71
|
-
const options =
|
|
70
|
+
const options = [
|
|
72
71
|
cannotEmbed && errorPickerOptions.retry,
|
|
73
72
|
cannotEmbed && errorPickerOptions.convertToLink,
|
|
74
73
|
cannotEmbed && errorPickerOptions.editLink,
|
|
75
|
-
] );
|
|
74
|
+
].filter( Boolean );
|
|
76
75
|
|
|
77
76
|
function onPickerSelect( value ) {
|
|
78
77
|
const selectedItem = options.find( ( item ) => item.value === value );
|
|
@@ -13,7 +13,11 @@ import classnames from 'classnames/dedupe';
|
|
|
13
13
|
*/
|
|
14
14
|
import { __, sprintf } from '@wordpress/i18n';
|
|
15
15
|
import { Placeholder, SandBox } from '@wordpress/components';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
RichText,
|
|
18
|
+
BlockIcon,
|
|
19
|
+
__experimentalGetElementClassName,
|
|
20
|
+
} from '@wordpress/block-editor';
|
|
17
21
|
import { Component } from '@wordpress/element';
|
|
18
22
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
19
23
|
|
|
@@ -140,6 +144,9 @@ class EmbedPreview extends Component {
|
|
|
140
144
|
{ ( ! RichText.isEmpty( caption ) || isSelected ) && (
|
|
141
145
|
<RichText
|
|
142
146
|
tagName="figcaption"
|
|
147
|
+
className={ __experimentalGetElementClassName(
|
|
148
|
+
'caption'
|
|
149
|
+
) }
|
|
143
150
|
placeholder={ __( 'Add caption' ) }
|
|
144
151
|
value={ caption }
|
|
145
152
|
onChange={ onCaptionChange }
|
package/src/embed/icons.js
CHANGED
|
@@ -153,3 +153,28 @@ export const embedWolframIcon = (
|
|
|
153
153
|
<Path d="M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" />
|
|
154
154
|
</SVG>
|
|
155
155
|
);
|
|
156
|
+
|
|
157
|
+
export const embedPocketCastsIcon = {
|
|
158
|
+
foreground: '#f43e37',
|
|
159
|
+
src: (
|
|
160
|
+
<SVG
|
|
161
|
+
width="24"
|
|
162
|
+
height="24"
|
|
163
|
+
viewBox="0 0 24 24"
|
|
164
|
+
fill="none"
|
|
165
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
166
|
+
>
|
|
167
|
+
<Path
|
|
168
|
+
fillRule="evenodd"
|
|
169
|
+
clipRule="evenodd"
|
|
170
|
+
d="M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"
|
|
171
|
+
/>
|
|
172
|
+
<Path
|
|
173
|
+
fillRule="evenodd"
|
|
174
|
+
clipRule="evenodd"
|
|
175
|
+
d="M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z"
|
|
176
|
+
fill="#fff"
|
|
177
|
+
/>
|
|
178
|
+
</SVG>
|
|
179
|
+
),
|
|
180
|
+
};
|
package/src/embed/save.js
CHANGED
|
@@ -6,7 +6,11 @@ import classnames from 'classnames/dedupe';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
RichText,
|
|
11
|
+
useBlockProps,
|
|
12
|
+
__experimentalGetElementClassName,
|
|
13
|
+
} from '@wordpress/block-editor';
|
|
10
14
|
|
|
11
15
|
export default function save( { attributes } ) {
|
|
12
16
|
const { url, caption, type, providerNameSlug } = attributes;
|
|
@@ -27,7 +31,11 @@ export default function save( { attributes } ) {
|
|
|
27
31
|
{ `\n${ url }\n` /* URL needs to be on its own line. */ }
|
|
28
32
|
</div>
|
|
29
33
|
{ ! RichText.isEmpty( caption ) && (
|
|
30
|
-
<RichText.Content
|
|
34
|
+
<RichText.Content
|
|
35
|
+
className={ __experimentalGetElementClassName( 'caption' ) }
|
|
36
|
+
tagName="figcaption"
|
|
37
|
+
value={ caption }
|
|
38
|
+
/>
|
|
31
39
|
) }
|
|
32
40
|
</figure>
|
|
33
41
|
);
|
|
@@ -186,6 +186,6 @@ exports[`Embed block sets block caption 1`] = `
|
|
|
186
186
|
"<!-- wp:embed {\\"url\\":\\"https://twitter.com/notnownikki\\",\\"type\\":\\"rich\\",\\"providerNameSlug\\":\\"twitter\\",\\"responsive\\":true} -->
|
|
187
187
|
<figure class=\\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\\"><div class=\\"wp-block-embed__wrapper\\">
|
|
188
188
|
https://twitter.com/notnownikki
|
|
189
|
-
</div><figcaption>Caption</figcaption></figure>
|
|
189
|
+
</div><figcaption class=\\"wp-element-caption\\">Caption</figcaption></figure>
|
|
190
190
|
<!-- /wp:embed -->"
|
|
191
191
|
`;
|
package/src/embed/variations.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
embedDailymotionIcon,
|
|
27
27
|
embedPinterestIcon,
|
|
28
28
|
embedWolframIcon,
|
|
29
|
+
embedPocketCastsIcon,
|
|
29
30
|
} from './icons';
|
|
30
31
|
|
|
31
32
|
/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
|
|
@@ -216,6 +217,15 @@ const variations = [
|
|
|
216
217
|
patterns: [ /^https?:\/\/(www\.)?mixcloud\.com\/.+/i ],
|
|
217
218
|
attributes: { providerNameSlug: 'mixcloud', responsive: true },
|
|
218
219
|
},
|
|
220
|
+
{
|
|
221
|
+
name: 'pocketcasts',
|
|
222
|
+
title: 'Pocket Casts',
|
|
223
|
+
icon: embedPocketCastsIcon,
|
|
224
|
+
keywords: [ __( 'podcast' ), __( 'audio' ) ],
|
|
225
|
+
description: __( 'Embed a podcast player from Pocket Casts.' ),
|
|
226
|
+
patterns: [ /^https:\/\/pca.st\/\w+/i ],
|
|
227
|
+
attributes: { providerNameSlug: 'pocketcasts', responsive: true },
|
|
228
|
+
},
|
|
219
229
|
{
|
|
220
230
|
name: 'reddit',
|
|
221
231
|
title: 'Reddit',
|
package/src/file/edit.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
RichText,
|
|
23
23
|
useBlockProps,
|
|
24
24
|
store as blockEditorStore,
|
|
25
|
-
|
|
25
|
+
__experimentalGetElementClassName,
|
|
26
26
|
} from '@wordpress/block-editor';
|
|
27
27
|
import { useEffect } from '@wordpress/element';
|
|
28
28
|
import { useCopyToClipboard } from '@wordpress/compose';
|
|
@@ -302,7 +302,9 @@ function FileEdit( {
|
|
|
302
302
|
aria-label={ __( 'Download button text' ) }
|
|
303
303
|
className={ classnames(
|
|
304
304
|
'wp-block-file__button',
|
|
305
|
-
|
|
305
|
+
__experimentalGetElementClassName(
|
|
306
|
+
'button'
|
|
307
|
+
)
|
|
306
308
|
) }
|
|
307
309
|
value={ downloadButtonText }
|
|
308
310
|
withoutInteractiveFormatting
|
package/src/file/save.js
CHANGED
|
@@ -9,7 +9,7 @@ import classnames from 'classnames';
|
|
|
9
9
|
import {
|
|
10
10
|
RichText,
|
|
11
11
|
useBlockProps,
|
|
12
|
-
|
|
12
|
+
__experimentalGetElementClassName,
|
|
13
13
|
} from '@wordpress/block-editor';
|
|
14
14
|
import { __, sprintf } from '@wordpress/i18n';
|
|
15
15
|
|
|
@@ -74,7 +74,7 @@ export default function save( { attributes } ) {
|
|
|
74
74
|
href={ href }
|
|
75
75
|
className={ classnames(
|
|
76
76
|
'wp-block-file__button',
|
|
77
|
-
|
|
77
|
+
__experimentalGetElementClassName( 'button' )
|
|
78
78
|
) }
|
|
79
79
|
download={ true }
|
|
80
80
|
aria-describedby={ describedById }
|
package/src/file/style.scss
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
.wp-block-file {
|
|
2
2
|
margin-bottom: 1.5em;
|
|
3
3
|
|
|
4
|
+
&:not(.wp-element-button) {
|
|
5
|
+
font-size: 0.8em;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
&.aligncenter {
|
|
5
9
|
text-align: center;
|
|
6
10
|
}
|
|
@@ -20,15 +24,11 @@
|
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
//This needs a low specificity so it won't override the rules from the button element if defined in theme.json.
|
|
23
|
-
.wp-block-file__button {
|
|
24
|
-
background: #32373c;
|
|
27
|
+
:where(.wp-block-file__button) {
|
|
25
28
|
border-radius: 2em;
|
|
26
|
-
color: $white;
|
|
27
|
-
font-size: 0.8em;
|
|
28
29
|
padding: 0.5em 1em;
|
|
29
30
|
|
|
30
31
|
&:is(a) {
|
|
31
|
-
text-decoration: none;
|
|
32
32
|
|
|
33
33
|
&:hover,
|
|
34
34
|
&:visited,
|
package/src/freeform/editor.scss
CHANGED
package/src/gallery/edit.js
CHANGED
|
@@ -51,7 +51,6 @@ import {
|
|
|
51
51
|
LINK_DESTINATION_NONE,
|
|
52
52
|
} from './constants';
|
|
53
53
|
import useImageSizes from './use-image-sizes';
|
|
54
|
-
import useShortCodeTransform from './use-short-code-transform';
|
|
55
54
|
import useGetNewImages from './use-get-new-images';
|
|
56
55
|
import useGetMedia from './use-get-media';
|
|
57
56
|
import GapStyles from './gap-styles';
|
|
@@ -87,14 +86,7 @@ function GalleryEdit( props ) {
|
|
|
87
86
|
insertBlocksAfter,
|
|
88
87
|
} = props;
|
|
89
88
|
|
|
90
|
-
const {
|
|
91
|
-
columns,
|
|
92
|
-
imageCrop,
|
|
93
|
-
linkTarget,
|
|
94
|
-
linkTo,
|
|
95
|
-
shortCodeTransforms,
|
|
96
|
-
sizeSlug,
|
|
97
|
-
} = attributes;
|
|
89
|
+
const { columns, imageCrop, linkTarget, linkTo, sizeSlug } = attributes;
|
|
98
90
|
|
|
99
91
|
const {
|
|
100
92
|
__unstableMarkNextChangeAsNotPersistent,
|
|
@@ -151,6 +143,8 @@ function GalleryEdit( props ) {
|
|
|
151
143
|
|
|
152
144
|
useEffect( () => {
|
|
153
145
|
newImages?.forEach( ( newImage ) => {
|
|
146
|
+
// Update the images data without creating new undo levels.
|
|
147
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
154
148
|
updateBlockAttributes( newImage.clientId, {
|
|
155
149
|
...buildImageAttributes( newImage.attributes ),
|
|
156
150
|
id: newImage.id,
|
|
@@ -162,16 +156,6 @@ function GalleryEdit( props ) {
|
|
|
162
156
|
}
|
|
163
157
|
}, [ newImages ] );
|
|
164
158
|
|
|
165
|
-
const shortCodeImages = useShortCodeTransform( shortCodeTransforms );
|
|
166
|
-
|
|
167
|
-
useEffect( () => {
|
|
168
|
-
if ( ! shortCodeTransforms || ! shortCodeImages ) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
updateImages( shortCodeImages );
|
|
172
|
-
setAttributes( { shortCodeTransforms: undefined } );
|
|
173
|
-
}, [ shortCodeTransforms, shortCodeImages ] );
|
|
174
|
-
|
|
175
159
|
const imageSizeOptions = useImageSizes(
|
|
176
160
|
imageData,
|
|
177
161
|
isSelected,
|
|
@@ -208,8 +192,9 @@ function GalleryEdit( props ) {
|
|
|
208
192
|
...getHrefAndDestination( image, linkTo ),
|
|
209
193
|
...getUpdatedLinkTargetSettings( linkTarget, attributes ),
|
|
210
194
|
className: newClassName,
|
|
211
|
-
caption: imageAttributes.caption,
|
|
212
195
|
sizeSlug,
|
|
196
|
+
caption: imageAttributes.caption || image.caption?.raw,
|
|
197
|
+
alt: imageAttributes.alt || image.alt_text,
|
|
213
198
|
};
|
|
214
199
|
}
|
|
215
200
|
|
|
@@ -429,8 +414,10 @@ function GalleryEdit( props ) {
|
|
|
429
414
|
|
|
430
415
|
const hasImages = !! images.length;
|
|
431
416
|
const hasImageIds = hasImages && images.some( ( image ) => !! image.id );
|
|
432
|
-
const imagesUploading = images.some(
|
|
433
|
-
|
|
417
|
+
const imagesUploading = images.some( ( img ) =>
|
|
418
|
+
! Platform.isNative
|
|
419
|
+
? ! img.id && img.url?.indexOf( 'blob:' ) === 0
|
|
420
|
+
: img.url?.indexOf( 'file:' ) === 0
|
|
434
421
|
);
|
|
435
422
|
|
|
436
423
|
// MediaPlaceholder props are different between web and native hence, we provide a platform-specific set.
|
|
@@ -547,7 +534,9 @@ function GalleryEdit( props ) {
|
|
|
547
534
|
onSelect={ updateImages }
|
|
548
535
|
name={ __( 'Add' ) }
|
|
549
536
|
multiple={ true }
|
|
550
|
-
mediaIds={ images
|
|
537
|
+
mediaIds={ images
|
|
538
|
+
.filter( ( image ) => image.id )
|
|
539
|
+
.map( ( image ) => image.id ) }
|
|
551
540
|
addToGallery={ hasImageIds }
|
|
552
541
|
/>
|
|
553
542
|
</BlockControls>
|
package/src/gallery/gallery.js
CHANGED
|
@@ -6,7 +6,11 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
RichText,
|
|
11
|
+
useInnerBlocksProps,
|
|
12
|
+
__experimentalGetElementClassName,
|
|
13
|
+
} from '@wordpress/block-editor';
|
|
10
14
|
import { VisuallyHidden } from '@wordpress/components';
|
|
11
15
|
import { useState, useEffect } from '@wordpress/element';
|
|
12
16
|
import { __ } from '@wordpress/i18n';
|
|
@@ -82,7 +86,10 @@ export const Gallery = ( props ) => {
|
|
|
82
86
|
captionFocused={ captionFocused }
|
|
83
87
|
onFocusCaption={ onFocusCaption }
|
|
84
88
|
tagName="figcaption"
|
|
85
|
-
className=
|
|
89
|
+
className={ classnames(
|
|
90
|
+
'blocks-gallery-caption',
|
|
91
|
+
__experimentalGetElementClassName( 'caption' )
|
|
92
|
+
) }
|
|
86
93
|
aria-label={ __( 'Gallery caption text' ) }
|
|
87
94
|
placeholder={ __( 'Write gallery caption…' ) }
|
|
88
95
|
value={ caption }
|
package/src/gallery/index.php
CHANGED
|
@@ -50,9 +50,13 @@ function block_core_gallery_render( $attributes, $content ) {
|
|
|
50
50
|
// because we only want to match against the value, not the CSS attribute.
|
|
51
51
|
if ( is_array( $gap ) ) {
|
|
52
52
|
foreach ( $gap as $key => $value ) {
|
|
53
|
+
// Make sure $value is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null.
|
|
54
|
+
$value = is_string( $value ) ? $value : '';
|
|
53
55
|
$gap[ $key ] = $value && preg_match( '%[\\\(&=}]|/\*%', $value ) ? null : $value;
|
|
54
56
|
}
|
|
55
57
|
} else {
|
|
58
|
+
// Make sure $gap is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null.
|
|
59
|
+
$gap = is_string( $gap ) ? $gap : '';
|
|
56
60
|
$gap = $gap && preg_match( '%[\\\(&=}]|/\*%', $gap ) ? null : $gap;
|
|
57
61
|
}
|
|
58
62
|
|
|
@@ -77,7 +81,7 @@ function block_core_gallery_render( $attributes, $content ) {
|
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
// Set the CSS variable to the column value, and the `gap` property to the combined gap value.
|
|
80
|
-
$style = '.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_column . '; gap: ' . $gap_value . '}';
|
|
84
|
+
$style = '.wp-block-gallery.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_column . '; gap: ' . $gap_value . '}';
|
|
81
85
|
|
|
82
86
|
gutenberg_enqueue_block_support_styles( $style, 11 );
|
|
83
87
|
return $content;
|
package/src/gallery/save.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
RichText,
|
|
11
11
|
useBlockProps,
|
|
12
12
|
useInnerBlocksProps,
|
|
13
|
+
__experimentalGetElementClassName,
|
|
13
14
|
} from '@wordpress/block-editor';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -39,7 +40,10 @@ export default function saveWithInnerBlocks( { attributes } ) {
|
|
|
39
40
|
{ ! RichText.isEmpty( caption ) && (
|
|
40
41
|
<RichText.Content
|
|
41
42
|
tagName="figcaption"
|
|
42
|
-
className=
|
|
43
|
+
className={ classnames(
|
|
44
|
+
'blocks-gallery-caption',
|
|
45
|
+
__experimentalGetElementClassName( 'caption' )
|
|
46
|
+
) }
|
|
43
47
|
value={ caption }
|
|
44
48
|
/>
|
|
45
49
|
) }
|
package/src/gallery/style.scss
CHANGED
|
@@ -22,6 +22,10 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
22
22
|
position: relative;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
max-width: 100%;
|
|
25
|
+
// Prevents theme.json and global styles borders that apply to the outer
|
|
26
|
+
// wrapper from incorrectly enlarging gallery images to a point they
|
|
27
|
+
// result in a single column gallery.
|
|
28
|
+
box-sizing: border-box;
|
|
25
29
|
|
|
26
30
|
> div,
|
|
27
31
|
> a {
|
|
@@ -63,7 +67,12 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
&.
|
|
70
|
+
&.has-custom-border img {
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.is-style-rounded,
|
|
75
|
+
&.has-custom-border {
|
|
67
76
|
> div,
|
|
68
77
|
> a {
|
|
69
78
|
flex: 1 1 auto;
|
|
@@ -114,14 +114,14 @@ exports[`Gallery block sets caption to gallery 1`] = `
|
|
|
114
114
|
"<!-- wp:gallery {\\"linkTo\\":\\"none\\"} -->
|
|
115
115
|
<figure class=\\"wp-block-gallery has-nested-images columns-default is-cropped\\"><!-- wp:image {\\"id\\":2000} -->
|
|
116
116
|
<figure class=\\"wp-block-image\\"><img src=\\"https://test-site.files.wordpress.com/local-image-1.jpeg\\" alt=\\"\\" class=\\"wp-image-2000\\"/></figure>
|
|
117
|
-
<!-- /wp:image --><figcaption class=\\"blocks-gallery-caption\\"><strong>Bold</strong> <em>italic</em> <s>strikethrough</s> gallery caption</figcaption></figure>
|
|
117
|
+
<!-- /wp:image --><figcaption class=\\"blocks-gallery-caption wp-element-caption\\"><strong>Bold</strong> <em>italic</em> <s>strikethrough</s> gallery caption</figcaption></figure>
|
|
118
118
|
<!-- /wp:gallery -->"
|
|
119
119
|
`;
|
|
120
120
|
|
|
121
121
|
exports[`Gallery block sets caption to gallery items 1`] = `
|
|
122
122
|
"<!-- wp:gallery {\\"linkTo\\":\\"none\\"} -->
|
|
123
123
|
<figure class=\\"wp-block-gallery has-nested-images columns-default is-cropped\\"><!-- wp:image {\\"id\\":2000} -->
|
|
124
|
-
<figure class=\\"wp-block-image\\"><img src=\\"https://test-site.files.wordpress.com/local-image-1.jpeg\\" alt=\\"\\" class=\\"wp-image-2000\\"/><figcaption><strong>Bold</strong> <em>italic</em> <s>strikethrough</s> image caption</figcaption></figure>
|
|
124
|
+
<figure class=\\"wp-block-image\\"><img src=\\"https://test-site.files.wordpress.com/local-image-1.jpeg\\" alt=\\"\\" class=\\"wp-image-2000\\"/><figcaption class=\\"wp-element-caption\\"><strong>Bold</strong> <em>italic</em> <s>strikethrough</s> image caption</figcaption></figure>
|
|
125
125
|
<!-- /wp:image --></figure>
|
|
126
126
|
<!-- /wp:gallery -->"
|
|
127
127
|
`;
|