@neowhale/storefront 0.2.46 → 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.
@@ -3083,149 +3083,178 @@ 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
+ }
3086
3110
  function LocationCardSection({ section, theme, onEvent }) {
3087
3111
  const c = section.content;
3088
3112
  const locations = c.locations || [];
3089
3113
  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: {
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: {
3091
3116
  display: "grid",
3092
- gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 2)}, 1fr)`,
3093
- gap: "2px",
3117
+ gridTemplateColumns: locations.length === 1 ? "minmax(0, 420px)" : `repeat(${Math.min(locations.length, 4)}, 1fr)`,
3118
+ gap: "clamp(0.75rem, 2vw, 1rem)",
3094
3119
  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)",
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",
3139
3126
  display: "flex",
3140
- flexDirection: "column",
3141
- gap: "0.5rem",
3142
- flex: 1
3127
+ flexDirection: "column"
3143
3128
  }, 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
- ", ",
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: [
3164
3159
  loc.city,
3165
3160
  ", ",
3166
3161
  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(
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(
3181
3175
  "a",
3182
3176
  {
3183
- href: loc.directions_url || `https://maps.google.com/?q=${encodeURIComponent(loc.address + ", " + loc.city + ", " + loc.state)}`,
3177
+ href: dirUrl,
3184
3178
  target: "_blank",
3185
3179
  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"
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
+ ]
3202
3188
  }
3203
3189
  ),
3204
- loc.shop_url && /* @__PURE__ */ jsx(
3190
+ loc.phone && /* @__PURE__ */ jsx(
3205
3191
  "a",
3206
3192
  {
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"
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
3224
3196
  }
3225
- )
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
+ ] })
3226
3255
  ] })
3227
- ] })
3228
- ] }, i)) }) });
3256
+ ] }, i);
3257
+ }) }) });
3229
3258
  }
3230
3259
  function SectionRenderer({
3231
3260
  section,