@srimandir/dosha-calculator 2.1.7 → 2.2.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.
@@ -29,4 +29,11 @@ export interface DoshaAnalytics {
29
29
  trackFaqQuestionClicked?(questionText: string): void;
30
30
  trackLanguageClicked?(selectedLanguage: string): void;
31
31
  trackLanguageChanged?(lang: string): void;
32
+ trackDoshaCalculatorResultBookCtaClicked?(params: {
33
+ position: string;
34
+ url: string;
35
+ isOldDosha?: boolean;
36
+ }): void;
37
+ trackDoshaCalculatorResultPageView?(): void;
38
+ trackDoshaCalculatorResultViewKundliClick?(): void;
32
39
  }
@@ -1,11 +1,14 @@
1
1
  import { BannerConfig } from '../../constants/bannerConfig';
2
+ import { DoshaImageComponent } from '../../types/image';
2
3
  export interface DoshaBannerProps {
3
4
  /** Banner configuration containing image URL and alt text */
4
5
  bannerConfig: BannerConfig;
5
6
  /** Optional additional CSS class */
6
7
  className?: string;
8
+ /** Optional image component for optimization */
9
+ imageComponent?: DoshaImageComponent;
7
10
  }
8
11
  /**
9
12
  * DoshaBanner - Displays promotional banner based on utm_term and locale
10
13
  */
11
- export declare function DoshaBanner({ bannerConfig, className, }: DoshaBannerProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function DoshaBanner({ bannerConfig, className, imageComponent, }: DoshaBannerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { DoshaAnalytics } from '../../analytics';
2
2
  import { SupabaseClient } from '@supabase/supabase-js';
3
3
  import { DoshaCalculationResult, ResolvedPlace, BirthDetails } from '../../types/dosha-api';
4
+ import { DoshaImageComponent } from '../../types/image';
4
5
  export interface DoshaCalculatorProps {
5
6
  /** Optional class name for the container */
6
7
  className?: string;
@@ -10,6 +11,8 @@ export interface DoshaCalculatorProps {
10
11
  languageSelector?: React.ReactNode;
11
12
  /** Whether to show language selector */
12
13
  showLanguageSelector?: boolean;
14
+ /** Whether the user is global (hides language toggle when true) */
15
+ isGlobal?: boolean;
13
16
  /** Read more reviews link (optional) */
14
17
  readMoreReviewsHref?: string;
15
18
  /** Supabase project URL - if provided with supabaseAnonKey, a client will be created automatically */
@@ -48,5 +51,7 @@ export interface DoshaCalculatorProps {
48
51
  } | null;
49
52
  /** Called when Book Puja CTA is clicked (optional, defaults to opening the puja link) */
50
53
  onBookPujaClick?: () => void;
54
+ /** Optional image component (e.g. next/image adapter) for optimized images. */
55
+ imageComponent?: DoshaImageComponent;
51
56
  }
52
- export declare function DoshaCalculator({ className, logoUrl, languageSelector, showLanguageSelector, readMoreReviewsHref, supabaseUrl, supabaseAnonKey, googleMapsApiKey, supabase: supabaseProp, resolvePlace: resolvePlaceProp, onResult, onError, renderPujaCard, isLoadingPujas, renderKundali, kundaliSectionId, analytics, getFirstPujaInfo, onBookPujaClick, }: DoshaCalculatorProps): import("react/jsx-runtime").JSX.Element;
57
+ export declare function DoshaCalculator({ className, logoUrl, languageSelector, showLanguageSelector, isGlobal, readMoreReviewsHref, supabaseUrl, supabaseAnonKey, googleMapsApiKey, supabase: supabaseProp, resolvePlace: resolvePlaceProp, onResult, onError, renderPujaCard, isLoadingPujas, renderKundali, kundaliSectionId, analytics, getFirstPujaInfo, onBookPujaClick, imageComponent, }: DoshaCalculatorProps): import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,7 @@ export interface DoshaFormValues {
5
5
  name: string;
6
6
  gender: 'male' | 'female' | '';
7
7
  problems: string[];
8
+ otherProblemText?: string;
8
9
  dateOfBirth: string;
9
10
  birthTime: string;
10
11
  birthTimeUnknown: boolean;
@@ -1,4 +1,6 @@
1
1
  import { SriMandirPuja } from '../../lib/sriMandirPujaHelpers';
2
+ import { DoshaImageComponent } from '../../types/image';
3
+ import { DoshaAnalytics } from '../../analytics';
2
4
  export interface SriMandirPujaVerticalCardProps {
3
5
  puja: SriMandirPuja;
4
6
  doshaType: string;
@@ -6,5 +8,9 @@ export interface SriMandirPujaVerticalCardProps {
6
8
  language: string;
7
9
  onBookClick?: () => void | Promise<void>;
8
10
  variant?: string;
11
+ /** Optional image component for optimization */
12
+ imageComponent?: DoshaImageComponent;
13
+ /** Optional analytics callback */
14
+ analytics?: DoshaAnalytics;
9
15
  }
10
- export declare function SriMandirPujaVerticalCard({ puja, doshaType, language, onBookClick, }: SriMandirPujaVerticalCardProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function SriMandirPujaVerticalCard({ puja, doshaType, language, onBookClick, imageComponent, analytics, }: SriMandirPujaVerticalCardProps): import("react/jsx-runtime").JSX.Element;