@srimandir/kundli-matching-generator 1.0.26 → 1.0.27

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.
@@ -0,0 +1,74 @@
1
+ const e = {
2
+ // Page view events
3
+ kundli_matching_page_view: "kundli_matching_page_view",
4
+ kundli_matching_form_view: "kundli_matching_form_view",
5
+ // Banner & CTA events
6
+ banner_clicked_fe: "banner_clicked_fe",
7
+ primary_cta_clicked_fe: "primary_cta_clicked_fe",
8
+ // Language events
9
+ language_changed_fe: "language_changed_fe",
10
+ language_clicked_fe: "language_clicked_fe",
11
+ // Sample report events
12
+ view_sample_report_clicked: "view_sample_report_clicked",
13
+ view_sample_report_closed: "view_sample_report_closed",
14
+ // Info icon events
15
+ info_icon_clicked: "info_icon_clicked",
16
+ // Boy's form events
17
+ boy_name_section_clicked: "boy_name_section_clicked",
18
+ boy_name_section_filled: "boy_name_section_filled",
19
+ boy_dob_clicked: "boy_dob_clicked",
20
+ boy_dob_filled: "boy_dob_filled",
21
+ boy_time_clicked: "boy_time_clicked",
22
+ boy_time_filled: "boy_time_filled",
23
+ boy_time_checkbox_clicked: "boy_time_checkbox_clicked",
24
+ boy_place_of_birth_clicked: "boy_place_of_birth_clicked",
25
+ boy_place_of_birth_chosen: "boy_place_of_birth_chosen",
26
+ // Girl's form events
27
+ girl_name_section_clicked: "girl_name_section_clicked",
28
+ girl_name_section_filled: "girl_name_section_filled",
29
+ girl_dob_clicked: "girl_dob_clicked",
30
+ girl_dob_filled: "girl_dob_filled",
31
+ girl_time_clicked: "girl_time_clicked",
32
+ girl_time_filled: "girl_time_filled",
33
+ girl_time_checkbox_clicked: "girl_time_checkbox_clicked",
34
+ girl_place_of_birth_clicked: "girl_place_of_birth_clicked",
35
+ girl_place_of_birth_chosen: "girl_place_of_birth_chosen",
36
+ // Report language events
37
+ language_of_report_clicked: "language_of_report_clicked",
38
+ language_of_report_selected: "language_of_report_selected",
39
+ // Contact info events
40
+ phone_section_clicked: "phone_section_clicked",
41
+ phone_section_filled: "phone_section_filled",
42
+ email_section_clicked: "email_section_clicked",
43
+ email_section_filled: "email_section_filled",
44
+ // Primary CTA L0 (footer button)
45
+ kundli_matching_l0_cta_click: "kundli_matching_l0_cta_click",
46
+ // Primary CTA L1 (form submission)
47
+ primary_cta_clicked_l1: "primary_cta_clicked_l1",
48
+ // Plan selection events
49
+ kundli_matching_plan_page_viewed: "kundli_matching_plan_page_viewed",
50
+ kundli_matching_plan_selected: "kundli_matching_plan_selected",
51
+ kundli_matching_plan_proceed_clicked: "kundli_matching_plan_proceed_clicked",
52
+ kundli_matching_plan_page_closed: "kundli_matching_plan_page_closed",
53
+ // Payment events
54
+ payment_partner_page_opened: "payment_partner_page_opened",
55
+ retry_payment: "retry_payment",
56
+ // Section impression events
57
+ hero_section_viewed: "hero_section_viewed",
58
+ features_section_viewed: "features_section_viewed",
59
+ sneak_peek_section_viewed: "sneak_peek_section_viewed",
60
+ testimonials_section_viewed: "testimonials_section_viewed",
61
+ benefits_section_viewed: "benefits_section_viewed",
62
+ form_section_viewed: "form_section_viewed",
63
+ how_it_works_section_viewed: "how_it_works_section_viewed",
64
+ why_us_section_viewed: "why_us_section_viewed",
65
+ faq_section_viewed: "faq_section_viewed",
66
+ // Sneak peek card tracking
67
+ sneak_peek_card_viewed: "sneak_peek_card_viewed",
68
+ // Testimonial scroll tracking
69
+ testimonial_scrolled: "testimonial_scrolled"
70
+ };
71
+ export {
72
+ e as K
73
+ };
74
+ //# sourceMappingURL=analytics-DOxGfyuB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics-DOxGfyuB.js","sources":["../src/analytics.ts"],"sourcesContent":["/**\n * Event names for Kundli Matching Generator analytics (Mixpanel).\n * Host app should use these when calling logEvent.\n */\nexport const KUNDLI_MATCHING_ANALYTICS_EVENT_NAMES = {\n // Page view events\n kundli_matching_page_view: 'kundli_matching_page_view',\n kundli_matching_form_view: 'kundli_matching_form_view',\n \n // Banner & CTA events\n banner_clicked_fe: 'banner_clicked_fe',\n primary_cta_clicked_fe: 'primary_cta_clicked_fe',\n \n // Language events\n language_changed_fe: 'language_changed_fe',\n language_clicked_fe: 'language_clicked_fe',\n \n // Sample report events\n view_sample_report_clicked: 'view_sample_report_clicked',\n view_sample_report_closed: 'view_sample_report_closed',\n \n // Info icon events\n info_icon_clicked: 'info_icon_clicked',\n \n // Boy's form events\n boy_name_section_clicked: 'boy_name_section_clicked',\n boy_name_section_filled: 'boy_name_section_filled',\n boy_dob_clicked: 'boy_dob_clicked',\n boy_dob_filled: 'boy_dob_filled',\n boy_time_clicked: 'boy_time_clicked',\n boy_time_filled: 'boy_time_filled',\n boy_time_checkbox_clicked: 'boy_time_checkbox_clicked',\n boy_place_of_birth_clicked: 'boy_place_of_birth_clicked',\n boy_place_of_birth_chosen: 'boy_place_of_birth_chosen',\n \n // Girl's form events\n girl_name_section_clicked: 'girl_name_section_clicked',\n girl_name_section_filled: 'girl_name_section_filled',\n girl_dob_clicked: 'girl_dob_clicked',\n girl_dob_filled: 'girl_dob_filled',\n girl_time_clicked: 'girl_time_clicked',\n girl_time_filled: 'girl_time_filled',\n girl_time_checkbox_clicked: 'girl_time_checkbox_clicked',\n girl_place_of_birth_clicked: 'girl_place_of_birth_clicked',\n girl_place_of_birth_chosen: 'girl_place_of_birth_chosen',\n \n // Report language events\n language_of_report_clicked: 'language_of_report_clicked',\n language_of_report_selected: 'language_of_report_selected',\n \n // Contact info events\n phone_section_clicked: 'phone_section_clicked',\n phone_section_filled: 'phone_section_filled',\n email_section_clicked: 'email_section_clicked',\n email_section_filled: 'email_section_filled',\n \n // Primary CTA L0 (footer button)\n kundli_matching_l0_cta_click: 'kundli_matching_l0_cta_click',\n \n // Primary CTA L1 (form submission)\n primary_cta_clicked_l1: 'primary_cta_clicked_l1',\n \n // Plan selection events\n kundli_matching_plan_page_viewed: 'kundli_matching_plan_page_viewed',\n kundli_matching_plan_selected: 'kundli_matching_plan_selected',\n kundli_matching_plan_proceed_clicked: 'kundli_matching_plan_proceed_clicked',\n kundli_matching_plan_page_closed: 'kundli_matching_plan_page_closed',\n \n // Payment events\n payment_partner_page_opened: 'payment_partner_page_opened',\n retry_payment: 'retry_payment',\n \n // Section impression events\n hero_section_viewed: 'hero_section_viewed',\n features_section_viewed: 'features_section_viewed',\n sneak_peek_section_viewed: 'sneak_peek_section_viewed',\n testimonials_section_viewed: 'testimonials_section_viewed',\n benefits_section_viewed: 'benefits_section_viewed',\n form_section_viewed: 'form_section_viewed',\n how_it_works_section_viewed: 'how_it_works_section_viewed',\n why_us_section_viewed: 'why_us_section_viewed',\n faq_section_viewed: 'faq_section_viewed',\n \n // Sneak peek card tracking\n sneak_peek_card_viewed: 'sneak_peek_card_viewed',\n \n // Testimonial scroll tracking\n testimonial_scrolled: 'testimonial_scrolled',\n} as const;\n\nexport type KundliMatchingAnalyticsEventName =\n (typeof KUNDLI_MATCHING_ANALYTICS_EVENT_NAMES)[keyof typeof KUNDLI_MATCHING_ANALYTICS_EVENT_NAMES];\n\n/**\n * Optional analytics implementation for Kundli Matching Generator.\n * Pass from host to track events.\n */\nexport interface KundliMatchingAnalytics {\n // Page view tracking\n trackKundliMatchingPageView?(): void;\n trackKundliMatchingFormView?(): void;\n \n // Banner & CTA tracking\n trackBannerClicked?(): void;\n trackPrimaryCtaClickedFe?(params: { ctaText?: string }): void;\n \n // Language tracking\n trackLanguageChangedFe?(params: { newLanguage: string }): void;\n trackLanguageClickedFe?(params: { language: string }): void;\n \n // Sample report tracking\n trackViewSampleReportClicked?(): void;\n trackViewSampleReportClosed?(): void;\n \n // Info icon tracking\n trackInfoIconClicked?(params: { fieldName: string }): void;\n \n // Boy's form tracking\n trackBoyNameSectionClicked?(): void;\n trackBoyNameSectionFilled?(): void;\n trackBoyDobClicked?(): void;\n trackBoyDobFilled?(): void;\n trackBoyTimeClicked?(): void;\n trackBoyTimeFilled?(): void;\n trackBoyTimeCheckboxClicked?(): void;\n trackBoyPlaceOfBirthClicked?(): void;\n trackBoyPlaceOfBirthChosen?(): void;\n \n // Girl's form tracking\n trackGirlNameSectionClicked?(): void;\n trackGirlNameSectionFilled?(): void;\n trackGirlDobClicked?(): void;\n trackGirlDobFilled?(): void;\n trackGirlTimeClicked?(): void;\n trackGirlTimeFilled?(): void;\n trackGirlTimeCheckboxClicked?(): void;\n trackGirlPlaceOfBirthClicked?(): void;\n trackGirlPlaceOfBirthChosen?(): void;\n \n // Report language tracking\n trackLanguageOfReportClicked?(): void;\n trackLanguageOfReportSelected?(params: { language: string }): void;\n \n // Contact info tracking\n trackPhoneSectionClicked?(): void;\n trackPhoneSectionFilled?(): void;\n trackEmailSectionClicked?(): void;\n trackEmailSectionFilled?(): void;\n \n // CTA tracking\n trackKundliMatchingL0CtaClick?(params: { ctaText: string; isFormComplete: boolean }): void;\n \n // Form submission tracking\n trackPrimaryCtaClickedL1?(params: { avenue?: string }): void;\n \n // Plan selection tracking\n trackPlanPageViewed?(): void;\n trackPlanSelected?(params: { planId: string; planName: string }): void;\n trackPlanProceedClicked?(params: { planId: string; planName: string }): void;\n trackPlanPageClosed?(): void;\n \n // Payment tracking\n trackPaymentPartnerPageOpened?(params: { planId: string; planName: string; price: string }): void;\n trackRetryPayment?(): void;\n \n // Section impression tracking\n trackHeroSectionViewed?(): void;\n trackFeaturesSectionViewed?(): void;\n trackSneakPeekSectionViewed?(): void;\n trackTestimonialsSectionViewed?(): void;\n trackBenefitsSectionViewed?(): void;\n trackFormSectionViewed?(): void;\n trackHowItWorksSectionViewed?(): void;\n trackWhyUsSectionViewed?(): void;\n trackFaqSectionViewed?(): void;\n \n // Sneak peek card tracking\n trackSneakPeekCardViewed?(params: { cardNumber: number; cardTitle: string }): void;\n \n // Testimonial scroll tracking\n trackTestimonialScrolled?(params: { reviewIndex: number; reviewerName: string; isManualScroll: boolean }): void;\n}\n"],"names":["KUNDLI_MATCHING_ANALYTICS_EVENT_NAMES"],"mappings":"AAIO,MAAMA,IAAwC;AAAA;AAAA,EAEnD,2B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+ * Hero image URL - exported so host apps can preload this resource in document head for better performance (LCP):
4
+ * <link rel="preload" as="image" href={HERO_IMAGE_URL} />
5
+ */
6
+ export declare const HERO_IMAGE_URL = "https://srm-cdn.a4b.io/yoda/1774511296258.webp";
2
7
  export interface HeroSectionProps {
3
8
  t: (key: string) => string;
4
9
  className?: string;
10
+ /** When true, hero image loads with priority (for LCP). Default true. */
11
+ heroImagePriority?: boolean;
5
12
  }
