@loczer/storefront-sdk 0.186.0 → 0.187.0

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.
@@ -125,6 +125,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
125
125
  languages?: string[] | undefined;
126
126
  } | undefined;
127
127
  content?: {
128
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
128
129
  galleryImageIds: string[];
129
130
  whatsappPhone1Enabled: boolean;
130
131
  whatsappPhone2Enabled: boolean;
@@ -358,6 +359,7 @@ export declare function useStorefrontConfig(): {
358
359
  languages?: string[] | undefined;
359
360
  } | undefined;
360
361
  content?: {
362
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
361
363
  galleryImageIds: string[];
362
364
  whatsappPhone1Enabled: boolean;
363
365
  whatsappPhone2Enabled: boolean;
@@ -581,6 +583,7 @@ export declare function useStorefrontConfig(): {
581
583
  languages?: string[] | undefined;
582
584
  } | undefined;
583
585
  content?: {
586
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
584
587
  galleryImageIds: string[];
585
588
  whatsappPhone1Enabled: boolean;
586
589
  whatsappPhone2Enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../src/StorefrontProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAiC,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAEjG,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAGvB,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C"}
@@ -12,27 +12,27 @@ import { cn as d, useScrollHideOnDown as f } from "@rpcbase/ui";
12
12
  import { useMediaQuery as p, useThrottledMeasure as m } from "@rpcbase/client";
13
13
  import { Link as h, useLocation as g, useParams as _ } from "@rpcbase/router";
14
14
  import { useTranslation as v } from "react-i18next";
15
- import { ArrowRight as y, Bike as b, ShoppingCart as x } from "lucide-react";
15
+ import { ArrowRight as y, ShoppingCart as b } from "lucide-react";
16
16
  //#region src/components/Header/index.tsx
17
- var S = 36, C = (e, t) => {
17
+ var x = 36, S = (e, t) => {
18
18
  let n = e?.trim() ?? "";
19
19
  return n ? r(n, t ?? "") : "";
20
20
  };
21
- function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay: T }) {
22
- let { t: E, i18n: D } = v(), { storeSlug: O } = _(), k = g(), { itemCount: A } = t(), j = p("(max-width: 640px)"), [M, ee] = m(), N = ee?.height ?? S, P = f({
23
- enabled: j,
21
+ function C({ storefrontConfiguration: r, whatsappHref: C, whatsappPhoneDisplay: w }) {
22
+ let { t: T, i18n: E } = v(), { storeSlug: D } = _(), O = g(), { itemCount: k } = t(), A = p("(max-width: 640px)"), [j, M] = m(), N = M?.height ?? x, P = f({
23
+ enabled: A,
24
24
  thresholdPx: N
25
- }), F = j && P ? `translateY(-${N}px)` : "translateY(0)", I = () => {
26
- let e = D.language.startsWith("fr") ? "en" : "fr";
27
- D.changeLanguage(e);
28
- }, L = `/${O ?? ""}`, R = e(new URLSearchParams(k.search), O).toString(), z = R ? `?${R}` : "", B = `${L}/booking${z}`, V = `${L}/checkout${z}`, H = r?.shop.name?.trim() ?? "", U = r?.shop.emailAddress?.trim() ?? "", W = r?.workspace?.workspaceLanguage, G = n(r?.content?.tagline, D.language, W).trim(), K = o(r?.shop), q = G || K || "[Missing shop address]", J = !G && !K, Y = n(r?.content?.topBannerMessage, D.language, W).trim() || E("top_bar_message"), X = C(r?.content?.logoWideImageId, O), Z = C(r?.shop.logoImageId ?? r?.content?.logoSquareImageId, O), Q = X.length > 0, $ = Z.length > 0;
25
+ }), F = A && P ? `translateY(-${N}px)` : "translateY(0)", I = () => {
26
+ let e = E.language.startsWith("fr") ? "en" : "fr";
27
+ E.changeLanguage(e);
28
+ }, L = `/${D ?? ""}`, R = e(new URLSearchParams(O.search), D).toString(), z = R ? `?${R}` : "", B = `${L}/booking${z}`, V = `${L}/checkout${z}`, H = r?.shop.name?.trim() ?? "", U = r?.shop.emailAddress?.trim() ?? "", W = r?.workspace?.workspaceLanguage, G = n(r?.content?.tagline, E.language, W).trim(), K = o(r?.shop), q = G || K || "[Missing shop address]", J = !G && !K, Y = n(r?.content?.topBannerMessage, E.language, W).trim() || T("top_bar_message"), X = S(r?.content?.logoWideImageId, D), Z = S(r?.shop.logoImageId ?? r?.content?.logoSquareImageId, D), Q = X.length > 0, $ = Z.length > 0;
29
29
  return /* @__PURE__ */ u("div", {
30
30
  className: "sticky top-0 z-30",
31
31
  children: [/* @__PURE__ */ l("div", {
32
32
  className: "transition-transform duration-300",
33
33
  style: { transform: F },
34
34
  children: /* @__PURE__ */ l("div", {
35
- ref: M,
35
+ ref: j,
36
36
  className: "bg-slate-950 text-white",
37
37
  children: /* @__PURE__ */ u("div", {
38
38
  className: "mx-auto flex max-w-7xl items-center justify-between gap-3 px-4 py-2 text-xs sm:px-6",
@@ -49,18 +49,18 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
49
49
  }) : /* @__PURE__ */ l("span", {
50
50
  className: "inline-flex items-center rounded-md px-2 py-1 text-destructive",
51
51
  children: a
52
- }), w ? /* @__PURE__ */ u("a", {
52
+ }), C ? /* @__PURE__ */ u("a", {
53
53
  className: "inline-flex items-center gap-2 rounded-md px-2 py-1 text-white/90 hover:bg-white/10 hover:text-white",
54
- href: w,
54
+ href: C,
55
55
  target: "_blank",
56
56
  rel: "noreferrer",
57
- "aria-label": `WhatsApp${T ? ` ${T}` : ""}`,
57
+ "aria-label": `WhatsApp${w ? ` ${w}` : ""}`,
58
58
  children: [/* @__PURE__ */ l("img", {
59
59
  src: i,
60
60
  className: "h-5 w-5 shrink-0",
61
61
  alt: "",
62
62
  "aria-hidden": "true"
63
- }), T ? /* @__PURE__ */ l("span", { children: T }) : null]
63
+ }), w ? /* @__PURE__ */ l("span", { children: w }) : null]
64
64
  }) : null]
65
65
  })]
66
66
  })
@@ -83,10 +83,11 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
83
83
  "aria-hidden": "true"
84
84
  })
