@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
|
@@ -54,7 +54,6 @@ const SocialLinkURLPopover = ({
|
|
|
54
54
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
55
|
className: "block-editor-url-input",
|
|
56
56
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.URLInput, {
|
|
57
|
-
__nextHasNoMarginBottom: true,
|
|
58
57
|
value: url,
|
|
59
58
|
onChange: nextURL => setAttributes({
|
|
60
59
|
url: nextURL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","_jsxRuntime","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","jsx","URLPopover","anchor","__","onClose","focus","children","jsxs","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","label","hideLabelFromVision","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","clsx","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkText","trim","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","PanelRow","TextControl","help","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\taria-label={ __( 'Edit social link' ) }\n\t\t\tonClose={ () => {\n\t\t\t\tsetPopover( false );\n\t\t\t\tpopoverAnchor?.focus();\n\t\t\t} }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t\tpopoverAnchor?.focus();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter social link' ) }\n\t\t\t\t\t\tlabel={ __( 'Enter social link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label = '', rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = clsx( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\t// The initial label (ie. the link text) is an empty string.\n\t// We want to prevent empty links so that the link text always fallbacks to\n\t// the social name, even when users enter and save an empty string or only\n\t// spaces. The PHP render callback fallbacks to the social name as well.\n\tconst socialLinkText = label.trim() === '' ? socialLinkName : label;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The text is visible when enabled from the parent Social Icons block.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={ socialLinkName }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ clsx( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkText }\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AAA6D,IAAAS,WAAA,GAAAT,OAAA;AA/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K,EAAGsB,GAAG,IAAI,EAAI;QACnBrB,QAAQ,EAAKD,KAAK,IAAMrB,aAAa,CAAE;UAAE2C,GAAG,EAAEtB;QAAM,CAAE;MAAG,CACzD;IAAC,CACgB,CAAC,eACpB,IAAAxB,WAAA,CAAAiB,IAAA;MAAA,GAAS8C,UAAU;MAAA/C,QAAA,gBAClB,IAAAhB,WAAA,CAAAiB,IAAA;QACCC,SAAS,EAAC,6BAA6B;QACvC0D,GAAG,EAAGpB,gBAAkB;QACxBqB,OAAO,EAAGA,CAAA,KAAMzE,UAAU,CAAE,IAAK,CAAG;QACpC,iBAAc,QAAQ;QAAAY,QAAA,gBAEtB,IAAAhB,WAAA,CAAAU,GAAA,EAAC+C,aAAa,IAAE,CAAC,eACjB,IAAAzD,WAAA,CAAAU,GAAA;UACCQ,SAAS,EAAG,IAAAqC,aAAI,EAAE,4BAA4B,EAAE;YAC/C,oBAAoB,EAAE,CAAER;UACzB,CAAE,CAAG;UAAA/B,QAAA,EAEH6C;QAAc,CACX,CAAC;MAAA,CACA,CAAC,EACPjB,UAAU,IAAIQ,cAAc,iBAC7B,IAAApD,WAAA,CAAAU,GAAA,EAACT,oBAAoB;QACpBC,GAAG,EAAGA,GAAK;QACXC,aAAa,EAAGA,aAAe;QAC/BC,UAAU,EAAGA,UAAY;QACzBC,aAAa,EAAGA,aAAe;QAC/BC,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACE,CAAC;EAAA,CACJ,CAAC;AAEL,CAAC;AAAC,IAAAwE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavC,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","_jsxRuntime","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","jsx","URLPopover","anchor","__","onClose","focus","children","jsxs","className","onSubmit","event","preventDefault","URLInput","value","onChange","nextURL","placeholder","label","hideLabelFromVision","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","clsx","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkText","trim","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","PanelRow","TextControl","__nextHasNoMarginBottom","help","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\taria-label={ __( 'Edit social link' ) }\n\t\t\tonClose={ () => {\n\t\t\t\tsetPopover( false );\n\t\t\t\tpopoverAnchor?.focus();\n\t\t\t} }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t\tpopoverAnchor?.focus();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter social link' ) }\n\t\t\t\t\t\tlabel={ __( 'Enter social link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label = '', rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = clsx( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\t// The initial label (ie. the link text) is an empty string.\n\t// We want to prevent empty links so that the link text always fallbacks to\n\t// the social name, even when users enter and save an empty string or only\n\t// spaces. The PHP render callback fallbacks to the social name as well.\n\tconst socialLinkText = label.trim() === '' ? socialLinkName : label;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The text is visible when enabled from the parent Social Icons block.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={ socialLinkName }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ clsx( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkText }\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AAA6D,IAAAS,WAAA,GAAAT,OAAA;AA/B7D;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAGA,MAAMU,oBAAoB,GAAGA,CAAE;EAC9BC,GAAG;EACHC,aAAa;EACbC,UAAU;EACVC,aAAa;EACbC;AACD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,CAAAiB,IAAA;MAAA,GAAS6C,UAAU;MAAA9C,QAAA,gBAClB,IAAAhB,WAAA,CAAAiB,IAAA;QACCC,SAAS,EAAC,6BAA6B;QACvC0D,GAAG,EAAGrB,gBAAkB;QACxBsB,OAAO,EAAGA,CAAA,KAAMzE,UAAU,CAAE,IAAK,CAAG;QACpC,iBAAc,QAAQ;QAAAY,QAAA,gBAEtB,IAAAhB,WAAA,CAAAU,GAAA,EAAC8C,aAAa,IAAE,CAAC,eACjB,IAAAxD,WAAA,CAAAU,GAAA;UACCQ,SAAS,EAAG,IAAAoC,aAAI,EAAE,4BAA4B,EAAE;YAC/C,oBAAoB,EAAE,CAAER;UACzB,CAAE,CAAG;UAAA9B,QAAA,EAEH4C;QAAc,CACX,CAAC;MAAA,CACA,CAAC,EACPjB,UAAU,IAAIQ,cAAc,iBAC7B,IAAAnD,WAAA,CAAAU,GAAA,EAACT,oBAAoB;QACpBC,GAAG,EAAGA,GAAK;QACXC,aAAa,EAAGA,aAAe;QAC/BC,UAAU,EAAGA,UAAY;QACzBC,aAAa,EAAGA,aAAe;QAC/BC,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACE,CAAC;EAAA,CACJ,CAAC;AAEL,CAAC;AAAC,IAAAwE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaxC,cAAc","ignoreList":[]}
|
|
@@ -16,7 +16,7 @@ const SoundCloudIcon = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SVG,
|
|
|
16
16
|
viewBox: "0 0 24 24",
|
|
17
17
|
version: "1.1",
|
|
18
18
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
19
|
-
d: "
|
|
19
|
+
d: "M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z"
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
22
|
exports.SoundCloudIcon = SoundCloudIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_primitives","require","_jsxRuntime","SoundCloudIcon","jsx","SVG","width","height","viewBox","version","children","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/soundcloud.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const SoundCloudIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"
|
|
1
|
+
{"version":3,"names":["_primitives","require","_jsxRuntime","SoundCloudIcon","jsx","SVG","width","height","viewBox","version","children","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/soundcloud.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const SoundCloudIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;;AAGO,MAAME,cAAc,GAAGA,CAAA,kBAC7B,IAAAD,WAAA,CAAAE,GAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC,KAAK;EAAAC,QAAA,eAC5D,IAAAR,WAAA,CAAAE,GAAA,EAACJ,WAAA,CAAAW,IAAI;IAACC,CAAC,EAAC;EAA4+B,CAAE;AAAC,CACn/B,CACL;AAACC,OAAA,CAAAV,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -99,6 +99,18 @@ const metadata = exports.metadata = {
|
|
|
99
99
|
},
|
|
100
100
|
interactivity: {
|
|
101
101
|
clientNavigation: true
|
|
102
|
+
},
|
|
103
|
+
__experimentalBorder: {
|
|
104
|
+
radius: true,
|
|
105
|
+
color: true,
|
|
106
|
+
width: true,
|
|
107
|
+
style: true,
|
|
108
|
+
__experimentalDefaultControls: {
|
|
109
|
+
radius: true,
|
|
110
|
+
color: true,
|
|
111
|
+
width: true,
|
|
112
|
+
style: true
|
|
113
|
+
}
|
|
102
114
|
}
|
|
103
115
|
},
|
|
104
116
|
styles: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","allowedBlocks","description","keywords","textdomain","attributes","iconColor","type","customIconColor","iconColorValue","iconBackgroundColor","customIconBackgroundColor","iconBackgroundColorValue","openInNewTab","showLabels","size","providesContext","supports","align","anchor","__experimentalExposeControlsToChildren","layout","allowSwitching","allowInheriting","allowVerticalAlignment","color","enableContrastChecker","background","gradients","text","__experimentalDefaultControls","spacing","blockGap","margin","padding","units","interactivity","clientNavigation","styles","label","isDefault","editorStyle","
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","allowedBlocks","description","keywords","textdomain","attributes","iconColor","type","customIconColor","iconColorValue","iconBackgroundColor","customIconBackgroundColor","iconBackgroundColorValue","openInNewTab","showLabels","size","providesContext","supports","align","anchor","__experimentalExposeControlsToChildren","layout","allowSwitching","allowInheriting","allowVerticalAlignment","color","enableContrastChecker","background","gradients","text","__experimentalDefaultControls","spacing","blockGap","margin","padding","units","interactivity","clientNavigation","__experimentalBorder","radius","width","style","styles","label","isDefault","editorStyle","settings","example","innerBlocks","service","url","icon","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/social-links/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\texample: {\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'wordpress',\n\t\t\t\t\turl: 'https://wordpress.org',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'facebook',\n\t\t\t\t\turl: 'https://www.facebook.com/WordPress/',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'twitter',\n\t\t\t\t\turl: 'https://twitter.com/WordPress',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,aAAA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AC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMgD,QAAQ,GAAAnD,OAAA,CAAAmD,QAAA,GAAG;EACvBC,OAAO,EAAE;IACRC,WAAW,EAAE,CACZ;MACClD,IAAI,EAAE,kBAAkB;MACxBO,UAAU,EAAE;QACX4C,OAAO,EAAE,WAAW;QACpBC,GAAG,EAAE;MACN;IACD,CAAC,EACD;MACCpD,IAAI,EAAE,kBAAkB;MACxBO,UAAU,EAAE;QACX4C,OAAO,EAAE,UAAU;QACnBC,GAAG,EAAE;MACN;IACD,CAAC,EACD;MACCpD,IAAI,EAAE,kBAAkB;MACxBO,UAAU,EAAE;QACX4C,OAAO,EAAE,SAAS;QAClBC,GAAG,EAAE;MACN;IACD,CAAC;EAEH,CAAC;EACDC,IAAI,EAAJA,YAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE1D,IAAI;EAAEJ,QAAQ;EAAEoD;AAAS,CAAE,CAAC;AAACnD,OAAA,CAAA4D,IAAA,GAAAA,IAAA","ignoreList":[]}
|
package/build/spacer/controls.js
CHANGED
|
@@ -54,20 +54,15 @@ function DimensionInput({
|
|
|
54
54
|
const [parsedQuantity, parsedUnit] = (0, _components.__experimentalParseQuantityAndUnitFromRawValue)(value);
|
|
55
55
|
const computedValue = (0, _blockEditor.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? 'px' : parsedUnit].join('');
|
|
56
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
57
|
-
children: [(!spacingSizes || spacingSizes?.length === 0) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.
|
|
58
|
-
label: label,
|
|
57
|
+
children: [(!spacingSizes || spacingSizes?.length === 0) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
59
58
|
id: inputId,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
value: computedValue,
|
|
69
|
-
units: units
|
|
70
|
-
})
|
|
59
|
+
isResetValueOnUnitChange: true,
|
|
60
|
+
min: _constants.MIN_SPACER_SIZE,
|
|
61
|
+
onChange: handleOnChange,
|
|
62
|
+
value: computedValue,
|
|
63
|
+
units: units,
|
|
64
|
+
label: label,
|
|
65
|
+
__next40pxDefaultSize: true
|
|
71
66
|
}), spacingSizes?.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.View, {
|
|
72
67
|
className: "tools-panel-item-spacing",
|
|
73
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalSpacingSizesControl, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blockEditor","_components","_compose","_primitives","_lockUnlock","_constants","_jsxRuntime","useSpacingSizes","unlock","blockEditorPrivateApis","DimensionInput","label","onChange","isResizing","value","inputId","useInstanceId","UnitControl","spacingSizes","spacingUnits","useSettings","availableUnits","filter","unit","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","all","parsedQuantity","parsedUnit","parseQuantityAndUnitFromRawValue","computedValue","isValueSpacingPreset","join","jsxs","Fragment","children","length","jsx","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_components","_compose","_primitives","_lockUnlock","_constants","_jsxRuntime","useSpacingSizes","unlock","blockEditorPrivateApis","DimensionInput","label","onChange","isResizing","value","inputId","useInstanceId","UnitControl","spacingSizes","spacingUnits","useSettings","availableUnits","filter","unit","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","all","parsedQuantity","parsedUnit","parseQuantityAndUnitFromRawValue","computedValue","isValueSpacingPreset","join","jsxs","Fragment","children","length","jsx","__experimentalUnitControl","id","isResetValueOnUnitChange","min","MIN_SPACER_SIZE","__next40pxDefaultSize","View","className","__experimentalSpacingSizesControl","values","sides","allowReset","splitOnAxis","showSideInLabel","SpacerControls","setAttributes","orientation","height","width","InspectorControls","PanelBody","title","__","nextWidth","nextHeight"],"sources":["@wordpress/block-library/src/spacer/controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalSpacingSizesControl as SpacingSizesControl,\n\tisValueSpacingPreset,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { View } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { MIN_SPACER_SIZE } from './constants';\n\nconst { useSpacingSizes } = unlock( blockEditorPrivateApis );\n\nfunction DimensionInput( { label, onChange, isResizing, value = '' } ) {\n\tconst inputId = useInstanceId( UnitControl, 'block-spacer-height-input' );\n\tconst spacingSizes = useSpacingSizes();\n\tconst [ spacingUnits ] = useSettings( 'spacing.units' );\n\t// In most contexts the spacer size cannot meaningfully be set to a\n\t// percentage, since this is relative to the parent container. This\n\t// unit is disabled from the UI.\n\tconst availableUnits = spacingUnits\n\t\t? spacingUnits.filter( ( unit ) => unit !== '%' )\n\t\t: [ 'px', 'em', 'rem', 'vw', 'vh' ];\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits,\n\t\tdefaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tonChange( unprocessedValue.all );\n\t};\n\n\t// Force the unit to update to `px` when the Spacer is being resized.\n\tconst [ parsedQuantity, parsedUnit ] =\n\t\tparseQuantityAndUnitFromRawValue( value );\n\tconst computedValue = isValueSpacingPreset( value )\n\t\t? value\n\t\t: [ parsedQuantity, isResizing ? 'px' : parsedUnit ].join( '' );\n\n\treturn (\n\t\t<>\n\t\t\t{ ( ! spacingSizes || spacingSizes?.length === 0 ) && (\n\t\t\t\t<UnitControl\n\t\t\t\t\tid={ inputId }\n\t\t\t\t\tisResetValueOnUnitChange\n\t\t\t\t\tmin={ MIN_SPACER_SIZE }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tvalue={ computedValue }\n\t\t\t\t\tunits={ units }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ spacingSizes?.length > 0 && (\n\t\t\t\t<View className=\"tools-panel-item-spacing\">\n\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\tvalues={ { all: computedValue } }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tsides={ [ 'all' ] }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ false }\n\t\t\t\t\t\tshowSideInLabel={ false }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function SpacerControls( {\n\tsetAttributes,\n\torientation,\n\theight,\n\twidth,\n\tisResizing,\n} ) {\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t{ orientation === 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tvalue={ width }\n\t\t\t\t\t\tonChange={ ( nextWidth ) =>\n\t\t\t\t\t\t\tsetAttributes( { width: nextWidth } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ orientation !== 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\t\t\tvalue={ height }\n\t\t\t\t\t\tonChange={ ( nextHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( { height: nextHeight } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAA8C,IAAAO,WAAA,GAAAP,OAAA;AAxB9C;AACA;AACA;;AAkBA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAgB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE5D,SAASC,cAAcA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,UAAU;EAAEC,KAAK,GAAG;AAAG,CAAC,EAAG;EACtE,MAAMC,OAAO,GAAG,IAAAC,sBAAa,EAAEC,qCAAW,EAAE,2BAA4B,CAAC;EACzE,MAAMC,YAAY,GAAGX,eAAe,CAAC,CAAC;EACtC,MAAM,CAAEY,YAAY,CAAE,GAAG,IAAAC,wBAAW,EAAE,eAAgB,CAAC;EACvD;EACA;EACA;EACA,MAAMC,cAAc,GAAGF,YAAY,GAChCA,YAAY,CAACG,MAAM,CAAIC,IAAI,IAAMA,IAAI,KAAK,GAAI,CAAC,GAC/C,CAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,C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@ -65,9 +65,22 @@ const metadata = exports.metadata = {
|
|
|
65
65
|
},
|
|
66
66
|
interactivity: {
|
|
67
67
|
clientNavigation: true
|
|
68
|
+
},
|
|
69
|
+
__experimentalBorder: {
|
|
70
|
+
radius: true,
|
|
71
|
+
color: true,
|
|
72
|
+
width: true,
|
|
73
|
+
style: true,
|
|
74
|
+
__experimentalDefaultControls: {
|
|
75
|
+
radius: true,
|
|
76
|
+
color: true,
|
|
77
|
+
width: true,
|
|
78
|
+
style: true
|
|
79
|
+
}
|
|
68
80
|
}
|
|
69
81
|
},
|
|
70
|
-
example: {}
|
|
82
|
+
example: {},
|
|
83
|
+
style: "wp-block-table-of-contents"
|
|
71
84
|
};
|
|
72
85
|
const {
|
|
73
86
|
name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","__experimental","name","title","category","description","keywords","textdomain","attributes","headings","type","items","onlyIncludeCurrentPage","supports","html","color","text","background","gradients","link","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","example","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/table-of-contents/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { tableOfContents as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,cAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,QAAA;MAAAC,IAAA;MAAAC,KAAA;QAAAD,IAAA;MAAA;MAAA;IAAA;IAAAE,sBAAA;MAAAF,IAAA;MAAA;IAAA;EAAA;EAAAG,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,IAAA;MAAAC,UAAA;MAAAC,SAAA;MAAAC,IAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,OAAA;AAAA;AAQA,MAAM;
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","__experimental","name","title","category","description","keywords","textdomain","attributes","headings","type","items","onlyIncludeCurrentPage","supports","html","color","text","background","gradients","link","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","__experimentalBorder","radius","width","style","example","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/table-of-contents/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { tableOfContents as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,cAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,QAAA;MAAAC,IAAA;MAAAC,KAAA;QAAAD,IAAA;MAAA;MAAA;IAAA;IAAAE,sBAAA;MAAAF,IAAA;MAAA;IAAA;EAAA;EAAAG,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,IAAA;MAAAC,UAAA;MAAAC,SAAA;MAAAC,IAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAArB,KAAA;MAAAsB,KAAA;MAAAC,KAAA;MAAAN,6BAAA;QAAAI,MAAA;QAAArB,KAAA;QAAAsB,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAC,OAAA;EAAAD,KAAA;AAAA;AAQA,MAAM;EAAEpC;AAAK,CAAC,GAAGL,QAAQ;AAACC,OAAA,CAAAI,IAAA,GAAAA,IAAA;AAInB,MAAMsC,QAAQ,GAAA1C,OAAA,CAAA0C,QAAA,GAAG;EACvBC,IAAI,EAAJA,sBAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE3C,IAAI;EAAEL,QAAQ;EAAE2C;AAAS,CAAE,CAAC;AAAC1C,OAAA,CAAA8C,IAAA,GAAAA,IAAA","ignoreList":[]}
|
package/build/tag-cloud/edit.js
CHANGED
|
@@ -42,8 +42,11 @@ function TagCloudEdit({
|
|
|
42
42
|
largestFontSize
|
|
43
43
|
} = attributes;
|
|
44
44
|
const [availableUnits] = (0, _blockEditor.useSettings)('spacing.units');
|
|
45
|
+
|
|
46
|
+
// The `pt` unit is used as the default value and is therefore
|
|
47
|
+
// always considered an available unit.
|
|
45
48
|
const units = (0, _components.__experimentalUseCustomUnits)({
|
|
46
|
-
availableUnits: availableUnits
|
|
49
|
+
availableUnits: availableUnits ? [...availableUnits, 'pt'] : ['%', 'px', 'em', 'rem', 'pt']
|
|
47
50
|
});
|
|
48
51
|
const taxonomies = (0, _data.useSelect)(select => select(_coreData.store).getTaxonomies({
|
|
49
52
|
per_page: -1
|
|
@@ -90,18 +93,43 @@ function TagCloudEdit({
|
|
|
90
93
|
title: (0, _i18n.__)('Settings'),
|
|
91
94
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectControl, {
|
|
92
95
|
__nextHasNoMarginBottom: true,
|
|
96
|
+
__next40pxDefaultSize: true,
|
|
93
97
|
label: (0, _i18n.__)('Taxonomy'),
|
|
94
98
|
options: getTaxonomyOptions(),
|
|
95
99
|
value: taxonomy,
|
|
96
100
|
onChange: selectedTaxonomy => setAttributes({
|
|
97
101
|
taxonomy: selectedTaxonomy
|
|
98
102
|
})
|
|
99
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BaseControl, {
|
|
104
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Flex, {
|
|
105
|
+
gap: 4,
|
|
106
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
107
|
+
isBlock: true,
|
|
108
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
109
|
+
label: (0, _i18n.__)('Smallest size'),
|
|
110
|
+
value: smallestFontSize,
|
|
111
|
+
onChange: value => {
|
|
112
|
+
onFontSizeChange('smallestFontSize', value);
|
|
113
|
+
},
|
|
114
|
+
units: units,
|
|
115
|
+
min: MIN_FONT_SIZE,
|
|
116
|
+
max: MAX_FONT_SIZE,
|
|
117
|
+
size: "__unstable-large"
|
|
118
|
+
})
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
120
|
+
isBlock: true,
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
122
|
+
label: (0, _i18n.__)('Largest size'),
|
|
123
|
+
value: largestFontSize,
|
|
124
|
+
onChange: value => {
|
|
125
|
+
onFontSizeChange('largestFontSize', value);
|
|
126
|
+
},
|
|
127
|
+
units: units,
|
|
128
|
+
min: MIN_FONT_SIZE,
|
|
129
|
+
max: MAX_FONT_SIZE,
|
|
130
|
+
size: "__unstable-large"
|
|
131
|
+
})
|
|
132
|
+
})]
|
|
105
133
|
})
|
|
106
134
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RangeControl, {
|
|
107
135
|
__nextHasNoMarginBottom: true,
|
|
@@ -114,32 +142,13 @@ function TagCloudEdit({
|
|
|
114
142
|
min: MIN_TAGS,
|
|
115
143
|
max: MAX_TAGS,
|
|
116
144
|
required: true
|
|
117
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
onFontSizeChange('smallestFontSize', value);
|
|
125
|
-
},
|
|
126
|
-
units: units,
|
|
127
|
-
min: MIN_FONT_SIZE,
|
|
128
|
-
max: MAX_FONT_SIZE
|
|
129
|
-
})
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
131
|
-
isBlock: true,
|
|
132
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
133
|
-
label: (0, _i18n.__)('Largest size'),
|
|
134
|
-
value: largestFontSize,
|
|
135
|
-
onChange: value => {
|
|
136
|
-
onFontSizeChange('largestFontSize', value);
|
|
137
|
-
},
|
|
138
|
-
units: units,
|
|
139
|
-
min: MIN_FONT_SIZE,
|
|
140
|
-
max: MAX_FONT_SIZE
|
|
141
|
-
})
|
|
142
|
-
})]
|
|
145
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
146
|
+
__nextHasNoMarginBottom: true,
|
|
147
|
+
label: (0, _i18n.__)('Show tag counts'),
|
|
148
|
+
checked: showTagCounts,
|
|
149
|
+
onChange: () => setAttributes({
|
|
150
|
+
showTagCounts: !showTagCounts
|
|
151
|
+
})
|
|
143
152
|
})]
|
|
144
153
|
})
|
|
145
154
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_serverSideRender","_interopRequireDefault","_coreData","_jsxRuntime","MIN_TAGS","MAX_TAGS","MIN_FONT_SIZE","MAX_FONT_SIZE","TagCloudEdit","attributes","setAttributes","taxonomy","showTagCounts","numberOfTags","smallestFontSize","largestFontSize","availableUnits","useSettings","units","useCustomUnits","taxonomies","useSelect","select","coreStore","getTaxonomies","per_page","getTaxonomyOptions","selectOption","label","__","value","disabled","taxonomyOptions","filter","tax","show_cloud","map","item","slug","name","onFontSizeChange","fontSizeLabel","newValue","quantity","newUnit","parseQuantityAndUnitFromRawValue","Number","isFinite","updateObj","Object","entries","forEach","attribute","currentValue","currentQuantity","currentUnit","inspectorControls","jsx","InspectorControls","children","jsxs","PanelBody","title","SelectControl","__nextHasNoMarginBottom","options","onChange","selectedTaxonomy","ToggleControl","checked","RangeControl","__next40pxDefaultSize","min","max","required","Flex","FlexItem","isBlock","__experimentalUnitControl","Fragment","useBlockProps","Disabled","default","skipBlockSupportAttributes","block","_default","exports"],"sources":["@wordpress/block-library/src/tag-cloud/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFlex,\n\tFlexItem,\n\tPanelBody,\n\tToggleControl,\n\tSelectControl,\n\tRangeControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\tDisabled,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseSettings,\n} from '@wordpress/block-editor';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Minimum number of tags a user can show using this block.\n *\n * @type {number}\n */\nconst MIN_TAGS = 1;\n\n/**\n * Maximum number of tags a user can show using this block.\n *\n * @type {number}\n */\nconst MAX_TAGS = 100;\n\nconst MIN_FONT_SIZE = 0.1;\nconst MAX_FONT_SIZE = 100;\n\nfunction TagCloudEdit( { attributes, setAttributes } ) {\n\tconst {\n\t\ttaxonomy,\n\t\tshowTagCounts,\n\t\tnumberOfTags,\n\t\tsmallestFontSize,\n\t\tlargestFontSize,\n\t} = attributes;\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem' ],\n\t} );\n\tconst taxonomies = useSelect(\n\t\t( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tconst getTaxonomyOptions = () => {\n\t\tconst selectOption = {\n\t\t\tlabel: __( '- Select -' ),\n\t\t\tvalue: '',\n\t\t\tdisabled: true,\n\t\t};\n\t\tconst taxonomyOptions = ( taxonomies ?? [] )\n\t\t\t.filter( ( tax ) => !! tax.show_cloud )\n\t\t\t.map( ( item ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: item.slug,\n\t\t\t\t\tlabel: item.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\treturn [ selectOption, ...taxonomyOptions ];\n\t};\n\n\tconst onFontSizeChange = ( fontSizeLabel, newValue ) => {\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst [ quantity, newUnit ] =\n\t\t\tparseQuantityAndUnitFromRawValue( newValue );\n\t\tif ( ! Number.isFinite( quantity ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updateObj = { [ fontSizeLabel ]: newValue };\n\t\t// We need to keep in sync the `unit` changes to both `smallestFontSize`\n\t\t// and `largestFontSize` attributes.\n\t\tObject.entries( {\n\t\t\tsmallestFontSize,\n\t\t\tlargestFontSize,\n\t\t} ).forEach( ( [ attribute, currentValue ] ) => {\n\t\t\tconst [ currentQuantity, currentUnit ] =\n\t\t\t\tparseQuantityAndUnitFromRawValue( currentValue );\n\t\t\t// Only add an update if the other font size attribute has a different unit.\n\t\t\tif ( attribute !== fontSizeLabel && currentUnit !== newUnit ) {\n\t\t\t\tupdateObj[ attribute ] = `${ currentQuantity }${ newUnit }`;\n\t\t\t}\n\t\t} );\n\t\tsetAttributes( updateObj );\n\t};\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Taxonomy' ) }\n\t\t\t\t\toptions={ getTaxonomyOptions() }\n\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\tonChange={ ( selectedTaxonomy ) =>\n\t\t\t\t\t\tsetAttributes( { taxonomy: selectedTaxonomy } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post counts' ) }\n\t\t\t\t\tchecked={ showTagCounts }\n\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\tsetAttributes( { showTagCounts: ! showTagCounts } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<RangeControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Number of tags' ) }\n\t\t\t\t\tvalue={ numberOfTags }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { numberOfTags: value } )\n\t\t\t\t\t}\n\t\t\t\t\tmin={ MIN_TAGS }\n\t\t\t\t\tmax={ MAX_TAGS }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Smallest size' ) }\n\t\t\t\t\t\t\tvalue={ smallestFontSize }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tonFontSizeChange( 'smallestFontSize', value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tmin={ MIN_FONT_SIZE }\n\t\t\t\t\t\t\tmax={ MAX_FONT_SIZE }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Largest size' ) }\n\t\t\t\t\t\t\tvalue={ largestFontSize }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tonFontSizeChange( 'largestFontSize', value );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tmin={ MIN_FONT_SIZE }\n\t\t\t\t\t\t\tmax={ MAX_FONT_SIZE }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...useBlockProps() }>\n\t\t\t\t<Disabled>\n\t\t\t\t\t<ServerSideRender\n\t\t\t\t\t\tskipBlockSupportAttributes\n\t\t\t\t\t\tblock=\"core/tag-cloud\"\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t/>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default TagCloudEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAYA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAA0D,IAAAO,WAAA,GAAAP,OAAA;AAvB1D;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA,GACA,MAAMQ,QAAQ,GAAG,CAAC;;AAElB;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,GAAG;AAEpB,MAAMC,aAAa,GAAG,GAAG;AACzB,MAAMC,aAAa,GAAG,GAAG;AAEzB,SAASC,YAAYA,CAAE;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAG;EACtD,MAAM;IACLC,QAAQ;IACRC,aAAa;IACbC,YAAY;IACZC,gBAAgB;I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AAK,EAAGA,KAAO;YACfsD,GAAG,EAAGlE,aAAe;YACrBmE,GAAG,EAAGlE;UAAe,CACrB;QAAC,CACO,CAAC;MAAA,CACN,CAAC;IAAA,CACG;EAAC,CACM,CACnB;EAED,oBACC,IAAAJ,WAAA,CAAAyD,IAAA,EAAAzD,WAAA,CAAA4E,QAAA;IAAApB,QAAA,GACGH,iBAAiB,eACnB,IAAArD,WAAA,CAAAsD,GAAA;MAAA,GAAU,IAAAuB,0BAAa,EAAC,CAAC;MAAArB,QAAA,eACxB,IAAAxD,WAAA,CAAAsD,GAAA,EAAC9D,WAAA,CAAAsF,QAAQ;QAAAtB,QAAA,eACR,IAAAxD,WAAA,CAAAsD,GAAA,EAACzD,iBAAA,CAAAkF,OAAgB;UAChBC,0BAA0B;UAC1BC,KAAK,EAAC,gBAAgB;UACtB3E,UAAU,EAAGA;QAAY,CACzB;MAAC,CACO;IAAC,CACP,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAA4E,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEc1E,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_serverSideRender","_interopRequireDefault","_coreData","_jsxRuntime","MIN_TAGS","MAX_TAGS","MIN_FONT_SIZE","MAX_FONT_SIZE","TagCloudEdit","attributes","setAttributes","taxonomy","showTagCounts","numberOfTags","smallestFontSize","largestFontSize","availableUnits","useSettings","units","useCustomUnits","taxonomies","useSelect","select","coreStore","getTaxonomies","per_page","getTaxonomyOptions","selectOption","label","__","value","disabled","taxonomyOptions","filter","tax","show_cloud","map","item","slug","name","onFontSizeChange","fontSizeLabel","newValue","quantity","newUnit","parseQuantityAndUnitFromRawValue","Number","isFinite","updateObj","Object","entries","forEach","attribute","currentValue","currentQuantity","currentUnit","inspectorControls","jsx","InspectorControls","children","jsxs","PanelBody","title","SelectControl","__nextHasNoMarginBottom","__next40pxDefaultSize","options","onChange","selectedTaxonomy","BaseControl","Flex","gap","FlexItem","isBlock","__experimentalUnitControl","min","max","size","RangeControl","required","ToggleControl","checked","Fragment","useBlockProps","Disabled","default","skipBlockSupportAttributes","block","_default","exports"],"sources":["@wordpress/block-library/src/tag-cloud/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFlex,\n\tFlexItem,\n\tPanelBody,\n\tToggleControl,\n\tSelectControl,\n\tRangeControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\tDisabled,\n\tBaseControl,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseSettings,\n} from '@wordpress/block-editor';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Minimum number of tags a user can show using this block.\n *\n * @type {number}\n */\nconst MIN_TAGS = 1;\n\n/**\n * Maximum number of tags a user can show using this block.\n *\n * @type {number}\n */\nconst MAX_TAGS = 100;\n\nconst MIN_FONT_SIZE = 0.1;\nconst MAX_FONT_SIZE = 100;\n\nfunction TagCloudEdit( { attributes, setAttributes } ) {\n\tconst {\n\t\ttaxonomy,\n\t\tshowTagCounts,\n\t\tnumberOfTags,\n\t\tsmallestFontSize,\n\t\tlargestFontSize,\n\t} = attributes;\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\n\t// The `pt` unit is used as the default value and is therefore\n\t// always considered an available unit.\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits\n\t\t\t? [ ...availableUnits, 'pt' ]\n\t\t\t: [ '%', 'px', 'em', 'rem', 'pt' ],\n\t} );\n\n\tconst taxonomies = useSelect(\n\t\t( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tconst getTaxonomyOptions = () => {\n\t\tconst selectOption = {\n\t\t\tlabel: __( '- Select -' ),\n\t\t\tvalue: '',\n\t\t\tdisabled: true,\n\t\t};\n\t\tconst taxonomyOptions = ( taxonomies ?? [] )\n\t\t\t.filter( ( tax ) => !! tax.show_cloud )\n\t\t\t.map( ( item ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: item.slug,\n\t\t\t\t\tlabel: item.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\treturn [ selectOption, ...taxonomyOptions ];\n\t};\n\n\tconst onFontSizeChange = ( fontSizeLabel, newValue ) => {\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst [ quantity, newUnit ] =\n\t\t\tparseQuantityAndUnitFromRawValue( newValue );\n\t\tif ( ! Number.isFinite( quantity ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updateObj = { [ fontSizeLabel ]: newValue };\n\t\t// We need to keep in sync the `unit` changes to both `smallestFontSize`\n\t\t// and `largestFontSize` attributes.\n\t\tObject.entries( {\n\t\t\tsmallestFontSize,\n\t\t\tlargestFontSize,\n\t\t} ).forEach( ( [ attribute, currentValue ] ) => {\n\t\t\tconst [ currentQuantity, currentUnit ] =\n\t\t\t\tparseQuantityAndUnitFromRawValue( currentValue );\n\t\t\t// Only add an update if the other font size attribute has a different unit.\n\t\t\tif ( attribute !== fontSizeLabel && currentUnit !== newUnit ) {\n\t\t\t\tupdateObj[ attribute ] = `${ currentQuantity }${ newUnit }`;\n\t\t\t}\n\t\t} );\n\t\tsetAttributes( updateObj );\n\t};\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Taxonomy' ) }\n\t\t\t\t\toptions={ getTaxonomyOptions() }\n\t\t\t\t\tvalue={ taxonomy }\n\t\t\t\t\tonChange={ ( selectedTaxonomy ) =>\n\t\t\t\t\t\tsetAttributes( { taxonomy: selectedTaxonomy } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<BaseControl>\n\t\t\t\t\t<Flex gap={ 4 }>\n\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Smallest size' ) }\n\t\t\t\t\t\t\t\tvalue={ smallestFontSize }\n\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\tonFontSizeChange(\n\t\t\t\t\t\t\t\t\t\t'smallestFontSize',\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tmin={ MIN_FONT_SIZE }\n\t\t\t\t\t\t\t\tmax={ MAX_FONT_SIZE }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Largest size' ) }\n\t\t\t\t\t\t\t\tvalue={ largestFontSize }\n\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\tonFontSizeChange(\n\t\t\t\t\t\t\t\t\t\t'largestFontSize',\n\t\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tmin={ MIN_FONT_SIZE }\n\t\t\t\t\t\t\t\tmax={ MAX_FONT_SIZE }\n\t\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t</BaseControl>\n\t\t\t\t<RangeControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Number of tags' ) }\n\t\t\t\t\tvalue={ numberOfTags }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { numberOfTags: value } )\n\t\t\t\t\t}\n\t\t\t\t\tmin={ MIN_TAGS }\n\t\t\t\t\tmax={ MAX_TAGS }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show tag counts' ) }\n\t\t\t\t\tchecked={ showTagCounts }\n\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\tsetAttributes( { showTagCounts: ! showTagCounts } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...useBlockProps() }>\n\t\t\t\t<Disabled>\n\t\t\t\t\t<ServerSideRender\n\t\t\t\t\t\tskipBlockSupportAttributes\n\t\t\t\t\t\tblock=\"core/tag-cloud\"\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t/>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default TagCloudEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAaA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAA0D,IAAAO,WAAA,GAAAP,OAAA;AAxB1D;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA,GACA,MAAMQ,QAAQ,GAAG,CAAC;;AAElB;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,GAAG;AAEpB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B;QACvBC,qBAAqB;QACrBrC,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;QAChCC,KAAK,EAAGjB,YAAc;QACtBsD,QAAQ,EAAKrC,KAAK,IACjBpB,aAAa,CAAE;UAAEG,YAAY,EAAEiB;QAAM,CAAE,CACvC;QACD6C,GAAG,EAAGvE,QAAU;QAChBwE,GAAG,EAAGvE,QAAU;QAChB0E,QAAQ;MAAA,CACR,CAAC,eACF,IAAA5E,WAAA,CAAAsD,GAAA,EAAC9D,WAAA,CAAAqF,aAAa;QACbhB,uBAAuB;QACvBpC,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;QACjCoD,OAAO,EAAGrE,aAAe;QACzBuD,QAAQ,EAAGA,CAAA,KACVzD,aAAa,CAAE;UAAEE,aAAa,EAAE,CAAEA;QAAc,CAAE;MAClD,CACD,CAAC;IAAA,CACQ;EAAC,CACM,CACnB;EAED,oBACC,IAAAT,WAAA,CAAAyD,IAAA,EAAAzD,WAAA,CAAA+E,QAAA;IAAAvB,QAAA,GACGH,iBAAiB,eACnB,IAAArD,WAAA,CAAAsD,GAAA;MAAA,GAAU,IAAA0B,0BAAa,EAAC,CAAC;MAAAxB,QAAA,eACxB,IAAAxD,WAAA,CAAAsD,GAAA,EAAC9D,WAAA,CAAAyF,QAAQ;QAAAzB,QAAA,eACR,IAAAxD,WAAA,CAAAsD,GAAA,EAACzD,iBAAA,CAAAqF,OAAgB;UAChBC,0BAA0B;UAC1BC,KAAK,EAAC,gBAAgB;UACtB9E,UAAU,EAAGA;QAAY,CACzB;MAAC,CACO;IAAC,CACP,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAA+E,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEc7E,YAAY","ignoreList":[]}
|
package/build/tag-cloud/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const metadata = exports.metadata = {
|
|
|
21
21
|
name: "core/tag-cloud",
|
|
22
22
|
title: "Tag Cloud",
|
|
23
23
|
category: "widgets",
|
|
24
|
-
description: "A cloud of
|
|
24
|
+
description: "A cloud of popular keywords, each sized by how often it appears.",
|
|
25
25
|
textdomain: "default",
|
|
26
26
|
attributes: {
|
|
27
27
|
numberOfTags: {
|
|
@@ -108,9 +108,8 @@ function TemplatePartEdit({
|
|
|
108
108
|
area,
|
|
109
109
|
onNavigateToEntityRecord,
|
|
110
110
|
title,
|
|
111
|
-
|
|
111
|
+
canUserEdit
|
|
112
112
|
} = (0, _data.useSelect)(select => {
|
|
113
|
-
var _select$canUser;
|
|
114
113
|
const {
|
|
115
114
|
getEditedEntityRecord,
|
|
116
115
|
hasFinishedResolution
|
|
@@ -123,7 +122,11 @@ function TemplatePartEdit({
|
|
|
123
122
|
const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null;
|
|
124
123
|
const _area = entityRecord?.area || attributes.area;
|
|
125
124
|
const hasResolvedEntity = templatePartId ? hasFinishedResolution('getEditedEntityRecord', getEntityArgs) : false;
|
|
126
|
-
const
|
|
125
|
+
const _canUserEdit = hasResolvedEntity ? select(_coreData.store).canUser('update', {
|
|
126
|
+
kind: 'postType',
|
|
127
|
+
name: 'wp_template_part',
|
|
128
|
+
id: templatePartId
|
|
129
|
+
}) : false;
|
|
127
130
|
return {
|
|
128
131
|
hasInnerBlocks: getBlockCount(clientId) > 0,
|
|
129
132
|
isResolved: hasResolvedEntity,
|
|
@@ -131,7 +134,7 @@ function TemplatePartEdit({
|
|
|
131
134
|
area: _area,
|
|
132
135
|
onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
|
|
133
136
|
title: entityRecord?.title,
|
|
134
|
-
|
|
137
|
+
canUserEdit: !!_canUserEdit
|
|
135
138
|
};
|
|
136
139
|
}, [templatePartId, attributes.area, clientId]);
|
|
137
140
|
const areaObject = (0, _hooks.useTemplatePartArea)(area);
|
|
@@ -172,7 +175,7 @@ function TemplatePartEdit({
|
|
|
172
175
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
173
176
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_blockEditor.RecursionProvider, {
|
|
174
177
|
uniqueId: templatePartId,
|
|
175
|
-
children: [isEntityAvailable && onNavigateToEntityRecord &&
|
|
178
|
+
children: [isEntityAvailable && onNavigateToEntityRecord && canUserEdit && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockControls, {
|
|
176
179
|
group: "other",
|
|
177
180
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
|
|
178
181
|
onClick: () => onNavigateToEntityRecord({
|