@neowhale/storefront 0.2.50 → 0.2.52

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.
@@ -520,26 +520,7 @@ var WhaleStorefront = (function (exports) {
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
+ review_line && review_line.count > 0 && /* @__PURE__ */ jsx(ReviewLine, { rating: review_line.rating, count: review_line.count, source: review_line.source, url: review_line.url, accent: theme.accent, fg: theme.fg })
543
524
  ] })
544
525
  ] });
545
526
  }
@@ -692,6 +673,28 @@ var WhaleStorefront = (function (exports) {
692
673
  if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
693
674
  return url;
694
675
  }
676
+ function ReviewLine({ rating, count, source, url, accent, fg }) {
677
+ const label = `${rating.toFixed(1)} \xB7 ${count} ${source || "reviews"}`;
678
+ const stars = /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", gap: "1px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", fill: s <= Math.round(rating) ? accent : `${fg}20`, 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" }) }, s)) });
679
+ const text = /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: `${fg}80`, fontWeight: 500 }, children: label });
680
+ const inner = /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.5rem" }, children: [
681
+ stars,
682
+ text
683
+ ] });
684
+ if (url) {
685
+ return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", textAlign: "center" }, children: /* @__PURE__ */ jsx(
686
+ "a",
687
+ {
688
+ href: url,
689
+ target: "_blank",
690
+ rel: "noopener noreferrer",
691
+ style: { textDecoration: "none", display: "inline-flex", alignItems: "center", gap: "0.5rem" },
692
+ children: inner
693
+ }
694
+ ) });
695
+ }
696
+ return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", display: "flex", justifyContent: "center" }, children: inner });
697
+ }
695
698
 
696
699
  // src/react/components/sections/interactive-sections.tsx
697
700
  function CTASection({ section, theme, tracking, onEvent }) {
@@ -2264,26 +2264,7 @@ function HeroSection({ section, theme, tracking, onEvent }) {
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
+ review_line && review_line.count > 0 && /* @__PURE__ */ jsxRuntime.jsx(ReviewLine, { rating: review_line.rating, count: review_line.count, source: review_line.source, url: review_line.url, accent: theme.accent, fg: theme.fg })
2287
2268
  ] })
2288
2269
  ] });
2289
2270
  }
@@ -2436,6 +2417,28 @@ function toEmbedUrl(url) {
2436
2417
  if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
2437
2418
  return url;
2438
2419
  }
2420
+ function ReviewLine({ rating, count, source, url, accent, fg }) {
2421
+ const label = `${rating.toFixed(1)} \xB7 ${count} ${source || "reviews"}`;
2422
+ const stars = /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", gap: "1px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, viewBox: "0 0 20 20", fill: s <= Math.round(rating) ? accent : `${fg}20`, 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" }) }, s)) });
2423
+ const text = /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.8rem", color: `${fg}80`, fontWeight: 500 }, children: label });
2424
+ const inner = /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.5rem" }, children: [
2425
+ stars,
2426
+ text
2427
+ ] });
2428
+ if (url) {
2429
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: "1.25rem", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2430
+ "a",
2431
+ {
2432
+ href: url,
2433
+ target: "_blank",
2434
+ rel: "noopener noreferrer",
2435
+ style: { textDecoration: "none", display: "inline-flex", alignItems: "center", gap: "0.5rem" },
2436
+ children: inner
2437
+ }
2438
+ ) });
2439
+ }
2440
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: "1.25rem", display: "flex", justifyContent: "center" }, children: inner });
2441
+ }
2439
2442
  function CTASection({ section, theme, tracking, onEvent }) {
2440
2443
  const { title, subtitle, buttons } = section.content;
2441
2444
  if (!buttons || buttons.length === 0) return null;