cloudx-react-native 3.4.6 → 3.4.7

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 (60) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/cloudxreactnative/CloudXAdEvents.kt +10 -0
  3. package/android/src/main/java/com/cloudxreactnative/CloudXAdView.kt +244 -0
  4. package/android/src/main/java/com/cloudxreactnative/CloudXAdViewEvent.kt +28 -0
  5. package/android/src/main/java/com/cloudxreactnative/CloudXAdViewManagerImpl.kt +54 -0
  6. package/android/src/main/java/com/cloudxreactnative/CloudXExtraParameters.kt +101 -0
  7. package/android/src/main/java/com/cloudxreactnative/CloudXModuleImpl.kt +5 -57
  8. package/android/src/main/java/com/cloudxreactnative/CloudXPackage.kt +1 -1
  9. package/android/src/newarch/com/cloudxreactnative/CloudXAdViewManager.kt +52 -0
  10. package/android/src/oldarch/com/cloudxreactnative/CloudXAdViewManager.kt +46 -0
  11. package/ios/CloudX.mm +13 -57
  12. package/ios/CloudXAdView.h +35 -0
  13. package/ios/CloudXAdView.mm +505 -0
  14. package/ios/CloudXAdViewManager.h +12 -0
  15. package/ios/CloudXAdViewManager.mm +38 -0
  16. package/ios/CloudXExtraParameters.h +27 -0
  17. package/ios/CloudXExtraParameters.mm +117 -0
  18. package/lib/commonjs/CloudXAdViewBase.js +248 -0
  19. package/lib/commonjs/CloudXAdViewBase.js.map +1 -0
  20. package/lib/commonjs/CloudXBannerView.js +27 -0
  21. package/lib/commonjs/CloudXBannerView.js.map +1 -0
  22. package/lib/commonjs/CloudXMRECView.js +27 -0
  23. package/lib/commonjs/CloudXMRECView.js.map +1 -0
  24. package/lib/commonjs/index.js +16 -0
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/specs/CloudXAdViewNativeComponent.js +30 -0
  27. package/lib/commonjs/specs/CloudXAdViewNativeComponent.js.map +1 -0
  28. package/lib/commonjs/version.js +1 -1
  29. package/lib/module/CloudXAdViewBase.js +240 -0
  30. package/lib/module/CloudXAdViewBase.js.map +1 -0
  31. package/lib/module/CloudXBannerView.js +19 -0
  32. package/lib/module/CloudXBannerView.js.map +1 -0
  33. package/lib/module/CloudXMRECView.js +19 -0
  34. package/lib/module/CloudXMRECView.js.map +1 -0
  35. package/lib/module/index.js +3 -0
  36. package/lib/module/index.js.map +1 -1
  37. package/lib/module/specs/CloudXAdViewNativeComponent.js +27 -0
  38. package/lib/module/specs/CloudXAdViewNativeComponent.js.map +1 -0
  39. package/lib/module/version.js +1 -1
  40. package/lib/typescript/src/CloudXAdViewBase.d.ts +28 -0
  41. package/lib/typescript/src/CloudXAdViewBase.d.ts.map +1 -0
  42. package/lib/typescript/src/CloudXBannerView.d.ts +16 -0
  43. package/lib/typescript/src/CloudXBannerView.d.ts.map +1 -0
  44. package/lib/typescript/src/CloudXMRECView.d.ts +16 -0
  45. package/lib/typescript/src/CloudXMRECView.d.ts.map +1 -0
  46. package/lib/typescript/src/index.d.ts +3 -0
  47. package/lib/typescript/src/index.d.ts.map +1 -1
  48. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts +62 -0
  49. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts.map +1 -0
  50. package/lib/typescript/src/types/AdProps.d.ts +3 -0
  51. package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
  52. package/lib/typescript/src/version.d.ts +1 -1
  53. package/package.json +1 -1
  54. package/src/CloudXAdViewBase.tsx +293 -0
  55. package/src/CloudXBannerView.tsx +20 -0
  56. package/src/CloudXMRECView.tsx +20 -0
  57. package/src/index.ts +5 -0
  58. package/src/specs/CloudXAdViewNativeComponent.ts +84 -0
  59. package/src/types/AdProps.ts +4 -0
  60. package/src/version.ts +1 -1
