@loczer/storefront-sdk 0.149.0 → 0.150.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.
@@ -6,7 +6,7 @@ import { toast as S } from "@rpcbase/client";
6
6
  import { PhoneNumberInput as B, cn as V } from "@rpcbase/ui";
7
7
  import { Phone as q, Mail as E, MapPin as H } from "lucide-react";
8
8
  import { z as m } from "zod";
9
- import U from "../../assets/whatsapp.svg";
9
+ import U from "../../chunks/assets/whatsapp.svg-grlzka-t.js";
10
10
  import { ROUTE as z, responseSchema as $ } from "../../lib/contactForm.js";
11
11
  import { resolveStorefrontWhatsAppContact as J } from "../../lib/whatsapp.js";
12
12
  import { useStorefront as Z } from "../../StorefrontProvider.js";
@@ -14,7 +14,7 @@ import { SignatureModal as Le } from "./SignatureModal.js";
14
14
  import { DEFAULT_TERMS_TITLE as $e, DEFAULT_TERMS_ARTICLES as Oe, TermsAndConditionsContent as Be } from "./TermsAndConditionsContent.js";
15
15
  import { ThumbnailSidebar as Fe } from "./ThumbnailSidebar.js";
16
16
  import { resolveContractSaleDocumentLanguage as He, formatContractSaleDocumentLabel as Ue } from "./language.js";
