@wordpress/block-library 6.0.1 → 6.0.5
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/build/block/edit.js +1 -1
- package/build/block/edit.js.map +1 -1
- package/build/button/deprecated.js +155 -10
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.native.js +257 -330
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +4 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/deprecated.js +84 -2
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +6 -42
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/index.js +16 -14
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/save.js +4 -20
- package/build/buttons/save.js.map +1 -1
- package/build/buttons/transforms.js +15 -10
- package/build/buttons/transforms.js.map +1 -1
- package/build/categories/edit.js +16 -6
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +4 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/edit.native.js +8 -5
- package/build/code/edit.native.js.map +1 -1
- package/build/code/index.js +24 -1
- package/build/code/index.js.map +1 -1
- package/build/column/edit.js +4 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/index.js +4 -0
- package/build/column/index.js.map +1 -1
- package/build/column/save.js +7 -3
- package/build/column/save.js.map +1 -1
- package/build/columns/edit.js +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/index.js +1 -0
- package/build/columns/index.js.map +1 -1
- package/build/columns/save.js +7 -2
- package/build/columns/save.js.map +1 -1
- package/build/comment-author-avatar/edit.js +83 -0
- package/build/comment-author-avatar/edit.js.map +1 -0
- package/build/{post-comment-date → comment-author-avatar}/index.js +25 -9
- package/build/comment-author-avatar/index.js.map +1 -0
- package/build/comment-author-name/deprecated.js +69 -0
- package/build/comment-author-name/deprecated.js.map +1 -0
- package/build/comment-author-name/edit.js +112 -0
- package/build/comment-author-name/edit.js.map +1 -0
- package/build/comment-author-name/index.js +77 -0
- package/build/comment-author-name/index.js.map +1 -0
- package/build/comment-content/edit.js +74 -0
- package/build/comment-content/edit.js.map +1 -0
- package/build/comment-content/index.js +68 -0
- package/build/comment-content/index.js.map +1 -0
- package/build/comment-date/deprecated.js +68 -0
- package/build/comment-date/deprecated.js.map +1 -0
- package/build/comment-date/edit.js +95 -0
- package/build/comment-date/edit.js.map +1 -0
- package/build/comment-date/index.js +72 -0
- package/build/comment-date/index.js.map +1 -0
- package/build/comment-edit-link/edit.js +61 -0
- package/build/comment-edit-link/edit.js.map +1 -0
- package/build/comment-edit-link/index.js +67 -0
- package/build/comment-edit-link/index.js.map +1 -0
- package/build/comment-reply-link/edit.js +63 -0
- package/build/comment-reply-link/edit.js.map +1 -0
- package/build/comment-reply-link/index.js +63 -0
- package/build/comment-reply-link/index.js.map +1 -0
- package/build/comment-template/edit.js +82 -0
- package/build/comment-template/edit.js.map +1 -0
- package/build/{post-comment-content → comment-template}/index.js +13 -8
- package/build/comment-template/index.js.map +1 -0
- package/build/comment-template/save.js +18 -0
- package/build/comment-template/save.js.map +1 -0
- package/build/comments-query-loop/edit.js +64 -0
- package/build/comments-query-loop/edit.js.map +1 -0
- package/build/comments-query-loop/index.js +67 -0
- package/build/comments-query-loop/index.js.map +1 -0
- package/build/comments-query-loop/save.js +22 -0
- package/build/comments-query-loop/save.js.map +1 -0
- package/build/comments-query-loop/toolbar.js +54 -0
- package/build/comments-query-loop/toolbar.js.map +1 -0
- package/build/cover/deprecated.js +180 -20
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +62 -28
- package/build/cover/edit.js.map +1 -1
- package/build/cover/edit.native.js +6 -2
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +12 -1
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +17 -14
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js +3 -2
- package/build/cover/shared.js.map +1 -1
- package/build/embed/edit.native.js +4 -8
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-bottom-sheet.native.js +4 -5
- package/build/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build/embed/embed-no-preview.native.js +2 -1
- package/build/embed/embed-no-preview.native.js.map +1 -1
- package/build/embed/icons.js +16 -1
- package/build/embed/icons.js.map +1 -1
- package/build/embed/transforms.native.js +3 -1
- package/build/embed/transforms.native.js.map +1 -1
- package/build/embed/variations.js +20 -0
- package/build/embed/variations.js.map +1 -1
- package/build/freeform/edit.js +16 -4
- package/build/freeform/edit.js.map +1 -1
- package/build/gallery/edit.js +7 -0
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +6 -1
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +7 -2
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +0 -7
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/use-get-media.js +4 -10
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-mobile-warning.js +43 -0
- package/build/gallery/use-mobile-warning.js.map +1 -0
- package/build/group/edit.js +1 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/save.js +4 -5
- package/build/group/save.js.map +1 -1
- package/build/group/variations.js +2 -1
- package/build/group/variations.js.map +1 -1
- package/build/heading/autogenerate-anchors.js +90 -0
- package/build/heading/autogenerate-anchors.js.map +1 -0
- package/build/heading/edit.js +42 -5
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +14 -2
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +14 -2
- package/build/heading/transforms.js.map +1 -1
- package/build/image/edit.native.js +126 -60
- package/build/image/edit.native.js.map +1 -1
- package/build/image/index.js +1 -1
- package/build/image/transforms.js +2 -1
- package/build/image/transforms.js.map +1 -1
- package/build/index.js +83 -70
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -1
- package/build/index.native.js.map +1 -1
- package/build/list/deprecated.js +111 -0
- package/build/list/deprecated.js.map +1 -0
- package/build/list/index.js +15 -3
- package/build/list/index.js.map +1 -1
- package/build/media-text/edit.js +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/save.js +3 -3
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/deprecated.js +340 -23
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +372 -0
- package/build/navigation/edit/index.js.map +1 -0
- package/build/navigation/edit/inner-blocks.js +100 -0
- package/build/navigation/edit/inner-blocks.js.map +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js +60 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js +27 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -0
- package/build/navigation/edit/navigation-menu-name-modal.js +54 -0
- package/build/navigation/edit/navigation-menu-name-modal.js.map +1 -0
- package/build/navigation/edit/navigation-menu-publish-button.js +53 -0
- package/build/navigation/edit/navigation-menu-publish-button.js.map +1 -0
- package/build/navigation/edit/navigation-menu-selector.js +49 -0
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -0
- package/build/navigation/edit/placeholder/index.js +207 -0
- package/build/navigation/edit/placeholder/index.js.map +1 -0
- package/build/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +14 -2
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -0
- package/build/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +9 -5
- package/build/navigation/edit/responsive-wrapper.js.map +1 -0
- package/build/navigation/edit/unsaved-inner-blocks.js +153 -0
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -0
- package/build/navigation/{block-navigation-list.js → edit/use-list-view-modal.js} +34 -3
- package/build/navigation/edit/use-list-view-modal.js.map +1 -0
- package/build/navigation/index.js +25 -13
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/save.js +10 -1
- package/build/navigation/save.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +40 -0
- package/build/navigation/use-navigation-menu.js.map +1 -0
- package/build/navigation/use-template-part-area-label.js +74 -0
- package/build/navigation/use-template-part-area-label.js.map +1 -0
- package/build/navigation/view.js +29 -26
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-area/edit.js +97 -0
- package/build/navigation-area/edit.js.map +1 -0
- package/build/navigation-area/index.js +61 -0
- package/build/navigation-area/index.js.map +1 -0
- package/build/navigation-area/inner-blocks.js +33 -0
- package/build/navigation-area/inner-blocks.js.map +1 -0
- package/build/navigation-area/save.js +18 -0
- package/build/navigation-area/save.js.map +1 -0
- package/build/navigation-link/edit.js +69 -7
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/transforms.js +5 -1
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -2
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +125 -84
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +1 -35
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.native.js +2 -1
- package/build/paragraph/edit.native.js.map +1 -1
- package/build/paragraph/index.js +8 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +8 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/edit.js +43 -0
- package/build/pattern/edit.js.map +1 -0
- package/build/{post-comment-author → pattern}/index.js +11 -10
- package/build/pattern/index.js.map +1 -0
- package/build/post-author/index.js +12 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-comment/edit.js +7 -8
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comment/index.js +4 -3
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comment/save.js +5 -1
- package/build/post-comment/save.js.map +1 -1
- package/build/post-comments/index.js +8 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +7 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +9 -2
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +8 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +2 -2
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/deprecated.js +71 -0
- package/build/post-date/deprecated.js.map +1 -0
- package/build/post-date/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +12 -2
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +12 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/index.js +5 -1
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +8 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +8 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -6
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +7 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-terms/use-post-terms.js +3 -1
- package/build/post-terms/use-post-terms.js.map +1 -1
- package/build/post-title/deprecated.js +84 -0
- package/build/post-title/deprecated.js.map +1 -0
- package/build/post-title/edit.js +1 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +14 -2
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.js +5 -2
- package/build/preformatted/edit.js.map +1 -1
- package/build/preformatted/edit.native.js +16 -6
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +9 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/blockquote.native.js +14 -2
- package/build/pullquote/blockquote.native.js.map +1 -1
- package/build/pullquote/edit.native.js +124 -0
- package/build/pullquote/edit.native.js.map +1 -0
- package/build/pullquote/figure.native.js +20 -8
- package/build/pullquote/figure.native.js.map +1 -1
- package/build/pullquote/index.js +12 -0
- package/build/pullquote/index.js.map +1 -1
- package/build/query/edit/index.js +1 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/save.js +5 -1
- package/build/query/save.js.map +1 -1
- package/build/query-pagination/edit.js +1 -1
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination-next/index.js +8 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +8 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/deprecated.js +70 -0
- package/build/query-title/deprecated.js.map +1 -0
- package/build/query-title/index.js +17 -2
- package/build/query-title/index.js.map +1 -1
- package/build/quote/deprecated.js +9 -0
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/index.js +17 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/edit.js +27 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +38 -7
- package/build/search/edit.native.js.map +1 -1
- package/build/separator/separator-settings.js +1 -0
- package/build/separator/separator-settings.js.map +1 -1
- package/build/site-logo/edit.js +46 -21
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +6 -0
- package/build/site-logo/index.js.map +1 -1
- package/build/site-tagline/deprecated.js +68 -0
- package/build/site-tagline/deprecated.js.map +1 -0
- package/build/site-tagline/index.js +11 -3
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/deprecated.js +81 -0
- package/build/site-title/deprecated.js.map +1 -0
- package/build/site-title/index.js +15 -2
- package/build/site-title/index.js.map +1 -1
- package/build/social-links/edit.js +2 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +1 -0
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +7 -2
- package/build/social-links/save.js.map +1 -1
- package/build/table/index.js +11 -0
- package/build/table/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +1 -1
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder/index.js +3 -3
- package/build/template-part/edit/placeholder/index.js.map +1 -1
- package/build/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/build/template-part/edit/placeholder/patterns-setup.js.map +1 -1
- package/build/template-part/edit/selection/template-part-previews.js +1 -1
- package/build/template-part/edit/selection/template-part-previews.js.map +1 -1
- package/build/template-part/variations.js +1 -1
- package/build/template-part/variations.js.map +1 -1
- package/build/term-description/edit.js +1 -1
- package/build/term-description/edit.js.map +1 -1
- package/build/term-description/index.js +4 -1
- package/build/term-description/index.js.map +1 -1
- package/build/utils/clean-empty-object.js +31 -0
- package/build/utils/clean-empty-object.js.map +1 -0
- package/build/utils/migrate-font-family.js +49 -0
- package/build/utils/migrate-font-family.js.map +1 -0
- package/build/verse/deprecated.js +93 -14
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/index.js +10 -1
- package/build/verse/index.js.map +1 -1
- package/build-module/block/edit.js +1 -1
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/deprecated.js +155 -11
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.native.js +259 -331
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +4 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/deprecated.js +82 -3
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js +6 -39
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/index.js +16 -13
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/save.js +4 -18
- package/build-module/buttons/save.js.map +1 -1
- package/build-module/buttons/transforms.js +15 -10
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/categories/edit.js +16 -6
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +4 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/edit.native.js +9 -5
- package/build-module/code/edit.native.js.map +1 -1
- package/build-module/code/index.js +24 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/edit.js +4 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/index.js +4 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/column/save.js +6 -4
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/edit.js +1 -1
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/index.js +1 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/columns/save.js +5 -3
- package/build-module/columns/save.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +69 -0
- package/build-module/comment-author-avatar/edit.js.map +1 -0
- package/build-module/comment-author-avatar/index.js +52 -0
- package/build-module/comment-author-avatar/index.js.map +1 -0
- package/build-module/comment-author-name/deprecated.js +58 -0
- package/build-module/comment-author-name/deprecated.js.map +1 -0
- package/build-module/comment-author-name/edit.js +97 -0
- package/build-module/comment-author-name/edit.js.map +1 -0
- package/build-module/comment-author-name/index.js +63 -0
- package/build-module/comment-author-name/index.js.map +1 -0
- package/build-module/comment-content/edit.js +61 -0
- package/build-module/comment-content/edit.js.map +1 -0
- package/build-module/comment-content/index.js +55 -0
- package/build-module/comment-content/index.js.map +1 -0
- package/build-module/comment-date/deprecated.js +57 -0
- package/build-module/comment-date/deprecated.js.map +1 -0
- package/build-module/comment-date/edit.js +85 -0
- package/build-module/comment-date/edit.js.map +1 -0
- package/build-module/comment-date/index.js +58 -0
- package/build-module/comment-date/index.js.map +1 -0
- package/build-module/comment-edit-link/edit.js +48 -0
- package/build-module/comment-edit-link/edit.js.map +1 -0
- package/build-module/comment-edit-link/index.js +54 -0
- package/build-module/comment-edit-link/index.js.map +1 -0
- package/build-module/comment-reply-link/edit.js +50 -0
- package/build-module/comment-reply-link/edit.js.map +1 -0
- package/build-module/comment-reply-link/index.js +50 -0
- package/build-module/comment-reply-link/index.js.map +1 -0
- package/build-module/comment-template/edit.js +71 -0
- package/build-module/comment-template/edit.js.map +1 -0
- package/build-module/comment-template/index.js +35 -0
- package/build-module/comment-template/index.js.map +1 -0
- package/build-module/comment-template/save.js +10 -0
- package/build-module/comment-template/save.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +50 -0
- package/build-module/comments-query-loop/edit.js.map +1 -0
- package/build-module/comments-query-loop/index.js +53 -0
- package/build-module/comments-query-loop/index.js.map +1 -0
- package/build-module/comments-query-loop/save.js +14 -0
- package/build-module/comments-query-loop/save.js.map +1 -0
- package/build-module/comments-query-loop/toolbar.js +44 -0
- package/build-module/comments-query-loop/toolbar.js.map +1 -0
- package/build-module/cover/deprecated.js +183 -21
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +62 -28
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/edit.native.js +6 -2
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +12 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +18 -15
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js +3 -2
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/edit.native.js +4 -8
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-bottom-sheet.native.js +4 -5
- package/build-module/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build-module/embed/embed-no-preview.native.js +2 -1
- package/build-module/embed/embed-no-preview.native.js.map +1 -1
- package/build-module/embed/icons.js +13 -0
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/transforms.native.js +2 -1
- package/build-module/embed/transforms.native.js.map +1 -1
- package/build-module/embed/variations.js +21 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/freeform/edit.js +16 -5
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/gallery/edit.js +6 -0
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +1 -1
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +6 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +5 -3
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +0 -6
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/use-get-media.js +4 -10
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-mobile-warning.js +32 -0
- package/build-module/gallery/use-mobile-warning.js.map +1 -0
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/save.js +5 -6
- package/build-module/group/save.js.map +1 -1
- package/build-module/group/variations.js +2 -1
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/autogenerate-anchors.js +77 -0
- package/build-module/heading/autogenerate-anchors.js.map +1 -0
- package/build-module/heading/edit.js +43 -7
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +14 -2
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +14 -2
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/edit.native.js +128 -63
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/index.js +1 -1
- package/build-module/image/transforms.js +2 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/index.js +59 -53
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/list/deprecated.js +99 -0
- package/build-module/list/deprecated.js.map +1 -0
- package/build-module/list/index.js +14 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/media-text/edit.js +1 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/save.js +4 -4
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/deprecated.js +336 -23
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +346 -0
- package/build-module/navigation/edit/index.js.map +1 -0
- package/build-module/navigation/edit/inner-blocks.js +87 -0
- package/build-module/navigation/edit/inner-blocks.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js +50 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js +17 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-name-modal.js +46 -0
- package/build-module/navigation/edit/navigation-menu-name-modal.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-publish-button.js +40 -0
- package/build-module/navigation/edit/navigation-menu-publish-button.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-selector.js +36 -0
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -0
- package/build-module/navigation/edit/placeholder/index.js +189 -0
- package/build-module/navigation/edit/placeholder/index.js.map +1 -0
- package/build-module/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +11 -2
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -0
- package/build-module/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +9 -5
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -0
- package/build-module/navigation/edit/unsaved-inner-blocks.js +136 -0
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -0
- package/build-module/navigation/{block-navigation-list.js → edit/use-list-view-modal.js} +31 -2
- package/build-module/navigation/edit/use-list-view-modal.js.map +1 -0
- package/build-module/navigation/index.js +25 -12
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/save.js +10 -1
- package/build-module/navigation/save.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +31 -0
- package/build-module/navigation/use-navigation-menu.js.map +1 -0
- package/build-module/navigation/use-template-part-area-label.js +63 -0
- package/build-module/navigation/use-template-part-area-label.js.map +1 -0
- package/build-module/navigation/view.js +28 -26
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-area/edit.js +82 -0
- package/build-module/navigation-area/edit.js.map +1 -0
- package/build-module/navigation-area/index.js +47 -0
- package/build-module/navigation-area/index.js.map +1 -0
- package/build-module/navigation-area/inner-blocks.js +25 -0
- package/build-module/navigation-area/inner-blocks.js.map +1 -0
- package/build-module/navigation-area/save.js +10 -0
- package/build-module/navigation-area/save.js.map +1 -0
- package/build-module/navigation-link/edit.js +72 -10
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/transforms.js +5 -1
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -2
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +127 -86
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +1 -35
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.native.js +2 -1
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/paragraph/index.js +8 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +8 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/edit.js +35 -0
- package/build-module/pattern/edit.js.map +1 -0
- package/build-module/pattern/index.js +29 -0
- package/build-module/pattern/index.js.map +1 -0
- package/build-module/post-author/index.js +12 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comment/edit.js +8 -9
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comment/index.js +4 -3
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comment/save.js +4 -2
- package/build-module/post-comment/save.js.map +1 -1
- package/build-module/post-comments/index.js +8 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +7 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +9 -2
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +8 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +2 -2
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/deprecated.js +60 -0
- package/build-module/post-date/deprecated.js.map +1 -0
- package/build-module/post-date/edit.js +1 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +11 -2
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +12 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/index.js +5 -1
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +8 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +10 -5
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -6
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +7 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-terms/use-post-terms.js +3 -1
- package/build-module/post-terms/use-post-terms.js.map +1 -1
- package/build-module/post-title/deprecated.js +73 -0
- package/build-module/post-title/deprecated.js.map +1 -0
- package/build-module/post-title/edit.js +1 -1
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +13 -2
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.js +5 -2
- package/build-module/preformatted/edit.js.map +1 -1
- package/build-module/preformatted/edit.native.js +17 -6
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +9 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/blockquote.native.js +14 -2
- package/build-module/pullquote/blockquote.native.js.map +1 -1
- package/build-module/pullquote/edit.native.js +112 -0
- package/build-module/pullquote/edit.native.js.map +1 -0
- package/build-module/pullquote/figure.native.js +20 -9
- package/build-module/pullquote/figure.native.js.map +1 -1
- package/build-module/pullquote/index.js +12 -0
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/edit/index.js +1 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/save.js +4 -2
- package/build-module/query/save.js.map +1 -1
- package/build-module/query-pagination/edit.js +1 -1
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination-next/index.js +8 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +8 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/deprecated.js +59 -0
- package/build-module/query-title/deprecated.js.map +1 -0
- package/build-module/query-title/index.js +16 -2
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/deprecated.js +9 -0
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/index.js +17 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/edit.js +28 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +38 -7
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/separator/separator-settings.js +1 -0
- package/build-module/separator/separator-settings.js.map +1 -1
- package/build-module/site-logo/edit.js +49 -26
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +6 -0
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/deprecated.js +57 -0
- package/build-module/site-tagline/deprecated.js.map +1 -0
- package/build-module/site-tagline/index.js +10 -3
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/deprecated.js +70 -0
- package/build-module/site-title/deprecated.js.map +1 -0
- package/build-module/site-title/index.js +14 -2
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-links/edit.js +2 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +1 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +5 -3
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/table/index.js +11 -0
- package/build-module/table/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +1 -1
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder/index.js +3 -3
- package/build-module/template-part/edit/placeholder/index.js.map +1 -1
- package/build-module/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/build-module/template-part/edit/placeholder/patterns-setup.js.map +1 -1
- package/build-module/template-part/edit/selection/template-part-previews.js +1 -1
- package/build-module/template-part/edit/selection/template-part-previews.js.map +1 -1
- package/build-module/template-part/variations.js +2 -2
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/term-description/edit.js +1 -1
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/term-description/index.js +4 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/clean-empty-object.js +22 -0
- package/build-module/utils/clean-empty-object.js.map +1 -0
- package/build-module/utils/migrate-font-family.js +38 -0
- package/build-module/utils/migrate-font-family.js.map +1 -0
- package/build-module/verse/deprecated.js +90 -15
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/index.js +10 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-style/button/editor-rtl.css +0 -1
- package/build-style/button/editor.css +0 -1
- package/build-style/button/style-rtl.css +15 -27
- package/build-style/button/style.css +15 -27
- package/build-style/buttons/editor-rtl.css +4 -8
- package/build-style/buttons/editor.css +4 -8
- package/build-style/buttons/style-rtl.css +1 -35
- package/build-style/buttons/style.css +1 -48
- package/build-style/columns/style-rtl.css +1 -1
- package/build-style/columns/style.css +1 -1
- package/build-style/common-rtl.css +2 -16
- package/build-style/common.css +2 -16
- package/build-style/cover/editor-rtl.css +14 -32
- package/build-style/cover/editor.css +14 -32
- package/build-style/cover/style-rtl.css +28 -40
- package/build-style/cover/style.css +28 -40
- package/build-style/editor-rtl.css +198 -145
- package/build-style/editor.css +198 -145
- package/build-style/image/editor-rtl.css +1 -0
- package/build-style/image/editor.css +1 -0
- package/build-style/image/style-rtl.css +4 -0
- package/build-style/image/style.css +4 -0
- package/build-style/media-text/style-rtl.css +1 -0
- package/build-style/media-text/style.css +1 -0
- package/build-style/navigation/editor-rtl.css +58 -16
- package/build-style/navigation/editor.css +58 -16
- package/build-style/navigation/style-rtl.css +51 -112
- package/build-style/navigation/style.css +51 -112
- package/build-style/navigation-link/editor-rtl.css +31 -14
- package/build-style/navigation-link/editor.css +31 -14
- package/build-style/navigation-link/style-rtl.css +1 -1
- package/build-style/navigation-link/style.css +1 -1
- package/build-style/navigation-submenu/editor-rtl.css +1 -1
- package/build-style/navigation-submenu/editor.css +1 -1
- package/build-style/navigation-submenu/style-rtl.css +2 -0
- package/build-style/navigation-submenu/style.css +2 -0
- package/build-style/page-list/style-rtl.css +4 -16
- package/build-style/page-list/style.css +4 -16
- package/build-style/post-author/style-rtl.css +0 -1
- package/build-style/post-author/style.css +0 -1
- package/build-style/post-comments/style-rtl.css +21 -1
- package/build-style/post-comments/style.css +21 -1
- package/build-style/post-comments-form/style-rtl.css +29 -0
- package/build-style/post-comments-form/style.css +29 -0
- package/build-style/post-featured-image/editor-rtl.css +1 -1
- package/build-style/post-featured-image/editor.css +1 -1
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/quote/theme-rtl.css +1 -1
- package/build-style/quote/theme.css +1 -1
- package/build-style/reset-rtl.css +0 -5
- package/build-style/reset.css +0 -5
- package/build-style/search/style-rtl.css +18 -6
- package/build-style/search/style.css +18 -6
- package/build-style/separator/style-rtl.css +0 -1
- package/build-style/separator/style.css +0 -1
- package/build-style/site-logo/editor-rtl.css +82 -14
- package/build-style/site-logo/editor.css +82 -14
- package/build-style/site-logo/style-rtl.css +6 -2
- package/build-style/site-logo/style.css +6 -2
- package/build-style/social-link/editor-rtl.css +4 -0
- package/build-style/social-link/editor.css +4 -0
- package/build-style/social-links/editor-rtl.css +4 -0
- package/build-style/social-links/editor.css +4 -0
- package/build-style/social-links/style-rtl.css +7 -1
- package/build-style/social-links/style.css +7 -1
- package/build-style/style-rtl.css +192 -261
- package/build-style/style.css +192 -274
- package/build-style/template-part/editor-rtl.css +0 -7
- package/build-style/template-part/editor.css +0 -7
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/package.json +20 -19
- package/src/audio/test/edit.native.js +4 -0
- package/src/block/edit.js +1 -1
- package/src/button/block.json +4 -1
- package/src/button/deprecated.js +149 -4
- package/src/button/edit.native.js +319 -366
- package/src/button/editor.scss +0 -1
- package/src/button/style.scss +18 -41
- package/src/buttons/block.json +15 -10
- package/src/buttons/deprecated.js +76 -3
- package/src/buttons/edit.js +4 -49
- package/src/buttons/editor.scss +8 -9
- package/src/buttons/index.js +0 -2
- package/src/buttons/save.js +4 -21
- package/src/buttons/style.scss +1 -51
- package/src/categories/block.json +4 -0
- package/src/categories/edit.js +36 -18
- package/src/categories/index.php +3 -0
- package/src/code/block.json +24 -1
- package/src/code/edit.native.js +12 -14
- package/src/column/block.json +4 -0
- package/src/column/edit.js +8 -2
- package/src/column/save.js +9 -12
- package/src/columns/block.json +1 -0
- package/src/columns/edit.js +1 -1
- package/src/columns/save.js +5 -6
- package/src/columns/style.scss +1 -1
- package/src/comment-author-avatar/block.json +34 -0
- package/src/comment-author-avatar/edit.js +96 -0
- package/src/comment-author-avatar/index.js +18 -0
- package/src/comment-author-avatar/index.php +62 -0
- package/src/comment-author-name/block.json +43 -0
- package/src/comment-author-name/deprecated.js +50 -0
- package/src/comment-author-name/edit.js +124 -0
- package/src/comment-author-name/index.js +20 -0
- package/src/comment-author-name/index.php +57 -0
- package/src/comment-content/block.json +37 -0
- package/src/comment-content/edit.js +80 -0
- package/src/{post-comment-content → comment-content}/index.js +1 -1
- package/src/comment-content/index.php +56 -0
- package/src/comment-date/block.json +38 -0
- package/src/comment-date/deprecated.js +49 -0
- package/src/comment-date/edit.js +106 -0
- package/src/{post-comment-date → comment-date}/index.js +2 -0
- package/src/comment-date/index.php +56 -0
- package/src/comment-edit-link/block.json +36 -0
- package/src/comment-edit-link/edit.js +68 -0
- package/src/{post-comment-author → comment-edit-link}/index.js +5 -5
- package/src/comment-edit-link/index.php +58 -0
- package/src/comment-reply-link/block.json +32 -0
- package/src/comment-reply-link/edit.js +59 -0
- package/src/comment-reply-link/index.js +18 -0
- package/src/comment-reply-link/index.php +80 -0
- package/src/comment-template/block.json +15 -0
- package/src/comment-template/edit.js +100 -0
- package/src/comment-template/index.js +20 -0
- package/src/comment-template/index.php +65 -0
- package/src/comment-template/save.js +8 -0
- package/src/comments-query-loop/block.json +33 -0
- package/src/comments-query-loop/edit.js +53 -0
- package/src/comments-query-loop/index.js +20 -0
- package/src/comments-query-loop/save.js +14 -0
- package/src/comments-query-loop/toolbar.js +57 -0
- package/src/common.scss +3 -17
- package/src/cover/block.json +12 -1
- package/src/cover/deprecated.js +707 -510
- package/src/cover/edit.js +70 -42
- package/src/cover/edit.native.js +5 -1
- package/src/cover/editor.scss +20 -38
- package/src/cover/save.js +30 -26
- package/src/cover/shared.js +3 -2
- package/src/cover/style.scss +9 -7
- package/src/editor.scss +4 -20
- package/src/embed/edit.native.js +6 -9
- package/src/embed/embed-bottom-sheet.native.js +4 -5
- package/src/embed/embed-no-preview.native.js +1 -0
- package/src/embed/icons.js +11 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +181 -0
- package/src/embed/test/index.native.js +991 -0
- package/src/embed/transforms.native.js +2 -0
- package/src/embed/variations.js +21 -0
- package/src/file/test/__snapshots__/edit.native.js.snap +6 -3
- package/src/file/test/edit.native.js +4 -0
- package/src/freeform/edit.js +14 -4
- package/src/gallery/block.json +6 -1
- package/src/gallery/edit.js +7 -0
- package/src/gallery/editor.scss +0 -1
- package/src/gallery/gallery.js +1 -4
- package/src/gallery/gallery.native.js +1 -4
- package/src/gallery/index.php +52 -0
- package/src/gallery/save.js +9 -3
- package/src/gallery/shared.js +0 -7
- package/src/gallery/use-get-media.js +6 -11
- package/src/gallery/use-mobile-warning.js +28 -0
- package/src/group/block.json +1 -0
- package/src/group/edit.js +1 -1
- package/src/group/save.js +3 -8
- package/src/group/variations.js +1 -1
- package/src/heading/autogenerate-anchors.js +81 -0
- package/src/heading/block.json +14 -2
- package/src/heading/edit.js +42 -4
- package/src/home-link/index.php +3 -1
- package/src/image/block.json +1 -1
- package/src/image/edit.native.js +120 -64
- package/src/image/editor.scss +1 -0
- package/src/image/index.php +42 -0
- package/src/image/style.scss +8 -2
- package/src/image/test/edit.native.js +225 -40
- package/src/image/transforms.js +4 -0
- package/src/index.js +96 -88
- package/src/index.native.js +1 -1
- package/src/list/block.json +11 -2
- package/src/list/deprecated.js +79 -0
- package/src/list/index.js +2 -0
- package/src/media-text/edit.js +1 -1
- package/src/media-text/save.js +6 -4
- package/src/media-text/style.scss +1 -0
- package/src/navigation/block.json +41 -13
- package/src/navigation/deprecated.js +336 -27
- package/src/navigation/edit/index.js +510 -0
- package/src/navigation/edit/inner-blocks.js +134 -0
- package/src/navigation/edit/navigation-menu-delete-control.js +81 -0
- package/src/navigation/edit/navigation-menu-name-control.js +22 -0
- package/src/navigation/edit/navigation-menu-name-modal.js +69 -0
- package/src/navigation/edit/navigation-menu-publish-button.js +57 -0
- package/src/navigation/edit/navigation-menu-selector.js +42 -0
- package/src/navigation/edit/placeholder/index.js +257 -0
- package/src/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +13 -2
- package/src/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +8 -6
- package/src/navigation/edit/unsaved-inner-blocks.js +197 -0
- package/src/navigation/edit/use-list-view-modal.js +72 -0
- package/src/navigation/editor.scss +86 -31
- package/src/navigation/index.js +0 -2
- package/src/navigation/index.php +54 -107
- package/src/navigation/save.js +7 -1
- package/src/navigation/style.scss +81 -155
- package/src/navigation/use-navigation-menu.js +60 -0
- package/src/navigation/use-template-part-area-label.js +78 -0
- package/src/navigation/view.js +33 -32
- package/src/navigation-area/block.json +27 -0
- package/src/navigation-area/edit.js +105 -0
- package/src/navigation-area/index.js +26 -0
- package/src/navigation-area/index.php +21 -0
- package/src/navigation-area/inner-blocks.js +24 -0
- package/src/navigation-area/save.js +8 -0
- package/src/navigation-link/edit.js +97 -12
- package/src/navigation-link/editor.scss +30 -19
- package/src/navigation-link/index.php +8 -10
- package/src/navigation-link/style.scss +1 -1
- package/src/navigation-link/transforms.js +5 -1
- package/src/navigation-submenu/edit.js +2 -2
- package/src/navigation-submenu/editor.scss +1 -1
- package/src/navigation-submenu/index.php +10 -9
- package/src/navigation-submenu/style.scss +5 -0
- package/src/page-list/block.json +0 -33
- package/src/page-list/edit.js +168 -110
- package/src/page-list/index.php +27 -26
- package/src/page-list/style.scss +4 -23
- package/src/paragraph/block.json +8 -1
- package/src/paragraph/edit.native.js +1 -0
- package/src/pattern/block.json +17 -0
- package/src/pattern/edit.js +41 -0
- package/src/pattern/index.js +12 -0
- package/src/pattern/index.php +44 -0
- package/src/post-author/block.json +12 -1
- package/src/post-author/style.scss +0 -1
- package/src/post-comment/block.json +4 -3
- package/src/post-comment/edit.js +16 -13
- package/src/post-comment/save.js +4 -6
- package/src/post-comments/block.json +8 -1
- package/src/post-comments/index.php +12 -3
- package/src/post-comments/style.scss +27 -1
- package/src/post-comments-count/block.json +7 -1
- package/src/post-comments-form/block.json +9 -2
- package/src/post-comments-form/index.php +0 -14
- package/src/post-comments-form/style.scss +47 -7
- package/src/post-comments-link/block.json +8 -1
- package/src/post-content/edit.js +2 -2
- package/src/post-date/block.json +8 -1
- package/src/post-date/deprecated.js +52 -0
- package/src/post-date/edit.js +1 -1
- package/src/post-date/index.js +2 -0
- package/src/post-excerpt/block.json +12 -1
- package/src/post-excerpt/edit.js +1 -7
- package/src/post-excerpt/index.php +7 -1
- package/src/post-featured-image/block.json +5 -1
- package/src/post-featured-image/editor.scss +1 -1
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +8 -1
- package/src/post-navigation-link/index.php +1 -2
- package/src/post-template/edit.js +8 -3
- package/src/post-template/index.php +0 -11
- package/src/post-terms/block.json +7 -1
- package/src/post-terms/edit.js +2 -14
- package/src/post-terms/use-post-terms.js +1 -1
- package/src/post-title/block.json +10 -1
- package/src/post-title/deprecated.js +65 -0
- package/src/post-title/edit.js +1 -1
- package/src/post-title/index.js +2 -0
- package/src/post-title/index.php +7 -2
- package/src/preformatted/block.json +9 -1
- package/src/preformatted/edit.js +2 -1
- package/src/preformatted/edit.native.js +20 -6
- package/src/preformatted/styles.native.scss +5 -0
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +20 -2
- package/src/pullquote/block.json +12 -0
- package/src/pullquote/blockquote.native.js +12 -2
- package/src/pullquote/edit.native.js +129 -0
- package/src/pullquote/figure.native.js +17 -7
- package/src/query/edit/index.js +1 -1
- package/src/query/save.js +4 -6
- package/src/query-pagination/edit.js +1 -1
- package/src/query-pagination-next/block.json +8 -1
- package/src/query-pagination-previous/block.json +8 -1
- package/src/query-title/block.json +13 -1
- package/src/query-title/deprecated.js +51 -0
- package/src/query-title/index.js +2 -0
- package/src/quote/block.json +15 -1
- package/src/quote/deprecated.js +10 -0
- package/src/quote/theme.scss +1 -0
- package/src/reset.scss +0 -9
- package/src/search/edit.js +29 -0
- package/src/search/edit.native.js +46 -12
- package/src/search/style.scss +54 -52
- package/src/search/test/__snapshots__/edit.native.js.snap +33 -5
- package/src/search/test/edit.native.js +4 -0
- package/src/separator/separator-settings.js +1 -0
- package/src/separator/style.scss +0 -1
- package/src/site-logo/block.json +6 -0
- package/src/site-logo/edit.js +59 -34
- package/src/site-logo/editor.scss +101 -16
- package/src/site-logo/index.php +20 -19
- package/src/site-logo/style.scss +8 -2
- package/src/site-tagline/block.json +7 -2
- package/src/site-tagline/deprecated.js +49 -0
- package/src/site-tagline/index.js +2 -0
- package/src/site-title/block.json +11 -1
- package/src/site-title/deprecated.js +62 -0
- package/src/site-title/index.js +2 -0
- package/src/site-title/index.php +3 -0
- package/src/social-link/editor.scss +4 -0
- package/src/social-links/block.json +1 -0
- package/src/social-links/edit.js +2 -1
- package/src/social-links/editor.scss +4 -0
- package/src/social-links/save.js +4 -6
- package/src/social-links/style.scss +8 -1
- package/src/table/block.json +11 -0
- package/src/template-part/edit/inner-blocks.js +1 -1
- package/src/template-part/edit/placeholder/index.js +5 -3
- package/src/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/src/template-part/edit/selection/template-part-previews.js +3 -1
- package/src/template-part/editor.scss +0 -16
- package/src/template-part/index.php +6 -3
- package/src/template-part/variations.js +2 -2
- package/src/term-description/block.json +4 -1
- package/src/term-description/edit.js +1 -1
- package/src/utils/clean-empty-object.js +23 -0
- package/src/utils/migrate-font-family.js +37 -0
- package/src/verse/block.json +10 -1
- package/src/verse/deprecated.js +86 -25
- package/build/buttons/variations.js +0 -33
- package/build/buttons/variations.js.map +0 -1
- package/build/navigation/block-navigation-list.js.map +0 -1
- package/build/navigation/edit.js +0 -304
- package/build/navigation/edit.js.map +0 -1
- package/build/navigation/placeholder-preview.js.map +0 -1
- package/build/navigation/placeholder.js +0 -129
- package/build/navigation/placeholder.js.map +0 -1
- package/build/navigation/responsive-wrapper.js.map +0 -1
- package/build/navigation/use-block-navigator.js +0 -51
- package/build/navigation/use-block-navigator.js.map +0 -1
- package/build/navigation/variations.js +0 -32
- package/build/navigation/variations.js.map +0 -1
- package/build/post-comment-author/edit.js +0 -51
- package/build/post-comment-author/edit.js.map +0 -1
- package/build/post-comment-author/index.js.map +0 -1
- package/build/post-comment-content/edit.js +0 -37
- package/build/post-comment-content/edit.js.map +0 -1
- package/build/post-comment-content/index.js.map +0 -1
- package/build/post-comment-date/edit.js +0 -62
- package/build/post-comment-date/edit.js.map +0 -1
- package/build/post-comment-date/index.js.map +0 -1
- package/build-module/buttons/variations.js +0 -24
- package/build-module/buttons/variations.js.map +0 -1
- package/build-module/navigation/block-navigation-list.js.map +0 -1
- package/build-module/navigation/edit.js +0 -284
- package/build-module/navigation/edit.js.map +0 -1
- package/build-module/navigation/placeholder-preview.js.map +0 -1
- package/build-module/navigation/placeholder.js +0 -113
- package/build-module/navigation/placeholder.js.map +0 -1
- package/build-module/navigation/responsive-wrapper.js.map +0 -1
- package/build-module/navigation/use-block-navigator.js +0 -39
- package/build-module/navigation/use-block-navigator.js.map +0 -1
- package/build-module/navigation/variations.js +0 -23
- package/build-module/navigation/variations.js.map +0 -1
- package/build-module/post-comment-author/edit.js +0 -40
- package/build-module/post-comment-author/edit.js.map +0 -1
- package/build-module/post-comment-author/index.js +0 -31
- package/build-module/post-comment-author/index.js.map +0 -1
- package/build-module/post-comment-content/edit.js +0 -27
- package/build-module/post-comment-content/edit.js.map +0 -1
- package/build-module/post-comment-content/index.js +0 -31
- package/build-module/post-comment-content/index.js.map +0 -1
- package/build-module/post-comment-date/edit.js +0 -52
- package/build-module/post-comment-date/edit.js.map +0 -1
- package/build-module/post-comment-date/index.js +0 -36
- package/build-module/post-comment-date/index.js.map +0 -1
- package/build-style/post-author/editor-rtl.css +0 -104
- package/build-style/post-author/editor.css +0 -104
- package/build-style/query-title/editor-rtl.css +0 -80
- package/build-style/query-title/editor.css +0 -80
- package/build-style/term-description/editor-rtl.css +0 -80
- package/build-style/term-description/editor.css +0 -80
- package/src/buttons/variations.js +0 -24
- package/src/navigation/block-navigation-list.js +0 -38
- package/src/navigation/edit.js +0 -411
- package/src/navigation/placeholder.js +0 -154
- package/src/navigation/use-block-navigator.js +0 -46
- package/src/navigation/variations.js +0 -23
- package/src/post-author/editor.scss +0 -35
- package/src/post-comment-author/block.json +0 -13
- package/src/post-comment-author/edit.js +0 -35
- package/src/post-comment-author/index.php +0 -41
- package/src/post-comment-content/block.json +0 -13
- package/src/post-comment-content/edit.js +0 -32
- package/src/post-comment-content/index.php +0 -42
- package/src/post-comment-date/block.json +0 -18
- package/src/post-comment-date/edit.js +0 -54
- package/src/post-comment-date/index.php +0 -44
- package/src/query-title/editor.scss +0 -4
- package/src/term-description/editor.scss +0 -4
|
@@ -2,20 +2,22 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { View, AccessibilityInfo, Platform, Text } from 'react-native';
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* WordPress dependencies
|
|
7
8
|
*/
|
|
8
|
-
import {
|
|
9
|
+
import { useCallback, useEffect, useState, useRef } from '@wordpress/element';
|
|
10
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
9
11
|
import { __, _x } from '@wordpress/i18n';
|
|
10
12
|
import {
|
|
11
13
|
RichText,
|
|
12
14
|
InspectorControls,
|
|
13
15
|
BlockControls,
|
|
14
|
-
withGradient,
|
|
15
16
|
store as blockEditorStore,
|
|
16
17
|
getColorObjectByAttributeValues,
|
|
17
18
|
getGradientValueBySlug,
|
|
18
19
|
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
|
|
20
|
+
useSetting,
|
|
19
21
|
} from '@wordpress/block-editor';
|
|
20
22
|
import {
|
|
21
23
|
PanelBody,
|
|
@@ -28,9 +30,8 @@ import {
|
|
|
28
30
|
CSS_UNITS,
|
|
29
31
|
filterUnitsWithSettings,
|
|
30
32
|
} from '@wordpress/components';
|
|
31
|
-
import { Component } from '@wordpress/element';
|
|
32
|
-
import { withSelect, withDispatch } from '@wordpress/data';
|
|
33
33
|
import { link } from '@wordpress/icons';
|
|
34
|
+
import { store as editPostStore } from '@wordpress/edit-post';
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* Internal dependencies
|
|
@@ -86,118 +87,111 @@ function WidthPanel( { selectedWidth, setAttributes } ) {
|
|
|
86
87
|
);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.onChangeBorderRadius = this.onChangeBorderRadius.bind( this );
|
|
94
|
-
this.onChangeBorderRadiusUnit = this.onChangeBorderRadiusUnit.bind(
|
|
95
|
-
this
|
|
96
|
-
);
|
|
97
|
-
this.onClearSettings = this.onClearSettings.bind( this );
|
|
98
|
-
this.onLayout = this.onLayout.bind( this );
|
|
99
|
-
this.onSetMaxWidth = this.onSetMaxWidth.bind( this );
|
|
100
|
-
this.dismissSheet = this.dismissSheet.bind( this );
|
|
101
|
-
this.onShowLinkSettings = this.onShowLinkSettings.bind( this );
|
|
102
|
-
this.onHideLinkSettings = this.onHideLinkSettings.bind( this );
|
|
103
|
-
this.onToggleButtonFocus = this.onToggleButtonFocus.bind( this );
|
|
104
|
-
this.onPlaceholderTextWidth = this.onPlaceholderTextWidth.bind( this );
|
|
105
|
-
this.setRef = this.setRef.bind( this );
|
|
106
|
-
this.onRemove = this.onRemove.bind( this );
|
|
107
|
-
this.getPlaceholderWidth = this.getPlaceholderWidth.bind( this );
|
|
108
|
-
|
|
109
|
-
const borderRadius = props?.attributes?.style?.border?.radius;
|
|
110
|
-
const { valueUnit = 'px' } = getValueAndUnit( borderRadius ) || {};
|
|
111
|
-
|
|
112
|
-
this.state = {
|
|
113
|
-
maxWidth: INITIAL_MAX_WIDTH,
|
|
114
|
-
isLinkSheetVisible: false,
|
|
115
|
-
isButtonFocused: true,
|
|
116
|
-
placeholderTextWidth: 0,
|
|
117
|
-
borderRadiusUnit: valueUnit,
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
this.linkSettingsActions = [
|
|
121
|
-
{
|
|
122
|
-
label: __( 'Remove link' ),
|
|
123
|
-
onPress: this.onClearSettings,
|
|
124
|
-
},
|
|
125
|
-
];
|
|
126
|
-
|
|
127
|
-
this.linkSettingsOptions = {
|
|
128
|
-
url: {
|
|
129
|
-
label: __( 'Button Link URL' ),
|
|
130
|
-
placeholder: __( 'Add URL' ),
|
|
131
|
-
autoFocus: true,
|
|
132
|
-
autoFill: true,
|
|
133
|
-
},
|
|
134
|
-
openInNewTab: {
|
|
135
|
-
label: __( 'Open in new tab' ),
|
|
136
|
-
},
|
|
137
|
-
linkRel: {
|
|
138
|
-
label: __( 'Link Rel' ),
|
|
139
|
-
placeholder: _x(
|
|
140
|
-
'None',
|
|
141
|
-
'Link rel attribute value placeholder'
|
|
142
|
-
),
|
|
143
|
-
},
|
|
144
|
-
};
|
|
90
|
+
function ButtonEdit( props ) {
|
|
91
|
+
const { isSelected, parentWidth } = props;
|
|
92
|
+
const initialBorderRadius = props?.attributes?.style?.border?.radius;
|
|
93
|
+
const { valueUnit = 'px' } = getValueAndUnit( initialBorderRadius ) || {};
|
|
145
94
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
95
|
+
const { editorSidebarOpened, numOfButtons } = useSelect(
|
|
96
|
+
( select ) => {
|
|
97
|
+
const { isEditorSidebarOpened } = select( editPostStore );
|
|
98
|
+
const { getBlockCount, getBlockRootClientId } = select(
|
|
99
|
+
blockEditorStore
|
|
100
|
+
);
|
|
101
|
+
const parentId = getBlockRootClientId( clientId );
|
|
102
|
+
const blockCount = getBlockCount( parentId );
|
|
103
|
+
const currentIsEditorSidebarOpened = isEditorSidebarOpened();
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
editorSidebarOpened: isSelected && currentIsEditorSidebarOpened,
|
|
107
|
+
numOfButtons: blockCount,
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
[ clientId, isSelected ]
|
|
111
|
+
);
|
|
154
112
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
113
|
+
const { closeGeneralSidebar } = useDispatch( editPostStore );
|
|
114
|
+
const [ maxWidth, setMaxWidth ] = useState( INITIAL_MAX_WIDTH );
|
|
115
|
+
const [ isLinkSheetVisible, setIsLinkSheetVisible ] = useState( false );
|
|
116
|
+
const [ isButtonFocused, setIsButtonFocused ] = useState( true );
|
|
117
|
+
const [ placeholderTextWidth, setPlaceholderTextWidth ] = useState( 0 );
|
|
118
|
+
const [ borderRadiusUnit, setBorderRadiusUnit ] = useState( valueUnit );
|
|
158
119
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
120
|
+
const richTextRef = useRef();
|
|
121
|
+
const colors = useSetting( 'color.palette' ) || [];
|
|
122
|
+
const gradients = useSetting( 'color.gradients' ) || [];
|
|
162
123
|
|
|
163
|
-
|
|
164
|
-
|
|
124
|
+
useEffect( () => {
|
|
125
|
+
if ( isSelected ) {
|
|
126
|
+
onToggleButtonFocus( true );
|
|
165
127
|
}
|
|
128
|
+
}, [ isSelected ] );
|
|
166
129
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
130
|
+
useEffect( () => {
|
|
131
|
+
onSetMaxWidth( null, true );
|
|
132
|
+
}, [ parentWidth ] );
|
|
170
133
|
|
|
134
|
+
useEffect( () => {
|
|
171
135
|
// Blur `RichText` on Android when link settings sheet or button settings sheet is opened,
|
|
172
136
|
// to avoid flashing caret after closing one of them
|
|
173
|
-
if (
|
|
174
|
-
(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if ( Platform.OS === 'android' && this.richTextRef ) {
|
|
178
|
-
this.richTextRef.blur();
|
|
179
|
-
this.onToggleButtonFocus( false );
|
|
137
|
+
if ( editorSidebarOpened || isLinkSheetVisible ) {
|
|
138
|
+
if ( Platform.OS === 'android' && richTextRef?.current ) {
|
|
139
|
+
richTextRef.current.blur();
|
|
140
|
+
onToggleButtonFocus( false );
|
|
180
141
|
}
|
|
181
142
|
}
|
|
143
|
+
}, [ editorSidebarOpened, isLinkSheetVisible ] );
|
|
182
144
|
|
|
183
|
-
|
|
145
|
+
useEffect( () => {
|
|
146
|
+
if ( richTextRef?.current ) {
|
|
184
147
|
if ( ! isSelected && isButtonFocused ) {
|
|
185
|
-
|
|
148
|
+
onToggleButtonFocus( false );
|
|
186
149
|
}
|
|
187
150
|
|
|
188
151
|
if ( isSelected && ! isButtonFocused ) {
|
|
189
152
|
AccessibilityInfo.isScreenReaderEnabled().then( ( enabled ) => {
|
|
190
153
|
if ( enabled ) {
|
|
191
|
-
|
|
192
|
-
|
|
154
|
+
onToggleButtonFocus( true );
|
|
155
|
+
richTextRef?.current.focus();
|
|
193
156
|
}
|
|
194
157
|
} );
|
|
195
158
|
}
|
|
196
159
|
}
|
|
197
|
-
}
|
|
160
|
+
}, [ isSelected, isButtonFocused ] );
|
|
161
|
+
|
|
162
|
+
const linkSettingsActions = [
|
|
163
|
+
{
|
|
164
|
+
label: __( 'Remove link' ),
|
|
165
|
+
onPress: onClearSettings,
|
|
166
|
+
},
|
|
167
|
+
];
|
|
198
168
|
|
|
199
|
-
|
|
200
|
-
|
|
169
|
+
const linkSettingsOptions = {
|
|
170
|
+
url: {
|
|
171
|
+
label: __( 'Button Link URL' ),
|
|
172
|
+
placeholder: __( 'Add URL' ),
|
|
173
|
+
autoFocus: true,
|
|
174
|
+
autoFill: true,
|
|
175
|
+
},
|
|
176
|
+
openInNewTab: {
|
|
177
|
+
label: __( 'Open in new tab' ),
|
|
178
|
+
},
|
|
179
|
+
linkRel: {
|
|
180
|
+
label: __( 'Link Rel' ),
|
|
181
|
+
placeholder: _x( 'None', 'Link rel attribute value placeholder' ),
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const noFocusLinkSettingOptions = {
|
|
186
|
+
...linkSettingsOptions,
|
|
187
|
+
url: {
|
|
188
|
+
...linkSettingsOptions.url,
|
|
189
|
+
autoFocus: false,
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
function getBackgroundColor() {
|
|
194
|
+
const { attributes, style } = props;
|
|
201
195
|
const { backgroundColor, gradient } = attributes;
|
|
202
196
|
|
|
203
197
|
// Return named gradient value if available.
|
|
@@ -225,8 +219,8 @@ class ButtonEdit extends Component {
|
|
|
225
219
|
);
|
|
226
220
|
}
|
|
227
221
|
|
|
228
|
-
getTextColor() {
|
|
229
|
-
const { attributes,
|
|
222
|
+
function getTextColor() {
|
|
223
|
+
const { attributes, style } = props;
|
|
230
224
|
const colorProps = getColorClassesAndStyles( attributes );
|
|
231
225
|
|
|
232
226
|
// Retrieve named color object to force inline styles for themes that
|
|
@@ -244,32 +238,31 @@ class ButtonEdit extends Component {
|
|
|
244
238
|
);
|
|
245
239
|
}
|
|
246
240
|
|
|
247
|
-
onChangeText( value ) {
|
|
248
|
-
const { setAttributes } =
|
|
241
|
+
function onChangeText( value ) {
|
|
242
|
+
const { setAttributes } = props;
|
|
249
243
|
setAttributes( { text: value } );
|
|
250
244
|
}
|
|
251
245
|
|
|
252
|
-
onChangeBorderRadius( newRadius ) {
|
|
253
|
-
const { setAttributes, attributes } =
|
|
254
|
-
const { borderRadiusUnit } = this.state;
|
|
246
|
+
function onChangeBorderRadius( newRadius ) {
|
|
247
|
+
const { setAttributes, attributes } = props;
|
|
255
248
|
const { style } = attributes;
|
|
256
|
-
const newStyle =
|
|
249
|
+
const newStyle = getNewStyle( style, newRadius, borderRadiusUnit );
|
|
257
250
|
|
|
258
251
|
setAttributes( { style: newStyle } );
|
|
259
252
|
}
|
|
260
253
|
|
|
261
|
-
onChangeBorderRadiusUnit( newRadiusUnit ) {
|
|
262
|
-
const { setAttributes, attributes } =
|
|
254
|
+
function onChangeBorderRadiusUnit( newRadiusUnit ) {
|
|
255
|
+
const { setAttributes, attributes } = props;
|
|
263
256
|
const { style } = attributes;
|
|
264
|
-
const
|
|
257
|
+
const newBorderRadius = getBorderRadiusValue(
|
|
265
258
|
attributes?.style?.border?.radius
|
|
266
259
|
);
|
|
267
|
-
const newStyle =
|
|
260
|
+
const newStyle = getNewStyle( style, newBorderRadius, newRadiusUnit );
|
|
268
261
|
setAttributes( { style: newStyle } );
|
|
269
|
-
|
|
262
|
+
setBorderRadiusUnit( newRadiusUnit );
|
|
270
263
|
}
|
|
271
264
|
|
|
272
|
-
getNewStyle( style, radius, radiusUnit ) {
|
|
265
|
+
function getNewStyle( style, radius, radiusUnit ) {
|
|
273
266
|
return {
|
|
274
267
|
...style,
|
|
275
268
|
border: {
|
|
@@ -279,22 +272,22 @@ class ButtonEdit extends Component {
|
|
|
279
272
|
};
|
|
280
273
|
}
|
|
281
274
|
|
|
282
|
-
onShowLinkSettings() {
|
|
283
|
-
|
|
275
|
+
function onShowLinkSettings() {
|
|
276
|
+
setIsLinkSheetVisible( true );
|
|
284
277
|
}
|
|
285
278
|
|
|
286
|
-
onHideLinkSettings() {
|
|
287
|
-
|
|
279
|
+
function onHideLinkSettings() {
|
|
280
|
+
setIsLinkSheetVisible( false );
|
|
288
281
|
}
|
|
289
282
|
|
|
290
|
-
onToggleButtonFocus( value ) {
|
|
291
|
-
if ( value !==
|
|
292
|
-
|
|
283
|
+
function onToggleButtonFocus( value ) {
|
|
284
|
+
if ( value !== isButtonFocused ) {
|
|
285
|
+
setIsButtonFocused( value );
|
|
293
286
|
}
|
|
294
287
|
}
|
|
295
288
|
|
|
296
|
-
onClearSettings() {
|
|
297
|
-
const { setAttributes } =
|
|
289
|
+
function onClearSettings() {
|
|
290
|
+
const { setAttributes } = props;
|
|
298
291
|
|
|
299
292
|
setAttributes( {
|
|
300
293
|
url: '',
|
|
@@ -302,35 +295,34 @@ class ButtonEdit extends Component {
|
|
|
302
295
|
linkTarget: '',
|
|
303
296
|
} );
|
|
304
297
|
|
|
305
|
-
|
|
298
|
+
onHideLinkSettings();
|
|
306
299
|
}
|
|
307
300
|
|
|
308
|
-
onLayout( { nativeEvent } ) {
|
|
301
|
+
function onLayout( { nativeEvent } ) {
|
|
309
302
|
const { width } = nativeEvent.layout;
|
|
310
|
-
|
|
303
|
+
onSetMaxWidth( width );
|
|
311
304
|
}
|
|
312
305
|
|
|
313
|
-
onSetMaxWidth
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
const isWidthChanged = maxWidth !== width;
|
|
322
|
-
|
|
323
|
-
if ( parentWidth && ! width && isParentWidthChanged ) {
|
|
324
|
-
this.setState( {
|
|
325
|
-
maxWidth: parentWidth - spacing,
|
|
326
|
-
} );
|
|
327
|
-
} else if ( ! parentWidth && width && isWidthChanged ) {
|
|
328
|
-
this.setState( { maxWidth: width - spacing } );
|
|
329
|
-
}
|
|
330
|
-
}
|
|
306
|
+
const onSetMaxWidth = useCallback(
|
|
307
|
+
( width, isParentWidthDidChange = false ) => {
|
|
308
|
+
const { marginRight: spacing } = styles.defaultButton;
|
|
309
|
+
|
|
310
|
+
const isParentWidthChanged = isParentWidthDidChange
|
|
311
|
+
? isParentWidthDidChange
|
|
312
|
+
: maxWidth !== parentWidth;
|
|
313
|
+
const isWidthChanged = maxWidth !== width;
|
|
331
314
|
|
|
332
|
-
|
|
333
|
-
|
|
315
|
+
if ( parentWidth && ! width && isParentWidthChanged ) {
|
|
316
|
+
setMaxWidth( parentWidth - spacing );
|
|
317
|
+
} else if ( ! parentWidth && width && isWidthChanged ) {
|
|
318
|
+
setMaxWidth( width - spacing );
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
[ maxWidth, parentWidth ]
|
|
322
|
+
);
|
|
323
|
+
|
|
324
|
+
function onRemove() {
|
|
325
|
+
const { onDeleteBlock, onReplace } = props;
|
|
334
326
|
|
|
335
327
|
if ( numOfButtons === 1 ) {
|
|
336
328
|
onDeleteBlock();
|
|
@@ -339,273 +331,234 @@ class ButtonEdit extends Component {
|
|
|
339
331
|
}
|
|
340
332
|
}
|
|
341
333
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
334
|
+
function onPlaceholderTextWidth( { nativeEvent } ) {
|
|
335
|
+
const textWidth =
|
|
336
|
+
nativeEvent.lines[ 0 ] && nativeEvent.lines[ 0 ].width;
|
|
337
|
+
|
|
338
|
+
if ( textWidth && textWidth !== placeholderTextWidth ) {
|
|
339
|
+
setPlaceholderTextWidth( Math.min( textWidth, maxWidth ) );
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const onSetRef = useCallback(
|
|
344
|
+
( ref ) => {
|
|
345
|
+
richTextRef.current = ref;
|
|
346
|
+
},
|
|
347
|
+
[ richTextRef ]
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
const onUnstableOnFocus = useCallback( () => {
|
|
351
|
+
onToggleButtonFocus( true );
|
|
352
|
+
}, [] );
|
|
353
|
+
|
|
354
|
+
const onBlur = useCallback( () => {
|
|
355
|
+
onSetMaxWidth();
|
|
356
|
+
}, [] );
|
|
357
|
+
|
|
358
|
+
function dismissSheet() {
|
|
359
|
+
onHideLinkSettings();
|
|
360
|
+
closeGeneralSidebar();
|
|
345
361
|
}
|
|
346
362
|
|
|
347
|
-
getLinkSettings( isCompatibleWithSettings ) {
|
|
348
|
-
const {
|
|
349
|
-
const { attributes, setAttributes } = this.props;
|
|
363
|
+
function getLinkSettings( isCompatibleWithSettings ) {
|
|
364
|
+
const { attributes, setAttributes } = props;
|
|
350
365
|
return (
|
|
351
366
|
<LinkSettingsNavigation
|
|
352
367
|
isVisible={ isLinkSheetVisible }
|
|
353
368
|
url={ attributes.url }
|
|
354
369
|
rel={ attributes.rel }
|
|
355
370
|
linkTarget={ attributes.linkTarget }
|
|
356
|
-
onClose={
|
|
371
|
+
onClose={ dismissSheet }
|
|
357
372
|
setAttributes={ setAttributes }
|
|
358
373
|
withBottomSheet={ ! isCompatibleWithSettings }
|
|
359
374
|
hasPicker
|
|
360
|
-
actions={
|
|
375
|
+
actions={ linkSettingsActions }
|
|
361
376
|
options={
|
|
362
377
|
isCompatibleWithSettings
|
|
363
|
-
?
|
|
364
|
-
:
|
|
378
|
+
? linkSettingsOptions
|
|
379
|
+
: noFocusLinkSettingOptions
|
|
365
380
|
}
|
|
366
381
|
showIcon={ ! isCompatibleWithSettings }
|
|
367
382
|
/>
|
|
368
383
|
);
|
|
369
384
|
}
|
|
370
385
|
|
|
371
|
-
setRef( richText ) {
|
|
372
|
-
this.richTextRef = richText;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
386
|
// Render `Text` with `placeholderText` styled as a placeholder
|
|
376
387
|
// to calculate its width which then is set as a `minWidth`
|
|
377
|
-
getPlaceholderWidth( placeholderText ) {
|
|
388
|
+
function getPlaceholderWidth( placeholderText ) {
|
|
378
389
|
return (
|
|
379
390
|
<Text
|
|
380
391
|
style={ styles.placeholder }
|
|
381
|
-
onTextLayout={
|
|
392
|
+
onTextLayout={ onPlaceholderTextWidth }
|
|
382
393
|
>
|
|
383
394
|
{ placeholderText }
|
|
384
395
|
</Text>
|
|
385
396
|
);
|
|
386
397
|
}
|
|
387
398
|
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
const textWidth =
|
|
391
|
-
nativeEvent.lines[ 0 ] && nativeEvent.lines[ 0 ].width;
|
|
392
|
-
|
|
393
|
-
if ( textWidth && textWidth !== placeholderTextWidth ) {
|
|
394
|
-
this.setState( {
|
|
395
|
-
placeholderTextWidth: Math.min( textWidth, maxWidth ),
|
|
396
|
-
} );
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
getBorderRadiusValue( borderRadius, defaultBorderRadius ) {
|
|
401
|
-
const valueAndUnit = getValueAndUnit( borderRadius );
|
|
399
|
+
function getBorderRadiusValue( currentBorderRadius, defaultBorderRadius ) {
|
|
400
|
+
const valueAndUnit = getValueAndUnit( currentBorderRadius );
|
|
402
401
|
if ( Number.isInteger( parseInt( valueAndUnit?.valueToConvert ) ) ) {
|
|
403
402
|
return parseFloat( valueAndUnit.valueToConvert );
|
|
404
403
|
}
|
|
405
404
|
return defaultBorderRadius;
|
|
406
405
|
}
|
|
407
406
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
isButtonFocused,
|
|
430
|
-
placeholderTextWidth,
|
|
431
|
-
borderRadiusUnit,
|
|
432
|
-
} = this.state;
|
|
433
|
-
const { paddingTop: spacing, borderWidth } = styles.defaultButton;
|
|
434
|
-
|
|
435
|
-
if ( parentWidth === 0 ) {
|
|
436
|
-
return null;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
const borderRadius = buttonStyle?.border?.radius;
|
|
440
|
-
const borderRadiusValue = this.getBorderRadiusValue(
|
|
441
|
-
borderRadius,
|
|
442
|
-
styles.defaultButton.borderRadius
|
|
443
|
-
);
|
|
407
|
+
const {
|
|
408
|
+
attributes,
|
|
409
|
+
clientId,
|
|
410
|
+
onReplace,
|
|
411
|
+
mergeBlocks,
|
|
412
|
+
setAttributes,
|
|
413
|
+
style,
|
|
414
|
+
} = props;
|
|
415
|
+
const {
|
|
416
|
+
placeholder,
|
|
417
|
+
text,
|
|
418
|
+
style: buttonStyle,
|
|
419
|
+
url,
|
|
420
|
+
align = 'center',
|
|
421
|
+
width,
|
|
422
|
+
} = attributes;
|
|
423
|
+
const { paddingTop: spacing, borderWidth } = styles.defaultButton;
|
|
424
|
+
|
|
425
|
+
if ( parentWidth === 0 ) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
444
428
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
buttonBorderRadiusValue > 0
|
|
451
|
-
? buttonBorderRadiusValue + spacing + borderWidth
|
|
452
|
-
: 0;
|
|
453
|
-
|
|
454
|
-
// To achieve proper expanding and shrinking `RichText` on iOS, there is a need to set a `minWidth`
|
|
455
|
-
// value at least on 1 when `RichText` is focused or when is not focused, but `RichText` value is
|
|
456
|
-
// different than empty string.
|
|
457
|
-
let minWidth =
|
|
458
|
-
isButtonFocused || ( ! isButtonFocused && text && text !== '' )
|
|
459
|
-
? MIN_WIDTH
|
|
460
|
-
: placeholderTextWidth;
|
|
461
|
-
if ( width ) {
|
|
462
|
-
// Set the width of the button.
|
|
463
|
-
minWidth = Math.floor(
|
|
464
|
-
maxWidth * ( width / 100 ) - MIN_WIDTH_MARGINS[ width ]
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set
|
|
468
|
-
// a `placeholder` as an empty string when `RichText` is focused,
|
|
469
|
-
// because `AztecView` is calculating a `minWidth` based on placeholder text.
|
|
470
|
-
const placeholderText =
|
|
471
|
-
isButtonFocused || ( ! isButtonFocused && text && text !== '' )
|
|
472
|
-
? ''
|
|
473
|
-
: placeholder || __( 'Add text…' );
|
|
474
|
-
|
|
475
|
-
const backgroundColor = this.getBackgroundColor();
|
|
476
|
-
const textColor = this.getTextColor();
|
|
477
|
-
const isFixedWidth = !! width;
|
|
429
|
+
const currentBorderRadius = buttonStyle?.border?.radius;
|
|
430
|
+
const borderRadiusValue = getBorderRadiusValue(
|
|
431
|
+
currentBorderRadius,
|
|
432
|
+
styles.defaultButton.borderRadius
|
|
433
|
+
);
|
|
478
434
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
unstableOnFocus={ () =>
|
|
526
|
-
this.onToggleButtonFocus( true )
|
|
527
|
-
}
|
|
528
|
-
__unstableMobileNoFocusOnMount={ ! isSelected }
|
|
529
|
-
selectionColor={ textColor }
|
|
530
|
-
onBlur={ () => {
|
|
531
|
-
this.onSetMaxWidth();
|
|
532
|
-
} }
|
|
533
|
-
onReplace={ onReplace }
|
|
534
|
-
onRemove={ this.onRemove }
|
|
535
|
-
onMerge={ mergeBlocks }
|
|
536
|
-
/>
|
|
537
|
-
</ColorBackground>
|
|
435
|
+
const buttonBorderRadiusValue =
|
|
436
|
+
borderRadiusUnit === 'px' || borderRadiusUnit === '%'
|
|
437
|
+
? borderRadiusValue
|
|
438
|
+
: Math.floor( 14 * borderRadiusValue ); // lets assume that the font size is set to 14px; TO get a nicer preview.
|
|
439
|
+
const outlineBorderRadius =
|
|
440
|
+
buttonBorderRadiusValue > 0
|
|
441
|
+
? buttonBorderRadiusValue + spacing + borderWidth
|
|
442
|
+
: 0;
|
|
443
|
+
|
|
444
|
+
// To achieve proper expanding and shrinking `RichText` on iOS, there is a need to set a `minWidth`
|
|
445
|
+
// value at least on 1 when `RichText` is focused or when is not focused, but `RichText` value is
|
|
446
|
+
// different than empty string.
|
|
447
|
+
let minWidth =
|
|
448
|
+
isButtonFocused || ( ! isButtonFocused && text && text !== '' )
|
|
449
|
+
? MIN_WIDTH
|
|
450
|
+
: placeholderTextWidth;
|
|
451
|
+
if ( width ) {
|
|
452
|
+
// Set the width of the button.
|
|
453
|
+
minWidth = Math.floor(
|
|
454
|
+
maxWidth * ( width / 100 ) - MIN_WIDTH_MARGINS[ width ]
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set
|
|
458
|
+
// a `placeholder` as an empty string when `RichText` is focused,
|
|
459
|
+
// because `AztecView` is calculating a `minWidth` based on placeholder text.
|
|
460
|
+
const placeholderText =
|
|
461
|
+
isButtonFocused || ( ! isButtonFocused && text && text !== '' )
|
|
462
|
+
? ''
|
|
463
|
+
: placeholder || __( 'Add text…' );
|
|
464
|
+
|
|
465
|
+
const backgroundColor = getBackgroundColor();
|
|
466
|
+
const textColor = getTextColor();
|
|
467
|
+
const isFixedWidth = !! width;
|
|
468
|
+
const outLineStyles = [
|
|
469
|
+
styles.outline,
|
|
470
|
+
{
|
|
471
|
+
borderRadius: outlineBorderRadius,
|
|
472
|
+
borderColor: backgroundColor,
|
|
473
|
+
},
|
|
474
|
+
];
|
|
475
|
+
const textStyles = {
|
|
476
|
+
...richTextStyle.richText,
|
|
477
|
+
paddingLeft: isFixedWidth ? 0 : richTextStyle.richText.paddingLeft,
|
|
478
|
+
paddingRight: isFixedWidth ? 0 : richTextStyle.richText.paddingRight,
|
|
479
|
+
color: textColor,
|
|
480
|
+
};
|
|
538
481
|
|
|
482
|
+
return (
|
|
483
|
+
<View onLayout={ onLayout }>
|
|
484
|
+
{ getPlaceholderWidth( placeholderText ) }
|
|
485
|
+
<ColorBackground
|
|
486
|
+
borderRadiusValue={ buttonBorderRadiusValue }
|
|
487
|
+
backgroundColor={ backgroundColor }
|
|
488
|
+
isSelected={ isSelected }
|
|
489
|
+
>
|
|
539
490
|
{ isSelected && (
|
|
540
|
-
|
|
541
|
-
<BlockControls>
|
|
542
|
-
<ToolbarGroup>
|
|
543
|
-
<ToolbarButton
|
|
544
|
-
title={ __( 'Edit link' ) }
|
|
545
|
-
icon={ link }
|
|
546
|
-
onClick={ this.onShowLinkSettings }
|
|
547
|
-
isActive={ url }
|
|
548
|
-
/>
|
|
549
|
-
</ToolbarGroup>
|
|
550
|
-
</BlockControls>
|
|
551
|
-
{ this.getLinkSettings( false ) }
|
|
552
|
-
<InspectorControls>
|
|
553
|
-
<PanelBody title={ __( 'Border Settings' ) }>
|
|
554
|
-
<UnitControl
|
|
555
|
-
label={ __( 'Border Radius' ) }
|
|
556
|
-
min={ MIN_BORDER_RADIUS_VALUE }
|
|
557
|
-
max={ MAX_BORDER_RADIUS_VALUE }
|
|
558
|
-
value={ borderRadiusValue }
|
|
559
|
-
onChange={ this.onChangeBorderRadius }
|
|
560
|
-
onUnitChange={
|
|
561
|
-
this.onChangeBorderRadiusUnit
|
|
562
|
-
}
|
|
563
|
-
unit={ this.state.borderRadiusUnit }
|
|
564
|
-
units={ filterUnitsWithSettings(
|
|
565
|
-
[ 'px', 'em', 'rem' ],
|
|
566
|
-
CSS_UNITS
|
|
567
|
-
) }
|
|
568
|
-
/>
|
|
569
|
-
</PanelBody>
|
|
570
|
-
<WidthPanel
|
|
571
|
-
selectedWidth={ width }
|
|
572
|
-
setAttributes={ setAttributes }
|
|
573
|
-
/>
|
|
574
|
-
<PanelBody title={ __( 'Link Settings' ) }>
|
|
575
|
-
{ this.getLinkSettings( true ) }
|
|
576
|
-
</PanelBody>
|
|
577
|
-
</InspectorControls>
|
|
578
|
-
</>
|
|
491
|
+
<View pointerEvents="none" style={ outLineStyles } />
|
|
579
492
|
) }
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
493
|
+
<RichText
|
|
494
|
+
setRef={ onSetRef }
|
|
495
|
+
placeholder={ placeholderText }
|
|
496
|
+
value={ text }
|
|
497
|
+
onChange={ onChangeText }
|
|
498
|
+
style={ textStyles }
|
|
499
|
+
textAlign={ align }
|
|
500
|
+
placeholderTextColor={
|
|
501
|
+
style?.color || styles.placeholderTextColor.color
|
|
502
|
+
}
|
|
503
|
+
identifier="text"
|
|
504
|
+
tagName="p"
|
|
505
|
+
minWidth={ minWidth } // The minimum Button size.
|
|
506
|
+
maxWidth={ isFixedWidth ? minWidth : maxWidth } // The width of the screen.
|
|
507
|
+
id={ clientId }
|
|
508
|
+
isSelected={ isButtonFocused }
|
|
509
|
+
withoutInteractiveFormatting
|
|
510
|
+
unstableOnFocus={ onUnstableOnFocus }
|
|
511
|
+
__unstableMobileNoFocusOnMount={ ! isSelected }
|
|
512
|
+
selectionColor={ textColor }
|
|
513
|
+
onBlur={ onBlur }
|
|
514
|
+
onReplace={ onReplace }
|
|
515
|
+
onRemove={ onRemove }
|
|
516
|
+
onMerge={ mergeBlocks }
|
|
517
|
+
fontSize={ style?.fontSize }
|
|
518
|
+
/>
|
|
519
|
+
</ColorBackground>
|
|
520
|
+
|
|
521
|
+
{ isSelected && (
|
|
522
|
+
<>
|
|
523
|
+
<BlockControls>
|
|
524
|
+
<ToolbarGroup>
|
|
525
|
+
<ToolbarButton
|
|
526
|
+
title={ __( 'Edit link' ) }
|
|
527
|
+
icon={ link }
|
|
528
|
+
onClick={ onShowLinkSettings }
|
|
529
|
+
isActive={ url }
|
|
530
|
+
/>
|
|
531
|
+
</ToolbarGroup>
|
|
532
|
+
</BlockControls>
|
|
533
|
+
{ getLinkSettings( false ) }
|
|
534
|
+
<InspectorControls>
|
|
535
|
+
<PanelBody title={ __( 'Border Settings' ) }>
|
|
536
|
+
<UnitControl
|
|
537
|
+
label={ __( 'Border Radius' ) }
|
|
538
|
+
min={ MIN_BORDER_RADIUS_VALUE }
|
|
539
|
+
max={ MAX_BORDER_RADIUS_VALUE }
|
|
540
|
+
value={ borderRadiusValue }
|
|
541
|
+
onChange={ onChangeBorderRadius }
|
|
542
|
+
onUnitChange={ onChangeBorderRadiusUnit }
|
|
543
|
+
unit={ borderRadiusUnit }
|
|
544
|
+
units={ filterUnitsWithSettings(
|
|
545
|
+
[ 'px', 'em', 'rem' ],
|
|
546
|
+
CSS_UNITS
|
|
547
|
+
) }
|
|
548
|
+
/>
|
|
549
|
+
</PanelBody>
|
|
550
|
+
<WidthPanel
|
|
551
|
+
selectedWidth={ width }
|
|
552
|
+
setAttributes={ setAttributes }
|
|
553
|
+
/>
|
|
554
|
+
<PanelBody title={ __( 'Link Settings' ) }>
|
|
555
|
+
{ getLinkSettings( true ) }
|
|
556
|
+
</PanelBody>
|
|
557
|
+
</InspectorControls>
|
|
558
|
+
</>
|
|
559
|
+
) }
|
|
560
|
+
</View>
|
|
561
|
+
);
|
|
583
562
|
}
|
|
584
563
|
|
|
585
|
-
export default
|
|
586
|
-
withInstanceId,
|
|
587
|
-
withGradient,
|
|
588
|
-
withSelect( ( select, { clientId, isSelected } ) => {
|
|
589
|
-
const { isEditorSidebarOpened } = select( 'core/edit-post' );
|
|
590
|
-
const { getBlockCount, getBlockRootClientId, getSettings } = select(
|
|
591
|
-
blockEditorStore
|
|
592
|
-
);
|
|
593
|
-
const parentId = getBlockRootClientId( clientId );
|
|
594
|
-
const numOfButtons = getBlockCount( parentId );
|
|
595
|
-
const settings = getSettings();
|
|
596
|
-
|
|
597
|
-
return {
|
|
598
|
-
colors: settings?.colors || [],
|
|
599
|
-
gradients: settings?.gradients || [],
|
|
600
|
-
editorSidebarOpened: isSelected && isEditorSidebarOpened(),
|
|
601
|
-
numOfButtons,
|
|
602
|
-
};
|
|
603
|
-
} ),
|
|
604
|
-
withDispatch( ( dispatch ) => {
|
|
605
|
-
return {
|
|
606
|
-
closeSettingsBottomSheet() {
|
|
607
|
-
dispatch( 'core/edit-post' ).closeGeneralSidebar();
|
|
608
|
-
},
|
|
609
|
-
};
|
|
610
|
-
} ),
|
|
611
|
-
] )( ButtonEdit );
|
|
564
|
+
export default ButtonEdit;
|