@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.
@@ -553,6 +553,68 @@ var WhaleStorefront = (function (exports) {
553
553
  const isEmbed = url.includes("youtube") || url.includes("youtu.be") || url.includes("vimeo");
554
554
  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 } }) });
555
555
  }
556
+ function CollageHeroSection({ section, theme, tracking, onEvent }) {
557
+ const c = section.content;
558
+ const images = c.images || [];
559
+ if (images.length === 0) return null;
560
+ const opacity = c.overlay_opacity ?? 0.45;
561
+ return /* @__PURE__ */ jsx("div", { style: { width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsx("div", { style: {
562
+ display: "grid",
563
+ gridTemplateColumns: images.length >= 4 ? "1fr 1fr 1fr" : "1fr 1fr",
564
+ gridTemplateRows: images.length >= 4 ? "auto auto" : "auto",
565
+ gap: "3px"
566
+ }, children: images.slice(0, 6).map((img, i) => /* @__PURE__ */ jsx("div", { style: {
567
+ position: "relative",
568
+ gridColumn: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
569
+ gridRow: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
570
+ aspectRatio: i === 0 ? "3/4" : images.length >= 4 && i <= 2 ? "1" : "3/4",
571
+ overflow: "hidden",
572
+ background: theme.surface
573
+ }, children: [
574
+ /* @__PURE__ */ jsx(
575
+ "img",
576
+ {
577
+ src: img.url,
578
+ alt: img.alt || "",
579
+ loading: i < 3 ? "eager" : "lazy",
580
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
581
+ }
582
+ ),
583
+ i === 0 && /* @__PURE__ */ jsx(Fragment2, { children: [
584
+ /* @__PURE__ */ jsx("div", { style: {
585
+ position: "absolute",
586
+ inset: 0,
587
+ background: `linear-gradient(to top, rgba(0,0,0,${opacity + 0.3}), rgba(0,0,0,${opacity * 0.3}))`
588
+ } }),
589
+ /* @__PURE__ */ jsx("div", { style: {
590
+ position: "absolute",
591
+ bottom: 0,
592
+ left: 0,
593
+ right: 0,
594
+ padding: "clamp(1.5rem, 5vw, 3rem)",
595
+ zIndex: 1
596
+ }, children: [
597
+ c.title && /* @__PURE__ */ jsx("h1", { style: {
598
+ fontSize: "clamp(2rem, 8vw, 3.5rem)",
599
+ fontWeight: 300,
600
+ fontFamily: theme.fontDisplay || "inherit",
601
+ margin: 0,
602
+ lineHeight: 1.1,
603
+ letterSpacing: "-0.03em",
604
+ color: theme.fg
605
+ }, children: /* @__PURE__ */ jsx(AnimatedText, { text: c.title }) }),
606
+ c.subtitle && /* @__PURE__ */ jsx("p", { style: {
607
+ fontSize: "clamp(0.7rem, 2vw, 0.95rem)",
608
+ color: `${theme.fg}CC`,
609
+ margin: "0.75rem 0 0",
610
+ letterSpacing: "0.1em",
611
+ textTransform: "uppercase",
612
+ fontWeight: 400
613
+ }, children: c.subtitle })
614
+ ] })
615
+ ] })
616
+ ] }, i)) }) });
617
+ }
556
618
  function GallerySection({ section, theme }) {
557
619
  const { images } = section.content;
558
620
  const columns = section.config?.columns || 3;
@@ -994,6 +1056,8 @@ var WhaleStorefront = (function (exports) {
994
1056
  switch (section.type) {
995
1057
  case "hero":
996
1058
  return /* @__PURE__ */ jsx(HeroSection, { section, theme, tracking, onEvent });
1059
+ case "collage_hero":
1060
+ return /* @__PURE__ */ jsx(CollageHeroSection, { section, theme, tracking, onEvent });
997
1061
  case "text":
998
1062
  return /* @__PURE__ */ jsx(TextSection, { section, theme });
999
1063
  case "image":
@@ -2297,6 +2297,68 @@ function VideoSection({ section, theme }) {
2297
2297
  const isEmbed = url.includes("youtube") || url.includes("youtu.be") || url.includes("vimeo");
2298
2298
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "1.5rem", maxWidth: 640, margin: "0 auto" }, children: isEmbed ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", paddingBottom: "56.25%", height: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("iframe", { src: toEmbedUrl(url), style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", border: "none" }, allow: "autoplay; fullscreen", title: "Video" }) }) : /* @__PURE__ */ jsxRuntime.jsx("video", { src: url, poster, controls: true, style: { width: "100%", display: "block", background: theme.surface } }) });
2299
2299
  }