85
85
  }) : Q ? null : /* @__PURE__ */ l("span", {
86
- className: "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-slate-950 text-white",
87
- children: /* @__PURE__ */ l(b, {
88
- className: "h-5 w-5",
89
- "aria-hidden": "true"
86
+ className: "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border-2 border-dashed border-slate-300 bg-slate-50 text-slate-400",
87
+ children: /* @__PURE__ */ l("span", {
88
+ className: "text-lg font-semibold leading-none",
89
+ "aria-hidden": "true",
90
+ children: "?"
90
91
  })
91
92
  }), /* @__PURE__ */ u("span", {
92
93
  className: "flex min-w-0 flex-col leading-tight",
@@ -109,22 +110,22 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
109
110
  /* @__PURE__ */ l(h, {
110
111
  className: "hover:text-slate-950",
111
112
  to: `${L}${z}#categories`,
112
- children: /* @__PURE__ */ l("span", { children: E("nav_categories") })
113
+ children: /* @__PURE__ */ l("span", { children: T("nav_categories") })
113
114
  }),
114
115
  /* @__PURE__ */ l(h, {
115
116
  className: "hover:text-slate-950",
116
117
  to: `${L}${z}#featured`,
117
- children: /* @__PURE__ */ l("span", { children: E("nav_featured") })
118
+ children: /* @__PURE__ */ l("span", { children: T("nav_featured") })
118
119
  }),
119
120
  /* @__PURE__ */ l(h, {
120
121
  className: "hover:text-slate-950",
121
122
  to: B,
122
- children: /* @__PURE__ */ l("span", { children: E("nav_products") })
123
+ children: /* @__PURE__ */ l("span", { children: T("nav_products") })
123
124
  }),
124
125
  /* @__PURE__ */ l(h, {
125
126
  className: "hover:text-slate-950",
126
127
  to: `${L}${z}#contact`,
127
- children: /* @__PURE__ */ l("span", { children: E("nav_contact") })
128
+ children: /* @__PURE__ */ l("span", { children: T("nav_contact") })
128
129
  })
129
130
  ]
130
131
  }),
@@ -136,24 +137,24 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
136
137
  size: "sm",
137
138
  className: "hidden sm:inline-flex",
138
139
  onClick: I,
139
- children: /* @__PURE__ */ l("span", { children: E("language_toggle") })
140
+ children: /* @__PURE__ */ l("span", { children: T("language_toggle") })
140
141
  }),
