react-social-embeds 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -60,7 +60,6 @@ function App() {
60
60
  | `RedditEmbed` | Reddit |
61
61
  | `TumblrEmbed` | Tumblr |
62
62
  | `PinterestEmbed` | Pinterest |
63
- | `SnapchatEmbed` | Snapchat |
64
63
  | `TelegramEmbed` | Telegram |
65
64
 
66
65
  ### Video
package/dist/index.d.mts CHANGED
@@ -282,10 +282,6 @@ declare const PLATFORM_ICON_PATHS: {
282
282
  readonly viewBox: "0 0 24 24";
283
283
  readonly path: "M5.34 0A5.328 5.328 0 000 5.34v13.32A5.328 5.328 0 005.34 24h13.32A5.328 5.328 0 0024 18.66V5.34A5.328 5.328 0 0018.66 0zm6.525 2.568c2.336 0 4.448.902 6.056 2.587 1.224 1.272 1.912 2.619 2.264 4.392.12.59.12 2.2.007 2.864a8.506 8.506 0 01-3.24 5.296c-.608.46-2.096 1.261-2.336 1.261-.088 0-.096-.091-.056-.46.072-.592.144-.715.48-.856.536-.224 1.448-.874 2.008-1.435a7.644 7.644 0 002.008-3.536c.208-.824.184-2.656-.048-3.504-.728-2.696-2.928-4.792-5.624-5.352-.784-.16-2.208-.16-3 0-2.728.56-4.984 2.76-5.672 5.528-.184.752-.184 2.584 0 3.336.456 1.832 1.64 3.512 3.192 4.512.304.2.672.408.824.472.336.144.408.264.472.856.04.36.03.464-.056.464-.056 0-.464-.176-.896-.384l-.04-.03c-2.472-1.216-4.056-3.274-4.632-6.012-.144-.706-.168-2.392-.03-3.04.36-1.74 1.048-3.1 2.192-4.304 1.648-1.737 3.768-2.656 6.128-2.656zm.134 2.81c.409.004.803.04 1.106.106 2.784.62 4.76 3.408 4.376 6.174-.152 1.114-.536 2.03-1.216 2.88-.336.43-1.152 1.15-1.296 1.15-.023 0-.048-.272-.048-.603v-.605l.416-.496c1.568-1.878 1.456-4.502-.256-6.224-.664-.67-1.432-1.064-2.424-1.246-.64-.118-.776-.118-1.448-.008-1.02.167-1.81.562-2.512 1.256-1.72 1.704-1.832 4.342-.264 6.222l.413.496v.608c0 .336-.027.608-.06.608-.03 0-.264-.16-.512-.36l-.034-.011c-.832-.664-1.568-1.842-1.872-2.997-.184-.698-.184-2.024.008-2.72.504-1.878 1.888-3.335 3.808-4.019.41-.145 1.133-.22 1.814-.211zm-.13 2.99c.31 0 .62.06.844.178.488.253.888.745 1.04 1.259.464 1.578-1.208 2.96-2.72 2.254h-.015c-.712-.331-1.096-.956-1.104-1.77 0-.733.408-1.371 1.112-1.745.224-.117.534-.176.844-.176zm-.011 4.728c.988-.004 1.706.349 1.97.97.198.464.124 1.932-.218 4.302-.232 1.656-.36 2.074-.68 2.356-.44.39-1.064.498-1.656.288h-.003c-.716-.257-.87-.605-1.164-2.644-.341-2.37-.416-3.838-.218-4.302.262-.616.974-.966 1.97-.97z";
284
284
  };
285
- readonly snapchat: {
286
- readonly viewBox: "0 0 24 24";
287
- readonly path: "M12 0C8.74 0 6.06 2.67 6.06 5.96c0 1.6.63 3.26 1.78 4.55.16.18.26.35.25.46-.03.27-.62 1.15-1.25 1.45-.39.19-.94.36-1.52.54-.37.11-.75.22-1.11.35-.6.22-.7.6-.67.88.07.66.92.99 2.49 1.31.6.12 1.27.25 1.38.35.1.62.3 1.29.61 1.89.6 1.2 1.9 1.9 3.87 1.9s3.28-.7 3.88-1.9c.31-.6.5-1.27.6-1.89.11-.1.79-.23 1.39-.35 1.56-.32 2.41-.65 2.49-1.31.03-.28-.07-.66-.67-.88-.36-.13-.74-.24-1.11-.35-.58-.18-1.13-.35-1.52-.54-.63-.3-1.22-1.18-1.25-1.45-.01-.11.09-.28.25-.46 1.15-1.29 1.78-2.95 1.78-4.55C17.94 2.67 15.26 0 12 0z";
288
- };
289
285
  };
290
286
  type PlatformIconName = keyof typeof PLATFORM_ICON_PATHS;
