@neowhale/storefront 0.2.40 → 0.2.41
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 +64 -0
- package/dist/react/index.cjs +64 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +64 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/client-CUKv5fMM.d.cts +0 -669
- package/dist/client-CUKv5fMM.d.ts +0 -669
- package/dist/index.d.cts +0 -16
- package/dist/index.d.ts +0 -16
- package/dist/next/index.d.cts +0 -117
- package/dist/next/index.d.ts +0 -117
- package/dist/pixel-manager-DsrUxlIB.d.ts +0 -10
- package/dist/pixel-manager-oZStK6GU.d.cts +0 -10
- package/dist/react/index.d.cts +0 -536
- package/dist/react/index.d.ts +0 -536
package/dist/react/index.js
CHANGED
|
@@ -2295,6 +2295,68 @@ function VideoSection({ section, theme }) {
|
|
|
2295
2295
|
const isEmbed = url.includes("youtube") || url.includes("youtu.be") || url.includes("vimeo");
|
|
2296
2296
|
return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 640, margin: "0 auto" }, children: isEmbed ? /* @__PURE__ */ jsx("div", { style: { position: "relative", paddingBottom: "56.25%", height: 0 }, children: /* @__PURE__ */ jsx("iframe", { src: toEmbedUrl(url), style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", border: "none" }, allow: "autoplay; fullscreen", title: "Video" }) }) : /* @__PURE__ */ jsx("video", { src: url, poster, controls: true, style: { width: "100%", display: "block", background: theme.surface } }) });
|
|
2297
2297
|
}
|
|
2298
|
+
function CollageHeroSection({ section, theme, tracking, onEvent }) {
|
|
2299
|
+
const c = section.content;
|
|
2300
|
+
const images = c.images || [];
|
|
2301
|
+
if (images.length === 0) return null;
|
|
2302
|
+
const opacity = c.overlay_opacity ?? 0.45;
|
|
2303
|
+
return /* @__PURE__ */ jsx("div", { style: { width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsx("div", { style: {
|
|
2304
|
+
display: "grid",
|
|
2305
|
+
gridTemplateColumns: images.length >= 4 ? "1fr 1fr 1fr" : "1fr 1fr",
|
|
2306
|
+
gridTemplateRows: images.length >= 4 ? "auto auto" : "auto",
|
|
2307
|
+
gap: "3px"
|
|
2308
|
+
}, children: images.slice(0, 6).map((img, i) => /* @__PURE__ */ jsxs("div", { style: {
|
|
2309
|
+
position: "relative",
|
|
2310
|
+
gridColumn: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
|
|
2311
|
+
gridRow: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
|
|
2312
|
+
aspectRatio: i === 0 ? "3/4" : images.length >= 4 && i <= 2 ? "1" : "3/4",
|
|
2313
|
+
overflow: "hidden",
|
|
2314
|
+
background: theme.surface
|
|
2315
|
+
}, children: [
|
|
2316
|
+
/* @__PURE__ */ jsx(
|
|
2317
|
+
"img",
|
|
2318
|
+
{
|
|
2319
|
+
src: img.url,
|
|
2320
|
+
alt: img.alt || "",
|
|
2321
|
+
loading: i < 3 ? "eager" : "lazy",
|
|
2322
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
2323
|
+
}
|
|
2324
|
+
),
|
|
2325
|
+
i === 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2326
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
2327
|
+
position: "absolute",
|
|
2328
|
+
inset: 0,
|
|
2329
|
+
background: `linear-gradient(to top, rgba(0,0,0,${opacity + 0.3}), rgba(0,0,0,${opacity * 0.3}))`
|
|
2330
|
+
} }),
|
|
2331
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
2332
|
+
position: "absolute",
|
|
2333
|
+
bottom: 0,
|
|
2334
|
+
left: 0,
|
|
2335
|
+
right: 0,
|
|
2336
|
+
padding: "clamp(1.5rem, 5vw, 3rem)",
|
|
2337
|
+
zIndex: 1
|
|
2338
|
+
}, children: [
|
|
2339
|
+
c.title && /* @__PURE__ */ jsx("h1", { style: {
|
|
2340
|
+
fontSize: "clamp(2rem, 8vw, 3.5rem)",
|
|
2341
|
+
fontWeight: 300,
|
|
2342
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
2343
|
+
margin: 0,
|
|
2344
|
+
lineHeight: 1.1,
|
|
2345
|
+
letterSpacing: "-0.03em",
|
|
2346
|
+
color: theme.fg
|
|
2347
|
+
}, children: /* @__PURE__ */ jsx(AnimatedText, { text: c.title }) }),
|
|
2348
|
+
c.subtitle && /* @__PURE__ */ jsx("p", { style: {
|
|
2349
|
+
fontSize: "clamp(0.7rem, 2vw, 0.95rem)",
|
|
2350
|
+
color: `${theme.fg}CC`,
|
|
2351
|
+
margin: "0.75rem 0 0",
|
|
2352
|
+
letterSpacing: "0.1em",
|
|
2353
|
+
textTransform: "uppercase",
|
|
2354
|
+
fontWeight: 400
|
|
2355
|
+
}, children: c.subtitle })
|
|
2356
|
+
] })
|
|
2357
|
+
] })
|
|
2358
|
+
] }, i)) }) });
|
|
2359
|
+
}
|
|
2298
2360
|
function GallerySection({ section, theme }) {
|
|
2299
2361
|
const { images } = section.content;
|
|
2300
2362
|
const columns = section.config?.columns || 3;
|
|
@@ -2730,6 +2792,8 @@ function SectionRenderer({
|
|
|
2730
2792
|
switch (section.type) {
|
|
2731
2793
|
case "hero":
|
|
2732
2794
|
return /* @__PURE__ */ jsx(HeroSection, { section, theme, tracking, onEvent });
|
|
2795
|
+
case "collage_hero":
|
|
2796
|
+
return /* @__PURE__ */ jsx(CollageHeroSection, { section, theme, tracking, onEvent });
|
|
2733
2797
|
case "text":
|
|
2734
2798
|
return /* @__PURE__ */ jsx(TextSection, { section, theme });
|
|
2735
2799
|
case "image":
|