@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
package/src/column/edit.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
InspectorControls,
|
|
14
14
|
useBlockProps,
|
|
15
15
|
useSetting,
|
|
16
|
-
|
|
16
|
+
useInnerBlocksProps,
|
|
17
17
|
store as blockEditorStore,
|
|
18
18
|
} from '@wordpress/block-editor';
|
|
19
19
|
import {
|
|
@@ -25,7 +25,12 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|
|
25
25
|
import { sprintf, __ } from '@wordpress/i18n';
|
|
26
26
|
|
|
27
27
|
function ColumnEdit( {
|
|
28
|
-
attributes: {
|
|
28
|
+
attributes: {
|
|
29
|
+
verticalAlignment,
|
|
30
|
+
width,
|
|
31
|
+
templateLock = false,
|
|
32
|
+
allowedBlocks,
|
|
33
|
+
},
|
|
29
34
|
setAttributes,
|
|
30
35
|
clientId,
|
|
31
36
|
} ) {
|
|
@@ -92,6 +97,7 @@ function ColumnEdit( {
|
|
|
92
97
|
{ ...blockProps, 'aria-label': label },
|
|
93
98
|
{
|
|
94
99
|
templateLock,
|
|
100
|
+
allowedBlocks,
|
|
95
101
|
renderAppender: hasChildBlocks
|
|
96
102
|
? undefined
|
|
97
103
|
: InnerBlocks.ButtonBlockAppender,
|
package/src/column/save.js
CHANGED
|
@@ -6,7 +6,7 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';
|
|
10
10
|
|
|
11
11
|
export default function save( { attributes } ) {
|
|
12
12
|
const { verticalAlignment, width } = attributes;
|
|
@@ -17,7 +17,7 @@ export default function save( { attributes } ) {
|
|
|
17
17
|
|
|
18
18
|
let style;
|
|
19
19
|
|
|
20
|
-
if ( width ) {
|
|
20
|
+
if ( width && /\d/.test( width ) ) {
|
|
21
21
|
// Numbers are handled for backward compatibility as they can be still provided with templates.
|
|
22
22
|
let flexBasis = Number.isFinite( width ) ? width + '%' : width;
|
|
23
23
|
// In some cases we need to round the width to a shorter float.
|
|
@@ -32,14 +32,11 @@ export default function save( { attributes } ) {
|
|
|
32
32
|
style = { flexBasis };
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<InnerBlocks.Content />
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
35
|
+
const blockProps = useBlockProps.save( {
|
|
36
|
+
className: wrapperClasses,
|
|
37
|
+
style,
|
|
38
|
+
} );
|
|
39
|
+
const innerBlocksProps = useInnerBlocksProps.save( blockProps );
|
|
40
|
+
|
|
41
|
+
return <div { ...innerBlocksProps } />;
|
|
45
42
|
}
|
package/src/columns/block.json
CHANGED
package/src/columns/edit.js
CHANGED
package/src/columns/save.js
CHANGED
|
@@ -6,7 +6,7 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';
|
|
10
10
|
|
|
11
11
|
export default function save( { attributes } ) {
|
|
12
12
|
const { isStackedOnMobile, verticalAlignment } = attributes;
|
|
@@ -16,9 +16,8 @@ export default function save( { attributes } ) {
|
|
|
16
16
|
[ `is-not-stacked-on-mobile` ]: ! isStackedOnMobile,
|
|
17
17
|
} );
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
19
|
+
const blockProps = useBlockProps.save( { className } );
|
|
20
|
+
const innerBlocksProps = useInnerBlocksProps.save( blockProps );
|
|
21
|
+
|
|
22
|
+
return <div { ...innerBlocksProps } />;
|
|
24
23
|
}
|
package/src/columns/style.scss
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": 2,
|
|
3
|
+
"name": "core/comment-author-avatar",
|
|
4
|
+
"title": "Comment Author Avatar",
|
|
5
|
+
"category": "theme",
|
|
6
|
+
"parent": [ "core/comment-template" ],
|
|
7
|
+
"description": "Add the avatar of this comment's author.",
|
|
8
|
+
"textdomain": "default",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"width": {
|
|
11
|
+
"type": "number",
|
|
12
|
+
"default": 96
|
|
13
|
+
},
|
|
14
|
+
"height": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"default": 96
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"usesContext": [ "commentId" ],
|
|
20
|
+
"supports": {
|
|
21
|
+
"html": false,
|
|
22
|
+
"__experimentalBorder": {
|
|
23
|
+
"radius": true,
|
|
24
|
+
"width": true,
|
|
25
|
+
"color": true,
|
|
26
|
+
"style": true
|
|
27
|
+
},
|
|
28
|
+
"color": {
|
|
29
|
+
"background": true,
|
|
30
|
+
"text": false,
|
|
31
|
+
"links": false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
|
|
5
|
+
import { PanelBody, ResizableBox, RangeControl } from '@wordpress/components';
|
|
6
|
+
import { useEntityProp } from '@wordpress/core-data';
|
|
7
|
+
import { __, _x, isRTL } from '@wordpress/i18n';
|
|
8
|
+
|
|
9
|
+
export default function Edit( {
|
|
10
|
+
attributes,
|
|
11
|
+
context: { commentId },
|
|
12
|
+
setAttributes,
|
|
13
|
+
} ) {
|
|
14
|
+
const { height, width } = attributes;
|
|
15
|
+
|
|
16
|
+
const [ avatars ] = useEntityProp(
|
|
17
|
+
'root',
|
|
18
|
+
'comment',
|
|
19
|
+
'author_avatar_urls',
|
|
20
|
+
commentId
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const [ authorName ] = useEntityProp(
|
|
24
|
+
'root',
|
|
25
|
+
'comment',
|
|
26
|
+
'author_name',
|
|
27
|
+
commentId
|
|
28
|
+
);
|
|
29
|
+
const avatarUrls = avatars ? Object.values( avatars ) : null;
|
|
30
|
+
const sizes = avatars ? Object.keys( avatars ) : null;
|
|
31
|
+
const minSize = sizes ? sizes[ 0 ] : 24;
|
|
32
|
+
const maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;
|
|
33
|
+
const blockProps = useBlockProps();
|
|
34
|
+
const maxSizeBuffer = Math.floor( maxSize * 2.5 );
|
|
35
|
+
|
|
36
|
+
const inspectorControls = (
|
|
37
|
+
<InspectorControls>
|
|
38
|
+
<PanelBody title={ __( 'Avatar Settings' ) }>
|
|
39
|
+
<RangeControl
|
|
40
|
+
label={ __( 'Image size' ) }
|
|
41
|
+
onChange={ ( newWidth ) =>
|
|
42
|
+
setAttributes( {
|
|
43
|
+
width: newWidth,
|
|
44
|
+
height: newWidth,
|
|
45
|
+
} )
|
|
46
|
+
}
|
|
47
|
+
min={ minSize }
|
|
48
|
+
max={ maxSizeBuffer }
|
|
49
|
+
initialPosition={ width }
|
|
50
|
+
value={ width }
|
|
51
|
+
/>
|
|
52
|
+
</PanelBody>
|
|
53
|
+
</InspectorControls>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const displayAvatar = avatarUrls ? (
|
|
57
|
+
<ResizableBox
|
|
58
|
+
size={ {
|
|
59
|
+
width,
|
|
60
|
+
height,
|
|
61
|
+
} }
|
|
62
|
+
onResizeStop={ ( event, direction, elt, delta ) => {
|
|
63
|
+
setAttributes( {
|
|
64
|
+
height: parseInt( height + delta.height, 10 ),
|
|
65
|
+
width: parseInt( width + delta.width, 10 ),
|
|
66
|
+
} );
|
|
67
|
+
} }
|
|
68
|
+
lockAspectRatio
|
|
69
|
+
enable={ {
|
|
70
|
+
top: false,
|
|
71
|
+
right: ! isRTL(),
|
|
72
|
+
bottom: true,
|
|
73
|
+
left: isRTL(),
|
|
74
|
+
} }
|
|
75
|
+
minWidth={ minSize }
|
|
76
|
+
maxWidth={ maxSizeBuffer }
|
|
77
|
+
>
|
|
78
|
+
<img
|
|
79
|
+
src={ avatarUrls[ avatarUrls.length - 1 ] }
|
|
80
|
+
alt={ `${ authorName } ${ __( 'Avatar' ) }` }
|
|
81
|
+
{ ...blockProps }
|
|
82
|
+
/>
|
|
83
|
+
</ResizableBox>
|
|
84
|
+
) : (
|
|
85
|
+
<p { ...blockProps }>
|
|
86
|
+
{ _x( 'Comment Author Avatar', 'block title' ) }
|
|
87
|
+
</p>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<>
|
|
92
|
+
{ inspectorControls }
|
|
93
|
+
<div>{ displayAvatar }</div>
|
|
94
|
+
</>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { commentAuthorAvatar as icon } from '@wordpress/icons';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import metadata from './block.json';
|
|
10
|
+
import edit from './edit';
|
|
11
|
+
|
|
12
|
+
const { name } = metadata;
|
|
13
|
+
export { metadata, name };
|
|
14
|
+
|
|
15
|
+
export const settings = {
|
|
16
|
+
icon,
|
|
17
|
+
edit,
|
|
18
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Server-side rendering of the `core/comment-author-avatar` block.
|
|
4
|
+
*
|
|
5
|
+
* @package WordPress
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Renders the `core/comment-author-avatar` block on the server.
|
|
10
|
+
*
|
|
11
|
+
* @param array $attributes Block attributes.
|
|
12
|
+
* @param string $content Block default content.
|
|
13
|
+
* @param WP_Block $block Block instance.
|
|
14
|
+
* @return string Return the post comment's avatar.
|
|
15
|
+
*/
|
|
16
|
+
function render_block_core_comment_author_avatar( $attributes, $content, $block ) {
|
|
17
|
+
if ( ! isset( $block->context['commentId'] ) ) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$comment = get_comment( $block->context['commentId'] );
|
|
22
|
+
if ( ! $comment ) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// This is the only way to retreive style and classes on different instances.
|
|
27
|
+
$wrapper_attributes = WP_Block_Supports::get_instance()->apply_block_supports();
|
|
28
|
+
$width = isset( $attributes['width'] ) ? $attributes['width'] : 96;
|
|
29
|
+
$height = isset( $attributes['height'] ) ? $attributes['height'] : 96;
|
|
30
|
+
$styles = isset( $wrapper_attributes['style'] ) ? $wrapper_attributes['style'] : '';
|
|
31
|
+
$classes = isset( $wrapper_attributes['class'] ) ? $wrapper_attributes['class'] : '';
|
|
32
|
+
|
|
33
|
+
/* translators: %s is the Comment Author name */
|
|
34
|
+
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
|
|
35
|
+
|
|
36
|
+
$avatar_string = get_avatar(
|
|
37
|
+
$comment,
|
|
38
|
+
null,
|
|
39
|
+
'',
|
|
40
|
+
$alt,
|
|
41
|
+
array(
|
|
42
|
+
'height' => $height,
|
|
43
|
+
'width' => $width,
|
|
44
|
+
'extra_attr' => sprintf( 'style="%1s"', $styles ),
|
|
45
|
+
'class' => $classes,
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
return $avatar_string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Registers the `core/comment-author-avatar` block on the server.
|
|
53
|
+
*/
|
|
54
|
+
function register_block_core_comment_author_avatar() {
|
|
55
|
+
register_block_type_from_metadata(
|
|
56
|
+
__DIR__ . '/comment-author-avatar',
|
|
57
|
+
array(
|
|
58
|
+
'render_callback' => 'render_block_core_comment_author_avatar',
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
add_action( 'init', 'register_block_core_comment_author_avatar' );
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": 2,
|
|
3
|
+
"name": "core/comment-author-name",
|
|
4
|
+
"title": "Comment Author Name",
|
|
5
|
+
"category": "theme",
|
|
6
|
+
"parent": [ "core/comment-template" ],
|
|
7
|
+
"description": "Add the author name of this comment.",
|
|
8
|
+
"textdomain": "default",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"isLink": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"default": false
|
|
13
|
+
},
|
|
14
|
+
"linkTarget": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "_self"
|
|
17
|
+
},
|
|
18
|
+
"textAlign": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"usesContext": [ "commentId" ],
|
|
23
|
+
"supports": {
|
|
24
|
+
"html": false,
|
|
25
|
+
"spacing": {
|
|
26
|
+
"margin": true,
|
|
27
|
+
"padding": true
|
|
28
|
+
},
|
|
29
|
+
"color": {
|
|
30
|
+
"gradients": true,
|
|
31
|
+
"link": true
|
|
32
|
+
},
|
|
33
|
+
"typography": {
|
|
34
|
+
"fontSize": true,
|
|
35
|
+
"lineHeight": true,
|
|
36
|
+
"__experimentalFontFamily": true,
|
|
37
|
+
"__experimentalFontWeight": true,
|
|
38
|
+
"__experimentalFontStyle": true,
|
|
39
|
+
"__experimentalTextTransform": true,
|
|
40
|
+
"__experimentalLetterSpacing": true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import migrateFontFamily from '../utils/migrate-font-family';
|
|
5
|
+
|
|
6
|
+
const v1 = {
|
|
7
|
+
attributes: {
|
|
8
|
+
isLink: {
|
|
9
|
+
type: 'boolean',
|
|
10
|
+
default: false,
|
|
11
|
+
},
|
|
12
|
+
linkTarget: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '_self',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
supports: {
|
|
18
|
+
html: false,
|
|
19
|
+
color: {
|
|
20
|
+
gradients: true,
|
|
21
|
+
link: true,
|
|
22
|
+
},
|
|
23
|
+
typography: {
|
|
24
|
+
fontSize: true,
|
|
25
|
+
lineHeight: true,
|
|
26
|
+
__experimentalFontFamily: true,
|
|
27
|
+
__experimentalFontWeight: true,
|
|
28
|
+
__experimentalFontStyle: true,
|
|
29
|
+
__experimentalTextTransform: true,
|
|
30
|
+
__experimentalLetterSpacing: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
save() {
|
|
34
|
+
return null;
|
|
35
|
+
},
|
|
36
|
+
migrate: migrateFontFamily,
|
|
37
|
+
isEligible( { style } ) {
|
|
38
|
+
return style?.typography?.fontFamily;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* New deprecations need to be placed first
|
|
44
|
+
* for them to have higher priority.
|
|
45
|
+
*
|
|
46
|
+
* Old deprecations may need to be updated as well.
|
|
47
|
+
*
|
|
48
|
+
* See block-deprecation.md
|
|
49
|
+
*/
|
|
50
|
+
export default [ v1 ];
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { __, _x } from '@wordpress/i18n';
|
|
10
|
+
import { useSelect } from '@wordpress/data';
|
|
11
|
+
import {
|
|
12
|
+
AlignmentControl,
|
|
13
|
+
BlockControls,
|
|
14
|
+
InspectorControls,
|
|
15
|
+
useBlockProps,
|
|
16
|
+
} from '@wordpress/block-editor';
|
|
17
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
18
|
+
import { PanelBody, ToggleControl } from '@wordpress/components';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Renders the `core/comment-author-name` block on the editor.
|
|
22
|
+
*
|
|
23
|
+
* @param {Object} props React props.
|
|
24
|
+
* @param {Object} props.setAttributes Callback for updating block attributes.
|
|
25
|
+
* @param {Object} props.attributes Block attributes.
|
|
26
|
+
* @param {string} props.attributes.isLink Whether the author name should be linked.
|
|
27
|
+
* @param {string} props.attributes.linkTarget Target of the link.
|
|
28
|
+
* @param {string} props.attributes.textAlign Text alignment.
|
|
29
|
+
* @param {Object} props.context Inherited context.
|
|
30
|
+
* @param {string} props.context.commentId The comment ID.
|
|
31
|
+
*
|
|
32
|
+
* @return {JSX.Element} React element.
|
|
33
|
+
*/
|
|
34
|
+
export default function Edit( {
|
|
35
|
+
attributes: { isLink, linkTarget, textAlign },
|
|
36
|
+
context: { commentId },
|
|
37
|
+
setAttributes,
|
|
38
|
+
} ) {
|
|
39
|
+
const blockProps = useBlockProps( {
|
|
40
|
+
className: classnames( {
|
|
41
|
+
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
42
|
+
} ),
|
|
43
|
+
} );
|
|
44
|
+
const displayName = useSelect(
|
|
45
|
+
( select ) => {
|
|
46
|
+
const { getEntityRecord } = select( coreStore );
|
|
47
|
+
|
|
48
|
+
const comment = getEntityRecord( 'root', 'comment', commentId );
|
|
49
|
+
const authorName = comment?.author_name; // eslint-disable-line camelcase
|
|
50
|
+
|
|
51
|
+
if ( comment && ! authorName ) {
|
|
52
|
+
const user = getEntityRecord( 'root', 'user', comment.author );
|
|
53
|
+
return user?.name ?? __( 'Anonymous' );
|
|
54
|
+
}
|
|
55
|
+
return authorName ?? '';
|
|
56
|
+
},
|
|
57
|
+
[ commentId ]
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const blockControls = (
|
|
61
|
+
<BlockControls group="block">
|
|
62
|
+
<AlignmentControl
|
|
63
|
+
value={ textAlign }
|
|
64
|
+
onChange={ ( newAlign ) =>
|
|
65
|
+
setAttributes( { textAlign: newAlign } )
|
|
66
|
+
}
|
|
67
|
+
/>
|
|
68
|
+
</BlockControls>
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const inspectorControls = (
|
|
72
|
+
<InspectorControls>
|
|
73
|
+
<PanelBody title={ __( 'Link settings' ) }>
|
|
74
|
+
<ToggleControl
|
|
75
|
+
label={ __( 'Link to authors URL' ) }
|
|
76
|
+
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
77
|
+
checked={ isLink }
|
|
78
|
+
/>
|
|
79
|
+
{ isLink && (
|
|
80
|
+
<ToggleControl
|
|
81
|
+
label={ __( 'Open in new tab' ) }
|
|
82
|
+
onChange={ ( value ) =>
|
|
83
|
+
setAttributes( {
|
|
84
|
+
linkTarget: value ? '_blank' : '_self',
|
|
85
|
+
} )
|
|
86
|
+
}
|
|
87
|
+
checked={ linkTarget === '_blank' }
|
|
88
|
+
/>
|
|
89
|
+
) }
|
|
90
|
+
</PanelBody>
|
|
91
|
+
</InspectorControls>
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
if ( ! commentId || ! displayName ) {
|
|
95
|
+
return (
|
|
96
|
+
<>
|
|
97
|
+
{ inspectorControls }
|
|
98
|
+
{ blockControls }
|
|
99
|
+
<div { ...blockProps }>
|
|
100
|
+
<p>{ _x( 'Comment Author', 'block title' ) }</p>
|
|
101
|
+
</div>
|
|
102
|
+
</>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const displayAuthor = isLink ? (
|
|
107
|
+
<a
|
|
108
|
+
href="#comment-author-pseudo-link"
|
|
109
|
+
onClick={ ( event ) => event.preventDefault() }
|
|
110
|
+
>
|
|
111
|
+
{ displayName }
|
|
112
|
+
</a>
|
|
113
|
+
) : (
|
|
114
|
+
<p>{ displayName }</p>
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<>
|
|
119
|
+
{ inspectorControls }
|
|
120
|
+
{ blockControls }
|
|
121
|
+
<div { ...blockProps }>{ displayAuthor }</div>
|
|
122
|
+
</>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { commentAuthorName as icon } from '@wordpress/icons';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import metadata from './block.json';
|
|
10
|
+
import edit from './edit';
|
|
11
|
+
import deprecated from './deprecated';
|
|
12
|
+
|
|
13
|
+
const { name } = metadata;
|
|
14
|
+
export { metadata, name };
|
|
15
|
+
|
|
16
|
+
export const settings = {
|
|
17
|
+
icon,
|
|
18
|
+
edit,
|
|
19
|
+
deprecated,
|
|
20
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Server-side rendering of the `core/comment-author-name` block.
|
|
4
|
+
*
|
|
5
|
+
* @package WordPress
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Renders the `core/comment-author-name` block on the server.
|
|
10
|
+
*
|
|
11
|
+
* @param array $attributes Block attributes.
|
|
12
|
+
* @param string $content Block default content.
|
|
13
|
+
* @param WP_Block $block Block instance.
|
|
14
|
+
* @return string Return the post comment's author.
|
|
15
|
+
*/
|
|
16
|
+
function render_block_core_comment_author_name( $attributes, $content, $block ) {
|
|
17
|
+
if ( ! isset( $block->context['commentId'] ) ) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$comment = get_comment( $block->context['commentId'] );
|
|
22
|
+
if ( empty( $comment ) ) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$classes = '';
|
|
27
|
+
if ( isset( $attributes['textAlign'] ) ) {
|
|
28
|
+
$classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] );
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
|
32
|
+
$comment_author = get_comment_author( $comment );
|
|
33
|
+
$link = get_comment_author_url( $comment );
|
|
34
|
+
|
|
35
|
+
if ( ! empty( $attributes['isLink'] ) && ! empty( $attributes['linkTarget'] ) ) {
|
|
36
|
+
$comment_author = sprintf( '<a rel="external nofollow ugc" href="%1s" target="%2s" >%3s</a>', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $comment_author );
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return sprintf(
|
|
40
|
+
'<div %1$s>%2$s</div>',
|
|
41
|
+
$wrapper_attributes,
|
|
42
|
+
$comment_author
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Registers the `core/comment-author-name` block on the server.
|
|
48
|
+
*/
|
|
49
|
+
function register_block_core_comment_author_name() {
|
|
50
|
+
register_block_type_from_metadata(
|
|
51
|
+
__DIR__ . '/comment-author-name',
|
|
52
|
+
array(
|
|
53
|
+
'render_callback' => 'render_block_core_comment_author_name',
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
add_action( 'init', 'register_block_core_comment_author_name' );
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": 2,
|
|
3
|
+
"name": "core/comment-content",
|
|
4
|
+
"title": "Comment Content",
|
|
5
|
+
"category": "theme",
|
|
6
|
+
"parent": [ "core/comment-template" ],
|
|
7
|
+
"description": "Displays the contents of a comment.",
|
|
8
|
+
"textdomain": "default",
|
|
9
|
+
"usesContext": [ "commentId" ],
|
|
10
|
+
"attributes": {
|
|
11
|
+
"textAlign": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"supports": {
|
|
16
|
+
"color": {
|
|
17
|
+
"gradients": true,
|
|
18
|
+
"link": true
|
|
19
|
+
},
|
|
20
|
+
"typography": {
|
|
21
|
+
"fontSize": true,
|
|
22
|
+
"lineHeight": true,
|
|
23
|
+
"__experimentalFontFamily": true,
|
|
24
|
+
"__experimentalFontWeight": true,
|
|
25
|
+
"__experimentalFontStyle": true,
|
|
26
|
+
"__experimentalTextTransform": true,
|
|
27
|
+
"__experimentalLetterSpacing": true
|
|
28
|
+
},
|
|
29
|
+
"spacing": {
|
|
30
|
+
"padding": [ "horizontal", "vertical" ],
|
|
31
|
+
"__experimentalDefaultControls": {
|
|
32
|
+
"padding": true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"html": false
|
|
36
|
+
}
|
|
37
|
+
}
|