@wordpress/block-library 9.23.0 → 9.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/button/edit.js +29 -17
- package/build/button/edit.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/columns/edit.js +18 -22
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +41 -12
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +41 -12
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +27 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +23 -9
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-title/edit.js +41 -12
- package/build/comments-title/edit.js.map +1 -1
- package/build/details/edit.js +27 -3
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/embed/edit.js +2 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-controls.js +41 -22
- package/build/embed/embed-controls.js.map +1 -1
- package/build/file/inspector.js +73 -30
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +67 -37
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +47 -18
- package/build/form-input/edit.js.map +1 -1
- package/build/html/index.js +2 -1
- package/build/html/index.js.map +1 -1
- package/build/image/constants.js +2 -1
- package/build/image/constants.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -4
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.js +154 -82
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +131 -52
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +93 -51
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +43 -27
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation-link/index.js +3 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +2 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +1 -0
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/index.js +3 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +3 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-count/transforms.js +26 -0
- package/build/post-comments-count/transforms.js.map +1 -0
- package/build/post-comments-link/index.js +3 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-comments-link/transforms.js +26 -0
- package/build/post-comments-link/transforms.js.map +1 -0
- package/build/post-excerpt/edit.js +3 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +2 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +3 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +2 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +13 -13
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +5 -3
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +4 -2
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +56 -18
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +1 -1
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +120 -46
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +2 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +76 -86
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +52 -20
- package/build/separator/edit.js.map +1 -1
- package/build/shortcode/index.js +2 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/social-link/variations.js +53 -48
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +35 -45
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +3 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +8 -4
- package/build/table/index.js.map +1 -1
- package/build/video/tracks-editor.js +40 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/edit.js +30 -18
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/columns/edit.js +18 -22
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +42 -13
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +42 -13
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +28 -8
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -3
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +24 -10
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +42 -13
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/details/edit.js +29 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/embed/edit.js +2 -4
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-controls.js +42 -23
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/file/inspector.js +74 -31
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +68 -38
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +48 -19
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/html/index.js +2 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/constants.js +1 -0
- package/build-module/image/constants.js.map +1 -1
- package/build-module/image/edit.js +2 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +2 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.js +155 -83
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +132 -53
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +94 -52
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation-link/index.js +3 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +2 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +1 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/index.js +3 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-count/transforms.js +19 -0
- package/build-module/post-comments-count/transforms.js.map +1 -0
- package/build-module/post-comments-link/index.js +3 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-comments-link/transforms.js +19 -0
- package/build-module/post-comments-link/transforms.js.map +1 -0
- package/build-module/post-excerpt/edit.js +4 -2
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +2 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +4 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +2 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +13 -13
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +5 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +4 -2
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +57 -19
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +5 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/read-more/index.js +2 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +121 -47
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +2 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +78 -88
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +54 -22
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/index.js +2 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/social-link/variations.js +53 -48
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +37 -47
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +4 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +8 -4
- package/build-module/table/index.js.map +1 -1
- package/build-module/video/tracks-editor.js +41 -13
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +47 -11
- package/build-style/archives/editor.css +47 -11
- package/build-style/archives/style-rtl.css +47 -11
- package/build-style/archives/style.css +47 -11
- package/build-style/audio/editor-rtl.css +47 -11
- package/build-style/audio/editor.css +47 -11
- package/build-style/audio/style-rtl.css +47 -11
- package/build-style/audio/style.css +47 -11
- package/build-style/audio/theme-rtl.css +47 -11
- package/build-style/audio/theme.css +47 -11
- package/build-style/avatar/editor-rtl.css +47 -11
- package/build-style/avatar/editor.css +47 -11
- package/build-style/avatar/style-rtl.css +47 -11
- package/build-style/avatar/style.css +47 -11
- package/build-style/button/editor-rtl.css +47 -11
- package/build-style/button/editor.css +47 -11
- package/build-style/button/style-rtl.css +47 -12
- package/build-style/button/style.css +47 -12
- package/build-style/buttons/editor-rtl.css +47 -11
- package/build-style/buttons/editor.css +47 -11
- package/build-style/buttons/style-rtl.css +50 -11
- package/build-style/buttons/style.css +50 -11
- package/build-style/calendar/style-rtl.css +47 -11
- package/build-style/calendar/style.css +47 -11
- package/build-style/categories/editor-rtl.css +47 -11
- package/build-style/categories/editor.css +47 -11
- package/build-style/categories/style-rtl.css +47 -11
- package/build-style/categories/style.css +47 -11
- package/build-style/classic-rtl.css +47 -11
- package/build-style/classic.css +47 -11
- package/build-style/code/editor-rtl.css +47 -11
- package/build-style/code/editor.css +47 -11
- package/build-style/code/style-rtl.css +47 -11
- package/build-style/code/style.css +47 -11
- package/build-style/code/theme-rtl.css +47 -11
- package/build-style/code/theme.css +47 -11
- package/build-style/columns/editor-rtl.css +47 -11
- package/build-style/columns/editor.css +47 -11
- package/build-style/columns/style-rtl.css +47 -11
- package/build-style/columns/style.css +47 -11
- package/build-style/comment-author-avatar/editor-rtl.css +47 -11
- package/build-style/comment-author-avatar/editor.css +47 -11
- package/build-style/comment-author-name/style-rtl.css +47 -11
- package/build-style/comment-author-name/style.css +47 -11
- package/build-style/comment-content/style-rtl.css +47 -11
- package/build-style/comment-content/style.css +47 -11
- package/build-style/comment-date/style-rtl.css +47 -11
- package/build-style/comment-date/style.css +47 -11
- package/build-style/comment-edit-link/style-rtl.css +47 -11
- package/build-style/comment-edit-link/style.css +47 -11
- package/build-style/comment-reply-link/style-rtl.css +47 -11
- package/build-style/comment-reply-link/style.css +47 -11
- package/build-style/comment-template/style-rtl.css +47 -11
- package/build-style/comment-template/style.css +47 -11
- package/build-style/comments/editor-rtl.css +47 -11
- package/build-style/comments/editor.css +47 -11
- package/build-style/comments/style-rtl.css +47 -11
- package/build-style/comments/style.css +47 -11
- package/build-style/comments-pagination/editor-rtl.css +47 -11
- package/build-style/comments-pagination/editor.css +47 -11
- package/build-style/comments-pagination/style-rtl.css +47 -11
- package/build-style/comments-pagination/style.css +47 -11
- package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/comments-pagination-numbers/editor.css +47 -11
- package/build-style/comments-title/editor-rtl.css +47 -11
- package/build-style/comments-title/editor.css +47 -11
- package/build-style/common-rtl.css +130 -9
- package/build-style/common.css +130 -9
- package/build-style/cover/editor-rtl.css +47 -11
- package/build-style/cover/editor.css +47 -11
- package/build-style/cover/style-rtl.css +47 -11
- package/build-style/cover/style.css +47 -11
- package/build-style/details/editor-rtl.css +47 -11
- package/build-style/details/editor.css +47 -11
- package/build-style/details/style-rtl.css +47 -11
- package/build-style/details/style.css +47 -11
- package/build-style/editor-elements-rtl.css +47 -11
- package/build-style/editor-elements.css +47 -11
- package/build-style/editor-rtl.css +57 -15
- package/build-style/editor.css +57 -15
- package/build-style/elements-rtl.css +47 -11
- package/build-style/elements.css +47 -11
- package/build-style/embed/editor-rtl.css +47 -11
- package/build-style/embed/editor.css +47 -11
- package/build-style/embed/style-rtl.css +47 -11
- package/build-style/embed/style.css +47 -11
- package/build-style/embed/theme-rtl.css +47 -11
- package/build-style/embed/theme.css +47 -11
- package/build-style/file/editor-rtl.css +47 -11
- package/build-style/file/editor.css +47 -11
- package/build-style/file/style-rtl.css +47 -11
- package/build-style/file/style.css +47 -11
- package/build-style/footnotes/style-rtl.css +47 -11
- package/build-style/footnotes/style.css +47 -11
- package/build-style/form-input/editor-rtl.css +47 -11
- package/build-style/form-input/editor.css +47 -11
- package/build-style/form-input/style-rtl.css +47 -11
- package/build-style/form-input/style.css +47 -11
- package/build-style/form-submission-notification/editor-rtl.css +47 -11
- package/build-style/form-submission-notification/editor.css +47 -11
- package/build-style/form-submit-button/style-rtl.css +47 -11
- package/build-style/form-submit-button/style.css +47 -11
- package/build-style/freeform/editor-rtl.css +47 -11
- package/build-style/freeform/editor.css +47 -11
- package/build-style/gallery/editor-rtl.css +47 -11
- package/build-style/gallery/editor.css +47 -11
- package/build-style/gallery/style-rtl.css +48 -11
- package/build-style/gallery/style.css +48 -11
- package/build-style/gallery/theme-rtl.css +47 -11
- package/build-style/gallery/theme.css +47 -11
- package/build-style/group/editor-rtl.css +47 -11
- package/build-style/group/editor.css +47 -11
- package/build-style/group/style-rtl.css +47 -11
- package/build-style/group/style.css +47 -11
- package/build-style/group/theme-rtl.css +47 -11
- package/build-style/group/theme.css +47 -11
- package/build-style/heading/style-rtl.css +47 -11
- package/build-style/heading/style.css +47 -11
- package/build-style/html/editor-rtl.css +48 -11
- package/build-style/html/editor.css +48 -11
- package/build-style/image/editor-rtl.css +47 -11
- package/build-style/image/editor.css +47 -11
- package/build-style/image/style-rtl.css +47 -11
- package/build-style/image/style.css +47 -11
- package/build-style/image/theme-rtl.css +47 -11
- package/build-style/image/theme.css +47 -11
- package/build-style/latest-comments/style-rtl.css +47 -11
- package/build-style/latest-comments/style.css +47 -11
- package/build-style/latest-posts/editor-rtl.css +47 -11
- package/build-style/latest-posts/editor.css +47 -11
- package/build-style/latest-posts/style-rtl.css +47 -11
- package/build-style/latest-posts/style.css +47 -11
- package/build-style/list/style-rtl.css +47 -11
- package/build-style/list/style.css +47 -11
- package/build-style/loginout/style-rtl.css +47 -11
- package/build-style/loginout/style.css +47 -11
- package/build-style/media-text/editor-rtl.css +47 -11
- package/build-style/media-text/editor.css +47 -11
- package/build-style/media-text/style-rtl.css +47 -11
- package/build-style/media-text/style.css +47 -11
- package/build-style/more/editor-rtl.css +47 -11
- package/build-style/more/editor.css +47 -11
- package/build-style/navigation/editor-rtl.css +55 -14
- package/build-style/navigation/editor.css +55 -14
- package/build-style/navigation/style-rtl.css +47 -11
- package/build-style/navigation/style.css +47 -11
- package/build-style/navigation-link/editor-rtl.css +47 -11
- package/build-style/navigation-link/editor.css +47 -11
- package/build-style/navigation-link/style-rtl.css +47 -11
- package/build-style/navigation-link/style.css +47 -11
- package/build-style/navigation-submenu/editor-rtl.css +47 -11
- package/build-style/navigation-submenu/editor.css +47 -11
- package/build-style/nextpage/editor-rtl.css +47 -11
- package/build-style/nextpage/editor.css +47 -11
- package/build-style/page-list/editor-rtl.css +47 -11
- package/build-style/page-list/editor.css +47 -11
- package/build-style/page-list/style-rtl.css +47 -11
- package/build-style/page-list/style.css +47 -11
- package/build-style/paragraph/editor-rtl.css +47 -11
- package/build-style/paragraph/editor.css +47 -11
- package/build-style/paragraph/style-rtl.css +47 -11
- package/build-style/paragraph/style.css +47 -11
- package/build-style/post-author/editor-rtl.css +47 -11
- package/build-style/post-author/editor.css +47 -11
- package/build-style/post-author/style-rtl.css +47 -11
- package/build-style/post-author/style.css +47 -11
- package/build-style/post-author-biography/style-rtl.css +47 -11
- package/build-style/post-author-biography/style.css +47 -11
- package/build-style/post-author-name/style-rtl.css +47 -11
- package/build-style/post-author-name/style.css +47 -11
- package/build-style/post-comments-count/style-rtl.css +47 -11
- package/build-style/post-comments-count/style.css +47 -11
- package/build-style/post-comments-form/editor-rtl.css +47 -11
- package/build-style/post-comments-form/editor.css +47 -11
- package/build-style/post-comments-form/style-rtl.css +47 -14
- package/build-style/post-comments-form/style.css +47 -14
- package/build-style/post-comments-link/style-rtl.css +47 -11
- package/build-style/post-comments-link/style.css +47 -11
- package/build-style/post-content/style-rtl.css +47 -11
- package/build-style/post-content/style.css +47 -11
- package/build-style/post-date/style-rtl.css +47 -11
- package/build-style/post-date/style.css +47 -11
- package/build-style/post-excerpt/editor-rtl.css +47 -11
- package/build-style/post-excerpt/editor.css +47 -11
- package/build-style/post-excerpt/style-rtl.css +47 -11
- package/build-style/post-excerpt/style.css +47 -11
- package/build-style/post-featured-image/editor-rtl.css +47 -11
- package/build-style/post-featured-image/editor.css +47 -11
- package/build-style/post-featured-image/style-rtl.css +47 -11
- package/build-style/post-featured-image/style.css +47 -11
- package/build-style/post-navigation-link/style-rtl.css +47 -11
- package/build-style/post-navigation-link/style.css +47 -11
- package/build-style/post-template/style-rtl.css +47 -11
- package/build-style/post-template/style.css +47 -11
- package/build-style/post-terms/style-rtl.css +47 -11
- package/build-style/post-terms/style.css +47 -11
- package/build-style/post-time-to-read/style-rtl.css +47 -11
- package/build-style/post-time-to-read/style.css +47 -11
- package/build-style/post-title/style-rtl.css +47 -11
- package/build-style/post-title/style.css +47 -11
- package/build-style/preformatted/style-rtl.css +47 -11
- package/build-style/preformatted/style.css +47 -11
- package/build-style/pullquote/editor-rtl.css +48 -12
- package/build-style/pullquote/editor.css +48 -12
- package/build-style/pullquote/style-rtl.css +49 -14
- package/build-style/pullquote/style.css +49 -14
- package/build-style/pullquote/theme-rtl.css +49 -13
- package/build-style/pullquote/theme.css +49 -13
- package/build-style/query/editor-rtl.css +47 -11
- package/build-style/query/editor.css +47 -11
- package/build-style/query-pagination/editor-rtl.css +47 -11
- package/build-style/query-pagination/editor.css +47 -11
- package/build-style/query-pagination/style-rtl.css +47 -11
- package/build-style/query-pagination/style.css +47 -11
- package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/query-pagination-numbers/editor.css +47 -11
- package/build-style/query-title/style-rtl.css +47 -11
- package/build-style/query-title/style.css +47 -11
- package/build-style/query-total/style-rtl.css +47 -11
- package/build-style/query-total/style.css +47 -11
- package/build-style/quote/style-rtl.css +47 -11
- package/build-style/quote/style.css +47 -11
- package/build-style/quote/theme-rtl.css +47 -11
- package/build-style/quote/theme.css +47 -11
- package/build-style/read-more/style-rtl.css +47 -11
- package/build-style/read-more/style.css +47 -11
- package/build-style/reset-rtl.css +47 -11
- package/build-style/reset.css +47 -11
- package/build-style/rss/editor-rtl.css +47 -11
- package/build-style/rss/editor.css +47 -11
- package/build-style/rss/style-rtl.css +47 -11
- package/build-style/rss/style.css +47 -11
- package/build-style/search/editor-rtl.css +47 -11
- package/build-style/search/editor.css +47 -11
- package/build-style/search/style-rtl.css +47 -11
- package/build-style/search/style.css +47 -11
- package/build-style/search/theme-rtl.css +47 -11
- package/build-style/search/theme.css +47 -11
- package/build-style/separator/editor-rtl.css +47 -11
- package/build-style/separator/editor.css +47 -11
- package/build-style/separator/style-rtl.css +47 -11
- package/build-style/separator/style.css +47 -11
- package/build-style/separator/theme-rtl.css +47 -11
- package/build-style/separator/theme.css +47 -11
- package/build-style/shortcode/editor-rtl.css +47 -11
- package/build-style/shortcode/editor.css +47 -11
- package/build-style/site-logo/editor-rtl.css +47 -11
- package/build-style/site-logo/editor.css +47 -11
- package/build-style/site-logo/style-rtl.css +47 -11
- package/build-style/site-logo/style.css +47 -11
- package/build-style/site-tagline/editor-rtl.css +47 -11
- package/build-style/site-tagline/editor.css +47 -11
- package/build-style/site-tagline/style-rtl.css +47 -11
- package/build-style/site-tagline/style.css +47 -11
- package/build-style/site-title/editor-rtl.css +47 -11
- package/build-style/site-title/editor.css +47 -11
- package/build-style/site-title/style-rtl.css +47 -11
- package/build-style/site-title/style.css +47 -11
- package/build-style/social-link/editor-rtl.css +47 -11
- package/build-style/social-link/editor.css +47 -11
- package/build-style/social-links/editor-rtl.css +47 -11
- package/build-style/social-links/editor.css +47 -11
- package/build-style/social-links/style-rtl.css +47 -11
- package/build-style/social-links/style.css +47 -11
- package/build-style/spacer/editor-rtl.css +47 -11
- package/build-style/spacer/editor.css +47 -11
- package/build-style/spacer/style-rtl.css +47 -11
- package/build-style/spacer/style.css +47 -11
- package/build-style/style-rtl.css +53 -18
- package/build-style/style.css +53 -18
- package/build-style/table/editor-rtl.css +47 -11
- package/build-style/table/editor.css +47 -11
- package/build-style/table/style-rtl.css +47 -11
- package/build-style/table/style.css +47 -11
- package/build-style/table/theme-rtl.css +47 -11
- package/build-style/table/theme.css +47 -11
- package/build-style/table-of-contents/style-rtl.css +47 -11
- package/build-style/table-of-contents/style.css +47 -11
- package/build-style/tag-cloud/editor-rtl.css +47 -11
- package/build-style/tag-cloud/editor.css +47 -11
- package/build-style/tag-cloud/style-rtl.css +47 -11
- package/build-style/tag-cloud/style.css +47 -11
- package/build-style/template-part/editor-rtl.css +47 -11
- package/build-style/template-part/editor.css +47 -11
- package/build-style/template-part/theme-rtl.css +47 -11
- package/build-style/template-part/theme.css +47 -11
- package/build-style/term-description/style-rtl.css +47 -11
- package/build-style/term-description/style.css +47 -11
- package/build-style/text-columns/editor-rtl.css +47 -11
- package/build-style/text-columns/editor.css +47 -11
- package/build-style/text-columns/style-rtl.css +47 -11
- package/build-style/text-columns/style.css +47 -11
- package/build-style/theme-rtl.css +49 -13
- package/build-style/theme.css +49 -13
- package/build-style/verse/style-rtl.css +47 -11
- package/build-style/verse/style.css +47 -11
- package/build-style/video/editor-rtl.css +47 -11
- package/build-style/video/editor.css +47 -11
- package/build-style/video/style-rtl.css +47 -11
- package/build-style/video/style.css +47 -11
- package/build-style/video/theme-rtl.css +47 -11
- package/build-style/video/theme.css +47 -11
- package/package.json +35 -35
- package/src/button/edit.js +44 -29
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/code/block.json +2 -1
- package/src/columns/edit.js +20 -31
- package/src/comment-author-name/edit.js +54 -13
- package/src/comment-date/edit.js +50 -15
- package/src/comment-edit-link/edit.js +39 -11
- package/src/comments/edit/comments-inspector-controls.js +0 -2
- package/src/comments-pagination/edit.js +29 -9
- package/src/comments-title/edit.js +53 -15
- package/src/details/block.json +2 -1
- package/src/details/edit.js +36 -4
- package/src/embed/edit.js +3 -5
- package/src/embed/embed-controls.js +55 -33
- package/src/file/inspector.js +99 -45
- package/src/form/edit.js +91 -46
- package/src/form-input/edit.js +56 -18
- package/src/gallery/style.scss +1 -0
- package/src/html/block.json +2 -1
- package/src/html/editor.scss +1 -0
- package/src/image/constants.js +1 -0
- package/src/image/edit.js +2 -1
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +206 -98
- package/src/list/ordered-list-settings.js +172 -62
- package/src/more/block.json +2 -1
- package/src/navigation/edit/index.js +127 -64
- package/src/navigation/edit/overlay-menu-preview.js +43 -26
- package/src/navigation/editor.scss +8 -4
- package/src/navigation-link/block.json +3 -0
- package/src/navigation-link/index.php +4 -0
- package/src/navigation-link/transforms.js +2 -1
- package/src/navigation-link/update-attributes.js +1 -0
- package/src/navigation-submenu/block.json +3 -0
- package/src/navigation-submenu/index.php +4 -0
- package/src/post-comments-count/index.js +2 -0
- package/src/post-comments-count/transforms.js +20 -0
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-comments-link/index.js +2 -0
- package/src/post-comments-link/transforms.js +20 -0
- package/src/post-excerpt/block.json +2 -1
- package/src/post-excerpt/edit.js +13 -8
- package/src/post-navigation-link/block.json +2 -1
- package/src/post-navigation-link/edit.js +13 -8
- package/src/post-navigation-link/variations.js +13 -13
- package/src/post-template/edit.js +4 -3
- package/src/post-terms/block.json +4 -2
- package/src/post-terms/edit.js +13 -8
- package/src/post-title/edit.js +76 -24
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/preformatted/test/transforms.native.js +6 -1
- package/src/preformatted/transforms.js +7 -1
- package/src/pullquote/editor.scss +1 -1
- package/src/pullquote/style.scss +2 -3
- package/src/pullquote/theme.scss +2 -2
- package/src/query/edit/enhanced-pagination-modal.js +1 -5
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/rss/edit.js +141 -55
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +66 -21
- package/src/shortcode/block.json +2 -1
- package/src/site-title/index.php +1 -1
- package/src/social-link/index.php +49 -49
- package/src/social-link/variations.js +53 -48
- package/src/social-links/edit.js +39 -60
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/src/video/tracks-editor.js +57 -16
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/src/search/icons.js +0 -89
package/build/image/image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blob","require","_components","_compose","_data","_blockEditor","_element","_i18n","_url","_blocks","_icons","_notices","_coreData","_lockUnlock","_util","_edit","_caption","_hooks","_constants","_utils","_jsxRuntime","DimensionsTool","ResolutionTool","unlock","blockEditorPrivateApis","scaleOptions","value","label","_x","help","__","WRITEMODE_POPOVER_PROPS","placement","ImageWrapper","href","children","jsx","onClick","event","preventDefault","style","pointerEvents","cursor","display","ContentOnlyControls","attributes","setAttributes","lockAltControls","lockAltControlsMessage","lockTitleControls","lockTitleControlsMessage","popoverAnchor","setPopoverAnchor","useState","isAltDialogOpen","setIsAltDialogOpen","isTitleDialogOpen","setIsTitleDialogOpen","jsxs","Fragment","ToolbarItem","ref","toggleProps","DropdownMenu","icon","chevronDown","description","popoverProps","onClose","MenuItem","Popover","anchor","offset","variant","className","TextareaControl","alt","onChange","disabled","ExternalLink","__nextHasNoMarginBottom","TextControl","__next40pxDefaultSize","title","Image","temporaryURL","isSingleSelected","insertBlocksAfter","onReplace","onSelectImage","onSelectURL","onUploadError","context","clientId","blockEditingMode","parentLayoutType","maxContentWidth","url","align","id","rel","linkClass","linkDestination","width","height","aspectRatio","scale","linkTarget","sizeSlug","lightbox","metadata","imageElement","setImageElement","resizeDelta","setResizeDelta","pixelSize","setPixelSize","offsetTop","setOffsetTop","setResizeObserved","useResizeObserver","entry","box","borderBoxSize","inlineSize","blockSize","target","effectResizeableBoxPlacement","useCallback","_imageElement$offsetT","setRefs","useMergeRefs","allowResize","image","useSelect","select","coreStore","getMedia","canInsertCover","imageEditing","imageSizes","maxWidth","getBlockRootClientId","canInsertBlockType","getSettings","blockEditorStore","rootClientId","settings","getBlock","replaceBlocks","toggleSelection","useDispatch","createErrorNotice","createSuccessNotice","noticesStore","editEntityRecord","isLargeViewport","useViewportMatch","isWideAligned","includes","loadedNaturalWidth","loadedNaturalHeight","setLoadedNaturalSize","isEditingImage","setIsEditingImage","externalBlob","setExternalBlob","hasImageErrored","setHasImageErrored","hasNonContentControls","isContentOnlyMode","isResizable","imageSizeOptions","filter","slug","media_details","sizes","source_url","map","name","useEffect","isExternalImage","mediaUpload","window","fetch","then","response","blob","catch","naturalWidth","naturalHeight","useMemo","undefined","complete","onImageError","embedBlock","createUpgradedEmbedBlock","onImageLoad","onSetHref","props","onSetLightbox","enable","lightboxSetting","enabled","resetLightbox","allowEditing","onSetTitle","updateAlt","newAlt","updateImage","newSizeSlug","newUrl","uploadExternal","filesList","onFileChange","img","isBlobURL","type","allowedTypes","ALLOWED_MEDIA_TYPES","onError","message","canEditImage","allowCrop","switchToCover","switchToBlockType","dimensionsUnitsOptions","useCustomUnits","availableUnits","useSettings","showLightboxSetting","lightboxChecked","dropdownMenuProps","useToolsPanelDropdownMenuProps","dimensionsControl","SIZED_LAYOUTS","newAspectRatio","defaultAspectRatio","tools","newWidth","newHeight","newScale","defaultScale","unitsOptions","resetAll","sizeControls","InspectorControls","__experimentalToolsPanel","arePatternOverridesEnabled","bindings","__default","source","lockUrlControls","lockHrefControls","lockCaption","urlBinding","altBinding","titleBinding","hasParentPattern","urlBindingSource","getBlockBindingsSource","altBindingSource","titleBindingSource","canUserEditValue","args","sprintf","showUrlInput","showCoverControls","showBlockControls","mediaReplaceFlow","BlockControls","group","MediaReplaceFlow","mediaId","mediaURL","accept","onSelect","onReset","controls","__experimentalImageURLInputUI","onChangeUrl","mediaUrl","mediaLink","link","lightboxEnabled","ToolbarButton","crop","overlayText","ToolbarGroup","upload","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","readOnly","length","options","filename","getFilename","defaultedAlt","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","isRounded","postType","postId","queryId","isDescendentOfQueryLoop","Number","isFinite","Placeholder","withIllustration","Spinner","src","onLoad","objectFit","__experimentalImageEditor","onSaveImage","imageAttributes","onFinishEditing","resizableBox","numericRatio","evalAspectRatio","customRatio","naturalRatio","ratio","minWidth","MIN_SIZE","minHeight","maxWidthBuffer","maxResizeWidth","showRightHandle","showLeftHandle","isRTL","ResizableBox","position","inset","size","maxHeight","lockAspectRatio","top","right","bottom","left","onResizeStart","onResize","direction","elt","delta","onResizeStop","current","Math","abs","offsetWidth","String","resizeRatio","setPostFeatureImage","featured_media","featuredImageControl","BlockSettingsMenuControls","selectedClientIds","Caption","isSelected","showToolbarButton"],"sources":["@wordpress/block-library/src/image/image.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tExternalLink,\n\tResizableBox,\n\tSpinner,\n\tTextareaControl,\n\tTextControl,\n\tToolbarButton,\n\tToolbarGroup,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\tPlaceholder,\n\tMenuItem,\n\tToolbarItem,\n\tDropdownMenu,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tuseMergeRefs,\n\tuseResizeObserver,\n\tuseViewportMatch,\n} from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalImageURLInputUI as ImageURLInputUI,\n\tMediaReplaceFlow,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__experimentalImageEditor as ImageEditor,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tprivateApis as blockEditorPrivateApis,\n\tBlockSettingsMenuControls,\n} from '@wordpress/block-editor';\nimport { useCallback, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { getFilename } from '@wordpress/url';\nimport { getBlockBindingsSource, switchToBlockType } from '@wordpress/blocks';\nimport { crop, overlayText, upload, chevronDown } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport { isExternalImage } from './edit';\nimport { Caption } from '../utils/caption';\n\n/**\n * Module constants\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport { MIN_SIZE, ALLOWED_MEDIA_TYPES, SIZED_LAYOUTS } from './constants';\nimport { evalAspectRatio } from './utils';\n\nconst { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );\n\nconst scaleOptions = [\n\t{\n\t\tvalue: 'cover',\n\t\tlabel: _x( 'Cover', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image covers the space evenly.' ),\n\t},\n\t{\n\t\tvalue: 'contain',\n\t\tlabel: _x( 'Contain', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image is contained without distortion.' ),\n\t},\n];\n\nconst WRITEMODE_POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\n// If the image has a href, wrap in an <a /> tag to trigger any inherited link element styles.\nconst ImageWrapper = ( { href, children } ) => {\n\tif ( ! href ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<a\n\t\t\thref={ href }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\taria-disabled\n\t\t\tstyle={ {\n\t\t\t\t// When the Image block is linked,\n\t\t\t\t// it's wrapped with a disabled <a /> tag.\n\t\t\t\t// Restore cursor style so it doesn't appear 'clickable'\n\t\t\t\t// and remove pointer events. Safari needs the display property.\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\tcursor: 'default',\n\t\t\t\tdisplay: 'inline',\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</a>\n\t);\n};\n\nfunction ContentOnlyControls( {\n\tattributes,\n\tsetAttributes,\n\tlockAltControls,\n\tlockAltControlsMessage,\n\tlockTitleControls,\n\tlockTitleControlsMessage,\n} ) {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst [ isAltDialogOpen, setIsAltDialogOpen ] = useState( false );\n\tconst [ isTitleDialogOpen, setIsTitleDialogOpen ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<ToolbarItem ref={ setPopoverAnchor }>\n\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t...toggleProps,\n\t\t\t\t\t\t\tdescription: __( 'Displays more controls.' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tpopoverProps={ WRITEMODE_POPOVER_PROPS }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsAltDialogOpen( true );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ _x(\n\t\t\t\t\t\t\t\t\t\t'Alternative text',\n\t\t\t\t\t\t\t\t\t\t'Alternative text for an image. Block toolbar label, a low character count is preferred.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsTitleDialogOpen( true );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Title text' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t) }\n\t\t\t</ToolbarItem>\n\t\t\t{ isAltDialogOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tonClose={ () => setIsAltDialogOpen( false ) }\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"wp-block-image__toolbar_content_textarea__container\">\n\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tvalue={ attributes.alt || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={ lockAltControls }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t\t{ isTitleDialogOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tonClose={ () => setIsTitleDialogOpen( false ) }\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"wp-block-image__toolbar_content_textarea__container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\t\t\tvalue={ attributes.title || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\ttitle: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={ lockTitleControls }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function Image( {\n\ttemporaryURL,\n\tattributes,\n\tsetAttributes,\n\tisSingleSelected,\n\tinsertBlocksAfter,\n\tonReplace,\n\tonSelectImage,\n\tonSelectURL,\n\tonUploadError,\n\tcontext,\n\tclientId,\n\tblockEditingMode,\n\tparentLayoutType,\n\tmaxContentWidth,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\talign,\n\t\tid,\n\t\thref,\n\t\trel,\n\t\tlinkClass,\n\t\tlinkDestination,\n\t\ttitle,\n\t\twidth,\n\t\theight,\n\t\taspectRatio,\n\t\tscale,\n\t\tlinkTarget,\n\t\tsizeSlug,\n\t\tlightbox,\n\t\tmetadata,\n\t} = attributes;\n\tconst [ imageElement, setImageElement ] = useState();\n\tconst [ resizeDelta, setResizeDelta ] = useState( null );\n\tconst [ pixelSize, setPixelSize ] = useState( {} );\n\tconst [ offsetTop, setOffsetTop ] = useState( 0 );\n\tconst setResizeObserved = useResizeObserver( ( [ entry ] ) => {\n\t\tif ( ! resizeDelta ) {\n\t\t\tconst [ box ] = entry.borderBoxSize;\n\t\t\tsetPixelSize( { width: box.inlineSize, height: box.blockSize } );\n\t\t}\n\t\t// This is usually 0 unless the image height is less than the line-height.\n\t\tsetOffsetTop( entry.target.offsetTop );\n\t} );\n\tconst effectResizeableBoxPlacement = useCallback( () => {\n\t\tsetOffsetTop( imageElement?.offsetTop ?? 0 );\n\t}, [ imageElement ] );\n\tconst setRefs = useMergeRefs( [ setImageElement, setResizeObserved ] );\n\tconst { allowResize = true } = context;\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isSingleSelected\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isSingleSelected ]\n\t);\n\n\tconst { canInsertCover, imageEditing, imageSizes, maxWidth } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, canInsertBlockType, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst settings = getSettings();\n\n\t\t\treturn {\n\t\t\t\timageEditing: settings.imageEditing,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tmaxWidth: settings.maxWidth,\n\t\t\t\tcanInsertCover: canInsertBlockType(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { getBlock, getSettings } = useSelect( blockEditorStore );\n\n\tconst { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst [\n\t\t{ loadedNaturalWidth, loadedNaturalHeight },\n\t\tsetLoadedNaturalSize,\n\t] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst [ externalBlob, setExternalBlob ] = useState();\n\tconst [ hasImageErrored, setHasImageErrored ] = useState( false );\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst isContentOnlyMode = blockEditingMode === 'contentOnly';\n\tconst isResizable =\n\t\tallowResize &&\n\t\thasNonContentControls &&\n\t\t! isWideAligned &&\n\t\tisLargeViewport;\n\tconst imageSizeOptions = imageSizes\n\t\t.filter(\n\t\t\t( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url\n\t\t)\n\t\t.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\t// If an image is externally hosted, try to fetch the image data. This may\n\t// fail if the image host doesn't allow CORS with the domain. If it works,\n\t// we can enable a button in the toolbar to upload the image.\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! isExternalImage( id, url ) ||\n\t\t\t! isSingleSelected ||\n\t\t\t! getSettings().mediaUpload\n\t\t) {\n\t\t\tsetExternalBlob();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( externalBlob ) {\n\t\t\treturn;\n\t\t}\n\n\t\twindow\n\t\t\t// Avoid cache, which seems to help avoid CORS problems.\n\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t.then( ( response ) => response.blob() )\n\t\t\t.then( ( blob ) => setExternalBlob( blob ) )\n\t\t\t// Do nothing, cannot upload.\n\t\t\t.catch( () => {} );\n\t}, [ id, url, isSingleSelected, externalBlob, getSettings ] );\n\n\t// Get naturalWidth and naturalHeight from image, and fall back to loaded natural\n\t// width and height. This resolves an issue in Safari where the loaded natural\n\t// width and height is otherwise lost when switching between alignments.\n\t// See: https://github.com/WordPress/gutenberg/pull/37210.\n\tconst { naturalWidth, naturalHeight } = useMemo( () => {\n\t\treturn {\n\t\t\tnaturalWidth:\n\t\t\t\timageElement?.naturalWidth || loadedNaturalWidth || undefined,\n\t\t\tnaturalHeight:\n\t\t\t\timageElement?.naturalHeight || loadedNaturalHeight || undefined,\n\t\t};\n\t}, [ loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete ] );\n\n\tfunction onImageError() {\n\t\tsetHasImageErrored( true );\n\n\t\t// Check if there's an embed block that handles this URL, e.g., instagram URL.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/11472\n\t\tconst embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );\n\t\tif ( undefined !== embedBlock ) {\n\t\t\tonReplace( embedBlock );\n\t\t}\n\t}\n\n\tfunction onImageLoad( event ) {\n\t\tsetHasImageErrored( false );\n\t\tsetLoadedNaturalSize( {\n\t\t\tloadedNaturalWidth: event.target?.naturalWidth,\n\t\t\tloadedNaturalHeight: event.target?.naturalHeight,\n\t\t} );\n\t}\n\n\tfunction onSetHref( props ) {\n\t\tsetAttributes( props );\n\t}\n\n\tfunction onSetLightbox( enable ) {\n\t\tif ( enable && ! lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: true },\n\t\t\t} );\n\t\t} else if ( ! enable && lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction resetLightbox() {\n\t\t// When deleting a link from an image while lightbox settings\n\t\t// are enabled by default, we should disable the lightbox,\n\t\t// otherwise the resulting UX looks like a mistake.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59890/files#r1532286123.\n\t\tif ( lightboxSetting?.enabled && lightboxSetting?.allowEditing ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction onSetTitle( value ) {\n\t\t// This is the HTML title attribute, separate from the media object\n\t\t// title.\n\t\tsetAttributes( { title: value } );\n\t}\n\n\tfunction updateAlt( newAlt ) {\n\t\tsetAttributes( { alt: newAlt } );\n\t}\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl = image?.media_details?.sizes?.[ newSizeSlug ]?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tfunction uploadExternal() {\n\t\tconst { mediaUpload } = getSettings();\n\t\tif ( ! mediaUpload ) {\n\t\t\treturn;\n\t\t}\n\t\tmediaUpload( {\n\t\t\tfilesList: [ externalBlob ],\n\t\t\tonFileChange( [ img ] ) {\n\t\t\t\tonSelectImage( img );\n\n\t\t\t\tif ( isBlobURL( img.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetExternalBlob();\n\t\t\t\tcreateSuccessNotice( __( 'Image uploaded.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t},\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tonError( message ) {\n\t\t\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSingleSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSingleSelected ] );\n\n\tconst canEditImage = id && naturalWidth && naturalHeight && imageEditing;\n\tconst allowCrop =\n\t\tisSingleSelected &&\n\t\tcanEditImage &&\n\t\t! isEditingImage &&\n\t\t! isContentOnlyMode;\n\n\tfunction switchToCover() {\n\t\treplaceBlocks(\n\t\t\tclientId,\n\t\t\tswitchToBlockType( getBlock( clientId ), 'core/cover' )\n\t\t);\n\t}\n\n\t// TODO: Can allow more units after figuring out how they should interact\n\t// with the ResizableBox and ImageEditor components. Calculations later on\n\t// for those components are currently assuming px units.\n\tconst dimensionsUnitsOptions = useCustomUnits( {\n\t\tavailableUnits: [ 'px' ],\n\t} );\n\n\tconst [ lightboxSetting ] = useSettings( 'lightbox' );\n\n\tconst showLightboxSetting =\n\t\t// If a block-level override is set, we should give users the option to\n\t\t// remove that override, even if the lightbox UI is disabled in the settings.\n\t\t( !! lightbox && lightbox?.enabled !== lightboxSetting?.enabled ) ||\n\t\tlightboxSetting?.allowEditing;\n\n\tconst lightboxChecked =\n\t\t!! lightbox?.enabled || ( ! lightbox && !! lightboxSetting?.enabled );\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst dimensionsControl =\n\t\tisResizable &&\n\t\t( SIZED_LAYOUTS.includes( parentLayoutType ) ? (\n\t\t\t<DimensionsTool\n\t\t\t\tvalue={ { aspectRatio } }\n\t\t\t\tonChange={ ( { aspectRatio: newAspectRatio } ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t\t\tscale: 'cover',\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\t\ttools={ [ 'aspectRatio' ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<DimensionsTool\n\t\t\t\tvalue={ { width, height, scale, aspectRatio } }\n\t\t\t\tonChange={ ( {\n\t\t\t\t\twidth: newWidth,\n\t\t\t\t\theight: newHeight,\n\t\t\t\t\tscale: newScale,\n\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t} ) => {\n\t\t\t\t\t// Rebuilding the object forces setting `undefined`\n\t\t\t\t\t// for values that are removed since setAttributes\n\t\t\t\t\t// doesn't do anything with keys that aren't set.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// CSS includes `height: auto`, but we need\n\t\t\t\t\t\t// `width: auto` to fix the aspect ratio when\n\t\t\t\t\t\t// only height is set due to the width and\n\t\t\t\t\t\t// height attributes set via the server.\n\t\t\t\t\t\twidth: ! newWidth && newHeight ? 'auto' : newWidth,\n\t\t\t\t\t\theight: newHeight,\n\t\t\t\t\t\tscale: newScale,\n\t\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tdefaultScale=\"cover\"\n\t\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\t\tscaleOptions={ scaleOptions }\n\t\t\t\tunitsOptions={ dimensionsUnitsOptions }\n\t\t\t/>\n\t\t) );\n\n\tconst resetAll = () => {\n\t\tsetAttributes( {\n\t\t\talt: undefined,\n\t\t\twidth: undefined,\n\t\t\theight: undefined,\n\t\t\tscale: undefined,\n\t\t\taspectRatio: undefined,\n\t\t\tlightbox: undefined,\n\t\t} );\n\t};\n\n\tconst sizeControls = (\n\t\t<InspectorControls>\n\t\t\t<ToolsPanel\n\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\tresetAll={ resetAll }\n\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t>\n\t\t\t\t{ dimensionsControl }\n\t\t\t</ToolsPanel>\n\t\t</InspectorControls>\n\t);\n\n\tconst arePatternOverridesEnabled =\n\t\tmetadata?.bindings?.__default?.source === 'core/pattern-overrides';\n\n\tconst {\n\t\tlockUrlControls = false,\n\t\tlockHrefControls = false,\n\t\tlockAltControls = false,\n\t\tlockAltControlsMessage,\n\t\tlockTitleControls = false,\n\t\tlockTitleControlsMessage,\n\t\tlockCaption = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst {\n\t\t\t\turl: urlBinding,\n\t\t\t\talt: altBinding,\n\t\t\t\ttitle: titleBinding,\n\t\t\t} = metadata?.bindings || {};\n\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\t\t\tconst urlBindingSource = getBlockBindingsSource(\n\t\t\t\turlBinding?.source\n\t\t\t);\n\t\t\tconst altBindingSource = getBlockBindingsSource(\n\t\t\t\taltBinding?.source\n\t\t\t);\n\t\t\tconst titleBindingSource = getBlockBindingsSource(\n\t\t\t\ttitleBinding?.source\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! urlBinding &&\n\t\t\t\t\t! urlBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: urlBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockHrefControls:\n\t\t\t\t\t// Disable editing the link of the URL if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the link on the frontend.\n\t\t\t\t\thasParentPattern || arePatternOverridesEnabled,\n\t\t\t\tlockCaption:\n\t\t\t\t\t// Disable editing the caption if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the caption on the frontend.\n\t\t\t\t\thasParentPattern,\n\t\t\t\tlockAltControls:\n\t\t\t\t\t!! altBinding &&\n\t\t\t\t\t! altBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: altBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockAltControlsMessage: altBindingSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\taltBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t\tlockTitleControls:\n\t\t\t\t\t!! titleBinding &&\n\t\t\t\t\t! titleBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: titleBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockTitleControlsMessage: titleBindingSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\ttitleBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tarePatternOverridesEnabled,\n\t\t\tcontext,\n\t\t\tisSingleSelected,\n\t\t\tmetadata?.bindings,\n\t\t]\n\t);\n\n\tconst showUrlInput =\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockHrefControls &&\n\t\t! lockUrlControls;\n\n\tconst showCoverControls = isSingleSelected && canInsertCover;\n\n\tconst showBlockControls = showUrlInput || allowCrop || showCoverControls;\n\n\tconst mediaReplaceFlow = isSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockUrlControls && (\n\t\t\t// For contentOnly mode, put this button in its own area so it has borders around it.\n\t\t\t<BlockControls group={ isContentOnlyMode ? 'inline' : 'other' }>\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tname={ ! url ? __( 'Add image' ) : __( 'Replace' ) }\n\t\t\t\t\tonReset={ () => onSelectImage( undefined ) }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t);\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ showBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ showUrlInput && (\n\t\t\t\t\t\t<ImageURLInputUI\n\t\t\t\t\t\t\turl={ href || '' }\n\t\t\t\t\t\t\tonChangeUrl={ onSetHref }\n\t\t\t\t\t\t\tlinkDestination={ linkDestination }\n\t\t\t\t\t\t\tmediaUrl={ ( image && image.source_url ) || url }\n\t\t\t\t\t\t\tmediaLink={ image && image.link }\n\t\t\t\t\t\t\tlinkTarget={ linkTarget }\n\t\t\t\t\t\t\tlinkClass={ linkClass }\n\t\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t\t\tshowLightboxSetting={ showLightboxSetting }\n\t\t\t\t\t\t\tlightboxEnabled={ lightboxChecked }\n\t\t\t\t\t\t\tonSetLightbox={ onSetLightbox }\n\t\t\t\t\t\t\tresetLightbox={ resetLightbox }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ allowCrop && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showCoverControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ticon={ overlayText }\n\t\t\t\t\t\t\tlabel={ __( 'Add text over image' ) }\n\t\t\t\t\t\t\tonClick={ switchToCover }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && externalBlob && (\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ uploadExternal }\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tlabel={ __( 'Upload to Media Library' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isContentOnlyMode && (\n\t\t\t\t// Add some extra controls for content attributes when content only mode is active.\n\t\t\t\t// With content only mode active, the inspector is hidden, so users need another way\n\t\t\t\t// to edit these attributes.\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<ContentOnlyControls\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tlockAltControls={ lockAltControls }\n\t\t\t\t\t\tlockAltControlsMessage={ lockAltControlsMessage }\n\t\t\t\t\t\tlockTitleControls={ lockTitleControls }\n\t\t\t\t\t\tlockTitleControlsMessage={ lockTitleControlsMessage }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAll }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ isSingleSelected && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\treadOnly={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ dimensionsControl }\n\t\t\t\t\t{ !! imageSizeOptions.length && (\n\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\treadOnly={ lockTitleControls }\n\t\t\t\t\thelp={\n\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ExternalLink>\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</InspectorControls>\n\t\t</>\n\t);\n\n\tconst filename = getFilename( url );\n\tlet defaultedAlt;\n\n\tif ( alt ) {\n\t\tdefaultedAlt = alt;\n\t} else if ( filename ) {\n\t\tdefaultedAlt = sprintf(\n\t\t\t/* translators: %s: file name */\n\t\t\t__( 'This image has an empty alt attribute; its file name is %s' ),\n\t\t\tfilename\n\t\t);\n\t} else {\n\t\tdefaultedAlt = __( 'This image has an empty alt attribute' );\n\t}\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst isRounded = attributes.className?.includes( 'is-style-rounded' );\n\n\tconst { postType, postId, queryId } = context;\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\n\tlet img =\n\t\ttemporaryURL && hasImageErrored ? (\n\t\t\t// Show a placeholder during upload when the blob URL can't be loaded. This can\n\t\t\t// happen when the user uploads a HEIC image in a browser that doesn't support them.\n\t\t\t<Placeholder\n\t\t\t\tclassName=\"wp-block-image__placeholder\"\n\t\t\t\twithIllustration\n\t\t\t>\n\t\t\t\t<Spinner />\n\t\t\t</Placeholder>\n\t\t) : (\n\t\t\t// Disable reason: Image itself is not meant to be interactive, but\n\t\t\t// should direct focus to block.\n\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t<>\n\t\t\t\t<img\n\t\t\t\t\tsrc={ temporaryURL || url }\n\t\t\t\t\talt={ defaultedAlt }\n\t\t\t\t\tonError={ onImageError }\n\t\t\t\t\tonLoad={ onImageLoad }\n\t\t\t\t\tref={ setRefs }\n\t\t\t\t\tclassName={ borderProps.className }\n\t\t\t\t\twidth={ naturalWidth }\n\t\t\t\t\theight={ naturalHeight }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t\t...( resizeDelta\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\twidth: pixelSize.width + resizeDelta.width,\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tpixelSize.height + resizeDelta.height,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { width, height } ),\n\t\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ temporaryURL && <Spinner /> }\n\t\t\t</>\n\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t);\n\n\tif ( canEditImage && isEditingImage ) {\n\t\timg = (\n\t\t\t<ImageWrapper href={ href }>\n\t\t\t\t<ImageEditor\n\t\t\t\t\tid={ id }\n\t\t\t\t\turl={ url }\n\t\t\t\t\t{ ...pixelSize }\n\t\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\t\tonSaveImage={ ( imageAttributes ) =>\n\t\t\t\t\t\tsetAttributes( imageAttributes )\n\t\t\t\t\t}\n\t\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t\t} }\n\t\t\t\t\tborderProps={ isRounded ? undefined : borderProps }\n\t\t\t\t/>\n\t\t\t</ImageWrapper>\n\t\t);\n\t} else {\n\t\timg = <ImageWrapper href={ href }>{ img }</ImageWrapper>;\n\t}\n\n\tlet resizableBox;\n\tif (\n\t\tisResizable &&\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! SIZED_LAYOUTS.includes( parentLayoutType )\n\t) {\n\t\tconst numericRatio = aspectRatio && evalAspectRatio( aspectRatio );\n\t\tconst customRatio = pixelSize.width / pixelSize.height;\n\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\tconst ratio = numericRatio || customRatio || naturalRatio || 1;\n\t\tconst minWidth =\n\t\t\tnaturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;\n\t\tconst minHeight =\n\t\t\tnaturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio;\n\n\t\t// With the current implementation of ResizableBox, an image needs an\n\t\t// explicit pixel value for the max-width. In absence of being able to\n\t\t// set the content-width, this max-width is currently dictated by the\n\t\t// vanilla editor style. The following variable adds a buffer to this\n\t\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t\t// in most cases, allow you to scale the image beyond the width of the\n\t\t// main column, though not infinitely.\n\t\t// @todo It would be good to revisit this once a content-width variable\n\t\t// becomes available.\n\t\tconst maxWidthBuffer = maxWidth * 2.5;\n\t\tconst maxResizeWidth = maxContentWidth || maxWidthBuffer;\n\n\t\tlet showRightHandle = false;\n\t\tlet showLeftHandle = false;\n\n\t\t/* eslint-disable no-lonely-if */\n\t\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\t\tif ( align === 'center' ) {\n\t\t\t// When the image is centered, show both handles.\n\t\t\tshowRightHandle = true;\n\t\t\tshowLeftHandle = true;\n\t\t} else if ( isRTL() ) {\n\t\t\t// In RTL mode the image is on the right by default.\n\t\t\t// Show the right handle and hide the left handle only when it is\n\t\t\t// aligned left. Otherwise always show the left handle.\n\t\t\tif ( align === 'left' ) {\n\t\t\t\tshowRightHandle = true;\n\t\t\t} else {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// Show the left handle and hide the right handle only when the\n\t\t\t// image is aligned right. Otherwise always show the right handle.\n\t\t\tif ( align === 'right' ) {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t} else {\n\t\t\t\tshowRightHandle = true;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-lonely-if */\n\t\tresizableBox = (\n\t\t\t<ResizableBox\n\t\t\t\tref={ effectResizeableBoxPlacement }\n\t\t\t\tstyle={ {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t// To match the vertical-align: bottom of the img (from style.scss)\n\t\t\t\t\t// syncs the top with the img. This matters when the img height is\n\t\t\t\t\t// less than the line-height.\n\t\t\t\t\tinset: `${ offsetTop }px 0 0 0`,\n\t\t\t\t} }\n\t\t\t\tsize={ pixelSize }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxResizeWidth }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxResizeWidth / ratio }\n\t\t\t\tlockAspectRatio={ ratio }\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ () => {\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResize={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetResizeDelta( delta );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t\tsetResizeDelta( null );\n\t\t\t\t\tsetPixelSize( ( current ) => ( {\n\t\t\t\t\t\twidth: current.width + delta.width,\n\t\t\t\t\t\theight: current.height + delta.height,\n\t\t\t\t\t} ) );\n\n\t\t\t\t\t// Clear hardcoded width if the resized width is close to the max-content width.\n\t\t\t\t\tif (\n\t\t\t\t\t\tmaxContentWidth &&\n\t\t\t\t\t\t// Only do this if the image is bigger than the container to prevent it from being squished.\n\t\t\t\t\t\t// TODO: Remove this check if the image support setting 100% width.\n\t\t\t\t\t\tnaturalWidth >= maxContentWidth &&\n\t\t\t\t\t\tMath.abs( elt.offsetWidth - maxContentWidth ) < 10\n\t\t\t\t\t) {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\theight: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Since the aspect ratio is locked when resizing, we can\n\t\t\t\t\t// use the width of the resized element to calculate the\n\t\t\t\t\t// height in CSS to prevent stretching when the max-width\n\t\t\t\t\t// is reached.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: `${ elt.offsetWidth }px`,\n\t\t\t\t\t\theight: 'auto',\n\t\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t\tratio === naturalRatio\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: String( ratio ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tresizeRatio={ align === 'center' ? 2 : 1 }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! url && ! temporaryURL ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ mediaReplaceFlow }\n\t\t\t\t{ /* Add all controls if the image attributes are connected. */ }\n\t\t\t\t{ metadata?.bindings ? controls : sizeControls }\n\t\t\t</>\n\t\t);\n\t}\n\n\t/**\n\t * Set the post's featured image with the current image.\n\t */\n\tconst setPostFeatureImage = () => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tfeatured_media: id,\n\t\t} );\n\t\tcreateSuccessNotice( __( 'Post featured image updated.' ), {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t};\n\n\tconst featuredImageControl = (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds } ) =>\n\t\t\t\tselectedClientIds.length === 1 &&\n\t\t\t\t! isDescendentOfQueryLoop &&\n\t\t\t\tpostId &&\n\t\t\t\tid &&\n\t\t\t\tclientId === selectedClientIds[ 0 ] && (\n\t\t\t\t\t<MenuItem onClick={ setPostFeatureImage }>\n\t\t\t\t\t\t{ __( 'Set as featured image' ) }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t)\n\t\t\t}\n\t\t</BlockSettingsMenuControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ mediaReplaceFlow }\n\t\t\t{ controls }\n\t\t\t{ featuredImageControl }\n\t\t\t{ img }\n\t\t\t{ resizableBox }\n\n\t\t\t<Caption\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tisSelected={ isSingleSelected }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tlabel={ __( 'Image caption text' ) }\n\t\t\t\tshowToolbarButton={\n\t\t\t\t\tisSingleSelected &&\n\t\t\t\t\thasNonContentControls &&\n\t\t\t\t\t! arePatternOverridesEnabled\n\t\t\t\t}\n\t\t\t\treadOnly={ lockCaption }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAiBA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAaA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,IAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AAKA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,KAAA,GAAAb,OAAA;AACA,IAAAc,KAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AAKA,IAAAgB,MAAA,GAAAhB,OAAA;AACA,IAAAiB,UAAA,GAAAjB,OAAA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B,CAC3B;EAED,oBACC,IAAAV,WAAA,CAAAsC,IAAA,EAAAtC,WAAA,CAAAuC,QAAA;IAAAxB,QAAA,GACG0O,gBAAgB,EAChBS,QAAQ,EACRiF,oBAAoB,EACpBhJ,GAAG,EACH0G,YAAY,eAEd,IAAA7S,WAAA,CAAAgB,GAAA,EAACpB,QAAA,CAAA0V,OAAO;MACP7T,UAAU,EAAGA,UAAY;MACzBC,aAAa,EAAGA,aAAe;MAC/B6T,UAAU,EAAGrR,gBAAkB;MAC/BC,iBAAiB,EAAGA,iBAAmB;MACvC5D,KAAK,EAAG,IAAAG,QAAE,EAAE,oBAAqB,CAAG;MACpC8U,iBAAiB,EAChBtR,gBAAgB,IAChBmF,qBAAqB,IACrB,CAAE+E,0BACF;MACD8C,QAAQ,EAAGxC;IAAa,CACxB,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_blob","require","_components","_compose","_data","_blockEditor","_element","_i18n","_url","_blocks","_icons","_notices","_coreData","_lockUnlock","_util","_edit","_caption","_hooks","_constants","_utils","_jsxRuntime","DimensionsTool","ResolutionTool","unlock","blockEditorPrivateApis","scaleOptions","value","label","_x","help","__","WRITEMODE_POPOVER_PROPS","placement","ImageWrapper","href","children","jsx","onClick","event","preventDefault","style","pointerEvents","cursor","display","ContentOnlyControls","attributes","setAttributes","lockAltControls","lockAltControlsMessage","lockTitleControls","lockTitleControlsMessage","popoverAnchor","setPopoverAnchor","useState","isAltDialogOpen","setIsAltDialogOpen","isTitleDialogOpen","setIsTitleDialogOpen","jsxs","Fragment","ToolbarItem","ref","toggleProps","DropdownMenu","icon","chevronDown","description","popoverProps","onClose","MenuItem","Popover","anchor","offset","variant","className","TextareaControl","alt","onChange","disabled","ExternalLink","__nextHasNoMarginBottom","TextControl","__next40pxDefaultSize","title","Image","temporaryURL","isSingleSelected","insertBlocksAfter","onReplace","onSelectImage","onSelectURL","onUploadError","context","clientId","blockEditingMode","parentLayoutType","maxContentWidth","url","align","id","rel","linkClass","linkDestination","width","height","aspectRatio","scale","linkTarget","sizeSlug","lightbox","metadata","imageElement","setImageElement","resizeDelta","setResizeDelta","pixelSize","setPixelSize","offsetTop","setOffsetTop","setResizeObserved","useResizeObserver","entry","box","borderBoxSize","inlineSize","blockSize","target","effectResizeableBoxPlacement","useCallback","_imageElement$offsetT","setRefs","useMergeRefs","allowResize","image","useSelect","select","coreStore","getMedia","canInsertCover","imageEditing","imageSizes","maxWidth","getBlockRootClientId","canInsertBlockType","getSettings","blockEditorStore","rootClientId","settings","getBlock","replaceBlocks","toggleSelection","useDispatch","createErrorNotice","createSuccessNotice","noticesStore","editEntityRecord","isLargeViewport","useViewportMatch","isWideAligned","includes","loadedNaturalWidth","loadedNaturalHeight","setLoadedNaturalSize","isEditingImage","setIsEditingImage","externalBlob","setExternalBlob","hasImageErrored","setHasImageErrored","hasNonContentControls","isContentOnlyMode","isResizable","imageSizeOptions","filter","slug","media_details","sizes","source_url","map","name","useEffect","isExternalImage","mediaUpload","window","fetch","then","response","blob","catch","naturalWidth","naturalHeight","useMemo","undefined","complete","onImageError","embedBlock","createUpgradedEmbedBlock","onImageLoad","onSetHref","props","onSetLightbox","enable","lightboxSetting","enabled","resetLightbox","allowEditing","onSetTitle","updateAlt","newAlt","updateImage","newSizeSlug","newUrl","uploadExternal","filesList","onFileChange","img","isBlobURL","type","allowedTypes","ALLOWED_MEDIA_TYPES","onError","message","canEditImage","allowCrop","switchToCover","switchToBlockType","dimensionsUnitsOptions","useCustomUnits","availableUnits","useSettings","showLightboxSetting","lightboxChecked","dropdownMenuProps","useToolsPanelDropdownMenuProps","dimensionsControl","SIZED_LAYOUTS","newAspectRatio","defaultAspectRatio","tools","newWidth","newHeight","newScale","defaultScale","unitsOptions","resetAll","sizeControls","InspectorControls","__experimentalToolsPanel","arePatternOverridesEnabled","bindings","__default","source","lockUrlControls","lockHrefControls","lockCaption","urlBinding","altBinding","titleBinding","hasParentPattern","urlBindingSource","getBlockBindingsSource","altBindingSource","titleBindingSource","canUserEditValue","args","sprintf","showUrlInput","showCoverControls","showBlockControls","mediaReplaceFlow","BlockControls","group","MediaReplaceFlow","mediaId","mediaURL","accept","onSelect","onReset","controls","__experimentalImageURLInputUI","onChangeUrl","mediaUrl","mediaLink","link","lightboxEnabled","ToolbarButton","crop","overlayText","ToolbarGroup","upload","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","readOnly","length","defaultValue","DEFAULT_MEDIA_SIZE_SLUG","options","filename","getFilename","defaultedAlt","borderProps","useBorderProps","shadowProps","getShadowClassesAndStyles","isRounded","postType","postId","queryId","isDescendentOfQueryLoop","Number","isFinite","Placeholder","withIllustration","Spinner","src","onLoad","objectFit","__experimentalImageEditor","onSaveImage","imageAttributes","onFinishEditing","resizableBox","numericRatio","evalAspectRatio","customRatio","naturalRatio","ratio","minWidth","MIN_SIZE","minHeight","maxWidthBuffer","maxResizeWidth","showRightHandle","showLeftHandle","isRTL","ResizableBox","position","inset","size","maxHeight","lockAspectRatio","top","right","bottom","left","onResizeStart","onResize","direction","elt","delta","onResizeStop","current","Math","abs","offsetWidth","String","resizeRatio","setPostFeatureImage","featured_media","featuredImageControl","BlockSettingsMenuControls","selectedClientIds","Caption","isSelected","showToolbarButton"],"sources":["@wordpress/block-library/src/image/image.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tExternalLink,\n\tResizableBox,\n\tSpinner,\n\tTextareaControl,\n\tTextControl,\n\tToolbarButton,\n\tToolbarGroup,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\tPlaceholder,\n\tMenuItem,\n\tToolbarItem,\n\tDropdownMenu,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tuseMergeRefs,\n\tuseResizeObserver,\n\tuseViewportMatch,\n} from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\t__experimentalImageURLInputUI as ImageURLInputUI,\n\tMediaReplaceFlow,\n\tstore as blockEditorStore,\n\tuseSettings,\n\t__experimentalImageEditor as ImageEditor,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tprivateApis as blockEditorPrivateApis,\n\tBlockSettingsMenuControls,\n} from '@wordpress/block-editor';\nimport { useCallback, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { getFilename } from '@wordpress/url';\nimport { getBlockBindingsSource, switchToBlockType } from '@wordpress/blocks';\nimport { crop, overlayText, upload, chevronDown } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport { isExternalImage } from './edit';\nimport { Caption } from '../utils/caption';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport {\n\tMIN_SIZE,\n\tALLOWED_MEDIA_TYPES,\n\tSIZED_LAYOUTS,\n\tDEFAULT_MEDIA_SIZE_SLUG,\n} from './constants';\nimport { evalAspectRatio } from './utils';\n\nconst { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );\n\nconst scaleOptions = [\n\t{\n\t\tvalue: 'cover',\n\t\tlabel: _x( 'Cover', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image covers the space evenly.' ),\n\t},\n\t{\n\t\tvalue: 'contain',\n\t\tlabel: _x( 'Contain', 'Scale option for dimensions control' ),\n\t\thelp: __( 'Image is contained without distortion.' ),\n\t},\n];\n\nconst WRITEMODE_POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\n// If the image has a href, wrap in an <a /> tag to trigger any inherited link element styles.\nconst ImageWrapper = ( { href, children } ) => {\n\tif ( ! href ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<a\n\t\t\thref={ href }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\taria-disabled\n\t\t\tstyle={ {\n\t\t\t\t// When the Image block is linked,\n\t\t\t\t// it's wrapped with a disabled <a /> tag.\n\t\t\t\t// Restore cursor style so it doesn't appear 'clickable'\n\t\t\t\t// and remove pointer events. Safari needs the display property.\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\tcursor: 'default',\n\t\t\t\tdisplay: 'inline',\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</a>\n\t);\n};\n\nfunction ContentOnlyControls( {\n\tattributes,\n\tsetAttributes,\n\tlockAltControls,\n\tlockAltControlsMessage,\n\tlockTitleControls,\n\tlockTitleControlsMessage,\n} ) {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst [ isAltDialogOpen, setIsAltDialogOpen ] = useState( false );\n\tconst [ isTitleDialogOpen, setIsTitleDialogOpen ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<ToolbarItem ref={ setPopoverAnchor }>\n\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t...toggleProps,\n\t\t\t\t\t\t\tdescription: __( 'Displays more controls.' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tpopoverProps={ WRITEMODE_POPOVER_PROPS }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsAltDialogOpen( true );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ _x(\n\t\t\t\t\t\t\t\t\t\t'Alternative text',\n\t\t\t\t\t\t\t\t\t\t'Alternative text for an image. Block toolbar label, a low character count is preferred.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsTitleDialogOpen( true );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Title text' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t) }\n\t\t\t</ToolbarItem>\n\t\t\t{ isAltDialogOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tonClose={ () => setIsAltDialogOpen( false ) }\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"wp-block-image__toolbar_content_textarea__container\">\n\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tvalue={ attributes.alt || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={ lockAltControls }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t\t{ isTitleDialogOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tonClose={ () => setIsTitleDialogOpen( false ) }\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"wp-block-image__toolbar_content_textarea__container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"wp-block-image__toolbar_content_textarea\"\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\t\t\tvalue={ attributes.title || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\ttitle: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={ lockTitleControls }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function Image( {\n\ttemporaryURL,\n\tattributes,\n\tsetAttributes,\n\tisSingleSelected,\n\tinsertBlocksAfter,\n\tonReplace,\n\tonSelectImage,\n\tonSelectURL,\n\tonUploadError,\n\tcontext,\n\tclientId,\n\tblockEditingMode,\n\tparentLayoutType,\n\tmaxContentWidth,\n} ) {\n\tconst {\n\t\turl = '',\n\t\talt,\n\t\talign,\n\t\tid,\n\t\thref,\n\t\trel,\n\t\tlinkClass,\n\t\tlinkDestination,\n\t\ttitle,\n\t\twidth,\n\t\theight,\n\t\taspectRatio,\n\t\tscale,\n\t\tlinkTarget,\n\t\tsizeSlug,\n\t\tlightbox,\n\t\tmetadata,\n\t} = attributes;\n\tconst [ imageElement, setImageElement ] = useState();\n\tconst [ resizeDelta, setResizeDelta ] = useState( null );\n\tconst [ pixelSize, setPixelSize ] = useState( {} );\n\tconst [ offsetTop, setOffsetTop ] = useState( 0 );\n\tconst setResizeObserved = useResizeObserver( ( [ entry ] ) => {\n\t\tif ( ! resizeDelta ) {\n\t\t\tconst [ box ] = entry.borderBoxSize;\n\t\t\tsetPixelSize( { width: box.inlineSize, height: box.blockSize } );\n\t\t}\n\t\t// This is usually 0 unless the image height is less than the line-height.\n\t\tsetOffsetTop( entry.target.offsetTop );\n\t} );\n\tconst effectResizeableBoxPlacement = useCallback( () => {\n\t\tsetOffsetTop( imageElement?.offsetTop ?? 0 );\n\t}, [ imageElement ] );\n\tconst setRefs = useMergeRefs( [ setImageElement, setResizeObserved ] );\n\tconst { allowResize = true } = context;\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isSingleSelected\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isSingleSelected ]\n\t);\n\n\tconst { canInsertCover, imageEditing, imageSizes, maxWidth } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, canInsertBlockType, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst settings = getSettings();\n\n\t\t\treturn {\n\t\t\t\timageEditing: settings.imageEditing,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tmaxWidth: settings.maxWidth,\n\t\t\t\tcanInsertCover: canInsertBlockType(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { getBlock, getSettings } = useSelect( blockEditorStore );\n\n\tconst { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst [\n\t\t{ loadedNaturalWidth, loadedNaturalHeight },\n\t\tsetLoadedNaturalSize,\n\t] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst [ externalBlob, setExternalBlob ] = useState();\n\tconst [ hasImageErrored, setHasImageErrored ] = useState( false );\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst isContentOnlyMode = blockEditingMode === 'contentOnly';\n\tconst isResizable =\n\t\tallowResize &&\n\t\thasNonContentControls &&\n\t\t! isWideAligned &&\n\t\tisLargeViewport;\n\tconst imageSizeOptions = imageSizes\n\t\t.filter(\n\t\t\t( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url\n\t\t)\n\t\t.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\t// If an image is externally hosted, try to fetch the image data. This may\n\t// fail if the image host doesn't allow CORS with the domain. If it works,\n\t// we can enable a button in the toolbar to upload the image.\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! isExternalImage( id, url ) ||\n\t\t\t! isSingleSelected ||\n\t\t\t! getSettings().mediaUpload\n\t\t) {\n\t\t\tsetExternalBlob();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( externalBlob ) {\n\t\t\treturn;\n\t\t}\n\n\t\twindow\n\t\t\t// Avoid cache, which seems to help avoid CORS problems.\n\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t.then( ( response ) => response.blob() )\n\t\t\t.then( ( blob ) => setExternalBlob( blob ) )\n\t\t\t// Do nothing, cannot upload.\n\t\t\t.catch( () => {} );\n\t}, [ id, url, isSingleSelected, externalBlob, getSettings ] );\n\n\t// Get naturalWidth and naturalHeight from image, and fall back to loaded natural\n\t// width and height. This resolves an issue in Safari where the loaded natural\n\t// width and height is otherwise lost when switching between alignments.\n\t// See: https://github.com/WordPress/gutenberg/pull/37210.\n\tconst { naturalWidth, naturalHeight } = useMemo( () => {\n\t\treturn {\n\t\t\tnaturalWidth:\n\t\t\t\timageElement?.naturalWidth || loadedNaturalWidth || undefined,\n\t\t\tnaturalHeight:\n\t\t\t\timageElement?.naturalHeight || loadedNaturalHeight || undefined,\n\t\t};\n\t}, [ loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete ] );\n\n\tfunction onImageError() {\n\t\tsetHasImageErrored( true );\n\n\t\t// Check if there's an embed block that handles this URL, e.g., instagram URL.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/11472\n\t\tconst embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );\n\t\tif ( undefined !== embedBlock ) {\n\t\t\tonReplace( embedBlock );\n\t\t}\n\t}\n\n\tfunction onImageLoad( event ) {\n\t\tsetHasImageErrored( false );\n\t\tsetLoadedNaturalSize( {\n\t\t\tloadedNaturalWidth: event.target?.naturalWidth,\n\t\t\tloadedNaturalHeight: event.target?.naturalHeight,\n\t\t} );\n\t}\n\n\tfunction onSetHref( props ) {\n\t\tsetAttributes( props );\n\t}\n\n\tfunction onSetLightbox( enable ) {\n\t\tif ( enable && ! lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: true },\n\t\t\t} );\n\t\t} else if ( ! enable && lightboxSetting?.enabled ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction resetLightbox() {\n\t\t// When deleting a link from an image while lightbox settings\n\t\t// are enabled by default, we should disable the lightbox,\n\t\t// otherwise the resulting UX looks like a mistake.\n\t\t// See https://github.com/WordPress/gutenberg/pull/59890/files#r1532286123.\n\t\tif ( lightboxSetting?.enabled && lightboxSetting?.allowEditing ) {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: { enabled: false },\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( {\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction onSetTitle( value ) {\n\t\t// This is the HTML title attribute, separate from the media object\n\t\t// title.\n\t\tsetAttributes( { title: value } );\n\t}\n\n\tfunction updateAlt( newAlt ) {\n\t\tsetAttributes( { alt: newAlt } );\n\t}\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl = image?.media_details?.sizes?.[ newSizeSlug ]?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tfunction uploadExternal() {\n\t\tconst { mediaUpload } = getSettings();\n\t\tif ( ! mediaUpload ) {\n\t\t\treturn;\n\t\t}\n\t\tmediaUpload( {\n\t\t\tfilesList: [ externalBlob ],\n\t\t\tonFileChange( [ img ] ) {\n\t\t\t\tonSelectImage( img );\n\n\t\t\t\tif ( isBlobURL( img.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetExternalBlob();\n\t\t\t\tcreateSuccessNotice( __( 'Image uploaded.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t},\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tonError( message ) {\n\t\t\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSingleSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSingleSelected ] );\n\n\tconst canEditImage = id && naturalWidth && naturalHeight && imageEditing;\n\tconst allowCrop =\n\t\tisSingleSelected &&\n\t\tcanEditImage &&\n\t\t! isEditingImage &&\n\t\t! isContentOnlyMode;\n\n\tfunction switchToCover() {\n\t\treplaceBlocks(\n\t\t\tclientId,\n\t\t\tswitchToBlockType( getBlock( clientId ), 'core/cover' )\n\t\t);\n\t}\n\n\t// TODO: Can allow more units after figuring out how they should interact\n\t// with the ResizableBox and ImageEditor components. Calculations later on\n\t// for those components are currently assuming px units.\n\tconst dimensionsUnitsOptions = useCustomUnits( {\n\t\tavailableUnits: [ 'px' ],\n\t} );\n\n\tconst [ lightboxSetting ] = useSettings( 'lightbox' );\n\n\tconst showLightboxSetting =\n\t\t// If a block-level override is set, we should give users the option to\n\t\t// remove that override, even if the lightbox UI is disabled in the settings.\n\t\t( !! lightbox && lightbox?.enabled !== lightboxSetting?.enabled ) ||\n\t\tlightboxSetting?.allowEditing;\n\n\tconst lightboxChecked =\n\t\t!! lightbox?.enabled || ( ! lightbox && !! lightboxSetting?.enabled );\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst dimensionsControl =\n\t\tisResizable &&\n\t\t( SIZED_LAYOUTS.includes( parentLayoutType ) ? (\n\t\t\t<DimensionsTool\n\t\t\t\tvalue={ { aspectRatio } }\n\t\t\t\tonChange={ ( { aspectRatio: newAspectRatio } ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t\t\tscale: 'cover',\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\t\ttools={ [ 'aspectRatio' ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<DimensionsTool\n\t\t\t\tvalue={ { width, height, scale, aspectRatio } }\n\t\t\t\tonChange={ ( {\n\t\t\t\t\twidth: newWidth,\n\t\t\t\t\theight: newHeight,\n\t\t\t\t\tscale: newScale,\n\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t} ) => {\n\t\t\t\t\t// Rebuilding the object forces setting `undefined`\n\t\t\t\t\t// for values that are removed since setAttributes\n\t\t\t\t\t// doesn't do anything with keys that aren't set.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// CSS includes `height: auto`, but we need\n\t\t\t\t\t\t// `width: auto` to fix the aspect ratio when\n\t\t\t\t\t\t// only height is set due to the width and\n\t\t\t\t\t\t// height attributes set via the server.\n\t\t\t\t\t\twidth: ! newWidth && newHeight ? 'auto' : newWidth,\n\t\t\t\t\t\theight: newHeight,\n\t\t\t\t\t\tscale: newScale,\n\t\t\t\t\t\taspectRatio: newAspectRatio,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tdefaultScale=\"cover\"\n\t\t\t\tdefaultAspectRatio=\"auto\"\n\t\t\t\tscaleOptions={ scaleOptions }\n\t\t\t\tunitsOptions={ dimensionsUnitsOptions }\n\t\t\t/>\n\t\t) );\n\n\tconst resetAll = () => {\n\t\tsetAttributes( {\n\t\t\talt: undefined,\n\t\t\twidth: undefined,\n\t\t\theight: undefined,\n\t\t\tscale: undefined,\n\t\t\taspectRatio: undefined,\n\t\t\tlightbox: undefined,\n\t\t} );\n\t};\n\n\tconst sizeControls = (\n\t\t<InspectorControls>\n\t\t\t<ToolsPanel\n\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\tresetAll={ resetAll }\n\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t>\n\t\t\t\t{ dimensionsControl }\n\t\t\t</ToolsPanel>\n\t\t</InspectorControls>\n\t);\n\n\tconst arePatternOverridesEnabled =\n\t\tmetadata?.bindings?.__default?.source === 'core/pattern-overrides';\n\n\tconst {\n\t\tlockUrlControls = false,\n\t\tlockHrefControls = false,\n\t\tlockAltControls = false,\n\t\tlockAltControlsMessage,\n\t\tlockTitleControls = false,\n\t\tlockTitleControlsMessage,\n\t\tlockCaption = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSingleSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst {\n\t\t\t\turl: urlBinding,\n\t\t\t\talt: altBinding,\n\t\t\t\ttitle: titleBinding,\n\t\t\t} = metadata?.bindings || {};\n\t\t\tconst hasParentPattern = !! context[ 'pattern/overrides' ];\n\t\t\tconst urlBindingSource = getBlockBindingsSource(\n\t\t\t\turlBinding?.source\n\t\t\t);\n\t\t\tconst altBindingSource = getBlockBindingsSource(\n\t\t\t\taltBinding?.source\n\t\t\t);\n\t\t\tconst titleBindingSource = getBlockBindingsSource(\n\t\t\t\ttitleBinding?.source\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! urlBinding &&\n\t\t\t\t\t! urlBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: urlBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockHrefControls:\n\t\t\t\t\t// Disable editing the link of the URL if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the link on the frontend.\n\t\t\t\t\thasParentPattern || arePatternOverridesEnabled,\n\t\t\t\tlockCaption:\n\t\t\t\t\t// Disable editing the caption if the image is inside a pattern instance.\n\t\t\t\t\t// This is a temporary solution until we support overriding the caption on the frontend.\n\t\t\t\t\thasParentPattern,\n\t\t\t\tlockAltControls:\n\t\t\t\t\t!! altBinding &&\n\t\t\t\t\t! altBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: altBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockAltControlsMessage: altBindingSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\taltBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t\tlockTitleControls:\n\t\t\t\t\t!! titleBinding &&\n\t\t\t\t\t! titleBindingSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: titleBinding?.args,\n\t\t\t\t\t} ),\n\t\t\t\tlockTitleControlsMessage: titleBindingSource?.label\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: Label of the bindings source. */\n\t\t\t\t\t\t\t__( 'Connected to %s' ),\n\t\t\t\t\t\t\ttitleBindingSource.label\n\t\t\t\t\t )\n\t\t\t\t\t: __( 'Connected to dynamic data' ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tarePatternOverridesEnabled,\n\t\t\tcontext,\n\t\t\tisSingleSelected,\n\t\t\tmetadata?.bindings,\n\t\t]\n\t);\n\n\tconst showUrlInput =\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockHrefControls &&\n\t\t! lockUrlControls;\n\n\tconst showCoverControls = isSingleSelected && canInsertCover;\n\n\tconst showBlockControls = showUrlInput || allowCrop || showCoverControls;\n\n\tconst mediaReplaceFlow = isSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! lockUrlControls && (\n\t\t\t// For contentOnly mode, put this button in its own area so it has borders around it.\n\t\t\t<BlockControls group={ isContentOnlyMode ? 'inline' : 'other' }>\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tonSelect={ onSelectImage }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tname={ ! url ? __( 'Add image' ) : __( 'Replace' ) }\n\t\t\t\t\tonReset={ () => onSelectImage( undefined ) }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t);\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ showBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ showUrlInput && (\n\t\t\t\t\t\t<ImageURLInputUI\n\t\t\t\t\t\t\turl={ href || '' }\n\t\t\t\t\t\t\tonChangeUrl={ onSetHref }\n\t\t\t\t\t\t\tlinkDestination={ linkDestination }\n\t\t\t\t\t\t\tmediaUrl={ ( image && image.source_url ) || url }\n\t\t\t\t\t\t\tmediaLink={ image && image.link }\n\t\t\t\t\t\t\tlinkTarget={ linkTarget }\n\t\t\t\t\t\t\tlinkClass={ linkClass }\n\t\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t\t\tshowLightboxSetting={ showLightboxSetting }\n\t\t\t\t\t\t\tlightboxEnabled={ lightboxChecked }\n\t\t\t\t\t\t\tonSetLightbox={ onSetLightbox }\n\t\t\t\t\t\t\tresetLightbox={ resetLightbox }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ allowCrop && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showCoverControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ticon={ overlayText }\n\t\t\t\t\t\t\tlabel={ __( 'Add text over image' ) }\n\t\t\t\t\t\t\tonClick={ switchToCover }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isSingleSelected && externalBlob && (\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tonClick={ uploadExternal }\n\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\tlabel={ __( 'Upload to Media Library' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isContentOnlyMode && (\n\t\t\t\t// Add some extra controls for content attributes when content only mode is active.\n\t\t\t\t// With content only mode active, the inspector is hidden, so users need another way\n\t\t\t\t// to edit these attributes.\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t<ContentOnlyControls\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tlockAltControls={ lockAltControls }\n\t\t\t\t\t\tlockAltControlsMessage={ lockAltControlsMessage }\n\t\t\t\t\t\tlockTitleControls={ lockTitleControls }\n\t\t\t\t\t\tlockTitleControlsMessage={ lockTitleControlsMessage }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ resetAll }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ isSingleSelected && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { alt: undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt || '' }\n\t\t\t\t\t\t\t\tonChange={ updateAlt }\n\t\t\t\t\t\t\t\treadOnly={ lockAltControls }\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\tlockAltControls ? (\n\t\t\t\t\t\t\t\t\t\t<>{ lockAltControlsMessage }</>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ dimensionsControl }\n\t\t\t\t\t{ !! imageSizeOptions.length && (\n\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\tdefaultValue={ DEFAULT_MEDIA_SIZE_SLUG }\n\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Title attribute' ) }\n\t\t\t\t\tvalue={ title || '' }\n\t\t\t\t\tonChange={ onSetTitle }\n\t\t\t\t\treadOnly={ lockTitleControls }\n\t\t\t\t\thelp={\n\t\t\t\t\t\tlockTitleControls ? (\n\t\t\t\t\t\t\t<>{ lockTitleControlsMessage }</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Describe the role of this image on the page.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/TR/html52/dom.html#the-title-attribute\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'(Note: many devices and browsers do not display this text.)'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ExternalLink>\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</InspectorControls>\n\t\t</>\n\t);\n\n\tconst filename = getFilename( url );\n\tlet defaultedAlt;\n\n\tif ( alt ) {\n\t\tdefaultedAlt = alt;\n\t} else if ( filename ) {\n\t\tdefaultedAlt = sprintf(\n\t\t\t/* translators: %s: file name */\n\t\t\t__( 'This image has an empty alt attribute; its file name is %s' ),\n\t\t\tfilename\n\t\t);\n\t} else {\n\t\tdefaultedAlt = __( 'This image has an empty alt attribute' );\n\t}\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\tconst isRounded = attributes.className?.includes( 'is-style-rounded' );\n\n\tconst { postType, postId, queryId } = context;\n\tconst isDescendentOfQueryLoop = Number.isFinite( queryId );\n\n\tlet img =\n\t\ttemporaryURL && hasImageErrored ? (\n\t\t\t// Show a placeholder during upload when the blob URL can't be loaded. This can\n\t\t\t// happen when the user uploads a HEIC image in a browser that doesn't support them.\n\t\t\t<Placeholder\n\t\t\t\tclassName=\"wp-block-image__placeholder\"\n\t\t\t\twithIllustration\n\t\t\t>\n\t\t\t\t<Spinner />\n\t\t\t</Placeholder>\n\t\t) : (\n\t\t\t// Disable reason: Image itself is not meant to be interactive, but\n\t\t\t// should direct focus to block.\n\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t<>\n\t\t\t\t<img\n\t\t\t\t\tsrc={ temporaryURL || url }\n\t\t\t\t\talt={ defaultedAlt }\n\t\t\t\t\tonError={ onImageError }\n\t\t\t\t\tonLoad={ onImageLoad }\n\t\t\t\t\tref={ setRefs }\n\t\t\t\t\tclassName={ borderProps.className }\n\t\t\t\t\twidth={ naturalWidth }\n\t\t\t\t\theight={ naturalHeight }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t\t...( resizeDelta\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\twidth: pixelSize.width + resizeDelta.width,\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tpixelSize.height + resizeDelta.height,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { width, height } ),\n\t\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ temporaryURL && <Spinner /> }\n\t\t\t</>\n\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t);\n\n\tif ( canEditImage && isEditingImage ) {\n\t\timg = (\n\t\t\t<ImageWrapper href={ href }>\n\t\t\t\t<ImageEditor\n\t\t\t\t\tid={ id }\n\t\t\t\t\turl={ url }\n\t\t\t\t\t{ ...pixelSize }\n\t\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\t\tonSaveImage={ ( imageAttributes ) =>\n\t\t\t\t\t\tsetAttributes( imageAttributes )\n\t\t\t\t\t}\n\t\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t\t} }\n\t\t\t\t\tborderProps={ isRounded ? undefined : borderProps }\n\t\t\t\t/>\n\t\t\t</ImageWrapper>\n\t\t);\n\t} else {\n\t\timg = <ImageWrapper href={ href }>{ img }</ImageWrapper>;\n\t}\n\n\tlet resizableBox;\n\tif (\n\t\tisResizable &&\n\t\tisSingleSelected &&\n\t\t! isEditingImage &&\n\t\t! SIZED_LAYOUTS.includes( parentLayoutType )\n\t) {\n\t\tconst numericRatio = aspectRatio && evalAspectRatio( aspectRatio );\n\t\tconst customRatio = pixelSize.width / pixelSize.height;\n\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\tconst ratio = numericRatio || customRatio || naturalRatio || 1;\n\t\tconst minWidth =\n\t\t\tnaturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;\n\t\tconst minHeight =\n\t\t\tnaturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio;\n\n\t\t// With the current implementation of ResizableBox, an image needs an\n\t\t// explicit pixel value for the max-width. In absence of being able to\n\t\t// set the content-width, this max-width is currently dictated by the\n\t\t// vanilla editor style. The following variable adds a buffer to this\n\t\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t\t// in most cases, allow you to scale the image beyond the width of the\n\t\t// main column, though not infinitely.\n\t\t// @todo It would be good to revisit this once a content-width variable\n\t\t// becomes available.\n\t\tconst maxWidthBuffer = maxWidth * 2.5;\n\t\tconst maxResizeWidth = maxContentWidth || maxWidthBuffer;\n\n\t\tlet showRightHandle = false;\n\t\tlet showLeftHandle = false;\n\n\t\t/* eslint-disable no-lonely-if */\n\t\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\t\tif ( align === 'center' ) {\n\t\t\t// When the image is centered, show both handles.\n\t\t\tshowRightHandle = true;\n\t\t\tshowLeftHandle = true;\n\t\t} else if ( isRTL() ) {\n\t\t\t// In RTL mode the image is on the right by default.\n\t\t\t// Show the right handle and hide the left handle only when it is\n\t\t\t// aligned left. Otherwise always show the left handle.\n\t\t\tif ( align === 'left' ) {\n\t\t\t\tshowRightHandle = true;\n\t\t\t} else {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// Show the left handle and hide the right handle only when the\n\t\t\t// image is aligned right. Otherwise always show the right handle.\n\t\t\tif ( align === 'right' ) {\n\t\t\t\tshowLeftHandle = true;\n\t\t\t} else {\n\t\t\t\tshowRightHandle = true;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-lonely-if */\n\t\tresizableBox = (\n\t\t\t<ResizableBox\n\t\t\t\tref={ effectResizeableBoxPlacement }\n\t\t\t\tstyle={ {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t// To match the vertical-align: bottom of the img (from style.scss)\n\t\t\t\t\t// syncs the top with the img. This matters when the img height is\n\t\t\t\t\t// less than the line-height.\n\t\t\t\t\tinset: `${ offsetTop }px 0 0 0`,\n\t\t\t\t} }\n\t\t\t\tsize={ pixelSize }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxResizeWidth }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxResizeWidth / ratio }\n\t\t\t\tlockAspectRatio={ ratio }\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ () => {\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResize={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetResizeDelta( delta );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t\tsetResizeDelta( null );\n\t\t\t\t\tsetPixelSize( ( current ) => ( {\n\t\t\t\t\t\twidth: current.width + delta.width,\n\t\t\t\t\t\theight: current.height + delta.height,\n\t\t\t\t\t} ) );\n\n\t\t\t\t\t// Clear hardcoded width if the resized width is close to the max-content width.\n\t\t\t\t\tif (\n\t\t\t\t\t\tmaxContentWidth &&\n\t\t\t\t\t\t// Only do this if the image is bigger than the container to prevent it from being squished.\n\t\t\t\t\t\t// TODO: Remove this check if the image support setting 100% width.\n\t\t\t\t\t\tnaturalWidth >= maxContentWidth &&\n\t\t\t\t\t\tMath.abs( elt.offsetWidth - maxContentWidth ) < 10\n\t\t\t\t\t) {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\theight: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Since the aspect ratio is locked when resizing, we can\n\t\t\t\t\t// use the width of the resized element to calculate the\n\t\t\t\t\t// height in CSS to prevent stretching when the max-width\n\t\t\t\t\t// is reached.\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: `${ elt.offsetWidth }px`,\n\t\t\t\t\t\theight: 'auto',\n\t\t\t\t\t\taspectRatio:\n\t\t\t\t\t\t\tratio === naturalRatio\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: String( ratio ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tresizeRatio={ align === 'center' ? 2 : 1 }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! url && ! temporaryURL ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ mediaReplaceFlow }\n\t\t\t\t{ /* Add all controls if the image attributes are connected. */ }\n\t\t\t\t{ metadata?.bindings ? controls : sizeControls }\n\t\t\t</>\n\t\t);\n\t}\n\n\t/**\n\t * Set the post's featured image with the current image.\n\t */\n\tconst setPostFeatureImage = () => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tfeatured_media: id,\n\t\t} );\n\t\tcreateSuccessNotice( __( 'Post featured image updated.' ), {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t};\n\n\tconst featuredImageControl = (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds } ) =>\n\t\t\t\tselectedClientIds.length === 1 &&\n\t\t\t\t! isDescendentOfQueryLoop &&\n\t\t\t\tpostId &&\n\t\t\t\tid &&\n\t\t\t\tclientId === selectedClientIds[ 0 ] && (\n\t\t\t\t\t<MenuItem onClick={ setPostFeatureImage }>\n\t\t\t\t\t\t{ __( 'Set as featured image' ) }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t)\n\t\t\t}\n\t\t</BlockSettingsMenuControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ mediaReplaceFlow }\n\t\t\t{ controls }\n\t\t\t{ featuredImageControl }\n\t\t\t{ img }\n\t\t\t{ resizableBox }\n\n\t\t\t<Caption\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tisSelected={ isSingleSelected }\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\tlabel={ __( 'Image caption text' ) }\n\t\t\t\tshowToolbarButton={\n\t\t\t\t\tisSingleSelected &&\n\t\t\t\t\thasNonContentControls &&\n\t\t\t\t\t! arePatternOverridesEnabled\n\t\t\t\t}\n\t\t\t\treadOnly={ lockCaption }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAiBA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAaA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,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W,yBAAyB;IAAAvU,QAAA,EACvBA,CAAE;MAAEwU;IAAkB,CAAC,KACxBA,iBAAiB,CAACpE,MAAM,KAAK,CAAC,IAC9B,CAAEe,uBAAuB,IACzBF,MAAM,IACNjN,EAAE,IACFN,QAAQ,KAAK8Q,iBAAiB,CAAE,CAAC,CAAE,iBAClC,IAAAvV,WAAA,CAAAgB,GAAA,EAAClC,WAAA,CAAAmE,QAAQ;MAAChC,OAAO,EAAGkU,mBAAqB;MAAApU,QAAA,EACtC,IAAAL,QAAE,EAAE,uBAAwB;IAAC,CACtB;EACV,CAEwB,CAC3B;EAED,oBACC,IAAAV,WAAA,CAAAsC,IAAA,EAAAtC,WAAA,CAAAuC,QAAA;IAAAxB,QAAA,GACG0O,gBAAgB,EAChBS,QAAQ,EACRmF,oBAAoB,EACpBlJ,GAAG,EACH4G,YAAY,eAEd,IAAA/S,WAAA,CAAAgB,GAAA,EAACpB,QAAA,CAAA4V,OAAO;MACP/T,UAAU,EAAGA,UAAY;MACzBC,aAAa,EAAGA,aAAe;MAC/B+T,UAAU,EAAGvR,gBAAkB;MAC/BC,iBAAiB,EAAGA,iBAAmB;MACvC5D,KAAK,EAAG,IAAAG,QAAE,EAAE,oBAAqB,CAAG;MACpCgV,iBAAiB,EAChBxR,gBAAgB,IAChBmF,qBAAqB,IACrB,CAAE+E,0BACF;MACD8C,QAAQ,EAAGxC;IAAa,CACxB,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -253,102 +253,174 @@ function Controls({
|
|
|
253
253
|
})
|
|
254
254
|
})
|
|
255
255
|
})]
|
|
256
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToolsPanel, {
|
|
257
|
+
label: (0, _i18n.__)('Featured image'),
|
|
258
|
+
resetAll: () => setAttributes({
|
|
259
|
+
displayFeaturedImage: false,
|
|
260
|
+
featuredImageAlign: undefined,
|
|
261
|
+
featuredImageSizeSlug: 'thumbnail',
|
|
262
|
+
featuredImageSizeWidth: null,
|
|
263
|
+
featuredImageSizeHeight: null,
|
|
264
|
+
addLinkToFeaturedImage: false
|
|
265
|
+
}),
|
|
266
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
267
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
268
|
+
hasValue: () => !!displayFeaturedImage,
|
|
260
269
|
label: (0, _i18n.__)('Display featured image'),
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
270
|
+
onDeselect: () => setAttributes({
|
|
271
|
+
displayFeaturedImage: false
|
|
272
|
+
}),
|
|
273
|
+
isShownByDefault: true,
|
|
274
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
275
|
+
__nextHasNoMarginBottom: true,
|
|
276
|
+
label: (0, _i18n.__)('Display featured image'),
|
|
277
|
+
checked: displayFeaturedImage,
|
|
278
|
+
onChange: value => setAttributes({
|
|
279
|
+
displayFeaturedImage: value
|
|
280
|
+
})
|
|
264
281
|
})
|
|
265
282
|
}), displayFeaturedImage && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
266
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
283
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
284
|
+
hasValue: () => featuredImageSizeSlug !== 'thumbnail' || featuredImageSizeWidth !== null || featuredImageSizeHeight !== null,
|
|
285
|
+
label: (0, _i18n.__)('Image size'),
|
|
286
|
+
onDeselect: () => setAttributes({
|
|
287
|
+
featuredImageSizeSlug: 'thumbnail',
|
|
288
|
+
featuredImageSizeWidth: null,
|
|
289
|
+
featuredImageSizeHeight: null
|
|
290
|
+
}),
|
|
291
|
+
isShownByDefault: true,
|
|
292
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalImageSizeControl, {
|
|
293
|
+
onChange: value => {
|
|
294
|
+
const newAttrs = {};
|
|
295
|
+
if (value.hasOwnProperty('width')) {
|
|
296
|
+
newAttrs.featuredImageSizeWidth = value.width;
|
|
297
|
+
}
|
|
298
|
+
if (value.hasOwnProperty('height')) {
|
|
299
|
+
newAttrs.featuredImageSizeHeight = value.height;
|
|
300
|
+
}
|
|
301
|
+
setAttributes(newAttrs);
|
|
302
|
+
},
|
|
303
|
+
slug: featuredImageSizeSlug,
|
|
304
|
+
width: featuredImageSizeWidth,
|
|
305
|
+
height: featuredImageSizeHeight,
|
|
306
|
+
imageWidth: defaultImageWidth,
|
|
307
|
+
imageHeight: defaultImageHeight,
|
|
308
|
+
imageSizeOptions: imageSizeOptions,
|
|
309
|
+
imageSizeHelp: (0, _i18n.__)('Select the size of the source image.'),
|
|
310
|
+
onChangeImage: value => setAttributes({
|
|
311
|
+
featuredImageSizeSlug: value,
|
|
312
|
+
featuredImageSizeWidth: undefined,
|
|
313
|
+
featuredImageSizeHeight: undefined
|
|
314
|
+
})
|
|
288
315
|
})
|
|
289
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.
|
|
290
|
-
|
|
291
|
-
__nextHasNoMarginBottom: true,
|
|
292
|
-
__next40pxDefaultSize: true,
|
|
316
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
317
|
+
hasValue: () => !!featuredImageAlign,
|
|
293
318
|
label: (0, _i18n.__)('Image alignment'),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
featuredImageAlign: value !== 'none' ? value : undefined
|
|
319
|
+
onDeselect: () => setAttributes({
|
|
320
|
+
featuredImageAlign: undefined
|
|
297
321
|
}),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
},
|
|
322
|
+
isShownByDefault: true,
|
|
323
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToggleGroupControl, {
|
|
324
|
+
className: "editor-latest-posts-image-alignment-control",
|
|
325
|
+
__nextHasNoMarginBottom: true,
|
|
326
|
+
__next40pxDefaultSize: true,
|
|
327
|
+
label: (0, _i18n.__)('Image alignment'),
|
|
328
|
+
value: featuredImageAlign || 'none',
|
|
329
|
+
onChange: value => setAttributes({
|
|
330
|
+
featuredImageAlign: value !== 'none' ? value : undefined
|
|
331
|
+
}),
|
|
332
|
+
children: imageAlignmentOptions.map(({
|
|
333
|
+
value,
|
|
334
|
+
icon,
|
|
335
|
+
label
|
|
336
|
+
}) => {
|
|
337
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToggleGroupControlOptionIcon, {
|
|
338
|
+
value: value,
|
|
339
|
+
icon: icon,
|
|
340
|
+
label: label
|
|
341
|
+
}, value);
|
|
342
|
+
})
|
|
308
343
|
})
|
|
309
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.
|
|
310
|
-
|
|
344
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
345
|
+
hasValue: () => !!addLinkToFeaturedImage,
|
|
311
346
|
label: (0, _i18n.__)('Add link to featured image'),
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
347
|
+
onDeselect: () => setAttributes({
|
|
348
|
+
addLinkToFeaturedImage: false
|
|
349
|
+
}),
|
|
350
|
+
isShownByDefault: true,
|
|
351
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
352
|
+
__nextHasNoMarginBottom: true,
|
|
353
|
+
label: (0, _i18n.__)('Add link to featured image'),
|
|
354
|
+
checked: addLinkToFeaturedImage,
|
|
355
|
+
onChange: value => setAttributes({
|
|
356
|
+
addLinkToFeaturedImage: value
|
|
357
|
+
})
|
|
315
358
|
})
|
|
316
359
|
})]
|
|
317
360
|
})]
|
|
318
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
order,
|
|
322
|
-
orderBy,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
selectedAuthor:
|
|
361
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToolsPanel, {
|
|
362
|
+
label: (0, _i18n.__)('Sorting and filtering'),
|
|
363
|
+
resetAll: () => setAttributes({
|
|
364
|
+
order: 'desc',
|
|
365
|
+
orderBy: 'date',
|
|
366
|
+
postsToShow: 5,
|
|
367
|
+
categories: undefined,
|
|
368
|
+
selectedAuthor: undefined,
|
|
369
|
+
columns: 3
|
|
370
|
+
}),
|
|
371
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
372
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
373
|
+
hasValue: () => order !== 'desc' || orderBy !== 'date' || postsToShow !== 5 || categories?.length > 0 || !!selectedAuthor,
|
|
374
|
+
label: (0, _i18n.__)('Sort and filter'),
|
|
375
|
+
onDeselect: () => setAttributes({
|
|
376
|
+
order: 'desc',
|
|
377
|
+
orderBy: 'date',
|
|
378
|
+
postsToShow: 5,
|
|
379
|
+
categories: undefined,
|
|
380
|
+
selectedAuthor: undefined
|
|
338
381
|
}),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
382
|
+
isShownByDefault: true,
|
|
383
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.QueryControls, {
|
|
384
|
+
order,
|
|
385
|
+
orderBy,
|
|
386
|
+
numberOfItems: postsToShow,
|
|
387
|
+
onOrderChange: value => setAttributes({
|
|
388
|
+
order: value
|
|
389
|
+
}),
|
|
390
|
+
onOrderByChange: value => setAttributes({
|
|
391
|
+
orderBy: value
|
|
392
|
+
}),
|
|
393
|
+
onNumberOfItemsChange: value => setAttributes({
|
|
394
|
+
postsToShow: value
|
|
395
|
+
}),
|
|
396
|
+
categorySuggestions: categorySuggestions,
|
|
397
|
+
onCategoryChange: selectCategories,
|
|
398
|
+
selectedCategories: categories,
|
|
399
|
+
onAuthorChange: value => setAttributes({
|
|
400
|
+
selectedAuthor: '' !== value ? Number(value) : undefined
|
|
401
|
+
}),
|
|
402
|
+
authorList: authorList !== null && authorList !== void 0 ? authorList : [],
|
|
403
|
+
selectedAuthorId: selectedAuthor
|
|
404
|
+
})
|
|
405
|
+
}), postLayout === 'grid' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
406
|
+
hasValue: () => columns !== 3,
|
|
344
407
|
label: (0, _i18n.__)('Columns'),
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
columns: value
|
|
408
|
+
onDeselect: () => setAttributes({
|
|
409
|
+
columns: 3
|
|
348
410
|
}),
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
411
|
+
isShownByDefault: true,
|
|
412
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RangeControl, {
|
|
413
|
+
__nextHasNoMarginBottom: true,
|
|
414
|
+
__next40pxDefaultSize: true,
|
|
415
|
+
label: (0, _i18n.__)('Columns'),
|
|
416
|
+
value: columns,
|
|
417
|
+
onChange: value => setAttributes({
|
|
418
|
+
columns: value
|
|
419
|
+
}),
|
|
420
|
+
min: 2,
|
|
421
|
+
max: !postCount ? _constants.MAX_POSTS_COLUMNS : Math.min(_constants.MAX_POSTS_COLUMNS, postCount),
|
|
422
|
+
required: true
|
|
423
|
+
})
|
|
352
424
|
})]
|
|
353
425
|
})]
|
|
354
426
|
});
|