@neowhale/storefront 0.2.51 → 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.
- package/dist/landing.global.js +23 -14
- package/dist/react/index.cjs +23 -14
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +23 -14
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -2262,20 +2262,7 @@ function HeroSection({ section, theme, tracking, onEvent }) {
|
|
|
2262
2262
|
children: cta_text
|
|
2263
2263
|
}
|
|
2264
2264
|
),
|
|
2265
|
-
review_line && review_line.count > 0 && /* @__PURE__ */
|
|
2266
|
-
/* @__PURE__ */ jsx("span", { style: { display: "inline-flex", gap: "1px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsx(
|
|
2267
|
-
"svg",
|
|
2268
|
-
{
|
|
2269
|
-
width: 14,
|
|
2270
|
-
height: 14,
|
|
2271
|
-
viewBox: "0 0 20 20",
|
|
2272
|
-
fill: s <= Math.round(review_line.rating) ? theme.accent : `${theme.fg}20`,
|
|
2273
|
-
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" })
|
|
2274
|
-
},
|
|
2275
|
-
s
|
|
2276
|
-
)) }),
|
|
2277
|
-
/* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: `${theme.fg}99`, fontWeight: 500 }, children: `${review_line.rating.toFixed(1)} \xB7 ${review_line.count} ${review_line.source || "reviews"}` })
|
|
2278
|
-
] })
|
|
2265
|
+
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 })
|
|
2279
2266
|
] })
|
|
2280
2267
|
] });
|
|
2281
2268
|
}
|
|
@@ -2428,6 +2415,28 @@ function toEmbedUrl(url) {
|
|
|
2428
2415
|
if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
|
|
2429
2416
|
return url;
|
|
2430
2417
|
}
|
|
2418
|
+
function ReviewLine({ rating, count, source, url, accent, fg }) {
|
|
2419
|
+
const label = `${rating.toFixed(1)} \xB7 ${count} ${source || "reviews"}`;
|
|
2420
|
+
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)) });
|
|
2421
|
+
const text = /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: `${fg}80`, fontWeight: 500 }, children: label });
|
|
2422
|
+
const inner = /* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
2423
|
+
stars,
|
|
2424
|
+
text
|
|
2425
|
+
] });
|
|
2426
|
+
if (url) {
|
|
2427
|
+
return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", textAlign: "center" }, children: /* @__PURE__ */ jsx(
|
|
2428
|
+
"a",
|
|
2429
|
+
{
|
|
2430
|
+
href: url,
|
|
2431
|
+
target: "_blank",
|
|
2432
|
+
rel: "noopener noreferrer",
|
|
2433
|
+
style: { textDecoration: "none", display: "inline-flex", alignItems: "center", gap: "0.5rem" },
|
|
2434
|
+
children: inner
|
|
2435
|
+
}
|
|
2436
|
+
) });
|
|
2437
|
+
}
|
|
2438
|
+
return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", display: "flex", justifyContent: "center" }, children: inner });
|
|
2439
|
+
}
|
|
2431
2440
|
function CTASection({ section, theme, tracking, onEvent }) {
|
|
2432
2441
|
const { title, subtitle, buttons } = section.content;
|
|
2433
2442
|
if (!buttons || buttons.length === 0) return null;
|