@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/landing.global.js
CHANGED
|
@@ -1930,6 +1930,7 @@ var WhaleStorefront = (function (exports) {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
})();
|
|
1932
1932
|
const sectionRef = useRef(null);
|
|
1933
|
+
const isHero = section.type === "hero" || section.type === "collage_hero";
|
|
1933
1934
|
useEffect(() => {
|
|
1934
1935
|
const el2 = sectionRef.current;
|
|
1935
1936
|
if (!el2 || typeof IntersectionObserver === "undefined") return;
|
|
@@ -1937,18 +1938,28 @@ var WhaleStorefront = (function (exports) {
|
|
|
1937
1938
|
([entry]) => {
|
|
1938
1939
|
if (entry.isIntersecting) {
|
|
1939
1940
|
onEvent?.("section_view", { section_id: section.id, section_type: section.type });
|
|
1941
|
+
el2.setAttribute("data-reveal", "visible");
|
|
1940
1942
|
obs.disconnect();
|
|
1941
1943
|
}
|
|
1942
1944
|
},
|
|
1943
|
-
{ threshold: 0.
|
|
1945
|
+
{ threshold: 0.15 }
|
|
1944
1946
|
);
|
|
1945
1947
|
obs.observe(el2);
|
|
1946
1948
|
return () => obs.disconnect();
|
|
1947
1949
|
}, [section.id, section.type, onEvent]);
|
|
1948
|
-
return /* @__PURE__ */ jsx(
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1950
|
+
return /* @__PURE__ */ jsx(
|
|
1951
|
+
"div",
|
|
1952
|
+
{
|
|
1953
|
+
ref: sectionRef,
|
|
1954
|
+
"data-section-id": section.id,
|
|
1955
|
+
"data-section-type": section.type,
|
|
1956
|
+
...!isHero ? { "data-reveal": "" } : {},
|
|
1957
|
+
children: [
|
|
1958
|
+
el,
|
|
1959
|
+
showCOA && data?.coa && /* @__PURE__ */ jsx(COAModal, { coa: data.coa, theme, onClose: () => setShowCOA(false) })
|
|
1960
|
+
]
|
|
1961
|
+
}
|
|
1962
|
+
);
|
|
1952
1963
|
}
|
|
1953
1964
|
|
|
1954
1965
|
// src/react/components/landing-page.tsx
|
|
@@ -2128,6 +2139,7 @@ var WhaleStorefront = (function (exports) {
|
|
|
2128
2139
|
const sorted = [...lp.sections].sort((a, b) => a.order - b.order).filter((s) => isSectionVisible(s, urlParams));
|
|
2129
2140
|
const sectionData = { ...data, gatewayUrl, landing_page: { slug: lp.slug }, analyticsContext };
|
|
2130
2141
|
return /* @__PURE__ */ jsx("div", { style: { minHeight: "100dvh", background: theme.bg, color: theme.fg, fontFamily }, children: [
|
|
2142
|
+
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: LANDING_ANIMATIONS } }),
|
|
2131
2143
|
lp.custom_css && /* @__PURE__ */ jsx("style", { children: lp.custom_css }),
|
|
2132
2144
|
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" } }) }),
|
|
2133
2145
|
sorted.map((section) => {
|
|
@@ -2151,6 +2163,49 @@ var WhaleStorefront = (function (exports) {
|
|
|
2151
2163
|
});
|
|
2152
2164
|
}
|
|
2153
2165
|
}
|
|
2166
|
+
var LANDING_ANIMATIONS = `
|
|
2167
|
+
@keyframes lp-fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
|
|
2168
|
+
@keyframes lp-fadeIn{from{opacity:0}to{opacity:1}}
|
|
2169
|
+
@keyframes lp-scaleIn{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}
|
|
2170
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
2171
|
+
|
|
2172
|
+
/* Hero staggered entrance */
|
|
2173
|
+
[data-section-type="hero"] h1{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) both}
|
|
2174
|
+
[data-section-type="hero"] p{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s both}
|
|
2175
|
+
[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}
|
|
2176
|
+
[data-section-type="hero"] form{animation:lp-scaleIn 0.4s cubic-bezier(0.22,1,0.36,1) both}
|
|
2177
|
+
|
|
2178
|
+
/* Scroll reveal \u2014 hidden by default, revealed by IntersectionObserver */
|
|
2179
|
+
[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)}
|
|
2180
|
+
[data-reveal="visible"]{opacity:1;transform:translateY(0)}
|
|
2181
|
+
|
|
2182
|
+
/* Stagger children inside revealed sections */
|
|
2183
|
+
[data-reveal="visible"] > *{animation:lp-fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both}
|
|
2184
|
+
[data-reveal="visible"] > *:nth-child(1){animation-delay:0s}
|
|
2185
|
+
[data-reveal="visible"] > *:nth-child(2){animation-delay:0.08s}
|
|
2186
|
+
[data-reveal="visible"] > *:nth-child(3){animation-delay:0.16s}
|
|
2187
|
+
[data-reveal="visible"] > *:nth-child(4){animation-delay:0.24s}
|
|
2188
|
+
|
|
2189
|
+
/* Gallery image hover */
|
|
2190
|
+
[data-section-type="gallery"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
2191
|
+
[data-section-type="gallery"] div:hover > img{transform:scale(1.03)}
|
|
2192
|
+
|
|
2193
|
+
/* Button hover effects */
|
|
2194
|
+
[data-section-type="cta"] a,[data-section-type="testimonials"] a{transition:opacity 0.3s,background 0.3s,transform 0.2s}
|
|
2195
|
+
[data-section-type="cta"] a:hover{opacity:0.88}
|
|
2196
|
+
[data-section-type="cta"] a:active{transform:scale(0.98)}
|
|
2197
|
+
|
|
2198
|
+
/* Review card hover */
|
|
2199
|
+
.rv-card > div{transition:border-color 0.4s}
|
|
2200
|
+
.rv-card:hover > div{border-color:rgba(255,255,255,0.12)!important}
|
|
2201
|
+
|
|
2202
|
+
/* Location card image hover */
|
|
2203
|
+
[data-section-type="gallery"] [style*="4/5"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
2204
|
+
[data-section-type="gallery"] [style*="4/5"]:hover img{transform:scale(1.03)}
|
|
2205
|
+
|
|
2206
|
+
/* Smooth logo entrance */
|
|
2207
|
+
[style*="justify-content: center"] > img[alt]{animation:lp-fadeIn 1s cubic-bezier(0.22,1,0.36,1) both}
|
|
2208
|
+
`;
|
|
2154
2209
|
var screenStyle = {
|
|
2155
2210
|
minHeight: "100dvh",
|
|
2156
2211
|
display: "flex",
|
package/dist/react/index.cjs
CHANGED
|
@@ -3661,6 +3661,7 @@ function SectionRenderer({
|
|
|
3661
3661
|
}
|
|
3662
3662
|
})();
|
|
3663
3663
|
const sectionRef = react.useRef(null);
|
|
3664
|
+
const isHero = section.type === "hero" || section.type === "collage_hero";
|
|
3664
3665
|
react.useEffect(() => {
|
|
3665
3666
|
const el2 = sectionRef.current;
|
|
3666
3667
|
if (!el2 || typeof IntersectionObserver === "undefined") return;
|
|
@@ -3668,18 +3669,28 @@ function SectionRenderer({
|
|
|
3668
3669
|
([entry]) => {
|
|
3669
3670
|
if (entry.isIntersecting) {
|
|
3670
3671
|
onEvent?.("section_view", { section_id: section.id, section_type: section.type });
|
|
3672
|
+
el2.setAttribute("data-reveal", "visible");
|
|
3671
3673
|
obs.disconnect();
|
|
3672
3674
|
}
|
|
3673
3675
|
},
|
|
3674
|
-
{ threshold: 0.
|
|
3676
|
+
{ threshold: 0.15 }
|
|
3675
3677
|
);
|
|
3676
3678
|
obs.observe(el2);
|
|
3677
3679
|
return () => obs.disconnect();
|
|
3678
3680
|
}, [section.id, section.type, onEvent]);
|
|
3679
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3681
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3682
|
+
"div",
|
|
3683
|
+
{
|
|
3684
|
+
ref: sectionRef,
|
|
3685
|
+
"data-section-id": section.id,
|
|
3686
|
+
"data-section-type": section.type,
|
|
3687
|
+
...!isHero ? { "data-reveal": "" } : {},
|
|
3688
|
+
children: [
|
|
3689
|
+
el,
|
|
3690
|
+
showCOA && data?.coa && /* @__PURE__ */ jsxRuntime.jsx(COAModal, { coa: data.coa, theme, onClose: () => setShowCOA(false) })
|
|
3691
|
+
]
|
|
3692
|
+
}
|
|
3693
|
+
);
|
|
3683
3694
|
}
|
|
3684
3695
|
function QRLandingPage({
|
|
3685
3696
|
code,
|
|
@@ -4155,6 +4166,7 @@ function PageLayout({
|
|
|
4155
4166
|
const sorted = [...lp.sections].sort((a, b) => a.order - b.order).filter((s) => isSectionVisible(s, urlParams));
|
|
4156
4167
|
const sectionData = { ...data, gatewayUrl, landing_page: { slug: lp.slug }, analyticsContext };
|
|
4157
4168
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minHeight: "100dvh", background: theme.bg, color: theme.fg, fontFamily }, children: [
|
|
4169
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: LANDING_ANIMATIONS } }),
|
|
4158
4170
|
lp.custom_css && /* @__PURE__ */ jsxRuntime.jsx("style", { children: lp.custom_css }),
|
|
4159
4171
|
logoUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "1.5rem", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: store?.name || "Store", style: { height: 40, objectFit: "contain" } }) }),
|
|
4160
4172
|
sorted.map((section) => {
|
|
@@ -4178,6 +4190,49 @@ function sendEvents(gwUrl, slug, events) {
|
|
|
4178
4190
|
});
|
|
4179
4191
|
}
|
|
4180
4192
|
}
|
|
4193
|
+
var LANDING_ANIMATIONS = `
|
|
4194
|
+
@keyframes lp-fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
|
|
4195
|
+
@keyframes lp-fadeIn{from{opacity:0}to{opacity:1}}
|
|
4196
|
+
@keyframes lp-scaleIn{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}
|
|
4197
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
4198
|
+
|
|
4199
|
+
/* Hero staggered entrance */
|
|
4200
|
+
[data-section-type="hero"] h1{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) both}
|
|
4201
|
+
[data-section-type="hero"] p{animation:lp-fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s both}
|
|
4202
|
+
[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}
|
|
4203
|
+
[data-section-type="hero"] form{animation:lp-scaleIn 0.4s cubic-bezier(0.22,1,0.36,1) both}
|
|
4204
|
+
|
|
4205
|
+
/* Scroll reveal \u2014 hidden by default, revealed by IntersectionObserver */
|
|
4206
|
+
[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)}
|
|
4207
|
+
[data-reveal="visible"]{opacity:1;transform:translateY(0)}
|
|
4208
|
+
|
|
4209
|
+
/* Stagger children inside revealed sections */
|
|
4210
|
+
[data-reveal="visible"] > *{animation:lp-fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both}
|
|
4211
|
+
[data-reveal="visible"] > *:nth-child(1){animation-delay:0s}
|
|
4212
|
+
[data-reveal="visible"] > *:nth-child(2){animation-delay:0.08s}
|
|
4213
|
+
[data-reveal="visible"] > *:nth-child(3){animation-delay:0.16s}
|
|
4214
|
+
[data-reveal="visible"] > *:nth-child(4){animation-delay:0.24s}
|
|
4215
|
+
|
|
4216
|
+
/* Gallery image hover */
|
|
4217
|
+
[data-section-type="gallery"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4218
|
+
[data-section-type="gallery"] div:hover > img{transform:scale(1.03)}
|
|
4219
|
+
|
|
4220
|
+
/* Button hover effects */
|
|
4221
|
+
[data-section-type="cta"] a,[data-section-type="testimonials"] a{transition:opacity 0.3s,background 0.3s,transform 0.2s}
|
|
4222
|
+
[data-section-type="cta"] a:hover{opacity:0.88}
|
|
4223
|
+
[data-section-type="cta"] a:active{transform:scale(0.98)}
|
|
4224
|
+
|
|
4225
|
+
/* Review card hover */
|
|
4226
|
+
.rv-card > div{transition:border-color 0.4s}
|
|
4227
|
+
.rv-card:hover > div{border-color:rgba(255,255,255,0.12)!important}
|
|
4228
|
+
|
|
4229
|
+
/* Location card image hover */
|
|
4230
|
+
[data-section-type="gallery"] [style*="4/5"] img{transition:transform 1.2s cubic-bezier(0.22,1,0.36,1)}
|
|
4231
|
+
[data-section-type="gallery"] [style*="4/5"]:hover img{transform:scale(1.03)}
|
|
4232
|
+
|
|
4233
|
+
/* Smooth logo entrance */
|
|
4234
|
+
[style*="justify-content: center"] > img[alt]{animation:lp-fadeIn 1s cubic-bezier(0.22,1,0.36,1) both}
|
|
4235
|
+
`;
|
|
4181
4236
|
var screenStyle = {
|
|
4182
4237
|
minHeight: "100dvh",
|
|
4183
4238
|
display: "flex",
|