@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
package/src/gallery/edit.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import {
|
|
3
|
-
SelectControl,
|
|
3
|
+
SelectControl as WCSelectControl,
|
|
4
4
|
ToggleControl,
|
|
5
5
|
RangeControl,
|
|
6
6
|
MenuGroup,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import useImageSizes from './use-image-sizes';
|
|
62
62
|
import useGetNewImages from './use-get-new-images';
|
|
63
63
|
import useGetMedia from './use-get-media';
|
|
64
|
-
import
|
|
64
|
+
import GalleryStyles from './gallery-styles';
|
|
65
65
|
import useDynamicGallery from './use-dynamic-gallery';
|
|
66
66
|
import { GallerySourcePanel, GalleryDynamicView } from './dynamic-gallery';
|
|
67
67
|
import { getDynamicSource, ATTACHED_MEDIA } from './dynamic-source';
|
|
@@ -156,7 +156,7 @@ export default function GalleryEdit( props ) {
|
|
|
156
156
|
const linkOptions = ! lightboxSetting?.allowEditing
|
|
157
157
|
? LINK_OPTIONS.filter(
|
|
158
158
|
( option ) => option.value !== LINK_DESTINATION_LIGHTBOX
|
|
159
|
-
|
|
159
|
+
)
|
|
160
160
|
: LINK_OPTIONS;
|
|
161
161
|
|
|
162
162
|
const {
|
|
@@ -264,10 +264,14 @@ export default function GalleryEdit( props ) {
|
|
|
264
264
|
? getViewportGalleryStyle(
|
|
265
265
|
attributes.style,
|
|
266
266
|
selectedStyleState.viewport
|
|
267
|
-
|
|
267
|
+
)
|
|
268
268
|
: {};
|
|
269
269
|
const baseColumns = isValidGalleryColumns( columns ) ? columns : undefined;
|
|
270
270
|
const baseImageCrop = typeof imageCrop === 'boolean' ? imageCrop : true;
|
|
271
|
+
// Normalized so a Gallery with no aspect ratio and one explicitly set to
|
|
272
|
+
// Original compare equal, and a viewport override matching either is
|
|
273
|
+
// dropped rather than stored.
|
|
274
|
+
const baseAspectRatio = aspectRatio || 'auto';
|
|
271
275
|
const hasViewportColumns =
|
|
272
276
|
isViewportStyleState &&
|
|
273
277
|
Object.hasOwn( viewportStyle, 'columns' ) &&
|
|
@@ -276,12 +280,20 @@ export default function GalleryEdit( props ) {
|
|
|
276
280
|
isViewportStyleState &&
|
|
277
281
|
Object.hasOwn( viewportStyle, 'imageCrop' ) &&
|
|
278
282
|
typeof viewportStyle.imageCrop === 'boolean';
|
|
283
|
+
const hasViewportAspectRatio =
|
|
284
|
+
isViewportStyleState &&
|
|
285
|
+
Object.hasOwn( viewportStyle, 'aspectRatio' ) &&
|
|
286
|
+
typeof viewportStyle.aspectRatio === 'string' &&
|
|
287
|
+
!! viewportStyle.aspectRatio;
|
|
279
288
|
const activeColumns = hasViewportColumns
|
|
280
289
|
? viewportStyle.columns
|
|
281
290
|
: baseColumns;
|
|
282
291
|
const activeImageCrop = hasViewportImageCrop
|
|
283
292
|
? viewportStyle.imageCrop
|
|
284
293
|
: baseImageCrop;
|
|
294
|
+
const activeAspectRatio = hasViewportAspectRatio
|
|
295
|
+
? viewportStyle.aspectRatio
|
|
296
|
+
: baseAspectRatio;
|
|
285
297
|
|
|
286
298
|
const images = useMemo(
|
|
287
299
|
() =>
|
|
@@ -429,6 +441,7 @@ export default function GalleryEdit( props ) {
|
|
|
429
441
|
: image.caption?.raw,
|
|
430
442
|
alt: imageAttributes.alt || image.alt_text,
|
|
431
443
|
aspectRatio: aspectRatio === 'auto' ? undefined : aspectRatio,
|
|
444
|
+
scale: aspectRatio && aspectRatio !== 'auto' ? 'cover' : undefined,
|
|
432
445
|
};
|
|
433
446
|
}
|
|
434
447
|
|
|
@@ -456,7 +469,7 @@ export default function GalleryEdit( props ) {
|
|
|
456
469
|
}
|
|
457
470
|
|
|
458
471
|
return file;
|
|
459
|
-
|
|
472
|
+
} )
|
|
460
473
|
: selectedImages;
|
|
461
474
|
|
|
462
475
|
if ( ! imageArray.every( isValidFileType ) ) {
|
|
@@ -485,8 +498,9 @@ export default function GalleryEdit( props ) {
|
|
|
485
498
|
// once the new image blocks are merged in with existing.
|
|
486
499
|
const newOrderMap = processedImages.reduce(
|
|
487
500
|
( result, image, index ) => (
|
|
488
|
-
( result[ image.id ] = index ),
|
|
489
|
-
|
|
501
|
+
( result[ image.id ] = index ),
|
|
502
|
+
result
|
|
503
|
+
),
|
|
490
504
|
{}
|
|
491
505
|
);
|
|
492
506
|
|
|
@@ -495,7 +509,7 @@ export default function GalleryEdit( props ) {
|
|
|
495
509
|
processedImages.find(
|
|
496
510
|
( img ) => img.id === block.attributes.id
|
|
497
511
|
)
|
|
498
|
-
|
|
512
|
+
)
|
|
499
513
|
: innerBlockImages;
|
|
500
514
|
|
|
501
515
|
const newImageList = processedImages.filter(
|
|
@@ -574,7 +588,7 @@ export default function GalleryEdit( props ) {
|
|
|
574
588
|
);
|
|
575
589
|
}
|
|
576
590
|
|
|
577
|
-
function
|
|
591
|
+
function setGallerySettings( settings ) {
|
|
578
592
|
if ( ! isViewportStyleState ) {
|
|
579
593
|
setAttributes( settings );
|
|
580
594
|
return;
|
|
@@ -587,6 +601,7 @@ export default function GalleryEdit( props ) {
|
|
|
587
601
|
baseSettings: {
|
|
588
602
|
columns: baseColumns,
|
|
589
603
|
imageCrop: baseImageCrop,
|
|
604
|
+
aspectRatio: baseAspectRatio,
|
|
590
605
|
},
|
|
591
606
|
settings,
|
|
592
607
|
} ),
|
|
@@ -594,11 +609,11 @@ export default function GalleryEdit( props ) {
|
|
|
594
609
|
}
|
|
595
610
|
|
|
596
611
|
function setColumnsNumber( value ) {
|
|
597
|
-
|
|
612
|
+
setGallerySettings( { columns: value } );
|
|
598
613
|
}
|
|
599
614
|
|
|
600
615
|
function toggleImageCrop() {
|
|
601
|
-
|
|
616
|
+
setGallerySettings( { imageCrop: ! activeImageCrop } );
|
|
602
617
|
}
|
|
603
618
|
|
|
604
619
|
function toggleRandomOrder() {
|
|
@@ -663,37 +678,63 @@ export default function GalleryEdit( props ) {
|
|
|
663
678
|
);
|
|
664
679
|
}
|
|
665
680
|
|
|
681
|
+
/**
|
|
682
|
+
* Sets the Gallery's aspect ratio.
|
|
683
|
+
*
|
|
684
|
+
* The base value is added to the img element as an inline
|
|
685
|
+
* style. A viewport value is instead rendered
|
|
686
|
+
* from the Gallery's responsive CSS, which overrides that inline style.
|
|
687
|
+
*
|
|
688
|
+
* @param {string|undefined} value Aspect ratio to set. In a viewport state
|
|
689
|
+
* `'auto'` is an override that cancels the
|
|
690
|
+
* base ratio, while `undefined` removes the
|
|
691
|
+
* override so the base value applies again.
|
|
692
|
+
*/
|
|
666
693
|
function setAspectRatio( value ) {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
694
|
+
if ( isViewportStyleState ) {
|
|
695
|
+
setGallerySettings( { aspectRatio: value } );
|
|
696
|
+
} else {
|
|
697
|
+
const cleanValue = ! value || value === 'auto' ? undefined : value;
|
|
698
|
+
setAttributes( { aspectRatio: value ?? 'auto' } );
|
|
699
|
+
|
|
700
|
+
// Update all inner image blocks with the new aspect ratio
|
|
701
|
+
const changedAttributes = {};
|
|
702
|
+
const blocks = [];
|
|
703
|
+
|
|
704
|
+
getBlock( clientId ).innerBlocks.forEach( ( block ) => {
|
|
705
|
+
blocks.push( block.clientId );
|
|
706
|
+
changedAttributes[ block.clientId ] = {
|
|
707
|
+
aspectRatio: cleanValue,
|
|
708
|
+
scale: cleanValue ? 'cover' : undefined,
|
|
709
|
+
};
|
|
710
|
+
} );
|
|
679
711
|
|
|
680
|
-
|
|
712
|
+
updateBlockAttributes( blocks, changedAttributes, true );
|
|
713
|
+
}
|
|
681
714
|
|
|
715
|
+
const noticeValue = value ?? baseAspectRatio;
|
|
682
716
|
const aspectRatioText = aspectRatioOptions.find(
|
|
683
|
-
( option ) => option.value ===
|
|
717
|
+
( option ) => option.value === noticeValue
|
|
684
718
|
);
|
|
719
|
+
const noticeText = isViewportStyleState
|
|
720
|
+
? sprintf(
|
|
721
|
+
/* translators: 1: viewport name, 2: aspect ratio setting */
|
|
722
|
+
__(
|
|
723
|
+
'Gallery images in the %1$s viewport updated to aspect ratio: %2$s'
|
|
724
|
+
),
|
|
725
|
+
selectedStyleState.viewport.replace( '@', '' ),
|
|
726
|
+
aspectRatioText?.label || noticeValue
|
|
727
|
+
)
|
|
728
|
+
: sprintf(
|
|
729
|
+
/* translators: %s: aspect ratio setting */
|
|
730
|
+
__( 'All gallery images updated to aspect ratio: %s' ),
|
|
731
|
+
aspectRatioText?.label || noticeValue
|
|
732
|
+
);
|
|
685
733
|
|
|
686
|
-
createSuccessNotice(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
aspectRatioText?.label || value
|
|
691
|
-
),
|
|
692
|
-
{
|
|
693
|
-
id: 'gallery-attributes-aspectRatio',
|
|
694
|
-
type: 'snackbar',
|
|
695
|
-
}
|
|
696
|
-
);
|
|
734
|
+
createSuccessNotice( noticeText, {
|
|
735
|
+
id: 'gallery-attributes-aspectRatio',
|
|
736
|
+
type: 'snackbar',
|
|
737
|
+
} );
|
|
697
738
|
}
|
|
698
739
|
|
|
699
740
|
useEffect( () => {
|
|
@@ -805,12 +846,16 @@ export default function GalleryEdit( props ) {
|
|
|
805
846
|
}
|
|
806
847
|
|
|
807
848
|
const hasLinkTo = linkTo && linkTo !== 'none';
|
|
849
|
+
// Columns and crop to fit are Flex-only, so a Gallery in another layout has
|
|
850
|
+
// viewport settings to show only when aspect ratios are available. Without
|
|
851
|
+
// this the viewport Settings panel would render empty.
|
|
852
|
+
const hasViewportSettings = isFlexLayout || aspectRatioOptions.length > 1;
|
|
808
853
|
|
|
809
854
|
return (
|
|
810
855
|
<>
|
|
811
856
|
<InspectorControls
|
|
812
857
|
group={
|
|
813
|
-
isViewportStyleState &&
|
|
858
|
+
isViewportStyleState && hasViewportSettings
|
|
814
859
|
? 'viewport'
|
|
815
860
|
: 'default'
|
|
816
861
|
}
|
|
@@ -826,9 +871,10 @@ export default function GalleryEdit( props ) {
|
|
|
826
871
|
label={ __( 'Settings' ) }
|
|
827
872
|
resetAll={ () => {
|
|
828
873
|
if ( isViewportStyleState ) {
|
|
829
|
-
|
|
874
|
+
setGallerySettings( {
|
|
830
875
|
columns: undefined,
|
|
831
876
|
imageCrop: undefined,
|
|
877
|
+
aspectRatio: undefined,
|
|
832
878
|
} );
|
|
833
879
|
return;
|
|
834
880
|
}
|
|
@@ -862,7 +908,7 @@ export default function GalleryEdit( props ) {
|
|
|
862
908
|
isViewportStyleState
|
|
863
909
|
? hasViewportColumns
|
|
864
910
|
: !! activeColumns &&
|
|
865
|
-
|
|
911
|
+
activeColumns !== displayedImageCount
|
|
866
912
|
}
|
|
867
913
|
onDeselect={ () => setColumnsNumber( undefined ) }
|
|
868
914
|
>
|
|
@@ -873,7 +919,7 @@ export default function GalleryEdit( props ) {
|
|
|
873
919
|
? activeColumns
|
|
874
920
|
: defaultColumnsNumber(
|
|
875
921
|
displayedImageCount
|
|
876
|
-
|
|
922
|
+
)
|
|
877
923
|
}
|
|
878
924
|
onChange={ setColumnsNumber }
|
|
879
925
|
min={ 1 }
|
|
@@ -897,7 +943,7 @@ export default function GalleryEdit( props ) {
|
|
|
897
943
|
updateImagesSize( DEFAULT_MEDIA_SIZE_SLUG )
|
|
898
944
|
}
|
|
899
945
|
>
|
|
900
|
-
<
|
|
946
|
+
<WCSelectControl
|
|
901
947
|
label={ __( 'Resolution' ) }
|
|
902
948
|
help={ __(
|
|
903
949
|
'Select the size of the source images.'
|
|
@@ -919,7 +965,7 @@ export default function GalleryEdit( props ) {
|
|
|
919
965
|
: ! activeImageCrop
|
|
920
966
|
}
|
|
921
967
|
onDeselect={ () =>
|
|
922
|
-
|
|
968
|
+
setGallerySettings( {
|
|
923
969
|
imageCrop: isViewportStyleState
|
|
924
970
|
? undefined
|
|
925
971
|
: true,
|
|
@@ -963,27 +1009,35 @@ export default function GalleryEdit( props ) {
|
|
|
963
1009
|
/>
|
|
964
1010
|
</ToolsPanelItem>
|
|
965
1011
|
) }
|
|
966
|
-
{
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1012
|
+
{ aspectRatioOptions.length > 1 && (
|
|
1013
|
+
<ToolsPanelItem
|
|
1014
|
+
hasValue={ () =>
|
|
1015
|
+
isViewportStyleState
|
|
1016
|
+
? hasViewportAspectRatio
|
|
1017
|
+
: activeAspectRatio !== 'auto'
|
|
1018
|
+
}
|
|
1019
|
+
label={ __( 'Aspect ratio' ) }
|
|
1020
|
+
onDeselect={ () =>
|
|
1021
|
+
// In a viewport state this clears the override
|
|
1022
|
+
// so the base ratio applies again, rather than
|
|
1023
|
+
// overriding it with Original.
|
|
1024
|
+
setAspectRatio(
|
|
1025
|
+
isViewportStyleState ? undefined : 'auto'
|
|
1026
|
+
)
|
|
1027
|
+
}
|
|
1028
|
+
isShownByDefault
|
|
1029
|
+
>
|
|
1030
|
+
<WCSelectControl
|
|
972
1031
|
label={ __( 'Aspect ratio' ) }
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
options={ aspectRatioOptions }
|
|
983
|
-
onChange={ setAspectRatio }
|
|
984
|
-
/>
|
|
985
|
-
</ToolsPanelItem>
|
|
986
|
-
) }
|
|
1032
|
+
help={ __(
|
|
1033
|
+
'Set a consistent aspect ratio for all images in the gallery.'
|
|
1034
|
+
) }
|
|
1035
|
+
value={ activeAspectRatio }
|
|
1036
|
+
options={ aspectRatioOptions }
|
|
1037
|
+
onChange={ setAspectRatio }
|
|
1038
|
+
/>
|
|
1039
|
+
</ToolsPanelItem>
|
|
1040
|
+
) }
|
|
987
1041
|
{ ! isViewportStyleState &&
|
|
988
1042
|
lightboxSetting?.allowEditing &&
|
|
989
1043
|
hasLightboxImages && (
|
|
@@ -1077,12 +1131,11 @@ export default function GalleryEdit( props ) {
|
|
|
1077
1131
|
/>
|
|
1078
1132
|
</BlockControls>
|
|
1079
1133
|
) }
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
) }
|
|
1134
|
+
<GalleryStyles
|
|
1135
|
+
style={ attributes.style }
|
|
1136
|
+
clientId={ clientId }
|
|
1137
|
+
isFlexLayout={ isFlexLayout }
|
|
1138
|
+
/>
|
|
1086
1139
|
</>
|
|
1087
1140
|
{ isDynamic ? (
|
|
1088
1141
|
<GalleryDynamicView
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__experimentalGetGapCSSValue as getGapCSSValue,
|
|
3
|
+
privateApis as blockEditorPrivateApis,
|
|
4
|
+
store as blockEditorStore,
|
|
5
|
+
useStyleOverride,
|
|
6
|
+
useSettings,
|
|
7
|
+
} from '@wordpress/block-editor';
|
|
8
|
+
import { useSelect } from '@wordpress/data';
|
|
9
|
+
import { privateApis as globalStylesEnginePrivateApis } from '@wordpress/global-styles-engine';
|
|
10
|
+
import { unlock } from '../lock-unlock';
|
|
11
|
+
import { getGalleryResponsiveCSS } from './responsive-styles';
|
|
12
|
+
|
|
13
|
+
const { getResponsiveMediaQueries } = unlock( globalStylesEnginePrivateApis );
|
|
14
|
+
const { globalStylesDataKey } = unlock( blockEditorPrivateApis );
|
|
15
|
+
const GALLERY_BLOCK_NAME = 'core/gallery';
|
|
16
|
+
|
|
17
|
+
// --gallery-block--gutter-size is deprecated. --wp--style--gallery-gap-default should be used by themes that want to set a default
|
|
18
|
+
// gap on the gallery.
|
|
19
|
+
const FALLBACK_VALUE = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
|
|
20
|
+
|
|
21
|
+
function getGalleryGapCustomPropertyStyle( selector, blockGap ) {
|
|
22
|
+
let column = FALLBACK_VALUE;
|
|
23
|
+
if ( blockGap ) {
|
|
24
|
+
column =
|
|
25
|
+
typeof blockGap === 'string'
|
|
26
|
+
? getGapCSSValue( blockGap ) || FALLBACK_VALUE
|
|
27
|
+
: getGapCSSValue( blockGap?.left ) || FALLBACK_VALUE;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// The unstable gallery gap calculation requires a real value (such as `0px`) and not `0`.
|
|
31
|
+
return `${ selector } {
|
|
32
|
+
--wp--style--unstable-gallery-gap: ${ column === '0' ? '0px' : column }
|
|
33
|
+
}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getBlockGapValue( style ) {
|
|
37
|
+
if ( ! Object.hasOwn( style?.spacing || {}, 'blockGap' ) ) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return style.spacing.blockGap;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Renders the Gallery's instance styles: the gap custom property the Flex
|
|
46
|
+
* layout's column widths are calculated from, and the Gallery's responsive
|
|
47
|
+
* viewport CSS.
|
|
48
|
+
*
|
|
49
|
+
* @param {Object} props
|
|
50
|
+
* @param {Object} props.style Gallery block style attribute.
|
|
51
|
+
* @param {string} props.clientId Gallery block client ID.
|
|
52
|
+
* @param {boolean} props.isFlexLayout Whether the Gallery uses the Flex layout.
|
|
53
|
+
*/
|
|
54
|
+
export default function GalleryStyles( { style, clientId, isFlexLayout } ) {
|
|
55
|
+
const selector = `.wp-block-gallery-${ clientId }`;
|
|
56
|
+
const [ viewportSettings ] = useSettings( 'viewport' );
|
|
57
|
+
const globalStyles = useSelect(
|
|
58
|
+
( select ) =>
|
|
59
|
+
select( blockEditorStore ).getSettings()?.[ globalStylesDataKey ],
|
|
60
|
+
[]
|
|
61
|
+
);
|
|
62
|
+
const responsiveMediaQueries =
|
|
63
|
+
getResponsiveMediaQueries( viewportSettings );
|
|
64
|
+
let css = '';
|
|
65
|
+
|
|
66
|
+
// The gap custom property only drives the Flex layout's column width
|
|
67
|
+
// calculations, so it is not emitted for the other Gallery layouts.
|
|
68
|
+
if ( isFlexLayout ) {
|
|
69
|
+
const globalGalleryStyles =
|
|
70
|
+
globalStyles?.blocks?.[ GALLERY_BLOCK_NAME ] || {};
|
|
71
|
+
const styleBlockGap = getBlockGapValue( style );
|
|
72
|
+
const globalGalleryBlockGap =
|
|
73
|
+
globalGalleryStyles?.spacing?.blockGap ?? FALLBACK_VALUE;
|
|
74
|
+
// Prefer the block's own gap value, then Gallery global styles. Missing
|
|
75
|
+
// values fall back to the Gallery blockGap default.
|
|
76
|
+
const blockGap =
|
|
77
|
+
styleBlockGap === undefined ? globalGalleryBlockGap : styleBlockGap;
|
|
78
|
+
css += getGalleryGapCustomPropertyStyle( selector, blockGap );
|
|
79
|
+
|
|
80
|
+
Object.entries( responsiveMediaQueries ).forEach(
|
|
81
|
+
( [ viewport, mediaQuery ] ) => {
|
|
82
|
+
const styleViewportBlockGap = getBlockGapValue(
|
|
83
|
+
style?.[ viewport ]
|
|
84
|
+
);
|
|
85
|
+
// Viewport-specific block values win. Gallery global viewport values
|
|
86
|
+
// only apply when the block has no base gap, so they do not override an instance value.
|
|
87
|
+
const globalViewportBlockGap =
|
|
88
|
+
styleBlockGap === undefined
|
|
89
|
+
? globalGalleryStyles?.[ viewport ]?.spacing?.blockGap
|
|
90
|
+
: undefined;
|
|
91
|
+
const viewportBlockGap =
|
|
92
|
+
styleViewportBlockGap === undefined
|
|
93
|
+
? globalViewportBlockGap
|
|
94
|
+
: styleViewportBlockGap;
|
|
95
|
+
if (
|
|
96
|
+
viewportBlockGap === undefined ||
|
|
97
|
+
viewportBlockGap === null
|
|
98
|
+
) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
css += `${ mediaQuery }{${ getGalleryGapCustomPropertyStyle(
|
|
103
|
+
selector,
|
|
104
|
+
viewportBlockGap
|
|
105
|
+
) }}`;
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// The column and crop rules are scoped to the Flex layout, so they are
|
|
111
|
+
// inert in the other layouts and this can run for every Gallery.
|
|
112
|
+
css += getGalleryResponsiveCSS( selector, style, responsiveMediaQueries );
|
|
113
|
+
|
|
114
|
+
useStyleOverride( { css } );
|
|
115
|
+
|
|
116
|
+
return null;
|
|
117
|
+
}
|