17
- /* empty css */
17
+ /* empty css */
18
18
  const U = 22, G = 10, j = 14, re = 14, Ge = 3, je = 6, ae = (o, r) => {
19
19
  if (r <= 0)
20
20
  return [o];
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { cn as l } from "@rpcbase/ui";
3
3
  import { Phone as N, Mail as _, MapPin as v, Clock as h } from "lucide-react";
4
4
  import { useTranslation as y } from "react-i18next";
5
- import w from "../../assets/whatsapp.svg";
5
+ import w from "../../chunks/assets/whatsapp.svg-grlzka-t.js";
6
6
  import { DelayedReveal as p, DelayedPlaceholder as f } from "../DelayedReveal/index.js";
7
7
  import { BusinessHours as b } from "./BusinessHours.js";
8
8
  const o = "group inline-flex gap-2 text-sm font-normal text-slate-600 decoration-current underline-offset-4 transition-colors hover:text-slate-800 hover:underline", c = "mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center text-current transition-colors", k = (a) => (Math.trunc(a) % 7 + 7) % 7, H = (a) => Array.isArray(a) ? a.map((n) => ({
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as M } from "react/jsx-runtime";
2
2
  import { useState as K, useRef as c, useCallback as h, useEffect as O, useMemo as U } from "react";
3
3
  import J from "interactjs";
4
- import Q from "../../assets/dev.svg";
4
+ import Q from "../../chunks/assets/dev.svg-jGkd1F38.js";
5
5
  import { Button as Z } from "../../ui/button.js";
6
6
  import { cn as F } from "@rpcbase/ui";
7
7
  import { usePlaygroundDevSettings as ee, DEFAULT_PLAYGROUND_DEV_SETTINGS as te, writePlaygroundDevSettings as ne, resetPlaygroundDevSettings as re } from "../../lib/playgroundDevSettings.js";
@@ -4,18 +4,18 @@ import { cn as C } from "@rpcbase/ui";
4
4
  import { useTranslation as c } from "react-i18next";
5
5
  import { I18nProvider as p } from "../../i18n/I18nProvider.js";
6
6
  const f = "https://loczer.com";
7
- function m({ className: t }) {
8
- const r = h();
7
+ function m({ className: r }) {
8
+ const t = h();
9
9
  return /* @__PURE__ */ o(
10
10
  "svg",
11
11
  {
12
12
  viewBox: "0 0 128 128",
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
- className: t,
14
+ className: r,
15
15
  "aria-hidden": "true",
16
16
  focusable: "false",
17
17
  children: [
18
- /* @__PURE__ */ e("rect", { width: "128", height: "128", rx: "28", fill: `url(#${r})` }),
18
+ /* @__PURE__ */ e("rect", { width: "128", height: "128", rx: "28", fill: `url(#${t})` }),
19
19
  /* @__PURE__ */ e(
20
20
  "path",
21
21
  {
@@ -23,7 +23,7 @@ function m({ className: t }) {
23
23
  fill: "white"
24
24
  }
25
25
  ),
26
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ o("linearGradient", { id: r, x1: "0", y1: "0", x2: "128", y2: "128", gradientUnits: "userSpaceOnUse", children: [
26
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ o("linearGradient", { id: t, x1: "0", y1: "0", x2: "128", y2: "128", gradientUnits: "userSpaceOnUse", children: [
27
27
  /* @__PURE__ */ e("stop", { stopColor: "#193CB8" }),
28
28
  /* @__PURE__ */ e("stop", { offset: "1", stopColor: "#193CB8", stopOpacity: "0.7" })
29
29
  ] }) })
@@ -32,14 +32,14 @@ function m({ className: t }) {
32
32
  );
33
33
  }
34
34
  function v({
35
- language: t,
36
- ...r
35
+ language: r,
36
+ ...t
37
37
  }) {
38
- return /* @__PURE__ */ e(p, { initialLanguage: t, children: /* @__PURE__ */ e(w, { ...r }) });
38
+ return /* @__PURE__ */ e(p, { initialLanguage: r, children: /* @__PURE__ */ e(w, { ...t }) });
39
39
  }
40
40
  function w({
41
- className: t,
42
- href: r = f,
41
+ className: r,
42
+ href: t = f,
43
43
  markClassName: n,
44
44
  rel: s = "noopener noreferrer",
45
45
  showTagline: a = !0,
@@ -52,15 +52,15 @@ function w({
52
52
  {
53
53
  className: C(
54
54
  "group inline-flex w-fit items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-3 py-2 shadow-sm transition hover:border-white/20 hover:bg-white/10",
55
- t
55
+ r
56
56
  ),
57
- href: r,
57
+ href: t,
58
58
  target: l,
59
59
  rel: s,
60
60
  ...d,
61
61
  children: [
62
62
  /* @__PURE__ */ e(m, { className: C("h-8 w-8 flex-shrink-0", n) }),
63
- /* @__PURE__ */ o("span", { className: "flex flex-col leading-tight", children: [
63
+ /* @__PURE__ */ o("span", { className: "flex flex-col items-start leading-tight text-left", children: [
64
64
  /* @__PURE__ */ e("span", { className: "font-medium text-white/90 group-hover:text-white", children: i("platform_footer_powered_by") }),
65
65
  a ? /* @__PURE__ */ e("span", { className: "text-[11px] text-white/60 group-hover:text-white/80", children: i("platform_footer_tagline") }) : null
66
66
  ] })
@@ -1,24 +1,44 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import s from "../../assets/whatsapp.svg";
3
- import { useWhatsAppFloatingButton as a } from "./useWhatsAppFloatingButton.js";
4
- const f = (o) => {
5
- const { href: n, containerRef: t, bubbleRef: r, onLinkClick: l } = a(o);
6
- return typeof window > "u" || !n ? null : /* @__PURE__ */ e("div", { ref: t, className: "fixed bottom-4 right-4 z-50 pointer-events-none select-none", children: /* @__PURE__ */ e("div", { ref: r, className: "pointer-events-auto", style: { touchAction: "none" }, children: /* @__PURE__ */ i(
1
+ import { jsx as c, jsxs as n } from "react/jsx-runtime";
2
+ import { useWhatsAppFloatingButton as r } from "./useWhatsAppFloatingButton.js";
3
+ function s({ className: e }) {
4
+ return /* @__PURE__ */ n(
5
+ "svg",
6
+ {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 48 48",
9
+ fillRule: "evenodd",
10
+ clipRule: "evenodd",
11
+ className: e,
12
+ "aria-hidden": "true",
13
+ focusable: "false",
14
+ children: [
15
+ /* @__PURE__ */ c("path", { fill: "#fff", d: "M4.868,43.303l2.694-9.835C5.9,30.59,5.026,27.324,5.027,23.979C5.032,13.514,13.548,5,24.014,5c5.079,0.002,9.845,1.979,13.43,5.566c3.584,3.588,5.558,8.356,5.556,13.428c-0.004,10.465-8.522,18.98-18.986,18.98c-0.001,0,0,0,0,0h-0.008c-3.177-0.001-6.3-0.798-9.073-2.311L4.868,43.303z" }),
16
+ /* @__PURE__ */ c("path", { fill: "#fff", d: "M4.868,43.803c-0.132,0-0.26-0.052-0.355-0.148c-0.125-0.127-0.174-0.312-0.127-0.483l2.639-9.636c-1.636-2.906-2.499-6.206-2.497-9.556C4.532,13.238,13.273,4.5,24.014,4.5c5.21,0.002,10.105,2.031,13.784,5.713c3.679,3.683,5.704,8.577,5.702,13.781c-0.004,10.741-8.746,19.48-19.486,19.48c-3.189-0.001-6.344-0.788-9.144-2.277l-9.875,2.589C4.953,43.798,4.911,43.803,4.868,43.803z" }),
17
+ /* @__PURE__ */ c("path", { fill: "#cfd8dc", d: "M24.014,5c5.079,0.002,9.845,1.979,13.43,5.566c3.584,3.588,5.558,8.356,5.556,13.428c-0.004,10.465-8.522,18.98-18.986,18.98h-0.008c-3.177-0.001-6.3-0.798-9.073-2.311L4.868,43.303l2.694-9.835C5.9,30.59,5.026,27.324,5.027,23.979C5.032,13.514,13.548,5,24.014,5 M24.014,42.974C24.014,42.974,24.014,42.974,24.014,42.974C24.014,42.974,24.014,42.974,24.014,42.974 M24.014,42.974C24.014,42.974,24.014,42.974,24.014,42.974C24.014,42.974,24.014,42.974,24.014,42.974 M24.014,4C24.014,4,24.014,4,24.014,4C12.998,4,4.032,12.962,4.027,23.979c-0.001,3.367,0.849,6.685,2.461,9.622l-2.585,9.439c-0.094,0.345,0.002,0.713,0.254,0.967c0.19,0.192,0.447,0.297,0.711,0.297c0.085,0,0.17-0.011,0.254-0.033l9.687-2.54c2.828,1.468,5.998,2.243,9.197,2.244c11.024,0,19.99-8.963,19.995-19.98c0.002-5.339-2.075-10.359-5.848-14.135C34.378,6.083,29.357,4.002,24.014,4L24.014,4z" }),
18
+ /* @__PURE__ */ c("path", { fill: "#40c351", d: "M35.176,12.832c-2.98-2.982-6.941-4.625-11.157-4.626c-8.704,0-15.783,7.076-15.787,15.774c-0.001,2.981,0.833,5.883,2.413,8.396l0.376,0.597l-1.595,5.821l5.973-1.566l0.577,0.342c2.422,1.438,5.2,2.198,8.032,2.199h0.006c8.698,0,15.777-7.077,15.78-15.776C39.795,19.778,38.156,15.814,35.176,12.832z" }),
19
+ /* @__PURE__ */ c("path", { fill: "#fff", fillRule: "evenodd", d: "M19.268,16.045c-0.355-0.79-0.729-0.806-1.068-0.82c-0.277-0.012-0.593-0.011-0.909-0.011c-0.316,0-0.83,0.119-1.265,0.594c-0.435,0.475-1.661,1.622-1.661,3.956c0,2.334,1.7,4.59,1.937,4.906c0.237,0.316,3.282,5.259,8.104,7.161c4.007,1.58,4.823,1.266,5.693,1.187c0.87-0.079,2.807-1.147,3.202-2.255c0.395-1.108,0.395-2.057,0.277-2.255c-0.119-0.198-0.435-0.316-0.909-0.554s-2.807-1.385-3.242-1.543c-0.435-0.158-0.751-0.237-1.068,0.238c-0.316,0.474-1.225,1.543-1.502,1.859c-0.277,0.317-0.554,0.357-1.028,0.119c-0.474-0.238-2.002-0.738-3.815-2.354c-1.41-1.257-2.362-2.81-2.639-3.285c-0.277-0.474-0.03-0.731,0.208-0.968c0.213-0.213,0.474-0.554,0.712-0.831c0.237-0.277,0.316-0.475,0.474-0.791c0.158-0.317,0.079-0.594-0.04-0.831C20.612,19.329,19.69,16.983,19.268,16.045z", clipRule: "evenodd" })
20
+ ]
21
+ }
22
+ );
23
+ }
24
+ const d = (e) => {
25
+ const { href: l, containerRef: t, bubbleRef: o, onLinkClick: i } = r(e);
26
+ return typeof window > "u" || !l ? null : /* @__PURE__ */ c("div", { ref: t, className: "fixed bottom-4 right-4 z-50 pointer-events-none select-none", children: /* @__PURE__ */ c("div", { ref: o, className: "pointer-events-auto", style: { touchAction: "none" }, children: /* @__PURE__ */ n(
7
27
  "a",
8
28
  {
9
- href: n,
29
+ href: l,
10
30
  target: "_blank",
11
31
  rel: "nofollow noopener noreferrer",
12
32
  className: "group inline-flex h-14 w-14 md:h-12 md:w-12 items-center justify-center rounded-full bg-[#25D366] hover:bg-[#1DA851] shadow-lg ring-1 ring-[#1DA851] transition-colors p-1",
13
33
  "aria-label": "WhatsApp",
14
- onClick: l,
34
+ onClick: i,
15
35
  children: [
16
- /* @__PURE__ */ e("img", { src: s, className: "h-9 w-9 md:h-8 md:w-8", alt: "WhatsApp logo" }),
17
- /* @__PURE__ */ e("span", { className: "sr-only", children: "WhatsApp" })
36
+ /* @__PURE__ */ c(s, { className: "h-9 w-9 md:h-8 md:w-8" }),
37
+ /* @__PURE__ */ c("span", { className: "sr-only", children: "WhatsApp" })
18
38
  ]
19
39
  }
20
40
  ) }) });
21
41
  };
22
42
  export {
23
- f as WhatsAppFloatingButton
43
+ d as WhatsAppFloatingButton
24
44
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* empty css */
1
+ /* empty css */
2
2
  import { storefrontCheckoutModeSchema as f, storefrontConfigurationSchema as h, storefrontContentSchema as d, storefrontFaqItemSchema as g, storefrontFaqSchema as P, storefrontFulfillmentModeSchema as x, storefrontLocalizedRichTextSchema as T, storefrontModalMessageSchema as D, storefrontModulesSchema as C, storefrontReviewsModuleSchema as R, storefrontRichTextSchema as A, storefrontSettingsSchema as b, storefrontShopSchema as O, storefrontStatusSchema as k, storefrontWorkspaceSchema as y } from "./storefrontSchemas.js";
3
3
  import { DEFAULT_STOREFRONT_PRESET as E, STOREFRONT_PRESETS as I, getStorefrontPreset as F } from "./data/config.js";
4
4
  import { BOOKING_SEARCH_KEYS as M, TIME_OPTIONS as v, applyBookingParamsToSearch as L, createBookingPeriodConfigFromStorefrontConfiguration as U, getBookingDurationLabel as N, getBookingDurationMinutes as V, getBookingParamsFromSearch as q, getBookingSessionStorageKey as z, getDefaultBookingParams as H, getDefaultBookingParamsForStorefrontConfiguration as K, pickBookingSearchParams as W, readBookingSearchParamsFromSessionStorage as w, readBookingSearchParamsFromStorage as G, resolveBookingSearchParams as Y, resolveBookingSearchParamsFromSessionStorage as j, writeBookingSearchParamsToSessionStorage as J, writeBookingSearchParamsToStorage as Q } from "./lib/booking.js";
@@ -28,6 +28,7 @@ export declare const requestSchema: z.ZodObject<{
28
28
  }, z.core.$strip>>;
29
29
  }, z.core.$strip>;
30
30
  export type RequestPayload = z.infer<typeof requestSchema>;
31
+ export type StorefrontAvailabilityRequestPayload = RequestPayload;
31
32
  export declare const publicAvailabilityDisplayModeSchema: z.ZodEnum<{
32
33
  soldOutOnly: "soldOutOnly";
33
34
  soldOutAndFewRemaining: "soldOutAndFewRemaining";
@@ -73,6 +74,7 @@ export declare const responseSchema: z.ZodObject<{
73
74
  }, z.core.$strip>>>;
74
75
  }, z.core.$strip>;
75
76
  export type ResponsePayload = z.infer<typeof responseSchema>;
77
+ export type StorefrontAvailabilityResponsePayload = ResponsePayload;
76
78
  export declare const buildStorefrontAvailabilityKey: (productId: string, productVariantId?: string | null) => string;
77
79
  export declare const doesStorefrontAvailabilityDisplaySoldOut: (displayMode: PublicAvailabilityDisplayMode | undefined) => boolean;
78
80
  export declare const shouldBlockStorefrontUnavailableItem: (record: StorefrontPublicAvailabilityRecord | undefined) => boolean;
@@ -5,5 +5,6 @@ export declare const requestSchema: z.ZodObject<{
5
5
  storeSlug: z.ZodString;
6
6
  }, z.core.$strip>;
7
7
  export type RequestPayload = z.infer<typeof requestSchema>;
8
+ export type StorefrontImageRequestPayload = RequestPayload;
8
9
  export declare const buildStorefrontImageUrl: (imageId: string, storeSlug: string) => string;
9
10
  //# sourceMappingURL=storefrontImage.d.ts.map
@@ -216,6 +216,7 @@ export declare const requestSchema: z.ZodObject<{
216
216
  storeSlug: z.ZodString;
217
217
  }, z.core.$strip>;
218
218
  export type RequestPayload = z.infer<typeof requestSchema>;
219
+ export type StorefrontProductsRequestPayload = RequestPayload;
219
220
  export declare const responseSchema: z.ZodObject<{
220
221
  success: z.ZodBoolean;
221
222
  message: z.ZodOptional<z.ZodString>;
@@ -366,4 +367,5 @@ export declare const responseSchema: z.ZodObject<{
366
367
  }, z.core.$strip>>;
367
368
  }, z.core.$strip>;
368
369
  export type ResponsePayload = z.infer<typeof responseSchema>;
370
+ export type StorefrontProductsResponsePayload = ResponsePayload;
369
371
  //# sourceMappingURL=storefrontProducts.d.ts.map
@@ -5,7 +5,7 @@ import { useParams as Ue, useLocation as Ve, useSearchParams as ze, useNavigate
5
5
  import { cn as h } from "@rpcbase/ui";
6
6
  import { Clock as Qe, MapPin as We, CheckCircle2 as Ke, ShieldCheck as Ge, Truck as Je, ArrowRight as j, Bike as de } from "lucide-react";
7
7
  import { useTranslation as Xe } from "react-i18next";
8
- import z from "../assets/playground-hero-preview.svg";
8
+ import z from "../chunks/assets/playground-hero-preview.svg-DNbSwXV5.js";
9
9
  import { getAvailabilityVariant as Ze } from "../lib/utils.js";
10
10
  import { getStorefrontPreset as et } from "../data/config.js";
11
11
  import { getLocalizedValue as A } from "../localization.js";
@@ -73,6 +73,10 @@ export declare const storefrontAvailabilityProductSchema: z.ZodObject<{
73
73
  quantity: z.ZodOptional<z.ZodNumber>;
74
74
  }, z.core.$strip>;
75
75
 
76
+ export declare type StorefrontAvailabilityRequestPayload = RequestPayload;
77
+
78
+ export declare type StorefrontAvailabilityResponsePayload = ResponsePayload;
79
+
76
80
  export declare type StorefrontAvailabilitySchedule = z.infer<typeof storefrontAvailabilityScheduleSchema>;
77
81
 
78
82
  export declare const storefrontAvailabilityScheduleSchema: z.ZodObject<{
@@ -11,4 +11,6 @@ export declare const requestSchema: z.ZodObject<{
11
11
 
12
12
  export declare const ROUTE = "/api/public/storefront/images/get";
13
13
 
14
+ export declare type StorefrontImageRequestPayload = RequestPayload;
15
+
14
16
  export { }
@@ -160,6 +160,10 @@ export declare const responseSchema: z.ZodObject<{
160
160
 
161
161
  export declare const ROUTE = "/api/public/storefront/products";
162
162
 
163
+ export declare type StorefrontProductsRequestPayload = RequestPayload;
164
+
165
+ export declare type StorefrontProductsResponsePayload = ResponsePayload;
166
+
163
167
  export declare type StorefrontPublicAccessoryProduct = z.infer<typeof storefrontPublicAccessoryProductSchema>;
164
168
 
165
169
  export declare const storefrontPublicAccessoryProductSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.149.0",
3
+ "version": "0.150.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"