@wordpress/block-library 9.3.0 → 9.4.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 +2 -0
- package/build/block/edit.js +38 -23
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/index.js +26 -0
- package/build/buttons/index.js.map +1 -1
- package/build/categories/edit.js +20 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +8 -0
- package/build/categories/index.js.map +1 -1
- package/build/columns/index.js +2 -2
- package/build/columns/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +2 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/embed/variations.js +39 -34
- package/build/embed/variations.js.map +1 -1
- package/build/footnotes/index.js +1 -1
- package/build/footnotes/index.js.map +1 -1
- package/build/form-input/edit.js +2 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/index.js +10 -0
- package/build/gallery/index.js.map +1 -1
- package/build/group/deprecated.js +2 -5
- package/build/group/deprecated.js.map +1 -1
- package/build/heading/index.js +14 -1
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +24 -11
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +3 -0
- package/build/image/index.js.map +1 -1
- package/build/image/view.js +65 -49
- package/build/image/view.js.map +1 -1
- package/build/latest-comments/index.js +9 -0
- package/build/latest-comments/index.js.map +1 -1
- package/build/list/edit.js +3 -3
- package/build/list/edit.js.map +1 -1
- package/build/list-item/edit.js +2 -2
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +0 -7
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/media-text/index.js +12 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +5 -1
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/link-ui.js +13 -17
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +0 -11
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +1 -0
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list-item/edit.js +4 -1
- package/build/page-list-item/edit.js.map +1 -1
- package/build/paragraph/index.js +6 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +6 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +8 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +3 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +3 -0
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-date/index.js +3 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/index.js +3 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-terms/index.js +3 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +5 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +3 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +24 -6
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/order-control.js +1 -0
- package/build/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +2 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/sticky-control.js +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-content.js +11 -2
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +1 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/utils.js +5 -1
- package/build/query/utils.js.map +1 -1
- package/build/query/variations.js +9 -55
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +1 -0
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/edit.js +11 -19
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/use-archive-label.js +95 -0
- package/build/query-title/use-archive-label.js.map +1 -0
- package/build/quote/index.js +15 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/index.js +3 -0
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +4 -1
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +5 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +6 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit.js +4 -1
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +6 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/icons/soundcloud.js +1 -1
- package/build/social-link/icons/soundcloud.js.map +1 -1
- package/build/social-links/index.js +12 -0
- package/build/social-links/index.js.map +1 -1
- package/build/tag-cloud/edit.js +4 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/template-part/edit/index.js +5 -3
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +8 -3
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +23 -3
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/template-part/edit/title-modal.js +20 -8
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/term-description/index.js +12 -0
- package/build/term-description/index.js.map +1 -1
- package/build/utils/hooks.js +5 -1
- package/build/utils/hooks.js.map +1 -1
- package/build-module/block/edit.js +38 -23
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +1 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/index.js +26 -0
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/categories/edit.js +21 -4
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +8 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/columns/index.js +2 -2
- package/build-module/columns/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +2 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/embed/variations.js +40 -35
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/footnotes/index.js +1 -1
- package/build-module/footnotes/index.js.map +1 -1
- package/build-module/form-input/edit.js +2 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/index.js +10 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/group/deprecated.js +2 -5
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/heading/index.js +14 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +1 -1
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +25 -12
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +3 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/view.js +65 -49
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-comments/index.js +9 -0
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/list/edit.js +3 -3
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list-item/edit.js +2 -2
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +0 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/media-text/index.js +12 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +5 -1
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +13 -17
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +0 -11
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +1 -0
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list-item/edit.js +4 -1
- package/build-module/page-list-item/edit.js.map +1 -1
- package/build-module/paragraph/index.js +6 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +6 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +8 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +3 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +3 -0
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-date/index.js +3 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +3 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-terms/index.js +3 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +5 -1
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +3 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +25 -7
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/order-control.js +1 -0
- package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-content.js +11 -2
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +1 -14
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/utils.js +5 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query/variations.js +4 -50
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -0
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/edit.js +12 -20
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/use-archive-label.js +88 -0
- package/build-module/query-title/use-archive-label.js.map +1 -0
- package/build-module/quote/index.js +15 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/index.js +3 -0
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -1
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +5 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +6 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit.js +4 -1
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +6 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/icons/soundcloud.js +1 -1
- package/build-module/social-link/icons/soundcloud.js.map +1 -1
- package/build-module/social-links/index.js +12 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/tag-cloud/edit.js +4 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/template-part/edit/index.js +5 -3
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +8 -3
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +23 -3
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/template-part/edit/title-modal.js +20 -8
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/term-description/index.js +12 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/hooks.js +5 -1
- package/build-module/utils/hooks.js.map +1 -1
- package/build-style/categories/editor-rtl.css +4 -0
- package/build-style/categories/editor.css +4 -0
- package/build-style/categories/style-rtl.css +4 -0
- package/build-style/categories/style.css +4 -0
- package/build-style/editor-rtl.css +13 -12
- package/build-style/editor.css +13 -12
- package/build-style/image/editor-rtl.css +8 -4
- package/build-style/image/editor.css +8 -4
- package/build-style/image/style-rtl.css +19 -0
- package/build-style/image/style.css +19 -0
- package/build-style/list/style-rtl.css +1 -1
- package/build-style/list/style.css +1 -1
- package/build-style/navigation/style-rtl.css +1 -4
- package/build-style/navigation/style.css +1 -4
- package/build-style/post-comments-form/style-rtl.css +1 -1
- package/build-style/post-comments-form/style.css +1 -1
- package/build-style/query/editor-rtl.css +0 -7
- package/build-style/query/editor.css +0 -7
- package/build-style/search/editor-rtl.css +1 -1
- package/build-style/search/editor.css +1 -1
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +29 -8
- package/build-style/style.css +29 -8
- package/build-style/term-description/style-rtl.css +1 -0
- package/build-style/term-description/style.css +1 -0
- package/package.json +35 -35
- package/src/block/edit.js +58 -27
- package/src/block/test/edit.native.js +6 -2
- package/src/button/edit.js +1 -1
- package/src/button/index.php +2 -2
- package/src/buttons/block.json +20 -0
- package/src/buttons/index.js +6 -0
- package/src/categories/block.json +8 -0
- package/src/categories/edit.js +32 -4
- package/src/categories/editor.scss +4 -0
- package/src/categories/index.php +4 -1
- package/src/categories/style.scss +4 -0
- package/src/columns/index.js +1 -1
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
- package/src/embed/test/index.js +1 -1
- package/src/embed/test/index.native.js +24 -23
- package/src/embed/variations.js +43 -35
- package/src/footnotes/index.js +1 -2
- package/src/form-input/edit.js +2 -0
- package/src/gallery/block.json +10 -0
- package/src/group/deprecated.js +3 -7
- package/src/heading/block.json +12 -0
- package/src/heading/index.js +1 -0
- package/src/image/block.json +3 -0
- package/src/image/edit.js +1 -1
- package/src/image/editor.scss +6 -1
- package/src/image/image.js +55 -35
- package/src/image/index.php +32 -15
- package/src/image/style.scss +22 -0
- package/src/image/test/edit.native.js +1 -0
- package/src/image/view.js +69 -49
- package/src/latest-comments/block.json +9 -0
- package/src/list/edit.js +3 -3
- package/src/list/style.scss +1 -1
- package/src/list-item/edit.js +2 -2
- package/src/list-item/hooks/index.js +0 -1
- package/src/media-text/block.json +12 -0
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/src/navigation/index.php +1 -1
- package/src/navigation/style.scss +4 -9
- package/src/navigation/test/use-navigation-menu.js +54 -15
- package/src/navigation/use-navigation-menu.js +5 -1
- package/src/navigation-link/link-ui.js +8 -14
- package/src/navigation-submenu/edit.js +1 -13
- package/src/page-list/edit.js +1 -0
- package/src/page-list-item/edit.js +4 -4
- package/src/paragraph/block.json +6 -0
- package/src/post-author/index.js +8 -0
- package/src/post-author-biography/block.json +3 -0
- package/src/post-author-name/block.json +3 -0
- package/src/post-comments-form/style.scss +1 -1
- package/src/post-date/block.json +3 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-featured-image/block.json +3 -0
- package/src/post-terms/block.json +3 -0
- package/src/post-title/edit.js +5 -5
- package/src/query/edit/inspector-controls/author-control.js +2 -0
- package/src/query/edit/inspector-controls/index.js +41 -14
- package/src/query/edit/inspector-controls/order-control.js +1 -0
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/inspector-controls/sticky-control.js +1 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
- package/src/query/edit/query-content.js +17 -3
- package/src/query/edit/query-placeholder.js +1 -21
- package/src/query/editor.scss +0 -9
- package/src/query/utils.js +4 -0
- package/src/query/variations.js +4 -46
- package/src/query-pagination-numbers/edit.js +1 -0
- package/src/query-title/edit.js +10 -17
- package/src/query-title/use-archive-label.js +99 -0
- package/src/quote/block.json +15 -1
- package/src/search/block.json +3 -0
- package/src/search/editor.scss +1 -1
- package/src/site-logo/edit.js +4 -1
- package/src/site-tagline/block.json +6 -1
- package/src/site-tagline/edit.js +5 -2
- package/src/site-title/edit.js +4 -1
- package/src/site-title/index.js +6 -1
- package/src/social-link/icons/soundcloud.js +1 -1
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/block.json +12 -0
- package/src/tag-cloud/edit.js +7 -1
- package/src/template-part/edit/index.js +5 -3
- package/src/template-part/edit/inner-blocks.js +8 -5
- package/src/template-part/edit/placeholder.js +31 -6
- package/src/template-part/edit/title-modal.js +18 -4
- package/src/term-description/block.json +12 -0
- package/src/term-description/style.scss +2 -0
- package/src/utils/hooks.js +5 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/list-item/hooks/use-split.js +0 -39
- package/build/list-item/hooks/use-split.js.map +0 -1
- package/build-module/list-item/hooks/use-split.js +0 -32
- package/build-module/list-item/hooks/use-split.js.map +0 -1
- package/src/list-item/hooks/use-split.js +0 -33
|
@@ -106,21 +106,21 @@ exports[`Embed block edit URL sets empty state when setting an empty URL 1`] = `
|
|
|
106
106
|
|
|
107
107
|
exports[`Embed block insert via slash inserter insert generic embed block 1`] = `"<!-- wp:embed /-->"`;
|
|
108
108
|
|
|
109
|
-
exports[`Embed block insert via slash inserter inserts Twitter
|
|
109
|
+
exports[`Embed block insert via slash inserter inserts Twitter Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"twitter","responsive":true} /-->"`;
|
|
110
110
|
|
|
111
|
-
exports[`Embed block insert via slash inserter inserts Vimeo
|
|
111
|
+
exports[`Embed block insert via slash inserter inserts Vimeo Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"vimeo","responsive":true} /-->"`;
|
|
112
112
|
|
|
113
|
-
exports[`Embed block insert via slash inserter inserts WordPress
|
|
113
|
+
exports[`Embed block insert via slash inserter inserts WordPress Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"wordpress"} /-->"`;
|
|
114
114
|
|
|
115
|
-
exports[`Embed block insert via slash inserter inserts YouTube
|
|
115
|
+
exports[`Embed block insert via slash inserter inserts YouTube Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"youtube","responsive":true} /-->"`;
|
|
116
116
|
|
|
117
|
-
exports[`Embed block insertion inserts Twitter
|
|
117
|
+
exports[`Embed block insertion inserts Twitter Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"twitter","responsive":true} /-->"`;
|
|
118
118
|
|
|
119
|
-
exports[`Embed block insertion inserts Vimeo
|
|
119
|
+
exports[`Embed block insertion inserts Vimeo Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"vimeo","responsive":true} /-->"`;
|
|
120
120
|
|
|
121
|
-
exports[`Embed block insertion inserts WordPress
|
|
121
|
+
exports[`Embed block insertion inserts WordPress Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"wordpress"} /-->"`;
|
|
122
122
|
|
|
123
|
-
exports[`Embed block insertion inserts YouTube
|
|
123
|
+
exports[`Embed block insertion inserts YouTube Embed block 1`] = `"<!-- wp:embed {"providerNameSlug":"youtube","responsive":true} /-->"`;
|
|
124
124
|
|
|
125
125
|
exports[`Embed block insertion inserts generic embed block 1`] = `"<!-- wp:embed /-->"`;
|
|
126
126
|
|
package/src/embed/test/index.js
CHANGED
|
@@ -230,7 +230,7 @@ describe( 'Embed block', () => {
|
|
|
230
230
|
} );
|
|
231
231
|
|
|
232
232
|
MOST_USED_PROVIDERS.forEach( ( { title } ) =>
|
|
233
|
-
it( `inserts ${ title }
|
|
233
|
+
it( `inserts ${ title } block`, async () => {
|
|
234
234
|
const { block } = await insertEmbedBlock( title );
|
|
235
235
|
const blockName = within( block ).getByText( title );
|
|
236
236
|
|
|
@@ -285,10 +285,10 @@ describe( 'Embed block', () => {
|
|
|
285
285
|
const blockSettingsModal = await editor.findByTestId(
|
|
286
286
|
'block-settings-modal'
|
|
287
287
|
);
|
|
288
|
-
// Get Twitter link field.
|
|
288
|
+
// Get Twitter Embed link field.
|
|
289
289
|
const twitterLinkField = within(
|
|
290
290
|
blockSettingsModal
|
|
291
|
-
).getByLabelText( `Twitter link, ${ expectedURL }` );
|
|
291
|
+
).getByLabelText( `Twitter Embed link, ${ expectedURL }` );
|
|
292
292
|
|
|
293
293
|
expect( twitterLinkField ).toBeDefined();
|
|
294
294
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -321,10 +321,10 @@ describe( 'Embed block', () => {
|
|
|
321
321
|
const blockSettingsModal = await editor.findByTestId(
|
|
322
322
|
'block-settings-modal'
|
|
323
323
|
);
|
|
324
|
-
// Get Twitter link field.
|
|
324
|
+
// Get Twitter Embed link field.
|
|
325
325
|
const twitterLinkField = within(
|
|
326
326
|
blockSettingsModal
|
|
327
|
-
).getByLabelText( `Twitter link, ${ clipboardURL }` );
|
|
327
|
+
).getByLabelText( `Twitter Embed link, ${ clipboardURL }` );
|
|
328
328
|
|
|
329
329
|
expect( autopastedLinkField ).toBeDefined();
|
|
330
330
|
expect( twitterLinkField ).toBeDefined();
|
|
@@ -383,10 +383,10 @@ describe( 'Embed block', () => {
|
|
|
383
383
|
const blockSettingsModal = await editor.findByTestId(
|
|
384
384
|
'block-settings-modal'
|
|
385
385
|
);
|
|
386
|
-
// Get Twitter link field.
|
|
386
|
+
// Get Twitter Embed link field.
|
|
387
387
|
const twitterLinkField = within(
|
|
388
388
|
blockSettingsModal
|
|
389
|
-
).getByLabelText( `Twitter link, ${ expectedURL }` );
|
|
389
|
+
).getByLabelText( `Twitter Embed link, ${ expectedURL }` );
|
|
390
390
|
|
|
391
391
|
expect( twitterLinkField ).toBeDefined();
|
|
392
392
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -422,10 +422,10 @@ describe( 'Embed block', () => {
|
|
|
422
422
|
const blockSettingsModal = await editor.findByTestId(
|
|
423
423
|
'block-settings-modal'
|
|
424
424
|
);
|
|
425
|
-
// Get Twitter link field.
|
|
425
|
+
// Get Twitter Embed link field.
|
|
426
426
|
const twitterLinkField = within(
|
|
427
427
|
blockSettingsModal
|
|
428
|
-
).getByLabelText( `Twitter link, ${ clipboardURL }` );
|
|
428
|
+
).getByLabelText( `Twitter Embed link, ${ clipboardURL }` );
|
|
429
429
|
|
|
430
430
|
expect( embedLink ).toBeDefined();
|
|
431
431
|
expect( twitterLinkField ).toBeDefined();
|
|
@@ -472,10 +472,10 @@ describe( 'Embed block', () => {
|
|
|
472
472
|
);
|
|
473
473
|
await waitForModalVisible( blockSettingsModal );
|
|
474
474
|
|
|
475
|
-
// Start editing link.
|
|
475
|
+
// Start editing Embed link.
|
|
476
476
|
fireEvent.press(
|
|
477
477
|
within( blockSettingsModal ).getByLabelText(
|
|
478
|
-
`Twitter link, ${ initialURL }`
|
|
478
|
+
`Twitter Embed link, ${ initialURL }`
|
|
479
479
|
)
|
|
480
480
|
);
|
|
481
481
|
|
|
@@ -491,10 +491,10 @@ describe( 'Embed block', () => {
|
|
|
491
491
|
await waitFor( () => editor.UNSAFE_getByType( WebView ) );
|
|
492
492
|
await editor.findByText( 'Media settings' );
|
|
493
493
|
|
|
494
|
-
// Get YouTube link field.
|
|
494
|
+
// Get YouTube Embed link field.
|
|
495
495
|
const youtubeLinkField = await within(
|
|
496
496
|
blockSettingsModal
|
|
497
|
-
).findByLabelText( `YouTube link, ${ expectedURL }` );
|
|
497
|
+
).findByLabelText( `YouTube Embed link, ${ expectedURL }` );
|
|
498
498
|
|
|
499
499
|
expect( youtubeLinkField ).toBeDefined();
|
|
500
500
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -519,7 +519,7 @@ describe( 'Embed block', () => {
|
|
|
519
519
|
// Start editing link.
|
|
520
520
|
fireEvent.press(
|
|
521
521
|
within( blockSettingsModal ).getByLabelText(
|
|
522
|
-
`Twitter link, ${ previousURL }`
|
|
522
|
+
`Twitter Embed link, ${ previousURL }`
|
|
523
523
|
)
|
|
524
524
|
);
|
|
525
525
|
|
|
@@ -557,7 +557,7 @@ describe( 'Embed block', () => {
|
|
|
557
557
|
// Start editing link.
|
|
558
558
|
fireEvent.press(
|
|
559
559
|
within( blockSettingsModal ).getByLabelText(
|
|
560
|
-
`Twitter link, ${ previousURL }`
|
|
560
|
+
`Twitter Embed link, ${ previousURL }`
|
|
561
561
|
)
|
|
562
562
|
);
|
|
563
563
|
|
|
@@ -661,10 +661,10 @@ describe( 'Embed block', () => {
|
|
|
661
661
|
fireEvent( blockSettingsModal, 'backdropPress' );
|
|
662
662
|
fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT );
|
|
663
663
|
|
|
664
|
-
// Get Twitter link field.
|
|
664
|
+
// Get Twitter Embed link field.
|
|
665
665
|
const twitterLinkField = await within(
|
|
666
666
|
blockSettingsModal
|
|
667
|
-
).findByLabelText( `Twitter link, ${ expectedURL }` );
|
|
667
|
+
).findByLabelText( `Twitter Embed link, ${ expectedURL }` );
|
|
668
668
|
|
|
669
669
|
expect( twitterLinkField ).toBeDefined();
|
|
670
670
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -728,10 +728,10 @@ describe( 'Embed block', () => {
|
|
|
728
728
|
const blockSettingsModal = await editor.findByTestId(
|
|
729
729
|
'block-settings-modal'
|
|
730
730
|
);
|
|
731
|
-
// Get Twitter link field.
|
|
731
|
+
// Get Twitter Embed link field.
|
|
732
732
|
const twitterLinkField = within(
|
|
733
733
|
blockSettingsModal
|
|
734
|
-
).getByLabelText( `Twitter link, ${ expectedURL }` );
|
|
734
|
+
).getByLabelText( `Twitter Embed link, ${ expectedURL }` );
|
|
735
735
|
|
|
736
736
|
expect( twitterLinkField ).toBeDefined();
|
|
737
737
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -811,10 +811,10 @@ describe( 'Embed block', () => {
|
|
|
811
811
|
const blockSettingsModal = await editor.findByTestId(
|
|
812
812
|
'block-settings-modal'
|
|
813
813
|
);
|
|
814
|
-
// Get Twitter link field.
|
|
814
|
+
// Get Twitter embed link field.
|
|
815
815
|
const twitterLinkField = within(
|
|
816
816
|
blockSettingsModal
|
|
817
|
-
).getByLabelText( `Twitter link, ${ successURL }` );
|
|
817
|
+
).getByLabelText( `Twitter Embed link, ${ successURL }` );
|
|
818
818
|
|
|
819
819
|
expect( twitterLinkField ).toBeDefined();
|
|
820
820
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
@@ -1000,8 +1000,9 @@ describe( 'Embed block', () => {
|
|
|
1000
1000
|
} );
|
|
1001
1001
|
|
|
1002
1002
|
MOST_USED_PROVIDERS.forEach( ( { title } ) =>
|
|
1003
|
-
it( `inserts ${ title }
|
|
1004
|
-
|
|
1003
|
+
it( `inserts ${ title } block`, async () => {
|
|
1004
|
+
// Get just the first word of the title ("Twitter") as the full title ("Twitter Embed") breaks the test.
|
|
1005
|
+
const embedBlockSlashInserter = `/${ title.split( ' ' )[ 0 ] }`;
|
|
1005
1006
|
const editor = await initializeEditor( {
|
|
1006
1007
|
initialHtml: EMPTY_PARAGRAPH_HTML,
|
|
1007
1008
|
} );
|
package/src/embed/variations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -32,6 +32,14 @@ import {
|
|
|
32
32
|
|
|
33
33
|
/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
|
|
34
34
|
|
|
35
|
+
function getTitle( providerName ) {
|
|
36
|
+
return sprintf(
|
|
37
|
+
/* translators: %s: provider name */
|
|
38
|
+
__( '%s Embed' ),
|
|
39
|
+
providerName
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
/**
|
|
36
44
|
* The embed provider services.
|
|
37
45
|
*
|
|
@@ -40,7 +48,7 @@ import {
|
|
|
40
48
|
const variations = [
|
|
41
49
|
{
|
|
42
50
|
name: 'twitter',
|
|
43
|
-
title: 'Twitter',
|
|
51
|
+
title: getTitle( 'Twitter' ),
|
|
44
52
|
icon: embedTwitterIcon,
|
|
45
53
|
keywords: [ 'tweet', __( 'social' ) ],
|
|
46
54
|
description: __( 'Embed a tweet.' ),
|
|
@@ -49,7 +57,7 @@ const variations = [
|
|
|
49
57
|
},
|
|
50
58
|
{
|
|
51
59
|
name: 'youtube',
|
|
52
|
-
title: 'YouTube',
|
|
60
|
+
title: getTitle( 'YouTube' ),
|
|
53
61
|
icon: embedYouTubeIcon,
|
|
54
62
|
keywords: [ __( 'music' ), __( 'video' ) ],
|
|
55
63
|
description: __( 'Embed a YouTube video.' ),
|
|
@@ -63,7 +71,7 @@ const variations = [
|
|
|
63
71
|
// Deprecate Facebook Embed per FB policy
|
|
64
72
|
// See: https://developers.facebook.com/docs/plugins/oembed-legacy
|
|
65
73
|
name: 'facebook',
|
|
66
|
-
title: 'Facebook',
|
|
74
|
+
title: getTitle( 'Facebook' ),
|
|
67
75
|
icon: embedFacebookIcon,
|
|
68
76
|
keywords: [ __( 'social' ) ],
|
|
69
77
|
description: __( 'Embed a Facebook post.' ),
|
|
@@ -79,7 +87,7 @@ const variations = [
|
|
|
79
87
|
// Deprecate Instagram per FB policy
|
|
80
88
|
// See: https://developers.facebook.com/docs/instagram/oembed-legacy
|
|
81
89
|
name: 'instagram',
|
|
82
|
-
title: 'Instagram',
|
|
90
|
+
title: getTitle( 'Instagram' ),
|
|
83
91
|
icon: embedInstagramIcon,
|
|
84
92
|
keywords: [ __( 'image' ), __( 'social' ) ],
|
|
85
93
|
description: __( 'Embed an Instagram post.' ),
|
|
@@ -89,7 +97,7 @@ const variations = [
|
|
|
89
97
|
},
|
|
90
98
|
{
|
|
91
99
|
name: 'wordpress',
|
|
92
|
-
title: 'WordPress',
|
|
100
|
+
title: getTitle( 'WordPress' ),
|
|
93
101
|
icon: embedWordPressIcon,
|
|
94
102
|
keywords: [ __( 'post' ), __( 'blog' ) ],
|
|
95
103
|
description: __( 'Embed a WordPress post.' ),
|
|
@@ -99,7 +107,7 @@ const variations = [
|
|
|
99
107
|
},
|
|
100
108
|
{
|
|
101
109
|
name: 'soundcloud',
|
|
102
|
-
title: 'SoundCloud',
|
|
110
|
+
title: getTitle( 'SoundCloud' ),
|
|
103
111
|
icon: embedAudioIcon,
|
|
104
112
|
keywords: [ __( 'music' ), __( 'audio' ) ],
|
|
105
113
|
description: __( 'Embed SoundCloud content.' ),
|
|
@@ -108,7 +116,7 @@ const variations = [
|
|
|
108
116
|
},
|
|
109
117
|
{
|
|
110
118
|
name: 'spotify',
|
|
111
|
-
title: 'Spotify',
|
|
119
|
+
title: getTitle( 'Spotify' ),
|
|
112
120
|
icon: embedSpotifyIcon,
|
|
113
121
|
keywords: [ __( 'music' ), __( 'audio' ) ],
|
|
114
122
|
description: __( 'Embed Spotify content.' ),
|
|
@@ -117,7 +125,7 @@ const variations = [
|
|
|
117
125
|
},
|
|
118
126
|
{
|
|
119
127
|
name: 'flickr',
|
|
120
|
-
title: 'Flickr',
|
|
128
|
+
title: getTitle( 'Flickr' ),
|
|
121
129
|
icon: embedFlickrIcon,
|
|
122
130
|
keywords: [ __( 'image' ) ],
|
|
123
131
|
description: __( 'Embed Flickr content.' ),
|
|
@@ -129,7 +137,7 @@ const variations = [
|
|
|
129
137
|
},
|
|
130
138
|
{
|
|
131
139
|
name: 'vimeo',
|
|
132
|
-
title: 'Vimeo',
|
|
140
|
+
title: getTitle( 'Vimeo' ),
|
|
133
141
|
icon: embedVimeoIcon,
|
|
134
142
|
keywords: [ __( 'video' ) ],
|
|
135
143
|
description: __( 'Embed a Vimeo video.' ),
|
|
@@ -138,7 +146,7 @@ const variations = [
|
|
|
138
146
|
},
|
|
139
147
|
{
|
|
140
148
|
name: 'animoto',
|
|
141
|
-
title: 'Animoto',
|
|
149
|
+
title: getTitle( 'Animoto' ),
|
|
142
150
|
icon: embedAnimotoIcon,
|
|
143
151
|
description: __( 'Embed an Animoto video.' ),
|
|
144
152
|
patterns: [ /^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i ],
|
|
@@ -146,7 +154,7 @@ const variations = [
|
|
|
146
154
|
},
|
|
147
155
|
{
|
|
148
156
|
name: 'cloudup',
|
|
149
|
-
title: 'Cloudup',
|
|
157
|
+
title: getTitle( 'Cloudup' ),
|
|
150
158
|
icon: embedContentIcon,
|
|
151
159
|
description: __( 'Embed Cloudup content.' ),
|
|
152
160
|
patterns: [ /^https?:\/\/cloudup\.com\/.+/i ],
|
|
@@ -155,7 +163,7 @@ const variations = [
|
|
|
155
163
|
{
|
|
156
164
|
// Deprecated since CollegeHumor content is now powered by YouTube.
|
|
157
165
|
name: 'collegehumor',
|
|
158
|
-
title: 'CollegeHumor',
|
|
166
|
+
title: getTitle( 'CollegeHumor' ),
|
|
159
167
|
icon: embedVideoIcon,
|
|
160
168
|
description: __( 'Embed CollegeHumor content.' ),
|
|
161
169
|
scope: [ 'block' ],
|
|
@@ -164,7 +172,7 @@ const variations = [
|
|
|
164
172
|
},
|
|
165
173
|
{
|
|
166
174
|
name: 'crowdsignal',
|
|
167
|
-
title: 'Crowdsignal',
|
|
175
|
+
title: getTitle( 'Crowdsignal' ),
|
|
168
176
|
icon: embedContentIcon,
|
|
169
177
|
keywords: [ 'polldaddy', __( 'survey' ) ],
|
|
170
178
|
description: __( 'Embed Crowdsignal (formerly Polldaddy) content.' ),
|
|
@@ -175,7 +183,7 @@ const variations = [
|
|
|
175
183
|
},
|
|
176
184
|
{
|
|
177
185
|
name: 'dailymotion',
|
|
178
|
-
title: 'Dailymotion',
|
|
186
|
+
title: getTitle( 'Dailymotion' ),
|
|
179
187
|
icon: embedDailymotionIcon,
|
|
180
188
|
keywords: [ __( 'video' ) ],
|
|
181
189
|
description: __( 'Embed a Dailymotion video.' ),
|
|
@@ -184,7 +192,7 @@ const variations = [
|
|
|
184
192
|
},
|
|
185
193
|
{
|
|
186
194
|
name: 'imgur',
|
|
187
|
-
title: 'Imgur',
|
|
195
|
+
title: getTitle( 'Imgur' ),
|
|
188
196
|
icon: embedPhotoIcon,
|
|
189
197
|
description: __( 'Embed Imgur content.' ),
|
|
190
198
|
patterns: [ /^https?:\/\/(.+\.)?imgur\.com\/.+/i ],
|
|
@@ -192,7 +200,7 @@ const variations = [
|
|
|
192
200
|
},
|
|
193
201
|
{
|
|
194
202
|
name: 'issuu',
|
|
195
|
-
title: 'Issuu',
|
|
203
|
+
title: getTitle( 'Issuu' ),
|
|
196
204
|
icon: embedContentIcon,
|
|
197
205
|
description: __( 'Embed Issuu content.' ),
|
|
198
206
|
patterns: [ /^https?:\/\/(www\.)?issuu\.com\/.+/i ],
|
|
@@ -200,7 +208,7 @@ const variations = [
|
|
|
200
208
|
},
|
|
201
209
|
{
|
|
202
210
|
name: 'kickstarter',
|
|
203
|
-
title: 'Kickstarter',
|
|
211
|
+
title: getTitle( 'Kickstarter' ),
|
|
204
212
|
icon: embedContentIcon,
|
|
205
213
|
description: __( 'Embed Kickstarter content.' ),
|
|
206
214
|
patterns: [
|
|
@@ -211,7 +219,7 @@ const variations = [
|
|
|
211
219
|
},
|
|
212
220
|
{
|
|
213
221
|
name: 'mixcloud',
|
|
214
|
-
title: 'Mixcloud',
|
|
222
|
+
title: getTitle( 'Mixcloud' ),
|
|
215
223
|
icon: embedAudioIcon,
|
|
216
224
|
keywords: [ __( 'music' ), __( 'audio' ) ],
|
|
217
225
|
description: __( 'Embed Mixcloud content.' ),
|
|
@@ -220,7 +228,7 @@ const variations = [
|
|
|
220
228
|
},
|
|
221
229
|
{
|
|
222
230
|
name: 'pocket-casts',
|
|
223
|
-
title: 'Pocket Casts',
|
|
231
|
+
title: getTitle( 'Pocket Casts' ),
|
|
224
232
|
icon: embedPocketCastsIcon,
|
|
225
233
|
keywords: [ __( 'podcast' ), __( 'audio' ) ],
|
|
226
234
|
description: __( 'Embed a podcast player from Pocket Casts.' ),
|
|
@@ -229,7 +237,7 @@ const variations = [
|
|
|
229
237
|
},
|
|
230
238
|
{
|
|
231
239
|
name: 'reddit',
|
|
232
|
-
title: 'Reddit',
|
|
240
|
+
title: getTitle( 'Reddit' ),
|
|
233
241
|
icon: embedRedditIcon,
|
|
234
242
|
description: __( 'Embed a Reddit thread.' ),
|
|
235
243
|
patterns: [ /^https?:\/\/(www\.)?reddit\.com\/.+/i ],
|
|
@@ -237,7 +245,7 @@ const variations = [
|
|
|
237
245
|
},
|
|
238
246
|
{
|
|
239
247
|
name: 'reverbnation',
|
|
240
|
-
title: 'ReverbNation',
|
|
248
|
+
title: getTitle( 'ReverbNation' ),
|
|
241
249
|
icon: embedAudioIcon,
|
|
242
250
|
description: __( 'Embed ReverbNation content.' ),
|
|
243
251
|
patterns: [ /^https?:\/\/(www\.)?reverbnation\.com\/.+/i ],
|
|
@@ -245,7 +253,7 @@ const variations = [
|
|
|
245
253
|
},
|
|
246
254
|
{
|
|
247
255
|
name: 'screencast',
|
|
248
|
-
title: 'Screencast',
|
|
256
|
+
title: getTitle( 'Screencast' ),
|
|
249
257
|
icon: embedVideoIcon,
|
|
250
258
|
description: __( 'Embed Screencast content.' ),
|
|
251
259
|
patterns: [ /^https?:\/\/(www\.)?screencast\.com\/.+/i ],
|
|
@@ -253,7 +261,7 @@ const variations = [
|
|
|
253
261
|
},
|
|
254
262
|
{
|
|
255
263
|
name: 'scribd',
|
|
256
|
-
title: 'Scribd',
|
|
264
|
+
title: getTitle( 'Scribd' ),
|
|
257
265
|
icon: embedContentIcon,
|
|
258
266
|
description: __( 'Embed Scribd content.' ),
|
|
259
267
|
patterns: [ /^https?:\/\/(www\.)?scribd\.com\/.+/i ],
|
|
@@ -261,7 +269,7 @@ const variations = [
|
|
|
261
269
|
},
|
|
262
270
|
{
|
|
263
271
|
name: 'smugmug',
|
|
264
|
-
title: 'SmugMug',
|
|
272
|
+
title: getTitle( 'SmugMug' ),
|
|
265
273
|
icon: embedPhotoIcon,
|
|
266
274
|
description: __( 'Embed SmugMug content.' ),
|
|
267
275
|
patterns: [ /^https?:\/\/(.+\.)?smugmug\.com\/.*/i ],
|
|
@@ -273,7 +281,7 @@ const variations = [
|
|
|
273
281
|
},
|
|
274
282
|
{
|
|
275
283
|
name: 'speaker-deck',
|
|
276
|
-
title: 'Speaker Deck',
|
|
284
|
+
title: getTitle( 'Speaker Deck' ),
|
|
277
285
|
icon: embedContentIcon,
|
|
278
286
|
description: __( 'Embed Speaker Deck content.' ),
|
|
279
287
|
patterns: [ /^https?:\/\/(www\.)?speakerdeck\.com\/.+/i ],
|
|
@@ -281,7 +289,7 @@ const variations = [
|
|
|
281
289
|
},
|
|
282
290
|
{
|
|
283
291
|
name: 'tiktok',
|
|
284
|
-
title: 'TikTok',
|
|
292
|
+
title: getTitle( 'TikTok' ),
|
|
285
293
|
icon: embedVideoIcon,
|
|
286
294
|
keywords: [ __( 'video' ) ],
|
|
287
295
|
description: __( 'Embed a TikTok video.' ),
|
|
@@ -290,7 +298,7 @@ const variations = [
|
|
|
290
298
|
},
|
|
291
299
|
{
|
|
292
300
|
name: 'ted',
|
|
293
|
-
title: 'TED',
|
|
301
|
+
title: getTitle( 'TED' ),
|
|
294
302
|
icon: embedVideoIcon,
|
|
295
303
|
description: __( 'Embed a TED video.' ),
|
|
296
304
|
patterns: [ /^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i ],
|
|
@@ -298,7 +306,7 @@ const variations = [
|
|
|
298
306
|
},
|
|
299
307
|
{
|
|
300
308
|
name: 'tumblr',
|
|
301
|
-
title: 'Tumblr',
|
|
309
|
+
title: getTitle( 'Tumblr' ),
|
|
302
310
|
icon: embedTumblrIcon,
|
|
303
311
|
keywords: [ __( 'social' ) ],
|
|
304
312
|
description: __( 'Embed a Tumblr post.' ),
|
|
@@ -307,7 +315,7 @@ const variations = [
|
|
|
307
315
|
},
|
|
308
316
|
{
|
|
309
317
|
name: 'videopress',
|
|
310
|
-
title: 'VideoPress',
|
|
318
|
+
title: getTitle( 'VideoPress' ),
|
|
311
319
|
icon: embedVideoIcon,
|
|
312
320
|
keywords: [ __( 'video' ) ],
|
|
313
321
|
description: __( 'Embed a VideoPress video.' ),
|
|
@@ -316,7 +324,7 @@ const variations = [
|
|
|
316
324
|
},
|
|
317
325
|
{
|
|
318
326
|
name: 'wordpress-tv',
|
|
319
|
-
title: 'WordPress.tv',
|
|
327
|
+
title: getTitle( 'WordPress.tv' ),
|
|
320
328
|
icon: embedVideoIcon,
|
|
321
329
|
description: __( 'Embed a WordPress.tv video.' ),
|
|
322
330
|
patterns: [ /^https?:\/\/wordpress\.tv\/.+/i ],
|
|
@@ -324,7 +332,7 @@ const variations = [
|
|
|
324
332
|
},
|
|
325
333
|
{
|
|
326
334
|
name: 'amazon-kindle',
|
|
327
|
-
title: 'Amazon Kindle',
|
|
335
|
+
title: getTitle( 'Amazon Kindle' ),
|
|
328
336
|
icon: embedAmazonIcon,
|
|
329
337
|
keywords: [ __( 'ebook' ) ],
|
|
330
338
|
description: __( 'Embed Amazon Kindle content.' ),
|
|
@@ -336,7 +344,7 @@ const variations = [
|
|
|
336
344
|
},
|
|
337
345
|
{
|
|
338
346
|
name: 'pinterest',
|
|
339
|
-
title: 'Pinterest',
|
|
347
|
+
title: getTitle( 'Pinterest' ),
|
|
340
348
|
icon: embedPinterestIcon,
|
|
341
349
|
keywords: [ __( 'social' ), __( 'bookmark' ) ],
|
|
342
350
|
description: __( 'Embed Pinterest pins, boards, and profiles.' ),
|
|
@@ -347,7 +355,7 @@ const variations = [
|
|
|
347
355
|
},
|
|
348
356
|
{
|
|
349
357
|
name: 'wolfram-cloud',
|
|
350
|
-
title: 'Wolfram',
|
|
358
|
+
title: getTitle( 'Wolfram' ),
|
|
351
359
|
icon: embedWolframIcon,
|
|
352
360
|
description: __( 'Embed Wolfram notebook content.' ),
|
|
353
361
|
patterns: [ /^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i ],
|
|
@@ -355,7 +363,7 @@ const variations = [
|
|
|
355
363
|
},
|
|
356
364
|
{
|
|
357
365
|
name: 'bluesky',
|
|
358
|
-
title: 'Bluesky',
|
|
366
|
+
title: getTitle( 'Bluesky' ),
|
|
359
367
|
icon: embedBlueskyIcon,
|
|
360
368
|
description: __( 'Embed a Bluesky post.' ),
|
|
361
369
|
patterns: [ /^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i ],
|
package/src/footnotes/index.js
CHANGED
package/src/form-input/edit.js
CHANGED
|
@@ -38,6 +38,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
38
38
|
<PanelBody title={ __( 'Settings' ) }>
|
|
39
39
|
{ 'checkbox' !== type && (
|
|
40
40
|
<CheckboxControl
|
|
41
|
+
__nextHasNoMarginBottom
|
|
41
42
|
label={ __( 'Inline label' ) }
|
|
42
43
|
checked={ inlineLabel }
|
|
43
44
|
onChange={ ( newVal ) => {
|
|
@@ -48,6 +49,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
48
49
|
/>
|
|
49
50
|
) }
|
|
50
51
|
<CheckboxControl
|
|
52
|
+
__nextHasNoMarginBottom
|
|
51
53
|
label={ __( 'Required' ) }
|
|
52
54
|
checked={ required }
|
|
53
55
|
onChange={ ( newVal ) => {
|
package/src/gallery/block.json
CHANGED
|
@@ -112,6 +112,16 @@
|
|
|
112
112
|
"supports": {
|
|
113
113
|
"anchor": true,
|
|
114
114
|
"align": true,
|
|
115
|
+
"__experimentalBorder": {
|
|
116
|
+
"radius": true,
|
|
117
|
+
"color": true,
|
|
118
|
+
"width": true,
|
|
119
|
+
"style": true,
|
|
120
|
+
"__experimentalDefaultControls": {
|
|
121
|
+
"color": true,
|
|
122
|
+
"radius": true
|
|
123
|
+
}
|
|
124
|
+
},
|
|
115
125
|
"html": false,
|
|
116
126
|
"units": [ "px", "em", "rem", "vh", "vw" ],
|
|
117
127
|
"spacing": {
|
package/src/group/deprecated.js
CHANGED
|
@@ -109,15 +109,11 @@ const deprecated = [
|
|
|
109
109
|
);
|
|
110
110
|
},
|
|
111
111
|
isEligible: ( { layout } ) =>
|
|
112
|
-
|
|
113
|
-
layout
|
|
114
|
-
( layout.contentSize && layout.type !== 'constrained' ),
|
|
112
|
+
layout?.inherit ||
|
|
113
|
+
( layout?.contentSize && layout?.type !== 'constrained' ),
|
|
115
114
|
migrate: ( attributes ) => {
|
|
116
115
|
const { layout = null } = attributes;
|
|
117
|
-
if (
|
|
118
|
-
return attributes;
|
|
119
|
-
}
|
|
120
|
-
if ( layout.inherit || layout.contentSize ) {
|
|
116
|
+
if ( layout?.inherit || layout?.contentSize ) {
|
|
121
117
|
return {
|
|
122
118
|
...attributes,
|
|
123
119
|
layout: {
|
package/src/heading/block.json
CHANGED
|
@@ -30,6 +30,18 @@
|
|
|
30
30
|
"anchor": true,
|
|
31
31
|
"className": true,
|
|
32
32
|
"splitting": true,
|
|
33
|
+
"__experimentalBorder": {
|
|
34
|
+
"color": true,
|
|
35
|
+
"radius": true,
|
|
36
|
+
"style": true,
|
|
37
|
+
"width": true,
|
|
38
|
+
"__experimentalDefaultControls": {
|
|
39
|
+
"color": true,
|
|
40
|
+
"radius": true,
|
|
41
|
+
"style": true,
|
|
42
|
+
"width": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
33
45
|
"color": {
|
|
34
46
|
"gradients": true,
|
|
35
47
|
"link": true,
|
package/src/heading/index.js
CHANGED
package/src/image/block.json
CHANGED
package/src/image/edit.js
CHANGED
|
@@ -308,7 +308,7 @@ export function ImageEdit( {
|
|
|
308
308
|
return {
|
|
309
309
|
lockUrlControls:
|
|
310
310
|
!! metadata?.bindings?.url &&
|
|
311
|
-
! blockBindingsSource?.canUserEditValue( {
|
|
311
|
+
! blockBindingsSource?.canUserEditValue?.( {
|
|
312
312
|
select,
|
|
313
313
|
context,
|
|
314
314
|
args: metadata?.bindings?.url?.args,
|
package/src/image/editor.scss
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.wp-block-image.wp-block-image {
|
|
4
4
|
|
|
5
5
|
// Show Placeholder style on-select.
|
|
6
|
-
&.is-selected .
|
|
6
|
+
&.is-selected .block-editor-media-placeholder {
|
|
7
7
|
// Block UI appearance.
|
|
8
8
|
color: $gray-900;
|
|
9
9
|
background-color: $white;
|
|
@@ -70,6 +70,11 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
// Shown while image is being uploded but cannot be previewed.
|
|
74
|
+
.wp-block-image__placeholder {
|
|
75
|
+
aspect-ratio: 4 / 3;
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
// This is necessary for the editor resize handles to accurately work on a non-floated, non-resized, small image.
|
|
74
79
|
.wp-block-image .components-resizable-box__container {
|
|
75
80
|
// Using "display: table" because:
|