@wordpress/block-library 11.0.0 → 11.0.2-next.v.202609171837.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 +18 -0
- package/README.md +7 -7
- package/build/archives/edit.cjs.map +3 -3
- package/build/audio/edit.cjs.map +3 -3
- package/build/avatar/hooks.cjs.map +2 -2
- package/build/button/edit.cjs.map +2 -2
- package/build/categories/edit.cjs.map +3 -3
- package/build/code/block.json +1 -0
- package/build/code/save.cjs.map +2 -2
- package/build/comment-template/hooks.cjs.map +2 -2
- package/build/cover/edit/index.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/cover/transforms.cjs.map +2 -2
- package/build/details/block.json +1 -0
- package/build/details/index.cjs.map +2 -2
- package/build/embed/embed-controls.cjs.map +2 -2
- 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 +1 -0
- package/build/footnotes/edit.cjs.map +2 -2
- package/build/gallery/dynamic-gallery.cjs.map +3 -3
- package/build/gallery/edit.cjs +64 -37
- 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/heading/block.json +2 -0
- package/build/heading/index.cjs.map +2 -2
- 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.map +2 -2
- package/build/index.cjs.map +2 -2
- package/build/latest-comments/edit.cjs.map +3 -3
- 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/math/block.json +2 -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/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.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/shared/invalid-draft-display.cjs.map +2 -2
- package/build/navigation-submenu/edit.cjs.map +2 -2
- package/build/paragraph/block.json +1 -0
- 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/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-name/edit.cjs.map +2 -2
- package/build/post-content/block.json +1 -0
- package/build/post-date/edit.cjs.map +2 -2
- package/build/post-excerpt/block.json +1 -0
- package/build/post-excerpt/edit.cjs.map +2 -2
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-navigation-link/edit.cjs.map +3 -3
- package/build/post-time-to-read/edit.cjs.map +2 -2
- 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-title/use-archive-label.cjs.map +2 -2
- package/build/quote/deprecated.cjs.map +2 -2
- package/build/quote/transforms.cjs.map +2 -2
- package/build/search/edit.cjs.map +3 -3
- package/build/separator/edit.cjs.map +3 -3
- package/build/social-links/edit.cjs.map +3 -3
- package/build/table/state.cjs.map +2 -2
- package/build/table-of-contents/edit.cjs.map +3 -3
- package/build/table-of-contents/utils.cjs.map +2 -2
- package/build/tabs/use-tab-actions.cjs.map +2 -2
- 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/term-count/use-term-count.cjs.map +2 -2
- package/build/term-description/use-term-description.cjs.map +2 -2
- package/build/term-name/use-term-name.cjs.map +2 -2
- 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/verse/block.json +1 -0
- package/build/video/edit-common-settings.cjs.map +3 -3
- package/build/video/tracks-editor.cjs.map +3 -3
- package/build-module/archives/edit.mjs +2 -2
- package/build-module/archives/edit.mjs.map +2 -2
- 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/button/edit.mjs.map +2 -2
- package/build-module/categories/edit.mjs +2 -2
- package/build-module/categories/edit.mjs.map +2 -2
- package/build-module/code/block.json +1 -0
- package/build-module/code/save.mjs.map +2 -2
- package/build-module/comment-template/hooks.mjs.map +2 -2
- package/build-module/cover/edit/index.mjs.map +2 -2
- 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 +1 -0
- package/build-module/details/index.mjs.map +2 -2
- package/build-module/embed/embed-controls.mjs.map +2 -2
- 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 +1 -0
- package/build-module/footnotes/edit.mjs.map +2 -2
- 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 +67 -40
- 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/heading/block.json +2 -0
- package/build-module/heading/index.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.map +2 -2
- package/build-module/index.mjs.map +2 -2
- package/build-module/latest-comments/edit.mjs +2 -2
- package/build-module/latest-comments/edit.mjs.map +2 -2
- 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/math/block.json +2 -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/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.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/shared/invalid-draft-display.mjs.map +2 -2
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/paragraph/block.json +1 -0
- 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/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-name/edit.mjs.map +2 -2
- package/build-module/post-content/block.json +1 -0
- package/build-module/post-date/edit.mjs.map +2 -2
- package/build-module/post-excerpt/block.json +1 -0
- package/build-module/post-excerpt/edit.mjs.map +2 -2
- 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-time-to-read/edit.mjs.map +2 -2
- 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-title/use-archive-label.mjs.map +2 -2
- package/build-module/quote/deprecated.mjs.map +2 -2
- package/build-module/quote/transforms.mjs.map +2 -2
- 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/social-links/edit.mjs +2 -2
- package/build-module/social-links/edit.mjs.map +2 -2
- package/build-module/table/state.mjs.map +2 -2
- 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/use-tab-actions.mjs.map +2 -2
- 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/term-count/use-term-count.mjs.map +2 -2
- package/build-module/term-description/use-term-description.mjs.map +2 -2
- package/build-module/term-name/use-term-name.mjs.map +2 -2
- 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/verse/block.json +1 -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/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 +9 -5
- package/build-style/editor.css +9 -5
- 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/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 +1 -1
- package/build-style/navigation/style.css +1 -1
- 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 +23 -19
- package/build-style/style.css +23 -19
- 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 +40 -40
- package/src/archives/edit.jsx +2 -2
- package/src/audio/edit.jsx +2 -2
- package/src/avatar/hooks.js +2 -2
- package/src/button/edit.jsx +1 -1
- package/src/button/style.scss +2 -2
- package/src/calendar/index.php +1 -1
- package/src/categories/edit.jsx +2 -2
- package/src/code/README.md +1 -0
- package/src/code/block.json +1 -0
- package/src/code/save.jsx +1 -1
- package/src/columns/style.scss +2 -3
- package/src/comment-template/hooks.js +1 -1
- package/src/comments/style.scss +1 -1
- package/src/common.scss +1 -2
- package/src/cover/edit/index.jsx +2 -2
- package/src/cover/edit/inspector-controls.jsx +2 -2
- package/src/cover/style.scss +10 -0
- package/src/cover/test/{edit.jsdom.test.js → edit.browser.test.js} +104 -145
- package/src/cover/transforms.js +3 -3
- package/src/details/README.md +1 -0
- package/src/details/block.json +1 -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/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 +1 -0
- package/src/footnotes/block.json +1 -0
- package/src/footnotes/edit.jsx +1 -1
- package/src/gallery/dynamic-gallery.jsx +4 -4
- package/src/gallery/edit.jsx +121 -68
- 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/heading/README.md +2 -0
- package/src/heading/block.json +2 -0
- package/src/heading/index.js +2 -2
- package/src/html/modal.jsx +0 -3
- package/src/image/edit.jsx +1 -1
- package/src/image/image.jsx +7 -7
- 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 +1 -1
- package/src/index.jsx +1 -1
- package/src/latest-comments/edit.jsx +2 -2
- 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/math/README.md +2 -2
- package/src/math/block.json +2 -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/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 +1 -1
- 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 +1 -1
- 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/shared/invalid-draft-display.jsx +2 -2
- package/src/navigation-link/test/__snapshots__/hooks.jsdom.test.js.snap +41 -11
- package/src/navigation-submenu/edit.jsx +1 -1
- package/src/paragraph/README.md +1 -0
- package/src/paragraph/block.json +1 -0
- package/src/paragraph/edit.jsx +1 -1
- package/src/paragraph/index.js +7 -0
- package/src/pattern/index.php +2 -2
- 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-name/edit.jsx +1 -1
- package/src/post-content/README.md +1 -0
- package/src/post-content/block.json +1 -0
- package/src/post-date/edit.jsx +2 -2
- package/src/post-excerpt/README.md +1 -0
- package/src/post-excerpt/block.json +1 -0
- package/src/post-excerpt/edit.jsx +1 -1
- package/src/post-featured-image/edit.jsx +2 -2
- package/src/post-navigation-link/edit.jsx +4 -4
- package/src/post-time-to-read/edit.jsx +2 -2
- package/src/post-title/style.scss +2 -3
- 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-pagination/editor.scss +0 -3
- package/src/query-title/use-archive-label.js +1 -1
- package/src/quote/deprecated.jsx +2 -2
- package/src/quote/transforms.js +3 -3
- package/src/search/edit.jsx +6 -6
- package/src/search/theme.scss +1 -1
- package/src/separator/edit.jsx +7 -4
- package/src/social-links/edit.jsx +2 -2
- package/src/table/state.js +1 -1
- package/src/table-of-contents/edit.jsx +6 -6
- package/src/table-of-contents/utils.ts +2 -2
- package/src/tabs/use-tab-actions.js +1 -1
- 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/term-count/use-term-count.js +1 -1
- package/src/term-description/use-term-description.js +1 -1
- package/src/term-name/use-term-name.js +1 -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/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/edit-common-settings.jsx +3 -3
- package/src/video/tracks-editor.jsx +2 -2
- package/build/gallery/flex-styles.cjs.map +0 -7
- package/build-module/gallery/flex-styles.mjs.map +0 -7
- package/src/gallery/flex-styles.js +0 -99
|
@@ -46,9 +46,9 @@ export default function useGenerateDefaultNavigationTitle( clientId ) {
|
|
|
46
46
|
// translators: %s: the name of a menu (e.g. Header menu).
|
|
47
47
|
__( '%s menu' ),
|
|
48
48
|
area
|
|
49
|
-
|
|
49
|
+
)
|
|
50
50
|
: // translators: 'menu' as in website navigation menu.
|
|
51
|
-
|
|
51
|
+
__( 'Menu' );
|
|
52
52
|
|
|
53
53
|
// Determine how many menus start with the automatic title.
|
|
54
54
|
const matchingMenuTitleCount = [
|
|
@@ -217,6 +217,7 @@ $color-control-label-height: 20px;
|
|
|
217
217
|
background-color: $gray-900;
|
|
218
218
|
color: $white;
|
|
219
219
|
height: $button-size-small;
|
|
220
|
+
width: $button-size-small;
|
|
220
221
|
|
|
221
222
|
// This needs specificity to override an inherited padding.
|
|
222
223
|
// That source padding in turn has high specificity to protect
|
package/src/navigation/index.php
CHANGED
|
@@ -832,6 +832,14 @@ class WP_Navigation_Block_Renderer {
|
|
|
832
832
|
$responsive_container_content_directives = '
|
|
833
833
|
data-wp-watch="callbacks.focusFirstElement"
|
|
834
834
|
';
|
|
835
|
+
|
|
836
|
+
// The default overlay displays every submenu it contains; a custom overlay
|
|
837
|
+
// opts out through the `disable-default-overlay` class on this container.
|
|
838
|
+
// Submenus inherit this flag to tell the two apart, derived from the same
|
|
839
|
+
// value as that class so the markup and the styles cannot disagree.
|
|
840
|
+
if ( $has_custom_overlay ) {
|
|
841
|
+
$responsive_container_directives .= ' ' . wp_interactivity_data_wp_context( array( 'hasCustomOverlay' => true ) );
|
|
842
|
+
}
|
|
835
843
|
}
|
|
836
844
|
|
|
837
845
|
// Don't apply overlay inline styles if using a custom overlay template part.
|
|
@@ -1048,6 +1056,10 @@ class WP_Navigation_Block_Renderer {
|
|
|
1048
1056
|
|
|
1049
1057
|
unset( $attributes['rgbTextColor'], $attributes['rgbBackgroundColor'] );
|
|
1050
1058
|
|
|
1059
|
+
// Submenu detection is memoized while a navigation block renders. Reset it so
|
|
1060
|
+
// the result of a previously rendered navigation block is not reused for this one.
|
|
1061
|
+
static::$has_submenus = false;
|
|
1062
|
+
|
|
1051
1063
|
$inner_blocks = static::get_inner_blocks( $attributes, $block );
|
|
1052
1064
|
// Prevent navigation blocks referencing themselves from rendering.
|
|
1053
1065
|
if ( block_core_navigation_block_tree_has_block_type(
|
|
@@ -67,11 +67,9 @@ function resolveReadPermission( registry, allowed ) {
|
|
|
67
67
|
const dispatch = registry.dispatch( coreStore );
|
|
68
68
|
dispatch.receiveUserPermission( 'read/postType/wp_navigation', allowed );
|
|
69
69
|
dispatch.startResolution( 'canUser', [
|
|
70
|
-
'read',
|
|
71
70
|
{ kind: 'postType', name: 'wp_navigation' },
|
|
72
71
|
] );
|
|
73
72
|
dispatch.finishResolution( 'canUser', [
|
|
74
|
-
'read',
|
|
75
73
|
{ kind: 'postType', name: 'wp_navigation' },
|
|
76
74
|
] );
|
|
77
75
|
}
|
|
@@ -82,25 +80,17 @@ function resolveReadRecordPermission( registry, ref, allowed ) {
|
|
|
82
80
|
`read/postType/wp_navigation/${ ref }`,
|
|
83
81
|
allowed
|
|
84
82
|
);
|
|
85
|
-
dispatch.startResolution( 'canUser', [
|
|
86
|
-
|
|
87
|
-
{ ...BASE_ENTITY, id: ref },
|
|
88
|
-
] );
|
|
89
|
-
dispatch.finishResolution( 'canUser', [
|
|
90
|
-
'read',
|
|
91
|
-
{ ...BASE_ENTITY, id: ref },
|
|
92
|
-
] );
|
|
83
|
+
dispatch.startResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
84
|
+
dispatch.finishResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
93
85
|
}
|
|
94
86
|
|
|
95
87
|
function resolveCreatePermission( registry, allowed ) {
|
|
96
88
|
const dispatch = registry.dispatch( coreStore );
|
|
97
89
|
dispatch.receiveUserPermission( 'create/postType/wp_navigation', allowed );
|
|
98
90
|
dispatch.startResolution( 'canUser', [
|
|
99
|
-
'create',
|
|
100
91
|
{ kind: 'postType', name: 'wp_navigation' },
|
|
101
92
|
] );
|
|
102
93
|
dispatch.finishResolution( 'canUser', [
|
|
103
|
-
'create',
|
|
104
94
|
{ kind: 'postType', name: 'wp_navigation' },
|
|
105
95
|
] );
|
|
106
96
|
}
|
|
@@ -111,14 +101,8 @@ function resolveUpdatePermission( registry, ref, allowed ) {
|
|
|
111
101
|
`update/postType/wp_navigation/${ ref }`,
|
|
112
102
|
allowed
|
|
113
103
|
);
|
|
114
|
-
dispatch.startResolution( 'canUser', [
|
|
115
|
-
|
|
116
|
-
{ ...BASE_ENTITY, id: ref },
|
|
117
|
-
] );
|
|
118
|
-
dispatch.finishResolution( 'canUser', [
|
|
119
|
-
'update',
|
|
120
|
-
{ ...BASE_ENTITY, id: ref },
|
|
121
|
-
] );
|
|
104
|
+
dispatch.startResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
105
|
+
dispatch.finishResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
122
106
|
}
|
|
123
107
|
|
|
124
108
|
function resolveDeletePermission( registry, ref, allowed ) {
|
|
@@ -127,14 +111,8 @@ function resolveDeletePermission( registry, ref, allowed ) {
|
|
|
127
111
|
`delete/postType/wp_navigation/${ ref }`,
|
|
128
112
|
allowed
|
|
129
113
|
);
|
|
130
|
-
dispatch.startResolution( 'canUser', [
|
|
131
|
-
|
|
132
|
-
{ ...BASE_ENTITY, id: ref },
|
|
133
|
-
] );
|
|
134
|
-
dispatch.finishResolution( 'canUser', [
|
|
135
|
-
'delete',
|
|
136
|
-
{ ...BASE_ENTITY, id: ref },
|
|
137
|
-
] );
|
|
114
|
+
dispatch.startResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
115
|
+
dispatch.finishResolution( 'canUser', [ { ...BASE_ENTITY, id: ref } ] );
|
|
138
116
|
}
|
|
139
117
|
|
|
140
118
|
describe( 'useNavigationMenus', () => {
|
|
@@ -50,4 +50,27 @@ describe( 'Navigation view script', () => {
|
|
|
50
50
|
expect( mockCurrentContext.submenuOpenedBy.hover ).toBe( false );
|
|
51
51
|
expect( state.isSubmenuOpen ).toBe( true ); // remains true because overlay is still open
|
|
52
52
|
} );
|
|
53
|
+
|
|
54
|
+
it( 'keeps a submenu inside an open custom overlay closed until it is opened', () => {
|
|
55
|
+
// A custom overlay is excluded from the styles that display every
|
|
56
|
+
// submenu, so opening the overlay must not report the submenu as open.
|
|
57
|
+
mockCurrentContext = {
|
|
58
|
+
type: 'submenu',
|
|
59
|
+
submenuOpenedBy: { click: false, hover: false, focus: false },
|
|
60
|
+
overlayOpenedBy: { click: true, hover: false, focus: false },
|
|
61
|
+
hasCustomOverlay: true,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const { state, actions } = mockRegisteredStore;
|
|
65
|
+
|
|
66
|
+
expect( state.isSubmenuOpen ).toBe( false );
|
|
67
|
+
|
|
68
|
+
// Opening the submenu itself is what expands it.
|
|
69
|
+
actions.openMenu( 'click' );
|
|
70
|
+
expect( state.isSubmenuOpen ).toBe( true );
|
|
71
|
+
|
|
72
|
+
// And it can be closed again while the overlay stays open.
|
|
73
|
+
actions.closeMenu( 'click' );
|
|
74
|
+
expect( state.isSubmenuOpen ).toBe( false );
|
|
75
|
+
} );
|
|
53
76
|
} );
|
package/src/navigation/view.js
CHANGED
|
@@ -79,14 +79,17 @@ const { state, actions } = store(
|
|
|
79
79
|
},
|
|
80
80
|
get isSubmenuOpen() {
|
|
81
81
|
const ctx = getContext();
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// toggle's `aria-expanded` should reflect that immediately
|
|
85
|
-
// instead of waiting for a hover/click/focus interaction.
|
|
86
|
-
const isOverlayOpen =
|
|
82
|
+
const isDefaultOverlayOpen =
|
|
83
|
+
! ctx.hasCustomOverlay &&
|
|
87
84
|
Object.values( ctx.overlayOpenedBy || {} ).filter( Boolean )
|
|
88
85
|
.length > 0;
|
|
89
|
-
|
|
86
|
+
|
|
87
|
+
// A submenu can be opened by user interaction or by being in a default overlay.
|
|
88
|
+
// If it is a regular navigation or within a custom overlay, it is opened by user interaction.
|
|
89
|
+
// If it's in a default overlay, it is forced opened via CSS.
|
|
90
|
+
// Because default overlays always force submenus open, we return true
|
|
91
|
+
// if the default overlay is open.
|
|
92
|
+
return isDefaultOverlayOpen || state.isMenuOpen;
|
|
90
93
|
},
|
|
91
94
|
},
|
|
92
95
|
actions: {
|
|
@@ -124,7 +124,7 @@ export default function NavigationLinkEdit( {
|
|
|
124
124
|
: getBlockParentsByBlockName(
|
|
125
125
|
clientId,
|
|
126
126
|
'core/navigation'
|
|
127
|
-
|
|
127
|
+
)[ 0 ];
|
|
128
128
|
|
|
129
129
|
// Get the immediate parent - if it's a submenu, use it; otherwise use the navigation block
|
|
130
130
|
const parentBlockId =
|
|
@@ -26,9 +26,9 @@ export function InvalidDraftDisplay( {
|
|
|
26
26
|
|
|
27
27
|
const statusText = isInvalid
|
|
28
28
|
? /* translators: Indicating that the navigation link is Invalid. */
|
|
29
|
-
|
|
29
|
+
__( 'Invalid' )
|
|
30
30
|
: /* translators: Indicating that the navigation link is a Draft. */
|
|
31
|
-
|
|
31
|
+
__( 'Draft' );
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<div
|
|
@@ -9,12 +9,19 @@ exports[`hooks > enhanceNavigationLinkVariations > enhances variations with icon
|
|
|
9
9
|
"attributes": {},
|
|
10
10
|
"description": "A link to a custom URL.",
|
|
11
11
|
"icon": <SVG
|
|
12
|
-
|
|
12
|
+
stroke="currentColor"
|
|
13
|
+
strokeWidth="1.5"
|
|
14
|
+
style={
|
|
15
|
+
{
|
|
16
|
+
"fill": "none",
|
|
17
|
+
}
|
|
18
|
+
}
|
|
13
19
|
viewBox="0 0 24 24"
|
|
14
20
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
21
|
>
|
|
16
22
|
<Path
|
|
17
|
-
d="
|
|
23
|
+
d="M8 12V8M8 4V8M8 8H12M8 8H4M8 8L10.8284 10.8284M8 8L5.17157 5.17157M8 8L10.8284 5.17157M8 8L5.17157 10.8284M4 15H20M4 19H13"
|
|
24
|
+
vectorEffect="non-scaling-stroke"
|
|
18
25
|
/>
|
|
19
26
|
</SVG>,
|
|
20
27
|
"isActive": [Function],
|
|
@@ -27,12 +34,19 @@ exports[`hooks > enhanceNavigationLinkVariations > enhances variations with icon
|
|
|
27
34
|
},
|
|
28
35
|
"description": "A link to a post.",
|
|
29
36
|
"icon": <SVG
|
|
30
|
-
|
|
37
|
+
stroke="currentColor"
|
|
38
|
+
strokeWidth="1.5"
|
|
39
|
+
style={
|
|
40
|
+
{
|
|
41
|
+
"fill": "none",
|
|
42
|
+
}
|
|
43
|
+
}
|
|
31
44
|
viewBox="0 0 24 24"
|
|
32
45
|
xmlns="http://www.w3.org/2000/svg"
|
|
33
46
|
>
|
|
34
47
|
<Path
|
|
35
|
-
d="
|
|
48
|
+
d="M7 10H8.5M10 10H17M7 14H8.5M10 14H17M6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25Z"
|
|
49
|
+
vectorEffect="non-scaling-stroke"
|
|
36
50
|
/>
|
|
37
51
|
</SVG>,
|
|
38
52
|
"isActive": [Function],
|
|
@@ -45,15 +59,19 @@ exports[`hooks > enhanceNavigationLinkVariations > enhances variations with icon
|
|
|
45
59
|
},
|
|
46
60
|
"description": "A link to a page.",
|
|
47
61
|
"icon": <SVG
|
|
48
|
-
|
|
62
|
+
stroke="currentColor"
|
|
63
|
+
strokeWidth="1.5"
|
|
64
|
+
style={
|
|
65
|
+
{
|
|
66
|
+
"fill": "none",
|
|
67
|
+
}
|
|
68
|
+
}
|
|
49
69
|
viewBox="0 0 24 24"
|
|
50
70
|
xmlns="http://www.w3.org/2000/svg"
|
|
51
71
|
>
|
|
52
72
|
<Path
|
|
53
|
-
d="
|
|
54
|
-
|
|
55
|
-
<Path
|
|
56
|
-
d="M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"
|
|
73
|
+
d="M8.5 8.25H15.5M8.5 11.75H15.5M8.5 15.25H15.5M18.25 18V6C18.25 5.30964 17.6904 4.75 17 4.75H7C6.30964 4.75 5.75 5.30964 5.75 6L5.75 18C5.75 18.6904 6.30964 19.25 7 19.25H17C17.6904 19.25 18.25 18.6904 18.25 18Z"
|
|
74
|
+
vectorEffect="non-scaling-stroke"
|
|
57
75
|
/>
|
|
58
76
|
</SVG>,
|
|
59
77
|
"isActive": [Function],
|
|
@@ -103,12 +121,24 @@ exports[`hooks > enhanceNavigationLinkVariations > enhances variations with icon
|
|
|
103
121
|
},
|
|
104
122
|
"description": "A link to a tag.",
|
|
105
123
|
"icon": <SVG
|
|
106
|
-
|
|
124
|
+
stroke="currentColor"
|
|
125
|
+
strokeWidth="1.5"
|
|
126
|
+
style={
|
|
127
|
+
{
|
|
128
|
+
"fill": "none",
|
|
129
|
+
}
|
|
130
|
+
}
|
|
107
131
|
viewBox="0 0 24 24"
|
|
108
132
|
xmlns="http://www.w3.org/2000/svg"
|
|
109
133
|
>
|
|
110
134
|
<Path
|
|
111
|
-
d="M4.75
|
|
135
|
+
d="M4.75 12.5429V4.85C4.75 4.79477 4.79477 4.75 4.85 4.75H12.5429C12.6755 4.75 12.8027 4.80268 12.8964 4.89645L20.1464 12.1464C20.3417 12.3417 20.3417 12.6583 20.1464 12.8536L12.8536 20.1464C12.6583 20.3417 12.3417 20.3417 12.1464 20.1464L4.89645 12.8964C4.80268 12.8027 4.75 12.6755 4.75 12.5429Z"
|
|
136
|
+
vectorEffect="non-scaling-stroke"
|
|
137
|
+
/>
|
|
138
|
+
<Path
|
|
139
|
+
d="M9.75 8.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
|
|
140
|
+
fill="currentColor"
|
|
141
|
+
stroke="none"
|
|
112
142
|
/>
|
|
113
143
|
</SVG>,
|
|
114
144
|
"isActive": [Function],
|
package/src/paragraph/README.md
CHANGED
|
@@ -40,6 +40,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
40
40
|
- [`textAlign`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-textalign): `true`
|
|
41
41
|
- `textColumns`: `true`
|
|
42
42
|
- `textIndent`: `true`
|
|
43
|
+
- [`textShadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-textshadow): `true`
|
|
43
44
|
- `fitText`: `true`
|
|
44
45
|
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
45
46
|
- `clientNavigation`: `true`
|
package/src/paragraph/block.json
CHANGED
package/src/paragraph/edit.jsx
CHANGED
|
@@ -122,7 +122,7 @@ function ParagraphBlock( {
|
|
|
122
122
|
'aria-label': RichText.isEmpty( content )
|
|
123
123
|
? __(
|
|
124
124
|
'Empty block; start writing or type forward slash to choose a block'
|
|
125
|
-
|
|
125
|
+
)
|
|
126
126
|
: __( 'Block: Paragraph' ),
|
|
127
127
|
} );
|
|
128
128
|
const blockEditingMode = useBlockEditingMode();
|
package/src/paragraph/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { __ } from '@wordpress/i18n';
|
|
2
2
|
import { paragraph as icon } from '@wordpress/icons';
|
|
3
|
+
import { privateApis as blocksPrivateApis } from '@wordpress/blocks';
|
|
3
4
|
import initBlock from '../utils/init-block';
|
|
4
5
|
import deprecated from './deprecated';
|
|
5
6
|
import edit from './edit';
|
|
6
7
|
import metadata from './block.json';
|
|
7
8
|
import save from './save';
|
|
8
9
|
import transforms from './transforms';
|
|
10
|
+
import { unlock } from '../lock-unlock';
|
|
11
|
+
|
|
12
|
+
const { editableRootKey } = unlock( blocksPrivateApis );
|
|
9
13
|
|
|
10
14
|
const { name } = metadata;
|
|
11
15
|
|
|
@@ -13,6 +17,9 @@ export { metadata, name };
|
|
|
13
17
|
|
|
14
18
|
export const settings = {
|
|
15
19
|
icon,
|
|
20
|
+
// Opt into the editing host behaviour privately. It's a Symbol setting
|
|
21
|
+
// rather than a public `supports` key so it stays an internal detail.
|
|
22
|
+
[ editableRootKey ]: true,
|
|
16
23
|
example: {
|
|
17
24
|
attributes: {
|
|
18
25
|
content: __(
|
package/src/pattern/index.php
CHANGED
|
@@ -60,11 +60,11 @@ function render_block_core_pattern( $attributes ) {
|
|
|
60
60
|
|
|
61
61
|
$seen_refs[ $slug ] = true;
|
|
62
62
|
|
|
63
|
-
$content = do_blocks( $content );
|
|
64
|
-
|
|
65
63
|
global $wp_embed;
|
|
66
64
|
$content = $wp_embed->autoembed( $content );
|
|
67
65
|
|
|
66
|
+
$content = do_blocks( $content );
|
|
67
|
+
|
|
68
68
|
unset( $seen_refs[ $slug ] );
|
|
69
69
|
return $content;
|
|
70
70
|
}
|
package/src/playlist/edit.jsx
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
ToggleControl,
|
|
17
17
|
Disabled,
|
|
18
|
-
SelectControl,
|
|
18
|
+
SelectControl as WCSelectControl,
|
|
19
19
|
__experimentalToolsPanel as ToolsPanel,
|
|
20
20
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
21
21
|
} from '@wordpress/components';
|
|
@@ -32,6 +32,7 @@ import { PlaylistContext } from './context';
|
|
|
32
32
|
import { getTrackAttributes } from './utils';
|
|
33
33
|
|
|
34
34
|
const ALLOWED_MEDIA_TYPES = [ 'audio' ];
|
|
35
|
+
const EMPTY_ARRAY = [];
|
|
35
36
|
const AUDIO_FILE_EXTENSION =
|
|
36
37
|
/\.(aac|aif|aiff|flac|m4a|m4b|mp3|oga|ogg|opus|wav|weba)$/i;
|
|
37
38
|
const DEFAULT_WAVEFORM_STYLE = 'bars';
|
|
@@ -130,7 +131,8 @@ const PlaylistEdit = ( {
|
|
|
130
131
|
( select ) => {
|
|
131
132
|
const { getBlock: _getBlock } = select( blockEditorStore );
|
|
132
133
|
return {
|
|
133
|
-
innerBlockTracks:
|
|
134
|
+
innerBlockTracks:
|
|
135
|
+
_getBlock( clientId )?.innerBlocks ?? EMPTY_ARRAY,
|
|
134
136
|
};
|
|
135
137
|
},
|
|
136
138
|
[ clientId ]
|
|
@@ -652,7 +654,7 @@ const PlaylistEdit = ( {
|
|
|
652
654
|
hasValue={ () => order !== 'asc' }
|
|
653
655
|
onDeselect={ () => setAttributes( { order: 'asc' } ) }
|
|
654
656
|
>
|
|
655
|
-
<
|
|
657
|
+
<WCSelectControl
|
|
656
658
|
label={ __( 'Order' ) }
|
|
657
659
|
value={ order }
|
|
658
660
|
options={ [
|
|
@@ -700,7 +702,7 @@ const PlaylistEdit = ( {
|
|
|
700
702
|
}
|
|
701
703
|
panelId={ waveformPanelId }
|
|
702
704
|
>
|
|
703
|
-
<
|
|
705
|
+
<WCSelectControl
|
|
704
706
|
label={ __( 'Shape' ) }
|
|
705
707
|
value={ waveformStyle }
|
|
706
708
|
options={ WAVEFORM_STYLE_OPTIONS }
|
|
@@ -8,9 +8,8 @@ import { useUploadMediaFromBlobURL } from '../../utils/hooks';
|
|
|
8
8
|
let mockMediaReplaceFlowProps;
|
|
9
9
|
|
|
10
10
|
vi.mock( '@wordpress/block-editor', async () => {
|
|
11
|
-
const { default: PlainText } =
|
|
12
|
-
'../../../../block-editor/src/components/plain-text'
|
|
13
|
-
);
|
|
11
|
+
const { default: PlainText } =
|
|
12
|
+
await import( '../../../../block-editor/src/components/plain-text' );
|
|
14
13
|
|
|
15
14
|
return {
|
|
16
15
|
BlockControls: ( { children } ) => <div>{ children }</div>,
|
package/src/post-author/edit.jsx
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
Button,
|
|
13
13
|
ComboboxControl,
|
|
14
|
-
SelectControl,
|
|
14
|
+
SelectControl as WCSelectControl,
|
|
15
15
|
ToggleControl,
|
|
16
16
|
__experimentalText as WCText,
|
|
17
17
|
__experimentalVStack as VStack,
|
|
@@ -255,7 +255,7 @@ function PostAuthorEdit( {
|
|
|
255
255
|
setAttributes( { avatarSize: 48 } )
|
|
256
256
|
}
|
|
257
257
|
>
|
|
258
|
-
<
|
|
258
|
+
<WCSelectControl
|
|
259
259
|
label={ __( 'Avatar size' ) }
|
|
260
260
|
value={ avatarSize }
|
|
261
261
|
options={ avatarSizes }
|
|
@@ -30,6 +30,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
30
30
|
- `gradient`: `true`
|
|
31
31
|
- [`dimensions`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#dimensions):
|
|
32
32
|
- `minHeight`: `true`
|
|
33
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
33
34
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
34
35
|
- `blockGap`: `true`
|
|
35
36
|
- `padding`: `true`
|
package/src/post-date/edit.jsx
CHANGED
|
@@ -208,7 +208,7 @@ export default function PostDateEdit( props ) {
|
|
|
208
208
|
// translators: %s: Name of the post type e.g: "post".
|
|
209
209
|
__( 'Link to %s' ),
|
|
210
210
|
postType.labels.singular_name.toLowerCase()
|
|
211
|
-
|
|
211
|
+
)
|
|
212
212
|
: __( 'Link to post' )
|
|
213
213
|
}
|
|
214
214
|
onDeselect={ () => setAttributes( { isLink: false } ) }
|
|
@@ -221,7 +221,7 @@ export default function PostDateEdit( props ) {
|
|
|
221
221
|
// translators: %s: Name of the post type e.g: "post".
|
|
222
222
|
__( 'Link to %s' ),
|
|
223
223
|
postType.labels.singular_name.toLowerCase()
|
|
224
|
-
|
|
224
|
+
)
|
|
225
225
|
: __( 'Link to post' )
|
|
226
226
|
}
|
|
227
227
|
onChange={ () =>
|
|
@@ -27,6 +27,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
|
|
|
27
27
|
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
28
28
|
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
|
|
29
29
|
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
|
|
30
|
+
- [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
|
|
30
31
|
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
31
32
|
- `margin`: `true`
|
|
32
33
|
- `padding`: `true`
|
|
@@ -290,7 +290,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
290
290
|
// translators: %s: Name of the post type e.g: "post".
|
|
291
291
|
__( 'Link to %s' ),
|
|
292
292
|
postType.labels.singular_name
|
|
293
|
-
|
|
293
|
+
)
|
|
294
294
|
: __( 'Link to post' )
|
|
295
295
|
}
|
|
296
296
|
isShownByDefault
|
|
@@ -472,7 +472,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
472
472
|
// translators: %s: The image's alt text.
|
|
473
473
|
__( 'Featured image: %s' ),
|
|
474
474
|
media.alt_text
|
|
475
|
-
|
|
475
|
+
)
|
|
476
476
|
: __( 'Featured image' )
|
|
477
477
|
}
|
|
478
478
|
style={ imageStyles }
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__experimentalToolsPanel as ToolsPanel,
|
|
5
5
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
6
6
|
ToggleControl,
|
|
7
|
-
SelectControl,
|
|
7
|
+
SelectControl as WCSelectControl,
|
|
8
8
|
} from '@wordpress/components';
|
|
9
9
|
import {
|
|
10
10
|
InspectorControls,
|
|
@@ -35,9 +35,9 @@ export default function PostNavigationLinkEdit( {
|
|
|
35
35
|
if ( showTitle ) {
|
|
36
36
|
placeholder = isNext
|
|
37
37
|
? /* translators: Label before for next and previous post. There is a space after the colon. */
|
|
38
|
-
|
|
38
|
+
__( 'Next: ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
|
|
39
39
|
: /* translators: Label before for next and previous post. There is a space after the colon. */
|
|
40
|
-
|
|
40
|
+
__( 'Previous: ' ); // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const ariaLabel = isNext ? __( 'Next post' ) : __( 'Previous post' );
|
|
@@ -174,7 +174,7 @@ export default function PostNavigationLinkEdit( {
|
|
|
174
174
|
</ToolsPanel>
|
|
175
175
|
</InspectorControls>
|
|
176
176
|
<InspectorControls group="advanced">
|
|
177
|
-
<
|
|
177
|
+
<WCSelectControl
|
|
178
178
|
label={ __( 'Filter by taxonomy' ) }
|
|
179
179
|
value={ taxonomy }
|
|
180
180
|
options={ getTaxonomyOptions() }
|
|
@@ -94,12 +94,12 @@ function PostTimeToReadEdit( { attributes, setAttributes, context } ) {
|
|
|
94
94
|
/* translators: %s: the number of words in the post. */
|
|
95
95
|
_n( '%s word', '%s words', totalWords ),
|
|
96
96
|
totalWords.toLocaleString()
|
|
97
|
-
|
|
97
|
+
)
|
|
98
98
|
: sprintf(
|
|
99
99
|
/* translators: %s: the number of characters in the post. */
|
|
100
100
|
_n( '%s character', '%s characters', totalWords ),
|
|
101
101
|
totalWords.toLocaleString()
|
|
102
|
-
|
|
102
|
+
);
|
|
103
103
|
}
|
|
104
104
|
}, [
|
|
105
105
|
contentStructure,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wp-block-post-title {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
word-break: normal;
|
|
3
|
+
overflow-wrap: anywhere;
|
|
4
4
|
// This block has customizable padding, border-box makes that more predictable.
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
|
|
7
7
|
:where(a) {
|
|
8
|
-
display: inline-block;
|
|
9
8
|
font-family: inherit;
|
|
10
9
|
font-size: inherit;
|
|
11
10
|
font-style: inherit;
|
package/src/query/deprecated.jsx
CHANGED