@burdenoff/website-sdk 2026.1031.2 → 2026.1101.1

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 (53) hide show
  1. package/dist/analytics/index.d.mts +41 -1
  2. package/dist/analytics/index.d.ts +41 -1
  3. package/dist/analytics/index.js +40 -0
  4. package/dist/analytics/index.js.map +1 -1
  5. package/dist/analytics/index.mjs +38 -1
  6. package/dist/analytics/index.mjs.map +1 -1
  7. package/dist/components/contact.js +12 -12
  8. package/dist/components/contact.js.map +1 -1
  9. package/dist/components/contact.mjs +12 -12
  10. package/dist/components/contact.mjs.map +1 -1
  11. package/dist/components/explore.js +12 -12
  12. package/dist/components/explore.js.map +1 -1
  13. package/dist/components/explore.mjs +12 -12
  14. package/dist/components/explore.mjs.map +1 -1
  15. package/dist/components/newsletter.js +12 -12
  16. package/dist/components/newsletter.js.map +1 -1
  17. package/dist/components/newsletter.mjs +12 -12
  18. package/dist/components/newsletter.mjs.map +1 -1
  19. package/dist/components/partners.js +12 -12
  20. package/dist/components/partners.js.map +1 -1
  21. package/dist/components/partners.mjs +12 -12
  22. package/dist/components/partners.mjs.map +1 -1
  23. package/dist/components/pricing.js +12 -12
  24. package/dist/components/pricing.js.map +1 -1
  25. package/dist/components/pricing.mjs +12 -12
  26. package/dist/components/pricing.mjs.map +1 -1
  27. package/dist/components/unsubscribe.js +12 -12
  28. package/dist/components/unsubscribe.js.map +1 -1
  29. package/dist/components/unsubscribe.mjs +12 -12
  30. package/dist/components/unsubscribe.mjs.map +1 -1
  31. package/dist/components/waitlist.js +51 -12
  32. package/dist/components/waitlist.js.map +1 -1
  33. package/dist/components/waitlist.mjs +51 -12
  34. package/dist/components/waitlist.mjs.map +1 -1
  35. package/dist/content/index.js +12 -12
  36. package/dist/content/index.js.map +1 -1
  37. package/dist/content/index.mjs +12 -12
  38. package/dist/content/index.mjs.map +1 -1
  39. package/dist/index.d.mts +2 -2
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.js +52 -12
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +52 -13
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/seo/index.js +12 -12
  46. package/dist/seo/index.js.map +1 -1
  47. package/dist/seo/index.mjs +12 -12
  48. package/dist/seo/index.mjs.map +1 -1
  49. package/dist/store/index.js +12 -12
  50. package/dist/store/index.js.map +1 -1
  51. package/dist/store/index.mjs +12 -12
  52. package/dist/store/index.mjs.map +1 -1
  53. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -27,7 +27,7 @@ import { e as UseExploreChatResult, S as StagedAttachment } from './use-explore-
27
27
  export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, f as classifyExploreError, u as useExploreChat } from './use-explore-chat-zRuoAin6.mjs';
28
28
  export { g as ESCALATE_EXPLORE_CONVERSATION_MUTATION, h as EXPLORE_CATALOG_QUERY, i as EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS, j as EXPLORE_ESCALATION_NOTE_SOFT_MAX, k as EXPLORE_MESSAGE_QUERY, l as EscalateExploreConversationInput, m as EscalateExploreConversationResult, E as ExploreCatalog, n as ExploreCatalogQueryData, o as ExploreConceptHighlight, p as ExploreConversation, q as ExploreCtaKind, r as ExploreCtaLink, s as ExploreErrorCode, t as ExploreEscalation, d as ExploreLimits, a as ExploreMessage, u as ExploreMessageQueryData, v as ExploreMessageRole, w as ExploreMessageStatus, e as ExploreProduct, f as ExploreReference, S as SEND_EXPLORE_MESSAGE_MUTATION, x as SendExploreMessageInput, y as SendExploreMessageMutationData, z as SendExploreMessageResult, A as looksLikeDeliverableEmail } from './explore-types-Bb2Ih3d8.mjs';
29
29
  export { U as UseSpeechOutputOptions, a as UseSpeechOutputResult, s as stopSpeaking, u as useProgressiveReveal, b as useSpeechOutput } from './use-progressive-reveal-ppicEgzZ.mjs';
