@burdenoff/website-sdk 2026.1003.1 → 2026.1003.3
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.
- package/dist/components/contact.js +26 -5
- package/dist/components/contact.js.map +1 -1
- package/dist/components/contact.mjs +27 -6
- package/dist/components/contact.mjs.map +1 -1
- package/dist/components/newsletter.js +17 -2
- package/dist/components/newsletter.js.map +1 -1
- package/dist/components/newsletter.mjs +18 -3
- package/dist/components/newsletter.mjs.map +1 -1
- package/dist/components/partners.js +26 -5
- package/dist/components/partners.js.map +1 -1
- package/dist/components/partners.mjs +27 -6
- package/dist/components/partners.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +41 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -13
- package/dist/index.mjs.map +1 -1
- package/dist/store/index.js +9 -6
- package/dist/store/index.js.map +1 -1
- package/dist/store/index.mjs +9 -6
- package/dist/store/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -791,7 +791,7 @@ declare function formatAnswerDate(value: string, locale: ExploreLocale): string;
|
|
|
791
791
|
|
|
792
792
|
declare const buttonVariants: (props?: ({
|
|
793
793
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
794
|
-
size?: "
|
|
794
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
795
795
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
796
796
|
interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
797
797
|
asChild?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -791,7 +791,7 @@ declare function formatAnswerDate(value: string, locale: ExploreLocale): string;
|
|
|
791
791
|
|
|
792
792
|
declare const buttonVariants: (props?: ({
|
|
793
793
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
794
|
-
size?: "
|
|
794
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
795
795
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
796
796
|
interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
797
797
|
asChild?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -375,6 +375,17 @@ function useWebSDKConfig() {
|
|
|
375
375
|
const client = useWebSDK();
|
|
376
376
|
return client.getConfig();
|
|
377
377
|
}
|
|
378
|
+
var RECAPTCHA_WIDGET_HEIGHT = 78;
|
|
379
|
+
function useDeferredRecaptcha(siteKey) {
|
|
380
|
+
const [engaged, setEngaged] = React.useState(false);
|
|
381
|
+
const arm = React.useCallback(() => setEngaged(true), []);
|
|
382
|
+
const enabled = siteKey.length > 0;
|
|
383
|
+
return {
|
|
384
|
+
armed: enabled && engaged,
|
|
385
|
+
arm,
|
|
386
|
+
formProps: enabled && !engaged ? { onFocus: arm, onPointerDown: arm } : {}
|
|
387
|
+
};
|
|
388
|
+
}
|
|
378
389
|
|
|
379
390
|
// src/utils/product-slug.ts
|
|
380
391
|
var PRODUCT_SLUG_RENAMES = Object.freeze(
|
|
@@ -838,12 +849,14 @@ function ContactPage({
|
|
|
838
849
|
const displayName = productName ?? product?.name ?? config.productId;
|
|
839
850
|
const effectiveRecaptchaSiteKey = recaptchaSiteKey ?? product?.recaptchaSiteKey ?? config.recaptchaSiteKey ?? "";
|
|
840
851
|
const recaptchaRef = React.useRef(null);
|
|
852
|
+
const recaptchaGate = useDeferredRecaptcha(effectiveRecaptchaSiteKey);
|
|
841
853
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
842
854
|
const [submitStatus, setSubmitStatus] = React.useState("idle");
|
|
843
855
|
const handleSubmit = async (e) => {
|
|
844
856
|
e.preventDefault();
|
|
845
857
|
const recaptchaToken = recaptchaRef.current?.getValue() ?? "";
|
|
846
858
|
if (effectiveRecaptchaSiteKey && !recaptchaToken) {
|
|
859
|
+
recaptchaGate.arm();
|
|
847
860
|
sonner.toast.error("Please complete the reCAPTCHA verification");
|
|
848
861
|
return;
|
|
849
862
|
}
|
|
@@ -970,6 +983,7 @@ function ContactPage({
|
|
|
970
983
|
{
|
|
971
984
|
onSubmit: handleSubmit,
|
|
972
985
|
className: "space-y-4 sm:space-y-6",
|
|
986
|
+
...recaptchaGate.formProps,
|
|
973
987
|
children: [
|
|
974
988
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid sm:grid-cols-2 gap-4 sm:gap-6", children: [
|
|
975
989
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
@@ -1094,13 +1108,20 @@ function ContactPage({
|
|
|
1094
1108
|
)
|
|
1095
1109
|
] }),
|
|
1096
1110
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1097
|
-
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1098
|
-
|
|
1111
|
+
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1112
|
+
"div",
|
|
1099
1113
|
{
|
|
1100
|
-
|
|
1101
|
-
|
|
1114
|
+
className: "flex justify-center sm:justify-start",
|
|
1115
|
+
style: { minHeight: RECAPTCHA_WIDGET_HEIGHT },
|
|
1116
|
+
children: recaptchaGate.armed && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1117
|
+
ReCAPTCHA4__default.default,
|
|
1118
|
+
{
|
|
1119
|
+
ref: recaptchaRef,
|
|
1120
|
+
sitekey: effectiveRecaptchaSiteKey
|
|
1121
|
+
}
|
|
1122
|
+
)
|
|
1102
1123
|
}
|
|
1103
|
-
)
|
|
1124
|
+
),
|
|
1104
1125
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1105
1126
|
Button,
|
|
1106
1127
|
{
|
|
@@ -2821,6 +2842,7 @@ function NewsletterForm({
|
|
|
2821
2842
|
const effectiveProductId = product?.id || config.productId;
|
|
2822
2843
|
const effectiveRecaptchaSiteKey = recaptchaSiteKey ?? productConfig.recaptchaSiteKey ?? config.recaptchaSiteKey ?? "";
|
|
2823
2844
|
const recaptchaRef = React.useRef(null);
|
|
2845
|
+
const recaptchaGate = useDeferredRecaptcha(effectiveRecaptchaSiteKey);
|
|
2824
2846
|
const [email, setEmail] = React.useState("");
|
|
2825
2847
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
2826
2848
|
const handleSubmit = async (e) => {
|
|
@@ -2831,6 +2853,7 @@ function NewsletterForm({
|
|
|
2831
2853
|
}
|
|
2832
2854
|
const recaptchaToken = recaptchaRef.current?.getValue() ?? "";
|
|
2833
2855
|
if (effectiveRecaptchaSiteKey && !recaptchaToken) {
|
|
2856
|
+
recaptchaGate.arm();
|
|
2834
2857
|
sonner.toast.error("Please complete the reCAPTCHA verification");
|
|
2835
2858
|
return;
|
|
2836
2859
|
}
|
|
@@ -2869,6 +2892,7 @@ function NewsletterForm({
|
|
|
2869
2892
|
onSubmit: handleSubmit,
|
|
2870
2893
|
className: isInline ? "flex flex-col gap-2" : "flex flex-col gap-2",
|
|
2871
2894
|
style: { overflow: "visible" },
|
|
2895
|
+
...recaptchaGate.formProps,
|
|
2872
2896
|
children: [
|
|
2873
2897
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2874
2898
|
"div",
|
|
@@ -2939,9 +2963,10 @@ function NewsletterForm({
|
|
|
2939
2963
|
position: "relative",
|
|
2940
2964
|
zIndex: 50,
|
|
2941
2965
|
display: "flex",
|
|
2942
|
-
justifyContent: "flex-start"
|
|
2966
|
+
justifyContent: "flex-start",
|
|
2967
|
+
minHeight: RECAPTCHA_WIDGET_HEIGHT
|
|
2943
2968
|
},
|
|
2944
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2969
|
+
children: recaptchaGate.armed && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2945
2970
|
ReCAPTCHA4__default.default,
|
|
2946
2971
|
{
|
|
2947
2972
|
ref: recaptchaRef,
|
|
@@ -17103,7 +17128,7 @@ function ProductCard({ product, onClick, href }) {
|
|
|
17103
17128
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17104
17129
|
"span",
|
|
17105
17130
|
{
|
|
17106
|
-
className: `text-xs font-semibold ${priceLabel === "Free" ? "text-emerald-700" : "text-foreground"}`,
|
|
17131
|
+
className: `text-xs font-semibold ${priceLabel === "Free" ? "text-emerald-700 dark:text-emerald-400" : "text-foreground"}`,
|
|
17107
17132
|
children: priceLabel
|
|
17108
17133
|
}
|
|
17109
17134
|
)
|
|
@@ -17355,7 +17380,7 @@ function FeaturedHeroCard({
|
|
|
17355
17380
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17356
17381
|
"span",
|
|
17357
17382
|
{
|
|
17358
|
-
className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-700" : "text-foreground"}`,
|
|
17383
|
+
className: `text-sm font-bold flex-shrink-0 ${priceLabel === "Free" ? "text-emerald-700 dark:text-emerald-400" : "text-foreground"}`,
|
|
17359
17384
|
children: priceLabel
|
|
17360
17385
|
}
|
|
17361
17386
|
)
|
|
@@ -17997,7 +18022,7 @@ function FacetList({
|
|
|
17997
18022
|
className: `w-full text-left text-sm px-2 py-1 rounded flex items-center justify-between gap-2 transition-colors ${selected === f.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
|
|
17998
18023
|
children: [
|
|
17999
18024
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: f.value }),
|
|
18000
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs
|
|
18025
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs flex-shrink-0", children: f.count })
|
|
18001
18026
|
]
|
|
18002
18027
|
}
|
|
18003
18028
|
) }, f.value)) })
|
|
@@ -18180,7 +18205,7 @@ function StoreBrowsePage({
|
|
|
18180
18205
|
className: `w-full text-left text-sm px-2 py-1.5 rounded flex items-center justify-between gap-2 transition-colors ${category === f.value ? "bg-primary/10 text-primary font-medium" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
|
|
18181
18206
|
children: [
|
|
18182
18207
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: cat?.name ?? f.value }),
|
|
18183
|
-
f.count > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs
|
|
18208
|
+
f.count > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs flex-shrink-0", children: f.count })
|
|
18184
18209
|
]
|
|
18185
18210
|
},
|
|
18186
18211
|
f.value
|
|
@@ -18228,6 +18253,7 @@ function StoreBrowsePage({
|
|
|
18228
18253
|
{
|
|
18229
18254
|
ref: searchRef,
|
|
18230
18255
|
type: "search",
|
|
18256
|
+
"aria-label": "Search store items",
|
|
18231
18257
|
value: inputValue,
|
|
18232
18258
|
onChange: (e) => setInputValue(e.target.value),
|
|
18233
18259
|
placeholder: "Search\u2026",
|
|
@@ -18247,6 +18273,7 @@ function StoreBrowsePage({
|
|
|
18247
18273
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18248
18274
|
"select",
|
|
18249
18275
|
{
|
|
18276
|
+
"aria-label": "Sort store items",
|
|
18250
18277
|
value: sortBy,
|
|
18251
18278
|
onChange: (e) => setSortBy(e.target.value),
|
|
18252
18279
|
className: "h-10 rounded-lg border border-border bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",
|
|
@@ -18325,6 +18352,7 @@ function StoreBrowsePage({
|
|
|
18325
18352
|
}
|
|
18326
18353
|
)
|
|
18327
18354
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18355
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "sr-only", children: "Store items" }),
|
|
18328
18356
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4", children: allProducts.map((product) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
18329
18357
|
ProductCard,
|
|
18330
18358
|
{
|
|
@@ -18910,7 +18938,7 @@ function StoreProductDetailPage({
|
|
|
18910
18938
|
children: [
|
|
18911
18939
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 mb-2", children: [
|
|
18912
18940
|
/* @__PURE__ */ jsxRuntime.jsx(StarRating, { rating: review.rating }),
|
|
18913
|
-
review.verifiedPurchase && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-emerald-700 font-medium", children: "Verified" })
|
|
18941
|
+
review.verifiedPurchase && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-emerald-700 dark:text-emerald-400 font-medium", children: "Verified" })
|
|
18914
18942
|
] }),
|
|
18915
18943
|
review.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
|
|
18916
18944
|
review.comment && /* @__PURE__ */ jsxRuntime.jsx(Markdown, { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
|
|
@@ -18944,7 +18972,7 @@ function StoreProductDetailPage({
|
|
|
18944
18972
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18945
18973
|
"div",
|
|
18946
18974
|
{
|
|
18947
|
-
className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-700" : "text-foreground"}`,
|
|
18975
|
+
className: `text-3xl font-extrabold ${priceLabel === "Free" ? "text-emerald-700 dark:text-emerald-400" : "text-foreground"}`,
|
|
18948
18976
|
children: priceLabel
|
|
18949
18977
|
}
|
|
18950
18978
|
),
|