@misiki/gocommerce-connector 0.30.0 → 0.31.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.
@@ -201,6 +201,8 @@ type Product = {
201
201
  seo_description: string;
202
202
  image_url?: string;
203
203
  media_count?: number;
204
+ /** The picture after the lead, which a listing card shows on hover. */
205
+ hover_image_url?: string;
204
206
  /** The gallery, pictures and videos in order: on the public product only (D134). */
205
207
  media?: VariantImage[];
206
208
  /** The sold count rounded down; absent unless the shop shows counts and it passed the threshold (D134). */
@@ -201,6 +201,8 @@ type Product = {
201
201
  seo_description: string;
202
202
  image_url?: string;
203
203
  media_count?: number;
204
+ /** The picture after the lead, which a listing card shows on hover. */
205
+ hover_image_url?: string;
204
206
  /** The gallery, pictures and videos in order: on the public product only (D134). */
205
207
  media?: VariantImage[];
206
208
  /** The sold count rounded down; absent unless the shop shows counts and it passed the threshold (D134). */
package/dist/index.cjs CHANGED
@@ -561,6 +561,7 @@ function productImages(p) {
561
561
  if (url && !out.includes(url)) out.push(url);
562
562
  };
563
563
  push(mediaUrl(p.image_url));
564
+ push(mediaUrl(p.hover_image_url));
564
565
  for (const m of arr(p.media)) if (m.kind === "image") push(mediaUrl(m.url));
565
566
  for (const v of arr(p.variants)) for (const url of variantImages(v)) push(url);
566
567
  return out;