30
- export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.mjs';
30
+ export { RybbitAnalytics, RybbitAnalyticsProps, WebsiteEventName, WebsiteEventProperties, trackWebsiteEvent } from './analytics/index.mjs';
31
31
  export { PageHead, PageHeadProps } from './seo/index.mjs';
32
32
  export { ProductData, ProductProvider, ProductProviderProps, PublicProductFetchResult, fetchPublicProduct, useProduct, useProductConfig } from './product/index.mjs';
33
33
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -745,7 +745,7 @@ declare function ExplorePanel({ open, onOpenChange, id, productSlug, locale, sco
745
745
 
746
746
  declare const buttonVariants: (props?: ({
747
747
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
748
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
748
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
749
749
  } & class_variance_authority_types.ClassProp) | undefined) => string;
750
750
  interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
751
751
  asChild?: boolean;
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ import { e as UseExploreChatResult, S as StagedAttachment } from './use-explore-
27
27
  export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, c as ExploreEscalateOutcome, d as ExploreEscalateResult, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, f as classifyExploreError, u as useExploreChat } from './use-explore-chat-DunjG-3p.js';
28
28
  export { g as ESCALATE_EXPLORE_CONVERSATION_MUTATION, h as EXPLORE_CATALOG_QUERY, i as EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS, j as EXPLORE_ESCALATION_NOTE_SOFT_MAX, k as EXPLORE_MESSAGE_QUERY, l as EscalateExploreConversationInput, m as EscalateExploreConversationResult, E as ExploreCatalog, n as ExploreCatalogQueryData, o as ExploreConceptHighlight, p as ExploreConversation, q as ExploreCtaKind, r as ExploreCtaLink, s as ExploreErrorCode, t as ExploreEscalation, d as ExploreLimits, a as ExploreMessage, u as ExploreMessageQueryData, v as ExploreMessageRole, w as ExploreMessageStatus, e as ExploreProduct, f as ExploreReference, S as SEND_EXPLORE_MESSAGE_MUTATION, x as SendExploreMessageInput, y as SendExploreMessageMutationData, z as SendExploreMessageResult, A as looksLikeDeliverableEmail } from './explore-types-Bb2Ih3d8.js';
29
29
  export { U as UseSpeechOutputOptions, a as UseSpeechOutputResult, s as stopSpeaking, u as useProgressiveReveal, b as useSpeechOutput } from './use-progressive-reveal-ppicEgzZ.js';
30
- export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.js';
30
+ export { RybbitAnalytics, RybbitAnalyticsProps, WebsiteEventName, WebsiteEventProperties, trackWebsiteEvent } from './analytics/index.js';
31
31
  export { PageHead, PageHeadProps } from './seo/index.js';
32
32
  export { ProductData, ProductProvider, ProductProviderProps, PublicProductFetchResult, fetchPublicProduct, useProduct, useProductConfig } from './product/index.js';
33
33
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -745,7 +745,7 @@ declare function ExplorePanel({ open, onOpenChange, id, productSlug, locale, sco
745
745
 
746
746
  declare const buttonVariants: (props?: ({
747
747
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
748
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
748
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
749
749
  } & class_variance_authority_types.ClassProp) | undefined) => string;
750
750
  interface ButtonProps extends react.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
751
751
  asChild?: boolean;
package/dist/index.js CHANGED
@@ -598,24 +598,24 @@ function PageHead({
598
598
  return /* @__PURE__ */ jsxRuntime.jsxs(reactHelmetAsync.Helmet, { children: [
599
599
  /* @__PURE__ */ jsxRuntime.jsx("title", { children: fullTitle }),
600
600
  /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "title", content: fullTitle }),
601
- description && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "description", content: description }),
602
- keywords && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "keywords", content: keywords }),
603
- author && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "author", content: author }),
601
+ description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "description", content: description }) : null,
602
+ keywords ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "keywords", content: keywords }) : null,
603
+ author ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "author", content: author }) : null,
604
604
  /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "robots", content: robots }),
605
- resolvedUrl && /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "canonical", href: resolvedUrl }),
606
- favicon && /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "icon", href: favicon }),
605
+ resolvedUrl ? /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "canonical", href: resolvedUrl }) : null,
606
+ favicon ? /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "icon", href: favicon }) : null,
607
607
  /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:type", content: "website" }),
608
608
  /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:title", content: fullTitle }),
609
- description && /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:description", content: description }),
610
- fullImageUrl && /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:image", content: fullImageUrl }),
611
- resolvedUrl && /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:url", content: resolvedUrl }),
609
+ description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:description", content: description }) : null,
610
+ fullImageUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:image", content: fullImageUrl }) : null,
611
+ resolvedUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:url", content: resolvedUrl }) : null,
612
612
  /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:locale", content: locale }),
