@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.
- package/dist/landing.global.js +62 -0
- package/dist/react/index.cjs +62 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +62 -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/landing.global.js
CHANGED
|
@@ -553,6 +553,66 @@ 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
|
+
c.overlay_opacity ?? 0.45;
|
|
561
|
+
const count = Math.min(images.length, 5);
|
|
562
|
+
return /* @__PURE__ */ jsx("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
|
|
563
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
564
|
+
display: "grid",
|
|
565
|
+
gridTemplateColumns: count >= 4 ? "repeat(4, 1fr)" : "repeat(2, 1fr)",
|
|
566
|
+
gridTemplateRows: count >= 4 ? "minmax(0, 28vh) minmax(0, 28vh)" : "minmax(0, 50vh)",
|
|
567
|
+
gap: "2px"
|
|
568
|
+
}, children: images.slice(0, count).map((img, i) => /* @__PURE__ */ jsx("div", { style: {
|
|
569
|
+
gridColumn: i === 0 && count >= 4 ? "span 2" : void 0,
|
|
570
|
+
gridRow: i === 0 && count >= 4 ? "span 2" : void 0,
|
|
571
|
+
overflow: "hidden",
|
|
572
|
+
background: theme.surface
|
|
573
|
+
}, children: /* @__PURE__ */ jsx(
|
|
574
|
+
"img",
|
|
575
|
+
{
|
|
576
|
+
src: img.url,
|
|
577
|
+
alt: img.alt || "",
|
|
578
|
+
loading: i < 3 ? "eager" : "lazy",
|
|
579
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
580
|
+
}
|
|
581
|
+
) }, i)) }),
|
|
582
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
583
|
+
position: "absolute",
|
|
584
|
+
inset: 0,
|
|
585
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 40%, transparent 60%)",
|
|
586
|
+
pointerEvents: "none"
|
|
587
|
+
} }),
|
|
588
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
589
|
+
position: "absolute",
|
|
590
|
+
bottom: 0,
|
|
591
|
+
left: 0,
|
|
592
|
+
right: 0,
|
|
593
|
+
padding: "clamp(1.25rem, 4vw, 2.5rem)",
|
|
594
|
+
zIndex: 1
|
|
595
|
+
}, children: [
|
|
596
|
+
c.title && /* @__PURE__ */ jsx("h1", { style: {
|
|
597
|
+
fontSize: "clamp(1.75rem, 7vw, 3rem)",
|
|
598
|
+
fontWeight: 300,
|
|
599
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
600
|
+
margin: 0,
|
|
601
|
+
lineHeight: 1.1,
|
|
602
|
+
letterSpacing: "-0.03em",
|
|
603
|
+
color: theme.fg
|
|
604
|
+
}, children: /* @__PURE__ */ jsx(AnimatedText, { text: c.title }) }),
|
|
605
|
+
c.subtitle && /* @__PURE__ */ jsx("p", { style: {
|
|
606
|
+
fontSize: "clamp(0.65rem, 1.8vw, 0.85rem)",
|
|
607
|
+
color: `${theme.fg}BB`,
|
|
608
|
+
margin: "0.5rem 0 0",
|
|
609
|
+
letterSpacing: "0.12em",
|
|
610
|
+
textTransform: "uppercase",
|
|
611
|
+
fontWeight: 400
|
|
612
|
+
}, children: c.subtitle })
|
|
613
|
+
] })
|
|
614
|
+
] });
|
|
615
|
+
}
|
|
556
616
|
function GallerySection({ section, theme }) {
|
|
557
617
|
const { images } = section.content;
|
|
558
618
|
const columns = section.config?.columns || 3;
|
|
@@ -994,6 +1054,8 @@ var WhaleStorefront = (function (exports) {
|
|
|
994
1054
|
switch (section.type) {
|
|
995
1055
|
case "hero":
|
|
996
1056
|
return /* @__PURE__ */ jsx(HeroSection, { section, theme, tracking, onEvent });
|
|
1057
|
+
case "collage_hero":
|
|
1058
|
+
return /* @__PURE__ */ jsx(CollageHeroSection, { section, theme, tracking, onEvent });
|
|
997
1059
|
case "text":
|
|
998
1060
|
return /* @__PURE__ */ jsx(TextSection, { section, theme });
|
|
999
1061
|
case "image":
|
package/dist/react/index.cjs
CHANGED
|
@@ -2297,6 +2297,66 @@ 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
|
+
c.overlay_opacity ?? 0.45;
|
|
2305
|
+
const count = Math.min(images.length, 5);
|
|
2306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
|
|
2307
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2308
|
+
display: "grid",
|
|
2309
|
+
gridTemplateColumns: count >= 4 ? "repeat(4, 1fr)" : "repeat(2, 1fr)",
|
|
2310
|
+
gridTemplateRows: count >= 4 ? "minmax(0, 28vh) minmax(0, 28vh)" : "minmax(0, 50vh)",
|
|
2311
|
+
gap: "2px"
|
|
2312
|
+
}, children: images.slice(0, count).map((img, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2313
|
+
gridColumn: i === 0 && count >= 4 ? "span 2" : void 0,
|
|
2314
|
+
gridRow: i === 0 && count >= 4 ? "span 2" : void 0,
|
|
2315
|
+
overflow: "hidden",
|
|
2316
|
+
background: theme.surface
|
|
2317
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2318
|
+
"img",
|
|
2319
|
+
{
|
|
2320
|
+
src: img.url,
|
|
2321
|
+
alt: img.alt || "",
|
|
2322
|
+
loading: i < 3 ? "eager" : "lazy",
|
|
2323
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
2324
|
+
}
|
|
2325
|
+
) }, i)) }),
|
|
2326
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2327
|
+
position: "absolute",
|
|
2328
|
+
inset: 0,
|
|
2329
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 40%, transparent 60%)",
|
|
2330
|
+
pointerEvents: "none"
|
|
2331
|
+
} }),
|
|
2332
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
2333
|
+
position: "absolute",
|
|
2334
|
+
bottom: 0,
|
|
2335
|
+
left: 0,
|
|
2336
|
+
right: 0,
|
|
2337
|
+
padding: "clamp(1.25rem, 4vw, 2.5rem)",
|
|
2338
|
+
zIndex: 1
|
|
2339
|
+
}, children: [
|
|
2340
|
+
c.title && /* @__PURE__ */ jsxRuntime.jsx("h1", { style: {
|
|
2341
|
+
fontSize: "clamp(1.75rem, 7vw, 3rem)",
|
|
2342
|
+
fontWeight: 300,
|
|
2343
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
2344
|
+
margin: 0,
|
|
2345
|
+
lineHeight: 1.1,
|
|
2346
|
+
letterSpacing: "-0.03em",
|
|
2347
|
+
color: theme.fg
|
|
2348
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(AnimatedText, { text: c.title }) }),
|
|
2349
|
+
c.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { style: {
|
|
2350
|
+
fontSize: "clamp(0.65rem, 1.8vw, 0.85rem)",
|
|
2351
|
+
color: `${theme.fg}BB`,
|
|
2352
|
+
margin: "0.5rem 0 0",
|
|
2353
|
+
letterSpacing: "0.12em",
|
|
2354
|
+
textTransform: "uppercase",
|
|
2355
|
+
fontWeight: 400
|
|
2356
|
+
}, children: c.subtitle })
|
|
2357
|
+
] })
|
|
2358
|
+
] });
|
|
2359
|
+
}
|
|
2300
2360
|
function GallerySection({ section, theme }) {
|
|
2301
2361
|
const { images } = section.content;
|
|
2302
2362
|
const columns = section.config?.columns || 3;
|
|
@@ -2732,6 +2792,8 @@ function SectionRenderer({
|
|
|
2732
2792
|
switch (section.type) {
|
|
2733
2793
|
case "hero":
|
|
2734
2794
|
return /* @__PURE__ */ jsxRuntime.jsx(HeroSection, { section, theme, tracking, onEvent });
|
|
2795
|
+
case "collage_hero":
|
|
2796
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollageHeroSection, { section, theme, tracking, onEvent });
|
|
2735
2797
|
case "text":
|
|
2736
2798
|
return /* @__PURE__ */ jsxRuntime.jsx(TextSection, { section, theme });
|
|
2737
2799
|
case "image":
|