@@ -0,0 +1,240 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React, { useEffect, useMemo, useState } from 'react';
3
+ import { View } from 'react-native';
4
+ import NativeCloudXAdView from './specs/CloudXAdViewNativeComponent';
5
+ import NativeCloudX from './specs/NativeCloudX';
6
+
7
+ /**
8
+ * Ad format rendered by the in-tree view component.
9
+ */
10
+
11
+ /**
12
+ * Props shared by CloudXBannerView and CloudXMRECView.
13
+ */
14
+
15
+ /** Internal props: the shared base additionally needs the concrete ad format. */
16
+
17
+ const AD_SIZE = {
18
+ banner: {
19
+ width: 320,
20
+ height: 50
21
+ },
22
+ leader: {
23
+ width: 728,
24
+ height: 90
25
+ },
26
+ mrec: {
27
+ width: 300,
28
+ height: 250
29
+ }
30
+ };
31
+
32
+ /*
33
+ * Tablet status is a device constant, but NativeCloudX.isTablet() is async.
34
+ * Cache it at module level so only the first banner in a session can flash
35
+ * phone->leader; every later mount reads the resolved value synchronously.
36
+ */
37
+ let cachedIsTablet = null;
38
+
39
+ /*
40
+ * Once the SDK reports initialized it stays initialized for the JS VM's life,
41
+ * so cache it module-wide: only the first ad view mounted before init has to
42
+ * poll + show a placeholder; every later mount renders the native view
43
+ * immediately. Mirrors cachedIsTablet above.
44
+ */
45
+ let cachedIsInitialized = false;
46
+ const parseAdValues = json => {
47
+ if (!json) {
48
+ return {};
49
+ }
50
+ try {
51
+ const parsed = JSON.parse(json);
52
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};
53
+ } catch {
54
+ return {};
55
+ }
56
+ };
57
+ const toAdInfo = event => ({
58
+ adUnitId: event.adUnitId,
59
+ adFormat: event.adFormat,
60
+ networkName: event.networkName,
61
+ networkPlacement: event.networkPlacement || null,
62
+ placement: event.placement || null,
63
+ revenue: event.revenue ?? 0,
64
+ adValues: parseAdValues(event.adValuesJson)
65
+ });
66
+ const toLoadFailedInfo = event => ({
67
+ adUnitId: event.adUnitId,
68
+ code: event.code,
69
+ message: event.message || null
70
+ });
71
+ const warnIgnoredUndefinedExtraParameter = keyPath => {
72
+ console.warn(`CloudXAdView ignored extra parameter "${keyPath}" because ` + 'undefined values are not supported. Use null when a value is intentional.');
73
+ };
74
+ const normalizeExtraParameterValue = (keyPath, value) => {
75
+ if (value === undefined) {
76
+ warnIgnoredUndefinedExtraParameter(keyPath);
77
+ return undefined;
78
+ }
79
+ if (Array.isArray(value)) {
80
+ return value.reduce((items, item, index) => {
81
+ const normalized = normalizeExtraParameterValue(`${keyPath}[${index}]`, item);
82
+ if (normalized !== undefined) {
83
+ items.push(normalized);
84
+ }
85
+ return items;
86
+ }, []);
87
+ }
88
+ if (value !== null && typeof value === 'object') {
89
+ return Object.entries(value).reduce((object, [childKey, childValue]) => {
90
+ const normalized = normalizeExtraParameterValue(`${keyPath}.${childKey}`, childValue);
91
+ if (normalized !== undefined) {
92
+ object[childKey] = normalized;
93
+ }
94
+ return object;
95
+ }, {});
96
+ }
97
+ return value;
98
+ };
99
+ const toNativeExtraParameterEntries = extraParameters => {
100
+ if (!extraParameters) {
101
+ return [];
102
+ }
103
+ return Object.entries(extraParameters).reduce((entries, [key, value]) => {
104
+ const normalizedValue = normalizeExtraParameterValue(key, value);
105
+ if (normalizedValue === undefined) {
106
+ return entries;
107
+ }
108
+ entries.push({
109
+ key,
110
+ value: normalizedValue
111
+ });
112
+ return entries;
113
+ }, []);
114
+ };
115
+
116
+ /**
117
+ * Shared implementation for the in-tree banner/MREC view component. Resolves a
118
+ * default fixed size (overridable via `style`), wires the native per-view direct
119
+ * events to the public CloudXAdProps callbacks, and hosts the native ad view.
120
+ *
121
+ * Note: overriding `style` with a non-IAB size resizes the host frame, not the
122
+ * creative - iOS pins the ad view to the host bounds and Android measures the
123
+ * creative from the host, so the served creative keeps its own standard
124
+ * dimensions inside the resized frame.
125
+ */
126
+ export const CloudXAdViewBase = ({
127
+ adFormat,
128
+ adUnitId,
129
+ placement,
130
+ customData,
131
+ extraParameters,
132
+ onAdLoaded,
133
+ onAdLoadFailed,
134
+ onAdClicked,
135
+ onAdRevenuePaid,
136
+ style,
137
+ ...viewProps
138
+ }) => {
139
+ const [isTablet, setIsTablet] = useState(cachedIsTablet ?? false);
140
+ const nativeViewProps = viewProps;
141
+
142
+ /*
143
+ * Gate native ad-view creation on SDK initialization. A view mounted before
144
+ * CloudX.initialize() completes would create the ad against an uninitialized
145
+ * SDK - on iOS createBannerWithAdUnitId: returns nil and the view is
146
+ * permanently dead (no retry, no load-failed event). There is no init event
147
+ * to subscribe to, so poll isInitialized() until ready, then mount the
148
+ * native view (which is what delivers adUnitId/adFormat and triggers create).
149
+ * Mirrors CloudXNativeAdView. Cached module-wide so only the first pre-init
150
+ * mount pays the placeholder + poll.
151
+ */
152
+ const [isInitialized, setIsInitialized] = useState(cachedIsInitialized);
153
+ useEffect(() => {
154
+ if (cachedIsInitialized) {
155
+ return;
156
+ }
157
+ let cancelled = false;
158
+ let timer;
159
+ let warnedOnce = false;
160
+ const check = () => {
161
+ NativeCloudX.isInitialized().then(ready => {
162
+ if (cancelled) {
163
+ return;
164
+ }
165
+ if (ready) {
166
+ cachedIsInitialized = true;
167
+ setIsInitialized(true);
168
+ return;
169
+ }
170
+ if (!warnedOnce) {
171
+ warnedOnce = true;
172
+ console.warn('CloudXAdView mounted before CloudX SDK initialization; will render once initialize() completes.');
173
+ }
174
+ timer = setTimeout(check, 1000);
175
+ }).catch(error => {
176
+ if (cancelled) {
177
+ return;
178
+ }
179
+ console.warn('CloudXAdView failed to read initialization state:', error);
180
+ timer = setTimeout(check, 1000);
181
+ });
182
+ };
183
+ check();
184
+ return () => {
185
+ cancelled = true;
186
+ if (timer) {
187
+ clearTimeout(timer);
188
+ }
189
+ };
190
+ }, []);
191
+ useEffect(() => {
192
+ if (adFormat !== 'BANNER' || cachedIsTablet !== null) {
193
+ return;
194
+ }
195
+ let cancelled = false;
196
+ NativeCloudX.isTablet().then(tablet => {
197
+ cachedIsTablet = tablet;
198
+ if (!cancelled) {
199
+ setIsTablet(tablet);
200
+ }
201
+ }).catch(() => {
202
+ /* keep phone default on failure */
203
+ });
204
+ return () => {
205
+ cancelled = true;
206
+ };
207
+ }, [adFormat]);
208
+ const defaultSize = useMemo(() => {
209
+ if (adFormat === 'MREC') {
210
+ return AD_SIZE.mrec;
211
+ }
212
+ return isTablet ? AD_SIZE.leader : AD_SIZE.banner;
213
+ }, [adFormat, isTablet]);
214
+ const resolvedStyle = useMemo(() => [defaultSize, style], [defaultSize, style]);
215
+ const nativeExtraParameters = useMemo(() => toNativeExtraParameterEntries(extraParameters), [extraParameters]);
216
+
217
+ /*
218
+ * Until the SDK is initialized, render a sized placeholder that reserves
219
+ * the ad slot's layout but does NOT mount the native view (so no pre-init
220
+ * create). Swaps to the real ad view once isInitialized flips true.
221
+ */
222
+ if (!isInitialized) {
223
+ return /*#__PURE__*/React.createElement(View, _extends({
224
+ style: resolvedStyle
225
+ }, nativeViewProps));
226
+ }
227
+ return /*#__PURE__*/React.createElement(NativeCloudXAdView, _extends({}, nativeViewProps, {
228
+ style: resolvedStyle,
229
+ adUnitId: adUnitId,
230
+ adFormat: adFormat,
231
+ placement: placement ?? null,
232
+ customData: customData ?? null,
233
+ extraParameters: nativeExtraParameters,
234
+ onAdLoadedEvent: e => onAdLoaded === null || onAdLoaded === void 0 ? void 0 : onAdLoaded(toAdInfo(e.nativeEvent)),
235
+ onAdLoadFailedEvent: e => onAdLoadFailed === null || onAdLoadFailed === void 0 ? void 0 : onAdLoadFailed(toLoadFailedInfo(e.nativeEvent)),
236
+ onAdClickedEvent: e => onAdClicked === null || onAdClicked === void 0 ? void 0 : onAdClicked(toAdInfo(e.nativeEvent)),
237
+ onAdRevenuePaidEvent: e => onAdRevenuePaid === null || onAdRevenuePaid === void 0 ? void 0 : onAdRevenuePaid(toAdInfo(e.nativeEvent))
238
+ }));
239
+ };
240
+ //# sourceMappingURL=CloudXAdViewBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useMemo","useState","View","NativeCloudXAdView","NativeCloudX","AD_SIZE","banner","width","height","leader","mrec","cachedIsTablet","cachedIsInitialized","parseAdValues","json","parsed","JSON","parse","Array","isArray","toAdInfo","event","adUnitId","adFormat","networkName","networkPlacement","placement","revenue","adValues","adValuesJson","toLoadFailedInfo","code","message","warnIgnoredUndefinedExtraParameter","keyPath","console","warn","normalizeExtraParameterValue","value","undefined","reduce","items","item","index","normalized","push","Object","entries","object","childKey","childValue","toNativeExtraParameterEntries","extraParameters","key","normalizedValue","CloudXAdViewBase","customData","onAdLoaded","onAdLoadFailed","onAdClicked","onAdRevenuePaid","style","viewProps","isTablet","setIsTablet","nativeViewProps","isInitialized","setIsInitialized","cancelled","timer","warnedOnce","check","then","ready","setTimeout","catch","error","clearTimeout","tablet","defaultSize","resolvedStyle","nativeExtraParameters","createElement","_extends","onAdLoadedEvent","e","nativeEvent","onAdLoadFailedEvent","onAdClickedEvent","onAdRevenuePaidEvent"],"sourceRoot":"../../src","sources":["CloudXAdViewBase.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,kBAAkB,MAAM,qCAAqC;AAMpE,OAAOC,YAAY,MAAM,sBAAsB;;AAK/C;AACA;AACA;;AAGA;AACA;AACA;;AAGA;;AAKA,MAAMC,OAAO,GAAG;EACZC,MAAM,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAClCC,MAAM,EAAE;IAAEF,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAClCE,IAAI,EAAE;IAAEH,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAI;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAIG,cAA8B,GAAG,IAAI;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,mBAAmB,GAAG,KAAK;AAE/B,MAAMC,aAAa,GAAIC,IAAoB,IAA6B;EAC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,CAACA,eAAe,CACpB,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,IAAI,CAACc,aAAa,EAAE;IAChB,oBAAOpE,KAAA,CAAAoF,aAAA,CAAChF,IAAI,EAAAiF,QAAA;MAACtB,KAAK,EAAEmB;IAAc,GAAKf,eAAe,CAAG,CAAC;EAC9D;EAEA,oBACInE,KAAA,CAAAoF,aAAA,CAAC/E,kBAAkB,EAAAgF,QAAA,KACXlB,eAAe;IACnBJ,KAAK,EAAEmB,aAAc;IACrB1D,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnBG,SAAS,EAAEA,SAAS,IAAI,IAAK;IAC7B8B,UAAU,EAAEA,UAAU,IAAI,IAAK;IAC/BJ,eAAe,EAAE6B,qBAAsB;IACvCG,eAAe,EAAGC,CAA0C,IACxD5B,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAGrC,QAAQ,CAACiE,CAAC,CAACC,WAAW,CAAC,CACvC;IACDC,mBAAmB,EAAGF,CAAgD,IAClE3B,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAG5B,gBAAgB,CAACuD,CAAC,CAACC,WAAW,CAAC,CACnD;IACDE,gBAAgB,EAAGH,CAA0C,IACzD1B,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAGvC,QAAQ,CAACiE,CAAC,CAACC,WAAW,CAAC,CACxC;IACDG,oBAAoB,EAAGJ,CAA0C,IAC7DzB,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAGxC,QAAQ,CAACiE,CAAC,CAACC,WAAW,CAAC;EAC5C,EACJ,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React from 'react';
3
+ import { CloudXAdViewBase } from './CloudXAdViewBase';
4
+ /**
5
+ * In-tree banner ad component.
6
+ *
7
+ * Unlike the imperative `CloudXBannerAd` API (a native overlay above the whole
8
+ * RN view tree), this renders the banner as an ordinary React Native view, so
9
+ * app overlays such as toasts layer above it via normal RN z-ordering.
10
+ *
11
+ * Defaults to 320x50 on phones and 728x90 on tablets; override via `style`.
12
+ * Overriding `style` to a non-standard size resizes the host frame, not the
13
+ * creative - the served banner keeps its own IAB dimensions inside that frame.
14
+ */
15
+ export const CloudXBannerView = props => /*#__PURE__*/React.createElement(CloudXAdViewBase, _extends({
16
+ adFormat: "BANNER"
17
+ }, props));
18
+ export default CloudXBannerView;
19
+ //# sourceMappingURL=CloudXBannerView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","CloudXAdViewBase","CloudXBannerView","props","createElement","_extends","adFormat"],"sourceRoot":"../../src","sources":["CloudXBannerView.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,oBAAoB;AAGrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAA6C,GAAIC,KAAK,iBAC/DH,KAAA,CAAAI,aAAA,CAACH,gBAAgB,EAAAI,QAAA;EAACC,QAAQ,EAAC;AAAQ,GAAKH,KAAK,CAAG,CACnD;AAED,eAAeD,gBAAgB","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React from 'react';
3
+ import { CloudXAdViewBase } from './CloudXAdViewBase';
4
+ /**
5
+ * In-tree MREC ad component.
6
+ *
7
+ * Unlike the imperative `CloudXMRECAd` API (a native overlay above the whole RN
8
+ * view tree), this renders the MREC as an ordinary React Native view, so app
9
+ * overlays such as toasts layer above it via normal RN z-ordering.
10
+ *
11
+ * Fixed size of 300x250; override via `style`.
12
+ * Overriding `style` to a non-standard size resizes the host frame, not the
13
+ * creative - the served MREC keeps its own dimensions inside that frame.
14
+ */
15
+ export const CloudXMRECView = props => /*#__PURE__*/React.createElement(CloudXAdViewBase, _extends({
16
+ adFormat: "MREC"
17
+ }, props));
18
+ export default CloudXMRECView;
19
+ //# sourceMappingURL=CloudXMRECView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","CloudXAdViewBase","CloudXMRECView","props","createElement","_extends","adFormat"],"sourceRoot":"../../src","sources":["CloudXMRECView.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,oBAAoB;AAGrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAA2C,GAAIC,KAAK,iBAC7DH,KAAA,CAAAI,aAAA,CAACH,gBAAgB,EAAAI,QAAA;EAACC,QAAQ,EAAC;AAAM,GAAKH,KAAK,CAAG,CACjD;AAED,eAAeD,cAAc","ignoreList":[]}
@@ -10,6 +10,9 @@ export { CloudXBannerAd } from './CloudXBannerAd';
10
10
  export { CloudXMRECAd } from './CloudXMRECAd';
