@automattic/social-previews 3.0.12 → 3.1.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 CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.1.0] - 2026-03-23
9
+ ### Added
10
+ - Google Search Preview: Add optional siteIcon prop to allow passing a custom favicon URL. [#47551]
11
+
12
+ ### Changed
13
+ - Update package dependencies. [#47684]
14
+
8
15
  ## [3.0.12] - 2026-03-16
9
16
  ### Changed
10
17
  - Update dependencies. [#47472]
@@ -144,6 +151,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
144
151
 
145
152
  - Initial release after extracting from Calypso.
146
153
 
154
+ [3.1.0]: https://github.com/Automattic/social-previews/compare/v3.0.12...v3.1.0
147
155
  [3.0.12]: https://github.com/Automattic/social-previews/compare/v3.0.11...v3.0.12
148
156
  [3.0.11]: https://github.com/Automattic/social-previews/compare/v3.0.10...v3.0.11
149
157
  [3.0.10]: https://github.com/Automattic/social-previews/compare/v3.0.9...v3.0.10
package/dist/index.d.mts CHANGED
@@ -63,6 +63,7 @@ type MediaItem = {
63
63
  };
64
64
 
65
65
  type GoogleSearchPreviewProps = Omit<SocialPreviewBaseProps, 'image'> & {
66
+ siteIcon?: string;
66
67
  siteTitle?: string;
67
68
  };
68
69
  declare const GoogleSearchPreview: React.FC<Partial<GoogleSearchPreviewProps>>;
package/dist/index.d.ts CHANGED
@@ -63,6 +63,7 @@ type MediaItem = {
63
63
  };
64
64
 
65
65
  type GoogleSearchPreviewProps = Omit<SocialPreviewBaseProps, 'image'> & {
66
+ siteIcon?: string;
66
67
  siteTitle?: string;
67
68
  };
68
69
  declare const GoogleSearchPreview: React.FC<Partial<GoogleSearchPreviewProps>>;
package/dist/index.js CHANGED
@@ -124,6 +124,7 @@ var googleDescription = firstValid(
124
124
  );
125
125
  var GoogleSearchPreview = ({
126
126
  description = "",
127
+ siteIcon,
127
128
  siteTitle,
128
129
  title = "",
129
130
  url = ""
@@ -136,7 +137,7 @@ var GoogleSearchPreview = ({
136
137
  "img",
137
138
  {
138
139
  className: "search-preview__icon",
139
- src: `https://www.google.com/s2/favicons?sz=128&domain_url=${domain}`,
140
+ src: siteIcon || `https://www.google.com/s2/favicons?sz=128&domain_url=${domain}`,
140
141
  alt: ""
141
142
  }
142
143
  ),