@neowhale/storefront 0.2.45 → 0.2.47

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.
@@ -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-D7_7p7ja.cjs';
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-Blj8hb-X.cjs';
8
+ import { P as PixelManager } from '../pixel-manager-DoH7abe_.cjs';
9
9
 
10
10
  interface WhaleProviderProps extends WhaleStorefrontConfig {
11
11
  children: ReactNode;
@@ -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-D7_7p7ja.js';
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-DB8LLw9V.js';
8
+ import { P as PixelManager } from '../pixel-manager-DLJ39HCy.js';
9
9
 
10
10
  interface WhaleProviderProps extends WhaleStorefrontConfig {
11
11
  children: ReactNode;
@@ -3083,6 +3083,179 @@ function CountdownSection({ section, theme }) {
3083
3083
  ] }, u.label)) })
3084
3084
  ] });
3085
3085
  }
3086
+ var PIN_SVG = '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg>';
3087
+ var BAG_SVG = '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4z"/><line x1="3" y1="6" x2="21" y2="6"/><path d="M16 10a4 4 0 01-8 0"/></svg>';
3088
+ var STAR_PATH = "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z";
3089
+ function LocationStars({ rating, count, accent }) {
3090
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3091
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2px" }, children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ jsx(
3092
+ "svg",
3093
+ {
3094
+ width: 12,
3095
+ height: 12,
3096
+ viewBox: "0 0 20 20",
3097
+ fill: s <= Math.round(rating) ? accent : "rgba(255,255,255,0.1)",
3098
+ children: /* @__PURE__ */ jsx("path", { d: STAR_PATH })
3099
+ },
3100
+ s
3101
+ )) }),
3102
+ /* @__PURE__ */ jsxs("span", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.75rem", fontWeight: 500 }, children: [
3103
+ rating.toFixed(1),
3104
+ " \xB7 ",
3105
+ count,
3106
+ " reviews"
3107
+ ] })
3108
+ ] });
3109
+ }
3110
+ function LocationCardSection({ section, theme, onEvent }) {
3111
+ const c = section.content;
3112
+ const locations = c.locations || [];
3113
+ if (locations.length === 0) return null;
3114
+ const brandFont = c.brand_font || "inherit";
3115
+ return /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 1rem", maxWidth: 900, margin: "0 auto" }, children: /* @__PURE__ */ jsx("div", { style: {
3116
+ display: "grid",
3117
+ gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 4)}, 1fr)`,
3118
+ gap: "clamp(0.75rem, 2vw, 1rem)",
3119
+ justifyContent: "center"
3120
+ }, children: locations.map((loc, i) => {
3121
+ const dirUrl = loc.directions_url || `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`;
3122
+ return /* @__PURE__ */ jsxs("div", { style: {
3123
+ background: "#0C0C0C",
3124
+ border: "1px solid rgba(255,255,255,0.06)",
3125
+ overflow: "hidden",
3126
+ display: "flex",
3127
+ flexDirection: "column"
3128
+ }, children: [
3129
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative", aspectRatio: "4/5", overflow: "hidden" }, children: [
3130
+ /* @__PURE__ */ jsx(
3131
+ "img",
3132
+ {
3133
+ src: loc.image,
3134
+ alt: loc.name,
3135
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
3136
+ }
3137
+ ),
3138
+ /* @__PURE__ */ jsx("div", { style: {
3139
+ position: "absolute",
3140
+ inset: 0,
3141
+ background: "linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%)"
3142
+ } }),
3143
+ /* @__PURE__ */ jsxs("div", { style: { position: "absolute", bottom: 0, left: 0, padding: "clamp(1rem, 3vw, 1.25rem)" }, children: [
3144
+ /* @__PURE__ */ jsx("p", { style: {
3145
+ fontFamily: brandFont,
3146
+ fontSize: "clamp(1.5rem, 6vw, 1.875rem)",
3147
+ color: "#fff",
3148
+ margin: 0,
3149
+ lineHeight: 1
3150
+ }, children: loc.name }),
3151
+ /* @__PURE__ */ jsxs("p", { style: {
3152
+ fontSize: "clamp(0.65rem, 1.5vw, 0.75rem)",
3153
+ letterSpacing: "0.2em",
3154
+ color: "rgba(255,255,255,0.6)",
3155
+ margin: "0.375rem 0 0",
3156
+ fontWeight: 600,
3157
+ textTransform: "uppercase"
3158
+ }, children: [
3159
+ loc.city,
3160
+ ", ",
3161
+ loc.state
3162
+ ] })
3163
+ ] })
3164
+ ] }),
3165
+ /* @__PURE__ */ jsxs("div", { style: {
3166
+ padding: "clamp(0.875rem, 3vw, 1.25rem)",
3167
+ display: "flex",
3168
+ flexDirection: "column",
3169
+ gap: "0.625rem",
3170
+ flex: 1
3171
+ }, children: [
3172
+ loc.tagline && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8125rem", color: "rgba(255,255,255,0.5)", fontWeight: 500, fontStyle: "italic", margin: 0 }, children: loc.tagline }),
3173
+ loc.rating != null && loc.review_count != null && loc.review_count > 0 && /* @__PURE__ */ jsx(LocationStars, { rating: loc.rating, count: loc.review_count, accent: theme.accent }),
3174
+ loc.address && /* @__PURE__ */ jsxs(
3175
+ "a",
3176
+ {
3177
+ href: dirUrl,
3178
+ target: "_blank",
3179
+ rel: "noopener noreferrer",
3180
+ style: { fontSize: "0.75rem", color: "rgba(255,255,255,0.35)", fontWeight: 500, textDecoration: "none", lineHeight: 1.6 },
3181
+ children: [
3182
+ loc.address,
3183
+ ", ",
3184
+ loc.city,
3185
+ ", ",
3186
+ loc.state
3187
+ ]
3188
+ }
3189
+ ),
3190
+ loc.phone && /* @__PURE__ */ jsx(
3191
+ "a",
3192
+ {
3193
+ href: loc.phone_href || `tel:${loc.phone}`,
3194
+ style: { fontSize: "0.75rem", color: "rgba(255,255,255,0.35)", fontWeight: 500, textDecoration: "none" },
3195
+ children: loc.phone
3196
+ }
3197
+ ),
3198
+ loc.hours && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.75rem", color: "rgba(255,255,255,0.35)", fontWeight: 500, margin: 0 }, children: loc.hours }),
3199
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", marginTop: "auto", paddingTop: "0.25rem" }, children: [
3200
+ /* @__PURE__ */ jsxs(
3201
+ "a",
3202
+ {
3203
+ href: dirUrl,
3204
+ target: "_blank",
3205
+ rel: "noopener noreferrer",
3206
+ onClick: () => onEvent?.("cta_click", { label: "directions", location: loc.name }),
3207
+ style: {
3208
+ flex: 1,
3209
+ display: "flex",
3210
+ alignItems: "center",
3211
+ justifyContent: "center",
3212
+ gap: "0.375rem",
3213
+ padding: "0.625rem",
3214
+ background: "#fff",
3215
+ color: "#000",
3216
+ fontSize: "clamp(0.65rem, 1.5vw, 0.75rem)",
3217
+ fontWeight: 700,
3218
+ letterSpacing: "0.1em",
3219
+ textTransform: "uppercase",
3220
+ textDecoration: "none"
3221
+ },
3222
+ children: [
3223
+ /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: PIN_SVG } }),
3224
+ "Directions"
3225
+ ]
3226
+ }
3227
+ ),
3228
+ loc.shop_url && /* @__PURE__ */ jsxs(
3229
+ "a",
3230
+ {
3231
+ href: loc.shop_url,
3232
+ onClick: () => onEvent?.("cta_click", { label: "shop", location: loc.name }),
3233
+ style: {
3234
+ flex: 1,
3235
+ display: "flex",
3236
+ alignItems: "center",
3237
+ justifyContent: "center",
3238
+ gap: "0.375rem",
3239
+ padding: "0.625rem",
3240
+ border: "1px solid rgba(255,255,255,0.15)",
3241
+ color: "rgba(255,255,255,0.8)",
3242
+ fontSize: "clamp(0.65rem, 1.5vw, 0.75rem)",
3243
+ fontWeight: 700,
3244
+ letterSpacing: "0.1em",
3245
+ textTransform: "uppercase",
3246
+ textDecoration: "none"
3247
+ },
3248
+ children: [
3249
+ /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: BAG_SVG } }),
3250
+ "Shop"
3251
+ ]
3252
+ }
3253
+ )
3254
+ ] })
3255
+ ] })
3256
+ ] }, i);
3257
+ }) }) });
3258
+ }
3086
3259
  function SectionRenderer({
3087
3260
  section,
3088
3261
  data,
@@ -3127,6 +3300,8 @@ function SectionRenderer({
3127
3300
  return /* @__PURE__ */ jsx(TrustBadgesSection, { section, theme });
3128
3301
  case "countdown":
3129
3302
  return /* @__PURE__ */ jsx(CountdownSection, { section, theme });
3303
+ case "location_card":
3304
+ return /* @__PURE__ */ jsx(LocationCardSection, { section, theme, onEvent });
3130
3305
  case "divider":
3131
3306
  return /* @__PURE__ */ jsx(DividerSection, { theme });
3132
3307
  default: