@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
package/dist/react/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { F as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, G as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, D as DealValidation, C as Cart, H as ReferralStatus, I as ReferralEnrollment, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-
|
|
4
|
+
import { F as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, G as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, D as DealValidation, C as Cart, H as ReferralStatus, I as ReferralEnrollment, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-CiKYpyRa.cjs';
|
|
5
5
|
import { ThemeTokens } from '@neowhale/ui';
|
|
6
6
|
import * as zustand_middleware from 'zustand/middleware';
|
|
7
7
|
import * as zustand from 'zustand';
|
|
8
|
-
import { P as PixelManager } from '../pixel-manager-
|
|
8
|
+
import { P as PixelManager } from '../pixel-manager-DoH7abe_.cjs';
|
|
9
9
|
|
|
10
10
|
interface WhaleProviderProps extends WhaleStorefrontConfig {
|
|
11
11
|
children: ReactNode;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { F as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, G as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, D as DealValidation, C as Cart, H as ReferralStatus, I as ReferralEnrollment, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-
|
|
4
|
+
import { F as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, G as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, D as DealValidation, C as Cart, H as ReferralStatus, I as ReferralEnrollment, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-CiKYpyRa.js';
|
|
5
5
|
import { ThemeTokens } from '@neowhale/ui';
|
|
6
6
|
import * as zustand_middleware from 'zustand/middleware';
|
|
7
7
|
import * as zustand from 'zustand';
|
|
8
|
-
import { P as PixelManager } from '../pixel-manager-
|
|
8
|
+
import { P as PixelManager } from '../pixel-manager-DLJ39HCy.js';
|
|
9
9
|
|
|
10
10
|
interface WhaleProviderProps extends WhaleStorefrontConfig {
|
|
11
11
|
children: ReactNode;
|
package/dist/react/index.js
CHANGED
|
@@ -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: {
|
|
2312
|
-
"
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
{
|
|
2323
|
-
|
|
2324
|
-
|
|
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",
|
|
@@ -3107,6 +3083,150 @@ function CountdownSection({ section, theme }) {
|
|
|
3107
3083
|
] }, u.label)) })
|
|
3108
3084
|
] });
|
|
3109
3085
|
}
|
|
3086
|
+
function LocationCardSection({ section, theme, onEvent }) {
|
|
3087
|
+
const c = section.content;
|
|
3088
|
+
const locations = c.locations || [];
|
|
3089
|
+
if (locations.length === 0) return null;
|
|
3090
|
+
return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsx("div", { style: {
|
|
3091
|
+
display: "grid",
|
|
3092
|
+
gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 2)}, 1fr)`,
|
|
3093
|
+
gap: "2px",
|
|
3094
|
+
justifyContent: "center"
|
|
3095
|
+
}, children: locations.map((loc, i) => /* @__PURE__ */ jsxs("div", { style: {
|
|
3096
|
+
background: theme.surface,
|
|
3097
|
+
overflow: "hidden",
|
|
3098
|
+
display: "flex",
|
|
3099
|
+
flexDirection: "column"
|
|
3100
|
+
}, children: [
|
|
3101
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative", aspectRatio: "4/5", overflow: "hidden" }, children: [
|
|
3102
|
+
/* @__PURE__ */ jsx(
|
|
3103
|
+
"img",
|
|
3104
|
+
{
|
|
3105
|
+
src: loc.image,
|
|
3106
|
+
alt: loc.name,
|
|
3107
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
|
|
3108
|
+
}
|
|
3109
|
+
),
|
|
3110
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
3111
|
+
position: "absolute",
|
|
3112
|
+
inset: 0,
|
|
3113
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%)"
|
|
3114
|
+
} }),
|
|
3115
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "absolute", bottom: 0, left: 0, padding: "clamp(0.75rem, 3vw, 1.25rem)" }, children: [
|
|
3116
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
3117
|
+
fontSize: "clamp(1.25rem, 5vw, 1.75rem)",
|
|
3118
|
+
fontWeight: 300,
|
|
3119
|
+
fontFamily: theme.fontDisplay || "inherit",
|
|
3120
|
+
color: "#fff",
|
|
3121
|
+
margin: 0,
|
|
3122
|
+
lineHeight: 1.1
|
|
3123
|
+
}, children: loc.name }),
|
|
3124
|
+
/* @__PURE__ */ jsxs("p", { style: {
|
|
3125
|
+
fontSize: "0.65rem",
|
|
3126
|
+
letterSpacing: "0.2em",
|
|
3127
|
+
color: "rgba(255,255,255,0.6)",
|
|
3128
|
+
margin: "0.25rem 0 0",
|
|
3129
|
+
fontWeight: 600
|
|
3130
|
+
}, children: [
|
|
3131
|
+
loc.city,
|
|
3132
|
+
", ",
|
|
3133
|
+
loc.state
|
|
3134
|
+
] })
|
|
3135
|
+
] })
|
|
3136
|
+
] }),
|
|
3137
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
3138
|
+
padding: "clamp(0.75rem, 3vw, 1.25rem)",
|
|
3139
|
+
display: "flex",
|
|
3140
|
+
flexDirection: "column",
|
|
3141
|
+
gap: "0.5rem",
|
|
3142
|
+
flex: 1
|
|
3143
|
+
}, children: [
|
|
3144
|
+
loc.tagline && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: `${theme.fg}80`, fontWeight: 500, fontStyle: "italic", margin: 0 }, children: loc.tagline }),
|
|
3145
|
+
loc.rating != null && loc.review_count != null && loc.review_count > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
|
|
3146
|
+
/* @__PURE__ */ jsx(Stars, { rating: loc.rating, color: theme.accent, size: 13 }),
|
|
3147
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.75rem", color: `${theme.fg}99` }, children: [
|
|
3148
|
+
loc.rating.toFixed(1),
|
|
3149
|
+
" (",
|
|
3150
|
+
loc.review_count,
|
|
3151
|
+
")"
|
|
3152
|
+
] })
|
|
3153
|
+
] }),
|
|
3154
|
+
loc.address && /* @__PURE__ */ jsxs(
|
|
3155
|
+
"a",
|
|
3156
|
+
{
|
|
3157
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
3158
|
+
target: "_blank",
|
|
3159
|
+
rel: "noopener noreferrer",
|
|
3160
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none", lineHeight: 1.5 },
|
|
3161
|
+
children: [
|
|
3162
|
+
loc.address,
|
|
3163
|
+
", ",
|
|
3164
|
+
loc.city,
|
|
3165
|
+
", ",
|
|
3166
|
+
loc.state
|
|
3167
|
+
]
|
|
3168
|
+
}
|
|
3169
|
+
),
|
|
3170
|
+
loc.phone && /* @__PURE__ */ jsx(
|
|
3171
|
+
"a",
|
|
3172
|
+
{
|
|
3173
|
+
href: loc.phone_href || `tel:${loc.phone}`,
|
|
3174
|
+
style: { fontSize: "0.75rem", color: `${theme.fg}55`, fontWeight: 500, textDecoration: "none" },
|
|
3175
|
+
children: loc.phone
|
|
3176
|
+
}
|
|
3177
|
+
),
|
|
3178
|
+
loc.hours && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.7rem", color: `${theme.fg}40`, margin: 0 }, children: loc.hours }),
|
|
3179
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", marginTop: "auto", paddingTop: "0.25rem" }, children: [
|
|
3180
|
+
/* @__PURE__ */ jsx(
|
|
3181
|
+
"a",
|
|
3182
|
+
{
|
|
3183
|
+
href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
|
|
3184
|
+
target: "_blank",
|
|
3185
|
+
rel: "noopener noreferrer",
|
|
3186
|
+
onClick: () => onEvent?.("cta_click", { label: "directions", location: loc.name }),
|
|
3187
|
+
style: {
|
|
3188
|
+
flex: 1,
|
|
3189
|
+
display: "flex",
|
|
3190
|
+
alignItems: "center",
|
|
3191
|
+
justifyContent: "center",
|
|
3192
|
+
padding: "0.625rem",
|
|
3193
|
+
background: theme.fg,
|
|
3194
|
+
color: theme.bg,
|
|
3195
|
+
fontSize: "0.7rem",
|
|
3196
|
+
fontWeight: 700,
|
|
3197
|
+
letterSpacing: "0.1em",
|
|
3198
|
+
textDecoration: "none",
|
|
3199
|
+
textAlign: "center"
|
|
3200
|
+
},
|
|
3201
|
+
children: "directions"
|
|
3202
|
+
}
|
|
3203
|
+
),
|
|
3204
|
+
loc.shop_url && /* @__PURE__ */ jsx(
|
|
3205
|
+
"a",
|
|
3206
|
+
{
|
|
3207
|
+
href: loc.shop_url,
|
|
3208
|
+
onClick: () => onEvent?.("cta_click", { label: "shop", location: loc.name }),
|
|
3209
|
+
style: {
|
|
3210
|
+
flex: 1,
|
|
3211
|
+
display: "flex",
|
|
3212
|
+
alignItems: "center",
|
|
3213
|
+
justifyContent: "center",
|
|
3214
|
+
padding: "0.625rem",
|
|
3215
|
+
border: `1px solid ${theme.fg}20`,
|
|
3216
|
+
color: `${theme.fg}CC`,
|
|
3217
|
+
fontSize: "0.7rem",
|
|
3218
|
+
fontWeight: 700,
|
|
3219
|
+
letterSpacing: "0.1em",
|
|
3220
|
+
textDecoration: "none",
|
|
3221
|
+
textAlign: "center"
|
|
3222
|
+
},
|
|
3223
|
+
children: "shop"
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
] })
|
|
3227
|
+
] })
|
|
3228
|
+
] }, i)) }) });
|
|
3229
|
+
}
|
|
3110
3230
|
function SectionRenderer({
|
|
3111
3231
|
section,
|
|
3112
3232
|
data,
|
|
@@ -3151,6 +3271,8 @@ function SectionRenderer({
|
|
|
3151
3271
|
return /* @__PURE__ */ jsx(TrustBadgesSection, { section, theme });
|
|
3152
3272
|
case "countdown":
|
|
3153
3273
|
return /* @__PURE__ */ jsx(CountdownSection, { section, theme });
|
|
3274
|
+
case "location_card":
|
|
3275
|
+
return /* @__PURE__ */ jsx(LocationCardSection, { section, theme, onEvent });
|
|
3154
3276
|
case "divider":
|
|
3155
3277
|
return /* @__PURE__ */ jsx(DividerSection, { theme });
|
|
3156
3278
|
default:
|