@wordpress/block-library 10.6.1-next.v.202609031004.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 +27 -1
- package/README.md +7 -7
- package/build/archives/edit.cjs.map +3 -3
- package/build/audio/edit.cjs +5 -5
- package/build/audio/edit.cjs.map +3 -3
- package/build/audio/index.cjs +0 -37
- package/build/audio/index.cjs.map +3 -3
- package/build/avatar/hooks.cjs.map +2 -2
- package/build/button/edit.cjs.map +2 -2
- package/build/button/index.cjs +0 -34
- package/build/button/index.cjs.map +3 -3
- package/build/categories/edit.cjs.map +3 -3
- package/build/code/block.json +1 -0
- package/build/code/index.cjs +0 -17
- package/build/code/index.cjs.map +3 -3
- 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/index.cjs +0 -38
- package/build/cover/index.cjs.map +3 -3
- package/build/cover/transforms.cjs.map +2 -2
- package/build/details/block.json +1 -0
- package/build/details/index.cjs +0 -17
- package/build/details/index.cjs.map +3 -3
- 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/index.cjs +0 -43
- package/build/file/index.cjs.map +3 -3
- 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/footnotes/format.cjs +1 -1
- package/build/footnotes/format.cjs.map +2 -2
- package/build/gallery/dynamic-gallery.cjs +12 -9
- 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 +0 -16
- package/build/heading/index.cjs.map +3 -3
- package/build/html/modal.cjs +3 -6
- package/build/html/modal.cjs.map +2 -2
- package/build/image/edit.cjs.map +2 -2
- package/build/image/image.cjs +1 -2
- package/build/image/image.cjs.map +2 -2
- package/build/image/index.cjs +0 -81
- package/build/image/index.cjs.map +3 -3
- package/build/index.cjs +0 -10
- 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/edit.cjs +14 -11
- package/build/list-item/edit.cjs.map +2 -2
- package/build/list-item/hooks/index.cjs +6 -9
- package/build/list-item/hooks/index.cjs.map +2 -2
- package/build/list-item/hooks/use-enter.cjs +62 -67
- package/build/list-item/hooks/use-enter.cjs.map +3 -3
- package/build/list-item/hooks/use-merge.cjs +26 -44
- package/build/list-item/hooks/use-merge.cjs.map +3 -3
- package/build/list-item/hooks/use-multi-select-tab.cjs +80 -0
- package/build/list-item/hooks/use-multi-select-tab.cjs.map +7 -0
- package/build/list-item/hooks/use-tab.cjs +65 -0
- package/build/list-item/hooks/use-tab.cjs.map +7 -0
- package/build/list-item/index.cjs +0 -17
- package/build/list-item/index.cjs.map +3 -3
- package/build/list-item/utils.cjs +169 -0
- package/build/list-item/utils.cjs.map +7 -0
- 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/index.cjs +0 -50
- package/build/media-text/index.cjs.map +3 -3
- package/build/media-text/media-container.cjs +19 -14
- package/build/media-text/media-container.cjs.map +2 -2
- package/build/more/index.cjs +0 -18
- package/build/more/index.cjs.map +3 -3
- package/build/navigation/constants.cjs +1 -1
- package/build/navigation/constants.cjs.map +1 -1
- 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/block.json +1 -1
- package/build/navigation-link/deprecated.cjs +69 -0
- package/build/navigation-link/deprecated.cjs.map +7 -0
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-link/index.cjs +6 -74
- package/build/navigation-link/index.cjs.map +4 -4
- package/build/navigation-link/shared/invalid-draft-display.cjs.map +2 -2
- package/build/{form-submit-button/init.cjs → navigation-link/variations.cjs} +23 -8
- package/build/navigation-link/variations.cjs.map +7 -0
- package/build/navigation-submenu/edit.cjs.map +2 -2
- package/build/navigation-submenu/index.cjs +0 -32
- package/build/navigation-submenu/index.cjs.map +3 -3
- package/build/paragraph/block.json +1 -0
- package/build/paragraph/edit.cjs.map +2 -2
- package/build/paragraph/index.cjs +4 -15
- package/build/paragraph/index.cjs.map +2 -2
- package/build/paragraph/use-enter.cjs +8 -4
- package/build/paragraph/use-enter.cjs.map +2 -2
- 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-template/edit.cjs +3 -1
- package/build/post-template/edit.cjs.map +2 -2
- package/build/post-time-to-read/edit.cjs.map +2 -2
- package/build/preformatted/index.cjs +0 -17
- package/build/preformatted/index.cjs.map +3 -3
- package/build/pullquote/deprecated.cjs.map +2 -2
- package/build/pullquote/index.cjs +0 -24
- package/build/pullquote/index.cjs.map +3 -3
- package/build/query/deprecated.cjs.map +2 -2
- package/build/query/edit/inspector-controls/index.cjs +9 -4
- 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/search/index.cjs +0 -31
- package/build/search/index.cjs.map +3 -3
- package/build/separator/edit.cjs.map +3 -3
- package/build/site-tagline/edit.cjs +11 -17
- package/build/site-tagline/edit.cjs.map +2 -2
- package/build/site-title/edit.cjs +12 -18
- package/build/site-title/edit.cjs.map +2 -2
- package/build/social-link/index.cjs +0 -31
- package/build/social-link/index.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/verse/index.cjs +0 -17
- package/build/verse/index.cjs.map +3 -3
- package/build/video/edit-common-settings.cjs.map +3 -3
- package/build/video/index.cjs +0 -40
- package/build/video/index.cjs.map +3 -3
- package/build/video/tracks-editor.cjs +2 -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 +7 -7
- package/build-module/audio/edit.mjs.map +2 -2
- package/build-module/audio/index.mjs +0 -37
- package/build-module/audio/index.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/button/index.mjs +0 -34
- package/build-module/button/index.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/index.mjs +0 -17
- package/build-module/code/index.mjs.map +2 -2
- 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/index.mjs +0 -38
- package/build-module/cover/index.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 +0 -17
- 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/index.mjs +1 -44
- package/build-module/file/index.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/footnotes/format.mjs +1 -1
- package/build-module/footnotes/format.mjs.map +2 -2
- package/build-module/gallery/dynamic-gallery.mjs +14 -11
- 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 +1 -21
- 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 +1 -2
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/index.mjs +0 -81
- package/build-module/image/index.mjs.map +2 -2
- package/build-module/index.mjs +0 -10
- 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/edit.mjs +20 -18
- package/build-module/list-item/edit.mjs.map +2 -2
- package/build-module/list-item/hooks/index.mjs +8 -10
- package/build-module/list-item/hooks/index.mjs.map +2 -2
- package/build-module/list-item/hooks/use-enter.mjs +63 -58
- package/build-module/list-item/hooks/use-enter.mjs.map +2 -2
- package/build-module/list-item/hooks/use-merge.mjs +27 -35
- package/build-module/list-item/hooks/use-merge.mjs.map +2 -2
- package/build-module/list-item/hooks/use-multi-select-tab.mjs +59 -0
- package/build-module/list-item/hooks/use-multi-select-tab.mjs.map +7 -0
- package/build-module/list-item/hooks/use-tab.mjs +44 -0
- package/build-module/list-item/hooks/use-tab.mjs.map +7 -0
- package/build-module/list-item/index.mjs +0 -17
- package/build-module/list-item/index.mjs.map +2 -2
- package/build-module/list-item/utils.mjs +140 -0
- package/build-module/list-item/utils.mjs.map +7 -0
- 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/index.mjs +0 -50
- package/build-module/media-text/index.mjs.map +2 -2
- package/build-module/media-text/media-container.mjs +18 -13
- package/build-module/media-text/media-container.mjs.map +2 -2
- package/build-module/more/index.mjs +0 -18
- package/build-module/more/index.mjs.map +2 -2
- package/build-module/navigation/constants.mjs +1 -1
- package/build-module/navigation/constants.mjs.map +1 -1
- 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/block.json +1 -1
- package/build-module/navigation-link/deprecated.mjs +48 -0
- package/build-module/navigation-link/deprecated.mjs.map +7 -0
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-link/index.mjs +7 -75
- package/build-module/navigation-link/index.mjs.map +3 -3
- package/build-module/navigation-link/shared/invalid-draft-display.mjs.map +2 -2
- package/build-module/navigation-link/variations.mjs +22 -0
- package/build-module/navigation-link/variations.mjs.map +7 -0
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/navigation-submenu/index.mjs +1 -33
- package/build-module/navigation-submenu/index.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 +4 -15
- package/build-module/paragraph/index.mjs.map +2 -2
- package/build-module/paragraph/use-enter.mjs +8 -4
- package/build-module/paragraph/use-enter.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-template/edit.mjs +3 -1
- package/build-module/post-template/edit.mjs.map +2 -2
- package/build-module/post-time-to-read/edit.mjs.map +2 -2
- package/build-module/preformatted/index.mjs +0 -17
- package/build-module/preformatted/index.mjs.map +2 -2
- package/build-module/pullquote/deprecated.mjs.map +2 -2
- package/build-module/pullquote/index.mjs +0 -24
- package/build-module/pullquote/index.mjs.map +2 -2
- package/build-module/query/deprecated.mjs.map +2 -2
- package/build-module/query/edit/inspector-controls/index.mjs +11 -6
- 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/search/index.mjs +0 -31
- package/build-module/search/index.mjs.map +2 -2
- package/build-module/separator/edit.mjs +5 -2
- package/build-module/separator/edit.mjs.map +2 -2
- package/build-module/site-tagline/edit.mjs +13 -19
- package/build-module/site-tagline/edit.mjs.map +2 -2
- package/build-module/site-title/edit.mjs +14 -20
- package/build-module/site-title/edit.mjs.map +2 -2
- package/build-module/social-link/index.mjs +0 -31
- package/build-module/social-link/index.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/verse/index.mjs +0 -17
- package/build-module/verse/index.mjs.map +2 -2
- 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/index.mjs +0 -40
- package/build-module/video/index.mjs.map +2 -2
- package/build-module/video/tracks-editor.mjs +5 -7
- 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 +17 -56
- package/build-style/editor.css +17 -56
- 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 +9 -0
- package/build-style/navigation/editor.css +9 -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 -66
- package/build-style/style.css +23 -66
- 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/build-types/navigation-link/deprecated.d.ts +48 -0
- package/build-types/navigation-link/deprecated.d.ts.map +1 -0
- package/package.json +43 -44
- package/src/accordion/index.php +2 -2
- package/src/accordion-item/index.php +1 -1
- package/src/archives/edit.jsx +2 -2
- package/src/audio/edit.jsx +8 -9
- package/src/audio/index.js +0 -37
- package/src/avatar/hooks.js +2 -2
- package/src/breadcrumbs/index.php +4 -4
- package/src/button/edit.jsx +1 -1
- package/src/button/index.js +0 -34
- package/src/button/style.scss +2 -2
- package/src/button/test/get-experimental-label.jsdom.test.js +1 -0
- 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/index.js +0 -18
- package/src/code/save.jsx +1 -1
- package/src/columns/style.scss +2 -3
- package/src/columns/test/transforms.jsdom.test.js +1 -0
- package/src/comment-template/hooks.js +1 -1
- package/src/comment-template/index.php +2 -2
- 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/index.js +0 -39
- package/src/cover/style.scss +10 -0
- package/src/cover/test/{edit.jsdom.test.js → edit.browser.test.js} +107 -147
- package/src/cover/test/transforms.jsdom.test.js +1 -0
- 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 -19
- package/src/editor.scss +0 -2
- package/src/embed/editor.scss +2 -2
- package/src/embed/embed-controls.jsx +2 -2
- package/src/embed/test/index.jsdom.test.js +5 -1
- package/src/file/deprecated.jsx +3 -3
- package/src/file/edit.jsx +5 -3
- package/src/file/index.js +1 -43
- 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/footnotes/format.jsx +5 -1
- package/src/gallery/dynamic-gallery.jsx +9 -6
- 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 +75 -3
- package/src/gallery/test/responsive-styles.js +59 -5
- package/src/gallery/test/transforms.jsdom.test.js +1 -0
- package/src/gallery/test/use-get-new-images.jsdom.test.jsx +1 -0
- package/src/group/test/placeholder.jsdom.test.jsx +1 -0
- package/src/heading/README.md +2 -0
- package/src/heading/block.json +2 -0
- package/src/heading/index.js +3 -24
- package/src/heading/index.php +1 -1
- package/src/home-link/index.php +2 -2
- package/src/html/modal.jsx +0 -3
- package/src/html/test/index.jsdom.test.js +9 -0
- package/src/html/test/utils.jsdom.test.js +1 -0
- package/src/image/edit.jsx +1 -1
- package/src/image/image.jsx +8 -11
- package/src/image/index.js +0 -80
- package/src/image/index.php +10 -4
- package/src/image/style.scss +1 -0
- package/src/image/test/transforms.jsdom.test.js +1 -0
- package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +31 -30
- package/src/index.jsx +1 -12
- package/src/latest-comments/edit.jsx +2 -2
- package/src/latest-posts/edit.jsx +1 -1
- package/src/latest-posts/test/deprecated.jsdom.test.js +1 -0
- package/src/list/index.php +1 -1
- package/src/list/ordered-list-settings.jsx +2 -2
- package/src/list-item/edit.jsx +20 -20
- package/src/list-item/hooks/index.js +2 -3
- package/src/list-item/hooks/use-enter.js +82 -70
- package/src/list-item/hooks/use-merge.js +28 -36
- package/src/list-item/hooks/use-multi-select-tab.js +83 -0
- package/src/list-item/hooks/use-tab.js +62 -0
- package/src/list-item/index.js +0 -18
- package/src/list-item/utils.js +236 -0
- 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/index.js +0 -50
- package/src/media-text/media-container.jsx +23 -13
- package/src/more/index.js +0 -19
- package/src/navigation/constants.js +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/test/layout-custom-properties.jsdom.test.js +8 -7
- package/src/navigation/edit/test/navigation-menu-selector.jsdom.test.jsx +23 -14
- package/src/navigation/edit/test/overlay-template-part-selector.jsdom.test.jsx +22 -20
- package/src/navigation/edit/test/responsive-wrapper.jsdom.test.jsx +14 -13
- package/src/navigation/edit/test/use-create-overlay.jsdom.test.js +19 -24
- package/src/navigation/edit/use-generate-default-navigation-title.js +2 -2
- package/src/navigation/editor.scss +14 -0
- package/src/navigation/index.php +26 -14
- package/src/navigation/style.scss +1 -1
- package/src/navigation/test/menu-items-to-blocks.jsdom.test.js +3 -2
- package/src/navigation/test/use-navigation-menu.jsdom.test.js +13 -32
- package/src/navigation/test/view.jsdom.test.js +27 -2
- package/src/navigation/view.js +9 -6
- package/src/navigation-link/block.json +1 -1
- package/src/navigation-link/deprecated.tsx +58 -0
- package/src/navigation-link/edit.jsx +1 -1
- package/src/navigation-link/{index.jsx → index.js} +5 -77
- package/src/navigation-link/index.php +5 -5
- package/src/navigation-link/shared/invalid-draft-display.jsx +2 -2
- package/src/navigation-link/shared/test/controls.jsdom.test.jsx +18 -18
- package/src/navigation-link/shared/test/use-enable-link-status-validation.jsdom.test.js +8 -6
- package/src/navigation-link/shared/test/use-entity-binding.jsdom.test.js +12 -11
- package/src/navigation-link/shared/test/use-handle-link-change.jsdom.test.js +23 -20
- package/src/navigation-link/shared/test/use-link-preview.jsdom.test.js +17 -14
- package/src/navigation-link/test/__snapshots__/hooks.jsdom.test.js.snap +43 -13
- package/src/navigation-link/test/hooks.jsdom.test.js +1 -0
- package/src/navigation-link/variations.js +19 -0
- package/src/navigation-submenu/edit.jsx +1 -1
- package/src/navigation-submenu/index.js +1 -33
- package/src/page-list/index.php +10 -10
- package/src/page-list/test/convert-to-navigation-links.jsdom.test.js +3 -2
- 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 +4 -15
- package/src/paragraph/use-enter.js +13 -6
- package/src/pattern/index.php +2 -2
- package/src/playlist/edit.jsx +6 -4
- package/src/playlist/test/edit-component.jsdom.test.jsx +31 -30
- package/src/playlist/test/edit.jsdom.test.js +1 -0
- package/src/playlist/test/transforms.jsdom.test.js +1 -0
- package/src/playlist-track/test/edit.jsdom.test.jsx +20 -20
- package/src/post-author/edit.jsx +2 -2
- package/src/post-author/index.php +3 -3
- package/src/post-author-biography/index.php +3 -3
- package/src/post-author-name/edit.jsx +1 -1
- package/src/post-author-name/index.php +3 -3
- package/src/post-comments-link/index.php +4 -4
- 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-date/test/edit.jsdom.test.js +1 -0
- 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-template/edit.jsx +3 -1
- package/src/post-time-to-read/edit.jsx +2 -2
- package/src/post-time-to-read/index.php +3 -3
- package/src/post-title/style.scss +2 -3
- package/src/preformatted/index.js +0 -18
- package/src/pullquote/deprecated.jsx +1 -1
- package/src/pullquote/index.js +0 -24
- package/src/query/deprecated.jsx +1 -1
- package/src/query/edit/inspector-controls/index.jsx +13 -8
- 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/index.php +2 -2
- package/src/query/test/utils.jsdom.test.js +1 -0
- 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/test/migrate.jsdom.test.js +1 -0
- package/src/quote/transforms.js +3 -3
- package/src/read-more/index.php +1 -1
- package/src/search/edit.jsx +6 -6
- package/src/search/index.js +0 -30
- package/src/search/index.php +1 -1
- package/src/search/theme.scss +1 -1
- package/src/separator/edit.jsx +7 -4
- package/src/separator/test/edit.jsdom.test.jsx +5 -4
- package/src/site-logo/index.php +1 -1
- package/src/site-tagline/edit.jsx +18 -27
- package/src/site-title/edit.jsx +20 -27
- package/src/social-link/index.js +0 -32
- package/src/social-link/index.php +0 -1
- package/src/social-links/edit.jsx +2 -2
- package/src/style.scss +0 -1
- package/src/table/state.js +1 -1
- package/src/table-of-contents/edit.jsx +6 -6
- package/src/table-of-contents/index.php +3 -3
- 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/style-state.jsdom.test.js +1 -0
- package/src/utils/test/waveform-player-dependency.jsdom.test.js +15 -21
- 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/index.js +0 -18
- package/src/verse/style.scss +2 -2
- package/src/video/edit-common-settings.jsx +3 -3
- package/src/video/index.js +0 -40
- package/src/video/tracks-editor.jsx +6 -7
- package/build/form/block.json +0 -65
- package/build/form/deprecated.cjs +0 -111
- package/build/form/deprecated.cjs.map +0 -7
- package/build/form/edit.cjs +0 -180
- package/build/form/edit.cjs.map +0 -7
- package/build/form/icons.cjs +0 -33
- package/build/form/icons.cjs.map +0 -7
- package/build/form/index.cjs +0 -118
- package/build/form/index.cjs.map +0 -7
- package/build/form/init.cjs +0 -28
- package/build/form/init.cjs.map +0 -7
- package/build/form/save.cjs +0 -40
- package/build/form/save.cjs.map +0 -7
- package/build/form/utils.cjs +0 -61
- package/build/form/utils.cjs.map +0 -7
- package/build/form/variations.cjs +0 -152
- package/build/form/variations.cjs.map +0 -7
- package/build/form/view.cjs +0 -48
- package/build/form/view.cjs.map +0 -7
- package/build/form-input/block.json +0 -72
- package/build/form-input/deprecated.cjs +0 -252
- package/build/form-input/deprecated.cjs.map +0 -7
- package/build/form-input/edit.cjs +0 -206
- package/build/form-input/edit.cjs.map +0 -7
- package/build/form-input/icons.cjs +0 -33
- package/build/form-input/icons.cjs.map +0 -7
- package/build/form-input/index.cjs +0 -63
- package/build/form-input/index.cjs.map +0 -7
- package/build/form-input/init.cjs +0 -28
- package/build/form-input/init.cjs.map +0 -7
- package/build/form-input/save.cjs +0 -88
- package/build/form-input/save.cjs.map +0 -7
- package/build/form-input/variations.cjs +0 -105
- package/build/form-input/variations.cjs.map +0 -7
- package/build/form-submission-notification/block.json +0 -19
- package/build/form-submission-notification/edit.cjs +0 -71
- package/build/form-submission-notification/edit.cjs.map +0 -7
- package/build/form-submission-notification/index.cjs +0 -73
- package/build/form-submission-notification/index.cjs.map +0 -7
- package/build/form-submission-notification/init.cjs +0 -28
- package/build/form-submission-notification/init.cjs.map +0 -7
- package/build/form-submission-notification/save.cjs +0 -54
- package/build/form-submission-notification/save.cjs.map +0 -7
- package/build/form-submission-notification/variations.cjs +0 -78
- package/build/form-submission-notification/variations.cjs.map +0 -7
- package/build/form-submit-button/block.json +0 -15
- package/build/form-submit-button/edit.cjs +0 -36
- package/build/form-submit-button/edit.cjs.map +0 -7
- package/build/form-submit-button/index.cjs +0 -75
- package/build/form-submit-button/index.cjs.map +0 -7
- package/build/form-submit-button/init.cjs.map +0 -7
- package/build/form-submit-button/save.cjs +0 -32
- package/build/form-submit-button/save.cjs.map +0 -7
- package/build/gallery/flex-styles.cjs.map +0 -7
- package/build/list-item/hooks/use-indent-list-item.cjs +0 -79
- package/build/list-item/hooks/use-indent-list-item.cjs.map +0 -7
- package/build/list-item/hooks/use-outdent-list-item.cjs +0 -106
- package/build/list-item/hooks/use-outdent-list-item.cjs.map +0 -7
- package/build/list-item/hooks/use-space.cjs +0 -83
- package/build/list-item/hooks/use-space.cjs.map +0 -7
- package/build-module/form/block.json +0 -65
- package/build-module/form/deprecated.mjs +0 -96
- package/build-module/form/deprecated.mjs.map +0 -7
- package/build-module/form/edit.mjs +0 -170
- package/build-module/form/edit.mjs.map +0 -7
- package/build-module/form/icons.mjs +0 -8
- package/build-module/form/icons.mjs.map +0 -7
- package/build-module/form/index.mjs +0 -83
- package/build-module/form/index.mjs.map +0 -7
- package/build-module/form/init.mjs +0 -7
- package/build-module/form/init.mjs.map +0 -7
- package/build-module/form/save.mjs +0 -19
- package/build-module/form/save.mjs.map +0 -7
- package/build-module/form/utils.mjs +0 -35
- package/build-module/form/utils.mjs.map +0 -7
- package/build-module/form/variations.mjs +0 -134
- package/build-module/form/variations.mjs.map +0 -7
- package/build-module/form/view.mjs +0 -46
- package/build-module/form/view.mjs.map +0 -7
- package/build-module/form-input/block.json +0 -72
- package/build-module/form-input/deprecated.mjs +0 -226
- package/build-module/form-input/deprecated.mjs.map +0 -7
- package/build-module/form-input/edit.mjs +0 -186
- package/build-module/form-input/edit.mjs.map +0 -7
- package/build-module/form-input/icons.mjs +0 -8
- package/build-module/form-input/icons.mjs.map +0 -7
- package/build-module/form-input/index.mjs +0 -25
- package/build-module/form-input/index.mjs.map +0 -7
- package/build-module/form-input/init.mjs +0 -7
- package/build-module/form-input/init.mjs.map +0 -7
- package/build-module/form-input/save.mjs +0 -62
- package/build-module/form-input/save.mjs.map +0 -7
- package/build-module/form-input/variations.mjs +0 -84
- package/build-module/form-input/variations.mjs.map +0 -7
- package/build-module/form-submission-notification/block.json +0 -19
- package/build-module/form-submission-notification/edit.mjs +0 -45
- package/build-module/form-submission-notification/edit.mjs.map +0 -7
- package/build-module/form-submission-notification/index.mjs +0 -35
- package/build-module/form-submission-notification/index.mjs.map +0 -7
- package/build-module/form-submission-notification/init.mjs +0 -7
- package/build-module/form-submission-notification/init.mjs.map +0 -7
- package/build-module/form-submission-notification/save.mjs +0 -23
- package/build-module/form-submission-notification/save.mjs.map +0 -7
- package/build-module/form-submission-notification/variations.mjs +0 -57
- package/build-module/form-submission-notification/variations.mjs.map +0 -7
- package/build-module/form-submit-button/block.json +0 -15
- package/build-module/form-submit-button/edit.mjs +0 -15
- package/build-module/form-submit-button/edit.mjs.map +0 -7
- package/build-module/form-submit-button/index.mjs +0 -37
- package/build-module/form-submit-button/index.mjs.map +0 -7
- package/build-module/form-submit-button/init.mjs +0 -7
- package/build-module/form-submit-button/init.mjs.map +0 -7
- package/build-module/form-submit-button/save.mjs +0 -11
- package/build-module/form-submit-button/save.mjs.map +0 -7
- package/build-module/gallery/flex-styles.mjs.map +0 -7
- package/build-module/list-item/hooks/use-indent-list-item.mjs +0 -58
- package/build-module/list-item/hooks/use-indent-list-item.mjs.map +0 -7
- package/build-module/list-item/hooks/use-outdent-list-item.mjs +0 -85
- package/build-module/list-item/hooks/use-outdent-list-item.mjs.map +0 -7
- package/build-module/list-item/hooks/use-space.mjs +0 -52
- package/build-module/list-item/hooks/use-space.mjs.map +0 -7
- package/build-style/form-input/editor-rtl.css +0 -19
- package/build-style/form-input/editor.css +0 -19
- package/build-style/form-input/style-rtl.css +0 -46
- package/build-style/form-input/style.css +0 -46
- package/build-style/form-submission-notification/editor-rtl.css +0 -30
- package/build-style/form-submission-notification/editor.css +0 -30
- package/build-style/form-submit-button/style-rtl.css +0 -3
- package/build-style/form-submit-button/style.css +0 -3
- package/src/form/README.md +0 -90
- package/src/form/block.json +0 -65
- package/src/form/deprecated.jsx +0 -93
- package/src/form/edit.jsx +0 -169
- package/src/form/icons.jsx +0 -7
- package/src/form/index.js +0 -91
- package/src/form/index.php +0 -197
- package/src/form/init.js +0 -3
- package/src/form/save.jsx +0 -15
- package/src/form/utils.js +0 -36
- package/src/form/variations.js +0 -133
- package/src/form/view.js +0 -54
- package/src/form-input/README.md +0 -74
- package/src/form-input/block.json +0 -72
- package/src/form-input/deprecated.jsx +0 -248
- package/src/form-input/edit.jsx +0 -187
- package/src/form-input/editor.scss +0 -24
- package/src/form-input/icons.jsx +0 -7
- package/src/form-input/index.js +0 -22
- package/src/form-input/index.php +0 -47
- package/src/form-input/init.js +0 -3
- package/src/form-input/save.jsx +0 -89
- package/src/form-input/style.scss +0 -64
- package/src/form-input/variations.js +0 -82
- package/src/form-submission-notification/README.md +0 -50
- package/src/form-submission-notification/block.json +0 -19
- package/src/form-submission-notification/edit.jsx +0 -44
- package/src/form-submission-notification/editor.scss +0 -45
- package/src/form-submission-notification/index.js +0 -33
- package/src/form-submission-notification/index.php +0 -48
- package/src/form-submission-notification/init.js +0 -3
- package/src/form-submission-notification/save.jsx +0 -18
- package/src/form-submission-notification/variations.js +0 -56
- package/src/form-submit-button/README.md +0 -54
- package/src/form-submit-button/block.json +0 -15
- package/src/form-submit-button/edit.jsx +0 -12
- package/src/form-submit-button/index.js +0 -35
- package/src/form-submit-button/init.js +0 -3
- package/src/form-submit-button/save.jsx +0 -10
- package/src/form-submit-button/style.scss +0 -3
- package/src/gallery/flex-styles.js +0 -99
- package/src/list-item/hooks/use-indent-list-item.js +0 -73
- package/src/list-item/hooks/use-outdent-list-item.js +0 -100
- package/src/list-item/hooks/use-space.js +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -2,22 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 11.0.1-next.0 (2026-09-17)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Math: Read the LaTeX source from the `<annotation>` inside the saved `<math>` instead of the block comment, so `&` and `<` survive `wp_kses` for users without `unfiltered_html`. Input that cannot be rendered is saved as an annotation-only `<semantics>`, which browsers display as the source text ([#82987](https://github.com/WordPress/gutenberg/pull/82987)).
|
|
10
|
+
- Image: Inject the lightbox trigger with a literal string replacement instead of `preg_replace`, so `$` and `\` sequences in author-controlled image attributes (such as a price in the alt text) are no longer interpreted as regex backreferences and silently removed ([#79369](https://github.com/WordPress/gutenberg/pull/79369)).
|
|
11
|
+
- Cover: Grow the block with its content in Safari when an aspect ratio is set, instead of clipping the overflow. WebKit locks the box to the ratio where other engines let content expand it ([#70152](https://github.com/WordPress/gutenberg/pull/70152)).
|
|
12
|
+
- Query Pagination: Remove the editor-only `margin: 0` override on the block wrapper so the parent layout's block gap applies in the canvas as it does on the front end ([#82399](https://github.com/WordPress/gutenberg/pull/82399)).
|
|
13
|
+
- Navigation: Reset the submenu detection for each rendered block. Once a Navigation with a submenu rendered, every Navigation rendered afterwards in the same request was treated as having one and loaded the navigation view module it does not need ([#82366](https://github.com/WordPress/gutenberg/pull/82366)).
|
|
14
|
+
- Gallery: Skip the generated gap styles, and the unique classname that scopes them, for themes opting out of layout styles via `add_theme_support( 'disable-layout-styles' )` ([#81633](https://github.com/WordPress/gutenberg/pull/81633)).
|
|
15
|
+
|
|
16
|
+
### Internal
|
|
17
|
+
|
|
18
|
+
- Button: Replace deprecated `word-break: break-word` with `word-break: normal` and `overflow-wrap: anywhere` to clear the Stylelint suppression ([#82854](https://github.com/WordPress/gutenberg/pull/82854)).
|
|
19
|
+
|
|
20
|
+
## 11.0.0 (2026-09-10)
|
|
21
|
+
|
|
22
|
+
### Breaking Changes
|
|
23
|
+
|
|
24
|
+
- Remove the experimental Form, Input Field, Form Submit Button, and Form Submission Notification blocks, along with the "Form and input blocks" experiment that gated them.
|
|
6
25
|
|
|
7
26
|
### Enhancements
|
|
8
27
|
|
|
9
28
|
- Math: Declare `interactivity.clientNavigation` support. The block's front end output is static markup, and without the declaration a Math block inside a Query block forced full page reloads on pagination ([#82248](https://github.com/WordPress/gutenberg/pull/82248)).
|
|
10
29
|
- Paragraph, List, Heading, Preformatted, Columns, Group, Template Part: Read the default padding these blocks add when they have a background color from the `--wp--style--block-background-padding` custom property, so themes can change or remove it ([#82024](https://github.com/WordPress/gutenberg/pull/82024)).
|
|
11
30
|
- Query: Show a snackbar notice instead of a blocking modal when "Reload full page" is turned on automatically because a block inside the Query block doesn't support client-side navigation ([#82246](https://github.com/WordPress/gutenberg/pull/82246)).
|
|
31
|
+
- Gallery: Support viewport-specific aspect ratios, in every Gallery layout and in dynamic galleries. ([#82233](https://github.com/WordPress/gutenberg/pull/82233))
|
|
12
32
|
|
|
13
33
|
### Bug Fixes
|
|
14
34
|
|
|
35
|
+
- Navigation: Give the block appender an explicit width so it renders square, matching the appender in other container blocks ([#82718](https://github.com/WordPress/gutenberg/pull/82718)).
|
|
36
|
+
- Footnotes: Prefix newly created footnote IDs with `fn-` so they always start with a letter. A bare UUID often starts with a digit, and an ID that does is not a valid CSS identifier, so `querySelector( '#' + id )` threw and `#id` style rules never matched. Existing footnotes keep their IDs ([#82398](https://github.com/WordPress/gutenberg/pull/82398)).
|
|
37
|
+
- Navigation: Restore `flex-grow` on the menu container in the editor, where the visually hidden menu description breaks the `:only-child` selector the front end relies on, so the "Space between" and other justification settings apply in the canvas as they do on the front end ([#78447](https://github.com/WordPress/gutenberg/pull/78447)).
|
|
15
38
|
- Image: Fix cropped galleries rendering images at their natural height in the editor canvas. The baseline inline `height: auto` is no longer emitted for images inside a cropped gallery, so the gallery's own cropping CSS applies ([#82318](https://github.com/WordPress/gutenberg/pull/82318)).
|
|
16
39
|
- Tabs: Activate the tab that a URL hash points into, so an anchor set on a block inside a tab panel can be reached. Anchor links followed after the page has loaded are handled too, matching the Accordion block ([#81744](https://github.com/WordPress/gutenberg/pull/81744)).
|
|
17
40
|
- Accordion Panel: Reset padding-block when panel is hidden ([#81782](https://github.com/WordPress/gutenberg/pull/81782)).
|
|
18
41
|
- Query: Stop writing `excludeCurrent: null` into the `query` attribute of blocks that never had the key. The mount effect that clears a stale exclusion treated the absent key as stale, changing the serialized markup of every pre-existing Query block as soon as the editor opened it ([#82147](https://github.com/WordPress/gutenberg/pull/82147)).
|
|
19
42
|
- Icon: Preserve intrinsic SVG styles when applying block styles or rotation, and keep stroke widths scaling with the block's size for compatibility ([#78808](https://github.com/WordPress/gutenberg/pull/78808)).
|
|
20
43
|
- Image: Keep the selected image size, and re-point a media file or attachment page link, when an edit in the media editor saves to a new attachment. Cropping, rotating or flipping left the block rendering the full-size file while the size control still reported the size the user had chosen, and left the link pointing at the pre-edit image ([#82316](https://github.com/WordPress/gutenberg/pull/82316)).
|
|
44
|
+
- Query, Post Template: Treat a `query` attribute that omits `postType` as querying posts, matching `build_query_vars_from_query_block()` ([#82465](https://github.com/WordPress/gutenberg/pull/82465)).
|
|
21
45
|
|
|
22
46
|
### Internal
|
|
23
47
|
|
|
@@ -46,10 +70,12 @@
|
|
|
46
70
|
|
|
47
71
|
### Bug Fixes
|
|
48
72
|
|
|
73
|
+
- Audio: Explain in the Autoplay help text that browsers block audio until a visitor interacts with the page ([#69978](https://github.com/WordPress/gutenberg/pull/69978)).
|
|
49
74
|
- Cover: Use the new toggle-button presentation for the placeholder overlay color palette ([#82023](https://github.com/WordPress/gutenberg/pull/82023)).
|
|
50
75
|
- Columns: Preserve individual Column attributes supported by Group, including styles and layouts, when transforming to Row or Grid.
|
|
51
76
|
- Gallery: Don't offer the Image and Grid transforms while the block is in dynamic mode, where it has no inner blocks to convert ([#82009](https://github.com/WordPress/gutenberg/pull/82009)).
|
|
52
77
|
- Icon: Apply only padding to the inner SVG in the editor, so margin is no longer applied twice compared to the front end ([#81292](https://github.com/WordPress/gutenberg/pull/81292)).
|
|
78
|
+
- Playlist: Prevent track selector fallback values from triggering `useSelect` stability warnings.
|
|
53
79
|
- Playlist: Attach the inner block drop zone to the track list, so Playlist Track blocks show insertion markers while being reordered.
|
|
54
80
|
- Playlist Track: Hide the Title and Replace audio controls when multiple tracks are selected.
|
|
55
81
|
- Playlist Track: Mark track media fields as content so toolbar inserters add an empty track instead of duplicating the selected track.
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ registerCoreBlocks();
|
|
|
30
30
|
|
|
31
31
|
_Parameters_
|
|
32
32
|
|
|
33
|
-
-
|
|
33
|
+
- _blocks_ `Array`: An optional array of the core blocks being registered.
|
|
34
34
|
|
|
35
35
|
<!-- END TOKEN(Autogenerated API docs) -->
|
|
36
36
|
|
|
@@ -125,9 +125,9 @@ To find out more about contributing to this package or Gutenberg as a whole, ple
|
|
|
125
125
|
|
|
126
126
|
All PHP function names declared within the subdirectories of the `packages/block-library/src/` directory should start with one of the following prefixes:
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
128
|
+
- `block_core_<directory_name>`
|
|
129
|
+
- `render_block_core_<directory_name>`
|
|
130
|
+
- `register_block_core_<directory_name>`
|
|
131
131
|
|
|
132
132
|
In this context, `<directory_name>` represents the name of the directory where the corresponding `.php` file is located.
|
|
133
133
|
The directory name is converted to lowercase, and any characters except for letters and digits are replaced with underscores.
|
|
@@ -136,9 +136,9 @@ The directory name is converted to lowercase, and any characters except for lett
|
|
|
136
136
|
|
|
137
137
|
For the PHP functions declared in the `packages/block-library/src/my-block/index.php` file, the correct prefixes would be:
|
|
138
138
|
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
139
|
+
- `block_core_my_block`
|
|
140
|
+
- `render_block_core_my_block`
|
|
141
|
+
- `register_block_core_my_block`
|
|
142
142
|
|
|
143
143
|
#### Using plugin-specific prefixes/suffixes
|
|
144
144
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/archives/edit.jsx"],
|
|
4
|
-
"sourcesContent": ["import {\n\tToggleControl,\n\tSelectControl,\n\tSpinner,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { useServerSideRender } from '@wordpress/server-side-render';\nimport { useDisabled } from '@wordpress/compose';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport HtmlRenderer from '../utils/html-renderer';\n\nexport default function ArchivesEdit( { attributes, setAttributes, name } ) {\n\tconst { showLabel, showPostCounts, displayAsDropdown, type } = attributes;\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst { content, status, error } = useServerSideRender( {\n\t\tattributes,\n\t\tskipBlockSupportAttributes: true,\n\t\tblock: name,\n\t} );\n\n\tconst disabledRef = useDisabled();\n\tconst blockProps = useBlockProps( { ref: disabledRef } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tdisplayAsDropdown: false,\n\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\tshowPostCounts: false,\n\t\t\t\t\t\t\ttype: 'monthly',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Display as dropdown' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => displayAsDropdown }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { displayAsDropdown: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Display as dropdown' ) }\n\t\t\t\t\t\t\tchecked={ displayAsDropdown }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tdisplayAsDropdown: ! displayAsDropdown,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t{ displayAsDropdown && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! showLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showLabel: true } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\t\tchecked={ showLabel }\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Show post counts' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => showPostCounts }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { showPostCounts: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Show post counts' ) }\n\t\t\t\t\t\t\tchecked={ showPostCounts }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowPostCounts: ! showPostCounts,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Group by' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => type !== 'monthly' }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { type: 'monthly' } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMO;AACP,kBAA4B;AAC5B,0BAAiD;AACjD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,SAAM,GAAG,YACT,sDAAC,6BAAQ,GACV;AAAA,IAEC,WAAW,WACZ,4CAAC,SAAM,GAAG,YACT,sDAAC,OACE;AAAA;AAAA,UAED,gBAAI,WAAY;AAAA,MAChB;AAAA,IACD,GACD,GACD;AAAA,IAEC,WAAW,aACZ,4CAAC,qBAAAC,SAAA,EAAa,cAAe,YAAa,MAAO,SAAU;AAAA,KAE7D;AAEF;",
|
|
6
|
-
"names": ["ToolsPanel", "ToolsPanelItem", "HtmlRenderer"]
|
|
4
|
+
"sourcesContent": ["import {\n\tToggleControl,\n\tSelectControl as WCSelectControl,\n\tSpinner,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { useServerSideRender } from '@wordpress/server-side-render';\nimport { useDisabled } from '@wordpress/compose';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\nimport HtmlRenderer from '../utils/html-renderer';\n\nexport default function ArchivesEdit( { attributes, setAttributes, name } ) {\n\tconst { showLabel, showPostCounts, displayAsDropdown, type } = attributes;\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst { content, status, error } = useServerSideRender( {\n\t\tattributes,\n\t\tskipBlockSupportAttributes: true,\n\t\tblock: name,\n\t} );\n\n\tconst disabledRef = useDisabled();\n\tconst blockProps = useBlockProps( { ref: disabledRef } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tdisplayAsDropdown: false,\n\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\tshowPostCounts: false,\n\t\t\t\t\t\t\ttype: 'monthly',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Display as dropdown' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => displayAsDropdown }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { displayAsDropdown: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Display as dropdown' ) }\n\t\t\t\t\t\t\tchecked={ displayAsDropdown }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tdisplayAsDropdown: ! displayAsDropdown,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t{ displayAsDropdown && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\thasValue={ () => ! showLabel }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showLabel: true } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\t\tchecked={ showLabel }\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Show post counts' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => showPostCounts }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { showPostCounts: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Show post counts' ) }\n\t\t\t\t\t\t\tchecked={ showPostCounts }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowPostCounts: ! showPostCounts,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Group by' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => type !== 'monthly' }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { type: 'monthly' } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<WCSelectControl\n\t\t\t\t\t\t\tlabel={ __( 'Group by' ) }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t{ label: __( 'Year' ), value: 'yearly' },\n\t\t\t\t\t\t\t\t{ label: __( 'Month' ), value: 'monthly' },\n\t\t\t\t\t\t\t\t{ label: __( 'Week' ), value: 'weekly' },\n\t\t\t\t\t\t\t\t{ label: __( 'Day' ), value: 'daily' },\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tvalue={ type }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { type: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t{ status === 'loading' && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ status === 'error' && (\n\t\t\t\t<div { ...blockProps }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: error message returned when rendering the block. */\n\t\t\t\t\t\t\t__( 'Error: %s' ),\n\t\t\t\t\t\t\terror\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ status === 'success' && (\n\t\t\t\t<HtmlRenderer wrapperProps={ blockProps } html={ content } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMO;AACP,kBAA4B;AAC5B,0BAAiD;AACjD,gCAAoC;AACpC,qBAA4B;AAC5B,mBAA+C;AAC/C,2BAAyB;AAiBvB;AAfa,SAAR,aAA+B,EAAE,YAAY,eAAe,KAAK,GAAI;AAC3E,QAAM,EAAE,WAAW,gBAAgB,mBAAmB,KAAK,IAAI;AAE/D,QAAM,wBAAoB,6CAA+B;AAEzD,QAAM,EAAE,SAAS,QAAQ,MAAM,QAAI,+CAAqB;AAAA,IACvD;AAAA,IACA,4BAA4B;AAAA,IAC5B,OAAO;AAAA,EACR,CAAE;AAEF,QAAM,kBAAc,4BAAY;AAChC,QAAM,iBAAa,mCAAe,EAAE,KAAK,YAAY,CAAE;AAEvD,SACC,4EACC;AAAA,gDAAC,yCACA;AAAA,MAAC,kBAAAA;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,UAAW;AAAA,QACvB,UAAW,MAAM;AAChB,wBAAe;AAAA,YACd,mBAAmB;AAAA,YACnB,WAAW;AAAA,YACX,gBAAgB;AAAA,YAChB,MAAM;AAAA,UACP,CAAE;AAAA,QACH;AAAA,Q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BAAgB;AAAA,cAChB,UAAW,MAAM,SAAS;AAAA,cAC1B,YAAa,MACZ,cAAe,EAAE,MAAM,UAAU,CAAE;AAAA,cAGpC;AAAA,gBAAC,kBAAAC;AAAA,gBAAA;AAAA,kBACA,WAAQ,gBAAI,UAAW;AAAA,kBACvB,SAAU;AAAA,oBACT,EAAE,WAAO,gBAAI,MAAO,GAAG,OAAO,SAAS;AAAA,oBACvC,EAAE,WAAO,gBAAI,OAAQ,GAAG,OAAO,UAAU;AAAA,oBACzC,EAAE,WAAO,gBAAI,MAAO,GAAG,OAAO,SAAS;AAAA,oBACvC,EAAE,WAAO,gBAAI,KAAM,GAAG,OAAO,QAAQ;AAAA,kBACtC;AAAA,kBACA,OAAQ;AAAA,kBACR,UAAW,CAAE,UACZ,cAAe,EAAE,MAAM,MAAM,CAAE;AAAA;AAAA,cAEjC;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD,GACD;AAAA,IACE,WAAW,aACZ,4CAAC,SAAM,GAAG,YACT,sDAAC,6BAAQ,GACV;AAAA,IAEC,WAAW,WACZ,4CAAC,SAAM,GAAG,YACT,sDAAC,OACE;AAAA;AAAA,UAED,gBAAI,WAAY;AAAA,MAChB;AAAA,IACD,GACD,GACD;AAAA,IAEC,WAAW,aACZ,4CAAC,qBAAAC,SAAA,EAAa,cAAe,YAAa,MAAO,SAAU;AAAA,KAE7D;AAEF;",
|
|
6
|
+
"names": ["ToolsPanel", "ToolsPanelItem", "WCSelectControl", "HtmlRenderer"]
|
|
7
7
|
}
|
package/build/audio/edit.cjs
CHANGED
|
@@ -36,6 +36,7 @@ module.exports = __toCommonJS(edit_exports);
|
|
|
36
36
|
var import_clsx = __toESM(require("clsx"));
|
|
37
37
|
var import_blob = require("@wordpress/blob");
|
|
38
38
|
var import_components = require("@wordpress/components");
|
|
39
|
+
var import_ui = require("@wordpress/ui");
|
|
39
40
|
var import_block_editor = require("@wordpress/block-editor");
|
|
40
41
|
var import_i18n = require("@wordpress/i18n");
|
|
41
42
|
var import_data = require("@wordpress/data");
|
|
@@ -87,9 +88,6 @@ function AudioEdit({
|
|
|
87
88
|
function onUploadError(message) {
|
|
88
89
|
createErrorNotice(message, { type: "snackbar" });
|
|
89
90
|
}
|
|
90
|
-
function getAutoplayHelp(checked) {
|
|
91
|
-
return checked ? (0, import_i18n.__)("Autoplay may cause usability issues for some users.") : null;
|
|
92
|
-
}
|
|
93
91
|
function onSelectAudio(media) {
|
|
94
92
|
if (!media || !media.url) {
|
|
95
93
|
setAttributes({
|
|
@@ -162,6 +160,9 @@ function AudioEdit({
|
|
|
162
160
|
},
|
|
163
161
|
dropdownMenuProps,
|
|
164
162
|
children: [
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Text, { className: "wp-block-audio__autoplay-help-text", children: (0, import_i18n.__)(
|
|
164
|
+
"Most browsers block audio until a visitor interacts with the page, so autoplay often won’t work, especially on mobile. Unexpected sound can also be disruptive for screen reader users."
|
|
165
|
+
) }),
|
|
165
166
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
166
167
|
import_components.__experimentalToolsPanelItem,
|
|
167
168
|
{
|
|
@@ -176,8 +177,7 @@ function AudioEdit({
|
|
|
176
177
|
{
|
|
177
178
|
label: (0, import_i18n.__)("Autoplay"),
|
|
178
179
|
onChange: toggleAttribute("autoplay"),
|
|
179
|
-
checked: !!autoplay
|
|
180
|
-
help: getAutoplayHelp
|
|
180
|
+
checked: !!autoplay
|
|
181
181
|
}
|
|
182
182
|
)
|
|
183
183
|
}
|
package/build/audio/edit.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/audio/edit.jsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tSelectControl,\n\tSpinner,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { __, _x } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { audio as icon } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport {\n\tuseUploadMediaFromBlobURL,\n\tuseToolsPanelDropdownMenuProps,\n} from '../utils/hooks';\nimport { Caption } from '../utils/caption';\n\nconst ALLOWED_MEDIA_TYPES = [ 'audio' ];\n\n/**\n * Renders the `core/audio` block on the editor.\n *\n * @param {Object} props React props.\n * @param {Object} props.attributes Block attributes: `blob`, `src`, `caption`, `id`, `autoplay`, `loop` and `preload`.\n * @param {string} props.className Class name generated for the block.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n * @param {Function} props.onReplace Callback for replacing this block with other blocks.\n * @param {boolean} props.isSelected Whether the block is the only selected block.\n * @param {Function} props.insertBlocksAfter Callback for inserting blocks after this one.\n *\n * @return {React.JSX.Element} React element.\n */\nfunction AudioEdit( {\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tonReplace,\n\tisSelected: isSingleSelected,\n\tinsertBlocksAfter,\n} ) {\n\tconst { id, autoplay, loop, preload, src } = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\n\tuseUploadMediaFromBlobURL( {\n\t\turl: temporaryURL,\n\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\tonChange: onSelectAudio,\n\t\tonError: onUploadError,\n\t} );\n\n\tfunction toggleAttribute( attribute ) {\n\t\treturn ( newValue ) => {\n\t\t\tsetAttributes( { [ attribute ]: newValue } );\n\t\t};\n\t}\n\n\tfunction onSelectURL( newSrc ) {\n\t\t// Set the block's src from the edit component's state, and switch off\n\t\t// the editing UI.\n\t\tif ( newSrc !== src ) {\n\t\t\t// Check if there's an embed block that handles this URL.\n\t\t\tconst embedBlock = createUpgradedEmbedBlock( {\n\t\t\t\tattributes: { url: newSrc },\n\t\t\t} );\n\t\t\tif ( undefined !== embedBlock && onReplace ) {\n\t\t\t\tonReplace( embedBlock );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAttributes( { src: newSrc, id: undefined, blob: undefined } );\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t}\n\n\tfunction
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAA0B;AAC1B,wBAMO;AACP,0BAQO;AACP,kBAAuB;AACvB,kBAA4B;AAC5B,mBAA8B;AAC9B,qBAAsC;AACtC,qBAAyB;AACzB,kBAAyC;AACzC,mBAGO;AACP,qBAAwB;
|
|
6
|
-
"names": ["noticesStore", "clsx", "icon", "ToolsPanel", "ToolsPanelItem"]
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tSelectControl as WCSelectControl,\n\tSpinner,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { Text } from '@wordpress/ui';\nimport {\n\tBlockControls,\n\tBlockIcon,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { __, _x } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { audio as icon } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport { createUpgradedEmbedBlock } from '../embed/util';\nimport {\n\tuseUploadMediaFromBlobURL,\n\tuseToolsPanelDropdownMenuProps,\n} from '../utils/hooks';\nimport { Caption } from '../utils/caption';\n\nconst ALLOWED_MEDIA_TYPES = [ 'audio' ];\n\n/**\n * Renders the `core/audio` block on the editor.\n *\n * @param {Object} props React props.\n * @param {Object} props.attributes Block attributes: `blob`, `src`, `caption`, `id`, `autoplay`, `loop` and `preload`.\n * @param {string} props.className Class name generated for the block.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n * @param {Function} props.onReplace Callback for replacing this block with other blocks.\n * @param {boolean} props.isSelected Whether the block is the only selected block.\n * @param {Function} props.insertBlocksAfter Callback for inserting blocks after this one.\n *\n * @return {React.JSX.Element} React element.\n */\nfunction AudioEdit( {\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tonReplace,\n\tisSelected: isSingleSelected,\n\tinsertBlocksAfter,\n} ) {\n\tconst { id, autoplay, loop, preload, src } = attributes;\n\tconst [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\n\tuseUploadMediaFromBlobURL( {\n\t\turl: temporaryURL,\n\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\tonChange: onSelectAudio,\n\t\tonError: onUploadError,\n\t} );\n\n\tfunction toggleAttribute( attribute ) {\n\t\treturn ( newValue ) => {\n\t\t\tsetAttributes( { [ attribute ]: newValue } );\n\t\t};\n\t}\n\n\tfunction onSelectURL( newSrc ) {\n\t\t// Set the block's src from the edit component's state, and switch off\n\t\t// the editing UI.\n\t\tif ( newSrc !== src ) {\n\t\t\t// Check if there's an embed block that handles this URL.\n\t\t\tconst embedBlock = createUpgradedEmbedBlock( {\n\t\t\t\tattributes: { url: newSrc },\n\t\t\t} );\n\t\t\tif ( undefined !== embedBlock && onReplace ) {\n\t\t\t\tonReplace( embedBlock );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAttributes( { src: newSrc, id: undefined, blob: undefined } );\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tfunction onUploadError( message ) {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t}\n\n\tfunction onSelectAudio( media ) {\n\t\tif ( ! media || ! media.url ) {\n\t\t\t// In this case there was an error and we should continue in the editing state\n\t\t\t// previous attributes should be removed because they may be temporary blob urls.\n\t\t\tsetAttributes( {\n\t\t\t\tsrc: undefined,\n\t\t\t\tid: undefined,\n\t\t\t\tcaption: undefined,\n\t\t\t\tblob: undefined,\n\t\t\t} );\n\t\t\tsetTemporaryURL();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( media.url ) ) {\n\t\t\tsetTemporaryURL( media.url );\n\t\t\treturn;\n\t\t}\n\n\t\t// Sets the block's attribute and updates the edit component from the\n\t\t// selected media, then switches off the editing UI.\n\t\tsetAttributes( {\n\t\t\tblob: undefined,\n\t\t\tsrc: media.url,\n\t\t\tid: media.id,\n\t\t\tcaption: media.caption,\n\t\t} );\n\t\tsetTemporaryURL();\n\t}\n\n\tconst classes = clsx( className, {\n\t\t'is-transient': !! temporaryURL,\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t} );\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tif ( ! src && ! temporaryURL ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\ticon={ <BlockIcon icon={ icon } /> }\n\t\t\t\t\tonSelect={ onSelectAudio }\n\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\taccept=\"audio/*\"\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tvalue={ attributes }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isSingleSelected && (\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\t\tmediaId={ id }\n\t\t\t\t\t\tmediaURL={ src }\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\taccept=\"audio/*\"\n\t\t\t\t\t\tonSelect={ onSelectAudio }\n\t\t\t\t\t\tonSelectURL={ onSelectURL }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\tonReset={ () => onSelectAudio( undefined ) }\n\t\t\t\t\t\tvariant=\"toolbar\"\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tautoplay: false,\n\t\t\t\t\t\t\tloop: false,\n\t\t\t\t\t\t\tpreload: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<Text className=\"wp-block-audio__autoplay-help-text\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Most browsers block audio until a visitor interacts with the page, so autoplay often won’t work, especially on mobile. Unexpected sound can also be disruptive for screen reader users.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Autoplay' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! autoplay }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tautoplay: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Autoplay' ) }\n\t\t\t\t\t\t\tonChange={ toggleAttribute( 'autoplay' ) }\n\t\t\t\t\t\t\tchecked={ !! autoplay }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Loop' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! loop }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tloop: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Loop' ) }\n\t\t\t\t\t\t\tonChange={ toggleAttribute( 'loop' ) }\n\t\t\t\t\t\t\tchecked={ !! loop }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Preload' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! preload }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tpreload: undefined,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<WCSelectControl\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'Preload',\n\t\t\t\t\t\t\t\t'noun; Audio block parameter'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ preload || '' }\n\t\t\t\t\t\t\t// `undefined` is required for the preload attribute to be unset.\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tpreload: value || undefined,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t{ value: '', label: __( 'Browser default' ) },\n\t\t\t\t\t\t\t\t{ value: 'auto', label: __( 'Auto' ) },\n\t\t\t\t\t\t\t\t{ value: 'metadata', label: __( 'Metadata' ) },\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'none',\n\t\t\t\t\t\t\t\t\tlabel: _x( 'None', 'Preload value' ),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<figure { ...blockProps }>\n\t\t\t\t<audio\n\t\t\t\t\tcontrols=\"controls\"\n\t\t\t\t\tinert={ ! isSingleSelected ? 'true' : undefined }\n\t\t\t\t\tsrc={ src ?? temporaryURL }\n\t\t\t\t/>\n\t\t\t\t{ !! temporaryURL && <Spinner /> }\n\t\t\t\t<Caption\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSelected={ isSingleSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tlabel={ __( 'Audio caption text' ) }\n\t\t\t\t\tshowToolbarButton={\n\t\t\t\t\t\tisSingleSelected && hasNonContentControls\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</figure>\n\t\t</>\n\t);\n}\n\nexport default AudioEdit;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAA0B;AAC1B,wBAMO;AACP,gBAAqB;AACrB,0BAQO;AACP,kBAAuB;AACvB,kBAA4B;AAC5B,mBAA8B;AAC9B,qBAAsC;AACtC,qBAAyB;AACzB,kBAAyC;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AAE,OAAO,YAAY,WAAO,gBAAI,UAAW,EAAE;AAAA,oBAC7C;AAAA,sBACC,OAAO;AAAA,sBACP,WAAO,gBAAI,QAAQ,eAAgB;AAAA,oBACpC;AAAA,kBACD;AAAA;AAAA,cACD;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD,GACD;AAAA,IACA,6CAAC,YAAS,GAAG,YACZ;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,UAAS;AAAA,UACT,OAAQ,CAAE,mBAAmB,SAAS;AAAA,UACtC,KAAM,OAAO;AAAA;AAAA,MACd;AAAA,MACE,CAAC,CAAE,gBAAgB,4CAAC,6BAAQ;AAAA,MAC9B;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAa;AAAA,UACb;AAAA,UACA,WAAQ,gBAAI,oBAAqB;AAAA,UACjC,mBACC,oBAAoB;AAAA;AAAA,MAEtB;AAAA,OACD;AAAA,KACD;AAEF;AAEA,IAAO,eAAQ;",
|
|
6
|
+
"names": ["noticesStore", "clsx", "icon", "ToolsPanel", "ToolsPanelItem", "WCSelectControl"]
|
|
7
7
|
}
|
package/build/audio/index.cjs
CHANGED
|
@@ -36,17 +36,13 @@ __export(audio_exports, {
|
|
|
36
36
|
settings: () => settings
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(audio_exports);
|
|
39
|
-
var import_i18n = require("@wordpress/i18n");
|
|
40
39
|
var import_icons = require("@wordpress/icons");
|
|
41
|
-
var import_blocks = require("@wordpress/blocks");
|
|
42
40
|
var import_init_block = __toESM(require("../utils/init-block.cjs"));
|
|
43
41
|
var import_deprecated = __toESM(require("./deprecated.cjs"));
|
|
44
42
|
var import_edit = __toESM(require("./edit.cjs"));
|
|
45
43
|
var import_block = __toESM(require("./block.json"));
|
|
46
44
|
var import_save = __toESM(require("./save.cjs"));
|
|
47
45
|
var import_transforms = __toESM(require("./transforms.cjs"));
|
|
48
|
-
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
49
|
-
var { fieldsKey, formKey } = (0, import_lock_unlock.unlock)(import_blocks.privateApis);
|
|
50
46
|
var { name } = import_block.default;
|
|
51
47
|
var settings = {
|
|
52
48
|
icon: import_icons.audio,
|
|
@@ -61,39 +57,6 @@ var settings = {
|
|
|
61
57
|
edit: import_edit.default,
|
|
62
58
|
save: import_save.default
|
|
63
59
|
};
|
|
64
|
-
if (window.__experimentalContentOnlyInspectorFields) {
|
|
65
|
-
settings[fieldsKey] = [
|
|
66
|
-
{
|
|
67
|
-
id: "audio",
|
|
68
|
-
label: (0, import_i18n.__)("Audio"),
|
|
69
|
-
type: "media",
|
|
70
|
-
Edit: {
|
|
71
|
-
control: "media",
|
|
72
|
-
// TODO: replace with custom component
|
|
73
|
-
allowedTypes: ["audio"],
|
|
74
|
-
multiple: false
|
|
75
|
-
},
|
|
76
|
-
getValue: ({ item }) => ({
|
|
77
|
-
id: item.id,
|
|
78
|
-
url: item.src
|
|
79
|
-
}),
|
|
80
|
-
setValue: ({ value }) => ({
|
|
81
|
-
id: value.id,
|
|
82
|
-
src: value.url
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "caption",
|
|
87
|
-
label: (0, import_i18n.__)("Caption"),
|
|
88
|
-
type: "text",
|
|
89
|
-
Edit: "rich-text"
|
|
90
|
-
// TODO: replace with custom component
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
settings[formKey] = {
|
|
94
|
-
fields: ["audio", "caption"]
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
60
|
var init = () => (0, import_init_block.default)({ name, metadata: import_block.default, settings });
|
|
98
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
99
62
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/audio/index.js"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,
|
|
6
|
-
"names": ["metadata", "
|
|
4
|
+
"sourcesContent": ["import { audio as icon } from '@wordpress/icons';\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsrc: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg',\n\t\t},\n\t\tviewportWidth: 350,\n\t},\n\ttransforms,\n\tdeprecated,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAC9B,wBAAsB;AACtB,wBAAuB;AACvB,kBAAiB;AACjB,mBAAqB;AACrB,kBAAiB;AACjB,wBAAuB;AAEvB,IAAM,EAAE,KAAK,IAAI,aAAAA;AAIV,IAAM,WAAW;AAAA,EACvB,mBAAAC;AAAA,EACA,SAAS;AAAA,IACR,YAAY;AAAA,MACX,KAAK;AAAA,IACN;AAAA,IACA,eAAe;AAAA,EAChB;AAAA,EACA,8BAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AACD;AAEO,IAAM,OAAO,UAAM,kBAAAC,SAAW,EAAE,MAAM,uBAAAC,SAAU,SAAS,CAAE;",
|
|
6
|
+
"names": ["metadata", "icon", "transforms", "deprecated", "edit", "save", "initBlock", "metadata"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/avatar/hooks.js"],
|
|
4
|
-
"sourcesContent": ["import { store as coreStore, useEntityProp } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useDefaultAvatar } from '../utils/hooks';\n\nfunction getAvatarSizes( sizes ) {\n\tconst minSize = sizes ? sizes[ 0 ] : 24;\n\tconst maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;\n\tconst maxSizeBuffer = Math.floor( maxSize * 2.5 );\n\treturn {\n\t\tminSize,\n\t\tmaxSize: maxSizeBuffer,\n\t};\n}\n\nexport function useCommentAvatar( { commentId } ) {\n\tconst [ avatars ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_avatar_urls',\n\t\tcommentId\n\t);\n\n\tconst [ authorName ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_name',\n\t\tcommentId\n\t);\n\tconst avatarUrls = avatars ? Object.values( avatars ) : null;\n\tconst sizes = avatars ? Object.keys( avatars ) : null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\talt: authorName\n\t\t\t? // translators: %s: Author name.\n\t\t\t
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkD;AAClD,kBAA4B;AAC5B,kBAA0B;AAC1B,mBAAiC;AAEjC,SAAS,eAAgB,OAAQ;AAChC,QAAM,UAAU,QAAQ,MAAO,CAAE,IAAI;AACrC,QAAM,UAAU,QAAQ,MAAO,MAAM,SAAS,CAAE,IAAI;AACpD,QAAM,gBAAgB,KAAK,MAAO,UAAU,GAAI;AAChD,SAAO;AAAA,IACN;AAAA,IACA,SAAS;AAAA,EACV;AACD;AAEO,SAAS,iBAAkB,EAAE,UAAU,GAAI;AACjD,QAAM,CAAE,OAAQ,QAAI;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,QAAM,CAAE,UAAW,QAAI;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,aAAa,UAAU,OAAO,OAAQ,OAAQ,IAAI;AACxD,QAAM,QAAQ,UAAU,OAAO,KAAM,OAAQ,IAAI;AACjD,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAgB,KAAM;AACnD,QAAM,oBAAgB,+BAAiB;AACvC,SAAO;AAAA,IACN,KAAK,aAAa,WAAY,WAAW,SAAS,CAAE,IAAI;AAAA,IACxD;AAAA,IACA;AAAA,IACA,KAAK;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { store as coreStore, useEntityProp } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useDefaultAvatar } from '../utils/hooks';\n\nfunction getAvatarSizes( sizes ) {\n\tconst minSize = sizes ? sizes[ 0 ] : 24;\n\tconst maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;\n\tconst maxSizeBuffer = Math.floor( maxSize * 2.5 );\n\treturn {\n\t\tminSize,\n\t\tmaxSize: maxSizeBuffer,\n\t};\n}\n\nexport function useCommentAvatar( { commentId } ) {\n\tconst [ avatars ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_avatar_urls',\n\t\tcommentId\n\t);\n\n\tconst [ authorName ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_name',\n\t\tcommentId\n\t);\n\tconst avatarUrls = avatars ? Object.values( avatars ) : null;\n\tconst sizes = avatars ? Object.keys( avatars ) : null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\talt: authorName\n\t\t\t? // translators: %s: Author name.\n\t\t\t\tsprintf( __( '%s Avatar' ), authorName )\n\t\t\t: __( 'Default Avatar' ),\n\t};\n}\n\nexport function useUserAvatar( { userId, postId, postType } ) {\n\tconst { authorDetails } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tif ( userId ) {\n\t\t\t\treturn {\n\t\t\t\t\tauthorDetails: getUser( userId ),\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, userId ]\n\t);\n\tconst avatarUrls = authorDetails?.avatar_urls\n\t\t? Object.values( authorDetails.avatar_urls )\n\t\t: null;\n\tconst sizes = authorDetails?.avatar_urls\n\t\t? Object.keys( authorDetails.avatar_urls )\n\t\t: null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\talt: authorDetails\n\t\t\t? // translators: %s: Author name.\n\t\t\t\tsprintf( __( '%s Avatar' ), authorDetails?.name )\n\t\t\t: __( 'Default Avatar' ),\n\t};\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkD;AAClD,kBAA4B;AAC5B,kBAA0B;AAC1B,mBAAiC;AAEjC,SAAS,eAAgB,OAAQ;AAChC,QAAM,UAAU,QAAQ,MAAO,CAAE,IAAI;AACrC,QAAM,UAAU,QAAQ,MAAO,MAAM,SAAS,CAAE,IAAI;AACpD,QAAM,gBAAgB,KAA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,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAgB,KAAM;AACnD,QAAM,oBAAgB,+BAAiB;AACvC,SAAO;AAAA,IACN,KAAK,aAAa,WAAY,WAAW,SAAS,CAAE,IAAI;AAAA,IACxD;AAAA,IACA;AAAA,IACA,KAAK;AAAA;AAAA,UAEH,yBAAS,gBAAI,WAAY,GAAG,eAAe,IAAK;AAAA,YAC/C,gBAAI,gBAAiB;AAAA,EACzB;AACD;",
|
|
6
6
|
"names": ["coreStore"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/button/edit.jsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport { TextControl, ToolbarButton, Popover } from '@wordpress/components';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tLinkControl,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\t__experimentalGetDimensionsClassesAndStyles as useDimensionsProps,\n\t__experimentalGetElementClassName,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tuseSettings,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';\nimport { link, linkOff } from '@wordpress/icons';\nimport {\n\tcreateBlock,\n\tcloneBlock,\n\tgetDefaultBlockName,\n\tgetBlockBindingsSource,\n} from '@wordpress/blocks';\nimport {\n\tuseMergeRefs,\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Link } from '@wordpress/ui';\nimport { NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\nimport { getUpdatedLinkAttributes } from './get-updated-link-attributes';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { unlock } from '../lock-unlock';\nimport useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';\nimport { getWidthClasses, isPercentageWidth } from './utils';\n\nconst { HTMLElementControl } = unlock( blockEditorPrivateApis );\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\nconst LINK_SETTINGS = [\n\t...LinkControl.DEFAULT_LINK_SETTINGS,\n\t{\n\t\tid: 'nofollow',\n\t\ttitle: __( 'Mark as nofollow' ),\n\t},\n];\n\nfunction useEnter( clientId ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst {\n\t\tgetBlock,\n\t\tgetBlockAttributes,\n\t\tgetBlockRootClientId,\n\t\tgetBlockIndex,\n\t} = useSelect( blockEditorStore );\n\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented || event.keyCode !== ENTER ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { text } = getBlockAttributes( clientId ) ?? {};\n\t\t\tif ( text?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst topParentListBlock = getBlock(\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t\tconst blockIndex = getBlockIndex( clientId );\n\t\t\tconst head = cloneBlock( {\n\t\t\t\t...topParentListBlock,\n\t\t\t\tinnerBlocks: topParentListBlock.innerBlocks.slice(\n\t\t\t\t\t0,\n\t\t\t\t\tblockIndex\n\t\t\t\t),\n\t\t\t} );\n\t\t\tconst middle = createBlock( getDefaultBlockName() );\n\t\t\tconst after = topParentListBlock.innerBlocks.slice(\n\t\t\t\tblockIndex + 1\n\t\t\t);\n\t\t\tconst tail = after.length\n\t\t\t\t? [\n\t\t\t\t\t\tcloneBlock( {\n\t\t\t\t\t\t\t...topParentListBlock,\n\t\t\t\t\t\t\tinnerBlocks: after,\n\t\t\t\t\t\t} ),\n\t\t\t\t ]\n\t\t\t\t: [];\n\t\t\treplaceBlocks(\n\t\t\t\ttopParentListBlock.clientId,\n\t\t\t\t[ head, middle, ...tail ],\n\t\t\t\t1\n\t\t\t);\n\t\t\t// We manually change the selection here because we are replacing\n\t\t\t// a different block than the selected one.\n\t\t\tselectionChange( middle.clientId );\n\t\t}\n\n\t\t// Capture phase so we run before writing-flow's ancestor-bubble\n\t\t// keydown handlers that gate on `event.defaultPrevented`.\n\t\treturn subscribeDelegatedListener(\n\t\t\telement,\n\t\t\t'keydown',\n\t\t\tonKeyDown,\n\t\t\ttrue\n\t\t);\n\t}, [] );\n}\n\nfunction ButtonEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tclassName,\n\t\tisSelected,\n\t\tonReplace,\n\t\tmergeBlocks,\n\t\tclientId,\n\t\tcontext,\n\t} = props;\n\tconst {\n\t\ttagName,\n\t\tlinkTarget,\n\t\tplaceholder,\n\t\trel,\n\t\tstyle,\n\t\ttext,\n\t\turl,\n\t\tmetadata,\n\t} = attributes;\n\tconst width = style?.dimensions?.width;\n\n\tuseDeprecatedTextAlign( props );\n\n\tconst TagName = tagName || 'a';\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tstartEditing( event );\n\t\t} else if ( isKeyboardEvent.primaryShift( event, 'k' ) ) {\n\t\t\tunlink();\n\t\t\trichTextRef.current?.focus();\n\t\t}\n\t}\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tconst spacingProps = useSpacingProps( attributes );\n\tconst shadowProps = useShadowProps( attributes );\n\tconst dimensionsProps = useDimensionsProps( attributes );\n\tconst ref = useRef();\n\tconst richTextRef = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonKeyDown,\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst isURLSet = !! url;\n\tconst opensInNewTab = linkTarget === NEW_TAB_TARGET;\n\tconst nofollow = !! rel?.includes( NOFOLLOW_REL );\n\tconst isLinkTag = 'a' === TagName;\n\n\tconst {\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tlockUrlControls = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst _settings = select( blockEditorStore ).getSettings();\n\n\t\t\tconst blockBindingsSource = getBlockBindingsSource(\n\t\t\t\tmetadata?.bindings?.url?.source\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tcreatePageEntity: _settings.__experimentalCreatePageEntity,\n\t\t\t\tuserCanCreatePages: _settings.__experimentalUserCanCreatePages,\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t},\n\t\t[ context, isSelected, metadata?.bindings?.url ]\n\t);\n\n\tasync function handleCreate( pageTitle ) {\n\t\tconst page = await createPageEntity( {\n\t\t\ttitle: pageTitle,\n\t\t\tstatus: 'draft',\n\t\t} );\n\n\t\treturn {\n\t\t\tid: page.id,\n\t\t\ttype: page.type,\n\t\t\ttitle: page.title.rendered,\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\tfunction createButtonText( searchTerm ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Create page: <mark>%s</mark>' ),\n\t\t\t\tsearchTerm\n\t\t\t),\n\t\t\t{ mark: <mark /> }\n\t\t);\n\t}\n\n\tfunction startEditing( event ) {\n\t\tevent.preventDefault();\n\t\tsetIsEditingURL( true );\n\t}\n\n\tfunction unlink() {\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlinkTarget: undefined,\n\t\t\trel: undefined,\n\t\t} );\n\t\tsetIsEditingURL( false );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingURL( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/51256.\n\tconst linkValue = useMemo(\n\t\t() => ( { url, opensInNewTab, nofollow } ),\n\t\t[ url, opensInNewTab, nofollow ]\n\t);\n\n\tconst useEnterRef = useEnter( clientId );\n\tconst mergedRef = useMergeRefs( [ useEnterRef, richTextRef ] );\n\n\tconst [ fluidTypographySettings, layout, dimensionSizes ] = useSettings(\n\t\t'typography.fluid',\n\t\t'layout',\n\t\t'dimensions.dimensionSizes'\n\t);\n\tconst dimensionPresets = useMemo( () => {\n\t\tif ( ! dimensionSizes ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn [\n\t\t\t...( dimensionSizes?.custom ?? [] ),\n\t\t\t...( dimensionSizes?.theme ?? [] ),\n\t\t\t...( dimensionSizes?.default ?? [] ),\n\t\t];\n\t}, [ dimensionSizes ] );\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\n\t// Resolve preset dimension references to their actual values.\n\tconst resolvedWidth = useMemo( () => {\n\t\tif ( ! width ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst presetPrefix = 'var:preset|dimension|';\n\t\tif ( width.startsWith( presetPrefix ) ) {\n\t\t\tconst slug = width.slice( presetPrefix.length );\n\t\t\tconst preset = dimensionPresets?.find( ( p ) => p.slug === slug );\n\t\t\treturn preset?.size ?? width;\n\t\t}\n\t\treturn width;\n\t}, [ width, dimensionPresets ] );\n\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst hasBlockControls =\n\t\thasNonContentControls || ( isLinkTag && ! lockUrlControls );\n\tconst classes = clsx(\n\t\tblockProps.className,\n\t\tgetWidthClasses( resolvedWidth )\n\t);\n\n\tconst widthStyle = useMemo( () => {\n\t\tif ( ! width ) {\n\t\t\treturn {};\n\t\t}\n\t\tif ( isPercentageWidth( resolvedWidth ) ) {\n\t\t\treturn {\n\t\t\t\t'--wp--block-button--width': parseFloat( resolvedWidth ),\n\t\t\t};\n\t\t}\n\t\treturn dimensionsProps.style;\n\t}, [ width, resolvedWidth, dimensionsProps.style ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classes }\n\t\t\t\tstyle={ { ...blockProps.style, ...widthStyle } }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tref={ mergedRef }\n\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\tplaceholder={ placeholder || __( 'Add text…' ) }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttext: removeAnchorTag( value ),\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className,\n\t\t\t\t\t\ttypographyProps.className,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// For backwards compatibility add style that isn't\n\t\t\t\t\t\t\t// provided via block support.\n\t\t\t\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t\t\t\t[ `has-custom-font-size` ]:\n\t\t\t\t\t\t\t\tblockProps.style.fontSize,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t\t...spacingProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t\t...typographyProps.style,\n\t\t\t\t\t\twritingMode: undefined,\n\t\t\t\t\t} }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ hasBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\t\ticon={ ! isURLSet ? link : linkOff }\n\t\t\t\t\t\t\ttitle={ ! isURLSet ? __( 'Link' ) : __( 'Unlink' ) }\n\t\t\t\t\t\t\tshortcut={\n\t\t\t\t\t\t\t\t! isURLSet\n\t\t\t\t\t\t\t\t\t? displayShortcut.primary( 'k' )\n\t\t\t\t\t\t\t\t\t: displayShortcut.primaryShift( 'k' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ ! isURLSet ? startEditing : unlink }\n\t\t\t\t\t\t\tisActive={ isURLSet }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isLinkTag &&\n\t\t\t\tisSelected &&\n\t\t\t\t( isEditingURL || isURLSet ) &&\n\t\t\t\t! lockUrlControls && (\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tplacement=\"bottom\"\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\t\tfocusOnMount={ isEditingURL ? 'firstElement' : false }\n\t\t\t\t\t\t__unstableSlotName=\"__unstable-block-tools-after\"\n\t\t\t\t\t\tshift\n\t\t\t\t\t>\n\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\tvalue={ linkValue }\n\t\t\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t} ) =>\n\t\t\t\t\t\t\t\tsetAttributes(\n\t\t\t\t\t\t\t\t\tgetUpdatedLinkAttributes( {\n\t\t\t\t\t\t\t\t\t\trel,\n\t\t\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\tunlink();\n\t\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tforceIsEditingLink={ isEditingURL }\n\t\t\t\t\t\t\tsettings={ LINK_SETTINGS }\n\t\t\t\t\t\t\tcreateSuggestion={\n\t\t\t\t\t\t\t\tcreatePageEntity && handleCreate\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twithCreateSuggestion={ userCanCreatePages }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={ createButtonText }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Popover>\n\t\t\t\t) }\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<HTMLElementControl\n\t\t\t\t\ttagName={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<a>)' ), value: 'a' },\n\t\t\t\t\t\t{ label: '<button>', value: 'button' },\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t\t{ isLinkTag && (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Link relation' ) }\n\t\t\t\t\t\thelp={ createInterpolateElement(\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\topenInNewTab\n\t\t\t\t\t\t\t\t\t\thref=\"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n\nexport default ButtonEdit;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAA4B;AAC5B,qBAMO;AACP,wBAAoD;AACpD,0BAiBO;AACP,sBAAwD;AACxD,mBAA8B;AAC9B,oBAKO;AACP,qBAIO;AACP,kBAAuC;AAC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{ __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport { TextControl, ToolbarButton, Popover } from '@wordpress/components';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\tLinkControl,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\t__experimentalGetDimensionsClassesAndStyles as useDimensionsProps,\n\t__experimentalGetElementClassName,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tuseSettings,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';\nimport { link, linkOff } from '@wordpress/icons';\nimport {\n\tcreateBlock,\n\tcloneBlock,\n\tgetDefaultBlockName,\n\tgetBlockBindingsSource,\n} from '@wordpress/blocks';\nimport {\n\tuseMergeRefs,\n\tuseRefEffect,\n\tprivateApis as composePrivateApis,\n} from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Link } from '@wordpress/ui';\nimport { NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\nimport { getUpdatedLinkAttributes } from './get-updated-link-attributes';\nimport removeAnchorTag from '../utils/remove-anchor-tag';\nimport { unlock } from '../lock-unlock';\nimport useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';\nimport { getWidthClasses, isPercentageWidth } from './utils';\n\nconst { HTMLElementControl } = unlock( blockEditorPrivateApis );\nconst { subscribeDelegatedListener } = unlock( composePrivateApis );\n\nconst LINK_SETTINGS = [\n\t...LinkControl.DEFAULT_LINK_SETTINGS,\n\t{\n\t\tid: 'nofollow',\n\t\ttitle: __( 'Mark as nofollow' ),\n\t},\n];\n\nfunction useEnter( clientId ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst {\n\t\tgetBlock,\n\t\tgetBlockAttributes,\n\t\tgetBlockRootClientId,\n\t\tgetBlockIndex,\n\t} = useSelect( blockEditorStore );\n\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented || event.keyCode !== ENTER ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { text } = getBlockAttributes( clientId ) ?? {};\n\t\t\tif ( text?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tconst topParentListBlock = getBlock(\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t\tconst blockIndex = getBlockIndex( clientId );\n\t\t\tconst head = cloneBlock( {\n\t\t\t\t...topParentListBlock,\n\t\t\t\tinnerBlocks: topParentListBlock.innerBlocks.slice(\n\t\t\t\t\t0,\n\t\t\t\t\tblockIndex\n\t\t\t\t),\n\t\t\t} );\n\t\t\tconst middle = createBlock( getDefaultBlockName() );\n\t\t\tconst after = topParentListBlock.innerBlocks.slice(\n\t\t\t\tblockIndex + 1\n\t\t\t);\n\t\t\tconst tail = after.length\n\t\t\t\t? [\n\t\t\t\t\t\tcloneBlock( {\n\t\t\t\t\t\t\t...topParentListBlock,\n\t\t\t\t\t\t\tinnerBlocks: after,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t: [];\n\t\t\treplaceBlocks(\n\t\t\t\ttopParentListBlock.clientId,\n\t\t\t\t[ head, middle, ...tail ],\n\t\t\t\t1\n\t\t\t);\n\t\t\t// We manually change the selection here because we are replacing\n\t\t\t// a different block than the selected one.\n\t\t\tselectionChange( middle.clientId );\n\t\t}\n\n\t\t// Capture phase so we run before writing-flow's ancestor-bubble\n\t\t// keydown handlers that gate on `event.defaultPrevented`.\n\t\treturn subscribeDelegatedListener(\n\t\t\telement,\n\t\t\t'keydown',\n\t\t\tonKeyDown,\n\t\t\ttrue\n\t\t);\n\t}, [] );\n}\n\nfunction ButtonEdit( props ) {\n\tconst {\n\t\tattributes,\n\t\tsetAttributes,\n\t\tclassName,\n\t\tisSelected,\n\t\tonReplace,\n\t\tmergeBlocks,\n\t\tclientId,\n\t\tcontext,\n\t} = props;\n\tconst {\n\t\ttagName,\n\t\tlinkTarget,\n\t\tplaceholder,\n\t\trel,\n\t\tstyle,\n\t\ttext,\n\t\turl,\n\t\tmetadata,\n\t} = attributes;\n\tconst width = style?.dimensions?.width;\n\n\tuseDeprecatedTextAlign( props );\n\n\tconst TagName = tagName || 'a';\n\n\tfunction onKeyDown( event ) {\n\t\tif ( isKeyboardEvent.primary( event, 'k' ) ) {\n\t\t\tstartEditing( event );\n\t\t} else if ( isKeyboardEvent.primaryShift( event, 'k' ) ) {\n\t\t\tunlink();\n\t\t\trichTextRef.current?.focus();\n\t\t}\n\t}\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tconst spacingProps = useSpacingProps( attributes );\n\tconst shadowProps = useShadowProps( attributes );\n\tconst dimensionsProps = useDimensionsProps( attributes );\n\tconst ref = useRef();\n\tconst richTextRef = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonKeyDown,\n\t} );\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst isURLSet = !! url;\n\tconst opensInNewTab = linkTarget === NEW_TAB_TARGET;\n\tconst nofollow = !! rel?.includes( NOFOLLOW_REL );\n\tconst isLinkTag = 'a' === TagName;\n\n\tconst {\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tlockUrlControls = false,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst _settings = select( blockEditorStore ).getSettings();\n\n\t\t\tconst blockBindingsSource = getBlockBindingsSource(\n\t\t\t\tmetadata?.bindings?.url?.source\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tcreatePageEntity: _settings.__experimentalCreatePageEntity,\n\t\t\t\tuserCanCreatePages: _settings.__experimentalUserCanCreatePages,\n\t\t\t\tlockUrlControls:\n\t\t\t\t\t!! metadata?.bindings?.url &&\n\t\t\t\t\t! blockBindingsSource?.canUserEditValue?.( {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\targs: metadata?.bindings?.url?.args,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t},\n\t\t[ context, isSelected, metadata?.bindings?.url ]\n\t);\n\n\tasync function handleCreate( pageTitle ) {\n\t\tconst page = await createPageEntity( {\n\t\t\ttitle: pageTitle,\n\t\t\tstatus: 'draft',\n\t\t} );\n\n\t\treturn {\n\t\t\tid: page.id,\n\t\t\ttype: page.type,\n\t\t\ttitle: page.title.rendered,\n\t\t\turl: page.link,\n\t\t\tkind: 'post-type',\n\t\t};\n\t}\n\n\tfunction createButtonText( searchTerm ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Create page: <mark>%s</mark>' ),\n\t\t\t\tsearchTerm\n\t\t\t),\n\t\t\t{ mark: <mark /> }\n\t\t);\n\t}\n\n\tfunction startEditing( event ) {\n\t\tevent.preventDefault();\n\t\tsetIsEditingURL( true );\n\t}\n\n\tfunction unlink() {\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tlinkTarget: undefined,\n\t\t\trel: undefined,\n\t\t} );\n\t\tsetIsEditingURL( false );\n\t}\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingURL( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\t// Memoize link value to avoid overriding the LinkControl's internal state.\n\t// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/51256.\n\tconst linkValue = useMemo(\n\t\t() => ( { url, opensInNewTab, nofollow } ),\n\t\t[ url, opensInNewTab, nofollow ]\n\t);\n\n\tconst useEnterRef = useEnter( clientId );\n\tconst mergedRef = useMergeRefs( [ useEnterRef, richTextRef ] );\n\n\tconst [ fluidTypographySettings, layout, dimensionSizes ] = useSettings(\n\t\t'typography.fluid',\n\t\t'layout',\n\t\t'dimensions.dimensionSizes'\n\t);\n\tconst dimensionPresets = useMemo( () => {\n\t\tif ( ! dimensionSizes ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn [\n\t\t\t...( dimensionSizes?.custom ?? [] ),\n\t\t\t...( dimensionSizes?.theme ?? [] ),\n\t\t\t...( dimensionSizes?.default ?? [] ),\n\t\t];\n\t}, [ dimensionSizes ] );\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\n\t// Resolve preset dimension references to their actual values.\n\tconst resolvedWidth = useMemo( () => {\n\t\tif ( ! width ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst presetPrefix = 'var:preset|dimension|';\n\t\tif ( width.startsWith( presetPrefix ) ) {\n\t\t\tconst slug = width.slice( presetPrefix.length );\n\t\t\tconst preset = dimensionPresets?.find( ( p ) => p.slug === slug );\n\t\t\treturn preset?.size ?? width;\n\t\t}\n\t\treturn width;\n\t}, [ width, dimensionPresets ] );\n\n\tconst hasNonContentControls = blockEditingMode === 'default';\n\tconst hasBlockControls =\n\t\thasNonContentControls || ( isLinkTag && ! lockUrlControls );\n\tconst classes = clsx(\n\t\tblockProps.className,\n\t\tgetWidthClasses( resolvedWidth )\n\t);\n\n\tconst widthStyle = useMemo( () => {\n\t\tif ( ! width ) {\n\t\t\treturn {};\n\t\t}\n\t\tif ( isPercentageWidth( resolvedWidth ) ) {\n\t\t\treturn {\n\t\t\t\t'--wp--block-button--width': parseFloat( resolvedWidth ),\n\t\t\t};\n\t\t}\n\t\treturn dimensionsProps.style;\n\t}, [ width, resolvedWidth, dimensionsProps.style ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classes }\n\t\t\t\tstyle={ { ...blockProps.style, ...widthStyle } }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tref={ mergedRef }\n\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\tplaceholder={ placeholder || __( 'Add text…' ) }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttext: removeAnchorTag( value ),\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-button__link',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className,\n\t\t\t\t\t\ttypographyProps.className,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// For backwards compatibility add style that isn't\n\t\t\t\t\t\t\t// provided via block support.\n\t\t\t\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t\t\t\t[ `has-custom-font-size` ]:\n\t\t\t\t\t\t\t\tblockProps.style.fontSize,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t\t...spacingProps.style,\n\t\t\t\t\t\t...shadowProps.style,\n\t\t\t\t\t\t...typographyProps.style,\n\t\t\t\t\t\twritingMode: undefined,\n\t\t\t\t\t} }\n\t\t\t\t\tonReplace={ onReplace }\n\t\t\t\t\tonMerge={ mergeBlocks }\n\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ hasBlockControls && (\n\t\t\t\t<BlockControls group=\"block\">\n\t\t\t\t\t{ isLinkTag && ! lockUrlControls && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\tname=\"link\"\n\t\t\t\t\t\t\ticon={ ! isURLSet ? link : linkOff }\n\t\t\t\t\t\t\ttitle={ ! isURLSet ? __( 'Link' ) : __( 'Unlink' ) }\n\t\t\t\t\t\t\tshortcut={\n\t\t\t\t\t\t\t\t! isURLSet\n\t\t\t\t\t\t\t\t\t? displayShortcut.primary( 'k' )\n\t\t\t\t\t\t\t\t\t: displayShortcut.primaryShift( 'k' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ ! isURLSet ? startEditing : unlink }\n\t\t\t\t\t\t\tisActive={ isURLSet }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t{ isLinkTag &&\n\t\t\t\tisSelected &&\n\t\t\t\t( isEditingURL || isURLSet ) &&\n\t\t\t\t! lockUrlControls && (\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tplacement=\"bottom\"\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\t\tfocusOnMount={ isEditingURL ? 'firstElement' : false }\n\t\t\t\t\t\t__unstableSlotName=\"__unstable-block-tools-after\"\n\t\t\t\t\t\tshift\n\t\t\t\t\t>\n\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\tvalue={ linkValue }\n\t\t\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t} ) =>\n\t\t\t\t\t\t\t\tsetAttributes(\n\t\t\t\t\t\t\t\t\tgetUpdatedLinkAttributes( {\n\t\t\t\t\t\t\t\t\t\trel,\n\t\t\t\t\t\t\t\t\t\turl: newURL,\n\t\t\t\t\t\t\t\t\t\topensInNewTab: newOpensInNewTab,\n\t\t\t\t\t\t\t\t\t\tnofollow: newNofollow,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\tunlink();\n\t\t\t\t\t\t\t\trichTextRef.current?.focus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tforceIsEditingLink={ isEditingURL }\n\t\t\t\t\t\t\tsettings={ LINK_SETTINGS }\n\t\t\t\t\t\t\tcreateSuggestion={\n\t\t\t\t\t\t\t\tcreatePageEntity && handleCreate\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twithCreateSuggestion={ userCanCreatePages }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={ createButtonText }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Popover>\n\t\t\t\t) }\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<HTMLElementControl\n\t\t\t\t\ttagName={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<a>)' ), value: 'a' },\n\t\t\t\t\t\t{ label: '<button>', value: 'button' },\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t\t{ isLinkTag && (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Link relation' ) }\n\t\t\t\t\t\thelp={ createInterpolateElement(\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\topenInNewTab\n\t\t\t\t\t\t\t\t\t\thref=\"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\t\tonChange={ ( newRel ) =>\n\t\t\t\t\t\t\tsetAttributes( { rel: newRel } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n\nexport default ButtonEdit;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAA4B;AAC5B,qBAMO;AACP,wBAAoD;AACpD,0BAiBO;AACP,sBAAwD;AACxD,mBAA8B;AAC9B,oBAKO;AACP,qBAIO;AACP,kBAAuC;AACvC,gBAAqB;AACrB,uBAA6C;AAC7C,yCAAyC;AACzC,+BAA4B;AAC5B,yBAAuB;AACvB,8CAAmC;AACnC,mBAAmD;AA4LxC;AA1LX,IAAM,EAAE,mBAAmB,QAAI,2BAAQ,oBAAAA,WAAuB;AAC9D,IAAM,EAAE,2BAA2B,QAAI,2BAAQ,eAAAC,WAAmB;AAElE,IAAM,gBAAgB;AAAA,EACrB,GAAG,gCAAY;AAAA,EACf;AAAA,IACC,IAAI;AAAA,IACJ,WAAO,gBAAI,kBAAmB;AAAA,EAC/B;AACD;AAEA,SAAS,SAAU,UAAW;AAC7B,QAAM,EAAE,eAAe,gBAAgB,QAAI,yBAAa,oBAAAC,KAAiB;AACzE,QAAM;AAAA,IACL;AAAA,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AAAA,UACD;AAAA,UACA,OAAQ,OAAO;AAAA,UACf,UAAW,CAAE,WACZ,cAAe,EAAE,KAAK,OAAO,CAAE;AAAA;AAAA,MAEjC;AAAA,OAEF;AAAA,KACD;AAEF;AAEA,IAAO,eAAQ;",
|
|
6
6
|
"names": ["blockEditorPrivateApis", "composePrivateApis", "blockEditorStore", "useDeprecatedTextAlign", "useBorderProps", "useColorProps", "useSpacingProps", "useShadowProps", "useDimensionsProps", "useTypographyProps", "clsx", "removeAnchorTag"]
|
|
7
7
|
}
|
package/build/button/index.cjs
CHANGED
|
@@ -38,14 +38,11 @@ __export(button_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(button_exports);
|
|
39
39
|
var import_i18n = require("@wordpress/i18n");
|
|
40
40
|
var import_icons = require("@wordpress/icons");
|
|
41
|
-
var import_blocks = require("@wordpress/blocks");
|
|
42
41
|
var import_init_block = __toESM(require("../utils/init-block.cjs"));
|
|
43
42
|
var import_deprecated = __toESM(require("./deprecated.cjs"));
|
|
44
43
|
var import_edit = __toESM(require("./edit.cjs"));
|
|
45
44
|
var import_block = __toESM(require("./block.json"));
|
|
46
45
|
var import_save = __toESM(require("./save.cjs"));
|
|
47
|
-
var import_lock_unlock = require("../lock-unlock.cjs");
|
|
48
|
-
var { fieldsKey, formKey } = (0, import_lock_unlock.unlock)(import_blocks.privateApis);
|
|
49
46
|
var { name } = import_block.default;
|
|
50
47
|
var settings = {
|
|
51
48
|
icon: import_icons.button,
|
|
@@ -74,37 +71,6 @@ var settings = {
|
|
|
74
71
|
}
|
|
75
72
|
}
|
|
76
73
|
};
|
|
77
|
-
if (window.__experimentalContentOnlyInspectorFields) {
|
|
78
|
-
settings[fieldsKey] = [
|
|
79
|
-
{
|
|
80
|
-
id: "text",
|
|
81
|
-
label: (0, import_i18n.__)("Content"),
|
|
82
|
-
type: "text",
|
|
83
|
-
Edit: "rich-text"
|
|
84
|
-
// TODO: replace with custom component
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: "link",
|
|
88
|
-
label: (0, import_i18n.__)("Link"),
|
|
89
|
-
type: "url",
|
|
90
|
-
Edit: "link",
|
|
91
|
-
// TODO: replace with custom component
|
|
92
|
-
getValue: ({ item }) => ({
|
|
93
|
-
url: item.url,
|
|
94
|
-
rel: item.rel,
|
|
95
|
-
linkTarget: item.linkTarget
|
|
96
|
-
}),
|
|
97
|
-
setValue: ({ value }) => ({
|
|
98
|
-
url: value.url,
|
|
99
|
-
rel: value.rel,
|
|
100
|
-
linkTarget: value.linkTarget
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
];
|
|
104
|
-
settings[formKey] = {
|
|
105
|
-
fields: ["text", "link"]
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
74
|
var init = () => (0, import_init_block.default)({ name, metadata: import_block.default, settings });
|
|
109
75
|
// Annotate the CommonJS export names for ESM import in node:
|
|
110
76
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/button/index.js"],
|
|
4
|
-
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { button as icon } from '@wordpress/icons';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,mBAA+B;AAC/B,
|
|
6
|
-
"names": ["metadata", "
|
|
4
|
+
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { button as icon } from '@wordpress/icons';\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tclassName: 'is-style-fill',\n\t\t\ttext: __( 'Call to action' ),\n\t\t},\n\t},\n\tedit,\n\tsave,\n\tdeprecated,\n\tmerge: ( a, { text = '' } ) => ( {\n\t\t...a,\n\t\ttext: ( a.text || '' ) + text,\n\t} ),\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { text } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasContent = text?.trim().length > 0;\n\n\t\t// In the list view, use the block's text as the label.\n\t\t// If the text is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasContent ) ) {\n\t\t\treturn customName || text;\n\t\t}\n\n\t\tif ( context === 'breadcrumb' && customName ) {\n\t\t\treturn customName;\n\t\t}\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,mBAA+B;AAC/B,wBAAsB;AACtB,wBAAuB;AACvB,kBAAiB;AACjB,mBAAqB;AACrB,kBAAiB;AAEjB,IAAM,EAAE,KAAK,IAAI,aAAAA;AAIV,IAAM,WAAW;AAAA,EACvB,mBAAAC;AAAA,EACA,SAAS;AAAA,IACR,YAAY;AAAA,MACX,WAAW;AAAA,MACX,UAAM,gBAAI,gBAAiB;AAAA,IAC5B;AAAA,EACD;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,OAAO,CAAE,GAAG,EAAE,OAAO,GAAG,OAAS;AAAA,IAChC,GAAG;AAAA,IACH,OAAQ,EAAE,QAAQ,MAAO;AAAA,EAC1B;AAAA,EACA,oBAAqB,YAAY,EAAE,QAAQ,GAAI;AAC9C,UAAM,EAAE,KAAK,IAAI;AAEjB,UAAM,aAAa,YAAY,UAAU;AACzC,UAAM,aAAa,MAAM,KAAK,EAAE,SAAS;AAIzC,QAAK,YAAY,gBAAiB,cAAc,aAAe;AAC9D,aAAO,cAAc;AAAA,IACtB;AAEA,QAAK,YAAY,gBAAgB,YAAa;AAC7C,aAAO;AAAA,IACR;AAAA,EACD;AACD;AAEO,IAAM,OAAO,UAAM,kBAAAC,SAAW,EAAE,MAAM,uBAAAC,SAAU,SAAS,CAAE;",
|
|
6
|
+
"names": ["metadata", "icon", "edit", "save", "deprecated", "initBlock", "metadata"]
|
|
7
7
|
}
|