From 57c5b9a9ccaac4ae88dff8d4044702146ba563df Mon Sep 17 00:00:00 2001 From: Amit Raj <77401999+amitraj2203@users.noreply.github.com> Date: Mon, 6 May 2024 09:24:51 +0530 Subject: [PATCH] Embeds: Add Bluesky variation (#61352) * Feat: Adds the bluesky variation * Changed the SVG Icon for Bluesky * Removed the responsive property from Bluesky variation * Fixed pattern regular expression Co-authored-by: amitraj2203 Co-authored-by: swissspidy Co-authored-by: t-hamano --- packages/block-library/src/embed/icons.js | 9 +++++++++ packages/block-library/src/embed/variations.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/block-library/src/embed/icons.js b/packages/block-library/src/embed/icons.js index 21a3b20ae278ad..2e9386373f083a 100644 --- a/packages/block-library/src/embed/icons.js +++ b/packages/block-library/src/embed/icons.js @@ -178,3 +178,12 @@ export const embedPocketCastsIcon = { ), }; + +export const embedBlueskyIcon = ( + + + +); diff --git a/packages/block-library/src/embed/variations.js b/packages/block-library/src/embed/variations.js index 6083ea1adc90b3..e770c12ddfd97d 100644 --- a/packages/block-library/src/embed/variations.js +++ b/packages/block-library/src/embed/variations.js @@ -27,6 +27,7 @@ import { embedPinterestIcon, embedWolframIcon, embedPocketCastsIcon, + embedBlueskyIcon, } from './icons'; /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ @@ -360,6 +361,14 @@ const variations = [ patterns: [ /^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i ], attributes: { providerNameSlug: 'wolfram-cloud', responsive: true }, }, + { + name: 'bluesky', + title: 'Bluesky', + icon: embedBlueskyIcon, + description: __( 'Embed a Bluesky post.' ), + patterns: [ /^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i ], + attributes: { providerNameSlug: 'bluesky' }, + }, ]; /**