@wordpress/block-library 9.23.0 → 9.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/button/edit.js +29 -17
- package/build/button/edit.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/columns/edit.js +18 -22
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +41 -12
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +41 -12
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +27 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +23 -9
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-title/edit.js +41 -12
- package/build/comments-title/edit.js.map +1 -1
- package/build/details/edit.js +27 -3
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/embed/edit.js +2 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-controls.js +41 -22
- package/build/embed/embed-controls.js.map +1 -1
- package/build/file/inspector.js +73 -30
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +67 -37
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +47 -18
- package/build/form-input/edit.js.map +1 -1
- package/build/html/index.js +2 -1
- package/build/html/index.js.map +1 -1
- package/build/image/constants.js +2 -1
- package/build/image/constants.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -4
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.js +154 -82
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +131 -52
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +93 -51
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +43 -27
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation-link/index.js +3 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +2 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +1 -0
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/index.js +3 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +3 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-count/transforms.js +26 -0
- package/build/post-comments-count/transforms.js.map +1 -0
- package/build/post-comments-link/index.js +3 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-comments-link/transforms.js +26 -0
- package/build/post-comments-link/transforms.js.map +1 -0
- package/build/post-excerpt/edit.js +3 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +2 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +3 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +2 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +13 -13
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +5 -3
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +4 -2
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +56 -18
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +1 -1
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +120 -46
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +2 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +76 -86
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +52 -20
- package/build/separator/edit.js.map +1 -1
- package/build/shortcode/index.js +2 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/social-link/variations.js +53 -48
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +35 -45
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +3 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +8 -4
- package/build/table/index.js.map +1 -1
- package/build/video/tracks-editor.js +40 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/edit.js +30 -18
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/columns/edit.js +18 -22
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +42 -13
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +42 -13
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +28 -8
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -3
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +24 -10
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +42 -13
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/details/edit.js +29 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/embed/edit.js +2 -4
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-controls.js +42 -23
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/file/inspector.js +74 -31
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +68 -38
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +48 -19
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/html/index.js +2 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/constants.js +1 -0
- package/build-module/image/constants.js.map +1 -1
- package/build-module/image/edit.js +2 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +2 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.js +155 -83
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +132 -53
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +94 -52
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation-link/index.js +3 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +2 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +1 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/index.js +3 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-count/transforms.js +19 -0
- package/build-module/post-comments-count/transforms.js.map +1 -0
- package/build-module/post-comments-link/index.js +3 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-comments-link/transforms.js +19 -0
- package/build-module/post-comments-link/transforms.js.map +1 -0
- package/build-module/post-excerpt/edit.js +4 -2
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +2 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +4 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +2 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +13 -13
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +5 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +4 -2
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +57 -19
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +5 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/read-more/index.js +2 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +121 -47
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +2 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +78 -88
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +54 -22
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/index.js +2 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/social-link/variations.js +53 -48
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +37 -47
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +4 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +8 -4
- package/build-module/table/index.js.map +1 -1
- package/build-module/video/tracks-editor.js +41 -13
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +47 -11
- package/build-style/archives/editor.css +47 -11
- package/build-style/archives/style-rtl.css +47 -11
- package/build-style/archives/style.css +47 -11
- package/build-style/audio/editor-rtl.css +47 -11
- package/build-style/audio/editor.css +47 -11
- package/build-style/audio/style-rtl.css +47 -11
- package/build-style/audio/style.css +47 -11
- package/build-style/audio/theme-rtl.css +47 -11
- package/build-style/audio/theme.css +47 -11
- package/build-style/avatar/editor-rtl.css +47 -11
- package/build-style/avatar/editor.css +47 -11
- package/build-style/avatar/style-rtl.css +47 -11
- package/build-style/avatar/style.css +47 -11
- package/build-style/button/editor-rtl.css +47 -11
- package/build-style/button/editor.css +47 -11
- package/build-style/button/style-rtl.css +47 -12
- package/build-style/button/style.css +47 -12
- package/build-style/buttons/editor-rtl.css +47 -11
- package/build-style/buttons/editor.css +47 -11
- package/build-style/buttons/style-rtl.css +50 -11
- package/build-style/buttons/style.css +50 -11
- package/build-style/calendar/style-rtl.css +47 -11
- package/build-style/calendar/style.css +47 -11
- package/build-style/categories/editor-rtl.css +47 -11
- package/build-style/categories/editor.css +47 -11
- package/build-style/categories/style-rtl.css +47 -11
- package/build-style/categories/style.css +47 -11
- package/build-style/classic-rtl.css +47 -11
- package/build-style/classic.css +47 -11
- package/build-style/code/editor-rtl.css +47 -11
- package/build-style/code/editor.css +47 -11
- package/build-style/code/style-rtl.css +47 -11
- package/build-style/code/style.css +47 -11
- package/build-style/code/theme-rtl.css +47 -11
- package/build-style/code/theme.css +47 -11
- package/build-style/columns/editor-rtl.css +47 -11
- package/build-style/columns/editor.css +47 -11
- package/build-style/columns/style-rtl.css +47 -11
- package/build-style/columns/style.css +47 -11
- package/build-style/comment-author-avatar/editor-rtl.css +47 -11
- package/build-style/comment-author-avatar/editor.css +47 -11
- package/build-style/comment-author-name/style-rtl.css +47 -11
- package/build-style/comment-author-name/style.css +47 -11
- package/build-style/comment-content/style-rtl.css +47 -11
- package/build-style/comment-content/style.css +47 -11
- package/build-style/comment-date/style-rtl.css +47 -11
- package/build-style/comment-date/style.css +47 -11
- package/build-style/comment-edit-link/style-rtl.css +47 -11
- package/build-style/comment-edit-link/style.css +47 -11
- package/build-style/comment-reply-link/style-rtl.css +47 -11
- package/build-style/comment-reply-link/style.css +47 -11
- package/build-style/comment-template/style-rtl.css +47 -11
- package/build-style/comment-template/style.css +47 -11
- package/build-style/comments/editor-rtl.css +47 -11
- package/build-style/comments/editor.css +47 -11
- package/build-style/comments/style-rtl.css +47 -11
- package/build-style/comments/style.css +47 -11
- package/build-style/comments-pagination/editor-rtl.css +47 -11
- package/build-style/comments-pagination/editor.css +47 -11
- package/build-style/comments-pagination/style-rtl.css +47 -11
- package/build-style/comments-pagination/style.css +47 -11
- package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/comments-pagination-numbers/editor.css +47 -11
- package/build-style/comments-title/editor-rtl.css +47 -11
- package/build-style/comments-title/editor.css +47 -11
- package/build-style/common-rtl.css +130 -9
- package/build-style/common.css +130 -9
- package/build-style/cover/editor-rtl.css +47 -11
- package/build-style/cover/editor.css +47 -11
- package/build-style/cover/style-rtl.css +47 -11
- package/build-style/cover/style.css +47 -11
- package/build-style/details/editor-rtl.css +47 -11
- package/build-style/details/editor.css +47 -11
- package/build-style/details/style-rtl.css +47 -11
- package/build-style/details/style.css +47 -11
- package/build-style/editor-elements-rtl.css +47 -11
- package/build-style/editor-elements.css +47 -11
- package/build-style/editor-rtl.css +57 -15
- package/build-style/editor.css +57 -15
- package/build-style/elements-rtl.css +47 -11
- package/build-style/elements.css +47 -11
- package/build-style/embed/editor-rtl.css +47 -11
- package/build-style/embed/editor.css +47 -11
- package/build-style/embed/style-rtl.css +47 -11
- package/build-style/embed/style.css +47 -11
- package/build-style/embed/theme-rtl.css +47 -11
- package/build-style/embed/theme.css +47 -11
- package/build-style/file/editor-rtl.css +47 -11
- package/build-style/file/editor.css +47 -11
- package/build-style/file/style-rtl.css +47 -11
- package/build-style/file/style.css +47 -11
- package/build-style/footnotes/style-rtl.css +47 -11
- package/build-style/footnotes/style.css +47 -11
- package/build-style/form-input/editor-rtl.css +47 -11
- package/build-style/form-input/editor.css +47 -11
- package/build-style/form-input/style-rtl.css +47 -11
- package/build-style/form-input/style.css +47 -11
- package/build-style/form-submission-notification/editor-rtl.css +47 -11
- package/build-style/form-submission-notification/editor.css +47 -11
- package/build-style/form-submit-button/style-rtl.css +47 -11
- package/build-style/form-submit-button/style.css +47 -11
- package/build-style/freeform/editor-rtl.css +47 -11
- package/build-style/freeform/editor.css +47 -11
- package/build-style/gallery/editor-rtl.css +47 -11
- package/build-style/gallery/editor.css +47 -11
- package/build-style/gallery/style-rtl.css +48 -11
- package/build-style/gallery/style.css +48 -11
- package/build-style/gallery/theme-rtl.css +47 -11
- package/build-style/gallery/theme.css +47 -11
- package/build-style/group/editor-rtl.css +47 -11
- package/build-style/group/editor.css +47 -11
- package/build-style/group/style-rtl.css +47 -11
- package/build-style/group/style.css +47 -11
- package/build-style/group/theme-rtl.css +47 -11
- package/build-style/group/theme.css +47 -11
- package/build-style/heading/style-rtl.css +47 -11
- package/build-style/heading/style.css +47 -11
- package/build-style/html/editor-rtl.css +48 -11
- package/build-style/html/editor.css +48 -11
- package/build-style/image/editor-rtl.css +47 -11
- package/build-style/image/editor.css +47 -11
- package/build-style/image/style-rtl.css +47 -11
- package/build-style/image/style.css +47 -11
- package/build-style/image/theme-rtl.css +47 -11
- package/build-style/image/theme.css +47 -11
- package/build-style/latest-comments/style-rtl.css +47 -11
- package/build-style/latest-comments/style.css +47 -11
- package/build-style/latest-posts/editor-rtl.css +47 -11
- package/build-style/latest-posts/editor.css +47 -11
- package/build-style/latest-posts/style-rtl.css +47 -11
- package/build-style/latest-posts/style.css +47 -11
- package/build-style/list/style-rtl.css +47 -11
- package/build-style/list/style.css +47 -11
- package/build-style/loginout/style-rtl.css +47 -11
- package/build-style/loginout/style.css +47 -11
- package/build-style/media-text/editor-rtl.css +47 -11
- package/build-style/media-text/editor.css +47 -11
- package/build-style/media-text/style-rtl.css +47 -11
- package/build-style/media-text/style.css +47 -11
- package/build-style/more/editor-rtl.css +47 -11
- package/build-style/more/editor.css +47 -11
- package/build-style/navigation/editor-rtl.css +55 -14
- package/build-style/navigation/editor.css +55 -14
- package/build-style/navigation/style-rtl.css +47 -11
- package/build-style/navigation/style.css +47 -11
- package/build-style/navigation-link/editor-rtl.css +47 -11
- package/build-style/navigation-link/editor.css +47 -11
- package/build-style/navigation-link/style-rtl.css +47 -11
- package/build-style/navigation-link/style.css +47 -11
- package/build-style/navigation-submenu/editor-rtl.css +47 -11
- package/build-style/navigation-submenu/editor.css +47 -11
- package/build-style/nextpage/editor-rtl.css +47 -11
- package/build-style/nextpage/editor.css +47 -11
- package/build-style/page-list/editor-rtl.css +47 -11
- package/build-style/page-list/editor.css +47 -11
- package/build-style/page-list/style-rtl.css +47 -11
- package/build-style/page-list/style.css +47 -11
- package/build-style/paragraph/editor-rtl.css +47 -11
- package/build-style/paragraph/editor.css +47 -11
- package/build-style/paragraph/style-rtl.css +47 -11
- package/build-style/paragraph/style.css +47 -11
- package/build-style/post-author/editor-rtl.css +47 -11
- package/build-style/post-author/editor.css +47 -11
- package/build-style/post-author/style-rtl.css +47 -11
- package/build-style/post-author/style.css +47 -11
- package/build-style/post-author-biography/style-rtl.css +47 -11
- package/build-style/post-author-biography/style.css +47 -11
- package/build-style/post-author-name/style-rtl.css +47 -11
- package/build-style/post-author-name/style.css +47 -11
- package/build-style/post-comments-count/style-rtl.css +47 -11
- package/build-style/post-comments-count/style.css +47 -11
- package/build-style/post-comments-form/editor-rtl.css +47 -11
- package/build-style/post-comments-form/editor.css +47 -11
- package/build-style/post-comments-form/style-rtl.css +47 -14
- package/build-style/post-comments-form/style.css +47 -14
- package/build-style/post-comments-link/style-rtl.css +47 -11
- package/build-style/post-comments-link/style.css +47 -11
- package/build-style/post-content/style-rtl.css +47 -11
- package/build-style/post-content/style.css +47 -11
- package/build-style/post-date/style-rtl.css +47 -11
- package/build-style/post-date/style.css +47 -11
- package/build-style/post-excerpt/editor-rtl.css +47 -11
- package/build-style/post-excerpt/editor.css +47 -11
- package/build-style/post-excerpt/style-rtl.css +47 -11
- package/build-style/post-excerpt/style.css +47 -11
- package/build-style/post-featured-image/editor-rtl.css +47 -11
- package/build-style/post-featured-image/editor.css +47 -11
- package/build-style/post-featured-image/style-rtl.css +47 -11
- package/build-style/post-featured-image/style.css +47 -11
- package/build-style/post-navigation-link/style-rtl.css +47 -11
- package/build-style/post-navigation-link/style.css +47 -11
- package/build-style/post-template/style-rtl.css +47 -11
- package/build-style/post-template/style.css +47 -11
- package/build-style/post-terms/style-rtl.css +47 -11
- package/build-style/post-terms/style.css +47 -11
- package/build-style/post-time-to-read/style-rtl.css +47 -11
- package/build-style/post-time-to-read/style.css +47 -11
- package/build-style/post-title/style-rtl.css +47 -11
- package/build-style/post-title/style.css +47 -11
- package/build-style/preformatted/style-rtl.css +47 -11
- package/build-style/preformatted/style.css +47 -11
- package/build-style/pullquote/editor-rtl.css +48 -12
- package/build-style/pullquote/editor.css +48 -12
- package/build-style/pullquote/style-rtl.css +49 -14
- package/build-style/pullquote/style.css +49 -14
- package/build-style/pullquote/theme-rtl.css +49 -13
- package/build-style/pullquote/theme.css +49 -13
- package/build-style/query/editor-rtl.css +47 -11
- package/build-style/query/editor.css +47 -11
- package/build-style/query-pagination/editor-rtl.css +47 -11
- package/build-style/query-pagination/editor.css +47 -11
- package/build-style/query-pagination/style-rtl.css +47 -11
- package/build-style/query-pagination/style.css +47 -11
- package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/query-pagination-numbers/editor.css +47 -11
- package/build-style/query-title/style-rtl.css +47 -11
- package/build-style/query-title/style.css +47 -11
- package/build-style/query-total/style-rtl.css +47 -11
- package/build-style/query-total/style.css +47 -11
- package/build-style/quote/style-rtl.css +47 -11
- package/build-style/quote/style.css +47 -11
- package/build-style/quote/theme-rtl.css +47 -11
- package/build-style/quote/theme.css +47 -11
- package/build-style/read-more/style-rtl.css +47 -11
- package/build-style/read-more/style.css +47 -11
- package/build-style/reset-rtl.css +47 -11
- package/build-style/reset.css +47 -11
- package/build-style/rss/editor-rtl.css +47 -11
- package/build-style/rss/editor.css +47 -11
- package/build-style/rss/style-rtl.css +47 -11
- package/build-style/rss/style.css +47 -11
- package/build-style/search/editor-rtl.css +47 -11
- package/build-style/search/editor.css +47 -11
- package/build-style/search/style-rtl.css +47 -11
- package/build-style/search/style.css +47 -11
- package/build-style/search/theme-rtl.css +47 -11
- package/build-style/search/theme.css +47 -11
- package/build-style/separator/editor-rtl.css +47 -11
- package/build-style/separator/editor.css +47 -11
- package/build-style/separator/style-rtl.css +47 -11
- package/build-style/separator/style.css +47 -11
- package/build-style/separator/theme-rtl.css +47 -11
- package/build-style/separator/theme.css +47 -11
- package/build-style/shortcode/editor-rtl.css +47 -11
- package/build-style/shortcode/editor.css +47 -11
- package/build-style/site-logo/editor-rtl.css +47 -11
- package/build-style/site-logo/editor.css +47 -11
- package/build-style/site-logo/style-rtl.css +47 -11
- package/build-style/site-logo/style.css +47 -11
- package/build-style/site-tagline/editor-rtl.css +47 -11
- package/build-style/site-tagline/editor.css +47 -11
- package/build-style/site-tagline/style-rtl.css +47 -11
- package/build-style/site-tagline/style.css +47 -11
- package/build-style/site-title/editor-rtl.css +47 -11
- package/build-style/site-title/editor.css +47 -11
- package/build-style/site-title/style-rtl.css +47 -11
- package/build-style/site-title/style.css +47 -11
- package/build-style/social-link/editor-rtl.css +47 -11
- package/build-style/social-link/editor.css +47 -11
- package/build-style/social-links/editor-rtl.css +47 -11
- package/build-style/social-links/editor.css +47 -11
- package/build-style/social-links/style-rtl.css +47 -11
- package/build-style/social-links/style.css +47 -11
- package/build-style/spacer/editor-rtl.css +47 -11
- package/build-style/spacer/editor.css +47 -11
- package/build-style/spacer/style-rtl.css +47 -11
- package/build-style/spacer/style.css +47 -11
- package/build-style/style-rtl.css +53 -18
- package/build-style/style.css +53 -18
- package/build-style/table/editor-rtl.css +47 -11
- package/build-style/table/editor.css +47 -11
- package/build-style/table/style-rtl.css +47 -11
- package/build-style/table/style.css +47 -11
- package/build-style/table/theme-rtl.css +47 -11
- package/build-style/table/theme.css +47 -11
- package/build-style/table-of-contents/style-rtl.css +47 -11
- package/build-style/table-of-contents/style.css +47 -11
- package/build-style/tag-cloud/editor-rtl.css +47 -11
- package/build-style/tag-cloud/editor.css +47 -11
- package/build-style/tag-cloud/style-rtl.css +47 -11
- package/build-style/tag-cloud/style.css +47 -11
- package/build-style/template-part/editor-rtl.css +47 -11
- package/build-style/template-part/editor.css +47 -11
- package/build-style/template-part/theme-rtl.css +47 -11
- package/build-style/template-part/theme.css +47 -11
- package/build-style/term-description/style-rtl.css +47 -11
- package/build-style/term-description/style.css +47 -11
- package/build-style/text-columns/editor-rtl.css +47 -11
- package/build-style/text-columns/editor.css +47 -11
- package/build-style/text-columns/style-rtl.css +47 -11
- package/build-style/text-columns/style.css +47 -11
- package/build-style/theme-rtl.css +49 -13
- package/build-style/theme.css +49 -13
- package/build-style/verse/style-rtl.css +47 -11
- package/build-style/verse/style.css +47 -11
- package/build-style/video/editor-rtl.css +47 -11
- package/build-style/video/editor.css +47 -11
- package/build-style/video/style-rtl.css +47 -11
- package/build-style/video/style.css +47 -11
- package/build-style/video/theme-rtl.css +47 -11
- package/build-style/video/theme.css +47 -11
- package/package.json +35 -35
- package/src/button/edit.js +44 -29
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/code/block.json +2 -1
- package/src/columns/edit.js +20 -31
- package/src/comment-author-name/edit.js +54 -13
- package/src/comment-date/edit.js +50 -15
- package/src/comment-edit-link/edit.js +39 -11
- package/src/comments/edit/comments-inspector-controls.js +0 -2
- package/src/comments-pagination/edit.js +29 -9
- package/src/comments-title/edit.js +53 -15
- package/src/details/block.json +2 -1
- package/src/details/edit.js +36 -4
- package/src/embed/edit.js +3 -5
- package/src/embed/embed-controls.js +55 -33
- package/src/file/inspector.js +99 -45
- package/src/form/edit.js +91 -46
- package/src/form-input/edit.js +56 -18
- package/src/gallery/style.scss +1 -0
- package/src/html/block.json +2 -1
- package/src/html/editor.scss +1 -0
- package/src/image/constants.js +1 -0
- package/src/image/edit.js +2 -1
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +206 -98
- package/src/list/ordered-list-settings.js +172 -62
- package/src/more/block.json +2 -1
- package/src/navigation/edit/index.js +127 -64
- package/src/navigation/edit/overlay-menu-preview.js +43 -26
- package/src/navigation/editor.scss +8 -4
- package/src/navigation-link/block.json +3 -0
- package/src/navigation-link/index.php +4 -0
- package/src/navigation-link/transforms.js +2 -1
- package/src/navigation-link/update-attributes.js +1 -0
- package/src/navigation-submenu/block.json +3 -0
- package/src/navigation-submenu/index.php +4 -0
- package/src/post-comments-count/index.js +2 -0
- package/src/post-comments-count/transforms.js +20 -0
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-comments-link/index.js +2 -0
- package/src/post-comments-link/transforms.js +20 -0
- package/src/post-excerpt/block.json +2 -1
- package/src/post-excerpt/edit.js +13 -8
- package/src/post-navigation-link/block.json +2 -1
- package/src/post-navigation-link/edit.js +13 -8
- package/src/post-navigation-link/variations.js +13 -13
- package/src/post-template/edit.js +4 -3
- package/src/post-terms/block.json +4 -2
- package/src/post-terms/edit.js +13 -8
- package/src/post-title/edit.js +76 -24
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/preformatted/test/transforms.native.js +6 -1
- package/src/preformatted/transforms.js +7 -1
- package/src/pullquote/editor.scss +1 -1
- package/src/pullquote/style.scss +2 -3
- package/src/pullquote/theme.scss +2 -2
- package/src/query/edit/enhanced-pagination-modal.js +1 -5
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/rss/edit.js +141 -55
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +66 -21
- package/src/shortcode/block.json +2 -1
- package/src/site-title/index.php +1 -1
- package/src/social-link/index.php +49 -49
- package/src/social-link/variations.js +53 -48
- package/src/social-links/edit.js +39 -60
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/src/video/tracks-editor.js +57 -16
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/src/search/icons.js +0 -89
package/src/comment-date/edit.js
CHANGED
|
@@ -12,9 +12,18 @@ import {
|
|
|
12
12
|
useBlockProps,
|
|
13
13
|
__experimentalDateFormatPicker as DateFormatPicker,
|
|
14
14
|
} from '@wordpress/block-editor';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
17
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
18
|
+
ToggleControl,
|
|
19
|
+
} from '@wordpress/components';
|
|
16
20
|
import { __, _x } from '@wordpress/i18n';
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
26
|
+
|
|
18
27
|
/**
|
|
19
28
|
* Renders the `core/comment-date` block on the editor.
|
|
20
29
|
*
|
|
@@ -34,6 +43,8 @@ export default function Edit( {
|
|
|
34
43
|
setAttributes,
|
|
35
44
|
} ) {
|
|
36
45
|
const blockProps = useBlockProps();
|
|
46
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
47
|
+
|
|
37
48
|
let [ date ] = useEntityProp( 'root', 'comment', 'date', commentId );
|
|
38
49
|
const [ siteFormat = getDateSettings().formats.date ] = useEntityProp(
|
|
39
50
|
'root',
|
|
@@ -43,21 +54,45 @@ export default function Edit( {
|
|
|
43
54
|
|
|
44
55
|
const inspectorControls = (
|
|
45
56
|
<InspectorControls>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
<ToolsPanel
|
|
58
|
+
label={ __( 'Settings' ) }
|
|
59
|
+
resetAll={ () => {
|
|
60
|
+
setAttributes( {
|
|
61
|
+
format: undefined,
|
|
62
|
+
isLink: true,
|
|
63
|
+
} );
|
|
64
|
+
} }
|
|
65
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
66
|
+
>
|
|
67
|
+
<ToolsPanelItem
|
|
68
|
+
label={ __( 'Date format' ) }
|
|
69
|
+
hasValue={ () => format !== undefined }
|
|
70
|
+
onDeselect={ () => setAttributes( { format: undefined } ) }
|
|
71
|
+
isShownByDefault
|
|
72
|
+
>
|
|
73
|
+
<DateFormatPicker
|
|
74
|
+
format={ format }
|
|
75
|
+
defaultFormat={ siteFormat }
|
|
76
|
+
onChange={ ( nextFormat ) =>
|
|
77
|
+
setAttributes( { format: nextFormat } )
|
|
78
|
+
}
|
|
79
|
+
/>
|
|
80
|
+
</ToolsPanelItem>
|
|
81
|
+
|
|
82
|
+
<ToolsPanelItem
|
|
56
83
|
label={ __( 'Link to comment' ) }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
84
|
+
hasValue={ () => ! isLink }
|
|
85
|
+
onDeselect={ () => setAttributes( { isLink: true } ) }
|
|
86
|
+
isShownByDefault
|
|
87
|
+
>
|
|
88
|
+
<ToggleControl
|
|
89
|
+
__nextHasNoMarginBottom
|
|
90
|
+
label={ __( 'Link to comment' ) }
|
|
91
|
+
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
92
|
+
checked={ isLink }
|
|
93
|
+
/>
|
|
94
|
+
</ToolsPanelItem>
|
|
95
|
+
</ToolsPanel>
|
|
61
96
|
</InspectorControls>
|
|
62
97
|
);
|
|
63
98
|
|
|
@@ -12,9 +12,18 @@ import {
|
|
|
12
12
|
InspectorControls,
|
|
13
13
|
useBlockProps,
|
|
14
14
|
} from '@wordpress/block-editor';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ToggleControl,
|
|
17
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
18
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
19
|
+
} from '@wordpress/components';
|
|
16
20
|
import { __ } from '@wordpress/i18n';
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Internal dependencies
|
|
24
|
+
*/
|
|
25
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
26
|
+
|
|
18
27
|
export default function Edit( {
|
|
19
28
|
attributes: { linkTarget, textAlign },
|
|
20
29
|
setAttributes,
|
|
@@ -25,6 +34,8 @@ export default function Edit( {
|
|
|
25
34
|
} ),
|
|
26
35
|
} );
|
|
27
36
|
|
|
37
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
38
|
+
|
|
28
39
|
const blockControls = (
|
|
29
40
|
<BlockControls group="block">
|
|
30
41
|
<AlignmentControl
|
|
@@ -37,18 +48,35 @@ export default function Edit( {
|
|
|
37
48
|
);
|
|
38
49
|
const inspectorControls = (
|
|
39
50
|
<InspectorControls>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
<ToolsPanel
|
|
52
|
+
label={ __( 'Settings' ) }
|
|
53
|
+
resetAll={ () => {
|
|
54
|
+
setAttributes( {
|
|
55
|
+
linkTarget: '_self',
|
|
56
|
+
} );
|
|
57
|
+
} }
|
|
58
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
59
|
+
>
|
|
60
|
+
<ToolsPanelItem
|
|
43
61
|
label={ __( 'Open in new tab' ) }
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} )
|
|
62
|
+
isShownByDefault
|
|
63
|
+
hasValue={ () => linkTarget === '_blank' }
|
|
64
|
+
onDeselect={ () =>
|
|
65
|
+
setAttributes( { linkTarget: '_self' } )
|
|
48
66
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
>
|
|
68
|
+
<ToggleControl
|
|
69
|
+
__nextHasNoMarginBottom
|
|
70
|
+
label={ __( 'Open in new tab' ) }
|
|
71
|
+
onChange={ ( value ) =>
|
|
72
|
+
setAttributes( {
|
|
73
|
+
linkTarget: value ? '_blank' : '_self',
|
|
74
|
+
} )
|
|
75
|
+
}
|
|
76
|
+
checked={ linkTarget === '_blank' }
|
|
77
|
+
/>
|
|
78
|
+
</ToolsPanelItem>
|
|
79
|
+
</ToolsPanel>
|
|
52
80
|
</InspectorControls>
|
|
53
81
|
);
|
|
54
82
|
|
|
@@ -17,7 +17,6 @@ const { HTMLElementControl } = unlock( blockEditorPrivateApis );
|
|
|
17
17
|
export default function CommentsInspectorControls( {
|
|
18
18
|
attributes: { tagName },
|
|
19
19
|
setAttributes,
|
|
20
|
-
clientId,
|
|
21
20
|
} ) {
|
|
22
21
|
return (
|
|
23
22
|
<InspectorControls>
|
|
@@ -27,7 +26,6 @@ export default function CommentsInspectorControls( {
|
|
|
27
26
|
onChange={ ( value ) =>
|
|
28
27
|
setAttributes( { tagName: value } )
|
|
29
28
|
}
|
|
30
|
-
clientId={ clientId }
|
|
31
29
|
options={ [
|
|
32
30
|
{ label: __( 'Default (<div>)' ), value: 'div' },
|
|
33
31
|
{ label: '<section>', value: 'section' },
|
|
@@ -10,12 +10,16 @@ import {
|
|
|
10
10
|
Warning,
|
|
11
11
|
} from '@wordpress/block-editor';
|
|
12
12
|
import { useSelect } from '@wordpress/data';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
15
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
16
|
+
} from '@wordpress/components';
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* Internal dependencies
|
|
17
20
|
*/
|
|
18
21
|
import { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';
|
|
22
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
19
23
|
|
|
20
24
|
const TEMPLATE = [
|
|
21
25
|
[ 'core/comments-pagination-previous' ],
|
|
@@ -45,6 +49,7 @@ export default function QueryPaginationEdit( {
|
|
|
45
49
|
}, [] );
|
|
46
50
|
|
|
47
51
|
const blockProps = useBlockProps();
|
|
52
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
48
53
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
49
54
|
template: TEMPLATE,
|
|
50
55
|
} );
|
|
@@ -73,14 +78,29 @@ export default function QueryPaginationEdit( {
|
|
|
73
78
|
<>
|
|
74
79
|
{ hasNextPreviousBlocks && (
|
|
75
80
|
<InspectorControls>
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
<ToolsPanel
|
|
82
|
+
label={ __( 'Settings' ) }
|
|
83
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
84
|
+
resetAll={ () =>
|
|
85
|
+
setAttributes( { paginationArrow: 'none' } )
|
|
86
|
+
}
|
|
87
|
+
>
|
|
88
|
+
<ToolsPanelItem
|
|
89
|
+
label={ __( 'Arrow' ) }
|
|
90
|
+
hasValue={ () => paginationArrow !== 'none' }
|
|
91
|
+
onDeselect={ () =>
|
|
92
|
+
setAttributes( { paginationArrow: 'none' } )
|
|
93
|
+
}
|
|
94
|
+
isShownByDefault
|
|
95
|
+
>
|
|
96
|
+
<CommentsPaginationArrowControls
|
|
97
|
+
value={ paginationArrow }
|
|
98
|
+
onChange={ ( value ) => {
|
|
99
|
+
setAttributes( { paginationArrow: value } );
|
|
100
|
+
} }
|
|
101
|
+
/>
|
|
102
|
+
</ToolsPanelItem>
|
|
103
|
+
</ToolsPanel>
|
|
84
104
|
</InspectorControls>
|
|
85
105
|
) }
|
|
86
106
|
<div { ...innerBlocksProps } />
|
|
@@ -16,12 +16,21 @@ import {
|
|
|
16
16
|
} from '@wordpress/block-editor';
|
|
17
17
|
import { __, _n, sprintf } from '@wordpress/i18n';
|
|
18
18
|
import { useEntityProp } from '@wordpress/core-data';
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
ToggleControl,
|
|
21
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
22
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
23
|
+
} from '@wordpress/components';
|
|
20
24
|
import { useState, useEffect } from '@wordpress/element';
|
|
21
25
|
import { useSelect } from '@wordpress/data';
|
|
22
26
|
import apiFetch from '@wordpress/api-fetch';
|
|
23
27
|
import { addQueryArgs } from '@wordpress/url';
|
|
24
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Internal dependencies
|
|
31
|
+
*/
|
|
32
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
33
|
+
|
|
25
34
|
export default function Edit( {
|
|
26
35
|
attributes: {
|
|
27
36
|
textAlign,
|
|
@@ -53,6 +62,8 @@ export default function Edit( {
|
|
|
53
62
|
return getSettings().__experimentalDiscussionSettings;
|
|
54
63
|
} );
|
|
55
64
|
|
|
65
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
66
|
+
|
|
56
67
|
useEffect( () => {
|
|
57
68
|
if ( isSiteEditor ) {
|
|
58
69
|
// Match the number of comments that will be shown in the comment-template/edit.js placeholder
|
|
@@ -111,24 +122,51 @@ export default function Edit( {
|
|
|
111
122
|
|
|
112
123
|
const inspectorControls = (
|
|
113
124
|
<InspectorControls>
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
<ToolsPanel
|
|
126
|
+
label={ __( 'Settings' ) }
|
|
127
|
+
resetAll={ () => {
|
|
128
|
+
setAttributes( {
|
|
129
|
+
showPostTitle: true,
|
|
130
|
+
showCommentsCount: true,
|
|
131
|
+
} );
|
|
132
|
+
} }
|
|
133
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
134
|
+
>
|
|
135
|
+
<ToolsPanelItem
|
|
117
136
|
label={ __( 'Show post title' ) }
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
137
|
+
isShownByDefault
|
|
138
|
+
hasValue={ () => ! showPostTitle }
|
|
139
|
+
onDeselect={ () =>
|
|
140
|
+
setAttributes( { showPostTitle: true } )
|
|
121
141
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
>
|
|
143
|
+
<ToggleControl
|
|
144
|
+
__nextHasNoMarginBottom
|
|
145
|
+
label={ __( 'Show post title' ) }
|
|
146
|
+
checked={ showPostTitle }
|
|
147
|
+
onChange={ ( value ) =>
|
|
148
|
+
setAttributes( { showPostTitle: value } )
|
|
149
|
+
}
|
|
150
|
+
/>
|
|
151
|
+
</ToolsPanelItem>
|
|
152
|
+
<ToolsPanelItem
|
|
125
153
|
label={ __( 'Show comments count' ) }
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
154
|
+
isShownByDefault
|
|
155
|
+
hasValue={ () => ! showCommentsCount }
|
|
156
|
+
onDeselect={ () =>
|
|
157
|
+
setAttributes( { showCommentsCount: true } )
|
|
129
158
|
}
|
|
130
|
-
|
|
131
|
-
|
|
159
|
+
>
|
|
160
|
+
<ToggleControl
|
|
161
|
+
__nextHasNoMarginBottom
|
|
162
|
+
label={ __( 'Show comments count' ) }
|
|
163
|
+
checked={ showCommentsCount }
|
|
164
|
+
onChange={ ( value ) =>
|
|
165
|
+
setAttributes( { showCommentsCount: value } )
|
|
166
|
+
}
|
|
167
|
+
/>
|
|
168
|
+
</ToolsPanelItem>
|
|
169
|
+
</ToolsPanel>
|
|
132
170
|
</InspectorControls>
|
|
133
171
|
);
|
|
134
172
|
|
package/src/details/block.json
CHANGED
package/src/details/edit.js
CHANGED
|
@@ -6,20 +6,26 @@ import {
|
|
|
6
6
|
useBlockProps,
|
|
7
7
|
useInnerBlocksProps,
|
|
8
8
|
InspectorControls,
|
|
9
|
+
store as blockEditorStore,
|
|
9
10
|
} from '@wordpress/block-editor';
|
|
10
11
|
import {
|
|
11
12
|
TextControl,
|
|
12
13
|
ToggleControl,
|
|
13
14
|
__experimentalToolsPanel as ToolsPanel,
|
|
14
15
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
16
|
+
privateApis as componentsPrivateApis,
|
|
15
17
|
} from '@wordpress/components';
|
|
16
18
|
import { __ } from '@wordpress/i18n';
|
|
17
19
|
import { useState } from '@wordpress/element';
|
|
20
|
+
import { useSelect } from '@wordpress/data';
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* Internal dependencies
|
|
21
24
|
*/
|
|
22
25
|
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
26
|
+
import { unlock } from '../lock-unlock';
|
|
27
|
+
|
|
28
|
+
const { withIgnoreIMEEvents } = unlock( componentsPrivateApis );
|
|
23
29
|
|
|
24
30
|
const TEMPLATE = [
|
|
25
31
|
[
|
|
@@ -30,7 +36,7 @@ const TEMPLATE = [
|
|
|
30
36
|
],
|
|
31
37
|
];
|
|
32
38
|
|
|
33
|
-
function DetailsEdit( { attributes, setAttributes } ) {
|
|
39
|
+
function DetailsEdit( { attributes, setAttributes, clientId } ) {
|
|
34
40
|
const { name, showContent, summary, allowedBlocks, placeholder } =
|
|
35
41
|
attributes;
|
|
36
42
|
const blockProps = useBlockProps();
|
|
@@ -42,6 +48,27 @@ function DetailsEdit( { attributes, setAttributes } ) {
|
|
|
42
48
|
const [ isOpen, setIsOpen ] = useState( showContent );
|
|
43
49
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
44
50
|
|
|
51
|
+
// Check if the inner blocks are selected.
|
|
52
|
+
const hasSelectedInnerBlock = useSelect(
|
|
53
|
+
( select ) =>
|
|
54
|
+
select( blockEditorStore ).hasSelectedInnerBlock( clientId, true ),
|
|
55
|
+
[ clientId ]
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const handleSummaryKeyDown = ( event ) => {
|
|
59
|
+
if ( event.key === 'Enter' && ! event.shiftKey ) {
|
|
60
|
+
setIsOpen( ( prevIsOpen ) => ! prevIsOpen );
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Prevent spacebar from toggling <details> while typing.
|
|
66
|
+
const handleSummaryKeyUp = ( event ) => {
|
|
67
|
+
if ( event.key === ' ' ) {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
45
72
|
return (
|
|
46
73
|
<>
|
|
47
74
|
<InspectorControls>
|
|
@@ -93,13 +120,18 @@ function DetailsEdit( { attributes, setAttributes } ) {
|
|
|
93
120
|
</InspectorControls>
|
|
94
121
|
<details
|
|
95
122
|
{ ...innerBlocksProps }
|
|
96
|
-
open={ isOpen }
|
|
123
|
+
open={ isOpen || hasSelectedInnerBlock }
|
|
97
124
|
onToggle={ ( event ) => setIsOpen( event.target.open ) }
|
|
98
125
|
>
|
|
99
|
-
<summary
|
|
126
|
+
<summary
|
|
127
|
+
onKeyDown={ withIgnoreIMEEvents( handleSummaryKeyDown ) }
|
|
128
|
+
onKeyUp={ handleSummaryKeyUp }
|
|
129
|
+
>
|
|
100
130
|
<RichText
|
|
101
131
|
identifier="summary"
|
|
102
|
-
aria-label={ __(
|
|
132
|
+
aria-label={ __(
|
|
133
|
+
'Write summary. Press Enter to expand or collapse the details.'
|
|
134
|
+
) }
|
|
103
135
|
placeholder={ placeholder || __( 'Write summary…' ) }
|
|
104
136
|
withoutInteractiveFormatting
|
|
105
137
|
value={ summary }
|
package/src/embed/edit.js
CHANGED
|
@@ -118,11 +118,9 @@ const EmbedEdit = ( props ) => {
|
|
|
118
118
|
responsive
|
|
119
119
|
);
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
const {
|
|
121
|
+
function toggleResponsive( newAllowResponsive ) {
|
|
122
|
+
const { className } = attributes;
|
|
123
123
|
const { html } = preview;
|
|
124
|
-
const newAllowResponsive = ! allowResponsive;
|
|
125
|
-
|
|
126
124
|
setAttributes( {
|
|
127
125
|
allowResponsive: newAllowResponsive,
|
|
128
126
|
className: getClassNames(
|
|
@@ -131,7 +129,7 @@ const EmbedEdit = ( props ) => {
|
|
|
131
129
|
responsive && newAllowResponsive
|
|
132
130
|
),
|
|
133
131
|
} );
|
|
134
|
-
}
|
|
132
|
+
}
|
|
135
133
|
|
|
136
134
|
useEffect( () => {
|
|
137
135
|
if ( preview?.html || ! cannotEmbed || ! hasResolved ) {
|
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import {
|
|
6
6
|
ToolbarButton,
|
|
7
|
-
PanelBody,
|
|
8
7
|
ToggleControl,
|
|
9
8
|
ToolbarGroup,
|
|
9
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
10
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
10
11
|
} from '@wordpress/components';
|
|
11
12
|
import { BlockControls, InspectorControls } from '@wordpress/block-editor';
|
|
12
13
|
import { edit } from '@wordpress/icons';
|
|
13
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Internal dependencies
|
|
17
|
+
*/
|
|
18
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
19
|
+
|
|
14
20
|
function getResponsiveHelp( checked ) {
|
|
15
21
|
return checked
|
|
16
22
|
? __(
|
|
@@ -28,37 +34,53 @@ const EmbedControls = ( {
|
|
|
28
34
|
allowResponsive,
|
|
29
35
|
toggleResponsive,
|
|
30
36
|
switchBackToURLInput,
|
|
31
|
-
} ) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
);
|
|
37
|
+
} ) => {
|
|
38
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<BlockControls>
|
|
43
|
+
<ToolbarGroup>
|
|
44
|
+
{ showEditButton && (
|
|
45
|
+
<ToolbarButton
|
|
46
|
+
className="components-toolbar__control"
|
|
47
|
+
label={ __( 'Edit URL' ) }
|
|
48
|
+
icon={ edit }
|
|
49
|
+
onClick={ switchBackToURLInput }
|
|
50
|
+
/>
|
|
51
|
+
) }
|
|
52
|
+
</ToolbarGroup>
|
|
53
|
+
</BlockControls>
|
|
54
|
+
{ themeSupportsResponsive && blockSupportsResponsive && (
|
|
55
|
+
<InspectorControls>
|
|
56
|
+
<ToolsPanel
|
|
57
|
+
label={ __( 'Media settings' ) }
|
|
58
|
+
resetAll={ () => {
|
|
59
|
+
toggleResponsive( true );
|
|
60
|
+
} }
|
|
61
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
62
|
+
>
|
|
63
|
+
<ToolsPanelItem
|
|
64
|
+
label={ __( 'Media settings' ) }
|
|
65
|
+
isShownByDefault
|
|
66
|
+
hasValue={ () => ! allowResponsive }
|
|
67
|
+
onDeselect={ () => {
|
|
68
|
+
toggleResponsive( ! allowResponsive );
|
|
69
|
+
} }
|
|
70
|
+
>
|
|
71
|
+
<ToggleControl
|
|
72
|
+
__nextHasNoMarginBottom
|
|
73
|
+
label={ __( 'Resize for smaller devices' ) }
|
|
74
|
+
checked={ allowResponsive }
|
|
75
|
+
help={ getResponsiveHelp }
|
|
76
|
+
onChange={ toggleResponsive }
|
|
77
|
+
/>
|
|
78
|
+
</ToolsPanelItem>
|
|
79
|
+
</ToolsPanel>
|
|
80
|
+
</InspectorControls>
|
|
81
|
+
) }
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
63
85
|
|
|
64
86
|
export default EmbedControls;
|