@vynix-org/react-native-ads-sdk 0.1.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 (128) hide show
  1. package/AdsSdk.podspec +52 -0
  2. package/LICENSE +20 -0
  3. package/README.md +95 -0
  4. package/android/build.gradle +108 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/src/main/AndroidManifest.xml +5 -0
  7. package/android/src/main/java/com/adssdk/AdsSdkModule.kt +23 -0
  8. package/android/src/main/java/com/adssdk/AdsSdkPackage.kt +33 -0
  9. package/ios/AdsSdk.h +5 -0
  10. package/ios/AdsSdk.mm +18 -0
  11. package/lib/module/ads-manager/AppOpenAdsManager.js +131 -0
  12. package/lib/module/ads-manager/AppOpenAdsManager.js.map +1 -0
  13. package/lib/module/ads-manager/GoogleMobileAdsManager.js +62 -0
  14. package/lib/module/ads-manager/GoogleMobileAdsManager.js.map +1 -0
  15. package/lib/module/ads-manager/InterstitialAdsManager.js +291 -0
  16. package/lib/module/ads-manager/InterstitialAdsManager.js.map +1 -0
  17. package/lib/module/ads-manager/NativeAdsManager.js +405 -0
  18. package/lib/module/ads-manager/NativeAdsManager.js.map +1 -0
  19. package/lib/module/ads-manager/RewardedAdsManager.js +328 -0
  20. package/lib/module/ads-manager/RewardedAdsManager.js.map +1 -0
  21. package/lib/module/ads-manager/RewardedInterstitialAdsManager.js +328 -0
  22. package/lib/module/ads-manager/RewardedInterstitialAdsManager.js.map +1 -0
  23. package/lib/module/components/BannerAdComponent.js +159 -0
  24. package/lib/module/components/BannerAdComponent.js.map +1 -0
  25. package/lib/module/components/FullscreenStyles.js +162 -0
  26. package/lib/module/components/FullscreenStyles.js.map +1 -0
  27. package/lib/module/components/NativeAdComponent.js +172 -0
  28. package/lib/module/components/NativeAdComponent.js.map +1 -0
  29. package/lib/module/components/NativeAdFullscreenComponent.js +205 -0
  30. package/lib/module/components/NativeAdFullscreenComponent.js.map +1 -0
  31. package/lib/module/components/NativeStyles.js +143 -0
  32. package/lib/module/components/NativeStyles.js.map +1 -0
  33. package/lib/module/event/custom-event.js +29 -0
  34. package/lib/module/event/custom-event.js.map +1 -0
  35. package/lib/module/hook/useAppOpenAd.js +138 -0
  36. package/lib/module/hook/useAppOpenAd.js.map +1 -0
  37. package/lib/module/hook/useInterstitialAd.js +157 -0
  38. package/lib/module/hook/useInterstitialAd.js.map +1 -0
  39. package/lib/module/hook/useNativeAd.js +147 -0
  40. package/lib/module/hook/useNativeAd.js.map +1 -0
  41. package/lib/module/hook/useRewardedAd.js +166 -0
  42. package/lib/module/hook/useRewardedAd.js.map +1 -0
  43. package/lib/module/hook/useRewardedInterstitialAd.js +166 -0
  44. package/lib/module/hook/useRewardedInterstitialAd.js.map +1 -0
  45. package/lib/module/index.js +14 -0
  46. package/lib/module/index.js.map +1 -0
  47. package/lib/module/package.json +1 -0
  48. package/lib/module/stores/interstitial-ads-store.js +205 -0
  49. package/lib/module/stores/interstitial-ads-store.js.map +1 -0
  50. package/lib/module/stores/native-ads-store.js +204 -0
  51. package/lib/module/stores/native-ads-store.js.map +1 -0
  52. package/lib/module/stores/rewarded-ads-store.js +216 -0
  53. package/lib/module/stores/rewarded-ads-store.js.map +1 -0
  54. package/lib/module/stores/rewarded-interstitial-ads-store.js +216 -0
  55. package/lib/module/stores/rewarded-interstitial-ads-store.js.map +1 -0
  56. package/lib/module/types/ads-types.js +25 -0
  57. package/lib/module/types/ads-types.js.map +1 -0
  58. package/lib/typescript/package.json +1 -0
  59. package/lib/typescript/src/ads-manager/AppOpenAdsManager.d.ts +38 -0
  60. package/lib/typescript/src/ads-manager/AppOpenAdsManager.d.ts.map +1 -0
  61. package/lib/typescript/src/ads-manager/GoogleMobileAdsManager.d.ts +22 -0
  62. package/lib/typescript/src/ads-manager/GoogleMobileAdsManager.d.ts.map +1 -0
  63. package/lib/typescript/src/ads-manager/InterstitialAdsManager.d.ts +22 -0
  64. package/lib/typescript/src/ads-manager/InterstitialAdsManager.d.ts.map +1 -0
  65. package/lib/typescript/src/ads-manager/NativeAdsManager.d.ts +59 -0
  66. package/lib/typescript/src/ads-manager/NativeAdsManager.d.ts.map +1 -0
  67. package/lib/typescript/src/ads-manager/RewardedAdsManager.d.ts +25 -0
  68. package/lib/typescript/src/ads-manager/RewardedAdsManager.d.ts.map +1 -0
  69. package/lib/typescript/src/ads-manager/RewardedInterstitialAdsManager.d.ts +25 -0
  70. package/lib/typescript/src/ads-manager/RewardedInterstitialAdsManager.d.ts.map +1 -0
  71. package/lib/typescript/src/components/BannerAdComponent.d.ts +22 -0
  72. package/lib/typescript/src/components/BannerAdComponent.d.ts.map +1 -0
  73. package/lib/typescript/src/components/FullscreenStyles.d.ts +155 -0
  74. package/lib/typescript/src/components/FullscreenStyles.d.ts.map +1 -0
  75. package/lib/typescript/src/components/NativeAdComponent.d.ts +24 -0
  76. package/lib/typescript/src/components/NativeAdComponent.d.ts.map +1 -0
  77. package/lib/typescript/src/components/NativeAdFullscreenComponent.d.ts +26 -0
  78. package/lib/typescript/src/components/NativeAdFullscreenComponent.d.ts.map +1 -0
  79. package/lib/typescript/src/components/NativeStyles.d.ts +139 -0
  80. package/lib/typescript/src/components/NativeStyles.d.ts.map +1 -0
  81. package/lib/typescript/src/event/custom-event.d.ts +8 -0
  82. package/lib/typescript/src/event/custom-event.d.ts.map +1 -0
  83. package/lib/typescript/src/hook/useAppOpenAd.d.ts +19 -0
  84. package/lib/typescript/src/hook/useAppOpenAd.d.ts.map +1 -0
  85. package/lib/typescript/src/hook/useInterstitialAd.d.ts +20 -0
  86. package/lib/typescript/src/hook/useInterstitialAd.d.ts.map +1 -0
  87. package/lib/typescript/src/hook/useNativeAd.d.ts +20 -0
  88. package/lib/typescript/src/hook/useNativeAd.d.ts.map +1 -0
  89. package/lib/typescript/src/hook/useRewardedAd.d.ts +27 -0
  90. package/lib/typescript/src/hook/useRewardedAd.d.ts.map +1 -0
  91. package/lib/typescript/src/hook/useRewardedInterstitialAd.d.ts +27 -0
  92. package/lib/typescript/src/hook/useRewardedInterstitialAd.d.ts.map +1 -0
  93. package/lib/typescript/src/index.d.ts +10 -0
  94. package/lib/typescript/src/index.d.ts.map +1 -0
  95. package/lib/typescript/src/stores/interstitial-ads-store.d.ts +36 -0
  96. package/lib/typescript/src/stores/interstitial-ads-store.d.ts.map +1 -0
  97. package/lib/typescript/src/stores/native-ads-store.d.ts +36 -0
  98. package/lib/typescript/src/stores/native-ads-store.d.ts.map +1 -0
  99. package/lib/typescript/src/stores/rewarded-ads-store.d.ts +39 -0
  100. package/lib/typescript/src/stores/rewarded-ads-store.d.ts.map +1 -0
  101. package/lib/typescript/src/stores/rewarded-interstitial-ads-store.d.ts +39 -0
  102. package/lib/typescript/src/stores/rewarded-interstitial-ads-store.d.ts.map +1 -0
  103. package/lib/typescript/src/types/ads-types.d.ts +164 -0
  104. package/lib/typescript/src/types/ads-types.d.ts.map +1 -0
  105. package/package.json +177 -0
  106. package/src/ads-manager/AppOpenAdsManager.ts +155 -0
  107. package/src/ads-manager/GoogleMobileAdsManager.ts +68 -0
  108. package/src/ads-manager/InterstitialAdsManager.ts +371 -0
  109. package/src/ads-manager/NativeAdsManager.ts +445 -0
  110. package/src/ads-manager/RewardedAdsManager.ts +383 -0
  111. package/src/ads-manager/RewardedInterstitialAdsManager.ts +410 -0
  112. package/src/components/BannerAdComponent.tsx +205 -0
  113. package/src/components/FullscreenStyles.ts +158 -0
  114. package/src/components/NativeAdComponent.tsx +208 -0
  115. package/src/components/NativeAdFullscreenComponent.tsx +261 -0
  116. package/src/components/NativeStyles.ts +141 -0
  117. package/src/event/custom-event.ts +30 -0
  118. package/src/hook/useAppOpenAd.ts +161 -0
  119. package/src/hook/useInterstitialAd.ts +195 -0
  120. package/src/hook/useNativeAd.ts +173 -0
  121. package/src/hook/useRewardedAd.ts +205 -0
  122. package/src/hook/useRewardedInterstitialAd.ts +212 -0
  123. package/src/index.tsx +33 -0
  124. package/src/stores/interstitial-ads-store.ts +287 -0
  125. package/src/stores/native-ads-store.ts +272 -0
  126. package/src/stores/rewarded-ads-store.ts +290 -0
  127. package/src/stores/rewarded-interstitial-ads-store.ts +318 -0
  128. package/src/types/ads-types.ts +239 -0
