@neowhale/storefront 0.2.51 → 0.2.53
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 +30 -16
- 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
|
@@ -380,10 +380,15 @@ var WhaleStorefront = (function (exports) {
|
|
|
380
380
|
// src/shims/jsx-runtime-global.ts
|
|
381
381
|
var R2 = globalThis.React;
|
|
382
382
|
function jsx(type, props, key) {
|
|
383
|
+
if (props == null) props = {};
|
|
383
384
|
const { children, ...rest } = props;
|
|
384
385
|
if (key !== void 0) rest.key = key;
|
|
385
|
-
if (children === void 0
|
|
386
|
-
|
|
386
|
+
if (children === void 0 || children === null) {
|
|
387
|
+
return R2.createElement(type, rest);
|
|
388
|
+
}
|
|
389
|
+
if (Array.isArray(children)) {
|
|
390
|
+
return R2.createElement.apply(null, [type, rest].concat(children));
|
|
391
|
+
}
|
|
387
392
|
return R2.createElement(type, rest, children);
|
|
388
393
|
}
|
|
389
394
|
var Fragment2 = R2.Fragment;
|
|
@@ -520,20 +525,7 @@ var WhaleStorefront = (function (exports) {
|
|
|
520
525
|
children: cta_text
|
|
521
526
|
}
|
|
522
527
|
),
|
|
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
|
-
] })
|
|
528
|
+
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
529
|
] })
|
|
538
530
|
] });
|
|
539
531
|
}
|
|
@@ -686,6 +678,28 @@ var WhaleStorefront = (function (exports) {
|
|
|
686
678
|
if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
|
|
687
679
|
return url;
|
|
688
680
|
}
|
|
681
|
+
function ReviewLine({ rating, count, source, url, accent, fg }) {
|
|
682
|
+
const label = `${rating.toFixed(1)} \xB7 ${count} ${source || "reviews"}`;
|
|
683
|
+
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)) });
|
|
684
|
+
const text = /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: `${fg}80`, fontWeight: 500 }, children: label });
|
|
685
|
+
const inner = /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
686
|
+
stars,
|
|
687
|
+
text
|
|
688
|
+
] });
|
|
689
|
+
if (url) {
|
|
690
|
+
return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", textAlign: "center" }, children: /* @__PURE__ */ jsx(
|
|
691
|
+
"a",
|
|
692
|
+
{
|
|
693
|
+
href: url,
|
|
694
|
+
target: "_blank",
|
|
695
|
+
rel: "noopener noreferrer",
|
|
696
|
+
style: { textDecoration: "none", display: "inline-flex", alignItems: "center", gap: "0.5rem" },
|
|
697
|
+
children: inner
|
|
698
|
+
}
|
|
699
|
+
) });
|
|
700
|
+
}
|
|
701
|
+
return /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", display: "flex", justifyContent: "center" }, children: inner });
|
|
702
|
+
}
|
|
689
703
|
|
|
690
704
|
// src/react/components/sections/interactive-sections.tsx
|
|
691
705
|
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;
|