6
13
  export declare const HeroSection: React.FC<HeroSectionProps>;
@@ -1,2 +1,2 @@
1
- export { HeroSection } from './HeroSection';
1
+ export { HeroSection, HERO_IMAGE_URL } from './HeroSection';
2
2
  export type { HeroSectionProps } from './HeroSection';
@@ -3,6 +3,7 @@ import { SupportedLocale } from '../../i18n/translations';
3
3
  import { KundliMatchingFormValues } from '../KundliMatchingFormSection';
4
4
  import { KundliMatchingAnalytics } from '../../analytics';
5
5
  import { KundliMatchingPlan } from '../KundliMatchingPlanBottomSheet';
6
+ import { KundliMatchingImageComponent } from '../../types/image';
6
7
  export interface KundliMatchingContextConfig {
7
8
  locale?: SupportedLocale;
8
9
  showLanguageSelector?: boolean;
@@ -12,6 +13,8 @@ export interface KundliMatchingContextConfig {
12
13
  onProceed?: (values: KundliMatchingFormValues, plan: KundliMatchingPlan) => void;
13
14
  analytics?: KundliMatchingAnalytics;
14
15
  onLocaleChange?: (locale: SupportedLocale) => void;
16
+ /** Optional image component (e.g. next/image adapter) for optimized images. */
17
+ imageComponent?: KundliMatchingImageComponent;
15
18
  }
16
19
  export interface KundliMatchingContextValue {
17
20
  locale: SupportedLocale;
@@ -20,9 +23,11 @@ export interface KundliMatchingContextValue {
20
23
  formValues: KundliMatchingFormValues;
21
24
  setFormValues: React.Dispatch<React.SetStateAction<KundliMatchingFormValues>>;
22
25
  }
26
+ declare const KundliMatchingContext: React.Context<KundliMatchingContextValue | null>;
23
27
  export interface KundliMatchingProviderProps extends KundliMatchingContextConfig {
24
28
  children?: React.ReactNode;
25
29
  }
26
30
  export declare const KundliMatchingProvider: React.FC<KundliMatchingProviderProps>;
27
31
  export declare function useKundliMatchingContext(): KundliMatchingContextValue | null;
28
32
  export declare function useKundliMatchingContextOrThrow(): KundliMatchingContextValue;
33
+ export { KundliMatchingContext };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Critical CSS that should be inlined in document <head> to prevent CLS
3
+ * Import this in your host app and inject it as inline styles
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * import { KUNDLI_MATCHING_CRITICAL_CSS } from '@srimandir/kundli-matching-generator';
8
+ *
9
+ * <style dangerouslySetInnerHTML={{ __html: KUNDLI_MATCHING_CRITICAL_CSS }} />
10
+ * ```
11
+ */
12
+ export declare const KUNDLI_MATCHING_CRITICAL_CSS = "[data-hero]{min-height:200px}[data-background-layer]{position:absolute;inset:0;z-index:0;overflow:hidden}[data-form-container]{min-height:400px}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap}@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap}img{max-width:100%;height:auto}.kundli-matching-page-root{contain:layout}";