@wordpress/block-library 8.34.0 → 8.35.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 +8 -3
- package/build/audio/edit.js +2 -2
- package/build/audio/edit.js.map +1 -1
- package/build/avatar/edit.js +2 -2
- package/build/avatar/edit.js.map +1 -1
- package/build/block/edit.js +23 -165
- package/build/block/edit.js.map +1 -1
- package/build/button/deprecated.js +16 -16
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +3 -7
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -0
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +3 -3
- package/build/button/save.js.map +1 -1
- package/build/buttons/deprecated.js +2 -2
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +2 -2
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/save.js +2 -2
- package/build/buttons/save.js.map +1 -1
- package/build/categories/edit.js +2 -2
- package/build/categories/edit.js.map +1 -1
- package/build/column/deprecated.js +2 -2
- package/build/column/deprecated.js.map +1 -1
- package/build/column/edit.js +2 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/save.js +2 -2
- package/build/column/save.js.map +1 -1
- package/build/columns/deprecated.js +3 -3
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +2 -2
- package/build/columns/edit.js.map +1 -1
- package/build/columns/save.js +2 -2
- package/build/columns/save.js.map +1 -1
- package/build/comment-author-name/edit.js +2 -2
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-content/edit.js +2 -2
- package/build/comment-content/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +2 -2
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comment-reply-link/edit.js +2 -2
- package/build/comment-reply-link/edit.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +2 -2
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/comments-title/edit.js +2 -2
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/deprecated.js +38 -38
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +6 -6
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/resizable-cover-popover.js +2 -2
- package/build/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build/cover/edit.native.js +2 -2
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/save.js +5 -5
- package/build/cover/save.js.map +1 -1
- package/build/embed/deprecated.js +3 -3
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.js +2 -2
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +2 -2
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-preview.js +3 -3
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/embed-preview.native.js +2 -2
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/embed/icons.js +7 -1
- package/build/embed/icons.js.map +1 -1
- package/build/embed/save.js +2 -2
- package/build/embed/save.js.map +1 -1
- package/build/embed/util.js +10 -8
- package/build/embed/util.js.map +1 -1
- package/build/embed/variations.js +9 -0
- package/build/embed/variations.js.map +1 -1
- package/build/file/deprecated.js +2 -2
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js +3 -3
- package/build/file/edit.js.map +1 -1
- package/build/file/save.js +2 -2
- package/build/file/save.js.map +1 -1
- package/build/form-input/deprecated.js +3 -3
- package/build/form-input/deprecated.js.map +1 -1
- package/build/form-input/edit.js +4 -4
- package/build/form-input/edit.js.map +1 -1
- package/build/form-input/save.js +3 -3
- package/build/form-input/save.js.map +1 -1
- package/build/form-submission-notification/edit.js +2 -2
- package/build/form-submission-notification/edit.js.map +1 -1
- package/build/form-submission-notification/save.js +2 -2
- package/build/form-submission-notification/save.js.map +1 -1
- package/build/gallery/deprecated.js +3 -3
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +2 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +2 -2
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/save.js +3 -3
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/v1/gallery-image.js +2 -2
- package/build/gallery/v1/gallery-image.js.map +1 -1
- package/build/gallery/v1/gallery.js +3 -3
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/gallery/v1/save.js +3 -3
- package/build/gallery/v1/save.js.map +1 -1
- package/build/group/deprecated.js +4 -4
- package/build/group/deprecated.js.map +1 -1
- package/build/heading/deprecated.js +6 -6
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/edit.js +2 -19
- package/build/heading/edit.js.map +1 -1
- package/build/heading/edit.native.js +2 -2
- package/build/heading/edit.native.js.map +1 -1
- package/build/heading/index.js +1 -0
- package/build/heading/index.js.map +1 -1
- package/build/heading/save.js +2 -2
- package/build/heading/save.js.map +1 -1
- package/build/home-link/edit.js +2 -2
- package/build/home-link/edit.js.map +1 -1
- package/build/html/edit.js +0 -2
- package/build/html/edit.js.map +1 -1
- package/build/image/deprecated.js +10 -10
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +7 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +5 -3
- package/build/image/image.js.map +1 -1
- package/build/image/save.js +3 -3
- package/build/image/save.js.map +1 -1
- package/build/latest-posts/edit.js +5 -5
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/deprecated.js +90 -1
- package/build/list/deprecated.js.map +1 -1
- package/build/list/index.js +0 -2
- package/build/list/index.js.map +1 -1
- package/build/list-item/edit.js +1 -8
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/index.js +2 -1
- package/build/list-item/index.js.map +1 -1
- package/build/media-text/deprecated.js +10 -10
- 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/media-container.js +2 -2
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/save.js +3 -3
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/edit/index.js +3 -3
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +3 -3
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/utils.js +2 -2
- package/build/navigation/edit/utils.js.map +1 -1
- package/build/navigation-link/edit.js +3 -3
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -2
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +2 -2
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list-item/edit.js +3 -3
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +6 -6
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +2 -18
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +1 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/save.js +2 -2
- package/build/paragraph/save.js.map +1 -1
- package/build/paragraph/transforms.js +1 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/edit.js +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +2 -2
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author-biography/edit.js +2 -2
- package/build/post-author-biography/edit.js.map +1 -1
- package/build/post-author-name/edit.js +2 -2
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comments-count/edit.js +2 -2
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +2 -2
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +2 -2
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-comments-link/edit.js +2 -2
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/post-date/edit.js +2 -2
- package/build/post-date/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +3 -3
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +20 -28
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +3 -3
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/overlay.js +2 -2
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +2 -2
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-template/edit.js +6 -6
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/edit.js +3 -3
- package/build/post-time-to-read/edit.js.map +1 -1
- package/build/post-title/edit.js +2 -2
- package/build/post-title/edit.js.map +1 -1
- package/build/pullquote/deprecated.js +7 -7
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +2 -2
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/save.js +2 -2
- package/build/pullquote/save.js.map +1 -1
- package/build/query-title/edit.js +2 -2
- package/build/query-title/edit.js.map +1 -1
- package/build/quote/deprecated.js +3 -3
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +2 -2
- package/build/quote/edit.js.map +1 -1
- package/build/quote/save.js +2 -2
- package/build/quote/save.js.map +1 -1
- package/build/rss/edit.js +8 -6
- package/build/rss/edit.js.map +1 -1
- package/build/search/edit.js +6 -6
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/separator/deprecated.js +2 -2
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/edit.js +2 -2
- package/build/separator/edit.js.map +1 -1
- package/build/separator/save.js +2 -2
- package/build/separator/save.js.map +1 -1
- package/build/shortcode/edit.js +7 -10
- package/build/shortcode/edit.js.map +1 -1
- package/build/site-logo/edit.js +4 -4
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +2 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-title/edit.js +2 -2
- package/build/site-title/edit.js.map +1 -1
- package/build/social-link/edit.js +3 -3
- package/build/social-link/edit.js.map +1 -1
- package/build/social-links/deprecated.js +2 -2
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +2 -2
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/save.js +2 -2
- package/build/social-links/save.js.map +1 -1
- package/build/spacer/edit.js +3 -3
- package/build/spacer/edit.js.map +1 -1
- package/build/table/deprecated.js +8 -8
- package/build/table/deprecated.js.map +1 -1
- package/build/table/edit.js +3 -3
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js +3 -3
- package/build/table/save.js.map +1 -1
- package/build/term-description/edit.js +2 -2
- package/build/term-description/edit.js.map +1 -1
- package/build/utils/caption.js +2 -2
- package/build/utils/caption.js.map +1 -1
- package/build/verse/deprecated.js +2 -2
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/edit.js +2 -2
- package/build/verse/edit.js.map +1 -1
- package/build/verse/save.js +2 -2
- package/build/verse/save.js.map +1 -1
- package/build/video/edit.js +2 -2
- package/build/video/edit.js.map +1 -1
- package/build-module/audio/edit.js +2 -2
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/avatar/edit.js +2 -2
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/edit.js +27 -169
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/deprecated.js +16 -16
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +3 -7
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -0
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/save.js +3 -3
- package/build-module/button/save.js.map +1 -1
- package/build-module/buttons/deprecated.js +2 -2
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js +2 -2
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/save.js +2 -2
- package/build-module/buttons/save.js.map +1 -1
- package/build-module/categories/edit.js +2 -2
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/column/deprecated.js +2 -2
- package/build-module/column/deprecated.js.map +1 -1
- package/build-module/column/edit.js +2 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/save.js +2 -2
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/deprecated.js +3 -3
- 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/save.js +2 -2
- package/build-module/columns/save.js.map +1 -1
- package/build-module/comment-author-name/edit.js +2 -2
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-content/edit.js +2 -2
- package/build-module/comment-content/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +2 -2
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comment-reply-link/edit.js +2 -2
- package/build-module/comment-reply-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +2 -2
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/comments-title/edit.js +2 -2
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/cover/deprecated.js +38 -38
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/index.js +6 -6
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/resizable-cover-popover.js +2 -2
- package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build-module/cover/edit.native.js +2 -2
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/save.js +5 -5
- package/build-module/cover/save.js.map +1 -1
- package/build-module/embed/deprecated.js +3 -3
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.js +2 -2
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +2 -2
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-preview.js +3 -3
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/embed-preview.native.js +2 -2
- package/build-module/embed/embed-preview.native.js.map +1 -1
- package/build-module/embed/icons.js +6 -0
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/save.js +2 -2
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/util.js +10 -8
- package/build-module/embed/util.js.map +1 -1
- package/build-module/embed/variations.js +10 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/file/deprecated.js +2 -2
- package/build-module/file/deprecated.js.map +1 -1
- package/build-module/file/edit.js +3 -3
- 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/form-input/deprecated.js +3 -3
- package/build-module/form-input/deprecated.js.map +1 -1
- package/build-module/form-input/edit.js +4 -4
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/form-input/save.js +3 -3
- package/build-module/form-input/save.js.map +1 -1
- package/build-module/form-submission-notification/edit.js +2 -2
- package/build-module/form-submission-notification/edit.js.map +1 -1
- package/build-module/form-submission-notification/save.js +2 -2
- package/build-module/form-submission-notification/save.js.map +1 -1
- package/build-module/gallery/deprecated.js +3 -3
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +2 -2
- 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 +3 -3
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.js +2 -2
- package/build-module/gallery/v1/gallery-image.js.map +1 -1
- package/build-module/gallery/v1/gallery.js +3 -3
- package/build-module/gallery/v1/gallery.js.map +1 -1
- package/build-module/gallery/v1/save.js +3 -3
- package/build-module/gallery/v1/save.js.map +1 -1
- package/build-module/group/deprecated.js +4 -4
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/heading/deprecated.js +6 -6
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/edit.js +2 -19
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/edit.native.js +2 -2
- package/build-module/heading/edit.native.js.map +1 -1
- package/build-module/heading/index.js +1 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/save.js +2 -2
- package/build-module/heading/save.js.map +1 -1
- package/build-module/home-link/edit.js +2 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/html/edit.js +0 -2
- package/build-module/html/edit.js.map +1 -1
- package/build-module/image/deprecated.js +10 -10
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +7 -5
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +5 -3
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/save.js +3 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/latest-posts/edit.js +6 -6
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/deprecated.js +90 -1
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/index.js +0 -2
- package/build-module/list/index.js.map +1 -1
- package/build-module/list-item/edit.js +2 -9
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/index.js +2 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/media-text/deprecated.js +10 -10
- 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/media-container.js +2 -2
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/save.js +3 -3
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +3 -3
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +3 -3
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/utils.js +2 -2
- package/build-module/navigation/edit/utils.js.map +1 -1
- package/build-module/navigation-link/edit.js +3 -3
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -2
- package/build-module/navigation-submenu/edit.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/page-list-item/edit.js +3 -3
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +6 -6
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +2 -18
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +1 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/save.js +2 -2
- package/build-module/paragraph/save.js.map +1 -1
- package/build-module/paragraph/transforms.js +1 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/edit.js +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +2 -2
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author-biography/edit.js +2 -2
- package/build-module/post-author-biography/edit.js.map +1 -1
- package/build-module/post-author-name/edit.js +2 -2
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-comments-count/edit.js +2 -2
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +2 -2
- 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-comments-link/edit.js +2 -2
- package/build-module/post-comments-link/edit.js.map +1 -1
- package/build-module/post-date/edit.js +2 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +3 -3
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +20 -28
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +3 -3
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +2 -2
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +2 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-template/edit.js +7 -7
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-time-to-read/edit.js +3 -3
- package/build-module/post-time-to-read/edit.js.map +1 -1
- package/build-module/post-title/edit.js +2 -2
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/pullquote/deprecated.js +7 -7
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +2 -2
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/save.js +2 -2
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/query-title/edit.js +2 -2
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +3 -3
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +2 -2
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/save.js +2 -2
- package/build-module/quote/save.js.map +1 -1
- package/build-module/rss/edit.js +10 -8
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +6 -6
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/separator/deprecated.js +2 -2
- package/build-module/separator/deprecated.js.map +1 -1
- package/build-module/separator/edit.js +2 -2
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/separator/save.js +2 -2
- package/build-module/separator/save.js.map +1 -1
- package/build-module/shortcode/edit.js +8 -11
- package/build-module/shortcode/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -4
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +2 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-title/edit.js +2 -2
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/social-link/edit.js +3 -3
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-links/deprecated.js +2 -2
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +2 -2
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/save.js +2 -2
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/spacer/edit.js +3 -3
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table/deprecated.js +8 -8
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/edit.js +3 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +3 -3
- package/build-module/table/save.js.map +1 -1
- package/build-module/term-description/edit.js +2 -2
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/utils/caption.js +2 -2
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/verse/deprecated.js +2 -2
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/edit.js +2 -2
- package/build-module/verse/edit.js.map +1 -1
- package/build-module/verse/save.js +2 -2
- package/build-module/verse/save.js.map +1 -1
- package/build-module/video/edit.js +2 -2
- package/build-module/video/edit.js.map +1 -1
- package/build-style/block/editor-rtl.css +4 -4
- package/build-style/block/editor.css +4 -4
- package/build-style/buttons/editor-rtl.css +1 -1
- package/build-style/buttons/editor.css +1 -1
- package/build-style/buttons/style-rtl.css +1 -1
- package/build-style/buttons/style.css +1 -1
- package/build-style/common-rtl.css +3 -7
- package/build-style/common.css +3 -7
- package/build-style/editor-rtl.css +15 -32
- package/build-style/editor.css +15 -32
- package/build-style/group/editor-rtl.css +2 -1
- package/build-style/group/editor.css +2 -1
- package/build-style/image/editor-rtl.css +3 -0
- package/build-style/image/editor.css +3 -0
- package/build-style/image/style-rtl.css +1 -2
- package/build-style/image/style.css +1 -2
- package/build-style/post-template/style-rtl.css +0 -3
- package/build-style/post-template/style.css +0 -3
- package/build-style/rss/editor-rtl.css +1 -10
- package/build-style/rss/editor.css +1 -10
- package/build-style/shortcode/editor-rtl.css +0 -4
- package/build-style/shortcode/editor.css +0 -4
- package/build-style/style-rtl.css +5 -13
- package/build-style/style.css +5 -13
- package/build-style/template-part/editor-rtl.css +3 -7
- package/build-style/template-part/editor.css +3 -7
- package/package.json +36 -36
- package/src/audio/edit.js +2 -2
- package/src/avatar/edit.js +2 -2
- package/src/block/edit.js +30 -245
- package/src/block/editor.scss +7 -5
- package/src/button/block.json +1 -0
- package/src/button/deprecated.js +16 -16
- package/src/button/edit.js +3 -9
- package/src/button/save.js +3 -3
- package/src/buttons/deprecated.js +2 -2
- package/src/buttons/edit.js +2 -2
- package/src/buttons/editor.scss +1 -3
- package/src/buttons/save.js +2 -2
- package/src/buttons/style.scss +1 -3
- package/src/categories/edit.js +2 -2
- package/src/code/theme.native.scss +1 -1
- package/src/column/deprecated.js +2 -2
- package/src/column/edit.js +2 -2
- package/src/column/save.js +2 -2
- package/src/columns/deprecated.js +3 -3
- package/src/columns/edit.js +2 -2
- package/src/columns/save.js +2 -2
- package/src/comment-author-name/edit.js +2 -2
- package/src/comment-content/edit.js +2 -2
- package/src/comment-edit-link/edit.js +2 -2
- package/src/comment-reply-link/edit.js +2 -2
- package/src/comments/edit/comments-legacy.js +2 -2
- package/src/comments-title/edit.js +2 -2
- package/src/common.scss +4 -4
- package/src/cover/deprecated.js +38 -38
- package/src/cover/edit/index.js +6 -9
- package/src/cover/edit/resizable-cover-popover.js +2 -2
- package/src/cover/edit.native.js +2 -2
- package/src/cover/save.js +5 -5
- package/src/embed/deprecated.js +3 -3
- package/src/embed/edit.js +2 -2
- package/src/embed/edit.native.js +2 -2
- package/src/embed/embed-preview.js +3 -3
- package/src/embed/embed-preview.native.js +2 -2
- package/src/embed/icons.js +9 -0
- package/src/embed/save.js +2 -2
- package/src/embed/util.js +10 -6
- package/src/embed/variations.js +9 -0
- package/src/file/deprecated.js +2 -2
- package/src/file/edit.js +3 -3
- package/src/file/save.js +2 -2
- package/src/form-input/deprecated.js +3 -3
- package/src/form-input/edit.js +4 -4
- package/src/form-input/save.js +3 -3
- package/src/form-submission-notification/edit.js +2 -2
- package/src/form-submission-notification/save.js +4 -7
- package/src/gallery/deprecated.js +3 -3
- package/src/gallery/edit.js +2 -2
- package/src/gallery/gallery.js +2 -2
- package/src/gallery/save.js +3 -3
- package/src/gallery/test/helpers.native.js +3 -3
- package/src/gallery/v1/gallery-image.js +2 -2
- package/src/gallery/v1/gallery.js +3 -3
- package/src/gallery/v1/save.js +3 -3
- package/src/group/deprecated.js +4 -4
- package/src/group/editor.scss +2 -1
- package/src/heading/block.json +1 -0
- package/src/heading/deprecated.js +6 -6
- package/src/heading/edit.js +2 -23
- package/src/heading/edit.native.js +2 -2
- package/src/heading/save.js +2 -2
- package/src/heading/test/__snapshots__/transforms.native.js.snap +1 -1
- package/src/home-link/edit.js +2 -2
- package/src/html/edit.js +0 -2
- package/src/image/deprecated.js +10 -10
- package/src/image/edit.js +5 -3
- package/src/image/editor.scss +13 -7
- package/src/image/image.js +5 -2
- package/src/image/save.js +3 -3
- package/src/image/style.scss +1 -3
- package/src/latest-posts/edit.js +6 -6
- package/src/latest-posts/index.php +1 -0
- package/src/list/block.json +0 -2
- package/src/list/deprecated.js +88 -1
- package/src/list/index.php +54 -0
- package/src/list/test/__snapshots__/edit.native.js.snap +11 -11
- package/src/list/test/__snapshots__/transforms.native.js.snap +3 -3
- package/src/list/test/edit.native.js +24 -24
- package/src/list/test/transforms.native.js +1 -1
- package/src/list-item/block.json +2 -1
- package/src/list-item/edit.js +0 -15
- package/src/media-text/deprecated.js +10 -10
- package/src/media-text/edit.js +2 -2
- package/src/media-text/media-container.js +2 -2
- package/src/media-text/save.js +3 -3
- package/src/navigation/edit/index.js +3 -3
- package/src/navigation/edit/responsive-wrapper.js +3 -3
- package/src/navigation/edit/utils.js +2 -2
- package/src/navigation/index.php +52 -1
- package/src/navigation-link/edit.js +3 -3
- package/src/navigation-submenu/edit.js +2 -2
- package/src/page-list/edit.js +2 -2
- package/src/page-list-item/edit.js +3 -3
- package/src/paragraph/block.json +1 -0
- package/src/paragraph/deprecated.js +6 -6
- package/src/paragraph/edit.js +2 -23
- package/src/paragraph/save.js +2 -2
- package/src/paragraph/test/__snapshots__/transforms.native.js.snap +1 -1
- package/src/pattern/edit.js +1 -1
- package/src/post-author/edit.js +2 -2
- package/src/post-author-biography/edit.js +2 -2
- package/src/post-author-name/edit.js +2 -2
- package/src/post-comments-count/edit.js +2 -2
- package/src/post-comments-form/edit.js +2 -2
- package/src/post-comments-form/form.js +2 -2
- package/src/post-comments-link/edit.js +2 -2
- package/src/post-date/edit.js +2 -2
- package/src/post-excerpt/edit.js +3 -3
- package/src/post-featured-image/dimension-controls.js +30 -36
- package/src/post-featured-image/edit.js +3 -3
- package/src/post-featured-image/overlay.js +2 -2
- package/src/post-navigation-link/edit.js +2 -2
- package/src/post-template/edit.js +7 -7
- package/src/post-template/style.scss +0 -4
- package/src/post-terms/edit.js +2 -2
- package/src/post-time-to-read/edit.js +3 -3
- package/src/post-title/edit.js +2 -2
- package/src/pullquote/deprecated.js +7 -7
- package/src/pullquote/edit.js +2 -2
- package/src/pullquote/save.js +2 -2
- package/src/query-title/edit.js +2 -2
- package/src/quote/deprecated.js +3 -3
- package/src/quote/edit.js +2 -2
- package/src/quote/save.js +2 -2
- package/src/rss/edit.js +30 -23
- package/src/rss/editor.scss +2 -16
- package/src/search/edit.js +6 -6
- package/src/search/edit.native.js +2 -2
- package/src/separator/deprecated.js +2 -2
- package/src/separator/edit.js +2 -2
- package/src/separator/save.js +2 -2
- package/src/shortcode/edit.js +13 -17
- package/src/shortcode/editor.scss +0 -6
- package/src/site-logo/edit.js +4 -4
- package/src/site-logo/index.php +2 -0
- package/src/site-tagline/edit.js +2 -2
- package/src/site-title/edit.js +2 -2
- package/src/social-link/edit.js +3 -3
- package/src/social-links/deprecated.js +2 -2
- package/src/social-links/edit.js +2 -2
- package/src/social-links/save.js +2 -2
- package/src/spacer/edit.js +3 -3
- package/src/table/deprecated.js +12 -20
- package/src/table/edit.js +3 -3
- package/src/table/save.js +3 -3
- package/src/template-part/editor.scss +5 -8
- package/src/term-description/edit.js +2 -2
- package/src/utils/caption.js +2 -2
- package/src/verse/deprecated.js +2 -2
- package/src/verse/edit.js +2 -2
- package/src/verse/save.js +2 -2
- package/src/video/edit.js +2 -2
- package/tsconfig.tsbuildinfo +1 -1
package/build/embed/edit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_classnames","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","_x","icon","embedContentIcon","getEmbedInfoByProvider","setURL","useState","isEditingURL","setIsEditingURL","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","useSelect","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","blockProps","useBlockProps","_react","createElement","View","default","label","sprintf","__","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","removeAspectRatioClasses","value","onChange","target","fallback","tryAgain","caption","classFromPreview","classnames","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","_default","exports"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( event ) => setURL( event.target.value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = classnames( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,aAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAKA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AAKA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,IAAA,GAAAd,OAAA;AA/BA;AACA;AACA;;AAeA;AACA;AACA;;AAGA;AACA;AACA;;AASA,MAAMe,SAAS,GAAKC,KAAK,IAAM;EAC9B,MAAM;IACLC,UAAU,EAAE;MACXC,gBAAgB;MAChBC,WAAW;MACXC,UAAU;MACVC,GAAG,EAAEC;IACN,CAAC;IACDL,UAA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Ae;IACfC,SAAS,EAAEkC;EACZ,CAAC,GAAGtC,mBAAmB,CAAC,CAAC;EACzB,MAAMI,SAAS,GAAG,IAAAmC,mBAAU,EAAED,gBAAgB,EAAErF,KAAK,CAACmD,SAAU,CAAC;EAEjE,OACC,IAAAe,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAqB,QAAA,QACC,IAAArB,MAAA,CAAAC,aAAA,EAAClF,cAAA,CAAAoF,OAAa;IACbmB,cAAc,EAAG/D,OAAO,IAAI,CAAEG,WAAa;IAC3CD,uBAAuB,EAAGA,uBAAyB;IACnD8D,uBAAuB,EAAGrF,UAAY;IACtC8C,eAAe,EAAGA,eAAiB;IACnCD,gBAAgB,EAAGA,gBAAkB;IACrCyC,oBAAoB,EAAGA,CAAA,KAAMrE,eAAe,CAAE,IAAK;EAAG,CACtD,CAAC,EACF,IAAA6C,MAAA,CAAAC,aAAA,EAACtE,WAAA,CAAAuE,IAAI;IAAA,GAAMJ;EAAU,GACpB,IAAAE,MAAA,CAAAC,aAAA,EAAC7E,aAAA,CAAA+E,OAAY;IACZ5C,OAAO,EAAGA,OAAS;IACnBtB,WAAW,EAAGA,WAAa;IAC3BgD,SAAS,EAAGA,SAAW;IACvB9C,GAAG,EAAGA,GAAK;IACXoC,IAAI,EAAGA,IAAM;IACb2C,OAAO,EAAGA,OAAS;IACnBO,eAAe,EAAKZ,KAAK,IACxBtE,aAAa,CAAE;MAAE2E,OAAO,EAAEL;IAAM,CAAE,CAClC;IACDxE,UAAU,EAAGA,UAAY;IACzBQ,IAAI,EAAGA,IAAM;IACbuD,KAAK,EAAGA,KAAO;IACf5D,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CACL,CAAC;AAEL,CAAC;AAAC,IAAAkF,QAAA,GAAAC,OAAA,CAAAxB,OAAA,GAEatE,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_clsx","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","_x","icon","embedContentIcon","getEmbedInfoByProvider","setURL","useState","isEditingURL","setIsEditingURL","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","useSelect","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","blockProps","useBlockProps","_react","createElement","View","default","label","sprintf","__","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","removeAspectRatioClasses","value","onChange","target","fallback","tryAgain","caption","classFromPreview","clsx","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","_default","exports"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( event ) => setURL( event.target.value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,aAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAKA,IAAAO,KAAA,GAAAL,sBAAA,CAAAF,OAAA;AAKA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,IAAA,GAAAd,OAAA;AA/BA;AACA;AACA;;AAeA;AACA;AACA;;AAGA;AACA;AACA;;AASA,MAAMe,SAAS,GAAKC,KAAK,IAAM;EAC9B,MAAM;IACLC,UAAU,EAAE;MACXC,gBAAgB;MAChBC,WAAW;MACXC,UAAU;MACVC,GAAG,EAAEC;IACN,CAAC;IACDL,UAAU;IACVM,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC;EACD,CAAC,GAAGX,KAAK;EAET,MAAMY,gBAAgB,GAAG;IACxBC,KAAK,EAAE,IAAAC,QA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SAAU,CAAC;EAE3D,OACC,IAAAe,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAqB,QAAA,QACC,IAAArB,MAAA,CAAAC,aAAA,EAAClF,cAAA,CAAAoF,OAAa;IACbmB,cAAc,EAAG/D,OAAO,IAAI,CAAEG,WAAa;IAC3CD,uBAAuB,EAAGA,uBAAyB;IACnD8D,uBAAuB,EAAGrF,UAAY;IACtC8C,eAAe,EAAGA,eAAiB;IACnCD,gBAAgB,EAAGA,gBAAkB;IACrCyC,oBAAoB,EAAGA,CAAA,KAAMrE,eAAe,CAAE,IAAK;EAAG,CACtD,CAAC,EACF,IAAA6C,MAAA,CAAAC,aAAA,EAACtE,WAAA,CAAAuE,IAAI;IAAA,GAAMJ;EAAU,GACpB,IAAAE,MAAA,CAAAC,aAAA,EAAC7E,aAAA,CAAA+E,OAAY;IACZ5C,OAAO,EAAGA,OAAS;IACnBtB,WAAW,EAAGA,WAAa;IAC3BgD,SAAS,EAAGA,SAAW;IACvB9C,GAAG,EAAGA,GAAK;IACXoC,IAAI,EAAGA,IAAM;IACb2C,OAAO,EAAGA,OAAS;IACnBO,eAAe,EAAKZ,KAAK,IACxBtE,aAAa,CAAE;MAAE2E,OAAO,EAAEL;IAAM,CAAE,CAClC;IACDxE,UAAU,EAAGA,UAAY;IACzBQ,IAAI,EAAGA,IAAM;IACbuD,KAAK,EAAGA,KAAO;IACf5D,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CACL,CAAC;AAEL,CAAC;AAAC,IAAAkF,QAAA,GAAAC,OAAA,CAAAxB,OAAA,GAEatE,SAAS","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ var _embedLoading = _interopRequireDefault(require("./embed-loading"));
|
|
|
13
13
|
var _embedPlaceholder = _interopRequireDefault(require("./embed-placeholder"));
|
|
14
14
|
var _embedPreview = _interopRequireDefault(require("./embed-preview"));
|
|
15
15
|
var _embedLinkSettings = _interopRequireDefault(require("./embed-link-settings"));
|
|
16
|
-
var
|
|
16
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _i18n = require("@wordpress/i18n");
|
|
18
18
|
var _element = require("@wordpress/element");
|
|
19
19
|
var _data = require("@wordpress/data");
|
|
@@ -217,7 +217,7 @@ const EmbedEdit = props => {
|
|
|
217
217
|
allowResponsive,
|
|
218
218
|
className: classFromPreview
|
|
219
219
|
} = getMergedAttributes();
|
|
220
|
-
const className = (0,
|
|
220
|
+
const className = (0, _clsx.default)(classFromPreview, props.className);
|
|
221
221
|
const isProviderPreviewable = PREVIEWABLE_PROVIDERS.includes(providerNameSlug) ||
|
|
222
222
|
// For WordPress embeds, we enable the inline preview for all its providers
|
|
223
223
|
// except the ones that are not supported yet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_embedLinkSettings","_classnames","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","PREVIEWABLE_PROVIDERS","NOT_PREVIEWABLE_WP_EMBED_PROVIDERS","WP_EMBED_TYPE","EmbedEdit","props","attributes","align","providerNameSlug","previewable","responsive","url","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","clientId","defaultEmbedInfo","title","_x","icon","embedContentIcon","embedInfoByProvider","getEmbedInfoByProvider","wasBlockJustInserted","useSelect","select","blockEditorStore","isEditingURL","setIsEditingURL","useState","showEmbedBottomSheet","setShowEmbedBottomSheet","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","getEmbedPreview","hasFinishedResolution","isPreviewEmbedFallback","getThemeSupports","embedPreview","hasResolvedEmbedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","code","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","onEditURL","useCallback","value","blockClass","removeAspectRatioClasses","blockProps","useBlockProps","_react","createElement","View","default","showEmbedPlaceholder","classFromPreview","classnames","isProviderPreviewable","includes","linkLabel","Fragment","label","onPress","event","fallback","tryAgain","openEmbedLinkSettings","blockSupportsResponsive","isDefaultEmbedInfo","autoFocus","isVisible","onClose","onSubmit","withBottomSheet","_default","exports"],"sources":["@wordpress/block-library/src/embed/edit.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\nimport EmbedLinkSettings from './embed-link-settings';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { useCallback, useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\n// The inline preview feature will be released progressible, for this reason\n// the embed will only be considered previewable for the following providers list.\nconst PREVIEWABLE_PROVIDERS = [ 'youtube', 'twitter', 'instagram', 'vimeo' ];\n// Some providers are rendering the inline preview as a WordPress embed and\n// are not supported yet, so we need to disallow them with a fixed providers list.\nconst NOT_PREVIEWABLE_WP_EMBED_PROVIDERS = [ 'pinterest' ];\n\nconst WP_EMBED_TYPE = 'wp-embed';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: { align, providerNameSlug, previewable, responsive, url },\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t\tclientId,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst embedInfoByProvider = getEmbedInfoByProvider( providerNameSlug );\n\tconst { icon, title } = embedInfoByProvider || defaultEmbedInfo;\n\n\tconst { wasBlockJustInserted } = useSelect(\n\t\t( select ) => ( {\n\t\t\twasBlockJustInserted: select(\n\t\t\t\tblockEditorStore\n\t\t\t).wasBlockJustInserted( clientId, 'inserter_menu' ),\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst [ isEditingURL, setIsEditingURL ] = useState(\n\t\tisSelected && wasBlockJustInserted && ! url\n\t);\n\tconst [ showEmbedBottomSheet, setShowEmbedBottomSheet ] =\n\t\tuseState( isEditingURL );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst { preview, fetching, themeSupportsResponsive, cannotEmbed } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEmbedPreview,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\t\tgetThemeSupports,\n\t\t\t\t} = select( coreStore );\n\t\t\t\tif ( ! url ) {\n\t\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t\t}\n\n\t\t\t\tconst embedPreview = getEmbedPreview( url );\n\t\t\t\tconst hasResolvedEmbedPreview = hasFinishedResolution(\n\t\t\t\t\t'getEmbedPreview',\n\t\t\t\t\t[ url ]\n\t\t\t\t);\n\t\t\t\tconst previewIsFallback = isPreviewEmbedFallback( url );\n\n\t\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\t\tconst badEmbedProvider =\n\t\t\t\t\tembedPreview?.html === false &&\n\t\t\t\t\tembedPreview?.type === undefined;\n\t\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t\t// a valid JSON response with no HTML and `code` set to 404, rather\n\t\t\t\t// than generating a fallback response as other embeds do.\n\t\t\t\tconst wordpressCantEmbed = embedPreview?.code === '404';\n\t\t\t\tconst validPreview =\n\t\t\t\t\t!! embedPreview &&\n\t\t\t\t\t! badEmbedProvider &&\n\t\t\t\t\t! wordpressCantEmbed;\n\n\t\t\t\treturn {\n\t\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\t\tfetching: ! hasResolvedEmbedPreview,\n\t\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ url ]\n\t\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! preview?.html || ! cannotEmbed || fetching ) {\n\t\t\treturn;\n\t\t}\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = url.replace( /\\/$/, '' );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [ preview?.html, url, cannotEmbed, fetching ] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tuseEffect(\n\t\t() => setShowEmbedBottomSheet( isEditingURL ),\n\t\t[ isEditingURL ]\n\t);\n\n\tconst onEditURL = useCallback(\n\t\t( value ) => {\n\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\tif ( attributes.url !== value ) {\n\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\tattributes.className\n\t\t\t\t);\n\t\t\t\tsetAttributes( { className: blockClass } );\n\t\t\t}\n\n\t\t\t// The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,\n\t\t\t// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL\n\t\t\t// for creating the new block.\n\t\t\tsetAttributes( { url: value } );\n\t\t\tsetIsEditingURL( false );\n\t\t},\n\t\t[ attributes, setAttributes ]\n\t);\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed;\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = classnames( classFromPreview, props.className );\n\n\tconst isProviderPreviewable =\n\t\tPREVIEWABLE_PROVIDERS.includes( providerNameSlug ) ||\n\t\t// For WordPress embeds, we enable the inline preview for all its providers\n\t\t// except the ones that are not supported yet.\n\t\t( WP_EMBED_TYPE === type &&\n\t\t\t! NOT_PREVIEWABLE_WP_EMBED_PROVIDERS.includes( providerNameSlug ) );\n\n\tconst linkLabel = WP_EMBED_TYPE === type ? 'WordPress' : title;\n\n\treturn (\n\t\t<>\n\t\t\t{ showEmbedPlaceholder ? (\n\t\t\t\t<>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonPress={ ( event ) => {\n\t\t\t\t\t\t\t\tonFocus( event );\n\t\t\t\t\t\t\t\tsetIsEditingURL( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\topenEmbedLinkSettings={ () =>\n\t\t\t\t\t\t\t\tsetShowEmbedBottomSheet( true )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<EmbedControls\n\t\t\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tlinkLabel={ linkLabel }\n\t\t\t\t\t\tonEditURL={ onEditURL }\n\t\t\t\t\t/>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPreview\n\t\t\t\t\t\t\talign={ align }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tpreview={ preview }\n\t\t\t\t\t\t\tisProviderPreviewable={ isProviderPreviewable }\n\t\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tisDefaultEmbedInfo={ ! embedInfoByProvider }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<EmbedLinkSettings\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus\n\t\t\t\tvalue={ url }\n\t\t\t\tlabel={ linkLabel }\n\t\t\t\tisVisible={ showEmbedBottomSheet }\n\t\t\t\tonClose={ () => setSh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AAO;IACfoD,SAAS,EAAGA,SAAW;IACvB1C,QAAQ,EAAGA,QAAU;IACrBI,IAAI,EAAGA,IAAM;IACbN,iBAAiB,EAAGA,iBAAmB;IACvCH,UAAU,EAAGA,UAAY;IACzB8E,KAAK,EAAGvE,KAAO;IACfH,OAAO,EAAGA,OAAS;IACnBqB,OAAO,EAAGA,OAAS;IACnBiD,qBAAqB,EAAGA,qBAAuB;IAC/C7E,WAAW,EAAGA,WAAa;IAC3ByC,IAAI,EAAGA,IAAM;IACbvC,GAAG,EAAGA,GAAK;IACXsF,kBAAkB,EAAG,CAAE1E;EAAqB,CAC5C,CACI,CACL,CACF,EACD,IAAAwD,MAAA,CAAAC,aAAA,EAACxF,kBAAA,CAAA0F;EACA;EAAA;IACAgB,SAAS;IACTxB,KAAK,EAAG/D,GAAK;IACb+E,KAAK,EAAGF,SAAW;IACnBW,SAAS,EAAGnE,oBAAsB;IAClCoE,OAAO,EAAGA,CAAA,KAAMnE,uBAAuB,CAAE,KAAM,CAAG;IAClDoE,QAAQ,EAAG7B,SAAW;IACtB8B,eAAe;EAAA,CACf,CACA,CAAC;AAEL,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEa9E,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_embedLinkSettings","_clsx","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","PREVIEWABLE_PROVIDERS","NOT_PREVIEWABLE_WP_EMBED_PROVIDERS","WP_EMBED_TYPE","EmbedEdit","props","attributes","align","providerNameSlug","previewable","responsive","url","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","clientId","defaultEmbedInfo","title","_x","icon","embedContentIcon","embedInfoByProvider","getEmbedInfoByProvider","wasBlockJustInserted","useSelect","select","blockEditorStore","isEditingURL","setIsEditingURL","useState","showEmbedBottomSheet","setShowEmbedBottomSheet","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","getEmbedPreview","hasFinishedResolution","isPreviewEmbedFallback","getThemeSupports","embedPreview","hasResolvedEmbedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","code","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","onEditURL","useCallback","value","blockClass","removeAspectRatioClasses","blockProps","useBlockProps","_react","createElement","View","default","showEmbedPlaceholder","classFromPreview","clsx","isProviderPreviewable","includes","linkLabel","Fragment","label","onPress","event","fallback","tryAgain","openEmbedLinkSettings","blockSupportsResponsive","isDefaultEmbedInfo","autoFocus","isVisible","onClose","onSubmit","withBottomSheet","_default","exports"],"sources":["@wordpress/block-library/src/embed/edit.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\nimport EmbedLinkSettings from './embed-link-settings';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { useCallback, useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\n// The inline preview feature will be released progressible, for this reason\n// the embed will only be considered previewable for the following providers list.\nconst PREVIEWABLE_PROVIDERS = [ 'youtube', 'twitter', 'instagram', 'vimeo' ];\n// Some providers are rendering the inline preview as a WordPress embed and\n// are not supported yet, so we need to disallow them with a fixed providers list.\nconst NOT_PREVIEWABLE_WP_EMBED_PROVIDERS = [ 'pinterest' ];\n\nconst WP_EMBED_TYPE = 'wp-embed';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: { align, providerNameSlug, previewable, responsive, url },\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t\tclientId,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst embedInfoByProvider = getEmbedInfoByProvider( providerNameSlug );\n\tconst { icon, title } = embedInfoByProvider || defaultEmbedInfo;\n\n\tconst { wasBlockJustInserted } = useSelect(\n\t\t( select ) => ( {\n\t\t\twasBlockJustInserted: select(\n\t\t\t\tblockEditorStore\n\t\t\t).wasBlockJustInserted( clientId, 'inserter_menu' ),\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst [ isEditingURL, setIsEditingURL ] = useState(\n\t\tisSelected && wasBlockJustInserted && ! url\n\t);\n\tconst [ showEmbedBottomSheet, setShowEmbedBottomSheet ] =\n\t\tuseState( isEditingURL );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst { preview, fetching, themeSupportsResponsive, cannotEmbed } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEmbedPreview,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\t\tgetThemeSupports,\n\t\t\t\t} = select( coreStore );\n\t\t\t\tif ( ! url ) {\n\t\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t\t}\n\n\t\t\t\tconst embedPreview = getEmbedPreview( url );\n\t\t\t\tconst hasResolvedEmbedPreview = hasFinishedResolution(\n\t\t\t\t\t'getEmbedPreview',\n\t\t\t\t\t[ url ]\n\t\t\t\t);\n\t\t\t\tconst previewIsFallback = isPreviewEmbedFallback( url );\n\n\t\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\t\tconst badEmbedProvider =\n\t\t\t\t\tembedPreview?.html === false &&\n\t\t\t\t\tembedPreview?.type === undefined;\n\t\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t\t// a valid JSON response with no HTML and `code` set to 404, rather\n\t\t\t\t// than generating a fallback response as other embeds do.\n\t\t\t\tconst wordpressCantEmbed = embedPreview?.code === '404';\n\t\t\t\tconst validPreview =\n\t\t\t\t\t!! embedPreview &&\n\t\t\t\t\t! badEmbedProvider &&\n\t\t\t\t\t! wordpressCantEmbed;\n\n\t\t\t\treturn {\n\t\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\t\tfetching: ! hasResolvedEmbedPreview,\n\t\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ url ]\n\t\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! preview?.html || ! cannotEmbed || fetching ) {\n\t\t\treturn;\n\t\t}\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = url.replace( /\\/$/, '' );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [ preview?.html, url, cannotEmbed, fetching ] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tuseEffect(\n\t\t() => setShowEmbedBottomSheet( isEditingURL ),\n\t\t[ isEditingURL ]\n\t);\n\n\tconst onEditURL = useCallback(\n\t\t( value ) => {\n\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\tif ( attributes.url !== value ) {\n\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\tattributes.className\n\t\t\t\t);\n\t\t\t\tsetAttributes( { className: blockClass } );\n\t\t\t}\n\n\t\t\t// The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,\n\t\t\t// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL\n\t\t\t// for creating the new block.\n\t\t\tsetAttributes( { url: value } );\n\t\t\tsetIsEditingURL( false );\n\t\t},\n\t\t[ attributes, setAttributes ]\n\t);\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed;\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\tconst isProviderPreviewable =\n\t\tPREVIEWABLE_PROVIDERS.includes( providerNameSlug ) ||\n\t\t// For WordPress embeds, we enable the inline preview for all its providers\n\t\t// except the ones that are not supported yet.\n\t\t( WP_EMBED_TYPE === type &&\n\t\t\t! NOT_PREVIEWABLE_WP_EMBED_PROVIDERS.includes( providerNameSlug ) );\n\n\tconst linkLabel = WP_EMBED_TYPE === type ? 'WordPress' : title;\n\n\treturn (\n\t\t<>\n\t\t\t{ showEmbedPlaceholder ? (\n\t\t\t\t<>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonPress={ ( event ) => {\n\t\t\t\t\t\t\t\tonFocus( event );\n\t\t\t\t\t\t\t\tsetIsEditingURL( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\topenEmbedLinkSettings={ () =>\n\t\t\t\t\t\t\t\tsetShowEmbedBottomSheet( true )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<EmbedControls\n\t\t\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tlinkLabel={ linkLabel }\n\t\t\t\t\t\tonEditURL={ onEditURL }\n\t\t\t\t\t/>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPreview\n\t\t\t\t\t\t\talign={ align }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tpreview={ preview }\n\t\t\t\t\t\t\tisProviderPreviewable={ isProviderPreviewable }\n\t\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tisDefaultEmbedInfo={ ! embedInfoByProvider }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<EmbedLinkSettings\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus\n\t\t\t\tvalue={ url }\n\t\t\t\tlabel={ linkLabel }\n\t\t\t\tisVisible={ showEmbedBottomSheet }\n\t\t\t\tonClose={ () => setShowEmbedBottomSheet( false ) }\n\t\t\t\tonSubmit={ onEditURL }\n\t\t\t\twithBottomSheet\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,aAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,kBAAA,GAAAL,sBAAA,CAAAF,OAAA;AAKA,IAAAQ,KAAA,GAAAN,sBAAA,CAAAF,OAAA;AAKA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAIA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,IAAA,GAAAf,OAAA;AAnCA;AACA;AACA;;AAgBA;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA,MAAMgB,qBAAqB,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAE;AAC5E;AACA;AACA,MAAMC,kCAAkC,GAAG,CAAE,WAAW,CAAE;AAE1D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;IACtCgD,eAAe,EAAGA,eAAiB;IACnCD,gBAAgB,EAAGA,gBAAkB;IACrC9C,GAAG,EAAGA,GAAK;IACX6E,SAAS,EAAGA,SAAW;IACvBhB,SAAS,EAAGA;EAAW,CACvB,CAAC,EACF,IAAAO,MAAA,CAAAC,aAAA,EAACjF,WAAA,CAAAkF,IAAI;IAAA,GAAMJ;EAAU,GACpB,IAAAE,MAAA,CAAAC,aAAA,EAACzF,aAAA,CAAA2F,OAAY;IACZ3E,KAAK,EAAGA,KAAO;IACfoD,SAAS,EAAGA,SAAW;IACvB1C,QAAQ,EAAGA,QAAU;IACrBI,IAAI,EAAGA,IAAM;IACbN,iBAAiB,EAAGA,iBAAmB;IACvCH,UAAU,EAAGA,UAAY;IACzB8E,KAAK,EAAGvE,KAAO;IACfH,OAAO,EAAGA,OAAS;IACnBqB,OAAO,EAAGA,OAAS;IACnBiD,qBAAqB,EAAGA,qBAAuB;IAC/C7E,WAAW,EAAGA,WAAa;IAC3ByC,IAAI,EAAGA,IAAM;IACbvC,GAAG,EAAGA,GAAK;IACXsF,kBAAkB,EAAG,CAAE1E;EAAqB,CAC5C,CACI,CACL,CACF,EACD,IAAAwD,MAAA,CAAAC,aAAA,EAACxF,kBAAA,CAAA0F;EACA;EAAA;IACAgB,SAAS;IACTxB,KAAK,EAAG/D,GAAK;IACb+E,KAAK,EAAGF,SAAW;IACnBW,SAAS,EAAGnE,oBAAsB;IAClCoE,OAAO,EAAGA,CAAA,KAAMnE,uBAAuB,CAAE,KAAM,CAAG;IAClDoE,QAAQ,EAAG7B,SAAW;IACtB8B,eAAe;EAAA,CACf,CACA,CAAC;AAEL,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEa9E,SAAS","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _util = require("./util");
|
|
10
|
-
var
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
11
|
var _i18n = require("@wordpress/i18n");
|
|
12
12
|
var _components = require("@wordpress/components");
|
|
13
13
|
var _blockEditor = require("@wordpress/block-editor");
|
|
@@ -85,7 +85,7 @@ class EmbedPreview extends _element.Component {
|
|
|
85
85
|
const iframeTitle = (0, _i18n.sprintf)(
|
|
86
86
|
// translators: %s: host providing embed content e.g: www.youtube.com
|
|
87
87
|
(0, _i18n.__)('Embedded content from %s'), parsedHostBaseUrl);
|
|
88
|
-
const sandboxClassnames = (0,
|
|
88
|
+
const sandboxClassnames = (0, _clsx.default)(type, className, 'wp-block-embed__wrapper');
|
|
89
89
|
|
|
90
90
|
// Disabled because the overlay div doesn't actually have a role or functionality
|
|
91
91
|
// as far as the user is concerned. We're just catching the first click so that
|
|
@@ -108,7 +108,7 @@ class EmbedPreview extends _element.Component {
|
|
|
108
108
|
/* eslint-enable jsx-a11y/no-static-element-interactions */
|
|
109
109
|
|
|
110
110
|
return (0, _react.createElement)("figure", {
|
|
111
|
-
className: (0,
|
|
111
|
+
className: (0, _clsx.default)(className, 'wp-block-embed', {
|
|
112
112
|
'is-type-video': 'video' === type
|
|
113
113
|
})
|
|
114
114
|
}, previewable ? embedWrapper : (0, _react.createElement)(_components.Placeholder, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_util","require","
|
|
1
|
+
{"version":3,"names":["_util","require","_clsx","_interopRequireDefault","_i18n","_components","_blockEditor","_element","_blocks","_wpEmbedPreview","EmbedPreview","Component","constructor","arguments","hideOverlay","bind","state","interactive","getDerivedStateFromProps","nextProps","isSelected","setState","render","preview","previewable","url","type","caption","onCaptionChange","className","icon","label","insertBlocksAfter","props","scripts","html","getPhotoHtml","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sprintf","__","sandboxClassnames","clsx","embedWrapper","_react","createElement","default","SandBox","title","onFocus","onMouseUp","Placeholder","BlockIcon","showColors","href","RichText","isEmpty","identifier","tagName","__experimentalGetElementClassName","placeholder","value","onChange","inlineToolbar","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName","_default","exports"],"sources":["@wordpress/block-library/src/embed/embed-preview.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Placeholder, SandBox } from '@wordpress/components';\nimport {\n\tRichText,\n\tBlockIcon,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { Component } from '@wordpress/element';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport WpEmbedPreview from './wp-embed-preview';\n\nclass EmbedPreview extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.hideOverlay = this.hideOverlay.bind( this );\n\t\tthis.state = {\n\t\t\tinteractive: false,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( nextProps, state ) {\n\t\tif ( ! nextProps.isSelected && state.interactive ) {\n\t\t\t// We only want to change this when the block is not selected, because changing it when\n\t\t\t// the block becomes selected makes the overlap disappear too early. Hiding the overlay\n\t\t\t// happens on mouseup when the overlay is clicked.\n\t\t\treturn { interactive: false };\n\t\t}\n\n\t\treturn null;\n\t}\n\n\thideOverlay() {\n\t\t// This is called onMouseUp on the overlay. We can't respond to the `isSelected` prop\n\t\t// changing, because that happens on mouse down, and the overlay immediately disappears,\n\t\t// and the mouse event can end up in the preview content. We can't use onClick on\n\t\t// the overlay to hide it either, because then the editor misses the mouseup event, and\n\t\t// thinks we're multi-selecting blocks.\n\t\tthis.setState( { interactive: true } );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tpreview,\n\t\t\tpreviewable,\n\t\t\turl,\n\t\t\ttype,\n\t\t\tcaption,\n\t\t\tonCaptionChange,\n\t\t\tisSelected,\n\t\t\tclassName,\n\t\t\ticon,\n\t\t\tlabel,\n\t\t\tinsertBlocksAfter,\n\t\t} = this.props;\n\t\tconst { scripts } = preview;\n\t\tconst { interactive } = this.state;\n\n\t\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\t\tconst parsedHost = new URL( url ).host.split( '.' );\n\t\tconst parsedHostBaseUrl = parsedHost\n\t\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t\t.join( '.' );\n\t\tconst iframeTitle = sprintf(\n\t\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t\t__( 'Embedded content from %s' ),\n\t\t\tparsedHostBaseUrl\n\t\t);\n\t\tconst sandboxClassnames = clsx(\n\t\t\ttype,\n\t\t\tclassName,\n\t\t\t'wp-block-embed__wrapper'\n\t\t);\n\n\t\t// Disabled because the overlay div doesn't actually have a role or functionality\n\t\t// as far as the user is concerned. We're just catching the first click so that\n\t\t// the block can be selected without interacting with the embed preview that the overlay covers.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\tconst embedWrapper =\n\t\t\t'wp-embed' === type ? (\n\t\t\t\t<WpEmbedPreview html={ html } />\n\t\t\t) : (\n\t\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t\t<SandBox\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tscripts={ scripts }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tonFocus={ this.hideOverlay }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! interactive && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"block-library-embed__interactive-overlay\"\n\t\t\t\t\t\t\tonMouseUp={ this.hideOverlay }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\tclassName={ clsx( className, 'wp-block-embed', {\n\t\t\t\t\t'is-type-video': 'video' === type,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t<a href={ url }>{ url }</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: host providing embed content e.g: www.youtube.com */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\"Embedded content from %s can't be previewed in the editor.\"\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tparsedHostBaseUrl\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</Placeholder>\n\t\t\t\t) }\n\t\t\t\t{ ( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"caption\"\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tplaceholder={ __( 'Add caption' ) }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ onCaptionChange }\n\t\t\t\t\t\tinlineToolbar\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t}\n}\n\nexport default EmbedPreview;\n"],"mappings":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[]}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
|
-
var
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
11
|
var _primitives = require("@wordpress/primitives");
|
|
12
12
|
var _blockEditor = require("@wordpress/block-editor");
|
|
13
13
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -78,7 +78,7 @@ const EmbedPreview = ({
|
|
|
78
78
|
const iframeTitle = (0, _i18n.sprintf)(
|
|
79
79
|
// translators: %s: host providing embed content e.g: www.youtube.com
|
|
80
80
|
(0, _i18n.__)('Embedded content from %s'), parsedHostBaseUrl);
|
|
81
|
-
const sandboxClassnames = (0,
|
|
81
|
+
const sandboxClassnames = (0, _clsx.default)(type, className, 'wp-block-embed__wrapper');
|
|
82
82
|
const PreviewContent = 'wp-embed' === type ? _wpEmbedPreview.default : _components.SandBox;
|
|
83
83
|
const embedWrapper = (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_reactNative.TouchableWithoutFeedback, {
|
|
84
84
|
onPress: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_clsx","_interopRequireDefault","_primitives","_blockEditor","_i18n","_element","_components","_data","_util","_embedNoPreview","_wpEmbedPreview","_styles","EmbedPreview","align","className","clientId","icon","insertBlocksAfter","isSelected","label","onFocus","preview","previewable","isProviderPreviewable","type","url","isDefaultEmbedInfo","isCaptionSelected","setIsCaptionSelected","useState","locale","useSelect","blockEditorStore","getSettings","wrapperStyle","styles","wrapperAlignStyle","sandboxAlignStyle","accessibilityLabelCreator","caption","RichText","isEmpty","__","sprintf","onEmbedPreviewPress","onFocusCaption","provider_url","providerUrl","html","getPhotoHtml","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sandboxClassnames","clsx","PreviewContent","WpEmbedPreview","SandBox","embedWrapper","_react","createElement","Fragment","TouchableWithoutFeedback","onPress","View","pointerEvents","style","lang","title","containerStyle","accessible","disabled","default","BlockCaption","_default","exports","memo"],"sources":["@wordpress/block-library/src/embed/embed-preview.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TouchableWithoutFeedback } from 'react-native';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { View } from '@wordpress/primitives';\nimport {\n\tBlockCaption,\n\tRichText,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { memo, useState } from '@wordpress/element';\nimport { SandBox } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\nimport EmbedNoPreview from './embed-no-preview';\nimport WpEmbedPreview from './wp-embed-preview';\nimport styles from './styles.scss';\n\nconst EmbedPreview = ( {\n\talign,\n\tclassName,\n\tclientId,\n\ticon,\n\tinsertBlocksAfter,\n\tisSelected,\n\tlabel,\n\tonFocus,\n\tpreview,\n\tpreviewable,\n\tisProviderPreviewable,\n\ttype,\n\turl,\n\tisDefaultEmbedInfo,\n} ) => {\n\tconst [ isCaptionSelected, setIsCaptionSelected ] = useState( false );\n\tconst { locale } = useSelect( blockEditorStore ).getSettings();\n\n\tconst wrapperStyle = styles[ 'embed-preview__wrapper' ];\n\tconst wrapperAlignStyle =\n\t\tstyles[ `embed-preview__wrapper--align-${ align }` ];\n\tconst sandboxAlignStyle =\n\t\tstyles[ `embed-preview__sandbox--align-${ align }` ];\n\n\tfunction accessibilityLabelCreator( caption ) {\n\t\treturn RichText.isEmpty( caption )\n\t\t\t? /* translators: accessibility text. Empty Embed caption. */\n\t\t\t __( 'Embed caption. Empty' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: accessibility text. %s: Embed caption. */\n\t\t\t\t\t__( 'Embed caption. %s' ),\n\t\t\t\t\tcaption\n\t\t\t );\n\t}\n\n\tfunction onEmbedPreviewPress() {\n\t\tsetIsCaptionSelected( false );\n\t}\n\n\tfunction onFocusCaption() {\n\t\tif ( onFocus ) {\n\t\t\tonFocus();\n\t\t}\n\t\tif ( ! isCaptionSelected ) {\n\t\t\tsetIsCaptionSelected( true );\n\t\t}\n\t}\n\n\tconst { provider_url: providerUrl } = preview;\n\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\tconst parsedHost = new URL( url ).host.split( '.' );\n\tconst parsedHostBaseUrl = parsedHost\n\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t.join( '.' );\n\tconst iframeTitle = sprintf(\n\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t__( 'Embedded content from %s' ),\n\t\tparsedHostBaseUrl\n\t);\n\tconst sandboxClassnames = clsx(\n\t\ttype,\n\t\tclassName,\n\t\t'wp-block-embed__wrapper'\n\t);\n\n\tconst PreviewContent = 'wp-embed' === type ? WpEmbedPreview : SandBox;\n\tconst embedWrapper = (\n\t\t<>\n\t\t\t<TouchableWithoutFeedback\n\t\t\t\tonPress={ () => {\n\t\t\t\t\tif ( onFocus ) {\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( isCaptionSelected ) {\n\t\t\t\t\t\tsetIsCaptionSelected( false );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tpointerEvents=\"box-only\"\n\t\t\t\t\tstyle={ [ wrapperStyle, wrapperAlignStyle ] }\n\t\t\t\t>\n\t\t\t\t\t<PreviewContent\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tlang={ locale }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tproviderUrl={ providerUrl }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tcontainerStyle={ sandboxAlignStyle }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t</>\n\t);\n\treturn (\n\t\t<TouchableWithoutFeedback\n\t\t\taccessible={ ! isSelected }\n\t\t\tonPress={ onEmbedPreviewPress }\n\t\t\tdisabled={ ! isSelected }\n\t\t>\n\t\t\t<View>\n\t\t\t\t{ isProviderPreviewable && previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<EmbedNoPreview\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonPress={ () => setIsCaptionSelected( false ) }\n\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\tisDefaultEmbedInfo={ isDefaultEmbedInfo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockCaption\n\t\t\t\t\taccessibilityLabelCreator={ accessibilityLabelCreator }\n\t\t\t\t\taccessible\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tisSelected={ isCaptionSelected }\n\t\t\t\t\tonFocus={ onFocusCaption }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n};\n\nexport default memo( EmbedPreview );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAKA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,eAAA,GAAAT,sBAAA,CAAAF,OAAA;A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EAAGmC,iBAAmB;IAC1BZ,WAAW,EAAGA,WAAa;IAC3BtB,GAAG,EAAGA,GAAK;IACXkD,cAAc,EAAGtC;EAAmB,CACpC,CACI,CACmB,CACzB,CACF;EACD,OACC,IAAA4B,MAAA,CAAAC,aAAA,EAACpE,YAAA,CAAAsE,wBAAwB;IACxBQ,UAAU,EAAG,CAAE1D,UAAY;IAC3BmD,OAAO,EAAGzB,mBAAqB;IAC/BiC,QAAQ,EAAG,CAAE3D;EAAY,GAEzB,IAAA+C,MAAA,CAAAC,aAAA,EAAChE,WAAA,CAAAoE,IAAI,QACF/C,qBAAqB,IAAID,WAAW,GACrC0C,YAAY,GAEZ,IAAAC,MAAA,CAAAC,aAAA,EAACzD,eAAA,CAAAqE,OAAc;IACd3D,KAAK,EAAGA,KAAO;IACfH,IAAI,EAAGA,IAAM;IACbE,UAAU,EAAGA,UAAY;IACzBmD,OAAO,EAAGA,CAAA,KAAMzC,oBAAoB,CAAE,KAAM,CAAG;IAC/CN,WAAW,EAAGA,WAAa;IAC3BI,kBAAkB,EAAGA;EAAoB,CACzC,CACD,EACD,IAAAuC,MAAA,CAAAC,aAAA,EAAC/D,YAAA,CAAA4E,YAAY;IACZzC,yBAAyB,EAAGA,yBAA2B;IACvDsC,UAAU;IACV7D,QAAQ,EAAGA,QAAU;IACrBE,iBAAiB,EAAGA,iBAAmB;IACvCC,UAAU,EAAGS,iBAAmB;IAChCP,OAAO,EAAGyB;EAAgB,CAC1B,CACI,CACmB,CAAC;AAE7B,CAAC;AAAC,IAAAmC,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEa,IAAAI,aAAI,EAAEtE,YAAa,CAAC","ignoreList":[]}
|
package/build/embed/icons.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.embedYouTubeIcon = exports.embedWordPressIcon = exports.embedWolframIcon = exports.embedVimeoIcon = exports.embedVideoIcon = exports.embedTwitterIcon = exports.embedTumblrIcon = exports.embedSpotifyIcon = exports.embedRedditIcon = exports.embedPocketCastsIcon = exports.embedPinterestIcon = exports.embedPhotoIcon = exports.embedInstagramIcon = exports.embedFlickrIcon = exports.embedFacebookIcon = exports.embedDailymotionIcon = exports.embedContentIcon = exports.embedAudioIcon = exports.embedAnimotoIcon = exports.embedAmazonIcon = void 0;
|
|
6
|
+
exports.embedYouTubeIcon = exports.embedWordPressIcon = exports.embedWolframIcon = exports.embedVimeoIcon = exports.embedVideoIcon = exports.embedTwitterIcon = exports.embedTumblrIcon = exports.embedSpotifyIcon = exports.embedRedditIcon = exports.embedPocketCastsIcon = exports.embedPinterestIcon = exports.embedPhotoIcon = exports.embedInstagramIcon = exports.embedFlickrIcon = exports.embedFacebookIcon = exports.embedDailymotionIcon = exports.embedContentIcon = exports.embedBlueskyIcon = exports.embedAudioIcon = exports.embedAnimotoIcon = exports.embedAmazonIcon = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
/**
|
|
@@ -175,4 +175,10 @@ const embedPocketCastsIcon = exports.embedPocketCastsIcon = {
|
|
|
175
175
|
fill: "#fff"
|
|
176
176
|
}))
|
|
177
177
|
};
|
|
178
|
+
const embedBlueskyIcon = exports.embedBlueskyIcon = (0, _react.createElement)(_components.SVG, {
|
|
179
|
+
viewBox: "0 0 24 24"
|
|
180
|
+
}, (0, _react.createElement)(_components.Path, {
|
|
181
|
+
fill: "#0a7aff",
|
|
182
|
+
d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
|
|
183
|
+
}));
|
|
178
184
|
//# sourceMappingURL=icons.js.map
|
package/build/embed/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","embedContentIcon","exports","_react","createElement","SVG","viewBox","xmlns","Path","d","embedAudioIcon","embedPhotoIcon","embedVideoIcon","embedTwitterIcon","foreground","src","G","embedYouTubeIcon","embedFacebookIcon","embedInstagramIcon","embedWordPressIcon","embedSpotifyIcon","embedFlickrIcon","embedVimeoIcon","embedRedditIcon","embedTumblrIcon","embedAmazonIcon","embedAnimotoIcon","fill","embedDailymotionIcon","embedPinterestIcon","width","height","version","embedWolframIcon","embedPocketCastsIcon","fillRule","clipRule"],"sources":["@wordpress/block-library/src/embed/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { G, Path, SVG } from '@wordpress/components';\n\nexport const embedContentIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z\" />\n\t</SVG>\n);\nexport const embedAudioIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z\" />\n\t</SVG>\n);\nexport const embedPhotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z\" />\n\t</SVG>\n);\nexport const embedVideoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\nexport const embedTwitterIcon = {\n\tforeground: '#1da1f2',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedYouTubeIcon = {\n\tforeground: '#ff0000',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFacebookIcon = {\n\tforeground: '#3b5998',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedInstagramIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<G>\n\t\t\t<Path d=\"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\"></Path>\n\t\t</G>\n\t</SVG>\n);\nexport const embedWordPressIcon = {\n\tforeground: '#0073AA',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedSpotifyIcon = {\n\tforeground: '#1db954',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFlickrIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z\" />\n\t</SVG>\n);\nexport const embedVimeoIcon = {\n\tforeground: '#1ab7ea',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedRedditIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\nexport const embedTumblrIcon = {\n\tforeground: '#35465c',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedAmazonIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z\" />\n\t\t<Path d=\"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z\" />\n\t\t<Path d=\"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z\" />\n\t</SVG>\n);\nexport const embedAnimotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z\"\n\t\t\tfill=\"#4bc7ee\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z\"\n\t\t\tfill=\"#d4cdcb\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z\"\n\t\t\tfill=\"#c3d82e\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z\"\n\t\t\tfill=\"#e4ecb0\"\n\t\t/>\n\t\t<Path d=\"m.0206909 21 19.5468091-9.063 1.6621 2.8344z\" fill=\"#209dbd\" />\n\t\t<Path\n\t\t\td=\"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z\"\n\t\t\tfill=\"#7cb3c9\"\n\t\t/>\n\t</SVG>\n);\nexport const embedDailymotionIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z\"\n\t\t\tfill=\"#333436\"\n\t\t/>\n\t</SVG>\n);\nexport const embedPinterestIcon = (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2\" />\n\t</SVG>\n);\n\nexport const embedWolframIcon = (\n\t<SVG viewBox=\"0 0 44 44\">\n\t\t<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\" />\n\t</SVG>\n);\n\nexport const embedPocketCastsIcon = {\n\tforeground: '#f43e37',\n\tsrc: (\n\t\t<SVG\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z\"\n\t\t\t/>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"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\"\n\t\t\t\tfill=\"#fff\"\n\t\t\t/>\n\t\t</SVG>\n\t),\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAC5B,IAAAE,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,GAAG;EAACC,OAAO,EAAC,WAAW;EAACC,KAAK,EAAC;AAA4B,GAC1D,IAAAJ,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAS,IAAI;EAAC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AAC,MAAM;IACXrB,KAAK,EAAC;EAA4B,GAElC,IAAAJ,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAS,IAAI;IACJ4B,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB5B,CAAC,EAAC;EAA4C,CAC9C,CAAC,EACF,IAAAN,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAS,IAAI;IACJ4B,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB5B,CAAC,EAAC,4IAA4I;IAC9ImB,IAAI,EAAC;EAAM,CACX,CACG;AAEP,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","embedContentIcon","exports","_react","createElement","SVG","viewBox","xmlns","Path","d","embedAudioIcon","embedPhotoIcon","embedVideoIcon","embedTwitterIcon","foreground","src","G","embedYouTubeIcon","embedFacebookIcon","embedInstagramIcon","embedWordPressIcon","embedSpotifyIcon","embedFlickrIcon","embedVimeoIcon","embedRedditIcon","embedTumblrIcon","embedAmazonIcon","embedAnimotoIcon","fill","embedDailymotionIcon","embedPinterestIcon","width","height","version","embedWolframIcon","embedPocketCastsIcon","fillRule","clipRule","embedBlueskyIcon"],"sources":["@wordpress/block-library/src/embed/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { G, Path, SVG } from '@wordpress/components';\n\nexport const embedContentIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z\" />\n\t</SVG>\n);\nexport const embedAudioIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z\" />\n\t</SVG>\n);\nexport const embedPhotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z\" />\n\t</SVG>\n);\nexport const embedVideoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\nexport const embedTwitterIcon = {\n\tforeground: '#1da1f2',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedYouTubeIcon = {\n\tforeground: '#ff0000',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFacebookIcon = {\n\tforeground: '#3b5998',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedInstagramIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<G>\n\t\t\t<Path d=\"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\"></Path>\n\t\t</G>\n\t</SVG>\n);\nexport const embedWordPressIcon = {\n\tforeground: '#0073AA',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedSpotifyIcon = {\n\tforeground: '#1db954',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFlickrIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z\" />\n\t</SVG>\n);\nexport const embedVimeoIcon = {\n\tforeground: '#1ab7ea',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedRedditIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\nexport const embedTumblrIcon = {\n\tforeground: '#35465c',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedAmazonIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z\" />\n\t\t<Path d=\"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z\" />\n\t\t<Path d=\"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z\" />\n\t</SVG>\n);\nexport const embedAnimotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z\"\n\t\t\tfill=\"#4bc7ee\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z\"\n\t\t\tfill=\"#d4cdcb\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z\"\n\t\t\tfill=\"#c3d82e\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z\"\n\t\t\tfill=\"#e4ecb0\"\n\t\t/>\n\t\t<Path d=\"m.0206909 21 19.5468091-9.063 1.6621 2.8344z\" fill=\"#209dbd\" />\n\t\t<Path\n\t\t\td=\"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z\"\n\t\t\tfill=\"#7cb3c9\"\n\t\t/>\n\t</SVG>\n);\nexport const embedDailymotionIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z\"\n\t\t\tfill=\"#333436\"\n\t\t/>\n\t</SVG>\n);\nexport const embedPinterestIcon = (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2\" />\n\t</SVG>\n);\n\nexport const embedWolframIcon = (\n\t<SVG viewBox=\"0 0 44 44\">\n\t\t<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\" />\n\t</SVG>\n);\n\nexport const embedPocketCastsIcon = {\n\tforeground: '#f43e37',\n\tsrc: (\n\t\t<SVG\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z\"\n\t\t\t/>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"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\"\n\t\t\t\tfill=\"#fff\"\n\t\t\t/>\n\t\t</SVG>\n\t),\n};\n\nexport const embedBlueskyIcon = (\n\t<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H,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAS,IAAI;EACJoB,IAAI,EAAC,SAAS;EACdnB,CAAC,EAAC;AAAyQ,CAC3Q,CACG,CACL","ignoreList":[]}
|
package/build/embed/save.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = save;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
10
|
var _blockEditor = require("@wordpress/block-editor");
|
|
11
11
|
/**
|
|
12
12
|
* External dependencies
|
|
@@ -28,7 +28,7 @@ function save({
|
|
|
28
28
|
if (!url) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
const className = (0,
|
|
31
|
+
const className = (0, _clsx.default)('wp-block-embed', {
|
|
32
32
|
[`is-type-${type}`]: type,
|
|
33
33
|
[`is-provider-${providerNameSlug}`]: providerNameSlug,
|
|
34
34
|
[`wp-block-embed-${providerNameSlug}`]: providerNameSlug
|
package/build/embed/save.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","save","attributes","url","caption","type","providerNameSlug","className","clsx","_react","createElement","useBlockProps","RichText","isEmpty","Content","__experimentalGetElementClassName","tagName","value"],"sources":["@wordpress/block-library/src/embed/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { url, caption, type, providerNameSlug } = attributes;\n\n\tif ( ! url ) {\n\t\treturn null;\n\t}\n\n\tconst className = clsx( 'wp-block-embed', {\n\t\t[ `is-type-${ type }` ]: type,\n\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t[ `wp-block-embed-${ providerNameSlug }` ]: providerNameSlug,\n\t} );\n\n\treturn (\n\t\t<figure { ...useBlockProps.save( { className } ) }>\n\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t{ `\\n${ url }\\n` /* URL needs to be on its own line. */ }\n\t\t\t</div>\n\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t<RichText.Content\n\t\t\t\t\tclassName={ __experimentalGetElementClassName( 'caption' ) }\n\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\tvalue={ caption }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</figure>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAOe,SAASE,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC,IAAI;IAAEC;EAAiB,CAAC,GAAGJ,UAAU;EAE3D,IAAK,CAAEC,GAAG,EAAG;IACZ,OAAO,IAAI;EACZ;EAEA,MAAMI,SAAS,GAAG,IAAAC,aAAI,EAAE,gBAAgB,EAAE;IACzC,CAAG,WAAWH,IAAM,EAAC,GAAIA,IAAI;IAC7B,CAAG,eAAeC,gBAAkB,EAAC,GAAIA,gBAAgB;IACzD,CAAG,kBAAkBA,gBAAkB,EAAC,GAAIA;EAC7C,CAAE,CAAC;EAEH,OACC,IAAAG,MAAA,CAAAC,aAAA;IAAA,GAAaC,0BAAa,CAACV,IAAI,CAAE;MAAEM;IAAU,CAAE;EAAC,GAC/C,IAAAE,MAAA,CAAAC,aAAA;IAAKH,SAAS,EAAC;EAAyB,GACpC,KAAKJ,GAAK,IAAG,CAAC,sCACb,CAAC,EACJ,CAAES,qBAAQ,CAACC,OAAO,CAAET,OAAQ,CAAC,IAC9B,IAAAK,MAAA,CAAAC,aAAA,EAACV,YAAA,CAAAY,QAAQ,CAACE,OAAO;IAChBP,SAAS,EAAG,IAAAQ,8CAAiC,EAAE,SAAU,CAAG;IAC5DC,OAAO,EAAC,YAAY;IACpBC,KAAK,EAAGb;EAAS,CACjB,CAEK,CAAC;AAEX","ignoreList":[]}
|
package/build/embed/util.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.getAttributesFromPreview = exports.findMoreSuitableBlock = void 0;
|
|
|
10
10
|
exports.getClassNames = getClassNames;
|
|
11
11
|
exports.removeAspectRatioClasses = exports.matchesPatterns = exports.isFromWordPress = exports.hasAspectRatioClass = exports.getPhotoHtml = exports.getMergedAttributesWithPreview = exports.getEmbedInfoByProvider = void 0;
|
|
12
12
|
var _react = require("react");
|
|
13
|
-
var
|
|
13
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _memize = _interopRequireDefault(require("memize"));
|
|
15
15
|
var _components = require("@wordpress/components");
|
|
16
16
|
var _element = require("@wordpress/element");
|
|
@@ -230,18 +230,20 @@ const removeAspectRatioClasses = existingClassNames => {
|
|
|
230
230
|
if (!existingClassNames) {
|
|
231
231
|
// Avoids extraneous work and also, by returning the same value as
|
|
232
232
|
// received, ensures the post is not dirtied by a change of the block
|
|
233
|
-
// attribute from `undefined` to an
|
|
233
|
+
// attribute from `undefined` to an empty string.
|
|
234
234
|
return existingClassNames;
|
|
235
235
|
}
|
|
236
236
|
const aspectRatioClassNames = _constants.ASPECT_RATIOS.reduce((accumulator, {
|
|
237
237
|
className
|
|
238
238
|
}) => {
|
|
239
|
-
accumulator
|
|
239
|
+
accumulator.push(className);
|
|
240
240
|
return accumulator;
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
}, ['wp-has-aspect-ratio']);
|
|
242
|
+
let outputClassNames = existingClassNames;
|
|
243
|
+
for (const className of aspectRatioClassNames) {
|
|
244
|
+
outputClassNames = outputClassNames.replace(className, '');
|
|
245
|
+
}
|
|
246
|
+
return outputClassNames.trim();
|
|
245
247
|
};
|
|
246
248
|
|
|
247
249
|
/**
|
|
@@ -276,7 +278,7 @@ function getClassNames(html, existingClassNames, allowResponsive = true) {
|
|
|
276
278
|
return removeAspectRatioClasses(existingClassNames);
|
|
277
279
|
}
|
|
278
280
|
// Close aspect ratio match found.
|
|
279
|
-
return (0,
|
|
281
|
+
return (0, _clsx.default)(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
}
|