@neowhale/storefront 0.2.45 → 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.
@@ -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,150 @@ function CountdownSection({ section, theme }) {
3083
3083
  ] }, u.label)) })
3084
3084
  ] });
3085
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
+ }
3086
3230
  function SectionRenderer({
3087
3231
  section,
3088
3232
  data,
@@ -3127,6 +3271,8 @@ function SectionRenderer({
3127
3271
  return /* @__PURE__ */ jsx(TrustBadgesSection, { section, theme });
3128
3272
  case "countdown":
3129
3273
  return /* @__PURE__ */ jsx(CountdownSection, { section, theme });
3274
+ case "location_card":
3275
+ return /* @__PURE__ */ jsx(LocationCardSection, { section, theme, onEvent });
3130
3276
  case "divider":
3131
3277
  return /* @__PURE__ */ jsx(DividerSection, { theme });
3132
3278
  default: