@neowhale/storefront 0.2.55 → 0.2.57
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 +86 -8
- package/dist/react/index.cjs +86 -8
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +86 -8
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -2940,7 +2940,7 @@ function LeadCaptureSection({ section, data, theme, onEvent }) {
|
|
|
2940
2940
|
fontFamily: "inherit",
|
|
2941
2941
|
transition: "border-color 0.2s"
|
|
2942
2942
|
};
|
|
2943
|
-
if (status === "success") return /* @__PURE__ */ jsx(SuccessState, { theme, heading: serverMessage?.heading || successHeading, message: serverMessage?.message || successMessage, couponCode: c.coupon_code });
|
|
2943
|
+
if (status === "success") return /* @__PURE__ */ jsx(SuccessState, { theme, heading: serverMessage?.heading || successHeading, message: serverMessage?.message || successMessage, couponCode: c.coupon_code, ctaText: c.success_cta_text, ctaUrl: c.success_cta_url });
|
|
2944
2944
|
return /* @__PURE__ */ jsxs("div", { style: { padding: "3.5rem 1.5rem", maxWidth: 560, margin: "0 auto" }, children: [
|
|
2945
2945
|
/* @__PURE__ */ jsx("style", { children: `@keyframes lc-spin { to { transform: rotate(360deg) } }` }),
|
|
2946
2946
|
/* @__PURE__ */ jsxs("div", { style: { background: theme.surface, border: `1px solid ${theme.fg}12`, padding: "clamp(2rem, 6vw, 3rem)" }, children: [
|
|
@@ -3024,7 +3024,7 @@ function LeadCaptureSection({ section, data, theme, onEvent }) {
|
|
|
3024
3024
|
] })
|
|
3025
3025
|
] });
|
|
3026
3026
|
}
|
|
3027
|
-
function SuccessState({ theme, heading, message, couponCode }) {
|
|
3027
|
+
function SuccessState({ theme, heading, message, couponCode, ctaText, ctaUrl }) {
|
|
3028
3028
|
return /* @__PURE__ */ jsx("div", { style: { padding: "3.5rem 1.5rem", maxWidth: 560, margin: "0 auto" }, children: /* @__PURE__ */ jsxs("div", { style: { background: theme.surface, border: `1px solid ${theme.fg}12`, padding: "clamp(2rem, 6vw, 3rem)", textAlign: "center" }, children: [
|
|
3029
3029
|
/* @__PURE__ */ jsx("h2", { style: {
|
|
3030
3030
|
fontSize: "clamp(1.5rem, 5vw, 2rem)",
|
|
@@ -3046,7 +3046,30 @@ function SuccessState({ theme, heading, message, couponCode }) {
|
|
|
3046
3046
|
fontFamily: "monospace",
|
|
3047
3047
|
letterSpacing: "0.12em",
|
|
3048
3048
|
color: theme.accent
|
|
3049
|
-
}, children: couponCode })
|
|
3049
|
+
}, children: couponCode }),
|
|
3050
|
+
/* @__PURE__ */ jsx(
|
|
3051
|
+
"button",
|
|
3052
|
+
{
|
|
3053
|
+
onClick: () => {
|
|
3054
|
+
window.location.href = ctaUrl || "/shop";
|
|
3055
|
+
},
|
|
3056
|
+
style: {
|
|
3057
|
+
marginTop: "1.5rem",
|
|
3058
|
+
width: "100%",
|
|
3059
|
+
padding: "0.875rem",
|
|
3060
|
+
background: theme.accent,
|
|
3061
|
+
color: "#fff",
|
|
3062
|
+
border: "none",
|
|
3063
|
+
fontSize: "0.85rem",
|
|
3064
|
+
fontWeight: 500,
|
|
3065
|
+
cursor: "pointer",
|
|
3066
|
+
letterSpacing: "0.08em",
|
|
3067
|
+
textTransform: "uppercase",
|
|
3068
|
+
fontFamily: "inherit"
|
|
3069
|
+
},
|
|
3070
|
+
children: ctaText || "shop now"
|
|
3071
|
+
}
|
|
3072
|
+
)
|
|
3050
3073
|
] }) });
|
|
3051
3074
|
}
|
|
3052
3075
|
var GOOGLE_G_LG = '<svg width="28" height="28" viewBox="0 0 48 48"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"/><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"/><path fill="#FBBC05" d="M10.53 28.59a14.5 14.5 0 010-9.18l-7.98-6.19a24.03 24.03 0 000 21.56l7.98-6.19z"/><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"/></svg>';
|
|
@@ -3659,6 +3682,7 @@ function SectionRenderer({
|
|
|
3659
3682
|
}
|
|
3660
3683
|
})();
|
|
3661
3684
|
const sectionRef = useRef(null);
|
|
3685
|
+
const isHero = section.type === "hero" || section.type === "collage_hero";
|
|
3662
3686
|
useEffect(() => {
|
|
3663
3687
|
const el2 = sectionRef.current;
|
|
3664
3688
|
if (!el2 || typeof IntersectionObserver === "undefined") return;
|
|
@@ -3666,18 +3690,28 @@ function SectionRenderer({
|
|
|
3666
3690
|
([entry]) => {
|
|
3667
3691
|
if (entry.isIntersecting) {
|
|
3668
3692
|
onEvent?.("section_view", { section_id: section.id, section_type: section.type });
|
|
3693
|
+
el2.setAttribute("data-reveal", "visible");
|
|
3669
3694
|
obs.disconnect();
|
|
3670
3695
|
}
|
|
3671
3696
|
},
|
|
3672
|
-
{ threshold: 0.
|
|
3697
|
+
{ threshold: 0.15 }
|
|
3673
3698
|
);
|
|
3674
3699
|
obs.observe(el2);
|
|
3675
3700
|
return () => obs.disconnect();
|
|
3676
3701
|
}, [section.id, section.type, onEvent]);
|
|
3677
|
-
return /* @__PURE__ */ jsxs(
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3702
|
+
return /* @__PURE__ */ jsxs(
|
|
3703
|
+
"div",
|
|
3704
|
+
{
|
|
3705
|
+
ref: sectionRef,
|
|
3706
|
+
"data-section-id": section.id,
|
|
3707
|
+
"data-section-type": section.type,
|
|
3708
|
+
...!isHero ? { "data-reveal": "" } : {},
|
|
3709
|
+
children: [
|
|
3710
|
+
el,
|
|
3711
|
+
showCOA && data?.coa && /* @__PURE__ */ jsx(COAModal, { coa: data.coa, theme, onClose: () => setShowCOA(false) })
|
|
3712
|
+
]
|
|
3713
|
+
}
|
|
3714
|
+
);
|
|
3681
3715
|
}
|
|
3682
3716
|
function QRLandingPage({
|
|
3683
3717
|
code,
|
|
@@ -4153,6 +4187,7 @@ function PageLayout({
|
|
|
4153
4187
|
const sorted = [...lp.sections].sort((a, b) => a.order - b.order).filter((s) => isSectionVisible(s, urlParams));
|
|
4154
4188
|
const sectionData = { ...data, gatewayUrl, landing_page: { slug: lp.slug }, analyticsContext };
|
|
4155
4189
|
return /* @__PURE__ */ jsxs("div", { style: { minHeight: "100dvh", background: theme.bg, color: theme.fg, fontFamily }, children: [
|
|
4190
|
+
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: LANDING_ANIMATIONS } }),
|
|
4156
4191
|
lp.custom_css && /* @__PURE__ */ jsx("style", { children: lp.custom_css }),
|
|
4157
4192
|
logoUrl && /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsx("img", { src: logoUrl, alt: store?.name || "Store", style: { height: 40, objectFit: "contain" } }) }),
|
|
4158
4193
|
sorted.map((section) => {
|
|
@@ -4176,6 +4211,49 @@ function sendEvents(gwUrl, slug, events) {
|
|
|
4176
4211
|
});
|
|
4177
4212
|
}
|
|
4178
4213
|
}
|
|
4214
|
+
var LANDING_ANIMATIONS = `
|
|
4215
|
+
@keyframes lp-fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
|
|
4216
|
+
@keyframes lp-fadeIn{from{opacity:0}to{opacity:1}}
|
|
4217
|
+
@keyframes lp-scaleIn{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}
|
|
4218
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
4219
|
+
|
|
4220
|
+
/* Hero staggered entrance */
|
|
4221
|
+
[data-section-type="hero"] h1{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) both}
|
|
4222
|
+
[data-section-type="hero"] p{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s both}
|
|
4223
|
+
[data-section-type="hero"] button,[data-section-type="hero"] a[style*="inline-block"]{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.3s both}
|
|
4224
|
+
[data-section-type="hero"] form{animation:lp-scaleIn 0.4s cubic-bezier(0.22,1,0.36,1) both}
|
|
4225
|
+
|
|
4226
|
+
/* Scroll reveal \u2014 hidden by default, revealed by IntersectionObserver */
|
|
4227
|
+
[data-reveal]{opacity:0;transform:translateY(20px);transition:opacity 0.7s cubic-bezier(0.22,1,0.36,1),transform 0.7s cubic-bezier(0.22,1,0.36,1)}
|
|
4228
|
+
[data-reveal="visible"]{opacity:1;transform:translateY(0)}
|
|
4229
|
+
|
|
4230
|
+
/* Stagger children inside revealed sections */
|
|
4231
|
+
[data-reveal="visible"] > *{animation:lp-fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both}
|
|
4232
|
+
[data-reveal="visible"] > *:nth-child(1){animation-delay:0s}
|
|
4233
|
+
[data-reveal="visible"] > *:nth-child(2){animation-delay:0.08s}
|
|
4234
|
+
[data-reveal="visible"] > *:nth-child(3){animation-delay:0.16s}
|
|
4235
|
+
[data-reveal="visible"] > *:nth-child(4){animation-delay:0.24s}
|
|
4236
|
+
|
|
4237
|
+
/* Gallery image hover */
|
|
4238
|
+
[data-section-type="gallery"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4239
|
+
[data-section-type="gallery"] div:hover > img{transform:scale(1.03)}
|
|
4240
|
+
|
|
4241
|
+
/* Button hover effects */
|
|
4242
|
+
[data-section-type="cta"] a,[data-section-type="testimonials"] a{transition:opacity 0.3s,background 0.3s,transform 0.2s}
|
|
4243
|
+
[data-section-type="cta"] a:hover{opacity:0.88}
|
|
4244
|
+
[data-section-type="cta"] a:active{transform:scale(0.98)}
|
|
4245
|
+
|
|
4246
|
+
/* Review card hover */
|
|
4247
|
+
.rv-card > div{transition:border-color 0.4s}
|
|
4248
|
+
.rv-card:hover > div{border-color:rgba(255,255,255,0.12)!important}
|
|
4249
|
+
|
|
4250
|
+
/* Location card image hover */
|
|
4251
|
+
[data-section-type="gallery"] [style*="4/5"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4252
|
+
[data-section-type="gallery"] [style*="4/5"]:hover img{transform:scale(1.03)}
|
|
4253
|
+
|
|
4254
|
+
/* Smooth logo entrance */
|
|
4255
|
+
[style*="justify-content: center"] > img[alt]{animation:lp-fadeIn 1s cubic-bezier(0.22,1,0.36,1) both}
|
|
4256
|
+
`;
|
|
4179
4257
|
var screenStyle = {
|
|
4180
4258
|
minHeight: "100dvh",
|
|
4181
4259
|
display: "flex",
|