@neowhale/storefront 0.2.40 → 0.2.42

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.
@@ -2295,6 +2295,66 @@ 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
+ c.overlay_opacity ?? 0.45;
2303
+ const count = Math.min(images.length, 5);
2304
+ return /* @__PURE__ */ jsxs("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
2305
+ /* @__PURE__ */ jsx("div", { style: {
2306
+ display: "grid",
2307
+ gridTemplateColumns: count >= 4 ? "repeat(4, 1fr)" : "repeat(2, 1fr)",
2308
+ gridTemplateRows: count >= 4 ? "minmax(0, 28vh) minmax(0, 28vh)" : "minmax(0, 50vh)",
2309
+ gap: "2px"
2310
+ }, children: images.slice(0, count).map((img, i) => /* @__PURE__ */ jsx("div", { style: {
2311
+ gridColumn: i === 0 && count >= 4 ? "span 2" : void 0,
2312
+ gridRow: i === 0 && count >= 4 ? "span 2" : void 0,
2313
+ overflow: "hidden",
2314
+ background: theme.surface
2315
+ }, children: /* @__PURE__ */ jsx(
2316
+ "img",
2317
+ {
2318
+ src: img.url,
2319
+ alt: img.alt || "",
2320
+ loading: i < 3 ? "eager" : "lazy",
2321
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
2322
+ }
2323
+ ) }, i)) }),
2324
+ /* @__PURE__ */ jsx("div", { style: {
2325
+ position: "absolute",
2326
+ inset: 0,
2327
+ background: "linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 40%, transparent 60%)",
2328
+ pointerEvents: "none"
2329
+ } }),
2330
+ /* @__PURE__ */ jsxs("div", { style: {
2331
+ position: "absolute",
2332
+ bottom: 0,
2333
+ left: 0,
2334
+ right: 0,
2335
+ padding: "clamp(1.25rem, 4vw, 2.5rem)",
2336
+ zIndex: 1
2337
+ }, children: [
2338
+ c.title && /* @__PURE__ */ jsx("h1", { style: {
2339
+ fontSize: "clamp(1.75rem, 7vw, 3rem)",
2340
+ fontWeight: 300,
2341
+ fontFamily: theme.fontDisplay || "inherit",
2342
+ margin: 0,
2343
+ lineHeight: 1.1,
2344
+ letterSpacing: "-0.03em",
2345
+ color: theme.fg
2346
+ }, children: /* @__PURE__ */ jsx(AnimatedText, { text: c.title }) }),
2347
+ c.subtitle && /* @__PURE__ */ jsx("p", { style: {
2348
+ fontSize: "clamp(0.65rem, 1.8vw, 0.85rem)",
2349
+ color: `${theme.fg}BB`,
2350
+ margin: "0.5rem 0 0",
2351
+ letterSpacing: "0.12em",
2352
+ textTransform: "uppercase",
2353
+ fontWeight: 400
2354
+ }, children: c.subtitle })
2355
+ ] })
2356
+ ] });
2357
+ }
2298
2358
  function GallerySection({ section, theme }) {
2299
2359
  const { images } = section.content;
2300
2360
  const columns = section.config?.columns || 3;
@@ -2730,6 +2790,8 @@ function SectionRenderer({
2730
2790
  switch (section.type) {
2731
2791
  case "hero":
2732
2792
  return /* @__PURE__ */ jsx(HeroSection, { section, theme, tracking, onEvent });
2793
+ case "collage_hero":
2794
+ return /* @__PURE__ */ jsx(CollageHeroSection, { section, theme, tracking, onEvent });
2733
2795
  case "text":
2734
2796
  return /* @__PURE__ */ jsx(TextSection, { section, theme });
2735
2797
  case "image":