@neowhale/storefront 0.2.55 → 0.2.56
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 +60 -5
- package/dist/react/index.cjs +60 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +60 -5
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -3659,6 +3659,7 @@ function SectionRenderer({
|
|
|
3659
3659
|
}
|
|
3660
3660
|
})();
|
|
3661
3661
|
const sectionRef = useRef(null);
|
|
3662
|
+
const isHero = section.type === "hero" || section.type === "collage_hero";
|
|
3662
3663
|
useEffect(() => {
|
|
3663
3664
|
const el2 = sectionRef.current;
|
|
3664
3665
|
if (!el2 || typeof IntersectionObserver === "undefined") return;
|
|
@@ -3666,18 +3667,28 @@ function SectionRenderer({
|
|
|
3666
3667
|
([entry]) => {
|
|
3667
3668
|
if (entry.isIntersecting) {
|
|
3668
3669
|
onEvent?.("section_view", { section_id: section.id, section_type: section.type });
|
|
3670
|
+
el2.setAttribute("data-reveal", "visible");
|
|
3669
3671
|
obs.disconnect();
|
|
3670
3672
|
}
|
|
3671
3673
|
},
|
|
3672
|
-
{ threshold: 0.
|
|
3674
|
+
{ threshold: 0.15 }
|
|
3673
3675
|
);
|
|
3674
3676
|
obs.observe(el2);
|
|
3675
3677
|
return () => obs.disconnect();
|
|
3676
3678
|
}, [section.id, section.type, onEvent]);
|
|
3677
|
-
return /* @__PURE__ */ jsxs(
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3679
|
+
return /* @__PURE__ */ jsxs(
|
|
3680
|
+
"div",
|
|
3681
|
+
{
|
|
3682
|
+
ref: sectionRef,
|
|
3683
|
+
"data-section-id": section.id,
|
|
3684
|
+
"data-section-type": section.type,
|
|
3685
|
+
...!isHero ? { "data-reveal": "" } : {},
|
|
3686
|
+
children: [
|
|
3687
|
+
el,
|
|
3688
|
+
showCOA && data?.coa && /* @__PURE__ */ jsx(COAModal, { coa: data.coa, theme, onClose: () => setShowCOA(false) })
|
|
3689
|
+
]
|
|
3690
|
+
}
|
|
3691
|
+
);
|
|
3681
3692
|
}
|
|
3682
3693
|
function QRLandingPage({
|
|
3683
3694
|
code,
|
|
@@ -4153,6 +4164,7 @@ function PageLayout({
|
|
|
4153
4164
|
const sorted = [...lp.sections].sort((a, b) => a.order - b.order).filter((s) => isSectionVisible(s, urlParams));
|
|
4154
4165
|
const sectionData = { ...data, gatewayUrl, landing_page: { slug: lp.slug }, analyticsContext };
|
|
4155
4166
|
return /* @__PURE__ */ jsxs("div", { style: { minHeight: "100dvh", background: theme.bg, color: theme.fg, fontFamily }, children: [
|
|
4167
|
+
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: LANDING_ANIMATIONS } }),
|
|
4156
4168
|
lp.custom_css && /* @__PURE__ */ jsx("style", { children: lp.custom_css }),
|
|
4157
4169
|
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
4170
|
sorted.map((section) => {
|
|
@@ -4176,6 +4188,49 @@ function sendEvents(gwUrl, slug, events) {
|
|
|
4176
4188
|
});
|
|
4177
4189
|
}
|
|
4178
4190
|
}
|
|
4191
|
+
var LANDING_ANIMATIONS = `
|
|
4192
|
+
@keyframes lp-fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
|
|
4193
|
+
@keyframes lp-fadeIn{from{opacity:0}to{opacity:1}}
|
|
4194
|
+
@keyframes lp-scaleIn{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}
|
|
4195
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
4196
|
+
|
|
4197
|
+
/* Hero staggered entrance */
|
|
4198
|
+
[data-section-type="hero"] h1{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) both}
|
|
4199
|
+
[data-section-type="hero"] p{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s both}
|
|
4200
|
+
[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}
|
|
4201
|
+
[data-section-type="hero"] form{animation:lp-scaleIn 0.4s cubic-bezier(0.22,1,0.36,1) both}
|
|
4202
|
+
|
|
4203
|
+
/* Scroll reveal \u2014 hidden by default, revealed by IntersectionObserver */
|
|
4204
|
+
[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)}
|
|
4205
|
+
[data-reveal="visible"]{opacity:1;transform:translateY(0)}
|
|
4206
|
+
|
|
4207
|
+
/* Stagger children inside revealed sections */
|
|
4208
|
+
[data-reveal="visible"] > *{animation:lp-fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both}
|
|
4209
|
+
[data-reveal="visible"] > *:nth-child(1){animation-delay:0s}
|
|
4210
|
+
[data-reveal="visible"] > *:nth-child(2){animation-delay:0.08s}
|
|
4211
|
+
[data-reveal="visible"] > *:nth-child(3){animation-delay:0.16s}
|
|
4212
|
+
[data-reveal="visible"] > *:nth-child(4){animation-delay:0.24s}
|
|
4213
|
+
|
|
4214
|
+
/* Gallery image hover */
|
|
4215
|
+
[data-section-type="gallery"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4216
|
+
[data-section-type="gallery"] div:hover > img{transform:scale(1.03)}
|
|
4217
|
+
|
|
4218
|
+
/* Button hover effects */
|
|
4219
|
+
[data-section-type="cta"] a,[data-section-type="testimonials"] a{transition:opacity 0.3s,background 0.3s,transform 0.2s}
|
|
4220
|
+
[data-section-type="cta"] a:hover{opacity:0.88}
|
|
4221
|
+
[data-section-type="cta"] a:active{transform:scale(0.98)}
|
|
4222
|
+
|
|
4223
|
+
/* Review card hover */
|
|
4224
|
+
.rv-card > div{transition:border-color 0.4s}
|
|
4225
|
+
.rv-card:hover > div{border-color:rgba(255,255,255,0.12)!important}
|
|
4226
|
+
|
|
4227
|
+
/* Location card image hover */
|
|
4228
|
+
[data-section-type="gallery"] [style*="4/5"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4229
|
+
[data-section-type="gallery"] [style*="4/5"]:hover img{transform:scale(1.03)}
|
|
4230
|
+
|
|
4231
|
+
/* Smooth logo entrance */
|
|
4232
|
+
[style*="justify-content: center"] > img[alt]{animation:lp-fadeIn 1s cubic-bezier(0.22,1,0.36,1) both}
|
|
4233
|
+
`;
|
|
4179
4234
|
var screenStyle = {
|
|
4180
4235
|
minHeight: "100dvh",
|
|
4181
4236
|
display: "flex",
|