@@ -0,0 +1,25 @@
1
+ import { type RewardedAdConfig, type RewardedAdInstance } from '../types/ads-types';
2
+ import { CustomEventEmitter } from '../event/custom-event';
3
+ export declare class RewardedAdsManager extends CustomEventEmitter {
4
+ private state;
5
+ private configs;
6
+ private loadPromises;
7
+ constructor();
8
+ private initializeGoogleMobileAds;
9
+ preloadAd(config: RewardedAdConfig): Promise<void>;
10
+ loadAd(config: RewardedAdConfig): Promise<void>;
11
+ displayAd(adKey: string): Promise<{
12
+ ad: RewardedAdInstance | null;
13
+ reward: any;
14
+ }>;
15
+ getAd(adKey: string): RewardedAdInstance | null;
16
+ removeAd(adKey: string): void;
17
+ refreshAd(adKey: string): Promise<void>;
18
+ clearAllAds(): void;
19
+ private loadAdInternal;
20
+ private loadRewardedAd;
21
+ private showRewardedAd;
22
+ private waitForAdLoad;
23
+ }
24
+ export declare const rewardedAdsManager: RewardedAdsManager;
25
+ //# sourceMappingURL=RewardedAdsManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RewardedAdsManager.d.ts","sourceRoot":"","sources":["../../../../src/ads-manager/RewardedAdsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,qBAAa,kBAAmB,SAAQ,kBAAkB;IACxD,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,OAAO,CAA4C;IAC3D,OAAO,CAAC,YAAY,CAAyC;;YAO/C,yBAAyB;IASjC,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4ClD,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,SAAS,CACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,EAAE,EAAE,kBAAkB,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,CAAC;IAqD1D,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI;IAI/C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOvB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB7C,WAAW,IAAI,IAAI;YAML,cAAc;YAkEd,cAAc;YAkDd,cAAc;YAuEd,aAAa;CA4B5B;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type RewardedInterstitialAdConfig, type RewardedInterstitialAdInstance } from '../types/ads-types';
2
+ import { CustomEventEmitter } from '../event/custom-event';
3
+ export declare class RewardedInterstitialAdsManager extends CustomEventEmitter {
4
+ private state;
5
+ private configs;
6
+ private loadPromises;
7
+ constructor();
8
+ private initializeGoogleMobileAds;
9
+ preloadAd(config: RewardedInterstitialAdConfig): Promise<void>;
10
+ loadAd(config: RewardedInterstitialAdConfig): Promise<void>;
11
+ displayAd(adKey: string): Promise<{
12
+ ad: RewardedInterstitialAdInstance | null;
13
+ reward: any;
14
+ }>;
15
+ getAd(adKey: string): RewardedInterstitialAdInstance | null;
16
+ removeAd(adKey: string): void;
17
+ refreshAd(adKey: string): Promise<void>;
18
+ clearAllAds(): void;
19
+ private loadAdInternal;
20
+ private loadRewardedInterstitialAd;
21
+ private showRewardedInterstitialAd;
22
+ private waitForAdLoad;
23
+ }
24
+ export declare const rewardedInterstitialAdsManager: RewardedInterstitialAdsManager;
25
+ //# sourceMappingURL=RewardedInterstitialAdsManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RewardedInterstitialAdsManager.d.ts","sourceRoot":"","sources":["../../../../src/ads-manager/RewardedInterstitialAdsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACpC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,qBAAa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAO,CAAC,KAAK,CAA0D;IACvE,OAAO,CAAC,OAAO,CAAwD;IACvE,OAAO,CAAC,YAAY,CAAyC;;YAO/C,yBAAyB;IASjC,SAAS,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC;IA4C9D,MAAM,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,SAAS,CACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,EAAE,EAAE,8BAA8B,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,CAAC;IAqDtE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,8BAA8B,GAAG,IAAI;IAI3D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOvB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB7C,WAAW,IAAI,IAAI;YAML,cAAc;YAqEd,0BAA0B;YAgE1B,0BAA0B;YA4E1B,aAAa;CAgC5B;AAED,eAAO,MAAM,8BAA8B,gCACL,CAAC"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { type RequestOptions } from 'react-native-google-mobile-ads';
3
+ interface BannerAdComponentProps {
4
+ adId: string;
5
+ adHighpriorityId?: string;
6
+ style?: any;
7
+ size?: 'BANNER' | 'LARGE_BANNER' | 'MEDIUM_RECTANGLE' | 'FULL_BANNER' | 'LEADERBOARD' | 'ANCHORED_ADAPTIVE_BANNER';
8
+ onAdLoaded?: () => void;
9
+ onAdFailedToLoad?: (error: Error) => void;
10
+ onAdOpened?: () => void;
11
+ onAdClosed?: () => void;
12
+ onAdClicked?: () => void;
13
+ onAdImpression?: () => void;
14
+ showLoading?: boolean;
15
+ loadingText?: string;
16
+ errorText?: string;
17
+ showError?: boolean;
18
+ requestOptions?: RequestOptions;
19
+ }
20
+ export declare const BannerAdComponent: React.FC<BannerAdComponentProps>;
21
+ export {};
22
+ //# sourceMappingURL=BannerAdComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAdComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/BannerAdComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE/E,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EACD,QAAQ,GACR,cAAc,GACd,kBAAkB,GAClB,aAAa,GACb,aAAa,GACb,0BAA0B,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+H9D,CAAC"}
@@ -0,0 +1,155 @@
1
+ export declare const fullscreenStyles: Readonly<{
2
+ container: {
3
+ flex: number;
4
+ width: number;
5
+ height: number;
6
+ backgroundColor: string;
7
+ justifyContent: "center";
8
+ alignItems: "center";
9
+ };
10
+ adContainer: {
11
+ flex: number;
12
+ width: string;
13
+ height: string;
14
+ backgroundColor: string;
15
+ };
16
+ centerContent: {
17
+ flex: number;
18
+ justifyContent: "center";
19
+ alignItems: "center";
20
+ padding: number;
21
+ };
22
+ closeButton: {
23
+ position: "absolute";
24
+ top: number;
25
+ right: number;
26
+ width: number;
27
+ height: number;
28
+ borderRadius: number;
29
+ backgroundColor: string;
30
+ justifyContent: "center";
31
+ alignItems: "center";
32
+ zIndex: number;
33
+ };
34
+ closeButtonText: {
35
+ color: string;
36
+ fontSize: number;
37
+ fontWeight: "600";
38
+ };
39
+ loadingText: {
40
+ marginTop: number;
41
+ fontSize: number;
42
+ color: string;
43
+ };
44
+ errorText: {
45
+ fontSize: number;
46
+ color: string;
47
+ textAlign: "center";
48
+ marginBottom: number;
49
+ };
50
+ retryButton: {
51
+ backgroundColor: string;
52
+ paddingHorizontal: number;
53
+ paddingVertical: number;
54
+ borderRadius: number;
55
+ };
56
+ retryText: {
57
+ color: string;
58
+ fontSize: number;
59
+ fontWeight: "600";
60
+ };
61
+ emptyText: {
62
+ fontSize: number;
63
+ color: string;
64
+ };
65
+ adHeader: {
66
+ position: "absolute";
67
+ top: number;
68
+ left: number;
69
+ flexDirection: "row";
70
+ alignItems: "center";
71
+ backgroundColor: string;
72
+ paddingHorizontal: number;
73
+ paddingVertical: number;
74
+ borderRadius: number;
75
+ zIndex: number;
76
+ maxWidth: number;
77
+ };
78
+ adBadge: {
79
+ backgroundColor: string;
80
+ paddingHorizontal: number;
81
+ paddingVertical: number;
82
+ borderRadius: number;
83
+ fontSize: number;
84
+ fontWeight: "700";
85
+ color: string;
86
+ };
87
+ advertiserText: {
88
+ fontSize: number;
89
+ color: string;
90
+ fontWeight: "500";
91
+ marginLeft: number;
92
+ };
93
+ mediaView: {
94
+ width: string;
95
+ backgroundColor: string;
96
+ };
97
+ contentContainer: {
98
+ position: "absolute";
99
+ bottom: number;
100
+ width: string;
101
+ backgroundColor: string;
102
+ paddingHorizontal: number;
103
+ paddingVertical: number;
104
+ paddingBottom: number;
105
+ };
106
+ headline: {
107
+ fontSize: number;
108
+ fontWeight: "700";
109
+ color: string;
110
+ marginBottom: number;
111
+ lineHeight: number;
112
+ };
113
+ bodyText: {
114
+ fontSize: number;
115
+ color: string;
116
+ lineHeight: number;
117
+ marginBottom: number;
118
+ };
119
+ infoRow: {
120
+ flexDirection: "row";
121
+ alignItems: "center";
122
+ marginBottom: number;
123
+ flexWrap: "wrap";
124
+ gap: number;
125
+ };
126
+ ratingText: {
127
+ fontSize: number;
128
+ fontWeight: "600";
129
+ color: string;
130
+ };
131
+ priceText: {
132
+ fontSize: number;
133
+ fontWeight: "700";
134
+ color: string;
135
+ };
136
+ storeText: {
137
+ fontSize: number;
138
+ color: string;
139
+ flex: number;
140
+ };
141
+ ctaButton: {
142
+ backgroundColor: string;
143
+ paddingVertical: number;
144
+ paddingHorizontal: number;
145
+ borderRadius: number;
146
+ alignItems: "center";
147
+ justifyContent: "center";
148
+ };
149
+ ctaText: {
150
+ fontSize: number;
151
+ fontWeight: "700";
152
+ color: string;
153
+ };
154
+ }>;
155
+ //# sourceMappingURL=FullscreenStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/FullscreenStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyJ3B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { type ViewStyle, type TextStyle } from 'react-native';
3
+ import type { AdInstance } from '../types/ads-types';
4
+ interface NativeAdComponentProps {
5
+ adKey: string;
6
+ adId: string;
7
+ autoLoad?: boolean;
8
+ style?: ViewStyle;
9
+ onLoad?: (ad: AdInstance) => void;
10
+ onDisplay?: (ad: AdInstance) => void;
11
+ onError?: (error: string, ad: AdInstance) => void;
12
+ onClicked?: (ad: AdInstance) => void;
13
+ onImpression?: (ad: AdInstance) => void;
14
+ buttonActionStyles?: ViewStyle;
15
+ adBadgeStyles?: ViewStyle;
16
+ headlineStyles?: TextStyle;
17
+ bodyStyles?: TextStyle;
18
+ ratingStyles?: TextStyle;
19
+ priceStyles?: TextStyle;
20
+ storeStyles?: TextStyle;
21
+ }
22
+ export declare const NativeAdComponent: React.FC<NativeAdComponentProps>;
23
+ export {};
24
+ //# sourceMappingURL=NativeAdComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAdComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/NativeAdComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwK9D,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { type ViewStyle, type TextStyle } from 'react-native';
3
+ import type { AdInstance } from '../types/ads-types';
4
+ interface NativeAdFullscreenComponentProps {
5
+ adKey: string;
6
+ adId: string;
7
+ autoLoad?: boolean;
8
+ onClose?: () => void;
9
+ onLoad?: (ad: AdInstance) => void;
10
+ onDisplay?: (ad: AdInstance) => void;
11
+ onError?: (error: string, ad: AdInstance) => void;
12
+ onClicked?: (ad: AdInstance) => void;
13
+ onImpression?: (ad: AdInstance) => void;
14
+ buttonActionStyles?: ViewStyle;
15
+ adBadgeStyles?: ViewStyle;
16
+ headlineStyles?: TextStyle;
17
+ bodyStyles?: TextStyle;
18
+ ratingStyles?: TextStyle;
19
+ priceStyles?: TextStyle;
20
+ storeStyles?: TextStyle;
21
+ closeButtonStyles?: ViewStyle;
22
+ showCloseButton?: boolean;
23
+ }
24
+ export declare const NativeAdFullscreenComponent: React.FC<NativeAdFullscreenComponentProps>;
25
+ export {};
26
+ //# sourceMappingURL=NativeAdFullscreenComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAdFullscreenComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/NativeAdFullscreenComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,UAAU,gCAAgC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAChD,gCAAgC,CAuNjC,CAAC"}
@@ -0,0 +1,139 @@
1
+ export declare const styles: Readonly<{
2
+ wrapper: {
3
+ width: string;
4
+ alignItems: "center";
5
+ };
6
+ container: {
7
+ width: string;
8
+ backgroundColor: string;
9
+ borderRadius: number;
10
+ overflow: "hidden";
11
+ borderWidth: number;
12
+ borderColor: string;
13
+ };
14
+ centerContent: {
15
+ justifyContent: "center";
16
+ alignItems: "center";
17
+ padding: number;
18
+ minHeight: number;
19
+ };
20
+ loadingText: {
21
+ marginTop: number;
22
+ fontSize: number;
23
+ color: string;
24
+ };
25
+ errorText: {
26
+ fontSize: number;
27
+ color: string;
28
+ textAlign: "center";
29
+ marginBottom: number;
30
+ };
31
+ retryButton: {
32
+ backgroundColor: string;
33
+ paddingHorizontal: number;
34
+ paddingVertical: number;
35
+ borderRadius: number;
36
+ };
37
+ retryText: {
38
+ color: string;
39
+ fontSize: number;
40
+ fontWeight: "600";
41
+ };
42
+ emptyText: {
43
+ fontSize: number;
44
+ color: string;
45
+ };
46
+ adHeader: {
47
+ flexDirection: "row";
48
+ alignItems: "center";
49
+ justifyContent: "space-between";
50
+ paddingHorizontal: number;
51
+ paddingVertical: number;
52
+ backgroundColor: string;
53
+ };
54
+ adBadge: {
55
+ backgroundColor: string;
56
+ paddingHorizontal: number;
57
+ paddingVertical: number;
58
+ borderRadius: number;
59
+ fontSize: number;
60
+ fontWeight: "700";
61
+ color: string;
62
+ };
63
+ advertiserText: {
64
+ fontSize: number;
65
+ color: string;
66
+ fontWeight: "500";
67
+ flex: number;
68
+ marginLeft: number;
69
+ textAlign: "right";
70
+ };
71
+ mediaView: {
72
+ minHeight: number;
73
+ maxHeight: number;
74
+ alignSelf: "center";
75
+ backgroundColor: string;
76
+ };
77
+ contentContainer: {
78
+ padding: number;
79
+ };
80
+ headline: {
81
+ fontSize: number;
82
+ fontWeight: "700";
83
+ color: string;
84
+ marginBottom: number;
85
+ lineHeight: number;
86
+ };
87
+ bodyText: {
88
+ fontSize: number;
89
+ color: string;
90
+ lineHeight: number;
91
+ marginBottom: number;
92
+ };
93
+ infoRow: {
94
+ flexDirection: "row";
95
+ alignItems: "center";
96
+ marginBottom: number;
97
+ flexWrap: "wrap";
98
+ gap: number;
99
+ };
100
+ ratingText: {
101
+ fontSize: number;
102
+ fontWeight: "600";
103
+ color: string;
104
+ };
105
+ priceText: {
106
+ fontSize: number;
107
+ fontWeight: "700";
108
+ color: string;
109
+ };
110
+ storeText: {
111
+ fontSize: number;
112
+ color: string;
113
+ flex: number;
114
+ };
115
+ ctaButton: {
116
+ backgroundColor: string;
117
+ paddingVertical: number;
118
+ paddingHorizontal: number;
119
+ borderRadius: number;
120
+ alignItems: "center";
121
+ justifyContent: "center";
122
+ };
123
+ ctaText: {
124
+ fontSize: number;
125
+ fontWeight: "700";
126
+ color: string;
127
+ };
128
+ iconContainer: {
129
+ position: "absolute";
130
+ top: number;
131
+ right: number;
132
+ width: number;
133
+ height: number;
134
+ borderRadius: number;
135
+ overflow: "hidden";
136
+ backgroundColor: string;
137
+ };
138
+ }>;
139
+ //# sourceMappingURL=NativeStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/NativeStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare class CustomEventEmitter {
2
+ private events;
3
+ on(event: string, listener: Function): void;
4
+ emit(event: string, ...args: any[]): void;
5
+ off(event: string, listener: Function): void;
6
+ removeAllListeners(event?: string): void;
7
+ }
8
+ //# sourceMappingURL=custom-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-event.d.ts","sourceRoot":"","sources":["../../../../src/event/custom-event.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAqC;IAEnD,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAOpC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMlC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAMrC,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM;CAOlC"}
@@ -0,0 +1,19 @@
1
+ interface UseAppOpenAdOptions {
2
+ adId: string;
3
+ showOnAppForeground?: boolean;
4
+ autoLoad?: boolean;
5
+ onAdLoaded?: () => void;
6
+ onAdFailedToLoad?: (error: Error) => void;
7
+ onAdOpened?: () => void;
8
+ onAdClosed?: () => void;
9
+ onAdFailedToShow?: (error: Error) => void;
10
+ }
11
+ export declare const useAppOpenAd: (options: UseAppOpenAdOptions) => {
12
+ isLoading: boolean;
13
+ isReady: boolean;
14
+ error: Error | null;
15
+ loadAd: () => Promise<void>;
16
+ showAd: () => Promise<boolean>;
17
+ };
18
+ export {};
19
+ //# sourceMappingURL=useAppOpenAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppOpenAd.d.ts","sourceRoot":"","sources":["../../../../src/hook/useAppOpenAd.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,YAAY,GAAI,SAAS,mBAAmB;;;;;;CAiJxD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AdStatus, type UseInterstitialAdOptions, type InterstitialAdConfig } from '../types/ads-types';
2
+ type UseInterstitialAdConfig = InterstitialAdConfig & UseInterstitialAdOptions;
3
+ export declare const useInterstitialAd: (config: UseInterstitialAdConfig) => {
4
+ ad: import("..").InterstitialAdInstance | null;
5
+ isLoading: boolean;
6
+ error: string | null;
7
+ status: AdStatus;
8
+ isLoaded: boolean;
9
+ isDisplayed: boolean;
10
+ hasError: boolean;
11
+ isUsingHighPriority: boolean;
12
+ hasTriedHighPriority: boolean;
13
+ loadAd: (customConfig?: Partial<InterstitialAdConfig>) => Promise<void>;
14
+ preloadAd: (customConfig?: Partial<InterstitialAdConfig>) => Promise<void>;
15
+ displayAd: () => Promise<import("..").InterstitialAdInstance | null>;
16
+ removeAd: () => void;
17
+ refreshAd: () => Promise<void>;
18
+ };
19
+ export {};
20
+ //# sourceMappingURL=useInterstitialAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/hook/useInterstitialAd.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAI5B,KAAK,uBAAuB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAE/E,eAAO,MAAM,iBAAiB,GAAI,QAAQ,uBAAuB;;;;;;;;;;4BAsCvC,OAAO,CAAC,oBAAoB,CAAC;+BAwB7B,OAAO,CAAC,oBAAoB,CAAC;;;;CAwHtD,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AdStatus, type UseNativeAdOptions, type AdConfig } from '../types/ads-types';
2
+ type UseNativeAdConfig = AdConfig & UseNativeAdOptions;
3
+ export declare const useNativeAd: (config: UseNativeAdConfig) => {
4
+ ad: import("..").AdInstance | null;
5
+ isLoading: boolean;
6
+ error: string | null;
7
+ status: AdStatus;
8
+ isLoaded: boolean;
9
+ isDisplayed: boolean;
10
+ hasError: boolean;
11
+ isUsingHighPriority: boolean;
12
+ hasTriedHighPriority: boolean;
13
+ loadAd: (customConfig?: Partial<AdConfig>) => Promise<void>;
14
+ preloadAd: (customConfig?: Partial<AdConfig>) => Promise<void>;
15
+ displayAd: () => Promise<import("..").AdInstance | null>;
16
+ removeAd: () => void;
17
+ refreshAd: () => Promise<void>;
18
+ };
19
+ export {};
20
+ //# sourceMappingURL=useNativeAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNativeAd.d.ts","sourceRoot":"","sources":["../../../../src/hook/useNativeAd.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACd,MAAM,oBAAoB,CAAC;AAI5B,KAAK,iBAAiB,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AAEvD,eAAO,MAAM,WAAW,GAAI,QAAQ,iBAAiB;;;;;;;;;;4BAoC3B,OAAO,CAAC,QAAQ,CAAC;+BAejB,OAAO,CAAC,QAAQ,CAAC;;;;CA6G1C,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { AdStatus, type UseRewardedAdOptions, type RewardedAdConfig } from '../types/ads-types';
2
+ type UseRewardedAdConfig = RewardedAdConfig & UseRewardedAdOptions;
3
+ export declare const useRewardedAd: (config: UseRewardedAdConfig) => {
4
+ ad: import("..").RewardedAdInstance | null;
5
+ isLoading: boolean;
6
+ error: string | null;
7
+ status: AdStatus;
8
+ isLoaded: boolean;
9
+ isDisplayed: boolean;
10
+ hasError: boolean;
11
+ reward: {
12
+ type: string;
13
+ amount: number;
14
+ } | undefined;
15
+ isUsingHighPriority: boolean;
16
+ hasTriedHighPriority: boolean;
17
+ loadAd: (customConfig?: Partial<RewardedAdConfig>) => Promise<void>;
18
+ preloadAd: (customConfig?: Partial<RewardedAdConfig>) => Promise<void>;
19
+ displayAd: () => Promise<{
20
+ ad: import("..").RewardedAdInstance | null;
21
+ reward: any;
22
+ }>;
23
+ removeAd: () => void;
24
+ refreshAd: () => Promise<void>;
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=useRewardedAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRewardedAd.d.ts","sourceRoot":"","sources":["../../../../src/hook/useRewardedAd.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAI5B,KAAK,mBAAmB,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEnE,eAAO,MAAM,aAAa,GAAI,QAAQ,mBAAmB;;;;;;;;;;;;;;4BAuC/B,OAAO,CAAC,gBAAgB,CAAC;+BAwBzB,OAAO,CAAC,gBAAgB,CAAC;;;;;;;CAiIlD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { AdStatus, type UseRewardedInterstitialAdOptions, type RewardedInterstitialAdConfig } from '../types/ads-types';
2
+ type UseRewardedInterstitialAdConfig = RewardedInterstitialAdConfig & UseRewardedInterstitialAdOptions;
3
+ export declare const useRewardedInterstitialAd: (config: UseRewardedInterstitialAdConfig) => {
4
+ ad: import("..").RewardedInterstitialAdInstance | null;
5
+ isLoading: boolean;
6
+ error: string | null;
7
+ status: AdStatus;
8
+ isLoaded: boolean;
9
+ isDisplayed: boolean;
10
+ hasError: boolean;
11
+ reward: {
12
+ type: string;
13
+ amount: number;
14
+ } | undefined;
15
+ isUsingHighPriority: boolean;
16
+ hasTriedHighPriority: boolean;
17
+ loadAd: (customConfig?: Partial<RewardedInterstitialAdConfig>) => Promise<void>;
18
+ preloadAd: (customConfig?: Partial<RewardedInterstitialAdConfig>) => Promise<void>;
19
+ displayAd: () => Promise<{
20
+ ad: import("..").RewardedInterstitialAdInstance | null;
21
+ reward: any;
22
+ }>;
23
+ removeAd: () => void;
24
+ refreshAd: () => Promise<void>;
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=useRewardedInterstitialAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRewardedInterstitialAd.d.ts","sourceRoot":"","sources":["../../../../src/hook/useRewardedInterstitialAd.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EAClC,MAAM,oBAAoB,CAAC;AAI5B,KAAK,+BAA+B,GAAG,4BAA4B,GACjE,gCAAgC,CAAC;AAEnC,eAAO,MAAM,yBAAyB,GACpC,QAAQ,+BAA+B;;;;;;;;;;;;;;4BA4Cf,OAAO,CAAC,4BAA4B,CAAC;+BAwBrC,OAAO,CAAC,4BAA4B,CAAC;;;;;;;CAiI9D,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { useNativeAd } from './hook/useNativeAd';
2
+ export { useInterstitialAd } from './hook/useInterstitialAd';
3
+ export { useRewardedAd } from './hook/useRewardedAd';
4
+ export { useRewardedInterstitialAd } from './hook/useRewardedInterstitialAd';
5
+ export { useAppOpenAd } from './hook/useAppOpenAd';
6
+ export { BannerAdComponent } from './components/BannerAdComponent';
7
+ export { NativeAdComponent } from './components/NativeAdComponent';
8
+ export { NativeAdFullscreenComponent } from './components/NativeAdFullscreenComponent';
9
+ export type { AdStatus, AdConfig, AdData, AdInstance, AdManagerState, AdManagerActions, AdManagerContextType, UseAdOptions, UseNativeAdOptions, UseBannerAdOptions, UseInterstitialAdOptions, UseRewardedAdOptions, UseRewardedInterstitialAdOptions, InterstitialAdConfig, RewardedAdConfig, RewardedInterstitialAdConfig, RewardedAdInstance, InterstitialAdInstance, RewardedInterstitialAdInstance, } from './types/ads-types';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAGvF,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,oBAAoB,EACpB,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type InterstitialAdInstance, type InterstitialAdConfig } from '../types/ads-types';
2
+ interface InterstitialAdStore {
3
+ ads: Map<string, InterstitialAdInstance>;
4
+ loadingKeys: Set<string>;
5
+ errors: Map<string, string>;
6
+ preloadAd: (config: InterstitialAdConfig) => Promise<void>;
7
+ loadAd: (config: InterstitialAdConfig) => Promise<void>;
8
+ displayAd: (adKey: string) => Promise<InterstitialAdInstance | null>;
9
+ removeAd: (adKey: string) => void;
10
+ refreshAd: (adKey: string) => Promise<void>;
11
+ clearAllAds: () => void;
12
+ getAd: (adKey: string) => InterstitialAdInstance | null;
13
+ isLoading: (adKey: string) => boolean;
14
+ getError: (adKey: string) => string | null;
15
+ getAllAds: () => InterstitialAdInstance[];
16
+ getLoadedAds: () => InterstitialAdInstance[];
17
+ getErrorAds: () => InterstitialAdInstance[];
18
+ isUsingHighPriority: (adKey: string) => boolean;
19
+ hasTriedHighPriority: (adKey: string) => boolean;
20
+ _updateAd: (ad: InterstitialAdInstance) => void;
21
+ _removeAd: (adKey: string) => void;
22
+ _setLoading: (adKey: string, loading: boolean) => void;
23
+ _setError: (adKey: string, error: string | null) => void;
24
+ _clearError: (adKey: string) => void;
25
+ }
26
+ export declare const useInterstitialAdStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<InterstitialAdStore>, "subscribe"> & {
27
+ subscribe: {
28
+ (listener: (selectedState: InterstitialAdStore, previousSelectedState: InterstitialAdStore) => void): () => void;
29
+ <U>(selector: (state: InterstitialAdStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
30
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
31
+ fireImmediately?: boolean;
32
+ } | undefined): () => void;
33
+ };
34
+ }>;
35
+ export {};
36
+ //# sourceMappingURL=interstitial-ads-store.d.ts.map