@wordpress/block-library 9.5.0 → 9.6.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 +2 -0
- package/build/archives/edit.js +1 -0
- package/build/archives/edit.js.map +1 -1
- package/build/audio/edit.js +1 -0
- package/build/audio/edit.js.map +1 -1
- package/build/avatar/user-control.js +1 -0
- package/build/avatar/user-control.js.map +1 -1
- package/build/button/edit.js +1 -0
- package/build/button/edit.js.map +1 -1
- package/build/comment-author-name/index.js +14 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +14 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +14 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +0 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/embed/edit.js +12 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-placeholder.js +6 -3
- package/build/embed/embed-placeholder.js.map +1 -1
- package/build/embed/embed-preview.js +4 -18
- package/build/embed/embed-preview.js.map +1 -1
- package/build/file/index.js +12 -0
- package/build/file/index.js.map +1 -1
- package/build/file/inspector.js +1 -0
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +2 -0
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +1 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +2 -6
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js +4 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/group/edit.js +1 -1
- package/build/group/edit.js.map +1 -1
- package/build/image/image.js +6 -1
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +4 -0
- package/build/image/transforms.js.map +1 -1
- package/build/latest-posts/edit.js +37 -11
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/index.js +9 -0
- package/build/list/index.js.map +1 -1
- package/build/list-item/index.js +8 -1
- package/build/list-item/index.js.map +1 -1
- package/build/media-text/edit.js +0 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/missing/edit.js +10 -19
- package/build/missing/edit.js.map +1 -1
- package/build/navigation/edit/index.js +3 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +2 -0
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/post-author/edit.js +60 -53
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +13 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +14 -1
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +14 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comment/edit.js +2 -0
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +9 -2
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +1 -0
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js +5 -2
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +1 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-title/edit.js +1 -0
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/index.js +12 -0
- package/build/preformatted/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +1 -0
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/query-content.js +1 -1
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +1 -0
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/index.js +12 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -0
- package/build/quote/index.js.map +1 -1
- package/build/quote/transforms.js +4 -0
- package/build/quote/transforms.js.map +1 -1
- package/build/search/edit.js +9 -5
- package/build/search/edit.js.map +1 -1
- package/build/social-link/edit.js +2 -0
- package/build/social-link/edit.js.map +1 -1
- package/build/table/edit.js +6 -5
- package/build/table/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +44 -33
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +12 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -0
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/video/edit-common-settings.js +1 -0
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +3 -0
- package/build/video/tracks-editor.js.map +1 -1
- package/build/video/transforms.js +4 -0
- package/build/video/transforms.js.map +1 -1
- package/build-module/archives/edit.js +1 -0
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/audio/edit.js +1 -0
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/avatar/user-control.js +1 -0
- package/build-module/avatar/user-control.js.map +1 -1
- package/build-module/button/edit.js +1 -0
- package/build-module/button/edit.js.map +1 -1
- package/build-module/comment-author-name/index.js +14 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +14 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +14 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +0 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/embed/edit.js +13 -5
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +7 -4
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-preview.js +5 -19
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/file/index.js +12 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/inspector.js +1 -0
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +2 -0
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +1 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +3 -7
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js +4 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/image/image.js +7 -2
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +5 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/latest-posts/edit.js +40 -14
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/index.js +9 -0
- package/build-module/list/index.js.map +1 -1
- package/build-module/list-item/index.js +8 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/media-text/edit.js +0 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/missing/edit.js +10 -19
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/navigation/edit/index.js +3 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-name-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +2 -0
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/post-author/edit.js +61 -54
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author/index.js +13 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +14 -1
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +14 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comment/edit.js +2 -0
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +9 -2
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +1 -0
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +5 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-title/edit.js +1 -0
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/index.js +12 -0
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -1
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -0
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/index.js +12 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/transforms.js +4 -0
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/search/edit.js +10 -6
- package/build-module/search/edit.js.map +1 -1
- package/build-module/social-link/edit.js +2 -0
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/table/edit.js +6 -5
- package/build-module/table/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js +45 -34
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +12 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +2 -0
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/video/edit-common-settings.js +1 -0
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +1 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +3 -0
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-module/video/transforms.js +5 -1
- package/build-module/video/transforms.js.map +1 -1
- package/build-style/archives/editor-rtl.css +2 -2
- package/build-style/archives/editor.css +2 -2
- package/build-style/archives/style-rtl.css +2 -2
- package/build-style/archives/style.css +2 -2
- package/build-style/audio/editor-rtl.css +2 -2
- package/build-style/audio/editor.css +2 -2
- package/build-style/audio/style-rtl.css +2 -2
- package/build-style/audio/style.css +2 -2
- package/build-style/audio/theme-rtl.css +2 -2
- package/build-style/audio/theme.css +2 -2
- package/build-style/avatar/editor-rtl.css +2 -2
- package/build-style/avatar/editor.css +2 -2
- package/build-style/avatar/style-rtl.css +2 -2
- package/build-style/avatar/style.css +2 -2
- package/build-style/button/editor-rtl.css +2 -2
- package/build-style/button/editor.css +2 -2
- package/build-style/button/style-rtl.css +2 -2
- package/build-style/button/style.css +2 -2
- package/build-style/buttons/editor-rtl.css +2 -2
- package/build-style/buttons/editor.css +2 -2
- package/build-style/buttons/style-rtl.css +2 -2
- package/build-style/buttons/style.css +2 -2
- package/build-style/calendar/style-rtl.css +2 -2
- package/build-style/calendar/style.css +2 -2
- package/build-style/categories/editor-rtl.css +2 -2
- package/build-style/categories/editor.css +2 -2
- package/build-style/categories/style-rtl.css +2 -2
- package/build-style/categories/style.css +2 -2
- package/build-style/classic-rtl.css +2 -2
- package/build-style/classic.css +2 -2
- package/build-style/code/editor-rtl.css +2 -2
- package/build-style/code/editor.css +2 -2
- package/build-style/code/style-rtl.css +2 -2
- package/build-style/code/style.css +2 -2
- package/build-style/code/theme-rtl.css +2 -2
- package/build-style/code/theme.css +2 -2
- package/build-style/columns/editor-rtl.css +2 -2
- package/build-style/columns/editor.css +2 -2
- package/build-style/columns/style-rtl.css +2 -2
- package/build-style/columns/style.css +2 -2
- package/build-style/comment-author-avatar/editor-rtl.css +2 -2
- package/build-style/comment-author-avatar/editor.css +2 -2
- package/build-style/comment-author-name/style-rtl.css +94 -0
- package/build-style/comment-author-name/style.css +94 -0
- package/build-style/comment-content/style-rtl.css +6 -2
- package/build-style/comment-content/style.css +6 -2
- package/build-style/comment-date/style-rtl.css +94 -0
- package/build-style/comment-date/style.css +94 -0
- package/build-style/comment-template/style-rtl.css +2 -2
- package/build-style/comment-template/style.css +2 -2
- package/build-style/comments/editor-rtl.css +2 -2
- package/build-style/comments/editor.css +2 -2
- package/build-style/comments/style-rtl.css +2 -2
- package/build-style/comments/style.css +2 -2
- package/build-style/comments-pagination/editor-rtl.css +2 -2
- package/build-style/comments-pagination/editor.css +2 -2
- package/build-style/comments-pagination/style-rtl.css +2 -2
- package/build-style/comments-pagination/style.css +2 -2
- package/build-style/comments-pagination-numbers/editor-rtl.css +2 -2
- package/build-style/comments-pagination-numbers/editor.css +2 -2
- package/build-style/comments-title/editor-rtl.css +2 -2
- package/build-style/comments-title/editor.css +2 -2
- package/build-style/common-rtl.css +2 -2
- package/build-style/common.css +2 -2
- package/build-style/cover/editor-rtl.css +2 -2
- package/build-style/cover/editor.css +2 -2
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/details/editor-rtl.css +2 -2
- package/build-style/details/editor.css +2 -2
- package/build-style/details/style-rtl.css +2 -2
- package/build-style/details/style.css +2 -2
- package/build-style/editor-elements-rtl.css +2 -2
- package/build-style/editor-elements.css +2 -2
- package/build-style/editor-rtl.css +31 -15
- package/build-style/editor.css +31 -15
- package/build-style/elements-rtl.css +2 -2
- package/build-style/elements.css +2 -2
- package/build-style/embed/editor-rtl.css +5 -2
- package/build-style/embed/editor.css +5 -2
- package/build-style/embed/style-rtl.css +2 -2
- package/build-style/embed/style.css +2 -2
- package/build-style/embed/theme-rtl.css +2 -2
- package/build-style/embed/theme.css +2 -2
- package/build-style/file/editor-rtl.css +2 -2
- package/build-style/file/editor.css +2 -2
- package/build-style/file/style-rtl.css +2 -2
- package/build-style/file/style.css +2 -2
- package/build-style/footnotes/style-rtl.css +2 -2
- package/build-style/footnotes/style.css +2 -2
- package/build-style/form-input/editor-rtl.css +2 -2
- package/build-style/form-input/editor.css +2 -2
- package/build-style/form-input/style-rtl.css +2 -2
- package/build-style/form-input/style.css +2 -2
- package/build-style/form-submission-notification/editor-rtl.css +2 -2
- package/build-style/form-submission-notification/editor.css +2 -2
- package/build-style/form-submit-button/style-rtl.css +2 -2
- package/build-style/form-submit-button/style.css +2 -2
- package/build-style/freeform/editor-rtl.css +2 -2
- package/build-style/freeform/editor.css +2 -2
- package/build-style/gallery/editor-rtl.css +2 -2
- package/build-style/gallery/editor.css +2 -2
- package/build-style/gallery/style-rtl.css +26 -9
- package/build-style/gallery/style.css +26 -9
- package/build-style/gallery/theme-rtl.css +2 -2
- package/build-style/gallery/theme.css +2 -2
- package/build-style/group/editor-rtl.css +2 -2
- package/build-style/group/editor.css +2 -2
- package/build-style/group/style-rtl.css +2 -2
- package/build-style/group/style.css +2 -2
- package/build-style/group/theme-rtl.css +2 -2
- package/build-style/group/theme.css +2 -2
- package/build-style/heading/style-rtl.css +2 -2
- package/build-style/heading/style.css +2 -2
- package/build-style/html/editor-rtl.css +2 -2
- package/build-style/html/editor.css +2 -2
- package/build-style/image/editor-rtl.css +2 -2
- package/build-style/image/editor.css +2 -2
- package/build-style/image/style-rtl.css +2 -2
- package/build-style/image/style.css +2 -2
- package/build-style/image/theme-rtl.css +2 -2
- package/build-style/image/theme.css +2 -2
- package/build-style/latest-comments/style-rtl.css +2 -2
- package/build-style/latest-comments/style.css +2 -2
- package/build-style/latest-posts/editor-rtl.css +9 -6
- package/build-style/latest-posts/editor.css +9 -6
- package/build-style/latest-posts/style-rtl.css +2 -2
- package/build-style/latest-posts/style.css +2 -2
- package/build-style/list/style-rtl.css +2 -2
- package/build-style/list/style.css +2 -2
- package/build-style/loginout/style-rtl.css +2 -2
- package/build-style/loginout/style.css +2 -2
- package/build-style/media-text/editor-rtl.css +2 -2
- package/build-style/media-text/editor.css +2 -2
- package/build-style/media-text/style-rtl.css +2 -2
- package/build-style/media-text/style.css +2 -2
- package/build-style/more/editor-rtl.css +2 -2
- package/build-style/more/editor.css +2 -2
- package/build-style/navigation/editor-rtl.css +6 -2
- package/build-style/navigation/editor.css +6 -2
- package/build-style/navigation/style-rtl.css +2 -2
- package/build-style/navigation/style.css +2 -2
- package/build-style/navigation-link/editor-rtl.css +2 -5
- package/build-style/navigation-link/editor.css +2 -5
- package/build-style/navigation-link/style-rtl.css +2 -2
- package/build-style/navigation-link/style.css +2 -2
- package/build-style/navigation-submenu/editor-rtl.css +2 -2
- package/build-style/navigation-submenu/editor.css +2 -2
- package/build-style/nextpage/editor-rtl.css +2 -2
- package/build-style/nextpage/editor.css +2 -2
- package/build-style/page-list/editor-rtl.css +2 -2
- package/build-style/page-list/editor.css +2 -2
- package/build-style/page-list/style-rtl.css +2 -2
- package/build-style/page-list/style.css +2 -2
- package/build-style/paragraph/editor-rtl.css +2 -2
- package/build-style/paragraph/editor.css +2 -2
- package/build-style/paragraph/style-rtl.css +2 -2
- package/build-style/paragraph/style.css +2 -2
- package/build-style/post-author/editor-rtl.css +95 -0
- package/build-style/post-author/editor.css +95 -0
- package/build-style/post-author/style-rtl.css +3 -2
- package/build-style/post-author/style.css +3 -2
- package/build-style/post-author-biography/style-rtl.css +94 -0
- package/build-style/post-author-biography/style.css +94 -0
- package/build-style/post-author-name/style-rtl.css +94 -0
- package/build-style/post-author-name/style.css +94 -0
- package/build-style/post-comments-form/editor-rtl.css +2 -2
- package/build-style/post-comments-form/editor.css +2 -2
- package/build-style/post-comments-form/style-rtl.css +2 -2
- package/build-style/post-comments-form/style.css +2 -2
- package/build-style/post-content/editor-rtl.css +2 -2
- package/build-style/post-content/editor.css +2 -2
- package/build-style/post-content/style-rtl.css +2 -2
- package/build-style/post-content/style.css +2 -2
- package/build-style/post-date/style-rtl.css +2 -2
- package/build-style/post-date/style.css +2 -2
- package/build-style/post-excerpt/editor-rtl.css +2 -2
- package/build-style/post-excerpt/editor.css +2 -2
- package/build-style/post-excerpt/style-rtl.css +2 -2
- package/build-style/post-excerpt/style.css +2 -2
- package/build-style/post-featured-image/editor-rtl.css +2 -2
- package/build-style/post-featured-image/editor.css +2 -2
- package/build-style/post-featured-image/style-rtl.css +2 -2
- package/build-style/post-featured-image/style.css +2 -2
- package/build-style/post-navigation-link/style-rtl.css +2 -2
- package/build-style/post-navigation-link/style.css +2 -2
- package/build-style/post-template/editor-rtl.css +2 -2
- package/build-style/post-template/editor.css +2 -2
- package/build-style/post-template/style-rtl.css +2 -2
- package/build-style/post-template/style.css +2 -2
- package/build-style/post-terms/style-rtl.css +2 -2
- package/build-style/post-terms/style.css +2 -2
- package/build-style/post-time-to-read/style-rtl.css +2 -2
- package/build-style/post-time-to-read/style.css +2 -2
- package/build-style/post-title/style-rtl.css +2 -2
- package/build-style/post-title/style.css +2 -2
- package/build-style/preformatted/style-rtl.css +2 -2
- package/build-style/preformatted/style.css +2 -2
- package/build-style/pullquote/editor-rtl.css +2 -2
- package/build-style/pullquote/editor.css +2 -2
- package/build-style/pullquote/style-rtl.css +2 -2
- package/build-style/pullquote/style.css +2 -2
- package/build-style/pullquote/theme-rtl.css +2 -2
- package/build-style/pullquote/theme.css +2 -2
- package/build-style/query/editor-rtl.css +2 -2
- package/build-style/query/editor.css +2 -2
- package/build-style/query-pagination/editor-rtl.css +2 -2
- package/build-style/query-pagination/editor.css +2 -2
- package/build-style/query-pagination/style-rtl.css +2 -2
- package/build-style/query-pagination/style.css +2 -2
- package/build-style/query-pagination-numbers/editor-rtl.css +2 -2
- package/build-style/query-pagination-numbers/editor.css +2 -2
- package/build-style/query-title/style-rtl.css +2 -2
- package/build-style/query-title/style.css +2 -2
- package/build-style/quote/style-rtl.css +2 -2
- package/build-style/quote/style.css +2 -2
- package/build-style/quote/theme-rtl.css +2 -2
- package/build-style/quote/theme.css +2 -2
- package/build-style/read-more/style-rtl.css +2 -2
- package/build-style/read-more/style.css +2 -2
- package/build-style/reset-rtl.css +2 -2
- package/build-style/reset.css +2 -2
- package/build-style/rss/editor-rtl.css +2 -2
- package/build-style/rss/editor.css +2 -2
- package/build-style/rss/style-rtl.css +2 -2
- package/build-style/rss/style.css +2 -2
- package/build-style/search/editor-rtl.css +5 -4
- package/build-style/search/editor.css +5 -4
- package/build-style/search/style-rtl.css +2 -2
- package/build-style/search/style.css +2 -2
- package/build-style/search/theme-rtl.css +2 -2
- package/build-style/search/theme.css +2 -2
- package/build-style/separator/editor-rtl.css +2 -2
- package/build-style/separator/editor.css +2 -2
- package/build-style/separator/style-rtl.css +2 -2
- package/build-style/separator/style.css +2 -2
- package/build-style/separator/theme-rtl.css +2 -2
- package/build-style/separator/theme.css +2 -2
- package/build-style/shortcode/editor-rtl.css +2 -2
- package/build-style/shortcode/editor.css +2 -2
- package/build-style/site-logo/editor-rtl.css +2 -2
- package/build-style/site-logo/editor.css +2 -2
- package/build-style/site-logo/style-rtl.css +2 -2
- package/build-style/site-logo/style.css +2 -2
- package/build-style/site-tagline/editor-rtl.css +2 -2
- package/build-style/site-tagline/editor.css +2 -2
- package/build-style/site-tagline/style-rtl.css +2 -2
- package/build-style/site-tagline/style.css +2 -2
- package/build-style/site-title/editor-rtl.css +2 -2
- package/build-style/site-title/editor.css +2 -2
- package/build-style/site-title/style-rtl.css +2 -2
- package/build-style/site-title/style.css +2 -2
- package/build-style/social-link/editor-rtl.css +2 -2
- package/build-style/social-link/editor.css +2 -2
- package/build-style/social-links/editor-rtl.css +2 -2
- package/build-style/social-links/editor.css +2 -2
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/spacer/editor-rtl.css +2 -2
- package/build-style/spacer/editor.css +2 -2
- package/build-style/spacer/style-rtl.css +2 -2
- package/build-style/spacer/style.css +2 -2
- package/build-style/style-rtl.css +53 -9
- package/build-style/style.css +53 -9
- package/build-style/table/editor-rtl.css +2 -2
- package/build-style/table/editor.css +2 -2
- package/build-style/table/style-rtl.css +2 -2
- package/build-style/table/style.css +2 -2
- package/build-style/table/theme-rtl.css +2 -2
- package/build-style/table/theme.css +2 -2
- package/build-style/table-of-contents/style-rtl.css +2 -2
- package/build-style/table-of-contents/style.css +2 -2
- package/build-style/tag-cloud/editor-rtl.css +9 -2
- package/build-style/tag-cloud/editor.css +9 -2
- package/build-style/tag-cloud/style-rtl.css +2 -2
- package/build-style/tag-cloud/style.css +2 -2
- package/build-style/template-part/editor-rtl.css +2 -6
- package/build-style/template-part/editor.css +2 -6
- package/build-style/template-part/theme-rtl.css +2 -2
- package/build-style/template-part/theme.css +2 -2
- package/build-style/term-description/style-rtl.css +2 -2
- package/build-style/term-description/style.css +2 -2
- package/build-style/text-columns/editor-rtl.css +2 -2
- package/build-style/text-columns/editor.css +2 -2
- package/build-style/text-columns/style-rtl.css +2 -2
- package/build-style/text-columns/style.css +2 -2
- package/build-style/theme-rtl.css +2 -2
- package/build-style/theme.css +2 -2
- package/build-style/verse/style-rtl.css +2 -2
- package/build-style/verse/style.css +2 -2
- package/build-style/video/editor-rtl.css +2 -2
- package/build-style/video/editor.css +2 -2
- package/build-style/video/style-rtl.css +2 -2
- package/build-style/video/style.css +2 -2
- package/build-style/video/theme-rtl.css +2 -2
- package/build-style/video/theme.css +2 -2
- package/package.json +35 -35
- package/src/archives/edit.js +1 -0
- package/src/audio/edit.js +4 -3
- package/src/avatar/user-control.js +1 -0
- package/src/button/edit.js +1 -0
- package/src/comment-author-name/block.json +14 -1
- package/src/comment-author-name/style.scss +4 -0
- package/src/comment-content/block.json +14 -1
- package/src/comment-content/style.scss +5 -0
- package/src/comment-date/block.json +14 -1
- package/src/comment-date/style.scss +4 -0
- package/src/comments-pagination/comments-pagination-arrow-controls.js +1 -0
- package/src/cover/edit/inspector-controls.js +0 -1
- package/src/editor.scss +1 -0
- package/src/embed/edit.js +10 -1
- package/src/embed/editor.scss +4 -0
- package/src/embed/embed-placeholder.js +7 -4
- package/src/embed/embed-preview.js +3 -37
- package/src/file/block.json +12 -0
- package/src/file/inspector.js +1 -0
- package/src/form/edit.js +2 -0
- package/src/form-input/edit.js +1 -0
- package/src/gallery/edit.js +5 -9
- package/src/gallery/editor.scss +1 -1
- package/src/gallery/gallery.native.js +2 -1
- package/src/gallery/style.scss +33 -7
- package/src/group/edit.js +1 -1
- package/src/image/image.js +7 -1
- package/src/image/transforms.js +7 -1
- package/src/latest-posts/edit.js +60 -17
- package/src/latest-posts/editor.scss +11 -6
- package/src/list/block.json +9 -0
- package/src/list-item/block.json +8 -1
- package/src/media-text/edit.js +0 -1
- package/src/missing/edit.js +12 -18
- package/src/navigation/edit/index.js +3 -3
- package/src/navigation/edit/navigation-menu-name-control.js +1 -0
- package/src/navigation/edit/overlay-menu-preview.js +2 -0
- package/src/navigation/editor.scss +5 -0
- package/src/navigation/index.php +10 -27
- package/src/navigation-link/editor.scss +0 -3
- package/src/post-author/block.json +13 -0
- package/src/post-author/edit.js +68 -57
- package/src/post-author/editor.scss +7 -0
- package/src/post-author/style.scss +1 -0
- package/src/post-author-biography/block.json +14 -1
- package/src/post-author-biography/style.scss +4 -0
- package/src/post-author-name/block.json +14 -1
- package/src/post-author-name/style.scss +4 -0
- package/src/post-comment/edit.js +2 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-featured-image/dimension-controls.js +5 -0
- package/src/post-featured-image/edit.js +1 -0
- package/src/post-navigation-link/edit.js +6 -2
- package/src/post-terms/edit.js +1 -0
- package/src/post-title/edit.js +1 -0
- package/src/preformatted/block.json +12 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/query-content.js +1 -1
- package/src/query-pagination/query-pagination-arrow-controls.js +1 -0
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/block.json +12 -0
- package/src/quote/block.json +1 -0
- package/src/quote/test/transforms.native.js +1 -1
- package/src/quote/transforms.js +11 -2
- package/src/search/edit.js +9 -9
- package/src/search/editor.scss +5 -2
- package/src/social-link/edit.js +2 -0
- package/src/style.scss +5 -0
- package/src/table/edit.js +5 -4
- package/src/tag-cloud/block.json +12 -0
- package/src/tag-cloud/edit.js +46 -34
- package/src/tag-cloud/editor.scss +11 -1
- package/src/template-part/edit/advanced-controls.js +2 -0
- package/src/template-part/editor.scss +0 -5
- package/src/video/edit-common-settings.js +1 -0
- package/src/video/edit.js +2 -2
- package/src/video/tracks-editor.js +3 -0
- package/src/video/transforms.js +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","NEW_TAB_TARGET","NOFOLLOW_REL","getUpdatedLinkAttributes","removeAnchorTag","unlock","__","useEffect","useState","useRef","useMemo","Button","ButtonGroup","PanelBody","TextControl","ToolbarButton","Popover","AlignmentControl","BlockControls","InspectorControls","RichText","useBlockProps","__experimentalUseBorderProps","useBorderProps","__experimentalUseColorProps","useColorProps","__experimentalGetSpacingClassesAndStyles","useSpacingProps","__experimentalGetShadowClassesAndStyles","useShadowProps","__experimentalLinkControl","LinkControl","__experimentalGetElementClassName","store","blockEditorStore","useBlockEditingMode","displayShortcut","isKeyboardEvent","ENTER","link","linkOff","createBlock","cloneBlock","getDefaultBlockName","blocksStore","useMergeRefs","useRefEffect","useSelect","useDispatch","jsxs","_jsxs","jsx","_jsx","Fragment","_Fragment","LINK_SETTINGS","DEFAULT_LINK_SETTINGS","id","title","useEnter","props","replaceBlocks","selectionChange","getBlock","getBlockRootClientId","getBlockIndex","propsRef","current","element","onKeyDown","event","defaultPrevented","keyCode","content","clientId","length","preventDefault","topParentListBlock","blockIndex","head","innerBlocks","slice","middle","after","tail","addEventListener","removeEventListener","WidthPanel","selectedWidth","setAttributes","handleChange","newWidth","width","undefined","children","map","widthValue","size","variant","onClick","ButtonEdit","attributes","className","isSelected","onReplace","mergeBlocks","context","tagName","textAlign","linkTarget","placeholder","rel","style","text","url","metadata","TagName","primary","startEditing","primaryShift","unlink","richTextRef","focus","popoverAnchor","setPopoverAnchor","borderProps","colorProps","spacingProps","shadowProps","ref","blockProps","blockEditingMode","isEditingURL","setIsEditingURL","isURLSet","opensInNewTab","nofollow","includes","isLinkTag","linkValue","useEnterRef","mergedRef","lockUrlControls","select","blockBindingsSource","getBlockBindingsSource","bindings","source","canUserEditValue","args","fontSize","value","onChange","withoutInteractiveFormatting","border","radius","onMerge","identifier","group","nextAlign","name","icon","shortcut","isActive","placement","onClose","anchor","focusOnMount","__unstableSlotName","shift","newURL","newOpensInNewTab","newNofollow","onRemove","forceIsEditingLink","settings","__nextHasNoMarginBottom","label","newRel"],"sources":["@wordpress/block-library/src/button/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\nimport { getUpdatedLinkAttributes } from './get-updated-link-attributes';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { unlock } from '../lock-unlock';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useState, useRef, useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tButtonGroup,\n\tPanelBody,\n\tTextControl,\n\tToolbarButton,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\t__experimentalLinkControl as LinkControl,\n\t__experimentalGetElementClassName,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';\nimport { link, linkOff } from '@wordpress/icons';\nimport {\n\tcreateBlock,\n\tcloneBlock,\n\tgetDefaultBlockName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst LINK_SETTINGS = [\n\t...LinkControl.DEFAULT_LINK_SETTINGS,\n\t{\n\t\tid: 'nofollow',\n\t\ttitle: __( 'Mark as nofollow' ),\n\t},\n];\n\nfunction useEnter( props ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst { getBlock, getBlockRootClientId, getBlockIndex } =\n\t\tuseSelect( blockEditorStore );\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented || event.keyCode !== ENTER ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { content, clientId } = propsRef.current;\n\t\t\tif ( content.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst topParentListBlock = getBlock(\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t\tconst blockIndex = getBlockIndex( clientId );\n\t\t\tconst head = cloneBlock( {\n\t\t\t\t...topParentListBlock,\n\t\t\t\tinnerBlocks: topParentListBlock.innerBlocks.slice(\n\t\t\t\t\t0,\n\t\t\t\t\tblockIndex\n\t\t\t\t),\n\t\t\t} );\n\t\t\tconst middle = createBlock( getDefaultBlockName() );\n\t\t\tconst after = topParentListBlock.innerBlocks.slice(\n\t\t\t\tblockIndex + 1\n\t\t\t);\n\t\t\tconst tail = after.length\n\t\t\t\t? [\n\t\t\t\t\t\tcloneBlock( {\n\t\t\t\t\t\t\t...topParentListBlock,\n\t\t\t\t\t\t\tinnerBlocks: after,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [];\n\t\t\treplaceBlocks(\n\t\t\t\ttopParentListBlock.clientId,\n\t\t\t\t[ head, middle, ...tail ],\n\t\t\t\t1\n\t\t\t);\n\t\t\t// We manually change the selection here because we are replacing\n\t\t\t// a different block than the selected one.\n\t\t\tselectionChange( middle.clientId );\n\t\t}\n\n\t\telement.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n\nfunction WidthPanel( { selectedWidth, setAttributes } ) {\n\tfunction handleChange( newWidth ) {\n\t\t// Check if we are toggling the width off\n\t\tconst width = selectedWidth === newWidth ? undefined : newWidth;\n\n\t\t// Update attributes.\n\t\tsetAttributes( { width } );\n\t}\n\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<ButtonGroup aria-label={ __( 'Button width' ) }>\n\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\twidthValue === selectedWidth\n\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => handleChange( widthValue ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ButtonGroup>\n\t\t</PanelBody>\n\t);\n}\n\nfunction ButtonEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tclassName,\n\t\tisSelected,\n\t\tonReplace,\n\t\tmergeBlocks,\n\t\tclientId,\n\t\tcontext,\n\t} = props;\n\tconst {\n\t\ttagName,\n\t\ttextAlign,\n\t\tlinkTarget,\n\t\tplaceholder,\n\t\trel,\n\t\tstyle,\n\t\ttext,\n\t\turl,\n\t\twidth,\n\t\tmetadata,\n\t} = attributes;\n\n\tconst TagName = tagName || 'a';\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tstartEditing( event );\n\t\t} else if ( isKeyboardEvent.primaryShift( event, 'k' ) ) {\n\t\t\tunlink();\n\t\t\trichTextRef.current?.focus();\n\t\t}\n\t}\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\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tconst spacingProps = useSpacingProps( attributes );\n\tconst shadowProps = useShadowProps( attributes );\n\tconst ref = useRef();\n\tconst richTextRef = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonKeyDown,\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst isURLSet = !! url;\n\tconst opensInNewTab = linkTarget === NEW_TAB_TARGET;\n\tconst nofollow = !! rel?.includes( NOFOLLOW_REL );\n\tconst isLinkTag = 'a' === TagName;\n\n\tfunction startEditing( event ) {\n\t\tevent.preventDefault();\n\t\tsetIsEditingURL( true );\n\t}\n\n\tfunction unlink() {\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlinkTarget: undefined,\n\t\t\trel: undefined,\n\t\t} );\n\t\tsetIsEditingURL( false );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingURL( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/51256.\n\tconst linkValue = useMemo(\n\t\t() => ( { url, opensInNewTab, nofollow } ),\n\t\t[ url, opensInNewTab, nofollow ]\n\t);\n\n\tconst useEnterRef = useEnter( { content: text, clientId } );\n\tconst mergedRef = useMergeRefs( [ useEnterRef, richTextRef ] );\n\n\tconst { lockUrlControls = false } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst blockBindingsSource = unlock(\n\t\t\t\tselect( blocksStore )\n\t\t\t).getBlockBindingsSource( metadata?.bindings?.url?.source );\n\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t},\n\t\t[ isSelected, metadata?.bindings?.url ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( blockProps.className, {\n\t\t\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]:\n\t\t\t\t\t\twidth,\n\t\t\t\t\t[ `has-custom-font-size` ]: blockProps.style.fontSize,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tref={ mergedRef }\n\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\tplaceholder={ placeholder || __( 'Add text…' ) }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttext: removeAnchorTag( value ),\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t\t\t// For backwards compatibility add style that isn't\n\t\t\t\t\t\t\t// provided via block support.\n\t\t\t\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t\t...spacingProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t} }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! isURLSet && isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ link }\n\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\tonClick={ startEditing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isURLSet && isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ linkOff }\n\t\t\t\t\t\ttitle={ __( 'Unlink' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift( 'k' ) }\n\t\t\t\t\t\tonClick={ unlink }\n\t\t\t\t\t\tisActive\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t\t{ isLinkTag &&\n\t\t\t\tisSelected &&\n\t\t\t\t( isEditingURL || isURLSet ) &&\n\t\t\t\t! lockUrlControls && (\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tplacement=\"bottom\"\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\t\tfocusOnMount={ isEditingURL ? 'firstElement' : false }\n\t\t\t\t\t\t__unstableSlotName=\"__unstable-block-tools-after\"\n\t\t\t\t\t\tshift\n\t\t\t\t\t>\n\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\tvalue={ linkValue }\n\t\t\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t} ) =>\n\t\t\t\t\t\t\t\tsetAttributes(\n\t\t\t\t\t\t\t\t\tgetUpdatedLinkAttributes( {\n\t\t\t\t\t\t\t\t\t\trel,\n\t\t\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\t\t\tnofollow: newNofollow,\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\tonRemove={ () => {\n\t\t\t\t\t\t\t\tunlink();\n\t\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tforceIsEditingLink={ isEditingURL }\n\t\t\t\t\t\t\tsettings={ LINK_SETTINGS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Popover>\n\t\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<WidthPanel\n\t\t\t\t\tselectedWidth={ width }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t{ isLinkTag && (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\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\nexport default ButtonEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAC1D,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,OAAOC,eAAe,MAAM,4BAA4B;AACxD,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,oBAAoB;AACzE,SACCC,MAAM,EACNC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,OAAO,QACD,uBAAuB;AAC9B,SACCC,gBAAgB,EAChBC,aAAa,EACbC,iBAAiB,EACjBC,QAAQ,EACRC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,2BAA2B,IAAIC,aAAa,EAC5CC,wCAAwC,IAAIC,eAAe,EAC3DC,uCAAuC,IAAIC,cAAc,EACzDC,yBAAyB,IAAIC,WAAW,EACxCC,iCAAiC,EACjCC,KAAK,IAAIC,gBAAgB,EACzBC,mBAAmB,QACb,yBAAyB;AAChC,SAASC,eAAe,EAAEC,eAAe,EAAEC,KAAK,QAAQ,qBAAqB;AAC7E,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,CACH,CACA;QACDC,QAAQ,EAAGA,CAAA,KAAM;UAChBrD,MAAM,CAAC,CAAC;UACRC,WAAW,CAACtD,OAAO,EAAEuD,KAAK,CAAC,CAAC;QAC7B,CAAG;QACHoD,kBAAkB,EAAG1C,YAAc;QACnC2C,QAAQ,EAAGxH;MAAe,CAC1B;IAAC,CACM,CACT,eACFH,IAAA,CAACjC,iBAAiB;MAAA2E,QAAA,eACjB1C,IAAA,CAACmC,UAAU;QACVC,aAAa,EAAGI,KAAO;QACvBH,aAAa,EAAGA;MAAe,CAC/B;IAAC,CACgB,CAAC,eACpBrC,IAAA,CAACjC,iBAAiB;MAAC2I,KAAK,EAAC,UAAU;MAAAhE,QAAA,EAChC4C,SAAS,iBACVtF,IAAA,CAACtC,WAAW;QACXkK,uBAAuB;QACvBC,KAAK,EAAG3K,EAAE,CAAE,UAAW,CAAG;QAC1BiJ,KAAK,EAAGxC,GAAG,IAAI,EAAI;QACnByC,QAAQ,EAAK0B,MAAM,IAClBzF,aAAa,CAAE;UAAEsB,GAAG,EAAEmE;QAAO,CAAE;MAC/B,CACD;IACD,CACiB,CAAC;EAAA,CACnB,CAAC;AAEL;AAEA,eAAe9E,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","NEW_TAB_TARGET","NOFOLLOW_REL","getUpdatedLinkAttributes","removeAnchorTag","unlock","__","useEffect","useState","useRef","useMemo","Button","ButtonGroup","PanelBody","TextControl","ToolbarButton","Popover","AlignmentControl","BlockControls","InspectorControls","RichText","useBlockProps","__experimentalUseBorderProps","useBorderProps","__experimentalUseColorProps","useColorProps","__experimentalGetSpacingClassesAndStyles","useSpacingProps","__experimentalGetShadowClassesAndStyles","useShadowProps","__experimentalLinkControl","LinkControl","__experimentalGetElementClassName","store","blockEditorStore","useBlockEditingMode","displayShortcut","isKeyboardEvent","ENTER","link","linkOff","createBlock","cloneBlock","getDefaultBlockName","blocksStore","useMergeRefs","useRefEffect","useSelect","useDispatch","jsxs","_jsxs","jsx","_jsx","Fragment","_Fragment","LINK_SETTINGS","DEFAULT_LINK_SETTINGS","id","title","useEnter","props","replaceBlocks","selectionChange","getBlock","getBlockRootClientId","getBlockIndex","propsRef","current","element","onKeyDown","event","defaultPrevented","keyCode","content","clientId","length","preventDefault","topParentListBlock","blockIndex","head","innerBlocks","slice","middle","after","tail","addEventListener","removeEventListener","WidthPanel","selectedWidth","setAttributes","handleChange","newWidth","width","undefined","children","map","widthValue","size","variant","onClick","ButtonEdit","attributes","className","isSelected","onReplace","mergeBlocks","context","tagName","textAlign","linkTarget","placeholder","rel","style","text","url","metadata","TagName","primary","startEditing","primaryShift","unlink","richTextRef","focus","popoverAnchor","setPopoverAnchor","borderProps","colorProps","spacingProps","shadowProps","ref","blockProps","blockEditingMode","isEditingURL","setIsEditingURL","isURLSet","opensInNewTab","nofollow","includes","isLinkTag","linkValue","useEnterRef","mergedRef","lockUrlControls","select","blockBindingsSource","getBlockBindingsSource","bindings","source","canUserEditValue","args","fontSize","value","onChange","withoutInteractiveFormatting","border","radius","onMerge","identifier","group","nextAlign","name","icon","shortcut","isActive","placement","onClose","anchor","focusOnMount","__unstableSlotName","shift","newURL","newOpensInNewTab","newNofollow","onRemove","forceIsEditingLink","settings","__next40pxDefaultSize","__nextHasNoMarginBottom","label","newRel"],"sources":["@wordpress/block-library/src/button/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\nimport { getUpdatedLinkAttributes } from './get-updated-link-attributes';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { unlock } from '../lock-unlock';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useState, useRef, useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tButtonGroup,\n\tPanelBody,\n\tTextControl,\n\tToolbarButton,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\t__experimentalLinkControl as LinkControl,\n\t__experimentalGetElementClassName,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';\nimport { link, linkOff } from '@wordpress/icons';\nimport {\n\tcreateBlock,\n\tcloneBlock,\n\tgetDefaultBlockName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst LINK_SETTINGS = [\n\t...LinkControl.DEFAULT_LINK_SETTINGS,\n\t{\n\t\tid: 'nofollow',\n\t\ttitle: __( 'Mark as nofollow' ),\n\t},\n];\n\nfunction useEnter( props ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst { getBlock, getBlockRootClientId, getBlockIndex } =\n\t\tuseSelect( blockEditorStore );\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented || event.keyCode !== ENTER ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { content, clientId } = propsRef.current;\n\t\t\tif ( content.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst topParentListBlock = getBlock(\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t\tconst blockIndex = getBlockIndex( clientId );\n\t\t\tconst head = cloneBlock( {\n\t\t\t\t...topParentListBlock,\n\t\t\t\tinnerBlocks: topParentListBlock.innerBlocks.slice(\n\t\t\t\t\t0,\n\t\t\t\t\tblockIndex\n\t\t\t\t),\n\t\t\t} );\n\t\t\tconst middle = createBlock( getDefaultBlockName() );\n\t\t\tconst after = topParentListBlock.innerBlocks.slice(\n\t\t\t\tblockIndex + 1\n\t\t\t);\n\t\t\tconst tail = after.length\n\t\t\t\t? [\n\t\t\t\t\t\tcloneBlock( {\n\t\t\t\t\t\t\t...topParentListBlock,\n\t\t\t\t\t\t\tinnerBlocks: after,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [];\n\t\t\treplaceBlocks(\n\t\t\t\ttopParentListBlock.clientId,\n\t\t\t\t[ head, middle, ...tail ],\n\t\t\t\t1\n\t\t\t);\n\t\t\t// We manually change the selection here because we are replacing\n\t\t\t// a different block than the selected one.\n\t\t\tselectionChange( middle.clientId );\n\t\t}\n\n\t\telement.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n\nfunction WidthPanel( { selectedWidth, setAttributes } ) {\n\tfunction handleChange( newWidth ) {\n\t\t// Check if we are toggling the width off\n\t\tconst width = selectedWidth === newWidth ? undefined : newWidth;\n\n\t\t// Update attributes.\n\t\tsetAttributes( { width } );\n\t}\n\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<ButtonGroup aria-label={ __( 'Button width' ) }>\n\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\twidthValue === selectedWidth\n\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => handleChange( widthValue ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ButtonGroup>\n\t\t</PanelBody>\n\t);\n}\n\nfunction ButtonEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tclassName,\n\t\tisSelected,\n\t\tonReplace,\n\t\tmergeBlocks,\n\t\tclientId,\n\t\tcontext,\n\t} = props;\n\tconst {\n\t\ttagName,\n\t\ttextAlign,\n\t\tlinkTarget,\n\t\tplaceholder,\n\t\trel,\n\t\tstyle,\n\t\ttext,\n\t\turl,\n\t\twidth,\n\t\tmetadata,\n\t} = attributes;\n\n\tconst TagName = tagName || 'a';\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tstartEditing( event );\n\t\t} else if ( isKeyboardEvent.primaryShift( event, 'k' ) ) {\n\t\t\tunlink();\n\t\t\trichTextRef.current?.focus();\n\t\t}\n\t}\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\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tconst spacingProps = useSpacingProps( attributes );\n\tconst shadowProps = useShadowProps( attributes );\n\tconst ref = useRef();\n\tconst richTextRef = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonKeyDown,\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst isURLSet = !! url;\n\tconst opensInNewTab = linkTarget === NEW_TAB_TARGET;\n\tconst nofollow = !! rel?.includes( NOFOLLOW_REL );\n\tconst isLinkTag = 'a' === TagName;\n\n\tfunction startEditing( event ) {\n\t\tevent.preventDefault();\n\t\tsetIsEditingURL( true );\n\t}\n\n\tfunction unlink() {\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlinkTarget: undefined,\n\t\t\trel: undefined,\n\t\t} );\n\t\tsetIsEditingURL( false );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingURL( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/51256.\n\tconst linkValue = useMemo(\n\t\t() => ( { url, opensInNewTab, nofollow } ),\n\t\t[ url, opensInNewTab, nofollow ]\n\t);\n\n\tconst useEnterRef = useEnter( { content: text, clientId } );\n\tconst mergedRef = useMergeRefs( [ useEnterRef, richTextRef ] );\n\n\tconst { lockUrlControls = false } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst blockBindingsSource = unlock(\n\t\t\t\tselect( blocksStore )\n\t\t\t).getBlockBindingsSource( metadata?.bindings?.url?.source );\n\n\t\t\treturn {\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t},\n\t\t[ isSelected, metadata?.bindings?.url ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx( blockProps.className, {\n\t\t\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]:\n\t\t\t\t\t\twidth,\n\t\t\t\t\t[ `has-custom-font-size` ]: blockProps.style.fontSize,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tref={ mergedRef }\n\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\tplaceholder={ placeholder || __( 'Add text…' ) }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttext: removeAnchorTag( value ),\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t\t\t// For backwards compatibility add style that isn't\n\t\t\t\t\t\t\t// provided via block support.\n\t\t\t\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t\t...spacingProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t} }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t\t<AlignmentControl\n\t\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! isURLSet && isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ link }\n\t\t\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\tonClick={ startEditing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isURLSet && isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\ticon={ linkOff }\n\t\t\t\t\t\ttitle={ __( 'Unlink' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift( 'k' ) }\n\t\t\t\t\t\tonClick={ unlink }\n\t\t\t\t\t\tisActive\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t\t{ isLinkTag &&\n\t\t\t\tisSelected &&\n\t\t\t\t( isEditingURL || isURLSet ) &&\n\t\t\t\t! lockUrlControls && (\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tplacement=\"bottom\"\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\t\tfocusOnMount={ isEditingURL ? 'firstElement' : false }\n\t\t\t\t\t\t__unstableSlotName=\"__unstable-block-tools-after\"\n\t\t\t\t\t\tshift\n\t\t\t\t\t>\n\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\tvalue={ linkValue }\n\t\t\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t} ) =>\n\t\t\t\t\t\t\t\tsetAttributes(\n\t\t\t\t\t\t\t\t\tgetUpdatedLinkAttributes( {\n\t\t\t\t\t\t\t\t\t\trel,\n\t\t\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\t\t\tnofollow: newNofollow,\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\tonRemove={ () => {\n\t\t\t\t\t\t\t\tunlink();\n\t\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tforceIsEditingLink={ isEditingURL }\n\t\t\t\t\t\t\tsettings={ LINK_SETTINGS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Popover>\n\t\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<WidthPanel\n\t\t\t\t\tselectedWidth={ width }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t{ isLinkTag && (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\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\nexport default ButtonEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAC1D,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,OAAOC,eAAe,MAAM,4BAA4B;AACxD,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,oBAAoB;AACzE,SACCC,MAAM,EACNC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,aAAa,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
62
|
clientNavigation: true
|
|
63
|
+
},
|
|
64
|
+
__experimentalBorder: {
|
|
65
|
+
radius: true,
|
|
66
|
+
color: true,
|
|
67
|
+
width: true,
|
|
68
|
+
style: true,
|
|
69
|
+
__experimentalDefaultControls: {
|
|
70
|
+
radius: true,
|
|
71
|
+
color: true,
|
|
72
|
+
width: true,
|
|
73
|
+
style: true
|
|
74
|
+
}
|
|
63
75
|
}
|
|
64
|
-
}
|
|
76
|
+
},
|
|
77
|
+
style: "wp-block-comment-author-name"
|
|
65
78
|
};
|
|
66
79
|
import edit from './edit';
|
|
67
80
|
import deprecated from './deprecated';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["commentAuthorName","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","isLink","type","linkTarget","textAlign","usesContext","supports","html","spacing","margin","padding","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","edit","deprecated","settings","init"],"sources":["@wordpress/block-library/src/comment-author-name/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,IAAIC,IAAI,QAAQ,kBAAkB;;AAE5D;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,MAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,UAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,SAAA;MAAAF,IAAA;IAAA;EAAA;EAAAG,WAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAX,6BAAA;QAAAI,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;
|
|
1
|
+
{"version":3,"names":["commentAuthorName","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","isLink","type","linkTarget","textAlign","usesContext","supports","html","spacing","margin","padding","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","__experimentalBorder","radius","width","style","edit","deprecated","settings","init"],"sources":["@wordpress/block-library/src/comment-author-name/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings }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;EAAEI,IAAI;EAAEH,QAAQ;EAAE2C;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -44,6 +44,18 @@ const metadata = {
|
|
|
44
44
|
fontSize: true
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
+
__experimentalBorder: {
|
|
48
|
+
radius: true,
|
|
49
|
+
color: true,
|
|
50
|
+
width: true,
|
|
51
|
+
style: true,
|
|
52
|
+
__experimentalDefaultControls: {
|
|
53
|
+
radius: true,
|
|
54
|
+
color: true,
|
|
55
|
+
width: true,
|
|
56
|
+
style: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
47
59
|
spacing: {
|
|
48
60
|
padding: ["horizontal", "vertical"],
|
|
49
61
|
__experimentalDefaultControls: {
|
|
@@ -51,7 +63,8 @@ const metadata = {
|
|
|
51
63
|
}
|
|
52
64
|
},
|
|
53
65
|
html: false
|
|
54
|
-
}
|
|
66
|
+
},
|
|
67
|
+
style: "wp-block-comment-content"
|
|
55
68
|
};
|
|
56
69
|
import edit from './edit';
|
|
57
70
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["commentContent","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","supports","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","spacing","padding","html","edit","settings","init"],"sources":["@wordpress/block-library/src/comment-content/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAAI,QAAQ,kBAAkB;;AAEzD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,UAAA;IAAAC,SAAA;MAAAC,IAAA;IAAA;EAAA;EAAAC,QAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAX,6BAAA;QAAAI,QAAA;MAAA;IAAA;IAAAQ,OAAA;MAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["commentContent","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","supports","color","gradients","link","__experimentalDefaultControls","background","text","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalBorder","radius","width","style","spacing","padding","html","edit","settings","init"],"sources":["@wordpress/block-library/src/comment-content/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAAI,QAAQ,kBAAkB;;AAEzD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,UAAA;IAAAC,SAAA;MAAAC,IAAA;IAAA;EAAA;EAAAC,QAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAX,6BAAA;QAAAI,QAAA;MAAA;IAAA;IAAAQ,oBAAA;MAAAC,MAAA;MAAAhB,KAAA;MAAAiB,KAAA;MAAAC,KAAA;MAAAf,6BAAA;QAAAa,MAAA;QAAAhB,KAAA;QAAAiB,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAjB,6BAAA;QAAAiB,OAAA;MAAA;IAAA;IAAAC,IAAA;EAAA;EAAAH,KAAA;AAAA;AAE5C,OAAOI,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAEjC;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMkC,QAAQ,GAAG;EACvBvC,IAAI;EACJsC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAMvC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEqC;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -56,8 +56,21 @@ const metadata = {
|
|
|
56
56
|
},
|
|
57
57
|
interactivity: {
|
|
58
58
|
clientNavigation: true
|
|
59
|
+
},
|
|
60
|
+
__experimentalBorder: {
|
|
61
|
+
radius: true,
|
|
62
|
+
color: true,
|
|
63
|
+
width: true,
|
|
64
|
+
style: true,
|
|
65
|
+
__experimentalDefaultControls: {
|
|
66
|
+
radius: true,
|
|
67
|
+
color: true,
|
|
68
|
+
width: true,
|
|
69
|
+
style: true
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
|
-
}
|
|
72
|
+
},
|
|
73
|
+
style: "wp-block-comment-date"
|
|
61
74
|
};
|
|
62
75
|
import edit from './edit';
|
|
63
76
|
import deprecated from './deprecated';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["postDate","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","format","type","isLink","usesContext","supports","html","color","gradients","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","edit","deprecated","settings","init"],"sources":["@wordpress/block-library/src/comment-date/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,IAAIC,IAAI,QAAQ,kBAAkB;;AAEnD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,MAAA;MAAAC,IAAA;IAAA;IAAAC,MAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,WAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;
|
|
1
|
+
{"version":3,"names":["postDate","icon","initBlock","metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","format","type","isLink","usesContext","supports","html","color","gradients","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","__experimentalBorder","radius","width","style","edit","deprecated","settings","init"],"sources":["@wordpress/block-library/src/comment-date/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,IAAIC,IAAI,QAAQ,kBAAkB;;AAEnD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,MAAA;MAAAC,IAAA;IAAA;IAAAC,MAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,WAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAArB,KAAA;MAAAsB,KAAA;MAAAC,KAAA;MAAApB,6BAAA;QAAAkB,MAAA;QAAArB,KAAA;QAAAsB,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAA,KAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAEtC;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMuC,QAAQ,GAAG;EACvB5C,IAAI;EACJ0C,IAAI;EACJC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAM5C,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAE0C;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","jsx","_jsx","jsxs","_jsxs","CommentsPaginationArrowControls","value","onChange","__nextHasNoMarginBottom","label","help","isBlock","children"],"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,QAC5D,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE/B,OAAO,SAASC,+BAA+BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACtE,oBACCH,KAAA,CAACN,kBAAkB;IAClBU,uBAAuB;IACvBC,KAAK,
|
|
1
|
+
{"version":3,"names":["__","_x","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","jsx","_jsx","jsxs","_jsxs","CommentsPaginationArrowControls","value","onChange","__next40pxDefaultSize","__nextHasNoMarginBottom","label","help","isBlock","children"],"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,QAC5D,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE/B,OAAO,SAASC,+BAA+BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACtE,oBACCH,KAAA,CAACN,kBAAkB;IAClBU,qBAAqB;IACrBC,uBAAuB;IACvBC,KAAK,EAAGf,EAAE,CAAE,OAAQ,CAAG;IACvBW,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBI,IAAI,EAAGhB,EAAE,CACR,qEACD,CAAG;IACHiB,OAAO;IAAAC,QAAA,gBAEPX,IAAA,CAACF,wBAAwB;MACxBM,KAAK,EAAC,MAAM;MACZI,KAAK,EAAGd,EAAE,CACT,MAAM,EACN,2DACD;IAAG,CACH,CAAC,eACFM,IAAA,CAACF,wBAAwB;MACxBM,KAAK,EAAC,OAAO;MACbI,KAAK,EAAGd,EAAE,CACT,OAAO,EACP,2DACD;IAAG,CACH,CAAC,eACFM,IAAA,CAACF,wBAAwB;MACxBM,KAAK,EAAC,SAAS;MACfI,KAAK,EAAGd,EAAE,CACT,SAAS,EACT,2DACD;IAAG,CACH,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
|
|
@@ -140,7 +140,6 @@ export default function CoverInspectorControls({
|
|
|
140
140
|
})]
|
|
141
141
|
}), showFocalPointPicker && /*#__PURE__*/_jsx(FocalPointPicker, {
|
|
142
142
|
__nextHasNoMarginBottom: true,
|
|
143
|
-
__next40pxDefaultSize: true,
|
|
144
143
|
label: __('Focal point'),
|
|
145
144
|
url: url,
|
|
146
145
|
value: focalPoint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","Button","ExternalLink","FocalPointPicker","PanelBody","PanelRow","RangeControl","TextareaControl","ToggleControl","SelectControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","privateApis","blockEditorPrivateApis","__","COVER_MIN_HEIGHT","mediaPosition","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","cleanEmptyObject","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","label","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","htmlElementMessages","header","main","section","article","aside","footer","children","title","__nextHasNoMarginBottom","checked","__next40pxDefaultSize","onDragStart","onDrag","newFocalPoint","newAlt","help","href","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","hasValue","onDeselect","newDimRatio","max","step","required","dimensions","aspectRatio","newMinHeight","nextUnit","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth=\"80px\"\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\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\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\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={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\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\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,8CAA8C,IAAIC,gCAAgC,QAC5E,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,iBAAiB,EACjBC,WAAW,EACXC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,EACxFC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,WAAW;AAC3D,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAA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QACF,CACD;MAAC,CACa;IAAC,CACC,CAAC,eACpBpH,IAAA,CAACd,iBAAiB;MAAC2G,KAAK,EAAC,UAAU;MAAAhB,QAAA,eAClC7E,IAAA,CAACxB,aAAa;QACbuG,uBAAuB;QACvBE,qBAAqB;QACrBjD,KAAK,EAAGrC,EAAE,CAAE,cAAe,CAAG;QAC9B0H,OAAO,EAAG,CACT;UAAErF,KAAK,EAAErC,EAAE,CAAE,iBAAkB,CAAC;UAAEe,KAAK,EAAE;QAAM,CAAC,EAChD;UAAEsB,KAAK,EAAE,UAAU;UAAEtB,KAAK,EAAE;QAAS,CAAC,EACtC;UAAEsB,KAAK,EAAE,QAAQ;UAAEtB,KAAK,EAAE;QAAO,CAAC,EAClC;UAAEsB,KAAK,EAAE,WAAW;UAAEtB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEsB,KAAK,EAAE,WAAW;UAAEtB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEsB,KAAK,EAAE,SAAS;UAAEtB,KAAK,EAAE;QAAQ,CAAC,EACpC;UAAEsB,KAAK,EAAE,UAAU;UAAEtB,KAAK,EAAE;QAAS,CAAC,CACpC;QACHA,KAAK,EAAG2C,OAAS;QACjB9C,QAAQ,EAAKG,KAAK,IACjB4B,aAAa,CAAE;UAAEe,OAAO,EAAE3C;QAAM,CAAE,CAClC;QACD4E,IAAI,EAAGhB,mBAAmB,CAAEjB,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useMemo","Button","ExternalLink","FocalPointPicker","PanelBody","PanelRow","RangeControl","TextareaControl","ToggleControl","SelectControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","privateApis","blockEditorPrivateApis","__","COVER_MIN_HEIGHT","mediaPosition","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","cleanEmptyObject","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","label","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","htmlElementMessages","header","main","section","article","aside","footer","children","title","__nextHasNoMarginBottom","checked","onDragStart","onDrag","newFocalPoint","newAlt","help","href","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","hasValue","onDeselect","newDimRatio","max","step","required","__next40pxDefaultSize","dimensions","aspectRatio","newMinHeight","nextUnit","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth=\"80px\"\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\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\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\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={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\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\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,8CAA8C,IAAIC,gCAAgC,QAC5E,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,iBAAiB,EACjBC,WAAW,EACXC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,EACxFC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,WAAW;AAC3D,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAiB,CAAC,GAAGP,MAAM,CAAEJ,sBAAuB,CAAC;AAE7D,SAASY,gBAAgBA,CAAE;EAC1BC,QAAQ;EACRC,YAAY;EACZC,IAAI,GAAG,IAAI;EACXC,KAAK,GAAG;AACT,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG1B,aAAa,CAAEH,WAAY,CAAC;EAC/C,MAAM8B,OAAO,GAAI,4BAA4BD,UAAY,E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AAC,EAChD;UAAEsB,KAAK,EAAE,UAAU;UAAEtB,KAAK,EAAE;QAAS,CAAC,EACtC;UAAEsB,KAAK,EAAE,QAAQ;UAAEtB,KAAK,EAAE;QAAO,CAAC,EAClC;UAAEsB,KAAK,EAAE,WAAW;UAAEtB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEsB,KAAK,EAAE,WAAW;UAAEtB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEsB,KAAK,EAAE,SAAS;UAAEtB,KAAK,EAAE;QAAQ,CAAC,EACpC;UAAEsB,KAAK,EAAE,UAAU;UAAEtB,KAAK,EAAE;QAAS,CAAC,CACpC;QACHA,KAAK,EAAG2C,OAAS;QACjB9C,QAAQ,EAAKG,KAAK,IACjB4B,aAAa,CAAE;UAAEe,OAAO,EAAE3C;QAAM,CAAE,CAClC;QACD2E,IAAI,EAAGf,mBAAmB,CAAEjB,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ import { embedContentIcon } from './icons';
|
|
|
7
7
|
import EmbedLoading from './embed-loading';
|
|
8
8
|
import EmbedPlaceholder from './embed-placeholder';
|
|
9
9
|
import EmbedPreview from './embed-preview';
|
|
10
|
+
import { Caption } from '../utils/caption';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* External dependencies
|
|
@@ -24,8 +25,8 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
24
25
|
import { View } from '@wordpress/primitives';
|
|
25
26
|
import { getAuthority } from '@wordpress/url';
|
|
26
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
28
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
30
|
const EmbedEdit = props => {
|
|
30
31
|
const {
|
|
31
32
|
attributes: {
|
|
@@ -195,7 +196,7 @@ const EmbedEdit = props => {
|
|
|
195
196
|
},
|
|
196
197
|
value: url,
|
|
197
198
|
cannotEmbed: cannotEmbed,
|
|
198
|
-
onChange:
|
|
199
|
+
onChange: value => setURL(value),
|
|
199
200
|
fallback: () => fallback(url, onReplace),
|
|
200
201
|
tryAgain: () => {
|
|
201
202
|
invalidateResolution('getEmbedPreview', [url]);
|
|
@@ -227,9 +228,9 @@ const EmbedEdit = props => {
|
|
|
227
228
|
allowResponsive: allowResponsive,
|
|
228
229
|
toggleResponsive: toggleResponsive,
|
|
229
230
|
switchBackToURLInput: () => setIsEditingURL(true)
|
|
230
|
-
}), /*#__PURE__*/
|
|
231
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
231
232
|
...blockProps,
|
|
232
|
-
children: /*#__PURE__*/_jsx(EmbedPreview, {
|
|
233
|
+
children: [/*#__PURE__*/_jsx(EmbedPreview, {
|
|
233
234
|
preview: preview,
|
|
234
235
|
previewable: previewable,
|
|
235
236
|
className: className,
|
|
@@ -243,7 +244,14 @@ const EmbedEdit = props => {
|
|
|
243
244
|
icon: icon,
|
|
244
245
|
label: label,
|
|
245
246
|
insertBlocksAfter: insertBlocksAfter
|
|
246
|
-
})
|
|
247
|
+
}), /*#__PURE__*/_jsx(Caption, {
|
|
248
|
+
attributes: attributes,
|
|
249
|
+
setAttributes: setAttributes,
|
|
250
|
+
isSelected: isSelected,
|
|
251
|
+
insertBlocksAfter: insertBlocksAfter,
|
|
252
|
+
label: __('Embed caption text'),
|
|
253
|
+
showToolbarButton: isSelected
|
|
254
|
+
})]
|
|
247
255
|
})]
|
|
248
256
|
});
|
|
249
257
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","clsx","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","blockProps","children","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","target","tryAgain","caption","classFromPreview","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( event ) => setURL( event.target.value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,YAAY,MAAM,iBAAiB;;AAE1C;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE9C,MAAMC,SAAS,GAAKC,KAAK,IAAM;EAC9B,MAAM;IACLC,UAAU,EAAE;MACXC,gBAAgB;MAChBC,WAAW;MACXC,UAAU;MACVC,GAAG,EAAEC;IACN,CAAC;IACDL,UAAU;IACVM,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC;EACD,CAAC,GAAGX,KAAK;EAET,MAAMY,gBAAgB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,uBAAyB;MACnD8C,uBAAuB,EAAG/D,UAAY;MACtCsC,eAAe,EAAGA,eAAiB;MACnCD,gBAAgB,EAAGA,gBAAkB;MACrC2B,oBAAoB,EAAGA,CAAA,KAAMnD,eAAe,CAAE,IAAK;IAAG,CACtD,CAAC,eACFvB,IAAA,CAACH,IAAI;MAAA,GAAM6D,UAAU;MAAAC,QAAA,eACpB3D,IAAA,CAACf,YAAY;QACZwC,OAAO,EAAGA,OAAS;QACnBhB,WAAW,EAAGA,WAAa;QAC3BwC,SAAS,EAAGA,SAAW;QACvBtC,GAAG,EAAGA,GAAK;QACX6B,IAAI,EAAGA,IAAM;QACb8B,OAAO,EAAGA,OAAS;QACnBK,eAAe,EAAKT,KAAK,IACxBnD,aAAa,CAAE;UAAEuD,OAAO,EAAEJ;QAAM,CAAE,CAClC;QACDrD,UAAU,EAAGA,UAAY;QACzBO,IAAI,EAAGA,IAAM;QACbwC,KAAK,EAAGA,KAAO;QACf5C,iBAAiB,EAAGA;MAAmB,CACvC;IAAC,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeX,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","Caption","clsx","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","blockProps","children","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","tryAgain","caption","classFromPreview","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","showToolbarButton"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\nimport { Caption } from '../utils/caption';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( value ) => setURL( value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t/>\n\t\t\t\t<Caption\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n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AAiB;MACnCD,gBAAgB,EAAGA,gBAAkB;MACrC0B,oBAAoB,EAAGA,CAAA,KAAMlD,eAAe,CAAE,IAAK;IAAG,CACtD,CAAC,eACFrB,KAAA,CAACL,IAAI;MAAA,GAAM6D,UAAU;MAAAC,QAAA,gBACpB3D,IAAA,CAAChB,YAAY;QACZyC,OAAO,EAAGA,OAAS;QACnBhB,WAAW,EAAGA,WAAa;QAC3BwC,SAAS,EAAGA,SAAW;QACvBtC,GAAG,EAAGA,GAAK;QACX6B,IAAI,EAAGA,IAAM;QACb6B,OAAO,EAAGA,OAAS;QACnBK,eAAe,EAAKR,KAAK,IACxBnD,aAAa,CAAE;UAAEsD,OAAO,EAAEH;QAAM,CAAE,CAClC;QACDrD,UAAU,EAAGA,UAAY;QACzBO,IAAI,EAAGA,IAAM;QACbwC,KAAK,EAAGA,KAAO;QACf5C,iBAAiB,EAAGA;MAAmB,CACvC,CAAC,eACFhB,IAAA,CAACf,OAAO;QACPsB,UAAU,EAAGA,UAAY;QACzBQ,aAAa,EAAGA,aAAe;QAC/BF,UAAU,EAAGA,UAAY;QACzBG,iBAAiB,EAAGA,iBAAmB;QACvC4C,KAAK,EAAGzE,EAAE,CAAE,oBAAqB,CAAG;QACpCwF,iBAAiB,EAAG9D;MAAY,CAChC,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeR,SAAS","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __, _x } from '@wordpress/i18n';
|
|
5
|
-
import { Button, Placeholder, ExternalLink, __experimentalHStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
|
|
5
|
+
import { Button, Placeholder, ExternalLink, __experimentalHStack as HStack, __experimentalVStack as VStack, __experimentalInputControl as InputControl } from '@wordpress/components';
|
|
6
6
|
import { BlockIcon } from '@wordpress/block-editor';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -26,14 +26,17 @@ const EmbedPlaceholder = ({
|
|
|
26
26
|
instructions: __('Paste a link to the content you want to display on your site.'),
|
|
27
27
|
children: [/*#__PURE__*/_jsxs("form", {
|
|
28
28
|
onSubmit: onSubmit,
|
|
29
|
-
children: [/*#__PURE__*/_jsx(
|
|
29
|
+
children: [/*#__PURE__*/_jsx(InputControl, {
|
|
30
|
+
__next40pxDefaultSize: true,
|
|
30
31
|
type: "url",
|
|
31
32
|
value: value || '',
|
|
32
|
-
className: "
|
|
33
|
-
|
|
33
|
+
className: "wp-block-embed__placeholder-input",
|
|
34
|
+
label: label,
|
|
35
|
+
hideLabelFromVision: true,
|
|
34
36
|
placeholder: __('Enter URL to embed here…'),
|
|
35
37
|
onChange: onChange
|
|
36
38
|
}), /*#__PURE__*/_jsx(Button, {
|
|
39
|
+
__next40pxDefaultSize: true,
|
|
37
40
|
variant: "primary",
|
|
38
41
|
type: "submit",
|
|
39
42
|
children: _x('Embed', 'button label')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","Button","Placeholder","ExternalLink","__experimentalHStack","HStack","__experimentalVStack","VStack","BlockIcon","jsx","_jsx","jsxs","_jsxs","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","showColors","className","instructions","children","type","placeholder","variant","href","spacing","expanded","justify","onClick"],"sources":["@wordpress/block-library/src/embed/embed-placeholder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tButton,\n\tPlaceholder,\n\tExternalLink,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\n\nconst EmbedPlaceholder = ( {\n\ticon,\n\tlabel,\n\tvalue,\n\tonSubmit,\n\tonChange,\n\tcannotEmbed,\n\tfallback,\n\ttryAgain,\n} ) => {\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\tlabel={ label }\n\t\t\tclassName=\"wp-block-embed\"\n\t\t\tinstructions={ __(\n\t\t\t\t'Paste a link to the content you want to display on your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<form onSubmit={ onSubmit }>\n\t\t\t\t<
|
|
1
|
+
{"version":3,"names":["__","_x","Button","Placeholder","ExternalLink","__experimentalHStack","HStack","__experimentalVStack","VStack","__experimentalInputControl","InputControl","BlockIcon","jsx","_jsx","jsxs","_jsxs","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","showColors","className","instructions","children","__next40pxDefaultSize","type","hideLabelFromVision","placeholder","variant","href","spacing","expanded","justify","onClick"],"sources":["@wordpress/block-library/src/embed/embed-placeholder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tButton,\n\tPlaceholder,\n\tExternalLink,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalInputControl as InputControl,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\n\nconst EmbedPlaceholder = ( {\n\ticon,\n\tlabel,\n\tvalue,\n\tonSubmit,\n\tonChange,\n\tcannotEmbed,\n\tfallback,\n\ttryAgain,\n} ) => {\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\tlabel={ label }\n\t\t\tclassName=\"wp-block-embed\"\n\t\t\tinstructions={ __(\n\t\t\t\t'Paste a link to the content you want to display on your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<form onSubmit={ onSubmit }>\n\t\t\t\t<InputControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\ttype=\"url\"\n\t\t\t\t\tvalue={ value || '' }\n\t\t\t\t\tclassName=\"wp-block-embed__placeholder-input\"\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tplaceholder={ __( 'Enter URL to embed here…' ) }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t\t<Button __next40pxDefaultSize variant=\"primary\" type=\"submit\">\n\t\t\t\t\t{ _x( 'Embed', 'button label' ) }\n\t\t\t\t</Button>\n\t\t\t</form>\n\t\t\t<div className=\"wp-block-embed__learn-more\">\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/embeds/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about embeds' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t</div>\n\t\t\t{ cannotEmbed && (\n\t\t\t\t<VStack spacing={ 3 } className=\"components-placeholder__error\">\n\t\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ __( 'Sorry, this content could not be embedded.' ) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={ tryAgain }>\n\t\t\t\t\t\t\t{ _x( 'Try again', 'button label' ) }\n\t\t\t\t\t\t</Button>{ ' ' }\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={ fallback }>\n\t\t\t\t\t\t\t{ _x( 'Convert to link', 'button label' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n};\n\nexport default EmbedPlaceholder;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,MAAM,EACNC,WAAW,EACXC,YAAY,EACZC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,0BAA0B,IA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