@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
|
@@ -29,6 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"supports": {
|
|
31
31
|
"align": true,
|
|
32
|
+
"color": {
|
|
33
|
+
"gradients": true,
|
|
34
|
+
"link": true,
|
|
35
|
+
"__experimentalDefaultControls": {
|
|
36
|
+
"background": true,
|
|
37
|
+
"text": true,
|
|
38
|
+
"link": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
32
41
|
"html": false,
|
|
33
42
|
"spacing": {
|
|
34
43
|
"margin": true,
|
package/src/list/edit.js
CHANGED
|
@@ -110,7 +110,7 @@ function IndentUI( { clientId } ) {
|
|
|
110
110
|
<ToolbarButton
|
|
111
111
|
icon={ isRTL() ? formatOutdentRTL : formatOutdent }
|
|
112
112
|
title={ __( 'Outdent' ) }
|
|
113
|
-
|
|
113
|
+
description={ __( 'Outdent list item' ) }
|
|
114
114
|
disabled={ ! canOutdent }
|
|
115
115
|
onClick={ outdentList }
|
|
116
116
|
/>
|
|
@@ -147,7 +147,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
|
|
|
147
147
|
<ToolbarButton
|
|
148
148
|
icon={ isRTL() ? formatListBulletsRTL : formatListBullets }
|
|
149
149
|
title={ __( 'Unordered' ) }
|
|
150
|
-
|
|
150
|
+
description={ __( 'Convert to unordered list' ) }
|
|
151
151
|
isActive={ ordered === false }
|
|
152
152
|
onClick={ () => {
|
|
153
153
|
setAttributes( { ordered: false } );
|
|
@@ -156,7 +156,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
|
|
|
156
156
|
<ToolbarButton
|
|
157
157
|
icon={ isRTL() ? formatListNumberedRTL : formatListNumbered }
|
|
158
158
|
title={ __( 'Ordered' ) }
|
|
159
|
-
|
|
159
|
+
description={ __( 'Convert to ordered list' ) }
|
|
160
160
|
isActive={ ordered === true }
|
|
161
161
|
onClick={ () => {
|
|
162
162
|
setAttributes( { ordered: true } );
|
package/src/list/style.scss
CHANGED
package/src/list-item/block.json
CHANGED
|
@@ -21,8 +21,15 @@
|
|
|
21
21
|
},
|
|
22
22
|
"supports": {
|
|
23
23
|
"className": false,
|
|
24
|
-
"__experimentalSelector": ".wp-block-list > li",
|
|
25
24
|
"splitting": true,
|
|
25
|
+
"color": {
|
|
26
|
+
"gradients": true,
|
|
27
|
+
"link": true,
|
|
28
|
+
"__experimentalDefaultControls": {
|
|
29
|
+
"background": true,
|
|
30
|
+
"text": true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
26
33
|
"spacing": {
|
|
27
34
|
"margin": true,
|
|
28
35
|
"padding": true,
|
|
@@ -47,5 +54,8 @@
|
|
|
47
54
|
"interactivity": {
|
|
48
55
|
"clientNavigation": true
|
|
49
56
|
}
|
|
57
|
+
},
|
|
58
|
+
"selectors": {
|
|
59
|
+
"root": ".wp-block-list > li"
|
|
50
60
|
}
|
|
51
61
|
}
|
package/src/list-item/edit.js
CHANGED
|
@@ -53,15 +53,15 @@ export function IndentUI( { clientId } ) {
|
|
|
53
53
|
<ToolbarButton
|
|
54
54
|
icon={ isRTL() ? formatOutdentRTL : formatOutdent }
|
|
55
55
|
title={ __( 'Outdent' ) }
|
|
56
|
-
|
|
56
|
+
description={ __( 'Outdent list item' ) }
|
|
57
57
|
disabled={ ! canOutdent }
|
|
58
58
|
onClick={ () => outdentListItem() }
|
|
59
59
|
/>
|
|
60
60
|
<ToolbarButton
|
|
61
61
|
icon={ isRTL() ? formatIndentRTL : formatIndent }
|
|
62
62
|
title={ __( 'Indent' ) }
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
description={ __( 'Indent list item' ) }
|
|
64
|
+
disabled={ ! canIndent }
|
|
65
65
|
onClick={ () => indentListItem() }
|
|
66
66
|
/>
|
|
67
67
|
</>
|
|
@@ -2,5 +2,4 @@ export { default as useOutdentListItem } from './use-outdent-list-item';
|
|
|
2
2
|
export { default as useIndentListItem } from './use-indent-list-item';
|
|
3
3
|
export { default as useEnter } from './use-enter';
|
|
4
4
|
export { default as useSpace } from './use-space';
|
|
5
|
-
export { default as useSplit } from './use-split';
|
|
6
5
|
export { default as useMerge } from './use-merge';
|
|
@@ -92,11 +92,25 @@ export default function useMerge( clientId, onMerge ) {
|
|
|
92
92
|
// list.
|
|
93
93
|
const [ nestedListClientId ] = getBlockOrder( clientIdB );
|
|
94
94
|
if ( nestedListClientId ) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
// If we are merging with the previous list item, and the
|
|
96
|
+
// previous list item does not have nested list, move the
|
|
97
|
+
// nested list to the previous list item.
|
|
98
|
+
if (
|
|
99
|
+
getPreviousBlockClientId( clientIdB ) === clientIdA &&
|
|
100
|
+
! getBlockOrder( clientIdA ).length
|
|
101
|
+
) {
|
|
102
|
+
moveBlocksToPosition(
|
|
103
|
+
[ nestedListClientId ],
|
|
104
|
+
clientIdB,
|
|
105
|
+
clientIdA
|
|
106
|
+
);
|
|
107
|
+
} else {
|
|
108
|
+
moveBlocksToPosition(
|
|
109
|
+
getBlockOrder( nestedListClientId ),
|
|
110
|
+
nestedListClientId,
|
|
111
|
+
getBlockRootClientId( clientIdA )
|
|
112
|
+
);
|
|
113
|
+
}
|
|
100
114
|
}
|
|
101
115
|
mergeBlocks( clientIdA, clientIdB );
|
|
102
116
|
} );
|
package/src/loginout/block.json
CHANGED
|
@@ -103,6 +103,18 @@
|
|
|
103
103
|
"anchor": true,
|
|
104
104
|
"align": [ "wide", "full" ],
|
|
105
105
|
"html": false,
|
|
106
|
+
"__experimentalBorder": {
|
|
107
|
+
"color": true,
|
|
108
|
+
"radius": true,
|
|
109
|
+
"style": true,
|
|
110
|
+
"width": true,
|
|
111
|
+
"__experimentalDefaultControls": {
|
|
112
|
+
"color": true,
|
|
113
|
+
"radius": true,
|
|
114
|
+
"style": true,
|
|
115
|
+
"width": true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
106
118
|
"color": {
|
|
107
119
|
"gradients": true,
|
|
108
120
|
"heading": true,
|
package/src/media-text/edit.js
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
TEMPLATE,
|
|
47
47
|
} from './constants';
|
|
48
48
|
import { unlock } from '../lock-unlock';
|
|
49
|
-
import {
|
|
49
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
50
50
|
|
|
51
51
|
const { ResolutionTool } = unlock( blockEditorPrivateApis );
|
|
52
52
|
|
|
@@ -276,6 +276,7 @@ function MediaTextEdit( {
|
|
|
276
276
|
mediaSizeSlug: newMediaSizeSlug,
|
|
277
277
|
} );
|
|
278
278
|
};
|
|
279
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
279
280
|
|
|
280
281
|
const mediaTextGeneralSettings = (
|
|
281
282
|
<ToolsPanel
|
|
@@ -290,7 +291,7 @@ function MediaTextEdit( {
|
|
|
290
291
|
mediaSizeSlug: undefined,
|
|
291
292
|
} );
|
|
292
293
|
} }
|
|
293
|
-
dropdownMenuProps={
|
|
294
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
294
295
|
>
|
|
295
296
|
<ToolsPanelItem
|
|
296
297
|
label={ __( 'Media width' ) }
|
package/src/navigation/index.php
CHANGED
|
@@ -483,7 +483,7 @@ class WP_Navigation_Block_Renderer {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
$toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' );
|
|
486
|
-
$toggle_close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="
|
|
486
|
+
$toggle_close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"></path></svg>';
|
|
487
487
|
$toggle_close_button_content = $should_display_icon_label ? $toggle_close_button_icon : __( 'Close' );
|
|
488
488
|
$toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label.
|
|
489
489
|
$toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label.
|
|
@@ -76,15 +76,10 @@ $navigation-icon-size: 24px;
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
&:focus,
|
|
84
|
-
&:active {
|
|
85
|
-
text-decoration: none;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
79
|
+
& :where(a),
|
|
80
|
+
& :where(a:focus),
|
|
81
|
+
& :where(a:active) {
|
|
82
|
+
text-decoration: none;
|
|
88
83
|
}
|
|
89
84
|
|
|
90
85
|
// Submenu indicator.
|
|
@@ -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,
|
|
@@ -387,7 +376,7 @@ export default function NavigationSubmenuEdit( {
|
|
|
387
376
|
title={ __( 'Convert to Link' ) }
|
|
388
377
|
onClick={ transformToLink }
|
|
389
378
|
className="wp-block-navigation__submenu__revert"
|
|
390
|
-
|
|
379
|
+
disabled={ ! canConvertToLink }
|
|
391
380
|
/>
|
|
392
381
|
</ToolbarGroup>
|
|
393
382
|
</BlockControls>
|
|
@@ -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
|
@@ -319,6 +319,7 @@ export default function PageListEdit( {
|
|
|
319
319
|
{ pagesTree.length > 0 && (
|
|
320
320
|
<PanelBody>
|
|
321
321
|
<ComboboxControl
|
|
322
|
+
__nextHasNoMarginBottom
|
|
322
323
|
__next40pxDefaultSize
|
|
323
324
|
className="editor-page-attributes__parent"
|
|
324
325
|
label={ __( 'Parent' ) }
|
|
@@ -338,7 +339,7 @@ export default function PageListEdit( {
|
|
|
338
339
|
<p>{ convertDescription }</p>
|
|
339
340
|
<Button
|
|
340
341
|
variant="primary"
|
|
341
|
-
|
|
342
|
+
accessibleWhenDisabled
|
|
342
343
|
disabled={ ! hasResolvedPages }
|
|
343
344
|
onClick={ convertToNavigationLinks }
|
|
344
345
|
>
|
|
@@ -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
|
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// Allow these default styles to be overridden by global styles.
|
|
2
|
+
:where(.wp-block-post-comments-form) {
|
|
3
|
+
textarea,
|
|
4
|
+
input:not([type="submit"]) {
|
|
5
|
+
border: 1px solid $gray-600;
|
|
6
|
+
font-size: 1em;
|
|
7
|
+
font-family: inherit;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
textarea,
|
|
11
|
+
input:where(:not([type="submit"]):not([type="checkbox"])) {
|
|
12
|
+
padding: calc(0.667em + 2px); // The extra 2px is added to match outline buttons.
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
1
16
|
.wp-block-post-comments-form {
|
|
2
17
|
// This block has customizable padding, border-box makes that more predictable.
|
|
3
18
|
box-sizing: border-box;
|
|
@@ -23,7 +38,7 @@
|
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
// Styles copied from button block styles.
|
|
26
|
-
input[type="submit"] {
|
|
41
|
+
:where(input[type="submit"]) {
|
|
27
42
|
box-shadow: none;
|
|
28
43
|
cursor: pointer;
|
|
29
44
|
display: inline-block;
|
|
@@ -31,18 +46,6 @@
|
|
|
31
46
|
overflow-wrap: break-word;
|
|
32
47
|
}
|
|
33
48
|
|
|
34
|
-
textarea,
|
|
35
|
-
input:not([type="submit"]) {
|
|
36
|
-
border: 1px solid $gray-600;
|
|
37
|
-
font-size: 1em;
|
|
38
|
-
font-family: inherit;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
textarea,
|
|
42
|
-
input:not([type="submit"]):not([type="checkbox"]) {
|
|
43
|
-
padding: calc(0.667em + 2px); // The extra 2px is added to match outline buttons.
|
|
44
|
-
}
|
|
45
|
-
|
|
46
49
|
.comment-form {
|
|
47
50
|
textarea,
|
|
48
51
|
// Make sure to not set display block on hidden input fields, to prevent
|
package/src/post-date/block.json
CHANGED
package/src/post-date/edit.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
ToggleControl,
|
|
29
29
|
PanelBody,
|
|
30
30
|
} from '@wordpress/components';
|
|
31
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
31
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
32
32
|
import { edit } from '@wordpress/icons';
|
|
33
33
|
import { DOWN } from '@wordpress/keycodes';
|
|
34
34
|
import { useSelect } from '@wordpress/data';
|
|
@@ -128,6 +128,10 @@ export default function PostDateEdit( {
|
|
|
128
128
|
siteTimeFormat
|
|
129
129
|
) }
|
|
130
130
|
onClose={ onClose }
|
|
131
|
+
dateOrder={
|
|
132
|
+
/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
|
|
133
|
+
_x( 'dmy', 'date order' )
|
|
134
|
+
}
|
|
131
135
|
/>
|
|
132
136
|
) }
|
|
133
137
|
renderToggle={ ( { isOpen, onToggle } ) => {
|
package/src/post-date/index.php
CHANGED
|
@@ -23,8 +23,14 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
23
23
|
$post_ID = $block->context['postId'];
|
|
24
24
|
|
|
25
25
|
if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
$post_timestamp = get_post_timestamp( $post_ID );
|
|
27
|
+
if ( $post_timestamp > time() ) {
|
|
28
|
+
// translators: %s: human-readable time difference.
|
|
29
|
+
$formatted_date = sprintf( __( '%s from now', 'gutenberg' ), human_time_diff( $post_timestamp ) );
|
|
30
|
+
} else {
|
|
31
|
+
// translators: %s: human-readable time difference.
|
|
32
|
+
$formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( $post_timestamp ) );
|
|
33
|
+
}
|
|
28
34
|
} else {
|
|
29
35
|
$formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
30
36
|
}
|