@srimandir/dosha-calculator 8.0.2 → 8.0.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.
Files changed (45) hide show
  1. package/dist/analytics.d.ts +39 -0
  2. package/dist/components/DoshaBanner/DoshaBanner.d.ts +15 -0
  3. package/dist/components/DoshaBanner/index.d.ts +2 -0
  4. package/dist/components/DoshaCalculator/DoshaCalculator.d.ts +57 -0
  5. package/dist/components/DoshaDateField/DoshaDateField.d.ts +9 -0
  6. package/dist/components/DoshaFooterCTA/DoshaFooterCTA.d.ts +26 -0
  7. package/dist/components/DoshaFormSection/DoshaFormSection.d.ts +41 -0
  8. package/dist/components/DoshaResultsFull/DoshaResultsFull.d.ts +39 -0
  9. package/dist/components/DoshaResultsView/DoshaResultsView.d.ts +9 -0
  10. package/dist/components/DoshaTimeField/DoshaTimeField.d.ts +11 -0
  11. package/dist/components/FooterTrustBadge/FooterTrustBadge.d.ts +1 -0
  12. package/dist/components/KundaliCard/KundaliCard.d.ts +12 -0
  13. package/dist/components/SectionWithImpression/SectionWithImpression.d.ts +9 -0
  14. package/dist/components/SectionWithImpression/index.d.ts +1 -0
  15. package/dist/components/SriMandirPujaVerticalCard/SriMandirPujaVerticalCard.d.ts +17 -0
  16. package/dist/components/WhatFromAnalysis/WhatFromAnalysis.d.ts +9 -0
  17. package/dist/components/icons.d.ts +37 -0
  18. package/dist/components/ui/Accordion.d.ts +27 -0
  19. package/dist/components/ui/Badge.d.ts +6 -0
  20. package/dist/components/ui/Button.d.ts +9 -0
  21. package/dist/components/ui/Card.d.ts +7 -0
  22. package/dist/components/ui/Skeleton.d.ts +5 -0
  23. package/dist/constants/bannerConfig.d.ts +21 -0
  24. package/dist/dev/main.d.ts +0 -0
  25. package/dist/dev/puja-utils.d.ts +16 -0
  26. package/dist/dosha-calculator.js +21829 -0
  27. package/dist/dosha-calculator.js.map +1 -0
  28. package/dist/dosha-calculator.umd.cjs +160 -0
  29. package/dist/dosha-calculator.umd.cjs.map +1 -0
  30. package/dist/hooks/useGooglePlacesAutocomplete.d.ts +29 -0
  31. package/dist/i18n/I18nContext.d.ts +14 -0
  32. package/dist/i18n/index.d.ts +2 -0
  33. package/dist/i18n/translations.d.ts +5 -0
  34. package/dist/index.d.ts +34 -0
  35. package/dist/lib/google-maps-helpers.d.ts +13 -0
  36. package/dist/lib/kundaliChart.d.ts +11 -0
  37. package/dist/lib/puja-recommendation.d.ts +5 -0
  38. package/dist/lib/sriMandirPujaHelpers.d.ts +22 -0
  39. package/dist/lib/supabase-dosha.d.ts +31 -0
  40. package/dist/lib/supabase-helpers.d.ts +6 -0
  41. package/dist/style.css +1 -0
  42. package/dist/types/dosha-api.d.ts +83 -0
  43. package/dist/types/image.d.ts +18 -0
  44. package/dist/utils/queryParams.d.ts +14 -0
  45. package/package.json +2 -2
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Analytics interface for DoshaCalculator.
3
+ * Host app (e.g. hanuman) should pass an implementation via the analytics prop.
4
+ */
5
+ export declare const FLOATING_CTA_STATUS: {
6
+ readonly all_fields_filled: "all_fields_filled";
7
+ readonly fields_not_filled: "fields_not_filled";
8
+ readonly puja_clicked: "puja_clicked";
9
+ };
10
+ export type FloatingCtaStatus = (typeof FLOATING_CTA_STATUS)[keyof typeof FLOATING_CTA_STATUS];
11
+ export interface DoshaAnalytics {
12
+ trackDoshaCalculatorWebView?(): void;
13
+ trackDoshaSectionImpression?(params: {
14
+ section: string;
15
+ timestamp?: string;
16
+ }): void;
17
+ trackFloatingCtaClicked?(status: FloatingCtaStatus): void;
18
+ trackFormFillInitiated?(): void;
19
+ trackNameSectionClicked?(): void;
20
+ trackNameSectionFilled?(): void;
21
+ trackDobClicked?(): void;
22
+ trackDobFilled?(): void;
23
+ trackTimeClicked?(): void;
24
+ trackTimeFilled?(): void;
25
+ trackTimeCheckboxClicked?(): void;
26
+ trackPlaceOfBirthClicked?(): void;
27
+ trackPlaceOfBirthChosen?(placeValue: string): void;
28
+ trackReadMoreReviewsClicked?(): void;
29
+ trackFaqQuestionClicked?(questionText: string): void;
30
+ trackLanguageClicked?(selectedLanguage: string): void;
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;
39
+ }
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { BannerConfig } from '../../constants/bannerConfig';
3
+ import { DoshaImageComponent } from '../../types/image';
4
+ export interface DoshaBannerProps {
5
+ /** Banner configuration containing image URL and alt text */
6
+ bannerConfig: BannerConfig;
7
+ /** Optional additional CSS class */
8
+ className?: string;
9
+ /** Optional image component for optimization */
10
+ imageComponent?: DoshaImageComponent;
11
+ }
12
+ /**
13
+ * DoshaBanner - Displays promotional banner based on utm_term and locale
14
+ */
15
+ export declare function DoshaBanner({ bannerConfig, className, imageComponent, }: DoshaBannerProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DoshaBanner } from './DoshaBanner';
2
+ export type { DoshaBannerProps } from './DoshaBanner';
@@ -0,0 +1,57 @@
1
+ import { DoshaAnalytics } from '../../analytics';
2
+ import { SupabaseClient } from '@supabase/supabase-js';
3
+ import { DoshaCalculationResult, ResolvedPlace, BirthDetails } from '../../types/dosha-api';
4
+ import { DoshaImageComponent } from '../../types/image';
5
+ export interface DoshaCalculatorProps {
6
+ /** Optional class name for the container */
7
+ className?: string;
8
+ /** Logo URL (optional) */
9
+ logoUrl?: string;
10
+ /** Optional language selector slot */
11
+ languageSelector?: React.ReactNode;
12
+ /** Whether to show language selector */
13
+ showLanguageSelector?: boolean;
14
+ /** Whether the user is global (hides language toggle when true) */
15
+ isGlobal?: boolean;
16
+ /** Read more reviews link (optional) */
17
+ readMoreReviewsHref?: string;
18
+ /** Supabase project URL - if provided with supabaseAnonKey, a client will be created automatically */
19
+ supabaseUrl?: string;
20
+ /** Supabase anon/publishable key - if provided with supabaseUrl, a client will be created automatically */
21
+ supabaseAnonKey?: string;
22
+ /** Google Maps API key - if provided, place resolution will be handled automatically */
23
+ googleMapsApiKey?: string;
24
+ /** Supabase client for backend submission (Lovable / celestial-puja-finder compatible). Use this if you want to pass a pre-configured client instead of supabaseUrl + supabaseAnonKey. */
25
+ supabase?: SupabaseClient | null;
26
+ /** Resolve birth place string to { lat, lon, tz }. Use this as an alternative to googleMapsApiKey for custom place resolution or dev/testing environments. If both are provided, autocomplete will use googleMapsApiKey but submit will fallback to resolvePlace if coordinates aren't available. */
27
+ resolvePlace?: (place: string) => Promise<ResolvedPlace | null>;
28
+ /** Called with result when calculation succeeds; second arg is birth details for Kundali when available */
29
+ onResult?: (result: DoshaCalculationResult, birthDetails?: BirthDetails) => void;
30
+ /** Called with error message when calculation fails */
31
+ onError?: (error: string) => void;
32
+ /** Render a puja card for the given dosha type (e.g. mangal, kaal-sarp, pitra, shani). Optional: when omitted, package auto-fetches pujas and renders built-in cards. */
33
+ renderPujaCard?: (doshaType: string) => React.ReactNode;
34
+ /** When true, show a loading state in the puja recommendation area (e.g. while host fetches pujas). */
35
+ isLoadingPujas?: boolean;
36
+ /** Optional: render the Kundali chart section (e.g. KundaliCard). When provided, "Go Back" and "Planetary Positions Causing These Doshas" are shown. */
37
+ renderKundali?: () => React.ReactNode;
38
+ /** Optional: id for the kundali section (e.g. "kundali-chart-section") for "View Kundli" deep link. */
39
+ kundaliSectionId?: string;
40
+ /** Optional analytics implementation for tracking user interactions */
41
+ analytics?: DoshaAnalytics;
42
+ /**
43
+ * Function to get first puja info for the given dosha type.
44
+ * Optional: when omitted, package auto-fetches pujas and computes CTA info internally.
45
+ * Return null if no puja is available for that dosha.
46
+ */
47
+ getFirstPujaInfo?: (doshaType: string) => {
48
+ name: string;
49
+ price: number;
50
+ link?: string;
51
+ } | null;
52
+ /** Called when Book Puja CTA is clicked (optional, defaults to opening the puja link) */
53
+ onBookPujaClick?: () => void;
54
+ /** Optional image component (e.g. next/image adapter) for optimized images. */
55
+ imageComponent?: DoshaImageComponent;
56
+ }
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.Element;
@@ -0,0 +1,9 @@
1
+ export interface DoshaDateFieldProps {
2
+ id: string;
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ /** Called when the date picker is opened */
6
+ onOpen?: () => void;
7
+ className?: string;
8
+ }
9
+ export declare function DoshaDateField({ id, value, onChange, onOpen, className, }: DoshaDateFieldProps): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ export interface DoshaFooterCTAProps {
2
+ /** Whether all required form fields are filled */
3
+ isFormComplete: boolean;
4
+ /** Called when the CTA is clicked (e.g. scroll to form or submit) */
5
+ onPress: () => void;
6
+ /** Label when form is incomplete (e.g. "Check My Dosha for FREE") */
7
+ labelDefault: string;
8
+ /** Label when form is complete (e.g. "Calculate my dosha") */
9
+ labelFilled: string;
10
+ /** When true, show loading state and disable click */
11
+ isLoading?: boolean;
12
+ /** Mode: 'form' for form submission, 'book-puja' for booking first puja */
13
+ mode?: "form" | "book-puja";
14
+ /** First puja data (for book-puja mode) */
15
+ firstPuja?: {
16
+ name: string;
17
+ price: number;
18
+ };
19
+ /** Whether results are being shown (switches to edit mode label) */
20
+ showingResults?: boolean;
21
+ /** Label for the book puja button (e.g. "Book Puja" or "Book Now") */
22
+ bookPujaLabel?: string;
23
+ /** Loading label for calculate mode (e.g. "Calculating...") */
24
+ loadingLabel?: string;
25
+ }
26
+ export declare function DoshaFooterCTA({ isFormComplete, onPress, labelDefault, labelFilled, isLoading, mode, firstPuja, showingResults, bookPujaLabel, loadingLabel, }: DoshaFooterCTAProps): import("react").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { DoshaAnalytics } from '../../analytics';
2
+ import { SupabaseClient } from '@supabase/supabase-js';
3
+ import { ResolvedPlace, DoshaCalculationResult, BirthDetails } from '../../types/dosha-api';
4
+ export interface DoshaFormValues {
5
+ name: string;
6
+ gender: 'male' | 'female' | '';
7
+ problems: string[];
8
+ otherProblemText?: string;
9
+ dateOfBirth: string;
10
+ birthTime: string;
11
+ birthTimeUnknown: boolean;
12
+ birthPlace: string;
13
+ }
14
+ export interface DoshaFormSectionProps {
15
+ t: (key: string) => string;
16
+ className?: string;
17
+ /** Pre-fill the form with these values (e.g. when returning from results to edit) */
18
+ initialValues?: Partial<DoshaFormValues>;
19
+ /** Called with the latest form values whenever any field changes */
20
+ onValuesChange?: (values: DoshaFormValues) => void;
21
+ /** Called when required form fields become valid or invalid */
22
+ onFormValidityChange?: (isValid: boolean) => void;
23
+ /** Supabase client for submission (when set, footer CTA will submit) */
24
+ supabase?: SupabaseClient | null;
25
+ /** Resolve place string to lat, lon, tz (optional fallback for dev/testing when googleMapsApiKey not provided) */
26
+ resolvePlace?: (place: string) => Promise<ResolvedPlace | null>;
27
+ /** Google Maps API key for place autocomplete and timezone resolution (required for form submission) */
28
+ googleMapsApiKey?: string;
29
+ /** Called with result on successful calculation. Second arg is birth details for Kundali chart when available. */
30
+ onResult?: (result: DoshaCalculationResult, birthDetails?: BirthDetails) => void;
31
+ /** Called with error message on failure */
32
+ onError?: (error: string) => void;
33
+ /** Called when submit starts/finishes */
34
+ onLoadingChange?: (loading: boolean) => void;
35
+ /** Optional analytics implementation for tracking field interactions */
36
+ analytics?: DoshaAnalytics;
37
+ }
38
+ export interface DoshaFormSectionRef {
39
+ submit: () => Promise<void>;
40
+ }
41
+ export declare const DoshaFormSection: import('react').ForwardRefExoticComponent<DoshaFormSectionProps & import('react').RefAttributes<DoshaFormSectionRef>>;
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ import { DoshaCalculationResult, BirthDetails } from '../../types/dosha-api';
3
+ import { SupabaseClient } from '@supabase/supabase-js';
4
+ import { DoshaAnalytics } from '../../analytics';
5
+ export interface DoshaResultsFullProps {
6
+ result: DoshaCalculationResult;
7
+ t: (key: string) => string;
8
+ onEdit?: () => void;
9
+ className?: string;
10
+ /** Optional: scroll target id for "View Kundli" / "Go Back" (e.g. "kundali-chart-section"). If not set, those links are hidden. */
11
+ kundaliSectionId?: string;
12
+ /** Optional: contact email for feedback section */
13
+ feedbackEmail?: string;
14
+ /** Render a puja card for the given dosha type (mangal, kaal-sarp, pitra, shani). When provided, shown in the "Puja Recommendation" section per dosha. */
15
+ renderPujaCard?: (doshaType: string) => React.ReactNode;
16
+ /** When true, show loading state in the puja recommendation area. */
17
+ isLoadingPujas?: boolean;
18
+ /** Optional: render the Kundali chart section (e.g. KundaliCard). When provided, overrides built-in KundaliCard. */
19
+ renderKundali?: () => React.ReactNode;
20
+ /** Birth details from form submit; when set with supabase, built-in KundaliCard is shown (unless renderKundali is provided). */
21
+ birthDetails?: BirthDetails | null;
22
+ /** Supabase client for fetching Kundali chart; required for built-in KundaliCard. */
23
+ supabase?: SupabaseClient | null;
24
+ /** Current locale (e.g. 'en' or 'hi') for KundaliCard. */
25
+ language?: string;
26
+ /** Optional link for "Read More Reviews" in the UserReviewsSection. */
27
+ readMoreReviewsHref?: string;
28
+ /** When provided, replaces the edit button with this slot (e.g. an inline edit form). */
29
+ inlineEditForm?: React.ReactNode;
30
+ /** Optional analytics implementation for tracking user interactions */
31
+ analytics?: DoshaAnalytics;
32
+ /** Problem area text for personalized impact generation */
33
+ problemArea?: string;
34
+ /** Array of problem area IDs */
35
+ problemAreaIds?: string[];
36
+ /** Custom problem text when "other" is selected */
37
+ customProblemText?: string;
38
+ }
39
+ export declare function DoshaResultsFull({ result, t, onEdit, className, kundaliSectionId, feedbackEmail, renderPujaCard, isLoadingPujas, renderKundali, birthDetails, supabase, language, readMoreReviewsHref, inlineEditForm, analytics, problemArea, problemAreaIds, customProblemText, }: DoshaResultsFullProps): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { DoshaCalculationResult } from '../../types/dosha-api';
3
+ export interface DoshaResultsViewProps {
4
+ result: DoshaCalculationResult;
5
+ t: (key: string) => string;
6
+ onEdit?: () => void;
7
+ className?: string;
8
+ }
9
+ export declare function DoshaResultsView({ result, t, onEdit, className }: DoshaResultsViewProps): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ export interface DoshaTimeFieldProps {
2
+ id: string;
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ /** Called when the time picker popover is opened */
6
+ onOpen?: () => void;
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ }
11
+ export declare function DoshaTimeField({ id, value, onChange, onOpen, placeholder, disabled, className, }: DoshaTimeFieldProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FooterTrustBadge(): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { SupabaseClient } from '@supabase/supabase-js';
3
+ import { BirthDetails } from '../../lib/kundaliChart';
4
+ export interface KundaliCardProps {
5
+ birthDetails: BirthDetails;
6
+ supabase: SupabaseClient;
7
+ /** Current language for chart labels (e.g. 'en' or 'hi') */
8
+ language: string;
9
+ /** Translation function for UI strings */
10
+ t: (key: string) => string;
11
+ }
12
+ export declare function KundaliCard({ birthDetails, supabase, language, t }: KundaliCardProps): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface SectionWithImpressionProps {
2
+ /** Section identifier for the impression event */
3
+ section: string;
4
+ children: React.ReactNode;
5
+ /** Called once when the section enters the viewport */
6
+ onImpression: (section: string) => void;
7
+ }
8
+ /** Wraps a section and fires onImpression when it enters the viewport. */
9
+ export declare function SectionWithImpression({ section, children, onImpression, }: SectionWithImpressionProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export { SectionWithImpression, type SectionWithImpressionProps } from './SectionWithImpression';
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { SriMandirPuja } from '../../lib/sriMandirPujaHelpers';
3
+ import { DoshaImageComponent } from '../../types/image';
4
+ import { DoshaAnalytics } from '../../analytics';
5
+ export interface SriMandirPujaVerticalCardProps {
6
+ puja: SriMandirPuja;
7
+ doshaType: string;
8
+ /** Current language (e.g. 'en' or 'hi') for title/temple/date/link. */
9
+ language: string;
10
+ onBookClick?: () => void | Promise<void>;
11
+ variant?: string;
12
+ /** Optional image component for optimization */
13
+ imageComponent?: DoshaImageComponent;
14
+ /** Optional analytics callback */
15
+ analytics?: DoshaAnalytics;
16
+ }
17
+ export declare function SriMandirPujaVerticalCard({ puja, doshaType, language, onBookClick, imageComponent, analytics, }: SriMandirPujaVerticalCardProps): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { BannerType } from '../../constants/bannerConfig';
3
+ export interface WhatFromAnalysisProps {
4
+ t: (key: string) => string;
5
+ className?: string;
6
+ /** Banner type to determine which content to show */
7
+ bannerType?: BannerType;
8
+ }
9
+ export declare function WhatFromAnalysis({ t, className, bannerType, }: WhatFromAnalysisProps): React.JSX.Element;
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ export declare function AlertTriangle(props: React.SVGAttributes<SVGElement> & {
3
+ size?: number;
4
+ }): React.JSX.Element;
5
+ export declare function CheckCircle(props: React.SVGAttributes<SVGElement> & {
6
+ size?: number;
7
+ }): React.JSX.Element;
8
+ export declare function Info(props: React.SVGAttributes<SVGElement> & {
9
+ size?: number;
10
+ }): React.JSX.Element;
11
+ export declare function Flame(props: React.SVGAttributes<SVGElement> & {
12
+ size?: number;
13
+ }): React.JSX.Element;
14
+ export declare function Waves(props: React.SVGAttributes<SVGElement> & {
15
+ size?: number;
16
+ }): React.JSX.Element;
17
+ export declare function Users(props: React.SVGAttributes<SVGElement> & {
18
+ size?: number;
19
+ }): React.JSX.Element;
20
+ export declare function Moon(props: React.SVGAttributes<SVGElement> & {
21
+ size?: number;
22
+ }): React.JSX.Element;
23
+ export declare function ArrowUp(props: React.SVGAttributes<SVGElement> & {
24
+ size?: number;
25
+ }): React.JSX.Element;
26
+ export declare function ChevronDown(props: React.SVGAttributes<SVGElement> & {
27
+ size?: number;
28
+ }): React.JSX.Element;
29
+ export declare function Loader2(props: React.SVGAttributes<SVGElement> & {
30
+ size?: number;
31
+ }): React.JSX.Element;
32
+ export declare function ExternalLink(props: React.SVGAttributes<SVGElement> & {
33
+ size?: number;
34
+ }): React.JSX.Element;
35
+ export declare function RotateCcw(props: React.SVGAttributes<SVGElement> & {
36
+ size?: number;
37
+ }): React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ export interface AccordionProps {
3
+ type?: 'single';
4
+ collapsible?: boolean;
5
+ className?: string;
6
+ children: React.ReactNode;
7
+ onValueChange?: (value: string | null) => void;
8
+ }
9
+ export declare function Accordion({ type, collapsible, className, children, onValueChange, }: AccordionProps): React.JSX.Element;
10
+ export interface AccordionItemProps {
11
+ value: string;
12
+ className?: string;
13
+ children: React.ReactNode;
14
+ }
15
+ export declare function AccordionItem({ value, className, children }: AccordionItemProps): React.JSX.Element;
16
+ export interface AccordionTriggerProps {
17
+ className?: string;
18
+ children: React.ReactNode;
19
+ value: string;
20
+ }
21
+ export declare function AccordionTrigger({ className, children, value, }: AccordionTriggerProps): React.JSX.Element;
22
+ export interface AccordionContentProps {
23
+ className?: string;
24
+ children: React.ReactNode;
25
+ value: string;
26
+ }
27
+ export declare function AccordionContent({ className, children, value, }: AccordionContentProps): React.JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ variant?: 'default' | 'secondary' | 'destructive' | 'outline';
4
+ }
5
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { Badge };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ size?: 'default' | 'sm' | 'lg';
4
+ variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ }
8
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
9
+ export { Button };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
5
+ export { Skeleton };
@@ -0,0 +1,21 @@
1
+ import { SupportedLocale } from '../i18n/translations';
2
+ export type BannerType = "marriage" | "generic";
3
+ export interface BannerConfig {
4
+ imageUrl: string;
5
+ alt: string;
6
+ tickerText: string;
7
+ }
8
+ /**
9
+ * Banner images indexed by type and locale
10
+ */
11
+ export declare const BANNER_IMAGES: Record<BannerType, Record<SupportedLocale, BannerConfig>>;
12
+ /**
13
+ * Mapping of utm_term values to banner types
14
+ */
15
+ export declare const UTM_TERM_TO_BANNER: Record<string, BannerType>;
16
+ /**
17
+ * Get banner config based on utm_term and locale
18
+ * Checks if utm_term includes any of the defined patterns
19
+ * Falls back to generic banner if no pattern matches
20
+ */
21
+ export declare function getBannerConfig(utmTerm: string | null, locale: SupportedLocale): BannerConfig;
File without changes
@@ -0,0 +1,16 @@
1
+ import { SupabaseClient } from '@supabase/supabase-js';
2
+ export interface DevPuja {
3
+ store_id: string;
4
+ pooja_title: string;
5
+ temple_name: string;
6
+ pooja_title_english?: string;
7
+ temple_name_english?: string;
8
+ puja_link: string;
9
+ puja_link_hindi?: string;
10
+ individual_pack_price_inr: number;
11
+ schedule_date_ist: string;
12
+ cover_media_url?: string;
13
+ }
14
+ export declare function parsePujasCSV(csvText: string): DevPuja[];
15
+ export declare function getPujaForDosha(pujas: DevPuja[], doshaType: string): DevPuja | null;
16
+ export declare function fetchPujas(supabase: SupabaseClient): Promise<DevPuja[]>;