@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/landing.global.js
CHANGED
|
@@ -520,20 +520,7 @@ var WhaleStorefront = (function (exports) {
|
|
|
520
520
|
children: cta_text
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
|
-
review_line && review_line.count > 0 && /* @__PURE__ */ jsx(
|
|
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: `${review_line.rating.toFixed(1)} \xB7 ${review_line.count} ${review_line.source || "reviews"}` })
|
|
536
|
-
] })
|
|
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 })
|
|
537
524
|
] })
|
|
538
525
|
] });
|
|
539
526
|
}
|
|
@@ -686,6 +673,28 @@ var WhaleStorefront = (function (exports) {
|
|
|
686
673
|
if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
|
|
687
674
|
return url;
|
|
688
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
|
+
}
|
|
689
698
|
|
|
690
699
|
// src/react/components/sections/interactive-sections.tsx
|
|
691
700
|
function CTASection({ section, theme, tracking, onEvent }) {
|
package/dist/react/index.cjs
CHANGED
|
@@ -2264,20 +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.
|
|
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.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"}` })
|
|
2280
|
-
] })
|
|
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 })
|
|
2281
2268
|
] })
|
|
2282
2269
|
] });
|
|
2283
2270
|
}
|
|
@@ -2430,6 +2417,28 @@ function toEmbedUrl(url) {
|
|
|
2430
2417
|
if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
|
|
2431
2418
|
return url;
|
|
2432
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
|
+
}
|
|
2433
2442
|
function CTASection({ section, theme, tracking, onEvent }) {
|
|
2434
2443
|
const { title, subtitle, buttons } = section.content;
|
|
2435
2444
|
if (!buttons || buttons.length === 0) return null;
|