@neowhale/storefront 0.2.44 → 0.2.46
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/{client-D7_7p7ja.d.cts → client-CiKYpyRa.d.cts} +1 -1
- package/dist/{client-D7_7p7ja.d.ts → client-CiKYpyRa.d.ts} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/landing.global.js +172 -50
- package/dist/next/index.d.cts +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/{pixel-manager-DB8LLw9V.d.ts → pixel-manager-DLJ39HCy.d.ts} +1 -1
- package/dist/{pixel-manager-Blj8hb-X.d.cts → pixel-manager-DoH7abe_.d.cts} +1 -1
- package/dist/react/index.cjs +172 -50
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +172 -50
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -379,7 +379,7 @@ interface QRLandingData {
|
|
|
379
379
|
}
|
|
380
380
|
interface LandingSection {
|
|
381
381
|
id: string;
|
|
382
|
-
type: 'hero' | 'collage_hero' | 'text' | 'image' | 'video' | 'gallery' | 'cta' | 'stats' | 'product_card' | 'coa_viewer' | 'social_links' | 'divider' | 'lead_capture' | 'testimonials' | 'value_stack' | 'faq' | 'trust_badges' | 'countdown' | 'custom';
|
|
382
|
+
type: 'hero' | 'collage_hero' | 'text' | 'image' | 'video' | 'gallery' | 'cta' | 'stats' | 'product_card' | 'coa_viewer' | 'social_links' | 'divider' | 'lead_capture' | 'testimonials' | 'value_stack' | 'faq' | 'trust_badges' | 'countdown' | 'location_card' | 'custom';
|
|
383
383
|
content: Record<string, unknown>;
|
|
384
384
|
order: number;
|
|
385
385
|
config?: Record<string, unknown>;
|
|
@@ -379,7 +379,7 @@ interface QRLandingData {
|
|
|
379
379
|
}
|
|
380
380
|
interface LandingSection {
|
|
381
381
|
id: string;
|
|
382
|
-
type: 'hero' | 'collage_hero' | 'text' | 'image' | 'video' | 'gallery' | 'cta' | 'stats' | 'product_card' | 'coa_viewer' | 'social_links' | 'divider' | 'lead_capture' | 'testimonials' | 'value_stack' | 'faq' | 'trust_badges' | 'countdown' | 'custom';
|
|
382
|
+
type: 'hero' | 'collage_hero' | 'text' | 'image' | 'video' | 'gallery' | 'cta' | 'stats' | 'product_card' | 'coa_viewer' | 'social_links' | 'divider' | 'lead_capture' | 'testimonials' | 'value_stack' | 'faq' | 'trust_badges' | 'countdown' | 'location_card' | 'custom';
|
|
383
383
|
content: Record<string, unknown>;
|
|
384
384
|
order: number;
|
|
385
385
|
config?: Record<string, unknown>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as Address, C as Cart, a as CartItem, b as Category, c as CategoryTreeNode, d as CheckoutSession, e as CouponValidation, f as Customer, g as CustomerAnalytics, D as DealValidation, E as EventType, L as LandingPageConfig, h as LandingPageRenderData, i as LandingSection, j as ListResponse, k as Location, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, O as Order, o as OrderItem, P as PaymentData, p as PixelConfig, q as PricingTier, r as Product, s as ProductVariation, Q as QRLandingData, t as QRLandingPage, u as QRLandingStore, R as Recommendation, v as Review, w as ReviewSummary, S as SendCodeResponse, x as ShippingMethod, y as ShippingRate, z as StorefrontConfig, B as StorefrontSession, T as TaxBreakdown, V as VerifyCodeResponse, W as WhaleClient, F as WhaleStorefrontConfig, G as WishlistItem } from './client-
|
|
2
|
-
export { P as PixelManager } from './pixel-manager-
|
|
1
|
+
export { A as Address, C as Cart, a as CartItem, b as Category, c as CategoryTreeNode, d as CheckoutSession, e as CouponValidation, f as Customer, g as CustomerAnalytics, D as DealValidation, E as EventType, L as LandingPageConfig, h as LandingPageRenderData, i as LandingSection, j as ListResponse, k as Location, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, O as Order, o as OrderItem, P as PaymentData, p as PixelConfig, q as PricingTier, r as Product, s as ProductVariation, Q as QRLandingData, t as QRLandingPage, u as QRLandingStore, R as Recommendation, v as Review, w as ReviewSummary, S as SendCodeResponse, x as ShippingMethod, y as ShippingRate, z as StorefrontConfig, B as StorefrontSession, T as TaxBreakdown, V as VerifyCodeResponse, W as WhaleClient, F as WhaleStorefrontConfig, G as WishlistItem } from './client-CiKYpyRa.cjs';
|
|
2
|
+
export { P as PixelManager } from './pixel-manager-DoH7abe_.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Resilient HTTP sender for analytics/event payloads.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as Address, C as Cart, a as CartItem, b as Category, c as CategoryTreeNode, d as CheckoutSession, e as CouponValidation, f as Customer, g as CustomerAnalytics, D as DealValidation, E as EventType, L as LandingPageConfig, h as LandingPageRenderData, i as LandingSection, j as ListResponse, k as Location, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, O as Order, o as OrderItem, P as PaymentData, p as PixelConfig, q as PricingTier, r as Product, s as ProductVariation, Q as QRLandingData, t as QRLandingPage, u as QRLandingStore, R as Recommendation, v as Review, w as ReviewSummary, S as SendCodeResponse, x as ShippingMethod, y as ShippingRate, z as StorefrontConfig, B as StorefrontSession, T as TaxBreakdown, V as VerifyCodeResponse, W as WhaleClient, F as WhaleStorefrontConfig, G as WishlistItem } from './client-
|
|
2
|
-
export { P as PixelManager } from './pixel-manager-
|
|
1
|
+
export { A as Address, C as Cart, a as CartItem, b as Category, c as CategoryTreeNode, d as CheckoutSession, e as CouponValidation, f as Customer, g as CustomerAnalytics, D as DealValidation, E as EventType, L as LandingPageConfig, h as LandingPageRenderData, i as LandingSection, j as ListResponse, k as Location, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, O as Order, o as OrderItem, P as PaymentData, p as PixelConfig, q as PricingTier, r as Product, s as ProductVariation, Q as QRLandingData, t as QRLandingPage, u as QRLandingStore, R as Recommendation, v as Review, w as ReviewSummary, S as SendCodeResponse, x as ShippingMethod, y as ShippingRate, z as StorefrontConfig, B as StorefrontSession, T as TaxBreakdown, V as VerifyCodeResponse, W as WhaleClient, F as WhaleStorefrontConfig, G as WishlistItem } from './client-CiKYpyRa.js';
|
|
2
|
+
export { P as PixelManager } from './pixel-manager-DLJ39HCy.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Resilient HTTP sender for analytics/event payloads.
|
package/dist/landing.global.js
CHANGED
|
@@ -559,60 +559,36 @@ var WhaleStorefront = (function (exports) {
|
|
|
559
559
|
if (images.length === 0) return null;
|
|
560
560
|
c.overlay_opacity ?? 0.45;
|
|
561
561
|
const count = Math.min(images.length, 5);
|
|
562
|
+
const imgStyle = {
|
|
563
|
+
width: "100%",
|
|
564
|
+
height: "100%",
|
|
565
|
+
objectFit: "cover",
|
|
566
|
+
objectPosition: "center top",
|
|
567
|
+
display: "block"
|
|
568
|
+
};
|
|
562
569
|
return /* @__PURE__ */ jsx("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
|
|
563
570
|
/* @__PURE__ */ jsx("div", { style: {
|
|
564
571
|
display: "grid",
|
|
565
|
-
gridTemplateColumns: "3fr 2fr",
|
|
566
|
-
gridTemplateRows: "auto",
|
|
567
|
-
gap: "2px"
|
|
572
|
+
gridTemplateColumns: count >= 3 ? "3fr 2fr" : "1fr",
|
|
573
|
+
gridTemplateRows: count >= 3 ? "1fr 1fr" : "auto",
|
|
574
|
+
gap: "2px",
|
|
575
|
+
height: "100vh",
|
|
576
|
+
maxHeight: "900px"
|
|
568
577
|
}, children: [
|
|
569
|
-
count > 0 && /* @__PURE__ */ jsx("div", { style: {
|
|
570
|
-
"
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
loading: "eager",
|
|
584
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
|
|
585
|
-
}
|
|
586
|
-
) }),
|
|
587
|
-
count >= 3 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsx(
|
|
588
|
-
"img",
|
|
589
|
-
{
|
|
590
|
-
src: images[2].url,
|
|
591
|
-
alt: images[2].alt || "",
|
|
592
|
-
loading: "lazy",
|
|
593
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
|
|
594
|
-
}
|
|
595
|
-
) }),
|
|
596
|
-
count >= 4 && /* @__PURE__ */ jsx("div", { style: { gridColumn: "1 / -1", display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : "1fr", gap: "2px" }, children: [
|
|
597
|
-
/* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsx(
|
|
598
|
-
"img",
|
|
599
|
-
{
|
|
600
|
-
src: images[3].url,
|
|
601
|
-
alt: images[3].alt || "",
|
|
602
|
-
loading: "lazy",
|
|
603
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
604
|
-
}
|
|
605
|
-
) }),
|
|
606
|
-
count >= 5 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsx(
|
|
607
|
-
"img",
|
|
608
|
-
{
|
|
609
|
-
src: images[4].url,
|
|
610
|
-
alt: images[4].alt || "",
|
|
611
|
-
loading: "lazy",
|
|
612
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
613
|
-
}
|
|
614
|
-
) })
|
|
615
|
-
] })
|
|
578
|
+
count > 0 && /* @__PURE__ */ jsx("div", { style: {
|
|
579
|
+
gridRow: count >= 3 ? "1 / -1" : void 0,
|
|
580
|
+
overflow: "hidden",
|
|
581
|
+
background: theme.surface
|
|
582
|
+
}, children: /* @__PURE__ */ jsx("img", { src: images[0].url, alt: images[0].alt || "", loading: "eager", style: imgStyle }) }),
|
|
583
|
+
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 }) }),
|
|
584
|
+
count >= 3 && /* @__PURE__ */ jsx("div", { style: {
|
|
585
|
+
overflow: "hidden",
|
|
586
|
+
background: theme.surface,
|
|
587
|
+
...count >= 4 ? { display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : count >= 4 ? "1fr 1fr" : "1fr", gap: "2px" } : {}
|
|
588
|
+
}, children: count < 4 ? /* @__PURE__ */ jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) : /* @__PURE__ */ jsx(Fragment2, { children: [
|
|
589
|
+
/* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) }),
|
|
590
|
+
count >= 4 && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx("img", { src: images[3].url, alt: images[3].alt || "", loading: "lazy", style: imgStyle }) })
|
|
591
|
+
] }) })
|
|
616
592
|
] }),
|
|
617
593
|
/* @__PURE__ */ jsx("div", { style: {
|
|
618
594
|
position: "absolute",
|
|
@@ -1371,6 +1347,150 @@ var WhaleStorefront = (function (exports) {
|
|
|
1371
1347
|
] }, u.label)) })
|
|
1372
1348
|
] });
|
|
1373
1349
|
}
|
|
1350
|
+
function LocationCardSection({ section, theme, onEvent }) {
|
|
1351
|
+
const c = section.content;
|
|
1352
|
+
const locations = c.locations || [];
|
|
1353
|
+
if (locations.length === 0) return null;
|
|
1354
|
+
return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsx("div", { style: {
|
|
1355
|
+
display: "grid",
|
|
1356
|
+
gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 2)}, 1fr)`,
|
|
1357
|
+
gap: "2px",
|
|
1358
|
+
justifyContent: "center"
|
|
1359
|
+
}, children: locations.map((loc, i) => /* @__PURE__ */ jsx("div", { style: {
|
|
1360
|
+
background: theme.surface,
|
|
1361
|
+
overflow: "hidden",
|
|
1362
|
+
display: "flex",
|
|
1363
|
+
flexDirection: "column"
|
|
1364
|
+
}, children: [
|
|
1365
|
+
/* @__PURE__ */ jsx("div", { style: { position: "relative", aspectRatio: "4/5", overflow: "hidden" }, children: [
|
|
1366
|
+
/* @__PURE__ */ jsx(
|
|
1367
|
+
"img",
|
|
1368
|
+
{
|
|
1369
|
+
src: loc.image,
|
|
1370
|
+
alt: loc.name,
|
|
1371
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
1372
|
+
}
|
|
1373
|
+
),
|
|
1374
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
1375
|
+
position: "absolute",
|
|
1376
|
+
inset: 0,
|
|
1377
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%)"
|
|
1378
|
+
} }),
|
|
1379
|
+
/* @__PURE__ */ jsx("div", { style: { position: "absolute", bottom: 0, left: 0, padding: "clamp(0.75rem, 3vw, 1.25rem)" }, children: [
|
|
1380
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
1381
|
+
fontSize: "clamp(1.25rem, 5vw, 1.75rem)",
|
|
1382
|
+
fontWeight: 300,
|
|
1383
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
1384
|
+
color: "#fff",
|
|
1385
|
+
margin: 0,
|
|
1386
|
+
lineHeight: 1.1
|
|
1387
|
+
}, children: loc.name }),
|
|
1388
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
1389
|
+
fontSize: "0.65rem",
|
|
1390
|
+
letterSpacing: "0.2em",
|
|
1391
|
+
color: "rgba(255,255,255,0.6)",
|
|
1392
|
+
margin: "0.25rem 0 0",
|
|
1393
|
+
fontWeight: 600
|
|
1394
|
+
}, children: [
|
|
1395
|
+
loc.city,
|
|
1396
|
+
", ",
|
|
1397
|
+
loc.state
|
|
1398
|
+
] })
|
|
1399
|
+
] })
|
|
1400
|
+
] }),
|
|
1401
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
1402
|
+
padding: "clamp(0.75rem, 3vw, 1.25rem)",
|
|
1403
|
+
display: "flex",
|
|
1404
|
+
flexDirection: "column",
|
|
1405
|
+
gap: "0.5rem",
|
|
1406
|
+
flex: 1
|
|
1407
|
+
}, children: [
|
|
1408
|
+
loc.tagline && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: `${theme.fg}80`, fontWeight: 500, fontStyle: "italic", margin: 0 }, children: loc.tagline }),
|
|
1409
|
+
loc.rating != null && loc.review_count != null && loc.review_count > 0 && /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
|
|
1410
|
+
/* @__PURE__ */ jsx(Stars, { rating: loc.rating, color: theme.accent, size: 13 }),
|
|
1411
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: "0.75rem", color: `${theme.fg}99` }, children: [
|
|
1412
|
+
loc.rating.toFixed(1),
|
|
1413
|
+
" (",
|
|
1414
|
+
loc.review_count,
|
|
1415
|
+
")"
|
|
1416
|
+
] })
|
|
1417
|
+
] }),
|
|
1418
|
+
loc.address && /* @__PURE__ */ jsx(
|
|
1419
|
+
"a",
|
|
1420
|
+
{
|
|
1421
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
1422
|
+
target: "_blank",
|
|
1423
|
+
rel: "noopener noreferrer",
|
|
1424
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none", lineHeight: 1.5 },
|
|
1425
|
+
children: [
|
|
1426
|
+
loc.address,
|
|
1427
|
+
", ",
|
|
1428
|
+
loc.city,
|
|
1429
|
+
", ",
|
|
1430
|
+
loc.state
|
|
1431
|
+
]
|
|
1432
|
+
}
|
|
1433
|
+
),
|
|
1434
|
+
loc.phone && /* @__PURE__ */ jsx(
|
|
1435
|
+
"a",
|
|
1436
|
+
{
|
|
1437
|
+
href: loc.phone_href || `tel:${loc.phone}`,
|
|
1438
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none" },
|
|
1439
|
+
children: loc.phone
|
|
1440
|
+
}
|
|
1441
|
+
),
|
|
1442
|
+
loc.hours && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.7rem", color: `${theme.fg}40`, margin: 0 }, children: loc.hours }),
|
|
1443
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "0.5rem", marginTop: "auto", paddingTop: "0.25rem" }, children: [
|
|
1444
|
+
/* @__PURE__ */ jsx(
|
|
1445
|
+
"a",
|
|
1446
|
+
{
|
|
1447
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
1448
|
+
target: "_blank",
|
|
1449
|
+
rel: "noopener noreferrer",
|
|
1450
|
+
onClick: () => onEvent?.("cta_click", { label: "directions", location: loc.name }),
|
|
1451
|
+
style: {
|
|
1452
|
+
flex: 1,
|
|
1453
|
+
display: "flex",
|
|
1454
|
+
alignItems: "center",
|
|
1455
|
+
justifyContent: "center",
|
|
1456
|
+
padding: "0.625rem",
|
|
1457
|
+
background: theme.fg,
|
|
1458
|
+
color: theme.bg,
|
|
1459
|
+
fontSize: "0.7rem",
|
|
1460
|
+
fontWeight: 700,
|
|
1461
|
+
letterSpacing: "0.1em",
|
|
1462
|
+
textDecoration: "none",
|
|
1463
|
+
textAlign: "center"
|
|
1464
|
+
},
|
|
1465
|
+
children: "directions"
|
|
1466
|
+
}
|
|
1467
|
+
),
|
|
1468
|
+
loc.shop_url && /* @__PURE__ */ jsx(
|
|
1469
|
+
"a",
|
|
1470
|
+
{
|
|
1471
|
+
href: loc.shop_url,
|
|
1472
|
+
onClick: () => onEvent?.("cta_click", { label: "shop", location: loc.name }),
|
|
1473
|
+
style: {
|
|
1474
|
+
flex: 1,
|
|
1475
|
+
display: "flex",
|
|
1476
|
+
alignItems: "center",
|
|
1477
|
+
justifyContent: "center",
|
|
1478
|
+
padding: "0.625rem",
|
|
1479
|
+
border: `1px solid ${theme.fg}20`,
|
|
1480
|
+
color: `${theme.fg}CC`,
|
|
1481
|
+
fontSize: "0.7rem",
|
|
1482
|
+
fontWeight: 700,
|
|
1483
|
+
letterSpacing: "0.1em",
|
|
1484
|
+
textDecoration: "none",
|
|
1485
|
+
textAlign: "center"
|
|
1486
|
+
},
|
|
1487
|
+
children: "shop"
|
|
1488
|
+
}
|
|
1489
|
+
)
|
|
1490
|
+
] })
|
|
1491
|
+
] })
|
|
1492
|
+
] }, i)) }) });
|
|
1493
|
+
}
|
|
1374
1494
|
|
|
1375
1495
|
// src/react/components/section-renderer.tsx
|
|
1376
1496
|
function SectionRenderer({
|
|
@@ -1417,6 +1537,8 @@ var WhaleStorefront = (function (exports) {
|
|
|
1417
1537
|
return /* @__PURE__ */ jsx(TrustBadgesSection, { section, theme });
|
|
1418
1538
|
case "countdown":
|
|
1419
1539
|
return /* @__PURE__ */ jsx(CountdownSection, { section, theme });
|
|
1540
|
+
case "location_card":
|
|
1541
|
+
return /* @__PURE__ */ jsx(LocationCardSection, { section, theme, onEvent });
|
|
1420
1542
|
case "divider":
|
|
1421
1543
|
return /* @__PURE__ */ jsx(DividerSection, { theme });
|
|
1422
1544
|
default:
|
package/dist/next/index.d.cts
CHANGED
package/dist/next/index.d.ts
CHANGED
package/dist/react/index.cjs
CHANGED
|
@@ -2303,60 +2303,36 @@ function CollageHeroSection({ section, theme, tracking, onEvent }) {
|
|
|
2303
2303
|
if (images.length === 0) return null;
|
|
2304
2304
|
c.overlay_opacity ?? 0.45;
|
|
2305
2305
|
const count = Math.min(images.length, 5);
|
|
2306
|
+
const imgStyle = {
|
|
2307
|
+
width: "100%",
|
|
2308
|
+
height: "100%",
|
|
2309
|
+
objectFit: "cover",
|
|
2310
|
+
objectPosition: "center top",
|
|
2311
|
+
display: "block"
|
|
2312
|
+
};
|
|
2306
2313
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", overflow: "hidden", position: "relative" }, children: [
|
|
2307
2314
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
2308
2315
|
display: "grid",
|
|
2309
|
-
gridTemplateColumns: "3fr 2fr",
|
|
2310
|
-
gridTemplateRows: "auto",
|
|
2311
|
-
gap: "2px"
|
|
2316
|
+
gridTemplateColumns: count >= 3 ? "3fr 2fr" : "1fr",
|
|
2317
|
+
gridTemplateRows: count >= 3 ? "1fr 1fr" : "auto",
|
|
2318
|
+
gap: "2px",
|
|
2319
|
+
height: "100vh",
|
|
2320
|
+
maxHeight: "900px"
|
|
2312
2321
|
}, children: [
|
|
2313
|
-
count > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2314
|
-
"
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
{
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
loading: "eager",
|
|
2328
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
|
|
2329
|
-
}
|
|
2330
|
-
) }),
|
|
2331
|
-
count >= 3 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2332
|
-
"img",
|
|
2333
|
-
{
|
|
2334
|
-
src: images[2].url,
|
|
2335
|
-
alt: images[2].alt || "",
|
|
2336
|
-
loading: "lazy",
|
|
2337
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block", minHeight: "20vh", maxHeight: "35vh" }
|
|
2338
|
-
}
|
|
2339
|
-
) }),
|
|
2340
|
-
count >= 4 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { gridColumn: "1 / -1", display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : "1fr", gap: "2px" }, children: [
|
|
2341
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2342
|
-
"img",
|
|
2343
|
-
{
|
|
2344
|
-
src: images[3].url,
|
|
2345
|
-
alt: images[3].alt || "",
|
|
2346
|
-
loading: "lazy",
|
|
2347
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
2348
|
-
}
|
|
2349
|
-
) }),
|
|
2350
|
-
count >= 5 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden", background: theme.surface, maxHeight: "25vh" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2351
|
-
"img",
|
|
2352
|
-
{
|
|
2353
|
-
src: images[4].url,
|
|
2354
|
-
alt: images[4].alt || "",
|
|
2355
|
-
loading: "lazy",
|
|
2356
|
-
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
2357
|
-
}
|
|
2358
|
-
) })
|
|
2359
|
-
] })
|
|
2322
|
+
count > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2323
|
+
gridRow: count >= 3 ? "1 / -1" : void 0,
|
|
2324
|
+
overflow: "hidden",
|
|
2325
|
+
background: theme.surface
|
|
2326
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: images[0].url, alt: images[0].alt || "", loading: "eager", style: imgStyle }) }),
|
|
2327
|
+
count >= 2 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden", background: theme.surface }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: images[1].url, alt: images[1].alt || "", loading: "eager", style: imgStyle }) }),
|
|
2328
|
+
count >= 3 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2329
|
+
overflow: "hidden",
|
|
2330
|
+
background: theme.surface,
|
|
2331
|
+
...count >= 4 ? { display: "grid", gridTemplateColumns: count >= 5 ? "1fr 1fr" : count >= 4 ? "1fr 1fr" : "1fr", gap: "2px" } : {}
|
|
2332
|
+
}, children: count < 4 ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2333
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: images[2].url, alt: images[2].alt || "", loading: "lazy", style: imgStyle }) }),
|
|
2334
|
+
count >= 4 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: images[3].url, alt: images[3].alt || "", loading: "lazy", style: imgStyle }) })
|
|
2335
|
+
] }) })
|
|
2360
2336
|
] }),
|
|
2361
2337
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
2362
2338
|
position: "absolute",
|
|
@@ -3109,6 +3085,150 @@ function CountdownSection({ section, theme }) {
|
|
|
3109
3085
|
] }, u.label)) })
|
|
3110
3086
|
] });
|
|
3111
3087
|
}
|
|
3088
|
+
function LocationCardSection({ section, theme, onEvent }) {
|
|
3089
|
+
const c = section.content;
|
|
3090
|
+
const locations = c.locations || [];
|
|
3091
|
+
if (locations.length === 0) return null;
|
|
3092
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "1.5rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
3093
|
+
display: "grid",
|
|
3094
|
+
gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 2)}, 1fr)`,
|
|
3095
|
+
gap: "2px",
|
|
3096
|
+
justifyContent: "center"
|
|
3097
|
+
}, children: locations.map((loc, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
3098
|
+
background: theme.surface,
|
|
3099
|
+
overflow: "hidden",
|
|
3100
|
+
display: "flex",
|
|
3101
|
+
flexDirection: "column"
|
|
3102
|
+
}, children: [
|
|
3103
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", aspectRatio: "4/5", overflow: "hidden" }, children: [
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
|
+
"img",
|
|
3106
|
+
{
|
|
3107
|
+
src: loc.image,
|
|
3108
|
+
alt: loc.name,
|
|
3109
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
3110
|
+
}
|
|
3111
|
+
),
|
|
3112
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
3113
|
+
position: "absolute",
|
|
3114
|
+
inset: 0,
|
|
3115
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%)"
|
|
3116
|
+
} }),
|
|
3117
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", bottom: 0, left: 0, padding: "clamp(0.75rem, 3vw, 1.25rem)" }, children: [
|
|
3118
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: {
|
|
3119
|
+
fontSize: "clamp(1.25rem, 5vw, 1.75rem)",
|
|
3120
|
+
fontWeight: 300,
|
|
3121
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
3122
|
+
color: "#fff",
|
|
3123
|
+
margin: 0,
|
|
3124
|
+
lineHeight: 1.1
|
|
3125
|
+
}, children: loc.name }),
|
|
3126
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { style: {
|
|
3127
|
+
fontSize: "0.65rem",
|
|
3128
|
+
letterSpacing: "0.2em",
|
|
3129
|
+
color: "rgba(255,255,255,0.6)",
|
|
3130
|
+
margin: "0.25rem 0 0",
|
|
3131
|
+
fontWeight: 600
|
|
3132
|
+
}, children: [
|
|
3133
|
+
loc.city,
|
|
3134
|
+
", ",
|
|
3135
|
+
loc.state
|
|
3136
|
+
] })
|
|
3137
|
+
] })
|
|
3138
|
+
] }),
|
|
3139
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
3140
|
+
padding: "clamp(0.75rem, 3vw, 1.25rem)",
|
|
3141
|
+
display: "flex",
|
|
3142
|
+
flexDirection: "column",
|
|
3143
|
+
gap: "0.5rem",
|
|
3144
|
+
flex: 1
|
|
3145
|
+
}, children: [
|
|
3146
|
+
loc.tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.8rem", color: `${theme.fg}80`, fontWeight: 500, fontStyle: "italic", margin: 0 }, children: loc.tagline }),
|
|
3147
|
+
loc.rating != null && loc.review_count != null && loc.review_count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
|
|
3148
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stars, { rating: loc.rating, color: theme.accent, size: 13 }),
|
|
3149
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "0.75rem", color: `${theme.fg}99` }, children: [
|
|
3150
|
+
loc.rating.toFixed(1),
|
|
3151
|
+
" (",
|
|
3152
|
+
loc.review_count,
|
|
3153
|
+
")"
|
|
3154
|
+
] })
|
|
3155
|
+
] }),
|
|
3156
|
+
loc.address && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3157
|
+
"a",
|
|
3158
|
+
{
|
|
3159
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
3160
|
+
target: "_blank",
|
|
3161
|
+
rel: "noopener noreferrer",
|
|
3162
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none", lineHeight: 1.5 },
|
|
3163
|
+
children: [
|
|
3164
|
+
loc.address,
|
|
3165
|
+
", ",
|
|
3166
|
+
loc.city,
|
|
3167
|
+
", ",
|
|
3168
|
+
loc.state
|
|
3169
|
+
]
|
|
3170
|
+
}
|
|
3171
|
+
),
|
|
3172
|
+
loc.phone && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3173
|
+
"a",
|
|
3174
|
+
{
|
|
3175
|
+
href: loc.phone_href || `tel:${loc.phone}`,
|
|
3176
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none" },
|
|
3177
|
+
children: loc.phone
|
|
3178
|
+
}
|
|
3179
|
+
),
|
|
3180
|
+
loc.hours && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.7rem", color: `${theme.fg}40`, margin: 0 }, children: loc.hours }),
|
|
3181
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "0.5rem", marginTop: "auto", paddingTop: "0.25rem" }, children: [
|
|
3182
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3183
|
+
"a",
|
|
3184
|
+
{
|
|
3185
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
3186
|
+
target: "_blank",
|
|
3187
|
+
rel: "noopener noreferrer",
|
|
3188
|
+
onClick: () => onEvent?.("cta_click", { label: "directions", location: loc.name }),
|
|
3189
|
+
style: {
|
|
3190
|
+
flex: 1,
|
|
3191
|
+
display: "flex",
|
|
3192
|
+
alignItems: "center",
|
|
3193
|
+
justifyContent: "center",
|
|
3194
|
+
padding: "0.625rem",
|
|
3195
|
+
background: theme.fg,
|
|
3196
|
+
color: theme.bg,
|
|
3197
|
+
fontSize: "0.7rem",
|
|
3198
|
+
fontWeight: 700,
|
|
3199
|
+
letterSpacing: "0.1em",
|
|
3200
|
+
textDecoration: "none",
|
|
3201
|
+
textAlign: "center"
|
|
3202
|
+
},
|
|
3203
|
+
children: "directions"
|
|
3204
|
+
}
|
|
3205
|
+
),
|
|
3206
|
+
loc.shop_url && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3207
|
+
"a",
|
|
3208
|
+
{
|
|
3209
|
+
href: loc.shop_url,
|
|
3210
|
+
onClick: () => onEvent?.("cta_click", { label: "shop", location: loc.name }),
|
|
3211
|
+
style: {
|
|
3212
|
+
flex: 1,
|
|
3213
|
+
display: "flex",
|
|
3214
|
+
alignItems: "center",
|
|
3215
|
+
justifyContent: "center",
|
|
3216
|
+
padding: "0.625rem",
|
|
3217
|
+
border: `1px solid ${theme.fg}20`,
|
|
3218
|
+
color: `${theme.fg}CC`,
|
|
3219
|
+
fontSize: "0.7rem",
|
|
3220
|
+
fontWeight: 700,
|
|
3221
|
+
letterSpacing: "0.1em",
|
|
3222
|
+
textDecoration: "none",
|
|
3223
|
+
textAlign: "center"
|
|
3224
|
+
},
|
|
3225
|
+
children: "shop"
|
|
3226
|
+
}
|
|
3227
|
+
)
|
|
3228
|
+
] })
|
|
3229
|
+
] })
|
|
3230
|
+
] }, i)) }) });
|
|
3231
|
+
}
|
|
3112
3232
|
function SectionRenderer({
|
|
3113
3233
|
section,
|
|
3114
3234
|
data,
|
|
@@ -3153,6 +3273,8 @@ function SectionRenderer({
|
|
|
3153
3273
|
return /* @__PURE__ */ jsxRuntime.jsx(TrustBadgesSection, { section, theme });
|
|
3154
3274
|
case "countdown":
|
|
3155
3275
|
return /* @__PURE__ */ jsxRuntime.jsx(CountdownSection, { section, theme });
|
|
3276
|
+
case "location_card":
|
|
3277
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LocationCardSection, { section, theme, onEvent });
|
|
3156
3278
|
case "divider":
|
|
3157
3279
|
return /* @__PURE__ */ jsxRuntime.jsx(DividerSection, { theme });
|
|
3158
3280
|
default:
|