@wordpress/block-library 9.3.0 → 9.5.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 +8 -0
- package/build/avatar/edit.js +1 -0
- package/build/avatar/edit.js.map +1 -1
- package/build/block/edit.js +38 -23
- package/build/block/edit.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 +20 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/edit.js +2 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/index.js +2 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +2 -2
- package/build/columns/index.js.map +1 -1
- package/build/comment-template/index.js +12 -0
- package/build/comment-template/index.js.map +1 -1
- package/build/comments-title/deprecated.js +3 -0
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/edit.js +3 -1
- package/build/comments-title/edit.js.map +1 -1
- package/build/comments-title/index.js +3 -0
- package/build/comments-title/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/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/embed/variations.js +39 -34
- package/build/embed/variations.js.map +1 -1
- package/build/footnotes/index.js +1 -1
- package/build/footnotes/index.js.map +1 -1
- package/build/form/edit.js +4 -4
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +3 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +42 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gap-styles.js +1 -9
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/index.js +10 -0
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/use-image-sizes.js +2 -2
- package/build/gallery/use-image-sizes.js.map +1 -1
- package/build/group/deprecated.js +2 -5
- package/build/group/deprecated.js.map +1 -1
- package/build/group/index.js +27 -30
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +51 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +17 -1
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +24 -11
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +3 -0
- package/build/image/index.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/latest-posts/edit.js +1 -0
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/edit.js +3 -3
- package/build/list/edit.js.map +1 -1
- package/build/list/index.js +1 -1
- package/build/list/ordered-list-settings.js +19 -17
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list-item/edit.js +2 -2
- 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/index.js +3 -2
- package/build/list-item/index.js.map +1 -1
- package/build/loginout/index.js +14 -1
- package/build/loginout/index.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/index.js +5 -4
- package/build/navigation/edit/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 +0 -11
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +1 -0
- 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-comments-form/index.js +12 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/index.js +15 -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 +12 -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-navigation-link/edit.js +2 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/index.js +15 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-time-to-read/index.js +6 -0
- package/build/post-time-to-read/index.js.map +1 -1
- package/build/post-title/edit.js +9 -3
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +15 -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/enhanced-pagination-control.js +1 -0
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +90 -12
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/offset-controls.js +37 -0
- package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
- 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/pages-control.js +36 -0
- package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
- 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/per-page-control.js +40 -0
- package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js +2 -1
- 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 +3 -76
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/utils.js +15 -6
- 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 +13 -19
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +3 -0
- package/build/query-title/index.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 +19 -9
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +8 -5
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +18 -2
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit.js +6 -3
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +16 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +0 -1
- 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/spacer/controls.js +8 -13
- package/build/spacer/controls.js.map +1 -1
- package/build/table-of-contents/index.js +14 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/edit.js +42 -33
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +1 -1
- package/build/template-part/edit/index.js +8 -5
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +11 -4
- 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 +20 -8
- 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 +5 -1
- package/build/utils/hooks.js.map +1 -1
- package/build-module/avatar/edit.js +1 -0
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/edit.js +38 -23
- package/build-module/block/edit.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 +20 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/edit.js +2 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/index.js +2 -0
- package/build-module/column/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/comment-template/index.js +12 -0
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments-title/deprecated.js +3 -0
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/edit.js +3 -1
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/comments-title/index.js +3 -0
- package/build-module/comments-title/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/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/embed/variations.js +40 -35
- package/build-module/embed/variations.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/edit.js +4 -4
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +3 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +43 -9
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gap-styles.js +1 -9
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/index.js +10 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/use-image-sizes.js +2 -2
- package/build-module/gallery/use-image-sizes.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 +27 -30
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +51 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/edit.js +2 -0
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +17 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +1 -1
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +25 -12
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +3 -0
- package/build-module/image/index.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/latest-posts/edit.js +1 -0
- package/build-module/latest-posts/edit.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/index.js +1 -1
- package/build-module/list/ordered-list-settings.js +19 -17
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/edit.js +2 -2
- 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/index.js +3 -2
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/loginout/index.js +14 -1
- package/build-module/loginout/index.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/index.js +5 -4
- package/build-module/navigation/edit/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 +0 -11
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +1 -0
- 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-comments-form/index.js +12 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/index.js +15 -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 +12 -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-navigation-link/edit.js +2 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/index.js +15 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-time-to-read/index.js +6 -0
- package/build-module/post-time-to-read/index.js.map +1 -1
- package/build-module/post-title/edit.js +9 -3
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +15 -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/enhanced-pagination-control.js +1 -0
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +92 -14
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
- package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
- 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/pages-control.js +28 -0
- package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
- 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/per-page-control.js +33 -0
- package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js +2 -1
- 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 +4 -78
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/utils.js +15 -6
- 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 +14 -20
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +3 -0
- package/build-module/query-title/index.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 +19 -9
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +8 -5
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +18 -2
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit.js +6 -3
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +16 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +0 -1
- 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/spacer/controls.js +9 -14
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table-of-contents/index.js +14 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/edit.js +43 -34
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -1
- package/build-module/template-part/edit/index.js +8 -5
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +11 -4
- 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 +20 -8
- 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 +5 -1
- package/build-module/utils/hooks.js.map +1 -1
- package/build-style/archives/editor-rtl.css +3 -0
- package/build-style/archives/editor.css +3 -0
- package/build-style/archives/style-rtl.css +3 -0
- package/build-style/archives/style.css +3 -0
- package/build-style/audio/editor-rtl.css +3 -0
- package/build-style/audio/editor.css +3 -0
- package/build-style/audio/style-rtl.css +3 -0
- package/build-style/audio/style.css +3 -0
- package/build-style/audio/theme-rtl.css +3 -0
- package/build-style/audio/theme.css +3 -0
- package/build-style/avatar/editor-rtl.css +3 -0
- package/build-style/avatar/editor.css +3 -0
- package/build-style/avatar/style-rtl.css +3 -0
- package/build-style/avatar/style.css +3 -0
- package/build-style/button/editor-rtl.css +3 -0
- package/build-style/button/editor.css +3 -0
- package/build-style/button/style-rtl.css +3 -0
- package/build-style/button/style.css +3 -0
- package/build-style/buttons/editor-rtl.css +3 -0
- package/build-style/buttons/editor.css +3 -0
- package/build-style/buttons/style-rtl.css +3 -0
- package/build-style/buttons/style.css +3 -0
- package/build-style/calendar/style-rtl.css +3 -0
- package/build-style/calendar/style.css +3 -0
- package/build-style/categories/editor-rtl.css +7 -0
- package/build-style/categories/editor.css +7 -0
- package/build-style/categories/style-rtl.css +7 -0
- package/build-style/categories/style.css +7 -0
- package/build-style/classic-rtl.css +3 -0
- package/build-style/classic.css +3 -0
- package/build-style/code/editor-rtl.css +3 -0
- package/build-style/code/editor.css +3 -0
- package/build-style/code/style-rtl.css +3 -0
- package/build-style/code/style.css +3 -0
- package/build-style/code/theme-rtl.css +3 -0
- package/build-style/code/theme.css +3 -0
- package/build-style/columns/editor-rtl.css +3 -0
- package/build-style/columns/editor.css +3 -0
- package/build-style/columns/style-rtl.css +3 -0
- package/build-style/columns/style.css +3 -0
- package/build-style/comment-author-avatar/editor-rtl.css +3 -0
- package/build-style/comment-author-avatar/editor.css +3 -0
- package/build-style/comment-content/style-rtl.css +3 -0
- package/build-style/comment-content/style.css +3 -0
- package/build-style/comment-template/style-rtl.css +3 -0
- package/build-style/comment-template/style.css +3 -0
- package/build-style/comments/editor-rtl.css +3 -0
- package/build-style/comments/editor.css +3 -0
- package/build-style/comments/style-rtl.css +3 -0
- package/build-style/comments/style.css +3 -0
- package/build-style/comments-pagination/editor-rtl.css +3 -0
- package/build-style/comments-pagination/editor.css +3 -0
- package/build-style/comments-pagination/style-rtl.css +3 -0
- package/build-style/comments-pagination/style.css +3 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/comments-pagination-numbers/editor.css +3 -0
- package/build-style/comments-title/editor-rtl.css +3 -0
- package/build-style/comments-title/editor.css +3 -0
- package/build-style/common-rtl.css +3 -0
- package/build-style/common.css +3 -0
- package/build-style/cover/editor-rtl.css +3 -0
- package/build-style/cover/editor.css +3 -0
- package/build-style/cover/style-rtl.css +3 -0
- package/build-style/cover/style.css +3 -0
- package/build-style/details/editor-rtl.css +3 -0
- package/build-style/details/editor.css +3 -0
- package/build-style/details/style-rtl.css +3 -0
- package/build-style/details/style.css +3 -0
- package/build-style/editor-elements-rtl.css +3 -0
- package/build-style/editor-elements.css +3 -0
- package/build-style/editor-rtl.css +29 -42
- package/build-style/editor.css +29 -42
- package/build-style/elements-rtl.css +3 -0
- package/build-style/elements.css +3 -0
- package/build-style/embed/editor-rtl.css +3 -0
- package/build-style/embed/editor.css +3 -0
- package/build-style/embed/style-rtl.css +3 -0
- package/build-style/embed/style.css +3 -0
- package/build-style/embed/theme-rtl.css +3 -0
- package/build-style/embed/theme.css +3 -0
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/file/style-rtl.css +3 -0
- package/build-style/file/style.css +3 -0
- package/build-style/footnotes/style-rtl.css +3 -0
- package/build-style/footnotes/style.css +3 -0
- package/build-style/form-input/editor-rtl.css +3 -0
- package/build-style/form-input/editor.css +3 -0
- package/build-style/form-input/style-rtl.css +4 -0
- package/build-style/form-input/style.css +4 -0
- package/build-style/form-submission-notification/editor-rtl.css +3 -0
- package/build-style/form-submission-notification/editor.css +3 -0
- package/build-style/form-submit-button/style-rtl.css +3 -0
- package/build-style/form-submit-button/style.css +3 -0
- package/build-style/freeform/editor-rtl.css +3 -0
- package/build-style/freeform/editor.css +3 -0
- package/build-style/gallery/editor-rtl.css +3 -1
- package/build-style/gallery/editor.css +3 -1
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/gallery/theme-rtl.css +3 -0
- package/build-style/gallery/theme.css +3 -0
- package/build-style/group/editor-rtl.css +3 -11
- package/build-style/group/editor.css +3 -11
- package/build-style/group/style-rtl.css +3 -0
- package/build-style/group/style.css +3 -0
- package/build-style/group/theme-rtl.css +3 -0
- package/build-style/group/theme.css +3 -0
- package/build-style/heading/style-rtl.css +3 -0
- package/build-style/heading/style.css +3 -0
- package/build-style/html/editor-rtl.css +3 -0
- package/build-style/html/editor.css +3 -0
- package/build-style/image/editor-rtl.css +19 -4
- package/build-style/image/editor.css +19 -4
- package/build-style/image/style-rtl.css +22 -0
- package/build-style/image/style.css +22 -0
- package/build-style/image/theme-rtl.css +3 -0
- package/build-style/image/theme.css +3 -0
- package/build-style/latest-comments/style-rtl.css +3 -0
- package/build-style/latest-comments/style.css +3 -0
- package/build-style/latest-posts/editor-rtl.css +3 -3
- package/build-style/latest-posts/editor.css +3 -3
- package/build-style/latest-posts/style-rtl.css +3 -0
- package/build-style/latest-posts/style.css +3 -0
- package/build-style/list/style-rtl.css +4 -1
- package/build-style/list/style.css +4 -1
- package/build-style/loginout/style-rtl.css +94 -0
- package/build-style/loginout/style.css +94 -0
- package/build-style/media-text/editor-rtl.css +3 -0
- package/build-style/media-text/editor.css +3 -0
- package/build-style/media-text/style-rtl.css +3 -0
- package/build-style/media-text/style.css +3 -0
- package/build-style/more/editor-rtl.css +3 -0
- package/build-style/more/editor.css +3 -0
- package/build-style/navigation/editor-rtl.css +3 -12
- package/build-style/navigation/editor.css +3 -12
- package/build-style/navigation/style-rtl.css +4 -4
- package/build-style/navigation/style.css +4 -4
- package/build-style/navigation-link/editor-rtl.css +3 -0
- package/build-style/navigation-link/editor.css +3 -0
- package/build-style/navigation-link/style-rtl.css +3 -0
- package/build-style/navigation-link/style.css +3 -0
- package/build-style/navigation-submenu/editor-rtl.css +3 -0
- package/build-style/navigation-submenu/editor.css +3 -0
- package/build-style/nextpage/editor-rtl.css +3 -0
- package/build-style/nextpage/editor.css +3 -0
- package/build-style/page-list/editor-rtl.css +3 -0
- package/build-style/page-list/editor.css +3 -0
- package/build-style/page-list/style-rtl.css +3 -0
- package/build-style/page-list/style.css +3 -0
- package/build-style/paragraph/editor-rtl.css +3 -0
- package/build-style/paragraph/editor.css +3 -0
- package/build-style/paragraph/style-rtl.css +3 -0
- package/build-style/paragraph/style.css +3 -0
- package/build-style/post-author/style-rtl.css +3 -0
- package/build-style/post-author/style.css +3 -0
- package/build-style/post-comments-form/editor-rtl.css +3 -0
- package/build-style/post-comments-form/editor.css +3 -0
- package/build-style/post-comments-form/style-rtl.css +4 -1
- package/build-style/post-comments-form/style.css +4 -1
- package/build-style/post-content/editor-rtl.css +3 -0
- package/build-style/post-content/editor.css +3 -0
- package/build-style/post-content/style-rtl.css +96 -0
- package/build-style/post-content/style.css +96 -0
- package/build-style/post-date/style-rtl.css +3 -0
- package/build-style/post-date/style.css +3 -0
- package/build-style/post-excerpt/editor-rtl.css +3 -0
- package/build-style/post-excerpt/editor.css +3 -0
- package/build-style/post-excerpt/style-rtl.css +4 -0
- package/build-style/post-excerpt/style.css +4 -0
- package/build-style/post-featured-image/editor-rtl.css +3 -0
- package/build-style/post-featured-image/editor.css +3 -0
- package/build-style/post-featured-image/style-rtl.css +3 -0
- package/build-style/post-featured-image/style.css +3 -0
- package/build-style/post-navigation-link/style-rtl.css +3 -0
- package/build-style/post-navigation-link/style.css +3 -0
- package/build-style/post-template/editor-rtl.css +3 -0
- package/build-style/post-template/editor.css +3 -0
- package/build-style/post-template/style-rtl.css +3 -0
- package/build-style/post-template/style.css +3 -0
- package/build-style/post-terms/style-rtl.css +3 -0
- package/build-style/post-terms/style.css +3 -0
- package/build-style/post-time-to-read/style-rtl.css +3 -0
- package/build-style/post-time-to-read/style.css +3 -0
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/preformatted/style-rtl.css +3 -0
- package/build-style/preformatted/style.css +3 -0
- package/build-style/pullquote/editor-rtl.css +3 -0
- package/build-style/pullquote/editor.css +3 -0
- package/build-style/pullquote/style-rtl.css +3 -0
- package/build-style/pullquote/style.css +3 -0
- package/build-style/pullquote/theme-rtl.css +3 -0
- package/build-style/pullquote/theme.css +3 -0
- package/build-style/query/editor-rtl.css +3 -7
- package/build-style/query/editor.css +3 -7
- package/build-style/query-pagination/editor-rtl.css +3 -0
- package/build-style/query-pagination/editor.css +3 -0
- package/build-style/query-pagination/style-rtl.css +3 -0
- package/build-style/query-pagination/style.css +3 -0
- package/build-style/query-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/query-pagination-numbers/editor.css +3 -0
- package/build-style/query-title/style-rtl.css +3 -0
- package/build-style/query-title/style.css +3 -0
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/quote/theme-rtl.css +6 -3
- package/build-style/quote/theme.css +6 -3
- package/build-style/read-more/style-rtl.css +3 -0
- package/build-style/read-more/style.css +3 -0
- package/build-style/reset-rtl.css +3 -0
- package/build-style/reset.css +3 -0
- package/build-style/rss/editor-rtl.css +3 -0
- package/build-style/rss/editor.css +3 -0
- package/build-style/rss/style-rtl.css +3 -0
- package/build-style/rss/style.css +3 -0
- package/build-style/search/editor-rtl.css +4 -1
- package/build-style/search/editor.css +4 -1
- package/build-style/search/style-rtl.css +3 -0
- package/build-style/search/style.css +3 -0
- package/build-style/search/theme-rtl.css +3 -0
- package/build-style/search/theme.css +3 -0
- package/build-style/separator/editor-rtl.css +3 -0
- package/build-style/separator/editor.css +3 -0
- package/build-style/separator/style-rtl.css +3 -0
- package/build-style/separator/style.css +3 -0
- package/build-style/separator/theme-rtl.css +3 -0
- package/build-style/separator/theme.css +3 -0
- package/build-style/shortcode/editor-rtl.css +3 -0
- package/build-style/shortcode/editor.css +3 -0
- package/build-style/site-logo/editor-rtl.css +3 -0
- package/build-style/site-logo/editor.css +3 -0
- package/build-style/site-logo/style-rtl.css +3 -0
- package/build-style/site-logo/style.css +3 -0
- package/build-style/site-tagline/editor-rtl.css +3 -0
- package/build-style/site-tagline/editor.css +3 -0
- package/build-style/site-tagline/style-rtl.css +94 -0
- package/build-style/site-tagline/style.css +94 -0
- package/build-style/site-title/editor-rtl.css +3 -0
- package/build-style/site-title/editor.css +3 -0
- package/build-style/site-title/style-rtl.css +7 -1
- package/build-style/site-title/style.css +7 -1
- package/build-style/social-link/editor-rtl.css +3 -0
- package/build-style/social-link/editor.css +3 -0
- package/build-style/social-links/editor-rtl.css +3 -0
- package/build-style/social-links/editor.css +3 -0
- package/build-style/social-links/style-rtl.css +5 -2
- package/build-style/social-links/style.css +5 -2
- package/build-style/spacer/editor-rtl.css +3 -0
- package/build-style/spacer/editor.css +3 -0
- package/build-style/spacer/style-rtl.css +3 -0
- package/build-style/spacer/style.css +3 -0
- package/build-style/style-rtl.css +56 -9
- package/build-style/style.css +56 -9
- package/build-style/table/editor-rtl.css +3 -0
- package/build-style/table/editor.css +3 -0
- package/build-style/table/style-rtl.css +3 -0
- package/build-style/table/style.css +3 -0
- package/build-style/table/theme-rtl.css +3 -0
- package/build-style/table/theme.css +3 -0
- package/build-style/table-of-contents/style-rtl.css +94 -0
- package/build-style/table-of-contents/style.css +94 -0
- package/build-style/tag-cloud/editor-rtl.css +95 -0
- package/build-style/tag-cloud/editor.css +95 -0
- package/build-style/tag-cloud/style-rtl.css +3 -0
- package/build-style/tag-cloud/style.css +3 -0
- package/build-style/template-part/editor-rtl.css +3 -0
- package/build-style/template-part/editor.css +3 -0
- package/build-style/template-part/theme-rtl.css +3 -0
- package/build-style/template-part/theme.css +3 -0
- package/build-style/term-description/style-rtl.css +4 -0
- package/build-style/term-description/style.css +4 -0
- package/build-style/text-columns/editor-rtl.css +3 -0
- package/build-style/text-columns/editor.css +3 -0
- package/build-style/text-columns/style-rtl.css +3 -0
- package/build-style/text-columns/style.css +3 -0
- package/build-style/theme-rtl.css +6 -3
- package/build-style/theme.css +6 -3
- package/build-style/verse/style-rtl.css +3 -0
- package/build-style/verse/style.css +3 -0
- package/build-style/video/editor-rtl.css +3 -3
- package/build-style/video/editor.css +3 -3
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/build-style/video/theme-rtl.css +3 -0
- package/build-style/video/theme.css +3 -0
- package/package.json +35 -35
- package/src/avatar/edit.js +1 -0
- package/src/block/edit.js +58 -27
- package/src/block/test/edit.native.js +6 -2
- package/src/button/edit.js +1 -1
- package/src/button/index.php +1 -14
- package/src/buttons/block.json +20 -0
- package/src/buttons/index.js +6 -0
- package/src/categories/block.json +20 -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/column/block.json +2 -0
- package/src/column/edit.js +2 -2
- package/src/columns/index.js +1 -1
- package/src/comment-template/block.json +12 -0
- package/src/comments-title/block.json +3 -0
- package/src/comments-title/edit.js +8 -1
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/details/edit.js +1 -0
- package/src/editor.scss +1 -0
- 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/footnotes/index.js +1 -2
- package/src/form/edit.js +3 -2
- package/src/form-input/edit.js +3 -0
- package/src/form-input/style.scss +1 -0
- package/src/gallery/block.json +10 -0
- package/src/gallery/edit.js +75 -13
- package/src/gallery/editor.scss +0 -1
- package/src/gallery/gap-styles.js +1 -8
- package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
- package/src/gallery/test/index.native.js +5 -5
- package/src/gallery/use-image-sizes.js +2 -2
- package/src/group/deprecated.js +3 -7
- package/src/group/editor.scss +1 -1
- package/src/group/index.js +26 -29
- package/src/group/variations.js +56 -0
- package/src/heading/block.json +15 -0
- package/src/heading/edit.js +3 -1
- package/src/heading/index.js +1 -0
- package/src/image/block.json +3 -0
- package/src/image/edit.js +1 -1
- package/src/image/editor.scss +18 -1
- package/src/image/image.js +55 -35
- package/src/image/index.php +32 -15
- package/src/image/style.scss +22 -0
- package/src/image/test/edit.native.js +1 -0
- package/src/image/view.js +69 -49
- package/src/latest-comments/block.json +9 -0
- package/src/latest-posts/edit.js +1 -0
- package/src/latest-posts/editor.scss +0 -4
- package/src/list/block.json +1 -1
- package/src/list/edit.js +3 -3
- package/src/list/ordered-list-settings.js +20 -18
- package/src/list/style.scss +1 -1
- package/src/list/test/edit.native.js +1 -3
- package/src/list-item/block.json +3 -2
- package/src/list-item/edit.js +2 -2
- package/src/list-item/hooks/index.js +0 -1
- package/src/loginout/block.json +14 -1
- package/src/loginout/style.scss +4 -0
- package/src/media-text/block.json +12 -0
- package/src/media-text/style.native.scss +2 -0
- package/src/navigation/edit/index.js +5 -5
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/src/navigation/editor.scss +0 -1
- 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 +1 -13
- package/src/page-list/edit.js +1 -0
- 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/block.json +12 -0
- package/src/post-comments-form/style.scss +1 -1
- package/src/post-content/block.json +1 -0
- package/src/post-content/style.scss +5 -0
- package/src/post-date/block.json +15 -0
- package/src/post-excerpt/block.json +12 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/style.scss +3 -0
- package/src/post-featured-image/block.json +3 -0
- package/src/post-navigation-link/edit.js +2 -0
- package/src/post-terms/block.json +15 -0
- package/src/post-time-to-read/block.json +6 -0
- package/src/post-title/block.json +15 -0
- package/src/post-title/edit.js +9 -8
- package/src/query/edit/inspector-controls/author-control.js +2 -0
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/src/query/edit/inspector-controls/index.js +123 -23
- package/src/query/edit/inspector-controls/offset-controls.js +31 -0
- package/src/query/edit/inspector-controls/order-control.js +1 -0
- package/src/query/edit/inspector-controls/pages-control.js +27 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/inspector-controls/per-page-control.js +33 -0
- package/src/query/edit/inspector-controls/sticky-control.js +2 -1
- 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 +1 -90
- package/src/query/editor.scss +0 -9
- package/src/query/utils.js +13 -5
- package/src/query/variations.js +4 -46
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/block.json +3 -0
- package/src/query-title/edit.js +19 -18
- package/src/query-title/use-archive-label.js +99 -0
- package/src/quote/block.json +15 -1
- package/src/quote/theme.scss +5 -3
- package/src/search/block.json +3 -0
- package/src/search/editor.scss +1 -1
- package/src/site-logo/edit.js +27 -10
- package/src/site-tagline/block.json +18 -2
- package/src/site-tagline/edit.js +7 -6
- package/src/site-tagline/style.scss +4 -0
- package/src/site-title/block.json +10 -0
- package/src/site-title/edit.js +6 -5
- package/src/site-title/index.js +6 -1
- package/src/site-title/style.scss +7 -2
- package/src/social-link/edit.js +0 -1
- 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/spacer/controls.js +10 -13
- package/src/style.scss +4 -0
- package/src/table-of-contents/block.json +14 -1
- package/src/table-of-contents/style.scss +4 -0
- package/src/tag-cloud/block.json +1 -1
- package/src/tag-cloud/edit.js +53 -35
- package/src/tag-cloud/editor.scss +9 -0
- package/src/template-part/edit/index.js +10 -5
- package/src/template-part/edit/inner-blocks.js +11 -6
- package/src/template-part/edit/placeholder.js +31 -6
- package/src/template-part/edit/title-modal.js +18 -4
- package/src/term-description/block.json +12 -0
- package/src/term-description/style.scss +2 -0
- package/src/utils/hooks.js +5 -1
- package/src/video/editor.scss +0 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/list-item/hooks/use-split.js +0 -39
- package/build/list-item/hooks/use-split.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/src/list-item/hooks/use-split.js +0 -33
|
@@ -9,6 +9,12 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
*/
|
|
10
10
|
import useNavigationMenu from '../use-navigation-menu';
|
|
11
11
|
|
|
12
|
+
const BASE_ENTITY = {
|
|
13
|
+
kind: 'postType',
|
|
14
|
+
name: 'wp_navigation',
|
|
15
|
+
id: undefined,
|
|
16
|
+
};
|
|
17
|
+
|
|
12
18
|
function createRegistryWithStores() {
|
|
13
19
|
// Create a registry and register used stores.
|
|
14
20
|
const registry = createRegistry();
|
|
@@ -63,37 +69,70 @@ function resolveRecords( registry, menus ) {
|
|
|
63
69
|
|
|
64
70
|
function resolveReadPermission( registry, allowed ) {
|
|
65
71
|
const dispatch = registry.dispatch( coreStore );
|
|
66
|
-
dispatch.receiveUserPermission( '
|
|
67
|
-
dispatch.startResolution( 'canUser', [ 'read',
|
|
68
|
-
dispatch.finishResolution( 'canUser', [ 'read',
|
|
72
|
+
dispatch.receiveUserPermission( 'read/postType/wp_navigation', allowed );
|
|
73
|
+
dispatch.startResolution( 'canUser', [ 'read', BASE_ENTITY ] );
|
|
74
|
+
dispatch.finishResolution( 'canUser', [ 'read', BASE_ENTITY ] );
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
function resolveReadRecordPermission( registry, ref, allowed ) {
|
|
72
78
|
const dispatch = registry.dispatch( coreStore );
|
|
73
|
-
dispatch.receiveUserPermission(
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
dispatch.receiveUserPermission(
|
|
80
|
+
`read/postType/wp_navigation/${ ref }`,
|
|
81
|
+
allowed
|
|
82
|
+
);
|
|
83
|
+
dispatch.startResolution( 'canUser', [
|
|
84
|
+
'read',
|
|
85
|
+
{ ...BASE_ENTITY, id: ref },
|
|
86
|
+
] );
|
|
87
|
+
dispatch.finishResolution( 'canUser', [
|
|
88
|
+
'read',
|
|
89
|
+
{ ...BASE_ENTITY, id: ref },
|
|
90
|
+
] );
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
function resolveCreatePermission( registry, allowed ) {
|
|
79
94
|
const dispatch = registry.dispatch( coreStore );
|
|
80
|
-
dispatch.receiveUserPermission( 'create/
|
|
81
|
-
dispatch.startResolution( 'canUser', [
|
|
82
|
-
|
|
95
|
+
dispatch.receiveUserPermission( 'create/postType/wp_navigation', allowed );
|
|
96
|
+
dispatch.startResolution( 'canUser', [
|
|
97
|
+
'create',
|
|
98
|
+
{ kind: 'postType', name: 'wp_navigation' },
|
|
99
|
+
] );
|
|
100
|
+
dispatch.finishResolution( 'canUser', [
|
|
101
|
+
'create',
|
|
102
|
+
{ kind: 'postType', name: 'wp_navigation' },
|
|
103
|
+
] );
|
|
83
104
|
}
|
|
84
105
|
|
|
85
106
|
function resolveUpdatePermission( registry, ref, allowed ) {
|
|
86
107
|
const dispatch = registry.dispatch( coreStore );
|
|
87
|
-
dispatch.receiveUserPermission(
|
|
88
|
-
|
|
89
|
-
|
|
108
|
+
dispatch.receiveUserPermission(
|
|
109
|
+
`update/postType/wp_navigation/${ ref }`,
|
|
110
|
+
allowed
|
|
111
|
+
);
|
|
112
|
+
dispatch.startResolution( 'canUser', [
|
|
113
|
+
'update',
|
|
114
|
+
{ ...BASE_ENTITY, id: ref },
|
|
115
|
+
] );
|
|
116
|
+
dispatch.finishResolution( 'canUser', [
|
|
117
|
+
'update',
|
|
118
|
+
{ ...BASE_ENTITY, id: ref },
|
|
119
|
+
] );
|
|
90
120
|
}
|
|
91
121
|
|
|
92
122
|
function resolveDeletePermission( registry, ref, allowed ) {
|
|
93
123
|
const dispatch = registry.dispatch( coreStore );
|
|
94
|
-
dispatch.receiveUserPermission(
|
|
95
|
-
|
|
96
|
-
|
|
124
|
+
dispatch.receiveUserPermission(
|
|
125
|
+
`delete/postType/wp_navigation/${ ref }`,
|
|
126
|
+
allowed
|
|
127
|
+
);
|
|
128
|
+
dispatch.startResolution( 'canUser', [
|
|
129
|
+
'delete',
|
|
130
|
+
{ ...BASE_ENTITY, id: ref },
|
|
131
|
+
] );
|
|
132
|
+
dispatch.finishResolution( 'canUser', [
|
|
133
|
+
'delete',
|
|
134
|
+
{ ...BASE_ENTITY, id: ref },
|
|
135
|
+
] );
|
|
97
136
|
}
|
|
98
137
|
|
|
99
138
|
describe( 'useNavigationMenus', () => {
|
|
@@ -14,7 +14,11 @@ import { useSelect } from '@wordpress/data';
|
|
|
14
14
|
import { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';
|
|
15
15
|
|
|
16
16
|
export default function useNavigationMenu( ref ) {
|
|
17
|
-
const permissions = useResourcePermissions(
|
|
17
|
+
const permissions = useResourcePermissions( {
|
|
18
|
+
kind: 'postType',
|
|
19
|
+
name: 'wp_navigation',
|
|
20
|
+
id: ref,
|
|
21
|
+
} );
|
|
18
22
|
|
|
19
23
|
const {
|
|
20
24
|
navigationMenu,
|
|
@@ -147,15 +147,18 @@ function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function UnforwardedLinkUI( props, ref ) {
|
|
150
|
+
const { label, url, opensInNewTab, type, kind } = props.link;
|
|
151
|
+
const postType = type || 'page';
|
|
152
|
+
|
|
150
153
|
const [ addingBlock, setAddingBlock ] = useState( false );
|
|
151
154
|
const [ focusAddBlockButton, setFocusAddBlockButton ] = useState( false );
|
|
152
155
|
const { saveEntityRecord } = useDispatch( coreStore );
|
|
153
|
-
const
|
|
154
|
-
|
|
156
|
+
const permissions = useResourcePermissions( {
|
|
157
|
+
kind: 'postType',
|
|
158
|
+
name: postType,
|
|
159
|
+
} );
|
|
155
160
|
|
|
156
161
|
async function handleCreate( pageTitle ) {
|
|
157
|
-
const postType = props.link.type || 'page';
|
|
158
|
-
|
|
159
162
|
const page = await saveEntityRecord( 'postType', postType, {
|
|
160
163
|
title: pageTitle,
|
|
161
164
|
status: 'draft',
|
|
@@ -180,15 +183,6 @@ function UnforwardedLinkUI( props, ref ) {
|
|
|
180
183
|
};
|
|
181
184
|
}
|
|
182
185
|
|
|
183
|
-
const { label, url, opensInNewTab, type, kind } = props.link;
|
|
184
|
-
|
|
185
|
-
let userCanCreate = false;
|
|
186
|
-
if ( ! type || type === 'page' ) {
|
|
187
|
-
userCanCreate = pagesPermissions.canCreate;
|
|
188
|
-
} else if ( type === 'post' ) {
|
|
189
|
-
userCanCreate = postsPermissions.canCreate;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
186
|
// Memoize link value to avoid overriding the LinkControl's internal state.
|
|
193
187
|
// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/50976#issuecomment-1568226407.
|
|
194
188
|
const link = useMemo(
|
|
@@ -241,7 +235,7 @@ function UnforwardedLinkUI( props, ref ) {
|
|
|
241
235
|
hasRichPreviews
|
|
242
236
|
value={ link }
|
|
243
237
|
showInitialSuggestions
|
|
244
|
-
withCreateSuggestion={
|
|
238
|
+
withCreateSuggestion={ permissions.canCreate }
|
|
245
239
|
createSuggestion={ handleCreate }
|
|
246
240
|
createSuggestionButtonText={ ( searchTerm ) => {
|
|
247
241
|
let format;
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
import { isURL, prependHTTP } from '@wordpress/url';
|
|
30
30
|
import { useState, useEffect, useRef } from '@wordpress/element';
|
|
31
31
|
import { link as linkIcon, removeSubmenu } from '@wordpress/icons';
|
|
32
|
-
import { useResourcePermissions } from '@wordpress/core-data';
|
|
33
32
|
import { speak } from '@wordpress/a11y';
|
|
34
33
|
import { createBlock } from '@wordpress/blocks';
|
|
35
34
|
import { useMergeRefs, usePrevious } from '@wordpress/compose';
|
|
@@ -134,7 +133,7 @@ export default function NavigationSubmenuEdit( {
|
|
|
134
133
|
context,
|
|
135
134
|
clientId,
|
|
136
135
|
} ) {
|
|
137
|
-
const { label,
|
|
136
|
+
const { label, url, description, rel, title } = attributes;
|
|
138
137
|
|
|
139
138
|
const { showSubmenuIcon, maxNestingLevel, openSubmenusOnClick } = context;
|
|
140
139
|
|
|
@@ -154,9 +153,6 @@ export default function NavigationSubmenuEdit( {
|
|
|
154
153
|
const itemLabelPlaceholder = __( 'Add text…' );
|
|
155
154
|
const ref = useRef();
|
|
156
155
|
|
|
157
|
-
const pagesPermissions = useResourcePermissions( 'pages' );
|
|
158
|
-
const postsPermissions = useResourcePermissions( 'posts' );
|
|
159
|
-
|
|
160
156
|
const {
|
|
161
157
|
parentCount,
|
|
162
158
|
isParentOfSelectedBlock,
|
|
@@ -264,13 +260,6 @@ export default function NavigationSubmenuEdit( {
|
|
|
264
260
|
selection.addRange( range );
|
|
265
261
|
}
|
|
266
262
|
|
|
267
|
-
let userCanCreate = false;
|
|
268
|
-
if ( ! type || type === 'page' ) {
|
|
269
|
-
userCanCreate = pagesPermissions.canCreate;
|
|
270
|
-
} else if ( type === 'post' ) {
|
|
271
|
-
userCanCreate = postsPermissions.canCreate;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
263
|
const {
|
|
275
264
|
textColor,
|
|
276
265
|
customTextColor,
|
|
@@ -499,7 +488,6 @@ export default function NavigationSubmenuEdit( {
|
|
|
499
488
|
}
|
|
500
489
|
} }
|
|
501
490
|
anchor={ popoverAnchor }
|
|
502
|
-
hasCreateSuggestion={ userCanCreate }
|
|
503
491
|
onRemove={ () => {
|
|
504
492
|
setAttributes( { url: '' } );
|
|
505
493
|
speak( __( 'Link removed.' ), 'assertive' );
|
package/src/page-list/edit.js
CHANGED
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
|
|
22
22
|
function useFrontPageId() {
|
|
23
23
|
return useSelect( ( select ) => {
|
|
24
|
-
const canReadSettings = select( coreStore ).canUser(
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
);
|
|
24
|
+
const canReadSettings = select( coreStore ).canUser( 'read', {
|
|
25
|
+
kind: 'root',
|
|
26
|
+
name: 'site',
|
|
27
|
+
} );
|
|
28
28
|
if ( ! canReadSettings ) {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
package/src/paragraph/block.json
CHANGED
package/src/post-author/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
4
5
|
import { postAuthor as icon } from '@wordpress/icons';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -15,6 +16,13 @@ export { metadata, name };
|
|
|
15
16
|
|
|
16
17
|
export const settings = {
|
|
17
18
|
icon,
|
|
19
|
+
example: {
|
|
20
|
+
viewportWidth: 350,
|
|
21
|
+
attributes: {
|
|
22
|
+
showBio: true,
|
|
23
|
+
byline: __( 'Posted by' ),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
18
26
|
edit,
|
|
19
27
|
};
|
|
20
28
|
|
|
@@ -37,6 +37,18 @@
|
|
|
37
37
|
"__experimentalDefaultControls": {
|
|
38
38
|
"fontSize": true
|
|
39
39
|
}
|
|
40
|
+
},
|
|
41
|
+
"__experimentalBorder": {
|
|
42
|
+
"radius": true,
|
|
43
|
+
"color": true,
|
|
44
|
+
"width": true,
|
|
45
|
+
"style": true,
|
|
46
|
+
"__experimentalDefaultControls": {
|
|
47
|
+
"radius": true,
|
|
48
|
+
"color": true,
|
|
49
|
+
"width": true,
|
|
50
|
+
"style": true
|
|
51
|
+
}
|
|
40
52
|
}
|
|
41
53
|
},
|
|
42
54
|
"editorStyle": "wp-block-post-comments-form-editor",
|
package/src/post-date/block.json
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"usesContext": [ "postId", "postType", "queryId" ],
|
|
26
|
+
"example": {
|
|
27
|
+
"viewportWidth": 350
|
|
28
|
+
},
|
|
26
29
|
"supports": {
|
|
27
30
|
"html": false,
|
|
28
31
|
"color": {
|
|
@@ -53,6 +56,18 @@
|
|
|
53
56
|
},
|
|
54
57
|
"interactivity": {
|
|
55
58
|
"clientNavigation": true
|
|
59
|
+
},
|
|
60
|
+
"__experimentalBorder": {
|
|
61
|
+
"radius": true,
|
|
62
|
+
"color": true,
|
|
63
|
+
"width": true,
|
|
64
|
+
"style": true,
|
|
65
|
+
"__experimentalDefaultControls": {
|
|
66
|
+
"radius": true,
|
|
67
|
+
"color": true,
|
|
68
|
+
"width": true,
|
|
69
|
+
"style": true
|
|
70
|
+
}
|
|
56
71
|
}
|
|
57
72
|
}
|
|
58
73
|
}
|
|
@@ -56,6 +56,18 @@
|
|
|
56
56
|
},
|
|
57
57
|
"interactivity": {
|
|
58
58
|
"clientNavigation": true
|
|
59
|
+
},
|
|
60
|
+
"__experimentalBorder": {
|
|
61
|
+
"radius": true,
|
|
62
|
+
"color": true,
|
|
63
|
+
"width": true,
|
|
64
|
+
"style": true,
|
|
65
|
+
"__experimentalDefaultControls": {
|
|
66
|
+
"radius": true,
|
|
67
|
+
"color": true,
|
|
68
|
+
"width": true,
|
|
69
|
+
"style": true
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
},
|
|
61
73
|
"editorStyle": "wp-block-post-excerpt-editor",
|
package/src/post-excerpt/edit.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Lowest specificity on wrapper margins to avoid overriding layout styles.
|
|
2
2
|
:where(.wp-block-post-excerpt) {
|
|
3
|
+
// This block has customizable padding, border-box makes that more predictable.
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
|
|
3
6
|
margin-top: var(--wp--style--block-gap);
|
|
4
7
|
margin-bottom: var(--wp--style--block-gap);
|
|
5
8
|
}
|
|
@@ -157,6 +157,8 @@ export default function PostNavigationLinkEdit( {
|
|
|
157
157
|
</InspectorControls>
|
|
158
158
|
<InspectorControls group="advanced">
|
|
159
159
|
<SelectControl
|
|
160
|
+
__next40pxDefaultSize
|
|
161
|
+
__nextHasNoMarginBottom
|
|
160
162
|
label={ __( 'Filter by taxonomy' ) }
|
|
161
163
|
value={ taxonomy }
|
|
162
164
|
options={ getTaxonomyOptions() }
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"usesContext": [ "postId", "postType" ],
|
|
30
|
+
"example": {
|
|
31
|
+
"viewportWidth": 350
|
|
32
|
+
},
|
|
30
33
|
"supports": {
|
|
31
34
|
"html": false,
|
|
32
35
|
"color": {
|
|
@@ -57,6 +60,18 @@
|
|
|
57
60
|
},
|
|
58
61
|
"interactivity": {
|
|
59
62
|
"clientNavigation": true
|
|
63
|
+
},
|
|
64
|
+
"__experimentalBorder": {
|
|
65
|
+
"radius": true,
|
|
66
|
+
"color": true,
|
|
67
|
+
"width": true,
|
|
68
|
+
"style": true,
|
|
69
|
+
"__experimentalDefaultControls": {
|
|
70
|
+
"radius": true,
|
|
71
|
+
"color": true,
|
|
72
|
+
"width": true,
|
|
73
|
+
"style": true
|
|
74
|
+
}
|
|
60
75
|
}
|
|
61
76
|
},
|
|
62
77
|
"style": "wp-block-post-terms"
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"type": "number",
|
|
16
16
|
"default": 2
|
|
17
17
|
},
|
|
18
|
+
"levelOptions": {
|
|
19
|
+
"type": "array"
|
|
20
|
+
},
|
|
18
21
|
"isLink": {
|
|
19
22
|
"type": "boolean",
|
|
20
23
|
"default": false
|
|
@@ -63,6 +66,18 @@
|
|
|
63
66
|
},
|
|
64
67
|
"interactivity": {
|
|
65
68
|
"clientNavigation": true
|
|
69
|
+
},
|
|
70
|
+
"__experimentalBorder": {
|
|
71
|
+
"radius": true,
|
|
72
|
+
"color": true,
|
|
73
|
+
"width": true,
|
|
74
|
+
"style": true,
|
|
75
|
+
"__experimentalDefaultControls": {
|
|
76
|
+
"radius": true,
|
|
77
|
+
"color": true,
|
|
78
|
+
"width": true,
|
|
79
|
+
"style": true
|
|
80
|
+
}
|
|
66
81
|
}
|
|
67
82
|
},
|
|
68
83
|
"style": "wp-block-post-title"
|
package/src/post-title/edit.js
CHANGED
|
@@ -22,7 +22,7 @@ import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
|
22
22
|
import { useSelect } from '@wordpress/data';
|
|
23
23
|
|
|
24
24
|
export default function PostTitleEdit( {
|
|
25
|
-
attributes: { level, textAlign, isLink, rel, linkTarget },
|
|
25
|
+
attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
|
|
26
26
|
setAttributes,
|
|
27
27
|
context: { postType, postId, queryId },
|
|
28
28
|
insertBlocksAfter,
|
|
@@ -42,11 +42,11 @@ export default function PostTitleEdit( {
|
|
|
42
42
|
if ( isDescendentOfQueryLoop ) {
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
45
|
-
return select( coreStore ).
|
|
46
|
-
'postType',
|
|
47
|
-
postType,
|
|
48
|
-
postId
|
|
49
|
-
);
|
|
45
|
+
return select( coreStore ).canUser( 'update', {
|
|
46
|
+
kind: 'postType',
|
|
47
|
+
name: postType,
|
|
48
|
+
id: postId,
|
|
49
|
+
} );
|
|
50
50
|
},
|
|
51
51
|
[ isDescendentOfQueryLoop, postType, postId ]
|
|
52
52
|
);
|
|
@@ -73,7 +73,7 @@ export default function PostTitleEdit( {
|
|
|
73
73
|
titleElement = userCanEdit ? (
|
|
74
74
|
<PlainText
|
|
75
75
|
tagName={ TagName }
|
|
76
|
-
placeholder={ __( 'No
|
|
76
|
+
placeholder={ __( 'No title' ) }
|
|
77
77
|
value={ rawTitle }
|
|
78
78
|
onChange={ setTitle }
|
|
79
79
|
__experimentalVersion={ 2 }
|
|
@@ -96,7 +96,7 @@ export default function PostTitleEdit( {
|
|
|
96
96
|
href={ link }
|
|
97
97
|
target={ linkTarget }
|
|
98
98
|
rel={ rel }
|
|
99
|
-
placeholder={ ! rawTitle.length ? __( 'No
|
|
99
|
+
placeholder={ ! rawTitle.length ? __( 'No title' ) : null }
|
|
100
100
|
value={ rawTitle }
|
|
101
101
|
onChange={ setTitle }
|
|
102
102
|
__experimentalVersion={ 2 }
|
|
@@ -125,6 +125,7 @@ export default function PostTitleEdit( {
|
|
|
125
125
|
<BlockControls group="block">
|
|
126
126
|
<HeadingLevelDropdown
|
|
127
127
|
value={ level }
|
|
128
|
+
options={ levelOptions }
|
|
128
129
|
onChange={ ( newLevel ) =>
|
|
129
130
|
setAttributes( { level: newLevel } )
|
|
130
131
|
}
|