613
- productName && /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:site_name", content: productName }),
613
+ productName ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:site_name", content: productName }) : null,
614
614
  /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:card", content: "summary_large_image" }),
615
615
  /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:title", content: fullTitle }),
616
- description && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:description", content: description }),
617
- fullImageUrl && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:image", content: fullImageUrl }),
618
- twitterHandle && /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:creator", content: twitterHandle }),
616
+ description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:description", content: description }) : null,
617
+ fullImageUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:image", content: fullImageUrl }) : null,
618
+ twitterHandle ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:creator", content: twitterHandle }) : null,
619
619
  /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "theme-color", content: themeColor }),
620
620
  structuredDataItems.map((data, index) => /* @__PURE__ */ jsxRuntime.jsx("script", { type: "application/ld+json", children: serializeJsonLd(data) }, `ld-${index}`)),
621
621
  additionalMeta?.map((meta, index) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -3857,6 +3857,43 @@ function PricingPage(props) {
3857
3857
  /* @__PURE__ */ jsxRuntime.jsx(PricingSection, { ...props })
3858
3858
  ] });
3859
3859
  }
3860
+
3861
+ // src/analytics/events.ts
3862
+ var MAX_PROPERTY_LENGTH = 64;
3863
+ var EMAIL_LIKE = /[^\s@]+@[^\s@]+/;
3864
+ function sanitizeWebsiteEventProperties(properties) {
3865
+ const safe = {};
3866
+ if (!properties) return safe;
3867
+ for (const [key, value] of Object.entries(properties)) {
3868
+ if (typeof value === "boolean") {
3869
+ safe[key] = value;
3870
+ } else if (typeof value === "number") {
3871
+ if (Number.isFinite(value)) safe[key] = value;
3872
+ } else if (typeof value === "string") {
3873
+ const trimmed = value.trim();
3874
+ if (trimmed.length > 0 && trimmed.length <= MAX_PROPERTY_LENGTH && !EMAIL_LIKE.test(trimmed)) {
3875
+ safe[key] = trimmed;
3876
+ }
3877
+ }
3878
+ }
3879
+ return safe;
3880
+ }
3881
+ function trackWebsiteEvent(name, properties) {
3882
+ if (typeof window === "undefined") return false;
3883
+ try {
3884
+ const rybbit = window.rybbit;
3885
+ if (typeof rybbit?.event !== "function") return false;
3886
+ const safe = sanitizeWebsiteEventProperties(properties);
3887
+ if (Object.keys(safe).length > 0) {
3888
+ rybbit.event(name, safe);
3889
+ } else {
3890
+ rybbit.event(name);
3891
+ }
3892
+ return true;
3893
+ } catch {
3894
+ return false;
3895
+ }
3896
+ }
3860
3897
  var waitlistPageSchema = zod.z.object({
3861
3898
  name: zod.z.string().min(1, "Name is required"),
3862
3899
  email: zod.z.string().email("Please enter a valid email address"),
@@ -4128,6 +4165,7 @@ function WaitlistPage({
4128
4165
  product?.id || config.productId
4129
4166
  );
4130
4167
  if (result.success) {
4168
+ trackWebsiteEvent("waitlist.signed_up", { form: "page" });
4131
4169
  sonner.toast.success(result.message ?? successMessage);
4132
4170
  reset();
4133
4171
  } else {
@@ -4278,6 +4316,7 @@ function WaitlistForm({
4278
4316
  product?.id || config.productId
4279
4317
  );
4280
4318
  if (result.success) {
4319
+ trackWebsiteEvent("waitlist.signed_up", { form: "inline" });
4281
4320
  sonner.toast.success(result.message ?? "You have been added to the waitlist!");
4282
4321
  setEmail("");
4283
4322
  setName("");
@@ -21092,6 +21131,7 @@ exports.shouldRenderSiteFooter = shouldRenderSiteFooter;
21092
21131
  exports.speechLocaleOf = speechLocaleOf;
21093
21132
  exports.splitLeadingHeading = splitLeadingHeading;
21094
21133
  exports.stopSpeaking = stopSpeaking;
21134
+ exports.trackWebsiteEvent = trackWebsiteEvent;
21095
21135
  exports.useContentPage = useContentPage;
21096
21136
  exports.useContentPages = useContentPages;
21097
21137
  exports.useExploreChat = useExploreChat;