@burdenoff/website-sdk 2026.805.1 → 2026.813.2

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 (41) hide show
  1. package/dist/components/contact.js +20 -3
  2. package/dist/components/contact.js.map +1 -1
  3. package/dist/components/contact.mjs +20 -3
  4. package/dist/components/contact.mjs.map +1 -1
  5. package/dist/components/newsletter.js +20 -3
  6. package/dist/components/newsletter.js.map +1 -1
  7. package/dist/components/newsletter.mjs +20 -3
  8. package/dist/components/newsletter.mjs.map +1 -1
  9. package/dist/components/partners.js +20 -3
  10. package/dist/components/partners.js.map +1 -1
  11. package/dist/components/partners.mjs +20 -3
  12. package/dist/components/partners.mjs.map +1 -1
  13. package/dist/components/pricing.js +20 -3
  14. package/dist/components/pricing.js.map +1 -1
  15. package/dist/components/pricing.mjs +20 -3
  16. package/dist/components/pricing.mjs.map +1 -1
  17. package/dist/components/unsubscribe.js +20 -3
  18. package/dist/components/unsubscribe.js.map +1 -1
  19. package/dist/components/unsubscribe.mjs +20 -3
  20. package/dist/components/unsubscribe.mjs.map +1 -1
  21. package/dist/components/waitlist.js +20 -3
  22. package/dist/components/waitlist.js.map +1 -1
  23. package/dist/components/waitlist.mjs +20 -3
  24. package/dist/components/waitlist.mjs.map +1 -1
  25. package/dist/content/index.js +20 -3
  26. package/dist/content/index.js.map +1 -1
  27. package/dist/content/index.mjs +20 -3
  28. package/dist/content/index.mjs.map +1 -1
  29. package/dist/index.js +27 -10
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +27 -10
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/seo/index.js +20 -3
  34. package/dist/seo/index.js.map +1 -1
  35. package/dist/seo/index.mjs +20 -3
  36. package/dist/seo/index.mjs.map +1 -1
  37. package/dist/store/index.js +20 -3
  38. package/dist/store/index.js.map +1 -1
  39. package/dist/store/index.mjs +20 -3
  40. package/dist/store/index.mjs.map +1 -1
  41. package/package.json +2 -2
@@ -398,6 +398,22 @@ function useWebSDK() {
398
398
  }
399
399
  return client;
400
400
  }
401
+ function canonicalFromLocation() {
402
+ if (typeof window === "undefined" || !window.location) return void 0;
403
+ const { origin, pathname } = window.location;
404
+ if (!origin || origin === "null") return void 0;
405
+ const path = pathname === "/" ? "/" : pathname.replace(/\/+$/, "");
406
+ return `${origin}${path}`;
407
+ }
408
+ function resolveImageUrl(image, base) {
409
+ if (!image || /^https?:\/\//i.test(image)) return image;
410
+ if (!base) return image;
411
+ try {
412
+ return new URL(image, base).toString();
413
+ } catch {
414
+ return image;
415
+ }
416
+ }
401
417
  function PageHead({
402
418
  title,
403
419
  description,
@@ -414,7 +430,8 @@ function PageHead({
414
430
  additionalMeta
415
431
  }) {
416
432
  const fullTitle = productName && !title.includes(productName) ? `${title} | ${productName}` : title;
417
- const fullImageUrl = image && !image.startsWith("http") && url ? `${url.replace(/\/$/, "")}${image}` : image;
433
+ const resolvedUrl = url ?? canonicalFromLocation();
434
+ const fullImageUrl = resolveImageUrl(image, resolvedUrl);
418
435
  const structuredDataItems = structuredData ? Array.isArray(structuredData) ? structuredData : [structuredData] : [];
419
436
  return /* @__PURE__ */ jsxs(Helmet, { children: [
420
437
  /* @__PURE__ */ jsx("title", { children: fullTitle }),
@@ -423,13 +440,13 @@ function PageHead({
423
440
  keywords && /* @__PURE__ */ jsx("meta", { name: "keywords", content: keywords }),
424
441
  /* @__PURE__ */ jsx("meta", { name: "author", content: "Burdenoff Consultancy Services Pvt Ltd" }),
425
442
  /* @__PURE__ */ jsx("meta", { name: "robots", content: robots }),
426
- url && /* @__PURE__ */ jsx("link", { rel: "canonical", href: url }),
443
+ resolvedUrl && /* @__PURE__ */ jsx("link", { rel: "canonical", href: resolvedUrl }),
427
444
  favicon && /* @__PURE__ */ jsx("link", { rel: "icon", href: favicon }),
428
445
  /* @__PURE__ */ jsx("meta", { property: "og:type", content: "website" }),
429
446
  /* @__PURE__ */ jsx("meta", { property: "og:title", content: fullTitle }),
430
447
  description && /* @__PURE__ */ jsx("meta", { property: "og:description", content: description }),
431
448
  fullImageUrl && /* @__PURE__ */ jsx("meta", { property: "og:image", content: fullImageUrl }),
432
- url && /* @__PURE__ */ jsx("meta", { property: "og:url", content: url }),
449
+ resolvedUrl && /* @__PURE__ */ jsx("meta", { property: "og:url", content: resolvedUrl }),
433
450
  /* @__PURE__ */ jsx("meta", { property: "og:locale", content: locale }),
434
451
  productName && /* @__PURE__ */ jsx("meta", { property: "og:site_name", content: productName }),
435
452
  /* @__PURE__ */ jsx("meta", { name: "twitter:card", content: "summary_large_image" }),