@neowhale/storefront 0.2.49 → 0.2.50

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.
@@ -465,7 +465,7 @@ var WhaleStorefront = (function (exports) {
465
465
 
466
466
  // src/react/components/sections/content-sections.tsx
467
467
  function HeroSection({ section, theme, tracking, onEvent }) {
468
- const { title, subtitle, background_image, cta_text, cta_url } = section.content;
468
+ const { title, subtitle, background_image, cta_text, cta_url, review_line } = section.content;
469
469
  return /* @__PURE__ */ jsx("div", { style: {
470
470
  position: "relative",
471
471
  minHeight: "60vh",
@@ -519,7 +519,27 @@ var WhaleStorefront = (function (exports) {
519
519
  },
520
520
  children: cta_text
521
521
  }
522
- )
522
+ ),
523
+ review_line && review_line.count > 0 && /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", display: "flex", alignItems: "center", justifyContent: "center", gap: "0.5rem" }, children: [
524
+ /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", gap: "1px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsx(
525
+ "svg",
526
+ {
527
+ width: 14,
528
+ height: 14,
529
+ viewBox: "0 0 20 20",
530
+ fill: s <= Math.round(review_line.rating) ? theme.accent : `${theme.fg}20`,
531
+ children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
532
+ },
533
+ s
534
+ )) }),
535
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: `${theme.fg}99`, fontWeight: 500 }, children: [
536
+ review_line.rating.toFixed(1),
537
+ " \xB7 ",
538
+ review_line.count,
539
+ " ",
540
+ review_line.source || "reviews"
541
+ ] })
542
+ ] })
523
543
  ] })
524
544
  ] });
525
545
  }
@@ -2209,7 +2209,7 @@ function AnimatedText({ text }) {
2209
2209
  ) });
2210
2210
  }
2211
2211
  function HeroSection({ section, theme, tracking, onEvent }) {
2212
- const { title, subtitle, background_image, cta_text, cta_url } = section.content;
2212
+ const { title, subtitle, background_image, cta_text, cta_url, review_line } = section.content;
2213
2213
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
2214
2214
  position: "relative",
2215
2215
  minHeight: "60vh",
@@ -2263,7 +2263,27 @@ function HeroSection({ section, theme, tracking, onEvent }) {
2263
2263
  },
2264
2264
  children: cta_text
2265
2265
  }
2266
- )
2266
+ ),
2267
+ review_line && review_line.count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "1.25rem", display: "flex", alignItems: "center", justifyContent: "center", gap: "0.5rem" }, children: [
2268
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", gap: "1px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsxRuntime.jsx(
2269
+ "svg",
2270
+ {
2271
+ width: 14,
2272
+ height: 14,
2273
+ viewBox: "0 0 20 20",
2274
+ fill: s <= Math.round(review_line.rating) ? theme.accent : `${theme.fg}20`,
2275
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
2276
+ },
2277
+ s
2278
+ )) }),
2279
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "0.8rem", color: `${theme.fg}99`, fontWeight: 500 }, children: [
2280
+ review_line.rating.toFixed(1),
2281
+ " \xB7 ",
2282
+ review_line.count,
2283
+ " ",
2284
+ review_line.source || "reviews"
2285
+ ] })
2286
+ ] })
2267
2287
  ] })
2268
2288
  ] });
2269
2289
  }