@wordpress/block-library 11.0.0 → 11.1.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 +29 -0
- package/README.md +7 -7
- package/build/accordion/block.json +4 -1
- package/build/accordion-item/block.json +7 -1
- package/build/accordion-panel/block.json +9 -1
- package/build/archives/block.json +9 -0
- package/build/archives/edit.cjs.map +3 -3
- package/build/audio/block.json +8 -0
- package/build/audio/edit.cjs.map +3 -3
- package/build/avatar/hooks.cjs.map +2 -2
- package/build/breadcrumbs/block.json +3 -0
- package/build/breadcrumbs/edit.cjs.map +3 -3
- package/build/button/edit.cjs.map +2 -2
- package/build/buttons/block.json +9 -0
- package/build/categories/block.json +12 -1
- package/build/categories/edit.cjs.map +3 -3
- package/build/code/block.json +10 -0
- package/build/code/save.cjs.map +2 -2
- package/build/column/block.json +9 -0
- package/build/columns/block.json +9 -0
- package/build/comment-author-name/block.json +3 -0
- package/build/comment-content/block.json +5 -0
- package/build/comment-date/block.json +3 -0
- package/build/comment-edit-link/block.json +3 -0
- package/build/comment-reply-link/block.json +3 -0
- package/build/comment-template/hooks.cjs.map +2 -2
- package/build/comments/block.json +10 -0
- package/build/comments-pagination/block.json +3 -0
- package/build/comments-pagination-next/block.json +3 -0
- package/build/comments-pagination-numbers/block.json +3 -0
- package/build/comments-pagination-previous/block.json +6 -0
- package/build/comments-title/block.json +3 -0
- package/build/cover/edit/index.cjs +4 -1
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +52 -13
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/cover/transforms.cjs.map +2 -2
- package/build/details/block.json +12 -0
- package/build/details/index.cjs.map +2 -2
- package/build/embed/embed-controls.cjs.map +2 -2
- package/build/file/block.json +9 -0
- package/build/file/deprecated.cjs.map +2 -2
- package/build/file/edit.cjs.map +2 -2
- package/build/file/inspector.cjs.map +3 -3
- package/build/file/save.cjs.map +2 -2
- package/build/footnotes/block.json +10 -0
- package/build/footnotes/edit.cjs.map +2 -2
- package/build/gallery/block.json +9 -0
- package/build/gallery/dynamic-gallery.cjs.map +3 -3
- package/build/gallery/edit.cjs +65 -39
- package/build/gallery/edit.cjs.map +3 -3
- package/build/gallery/{flex-styles.cjs → gallery-styles.cjs} +31 -32
- package/build/gallery/gallery-styles.cjs.map +7 -0
- package/build/gallery/responsive-styles.cjs +27 -5
- package/build/gallery/responsive-styles.cjs.map +2 -2
- package/build/group/block.json +1 -0
- package/build/heading/block.json +11 -0
- package/build/heading/index.cjs.map +2 -2
- package/build/home-link/block.json +18 -0
- package/build/home-link/edit.cjs.map +3 -3
- package/build/html/modal.cjs +3 -6
- package/build/html/modal.cjs.map +2 -2
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +10 -8
- package/build/image/image.cjs.map +3 -3
- package/build/image/use-open-image-media-editor-modal.cjs +20 -0
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/index.cjs.map +2 -2
- package/build/latest-comments/block.json +10 -0
- package/build/latest-comments/edit.cjs.map +3 -3
- package/build/latest-posts/block.json +10 -0
- package/build/latest-posts/edit.cjs.map +2 -2
- package/build/list/ordered-list-settings.cjs.map +3 -3
- package/build/list-item/hooks/use-enter.cjs.map +2 -2
- package/build/loginout/block.json +10 -0
- package/build/math/block.json +12 -0
- package/build/math/deprecated.cjs +29 -12
- package/build/math/deprecated.cjs.map +2 -2
- package/build/math/edit.cjs +67 -46
- package/build/math/edit.cjs.map +2 -2
- package/build/math/save.cjs +2 -2
- package/build/math/save.cjs.map +2 -2
- package/build/media-text/block.json +1 -0
- package/build/media-text/constants.cjs +3 -0
- package/build/media-text/constants.cjs.map +2 -2
- package/build/media-text/deprecated.cjs.map +2 -2
- package/build/media-text/edit.cjs +40 -0
- package/build/media-text/edit.cjs.map +3 -3
- package/build/media-text/image-fill.cjs.map +2 -2
- package/build/media-text/media-container.cjs +3 -3
- package/build/media-text/media-container.cjs.map +2 -2
- package/build/navigation/edit/index.cjs +1 -4
- package/build/navigation/edit/index.cjs.map +2 -2
- package/build/navigation/edit/menu-inspector-controls.cjs.map +2 -2
- package/build/navigation/edit/overlay-template-part-selector.cjs.map +3 -3
- package/build/navigation/edit/responsive-wrapper.cjs.map +2 -2
- package/build/navigation/edit/use-generate-default-navigation-title.cjs.map +2 -2
- package/build/navigation/view.cjs +2 -2
- package/build/navigation/view.cjs.map +2 -2
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-link/link-ui/page-creator.cjs.map +3 -3
- package/build/navigation-link/shared/controls.cjs.map +3 -3
- package/build/navigation-link/shared/invalid-draft-display.cjs.map +2 -2
- package/build/navigation-link/shared/use-link-preview.cjs +13 -13
- package/build/navigation-link/shared/use-link-preview.cjs.map +2 -2
- package/build/navigation-overlay-close/block.json +7 -0
- package/build/navigation-submenu/block.json +6 -0
- package/build/navigation-submenu/edit.cjs +9 -1
- package/build/navigation-submenu/edit.cjs.map +3 -3
- package/build/page-list/block.json +10 -0
- package/build/paragraph/block.json +1 -0
- package/build/paragraph/edit.cjs +1 -2
- package/build/paragraph/edit.cjs.map +2 -2
- package/build/paragraph/index.cjs +6 -0
- package/build/paragraph/index.cjs.map +3 -3
- package/build/playlist/block.json +1 -0
- package/build/playlist/edit.cjs +2 -1
- package/build/playlist/edit.cjs.map +3 -3
- package/build/post-author/edit.cjs.map +3 -3
- package/build/post-author-biography/block.json +4 -0
- package/build/post-author-name/block.json +5 -0
- package/build/post-author-name/edit.cjs.map +2 -2
- package/build/post-comments-count/block.json +3 -0
- package/build/post-comments-form/block.json +10 -0
- package/build/post-content/block.json +3 -0
- package/build/post-date/block.json +3 -0
- package/build/post-date/edit.cjs.map +2 -2
- package/build/post-excerpt/block.json +6 -0
- package/build/post-excerpt/edit.cjs.map +2 -2
- package/build/post-featured-image/edit.cjs +11 -9
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-navigation-link/block.json +30 -0
- package/build/post-navigation-link/edit.cjs +13 -2
- package/build/post-navigation-link/edit.cjs.map +3 -3
- package/build/post-template/block.json +13 -1
- package/build/post-terms/block.json +6 -0
- package/build/post-time-to-read/block.json +6 -0
- package/build/post-time-to-read/edit.cjs.map +2 -2
- package/build/post-title/block.json +10 -0
- package/build/preformatted/block.json +7 -0
- package/build/pullquote/block.json +1 -0
- package/build/pullquote/deprecated.cjs.map +2 -2
- package/build/query/deprecated.cjs.map +2 -2
- package/build/query/edit/inspector-controls/index.cjs.map +3 -3
- package/build/query/edit/inspector-controls/order-control.cjs.map +3 -3
- package/build/query/edit/inspector-controls/sticky-control.cjs.map +3 -3
- package/build/query/view.cjs.map +2 -2
- package/build/query-no-results/block.json +10 -2
- package/build/query-pagination/block.json +3 -0
- package/build/query-pagination-next/block.json +3 -0
- package/build/query-pagination-numbers/block.json +3 -0
- package/build/query-pagination-previous/block.json +3 -0
- package/build/query-title/block.json +3 -0
- package/build/query-title/use-archive-label.cjs.map +2 -2
- package/build/query-total/block.json +6 -0
- package/build/quote/block.json +1 -0
- package/build/quote/deprecated.cjs.map +2 -2
- package/build/quote/transforms.cjs.map +2 -2
- package/build/read-more/block.json +6 -0
- package/build/rss/block.json +6 -0
- package/build/search/edit.cjs.map +3 -3
- package/build/separator/edit.cjs.map +3 -3
- package/build/site-tagline/block.json +8 -1
- package/build/site-title/block.json +7 -1
- package/build/social-links/block.json +3 -0
- package/build/social-links/edit.cjs +2 -3
- package/build/social-links/edit.cjs.map +3 -3
- package/build/tab-panel/block.json +25 -0
- package/build/tab-panel/controls.cjs.map +3 -3
- package/build/tab-panels/block.json +18 -1
- package/build/table/state.cjs.map +2 -2
- package/build/table-of-contents/block.json +7 -0
- package/build/table-of-contents/edit.cjs.map +3 -3
- package/build/table-of-contents/utils.cjs.map +2 -2
- package/build/tabs/block.json +24 -1
- package/build/tabs/use-tab-actions.cjs.map +2 -2
- package/build/tag-cloud/block.json +19 -0
- package/build/tag-cloud/edit.cjs.map +3 -3
- package/build/template-part/edit/advanced-controls.cjs.map +3 -3
- package/build/template-part/edit/import-controls.cjs.map +3 -3
- package/build/template-part/edit/index.cjs.map +2 -2
- package/build/template-part/edit/inner-blocks.cjs.map +2 -2
- package/build/template-part/edit/placeholder.cjs.map +2 -2
- package/build/template-part/edit/selection-modal.cjs.map +1 -1
- package/build/term-count/block.json +7 -0
- package/build/term-count/use-term-count.cjs.map +2 -2
- package/build/term-description/block.json +9 -0
- package/build/term-description/use-term-description.cjs.map +2 -2
- package/build/term-name/block.json +10 -0
- package/build/term-name/use-term-name.cjs.map +2 -2
- package/build/term-template/block.json +10 -1
- package/build/terms-query/edit/inspector-controls/index.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/inherit-control.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/order-control.cjs.map +3 -3
- package/build/terms-query/edit/inspector-controls/taxonomy-control.cjs.map +3 -3
- package/build/utils/hooks.cjs.map +2 -2
- package/build/utils/media-control.cjs +5 -1
- package/build/utils/media-control.cjs.map +2 -2
- package/build/utils/poster-image.cjs.map +2 -2
- package/build/utils/search-patterns.cjs +7 -43
- package/build/utils/search-patterns.cjs.map +3 -3
- package/build/utils/style-state.cjs +4 -6
- package/build/utils/style-state.cjs.map +2 -2
- package/build/verse/block.json +1 -0
- package/build/video/block.json +6 -0
- package/build/video/edit-common-settings.cjs.map +3 -3
- package/build/video/edit.cjs +23 -15
- package/build/video/edit.cjs.map +3 -3
- package/build/video/index.cjs +0 -2
- package/build/video/index.cjs.map +3 -3
- package/build/video/save.cjs +5 -1
- package/build/video/save.cjs.map +3 -3
- package/build/video/tracks-editor.cjs.map +3 -3
- package/build-module/accordion/block.json +4 -1
- package/build-module/accordion-item/block.json +7 -1
- package/build-module/accordion-panel/block.json +9 -1
- package/build-module/archives/block.json +9 -0
- package/build-module/archives/edit.mjs +2 -2
- package/build-module/archives/edit.mjs.map +2 -2
- package/build-module/audio/block.json +8 -0
- package/build-module/audio/edit.mjs +2 -2
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/avatar/hooks.mjs.map +2 -2
- package/build-module/breadcrumbs/block.json +3 -0
- package/build-module/breadcrumbs/edit.mjs +3 -3
- package/build-module/breadcrumbs/edit.mjs.map +2 -2
- package/build-module/button/edit.mjs.map +2 -2
- package/build-module/buttons/block.json +9 -0
- package/build-module/categories/block.json +12 -1
- package/build-module/categories/edit.mjs +2 -2
- package/build-module/categories/edit.mjs.map +2 -2
- package/build-module/code/block.json +10 -0
- package/build-module/code/save.mjs.map +2 -2
- package/build-module/column/block.json +9 -0
- package/build-module/columns/block.json +9 -0
- package/build-module/comment-author-name/block.json +3 -0
- package/build-module/comment-content/block.json +5 -0
- package/build-module/comment-date/block.json +3 -0
- package/build-module/comment-edit-link/block.json +3 -0
- package/build-module/comment-reply-link/block.json +3 -0
- package/build-module/comment-template/hooks.mjs.map +2 -2
- package/build-module/comments/block.json +10 -0
- package/build-module/comments-pagination/block.json +3 -0
- package/build-module/comments-pagination-next/block.json +3 -0
- package/build-module/comments-pagination-numbers/block.json +3 -0
- package/build-module/comments-pagination-previous/block.json +6 -0
- package/build-module/comments-title/block.json +3 -0
- package/build-module/cover/edit/index.mjs +4 -1
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +57 -14
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/cover/transforms.mjs.map +2 -2
- package/build-module/details/block.json +12 -0
- package/build-module/details/index.mjs.map +2 -2
- package/build-module/embed/embed-controls.mjs.map +2 -2
- package/build-module/file/block.json +9 -0
- package/build-module/file/deprecated.mjs.map +2 -2
- package/build-module/file/edit.mjs.map +2 -2
- package/build-module/file/inspector.mjs +2 -2
- package/build-module/file/inspector.mjs.map +2 -2
- package/build-module/file/save.mjs.map +2 -2
- package/build-module/footnotes/block.json +10 -0
- package/build-module/footnotes/edit.mjs.map +2 -2
- package/build-module/gallery/block.json +9 -0
- package/build-module/gallery/dynamic-gallery.mjs +2 -2
- package/build-module/gallery/dynamic-gallery.mjs.map +2 -2
- package/build-module/gallery/edit.mjs +68 -42
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/gallery/{flex-styles.mjs → gallery-styles.mjs} +29 -30
- package/build-module/gallery/gallery-styles.mjs.map +7 -0
- package/build-module/gallery/responsive-styles.mjs +25 -4
- package/build-module/gallery/responsive-styles.mjs.map +2 -2
- package/build-module/group/block.json +1 -0
- package/build-module/heading/block.json +11 -0
- package/build-module/heading/index.mjs.map +2 -2
- package/build-module/home-link/block.json +18 -0
- package/build-module/home-link/edit.mjs +2 -2
- package/build-module/home-link/edit.mjs.map +2 -2
- package/build-module/html/modal.mjs +3 -6
- package/build-module/html/modal.mjs.map +2 -2
- package/build-module/image/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +12 -10
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +20 -0
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/index.mjs.map +2 -2
- package/build-module/latest-comments/block.json +10 -0
- package/build-module/latest-comments/edit.mjs +2 -2
- package/build-module/latest-comments/edit.mjs.map +2 -2
- package/build-module/latest-posts/block.json +10 -0
- package/build-module/latest-posts/edit.mjs.map +2 -2
- package/build-module/list/ordered-list-settings.mjs +2 -2
- package/build-module/list/ordered-list-settings.mjs.map +2 -2
- package/build-module/list-item/hooks/use-enter.mjs.map +2 -2
- package/build-module/loginout/block.json +10 -0
- package/build-module/math/block.json +12 -0
- package/build-module/math/deprecated.mjs +29 -12
- package/build-module/math/deprecated.mjs.map +2 -2
- package/build-module/math/edit.mjs +68 -47
- package/build-module/math/edit.mjs.map +2 -2
- package/build-module/math/save.mjs +2 -2
- package/build-module/math/save.mjs.map +2 -2
- package/build-module/media-text/block.json +1 -0
- package/build-module/media-text/constants.mjs +2 -0
- package/build-module/media-text/constants.mjs.map +2 -2
- package/build-module/media-text/deprecated.mjs.map +2 -2
- package/build-module/media-text/edit.mjs +42 -1
- package/build-module/media-text/edit.mjs.map +2 -2
- package/build-module/media-text/image-fill.mjs.map +2 -2
- package/build-module/media-text/media-container.mjs +1 -1
- package/build-module/media-text/media-container.mjs.map +2 -2
- package/build-module/navigation/edit/index.mjs +1 -4
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation/edit/menu-inspector-controls.mjs.map +2 -2
- package/build-module/navigation/edit/overlay-template-part-selector.mjs +2 -2
- package/build-module/navigation/edit/overlay-template-part-selector.mjs.map +2 -2
- package/build-module/navigation/edit/responsive-wrapper.mjs.map +2 -2
- package/build-module/navigation/edit/use-generate-default-navigation-title.mjs.map +2 -2
- package/build-module/navigation/view.mjs +2 -2
- package/build-module/navigation/view.mjs.map +2 -2
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-link/link-ui/page-creator.mjs +2 -2
- package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
- package/build-module/navigation-link/shared/controls.mjs +2 -2
- package/build-module/navigation-link/shared/controls.mjs.map +2 -2
- package/build-module/navigation-link/shared/invalid-draft-display.mjs.map +2 -2
- package/build-module/navigation-link/shared/use-link-preview.mjs +13 -13
- package/build-module/navigation-link/shared/use-link-preview.mjs.map +2 -2
- package/build-module/navigation-overlay-close/block.json +7 -0
- package/build-module/navigation-submenu/block.json +6 -0
- package/build-module/navigation-submenu/edit.mjs +11 -2
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/page-list/block.json +10 -0
- package/build-module/paragraph/block.json +1 -0
- package/build-module/paragraph/edit.mjs +1 -2
- package/build-module/paragraph/edit.mjs.map +2 -2
- package/build-module/paragraph/index.mjs +6 -0
- package/build-module/paragraph/index.mjs.map +2 -2
- package/build-module/playlist/block.json +1 -0
- package/build-module/playlist/edit.mjs +5 -4
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/post-author/edit.mjs +2 -2
- package/build-module/post-author/edit.mjs.map +2 -2
- package/build-module/post-author-biography/block.json +4 -0
- package/build-module/post-author-name/block.json +5 -0
- package/build-module/post-author-name/edit.mjs.map +2 -2
- package/build-module/post-comments-count/block.json +3 -0
- package/build-module/post-comments-form/block.json +10 -0
- package/build-module/post-content/block.json +3 -0
- package/build-module/post-date/block.json +3 -0
- package/build-module/post-date/edit.mjs.map +2 -2
- package/build-module/post-excerpt/block.json +6 -0
- package/build-module/post-excerpt/edit.mjs.map +2 -2
- package/build-module/post-featured-image/edit.mjs +11 -9
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-navigation-link/block.json +30 -0
- package/build-module/post-navigation-link/edit.mjs +19 -5
- package/build-module/post-navigation-link/edit.mjs.map +2 -2
- package/build-module/post-template/block.json +13 -1
- package/build-module/post-terms/block.json +6 -0
- package/build-module/post-time-to-read/block.json +6 -0
- package/build-module/post-time-to-read/edit.mjs.map +2 -2
- package/build-module/post-title/block.json +10 -0
- package/build-module/preformatted/block.json +7 -0
- package/build-module/pullquote/block.json +1 -0
- package/build-module/pullquote/deprecated.mjs.map +2 -2
- package/build-module/query/deprecated.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/index.mjs +2 -2
- package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/order-control.mjs +2 -2
- package/build-module/query/edit/inspector-controls/order-control.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/sticky-control.mjs +2 -2
- package/build-module/query/edit/inspector-controls/sticky-control.mjs.map +2 -2
- package/build-module/query/view.mjs.map +2 -2
- package/build-module/query-no-results/block.json +10 -2
- package/build-module/query-pagination/block.json +3 -0
- package/build-module/query-pagination-next/block.json +3 -0
- package/build-module/query-pagination-numbers/block.json +3 -0
- package/build-module/query-pagination-previous/block.json +3 -0
- package/build-module/query-title/block.json +3 -0
- package/build-module/query-title/use-archive-label.mjs.map +2 -2
- package/build-module/query-total/block.json +6 -0
- package/build-module/quote/block.json +1 -0
- package/build-module/quote/deprecated.mjs.map +2 -2
- package/build-module/quote/transforms.mjs.map +2 -2
- package/build-module/read-more/block.json +6 -0
- package/build-module/rss/block.json +6 -0
- package/build-module/search/edit.mjs +3 -3
- package/build-module/search/edit.mjs.map +2 -2
- package/build-module/separator/edit.mjs +5 -2
- package/build-module/separator/edit.mjs.map +2 -2
- package/build-module/site-tagline/block.json +8 -1
- package/build-module/site-title/block.json +7 -1
- package/build-module/social-links/block.json +3 -0
- package/build-module/social-links/edit.mjs +4 -5
- package/build-module/social-links/edit.mjs.map +2 -2
- package/build-module/tab-panel/block.json +25 -0
- package/build-module/tab-panel/controls.mjs +2 -2
- package/build-module/tab-panel/controls.mjs.map +2 -2
- package/build-module/tab-panels/block.json +18 -1
- package/build-module/table/state.mjs.map +2 -2
- package/build-module/table-of-contents/block.json +7 -0
- package/build-module/table-of-contents/edit.mjs +2 -2
- package/build-module/table-of-contents/edit.mjs.map +2 -2
- package/build-module/table-of-contents/utils.mjs.map +2 -2
- package/build-module/tabs/block.json +24 -1
- package/build-module/tabs/use-tab-actions.mjs.map +2 -2
- package/build-module/tag-cloud/block.json +19 -0
- package/build-module/tag-cloud/edit.mjs +2 -2
- package/build-module/tag-cloud/edit.mjs.map +2 -2
- package/build-module/template-part/edit/advanced-controls.mjs +5 -2
- package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
- package/build-module/template-part/edit/import-controls.mjs +2 -2
- package/build-module/template-part/edit/import-controls.mjs.map +2 -2
- package/build-module/template-part/edit/index.mjs.map +2 -2
- package/build-module/template-part/edit/inner-blocks.mjs.map +2 -2
- package/build-module/template-part/edit/placeholder.mjs.map +2 -2
- package/build-module/template-part/edit/selection-modal.mjs.map +1 -1
- package/build-module/term-count/block.json +7 -0
- package/build-module/term-count/use-term-count.mjs.map +2 -2
- package/build-module/term-description/block.json +9 -0
- package/build-module/term-description/use-term-description.mjs.map +2 -2
- package/build-module/term-name/block.json +10 -0
- package/build-module/term-name/use-term-name.mjs.map +2 -2
- package/build-module/term-template/block.json +10 -1
- package/build-module/terms-query/edit/inspector-controls/index.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/inherit-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/order-control.mjs +2 -2
- package/build-module/terms-query/edit/inspector-controls/order-control.mjs.map +2 -2
- package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs +2 -2
- package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs.map +2 -2
- package/build-module/utils/hooks.mjs.map +2 -2
- package/build-module/utils/media-control.mjs +5 -1
- package/build-module/utils/media-control.mjs.map +2 -2
- package/build-module/utils/poster-image.mjs.map +2 -2
- package/build-module/utils/search-patterns.mjs +7 -32
- package/build-module/utils/search-patterns.mjs.map +2 -2
- package/build-module/utils/style-state.mjs +6 -4
- package/build-module/utils/style-state.mjs.map +2 -2
- package/build-module/verse/block.json +1 -0
- package/build-module/video/block.json +6 -0
- package/build-module/video/edit-common-settings.mjs +2 -2
- package/build-module/video/edit-common-settings.mjs.map +2 -2
- package/build-module/video/edit.mjs +25 -16
- package/build-module/video/edit.mjs.map +2 -2
- package/build-module/video/index.mjs +0 -2
- package/build-module/video/index.mjs.map +2 -2
- package/build-module/video/save.mjs +7 -2
- package/build-module/video/save.mjs.map +2 -2
- package/build-module/video/tracks-editor.mjs +2 -2
- package/build-module/video/tracks-editor.mjs.map +2 -2
- package/build-style/button/style-rtl.css +2 -1
- package/build-style/button/style.css +2 -1
- package/build-style/columns/style-rtl.css +1 -1
- package/build-style/columns/style.css +1 -1
- package/build-style/comments/editor-rtl.css +1 -1
- package/build-style/comments/editor.css +1 -1
- package/build-style/comments/style-rtl.css +1 -1
- package/build-style/comments/style.css +1 -1
- package/build-style/common-rtl.css +1 -1
- package/build-style/common.css +1 -1
- package/build-style/cover/style-rtl.css +6 -0
- package/build-style/cover/style.css +6 -0
- package/build-style/editor-rtl.css +21 -7
- package/build-style/editor.css +21 -7
- package/build-style/embed/editor-rtl.css +2 -1
- package/build-style/embed/editor.css +2 -1
- package/build-style/gallery/style-rtl.css +1 -2
- package/build-style/gallery/style.css +1 -2
- package/build-style/image/editor-rtl.css +6 -0
- package/build-style/image/editor.css +6 -0
- package/build-style/image/style-rtl.css +6 -9
- package/build-style/image/style.css +6 -9
- package/build-style/math/editor-rtl.css +5 -0
- package/build-style/math/editor.css +5 -0
- package/build-style/navigation/editor-rtl.css +1 -0
- package/build-style/navigation/editor.css +1 -0
- package/build-style/navigation/style-rtl.css +19 -4
- package/build-style/navigation/style.css +19 -4
- package/build-style/navigation-link/editor-rtl.css +3 -1
- package/build-style/navigation-link/editor.css +3 -1
- package/build-style/navigation-overlay-close/style-rtl.css +1 -1
- package/build-style/navigation-overlay-close/style.css +1 -1
- package/build-style/navigation-submenu/editor-rtl.css +3 -1
- package/build-style/navigation-submenu/editor.css +3 -1
- 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-title/style-rtl.css +2 -2
- package/build-style/post-title/style.css +2 -2
- package/build-style/query-pagination/editor-rtl.css +0 -3
- package/build-style/query-pagination/editor.css +0 -3
- package/build-style/search/theme-rtl.css +1 -1
- package/build-style/search/theme.css +1 -1
- package/build-style/style-rtl.css +47 -23
- package/build-style/style.css +47 -23
- package/build-style/tab-panel/style-rtl.css +2 -0
- package/build-style/tab-panel/style.css +2 -0
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/build-style/verse/style-rtl.css +2 -1
- package/build-style/verse/style.css +2 -1
- package/package.json +42 -43
- package/src/accordion/README.md +3 -0
- package/src/accordion/block.json +4 -1
- package/src/accordion-item/README.md +5 -0
- package/src/accordion-item/block.json +7 -1
- package/src/accordion-panel/README.md +7 -0
- package/src/accordion-panel/block.json +9 -1
- package/src/archives/README.md +4 -0
- package/src/archives/block.json +9 -0
- package/src/archives/edit.jsx +2 -2
- package/src/audio/README.md +4 -0
- package/src/audio/block.json +8 -0
- package/src/audio/edit.jsx +2 -2
- package/src/avatar/hooks.js +2 -2
- package/src/breadcrumbs/README.md +2 -0
- package/src/breadcrumbs/block.json +3 -0
- package/src/breadcrumbs/edit.jsx +3 -3
- package/src/breadcrumbs/index.php +1 -1
- package/src/button/edit.jsx +1 -1
- package/src/button/style.scss +2 -2
- package/src/buttons/README.md +4 -0
- package/src/buttons/block.json +9 -0
- package/src/calendar/index.php +1 -1
- package/src/categories/README.md +6 -0
- package/src/categories/block.json +12 -1
- package/src/categories/edit.jsx +2 -2
- package/src/code/README.md +5 -0
- package/src/code/block.json +10 -0
- package/src/code/save.jsx +1 -1
- package/src/column/README.md +4 -0
- package/src/column/block.json +9 -0
- package/src/columns/README.md +4 -0
- package/src/columns/block.json +9 -0
- package/src/columns/style.scss +2 -3
- package/src/comment-author-name/README.md +2 -0
- package/src/comment-author-name/block.json +3 -0
- package/src/comment-content/README.md +4 -0
- package/src/comment-content/block.json +5 -0
- package/src/comment-date/README.md +2 -0
- package/src/comment-date/block.json +3 -0
- package/src/comment-edit-link/README.md +2 -0
- package/src/comment-edit-link/block.json +3 -0
- package/src/comment-reply-link/README.md +2 -0
- package/src/comment-reply-link/block.json +3 -0
- package/src/comment-template/hooks.js +1 -1
- package/src/comments/README.md +5 -0
- package/src/comments/block.json +10 -0
- package/src/comments/style.scss +1 -1
- package/src/comments-pagination/README.md +2 -0
- package/src/comments-pagination/block.json +3 -0
- package/src/comments-pagination-next/README.md +2 -0
- package/src/comments-pagination-next/block.json +3 -0
- package/src/comments-pagination-numbers/README.md +2 -0
- package/src/comments-pagination-numbers/block.json +3 -0
- package/src/comments-pagination-previous/README.md +2 -0
- package/src/comments-pagination-previous/block.json +6 -0
- package/src/comments-title/README.md +2 -0
- package/src/comments-title/block.json +3 -0
- package/src/common.scss +1 -2
- package/src/cover/edit/index.jsx +5 -2
- package/src/cover/edit/inspector-controls.jsx +66 -15
- package/src/cover/style.scss +10 -0
- package/src/cover/test/{edit.jsdom.test.js → edit.browser.test.js} +122 -147
- package/src/cover/transforms.js +3 -3
- package/src/details/README.md +7 -0
- package/src/details/block.json +12 -0
- package/src/details/index.js +1 -1
- package/src/embed/editor.scss +2 -2
- package/src/embed/embed-controls.jsx +2 -2
- package/src/file/README.md +4 -0
- package/src/file/block.json +9 -0
- package/src/file/deprecated.jsx +3 -3
- package/src/file/edit.jsx +5 -3
- package/src/file/inspector.jsx +3 -3
- package/src/file/save.jsx +2 -2
- package/src/footnotes/README.md +5 -0
- package/src/footnotes/block.json +10 -0
- package/src/footnotes/edit.jsx +1 -1
- package/src/gallery/README.md +4 -0
- package/src/gallery/block.json +9 -0
- package/src/gallery/dynamic-gallery.jsx +4 -4
- package/src/gallery/edit.jsx +122 -70
- package/src/gallery/gallery-styles.js +117 -0
- package/src/gallery/index.php +181 -67
- package/src/gallery/responsive-styles.js +59 -5
- package/src/gallery/test/edit.jsdom.test.js +71 -3
- package/src/gallery/test/responsive-styles.js +59 -5
- package/src/group/README.md +1 -0
- package/src/group/block.json +1 -0
- package/src/heading/README.md +6 -0
- package/src/heading/block.json +11 -0
- package/src/heading/index.js +2 -2
- package/src/home-link/README.md +5 -0
- package/src/home-link/block.json +18 -0
- package/src/home-link/edit.jsx +2 -2
- package/src/html/modal.jsx +0 -3
- package/src/icon/index.php +9 -0
- package/src/image/edit.jsx +1 -1
- package/src/image/editor.scss +8 -0
- package/src/image/image.jsx +20 -18
- package/src/image/index.php +10 -4
- package/src/image/style.scss +1 -0
- package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +140 -1
- package/src/image/use-open-image-media-editor-modal.js +37 -0
- package/src/index.jsx +1 -1
- package/src/latest-comments/README.md +5 -0
- package/src/latest-comments/block.json +10 -0
- package/src/latest-comments/edit.jsx +2 -2
- package/src/latest-posts/README.md +5 -0
- package/src/latest-posts/block.json +10 -0
- package/src/latest-posts/edit.jsx +1 -1
- package/src/list/ordered-list-settings.jsx +2 -2
- package/src/list-item/hooks/use-enter.js +1 -1
- package/src/loginout/README.md +5 -0
- package/src/loginout/block.json +10 -0
- package/src/math/README.md +7 -2
- package/src/math/block.json +12 -0
- package/src/math/deprecated.jsx +38 -12
- package/src/math/edit.jsx +49 -20
- package/src/math/editor.scss +5 -0
- package/src/math/save.jsx +20 -4
- package/src/media-text/README.md +1 -0
- package/src/media-text/block.json +1 -0
- package/src/media-text/constants.js +1 -0
- package/src/media-text/deprecated.jsx +3 -3
- package/src/media-text/edit.jsx +48 -3
- package/src/media-text/image-fill.js +2 -2
- package/src/media-text/media-container.jsx +1 -1
- package/src/navigation/edit/index.jsx +3 -5
- package/src/navigation/edit/menu-inspector-controls.jsx +2 -2
- package/src/navigation/edit/overlay-template-part-selector.jsx +3 -3
- package/src/navigation/edit/responsive-wrapper.jsx +1 -1
- package/src/navigation/edit/use-generate-default-navigation-title.js +2 -2
- package/src/navigation/editor.scss +1 -0
- package/src/navigation/index.php +12 -0
- package/src/navigation/style.scss +41 -5
- package/src/navigation/test/use-navigation-menu.jsdom.test.js +6 -28
- package/src/navigation/test/view.jsdom.test.js +23 -0
- package/src/navigation/view.js +9 -6
- package/src/navigation-link/edit.jsx +1 -1
- package/src/navigation-link/editor.scss +6 -1
- package/src/navigation-link/link-ui/page-creator.jsx +2 -2
- package/src/navigation-link/shared/controls.jsx +2 -2
- package/src/navigation-link/shared/invalid-draft-display.jsx +2 -2
- package/src/navigation-link/shared/test/use-link-preview.jsdom.test.js +22 -22
- package/src/navigation-link/shared/use-link-preview.js +15 -14
- package/src/navigation-link/test/__snapshots__/hooks.jsdom.test.js.snap +41 -11
- package/src/navigation-overlay-close/README.md +1 -0
- package/src/navigation-overlay-close/block.json +7 -0
- package/src/navigation-overlay-close/style.scss +1 -1
- package/src/navigation-submenu/README.md +7 -0
- package/src/navigation-submenu/block.json +6 -0
- package/src/navigation-submenu/edit.jsx +12 -2
- package/src/navigation-submenu/editor.scss +6 -1
- package/src/navigation-submenu/index.php +11 -0
- package/src/page-list/README.md +5 -0
- package/src/page-list/block.json +10 -0
- package/src/paragraph/README.md +1 -0
- package/src/paragraph/block.json +1 -0
- package/src/paragraph/edit.jsx +2 -4
- package/src/paragraph/index.js +7 -0
- package/src/pattern/index.php +2 -2
- package/src/playlist/README.md +1 -0
- package/src/playlist/block.json +1 -0
- package/src/playlist/edit.jsx +6 -4
- package/src/playlist-track/test/edit.jsdom.test.jsx +2 -3
- package/src/post-author/edit.jsx +2 -2
- package/src/post-author-biography/README.md +3 -0
- package/src/post-author-biography/block.json +4 -0
- package/src/post-author-name/README.md +4 -0
- package/src/post-author-name/block.json +5 -0
- package/src/post-author-name/edit.jsx +1 -1
- package/src/post-comments-count/README.md +2 -0
- package/src/post-comments-count/block.json +3 -0
- package/src/post-comments-form/README.md +5 -0
- package/src/post-comments-form/block.json +10 -0
- package/src/post-content/README.md +3 -0
- package/src/post-content/block.json +3 -0
- package/src/post-date/README.md +2 -0
- package/src/post-date/block.json +3 -0
- package/src/post-date/edit.jsx +2 -2
- package/src/post-excerpt/README.md +5 -0
- package/src/post-excerpt/block.json +6 -0
- package/src/post-excerpt/edit.jsx +1 -1
- package/src/post-featured-image/edit.jsx +13 -11
- package/src/post-navigation-link/README.md +12 -0
- package/src/post-navigation-link/block.json +30 -0
- package/src/post-navigation-link/edit.jsx +27 -6
- package/src/post-navigation-link/index.php +94 -5
- package/src/post-navigation-link/style.scss +2 -0
- package/src/post-template/README.md +7 -0
- package/src/post-template/block.json +13 -1
- package/src/post-terms/README.md +5 -0
- package/src/post-terms/block.json +6 -0
- package/src/post-time-to-read/README.md +5 -0
- package/src/post-time-to-read/block.json +6 -0
- package/src/post-time-to-read/edit.jsx +2 -2
- package/src/post-title/README.md +5 -0
- package/src/post-title/block.json +10 -0
- package/src/post-title/style.scss +2 -3
- package/src/preformatted/README.md +6 -0
- package/src/preformatted/block.json +7 -0
- package/src/pullquote/README.md +1 -0
- package/src/pullquote/block.json +1 -0
- package/src/pullquote/deprecated.jsx +1 -1
- package/src/query/deprecated.jsx +1 -1
- package/src/query/edit/inspector-controls/index.jsx +4 -4
- package/src/query/edit/inspector-controls/order-control.jsx +2 -2
- package/src/query/edit/inspector-controls/sticky-control.jsx +2 -2
- package/src/query/view.js +6 -9
- package/src/query-no-results/README.md +7 -0
- package/src/query-no-results/block.json +10 -2
- package/src/query-pagination/README.md +2 -0
- package/src/query-pagination/block.json +3 -0
- package/src/query-pagination/editor.scss +0 -3
- package/src/query-pagination-next/README.md +2 -0
- package/src/query-pagination-next/block.json +3 -0
- package/src/query-pagination-numbers/README.md +2 -0
- package/src/query-pagination-numbers/block.json +3 -0
- package/src/query-pagination-previous/README.md +2 -0
- package/src/query-pagination-previous/block.json +3 -0
- package/src/query-title/README.md +2 -0
- package/src/query-title/block.json +3 -0
- package/src/query-title/use-archive-label.js +1 -1
- package/src/query-total/README.md +5 -0
- package/src/query-total/block.json +6 -0
- package/src/quote/README.md +1 -0
- package/src/quote/block.json +1 -0
- package/src/quote/deprecated.jsx +2 -2
- package/src/quote/transforms.js +3 -3
- package/src/read-more/README.md +5 -0
- package/src/read-more/block.json +6 -0
- package/src/rss/README.md +5 -0
- package/src/rss/block.json +6 -0
- package/src/search/edit.jsx +6 -6
- package/src/search/theme.scss +1 -1
- package/src/separator/edit.jsx +7 -4
- package/src/site-tagline/README.md +6 -0
- package/src/site-tagline/block.json +8 -1
- package/src/site-title/README.md +5 -0
- package/src/site-title/block.json +7 -1
- package/src/social-links/README.md +2 -0
- package/src/social-links/block.json +3 -0
- package/src/social-links/edit.jsx +4 -5
- package/src/tab-panel/README.md +9 -0
- package/src/tab-panel/block.json +25 -0
- package/src/tab-panel/controls.jsx +2 -2
- package/src/tab-panel/style.scss +5 -2
- package/src/tab-panels/README.md +7 -0
- package/src/tab-panels/block.json +18 -1
- package/src/table/state.js +1 -1
- package/src/table-of-contents/README.md +6 -0
- package/src/table-of-contents/block.json +7 -0
- package/src/table-of-contents/edit.jsx +6 -6
- package/src/table-of-contents/utils.ts +2 -2
- package/src/tabs/README.md +9 -0
- package/src/tabs/block.json +24 -1
- package/src/tabs/use-tab-actions.js +1 -1
- package/src/tag-cloud/README.md +9 -0
- package/src/tag-cloud/block.json +19 -0
- package/src/tag-cloud/edit.jsx +2 -2
- package/src/template-part/edit/advanced-controls.jsx +5 -2
- package/src/template-part/edit/import-controls.jsx +2 -2
- package/src/template-part/edit/index.jsx +2 -2
- package/src/template-part/edit/inner-blocks.jsx +1 -1
- package/src/template-part/edit/placeholder.jsx +2 -2
- package/src/template-part/edit/selection-modal.jsx +1 -1
- package/src/term-count/README.md +6 -0
- package/src/term-count/block.json +7 -0
- package/src/term-count/use-term-count.js +1 -1
- package/src/term-description/README.md +5 -0
- package/src/term-description/block.json +9 -0
- package/src/term-description/use-term-description.js +1 -1
- package/src/term-name/README.md +5 -0
- package/src/term-name/block.json +10 -0
- package/src/term-name/index.php +1 -1
- package/src/term-name/use-term-name.js +1 -1
- package/src/term-template/README.md +5 -0
- package/src/term-template/block.json +10 -1
- package/src/terms-query/edit/inspector-controls/index.jsx +2 -2
- package/src/terms-query/edit/inspector-controls/inherit-control.jsx +1 -1
- package/src/terms-query/edit/inspector-controls/order-control.jsx +2 -2
- package/src/terms-query/edit/inspector-controls/taxonomy-control.jsx +2 -2
- package/src/utils/hooks.js +1 -1
- package/src/utils/media-control.jsx +16 -10
- package/src/utils/poster-image.jsx +2 -2
- package/src/utils/search-patterns.js +9 -53
- package/src/utils/style-state.js +6 -4
- package/src/utils/test/{search-patterns.js → search-patterns.jsdom.test.js} +1 -22
- package/src/utils/test/waveform-player.jsdom.test.jsx +36 -38
- package/src/utils/test/{waveform-utils.jsdom.test.js → waveform-utils.browser.test.js} +64 -44
- package/src/verse/README.md +1 -0
- package/src/verse/block.json +1 -0
- package/src/verse/style.scss +2 -2
- package/src/video/README.md +7 -0
- package/src/video/block.json +6 -0
- package/src/video/edit-common-settings.jsx +3 -3
- package/src/video/edit.jsx +56 -51
- package/src/video/index.js +0 -2
- package/src/video/save.jsx +10 -1
- package/src/video/tracks-editor.jsx +2 -2
- package/build/gallery/flex-styles.cjs.map +0 -7
- package/build/video/variations.cjs +0 -75
- package/build/video/variations.cjs.map +0 -7
- package/build-module/gallery/flex-styles.mjs.map +0 -7
- package/build-module/video/variations.mjs +0 -50
- package/build-module/video/variations.mjs.map +0 -7
- package/src/gallery/flex-styles.js +0 -99
- package/src/video/test/variations.js +0 -63
- package/src/video/variations.js +0 -62
package/src/heading/index.js
CHANGED
|
@@ -48,13 +48,13 @@ export const settings = {
|
|
|
48
48
|
/* translators: accessibility text. %s: heading level. */
|
|
49
49
|
__( 'Level %s. Empty.' ),
|
|
50
50
|
level
|
|
51
|
-
|
|
51
|
+
)
|
|
52
52
|
: sprintf(
|
|
53
53
|
/* translators: accessibility text. 1: heading level. 2: heading content. */
|
|
54
54
|
__( 'Level %1$s. %2$s' ),
|
|
55
55
|
level,
|
|
56
56
|
content
|
|
57
|
-
|
|
57
|
+
);
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
transforms,
|
package/src/home-link/README.md
CHANGED
|
@@ -30,9 +30,14 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
30
30
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
31
31
|
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
32
32
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
33
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
34
|
+
- `backgroundImage`: `true`
|
|
35
|
+
- `backgroundSize`: `true`
|
|
36
|
+
- `gradient`: `true`
|
|
33
37
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
34
38
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
35
39
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
40
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
36
41
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
37
42
|
- `clientNavigation`: `true`
|
|
38
43
|
|
package/src/home-link/block.json
CHANGED
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
"anchor": true,
|
|
34
34
|
"reusable": false,
|
|
35
35
|
"html": false,
|
|
36
|
+
"background": {
|
|
37
|
+
"backgroundImage": true,
|
|
38
|
+
"backgroundSize": true,
|
|
39
|
+
"gradient": true
|
|
40
|
+
},
|
|
36
41
|
"typography": {
|
|
37
42
|
"fontSize": true,
|
|
38
43
|
"lineHeight": true,
|
|
@@ -46,6 +51,19 @@
|
|
|
46
51
|
"fontSize": true
|
|
47
52
|
}
|
|
48
53
|
},
|
|
54
|
+
"shadow": true,
|
|
55
|
+
"__experimentalBorder": {
|
|
56
|
+
"color": true,
|
|
57
|
+
"radius": true,
|
|
58
|
+
"style": true,
|
|
59
|
+
"width": true,
|
|
60
|
+
"__experimentalDefaultControls": {
|
|
61
|
+
"color": false,
|
|
62
|
+
"radius": false,
|
|
63
|
+
"style": false,
|
|
64
|
+
"width": false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
49
67
|
"interactivity": {
|
|
50
68
|
"clientNavigation": true
|
|
51
69
|
}
|
package/src/home-link/edit.jsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '@wordpress/block-editor';
|
|
8
8
|
import {
|
|
9
9
|
Button,
|
|
10
|
-
CheckboxControl,
|
|
10
|
+
CheckboxControl as WCCheckboxControl,
|
|
11
11
|
TextControl,
|
|
12
12
|
TextareaControl as WCTextareaControl,
|
|
13
13
|
__experimentalToolsPanel as ToolsPanel,
|
|
@@ -113,7 +113,7 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
|
|
|
113
113
|
}
|
|
114
114
|
isShownByDefault
|
|
115
115
|
>
|
|
116
|
-
<
|
|
116
|
+
<WCCheckboxControl
|
|
117
117
|
label={ __( 'Open in new tab' ) }
|
|
118
118
|
checked={ opensInNewTab }
|
|
119
119
|
onChange={ ( value ) =>
|
package/src/html/modal.jsx
CHANGED
|
@@ -148,7 +148,6 @@ export default function HTMLEditModal( { onRequestClose, content, onUpdate } ) {
|
|
|
148
148
|
placeholder={ __( 'Write HTML…' ) }
|
|
149
149
|
aria-label={ __( 'HTML' ) }
|
|
150
150
|
className="block-library-html__modal-editor"
|
|
151
|
-
async
|
|
152
151
|
/>
|
|
153
152
|
</Tabs.TabPanel>
|
|
154
153
|
{ canUserUseUnfilteredHTML && (
|
|
@@ -163,7 +162,6 @@ export default function HTMLEditModal( { onRequestClose, content, onUpdate } ) {
|
|
|
163
162
|
placeholder={ __( 'Write CSS…' ) }
|
|
164
163
|
aria-label={ __( 'CSS' ) }
|
|
165
164
|
className="block-library-html__modal-editor"
|
|
166
|
-
async
|
|
167
165
|
/>
|
|
168
166
|
</Tabs.TabPanel>
|
|
169
167
|
) }
|
|
@@ -181,7 +179,6 @@ export default function HTMLEditModal( { onRequestClose, content, onUpdate } ) {
|
|
|
181
179
|
) }
|
|
182
180
|
aria-label={ __( 'JavaScript' ) }
|
|
183
181
|
className="block-library-html__modal-editor"
|
|
184
|
-
async
|
|
185
182
|
/>
|
|
186
183
|
</Tabs.TabPanel>
|
|
187
184
|
) }
|
package/src/icon/index.php
CHANGED
|
@@ -19,6 +19,15 @@ function render_block_core_icon( $attributes ) {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Icons in non-public collections are not available in the editor, so do not render them either.
|
|
23
|
+
$registered_icon = WP_Icons_Registry::get_instance()->get_registered_icon( $attributes['icon'] );
|
|
24
|
+
if ( null !== $registered_icon ) {
|
|
25
|
+
$icon_collection = WP_Icon_Collections_Registry::get_instance()->get_registered( $registered_icon['collection'] );
|
|
26
|
+
if ( null !== $icon_collection && ! $icon_collection['public'] ) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
// Text color and background color.
|
|
23
32
|
$color_styles = array();
|
|
24
33
|
|
package/src/image/edit.jsx
CHANGED
package/src/image/editor.scss
CHANGED
|
@@ -47,6 +47,14 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
47
47
|
transform: translate(-50%, -50%);
|
|
48
48
|
margin: 0;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
.components-resizable-box__container {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.components-resizable-box__handle {
|
|
56
|
+
pointer-events: auto;
|
|
57
|
+
}
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
// Shown while image is being uploaded but cannot be previewed.
|
package/src/image/image.jsx
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Spinner,
|
|
7
7
|
TextareaControl as WCTextareaControl,
|
|
8
8
|
TextControl,
|
|
9
|
-
CheckboxControl,
|
|
9
|
+
CheckboxControl as WCCheckboxControl,
|
|
10
10
|
ToolbarButton,
|
|
11
11
|
ToolbarGroup,
|
|
12
12
|
__experimentalToolsPanel as ToolsPanel,
|
|
@@ -73,7 +73,6 @@ import { evalAspectRatio, mediaPosition } from './utils';
|
|
|
73
73
|
|
|
74
74
|
const {
|
|
75
75
|
DimensionsTool,
|
|
76
|
-
isDefaultBlockStyleState,
|
|
77
76
|
ResolutionTool,
|
|
78
77
|
mediaEditKey,
|
|
79
78
|
mediaSideloadFromUrlKey,
|
|
@@ -331,7 +330,7 @@ export default function Image( {
|
|
|
331
330
|
'attachment',
|
|
332
331
|
id,
|
|
333
332
|
{ context: 'view' }
|
|
334
|
-
|
|
333
|
+
)
|
|
335
334
|
: null;
|
|
336
335
|
|
|
337
336
|
// Check if the attachment resolution failed with a specific error.
|
|
@@ -348,7 +347,7 @@ export default function Image( {
|
|
|
348
347
|
id,
|
|
349
348
|
{ context: 'view' },
|
|
350
349
|
]
|
|
351
|
-
|
|
350
|
+
)
|
|
352
351
|
: null;
|
|
353
352
|
|
|
354
353
|
return {
|
|
@@ -666,20 +665,23 @@ export default function Image( {
|
|
|
666
665
|
|
|
667
666
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
668
667
|
|
|
669
|
-
const selectedStyleState = useSelect(
|
|
668
|
+
const { selectedStyleState, hasSelectedStyleState } = useSelect(
|
|
670
669
|
( select ) => {
|
|
671
670
|
if ( ! isSingleSelected ) {
|
|
672
|
-
return
|
|
671
|
+
return {
|
|
672
|
+
selectedStyleState: undefined,
|
|
673
|
+
hasSelectedStyleState: false,
|
|
674
|
+
};
|
|
673
675
|
}
|
|
674
|
-
const { getSelectedBlockStyleState } =
|
|
675
|
-
select( blockEditorStore )
|
|
676
|
-
|
|
677
|
-
|
|
676
|
+
const { getSelectedBlockStyleState, hasSelectedBlockStyleState } =
|
|
677
|
+
select( blockEditorStore );
|
|
678
|
+
return {
|
|
679
|
+
selectedStyleState: getSelectedBlockStyleState( clientId ),
|
|
680
|
+
hasSelectedStyleState: hasSelectedBlockStyleState( clientId ),
|
|
681
|
+
};
|
|
678
682
|
},
|
|
679
683
|
[ clientId, isSingleSelected ]
|
|
680
684
|
);
|
|
681
|
-
const hasSelectedStyleState =
|
|
682
|
-
! isDefaultBlockStyleState( selectedStyleState );
|
|
683
685
|
const selectedStyleStateKey = getStyleStateKey( selectedStyleState );
|
|
684
686
|
const activeWidth = getActiveDimensionValue( {
|
|
685
687
|
attributes,
|
|
@@ -837,7 +839,7 @@ export default function Image( {
|
|
|
837
839
|
/* translators: %s: Label of the bindings source. */
|
|
838
840
|
__( 'Connected to %s' ),
|
|
839
841
|
altBindingSource.label
|
|
840
|
-
|
|
842
|
+
)
|
|
841
843
|
: __( 'Connected to dynamic data' ),
|
|
842
844
|
lockTitleControls:
|
|
843
845
|
!! titleBinding &&
|
|
@@ -851,7 +853,7 @@ export default function Image( {
|
|
|
851
853
|
/* translators: %s: Label of the bindings source. */
|
|
852
854
|
__( 'Connected to %s' ),
|
|
853
855
|
titleBindingSource.label
|
|
854
|
-
|
|
856
|
+
)
|
|
855
857
|
: __( 'Connected to dynamic data' ),
|
|
856
858
|
};
|
|
857
859
|
},
|
|
@@ -1043,7 +1045,7 @@ export default function Image( {
|
|
|
1043
1045
|
setAttributes( { isDecorative: false } )
|
|
1044
1046
|
}
|
|
1045
1047
|
>
|
|
1046
|
-
<
|
|
1048
|
+
<WCCheckboxControl
|
|
1047
1049
|
label={ __( 'Mark as decorative' ) }
|
|
1048
1050
|
checked={ !! isDecorative }
|
|
1049
1051
|
onChange={ updateIsDecorative }
|
|
@@ -1156,7 +1158,7 @@ export default function Image( {
|
|
|
1156
1158
|
'This image has been marked as decorative; its file name is %s'
|
|
1157
1159
|
),
|
|
1158
1160
|
filename
|
|
1159
|
-
|
|
1161
|
+
)
|
|
1160
1162
|
: __( 'This image has been marked as decorative.' );
|
|
1161
1163
|
} else if ( alt ) {
|
|
1162
1164
|
defaultedAlt = alt;
|
|
@@ -1209,7 +1211,7 @@ export default function Image( {
|
|
|
1209
1211
|
height:
|
|
1210
1212
|
pixelSize.height +
|
|
1211
1213
|
resizeDelta.height,
|
|
1212
|
-
|
|
1214
|
+
}
|
|
1213
1215
|
: ( () => {
|
|
1214
1216
|
const style = {};
|
|
1215
1217
|
if ( width === 'auto' ) {
|
|
@@ -1242,7 +1244,7 @@ export default function Image( {
|
|
|
1242
1244
|
style.height = 'auto';
|
|
1243
1245
|
}
|
|
1244
1246
|
return style;
|
|
1245
|
-
|
|
1247
|
+
} )() ),
|
|
1246
1248
|
objectFit: scale,
|
|
1247
1249
|
objectPosition:
|
|
1248
1250
|
focalPoint && scale
|
package/src/image/index.php
CHANGED
|
@@ -290,12 +290,12 @@ function block_core_image_render_lightbox( $block_content, array $block, WP_Bloc
|
|
|
290
290
|
$body_content = $processor->get_updated_html();
|
|
291
291
|
|
|
292
292
|
// Adds a button alongside image in the body content.
|
|
293
|
+
// Extract the img tag using preg_match for structured access.
|
|
293
294
|
$img = null;
|
|
294
295
|
preg_match( '/<img[^>]+>/', $body_content, $img );
|
|
295
296
|
|
|
296
|
-
$
|
|
297
|
-
$
|
|
298
|
-
. '<button
|
|
297
|
+
if ( isset( $img[0] ) ) {
|
|
298
|
+
$button_html = '<button
|
|
299
299
|
class="lightbox-trigger"
|
|
300
300
|
type="button"
|
|
301
301
|
aria-haspopup="dialog"
|
|
@@ -310,7 +310,13 @@ function block_core_image_render_lightbox( $block_content, array $block, WP_Bloc
|
|
|
310
310
|
</svg>
|
|
311
311
|
</button>';
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
// Build the replacement: img tag + button.
|
|
314
|
+
// Use str_replace for literal replacement instead of preg_replace to avoid
|
|
315
|
+
// PCRE backreference interpretation of $ and \ sequences in user-controlled
|
|
316
|
+
// image attributes (e.g., alt="Just $5 today").
|
|
317
|
+
$button = $img[0] . $button_html;
|
|
318
|
+
$body_content = str_replace( $img[0], $button, $body_content );
|
|
319
|
+
}
|
|
314
320
|
|
|
315
321
|
add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' );
|
|
316
322
|
|
package/src/image/style.scss
CHANGED
|
@@ -623,6 +623,145 @@ describe( 'useOpenImageMediaEditorModal', () => {
|
|
|
623
623
|
} );
|
|
624
624
|
} );
|
|
625
625
|
|
|
626
|
+
it( 'restores the alt text and caption a save overwrote when undoing back to the previous attachment', async () => {
|
|
627
|
+
const originalAttachment = {
|
|
628
|
+
id: 1,
|
|
629
|
+
alt_text: 'Original alt',
|
|
630
|
+
caption: { raw: 'Original caption' },
|
|
631
|
+
};
|
|
632
|
+
const croppedAttachment = {
|
|
633
|
+
id: 2,
|
|
634
|
+
alt_text: 'Updated alt',
|
|
635
|
+
caption: { raw: 'Updated caption' },
|
|
636
|
+
};
|
|
637
|
+
const registry = createRegistry( {
|
|
638
|
+
getEditedEntityRecord: ( kind, name, attachmentId ) =>
|
|
639
|
+
attachmentId === 1 ? originalAttachment : undefined,
|
|
640
|
+
resolveGetEntityRecord: ( kind, name, attachmentId ) =>
|
|
641
|
+
attachmentId === 2 ? croppedAttachment : originalAttachment,
|
|
642
|
+
} );
|
|
643
|
+
useRegistry.mockReturnValue( registry );
|
|
644
|
+
const setAttributes = vi.fn();
|
|
645
|
+
const openMediaEditorModal = vi.fn();
|
|
646
|
+
mockMediaEditorModalSetting( openMediaEditorModal );
|
|
647
|
+
const { result } = renderHook( () =>
|
|
648
|
+
useOpenImageMediaEditorModal( {
|
|
649
|
+
attributes: {
|
|
650
|
+
id: 1,
|
|
651
|
+
url: 'original.jpg',
|
|
652
|
+
alt: 'Original alt',
|
|
653
|
+
caption: 'Original caption',
|
|
654
|
+
},
|
|
655
|
+
setAttributes,
|
|
656
|
+
} )
|
|
657
|
+
);
|
|
658
|
+
|
|
659
|
+
await act( async () => {
|
|
660
|
+
await result.current();
|
|
661
|
+
} );
|
|
662
|
+
const onUpdate = openMediaEditorModal.mock.calls[ 0 ][ 0 ].onUpdate;
|
|
663
|
+
await act( async () => {
|
|
664
|
+
await onUpdate( { id: 2, url: 'cropped.jpg' } );
|
|
665
|
+
} );
|
|
666
|
+
// The media editor's Undo only reports the previous attachment.
|
|
667
|
+
await act( async () => {
|
|
668
|
+
await onUpdate( { id: 1, url: 'original.jpg' } );
|
|
669
|
+
} );
|
|
670
|
+
|
|
671
|
+
expect( setAttributes ).toHaveBeenCalledTimes( 2 );
|
|
672
|
+
expect( setAttributes ).toHaveBeenNthCalledWith( 1, {
|
|
673
|
+
id: 2,
|
|
674
|
+
url: 'cropped.jpg',
|
|
675
|
+
alt: 'Updated alt',
|
|
676
|
+
caption: 'Updated caption',
|
|
677
|
+
} );
|
|
678
|
+
expect( setAttributes ).toHaveBeenNthCalledWith( 2, {
|
|
679
|
+
id: 1,
|
|
680
|
+
url: 'original.jpg',
|
|
681
|
+
alt: 'Original alt',
|
|
682
|
+
caption: 'Original caption',
|
|
683
|
+
} );
|
|
684
|
+
} );
|
|
685
|
+
|
|
686
|
+
it( 'does not restore overwritten metadata when a later session saves back to the previous attachment', async () => {
|
|
687
|
+
const originalAttachment = {
|
|
688
|
+
id: 1,
|
|
689
|
+
alt_text: 'Original alt',
|
|
690
|
+
caption: { raw: 'Original caption' },
|
|
691
|
+
};
|
|
692
|
+
const croppedAttachment = {
|
|
693
|
+
id: 2,
|
|
694
|
+
alt_text: 'Updated alt',
|
|
695
|
+
caption: { raw: 'Updated caption' },
|
|
696
|
+
};
|
|
697
|
+
const registry = createRegistry( {
|
|
698
|
+
getEditedEntityRecord: ( kind, name, attachmentId ) =>
|
|
699
|
+
attachmentId === 1 ? originalAttachment : croppedAttachment,
|
|
700
|
+
resolveGetEntityRecord: ( kind, name, attachmentId ) =>
|
|
701
|
+
attachmentId === 2
|
|
702
|
+
? croppedAttachment
|
|
703
|
+
: {
|
|
704
|
+
...originalAttachment,
|
|
705
|
+
alt_text: 'Server alt',
|
|
706
|
+
caption: { raw: 'Server caption' },
|
|
707
|
+
},
|
|
708
|
+
} );
|
|
709
|
+
useRegistry.mockReturnValue( registry );
|
|
710
|
+
const setAttributes = vi.fn();
|
|
711
|
+
const openMediaEditorModal = vi.fn();
|
|
712
|
+
mockMediaEditorModalSetting( openMediaEditorModal );
|
|
713
|
+
const { result, rerender } = renderHook(
|
|
714
|
+
( { attributes } ) =>
|
|
715
|
+
useOpenImageMediaEditorModal( { attributes, setAttributes } ),
|
|
716
|
+
{
|
|
717
|
+
initialProps: {
|
|
718
|
+
attributes: {
|
|
719
|
+
id: 1,
|
|
720
|
+
url: 'original.jpg',
|
|
721
|
+
alt: 'Original alt',
|
|
722
|
+
caption: 'Original caption',
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
}
|
|
726
|
+
);
|
|
727
|
+
|
|
728
|
+
await act( async () => {
|
|
729
|
+
await result.current();
|
|
730
|
+
} );
|
|
731
|
+
await act( async () => {
|
|
732
|
+
await openMediaEditorModal.mock.calls[ 0 ][ 0 ].onUpdate( {
|
|
733
|
+
id: 2,
|
|
734
|
+
url: 'cropped.jpg',
|
|
735
|
+
} );
|
|
736
|
+
} );
|
|
737
|
+
rerender( {
|
|
738
|
+
attributes: {
|
|
739
|
+
id: 2,
|
|
740
|
+
url: 'cropped.jpg',
|
|
741
|
+
alt: 'Updated alt',
|
|
742
|
+
caption: 'Updated caption',
|
|
743
|
+
},
|
|
744
|
+
} );
|
|
745
|
+
// Opening the modal again starts a new session, so a save in it that
|
|
746
|
+
// happens to return the block to attachment 1 is not the Undo.
|
|
747
|
+
await act( async () => {
|
|
748
|
+
await result.current();
|
|
749
|
+
} );
|
|
750
|
+
await act( async () => {
|
|
751
|
+
await openMediaEditorModal.mock.calls[ 1 ][ 0 ].onUpdate( {
|
|
752
|
+
id: 1,
|
|
753
|
+
url: 'original.jpg',
|
|
754
|
+
} );
|
|
755
|
+
} );
|
|
756
|
+
|
|
757
|
+
expect( setAttributes ).toHaveBeenLastCalledWith( {
|
|
758
|
+
id: 1,
|
|
759
|
+
url: 'original.jpg',
|
|
760
|
+
alt: 'Server alt',
|
|
761
|
+
caption: 'Server caption',
|
|
762
|
+
} );
|
|
763
|
+
} );
|
|
764
|
+
|
|
626
765
|
it( 'resolves fresh metadata when the new attachment id has an incomplete cached record', async () => {
|
|
627
766
|
const originalAttachment = {
|
|
628
767
|
id: 1,
|
|
@@ -649,7 +788,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
|
|
|
649
788
|
id: 2,
|
|
650
789
|
alt_text: 'Updated alt',
|
|
651
790
|
caption: { raw: '' },
|
|
652
|
-
|
|
791
|
+
},
|
|
653
792
|
resolveGetEntityRecord: ( kind, name, attachmentId ) =>
|
|
654
793
|
attachmentId === 2 ? updatedAttachment : undefined,
|
|
655
794
|
},
|
|
@@ -268,6 +268,11 @@ export function useOpenImageMediaEditorModal( {
|
|
|
268
268
|
// Incremented on every handleMediaUpdate call; stale async continuations
|
|
269
269
|
// check against this to bail out if a newer update has since started.
|
|
270
270
|
const mediaEditorMetadataSyncRequestRef = useRef( 0 );
|
|
271
|
+
// The alt text and caption a save overwrote on the block, and the
|
|
272
|
+
// attachment it moved the block away from. The media editor's Undo moves
|
|
273
|
+
// the block back but reports only that attachment's id and url, so this is
|
|
274
|
+
// what lets the update restore the block's own metadata too.
|
|
275
|
+
const mediaEditorUndoMetadataRef = useRef();
|
|
271
276
|
|
|
272
277
|
useEffect( () => {
|
|
273
278
|
blockAttributesRef.current = {
|
|
@@ -344,6 +349,10 @@ export function useOpenImageMediaEditorModal( {
|
|
|
344
349
|
// reuse a stale snapshot.
|
|
345
350
|
const originalAttachment = mediaEditorMetadataBaselineRef.current;
|
|
346
351
|
mediaEditorMetadataBaselineRef.current = undefined;
|
|
352
|
+
// Likewise the metadata the last save overwrote: only the update
|
|
353
|
+
// straight after that save, its Undo, may restore it.
|
|
354
|
+
const undoMetadata = mediaEditorUndoMetadataRef.current;
|
|
355
|
+
mediaEditorUndoMetadataRef.current = undefined;
|
|
347
356
|
const syncRequest = ++mediaEditorMetadataSyncRequestRef.current;
|
|
348
357
|
const nextAttributes = {};
|
|
349
358
|
|
|
@@ -413,6 +422,22 @@ export function useOpenImageMediaEditorModal( {
|
|
|
413
422
|
nextAttributes,
|
|
414
423
|
resolvedMetadataAttributes
|
|
415
424
|
);
|
|
425
|
+
|
|
426
|
+
// Only a save to a new attachment offers an Undo, so
|
|
427
|
+
// only then keep the values being overwritten.
|
|
428
|
+
if ( isNewAttachment ) {
|
|
429
|
+
mediaEditorUndoMetadataRef.current = {
|
|
430
|
+
id: currentBlockAttributes.id,
|
|
431
|
+
attributes: Object.fromEntries(
|
|
432
|
+
Object.keys(
|
|
433
|
+
resolvedMetadataAttributes
|
|
434
|
+
).map( ( key ) => [
|
|
435
|
+
key,
|
|
436
|
+
latestBlockAttributes[ key ],
|
|
437
|
+
] )
|
|
438
|
+
),
|
|
439
|
+
};
|
|
440
|
+
}
|
|
416
441
|
}
|
|
417
442
|
}
|
|
418
443
|
|
|
@@ -444,6 +469,13 @@ export function useOpenImageMediaEditorModal( {
|
|
|
444
469
|
}
|
|
445
470
|
}
|
|
446
471
|
|
|
472
|
+
// The media editor's Undo: the block is going back to the
|
|
473
|
+
// attachment the last save moved it away from, so put back the
|
|
474
|
+
// alt text and caption that save overwrote.
|
|
475
|
+
if ( undoMetadata?.id === newId ) {
|
|
476
|
+
Object.assign( nextAttributes, undoMetadata.attributes );
|
|
477
|
+
}
|
|
478
|
+
|
|
447
479
|
if ( Object.keys( nextAttributes ).length ) {
|
|
448
480
|
blockAttributesRef.current = {
|
|
449
481
|
...blockAttributesRef.current,
|
|
@@ -465,6 +497,11 @@ export function useOpenImageMediaEditorModal( {
|
|
|
465
497
|
return;
|
|
466
498
|
}
|
|
467
499
|
|
|
500
|
+
// A new session starts. Drop any metadata kept for the last save's
|
|
501
|
+
// Undo, so a save in this session that returns the block to that same
|
|
502
|
+
// attachment isn't mistaken for it.
|
|
503
|
+
mediaEditorUndoMetadataRef.current = undefined;
|
|
504
|
+
|
|
468
505
|
// Snapshot the attachment's current metadata before the user makes
|
|
469
506
|
// any changes so handleMediaUpdate can compare against it later. Use
|
|
470
507
|
// the cached record when it's already present; only resolve when
|
package/src/index.jsx
CHANGED
|
@@ -26,6 +26,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
26
26
|
|
|
27
27
|
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
28
28
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
29
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
30
|
+
- `backgroundImage`: `true`
|
|
31
|
+
- `backgroundSize`: `true`
|
|
32
|
+
- `gradient`: `true`
|
|
29
33
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
30
34
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
31
35
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
@@ -33,6 +37,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
33
37
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
34
38
|
- `margin`: `true`
|
|
35
39
|
- `padding`: `true`
|
|
40
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
36
41
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
37
42
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
38
43
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
@@ -31,6 +31,15 @@
|
|
|
31
31
|
"supports": {
|
|
32
32
|
"anchor": true,
|
|
33
33
|
"align": true,
|
|
34
|
+
"background": {
|
|
35
|
+
"backgroundImage": true,
|
|
36
|
+
"backgroundSize": true,
|
|
37
|
+
"gradient": true,
|
|
38
|
+
"__experimentalDefaultControls": {
|
|
39
|
+
"backgroundImage": true,
|
|
40
|
+
"gradient": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
34
43
|
"color": {
|
|
35
44
|
"gradients": true,
|
|
36
45
|
"link": true,
|
|
@@ -45,6 +54,7 @@
|
|
|
45
54
|
"margin": true,
|
|
46
55
|
"padding": true
|
|
47
56
|
},
|
|
57
|
+
"shadow": true,
|
|
48
58
|
"typography": {
|
|
49
59
|
"fontSize": true,
|
|
50
60
|
"lineHeight": true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
|
|
2
2
|
import {
|
|
3
3
|
RangeControl,
|
|
4
|
-
SelectControl,
|
|
4
|
+
SelectControl as WCSelectControl,
|
|
5
5
|
Spinner,
|
|
6
6
|
ToggleControl,
|
|
7
7
|
__experimentalToolsPanel as ToolsPanel,
|
|
@@ -106,7 +106,7 @@ export default function LatestComments( { attributes, setAttributes, name } ) {
|
|
|
106
106
|
}
|
|
107
107
|
isShownByDefault
|
|
108
108
|
>
|
|
109
|
-
<
|
|
109
|
+
<WCSelectControl
|
|
110
110
|
label={ __( 'Display content' ) }
|
|
111
111
|
value={ displayContent }
|
|
112
112
|
options={ [
|
|
@@ -40,6 +40,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
40
40
|
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `true`
|
|
41
41
|
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
42
42
|
- [`layout`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout): `true`
|
|
43
|
+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
|
|
44
|
+
- `backgroundImage`: `true`
|
|
45
|
+
- `backgroundSize`: `true`
|
|
46
|
+
- `gradient`: `true`
|
|
43
47
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
44
48
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
45
49
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
@@ -50,6 +54,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
50
54
|
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
51
55
|
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
52
56
|
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
57
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
53
58
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
54
59
|
- `clientNavigation`: `true`
|
|
55
60
|
|
|
@@ -79,6 +79,15 @@
|
|
|
79
79
|
"align": true,
|
|
80
80
|
"html": false,
|
|
81
81
|
"layout": true,
|
|
82
|
+
"background": {
|
|
83
|
+
"backgroundImage": true,
|
|
84
|
+
"backgroundSize": true,
|
|
85
|
+
"gradient": true,
|
|
86
|
+
"__experimentalDefaultControls": {
|
|
87
|
+
"backgroundImage": true,
|
|
88
|
+
"gradient": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
82
91
|
"color": {
|
|
83
92
|
"gradients": true,
|
|
84
93
|
"link": true,
|
|
@@ -123,6 +132,7 @@
|
|
|
123
132
|
"style": true
|
|
124
133
|
}
|
|
125
134
|
},
|
|
135
|
+
"shadow": true,
|
|
126
136
|
"interactivity": {
|
|
127
137
|
"clientNavigation": true
|
|
128
138
|
}
|