@neowhale/storefront 0.2.39 → 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 +81 -0
- package/dist/react/index.cjs +81 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +81 -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,10 +553,89 @@ 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;
|
|
621
|
+
const layout = section.config?.layout || "grid";
|
|
559
622
|
if (!images || images.length === 0) return null;
|
|
623
|
+
if (layout === "collage") {
|
|
624
|
+
return /* @__PURE__ */ jsx("div", { style: { padding: "0.375rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsx("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "0.375rem" }, children: images.map((img, i) => /* @__PURE__ */ jsx("div", { style: {
|
|
625
|
+
gridColumn: i === 0 ? "1 / -1" : void 0,
|
|
626
|
+
aspectRatio: i === 0 ? "16/9" : i % 3 === 0 ? "3/4" : "1",
|
|
627
|
+
overflow: "hidden",
|
|
628
|
+
background: theme.surface
|
|
629
|
+
}, children: /* @__PURE__ */ jsx(
|
|
630
|
+
"img",
|
|
631
|
+
{
|
|
632
|
+
src: img.url,
|
|
633
|
+
alt: img.alt || "",
|
|
634
|
+
loading: i < 2 ? "eager" : "lazy",
|
|
635
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
636
|
+
}
|
|
637
|
+
) }, i)) }) });
|
|
638
|
+
}
|
|
560
639
|
return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 800, margin: "0 auto" }, children: /* @__PURE__ */ jsx("div", { style: { display: "grid", gridTemplateColumns: `repeat(${columns}, 1fr)`, gap: "0.5rem" }, children: images.map((img, i) => /* @__PURE__ */ jsx("div", { style: { aspectRatio: "1", overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsx("img", { src: img.url, alt: img.alt || "", style: { width: "100%", height: "100%", objectFit: "cover", display: "block" } }) }, i)) }) });
|
|
561
640
|
}
|
|
562
641
|
function SocialLinksSection({ section, theme }) {
|
|
@@ -977,6 +1056,8 @@ var WhaleStorefront = (function (exports) {
|
|
|
977
1056
|
switch (section.type) {
|
|
978
1057
|
case "hero":
|
|
979
1058
|
return /* @__PURE__ */ jsx(HeroSection, { section, theme, tracking, onEvent });
|
|
1059
|
+
case "collage_hero":
|
|
1060
|
+
return /* @__PURE__ */ jsx(CollageHeroSection, { section, theme, tracking, onEvent });
|
|
980
1061
|
case "text":
|
|
981
1062
|
return /* @__PURE__ */ jsx(TextSection, { section, theme });
|
|
982
1063
|
case "image":
|
package/dist/react/index.cjs
CHANGED
|
@@ -2297,10 +2297,89 @@ 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;
|
|
2365
|
+
const layout = section.config?.layout || "grid";
|
|
2303
2366
|
if (!images || images.length === 0) return null;
|
|
2367
|
+
if (layout === "collage") {
|
|
2368
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "0.375rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "0.375rem" }, children: images.map((img, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2369
|
+
gridColumn: i === 0 ? "1 / -1" : void 0,
|
|
2370
|
+
aspectRatio: i === 0 ? "16/9" : i % 3 === 0 ? "3/4" : "1",
|
|
2371
|
+
overflow: "hidden",
|
|
2372
|
+
background: theme.surface
|
|
2373
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2374
|
+
"img",
|
|
2375
|
+
{
|
|
2376
|
+
src: img.url,
|
|
2377
|
+
alt: img.alt || "",
|
|
2378
|
+
loading: i < 2 ? "eager" : "lazy",
|
|
2379
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
2380
|
+
}
|
|
2381
|
+
) }, i)) }) });
|
|
2382
|
+
}
|
|
2304
2383
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "1.5rem", maxWidth: 800, margin: "0 auto" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gridTemplateColumns: `repeat(${columns}, 1fr)`, gap: "0.5rem" }, children: images.map((img, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { aspectRatio: "1", overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: img.url, alt: img.alt || "", style: { width: "100%", height: "100%", objectFit: "cover", display: "block" } }) }, i)) }) });
|
|
2305
2384
|
}
|
|
2306
2385
|
function SocialLinksSection({ section, theme }) {
|
|
@@ -2715,6 +2794,8 @@ function SectionRenderer({
|
|
|
2715
2794
|
switch (section.type) {
|
|
2716
2795
|
case "hero":
|
|
2717
2796
|
return /* @__PURE__ */ jsxRuntime.jsx(HeroSection, { section, theme, tracking, onEvent });
|
|
2797
|
+
case "collage_hero":
|
|
2798
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollageHeroSection, { section, theme, tracking, onEvent });
|
|
2718
2799
|
case "text":
|
|
2719
2800
|
return /* @__PURE__ */ jsxRuntime.jsx(TextSection, { section, theme });
|
|
2720
2801
|
case "image":
|