291
287
  type PlatformIconProps = React.SVGProps<SVGSVGElement> & {
@@ -1080,31 +1076,6 @@ interface PinterestEmbedProps {
1080
1076
  }
1081
1077
  declare const PinterestEmbed: React.FC<PinterestEmbedProps>;
1082
1078
 
1083
- interface SnapchatEmbedProps {
1084
- url: string;
1085
- width?: string | number;
1086
- maxWidth?: string | number;
1087
- height?: string | number;
1088
- className?: string;
1089
- style?: React.CSSProperties;
1090
- /** Whether to include script tag (default: true). Set false if loading globally. */
1091
- scriptLoad?: boolean;
1092
- disableCard?: boolean;
1093
- showCTA?: boolean;
1094
- ctaLabel?: string;
1095
- ctaLabelIcon?: boolean;
1096
- ctaLabelIconPosition?: "before" | "after";
1097
- ctaUsePlatformColor?: boolean;
1098
- ctaUsePlatformIconColor?: boolean;
1099
- ctaAlignment?: "left" | "center" | "right";
1100
- embedAlignment?: "left" | "center" | "right";
1101
- showBranding?: boolean;
1102
- constrainWidthByEmbed?: boolean;
1103
- theme?: "light" | "dark";
1104
- cardLayout?: CardLayout;
1105
- }
1106
- declare const SnapchatEmbed: React.FC<SnapchatEmbedProps>;
1107
-
1108
1079
  interface TelegramEmbedProps {
1109
1080
  url: string;
1110
1081
  width?: string | number;
@@ -1286,4 +1257,4 @@ interface ApplePodcastsEmbedProps {
1286
1257
  }
1287
1258
  declare const ApplePodcastsEmbed: React.FC<ApplePodcastsEmbedProps>;
1288
1259
 
1289
- export { AppleMusicEmbed, type AppleMusicEmbedProps, ApplePodcastsEmbed, type ApplePodcastsEmbedProps, ArchiveOrgEmbed, type ArchiveOrgEmbedProps, BilibiliEmbed, type BilibiliEmbedProps, BlueskyEmbed, type BlueskyEmbedProps, type CardLayout, CardLayoutProvider, DailymotionEmbed, type DailymotionEmbedProps, DeezerEmbed, type DeezerEmbedProps, type EmbedBadge, EmbedCard, type EmbedCardProps, type EmbedMedia, type EmbedMetaItem, FacebookEmbed, type FacebookEmbedProps, InstagramEmbed, type InstagramEmbedProps, KickEmbed, type KickEmbedProps, LinkedInEmbed, type LinkedInEmbedProps, MastodonEmbed, type MastodonEmbedProps, MediaPlayer, type MediaPlayerProps, OdyseeEmbed, type OdyseeEmbedProps, PinterestEmbed, type PinterestEmbedProps, PlatformIcon, type PlatformIconName, RedditEmbed, type RedditEmbedProps, RumbleEmbed, type RumbleEmbedProps, SnapchatEmbed, type SnapchatEmbedProps, SoundCloudEmbed, type SoundCloudEmbedProps, SpotifyEmbed, type SpotifyEmbedProps, TelegramEmbed, type TelegramEmbedProps, ThreadsEmbed, type ThreadsEmbedProps, TidalEmbed, type TidalEmbedProps, TikTokEmbed, type TikTokEmbedProps, TruthSocialEmbed, type TruthSocialEmbedProps, TumblrEmbed, type TumblrEmbedProps, TwitchEmbed, type TwitchEmbedProps, XEmbed, type XEmbedProps, YouTubeEmbed, type YouTubeEmbedProps };
1260
+ export { AppleMusicEmbed, type AppleMusicEmbedProps, ApplePodcastsEmbed, type ApplePodcastsEmbedProps, ArchiveOrgEmbed, type ArchiveOrgEmbedProps, BilibiliEmbed, type BilibiliEmbedProps, BlueskyEmbed, type BlueskyEmbedProps, type CardLayout, CardLayoutProvider, DailymotionEmbed, type DailymotionEmbedProps, DeezerEmbed, type DeezerEmbedProps, type EmbedBadge, EmbedCard, type EmbedCardProps, type EmbedMedia, type EmbedMetaItem, FacebookEmbed, type FacebookEmbedProps, InstagramEmbed, type InstagramEmbedProps, KickEmbed, type KickEmbedProps, LinkedInEmbed, type LinkedInEmbedProps, MastodonEmbed, type MastodonEmbedProps, MediaPlayer, type MediaPlayerProps, OdyseeEmbed, type OdyseeEmbedProps, PinterestEmbed, type PinterestEmbedProps, PlatformIcon, type PlatformIconName, RedditEmbed, type RedditEmbedProps, RumbleEmbed, type RumbleEmbedProps, SoundCloudEmbed, type SoundCloudEmbedProps, SpotifyEmbed, type SpotifyEmbedProps, TelegramEmbed, type TelegramEmbedProps, ThreadsEmbed, type ThreadsEmbedProps, TidalEmbed, type TidalEmbedProps, TikTokEmbed, type TikTokEmbedProps, TruthSocialEmbed, type TruthSocialEmbedProps, TumblrEmbed, type TumblrEmbedProps, TwitchEmbed, type TwitchEmbedProps, XEmbed, type XEmbedProps, YouTubeEmbed, type YouTubeEmbedProps };
package/dist/index.d.ts CHANGED
@@ -282,10 +282,6 @@ declare const PLATFORM_ICON_PATHS: {
282
282
  readonly viewBox: "0 0 24 24";
283
283
  readonly path: "M5.34 0A5.328 5.328 0 000 5.34v13.32A5.328 5.328 0 005.34 24h13.32A5.328 5.328 0 0024 18.66V5.34A5.328 5.328 0 0018.66 0zm6.525 2.568c2.336 0 4.448.902 6.056 2.587 1.224 1.272 1.912 2.619 2.264 4.392.12.59.12 2.2.007 2.864a8.506 8.506 0 01-3.24 5.296c-.608.46-2.096 1.261-2.336 1.261-.088 0-.096-.091-.056-.46.072-.592.144-.715.48-.856.536-.224 1.448-.874 2.008-1.435a7.644 7.644 0 002.008-3.536c.208-.824.184-2.656-.048-3.504-.728-2.696-2.928-4.792-5.624-5.352-.784-.16-2.208-.16-3 0-2.728.56-4.984 2.76-5.672 5.528-.184.752-.184 2.584 0 3.336.456 1.832 1.64 3.512 3.192 4.512.304.2.672.408.824.472.336.144.408.264.472.856.04.36.03.464-.056.464-.056 0-.464-.176-.896-.384l-.04-.03c-2.472-1.216-4.056-3.274-4.632-6.012-.144-.706-.168-2.392-.03-3.04.36-1.74 1.048-3.1 2.192-4.304 1.648-1.737 3.768-2.656 6.128-2.656zm.134 2.81c.409.004.803.04 1.106.106 2.784.62 4.76 3.408 4.376 6.174-.152 1.114-.536 2.03-1.216 2.88-.336.43-1.152 1.15-1.296 1.15-.023 0-.048-.272-.048-.603v-.605l.416-.496c1.568-1.878 1.456-4.502-.256-6.224-.664-.67-1.432-1.064-2.424-1.246-.64-.118-.776-.118-1.448-.008-1.02.167-1.81.562-2.512 1.256-1.72 1.704-1.832 4.342-.264 6.222l.413.496v.608c0 .336-.027.608-.06.608-.03 0-.264-.16-.512-.36l-.034-.011c-.832-.664-1.568-1.842-1.872-2.997-.184-.698-.184-2.024.008-2.72.504-1.878 1.888-3.335 3.808-4.019.41-.145 1.133-.22 1.814-.211zm-.13 2.99c.31 0 .62.06.844.178.488.253.888.745 1.04 1.259.464 1.578-1.208 2.96-2.72 2.254h-.015c-.712-.331-1.096-.956-1.104-1.77 0-.733.408-1.371 1.112-1.745.224-.117.534-.176.844-.176zm-.011 4.728c.988-.004 1.706.349 1.97.97.198.464.124 1.932-.218 4.302-.232 1.656-.36 2.074-.68 2.356-.44.39-1.064.498-1.656.288h-.003c-.716-.257-.87-.605-1.164-2.644-.341-2.37-.416-3.838-.218-4.302.262-.616.974-.966 1.97-.97z";
284
284
  };
285
- readonly snapchat: {
286
- readonly viewBox: "0 0 24 24";
287
- readonly path: "M12 0C8.74 0 6.06 2.67 6.06 5.96c0 1.6.63 3.26 1.78 4.55.16.18.26.35.25.46-.03.27-.62 1.15-1.25 1.45-.39.19-.94.36-1.52.54-.37.11-.75.22-1.11.35-.6.22-.7.6-.67.88.07.66.92.99 2.49 1.31.6.12 1.27.25 1.38.35.1.62.3 1.29.61 1.89.6 1.2 1.9 1.9 3.87 1.9s3.28-.7 3.88-1.9c.31-.6.5-1.27.6-1.89.11-.1.79-.23 1.39-.35 1.56-.32 2.41-.65 2.49-1.31.03-.28-.07-.66-.67-.88-.36-.13-.74-.24-1.11-.35-.58-.18-1.13-.35-1.52-.54-.63-.3-1.22-1.18-1.25-1.45-.01-.11.09-.28.25-.46 1.15-1.29 1.78-2.95 1.78-4.55C17.94 2.67 15.26 0 12 0z";
288
- };
289
285
  };
290
286
  type PlatformIconName = keyof typeof PLATFORM_ICON_PATHS;
291
287
  type PlatformIconProps = React.SVGProps<SVGSVGElement> & {
@@ -1080,31 +1076,6 @@ interface PinterestEmbedProps {
1080
1076
  }
1081
1077
  declare const PinterestEmbed: React.FC<PinterestEmbedProps>;
1082
1078
 
1083
- interface SnapchatEmbedProps {
1084
- url: string;
1085
- width?: string | number;
1086
- maxWidth?: string | number;
1087
- height?: string | number;
1088
- className?: string;
1089
- style?: React.CSSProperties;
1090
- /** Whether to include script tag (default: true). Set false if loading globally. */
1091
- scriptLoad?: boolean;
1092
- disableCard?: boolean;
1093
- showCTA?: boolean;
1094
- ctaLabel?: string;
1095
- ctaLabelIcon?: boolean;
1096
- ctaLabelIconPosition?: "before" | "after";
1097
- ctaUsePlatformColor?: boolean;
1098
- ctaUsePlatformIconColor?: boolean;
1099
- ctaAlignment?: "left" | "center" | "right";
1100
- embedAlignment?: "left" | "center" | "right";
1101
- showBranding?: boolean;
1102
- constrainWidthByEmbed?: boolean;
1103
- theme?: "light" | "dark";
1104
- cardLayout?: CardLayout;
1105
- }
1106
- declare const SnapchatEmbed: React.FC<SnapchatEmbedProps>;
1107
-
1108
1079
  interface TelegramEmbedProps {
1109
1080
  url: string;
1110
1081
  width?: string | number;
@@ -1286,4 +1257,4 @@ interface ApplePodcastsEmbedProps {
1286
1257
  }
1287
1258
  declare const ApplePodcastsEmbed: React.FC<ApplePodcastsEmbedProps>;
1288
1259
 
1289
- export { AppleMusicEmbed, type AppleMusicEmbedProps, ApplePodcastsEmbed, type ApplePodcastsEmbedProps, ArchiveOrgEmbed, type ArchiveOrgEmbedProps, BilibiliEmbed, type BilibiliEmbedProps, BlueskyEmbed, type BlueskyEmbedProps, type CardLayout, CardLayoutProvider, DailymotionEmbed, type DailymotionEmbedProps, DeezerEmbed, type DeezerEmbedProps, type EmbedBadge, EmbedCard, type EmbedCardProps, type EmbedMedia, type EmbedMetaItem, FacebookEmbed, type FacebookEmbedProps, InstagramEmbed, type InstagramEmbedProps, KickEmbed, type KickEmbedProps, LinkedInEmbed, type LinkedInEmbedProps, MastodonEmbed, type MastodonEmbedProps, MediaPlayer, type MediaPlayerProps, OdyseeEmbed, type OdyseeEmbedProps, PinterestEmbed, type PinterestEmbedProps, PlatformIcon, type PlatformIconName, RedditEmbed, type RedditEmbedProps, RumbleEmbed, type RumbleEmbedProps, SnapchatEmbed, type SnapchatEmbedProps, SoundCloudEmbed, type SoundCloudEmbedProps, SpotifyEmbed, type SpotifyEmbedProps, TelegramEmbed, type TelegramEmbedProps, ThreadsEmbed, type ThreadsEmbedProps, TidalEmbed, type TidalEmbedProps, TikTokEmbed, type TikTokEmbedProps, TruthSocialEmbed, type TruthSocialEmbedProps, TumblrEmbed, type TumblrEmbedProps, TwitchEmbed, type TwitchEmbedProps, XEmbed, type XEmbedProps, YouTubeEmbed, type YouTubeEmbedProps };
1260
+ export { AppleMusicEmbed, type AppleMusicEmbedProps, ApplePodcastsEmbed, type ApplePodcastsEmbedProps, ArchiveOrgEmbed, type ArchiveOrgEmbedProps, BilibiliEmbed, type BilibiliEmbedProps, BlueskyEmbed, type BlueskyEmbedProps, type CardLayout, CardLayoutProvider, DailymotionEmbed, type DailymotionEmbedProps, DeezerEmbed, type DeezerEmbedProps, type EmbedBadge, EmbedCard, type EmbedCardProps, type EmbedMedia, type EmbedMetaItem, FacebookEmbed, type FacebookEmbedProps, InstagramEmbed, type InstagramEmbedProps, KickEmbed, type KickEmbedProps, LinkedInEmbed, type LinkedInEmbedProps, MastodonEmbed, type MastodonEmbedProps, MediaPlayer, type MediaPlayerProps, OdyseeEmbed, type OdyseeEmbedProps, PinterestEmbed, type PinterestEmbedProps, PlatformIcon, type PlatformIconName, RedditEmbed, type RedditEmbedProps, RumbleEmbed, type RumbleEmbedProps, SoundCloudEmbed, type SoundCloudEmbedProps, SpotifyEmbed, type SpotifyEmbedProps, TelegramEmbed, type TelegramEmbedProps, ThreadsEmbed, type ThreadsEmbedProps, TidalEmbed, type TidalEmbedProps, TikTokEmbed, type TikTokEmbedProps, TruthSocialEmbed, type TruthSocialEmbedProps, TumblrEmbed, type TumblrEmbedProps, TwitchEmbed, type TwitchEmbedProps, XEmbed, type XEmbedProps, YouTubeEmbed, type YouTubeEmbedProps };
package/dist/index.js CHANGED
@@ -50,7 +50,6 @@ __export(index_exports, {
50
50
  PlatformIcon: () => PlatformIcon,
51
51
  RedditEmbed: () => RedditEmbed,
52
52
  RumbleEmbed: () => RumbleEmbed,
53
- SnapchatEmbed: () => SnapchatEmbed,
54
53
  SoundCloudEmbed: () => SoundCloudEmbed,
55
54
  SpotifyEmbed: () => SpotifyEmbed,
56
55
  TelegramEmbed: () => TelegramEmbed,
@@ -1024,10 +1023,6 @@ var PLATFORM_ICON_PATHS = {
1024
1023
  applePodcasts: {
1025
1024
  viewBox: "0 0 24 24",
1026
1025
  path: "M5.34 0A5.328 5.328 0 000 5.34v13.32A5.328 5.328 0 005.34 24h13.32A5.328 5.328 0 0024 18.66V5.34A5.328 5.328 0 0018.66 0zm6.525 2.568c2.336 0 4.448.902 6.056 2.587 1.224 1.272 1.912 2.619 2.264 4.392.12.59.12 2.2.007 2.864a8.506 8.506 0 01-3.24 5.296c-.608.46-2.096 1.261-2.336 1.261-.088 0-.096-.091-.056-.46.072-.592.144-.715.48-.856.536-.224 1.448-.874 2.008-1.435a7.644 7.644 0 002.008-3.536c.208-.824.184-2.656-.048-3.504-.728-2.696-2.928-4.792-5.624-5.352-.784-.16-2.208-.16-3 0-2.728.56-4.984 2.76-5.672 5.528-.184.752-.184 2.584 0 3.336.456 1.832 1.64 3.512 3.192 4.512.304.2.672.408.824.472.336.144.408.264.472.856.04.36.03.464-.056.464-.056 0-.464-.176-.896-.384l-.04-.03c-2.472-1.216-4.056-3.274-4.632-6.012-.144-.706-.168-2.392-.03-3.04.36-1.74 1.048-3.1 2.192-4.304 1.648-1.737 3.768-2.656 6.128-2.656zm.134 2.81c.409.004.803.04 1.106.106 2.784.62 4.76 3.408 4.376 6.174-.152 1.114-.536 2.03-1.216 2.88-.336.43-1.152 1.15-1.296 1.15-.023 0-.048-.272-.048-.603v-.605l.416-.496c1.568-1.878 1.456-4.502-.256-6.224-.664-.67-1.432-1.064-2.424-1.246-.64-.118-.776-.118-1.448-.008-1.02.167-1.81.562-2.512 1.256-1.72 1.704-1.832 4.342-.264 6.222l.413.496v.608c0 .336-.027.608-.06.608-.03 0-.264-.16-.512-.36l-.034-.011c-.832-.664-1.568-1.842-1.872-2.997-.184-.698-.184-2.024.008-2.72.504-1.878 1.888-3.335 3.808-4.019.41-.145 1.133-.22 1.814-.211zm-.13 2.99c.31 0 .62.06.844.178.488.253.888.745 1.04 1.259.464 1.578-1.208 2.96-2.72 2.254h-.015c-.712-.331-1.096-.956-1.104-1.77 0-.733.408-1.371 1.112-1.745.224-.117.534-.176.844-.176zm-.011 4.728c.988-.004 1.706.349 1.97.97.198.464.124 1.932-.218 4.302-.232 1.656-.36 2.074-.68 2.356-.44.39-1.064.498-1.656.288h-.003c-.716-.257-.87-.605-1.164-2.644-.341-2.37-.416-3.838-.218-4.302.262-.616.974-.966 1.97-.97z"
1027
- },
1028
- snapchat: {
1029
- viewBox: "0 0 24 24",
1030
- path: "M12 0C8.74 0 6.06 2.67 6.06 5.96c0 1.6.63 3.26 1.78 4.55.16.18.26.35.25.46-.03.27-.62 1.15-1.25 1.45-.39.19-.94.36-1.52.54-.37.11-.75.22-1.11.35-.6.22-.7.6-.67.88.07.66.92.99 2.49 1.31.6.12 1.27.25 1.38.35.1.62.3 1.29.61 1.89.6 1.2 1.9 1.9 3.87 1.9s3.28-.7 3.88-1.9c.31-.6.5-1.27.6-1.89.11-.1.79-.23 1.39-.35 1.56-.32 2.41-.65 2.49-1.31.03-.28-.07-.66-.67-.88-.36-.13-.74-.24-1.11-.35-.58-.18-1.13-.35-1.52-.54-.63-.3-1.22-1.18-1.25-1.45-.01-.11.09-.28.25-.46 1.15-1.29 1.78-2.95 1.78-4.55C17.94 2.67 15.26 0 12 0z"
1031
1026
  }
1032
1027
  };
1033
1028
  function PlatformIcon({ platform, size = 16, color = "currentColor", ...props }) {
@@ -1118,8 +1113,7 @@ var PROVIDER_TO_PLATFORM = {
1118
1113
  deezer: "deezer",
1119
1114
  tidal: "tidal",
1120
1115
  soundcloud: "soundcloud",
1121
- "apple podcasts": "applePodcasts",
1122
- snapchat: "snapchat"
1116
+ "apple podcasts": "applePodcasts"
1123
1117
  };
1124
1118
  var PLATFORM_COLORS = {
1125
1119
  reddit: "#ff4500",
@@ -1148,8 +1142,7 @@ var PLATFORM_COLORS = {
1148
1142
  deezer: "#ef5466",
1149
1143
  tidal: "#000000",
1150
1144
  soundcloud: "#ff5500",
1151
- applePodcasts: "#a24bdc",
1152
- snapchat: "#FFFC00"
1145
+ applePodcasts: "#a24bdc"
1153
1146
  };
1154
1147
  function PlatformBranding({
1155
1148
  provider,
@@ -1287,8 +1280,8 @@ function EmbedCard({
1287
1280
  const platformColor = ctaPlatformId ? PLATFORM_COLORS[ctaPlatformId] : void 0;
1288
1281
  const usePlatformButtonColor = Boolean(ctaUsePlatformColor && platformColor);
1289
1282
  const usePlatformIconColor = Boolean(ctaUsePlatformIconColor && platformColor && !usePlatformButtonColor);
1290
- const ctaIconColor = usePlatformButtonColor ? ctaPlatformId === "snapchat" || ctaPlatformId === "kick" ? "#000000" : "#ffffff" : usePlatformIconColor ? ctaPlatformId === "truthSocial" ? "currentColor" : platformColor : ctaPlatformId === "truthSocial" ? "#000000" : "currentColor";
1291
- const ctaButtonTextColor = usePlatformButtonColor ? ctaPlatformId === "snapchat" || ctaPlatformId === "kick" ? "#000000" : "#ffffff" : palette2.text;
1283
+ const ctaIconColor = usePlatformButtonColor ? ctaPlatformId === "kick" ? "#000000" : "#ffffff" : usePlatformIconColor ? ctaPlatformId === "truthSocial" ? "currentColor" : platformColor : ctaPlatformId === "truthSocial" ? "#000000" : "currentColor";
1284
+ const ctaButtonTextColor = usePlatformButtonColor ? ctaPlatformId === "kick" ? "#000000" : "#ffffff" : palette2.text;
1292
1285
  const ctaIcon = ctaLabelIcon && ctaPlatformId ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1293
1286
  PlatformIcon,
1294
1287
  {
@@ -7479,230 +7472,8 @@ var PinterestEmbed = ({
7479
7472
  );
7480
7473
  };
7481
7474
 
7482
- // src/components/SnapchatEmbed.tsx
7483
- var import_react22 = require("react");
7484
-
7485
- // src/utils/snapchat.ts
7486
- var isValidSnapchatUrl = (url) => {
7487
- return /^https?:\/\/(www\.)?snapchat\.com\/(lens|story|spotlight|add)\/[a-zA-Z0-9_-]+(\/embed)?/.test(url);
7488
- };
7489
- var getSnapchatEmbedUrl = (url) => {
7490
- if (!isValidSnapchatUrl(url)) return "";
7491
- if (url.endsWith("/embed")) return url;
7492
- return `${url}/embed`;
7493
- };
7494
-
7495
- // src/components/SnapchatEmbed.tsx
7496
- var import_jsx_runtime27 = require("react/jsx-runtime");
7497
- var SnapchatEmbed = ({
7498
- url,
7499
- width = "100%",
7500
- maxWidth,
7501
- height = 650,
7502
- className,
7503
- style,
7504
- scriptLoad = true,
7505
- disableCard = false,
7506
- showCTA = true,
7507
- ctaLabel = "View on Snapchat",
7508
- ctaLabelIcon = true,
7509
- ctaLabelIconPosition = "before",
7510
- ctaUsePlatformColor = false,
7511
- ctaUsePlatformIconColor = false,
7512
- ctaAlignment = "left",
7513
- theme = "light",
7514
- embedAlignment = "center",
7515
- showBranding = true,
7516
- constrainWidthByEmbed = false,
7517
- cardLayout
7518
- }) => {
7519
- const [error, setError] = (0, import_react22.useState)(null);
7520
- const containerRef = (0, import_react22.useRef)(null);
7521
- const cardHover = getCardHoverStyles(theme);
7522
- const ctaHover = getCtaHoverStyles(theme);
7523
- const ctaBaseStyle = getCtaStyle(theme);
7524
- const ctaIconColor = ctaUsePlatformColor ? "#000000" : ctaUsePlatformIconColor ? PLATFORM_COLORS.snapchat : "currentColor";
7525
- const resolvedLayout = useCardLayout(cardLayout) ?? "classic";
7526
- (0, import_react22.useEffect)(() => {
7527
- if (!url) {
7528
- setError("No URL provided");
7529
- return;
7530
- }
7531
- if (!isValidSnapchatUrl(url)) {
7532
- setError("Invalid Snapchat URL");
7533
- return;
7534
- }
7535
- if (scriptLoad) {
7536
- const existingScript = document.querySelector('script[src="https://www.snapchat.com/embed.js"]');
7537
- if (!existingScript) {
7538
- setTimeout(() => {
7539
- const script = document.createElement("script");
7540
- script.async = true;
7541
- script.src = "https://www.snapchat.com/embed.js";
7542
- document.body.appendChild(script);
7543
- }, 50);
7544
- }
7545
- }
7546
- }, [url, scriptLoad]);
7547
- if (error) {
7548
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7549
- EmbedCard,
7550
- {
7551
- provider: "Snapchat",
7552
- status: "error",
7553
- statusMessage: error,
7554
- width,
7555
- maxWidth,
7556
- className,
7557
- style,
7558
- disableCard,
7559
- showCTA,
7560
- ctaLabel,
7561
- ctaLabelIcon,
7562
- ctaLabelIconPosition,
7563
- ctaUsePlatformColor,
7564
- ctaUsePlatformIconColor,
7565
- theme
7566
- }
7567
- );
7568
- }
7569
- const embedUrl = getSnapchatEmbedUrl(url);
7570
- const alignmentStyles = {
7571
- left: "flex-start",
7572
- center: "center",
7573
- right: "flex-end"
7574
- };
7575
- const gridAlignment = {
7576
- left: "start",
7577
- center: "center",
7578
- right: "end"
7579
- };
7580
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7581
- "div",
7582
- {
7583
- className,
7584
- style: {
7585
- width: constrainWidthByEmbed ? "fit-content" : "100%",
7586
- maxWidth: constrainWidthByEmbed ? width : maxWidth || "100%",
7587
- display: "grid",
7588
- ...style
7589
- },
7590
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7591
- "div",
7592
- {
7593
- style: {
7594
- ...getCardContainerStyle(theme, disableCard)
7595
- },
7596
- onMouseEnter: (e) => {
7597
- if (disableCard) return;
7598
- e.currentTarget.style.boxShadow = cardHover.hover.boxShadow;
7599
- e.currentTarget.style.transform = cardHover.hover.transform;
7600
- },
7601
- onMouseLeave: (e) => {
7602
- if (disableCard) return;
7603
- e.currentTarget.style.boxShadow = cardHover.rest.boxShadow;
7604
- e.currentTarget.style.transform = cardHover.rest.transform;
7605
- },
7606
- children: [
7607
- resolvedLayout === "classic" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformBranding, { provider: "Snapchat", theme }),
7608
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7609
- "div",
7610
- {
7611
- style: {
7612
- width,
7613
- maxWidth,
7614
- display: "flex",
7615
- flexDirection: "column",
7616
- alignItems: alignmentStyles[embedAlignment],
7617
- justifySelf: gridAlignment[embedAlignment]
7618
- },
7619
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7620
- "blockquote",
7621
- {
7622
- className: "snapchat-embed",
7623
- "data-snapchat-embed-url": embedUrl,
7624
- "data-snapchat-embed-width": typeof width === "number" ? width : void 0,
7625
- "data-snapchat-embed-height": typeof height === "number" ? height : void 0,
7626
- style: {
7627
- background: disableCard ? "transparent" : "#C4C4C4",
7628
- border: 0,
7629
- borderRadius: disableCard ? 0 : 40,
7630
- boxShadow: disableCard ? "none" : "0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15)",
7631
- margin: 1,
7632
- maxWidth: typeof width === "number" ? width : "100%",
7633
- minWidth: 326,
7634
- padding: 0,
7635
- width: "calc(100% - 2px)",
7636
- display: "flex",
7637
- flexDirection: "column",
7638
- position: "relative",
7639
- height: typeof height === "number" ? height : 650
7640
- },
7641
- children: [
7642
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [
7643
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("a", { href: embedUrl, style: { backgroundColor: "#F4F4F4", borderRadius: "50%", flexGrow: 0, height: 40, width: 40, margin: 16, cursor: "pointer" } }),
7644
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1, justifyContent: "center" } })
7645
- ] }),
7646
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { flex: 1 } }),
7647
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", borderEndEndRadius: 40, borderEndStartRadius: 40 }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("a", { href: embedUrl, style: { backgroundColor: "yellow", width: "100%", padding: "10px 20px", border: "none", borderRadius: "inherit", cursor: "pointer", textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center", textDecoration: "none", color: "black" }, children: "View more on Snapchat" }) })
7648
- ]
7649
- }
7650
- )
7651
- }
7652
- ),
7653
- resolvedLayout === "modern" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformBranding, { provider: "Snapchat", theme }),
7654
- showCTA && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7655
- "a",
7656
- {
7657
- href: embedUrl,
7658
- target: "_blank",
7659
- rel: "noopener noreferrer",
7660
- style: {
7661
- ...ctaBaseStyle,
7662
- gap: 8,
7663
- justifySelf: ctaAlignment === "center" ? "center" : ctaAlignment === "right" ? "end" : "start",
7664
- backgroundColor: ctaUsePlatformColor ? PLATFORM_COLORS.snapchat : ctaBaseStyle.backgroundColor,
7665
- borderColor: ctaUsePlatformColor ? PLATFORM_COLORS.snapchat : ctaBaseStyle.borderColor,
7666
- color: ctaUsePlatformColor ? "#000000" : ctaBaseStyle.color
7667
- },
7668
- onMouseEnter: (e) => {
7669
- if (ctaUsePlatformColor) {
7670
- e.currentTarget.style.backgroundColor = PLATFORM_COLORS.snapchat;
7671
- e.currentTarget.style.borderColor = PLATFORM_COLORS.snapchat;
7672
- e.currentTarget.style.color = "#000000";
7673
- } else {
7674
- e.currentTarget.style.backgroundColor = ctaHover.hover.backgroundColor;
7675
- e.currentTarget.style.borderColor = ctaHover.hover.borderColor;
7676
- }
7677
- e.currentTarget.style.transform = ctaHover.hover.transform;
7678
- },
7679
- onMouseLeave: (e) => {
7680
- if (ctaUsePlatformColor) {
7681
- e.currentTarget.style.backgroundColor = PLATFORM_COLORS.snapchat;
7682
- e.currentTarget.style.borderColor = PLATFORM_COLORS.snapchat;
7683
- e.currentTarget.style.color = "#000000";
7684
- } else {
7685
- e.currentTarget.style.backgroundColor = ctaHover.rest.backgroundColor;
7686
- e.currentTarget.style.borderColor = ctaHover.rest.borderColor;
7687
- }
7688
- e.currentTarget.style.transform = ctaHover.rest.transform;
7689
- },
7690
- children: [
7691
- ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformIcon, { platform: "snapchat", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7692
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: ctaLabel }),
7693
- ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformIcon, { platform: "snapchat", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7694
- ]
7695
- }
7696
- )
7697
- ]
7698
- }
7699
- )
7700
- }
7701
- );
7702
- };
7703
-
7704
7475
  // src/components/TelegramEmbed.tsx
