@loczer/storefront-sdk 0.186.0 → 0.188.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.
Files changed (42) hide show
  1. package/dist/StorefrontProvider.d.ts +3 -0
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/chunks/booking-engine/dist/models/{Product.shared-CTuk4fiR.js → Product.shared-IYOeC3N7.js} +12 -10
  4. package/dist/chunks/booking-engine/dist/schemas/{base-asset-B_Dm8_Vk.js → base-asset-zsUj5_3O.js} +1 -1
  5. package/dist/chunks/booking-engine/dist/schemas/{base-booking-DW8AEPKo.js → base-booking-TzCge_mR.js} +2 -2
  6. package/dist/chunks/booking-engine/dist/schemas/{base-product-1H8l2aUv.js → base-product-DvFFzAcg.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{booking-engine-configuration-D02MRF9U.js → booking-engine-configuration-LnrhShqm.js} +4 -1
  8. package/dist/chunks/booking-engine/dist/schemas/{cart-inputs-j1yWfJxO.js → cart-inputs-B0HpcFe5.js} +1 -1
  9. package/dist/chunks/booking-engine/dist/schemas/{public-booking-engine-configuration-BnJ_H-p1.js → public-booking-engine-configuration-CEM9mexX.js} +1 -1
  10. package/dist/chunks/booking-engine/dist/schemas-BNUzqsci.js +13 -0
  11. package/dist/components/Header/index.js +30 -29
  12. package/dist/components/PlaygroundDevFloatingButton/index.d.ts.map +1 -1
  13. package/dist/components/PlaygroundDevFloatingButton/index.js +109 -102
  14. package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
  15. package/dist/components/StorefrontCancellationPolicyNotice/index.js +51 -48
  16. package/dist/components/StorefrontInsuranceNotice/index.d.ts +9 -0
  17. package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -0
  18. package/dist/components/StorefrontInsuranceNotice/index.js +191 -0
  19. package/dist/i18n/en.d.ts +19 -0
  20. package/dist/i18n/en.d.ts.map +1 -1
  21. package/dist/i18n/en.js +21 -2
  22. package/dist/i18n/fr.d.ts +20 -0
  23. package/dist/i18n/fr.d.ts.map +1 -1
  24. package/dist/i18n/fr.js +24 -4
  25. package/dist/index.d.ts +86 -0
  26. package/dist/index.js +68 -68
  27. package/dist/lib/booking.js +2 -2
  28. package/dist/lib/checkoutSubmit.js +3 -3
  29. package/dist/lib/playgroundDevSettings.d.ts +3 -2
  30. package/dist/lib/playgroundDevSettings.d.ts.map +1 -1
  31. package/dist/lib/playgroundDevSettings.js +28 -27
  32. package/dist/lib/storefrontProducts.d.ts +16 -0
  33. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  34. package/dist/lib/storefrontProducts.js +27 -22
  35. package/dist/pages/HomePage.d.ts.map +1 -1
  36. package/dist/pages/HomePage.js +264 -266
  37. package/dist/storefront.css +1 -1
  38. package/dist/storefrontSchemas.d.ts +17 -0
  39. package/dist/storefrontSchemas.d.ts.map +1 -1
  40. package/dist/storefrontSchemas.js +28 -23
  41. package/package.json +1 -1
  42. package/dist/chunks/booking-engine/dist/schemas-DftrSnTE.js +0 -13
@@ -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,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;CACjC,CAAA;AAKD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,CAAA;AAGnB,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAqBzC;AAED,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C"}
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,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;CACjC,CAAA;AAKD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,CAAA;AAGnB,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAqBzC;AAED,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C"}
@@ -33,6 +33,10 @@ var m = o.object({
33
33
  attributes: o.array(h).default([]),
34
34
  identifiers: o.array(m).default([])
35
35
  }), _ = o.object({
36
+ enabled: o.boolean().default(!1),
37
+ pricePerDayMinor: i.default(0),
38
+ deductibleAmountMinor: i.default(0)
39
+ }), v = o.object({
36
40
  _id: e,
37
41
  kind: s,
38
42
  name: r,
@@ -41,12 +45,10 @@ var m = o.object({
41
45
  images: o.array(l).optional(),
42
46
  prices: o.array(a).optional(),
43
47
  depositAmount: i.default(0),
44
- insurance: o.object({
45
- enabled: o.boolean().default(!1),
46
- pricePerDayMinor: i.default(0)
47
- }).default({
48
+ insurance: _.default({
48
49
  enabled: !1,
49
- pricePerDayMinor: 0
50
+ pricePerDayMinor: 0,
51
+ deductibleAmountMinor: 0
50
52
  }),
51
53
  bufferStartMinutes: o.number().int().min(0).optional(),
52
54
  bufferEndMinutes: o.number().int().min(0).optional(),
@@ -54,13 +56,13 @@ var m = o.object({
54
56
  createdAt: t,
55
57
  updatedAt: t,
56
58
  productVariants: o.array(g).min(1)
57
- }), v = _.extend({ features: n.optional() }), y = v.extend({ kind: o.literal("bike") }), b = v.extend({ kind: o.literal("e-bike") }), x = _.extend({
59
+ }), y = v.extend({ features: n.optional() }), b = y.extend({ kind: o.literal("bike") }), x = y.extend({ kind: o.literal("e-bike") }), S = v.extend({
58
60
  kind: o.literal("accessory"),
59
61
  prices: o.array(a)
60
- }), S = o.discriminatedUnion("kind", [
61
- y,
62
+ }), C = o.discriminatedUnion("kind", [
62
63
  b,
63
- x
64
+ x,
65
+ S
64
66
  ]);
65
67
  //#endregion
66
- export { u as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, d as PRODUCT_VARIANT_CODE_MAX_LENGTH, x as accessoryProductSchema, y as bikeProductSchema, b as eBikeProductSchema, p as isProductVariantCodeIdentifierKind, s as productKindSchema, S as productSchema, c as productStorefrontDisplayModeSchema, h as productVariantAttributeSchema, f as productVariantCodeSchema, m as productVariantIdentifierSchema, g as productVariantSchema };
68
+ export { u as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, d as PRODUCT_VARIANT_CODE_MAX_LENGTH, S as accessoryProductSchema, b as bikeProductSchema, x as eBikeProductSchema, p as isProductVariantCodeIdentifierKind, _ as productInsuranceSchema, s as productKindSchema, C as productSchema, c as productStorefrontDisplayModeSchema, h as productVariantAttributeSchema, f as productVariantCodeSchema, m as productVariantIdentifierSchema, g as productVariantSchema };
@@ -1,5 +1,5 @@
1
1
  import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n } from "../models/types-rIp4ReXN.js";
2
- import { productVariantIdentifierSchema as r } from "../models/Product.shared-CTuk4fiR.js";
2
+ import { productVariantIdentifierSchema as r } from "../models/Product.shared-IYOeC3N7.js";
3
3
  import { z as i } from "zod";
4
4
  //#region ../booking-engine/dist/schemas/base-asset.js
5
5
  var a = i.enum([
@@ -1,8 +1,8 @@
1
1
  import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n, ulidStringSchema as r } from "../models/types-rIp4ReXN.js";
2
2
  import { moneyMinorSchema as i } from "./money-CVoCY4of.js";
3
- import { productKindSchema as a } from "../models/Product.shared-CTuk4fiR.js";
3
+ import { productKindSchema as a } from "../models/Product.shared-IYOeC3N7.js";
4
4
  import { richTextSchema as o } from "./rich-text-DTRh7U3z.js";
5
- import { cancellationPolicySchema as s } from "./booking-engine-configuration-D02MRF9U.js";
5
+ import { cancellationPolicySchema as s } from "./booking-engine-configuration-LnrhShqm.js";
6
6
  import { z as c } from "zod";
7
7
  //#region ../booking-engine/dist/schemas/base-booking.js
8
8
  var l = c.enum([
@@ -1,3 +1,3 @@
1
1
  import "../models/LocalizedString-D_TRgAdr.js";
2
2
  import "../models/Price-DCAgqkKh.js";
3
- import "../models/Product.shared-CTuk4fiR.js";
3
+ import "../models/Product.shared-IYOeC3N7.js";
@@ -48,7 +48,10 @@ var a = i.enum([
48
48
  "upToHours"
49
49
  ]
50
50
  });
51
- }), _ = { tiers: [] }, v = i.object({ mode: i.enum([
51
+ }), _ = { tiers: [{
52
+ upToHours: 24,
53
+ refundPercentage: .975
54
+ }] }, v = i.object({ mode: i.enum([
52
55
  "disabled",
53
56
  "optional",
54
57
  "required"
@@ -2,7 +2,7 @@ import { identifierSchema as e } from "../models/types-rIp4ReXN.js";
2
2
  import { moneyMinorSchema as t } from "./money-CVoCY4of.js";
3
3
  import { richTextSchema as n } from "./rich-text-DTRh7U3z.js";
4
4
  import { isoDateSchema as r, timeOfDaySchema as i } from "./shop-opening-hours-BlLD1gfz.js";
5
- import { fulfillmentModeSchema as a } from "./public-booking-engine-configuration-BnJ_H-p1.js";
5
+ import { fulfillmentModeSchema as a } from "./public-booking-engine-configuration-CEM9mexX.js";
6
6
  import { z as o } from "zod";
7
7
  //#region ../booking-engine/dist/schemas/cart-inputs.js
8
8
  var s = o.object({
@@ -1,5 +1,5 @@
1
1
  import { timeOfDaySchema as e } from "./shop-opening-hours-BlLD1gfz.js";
2
- import { bookingEngineConfigurationSchema as t, checkoutConfigurationSchema as n } from "./booking-engine-configuration-D02MRF9U.js";
2
+ import { bookingEngineConfigurationSchema as t, checkoutConfigurationSchema as n } from "./booking-engine-configuration-LnrhShqm.js";
3
3
  import { z as r } from "zod";
4
4
  //#region ../booking-engine/dist/schemas/public-booking-engine-configuration.js
5
5
  var i = r.enum(["pickup", "delivery"]), a = r.object({
@@ -0,0 +1,13 @@
1
+ import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localizedStringArraySchema as n, localizedStringEntrySchema as r, localizedStringSchema as i } from "./models/LocalizedString-D_TRgAdr.js";
2
+ import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./schemas/money-CVoCY4of.js";
3
+ import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
4
+ import { PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as p, PRODUCT_VARIANT_CODE_MAX_LENGTH as m, accessoryProductSchema as h, bikeProductSchema as g, eBikeProductSchema as _, isProductVariantCodeIdentifierKind as v, productInsuranceSchema as y, productKindSchema as b, productSchema as x, productStorefrontDisplayModeSchema as S, productVariantAttributeSchema as C, productVariantCodeSchema as w, productVariantIdentifierSchema as T, productVariantSchema as E } from "./models/Product.shared-IYOeC3N7.js";
5
+ import { richTextJsonDocSchema as D, richTextSchema as O, richTextVersionSchema as k } from "./schemas/rich-text-DTRh7U3z.js";
6
+ import { isoDateSchema as A, shopConfigurationSchema as j, shopExtraTimeSlotRuleSchema as M, shopOpeningDayIndexSchema as N, shopOpeningDaySchema as P, shopOpeningHoursOverrideSchema as F, shopOpeningHoursPeriodSchema as I, shopOpeningSlotSchema as L, timeOfDaySchema as R } from "./schemas/shop-opening-hours-BlLD1gfz.js";
7
+ import { DEFAULT_CANCELLATION_POLICY as z, DEFAULT_PAYMENT_POLICIES as B, cancellationPolicySchema as V, cancellationPolicyTierSchema as H, paymentPoliciesSchema as U } from "./schemas/booking-engine-configuration-LnrhShqm.js";
8
+ import { fulfillmentModeSchema as W, publicBookingEngineConfigurationSchema as G, publicCheckoutConfigurationSchema as K, publicCheckoutDynamicOptionsSchema as q } from "./schemas/public-booking-engine-configuration-CEM9mexX.js";
9
+ import { DEFAULT_BOOKING_DELIVERY_OPTION as J, bookingCustomerInputSchema as Y, bookingDeliveryOptionSchema as X, bookingScheduleInputSchema as Z, cartItemInputSchema as Q, createBookingInputBaseSchema as $, createBookingInputSchema as ee, resolveBookingDeliveryOption as te, validateBookingDeliveryAddress as ne } from "./schemas/cart-inputs-B0HpcFe5.js";
10
+ import "./schemas/base-product-DvFFzAcg.js";
11
+ import { baseAssetSchema as re, baseAssetStatusSchema as ie } from "./schemas/base-asset-zsUj5_3O.js";
12
+ import { baseBookingItemSchema as ae, baseBookingSchema as oe, baseBookingStateSchema as se } from "./schemas/base-booking-TzCge_mR.js";
13
+ export { J as DEFAULT_BOOKING_DELIVERY_OPTION, z as DEFAULT_CANCELLATION_POLICY, B as DEFAULT_PAYMENT_POLICIES, p as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, m as PRODUCT_VARIANT_CODE_MAX_LENGTH, h as accessoryProductSchema, re as baseAssetSchema, ie as baseAssetStatusSchema, ae as baseBookingItemSchema, oe as baseBookingSchema, se as baseBookingStateSchema, g as bikeProductSchema, Y as bookingCustomerInputSchema, X as bookingDeliveryOptionSchema, Z as bookingScheduleInputSchema, V as cancellationPolicySchema, H as cancellationPolicyTierSchema, Q as cartItemInputSchema, $ as createBookingInputBaseSchema, ee as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, _ as eBikeProductSchema, W as fulfillmentModeSchema, t as getLocalizedStringValue, v as isProductVariantCodeIdentifierKind, A as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, U as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, y as productInsuranceSchema, b as productKindSchema, x as productSchema, S as productStorefrontDisplayModeSchema, C as productVariantAttributeSchema, w as productVariantCodeSchema, T as productVariantIdentifierSchema, E as productVariantSchema, G as publicBookingEngineConfigurationSchema, K as publicCheckoutConfigurationSchema, q as publicCheckoutDynamicOptionsSchema, te as resolveBookingDeliveryOption, D as richTextJsonDocSchema, O as richTextSchema, k as richTextVersionSchema, j as shopConfigurationSchema, M as shopExtraTimeSlotRuleSchema, N as shopOpeningDayIndexSchema, P as shopOpeningDaySchema, F as shopOpeningHoursOverrideSchema, I as shopOpeningHoursPeriodSchema, L as shopOpeningSlotSchema, u as signedMoneyMinorSchema, R as timeOfDaySchema, ne as validateBookingDeliveryAddress };
@@ -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 };