@wordpress/block-library 9.48.1 → 10.0.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 +12 -0
- package/build/audio/edit.cjs +8 -1
- package/build/audio/edit.cjs.map +2 -2
- package/build/breadcrumbs/edit.cjs +1 -2
- package/build/breadcrumbs/edit.cjs.map +2 -2
- package/build/button/edit.cjs +1 -2
- package/build/button/edit.cjs.map +2 -2
- package/build/categories/edit.cjs +1 -1
- package/build/categories/edit.cjs.map +1 -1
- package/build/code/edit.cjs +1 -1
- package/build/code/edit.cjs.map +2 -2
- package/build/code/index.cjs +1 -1
- package/build/code/index.cjs.map +1 -1
- package/build/columns/utils.cjs.map +1 -1
- package/build/comments/edit/comments-legacy.cjs +1 -1
- package/build/comments/edit/comments-legacy.cjs.map +1 -1
- package/build/comments/edit/placeholder.cjs +4 -4
- package/build/comments/edit/placeholder.cjs.map +1 -1
- package/build/comments-pagination-next/edit.cjs +2 -2
- package/build/comments-pagination-next/edit.cjs.map +1 -1
- package/build/comments-pagination-previous/edit.cjs +2 -2
- package/build/comments-pagination-previous/edit.cjs.map +1 -1
- package/build/cover/deprecated.cjs +3 -3
- package/build/cover/deprecated.cjs.map +2 -2
- package/build/cover/edit/block-controls.cjs +13 -0
- package/build/cover/edit/block-controls.cjs.map +2 -2
- package/build/cover/edit/embed-video-url-input.cjs +0 -1
- package/build/cover/edit/embed-video-url-input.cjs.map +2 -2
- package/build/cover/edit/index.cjs +61 -2
- package/build/cover/edit/index.cjs.map +3 -3
- package/build/cover/edit/inspector-controls.cjs +93 -35
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/details/edit.cjs +1 -2
- package/build/details/edit.cjs.map +2 -2
- package/build/embed/embed-placeholder.cjs +1 -1
- package/build/embed/embed-placeholder.cjs.map +2 -2
- package/build/file/edit.cjs +3 -11
- package/build/file/edit.cjs.map +2 -2
- package/build/file/index.cjs +3 -1
- package/build/file/index.cjs.map +3 -3
- package/build/file/transforms.cjs +11 -32
- package/build/file/transforms.cjs.map +2 -2
- package/build/{freeform/convert-to-blocks-button.cjs → file/variations.cjs} +16 -18
- package/build/file/variations.cjs.map +7 -0
- package/build/footnotes/edit.cjs +1 -1
- package/build/footnotes/edit.cjs.map +2 -2
- package/build/form/edit.cjs +0 -2
- package/build/form/edit.cjs.map +2 -2
- package/build/form-input/edit.cjs +1 -3
- package/build/form-input/edit.cjs.map +2 -2
- package/build/freeform/edit.cjs +6 -15
- package/build/freeform/edit.cjs.map +3 -3
- package/build/freeform/migration-notice.cjs.map +2 -2
- package/build/gallery/edit.cjs +2 -2
- package/build/gallery/edit.cjs.map +2 -2
- package/build/home-link/edit.cjs +1 -2
- package/build/home-link/edit.cjs.map +2 -2
- package/build/html/index.cjs +1 -1
- package/build/html/index.cjs.map +2 -2
- package/build/html/modal.cjs +9 -6
- package/build/html/modal.cjs.map +2 -2
- package/build/icon/block.json +12 -0
- package/build/icon/edit.cjs +90 -41
- package/build/icon/edit.cjs.map +3 -3
- package/build/icon/index.cjs +3 -1
- package/build/icon/index.cjs.map +3 -3
- package/build/{tab/save.cjs → icon/variations.cjs} +14 -15
- package/build/icon/variations.cjs.map +7 -0
- package/build/image/block.json +1 -0
- package/build/image/edit.cjs +4 -3
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +91 -29
- package/build/image/image.cjs.map +2 -2
- package/build/image/index.cjs +1 -1
- package/build/image/index.cjs.map +2 -2
- package/build/image/transforms.cjs +9 -3
- package/build/image/transforms.cjs.map +2 -2
- package/build/image/use-open-image-media-editor-modal.cjs +5 -25
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/index.cjs +1 -3
- package/build/index.cjs.map +2 -2
- package/build/latest-posts/edit.cjs +1 -1
- package/build/latest-posts/edit.cjs.map +1 -1
- package/build/list/ordered-list-settings.cjs +0 -1
- package/build/list/ordered-list-settings.cjs.map +2 -2
- package/build/math/edit.cjs +1 -1
- package/build/math/index.cjs +1 -1
- package/build/math/index.cjs.map +1 -1
- package/build/media-text/constants.cjs +1 -1
- package/build/media-text/constants.cjs.map +2 -2
- package/build/media-text/index.cjs +1 -1
- package/build/media-text/index.cjs.map +2 -2
- package/build/missing/edit.cjs +2 -2
- package/build/missing/edit.cjs.map +1 -1
- package/build/navigation/edit/index.cjs +19 -13
- package/build/navigation/edit/index.cjs.map +2 -2
- package/build/navigation/edit/navigation-menu-name-control.cjs +0 -1
- package/build/navigation/edit/navigation-menu-name-control.cjs.map +2 -2
- package/build/navigation/edit/navigation-menu-selector.cjs +1 -1
- package/build/navigation/edit/navigation-menu-selector.cjs.map +2 -2
- package/build/navigation/edit/placeholder/index.cjs +1 -1
- package/build/navigation/edit/placeholder/index.cjs.map +2 -2
- package/build/navigation-link/block.json +1 -1
- package/build/navigation-link/edit.cjs +1 -1
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-link/link-ui/page-creator.cjs +0 -1
- package/build/navigation-link/link-ui/page-creator.cjs.map +2 -2
- package/build/navigation-link/shared/controls.cjs +0 -2
- package/build/navigation-link/shared/controls.cjs.map +2 -2
- package/build/navigation-submenu/block.json +7 -0
- package/build/navigation-submenu/edit.cjs +1 -1
- package/build/navigation-submenu/edit.cjs.map +2 -2
- package/build/page-list/block.json +2 -5
- package/build/page-list/edit.cjs +1 -11
- package/build/page-list/edit.cjs.map +2 -2
- package/build/playlist-track/edit.cjs +0 -3
- package/build/playlist-track/edit.cjs.map +2 -2
- package/build/post-author/edit.cjs +1 -1
- package/build/post-author/edit.cjs.map +2 -2
- package/build/post-author/utils.cjs +1 -1
- package/build/post-author/utils.cjs.map +2 -2
- package/build/post-comment/edit.cjs +0 -1
- package/build/post-comment/edit.cjs.map +2 -2
- package/build/post-date/edit.cjs +2 -2
- package/build/post-date/edit.cjs.map +2 -2
- package/build/post-excerpt/edit.cjs +2 -2
- package/build/post-excerpt/edit.cjs.map +2 -2
- package/build/post-featured-image/block.json +1 -0
- package/build/post-featured-image/dimension-controls.cjs +90 -178
- package/build/post-featured-image/dimension-controls.cjs.map +3 -3
- package/build/post-featured-image/edit.cjs +47 -18
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-navigation-link/edit.cjs +2 -2
- package/build/post-navigation-link/edit.cjs.map +2 -2
- package/build/post-terms/edit.cjs +0 -1
- package/build/post-terms/edit.cjs.map +2 -2
- package/build/post-time-to-read/edit.cjs +1 -1
- package/build/post-time-to-read/edit.cjs.map +1 -1
- package/build/post-title/edit.cjs +0 -1
- package/build/post-title/edit.cjs.map +2 -2
- package/build/preformatted/edit.cjs +1 -1
- package/build/preformatted/edit.cjs.map +2 -2
- package/build/pullquote/block.json +1 -3
- package/build/pullquote/deprecated.cjs +114 -9
- package/build/pullquote/deprecated.cjs.map +3 -3
- package/build/pullquote/edit.cjs +43 -61
- package/build/pullquote/edit.cjs.map +3 -3
- package/build/pullquote/save.cjs +5 -26
- package/build/pullquote/save.cjs.map +3 -3
- package/build/query/edit/enhanced-pagination-modal.cjs +10 -1
- package/build/query/edit/enhanced-pagination-modal.cjs.map +3 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.cjs +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.cjs.map +1 -1
- package/build/query/edit/inspector-controls/index.cjs +0 -1
- package/build/query/edit/inspector-controls/index.cjs.map +2 -2
- package/build/query/edit/inspector-controls/order-control.cjs +2 -2
- package/build/query/edit/inspector-controls/order-control.cjs.map +2 -2
- package/build/query/utils.cjs +2 -2
- package/build/query/utils.cjs.map +2 -2
- package/build/query-pagination-next/edit.cjs +2 -2
- package/build/query-pagination-next/edit.cjs.map +1 -1
- package/build/query-pagination-previous/edit.cjs +2 -2
- package/build/query-pagination-previous/edit.cjs.map +1 -1
- package/build/query-title/edit.cjs +1 -1
- package/build/query-title/edit.cjs.map +2 -2
- package/build/query-total/edit.cjs +1 -1
- package/build/query-total/edit.cjs.map +2 -2
- package/build/quote/index.cjs +1 -1
- package/build/quote/index.cjs.map +2 -2
- package/build/read-more/edit.cjs +1 -1
- package/build/read-more/edit.cjs.map +2 -2
- package/build/rss/edit.cjs +1 -2
- package/build/rss/edit.cjs.map +2 -2
- package/build/search/block.json +4 -0
- package/build/search/edit.cjs +244 -206
- package/build/search/edit.cjs.map +2 -2
- package/build/shortcode/edit.cjs +1 -1
- package/build/shortcode/edit.cjs.map +2 -2
- package/build/site-logo/edit.cjs +2 -1
- package/build/site-logo/edit.cjs.map +2 -2
- package/build/site-tagline/edit.cjs +1 -1
- package/build/site-tagline/edit.cjs.map +2 -2
- package/build/site-title/edit.cjs +1 -1
- package/build/site-title/edit.cjs.map +2 -2
- package/build/social-link/edit.cjs +0 -3
- package/build/social-link/edit.cjs.map +2 -2
- package/build/tab-list/block.json +33 -20
- package/build/tab-list/edit.cjs +122 -12
- package/build/tab-list/edit.cjs.map +3 -3
- package/build/tab-list/init.cjs +28 -0
- package/build/tab-list/init.cjs.map +7 -0
- package/build/tab-list/save.cjs +33 -3
- package/build/tab-list/save.cjs.map +3 -3
- package/build/tab-panel/add-tab-toolbar-control.cjs +19 -8
- package/build/tab-panel/add-tab-toolbar-control.cjs.map +2 -2
- package/build/tab-panel/block.json +2 -6
- package/build/tab-panel/edit.cjs +0 -9
- package/build/tab-panel/edit.cjs.map +2 -2
- package/build/tab-panel/remove-tab-toolbar-control.cjs +9 -14
- package/build/tab-panel/remove-tab-toolbar-control.cjs.map +2 -2
- package/build/tab-panel/save.cjs +2 -1
- package/build/tab-panel/save.cjs.map +2 -2
- package/build/tab-panels/block.json +2 -28
- package/build/tab-panels/init.cjs +28 -0
- package/build/tab-panels/init.cjs.map +7 -0
- package/build/table/edit.cjs +0 -2
- package/build/table/edit.cjs.map +2 -2
- package/build/table/index.cjs +1 -1
- package/build/table/index.cjs.map +2 -2
- package/build/tabs/block.json +3 -17
- package/build/tabs/edit.cjs +7 -21
- package/build/tabs/edit.cjs.map +3 -3
- package/build/tabs/index.cjs +6 -10
- package/build/tabs/index.cjs.map +2 -2
- package/build/tabs/use-tab-list-items-sync.cjs +53 -0
- package/build/tabs/use-tab-list-items-sync.cjs.map +7 -0
- package/build/tabs/view.cjs +22 -104
- package/build/tabs/view.cjs.map +2 -2
- package/build/template-part/edit/advanced-controls.cjs +0 -1
- package/build/template-part/edit/advanced-controls.cjs.map +2 -2
- package/build/template-part/edit/title-modal.cjs +1 -2
- package/build/template-part/edit/title-modal.cjs.map +2 -2
- package/build/terms-query/edit/inspector-controls/order-control.cjs +2 -2
- package/build/terms-query/edit/inspector-controls/order-control.cjs.map +2 -2
- package/build/utils/style-state.cjs +164 -0
- package/build/utils/style-state.cjs.map +7 -0
- package/build/utils/waveform-player.cjs +1 -1
- package/build/verse/edit.cjs +1 -1
- package/build/verse/edit.cjs.map +2 -2
- package/build/video/edit.cjs +3 -2
- package/build/video/edit.cjs.map +2 -2
- package/build/video/tracks-editor.cjs +0 -2
- package/build/video/tracks-editor.cjs.map +2 -2
- package/build-module/audio/edit.mjs +8 -2
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/breadcrumbs/edit.mjs +1 -2
- package/build-module/breadcrumbs/edit.mjs.map +2 -2
- package/build-module/button/edit.mjs +1 -2
- package/build-module/button/edit.mjs.map +2 -2
- package/build-module/categories/edit.mjs +1 -1
- package/build-module/categories/edit.mjs.map +1 -1
- package/build-module/code/edit.mjs +1 -1
- package/build-module/code/edit.mjs.map +2 -2
- package/build-module/code/index.mjs +1 -1
- package/build-module/code/index.mjs.map +1 -1
- package/build-module/columns/utils.mjs.map +1 -1
- package/build-module/comments/edit/comments-legacy.mjs +1 -1
- package/build-module/comments/edit/comments-legacy.mjs.map +1 -1
- package/build-module/comments/edit/placeholder.mjs +4 -4
- package/build-module/comments/edit/placeholder.mjs.map +1 -1
- package/build-module/comments-pagination-next/edit.mjs +2 -2
- package/build-module/comments-pagination-next/edit.mjs.map +1 -1
- package/build-module/comments-pagination-previous/edit.mjs +2 -2
- package/build-module/comments-pagination-previous/edit.mjs.map +1 -1
- package/build-module/cover/deprecated.mjs +3 -3
- package/build-module/cover/deprecated.mjs.map +2 -2
- package/build-module/cover/edit/block-controls.mjs +15 -2
- package/build-module/cover/edit/block-controls.mjs.map +2 -2
- package/build-module/cover/edit/embed-video-url-input.mjs +0 -1
- package/build-module/cover/edit/embed-video-url-input.mjs.map +2 -2
- package/build-module/cover/edit/index.mjs +64 -3
- package/build-module/cover/edit/index.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +98 -35
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/details/edit.mjs +1 -2
- package/build-module/details/edit.mjs.map +2 -2
- package/build-module/embed/embed-placeholder.mjs +1 -1
- package/build-module/embed/embed-placeholder.mjs.map +2 -2
- package/build-module/file/edit.mjs +5 -13
- package/build-module/file/edit.mjs.map +2 -2
- package/build-module/file/index.mjs +3 -1
- package/build-module/file/index.mjs.map +2 -2
- package/build-module/file/transforms.mjs +11 -32
- package/build-module/file/transforms.mjs.map +2 -2
- package/build-module/file/variations.mjs +17 -0
- package/build-module/file/variations.mjs.map +7 -0
- package/build-module/footnotes/edit.mjs +1 -1
- package/build-module/footnotes/edit.mjs.map +2 -2
- package/build-module/form/edit.mjs +0 -2
- package/build-module/form/edit.mjs.map +2 -2
- package/build-module/form-input/edit.mjs +1 -3
- package/build-module/form-input/edit.mjs.map +2 -2
- package/build-module/freeform/edit.mjs +6 -15
- package/build-module/freeform/edit.mjs.map +2 -2
- package/build-module/freeform/migration-notice.mjs.map +2 -2
- package/build-module/gallery/edit.mjs +2 -2
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/home-link/edit.mjs +1 -2
- package/build-module/home-link/edit.mjs.map +2 -2
- package/build-module/html/index.mjs +1 -1
- package/build-module/html/index.mjs.map +2 -2
- package/build-module/html/modal.mjs +9 -6
- package/build-module/html/modal.mjs.map +2 -2
- package/build-module/icon/block.json +12 -0
- package/build-module/icon/edit.mjs +94 -42
- package/build-module/icon/edit.mjs.map +2 -2
- package/build-module/icon/index.mjs +3 -1
- package/build-module/icon/index.mjs.map +2 -2
- package/build-module/icon/variations.mjs +13 -0
- package/build-module/icon/variations.mjs.map +7 -0
- package/build-module/image/block.json +1 -0
- package/build-module/image/edit.mjs +4 -3
- package/build-module/image/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +96 -29
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/index.mjs +1 -1
- package/build-module/image/index.mjs.map +2 -2
- package/build-module/image/transforms.mjs +9 -3
- package/build-module/image/transforms.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +5 -25
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/index.mjs +1 -3
- package/build-module/index.mjs.map +2 -2
- package/build-module/latest-posts/edit.mjs +1 -1
- package/build-module/latest-posts/edit.mjs.map +1 -1
- package/build-module/list/ordered-list-settings.mjs +0 -1
- package/build-module/list/ordered-list-settings.mjs.map +2 -2
- package/build-module/math/edit.mjs +1 -1
- package/build-module/math/index.mjs +1 -1
- package/build-module/math/index.mjs.map +1 -1
- package/build-module/media-text/constants.mjs +1 -1
- package/build-module/media-text/constants.mjs.map +2 -2
- package/build-module/media-text/index.mjs +1 -1
- package/build-module/media-text/index.mjs.map +2 -2
- package/build-module/missing/edit.mjs +2 -2
- package/build-module/missing/edit.mjs.map +1 -1
- package/build-module/navigation/edit/index.mjs +19 -13
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation/edit/navigation-menu-name-control.mjs +0 -1
- package/build-module/navigation/edit/navigation-menu-name-control.mjs.map +2 -2
- package/build-module/navigation/edit/navigation-menu-selector.mjs +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.mjs.map +2 -2
- package/build-module/navigation/edit/placeholder/index.mjs +1 -1
- package/build-module/navigation/edit/placeholder/index.mjs.map +2 -2
- package/build-module/navigation-link/block.json +1 -1
- package/build-module/navigation-link/edit.mjs +1 -1
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-link/link-ui/page-creator.mjs +0 -1
- package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
- package/build-module/navigation-link/shared/controls.mjs +0 -2
- package/build-module/navigation-link/shared/controls.mjs.map +2 -2
- package/build-module/navigation-submenu/block.json +7 -0
- package/build-module/navigation-submenu/edit.mjs +1 -1
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/page-list/block.json +2 -5
- package/build-module/page-list/edit.mjs +1 -11
- package/build-module/page-list/edit.mjs.map +2 -2
- package/build-module/playlist-track/edit.mjs +0 -3
- package/build-module/playlist-track/edit.mjs.map +2 -2
- package/build-module/post-author/edit.mjs +1 -1
- package/build-module/post-author/edit.mjs.map +2 -2
- package/build-module/post-author/utils.mjs +1 -1
- package/build-module/post-author/utils.mjs.map +2 -2
- package/build-module/post-comment/edit.mjs +0 -1
- package/build-module/post-comment/edit.mjs.map +2 -2
- package/build-module/post-date/edit.mjs +2 -2
- package/build-module/post-date/edit.mjs.map +2 -2
- package/build-module/post-excerpt/edit.mjs +2 -2
- package/build-module/post-excerpt/edit.mjs.map +2 -2
- package/build-module/post-featured-image/block.json +1 -0
- package/build-module/post-featured-image/dimension-controls.mjs +99 -187
- package/build-module/post-featured-image/dimension-controls.mjs.map +2 -2
- package/build-module/post-featured-image/edit.mjs +47 -18
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-navigation-link/edit.mjs +2 -2
- package/build-module/post-navigation-link/edit.mjs.map +2 -2
- package/build-module/post-terms/edit.mjs +0 -1
- package/build-module/post-terms/edit.mjs.map +2 -2
- package/build-module/post-time-to-read/edit.mjs +1 -1
- package/build-module/post-time-to-read/edit.mjs.map +1 -1
- package/build-module/post-title/edit.mjs +0 -1
- package/build-module/post-title/edit.mjs.map +2 -2
- package/build-module/preformatted/edit.mjs +1 -1
- package/build-module/preformatted/edit.mjs.map +2 -2
- package/build-module/pullquote/block.json +1 -3
- package/build-module/pullquote/deprecated.mjs +114 -9
- package/build-module/pullquote/deprecated.mjs.map +2 -2
- package/build-module/pullquote/edit.mjs +44 -67
- package/build-module/pullquote/edit.mjs.map +2 -2
- package/build-module/pullquote/save.mjs +5 -16
- package/build-module/pullquote/save.mjs.map +2 -2
- package/build-module/query/edit/enhanced-pagination-modal.mjs +10 -1
- package/build-module/query/edit/enhanced-pagination-modal.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs.map +1 -1
- package/build-module/query/edit/inspector-controls/index.mjs +0 -1
- 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/utils.mjs +2 -2
- package/build-module/query/utils.mjs.map +2 -2
- package/build-module/query-pagination-next/edit.mjs +2 -2
- package/build-module/query-pagination-next/edit.mjs.map +1 -1
- package/build-module/query-pagination-previous/edit.mjs +2 -2
- package/build-module/query-pagination-previous/edit.mjs.map +1 -1
- package/build-module/query-title/edit.mjs +1 -1
- package/build-module/query-title/edit.mjs.map +2 -2
- package/build-module/query-total/edit.mjs +1 -1
- package/build-module/query-total/edit.mjs.map +2 -2
- package/build-module/quote/index.mjs +1 -1
- package/build-module/quote/index.mjs.map +2 -2
- package/build-module/read-more/edit.mjs +1 -1
- package/build-module/read-more/edit.mjs.map +2 -2
- package/build-module/rss/edit.mjs +1 -2
- package/build-module/rss/edit.mjs.map +2 -2
- package/build-module/search/block.json +4 -0
- package/build-module/search/edit.mjs +244 -206
- package/build-module/search/edit.mjs.map +2 -2
- package/build-module/shortcode/edit.mjs +1 -1
- package/build-module/shortcode/edit.mjs.map +2 -2
- package/build-module/site-logo/edit.mjs +2 -1
- package/build-module/site-logo/edit.mjs.map +2 -2
- package/build-module/site-tagline/edit.mjs +1 -1
- package/build-module/site-tagline/edit.mjs.map +2 -2
- package/build-module/site-title/edit.mjs +1 -1
- package/build-module/site-title/edit.mjs.map +2 -2
- package/build-module/social-link/edit.mjs +0 -3
- package/build-module/social-link/edit.mjs.map +2 -2
- package/build-module/tab-list/block.json +33 -20
- package/build-module/tab-list/edit.mjs +128 -15
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-list/init.mjs +7 -0
- package/build-module/tab-list/init.mjs.map +7 -0
- package/build-module/tab-list/save.mjs +29 -4
- package/build-module/tab-list/save.mjs.map +2 -2
- package/build-module/tab-panel/add-tab-toolbar-control.mjs +19 -8
- package/build-module/tab-panel/add-tab-toolbar-control.mjs.map +2 -2
- package/build-module/tab-panel/block.json +2 -6
- package/build-module/tab-panel/edit.mjs +1 -10
- package/build-module/tab-panel/edit.mjs.map +2 -2
- package/build-module/tab-panel/remove-tab-toolbar-control.mjs +9 -14
- package/build-module/tab-panel/remove-tab-toolbar-control.mjs.map +2 -2
- package/build-module/tab-panel/save.mjs +2 -1
- package/build-module/tab-panel/save.mjs.map +2 -2
- package/build-module/tab-panels/block.json +2 -28
- package/build-module/tab-panels/init.mjs +7 -0
- package/build-module/tab-panels/init.mjs.map +7 -0
- package/build-module/table/edit.mjs +0 -2
- package/build-module/table/edit.mjs.map +2 -2
- package/build-module/table/index.mjs +1 -1
- package/build-module/table/index.mjs.map +2 -2
- package/build-module/tabs/block.json +3 -17
- package/build-module/tabs/edit.mjs +7 -21
- package/build-module/tabs/edit.mjs.map +2 -2
- package/build-module/tabs/index.mjs +6 -10
- package/build-module/tabs/index.mjs.map +2 -2
- package/build-module/tabs/use-tab-list-items-sync.mjs +32 -0
- package/build-module/tabs/use-tab-list-items-sync.mjs.map +7 -0
- package/build-module/tabs/view.mjs +22 -104
- package/build-module/tabs/view.mjs.map +2 -2
- package/build-module/template-part/edit/advanced-controls.mjs +0 -1
- package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
- package/build-module/template-part/edit/title-modal.mjs +1 -2
- package/build-module/template-part/edit/title-modal.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/utils/style-state.mjs +132 -0
- package/build-module/utils/style-state.mjs.map +7 -0
- package/build-module/utils/waveform-player.mjs +1 -1
- package/build-module/verse/edit.mjs +1 -1
- package/build-module/verse/edit.mjs.map +2 -2
- package/build-module/video/edit.mjs +3 -3
- package/build-module/video/edit.mjs.map +2 -2
- package/build-module/video/tracks-editor.mjs +0 -2
- package/build-module/video/tracks-editor.mjs.map +2 -2
- package/build-style/editor-rtl.css +0 -19
- package/build-style/editor.css +0 -19
- package/build-style/icon/style-rtl.css +9 -0
- package/build-style/icon/style.css +9 -0
- package/build-style/style-rtl.css +11 -24
- package/build-style/style.css +11 -24
- package/build-style/{tab → tab-list}/style-rtl.css +2 -2
- package/build-style/{tab → tab-list}/style.css +2 -2
- package/build-style/tab-panel/style-rtl.css +0 -17
- package/build-style/tab-panel/style.css +0 -17
- package/package.json +48 -45
- package/src/audio/edit.js +5 -9
- package/src/avatar/index.php +2 -2
- package/src/block/index.php +2 -26
- package/src/breadcrumbs/edit.js +0 -1
- package/src/button/edit.js +0 -1
- package/src/comment-author-avatar/index.php +3 -3
- package/src/comment-author-name/index.php +1 -1
- package/src/comment-date/index.php +1 -1
- package/src/cover/edit/block-controls.js +14 -2
- package/src/cover/edit/embed-video-url-input.js +0 -1
- package/src/cover/edit/index.js +86 -0
- package/src/cover/edit/inspector-controls.js +124 -54
- package/src/cover/test/edit.js +51 -2
- package/src/details/edit.js +0 -1
- package/src/editor.scss +0 -2
- package/src/file/edit.js +3 -16
- package/src/file/index.js +2 -0
- package/src/file/transforms.js +12 -31
- package/src/file/variations.js +17 -0
- package/src/form/edit.js +0 -2
- package/src/form-input/edit.js +0 -2
- package/src/freeform/edit.js +6 -29
- package/src/freeform/migration-notice.js +2 -4
- package/src/gallery/edit.js +13 -13
- package/src/home-link/edit.js +0 -1
- package/src/html/modal.js +3 -0
- package/src/icon/README.md +3 -0
- package/src/icon/block.json +12 -0
- package/src/icon/edit.js +85 -37
- package/src/icon/index.js +3 -1
- package/src/icon/index.php +23 -0
- package/src/icon/style.scss +12 -0
- package/src/icon/variations.js +9 -0
- package/src/image/README.md +1 -0
- package/src/image/block.json +1 -0
- package/src/image/edit.js +8 -3
- package/src/image/image.js +120 -56
- package/src/image/index.php +0 -1
- package/src/image/test/use-open-image-media-editor-modal.js +20 -26
- package/src/image/transforms.js +34 -8
- package/src/image/use-open-image-media-editor-modal.js +24 -42
- package/src/index.js +4 -11
- package/src/list/ordered-list-settings.js +0 -1
- package/src/navigation/edit/index.js +25 -16
- package/src/navigation/edit/navigation-menu-name-control.js +0 -1
- package/src/navigation/index.php +58 -0
- package/src/navigation-link/README.md +1 -1
- package/src/navigation-link/block.json +1 -1
- package/src/navigation-link/link-ui/page-creator.js +0 -1
- package/src/navigation-link/shared/controls.js +0 -2
- package/src/navigation-link/test/__snapshots__/hooks.js.snap +5 -0
- package/src/navigation-submenu/README.md +5 -0
- package/src/navigation-submenu/block.json +7 -0
- package/src/page-list/README.md +1 -1
- package/src/page-list/block.json +2 -5
- package/src/page-list/edit.js +0 -11
- package/src/page-list/index.php +1 -1
- package/src/playlist-track/edit.js +0 -3
- package/src/post-comment/edit.js +0 -1
- package/src/post-date/edit.js +2 -2
- package/src/post-featured-image/README.md +1 -0
- package/src/post-featured-image/block.json +1 -0
- package/src/post-featured-image/dimension-controls.js +105 -184
- package/src/post-featured-image/edit.js +53 -22
- package/src/post-featured-image/index.php +24 -22
- package/src/post-terms/edit.js +0 -1
- package/src/post-title/edit.js +0 -1
- package/src/pullquote/README.md +1 -1
- package/src/pullquote/block.json +1 -3
- package/src/pullquote/deprecated.js +121 -9
- package/src/pullquote/edit.js +7 -31
- package/src/pullquote/save.js +2 -13
- package/src/query/edit/enhanced-pagination-modal.js +11 -1
- package/src/query/edit/inspector-controls/index.js +0 -1
- package/src/rss/edit.js +0 -1
- package/src/search/README.md +1 -0
- package/src/search/block.json +4 -0
- package/src/search/edit.js +106 -55
- package/src/search/index.php +25 -1
- package/src/site-logo/edit.js +3 -1
- package/src/social-link/edit.js +0 -3
- package/src/style.scss +1 -2
- package/src/tab-list/README.md +19 -17
- package/src/tab-list/block.json +33 -20
- package/src/tab-list/edit.js +153 -15
- package/src/tab-list/index.php +24 -33
- package/src/tab-list/init.js +6 -0
- package/src/tab-list/save.js +39 -4
- package/src/{tab → tab-list}/style.scss +2 -3
- package/src/tab-panel/README.md +0 -3
- package/src/tab-panel/add-tab-toolbar-control.js +24 -11
- package/src/tab-panel/block.json +2 -6
- package/src/tab-panel/edit.js +1 -14
- package/src/tab-panel/index.php +2 -25
- package/src/tab-panel/remove-tab-toolbar-control.js +10 -14
- package/src/tab-panel/save.js +1 -0
- package/src/tab-panel/style.scss +0 -17
- package/src/tab-panels/README.md +0 -16
- package/src/tab-panels/block.json +2 -28
- package/src/tab-panels/init.js +6 -0
- package/src/table/edit.js +0 -2
- package/src/tabs/README.md +1 -7
- package/src/tabs/block.json +3 -17
- package/src/tabs/edit.js +8 -19
- package/src/tabs/index.js +6 -10
- package/src/tabs/index.php +12 -32
- package/src/tabs/use-tab-list-items-sync.js +49 -0
- package/src/tabs/view.js +22 -110
- package/src/template-part/edit/advanced-controls.js +0 -1
- package/src/template-part/edit/title-modal.js +0 -1
- package/src/utils/style-state.js +151 -0
- package/src/utils/test/style-state.js +307 -0
- package/src/video/edit.js +9 -16
- package/src/video/tracks-editor.js +0 -2
- package/babel-plugin.cjs +0 -150
- package/build/freeform/convert-to-blocks-button.cjs.map +0 -7
- package/build/list-item/utils.cjs +0 -57
- package/build/list-item/utils.cjs.map +0 -7
- package/build/tab/block.json +0 -56
- package/build/tab/controls.cjs +0 -46
- package/build/tab/controls.cjs.map +0 -7
- package/build/tab/edit.cjs +0 -135
- package/build/tab/edit.cjs.map +0 -7
- package/build/tab/index.cjs +0 -58
- package/build/tab/index.cjs.map +0 -7
- package/build/tab/save.cjs.map +0 -7
- package/build/tabs/use-tab-list-sync.cjs +0 -190
- package/build/tabs/use-tab-list-sync.cjs.map +0 -7
- package/build-module/freeform/convert-to-blocks-button.mjs +0 -19
- package/build-module/freeform/convert-to-blocks-button.mjs.map +0 -7
- package/build-module/list-item/utils.mjs +0 -32
- package/build-module/list-item/utils.mjs.map +0 -7
- package/build-module/tab/block.json +0 -56
- package/build-module/tab/controls.mjs +0 -15
- package/build-module/tab/controls.mjs.map +0 -7
- package/build-module/tab/edit.mjs +0 -108
- package/build-module/tab/edit.mjs.map +0 -7
- package/build-module/tab/index.mjs +0 -20
- package/build-module/tab/index.mjs.map +0 -7
- package/build-module/tab/save.mjs +0 -14
- package/build-module/tab/save.mjs.map +0 -7
- package/build-module/tabs/use-tab-list-sync.mjs +0 -169
- package/build-module/tabs/use-tab-list-sync.mjs.map +0 -7
- package/build-style/tab/editor-rtl.css +0 -11
- package/build-style/tab/editor.css +0 -11
- package/build-style/tab-list/editor-rtl.css +0 -6
- package/build-style/tab-list/editor.css +0 -6
- package/build-style/tab-panels/style-rtl.css +0 -4
- package/build-style/tab-panels/style.css +0 -4
- package/src/freeform/convert-to-blocks-button.js +0 -18
- package/src/list-item/utils.js +0 -34
- package/src/tab/README.md +0 -69
- package/src/tab/block.json +0 -56
- package/src/tab/controls.js +0 -19
- package/src/tab/edit.js +0 -141
- package/src/tab/editor.scss +0 -14
- package/src/tab/index.js +0 -24
- package/src/tab/index.php +0 -70
- package/src/tab/save.js +0 -13
- package/src/tab-list/editor.scss +0 -10
- package/src/tab-panels/style.scss +0 -4
- package/src/tabs/use-tab-list-sync.js +0 -237
|
@@ -19,6 +19,7 @@ import { select } from '@wordpress/data';
|
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
21
|
import { SOLID_COLOR_CLASS } from './shared';
|
|
22
|
+
import migrateTextAlignAttributeToBlockSupport from '../utils/migrate-text-align';
|
|
22
23
|
|
|
23
24
|
const blockAttributes = {
|
|
24
25
|
value: {
|
|
@@ -68,6 +69,117 @@ function multilineToInline( value ) {
|
|
|
68
69
|
return values.join( '<br>' );
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
const v6 = {
|
|
73
|
+
attributes: {
|
|
74
|
+
value: {
|
|
75
|
+
type: 'rich-text',
|
|
76
|
+
source: 'rich-text',
|
|
77
|
+
selector: 'p',
|
|
78
|
+
role: 'content',
|
|
79
|
+
},
|
|
80
|
+
citation: {
|
|
81
|
+
type: 'rich-text',
|
|
82
|
+
source: 'rich-text',
|
|
83
|
+
selector: 'cite',
|
|
84
|
+
role: 'content',
|
|
85
|
+
},
|
|
86
|
+
textAlign: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
supports: {
|
|
91
|
+
anchor: true,
|
|
92
|
+
align: [ 'left', 'right', 'wide', 'full' ],
|
|
93
|
+
background: {
|
|
94
|
+
backgroundImage: true,
|
|
95
|
+
backgroundSize: true,
|
|
96
|
+
__experimentalDefaultControls: {
|
|
97
|
+
backgroundImage: true,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
color: {
|
|
101
|
+
gradients: true,
|
|
102
|
+
background: true,
|
|
103
|
+
link: true,
|
|
104
|
+
__experimentalDefaultControls: {
|
|
105
|
+
background: true,
|
|
106
|
+
text: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
dimensions: {
|
|
110
|
+
minHeight: true,
|
|
111
|
+
},
|
|
112
|
+
spacing: {
|
|
113
|
+
margin: true,
|
|
114
|
+
padding: true,
|
|
115
|
+
},
|
|
116
|
+
typography: {
|
|
117
|
+
fontSize: true,
|
|
118
|
+
lineHeight: true,
|
|
119
|
+
__experimentalFontFamily: true,
|
|
120
|
+
__experimentalFontWeight: true,
|
|
121
|
+
__experimentalFontStyle: true,
|
|
122
|
+
__experimentalTextTransform: true,
|
|
123
|
+
__experimentalTextDecoration: true,
|
|
124
|
+
__experimentalLetterSpacing: true,
|
|
125
|
+
__experimentalDefaultControls: {
|
|
126
|
+
fontSize: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
__experimentalBorder: {
|
|
130
|
+
color: true,
|
|
131
|
+
radius: true,
|
|
132
|
+
style: true,
|
|
133
|
+
width: true,
|
|
134
|
+
__experimentalDefaultControls: {
|
|
135
|
+
color: true,
|
|
136
|
+
radius: true,
|
|
137
|
+
style: true,
|
|
138
|
+
width: true,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
__experimentalStyle: {
|
|
142
|
+
typography: {
|
|
143
|
+
fontSize: '1.5em',
|
|
144
|
+
lineHeight: '1.6',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
interactivity: {
|
|
148
|
+
clientNavigation: true,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
save( { attributes } ) {
|
|
152
|
+
const { textAlign, citation, value } = attributes;
|
|
153
|
+
const shouldShowCitation = ! RichText.isEmpty( citation );
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<figure
|
|
157
|
+
{ ...useBlockProps.save( {
|
|
158
|
+
className: clsx( {
|
|
159
|
+
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
160
|
+
} ),
|
|
161
|
+
} ) }
|
|
162
|
+
>
|
|
163
|
+
<blockquote>
|
|
164
|
+
<RichText.Content tagName="p" value={ value } />
|
|
165
|
+
{ shouldShowCitation && (
|
|
166
|
+
<RichText.Content tagName="cite" value={ citation } />
|
|
167
|
+
) }
|
|
168
|
+
</blockquote>
|
|
169
|
+
</figure>
|
|
170
|
+
);
|
|
171
|
+
},
|
|
172
|
+
isEligible( attributes ) {
|
|
173
|
+
return (
|
|
174
|
+
!! attributes.textAlign ||
|
|
175
|
+
!! attributes.className?.match(
|
|
176
|
+
/\bhas-text-align-(left|center|right)\b/
|
|
177
|
+
)
|
|
178
|
+
);
|
|
179
|
+
},
|
|
180
|
+
migrate: migrateTextAlignAttributeToBlockSupport,
|
|
181
|
+
};
|
|
182
|
+
|
|
71
183
|
// Version 5 created in #43210 / c4b2ca7f3f. Supports match block.json at the time.
|
|
72
184
|
const v5 = {
|
|
73
185
|
attributes: {
|
|
@@ -156,10 +268,10 @@ const v5 = {
|
|
|
156
268
|
);
|
|
157
269
|
},
|
|
158
270
|
migrate( { value, ...attributes } ) {
|
|
159
|
-
return {
|
|
271
|
+
return migrateTextAlignAttributeToBlockSupport( {
|
|
160
272
|
value: multilineToInline( value ),
|
|
161
273
|
...attributes,
|
|
162
|
-
};
|
|
274
|
+
} );
|
|
163
275
|
},
|
|
164
276
|
};
|
|
165
277
|
|
|
@@ -291,7 +403,7 @@ const v4 = {
|
|
|
291
403
|
};
|
|
292
404
|
}
|
|
293
405
|
|
|
294
|
-
return {
|
|
406
|
+
return migrateTextAlignAttributeToBlockSupport( {
|
|
295
407
|
value: multilineToInline( value ),
|
|
296
408
|
className,
|
|
297
409
|
backgroundColor: isSolidColorStyle ? mainColor : undefined,
|
|
@@ -299,7 +411,7 @@ const v4 = {
|
|
|
299
411
|
textAlign: isSolidColorStyle ? 'left' : undefined,
|
|
300
412
|
...attributes,
|
|
301
413
|
style,
|
|
302
|
-
};
|
|
414
|
+
} );
|
|
303
415
|
},
|
|
304
416
|
};
|
|
305
417
|
|
|
@@ -448,7 +560,7 @@ const v3 = {
|
|
|
448
560
|
};
|
|
449
561
|
}
|
|
450
562
|
}
|
|
451
|
-
return {
|
|
563
|
+
return migrateTextAlignAttributeToBlockSupport( {
|
|
452
564
|
value: multilineToInline( value ),
|
|
453
565
|
className,
|
|
454
566
|
backgroundColor: isSolidColorStyle ? mainColor : undefined,
|
|
@@ -456,7 +568,7 @@ const v3 = {
|
|
|
456
568
|
textAlign: isSolidColorStyle ? 'left' : undefined,
|
|
457
569
|
...attributes,
|
|
458
570
|
style,
|
|
459
|
-
};
|
|
571
|
+
} );
|
|
460
572
|
},
|
|
461
573
|
};
|
|
462
574
|
|
|
@@ -566,7 +678,7 @@ const v2 = {
|
|
|
566
678
|
};
|
|
567
679
|
}
|
|
568
680
|
|
|
569
|
-
return {
|
|
681
|
+
return migrateTextAlignAttributeToBlockSupport( {
|
|
570
682
|
value: multilineToInline( value ),
|
|
571
683
|
className,
|
|
572
684
|
backgroundColor: isSolidColorStyle ? mainColor : undefined,
|
|
@@ -574,7 +686,7 @@ const v2 = {
|
|
|
574
686
|
textAlign: isSolidColorStyle ? 'left' : undefined,
|
|
575
687
|
...attributes,
|
|
576
688
|
style,
|
|
577
|
-
};
|
|
689
|
+
} );
|
|
578
690
|
},
|
|
579
691
|
};
|
|
580
692
|
|
|
@@ -643,4 +755,4 @@ const v0 = {
|
|
|
643
755
|
*
|
|
644
756
|
* See block-deprecation.md
|
|
645
757
|
*/
|
|
646
|
-
export default [ v5, v4, v3, v2, v1, v0 ];
|
|
758
|
+
export default [ v6, v5, v4, v3, v2, v1, v0 ];
|
package/src/pullquote/edit.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
9
4
|
import { __ } from '@wordpress/i18n';
|
|
10
|
-
import {
|
|
11
|
-
AlignmentControl,
|
|
12
|
-
BlockControls,
|
|
13
|
-
RichText,
|
|
14
|
-
useBlockProps,
|
|
15
|
-
} from '@wordpress/block-editor';
|
|
5
|
+
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
16
6
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
17
7
|
|
|
18
8
|
/**
|
|
@@ -20,31 +10,17 @@ import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
|
20
10
|
*/
|
|
21
11
|
import { Figure } from './figure';
|
|
22
12
|
import { BlockQuote } from './blockquote';
|
|
13
|
+
import useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';
|
|
23
14
|
|
|
24
|
-
function PullQuoteEdit( {
|
|
25
|
-
attributes,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} ) {
|
|
30
|
-
const { textAlign, citation, value } = attributes;
|
|
31
|
-
const blockProps = useBlockProps( {
|
|
32
|
-
className: clsx( {
|
|
33
|
-
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
34
|
-
} ),
|
|
35
|
-
} );
|
|
15
|
+
function PullQuoteEdit( props ) {
|
|
16
|
+
const { attributes, setAttributes, isSelected, insertBlocksAfter } = props;
|
|
17
|
+
useDeprecatedTextAlign( props );
|
|
18
|
+
const { citation, value } = attributes;
|
|
19
|
+
const blockProps = useBlockProps();
|
|
36
20
|
const shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;
|
|
37
21
|
|
|
38
22
|
return (
|
|
39
23
|
<>
|
|
40
|
-
<BlockControls group="block">
|
|
41
|
-
<AlignmentControl
|
|
42
|
-
value={ textAlign }
|
|
43
|
-
onChange={ ( nextAlign ) => {
|
|
44
|
-
setAttributes( { textAlign: nextAlign } );
|
|
45
|
-
} }
|
|
46
|
-
/>
|
|
47
|
-
</BlockControls>
|
|
48
24
|
<Figure { ...blockProps }>
|
|
49
25
|
<BlockQuote>
|
|
50
26
|
<RichText
|
package/src/pullquote/save.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
9
4
|
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
10
5
|
|
|
11
6
|
export default function save( { attributes } ) {
|
|
12
|
-
const {
|
|
7
|
+
const { citation, value } = attributes;
|
|
13
8
|
const shouldShowCitation = ! RichText.isEmpty( citation );
|
|
14
9
|
|
|
15
10
|
return (
|
|
16
|
-
<figure
|
|
17
|
-
{ ...useBlockProps.save( {
|
|
18
|
-
className: clsx( {
|
|
19
|
-
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
20
|
-
} ),
|
|
21
|
-
} ) }
|
|
22
|
-
>
|
|
11
|
+
<figure { ...useBlockProps.save() }>
|
|
23
12
|
<blockquote>
|
|
24
13
|
<RichText.Content tagName="p" value={ value } />
|
|
25
14
|
{ shouldShowCitation && (
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
} from '@wordpress/components';
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
10
|
import { useState, useEffect } from '@wordpress/element';
|
|
11
|
+
import { useDispatch } from '@wordpress/data';
|
|
12
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* Internal dependencies
|
|
@@ -24,13 +26,21 @@ export default function EnhancedPaginationModal( {
|
|
|
24
26
|
} ) {
|
|
25
27
|
const [ isOpen, setOpen ] = useState( false );
|
|
26
28
|
const hasUnsupportedBlocks = useUnsupportedBlocks( clientId );
|
|
29
|
+
const { __unstableMarkNextChangeAsNotPersistent } =
|
|
30
|
+
useDispatch( blockEditorStore );
|
|
27
31
|
|
|
28
32
|
useEffect( () => {
|
|
29
33
|
if ( enhancedPagination && hasUnsupportedBlocks ) {
|
|
34
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
30
35
|
setAttributes( { enhancedPagination: false } );
|
|
31
36
|
setOpen( true );
|
|
32
37
|
}
|
|
33
|
-
}, [
|
|
38
|
+
}, [
|
|
39
|
+
enhancedPagination,
|
|
40
|
+
hasUnsupportedBlocks,
|
|
41
|
+
setAttributes,
|
|
42
|
+
__unstableMarkNextChangeAsNotPersistent,
|
|
43
|
+
] );
|
|
34
44
|
|
|
35
45
|
const closeModal = () => {
|
|
36
46
|
setOpen( false );
|
package/src/rss/edit.js
CHANGED
|
@@ -289,7 +289,6 @@ export default function RSSEdit( { attributes, setAttributes, name } ) {
|
|
|
289
289
|
</InspectorControls>
|
|
290
290
|
<InspectorControls group="advanced">
|
|
291
291
|
<TextControl
|
|
292
|
-
__next40pxDefaultSize
|
|
293
292
|
label={ __( 'Link relation' ) }
|
|
294
293
|
help={ createInterpolateElement(
|
|
295
294
|
__(
|
package/src/search/README.md
CHANGED
|
@@ -24,6 +24,7 @@ _Defined via the [`attributes`](https://developer.wordpress.org/block-editor/ref
|
|
|
24
24
|
| `buttonPosition` | `string` | `"button-outside"` | — |
|
|
25
25
|
| `buttonUseIcon` | `boolean` | `false` | — |
|
|
26
26
|
| `query` | `object` | `{}` | — |
|
|
27
|
+
| `tagName` | `string` | `""` | — |
|
|
27
28
|
|
|
28
29
|
## Supports
|
|
29
30
|
|
package/src/search/block.json
CHANGED
package/src/search/edit.js
CHANGED
|
@@ -35,6 +35,7 @@ import { useInstanceId } from '@wordpress/compose';
|
|
|
35
35
|
import { Icon, search } from '@wordpress/icons';
|
|
36
36
|
import { __, sprintf } from '@wordpress/i18n';
|
|
37
37
|
import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
|
|
38
|
+
import { speak } from '@wordpress/a11y';
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* Internal dependencies
|
|
@@ -47,6 +48,20 @@ import {
|
|
|
47
48
|
} from './utils.js';
|
|
48
49
|
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
49
50
|
|
|
51
|
+
// Help text describing each wrapper element option. Kept local to the block
|
|
52
|
+
// because the choices and their guidance are specific to the Search block.
|
|
53
|
+
const TAG_NAME_MESSAGES = {
|
|
54
|
+
'': __(
|
|
55
|
+
'Lets the theme decide. Uses the <search> landmark element if the theme opts in, otherwise a <form>.'
|
|
56
|
+
),
|
|
57
|
+
search: __(
|
|
58
|
+
'Wraps the block in a <search> landmark, announced as a search region by assistive technologies.'
|
|
59
|
+
),
|
|
60
|
+
form: __(
|
|
61
|
+
'Uses a <form role="search"> wrapper for backward compatibility with existing theme styles.'
|
|
62
|
+
),
|
|
63
|
+
};
|
|
64
|
+
|
|
50
65
|
// Used to calculate border radius adjustment to avoid "fat" corners when
|
|
51
66
|
// button is placed inside wrapper.
|
|
52
67
|
const DEFAULT_INNER_PADDING = '4px';
|
|
@@ -70,6 +85,7 @@ export default function SearchEdit( {
|
|
|
70
85
|
buttonText,
|
|
71
86
|
buttonPosition,
|
|
72
87
|
buttonUseIcon,
|
|
88
|
+
tagName,
|
|
73
89
|
style,
|
|
74
90
|
} = attributes;
|
|
75
91
|
|
|
@@ -477,6 +493,31 @@ export default function SearchEdit( {
|
|
|
477
493
|
</ToolsPanelItem>
|
|
478
494
|
</ToolsPanel>
|
|
479
495
|
</InspectorControls>
|
|
496
|
+
<InspectorControls group="advanced">
|
|
497
|
+
<SelectControl
|
|
498
|
+
__next40pxDefaultSize
|
|
499
|
+
label={ __( 'HTML element' ) }
|
|
500
|
+
value={ tagName ?? '' }
|
|
501
|
+
options={ [
|
|
502
|
+
{ label: __( 'Default' ), value: '' },
|
|
503
|
+
{ label: '<search>', value: 'search' },
|
|
504
|
+
{ label: '<form>', value: 'form' },
|
|
505
|
+
] }
|
|
506
|
+
onChange={ ( value ) => {
|
|
507
|
+
setAttributes( { tagName: value } );
|
|
508
|
+
// The help text is updated via aria-describedby, which
|
|
509
|
+
// is not re-announced while focus remains on the select.
|
|
510
|
+
// Announce the new description so it is not missed.
|
|
511
|
+
// speak() strips HTML-like tags, which would drop the
|
|
512
|
+
// element names (e.g. <search>) entirely. Remove only the
|
|
513
|
+
// angle brackets so the words are retained when spoken.
|
|
514
|
+
speak(
|
|
515
|
+
TAG_NAME_MESSAGES[ value ].replace( /[<>]/g, '' )
|
|
516
|
+
);
|
|
517
|
+
} }
|
|
518
|
+
help={ TAG_NAME_MESSAGES[ tagName ?? '' ] }
|
|
519
|
+
/>
|
|
520
|
+
</InspectorControls>
|
|
480
521
|
</>
|
|
481
522
|
);
|
|
482
523
|
|
|
@@ -559,64 +600,74 @@ export default function SearchEdit( {
|
|
|
559
600
|
typographyProps.className
|
|
560
601
|
);
|
|
561
602
|
|
|
603
|
+
// Reflect an explicit <search> choice in the editor markup so wrapper
|
|
604
|
+
// styles match the front end. The <form> and theme-deferred default keep
|
|
605
|
+
// the historical <div> to avoid nesting a live <form> in the editor.
|
|
606
|
+
const Wrapper = 'search' === tagName ? 'search' : 'div';
|
|
607
|
+
|
|
562
608
|
return (
|
|
563
|
-
|
|
609
|
+
<>
|
|
564
610
|
{ controls }
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
<ResizableBox
|
|
580
|
-
size={ {
|
|
581
|
-
width:
|
|
582
|
-
width === undefined
|
|
583
|
-
? 'auto'
|
|
584
|
-
: `${ width }${ widthUnit }`,
|
|
585
|
-
height: 'auto',
|
|
586
|
-
} }
|
|
587
|
-
className={ clsx(
|
|
588
|
-
'wp-block-search__inside-wrapper',
|
|
589
|
-
isButtonPositionInside ? borderProps.className : undefined
|
|
590
|
-
) }
|
|
591
|
-
style={ getWrapperStyles() }
|
|
592
|
-
minWidth={ MIN_WIDTH }
|
|
593
|
-
enable={ getResizableSides() }
|
|
594
|
-
onResizeStart={ ( event, direction, elt ) => {
|
|
595
|
-
setAttributes( {
|
|
596
|
-
width: parseInt( elt.offsetWidth, 10 ),
|
|
597
|
-
widthUnit: 'px',
|
|
598
|
-
} );
|
|
599
|
-
toggleSelection( false );
|
|
600
|
-
} }
|
|
601
|
-
onResizeStop={ ( event, direction, elt, delta ) => {
|
|
602
|
-
setAttributes( {
|
|
603
|
-
width: parseInt( width + delta.width, 10 ),
|
|
604
|
-
} );
|
|
605
|
-
toggleSelection( true );
|
|
606
|
-
} }
|
|
607
|
-
showHandle={ isSelected }
|
|
608
|
-
>
|
|
609
|
-
{ ( isButtonPositionInside ||
|
|
610
|
-
isButtonPositionOutside ||
|
|
611
|
-
hasOnlyButton ) && (
|
|
612
|
-
<>
|
|
613
|
-
{ renderTextField() }
|
|
614
|
-
{ renderButton() }
|
|
615
|
-
</>
|
|
611
|
+
<Wrapper { ...blockProps }>
|
|
612
|
+
{ showLabel && (
|
|
613
|
+
<RichText
|
|
614
|
+
identifier="label"
|
|
615
|
+
className={ labelClassnames }
|
|
616
|
+
aria-label={ __( 'Label text' ) }
|
|
617
|
+
placeholder={ __( 'Add label…' ) }
|
|
618
|
+
withoutInteractiveFormatting
|
|
619
|
+
value={ label }
|
|
620
|
+
onChange={ ( html ) =>
|
|
621
|
+
setAttributes( { label: html } )
|
|
622
|
+
}
|
|
623
|
+
style={ typographyProps.style }
|
|
624
|
+
/>
|
|
616
625
|
) }
|
|
617
626
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
627
|
+
<ResizableBox
|
|
628
|
+
size={ {
|
|
629
|
+
width:
|
|
630
|
+
width === undefined
|
|
631
|
+
? 'auto'
|
|
632
|
+
: `${ width }${ widthUnit }`,
|
|
633
|
+
height: 'auto',
|
|
634
|
+
} }
|
|
635
|
+
className={ clsx(
|
|
636
|
+
'wp-block-search__inside-wrapper',
|
|
637
|
+
isButtonPositionInside
|
|
638
|
+
? borderProps.className
|
|
639
|
+
: undefined
|
|
640
|
+
) }
|
|
641
|
+
style={ getWrapperStyles() }
|
|
642
|
+
minWidth={ MIN_WIDTH }
|
|
643
|
+
enable={ getResizableSides() }
|
|
644
|
+
onResizeStart={ ( event, direction, elt ) => {
|
|
645
|
+
setAttributes( {
|
|
646
|
+
width: parseInt( elt.offsetWidth, 10 ),
|
|
647
|
+
widthUnit: 'px',
|
|
648
|
+
} );
|
|
649
|
+
toggleSelection( false );
|
|
650
|
+
} }
|
|
651
|
+
onResizeStop={ ( event, direction, elt, delta ) => {
|
|
652
|
+
setAttributes( {
|
|
653
|
+
width: parseInt( width + delta.width, 10 ),
|
|
654
|
+
} );
|
|
655
|
+
toggleSelection( true );
|
|
656
|
+
} }
|
|
657
|
+
showHandle={ isSelected }
|
|
658
|
+
>
|
|
659
|
+
{ ( isButtonPositionInside ||
|
|
660
|
+
isButtonPositionOutside ||
|
|
661
|
+
hasOnlyButton ) && (
|
|
662
|
+
<>
|
|
663
|
+
{ renderTextField() }
|
|
664
|
+
{ renderButton() }
|
|
665
|
+
</>
|
|
666
|
+
) }
|
|
667
|
+
|
|
668
|
+
{ hasNoButton && renderTextField() }
|
|
669
|
+
</ResizableBox>
|
|
670
|
+
</Wrapper>
|
|
671
|
+
</>
|
|
621
672
|
);
|
|
622
673
|
}
|
package/src/search/index.php
CHANGED
|
@@ -191,8 +191,32 @@ function render_block_core_search( $attributes ) {
|
|
|
191
191
|
';
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
/*
|
|
195
|
+
* The semantic <search> landmark wrapper is opt-in to preserve back
|
|
196
|
+
* compatibility with themes targeting <form role="search">. The block
|
|
197
|
+
* exposes a per-instance HTML element selector with three values:
|
|
198
|
+
*
|
|
199
|
+
* - 'search' forces the <search> wrapper
|
|
200
|
+
* - 'form' forces the original <form role="search"> markup
|
|
201
|
+
* - empty defers to the 'search-element' html5 sub-feature
|
|
202
|
+
* ( add_theme_support( 'html5', array( 'search-element' ) ) ),
|
|
203
|
+
* matching the opt-in added to get_search_form() in core
|
|
204
|
+
*/
|
|
205
|
+
$tag_name = $attributes['tagName'] ?? '';
|
|
206
|
+
$use_search_element = 'search' === $tag_name || ( '' === $tag_name && current_theme_supports( 'html5', 'search-element' ) );
|
|
207
|
+
|
|
208
|
+
/*
|
|
209
|
+
* Only the wrapper markup differs between the semantic <search> landmark
|
|
210
|
+
* and the classic <form role="search">. Positional specifiers keep a
|
|
211
|
+
* single argument list usable by both formats, since the action URL
|
|
212
|
+
* precedes the wrapper attributes in the <search> variant.
|
|
213
|
+
*/
|
|
214
|
+
$format = $use_search_element
|
|
215
|
+
? '<search %2$s %3$s><form method="get" action="%1$s">%4$s</form></search>'
|
|
216
|
+
: '<form role="search" method="get" action="%1$s" %2$s %3$s>%4$s</form>';
|
|
217
|
+
|
|
194
218
|
return sprintf(
|
|
195
|
-
|
|
219
|
+
$format,
|
|
196
220
|
esc_url( home_url( '/' ) ),
|
|
197
221
|
$wrapper_attributes,
|
|
198
222
|
$form_directives,
|
package/src/site-logo/edit.js
CHANGED
|
@@ -75,7 +75,8 @@ const SiteLogo = ( {
|
|
|
75
75
|
const [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );
|
|
76
76
|
const [ isEditingImage, setIsEditingImage ] = useState( false );
|
|
77
77
|
const cropButtonRef = useRef();
|
|
78
|
-
const { toggleSelection } =
|
|
78
|
+
const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } =
|
|
79
|
+
useDispatch( blockEditorStore );
|
|
79
80
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
80
81
|
|
|
81
82
|
// Check if we're in contentOnly mode
|
|
@@ -108,6 +109,7 @@ const SiteLogo = ( {
|
|
|
108
109
|
// fallen out of sync. This can happen if the toggle is saved in the `on` position,
|
|
109
110
|
// but changes are later made to the site icon in the Customizer.
|
|
110
111
|
if ( shouldSyncIcon && logoId !== iconId ) {
|
|
112
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
111
113
|
setAttributes( { shouldSyncIcon: false } );
|
|
112
114
|
}
|
|
113
115
|
}, [] );
|
package/src/social-link/edit.js
CHANGED
|
@@ -191,7 +191,6 @@ const SocialLinkEdit = ( {
|
|
|
191
191
|
) }
|
|
192
192
|
renderContent={ () => (
|
|
193
193
|
<TextControl
|
|
194
|
-
__next40pxDefaultSize
|
|
195
194
|
className="wp-block-social-link__toolbar_content_text"
|
|
196
195
|
label={ __( 'Text' ) }
|
|
197
196
|
help={ __(
|
|
@@ -224,7 +223,6 @@ const SocialLinkEdit = ( {
|
|
|
224
223
|
} }
|
|
225
224
|
>
|
|
226
225
|
<TextControl
|
|
227
|
-
__next40pxDefaultSize
|
|
228
226
|
label={ __( 'Text' ) }
|
|
229
227
|
help={ __(
|
|
230
228
|
'The text is visible when enabled from the parent Social Icons block.'
|
|
@@ -240,7 +238,6 @@ const SocialLinkEdit = ( {
|
|
|
240
238
|
</InspectorControls>
|
|
241
239
|
<InspectorControls group="advanced">
|
|
242
240
|
<TextControl
|
|
243
|
-
__next40pxDefaultSize
|
|
244
241
|
label={ __( 'Link relation' ) }
|
|
245
242
|
help={ createInterpolateElement(
|
|
246
243
|
__(
|
package/src/style.scss
CHANGED
|
@@ -74,9 +74,8 @@
|
|
|
74
74
|
@use "./social-links/style.scss" as *;
|
|
75
75
|
@use "./spacer/style.scss" as *;
|
|
76
76
|
@use "./tag-cloud/style.scss" as *;
|
|
77
|
-
@use "./tab/style.scss" as *;
|
|
77
|
+
@use "./tab-list/style.scss" as *;
|
|
78
78
|
@use "./tab-panel/style.scss" as *;
|
|
79
|
-
@use "./tab-panels/style.scss" as *;
|
|
80
79
|
@use "./table/style.scss" as *;
|
|
81
80
|
@use "./table-of-contents/style.scss" as *;
|
|
82
81
|
@use "./tabs/style.scss" as *;
|