@neowhale/storefront 0.2.44 → 0.2.45

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.
@@ -2301,60 +2301,36 @@ function CollageHeroSection({ section, theme, tracking, onEvent }) {
2301
2301
  if (images.length === 0) return null;
2302
2302
  c.overlay_opacity ?? 0.45;
2303
2303
  const count = Math.min(images.length, 5);
2304
+ const imgStyle = {
2305
+ width: "100%",
2306
+ height: "100%",
2307
+ objectFit: "cover",
2308
+ objectPosition: "center top",
2309
+ display: "block"
2310
+ };
2304
2311
  return /* @__PURE__ */ jsxs("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
2305
2312
  /* @__PURE__ */ jsxs("div", { style: {
2306
2313
  display: "grid",
2307
- gridTemplateColumns: "3fr 2fr",
2308
- gridTemplateRows: "auto",
2309
- gap: "2px"
2314
+ gridTemplateColumns: count >= 3 ? "3fr 2fr" : "1fr",
2315
+ gridTemplateRows: count >= 3 ? "1fr 1fr" : "auto",
2316
+ gap: "2px",
2317
+ height: "100vh",
2318
+ maxHeight: "900px"
2310
2319
  }, children: [
2311
- count > 0 && /* @__PURE__ */ jsx("div", { style: { gridRow: count >= 3 ? "span 2" : void 0, overflow: "hidden", background: theme.surface, maxHeight: "70vh" }, children: /* @__PURE__ */ jsx(
2312
- "img",
2313
- {
2314
- src: images[0].url,
2315
- alt: images[0].alt || "",
2316
- loading: "eager",
2317
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "40vh" }
2318
- }
2319
- ) }),
2320
- count >= 2 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsx(
2321
- "img",
2322
- {
2323
- src: images[1].url,
2324
- alt: images[1].alt || "",
2325
- loading: "eager",
2326
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
2327
- }
2328
- ) }),
2329
- count >= 3 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsx(
2330
- "img",
2331
- {
2332
- src: images[2].url,
2333
- alt: images[2].alt || "",
2334
- loading: "lazy",
2335
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
2336
- }
2337
- ) }),
2338
- count >= 4 && /* @__PURE__ */ jsxs("div", { style: { gridColumn: "1 / -1", display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : "1fr", gap: "2px" }, children: [
2339
- /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsx(
2340
- "img",
2341
- {
2342
- src: images[3].url,
2343
- alt: images[3].alt || "",
2344
- loading: "lazy",
2345
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
2346
- }
2347
- ) }),
2348
- count >= 5 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsx(
2349
- "img",
2350
- {
2351
- src: images[4].url,
2352
- alt: images[4].alt || "",
2353
- loading: "lazy",
2354
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
2355
- }
2356
- ) })
2357
- ] })
2320
+ count > 0 && /* @__PURE__ */ jsx("div", { style: {
2321
+ gridRow: count >= 3 ? "1 / -1" : void 0,
2322
+ overflow: "hidden",
2323
+ background: theme.surface
2324
+ }, children: /* @__PURE__ */ jsx("img", { src: images[0].url, alt: images[0].alt || "", loading: "eager", style: imgStyle }) }),
2325
+ count >= 2 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsx("img", { src: images[1].url, alt: images[1].alt || "", loading: "eager", style: imgStyle }) }),
2326
+ count >= 3 && /* @__PURE__ */ jsx("div", { style: {
2327
+ overflow: "hidden",
2328
+ background: theme.surface,
2329
+ ...count >= 4 ? { display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : count >= 4 ? "1fr 1fr" : "1fr", gap: "2px" } : {}
2330
+ }, children: count < 4 ? /* @__PURE__ */ jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2331
+ /* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) }),
2332
+ count >= 4 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx("img", { src: images[3].url, alt: images[3].alt || "", loading: "lazy", style: imgStyle }) })
2333
+ ] }) })
2358
2334
  ] }),
2359
2335
  /* @__PURE__ */ jsx("div", { style: {
2360
2336
  position: "absolute",