2300
+ function CollageHeroSection({ section, theme, tracking, onEvent }) {
2301
+ const c = section.content;
2302
+ const images = c.images || [];
2303
+ if (images.length === 0) return null;
2304
+ const opacity = c.overlay_opacity ?? 0.45;
2305
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
2306
+ display: "grid",
2307
+ gridTemplateColumns: images.length >= 4 ? "1fr 1fr 1fr" : "1fr 1fr",
2308
+ gridTemplateRows: images.length >= 4 ? "auto auto" : "auto",
2309
+ gap: "3px"
2310
+ }, children: images.slice(0, 6).map((img, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
2311
+ position: "relative",
2312
+ gridColumn: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
2313
+ gridRow: i === 0 && images.length >= 4 ? "1 / 3" : void 0,
2314
+ aspectRatio: i === 0 ? "3/4" : images.length >= 4 && i <= 2 ? "1" : "3/4",
2315
+ overflow: "hidden",
2316
+ background: theme.surface
2317
+ }, children: [
2318
+ /* @__PURE__ */ jsxRuntime.jsx(
2319
+ "img",
2320
+ {
2321
+ src: img.url,
2322
+ alt: img.alt || "",
2323
+ loading: i < 3 ? "eager" : "lazy",
2324
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
2325
+ }
2326
+ ),
2327
+ i === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2328
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
2329
+ position: "absolute",
2330
+ inset: 0,
2331
+ background: `linear-gradient(to top, rgba(0,0,0,${opacity + 0.3}), rgba(0,0,0,${opacity * 0.3}))`
2332
+ } }),
2333
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
2334
+ position: "absolute",
2335
+ bottom: 0,
2336
+ left: 0,
2337
+ right: 0,
2338
+ padding: "clamp(1.5rem, 5vw, 3rem)",
2339
+ zIndex: 1
2340
+ }, children: [
2341
+ c.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { style: {
2342
+ fontSize: "clamp(2rem, 8vw, 3.5rem)",
2343
+ fontWeight: 300,
2344
+ fontFamily: theme.fontDisplay || "inherit",
2345
+ margin: 0,
2346
+ lineHeight: 1.1,
2347
+ letterSpacing: "-0.03em",
2348
+ color: theme.fg
2349
+ }, children: /* @__PURE__ */ jsxRuntime.jsx(AnimatedText, { text: c.title }) }),
2350
+ c.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { style: {
2351
+ fontSize: "clamp(0.7rem, 2vw, 0.95rem)",
2352
+ color: `${theme.fg}CC`,
2353
+ margin: "0.75rem 0 0",
2354
+ letterSpacing: "0.1em",
2355
+ textTransform: "uppercase",
2356
+ fontWeight: 400
2357
+ }, children: c.subtitle })
2358
+ ] })
2359
+ ] })
2360
+ ] }, i)) }) });
2361
+ }
2300
2362
  function GallerySection({ section, theme }) {
2301
2363
  const { images } = section.content;
2302
2364
  const columns = section.config?.columns || 3;
@@ -2732,6 +2794,8 @@ function SectionRenderer({
2732
2794
  switch (section.type) {
2733
2795
  case "hero":
2734
2796
  return /* @__PURE__ */ jsxRuntime.jsx(HeroSection, { section, theme, tracking, onEvent });
2797
+ case "collage_hero":
2798
+ return /* @__PURE__ */ jsxRuntime.jsx(CollageHeroSection, { section, theme, tracking, onEvent });
2735
2799
  case "text":
2736
2800
  return /* @__PURE__ */ jsxRuntime.jsx(TextSection, { section, theme });
2737
2801
  case "image":