UNPKG

@wordpress/block-library

Version:
370 lines (366 loc) 7.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _i18n = require("@wordpress/i18n"); var _icons = require("./icons"); /** * WordPress dependencies */ /** * Internal dependencies */ const variations = [{ isDefault: true, name: 'wordpress', attributes: { service: 'wordpress' }, title: (0, _i18n.__)('WordPress'), icon: _icons.WordPressIcon }, { name: 'fivehundredpx', attributes: { service: 'fivehundredpx' }, title: (0, _i18n.__)('500px'), icon: _icons.FivehundredpxIcon }, { name: 'amazon', attributes: { service: 'amazon' }, title: (0, _i18n.__)('Amazon'), icon: _icons.AmazonIcon }, { name: 'bandcamp', attributes: { service: 'bandcamp' }, title: (0, _i18n.__)('Bandcamp'), icon: _icons.BandcampIcon }, { name: 'behance', attributes: { service: 'behance' }, title: (0, _i18n.__)('Behance'), icon: _icons.BehanceIcon }, { name: 'bluesky', attributes: { service: 'bluesky' }, title: (0, _i18n.__)('Bluesky'), icon: _icons.BlueskyIcon }, { name: 'chain', attributes: { service: 'chain' }, title: (0, _i18n.__)('Link'), icon: _icons.ChainIcon }, { name: 'codepen', attributes: { service: 'codepen' }, title: (0, _i18n.__)('CodePen'), icon: _icons.CodepenIcon }, { name: 'deviantart', attributes: { service: 'deviantart' }, title: (0, _i18n.__)('DeviantArt'), icon: _icons.DeviantArtIcon }, { name: 'discord', attributes: { service: 'discord' }, title: (0, _i18n.__)('Discord'), icon: _icons.DiscordIcon }, { name: 'dribbble', attributes: { service: 'dribbble' }, title: (0, _i18n.__)('Dribbble'), icon: _icons.DribbbleIcon }, { name: 'dropbox', attributes: { service: 'dropbox' }, title: (0, _i18n.__)('Dropbox'), icon: _icons.DropboxIcon }, { name: 'etsy', attributes: { service: 'etsy' }, title: (0, _i18n.__)('Etsy'), icon: _icons.EtsyIcon }, { name: 'facebook', attributes: { service: 'facebook' }, title: (0, _i18n.__)('Facebook'), icon: _icons.FacebookIcon }, { name: 'feed', attributes: { service: 'feed' }, title: (0, _i18n.__)('RSS Feed'), icon: _icons.FeedIcon }, { name: 'flickr', attributes: { service: 'flickr' }, title: (0, _i18n.__)('Flickr'), icon: _icons.FlickrIcon }, { name: 'foursquare', attributes: { service: 'foursquare' }, title: (0, _i18n.__)('Foursquare'), icon: _icons.FoursquareIcon }, { name: 'goodreads', attributes: { service: 'goodreads' }, title: (0, _i18n.__)('Goodreads'), icon: _icons.GoodreadsIcon }, { name: 'google', attributes: { service: 'google' }, title: (0, _i18n.__)('Google'), icon: _icons.GoogleIcon }, { name: 'github', attributes: { service: 'github' }, title: (0, _i18n.__)('GitHub'), icon: _icons.GitHubIcon }, { name: 'gravatar', attributes: { service: 'gravatar' }, title: (0, _i18n.__)('Gravatar'), icon: _icons.GravatarIcon }, { name: 'instagram', attributes: { service: 'instagram' }, title: (0, _i18n.__)('Instagram'), icon: _icons.InstagramIcon }, { name: 'lastfm', attributes: { service: 'lastfm' }, title: (0, _i18n.__)('Last.fm'), icon: _icons.LastfmIcon }, { name: 'linkedin', attributes: { service: 'linkedin' }, title: (0, _i18n.__)('LinkedIn'), icon: _icons.LinkedInIcon }, { name: 'mail', attributes: { service: 'mail' }, title: (0, _i18n.__)('Mail'), keywords: ['email', 'e-mail'], icon: _icons.MailIcon }, { name: 'mastodon', attributes: { service: 'mastodon' }, title: (0, _i18n.__)('Mastodon'), icon: _icons.MastodonIcon }, { name: 'meetup', attributes: { service: 'meetup' }, title: (0, _i18n.__)('Meetup'), icon: _icons.MeetupIcon }, { name: 'medium', attributes: { service: 'medium' }, title: (0, _i18n.__)('Medium'), icon: _icons.MediumIcon }, { name: 'patreon', attributes: { service: 'patreon' }, title: (0, _i18n.__)('Patreon'), icon: _icons.PatreonIcon }, { name: 'pinterest', attributes: { service: 'pinterest' }, title: (0, _i18n.__)('Pinterest'), icon: _icons.PinterestIcon }, { name: 'pocket', attributes: { service: 'pocket' }, title: (0, _i18n.__)('Pocket'), icon: _icons.PocketIcon }, { name: 'reddit', attributes: { service: 'reddit' }, title: (0, _i18n.__)('Reddit'), icon: _icons.RedditIcon }, { name: 'skype', attributes: { service: 'skype' }, title: (0, _i18n.__)('Skype'), icon: _icons.SkypeIcon }, { name: 'snapchat', attributes: { service: 'snapchat' }, title: (0, _i18n.__)('Snapchat'), icon: _icons.SnapchatIcon }, { name: 'soundcloud', attributes: { service: 'soundcloud' }, title: (0, _i18n.__)('SoundCloud'), icon: _icons.SoundCloudIcon }, { name: 'spotify', attributes: { service: 'spotify' }, title: (0, _i18n.__)('Spotify'), icon: _icons.SpotifyIcon }, { name: 'telegram', attributes: { service: 'telegram' }, title: (0, _i18n.__)('Telegram'), icon: _icons.TelegramIcon }, { name: 'threads', attributes: { service: 'threads' }, title: (0, _i18n.__)('Threads'), icon: _icons.ThreadsIcon }, { name: 'tiktok', attributes: { service: 'tiktok' }, title: (0, _i18n.__)('TikTok'), icon: _icons.TiktokIcon }, { name: 'tumblr', attributes: { service: 'tumblr' }, title: (0, _i18n.__)('Tumblr'), icon: _icons.TumblrIcon }, { name: 'twitch', attributes: { service: 'twitch' }, title: (0, _i18n.__)('Twitch'), icon: _icons.TwitchIcon }, { name: 'twitter', attributes: { service: 'twitter' }, title: (0, _i18n.__)('Twitter'), icon: _icons.TwitterIcon }, { name: 'vimeo', attributes: { service: 'vimeo' }, title: (0, _i18n.__)('Vimeo'), icon: _icons.VimeoIcon }, { name: 'vk', attributes: { service: 'vk' }, title: (0, _i18n.__)('VK'), icon: _icons.VkIcon }, { name: 'whatsapp', attributes: { service: 'whatsapp' }, title: (0, _i18n.__)('WhatsApp'), icon: _icons.WhatsAppIcon }, { name: 'x', attributes: { service: 'x' }, keywords: ['twitter'], title: (0, _i18n.__)('X'), icon: _icons.XIcon }, { name: 'yelp', attributes: { service: 'yelp' }, title: (0, _i18n.__)('Yelp'), icon: _icons.YelpIcon }, { name: 'youtube', attributes: { service: 'youtube' }, title: (0, _i18n.__)('YouTube'), icon: _icons.YouTubeIcon }]; /** * Add `isActive` function to all `social link` variations, if not defined. * `isActive` function is used to find a variation match from a created * Block by providing its attributes. */ variations.forEach(variation => { if (variation.isActive) { return; } variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service; }); var _default = exports.default = variations; //# sourceMappingURL=variations.js.map