kundli-generator 1.0.4 → 1.0.6

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 (30) hide show
  1. package/dist/components/FooterShell/FooterCTAButton.d.ts +0 -1
  2. package/dist/components/FooterShell/FooterShell.d.ts +0 -1
  3. package/dist/components/KundliForm/KundliForm.d.ts +2 -4
  4. package/dist/components/KundliForm/sections/FormHeader/FormHeader.d.ts +0 -1
  5. package/dist/components/KundliForm/sections/ProceedFooter/ProceedFooter.d.ts +0 -1
  6. package/dist/components/KundliForm/sections/UserInfoFormSection/UserInfoFormSection.d.ts +2 -1
  7. package/dist/components/KundliForm/sections/UserInfoFormSection/googlePlacesAutocomplete.d.ts +21 -0
  8. package/dist/components/KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete.d.ts +29 -0
  9. package/dist/components/KundliPage/KundliContext.d.ts +5 -2
  10. package/dist/components/KundliPage/KundliPage.d.ts +2 -1
  11. package/dist/components/KundliPage/sections/CTAFooter/CTAFooter.d.ts +0 -1
  12. package/dist/components/KundliPage/sections/ContactUsSection/ContactUsSection.d.ts +0 -1
  13. package/dist/components/KundliPage/sections/FAQSection/FAQSection.d.ts +0 -1
  14. package/dist/components/KundliPage/sections/FeedbackSection/FeedbackSection.d.ts +0 -1
  15. package/dist/components/KundliPage/sections/HeroSection/HeroSection.d.ts +0 -1
  16. package/dist/components/KundliPage/sections/KundliHeader/KundliHeader.d.ts +0 -1
  17. package/dist/components/KundliPage/sections/PremiumReportOverview/PremiumReportOverview.d.ts +3 -1
  18. package/dist/components/KundliPage/sections/ThreeStepsProcess/ThreeStepsProcess.d.ts +0 -1
  19. package/dist/components/KundliPage/sections/UniversityCertification/UniversityCertification.d.ts +0 -1
  20. package/dist/components/KundliPage/sections/ViewSampleReportButton/SampleReportModal.d.ts +0 -1
  21. package/dist/components/KundliPage/sections/ViewSampleReportButton/ViewSampleReportButton.d.ts +0 -1
  22. package/dist/components/KundliPage/sections/WhatYoullFindSection/WhatYoullFindSection.d.ts +0 -1
  23. package/dist/components/KundliPage/sections/WhyUsSection/WhyUsSection.d.ts +0 -1
  24. package/dist/i18n/I18nContext.d.ts +0 -1
  25. package/dist/kundli-generator.js +1754 -1287
  26. package/dist/kundli-generator.js.map +1 -1
  27. package/dist/kundli-generator.umd.cjs +9 -9
  28. package/dist/kundli-generator.umd.cjs.map +1 -1
  29. package/dist/style.css +1 -1
  30. package/package.json +2 -1
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface FooterCTAButtonProps {
3
2
  /** Button content */
4
3
  children: React.ReactNode;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface FooterShellProps {
3
2
  /** Optional circular marquee content (e.g. badges). When provided, marquee is shown. */
4
3
  marquee?: React.ReactNode;
@@ -1,6 +1,4 @@
1
- import { default as React } from 'react';
2
1
  import { SupportedLocale } from '../../i18n/translations';
3
- import { KundliAnalytics } from '../../analytics';
4
2
  export interface KundliFormValues {
5
3
  fullName: string;
6
4
  phone?: string;
@@ -28,7 +26,7 @@ export interface KundliFormProps {
28
26
  originalPriceLabel?: string;
29
27
  discountedPriceLabel?: string;
30
28
  discountPillLabel?: string;
31
- /** Optional analytics for tracking form events */
32
- analytics?: KundliAnalytics;
29
+ /** Google Maps API key used for Birth Place autocomplete */
30
+ googleMapsApiKey?: string;
33
31
  }
34
32
  export declare const KundliForm: React.FC<KundliFormProps>;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface FormHeaderProps {
3
2
  t: (key: string) => string;
4
3
  onBack?: () => void;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { KundliFormValues } from '../../KundliForm';
3
2
  import { KundliAnalytics } from '../../../../../analytics';
4
3
  export interface ProceedFooterProps {
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { KundliFormValues } from '../../KundliForm';
3
2
  import { KundliAnalytics } from '../../../../../analytics';
4
3
  export interface UserInfoFormSectionProps {
@@ -6,6 +5,8 @@ export interface UserInfoFormSectionProps {
6
5
  values: KundliFormValues;
7
6
  onChange: (values: KundliFormValues) => void;
8
7
  analytics?: KundliAnalytics;
8
+ /** Google Maps API key used for Birth Place autocomplete */
9
+ googleMapsApiKey?: string;
9
10
  className?: string;
10
11
  }
11
12
  export declare const UserInfoFormSection: React.FC<UserInfoFormSectionProps>;
@@ -0,0 +1,21 @@
1
+ type GooglePlacePrediction = {
2
+ description: string;
3
+ place_id: string;
4
+ structured_formatting?: {
5
+ main_text?: string;
6
+ secondary_text?: string;
7
+ };
8
+ };
9
+ declare global {
10
+ interface Window {
11
+ google?: any;
12
+ }
13
+ }
14
+ export declare const loadGoogleMapsPlaces: (apiKey: string, language?: string) => Promise<void>;
15
+ export declare const getCityPredictions: (params: {
16
+ apiKey: string;
17
+ input: string;
18
+ language?: string;
19
+ restrictCountry?: string;
20
+ }) => Promise<GooglePlacePrediction[]>;
21
+ export {};
@@ -0,0 +1,29 @@
1
+ export interface PlacePrediction {
2
+ place_id: string;
3
+ description: string;
4
+ structured_formatting: {
5
+ main_text: string;
6
+ secondary_text: string;
7
+ };
8
+ }
9
+ export interface PlaceDetails {
10
+ display_name: string;
11
+ lat: number;
12
+ lng: number;
13
+ city?: string;
14
+ state?: string;
15
+ country?: string;
16
+ }
17
+ export declare const useGooglePlacesAutocomplete: (params: {
18
+ apiKey?: string;
19
+ language?: string;
20
+ restrictCountry?: string;
21
+ }) => {
22
+ isLoaded: any;
23
+ predictions: any;
24
+ isSearching: any;
25
+ loadError: any;
26
+ searchPlaces: any;
27
+ getPlaceDetails: any;
28
+ clearPredictions: any;
29
+ };
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SupportedLocale } from '../../i18n/translations';
3
2
  import { KundliFormValues } from '../KundliForm';
4
3
  import { KundliAnalytics } from '../../analytics';
@@ -7,6 +6,8 @@ export interface KundliContextConfig {
7
6
  locale?: SupportedLocale;
8
7
  showLanguageSelector?: boolean;
9
8
  userId?: number;
9
+ /** Whether the user is global (international) or domestic */
10
+ isGlobal?: boolean;
10
11
  logoUrl?: string;
11
12
  reportImageUrl?: string;
12
13
  universityLogoUrls?: [string?, string?];
@@ -14,6 +15,8 @@ export interface KundliContextConfig {
14
15
  onViewSampleReport?: () => void;
15
16
  ctaHref?: string;
16
17
  onCtaClick?: () => void;
18
+ /** Called when form back is clicked (e.g. when form is shown standalone) */
19
+ onBack?: () => void;
17
20
  readMoreReviewsHref?: string;
18
21
  onProceed?: (values: KundliFormValues) => void;
19
22
  proceedHref?: string;
@@ -33,7 +36,7 @@ export interface KundliContextValue {
33
36
  goToPage: () => void;
34
37
  onProceed?: (values: KundliFormValues) => void;
35
38
  }
36
- declare const KundliContext: React.Context<KundliContextValue | null>;
39
+ declare const KundliContext: any;
37
40
  export interface KundliProviderProps extends KundliContextConfig {
38
41
  className?: string;
39
42
  children?: React.ReactNode;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SupportedLocale } from '../../i18n/translations';
3
2
  import { KundliFormValues } from '../KundliForm';
4
3
  import { KundliAnalytics } from '../../analytics';
@@ -11,6 +10,8 @@ export interface KundliPageProps {
11
10
  showLanguageSelector?: boolean;
12
11
  /** User ID from auth, for API calls etc. */
13
12
  userId?: number;
13
+ /** Whether the user is global (international) or domestic */
14
+ isGlobal?: boolean;
14
15
  /** Header logo URL */
15
16
  logoUrl?: string;
16
17
  /** Premium report cover image URL */
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface CTAFooterProps {
3
2
  t: (key: string) => string;
4
3
  /** CTA button click handler */
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface ContactUsSectionProps {
3
2
  t: (key: string) => string;
4
3
  /** Override WhatsApp number */
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface FAQSectionProps {
3
2
  t: (key: string) => string;
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface Testimonial {
3
2
  quote: string;
4
3
  authorName: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface HeroSectionProps {
3
2
  t: (key: string) => string;
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface KundliHeaderProps {
3
2
  /** Translation function */
4
3
  t: (key: string) => string;
@@ -1,8 +1,10 @@
1
- import { default as React } from 'react';
1
+ import { KundliAnalytics } from '../../../../analytics';
2
2
  export interface PremiumReportOverviewProps {
3
3
  t: (key: string) => string;
4
4
  /** Optional report cover image URL */
5
5
  reportImageUrl?: string;
6
+ /** Optional analytics for tracking banner clicked */
7
+ analytics?: KundliAnalytics;
6
8
  className?: string;
7
9
  }
8
10
  export declare const PremiumReportOverview: React.FC<PremiumReportOverviewProps>;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface ThreeStepsProcessProps {
3
2
  t: (key: string) => string;
4
3
  locale?: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface UniversityCertificationProps {
3
2
  t: (key: string) => string;
4
3
  /** Optional logo URLs: [BHU, VSU or similar] */
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface SampleReportModalProps {
3
2
  isOpen: boolean;
4
3
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { KundliAnalytics } from '../../../../../analytics';
3
2
  export interface ViewSampleReportButtonProps {
4
3
  t: (key: string) => string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface WhatYoullFindSectionProps {
3
2
  t: (key: string) => string;
4
3
  /** Optional image URLs per item (same order as ITEMS) */
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export interface WhyUsSectionProps {
3
2
  t: (key: string) => string;
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SupportedLocale } from './translations';
3
2
  interface I18nContextValue {
4
3
  locale: SupportedLocale;