141
142
  /* @__PURE__ */ l(c, {
142
143
  asChild: !0,
143
144
  variant: "outline",
144
145
  size: "sm",
145
- className: d("relative gap-2", A > 0 ? "inline-flex" : "hidden"),
146
+ className: d("relative gap-2", k > 0 ? "inline-flex" : "hidden"),
146
147
  children: /* @__PURE__ */ u(h, {
147
148
  to: V,
148
149
  children: [
149
- /* @__PURE__ */ l(x, {
150
+ /* @__PURE__ */ l(b, {
150
151
  className: "h-4 w-4",
151
152
  "aria-hidden": "true"
152
153
  }),
153
- /* @__PURE__ */ l("span", { children: E("cart_button") }),
154
+ /* @__PURE__ */ l("span", { children: T("cart_button") }),
154
155
  /* @__PURE__ */ l(s, {
155
156
  className: "absolute -right-2 -top-2 h-5 min-w-5 rounded-full px-1.5 text-xs",
156
- children: /* @__PURE__ */ l("span", { children: A })
157
+ children: /* @__PURE__ */ l("span", { children: k })
157
158
  })
158
159
  ]
159
160
  })
@@ -164,7 +165,7 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
164
165
  className: "gap-2",
165
166
  children: /* @__PURE__ */ u(h, {
166
167
  to: B,
167
- children: [/* @__PURE__ */ l("span", { children: E("cta_book_now") }), /* @__PURE__ */ l(y, {
168
+ children: [/* @__PURE__ */ l("span", { children: T("cta_book_now") }), /* @__PURE__ */ l(y, {
168
169
  className: "h-4 w-4",
169
170
  "aria-hidden": "true"
170
171
  })]
@@ -178,4 +179,4 @@ function w({ storefrontConfiguration: r, whatsappHref: w, whatsappPhoneDisplay:
178
179
  });
179
180
  }
180
181
  //#endregion
181
- export { w as Header };
182
+ export { C as Header };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PlaygroundDevFloatingButton/index.tsx"],"names":[],"mappings":"AAsDA,eAAO,MAAM,2BAA2B,sDAiWvC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PlaygroundDevFloatingButton/index.tsx"],"names":[],"mappings":"AAqDA,eAAO,MAAM,2BAA2B,sDAoWvC,CAAA"}
@@ -1,12 +1,12 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
2
  import { Button as t } from "../../ui/button.js";
3
3
  import n from "../../chunks/assets/dev-D2oG3j7S.js";
4
- import { DEFAULT_PLAYGROUND_DEV_SETTINGS as r, resetPlaygroundDevSettings as i, usePlaygroundDevSettings as a, writePlaygroundDevSettings as o } from "../../lib/playgroundDevSettings.js";
5
- import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
6
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import m from "interactjs";
4
+ import { resetPlaygroundDevSettings as r, usePlaygroundDevSettings as i, writePlaygroundDevSettings as a } from "../../lib/playgroundDevSettings.js";
5
+ import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
6
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import p from "interactjs";
8
8
  //#region src/components/PlaygroundDevFloatingButton/index.tsx
9
- var h = [
9
+ var m = [
10
10
  {
11
11
  value: "current_booking_hero",
12
12
  label: "Current booking hero",
@@ -22,58 +22,58 @@ var h = [
22
22
  label: "Vertical marquee hero",
23
23
  hint: "Keep the overlay booking bar and swap the static image for a vertical animated gallery"
24
24
  }
25
- ], g = () => {
26
- let g = a(), [_, v] = d(!1), [y, b] = d({
25
+ ], h = () => {
26
+ let h = i(), [g, _] = u(!1), [v, y] = u({
27
27
  horizontal: "left",
28
28
  vertical: "above"
29
- }), x = u(null), S = u(null), C = u(null), w = u(!1), T = u(!1), E = u({
29
+ }), b = l(null), x = l(null), S = l(null), C = l(!1), w = l(!1), T = l({
30
30
  x: 0,
31
31
  y: 0
32
- }), D = u(null), O = u(null), k = g.heroMode !== r.heroMode, A = s((e) => {
33
- o({
34
- ...g,
32
+ }), E = l(null), D = l(null), O = h.heroMode !== null, k = o((e) => {
33
+ a({
34
+ ...h,
35
35
  heroMode: e
36
36
  });
37
- }, [g]), j = s(() => {
38
- x.current != null && (window.clearTimeout(x.current), x.current = null);
39
- }, []), M = s(() => {
40
- let e = S.current, t = C.current;
37
+ }, [h]), A = o(() => {
38
+ b.current != null && (window.clearTimeout(b.current), b.current = null);
39
+ }, []), j = o(() => {
40
+ let e = x.current, t = S.current;
41
41
  if (!e || !t || typeof window > "u") return;
42
42
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = n.left + r.width + 16 > i ? "right" : "left", o = n.top - r.height - 16 < 0 ? "below" : "above";
43
- b((e) => e.horizontal === a && e.vertical === o ? e : {
43
+ y((e) => e.horizontal === a && e.vertical === o ? e : {
44
44
  horizontal: a,
45
45
  vertical: o
46
46
  });
47
- }, []), N = s(() => {
48
- w.current || T.current || (j(), v(!0), window.requestAnimationFrame(() => {
49
- M();
47
+ }, []), M = o(() => {
48
+ C.current || w.current || (A(), _(!0), window.requestAnimationFrame(() => {
49
+ j();
50
50
  }));
51
- }, [j, M]), P = s(() => {
52
- w.current || T.current || (j(), x.current = window.setTimeout(() => {
53
- v(!1), x.current = null;
51
+ }, [A, j]), N = o(() => {
52
+ C.current || w.current || (A(), b.current = window.setTimeout(() => {
53
+ _(!1), b.current = null;
54
54
  }, 120));
55
- }, [j]), F = s(() => {
56
- j(), v(!1);
57
- }, [j]);
58
- return c(() => {
59
- if (!_) return;
60
- M();
61
- let e = () => M();
55
+ }, [A]), P = o(() => {
56
+ A(), _(!1);
57
+ }, [A]);
58
+ return s(() => {
59
+ if (!g) return;
60
+ j();
61
+ let e = () => j();
62
62
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
63
- }, [_, M]), c(() => () => j(), [j]), c(() => {
64
- let e = S.current;
63
+ }, [g, j]), s(() => () => A(), [A]), s(() => {
64
+ let e = x.current;
65
65
  if (!e || typeof window > "u") return;
66
66
  let t = e.getBoundingClientRect();
67
- D.current = {
67
+ E.current = {
68
68
  left: t.left,
69
69
  top: t.top,
70
70
  width: t.width,
71
71
  height: t.height
72
72
  };
73
73
  let n = () => {
74
- if (!D.current) return E.current;
75
- let { left: e, top: t, width: n, height: r } = D.current, i = 8 - e, a = 8 - t, o = window.innerWidth - 8 - n - e, s = window.innerHeight - 8 - r - t, c = Math.min(Math.max(E.current.x, i), o), l = Math.min(Math.max(E.current.y, a), s);
76
- return E.current = {
74
+ if (!E.current) return T.current;
75
+ let { left: e, top: t, width: n, height: r } = E.current, i = 8 - e, a = 8 - t, o = window.innerWidth - 8 - n - e, s = window.innerHeight - 8 - r - t, c = Math.min(Math.max(T.current.x, i), o), l = Math.min(Math.max(T.current.y, a), s);
76
+ return T.current = {
77
77
  x: c,
78
78
  y: l
79
79
  }, {
@@ -88,124 +88,131 @@ var h = [
88
88
  let { x: t, y: r } = n();
89
89
  e.style.transform = `translate3d(${t}px, ${r}px, 0)`;
90
90
  }, i = () => {
91
- O.current != null && (cancelAnimationFrame(O.current), O.current = null), T.current = !1;
91
+ D.current != null && (cancelAnimationFrame(D.current), D.current = null), w.current = !1;
92
92
  }, a = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches, o = (t, o) => {
93
93
  if (a) {
94
- r(), T.current = !1;
94
+ r(), w.current = !1;
95
95
  return;
96
96
  }
97
97
  let s = performance.now();
98
- T.current = !0;
98
+ w.current = !0;
99
99
  let c = .92, l = .7, u = (r) => {
100
100
  let a = (r - s) / 1e3;
101
- s = r, E.current.x += t * a, E.current.y += o * a;
101
+ s = r, T.current.x += t * a, T.current.y += o * a;
102
102
  let { minX: d, minY: f, maxX: p, maxY: m } = n();
103
- if (E.current.x <= d + .001 && t < 0 ? (E.current.x = d, t = -t * l) : E.current.x >= p - .001 && t > 0 && (E.current.x = p, t = -t * l), E.current.y <= f + .001 && o < 0 ? (E.current.y = f, o = -o * l) : E.current.y >= m - .001 && o > 0 && (E.current.y = m, o = -o * l), t *= c, o *= c, e.style.transform = `translate3d(${E.current.x}px, ${E.current.y}px, 0)`, Math.hypot(t, o) < 20) {
103
+ if (T.current.x <= d + .001 && t < 0 ? (T.current.x = d, t = -t * l) : T.current.x >= p - .001 && t > 0 && (T.current.x = p, t = -t * l), T.current.y <= f + .001 && o < 0 ? (T.current.y = f, o = -o * l) : T.current.y >= m - .001 && o > 0 && (T.current.y = m, o = -o * l), t *= c, o *= c, e.style.transform = `translate3d(${T.current.x}px, ${T.current.y}px, 0)`, Math.hypot(t, o) < 20) {
104
104
  i();
105
105
  return;
106
106
  }
107
- O.current = requestAnimationFrame(u);
107
+ D.current = requestAnimationFrame(u);
108
108
  };
109
- O.current = requestAnimationFrame(u);
110
- }, s = m(e).draggable({ inertia: !1 }).styleCursor(!1).on("dragstart", () => {
111
- i(), w.current = !0, v(!1), j();
109
+ D.current = requestAnimationFrame(u);
110
+ }, s = p(e).draggable({ inertia: !1 }).styleCursor(!1).on("dragstart", () => {
111
+ i(), C.current = !0, _(!1), A();
112
112
  }).on("dragmove", (e) => {
113
- E.current.x += e.dx, E.current.y += e.dy, r();
113
+ T.current.x += e.dx, T.current.y += e.dy, r();
114
114
  }).on("dragend", (e) => {
115
115
  let t = Number.isFinite(e.velocityX) ? e.velocityX : 0, n = Number.isFinite(e.velocityY) ? e.velocityY : 0;
116
- w.current = !1, Math.hypot(t, n) >= 10 ? o(t, n) : (r(), i()), M();
116
+ C.current = !1, Math.hypot(t, n) >= 10 ? o(t, n) : (r(), i()), j();
117
117
  }), c = () => {
118
118
  let t = e.getBoundingClientRect();
119
- D.current = {
120
- left: t.left - E.current.x,
121
- top: t.top - E.current.y,
119
+ E.current = {
120
+ left: t.left - T.current.x,
121
+ top: t.top - T.current.y,
122
122
  width: t.width,
123
123
  height: t.height
124
- }, r(), M();
124
+ }, r(), j();
125
125
  };
126
- return window.addEventListener("resize", c), r(), M(), () => {
126
+ return window.addEventListener("resize", c), r(), j(), () => {
127
127
  s.unset(), i(), window.removeEventListener("resize", c);
128
128
  };
129
- }, [j, M]), l(() => !1, []) ? /* @__PURE__ */ f("div", {
129
+ }, [A, j]), c(() => !1, []) ? /* @__PURE__ */ d("div", {
130
130
  className: "fixed bottom-4 left-4 z-50 pointer-events-none select-none",
131
- children: /* @__PURE__ */ f("div", {
132
- ref: S,
131
+ children: /* @__PURE__ */ d("div", {
132
+ ref: x,
133
133
  className: "pointer-events-auto",
134
134
  style: { touchAction: "none" },
135
- children: /* @__PURE__ */ p("div", {
135
+ children: /* @__PURE__ */ f("div", {
136
136
  className: "relative",
137
- onMouseEnter: N,
138
- onMouseLeave: P,
139
- onFocusCapture: N,
137
+ onMouseEnter: M,
138
+ onMouseLeave: N,
139
+ onFocusCapture: M,
140
140
  onBlurCapture: (e) => {
141
141
  let t = e.relatedTarget;
142
- (!t || !e.currentTarget.contains(t)) && P();
142
+ (!t || !e.currentTarget.contains(t)) && N();
143
143
  },
144
- children: [/* @__PURE__ */ f("button", {
144
+ children: [/* @__PURE__ */ d("button", {
145
145
  type: "button",
146
146
  "aria-label": "Playground developer tools",
147
147
  className: e("inline-flex h-14 w-14 md:h-12 md:w-12 items-center justify-center rounded-full shadow-lg ring-1 transition-colors p-1 cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/90 focus-visible:ring-offset-2 focus-visible:ring-offset-pink-600", "bg-pink-600 hover:bg-pink-700 ring-pink-700"),
148
- onMouseDown: F,
149
- onTouchStart: F,
150
- onFocus: N,
148
+ onMouseDown: P,
149
+ onTouchStart: P,
150
+ onFocus: M,
151
151
  onKeyDown: (e) => {
152
- e.key === "Escape" && (v(!1), j());
152
+ e.key === "Escape" && (_(!1), A());
153
153
  },
154
- children: /* @__PURE__ */ f("img", {
154
+ children: /* @__PURE__ */ d("img", {
155
155
  src: n,
156
156
  className: "h-9 w-9 md:h-8 md:w-8",
157
157
  alt: "",
158
158
  draggable: !1
159
159
  })
160
- }), /* @__PURE__ */ p("div", {
161
- ref: C,
162
- className: e("absolute w-80 rounded-xl border border-pink-500/40 bg-gray-950/95 text-gray-100 shadow-xl backdrop-blur-sm transition-all duration-150", y.vertical === "above" ? "bottom-full mb-3" : "top-full mt-3", y.horizontal === "left" ? "left-0" : "right-0", _ ? "pointer-events-auto opacity-100 translate-y-0" : "pointer-events-none opacity-0 translate-y-2"),
163
- onMouseEnter: N,
164
- onMouseLeave: P,
160
+ }), /* @__PURE__ */ f("div", {
161
+ ref: S,
162
+ className: e("absolute w-80 rounded-xl border border-pink-500/40 bg-gray-950/95 text-gray-100 shadow-xl backdrop-blur-sm transition-all duration-150", v.vertical === "above" ? "bottom-full mb-3" : "top-full mt-3", v.horizontal === "left" ? "left-0" : "right-0", g ? "pointer-events-auto opacity-100 translate-y-0" : "pointer-events-none opacity-0 translate-y-2"),
163
+ onMouseEnter: M,
164
+ onMouseLeave: N,
165
165
  children: [
166
- /* @__PURE__ */ f("div", {
166
+ /* @__PURE__ */ d("div", {
167
167
  className: "px-4 py-3 border-b border-pink-500/40",
168
- children: /* @__PURE__ */ f("p", {
168
+ children: /* @__PURE__ */ d("p", {
169
169
  className: "text-sm font-semibold text-pink-200",
170
170
  children: "Playground overrides"
171
171
  })
172
172
  }),
173
- /* @__PURE__ */ p("div", {
173
+ /* @__PURE__ */ f("div", {
174
174
  className: "px-4 py-3 space-y-3",
175
- children: [/* @__PURE__ */ f("p", {
176
- className: "text-xs font-semibold uppercase tracking-wide text-pink-200",
177
- children: "Hero layout"
178
- }), h.map((t) => {
179
- let n = g.heroMode === t.value;
180
- return /* @__PURE__ */ p("label", {
181
- className: "flex cursor-pointer items-start gap-3 rounded-lg border border-pink-500/30 p-2",
182
- children: [/* @__PURE__ */ f("input", {
183
- type: "radio",
184
- name: "playground-hero-mode",
185
- className: "mt-0.5 h-4 w-4 accent-pink-500",
186
- checked: n,
187
- onChange: () => A(t.value)
188
- }), /* @__PURE__ */ p("span", {
189
- className: "flex flex-col gap-1",
190
- children: [/* @__PURE__ */ f("span", {
191
- className: "text-sm font-medium text-gray-100",
192
- children: t.label
175
+ children: [
176
+ /* @__PURE__ */ d("p", {
177
+ className: "text-xs font-semibold uppercase tracking-wide text-pink-200",
178
+ children: "Hero layout"
179
+ }),
180
+ O ? null : /* @__PURE__ */ d("p", {
181
+ className: "text-xs text-gray-400",
182
+ children: "Using the saved storefront configuration."
183
+ }),
184
+ m.map((t) => {
185
+ let n = h.heroMode === t.value;
186
+ return /* @__PURE__ */ f("label", {
187
+ className: "flex cursor-pointer items-start gap-3 rounded-lg border border-pink-500/30 p-2",
188
+ children: [/* @__PURE__ */ d("input", {
189
+ type: "radio",
190
+ name: "playground-hero-mode",
191
+ className: "mt-0.5 h-4 w-4 accent-pink-500",
192
+ checked: n,
193
+ onChange: () => k(t.value)
193
194
  }), /* @__PURE__ */ f("span", {
194
- className: e("text-xs", n ? "text-pink-300" : "text-gray-400"),
195
- children: t.hint
195
+ className: "flex flex-col gap-1",
196
+ children: [/* @__PURE__ */ d("span", {
197
+ className: "text-sm font-medium text-gray-100",
198
+ children: t.label
199
+ }), /* @__PURE__ */ d("span", {
200
+ className: e("text-xs", n ? "text-pink-300" : "text-gray-400"),
201
+ children: t.hint
202
+ })]
196
203
  })]
197
- })]
198
- }, t.value);
199
- })]
204
+ }, t.value);
205
+ })
206
+ ]
200
207
  }),
201
- /* @__PURE__ */ f("div", {
208
+ /* @__PURE__ */ d("div", {
202
209
  className: "px-4 pb-4",
203
- children: /* @__PURE__ */ f(t, {
210
+ children: /* @__PURE__ */ d(t, {
204
211
  type: "button",
205
212
  variant: "outline",
206
- className: e("w-full border border-pink-500/60 bg-pink-500/10 text-pink-100 hover:text-white hover:bg-pink-500/30 cursor-pointer", !k && "pointer-events-none opacity-60"),
207
- onClick: i,
208
- disabled: !k,
213
+ className: e("w-full border border-pink-500/60 bg-pink-500/10 text-pink-100 hover:text-white hover:bg-pink-500/30 cursor-pointer", !O && "pointer-events-none opacity-60"),
214
+ onClick: r,
215
+ disabled: !O,
209
216
  children: "Reset overrides"
210
217
  })
211
218
  })
@@ -216,4 +223,4 @@ var h = [
216
223
  }) : null;
217
224
  };
218
225
  //#endregion
219
- export { g as PlaygroundDevFloatingButton };
226
+ export { h as PlaygroundDevFloatingButton };
package/dist/i18n/fr.d.ts CHANGED
@@ -99,6 +99,7 @@ export declare const storefront: {
99
99
  add_to_cart: string;
100
100
  add_short: string;
101
101
  cart_title: string;
102
+ cart_items_count_zero: string;
102
103
  cart_items_count_one: string;
103
104
  cart_items_count_other: string;
104
105
  cart_empty: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuZtB,CAAA"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwZtB,CAAA"}
package/dist/i18n/fr.js CHANGED
@@ -58,8 +58,8 @@ var e = {
58
58
  featured_title: "Vélos les plus populaires",
59
59
  featured_description: "Apperçu des vélos les plus loués",
60
60
  featured_view_all: "Voir tous les vélos",
61
- about_section_title: "À propos",
62
- about_section_heading: "À propos de la vitrine",
61
+ about_section_title: "Présentation",
62
+ about_section_heading: "Présentation de la boutique",
63
63
  about_section_fallback: "Présentez ce qui rend votre boutique unique : votre équipe, votre service et ce que les cyclistes peuvent attendre ici.",
64
64
  testimonials: {
65
65
  title: "Nos clients adorent nos vélos et notre service",
@@ -100,6 +100,7 @@ var e = {
100
100
  add_to_cart: "Ajouter au panier",
101
101
  add_short: "Ajouter",
102
102
  cart_title: "Panier",
103
+ cart_items_count_zero: "{{count}} articles",
103
104
  cart_items_count_one: "{{count}} article",
104
105
  cart_items_count_other: "{{count}} articles",
105
106
  cart_empty: "Votre panier est vide.",
package/dist/index.d.ts CHANGED
@@ -1892,6 +1892,7 @@ export declare const loader: ({ ctx, params }: LoaderArgs) => Promise<{
1892
1892
  languages?: string[] | undefined;
1893
1893
  } | undefined;
1894
1894
  content?: {
1895
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
1895
1896
  galleryImageIds: string[];
1896
1897
  whatsappPhone1Enabled: boolean;
1897
1898
  whatsappPhone2Enabled: boolean;
@@ -2792,6 +2793,8 @@ export declare const STOREFRONT_AVAILABILITY_ROUTE = "/api/public/storefront/ava
2792
2793
 
2793
2794
  export declare const STOREFRONT_CHECKOUT_SUBMIT_ROUTE = "/api/public/storefront/checkout/submit";
2794
2795
 
2796
+ export declare const STOREFRONT_HERO_MODES: readonly ["current_booking_hero", "booking_bar_overlay_hero", "vertical_marquee_hero"];
2797
+
2795
2798
  export declare const STOREFRONT_IMAGE_ROUTE = "/api/public/storefront/images/get";
2796
2799
 
2797
2800
  export declare const STOREFRONT_PRODUCTS_ROUTE = "/api/public/storefront/products";
@@ -3248,6 +3251,11 @@ export declare const storefrontConfigurationSchema: z.ZodObject<{
3248
3251
  };
3249
3252
  }, unknown>>;
3250
3253
  content: z.ZodOptional<z.ZodObject<{
3254
+ heroMode: z.ZodDefault<z.ZodEnum<{
3255
+ current_booking_hero: "current_booking_hero";
3256
+ booking_bar_overlay_hero: "booking_bar_overlay_hero";
3257
+ vertical_marquee_hero: "vertical_marquee_hero";
3258
+ }>>;
3251
3259
  tagline: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3252
3260
  value: z.ZodString;
3253
3261
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -3354,6 +3362,11 @@ declare type StorefrontContactShop = Pick<StorefrontShop, "address" | "contactPh
3354
3362
  export declare type StorefrontContent = z.infer<typeof storefrontContentSchema>;
3355
3363
 
3356
3364
  export declare const storefrontContentSchema: z.ZodObject<{
3365
+ heroMode: z.ZodDefault<z.ZodEnum<{
3366
+ current_booking_hero: "current_booking_hero";
3367
+ booking_bar_overlay_hero: "booking_bar_overlay_hero";
3368
+ vertical_marquee_hero: "vertical_marquee_hero";
3369
+ }>>;
3357
3370
  tagline: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3358
3371
  value: z.ZodString;
3359
3372
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -4000,6 +4013,7 @@ export declare const storefrontFr: {
4000
4013
  add_to_cart: string;
4001
4014
  add_short: string;
4002
4015
  cart_title: string;
4016
+ cart_items_count_zero: string;
4003
4017
  cart_items_count_one: string;
4004
4018
  cart_items_count_other: string;
4005
4019
  cart_empty: string;
@@ -4286,6 +4300,14 @@ export declare const storefrontFulfillmentModeSchema: z.ZodEnum<{
4286
4300
  delivery: "delivery";
4287
4301
  }>;
4288
4302
 
4303
+ export declare type StorefrontHeroMode = z.infer<typeof storefrontHeroModeSchema>;
4304
+
4305
+ export declare const storefrontHeroModeSchema: z.ZodEnum<{
4306
+ current_booking_hero: "current_booking_hero";
4307
+ booking_bar_overlay_hero: "booking_bar_overlay_hero";
4308
+ vertical_marquee_hero: "vertical_marquee_hero";
4309
+ }>;
4310
+
4289
4311
  declare type StorefrontI18nLanguage = "en" | "fr";
4290
4312
 
4291
4313
  export declare type StorefrontImageRequestPayload = z.infer<typeof storefrontImageRequestSchema>;
@@ -5070,6 +5092,7 @@ export declare function useStorefrontConfig(): {
5070
5092
  languages?: string[] | undefined;
5071
5093
  } | undefined;
5072
5094
  content?: {
5095
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
5073
5096
  galleryImageIds: string[];
5074
5097
  whatsappPhone1Enabled: boolean;
5075
5098
  whatsappPhone2Enabled: boolean;
@@ -5293,6 +5316,7 @@ export declare function useStorefrontConfig(): {
5293
5316
  languages?: string[] | undefined;
5294
5317
  } | undefined;
5295
5318
  content?: {
5319
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
5296
5320
  galleryImageIds: string[];
5297
5321
  whatsappPhone1Enabled: boolean;
5298
5322
  whatsappPhone2Enabled: boolean;