11
11
  export { CloudXAdPosition } from './CloudXAdPosition';
12
12
 
13
+ // Ad View Components (in-tree; layer correctly under app overlays)
14
+ export { CloudXBannerView } from './CloudXBannerView';
15
+ export { CloudXMRECView } from './CloudXMRECView';
13
16
  // Error Codes
14
17
  export { CloudXErrorCode } from './CloudXErrorCode';
15
18
 
@@ -1 +1 @@
1
- {"version":3,"names":["default","CloudX","NativeCloudX","CloudXArbiterBid","CloudXInterstitialAd","CloudXRewardedAd","CloudXBannerAd","CloudXMRECAd","CloudXAdPosition","CloudXErrorCode","requestTrackingAuthorization","getTrackingAuthorizationStatus","CloudXATTStatus","useCloudXInterstitial","useCloudXRewarded","useCloudXBanner","CloudXLogLevel","VERBOSE","DEBUG","INFO","WARN","ERROR","NONE"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA,SAASA,OAAO,EAAEC,MAAM,QAAQ,UAAU;AAC1C,SAASD,OAAO,IAAIE,YAAY,QAAQ,sBAAsB;AAC9D,SAASC,gBAAgB,QAAQ,iBAAiB;;AAElD;AACA,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA,SAASC,4BAA4B,EAAEC,8BAA8B,EAAEC,eAAe,QAAQ,2BAA2B;;AAEzH;AACA,SAASC,qBAAqB,EAAEC,iBAAiB,EAAEC,eAAe,QAAQ,SAAS;;AAGnF;;AA6BA;AACA,OAAO,MAAMC,cAAc,GAAG;EAC1BC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACV,CAAU","ignoreList":[]}
1
+ {"version":3,"names":["default","CloudX","NativeCloudX","CloudXArbiterBid","CloudXInterstitialAd","CloudXRewardedAd","CloudXBannerAd","CloudXMRECAd","CloudXAdPosition","CloudXBannerView","CloudXMRECView","CloudXErrorCode","requestTrackingAuthorization","getTrackingAuthorizationStatus","CloudXATTStatus","useCloudXInterstitial","useCloudXRewarded","useCloudXBanner","CloudXLogLevel","VERBOSE","DEBUG","INFO","WARN","ERROR","NONE"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA,SAASA,OAAO,EAAEC,MAAM,QAAQ,UAAU;AAC1C,SAASD,OAAO,IAAIE,YAAY,QAAQ,sBAAsB;AAC9D,SAASC,gBAAgB,QAAQ,iBAAiB;;AAElD;AACA,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AAGjD;AACA,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AACA,SAASC,4BAA4B,EAAEC,8BAA8B,EAAEC,eAAe,QAAQ,2BAA2B;;AAEzH;AACA,SAASC,qBAAqB,EAAEC,iBAAiB,EAAEC,eAAe,QAAQ,SAAS;;AAGnF;;AA6BA;AACA,OAAO,MAAMC,cAAc,GAAG;EAC1BC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACV,CAAU","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
2
+
3
+ /**
4
+ * Payload for ad lifecycle events (load, click, revenue).
5
+ *
6
+ * Codegen cannot express `Record<string, string>`, so the SDK-owned ad values
7
+ * are delivered as a JSON-encoded string in `adValuesJson` and re-parsed into a
8
+ * map by the JS wrapper before surfacing a CloudXAdInfo to the publisher.
9
+ */
10
+
11
+ /**
12
+ * Payload for ad load-failure events.
13
+ */
14
+
15
+ /**
16
+ * Props for the native CloudXAdView component (banner + MREC).
17
+ *
18
+ * This is the in-tree view component: the ad renders as an ordinary React
19
+ * Native view, so publisher overlays (toasts, modals) layer above it via
20
+ * normal RN z-ordering - unlike the imperative overlay banner API.
21
+ */
22
+
23
+ /**
24
+ * Native in-tree view component backing CloudXBannerView / CloudXMRECView.
25
+ */
26
+ export default codegenNativeComponent('CloudXAdView');
27
+ //# sourceMappingURL=CloudXAdViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../../src","sources":["specs/CloudXAdViewNativeComponent.ts"],"mappings":"AAMA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmCA;AACA;AACA;AACA,eAAeA,sBAAsB,CAAc,cAAc,CAAC","ignoreList":[]}
@@ -3,5 +3,5 @@
3
3
  // This value is reported to the native SDK in CloudX.initialize() and is used
4
4
  // for wrapper-version telemetry/attribution, so a stale value mis-attributes
5
5
  // installs to the wrong release.
6
- export const PLUGIN_VERSION = '3.4.6';
6
+ export const PLUGIN_VERSION = '3.4.7';
7
7
  //# sourceMappingURL=version.js.map
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { ViewProps } from 'react-native';
3
+ import type { CloudXAdProps } from './types/AdProps';
4
+ /**
5
+ * Ad format rendered by the in-tree view component.
6
+ */
7
+ export type CloudXAdViewFormat = 'BANNER' | 'MREC';
8
+ /**
9
+ * Props shared by CloudXBannerView and CloudXMRECView.
10
+ */
11
+ export type CloudXAdViewProps = CloudXAdProps & ViewProps;
12
+ /** Internal props: the shared base additionally needs the concrete ad format. */
13
+ type CloudXAdViewBaseProps = CloudXAdViewProps & {
14
+ adFormat: CloudXAdViewFormat;
15
+ };
16
+ /**
17
+ * Shared implementation for the in-tree banner/MREC view component. Resolves a
18
+ * default fixed size (overridable via `style`), wires the native per-view direct
19
+ * events to the public CloudXAdProps callbacks, and hosts the native ad view.
20
+ *
21
+ * Note: overriding `style` with a non-IAB size resizes the host frame, not the
22
+ * creative - iOS pins the ad view to the host bounds and Android measures the
23
+ * creative from the host, so the served creative keeps its own standard
24
+ * dimensions inside the resized frame.
25
+ */
26
+ export declare const CloudXAdViewBase: React.FC<CloudXAdViewBaseProps>;
27
+ export {};
28
+ //# sourceMappingURL=CloudXAdViewBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXAdViewBase.d.ts","sourceRoot":"","sources":["../../../src/CloudXAdViewBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAmC,SAAS,EAAa,MAAM,cAAc,CAAC;AAS1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,SAAS,CAAC;AAE1D,iFAAiF;AACjF,KAAK,qBAAqB,GAAG,iBAAiB,GAAG;IAC7C,QAAQ,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAoHF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2I5D,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { CloudXAdViewProps } from './CloudXAdViewBase';
3
+ /**
4
+ * In-tree banner ad component.
5
+ *
6
+ * Unlike the imperative `CloudXBannerAd` API (a native overlay above the whole
7
+ * RN view tree), this renders the banner as an ordinary React Native view, so
8
+ * app overlays such as toasts layer above it via normal RN z-ordering.
9
+ *
10
+ * Defaults to 320x50 on phones and 728x90 on tablets; override via `style`.
11
+ * Overriding `style` to a non-standard size resizes the host frame, not the
12
+ * creative - the served banner keeps its own IAB dimensions inside that frame.
13
+ */
14
+ export declare const CloudXBannerView: React.FC<CloudXAdViewProps>;
15
+ export default CloudXBannerView;
16
+ //# sourceMappingURL=CloudXBannerView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXBannerView.d.ts","sourceRoot":"","sources":["../../../src/CloudXBannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAExD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { CloudXAdViewProps } from './CloudXAdViewBase';
3
+ /**
4
+ * In-tree MREC ad component.
5
+ *
6
+ * Unlike the imperative `CloudXMRECAd` API (a native overlay above the whole RN
7
+ * view tree), this renders the MREC as an ordinary React Native view, so app
8
+ * overlays such as toasts layer above it via normal RN z-ordering.
9
+ *
10
+ * Fixed size of 300x250; override via `style`.
11
+ * Overriding `style` to a non-standard size resizes the host frame, not the
12
+ * creative - the served MREC keeps its own dimensions inside that frame.
13
+ */
14
+ export declare const CloudXMRECView: React.FC<CloudXAdViewProps>;
15
+ export default CloudXMRECView;
16
+ //# sourceMappingURL=CloudXMRECView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXMRECView.d.ts","sourceRoot":"","sources":["../../../src/CloudXMRECView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAEtD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -6,6 +6,9 @@ export { CloudXRewardedAd } from './CloudXRewardedAd';
6
6
  export { CloudXBannerAd } from './CloudXBannerAd';
7
7
  export { CloudXMRECAd } from './CloudXMRECAd';
8
8
  export { CloudXAdPosition } from './CloudXAdPosition';
9
+ export { CloudXBannerView } from './CloudXBannerView';
10
+ export { CloudXMRECView } from './CloudXMRECView';
11
+ export type { CloudXAdViewProps, CloudXAdViewFormat } from './CloudXAdViewBase';
9
12
  export { CloudXErrorCode } from './CloudXErrorCode';
10
13
  export { requestTrackingAuthorization, getTrackingAuthorizationStatus, CloudXATTStatus } from './AppTrackingTransparency';
11
14
  export { useCloudXInterstitial, useCloudXRewarded, useCloudXBanner } from './hooks';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG1H,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpF,YAAY,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAG9G,YAAY,EACR,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,E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,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,GACxB,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import type { Double, DirectEventHandler, UnsafeMixed } from 'react-native/Libraries/Types/CodegenTypes';
3
+ /**
4
+ * Payload for ad lifecycle events (load, click, revenue).
5
+ *
6
+ * Codegen cannot express `Record<string, string>`, so the SDK-owned ad values
7
+ * are delivered as a JSON-encoded string in `adValuesJson` and re-parsed into a
8
+ * map by the JS wrapper before surfacing a CloudXAdInfo to the publisher.
9
+ */
10
+ export type CloudXAdInfoEvent = Readonly<{
11
+ adUnitId: string;
12
+ adFormat: string;
13
+ networkName: string;
14
+ networkPlacement?: string | null;
15
+ placement?: string | null;
16
+ revenue: Double;
17
+ adValuesJson?: string | null;
18
+ }>;
19
+ /**
20
+ * Payload for ad load-failure events.
21
+ */
22
+ export type CloudXAdLoadFailedEvent = Readonly<{
23
+ adUnitId: string;
24
+ code: Double;
25
+ message?: string | null;
26
+ }>;
27
+ export type NativeExtraParameterEntry = Readonly<{
28
+ key: string;
29
+ value: UnsafeMixed;
30
+ }>;
31
+ /**
32
+ * Props for the native CloudXAdView component (banner + MREC).
33
+ *
34
+ * This is the in-tree view component: the ad renders as an ordinary React
35
+ * Native view, so publisher overlays (toasts, modals) layer above it via
36
+ * normal RN z-ordering - unlike the imperative overlay banner API.
37
+ */
38
+ export interface NativeProps extends ViewProps {
39
+ /** Ad unit ID used to load the ad. */
40
+ adUnitId: string;
41
+ adFormat: string;
42
+ /** Optional placement name for reporting. */
43
+ placement?: string | null;
44
+ /** Optional custom data string. */
45
+ customData?: string | null;
46
+ /** Extra parameters applied to the underlying ad view. */
47
+ extraParameters: ReadonlyArray<NativeExtraParameterEntry>;
48
+ /** Called when an ad is successfully loaded. */
49
+ onAdLoadedEvent: DirectEventHandler<CloudXAdInfoEvent>;
50
+ /** Called when the SDK fails to load an ad. */
51
+ onAdLoadFailedEvent: DirectEventHandler<CloudXAdLoadFailedEvent>;
52
+ /** Called when the ad is clicked. */
53
+ onAdClickedEvent: DirectEventHandler<CloudXAdInfoEvent>;
54
+ /** Called when ad revenue is paid. */
55
+ onAdRevenuePaidEvent: DirectEventHandler<CloudXAdInfoEvent>;
56
+ }
57
+ /**
58
+ * Native in-tree view component backing CloudXBannerView / CloudXMRECView.
59
+ */
60
+ declare const _default: HostComponent<NativeProps>;
61
+ export default _default;
62
+ //# sourceMappingURL=CloudXAdViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXAdViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/CloudXAdViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACR,MAAM,EACN,kBAAkB,EAClB,WAAW,EACd,MAAM,2CAA2C,CAAC;AAGnD;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,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ad UI components.
4
5
  */
@@ -9,6 +10,8 @@ export type CloudXAdProps = {
9
10
  placement?: string | null;
10
11
  /** Custom data string. */
11
12
  customData?: string | null;
13
+ /** Extra parameters applied to the underlying ad view. */
14
+ extraParameters?: CloudXExtraParameters | null;
12
15
  /** Called when a new ad is successfully loaded. */
13
16
  onAdLoaded?: (adInfo: CloudXAdInfo) => void;
14
17
  /** Called when the SDK fails to load a new ad. */
@@ -1 +1 @@
1
- {"version":3,"file":"AdProps.d.ts","sourceRoot":"","sources":["../../../../src/types/AdProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IAEjB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE5C,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAE7D,iDAAiD;IACjD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE7C,uDAAuD;IACvD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD,CAAC"}
1
+ {"version":3,"file":"AdProps.d.ts","sourceRoot":"","sources":["../../../../src/types/AdProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IAEjB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,0DAA0D;IAC1D,eAAe,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE/C,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE5C,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAE7D,iDAAiD;IACjD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAE7C,uDAAuD;IACvD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const PLUGIN_VERSION = "3.4.6";
1
+ export declare const PLUGIN_VERSION = "3.4.7";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudx-react-native",
3
- "version": "3.4.6",
3
+ "version": "3.4.7",
4
4
  "description": "React Native wrapper for CloudX SDK (iOS & Android)",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",