@wordpress/block-library 9.2.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/audio/edit.js +20 -8
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +4 -0
- package/build/audio/index.js.map +1 -1
- package/build/audio/transforms.js +1 -1
- package/build/audio/transforms.js.map +1 -1
- package/build/block/edit.js +38 -24
- package/build/block/edit.js.map +1 -1
- package/build/block/index.js +5 -1
- package/build/block/index.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/index.js +26 -0
- package/build/buttons/index.js.map +1 -1
- package/build/categories/edit.js +20 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +8 -0
- package/build/categories/index.js.map +1 -1
- package/build/columns/index.js +2 -2
- package/build/columns/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +2 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/embed/embed-preview.js +4 -4
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/variations.js +39 -34
- package/build/embed/variations.js.map +1 -1
- package/build/file/edit.js +14 -6
- package/build/file/edit.js.map +1 -1
- package/build/file/index.js +4 -0
- package/build/file/index.js.map +1 -1
- package/build/file/transforms.js +2 -3
- package/build/file/transforms.js.map +1 -1
- package/build/footnotes/index.js +1 -1
- package/build/footnotes/index.js.map +1 -1
- package/build/form-input/edit.js +2 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/deprecated.js +6 -54
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +9 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/index.js +12 -2
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +0 -11
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +0 -27
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +29 -80
- package/build/gallery/transforms.js.map +1 -1
- package/build/group/deprecated.js +2 -5
- package/build/group/deprecated.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/placeholder.js +5 -0
- package/build/group/placeholder.js.map +1 -1
- package/build/heading/index.js +14 -1
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +14 -22
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +54 -28
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +7 -0
- package/build/image/index.js.map +1 -1
- package/build/image/transforms.js +1 -1
- package/build/image/transforms.js.map +1 -1
- package/build/image/view.js +65 -49
- package/build/image/view.js.map +1 -1
- package/build/latest-comments/index.js +9 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/list/edit.js +3 -3
- package/build/list/edit.js.map +1 -1
- package/build/list-item/edit.js +3 -3
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +0 -7
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +8 -1
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/list-item/index.js +11 -1
- package/build/list-item/index.js.map +1 -1
- package/build/loginout/index.js +3 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/edit.js +3 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +12 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +5 -1
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/link-ui.js +13 -17
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -12
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +1 -1
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +2 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list-item/edit.js +4 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/index.js +6 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +6 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +8 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +3 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +3 -0
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-content/index.js +3 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +3 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +3 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +3 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/index.js +3 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-terms/index.js +3 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +5 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +3 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +3 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +27 -8
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/order-control.js +1 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +2 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/sticky-control.js +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-content.js +11 -2
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +1 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +54 -61
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +34 -0
- package/build/query/index.js.map +1 -1
- package/build/query/utils.js +5 -1
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +9 -55
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +1 -0
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/edit.js +11 -19
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/use-archive-label.js +95 -0
- package/build/query-title/use-archive-label.js.map +1 -0
- package/build/quote/index.js +15 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/index.js +3 -0
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +4 -1
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +5 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +6 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit.js +4 -1
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +6 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +27 -7
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/soundcloud.js +1 -1
- package/build/social-link/icons/soundcloud.js.map +1 -1
- package/build/social-links/index.js +12 -0
- package/build/social-links/index.js.map +1 -1
- package/build/table/edit.js +8 -17
- package/build/table/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +4 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/index.js +5 -3
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +8 -3
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +23 -3
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/template-part/edit/title-modal.js +21 -9
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/term-description/index.js +12 -0
- package/build/term-description/index.js.map +1 -1
- package/build/utils/hooks.js +17 -1
- package/build/utils/hooks.js.map +1 -1
- package/build/video/deprecated.js +4 -0
- package/build/video/deprecated.js.map +1 -1
- package/build/video/edit.js +17 -7
- package/build/video/edit.js.map +1 -1
- package/build/video/index.js +4 -0
- package/build/video/index.js.map +1 -1
- package/build/video/transforms.js +1 -1
- package/build/video/transforms.js.map +1 -1
- package/build-module/audio/edit.js +20 -8
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +4 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/audio/transforms.js +1 -1
- package/build-module/audio/transforms.js.map +1 -1
- package/build-module/block/edit.js +38 -24
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/index.js +5 -1
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.js +1 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/index.js +26 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/categories/edit.js +21 -4
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +8 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/columns/index.js +2 -2
- package/build-module/columns/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +2 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/embed/embed-preview.js +4 -4
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/variations.js +40 -35
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/file/edit.js +15 -7
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/index.js +4 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/transforms.js +2 -3
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/footnotes/index.js +1 -1
- package/build-module/footnotes/index.js.map +1 -1
- package/build-module/form-input/edit.js +2 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/deprecated.js +6 -54
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +10 -9
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/index.js +11 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +0 -11
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +0 -25
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +29 -80
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/group/deprecated.js +2 -5
- package/build-module/group/deprecated.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/placeholder.js +5 -0
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/heading/index.js +14 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +13 -21
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +50 -24
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +7 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/transforms.js +1 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/view.js +65 -49
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-comments/index.js +9 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/list/edit.js +3 -3
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list-item/edit.js +3 -3
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +0 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +8 -1
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/list-item/index.js +11 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/loginout/index.js +3 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/edit.js +3 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +12 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +5 -1
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +13 -17
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -12
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -1
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +2 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list-item/edit.js +4 -1
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/index.js +6 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +6 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +8 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +3 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +3 -0
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-content/index.js +3 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +4 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +3 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +3 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/index.js +3 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-terms/index.js +3 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +5 -1
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +3 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +3 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +28 -9
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/order-control.js +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-content.js +11 -2
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -14
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +55 -62
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +34 -0
- package/build-module/query/index.js.map +1 -1
- package/build-module/query/utils.js +5 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +4 -50
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -0
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/edit.js +12 -20
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/use-archive-label.js +88 -0
- package/build-module/query-title/use-archive-label.js.map +1 -0
- package/build-module/quote/index.js +15 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/index.js +3 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -1
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +5 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +6 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit.js +4 -1
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +6 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +28 -8
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/soundcloud.js +1 -1
- package/build-module/social-link/icons/soundcloud.js.map +1 -1
- package/build-module/social-links/index.js +12 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/table/edit.js +9 -18
- package/build-module/table/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js +4 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/index.js +5 -3
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +8 -3
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +23 -3
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +21 -9
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/term-description/index.js +12 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/hooks.js +16 -1
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/video/deprecated.js +4 -0
- package/build-module/video/deprecated.js.map +1 -1
- package/build-module/video/edit.js +18 -8
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/index.js +4 -0
- package/build-module/video/index.js.map +1 -1
- package/build-module/video/transforms.js +1 -1
- package/build-module/video/transforms.js.map +1 -1
- package/build-style/categories/editor-rtl.css +4 -0
- package/build-style/categories/editor.css +4 -0
- package/build-style/categories/style-rtl.css +4 -0
- package/build-style/categories/style.css +4 -0
- package/build-style/editor-rtl.css +16 -12
- package/build-style/editor.css +16 -12
- package/build-style/image/editor-rtl.css +8 -4
- package/build-style/image/editor.css +8 -4
- package/build-style/image/style-rtl.css +19 -0
- package/build-style/image/style.css +19 -0
- package/build-style/list/style-rtl.css +1 -1
- package/build-style/list/style.css +1 -1
- package/build-style/navigation/style-rtl.css +1 -4
- package/build-style/navigation/style.css +1 -4
- package/build-style/post-comments-form/style-rtl.css +12 -11
- package/build-style/post-comments-form/style.css +12 -11
- package/build-style/query/editor-rtl.css +3 -7
- package/build-style/query/editor.css +3 -7
- package/build-style/search/editor-rtl.css +1 -1
- package/build-style/search/editor.css +1 -1
- package/build-style/social-links/style-rtl.css +93 -93
- package/build-style/social-links/style.css +93 -93
- package/build-style/style-rtl.css +131 -109
- package/build-style/style.css +131 -109
- package/build-style/term-description/style-rtl.css +1 -0
- package/build-style/term-description/style.css +1 -0
- package/package.json +35 -35
- package/src/audio/block.json +4 -0
- package/src/audio/edit.js +19 -7
- package/src/audio/transforms.js +1 -1
- package/src/block/block.json +5 -1
- package/src/block/edit.js +58 -28
- package/src/block/test/edit.native.js +6 -2
- package/src/button/edit.js +1 -1
- package/src/button/index.php +14 -1
- package/src/buttons/block.json +20 -0
- package/src/buttons/index.js +6 -0
- package/src/categories/block.json +8 -0
- package/src/categories/edit.js +32 -4
- package/src/categories/editor.scss +4 -0
- package/src/categories/index.php +4 -1
- package/src/categories/style.scss +4 -0
- package/src/columns/index.js +1 -1
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/embed/embed-preview.js +4 -6
- package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
- package/src/embed/test/index.js +1 -1
- package/src/embed/test/index.native.js +24 -23
- package/src/embed/variations.js +43 -35
- package/src/file/block.json +4 -0
- package/src/file/edit.js +19 -6
- package/src/file/transforms.js +1 -2
- package/src/footnotes/index.js +1 -2
- package/src/form-input/edit.js +2 -0
- package/src/gallery/block.json +10 -0
- package/src/gallery/deprecated.js +6 -55
- package/src/gallery/edit.js +13 -10
- package/src/gallery/gallery-styles.native.scss +0 -2
- package/src/gallery/index.js +1 -1
- package/src/gallery/save.js +0 -10
- package/src/gallery/shared.js +0 -28
- package/src/gallery/transforms.js +56 -99
- package/src/group/block.json +1 -0
- package/src/group/deprecated.js +3 -7
- package/src/group/placeholder.js +7 -0
- package/src/heading/block.json +12 -0
- package/src/heading/index.js +1 -0
- package/src/image/block.json +7 -0
- package/src/image/edit.js +11 -20
- package/src/image/editor.scss +6 -1
- package/src/image/image.js +91 -49
- package/src/image/index.php +58 -20
- package/src/image/style.scss +22 -0
- package/src/image/test/edit.native.js +1 -0
- package/src/image/transforms.js +1 -1
- package/src/image/view.js +69 -49
- package/src/latest-comments/block.json +9 -0
- package/src/list/edit.js +3 -3
- package/src/list/style.scss +1 -1
- package/src/list-item/block.json +11 -1
- package/src/list-item/edit.js +3 -3
- package/src/list-item/hooks/index.js +0 -1
- package/src/list-item/hooks/use-merge.js +19 -5
- package/src/loginout/block.json +3 -0
- package/src/media-text/block.json +12 -0
- package/src/media-text/edit.js +3 -2
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/src/navigation/index.php +1 -1
- package/src/navigation/style.scss +4 -9
- package/src/navigation/test/use-navigation-menu.js +54 -15
- package/src/navigation/use-navigation-menu.js +5 -1
- package/src/navigation-link/link-ui.js +8 -14
- package/src/navigation-submenu/edit.js +2 -14
- package/src/page-list/convert-to-links-modal.js +1 -1
- package/src/page-list/edit.js +2 -1
- package/src/page-list-item/edit.js +4 -4
- package/src/paragraph/block.json +6 -0
- package/src/post-author/index.js +8 -0
- package/src/post-author-biography/block.json +3 -0
- package/src/post-author-name/block.json +3 -0
- package/src/post-comments-form/style.scss +16 -13
- package/src/post-content/block.json +3 -0
- package/src/post-date/block.json +3 -0
- package/src/post-date/edit.js +5 -1
- package/src/post-date/index.php +8 -2
- package/src/post-excerpt/block.json +3 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-featured-image/block.json +3 -0
- package/src/post-terms/block.json +3 -0
- package/src/post-title/block.json +3 -0
- package/src/post-title/edit.js +5 -5
- package/src/query/edit/inspector-controls/author-control.js +2 -0
- package/src/query/edit/inspector-controls/index.js +44 -16
- package/src/query/edit/inspector-controls/order-control.js +1 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/inspector-controls/sticky-control.js +1 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
- package/src/query/edit/query-content.js +17 -3
- package/src/query/edit/query-placeholder.js +1 -21
- package/src/query/edit/query-toolbar.js +60 -72
- package/src/query/editor.scss +4 -9
- package/src/query/index.js +40 -0
- package/src/query/utils.js +4 -0
- package/src/query/variations.js +4 -46
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/edit.js +10 -17
- package/src/query-title/use-archive-label.js +99 -0
- package/src/quote/block.json +15 -1
- package/src/search/block.json +3 -0
- package/src/search/editor.scss +1 -1
- package/src/site-logo/edit.js +4 -1
- package/src/site-tagline/block.json +6 -1
- package/src/site-tagline/edit.js +5 -2
- package/src/site-title/edit.js +4 -1
- package/src/site-title/index.js +6 -1
- package/src/social-link/edit.js +29 -3
- package/src/social-link/icons/soundcloud.js +1 -1
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/block.json +12 -0
- package/src/social-links/style.scss +2 -2
- package/src/table/edit.js +11 -24
- package/src/tag-cloud/edit.js +7 -1
- package/src/template-part/edit/index.js +5 -3
- package/src/template-part/edit/inner-blocks.js +8 -5
- package/src/template-part/edit/placeholder.js +31 -6
- package/src/template-part/edit/title-modal.js +19 -5
- package/src/term-description/block.json +12 -0
- package/src/term-description/style.scss +2 -0
- package/src/utils/hooks.js +19 -2
- package/src/video/block.json +4 -0
- package/src/video/edit.js +23 -8
- package/src/video/transforms.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/gallery/edit-wrapper.js +0 -37
- package/build/gallery/edit-wrapper.js.map +0 -1
- package/build/gallery/v1/constants.js +0 -10
- package/build/gallery/v1/constants.js.map +0 -1
- package/build/gallery/v1/edit.js +0 -399
- package/build/gallery/v1/edit.js.map +0 -1
- package/build/gallery/v1/gallery-button.native.js +0 -55
- package/build/gallery/v1/gallery-button.native.js.map +0 -1
- package/build/gallery/v1/gallery-image.js +0 -285
- package/build/gallery/v1/gallery-image.js.map +0 -1
- package/build/gallery/v1/gallery-image.native.js +0 -297
- package/build/gallery/v1/gallery-image.native.js.map +0 -1
- package/build/gallery/v1/gallery.js +0 -112
- package/build/gallery/v1/gallery.js.map +0 -1
- package/build/gallery/v1/gallery.native.js +0 -139
- package/build/gallery/v1/gallery.native.js.map +0 -1
- package/build/gallery/v1/save.js +0 -81
- package/build/gallery/v1/save.js.map +0 -1
- package/build/gallery/v1/shared.js +0 -17
- package/build/gallery/v1/shared.js.map +0 -1
- package/build/gallery/v1/tiles.native.js +0 -83
- package/build/gallery/v1/tiles.native.js.map +0 -1
- package/build/list-item/hooks/use-split.js +0 -39
- package/build/list-item/hooks/use-split.js.map +0 -1
- package/build/utils/constants.js +0 -15
- package/build/utils/constants.js.map +0 -1
- package/build-module/gallery/edit-wrapper.js +0 -31
- package/build-module/gallery/edit-wrapper.js.map +0 -1
- package/build-module/gallery/v1/constants.js +0 -4
- package/build-module/gallery/v1/constants.js.map +0 -1
- package/build-module/gallery/v1/edit.js +0 -393
- package/build-module/gallery/v1/edit.js.map +0 -1
- package/build-module/gallery/v1/gallery-button.native.js +0 -46
- package/build-module/gallery/v1/gallery-button.native.js.map +0 -1
- package/build-module/gallery/v1/gallery-image.js +0 -279
- package/build-module/gallery/v1/gallery-image.js.map +0 -1
- package/build-module/gallery/v1/gallery-image.native.js +0 -291
- package/build-module/gallery/v1/gallery-image.native.js.map +0 -1
- package/build-module/gallery/v1/gallery.js +0 -104
- package/build-module/gallery/v1/gallery.js.map +0 -1
- package/build-module/gallery/v1/gallery.native.js +0 -131
- package/build-module/gallery/v1/gallery.native.js.map +0 -1
- package/build-module/gallery/v1/save.js +0 -74
- package/build-module/gallery/v1/save.js.map +0 -1
- package/build-module/gallery/v1/shared.js +0 -10
- package/build-module/gallery/v1/shared.js.map +0 -1
- package/build-module/gallery/v1/tiles.native.js +0 -75
- package/build-module/gallery/v1/tiles.native.js.map +0 -1
- package/build-module/list-item/hooks/use-split.js +0 -32
- package/build-module/list-item/hooks/use-split.js.map +0 -1
- package/build-module/utils/constants.js +0 -9
- package/build-module/utils/constants.js.map +0 -1
- package/src/gallery/edit-wrapper.js +0 -27
- package/src/gallery/v1/constants.js +0 -3
- package/src/gallery/v1/edit.js +0 -450
- package/src/gallery/v1/gallery-button.native.js +0 -47
- package/src/gallery/v1/gallery-image-style.native.scss +0 -109
- package/src/gallery/v1/gallery-image.js +0 -293
- package/src/gallery/v1/gallery-image.native.js +0 -348
- package/src/gallery/v1/gallery-styles.native.scss +0 -8
- package/src/gallery/v1/gallery.js +0 -125
- package/src/gallery/v1/gallery.native.js +0 -162
- package/src/gallery/v1/save.js +0 -98
- package/src/gallery/v1/shared.js +0 -19
- package/src/gallery/v1/tiles-styles.native.scss +0 -11
- package/src/gallery/v1/tiles.native.js +0 -79
- package/src/list-item/hooks/use-split.js +0 -33
- package/src/utils/constants.js +0 -8
package/src/query/variations.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { postList } from '@wordpress/icons';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
@@ -14,53 +13,12 @@ import {
|
|
|
14
13
|
imageDateTitle,
|
|
15
14
|
} from './icons';
|
|
16
15
|
|
|
17
|
-
const QUERY_DEFAULT_ATTRIBUTES = {
|
|
18
|
-
query: {
|
|
19
|
-
perPage: 3,
|
|
20
|
-
pages: 0,
|
|
21
|
-
offset: 0,
|
|
22
|
-
postType: 'post',
|
|
23
|
-
order: 'desc',
|
|
24
|
-
orderBy: 'date',
|
|
25
|
-
author: '',
|
|
26
|
-
search: '',
|
|
27
|
-
exclude: [],
|
|
28
|
-
sticky: '',
|
|
29
|
-
inherit: false,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
16
|
const variations = [
|
|
34
|
-
{
|
|
35
|
-
name: 'posts-list',
|
|
36
|
-
title: __( 'Posts List' ),
|
|
37
|
-
description: __(
|
|
38
|
-
'Display a list of your most recent posts, excluding sticky posts.'
|
|
39
|
-
),
|
|
40
|
-
icon: postList,
|
|
41
|
-
attributes: {
|
|
42
|
-
namespace: 'core/posts-list',
|
|
43
|
-
query: {
|
|
44
|
-
perPage: 4,
|
|
45
|
-
pages: 1,
|
|
46
|
-
offset: 0,
|
|
47
|
-
postType: 'post',
|
|
48
|
-
order: 'desc',
|
|
49
|
-
orderBy: 'date',
|
|
50
|
-
author: '',
|
|
51
|
-
search: '',
|
|
52
|
-
sticky: 'exclude',
|
|
53
|
-
inherit: false,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
scope: [ 'inserter' ],
|
|
57
|
-
isActive: [ 'namespace', 'query.postType' ],
|
|
58
|
-
},
|
|
59
17
|
{
|
|
60
18
|
name: 'title-date',
|
|
61
19
|
title: __( 'Title & Date' ),
|
|
62
20
|
icon: titleDate,
|
|
63
|
-
attributes: {
|
|
21
|
+
attributes: {},
|
|
64
22
|
innerBlocks: [
|
|
65
23
|
[
|
|
66
24
|
'core/post-template',
|
|
@@ -76,7 +34,7 @@ const variations = [
|
|
|
76
34
|
name: 'title-excerpt',
|
|
77
35
|
title: __( 'Title & Excerpt' ),
|
|
78
36
|
icon: titleExcerpt,
|
|
79
|
-
attributes: {
|
|
37
|
+
attributes: {},
|
|
80
38
|
innerBlocks: [
|
|
81
39
|
[
|
|
82
40
|
'core/post-template',
|
|
@@ -92,7 +50,7 @@ const variations = [
|
|
|
92
50
|
name: 'title-date-excerpt',
|
|
93
51
|
title: __( 'Title, Date, & Excerpt' ),
|
|
94
52
|
icon: titleDateExcerpt,
|
|
95
|
-
attributes: {
|
|
53
|
+
attributes: {},
|
|
96
54
|
innerBlocks: [
|
|
97
55
|
[
|
|
98
56
|
'core/post-template',
|
|
@@ -112,7 +70,7 @@ const variations = [
|
|
|
112
70
|
name: 'image-date-title',
|
|
113
71
|
title: __( 'Image, Date, & Title' ),
|
|
114
72
|
icon: imageDateTitle,
|
|
115
|
-
attributes: {
|
|
73
|
+
attributes: {},
|
|
116
74
|
innerBlocks: [
|
|
117
75
|
[
|
|
118
76
|
'core/post-template',
|
|
@@ -51,6 +51,7 @@ export default function QueryPaginationNumbersEdit( {
|
|
|
51
51
|
<InspectorControls>
|
|
52
52
|
<PanelBody title={ __( 'Settings' ) }>
|
|
53
53
|
<RangeControl
|
|
54
|
+
__nextHasNoMarginBottom
|
|
54
55
|
label={ __( 'Number of links' ) }
|
|
55
56
|
help={ __(
|
|
56
57
|
'Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible.'
|
package/src/query-title/edit.js
CHANGED
|
@@ -13,11 +13,14 @@ import {
|
|
|
13
13
|
useBlockProps,
|
|
14
14
|
Warning,
|
|
15
15
|
HeadingLevelDropdown,
|
|
16
|
-
store as blockEditorStore,
|
|
17
16
|
} from '@wordpress/block-editor';
|
|
18
17
|
import { ToggleControl, PanelBody } from '@wordpress/components';
|
|
19
18
|
import { __, sprintf } from '@wordpress/i18n';
|
|
20
|
-
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Internal dependencies
|
|
22
|
+
*/
|
|
23
|
+
import { useArchiveLabel } from './use-archive-label';
|
|
21
24
|
|
|
22
25
|
const SUPPORTED_TYPES = [ 'archive', 'search' ];
|
|
23
26
|
|
|
@@ -25,17 +28,7 @@ export default function QueryTitleEdit( {
|
|
|
25
28
|
attributes: { type, level, textAlign, showPrefix, showSearchTerm },
|
|
26
29
|
setAttributes,
|
|
27
30
|
} ) {
|
|
28
|
-
const {
|
|
29
|
-
const { getSettings } = select( blockEditorStore );
|
|
30
|
-
const {
|
|
31
|
-
__experimentalArchiveTitleNameLabel,
|
|
32
|
-
__experimentalArchiveTitleTypeLabel,
|
|
33
|
-
} = getSettings();
|
|
34
|
-
return {
|
|
35
|
-
archiveTypeTitle: __experimentalArchiveTitleTypeLabel,
|
|
36
|
-
archiveNameLabel: __experimentalArchiveTitleNameLabel,
|
|
37
|
-
};
|
|
38
|
-
} );
|
|
31
|
+
const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();
|
|
39
32
|
|
|
40
33
|
const TagName = `h${ level }`;
|
|
41
34
|
const blockProps = useBlockProps( {
|
|
@@ -55,20 +48,20 @@ export default function QueryTitleEdit( {
|
|
|
55
48
|
let titleElement;
|
|
56
49
|
if ( type === 'archive' ) {
|
|
57
50
|
let title;
|
|
58
|
-
if (
|
|
51
|
+
if ( archiveTypeLabel ) {
|
|
59
52
|
if ( showPrefix ) {
|
|
60
53
|
if ( archiveNameLabel ) {
|
|
61
54
|
title = sprintf(
|
|
62
55
|
/* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
|
|
63
56
|
__( '%1$s: %2$s' ),
|
|
64
|
-
|
|
57
|
+
archiveTypeLabel,
|
|
65
58
|
archiveNameLabel
|
|
66
59
|
);
|
|
67
60
|
} else {
|
|
68
61
|
title = sprintf(
|
|
69
62
|
/* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
70
63
|
__( '%s: Name' ),
|
|
71
|
-
|
|
64
|
+
archiveTypeLabel
|
|
72
65
|
);
|
|
73
66
|
}
|
|
74
67
|
} else if ( archiveNameLabel ) {
|
|
@@ -77,7 +70,7 @@ export default function QueryTitleEdit( {
|
|
|
77
70
|
title = sprintf(
|
|
78
71
|
/* translators: %s: Archive type title e.g: "Category", "Tag"... */
|
|
79
72
|
__( '%s name' ),
|
|
80
|
-
|
|
73
|
+
archiveTypeLabel
|
|
81
74
|
);
|
|
82
75
|
}
|
|
83
76
|
} else {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
|
|
7
|
+
export function useArchiveLabel() {
|
|
8
|
+
const templateSlug = useSelect( ( select ) => {
|
|
9
|
+
// @wordpress/block-library should not depend on @wordpress/editor.
|
|
10
|
+
// Blocks can be loaded into a *non-post* block editor, so to avoid
|
|
11
|
+
// declaring @wordpress/editor as a dependency, we must access its
|
|
12
|
+
// store by string.
|
|
13
|
+
// The solution here is to split WP specific blocks from generic blocks.
|
|
14
|
+
// eslint-disable-next-line @wordpress/data-no-store-string-literals
|
|
15
|
+
const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } =
|
|
16
|
+
select( 'core/editor' );
|
|
17
|
+
const currentPostType = getCurrentPostType();
|
|
18
|
+
const templateId =
|
|
19
|
+
getCurrentTemplateId() ||
|
|
20
|
+
( currentPostType === 'wp_template' ? getCurrentPostId() : null );
|
|
21
|
+
|
|
22
|
+
return templateId
|
|
23
|
+
? select( coreStore ).getEditedEntityRecord(
|
|
24
|
+
'postType',
|
|
25
|
+
'wp_template',
|
|
26
|
+
templateId
|
|
27
|
+
)?.slug
|
|
28
|
+
: null;
|
|
29
|
+
}, [] );
|
|
30
|
+
const taxonomyMatches = templateSlug?.match(
|
|
31
|
+
/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
|
|
32
|
+
);
|
|
33
|
+
let taxonomy;
|
|
34
|
+
let term;
|
|
35
|
+
let isAuthor = false;
|
|
36
|
+
let authorSlug;
|
|
37
|
+
if ( taxonomyMatches ) {
|
|
38
|
+
// If is for a all taxonomies of a type
|
|
39
|
+
if ( taxonomyMatches[ 1 ] ) {
|
|
40
|
+
taxonomy = taxonomyMatches[ 2 ]
|
|
41
|
+
? taxonomyMatches[ 2 ]
|
|
42
|
+
: taxonomyMatches[ 1 ];
|
|
43
|
+
}
|
|
44
|
+
// If is for a all taxonomies of a type
|
|
45
|
+
else if ( taxonomyMatches[ 3 ] ) {
|
|
46
|
+
taxonomy = taxonomyMatches[ 6 ]
|
|
47
|
+
? taxonomyMatches[ 6 ]
|
|
48
|
+
: taxonomyMatches[ 4 ];
|
|
49
|
+
term = taxonomyMatches[ 7 ];
|
|
50
|
+
}
|
|
51
|
+
taxonomy = taxonomy === 'tag' ? 'post_tag' : taxonomy;
|
|
52
|
+
|
|
53
|
+
//getTaxonomy( 'category' );
|
|
54
|
+
//wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );
|
|
55
|
+
} else {
|
|
56
|
+
const authorMatches = templateSlug?.match( /^(author)$|^author-(.+)$/ );
|
|
57
|
+
if ( authorMatches ) {
|
|
58
|
+
isAuthor = true;
|
|
59
|
+
if ( authorMatches[ 2 ] ) {
|
|
60
|
+
authorSlug = authorMatches[ 2 ];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return useSelect(
|
|
65
|
+
( select ) => {
|
|
66
|
+
const { getEntityRecords, getTaxonomy, getAuthors } =
|
|
67
|
+
select( coreStore );
|
|
68
|
+
let archiveTypeLabel;
|
|
69
|
+
let archiveNameLabel;
|
|
70
|
+
if ( taxonomy ) {
|
|
71
|
+
archiveTypeLabel =
|
|
72
|
+
getTaxonomy( taxonomy )?.labels?.singular_name;
|
|
73
|
+
}
|
|
74
|
+
if ( term ) {
|
|
75
|
+
const records = getEntityRecords( 'taxonomy', taxonomy, {
|
|
76
|
+
slug: term,
|
|
77
|
+
per_page: 1,
|
|
78
|
+
} );
|
|
79
|
+
if ( records && records[ 0 ] ) {
|
|
80
|
+
archiveNameLabel = records[ 0 ].name;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if ( isAuthor ) {
|
|
84
|
+
archiveTypeLabel = 'Author';
|
|
85
|
+
if ( authorSlug ) {
|
|
86
|
+
const authorRecords = getAuthors( { slug: authorSlug } );
|
|
87
|
+
if ( authorRecords && authorRecords[ 0 ] ) {
|
|
88
|
+
archiveNameLabel = authorRecords[ 0 ].name;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
archiveTypeLabel,
|
|
94
|
+
archiveNameLabel,
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
[ authorSlug, isAuthor, taxonomy, term ]
|
|
98
|
+
);
|
|
99
|
+
}
|
package/src/quote/block.json
CHANGED
|
@@ -36,6 +36,18 @@
|
|
|
36
36
|
"backgroundImage": true
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
"__experimentalBorder": {
|
|
40
|
+
"color": true,
|
|
41
|
+
"radius": true,
|
|
42
|
+
"style": true,
|
|
43
|
+
"width": true,
|
|
44
|
+
"__experimentalDefaultControls": {
|
|
45
|
+
"color": true,
|
|
46
|
+
"radius": true,
|
|
47
|
+
"style": true,
|
|
48
|
+
"width": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
39
51
|
"dimensions": {
|
|
40
52
|
"minHeight": true,
|
|
41
53
|
"__experimentalDefaultControls": {
|
|
@@ -70,7 +82,9 @@
|
|
|
70
82
|
"allowEditing": false
|
|
71
83
|
},
|
|
72
84
|
"spacing": {
|
|
73
|
-
"blockGap": true
|
|
85
|
+
"blockGap": true,
|
|
86
|
+
"padding": true,
|
|
87
|
+
"margin": true
|
|
74
88
|
},
|
|
75
89
|
"interactivity": {
|
|
76
90
|
"clientNavigation": true
|
package/src/search/block.json
CHANGED
package/src/search/editor.scss
CHANGED
package/src/site-logo/edit.js
CHANGED
|
@@ -403,7 +403,10 @@ export default function LogoEdit( {
|
|
|
403
403
|
} = useSelect( ( select ) => {
|
|
404
404
|
const { canUser, getEntityRecord, getEditedEntityRecord } =
|
|
405
405
|
select( coreStore );
|
|
406
|
-
const _canUserEdit = canUser( 'update',
|
|
406
|
+
const _canUserEdit = canUser( 'update', {
|
|
407
|
+
kind: 'root',
|
|
408
|
+
name: 'site',
|
|
409
|
+
} );
|
|
407
410
|
const siteSettings = _canUserEdit
|
|
408
411
|
? getEditedEntityRecord( 'root', 'site' )
|
|
409
412
|
: undefined;
|
package/src/site-tagline/edit.js
CHANGED
|
@@ -29,12 +29,15 @@ export default function SiteTaglineEdit( {
|
|
|
29
29
|
const { canUserEdit, tagline } = useSelect( ( select ) => {
|
|
30
30
|
const { canUser, getEntityRecord, getEditedEntityRecord } =
|
|
31
31
|
select( coreStore );
|
|
32
|
-
const canEdit = canUser( 'update',
|
|
32
|
+
const canEdit = canUser( 'update', {
|
|
33
|
+
kind: 'root',
|
|
34
|
+
name: 'site',
|
|
35
|
+
} );
|
|
33
36
|
const settings = canEdit ? getEditedEntityRecord( 'root', 'site' ) : {};
|
|
34
37
|
const readOnlySettings = getEntityRecord( 'root', '__unstableBase' );
|
|
35
38
|
|
|
36
39
|
return {
|
|
37
|
-
canUserEdit:
|
|
40
|
+
canUserEdit: canEdit,
|
|
38
41
|
tagline: canEdit
|
|
39
42
|
? settings?.description
|
|
40
43
|
: readOnlySettings?.description,
|
package/src/site-title/edit.js
CHANGED
|
@@ -32,7 +32,10 @@ export default function SiteTitleEdit( {
|
|
|
32
32
|
const { canUserEdit, title } = useSelect( ( select ) => {
|
|
33
33
|
const { canUser, getEntityRecord, getEditedEntityRecord } =
|
|
34
34
|
select( coreStore );
|
|
35
|
-
const canEdit = canUser( 'update',
|
|
35
|
+
const canEdit = canUser( 'update', {
|
|
36
|
+
kind: 'root',
|
|
37
|
+
name: 'site',
|
|
38
|
+
} );
|
|
36
39
|
const settings = canEdit ? getEditedEntityRecord( 'root', 'site' ) : {};
|
|
37
40
|
const readOnlySettings = getEntityRecord( 'root', '__unstableBase' );
|
|
38
41
|
|
package/src/site-title/index.js
CHANGED
package/src/social-link/edit.js
CHANGED
|
@@ -6,11 +6,15 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
+
import { DELETE, BACKSPACE } from '@wordpress/keycodes';
|
|
10
|
+
import { useDispatch } from '@wordpress/data';
|
|
11
|
+
|
|
9
12
|
import {
|
|
10
13
|
InspectorControls,
|
|
11
14
|
URLPopover,
|
|
12
15
|
URLInput,
|
|
13
16
|
useBlockProps,
|
|
17
|
+
store as blockEditorStore,
|
|
14
18
|
} from '@wordpress/block-editor';
|
|
15
19
|
import { useState } from '@wordpress/element';
|
|
16
20
|
import {
|
|
@@ -32,17 +36,24 @@ const SocialLinkURLPopover = ( {
|
|
|
32
36
|
setAttributes,
|
|
33
37
|
setPopover,
|
|
34
38
|
popoverAnchor,
|
|
39
|
+
clientId,
|
|
35
40
|
} ) => {
|
|
41
|
+
const { removeBlock } = useDispatch( blockEditorStore );
|
|
36
42
|
return (
|
|
37
43
|
<URLPopover
|
|
38
44
|
anchor={ popoverAnchor }
|
|
39
|
-
|
|
45
|
+
aria-label={ __( 'Edit social link' ) }
|
|
46
|
+
onClose={ () => {
|
|
47
|
+
setPopover( false );
|
|
48
|
+
popoverAnchor?.focus();
|
|
49
|
+
} }
|
|
40
50
|
>
|
|
41
51
|
<form
|
|
42
52
|
className="block-editor-url-popover__link-editor"
|
|
43
53
|
onSubmit={ ( event ) => {
|
|
44
54
|
event.preventDefault();
|
|
45
55
|
setPopover( false );
|
|
56
|
+
popoverAnchor?.focus();
|
|
46
57
|
} }
|
|
47
58
|
>
|
|
48
59
|
<div className="block-editor-url-input">
|
|
@@ -56,6 +67,18 @@ const SocialLinkURLPopover = ( {
|
|
|
56
67
|
label={ __( 'Enter social link' ) }
|
|
57
68
|
hideLabelFromVision
|
|
58
69
|
disableSuggestions
|
|
70
|
+
onKeyDown={ ( event ) => {
|
|
71
|
+
if (
|
|
72
|
+
!! url ||
|
|
73
|
+
event.defaultPrevented ||
|
|
74
|
+
! [ BACKSPACE, DELETE ].includes(
|
|
75
|
+
event.keyCode
|
|
76
|
+
)
|
|
77
|
+
) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
removeBlock( clientId );
|
|
81
|
+
} }
|
|
59
82
|
/>
|
|
60
83
|
</div>
|
|
61
84
|
<Button
|
|
@@ -73,6 +96,7 @@ const SocialLinkEdit = ( {
|
|
|
73
96
|
context,
|
|
74
97
|
isSelected,
|
|
75
98
|
setAttributes,
|
|
99
|
+
clientId,
|
|
76
100
|
} ) => {
|
|
77
101
|
const { url, service, label = '', rel } = attributes;
|
|
78
102
|
const {
|
|
@@ -117,9 +141,9 @@ const SocialLinkEdit = ( {
|
|
|
117
141
|
<PanelRow>
|
|
118
142
|
<TextControl
|
|
119
143
|
__nextHasNoMarginBottom
|
|
120
|
-
label={ __( '
|
|
144
|
+
label={ __( 'Text' ) }
|
|
121
145
|
help={ __(
|
|
122
|
-
'The
|
|
146
|
+
'The text is visible when enabled from the parent Social Icons block.'
|
|
123
147
|
) }
|
|
124
148
|
value={ label }
|
|
125
149
|
onChange={ ( value ) =>
|
|
@@ -143,6 +167,7 @@ const SocialLinkEdit = ( {
|
|
|
143
167
|
className="wp-block-social-link-anchor"
|
|
144
168
|
ref={ setPopoverAnchor }
|
|
145
169
|
onClick={ () => setPopover( true ) }
|
|
170
|
+
aria-haspopup="dialog"
|
|
146
171
|
>
|
|
147
172
|
<IconComponent />
|
|
148
173
|
<span
|
|
@@ -159,6 +184,7 @@ const SocialLinkEdit = ( {
|
|
|
159
184
|
setAttributes={ setAttributes }
|
|
160
185
|
setPopover={ setPopover }
|
|
161
186
|
popoverAnchor={ popoverAnchor }
|
|
187
|
+
clientId={ clientId }
|
|
162
188
|
/>
|
|
163
189
|
) }
|
|
164
190
|
</li>
|
|
@@ -5,6 +5,6 @@ import { Path, SVG } from '@wordpress/primitives';
|
|
|
5
5
|
|
|
6
6
|
export const SoundCloudIcon = () => (
|
|
7
7
|
<SVG width="24" height="24" viewBox="0 0 24 24" version="1.1">
|
|
8
|
-
<Path d="
|
|
8
|
+
<Path d="M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z" />
|
|
9
9
|
</SVG>
|
|
10
10
|
);
|
|
@@ -81,6 +81,18 @@
|
|
|
81
81
|
},
|
|
82
82
|
"interactivity": {
|
|
83
83
|
"clientNavigation": true
|
|
84
|
+
},
|
|
85
|
+
"__experimentalBorder": {
|
|
86
|
+
"radius": true,
|
|
87
|
+
"color": true,
|
|
88
|
+
"width": true,
|
|
89
|
+
"style": true,
|
|
90
|
+
"__experimentalDefaultControls": {
|
|
91
|
+
"radius": true,
|
|
92
|
+
"color": true,
|
|
93
|
+
"width": true,
|
|
94
|
+
"style": true
|
|
95
|
+
}
|
|
84
96
|
}
|
|
85
97
|
},
|
|
86
98
|
"styles": [
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
// Provide colors for a range of icons.
|
|
110
|
-
.wp-block-social-links:not(.is-style-logos-only) {
|
|
110
|
+
:where(.wp-block-social-links:not(.is-style-logos-only)) {
|
|
111
111
|
// Generic items such as mail, feed, etc.
|
|
112
112
|
@import "../social-link/socials-with-bg.scss";
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
// The specificity for this selector has not been reduced to 0-1-0 as per
|
|
117
117
|
// global styles variation selectors as the lack of background should be
|
|
118
118
|
// enforced for this block style.
|
|
119
|
-
.wp-block-social-links.is-style-logos-only {
|
|
119
|
+
:where(.wp-block-social-links.is-style-logos-only) {
|
|
120
120
|
.wp-social-link {
|
|
121
121
|
background: none;
|
|
122
122
|
|
package/src/table/edit.js
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
useBlockProps,
|
|
17
17
|
__experimentalUseColorProps as useColorProps,
|
|
18
18
|
__experimentalUseBorderProps as useBorderProps,
|
|
19
|
-
__experimentalGetElementClassName,
|
|
20
19
|
} from '@wordpress/block-editor';
|
|
21
20
|
import { __ } from '@wordpress/i18n';
|
|
22
21
|
import {
|
|
@@ -41,7 +40,6 @@ import {
|
|
|
41
40
|
tableRowDelete,
|
|
42
41
|
table,
|
|
43
42
|
} from '@wordpress/icons';
|
|
44
|
-
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
45
43
|
|
|
46
44
|
/**
|
|
47
45
|
* Internal dependencies
|
|
@@ -57,6 +55,7 @@ import {
|
|
|
57
55
|
toggleSection,
|
|
58
56
|
isEmptyTableSection,
|
|
59
57
|
} from './state';
|
|
58
|
+
import { Caption } from '../utils/caption';
|
|
60
59
|
|
|
61
60
|
const ALIGNMENT_CONTROLS = [
|
|
62
61
|
{
|
|
@@ -98,7 +97,7 @@ function TableEdit( {
|
|
|
98
97
|
insertBlocksAfter,
|
|
99
98
|
isSelected,
|
|
100
99
|
} ) {
|
|
101
|
-
const { hasFixedLayout,
|
|
100
|
+
const { hasFixedLayout, head, foot } = attributes;
|
|
102
101
|
const [ initialRowCount, setInitialRowCount ] = useState( 2 );
|
|
103
102
|
const [ initialColumnCount, setInitialColumnCount ] = useState( 2 );
|
|
104
103
|
const [ selectedCell, setSelectedCell ] = useState();
|
|
@@ -523,27 +522,7 @@ function TableEdit( {
|
|
|
523
522
|
{ renderedSections }
|
|
524
523
|
</table>
|
|
525
524
|
) }
|
|
526
|
-
{
|
|
527
|
-
<RichText
|
|
528
|
-
identifier="caption"
|
|
529
|
-
tagName="figcaption"
|
|
530
|
-
className={ __experimentalGetElementClassName( 'caption' ) }
|
|
531
|
-
aria-label={ __( 'Table caption text' ) }
|
|
532
|
-
placeholder={ __( 'Add caption' ) }
|
|
533
|
-
value={ caption }
|
|
534
|
-
onChange={ ( value ) =>
|
|
535
|
-
setAttributes( { caption: value } )
|
|
536
|
-
}
|
|
537
|
-
// Deselect the selected table cell when the caption is focused.
|
|
538
|
-
onFocus={ () => setSelectedCell() }
|
|
539
|
-
__unstableOnSplitAtEnd={ () =>
|
|
540
|
-
insertBlocksAfter(
|
|
541
|
-
createBlock( getDefaultBlockName() )
|
|
542
|
-
)
|
|
543
|
-
}
|
|
544
|
-
/>
|
|
545
|
-
) }
|
|
546
|
-
{ isEmpty && (
|
|
525
|
+
{ isEmpty ? (
|
|
547
526
|
<Placeholder
|
|
548
527
|
label={ __( 'Table' ) }
|
|
549
528
|
icon={ <BlockIcon icon={ icon } showColors /> }
|
|
@@ -582,6 +561,14 @@ function TableEdit( {
|
|
|
582
561
|
</Button>
|
|
583
562
|
</form>
|
|
584
563
|
</Placeholder>
|
|
564
|
+
) : (
|
|
565
|
+
<Caption
|
|
566
|
+
attributes={ attributes }
|
|
567
|
+
setAttributes={ setAttributes }
|
|
568
|
+
isSelected={ isSelected }
|
|
569
|
+
insertBlocksAfter={ insertBlocksAfter }
|
|
570
|
+
label={ __( 'Table caption text' ) }
|
|
571
|
+
/>
|
|
585
572
|
) }
|
|
586
573
|
</figure>
|
|
587
574
|
);
|
package/src/tag-cloud/edit.js
CHANGED
|
@@ -50,9 +50,15 @@ function TagCloudEdit( { attributes, setAttributes } ) {
|
|
|
50
50
|
} = attributes;
|
|
51
51
|
|
|
52
52
|
const [ availableUnits ] = useSettings( 'spacing.units' );
|
|
53
|
+
|
|
54
|
+
// The `pt` unit is used as the default value and is therefore
|
|
55
|
+
// always considered an available unit.
|
|
53
56
|
const units = useCustomUnits( {
|
|
54
|
-
availableUnits: availableUnits
|
|
57
|
+
availableUnits: availableUnits
|
|
58
|
+
? [ ...availableUnits, 'pt' ]
|
|
59
|
+
: [ '%', 'px', 'em', 'rem', 'pt' ],
|
|
55
60
|
} );
|
|
61
|
+
|
|
56
62
|
const taxonomies = useSelect(
|
|
57
63
|
( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),
|
|
58
64
|
[]
|