7705
- var import_react23 = require("react");
7476
+ var import_react22 = require("react");
7706
7477
 
7707
7478
  // src/utils/telegram.ts
7708
7479
  function isValidTelegramUrl(url) {
@@ -7733,7 +7504,7 @@ function extractTelegramPostData(url) {
7733
7504
  }
7734
7505
 
7735
7506
  // src/components/TelegramEmbed.tsx
7736
- var import_jsx_runtime28 = require("react/jsx-runtime");
7507
+ var import_jsx_runtime27 = require("react/jsx-runtime");
7737
7508
  var TelegramEmbed = ({
7738
7509
  url,
7739
7510
  width = 700,
@@ -7756,16 +7527,16 @@ var TelegramEmbed = ({
7756
7527
  constrainWidthByEmbed = false,
7757
7528
  cardLayout
7758
7529
  }) => {
7759
- const containerRef = (0, import_react23.useRef)(null);
7760
- const [error, setError] = (0, import_react23.useState)(null);
7761
- const [loaded, setLoaded] = (0, import_react23.useState)(false);
7530
+ const containerRef = (0, import_react22.useRef)(null);
7531
+ const [error, setError] = (0, import_react22.useState)(null);
7532
+ const [loaded, setLoaded] = (0, import_react22.useState)(false);
7762
7533
  const themeValue = dark ? "dark" : "light";
7763
7534
  const cardHover = getCardHoverStyles(themeValue);
7764
7535
  const ctaHover = getCtaHoverStyles(themeValue);
7765
7536
  const ctaBaseStyle = getCtaStyle(themeValue);
7766
7537
  const ctaIconColor = ctaUsePlatformColor ? "#ffffff" : ctaUsePlatformIconColor ? PLATFORM_COLORS.telegram : "currentColor";
7767
7538
  const resolvedLayout = useCardLayout(cardLayout) ?? "classic";
7768
- (0, import_react23.useEffect)(() => {
7539
+ (0, import_react22.useEffect)(() => {
7769
7540
  if (!url) {
7770
7541
  setError("No URL provided");
7771
7542
  return;
@@ -7813,7 +7584,7 @@ var TelegramEmbed = ({
7813
7584
  };
7814
7585
  }, [url, accentColor, dark, showComments]);
7815
7586
  if (error) {
7816
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7587
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7817
7588
  EmbedCard,
7818
7589
  {
7819
7590
  provider: "Telegram",
@@ -7833,7 +7604,7 @@ var TelegramEmbed = ({
7833
7604
  center: "center",
7834
7605
  right: "flex-end"
7835
7606
  };
7836
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7607
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7837
7608
  "div",
7838
7609
  {
7839
7610
  className,
@@ -7843,7 +7614,7 @@ var TelegramEmbed = ({
7843
7614
  display: "grid",
7844
7615
  ...style
7845
7616
  },
7846
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7617
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7847
7618
  "div",
7848
7619
  {
7849
7620
  style: {
@@ -7860,8 +7631,8 @@ var TelegramEmbed = ({
7860
7631
  e.currentTarget.style.transform = cardHover.rest.transform;
7861
7632
  },
7862
7633
  children: [
7863
- resolvedLayout === "classic" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7864
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7634
+ resolvedLayout === "classic" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7635
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7865
7636
  "div",
7866
7637
  {
7867
7638
  style: {
@@ -7869,7 +7640,7 @@ var TelegramEmbed = ({
7869
7640
  display: "flex",
7870
7641
  justifyContent: alignmentStyles[embedAlignment]
7871
7642
  },
7872
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7643
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7873
7644
  "div",
7874
7645
  {
7875
7646
  ref: containerRef,
@@ -7884,8 +7655,8 @@ var TelegramEmbed = ({
7884
7655
  )
7885
7656
  }
7886
7657
  ),
7887
- resolvedLayout === "modern" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7888
- showCTA && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
7658
+ resolvedLayout === "modern" && showBranding && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7659
+ showCTA && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7889
7660
  "a",
7890
7661
  {
7891
7662
  href: url,
@@ -7922,9 +7693,9 @@ var TelegramEmbed = ({
7922
7693
  e.currentTarget.style.transform = ctaHover.rest.transform;
7923
7694
  },
7924
7695
  children: [
7925
- ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7926
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: ctaLabel }),
7927
- ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7696
+ ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7697
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: ctaLabel }),
7698
+ ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7928
7699
  ]
7929
7700
  }
7930
7701
  )
@@ -7936,7 +7707,7 @@ var TelegramEmbed = ({
7936
7707
  };
7937
7708
 
7938
7709
  // src/components/SpotifyEmbed.tsx
7939
- var import_react24 = require("react");
7710
+ var import_react23 = require("react");
7940
7711
 
7941
7712
  // src/utils/spotify.ts
7942
7713
  function isValidSpotifyUrl(url) {
@@ -8002,7 +7773,7 @@ function getSpotifyEmbedUrl(url, theme = "light") {
8002
7773
  }
8003
7774
 
8004
7775
  // src/components/SpotifyEmbed.tsx
8005
- var import_jsx_runtime29 = require("react/jsx-runtime");
7776
+ var import_jsx_runtime28 = require("react/jsx-runtime");
8006
7777
  var SPOTIFY_COLOR = "#1DB954";
8007
7778
  var SpotifyEmbed = ({
8008
7779
  url,
@@ -8025,15 +7796,15 @@ var SpotifyEmbed = ({
8025
7796
  linkTarget = "_blank",
8026
7797
  cardLayout
8027
7798
  }) => {
8028
- const urlInfo = (0, import_react24.useMemo)(() => parseSpotifyUrl(url), [url]);
8029
- const embedUrl = (0, import_react24.useMemo)(() => getSpotifyEmbedUrl(url, theme), [url, theme]);
8030
- const defaultHeight = (0, import_react24.useMemo)(() => {
7799
+ const urlInfo = (0, import_react23.useMemo)(() => parseSpotifyUrl(url), [url]);
7800
+ const embedUrl = (0, import_react23.useMemo)(() => getSpotifyEmbedUrl(url, theme), [url, theme]);
7801
+ const defaultHeight = (0, import_react23.useMemo)(() => {
8031
7802
  if (height) return height;
8032
7803
  if (urlInfo.type === "track") return 152;
8033
7804
  return 352;
8034
7805
  }, [height, urlInfo.type]);
8035
7806
  if (!embedUrl) {
8036
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7807
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8037
7808
  EmbedCard,
8038
7809
  {
8039
7810
  provider: "Spotify",
@@ -8053,7 +7824,7 @@ var SpotifyEmbed = ({
8053
7824
  );
8054
7825
  }
8055
7826
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8056
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7827
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
8057
7828
  EmbedCard,
8058
7829
  {
8059
7830
  provider: showBranding ? "Spotify" : "",
@@ -8093,7 +7864,7 @@ var SpotifyEmbed = ({
8093
7864
  };
8094
7865
 
8095
7866
  // src/components/AppleMusicEmbed.tsx
8096
- var import_react25 = require("react");
7867
+ var import_react24 = require("react");
8097
7868
 
8098
7869
  // src/utils/appleMusic.ts
8099
7870
  function isValidAppleMusicUrl(url) {
@@ -8154,7 +7925,7 @@ function getAppleMusicEmbedUrl(url, theme = "light") {
8154
7925
  }
8155
7926
 
8156
7927
  // src/components/AppleMusicEmbed.tsx
8157
- var import_jsx_runtime30 = require("react/jsx-runtime");
7928
+ var import_jsx_runtime29 = require("react/jsx-runtime");
8158
7929
  var APPLE_MUSIC_COLOR = "#fa243c";
8159
7930
  var AppleMusicEmbed = ({
8160
7931
  url,
@@ -8177,9 +7948,9 @@ var AppleMusicEmbed = ({
8177
7948
  linkTarget = "_blank",
8178
7949
  cardLayout
8179
7950
  }) => {
8180
- const urlInfo = (0, import_react25.useMemo)(() => parseAppleMusicUrl(url), [url]);
8181
- const embedUrl = (0, import_react25.useMemo)(() => getAppleMusicEmbedUrl(url, theme), [url, theme]);
8182
- const defaultHeight = (0, import_react25.useMemo)(() => {
7951
+ const urlInfo = (0, import_react24.useMemo)(() => parseAppleMusicUrl(url), [url]);
7952
+ const embedUrl = (0, import_react24.useMemo)(() => getAppleMusicEmbedUrl(url, theme), [url, theme]);
7953
+ const defaultHeight = (0, import_react24.useMemo)(() => {
8183
7954
  if (height) return height;
8184
7955
  if (urlInfo.type === "song") return 150;
8185
7956
  if (urlInfo.type === "album") return 450;
@@ -8187,7 +7958,7 @@ var AppleMusicEmbed = ({
8187
7958
  return 450;
8188
7959
  }, [height, urlInfo.type]);
8189
7960
  if (!embedUrl) {
8190
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7961
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8191
7962
  EmbedCard,
8192
7963
  {
8193
7964
  provider: "Apple Music",
@@ -8207,7 +7978,7 @@ var AppleMusicEmbed = ({
8207
7978
  );
8208
7979
  }
8209
7980
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8210
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7981
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8211
7982
  EmbedCard,
8212
7983
  {
8213
7984
  provider: showBranding ? "Apple Music" : "",
@@ -8241,7 +8012,7 @@ var AppleMusicEmbed = ({
8241
8012
  };
8242
8013
 
8243
8014
  // src/components/DeezerEmbed.tsx
8244
- var import_react26 = require("react");
8015
+ var import_react25 = require("react");
8245
8016
 
8246
8017
  // src/utils/deezer.ts
8247
8018
  function isValidDeezerUrl(url) {
@@ -8297,7 +8068,7 @@ function getDeezerEmbedUrl(url, theme = "light") {
8297
8068
  }
8298
8069
 
8299
8070
  // src/components/DeezerEmbed.tsx
8300
- var import_jsx_runtime31 = require("react/jsx-runtime");
8071
+ var import_jsx_runtime30 = require("react/jsx-runtime");
8301
8072
  var DEEZER_COLOR = "#ef5466";
8302
8073
  var DeezerEmbed = ({
8303
8074
  url,
@@ -8320,16 +8091,16 @@ var DeezerEmbed = ({
8320
8091
  linkTarget = "_blank",
8321
8092
  cardLayout
8322
8093
  }) => {
8323
- const urlInfo = (0, import_react26.useMemo)(() => parseDeezerUrl(url), [url]);
8324
- const embedUrl = (0, import_react26.useMemo)(() => getDeezerEmbedUrl(url, theme), [url, theme]);
8325
- const defaultHeight = (0, import_react26.useMemo)(() => {
8094
+ const urlInfo = (0, import_react25.useMemo)(() => parseDeezerUrl(url), [url]);
8095
+ const embedUrl = (0, import_react25.useMemo)(() => getDeezerEmbedUrl(url, theme), [url, theme]);
8096
+ const defaultHeight = (0, import_react25.useMemo)(() => {
8326
8097
  if (height) return height;
8327
8098
  if (urlInfo.type === "track") return 150;
8328
8099
  if (urlInfo.type === "album" || urlInfo.type === "playlist") return 380;
8329
8100
  return 300;
8330
8101
  }, [height, urlInfo.type]);
8331
8102
  if (!embedUrl) {
8332
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8103
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8333
8104
  EmbedCard,
8334
8105
  {
8335
8106
  provider: "Deezer",
@@ -8349,7 +8120,7 @@ var DeezerEmbed = ({
8349
8120
  );
8350
8121
  }
8351
8122
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8352
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8123
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8353
8124
  EmbedCard,
8354
8125
  {
8355
8126
  provider: showBranding ? "Deezer" : "",
@@ -8383,7 +8154,7 @@ var DeezerEmbed = ({
8383
8154
  };
8384
8155
 
8385
8156
  // src/components/TidalEmbed.tsx
8386
- var import_react27 = require("react");
8157
+ var import_react26 = require("react");
8387
8158
 
8388
8159
  // src/utils/tidal.ts
8389
8160
  function isValidTidalUrl(url) {
@@ -8439,7 +8210,7 @@ function getTidalEmbedUrl(url) {
8439
8210
  }
8440
8211
 
8441
8212
  // src/components/TidalEmbed.tsx
8442
- var import_jsx_runtime32 = require("react/jsx-runtime");
8213
+ var import_jsx_runtime31 = require("react/jsx-runtime");
8443
8214
  var TIDAL_COLOR = "#000000";
8444
8215
  var TidalEmbed = ({
8445
8216
  url,
@@ -8462,9 +8233,9 @@ var TidalEmbed = ({
8462
8233
  linkTarget = "_blank",
8463
8234
  cardLayout
8464
8235
  }) => {
8465
- const urlInfo = (0, import_react27.useMemo)(() => parseTidalUrl(url), [url]);
8466
- const embedUrl = (0, import_react27.useMemo)(() => getTidalEmbedUrl(url), [url]);
8467
- const defaultHeight = (0, import_react27.useMemo)(() => {
8236
+ const urlInfo = (0, import_react26.useMemo)(() => parseTidalUrl(url), [url]);
8237
+ const embedUrl = (0, import_react26.useMemo)(() => getTidalEmbedUrl(url), [url]);
8238
+ const defaultHeight = (0, import_react26.useMemo)(() => {
8468
8239
  if (height) return height;
8469
8240
  if (urlInfo.type === "track") return 152;
8470
8241
  if (urlInfo.type === "album" || urlInfo.type === "playlist") return 352;
@@ -8472,7 +8243,7 @@ var TidalEmbed = ({
8472
8243
  }, [height, urlInfo.type]);
8473
8244
  const mediaAspectRatio = urlInfo.type === "video" ? "16/9" : void 0;
8474
8245
  if (!embedUrl) {
8475
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8246
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8476
8247
  EmbedCard,
8477
8248
  {
8478
8249
  provider: "Tidal",
@@ -8492,7 +8263,7 @@ var TidalEmbed = ({
8492
8263
  );
8493
8264
  }
8494
8265
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8495
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8266
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8496
8267
  EmbedCard,
8497
8268
  {
8498
8269
  provider: showBranding ? "Tidal" : "",
@@ -8527,7 +8298,7 @@ var TidalEmbed = ({
8527
8298
  };
8528
8299
 
8529
8300
  // src/components/SoundCloudEmbed.tsx
8530
- var import_react28 = require("react");
8301
+ var import_react27 = require("react");
8531
8302
 
8532
8303
  // src/utils/soundcloud.ts
8533
8304
  function isValidSoundCloudUrl(url) {
@@ -8574,7 +8345,7 @@ function getSoundCloudEmbedUrl(url, options) {
8574
8345
  }
8575
8346
 
8576
8347
  // src/components/SoundCloudEmbed.tsx
8577
- var import_jsx_runtime33 = require("react/jsx-runtime");
8348
+ var import_jsx_runtime32 = require("react/jsx-runtime");
8578
8349
  var SOUNDCLOUD_COLOR = "#ff5500";
8579
8350
  var SoundCloudEmbed = ({
8580
8351
  url,
@@ -8598,18 +8369,18 @@ var SoundCloudEmbed = ({
8598
8369
  autoPlay = false,
8599
8370
  cardLayout
8600
8371
  }) => {
8601
- const urlInfo = (0, import_react28.useMemo)(() => parseSoundCloudUrl(url), [url]);
8602
- const embedUrl = (0, import_react28.useMemo)(
8372
+ const urlInfo = (0, import_react27.useMemo)(() => parseSoundCloudUrl(url), [url]);
8373
+ const embedUrl = (0, import_react27.useMemo)(
8603
8374
  () => getSoundCloudEmbedUrl(url, { autoPlay }),
8604
8375
  [url, autoPlay]
8605
8376
  );
8606
- const defaultHeight = (0, import_react28.useMemo)(() => {
8377
+ const defaultHeight = (0, import_react27.useMemo)(() => {
8607
8378
  if (height) return height;
8608
8379
  if (urlInfo.type === "playlist") return 450;
8609
8380
  return 166;
8610
8381
  }, [height, urlInfo.type]);
8611
8382
  if (!embedUrl) {
8612
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8383
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8613
8384
  EmbedCard,
8614
8385
  {
8615
8386
  provider: "SoundCloud",
@@ -8629,7 +8400,7 @@ var SoundCloudEmbed = ({
8629
8400
  );
8630
8401
  }
8631
8402
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8632
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8403
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8633
8404
  EmbedCard,
8634
8405
  {
8635
8406
  provider: showBranding ? "SoundCloud" : "",
@@ -8663,7 +8434,7 @@ var SoundCloudEmbed = ({
8663
8434
  };
8664
8435
 
8665
8436
  // src/components/ApplePodcastsEmbed.tsx
8666
- var import_react29 = require("react");
8437
+ var import_react28 = require("react");
8667
8438
 
8668
8439
  // src/utils/applePodcasts.ts
8669
8440
  function isValidApplePodcastsUrl(url) {
@@ -8720,7 +8491,7 @@ function getApplePodcastsEmbedUrl(url, theme = "light") {
8720
8491
  }
8721
8492
 
8722
8493
  // src/components/ApplePodcastsEmbed.tsx
8723
- var import_jsx_runtime34 = require("react/jsx-runtime");
8494
+ var import_jsx_runtime33 = require("react/jsx-runtime");
8724
8495
  var APPLE_PODCASTS_COLOR = "#a24bdc";
8725
8496
  var ApplePodcastsEmbed = ({
8726
8497
  url,
@@ -8743,15 +8514,15 @@ var ApplePodcastsEmbed = ({
8743
8514
  linkTarget = "_blank",
8744
8515
  cardLayout
8745
8516
  }) => {
8746
- const urlInfo = (0, import_react29.useMemo)(() => parseApplePodcastsUrl(url), [url]);
8747
- const embedUrl = (0, import_react29.useMemo)(() => getApplePodcastsEmbedUrl(url, theme), [url, theme]);
8748
- const defaultHeight = (0, import_react29.useMemo)(() => {
8517
+ const urlInfo = (0, import_react28.useMemo)(() => parseApplePodcastsUrl(url), [url]);
8518
+ const embedUrl = (0, import_react28.useMemo)(() => getApplePodcastsEmbedUrl(url, theme), [url, theme]);
8519
+ const defaultHeight = (0, import_react28.useMemo)(() => {
8749
8520
  if (height) return height;
8750
8521
  if (urlInfo.type === "episode") return 175;
8751
8522
  return 450;
8752
8523
  }, [height, urlInfo.type]);
8753
8524
  if (!embedUrl) {
8754
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8525
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8755
8526
  EmbedCard,
8756
8527
  {
8757
8528
  provider: "Apple Podcasts",
@@ -8771,7 +8542,7 @@ var ApplePodcastsEmbed = ({
8771
8542
  );
8772
8543
  }
8773
8544
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8774
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8545
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8775
8546
  EmbedCard,
8776
8547
  {
8777
8548
  provider: showBranding ? "Apple Podcasts" : "",
@@ -8825,7 +8596,6 @@ var ApplePodcastsEmbed = ({
8825
8596
  PlatformIcon,
8826
8597
  RedditEmbed,
8827
8598
  RumbleEmbed,
8828
- SnapchatEmbed,
8829
8599
  SoundCloudEmbed,
8830
8600
  SpotifyEmbed,
8831
8601
  TelegramEmbed,
package/dist/index.mjs CHANGED
@@ -957,10 +957,6 @@ var PLATFORM_ICON_PATHS = {
957
957
  applePodcasts: {
958
958
  viewBox: "0 0 24 24",
959
959
  path: "M5.34 0A5.328 5.328 0 000 5.34v13.32A5.328 5.328 0 005.34 24h13.32A5.328 5.328 0 0024 18.66V5.34A5.328 5.328 0 0018.66 0zm6.525 2.568c2.336 0 4.448.902 6.056 2.587 1.224 1.272 1.912 2.619 2.264 4.392.12.59.12 2.2.007 2.864a8.506 8.506 0 01-3.24 5.296c-.608.46-2.096 1.261-2.336 1.261-.088 0-.096-.091-.056-.46.072-.592.144-.715.48-.856.536-.224 1.448-.874 2.008-1.435a7.644 7.644 0 002.008-3.536c.208-.824.184-2.656-.048-3.504-.728-2.696-2.928-4.792-5.624-5.352-.784-.16-2.208-.16-3 0-2.728.56-4.984 2.76-5.672 5.528-.184.752-.184 2.584 0 3.336.456 1.832 1.64 3.512 3.192 4.512.304.2.672.408.824.472.336.144.408.264.472.856.04.36.03.464-.056.464-.056 0-.464-.176-.896-.384l-.04-.03c-2.472-1.216-4.056-3.274-4.632-6.012-.144-.706-.168-2.392-.03-3.04.36-1.74 1.048-3.1 2.192-4.304 1.648-1.737 3.768-2.656 6.128-2.656zm.134 2.81c.409.004.803.04 1.106.106 2.784.62 4.76 3.408 4.376 6.174-.152 1.114-.536 2.03-1.216 2.88-.336.43-1.152 1.15-1.296 1.15-.023 0-.048-.272-.048-.603v-.605l.416-.496c1.568-1.878 1.456-4.502-.256-6.224-.664-.67-1.432-1.064-2.424-1.246-.64-.118-.776-.118-1.448-.008-1.02.167-1.81.562-2.512 1.256-1.72 1.704-1.832 4.342-.264 6.222l.413.496v.608c0 .336-.027.608-.06.608-.03 0-.264-.16-.512-.36l-.034-.011c-.832-.664-1.568-1.842-1.872-2.997-.184-.698-.184-2.024.008-2.72.504-1.878 1.888-3.335 3.808-4.019.41-.145 1.133-.22 1.814-.211zm-.13 2.99c.31 0 .62.06.844.178.488.253.888.745 1.04 1.259.464 1.578-1.208 2.96-2.72 2.254h-.015c-.712-.331-1.096-.956-1.104-1.77 0-.733.408-1.371 1.112-1.745.224-.117.534-.176.844-.176zm-.011 4.728c.988-.004 1.706.349 1.97.97.198.464.124 1.932-.218 4.302-.232 1.656-.36 2.074-.68 2.356-.44.39-1.064.498-1.656.288h-.003c-.716-.257-.87-.605-1.164-2.644-.341-2.37-.416-3.838-.218-4.302.262-.616.974-.966 1.97-.97z"
960
- },
961
- snapchat: {
962
- viewBox: "0 0 24 24",
963
- path: "M12 0C8.74 0 6.06 2.67 6.06 5.96c0 1.6.63 3.26 1.78 4.55.16.18.26.35.25.46-.03.27-.62 1.15-1.25 1.45-.39.19-.94.36-1.52.54-.37.11-.75.22-1.11.35-.6.22-.7.6-.67.88.07.66.92.99 2.49 1.31.6.12 1.27.25 1.38.35.1.62.3 1.29.61 1.89.6 1.2 1.9 1.9 3.87 1.9s3.28-.7 3.88-1.9c.31-.6.5-1.27.6-1.89.11-.1.79-.23 1.39-.35 1.56-.32 2.41-.65 2.49-1.31.03-.28-.07-.66-.67-.88-.36-.13-.74-.24-1.11-.35-.58-.18-1.13-.35-1.52-.54-.63-.3-1.22-1.18-1.25-1.45-.01-.11.09-.28.25-.46 1.15-1.29 1.78-2.95 1.78-4.55C17.94 2.67 15.26 0 12 0z"
964
960
  }
965
961
  };
966
962
  function PlatformIcon({ platform, size = 16, color = "currentColor", ...props }) {
@@ -1051,8 +1047,7 @@ var PROVIDER_TO_PLATFORM = {
1051
1047
  deezer: "deezer",
1052
1048
  tidal: "tidal",
1053
1049
  soundcloud: "soundcloud",
1054
- "apple podcasts": "applePodcasts",
1055
- snapchat: "snapchat"
1050
+ "apple podcasts": "applePodcasts"
1056
1051
  };
1057
1052
  var PLATFORM_COLORS = {
1058
1053
  reddit: "#ff4500",
@@ -1081,8 +1076,7 @@ var PLATFORM_COLORS = {
1081
1076
  deezer: "#ef5466",
1082
1077
  tidal: "#000000",
1083
1078
  soundcloud: "#ff5500",
1084
- applePodcasts: "#a24bdc",
1085
- snapchat: "#FFFC00"
1079
+ applePodcasts: "#a24bdc"
1086
1080
  };
1087
1081
  function PlatformBranding({
1088
1082
  provider,
@@ -1220,8 +1214,8 @@ function EmbedCard({
1220
1214
  const platformColor = ctaPlatformId ? PLATFORM_COLORS[ctaPlatformId] : void 0;
1221
1215
  const usePlatformButtonColor = Boolean(ctaUsePlatformColor && platformColor);
1222
1216
  const usePlatformIconColor = Boolean(ctaUsePlatformIconColor && platformColor && !usePlatformButtonColor);
1223
- const ctaIconColor = usePlatformButtonColor ? ctaPlatformId === "snapchat" || ctaPlatformId === "kick" ? "#000000" : "#ffffff" : usePlatformIconColor ? ctaPlatformId === "truthSocial" ? "currentColor" : platformColor : ctaPlatformId === "truthSocial" ? "#000000" : "currentColor";
1224
- const ctaButtonTextColor = usePlatformButtonColor ? ctaPlatformId === "snapchat" || ctaPlatformId === "kick" ? "#000000" : "#ffffff" : palette2.text;
1217
+ const ctaIconColor = usePlatformButtonColor ? ctaPlatformId === "kick" ? "#000000" : "#ffffff" : usePlatformIconColor ? ctaPlatformId === "truthSocial" ? "currentColor" : platformColor : ctaPlatformId === "truthSocial" ? "#000000" : "currentColor";
1218
+ const ctaButtonTextColor = usePlatformButtonColor ? ctaPlatformId === "kick" ? "#000000" : "#ffffff" : palette2.text;
1225
1219
  const ctaIcon = ctaLabelIcon && ctaPlatformId ? /* @__PURE__ */ jsx6(
1226
1220
  PlatformIcon,
1227
1221
  {
@@ -7412,230 +7406,8 @@ var PinterestEmbed = ({
7412
7406
  );
7413
7407
  };
7414
7408
 
7415
- // src/components/SnapchatEmbed.tsx
7416
- import { useEffect as useEffect18, useRef as useRef4, useState as useState18 } from "react";
7417
-
7418
- // src/utils/snapchat.ts
7419
- var isValidSnapchatUrl = (url) => {
7420
- return /^https?:\/\/(www\.)?snapchat\.com\/(lens|story|spotlight|add)\/[a-zA-Z0-9_-]+(\/embed)?/.test(url);
7421
- };
7422
- var getSnapchatEmbedUrl = (url) => {
7423
- if (!isValidSnapchatUrl(url)) return "";
7424
- if (url.endsWith("/embed")) return url;
7425
- return `${url}/embed`;
7426
- };
7427
-
7428
- // src/components/SnapchatEmbed.tsx
7429
- import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
7430
- var SnapchatEmbed = ({
7431
- url,
7432
- width = "100%",
7433
- maxWidth,
7434
- height = 650,
7435
- className,
7436
- style,
7437
- scriptLoad = true,
7438
- disableCard = false,
7439
- showCTA = true,
7440
- ctaLabel = "View on Snapchat",
7441
- ctaLabelIcon = true,
7442
- ctaLabelIconPosition = "before",
7443
- ctaUsePlatformColor = false,
7444
- ctaUsePlatformIconColor = false,
7445
- ctaAlignment = "left",
7446
- theme = "light",
7447
- embedAlignment = "center",
7448
- showBranding = true,
7449
- constrainWidthByEmbed = false,
7450
- cardLayout
7451
- }) => {
7452
- const [error, setError] = useState18(null);
7453
- const containerRef = useRef4(null);
7454
- const cardHover = getCardHoverStyles(theme);
7455
- const ctaHover = getCtaHoverStyles(theme);
7456
- const ctaBaseStyle = getCtaStyle(theme);
7457
- const ctaIconColor = ctaUsePlatformColor ? "#000000" : ctaUsePlatformIconColor ? PLATFORM_COLORS.snapchat : "currentColor";
7458
- const resolvedLayout = useCardLayout(cardLayout) ?? "classic";
7459
- useEffect18(() => {
7460
- if (!url) {
7461
- setError("No URL provided");
7462
- return;
7463
- }
7464
- if (!isValidSnapchatUrl(url)) {
7465
- setError("Invalid Snapchat URL");
7466
- return;
7467
- }
7468
- if (scriptLoad) {
7469
- const existingScript = document.querySelector('script[src="https://www.snapchat.com/embed.js"]');
7470
- if (!existingScript) {
7471
- setTimeout(() => {
7472
- const script = document.createElement("script");
7473
- script.async = true;
7474
- script.src = "https://www.snapchat.com/embed.js";
7475
- document.body.appendChild(script);
7476
- }, 50);
7477
- }
7478
- }
7479
- }, [url, scriptLoad]);
7480
- if (error) {
7481
- return /* @__PURE__ */ jsx27(
7482
- EmbedCard,
7483
- {
7484
- provider: "Snapchat",
7485
- status: "error",
7486
- statusMessage: error,
7487
- width,
7488
- maxWidth,
7489
- className,
7490
- style,
7491
- disableCard,
7492
- showCTA,
7493
- ctaLabel,
7494
- ctaLabelIcon,
7495
- ctaLabelIconPosition,
7496
- ctaUsePlatformColor,
7497
- ctaUsePlatformIconColor,
7498
- theme
7499
- }
7500
- );
7501
- }
7502
- const embedUrl = getSnapchatEmbedUrl(url);
7503
- const alignmentStyles = {
7504
- left: "flex-start",
7505
- center: "center",
7506
- right: "flex-end"
7507
- };
7508
- const gridAlignment = {
7509
- left: "start",
7510
- center: "center",
7511
- right: "end"
7512
- };
7513
- return /* @__PURE__ */ jsx27(
7514
- "div",
7515
- {
7516
- className,
7517
- style: {
7518
- width: constrainWidthByEmbed ? "fit-content" : "100%",
7519
- maxWidth: constrainWidthByEmbed ? width : maxWidth || "100%",
7520
- display: "grid",
7521
- ...style
7522
- },
7523
- children: /* @__PURE__ */ jsxs15(
7524
- "div",
7525
- {
7526
- style: {
7527
- ...getCardContainerStyle(theme, disableCard)
7528
- },
7529
- onMouseEnter: (e) => {
7530
- if (disableCard) return;
7531
- e.currentTarget.style.boxShadow = cardHover.hover.boxShadow;
7532
- e.currentTarget.style.transform = cardHover.hover.transform;
7533
- },
7534
- onMouseLeave: (e) => {
7535
- if (disableCard) return;
7536
- e.currentTarget.style.boxShadow = cardHover.rest.boxShadow;
7537
- e.currentTarget.style.transform = cardHover.rest.transform;
7538
- },
7539
- children: [
7540
- resolvedLayout === "classic" && showBranding && /* @__PURE__ */ jsx27(PlatformBranding, { provider: "Snapchat", theme }),
7541
- /* @__PURE__ */ jsx27(
7542
- "div",
7543
- {
7544
- style: {
7545
- width,
7546
- maxWidth,
7547
- display: "flex",
7548
- flexDirection: "column",
7549
- alignItems: alignmentStyles[embedAlignment],
7550
- justifySelf: gridAlignment[embedAlignment]
7551
- },
7552
- children: /* @__PURE__ */ jsxs15(
7553
- "blockquote",
7554
- {
7555
- className: "snapchat-embed",
7556
- "data-snapchat-embed-url": embedUrl,
7557
- "data-snapchat-embed-width": typeof width === "number" ? width : void 0,
7558
- "data-snapchat-embed-height": typeof height === "number" ? height : void 0,
7559
- style: {
7560
- background: disableCard ? "transparent" : "#C4C4C4",
7561
- border: 0,
7562
- borderRadius: disableCard ? 0 : 40,
7563
- boxShadow: disableCard ? "none" : "0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15)",
7564
- margin: 1,
7565
- maxWidth: typeof width === "number" ? width : "100%",
7566
- minWidth: 326,
7567
- padding: 0,
7568
- width: "calc(100% - 2px)",
7569
- display: "flex",
7570
- flexDirection: "column",
7571
- position: "relative",
7572
- height: typeof height === "number" ? height : 650
7573
- },
7574
- children: [
7575
- /* @__PURE__ */ jsxs15("div", { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [
7576
- /* @__PURE__ */ jsx27("a", { href: embedUrl, style: { backgroundColor: "#F4F4F4", borderRadius: "50%", flexGrow: 0, height: 40, width: 40, margin: 16, cursor: "pointer" } }),
7577
- /* @__PURE__ */ jsx27("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1, justifyContent: "center" } })
7578
- ] }),
7579
- /* @__PURE__ */ jsx27("div", { style: { flex: 1 } }),
7580
- /* @__PURE__ */ jsx27("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", borderEndEndRadius: 40, borderEndStartRadius: 40 }, children: /* @__PURE__ */ jsx27("a", { href: embedUrl, style: { backgroundColor: "yellow", width: "100%", padding: "10px 20px", border: "none", borderRadius: "inherit", cursor: "pointer", textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center", textDecoration: "none", color: "black" }, children: "View more on Snapchat" }) })
7581
- ]
7582
- }
7583
- )
7584
- }
7585
- ),
7586
- resolvedLayout === "modern" && showBranding && /* @__PURE__ */ jsx27(PlatformBranding, { provider: "Snapchat", theme }),
7587
- showCTA && /* @__PURE__ */ jsxs15(
7588
- "a",
7589
- {
7590
- href: embedUrl,
7591
- target: "_blank",
7592
- rel: "noopener noreferrer",
7593
- style: {
7594
- ...ctaBaseStyle,
7595
- gap: 8,
7596
- justifySelf: ctaAlignment === "center" ? "center" : ctaAlignment === "right" ? "end" : "start",
7597
- backgroundColor: ctaUsePlatformColor ? PLATFORM_COLORS.snapchat : ctaBaseStyle.backgroundColor,
7598
- borderColor: ctaUsePlatformColor ? PLATFORM_COLORS.snapchat : ctaBaseStyle.borderColor,
7599
- color: ctaUsePlatformColor ? "#000000" : ctaBaseStyle.color
7600
- },
7601
- onMouseEnter: (e) => {
7602
- if (ctaUsePlatformColor) {
7603
- e.currentTarget.style.backgroundColor = PLATFORM_COLORS.snapchat;
7604
- e.currentTarget.style.borderColor = PLATFORM_COLORS.snapchat;
7605
- e.currentTarget.style.color = "#000000";
7606
- } else {
7607
- e.currentTarget.style.backgroundColor = ctaHover.hover.backgroundColor;
7608
- e.currentTarget.style.borderColor = ctaHover.hover.borderColor;
7609
- }
7610
- e.currentTarget.style.transform = ctaHover.hover.transform;
7611
- },
7612
- onMouseLeave: (e) => {
7613
- if (ctaUsePlatformColor) {
7614
- e.currentTarget.style.backgroundColor = PLATFORM_COLORS.snapchat;
7615
- e.currentTarget.style.borderColor = PLATFORM_COLORS.snapchat;
7616
- e.currentTarget.style.color = "#000000";
7617
- } else {
7618
- e.currentTarget.style.backgroundColor = ctaHover.rest.backgroundColor;
7619
- e.currentTarget.style.borderColor = ctaHover.rest.borderColor;
7620
- }
7621
- e.currentTarget.style.transform = ctaHover.rest.transform;
7622
- },
7623
- children: [
7624
- ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ jsx27(PlatformIcon, { platform: "snapchat", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7625
- /* @__PURE__ */ jsx27("span", { children: ctaLabel }),
7626
- ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ jsx27(PlatformIcon, { platform: "snapchat", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7627
- ]
7628
- }
7629
- )
7630
- ]
7631
- }
7632
- )
7633
- }
7634
- );
7635
- };
7636
-
7637
7409
  // src/components/TelegramEmbed.tsx
7638
- import { useEffect as useEffect19, useRef as useRef5, useState as useState19 } from "react";
7410
+ import { useEffect as useEffect18, useRef as useRef4, useState as useState18 } from "react";
7639
7411
 
7640
7412
  // src/utils/telegram.ts
7641
7413
  function isValidTelegramUrl(url) {
@@ -7666,7 +7438,7 @@ function extractTelegramPostData(url) {
7666
7438
  }
7667
7439
 
7668
7440
  // src/components/TelegramEmbed.tsx
7669
- import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
7441
+ import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
7670
7442
  var TelegramEmbed = ({
7671
7443
  url,
7672
7444
  width = 700,
@@ -7689,16 +7461,16 @@ var TelegramEmbed = ({
7689
7461
  constrainWidthByEmbed = false,
7690
7462
  cardLayout
7691
7463
  }) => {
7692
- const containerRef = useRef5(null);
7693
- const [error, setError] = useState19(null);
7694
- const [loaded, setLoaded] = useState19(false);
7464
+ const containerRef = useRef4(null);
7465
+ const [error, setError] = useState18(null);
7466
+ const [loaded, setLoaded] = useState18(false);
7695
7467
  const themeValue = dark ? "dark" : "light";
7696
7468
  const cardHover = getCardHoverStyles(themeValue);
7697
7469
  const ctaHover = getCtaHoverStyles(themeValue);
7698
7470
  const ctaBaseStyle = getCtaStyle(themeValue);
7699
7471
  const ctaIconColor = ctaUsePlatformColor ? "#ffffff" : ctaUsePlatformIconColor ? PLATFORM_COLORS.telegram : "currentColor";
7700
7472
  const resolvedLayout = useCardLayout(cardLayout) ?? "classic";
7701
- useEffect19(() => {
7473
+ useEffect18(() => {
7702
7474
  if (!url) {
7703
7475
  setError("No URL provided");
7704
7476
  return;
@@ -7746,7 +7518,7 @@ var TelegramEmbed = ({
7746
7518
  };
7747
7519
  }, [url, accentColor, dark, showComments]);
7748
7520
  if (error) {
7749
- return /* @__PURE__ */ jsx28(
7521
+ return /* @__PURE__ */ jsx27(
7750
7522
  EmbedCard,
7751
7523
  {
7752
7524
  provider: "Telegram",
@@ -7766,7 +7538,7 @@ var TelegramEmbed = ({
7766
7538
  center: "center",
7767
7539
  right: "flex-end"
7768
7540
  };
7769
- return /* @__PURE__ */ jsx28(
7541
+ return /* @__PURE__ */ jsx27(
7770
7542
  "div",
7771
7543
  {
7772
7544
  className,
@@ -7776,7 +7548,7 @@ var TelegramEmbed = ({
7776
7548
  display: "grid",
7777
7549
  ...style
7778
7550
  },
7779
- children: /* @__PURE__ */ jsxs16(
7551
+ children: /* @__PURE__ */ jsxs15(
7780
7552
  "div",
7781
7553
  {
7782
7554
  style: {
@@ -7793,8 +7565,8 @@ var TelegramEmbed = ({
7793
7565
  e.currentTarget.style.transform = cardHover.rest.transform;
7794
7566
  },
7795
7567
  children: [
7796
- resolvedLayout === "classic" && showBranding && /* @__PURE__ */ jsx28(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7797
- /* @__PURE__ */ jsx28(
7568
+ resolvedLayout === "classic" && showBranding && /* @__PURE__ */ jsx27(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7569
+ /* @__PURE__ */ jsx27(
7798
7570
  "div",
7799
7571
  {
7800
7572
  style: {
@@ -7802,7 +7574,7 @@ var TelegramEmbed = ({
7802
7574
  display: "flex",
7803
7575
  justifyContent: alignmentStyles[embedAlignment]
7804
7576
  },
7805
- children: /* @__PURE__ */ jsx28(
7577
+ children: /* @__PURE__ */ jsx27(
7806
7578
  "div",
7807
7579
  {
7808
7580
  ref: containerRef,
@@ -7817,8 +7589,8 @@ var TelegramEmbed = ({
7817
7589
  )
7818
7590
  }
7819
7591
  ),
7820
- resolvedLayout === "modern" && showBranding && /* @__PURE__ */ jsx28(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7821
- showCTA && /* @__PURE__ */ jsxs16(
7592
+ resolvedLayout === "modern" && showBranding && /* @__PURE__ */ jsx27(PlatformBranding, { provider: "Telegram", theme: dark ? "dark" : "light" }),
7593
+ showCTA && /* @__PURE__ */ jsxs15(
7822
7594
  "a",
7823
7595
  {
7824
7596
  href: url,
@@ -7855,9 +7627,9 @@ var TelegramEmbed = ({
7855
7627
  e.currentTarget.style.transform = ctaHover.rest.transform;
7856
7628
  },
7857
7629
  children: [
7858
- ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ jsx28(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7859
- /* @__PURE__ */ jsx28("span", { children: ctaLabel }),
7860
- ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ jsx28(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7630
+ ctaLabelIconPosition === "before" && ctaLabelIcon && /* @__PURE__ */ jsx27(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" }),
7631
+ /* @__PURE__ */ jsx27("span", { children: ctaLabel }),
7632
+ ctaLabelIconPosition === "after" && ctaLabelIcon && /* @__PURE__ */ jsx27(PlatformIcon, { platform: "telegram", size: 14, color: ctaIconColor, "aria-hidden": "true", focusable: "false" })
7861
7633
  ]
7862
7634
  }
7863
7635
  )
@@ -7935,7 +7707,7 @@ function getSpotifyEmbedUrl(url, theme = "light") {
7935
7707
  }
7936
7708
 
7937
7709
  // src/components/SpotifyEmbed.tsx
7938
- import { jsx as jsx29 } from "react/jsx-runtime";
7710
+ import { jsx as jsx28 } from "react/jsx-runtime";
7939
7711
  var SPOTIFY_COLOR = "#1DB954";
7940
7712
  var SpotifyEmbed = ({
7941
7713
  url,
@@ -7966,7 +7738,7 @@ var SpotifyEmbed = ({
7966
7738
  return 352;
7967
7739
  }, [height, urlInfo.type]);
7968
7740
  if (!embedUrl) {
7969
- return /* @__PURE__ */ jsx29(
7741
+ return /* @__PURE__ */ jsx28(
7970
7742
  EmbedCard,
7971
7743
  {
7972
7744
  provider: "Spotify",
@@ -7986,7 +7758,7 @@ var SpotifyEmbed = ({
7986
7758
  );
7987
7759
  }
7988
7760
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
7989
- return /* @__PURE__ */ jsx29(
7761
+ return /* @__PURE__ */ jsx28(
7990
7762
  EmbedCard,
7991
7763
  {
7992
7764
  provider: showBranding ? "Spotify" : "",
@@ -8087,7 +7859,7 @@ function getAppleMusicEmbedUrl(url, theme = "light") {
8087
7859
  }
8088
7860
 
8089
7861
  // src/components/AppleMusicEmbed.tsx
8090
- import { jsx as jsx30 } from "react/jsx-runtime";
7862
+ import { jsx as jsx29 } from "react/jsx-runtime";
8091
7863
  var APPLE_MUSIC_COLOR = "#fa243c";
8092
7864
  var AppleMusicEmbed = ({
8093
7865
  url,
@@ -8120,7 +7892,7 @@ var AppleMusicEmbed = ({
8120
7892
  return 450;
8121
7893
  }, [height, urlInfo.type]);
8122
7894
  if (!embedUrl) {
8123
- return /* @__PURE__ */ jsx30(
7895
+ return /* @__PURE__ */ jsx29(
8124
7896
  EmbedCard,
8125
7897
  {
8126
7898
  provider: "Apple Music",
@@ -8140,7 +7912,7 @@ var AppleMusicEmbed = ({
8140
7912
  );
8141
7913
  }
8142
7914
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8143
- return /* @__PURE__ */ jsx30(
7915
+ return /* @__PURE__ */ jsx29(
8144
7916
  EmbedCard,
8145
7917
  {
8146
7918
  provider: showBranding ? "Apple Music" : "",
@@ -8230,7 +8002,7 @@ function getDeezerEmbedUrl(url, theme = "light") {
8230
8002
  }
8231
8003
 
8232
8004
  // src/components/DeezerEmbed.tsx
8233
- import { jsx as jsx31 } from "react/jsx-runtime";
8005
+ import { jsx as jsx30 } from "react/jsx-runtime";
8234
8006
  var DEEZER_COLOR = "#ef5466";
8235
8007
  var DeezerEmbed = ({
8236
8008
  url,
@@ -8262,7 +8034,7 @@ var DeezerEmbed = ({
8262
8034
  return 300;
8263
8035
  }, [height, urlInfo.type]);
8264
8036
  if (!embedUrl) {
8265
- return /* @__PURE__ */ jsx31(
8037
+ return /* @__PURE__ */ jsx30(
8266
8038
  EmbedCard,
8267
8039
  {
8268
8040
  provider: "Deezer",
@@ -8282,7 +8054,7 @@ var DeezerEmbed = ({
8282
8054
  );
8283
8055
  }
8284
8056
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8285
- return /* @__PURE__ */ jsx31(
8057
+ return /* @__PURE__ */ jsx30(
8286
8058
  EmbedCard,
8287
8059
  {
8288
8060
  provider: showBranding ? "Deezer" : "",
@@ -8372,7 +8144,7 @@ function getTidalEmbedUrl(url) {
8372
8144
  }
8373
8145
 
8374
8146
  // src/components/TidalEmbed.tsx
8375
- import { jsx as jsx32 } from "react/jsx-runtime";
8147
+ import { jsx as jsx31 } from "react/jsx-runtime";
8376
8148
  var TIDAL_COLOR = "#000000";
8377
8149
  var TidalEmbed = ({
8378
8150
  url,
@@ -8405,7 +8177,7 @@ var TidalEmbed = ({
8405
8177
  }, [height, urlInfo.type]);
8406
8178
  const mediaAspectRatio = urlInfo.type === "video" ? "16/9" : void 0;
8407
8179
  if (!embedUrl) {
8408
- return /* @__PURE__ */ jsx32(
8180
+ return /* @__PURE__ */ jsx31(
8409
8181
  EmbedCard,
8410
8182
  {
8411
8183
  provider: "Tidal",
@@ -8425,7 +8197,7 @@ var TidalEmbed = ({
8425
8197
  );
8426
8198
  }
8427
8199
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8428
- return /* @__PURE__ */ jsx32(
8200
+ return /* @__PURE__ */ jsx31(
8429
8201
  EmbedCard,
8430
8202
  {
8431
8203
  provider: showBranding ? "Tidal" : "",
@@ -8507,7 +8279,7 @@ function getSoundCloudEmbedUrl(url, options) {
8507
8279
  }
8508
8280
 
8509
8281
  // src/components/SoundCloudEmbed.tsx
8510
- import { jsx as jsx33 } from "react/jsx-runtime";
8282
+ import { jsx as jsx32 } from "react/jsx-runtime";
8511
8283
  var SOUNDCLOUD_COLOR = "#ff5500";
8512
8284
  var SoundCloudEmbed = ({
8513
8285
  url,
@@ -8542,7 +8314,7 @@ var SoundCloudEmbed = ({
8542
8314
  return 166;
8543
8315
  }, [height, urlInfo.type]);
8544
8316
  if (!embedUrl) {
8545
- return /* @__PURE__ */ jsx33(
8317
+ return /* @__PURE__ */ jsx32(
8546
8318
  EmbedCard,
8547
8319
  {
8548
8320
  provider: "SoundCloud",
@@ -8562,7 +8334,7 @@ var SoundCloudEmbed = ({
8562
8334
  );
8563
8335
  }
8564
8336
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8565
- return /* @__PURE__ */ jsx33(
8337
+ return /* @__PURE__ */ jsx32(
8566
8338
  EmbedCard,
8567
8339
  {
8568
8340
  provider: showBranding ? "SoundCloud" : "",
@@ -8653,7 +8425,7 @@ function getApplePodcastsEmbedUrl(url, theme = "light") {
8653
8425
  }
8654
8426
 
8655
8427
  // src/components/ApplePodcastsEmbed.tsx
8656
- import { jsx as jsx34 } from "react/jsx-runtime";
8428
+ import { jsx as jsx33 } from "react/jsx-runtime";
8657
8429
  var APPLE_PODCASTS_COLOR = "#a24bdc";
8658
8430
  var ApplePodcastsEmbed = ({
8659
8431
  url,
@@ -8684,7 +8456,7 @@ var ApplePodcastsEmbed = ({
8684
8456
  return 450;
8685
8457
  }, [height, urlInfo.type]);
8686
8458
  if (!embedUrl) {
8687
- return /* @__PURE__ */ jsx34(
8459
+ return /* @__PURE__ */ jsx33(
8688
8460
  EmbedCard,
8689
8461
  {
8690
8462
  provider: "Apple Podcasts",
@@ -8704,7 +8476,7 @@ var ApplePodcastsEmbed = ({
8704
8476
  );
8705
8477
  }
8706
8478
  const cardMaxWidth = constrainWidthByEmbed ? width : maxWidth;
8707
- return /* @__PURE__ */ jsx34(
8479
+ return /* @__PURE__ */ jsx33(
8708
8480
  EmbedCard,
8709
8481
  {
8710
8482
  provider: showBranding ? "Apple Podcasts" : "",
@@ -8757,7 +8529,6 @@ export {
8757
8529
  PlatformIcon,
8758
8530
  RedditEmbed,
8759
8531
  RumbleEmbed,
8760
- SnapchatEmbed,
8761
8532
  SoundCloudEmbed,
8762
8533
  SpotifyEmbed,
8763
8534
  TelegramEmbed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-social-embeds",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Unified React embeds for social media content",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",