cloudx-react-native 3.8.0 → 3.10.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 (141) hide show
  1. package/README.md +1 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/cloudxreactnative/CloudXAdEvents.kt +10 -0
  4. package/android/src/main/java/com/cloudxreactnative/CloudXAdInfo.kt +41 -0
  5. package/android/src/main/java/com/cloudxreactnative/CloudXAdView.kt +1 -0
  6. package/android/src/main/java/com/cloudxreactnative/CloudXModuleImpl.kt +14 -0
  7. package/android/src/main/java/com/cloudxreactnative/CloudXNativeAdView.kt +718 -0
  8. package/android/src/main/java/com/cloudxreactnative/CloudXNativeAdViewManagerImpl.kt +119 -0
  9. package/android/src/main/java/com/cloudxreactnative/CloudXPackage.kt +4 -1
  10. package/android/src/main/res/layout/cloudx_rn_native_media_banner_template.xml +100 -0
  11. package/android/src/main/res/layout/cloudx_rn_native_medium_template.xml +99 -0
  12. package/android/src/main/res/layout/cloudx_rn_native_small_template.xml +72 -0
  13. package/android/src/main/res/layout/cloudx_rn_native_vertical_media_template.xml +117 -0
  14. package/android/src/newarch/com/cloudxreactnative/CloudXModule.kt +2 -0
  15. package/android/src/newarch/com/cloudxreactnative/CloudXNativeAdViewManager.kt +86 -0
  16. package/android/src/oldarch/com/cloudxreactnative/CloudXModule.kt +2 -0
  17. package/android/src/oldarch/com/cloudxreactnative/CloudXNativeAdViewManager.kt +118 -0
  18. package/android/src/test/java/com/cloudxreactnative/CloudXModuleImplArbiterBidsTest.kt +3 -3
  19. package/android/src/test/java/com/cloudxreactnative/CloudXModuleImplThreadingTest.kt +91 -0
  20. package/android/src/test/java/com/cloudxreactnative/FakeReadable.kt +2 -2
  21. package/cloudx-react-native.podspec +2 -1
  22. package/ios/CloudX.h +8 -0
  23. package/ios/CloudX.mm +164 -28
  24. package/ios/CloudXAdView.mm +2 -0
  25. package/ios/CloudXNativeAdView.h +75 -0
  26. package/ios/CloudXNativeAdView.mm +979 -0
  27. package/ios/CloudXNativeAdViewManager.h +12 -0
  28. package/ios/CloudXNativeAdViewManager.mm +119 -0
  29. package/ios/PrivacyInfo.xcprivacy +20 -0
  30. package/lib/commonjs/CloudX.js +4 -0
  31. package/lib/commonjs/CloudX.js.map +1 -1
  32. package/lib/commonjs/CloudXAdViewBase.js +9 -97
  33. package/lib/commonjs/CloudXAdViewBase.js.map +1 -1
  34. package/lib/commonjs/CloudXErrorCode.js +2 -0
  35. package/lib/commonjs/CloudXErrorCode.js.map +1 -1
  36. package/lib/commonjs/CloudXNativeAdView.js +331 -0
  37. package/lib/commonjs/CloudXNativeAdView.js.map +1 -0
  38. package/lib/commonjs/CloudXNativeAdViewComponents.js +252 -0
  39. package/lib/commonjs/CloudXNativeAdViewComponents.js.map +1 -0
  40. package/lib/commonjs/CloudXNativeAdViewProvider.js +117 -0
  41. package/lib/commonjs/CloudXNativeAdViewProvider.js.map +1 -0
  42. package/lib/commonjs/extraParameters.js +52 -0
  43. package/lib/commonjs/extraParameters.js.map +1 -0
  44. package/lib/commonjs/hooks.js +34 -0
  45. package/lib/commonjs/hooks.js.map +1 -1
  46. package/lib/commonjs/index.js +72 -0
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/specs/CloudXAdViewNativeComponent.js.map +1 -1
  49. package/lib/commonjs/specs/CloudXNativeAdViewNativeComponent.js +41 -0
  50. package/lib/commonjs/specs/CloudXNativeAdViewNativeComponent.js.map +1 -0
  51. package/lib/commonjs/specs/NativeCloudX.js.map +1 -1
  52. package/lib/commonjs/types/NativeAd.js +70 -0
  53. package/lib/commonjs/types/NativeAd.js.map +1 -0
  54. package/lib/commonjs/types/index.js +13 -0
  55. package/lib/commonjs/types/index.js.map +1 -1
  56. package/lib/commonjs/useCloudXSdkInitialization.js +75 -0
  57. package/lib/commonjs/useCloudXSdkInitialization.js.map +1 -0
  58. package/lib/commonjs/version.js +1 -1
  59. package/lib/commonjs/version.js.map +1 -1
  60. package/lib/module/CloudX.js +4 -0
  61. package/lib/module/CloudX.js.map +1 -1
  62. package/lib/module/CloudXAdViewBase.js +8 -96
  63. package/lib/module/CloudXAdViewBase.js.map +1 -1
  64. package/lib/module/CloudXErrorCode.js +2 -0
  65. package/lib/module/CloudXErrorCode.js.map +1 -1
  66. package/lib/module/CloudXNativeAdView.js +324 -0
  67. package/lib/module/CloudXNativeAdView.js.map +1 -0
  68. package/lib/module/CloudXNativeAdViewComponents.js +240 -0
  69. package/lib/module/CloudXNativeAdViewComponents.js.map +1 -0
  70. package/lib/module/CloudXNativeAdViewProvider.js +110 -0
  71. package/lib/module/CloudXNativeAdViewProvider.js.map +1 -0
  72. package/lib/module/extraParameters.js +45 -0
  73. package/lib/module/extraParameters.js.map +1 -0
  74. package/lib/module/hooks.js +34 -0
  75. package/lib/module/hooks.js.map +1 -1
  76. package/lib/module/index.js +13 -0
  77. package/lib/module/index.js.map +1 -1
  78. package/lib/module/specs/CloudXAdViewNativeComponent.js.map +1 -1
  79. package/lib/module/specs/CloudXNativeAdViewNativeComponent.js +35 -0
  80. package/lib/module/specs/CloudXNativeAdViewNativeComponent.js.map +1 -0
  81. package/lib/module/specs/NativeCloudX.js.map +1 -1
  82. package/lib/module/types/NativeAd.js +68 -0
  83. package/lib/module/types/NativeAd.js.map +1 -0
  84. package/lib/module/types/index.js +1 -0
  85. package/lib/module/types/index.js.map +1 -1
  86. package/lib/module/useCloudXSdkInitialization.js +68 -0
  87. package/lib/module/useCloudXSdkInitialization.js.map +1 -0
  88. package/lib/module/version.js +1 -1
  89. package/lib/module/version.js.map +1 -1
  90. package/lib/typescript/src/CloudX.d.ts.map +1 -1
  91. package/lib/typescript/src/CloudXAdViewBase.d.ts.map +1 -1
  92. package/lib/typescript/src/CloudXErrorCode.d.ts +2 -0
  93. package/lib/typescript/src/CloudXErrorCode.d.ts.map +1 -1
  94. package/lib/typescript/src/CloudXNativeAdView.d.ts +24 -0
  95. package/lib/typescript/src/CloudXNativeAdView.d.ts.map +1 -0
  96. package/lib/typescript/src/CloudXNativeAdViewComponents.d.ts +67 -0
  97. package/lib/typescript/src/CloudXNativeAdViewComponents.d.ts.map +1 -0
  98. package/lib/typescript/src/CloudXNativeAdViewProvider.d.ts +72 -0
  99. package/lib/typescript/src/CloudXNativeAdViewProvider.d.ts.map +1 -0
  100. package/lib/typescript/src/extraParameters.d.ts +4 -0
  101. package/lib/typescript/src/extraParameters.d.ts.map +1 -0
  102. package/lib/typescript/src/hooks.d.ts.map +1 -1
  103. package/lib/typescript/src/index.d.ts +4 -1
  104. package/lib/typescript/src/index.d.ts.map +1 -1
  105. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts +1 -0
  106. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts.map +1 -1
  107. package/lib/typescript/src/specs/CloudXNativeAdViewNativeComponent.d.ts +103 -0
  108. package/lib/typescript/src/specs/CloudXNativeAdViewNativeComponent.d.ts.map +1 -0
  109. package/lib/typescript/src/specs/NativeCloudX.d.ts +1 -0
  110. package/lib/typescript/src/specs/NativeCloudX.d.ts.map +1 -1
  111. package/lib/typescript/src/types/AdInfo.d.ts +6 -1
  112. package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
  113. package/lib/typescript/src/types/CloudX.d.ts +2 -0
  114. package/lib/typescript/src/types/CloudX.d.ts.map +1 -1
  115. package/lib/typescript/src/types/NativeAd.d.ts +114 -0
  116. package/lib/typescript/src/types/NativeAd.d.ts.map +1 -0
  117. package/lib/typescript/src/types/index.d.ts +2 -0
  118. package/lib/typescript/src/types/index.d.ts.map +1 -1
  119. package/lib/typescript/src/useCloudXSdkInitialization.d.ts +16 -0
  120. package/lib/typescript/src/useCloudXSdkInitialization.d.ts.map +1 -0
  121. package/lib/typescript/src/version.d.ts +1 -1
  122. package/lib/typescript/src/version.d.ts.map +1 -1
  123. package/package.json +1 -1
  124. package/src/CloudX.ts +5 -0
  125. package/src/CloudXAdViewBase.tsx +9 -125
  126. package/src/CloudXErrorCode.ts +3 -0
  127. package/src/CloudXNativeAdView.tsx +419 -0
  128. package/src/CloudXNativeAdViewComponents.tsx +203 -0
  129. package/src/CloudXNativeAdViewProvider.tsx +149 -0
  130. package/src/extraParameters.ts +65 -0
  131. package/src/hooks.ts +38 -0
  132. package/src/index.ts +24 -0
  133. package/src/specs/CloudXAdViewNativeComponent.ts +1 -0
  134. package/src/specs/CloudXNativeAdViewNativeComponent.ts +137 -0
  135. package/src/specs/NativeCloudX.ts +1 -0
  136. package/src/types/AdInfo.ts +8 -1
  137. package/src/types/CloudX.ts +3 -0
  138. package/src/types/NativeAd.ts +125 -0
  139. package/src/types/index.ts +7 -0
  140. package/src/useCloudXSdkInitialization.ts +73 -0
  141. package/src/version.ts +1 -1
@@ -0,0 +1,35 @@
1
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
2
+ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
3
+
4
+ /**
5
+ * Payload for native-ad lifecycle events (load, click, revenue).
6
+ *
7
+ * Codegen cannot express `Record<string, string>`, so the SDK-owned ad values
8
+ * are delivered as a JSON-encoded string in `adValuesJson` (mirroring
9
+ * CloudXAdViewNativeComponent) and re-parsed into a map by the JS wrapper.
10
+ * The loaded native ad's own metadata (title, media, icon, etc.) is likewise
11
+ * delivered as a JSON-encoded string in `nativeAdJson`, since codegen cannot
12
+ * express the native ad's heterogeneous field set as typed props.
13
+ */
14
+
15
+ /**
16
+ * Payload for native-ad load/display-failure events.
17
+ */
18
+
19
+ /**
20
+ * Props for the native CloudXNativeAdView component.
21
+ *
22
+ * Mirrors the in-tree CloudXAdView (banner/MREC) component: the ad renders as
23
+ * an ordinary React Native view so publisher overlays layer above it via
24
+ * normal RN z-ordering.
25
+ */
26
+
27
+ export const Commands = codegenNativeCommands({
28
+ supportedCommands: ['loadAd', 'destroyAd', 'updateAssetView', 'renderNativeAd']
29
+ });
30
+
31
+ /**
32
+ * Native in-tree view component backing the publisher-facing native ad view.
33
+ */
34
+ export default codegenNativeComponent('CloudXNativeAdView');
35
+ //# sourceMappingURL=CloudXNativeAdViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../../src","sources":["specs/CloudXNativeAdViewNativeComponent.ts"],"mappings":"AAQA,OAAOA,sBAAsB,MAAM,yDAAyD;AAC5F,OAAOC,qBAAqB,MAAM,wDAAwD;;AAE1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4EA,OAAO,MAAMC,QAAwB,GAAGD,qBAAqB,CAAiB;EAC1EE,iBAAiB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB;AAClF,CAAC,CAAC;;AAEF;AACA;AACA;AACA,eAAeH,sBAAsB,CAAc,oBAAoB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":"AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAGlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuKA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":"AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAGlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwKA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,QAAQ,CAAC","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Built-in native ad template variants rendered by the SDK's view component.
3
+ *
4
+ * All four variants have a distinct bundled layout on both iOS and Android,
5
+ * and unknown values fall back to `MEDIUM` on both.
6
+ *
7
+ * On both platforms this prop selects the **local layout only**. Neither
8
+ * bid request carries the selection, so the server sizes the creative's
9
+ * assets for `medium` whatever is chosen here:
10
+ *
11
+ * - iOS: `CLXNativeAdLoader` builds its publisher with
12
+ * `CLXNativeTemplateDefault`, which is `CLXNativeTemplateMedium`.
13
+ * `CLXBidSignals` would thread a non-default template, but the loader
14
+ * never supplies one.
15
+ * - Android: `BidSignalsProvider` writes `nativeRequirements.template`
16
+ * as a fixed `"medium"`, pending a public template-selection API.
17
+ *
18
+ * A creative rendered in a non-`MEDIUM` layout therefore carries assets cut
19
+ * for `MEDIUM` — most visible with `VERTICAL_MEDIA`, the full-screen shape.
20
+ * Tracked as CXD-5385.
21
+ */
22
+ export let CloudXNativeTemplate = /*#__PURE__*/function (CloudXNativeTemplate) {
23
+ /** 320x90 compact template: icon, title, advertiser, CTA. */
24
+ CloudXNativeTemplate["SMALL"] = "small_template";
25
+ /** 320x250 template. */
26
+ CloudXNativeTemplate["MEDIUM"] = "medium_template";
27
+ /** 320x300 media-forward template. */
28
+ CloudXNativeTemplate["MEDIA_BANNER"] = "media_banner_template";
29
+ /**
30
+ * Full-screen vertical template sized to the available bounds.
31
+ * Intended for feed-style vertical experiences. Bundled layout on both
32
+ * iOS and Android.
33
+ */
34
+ CloudXNativeTemplate["VERTICAL_MEDIA"] = "vertical_media_template";
35
+ return CloudXNativeTemplate;
36
+ }({});
37
+
38
+ /**
39
+ * Type-safe asset identifiers for custom native-ad binding.
40
+ */
41
+ export let CloudXNativeAssetType = /*#__PURE__*/function (CloudXNativeAssetType) {
42
+ CloudXNativeAssetType["TITLE"] = "TitleView";
43
+ CloudXNativeAssetType["ADVERTISER"] = "AdvertiserView";
44
+ CloudXNativeAssetType["BODY"] = "BodyView";
45
+ CloudXNativeAssetType["CALL_TO_ACTION"] = "CallToActionView";
46
+ CloudXNativeAssetType["ICON"] = "IconView";
47
+ CloudXNativeAssetType["OPTIONS"] = "OptionsView";
48
+ CloudXNativeAssetType["MEDIA"] = "MediaView";
49
+ CloudXNativeAssetType["STAR_RATING"] = "StarRatingView";
50
+ return CloudXNativeAssetType;
51
+ }({});
52
+
53
+ /**
54
+ * Structured metadata for a single loaded native ad.
55
+ *
56
+ * Surfaced on the `onAdLoaded` callback as `CloudXAdInfo.nativeAd`.
57
+ */
58
+
59
+ // Shares one value type with `extraParameters`: both native setters accept any
60
+ // value, so narrowing one of the two sibling props was an accidental restriction.
61
+
62
+ /**
63
+ * Props for the native-ad view component.
64
+ *
65
+ * Callbacks inherited from {@link CloudXAdProps} (`onAdLoaded`, `onAdLoadFailed`,
66
+ * `onAdClicked`, `onAdRevenuePaid`) receive unwrapped payloads, not synthetic events.
67
+ */
68
+ //# sourceMappingURL=NativeAd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CloudXNativeTemplate","CloudXNativeAssetType"],"sourceRoot":"../../../src","sources":["types/NativeAd.ts"],"mappings":"AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,oBAAoB,0BAApBA,oBAAoB;EAC5B;EADQA,oBAAoB;EAI5B;EAJQA,oBAAoB;EAO5B;EAPQA,oBAAoB;EAU5B;AACJ;AACA;AACA;AACA;EAdYA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;;AAkBhC;AACA;AACA;AACA,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;;AAWjC;AACA;AACA;AACA;AACA;;AAkBA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,2 +1,3 @@
1
1
  export { CloudXRevenuePlatform, CloudXRevenuePrecision } from './RevenueData';
2
+ export { CloudXNativeTemplate, CloudXNativeAssetType } from './NativeAd';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CloudXRevenuePlatform","CloudXRevenuePrecision"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"AAeA,SAASA,qBAAqB,EAAEC,sBAAsB,QAAQ,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["CloudXRevenuePlatform","CloudXRevenuePrecision","CloudXNativeTemplate","CloudXNativeAssetType"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"AAeA,SAASA,qBAAqB,EAAEC,sBAAsB,QAAQ,eAAe;AAkB7E,SAASC,oBAAoB,EAAEC,qBAAqB,QAAQ,YAAY","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ import { useEffect, useState } from 'react';
2
+ import NativeCloudX from './specs/NativeCloudX';
3
+
4
+ /*
5
+ * Once the SDK reports initialized it stays initialized for the JS VM's life,
6
+ * so cache it module-wide: only the first ad view mounted before init has to
7
+ * poll + show a placeholder; every later mount (banner, MREC, or native)
8
+ * renders its native view immediately.
9
+ */
10
+ let cachedIsInitialized = false;
11
+
12
+ /**
13
+ * Polls CloudX SDK initialization state and caches the result module-wide.
14
+ *
15
+ * Shared by `CloudXAdViewBase` (banner/MREC) and `CloudXNativeAdView` so
16
+ * every in-tree ad-view component gates native-view creation on SDK
17
+ * initialization identically: a view mounted before `CloudX.initialize()`
18
+ * completes would create its native ad against an uninitialized SDK, which
19
+ * on iOS returns nil and leaves the view permanently dead (no retry, no
20
+ * load-failed event). There is no init event to subscribe to, so poll
21
+ * `isInitialized()` until ready.
22
+ *
23
+ * @param componentName Used only in the console warnings, so callers can
24
+ * tell which component is waiting on initialization.
25
+ */
26
+ export const useCloudXSdkInitializationGate = componentName => {
27
+ const [isInitialized, setIsInitialized] = useState(cachedIsInitialized);
28
+ useEffect(() => {
29
+ if (cachedIsInitialized) {
30
+ return;
31
+ }
32
+ let cancelled = false;
33
+ let timer;
34
+ let warnedOnce = false;
35
+ const check = () => {
36
+ NativeCloudX.isInitialized().then(ready => {
37
+ if (cancelled) {
38
+ return;
39
+ }
40
+ if (ready) {
41
+ cachedIsInitialized = true;
42
+ setIsInitialized(true);
43
+ return;
44
+ }
45
+ if (!warnedOnce) {
46
+ warnedOnce = true;
47
+ console.warn(`${componentName} mounted before CloudX SDK initialization; will render once initialize() completes.`);
48
+ }
49
+ timer = setTimeout(check, 1000);
50
+ }).catch(error => {
51
+ if (cancelled) {
52
+ return;
53
+ }
54
+ console.warn(`${componentName} failed to read initialization state:`, error);
55
+ timer = setTimeout(check, 1000);
56
+ });
57
+ };
58
+ check();
59
+ return () => {
60
+ cancelled = true;
61
+ if (timer) {
62
+ clearTimeout(timer);
63
+ }
64
+ };
65
+ }, [componentName]);
66
+ return isInitialized;
67
+ };
68
+ //# sourceMappingURL=useCloudXSdkInitialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","NativeCloudX","cachedIsInitialized","useCloudXSdkInitializationGate","componentName","isInitialized","setIsInitialized","cancelled","timer","warnedOnce","check","then","ready","console","warn","setTimeout","catch","error","clearTimeout"],"sourceRoot":"../../src","sources":["useCloudXSdkInitialization.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,OAAOC,YAAY,MAAM,sBAAsB;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,mBAAmB,GAAG,KAAK;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,8BAA8B,GAAIC,aAAqB,IAAc;EAC9E,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGN,QAAQ,CAACE,mBAAmB,CAAC;EAEvEH,SAAS,CAAC,MAAM;IACZ,IAAIG,mBAAmB,EAAE;MACrB;IACJ;IACA,IAAIK,SAAS,GAAG,KAAK;IACrB,IAAIC,KAAgD;IACpD,IAAIC,UAAU,GAAG,KAAK;IACtB,MAAMC,KAAK,GAAGA,CAAA,KAAM;MAChBT,YAAY,CAACI,aAAa,CAAC,CAAC,CACvBM,IAAI,CAAEC,KAAK,IAAK;QACb,IAAIL,SAAS,EAAE;UACX;QACJ;QACA,IAAIK,KAAK,EAAE;UACPV,mBAAmB,GAAG,IAAI;UAC1BI,gBAAgB,CAAC,IAAI,CAAC;UACtB;QACJ;QACA,IAAI,CAACG,UAAU,EAAE;UACbA,UAAU,GAAG,IAAI;UACjBI,OAAO,CAACC,IAAI,CACR,GAAGV,aAAa,qFACpB,CAAC;QACL;QACAI,KAAK,GAAGO,UAAU,CAACL,KAAK,EAAE,IAAI,CAAC;MACnC,CAAC,CAAC,CACDM,KAAK,CAAEC,KAAK,IAAK;QACd,IAAIV,SAAS,EAAE;UACX;QACJ;QACAM,OAAO,CAACC,IAAI,CAAC,GAAGV,aAAa,uCAAuC,EAAEa,KAAK,CAAC;QAC5ET,KAAK,GAAGO,UAAU,CAACL,KAAK,EAAE,IAAI,CAAC;MACnC,CAAC,CAAC;IACV,CAAC;IACDA,KAAK,CAAC,CAAC;IACP,OAAO,MAAM;MACTH,SAAS,GAAG,IAAI;MAChB,IAAIC,KAAK,EAAE;QACPU,YAAY,CAACV,KAAK,CAAC;MACvB;IACJ,CAAC;EACL,CAAC,EAAE,CAACJ,aAAa,CAAC,CAAC;EAEnB,OAAOC,aAAa;AACxB,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.8.0';
6
+ export const PLUGIN_VERSION = '3.10.1';
7
7
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PLUGIN_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["PLUGIN_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../src/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAC;AA+DtE,eAAO,MAAM,MAAM,EAAE,UAepB,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../src/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAC;AAmEtE,eAAO,MAAM,MAAM,EAAE,UAgBpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +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;AAkHF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8I5D,CAAC"}
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;AAK1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD;;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;AA4CF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkG5D,CAAC"}
@@ -48,6 +48,8 @@ export declare enum CloudXErrorCode {
48
48
  LOAD_NOT_ALLOWED_WHILE_SHOWING = 303,
49
49
  /** Ad failed to load. */
50
50
  LOAD_FAILED = 304,
51
+ /** `load` was rejected because the per-ad-unit concurrent load cap was reached. Wait for an in-flight load to terminate or raise the cap. */
52
+ LOAD_REJECTED_CONCURRENCY = 305,
51
53
  /** Ad is not ready to be shown. */
52
54
  AD_NOT_READY = 400,
53
55
  /** Another fullscreen ad is already showing. */
@@ -1 +1 @@
1
- {"version":3,"file":"CloudXErrorCode.d.ts","sourceRoot":"","sources":["../../../src/CloudXErrorCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,eAAe;IAGvB,kCAAkC;IAClC,cAAc,IAAI;IAIlB,6BAA6B;IAC7B,aAAa,MAAM;IAEnB,iCAAiC;IACjC,eAAe,MAAM;IAErB,0BAA0B;IAC1B,YAAY,MAAM;IAElB,0BAA0B;IAC1B,YAAY,MAAM;IAElB,0BAA0B;IAC1B,iBAAiB,MAAM;IAEvB,8CAA8C;IAC9C,gBAAgB,MAAM;IAEtB,+BAA+B;IA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C;IACvC,mBAAmB,MAAM;IAEzB,kCAAkC;IAClC,uBAAuB,MAAM;IAE7B,oCAAoC;IACpC,4BAA4B,MAAM;IAElC,+BAA+B;IAC/B,oBAAoB,MAAM;IAE1B,8BAA8B;IAC9B,oBAAoB,MAAM;IAE1B,mCAAmC;IACnC,eAAe,MAAM;IAErB,yCAAyC;IACzC,qBAAqB,MAAM;IAE3B,4BAA4B;IAC5B,oBAAoB,MAAM;IAE1B,2CAA2C;IAC3C,yBAAyB,MAAM;IAE/B,2CAA2C;IAC3C,+BAA+B,MAAM;IAErC,2CAA2C;IAC3C,qBAAqB,MAAM;IAE3B,8BAA8B;IAC9B,kBAAkB,MAAM;IAExB,sCAAsC;IACtC,2BAA2B,MAAM;IAEjC,4BAA4B;IAC5B,oBAAoB,MAAM;IAE1B,2CAA2C;IAC3C,gCAAgC,MAAM;IAEtC,mFAAmF;IACnF,+BAA+B,MAAM;IAErC,wCAAwC;IACxC,sBAAsB,MAAM;IAE5B,gGAAgG;IAChG,8BAA8B,MAAM;CACvC"}
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import type { CloudXNativeAdViewHandle } from './types/NativeAd';
3
+ import type { CloudXAdDisplayFailedInfo, CloudXAdInfo } from './types/AdInfo';
4
+ /**
5
+ * Renders a native ad. Defaults to the SDK's bundled template layouts;
6
+ * set `renderMode="manual"` to drive layout through the pre-built asset
7
+ * components (`CloudXTitleView`, `CloudXMediaView`, etc.) instead.
8
+ *
9
+ * Manual mode is never inferred from the presence of children — `renderMode`
10
+ * is always explicit so a publisher's intent is visible at the call site.
11
+ */
12
+ export declare const CloudXNativeAdView: React.ForwardRefExoticComponent<import("./types").CloudXAdProps & import("react-native").ViewProps & {
13
+ template?: import("./types/NativeAd").CloudXNativeTemplate;
14
+ localExtraParameters?: import("./types/NativeAd").CloudXLocalExtraParameters;
15
+ disableVideoFullScreen?: boolean;
16
+ startVideoUnmuted?: boolean;
17
+ hideVideoMediaControls?: boolean;
18
+ renderMode?: "template" | "manual";
19
+ onAdDisplayFailed?: (errorInfo: CloudXAdDisplayFailedInfo) => void;
20
+ onAdExpired?: (adInfo: CloudXAdInfo) => void;
21
+ onAdClosed?: (adInfo: CloudXAdInfo) => void;
22
+ } & React.RefAttributes<CloudXNativeAdViewHandle>>;
23
+ export default CloudXNativeAdView;
24
+ //# sourceMappingURL=CloudXNativeAdView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXNativeAdView.d.ts","sourceRoot":"","sources":["../../../src/CloudXNativeAdView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAA0B,wBAAwB,EAA2B,MAAM,kBAAkB,CAAC;AAClH,OAAO,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAA0B,MAAM,gBAAgB,CAAC;AAoDtG;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;kDAqD9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Pre-built asset components for the manual-render `<CloudXNativeAdView/>`
3
+ * flow. Each component reads its content + ref from
4
+ * @{link CloudXNativeAdViewContext} and renders a minimal RN primitive so the
5
+ * publisher can style it with `style` / `textStyle` props without reaching
6
+ * into SDK internals.
7
+ *
8
+ * Mount these as descendants of a `<CloudXNativeAdView/>`. A component
9
+ * mounted outside the provider renders empty rather than throwing, so
10
+ * publisher layouts can be shown before the first ad loads. Each component
11
+ * calls `registerAssetRole` on mount so the host view can warn if it is used
12
+ * while `renderMode` is `'template'` (see CloudXNativeAdViewProvider).
13
+ */
14
+ import * as React from 'react';
15
+ import type { ImageProps, TextProps, ViewProps } from 'react-native';
16
+ /** Renders the headline. */
17
+ export declare const CloudXTitleView: React.FC<TextProps>;
18
+ /** Renders the advertiser / sponsor name. */
19
+ export declare const CloudXAdvertiserView: React.FC<TextProps>;
20
+ /** Renders the body / description copy. */
21
+ export declare const CloudXBodyView: React.FC<TextProps>;
22
+ /**
23
+ * Renders the call-to-action label.
24
+ *
25
+ * iOS wraps the Text in a TouchableOpacity so publishers get the standard
26
+ * press-feedback animation; the Text ref is what the native bridge tags,
27
+ * and UIKit's touch dispatch lets the SDK's gesture recognizer run.
28
+ *
29
+ * Android renders a bare Text. RN's gesture responder system treats a
30
+ * wrapping TouchableOpacity as a touch-capturing ancestor, which blocks
31
+ * the OnClickListener the 3P SDK installs on the Text when registering
32
+ * it for click handling. Without the wrapper, the SDK-set listener
33
+ * receives the tap normally.
34
+ */
35
+ export declare const CloudXCallToActionView: React.FC<TextProps>;
36
+ /**
37
+ * Renders the icon. Prefers the remote URL when available (fast CDN fetch),
38
+ * falling back to the base64-encoded bytes surfaced by the bridge for
39
+ * adapters that only ship a pre-loaded drawable.
40
+ */
41
+ export declare const CloudXIconView: React.FC<Omit<ImageProps, 'source'>>;
42
+ /**
43
+ * Renders the ad-choices / options container. The adapter's actual options
44
+ * view is inserted as a native child of this element by the bridge.
45
+ */
46
+ export declare const CloudXOptionsView: React.FC<ViewProps>;
47
+ /**
48
+ * Renders the media container. The adapter's media view (static image or
49
+ * video surface) is inserted as a native child of this element by the
50
+ * bridge.
51
+ */
52
+ export declare const CloudXMediaView: React.FC<ViewProps>;
53
+ type StarRatingViewProps = ViewProps & {
54
+ /** Color for filled stars. Defaults to #ffe234. */
55
+ color?: string;
56
+ /** Color for empty stars. Defaults to #dedede. */
57
+ shadowColor?: string;
58
+ /** Star size in points. Defaults to 10. */
59
+ size?: number;
60
+ };
61
+ /**
62
+ * Renders the star rating using Unicode glyphs. Partial fractions are
63
+ * clipped so a 3.5-star rating displays as 3.5 stars.
64
+ */
65
+ export declare const CloudXStarRatingView: React.FC<StarRatingViewProps>;
66
+ export {};
67
+ //# sourceMappingURL=CloudXNativeAdViewComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXNativeAdViewComponents.d.ts","sourceRoot":"","sources":["../../../src/CloudXNativeAdViewComponents.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ertiser, body, CTA, icon,
5
+ * options, media, star rating) read metadata and refs from this context.
6
+ * The host `<CloudXNativeAdView/>` owns the `setNativeAd` state setter and
7
+ * publishes the latest `CloudXNativeAdMetadata` when `onAdLoaded` fires so
8
+ * pre-built components re-render with the new content.
9
+ *
10
+ * Design notes:
11
+ * - A `starRatingRef` lets the star component participate in the binder
12
+ * pipeline (even though the native side treats it as decorative).
13
+ * - Refs are typed explicitly rather than relying on `any`, so misuse
14
+ * surfaces at compile time.
15
+ * - Adds `registerAssetRole`, called by every pre-built asset component on
16
+ * mount. The host `<CloudXNativeAdView/>` passes `onAssetRoleRegistered`
17
+ * to detect an asset component mounted while `renderMode` is `'template'`
18
+ * — a likely publisher mistake — and warn once.
19
+ */
20
+ import * as React from 'react';
21
+ import type { ReactNode } from 'react';
22
+ import type { Image, Text, View } from 'react-native';
23
+ import type { CloudXNativeAdMetadata } from './types/NativeAd';
24
+ type TextRef = React.ElementRef<typeof Text>;
25
+ type ImageRef = React.ElementRef<typeof Image>;
26
+ type ViewRef = React.ElementRef<typeof View>;
27
+ /**
28
+ * Shape exposed to pre-built asset components. Consumers typically destructure
29
+ * a single ref + the `nativeAd` field; the setter is only used by the host.
30
+ */
31
+ export type CloudXNativeAdViewContextValue = {
32
+ titleRef: React.RefObject<TextRef | null>;
33
+ advertiserRef: React.RefObject<TextRef | null>;
34
+ bodyRef: React.RefObject<TextRef | null>;
35
+ callToActionRef: React.RefObject<TextRef | null>;
36
+ iconRef: React.RefObject<ImageRef | null>;
37
+ optionsRef: React.RefObject<ViewRef | null>;
38
+ mediaRef: React.RefObject<ViewRef | null>;
39
+ starRatingRef: React.RefObject<ViewRef | null>;
40
+ nativeAd: CloudXNativeAdMetadata | null;
41
+ setNativeAd: React.Dispatch<React.SetStateAction<CloudXNativeAdMetadata | null>>;
42
+ /**
43
+ * Called by each pre-built asset component on mount, naming its asset
44
+ * role. Returns an unregister function, so an effect can simply
45
+ * `return registerAssetRole('CloudXTitleView')` and have the role drop
46
+ * out again when the component unmounts.
47
+ */
48
+ registerAssetRole: (role: string) => () => void;
49
+ /**
50
+ * Roles whose component is currently mounted. The host intersects this
51
+ * with the loaded ad's own asset set, so it only waits on a binding the
52
+ * publisher's layout can actually satisfy.
53
+ */
54
+ mountedAssetRoles: React.MutableRefObject<Set<string>>;
55
+ };
56
+ export declare const CloudXNativeAdViewContext: React.Context<CloudXNativeAdViewContextValue>;
57
+ type ProviderProps = {
58
+ children: ReactNode;
59
+ /**
60
+ * Invoked when a descendant asset component registers its role. The host
61
+ * `<CloudXNativeAdView/>` uses this to warn when an asset component is
62
+ * mounted while `renderMode` is `'template'`.
63
+ */
64
+ onAssetRoleRegistered?: (role: string) => void;
65
+ };
66
+ /**
67
+ * Wrap this around the root of a `<CloudXNativeAdView/>` tree so descendant
68
+ * asset components share refs and ad state.
69
+ */
70
+ export declare const CloudXNativeAdViewProvider: React.FC<ProviderProps>;
71
+ export {};
72
+ //# sourceMappingURL=CloudXNativeAdViewProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXNativeAdViewProvider.d.ts","sourceRoot":"","sources":["../../../src/CloudXNativeAdViewProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,KAAK,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AAC7C,KAAK,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAC/C,KAAK,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AAE7C;;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AC,aAAa,CAgD9D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { NativeExtraParameterEntry } from './specs/CloudXAdViewNativeComponent';
2
+ import type { CloudXAdProps } from './types/AdProps';
3
+ export declare const toNativeExtraParameterEntries: (extraParameters?: CloudXAdProps["extraParameters"]) => ReadonlyArray<NativeExtraParameterEntry>;
4
+ //# sourceMappingURL=extraParameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extraParameters.d.ts","sourceRoot":"","sources":["../../../src/extraParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA4CrD,eAAO,MAAM,6BAA6B,GACtC,kBAAkB,aAAa,CAAC,iBAAiB,CAAC,KACnD,aAAa,CAAC,yBAAyB,CAiBzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6BH,MAAM,MAAM,4BAA4B,GAAG;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,4BAA4B,CA+EpF;AAMD,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAA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,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CA0CxE"}
@@ -11,12 +11,15 @@ export { CloudXMRECAd } from './CloudXMRECAd';
11
11
  export { CloudXAdPosition } from './CloudXAdPosition';
12
12
  export { CloudXBannerView } from './CloudXBannerView';
13
13
  export { CloudXMRECView } from './CloudXMRECView';
14
+ export { CloudXNativeAdView } from './CloudXNativeAdView';
15
+ export { CloudXTitleView, CloudXAdvertiserView, CloudXBodyView, CloudXCallToActionView, CloudXIconView, CloudXOptionsView, CloudXMediaView, CloudXStarRatingView, } from './CloudXNativeAdViewComponents';
14
16
  export type { CloudXAdViewProps, CloudXAdViewFormat } from './CloudXAdViewBase';
15
17
  export { CloudXErrorCode } from './CloudXErrorCode';
16
18
  export { requestTrackingAuthorization, getTrackingAuthorizationStatus, CloudXATTStatus } from './AppTrackingTransparency';
17
19
  export { useCloudXInterstitial, useCloudXAppOpen, useCloudXRewarded, useCloudXBanner } from './hooks';
18
20
  export type { CloudXInterstitialHookResult, CloudXAppOpenHookResult, CloudXRewardedHookResult, CloudXBannerHookResult, } from './hooks';
19
- export type { CloudXAdInfo, CloudXAdLoadFailedInfo, CloudXAdDisplayFailedInfo, CloudXAdRewardInfo, CloudXInitializationResult, CloudXConfiguration, CloudXType, CloudXLogLevelValue, CloudXArbiterConfiguration, CloudXArbiterPlatform, CloudXArbiterResult, CloudXSDKArbiterBid, CloudXLevelPlayArbiterBid, CloudXPubMaticArbiterBid, CloudXCustomArbiterBid, CloudXAdMobArbiterBid, CloudXGamArbiterBid, CloudXRevenueData, CloudXRevenuePlatformValue, CloudXRevenuePrecisionValue, CloudXFullscreenAdType, CloudXInterstitialAdType, CloudXAppOpenAdType, CloudXRewardedAdType, CloudXViewAdType, CloudXBannerAdType, CloudXMRECAdType, CloudXAdProps, CloudXAdEventObject, CloudXAdEventListener, CloudXExtraParameterValue, CloudXExtraParameters, } from './types';
21
+ export type { CloudXAdInfo, CloudXAdLoadFailedInfo, CloudXAdDisplayFailedInfo, CloudXAdRewardInfo, CloudXInitializationResult, CloudXConfiguration, CloudXType, CloudXLogLevelValue, CloudXArbiterConfiguration, CloudXArbiterPlatform, CloudXArbiterResult, CloudXSDKArbiterBid, CloudXLevelPlayArbiterBid, CloudXPubMaticArbiterBid, CloudXCustomArbiterBid, CloudXAdMobArbiterBid, CloudXGamArbiterBid, CloudXRevenueData, CloudXRevenuePlatformValue, CloudXRevenuePrecisionValue, CloudXFullscreenAdType, CloudXInterstitialAdType, CloudXAppOpenAdType, CloudXRewardedAdType, CloudXViewAdType, CloudXBannerAdType, CloudXMRECAdType, CloudXAdProps, CloudXAdEventObject, CloudXAdEventListener, CloudXExtraParameterValue, CloudXExtraParameters, CloudXNativeAdMetadata, CloudXNativeAdViewHandle, CloudXNativeAdViewProps, CloudXLocalExtraParameters, } from './types';
22
+ export { CloudXNativeTemplate } from './types';
20
23
  export declare const CloudXLogLevel: {
21
24
  readonly VERBOSE: "verbose";
22
25
  readonly DEBUG: "debug";
@@ -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;AAI/D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE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,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACtG,YAAY,EACR,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,GACzB,MAAM,SAAS,CAAC;AAGjB,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,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAG/C,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
@@ -13,6 +13,7 @@ export type CloudXAdInfoEvent = Readonly<{
13
13
  networkName: string;
14
14
  networkPlacement?: string | null;
15
15
  placement?: string | null;
16
+ creativeId?: string | null;
16
17
  revenue: Double;
17
18
  adValuesJson?: string | null;
18
19
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CloudXAdViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/CloudXAdViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,M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C,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IAQjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,0DAA0D;IAC1D,eAAe,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAE1D,gDAAgD;IAChD,eAAe,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IAEvD,+CAA+C;IAC/C,mBAAmB,EAAE,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;IAEjE,qCAAqC;IACrC,gBAAgB,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IAExD,sCAAsC;IACtC,oBAAoB,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;CAC/D;AAED;;GAEG;wBACmE,aAAa,CAAC,WAAW,CAAC;AAAhG,wBAAiG"}
@@ -0,0 +1,103 @@
1
+ import type * as React from 'react';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
+ import type { Double, Int32, DirectEventHandler, UnsafeMixed } from 'react-native/Libraries/Types/CodegenTypes';
4
+ /**
5
+ * Payload for native-ad lifecycle events (load, click, revenue).
6
+ *
7
+ * Codegen cannot express `Record<string, string>`, so the SDK-owned ad values
8
+ * are delivered as a JSON-encoded string in `adValuesJson` (mirroring
9
+ * CloudXAdViewNativeComponent) and re-parsed into a map by the JS wrapper.
10
+ * The loaded native ad's own metadata (title, media, icon, etc.) is likewise
11
+ * delivered as a JSON-encoded string in `nativeAdJson`, since codegen cannot
12
+ * express the native ad's heterogeneous field set as typed props.
13
+ */
14
+ export type CloudXNativeAdInfoEvent = Readonly<{
15
+ adUnitId: string;
16
+ adFormat: string;
17
+ networkName: string;
18
+ networkPlacement?: string | null;
19
+ placement?: string | null;
20
+ creativeId?: string | null;
21
+ revenue: Double;
22
+ adValuesJson?: string | null;
23
+ nativeAdJson?: string | null;
24
+ }>;
25
+ /**
26
+ * Payload for native-ad load/display-failure events.
27
+ */
28
+ export type CloudXNativeAdLoadFailedEvent = Readonly<{
29
+ adUnitId: string;
30
+ code: Double;
31
+ message?: string | null;
32
+ }>;
33
+ export type NativeExtraParameterEntry = Readonly<{
34
+ key: string;
35
+ value: UnsafeMixed;
36
+ }>;
37
+ /**
38
+ * Props for the native CloudXNativeAdView component.
39
+ *
40
+ * Mirrors the in-tree CloudXAdView (banner/MREC) component: the ad renders as
41
+ * an ordinary React Native view so publisher overlays layer above it via
42
+ * normal RN z-ordering.
43
+ */
44
+ export interface NativeProps extends ViewProps {
45
+ /** Ad unit ID used to load the ad. */
46
+ adUnitId: string;
47
+ /**
48
+ * Publisher-selected template name (e.g. "small_template",
49
+ * "medium_template"). Named `templateName`, not `template` — codegen
50
+ * emits the prop as a literal `std::string template` struct member on
51
+ * the generated Props class, and `template` is a reserved word in C++,
52
+ * so that spelling fails to compile. The Old Architecture manager also
53
+ * accepts the legacy `template` prop name and aliases it internally for
54
+ * publisher compatibility.
55
+ */
56
+ templateName?: string | null;
57
+ /** Optional placement name for reporting. */
58
+ placement?: string | null;
59
+ /** Optional custom data string. */
60
+ customData?: string | null;
61
+ /** Extra parameters applied to the underlying native ad loader. */
62
+ extraParameters?: ReadonlyArray<NativeExtraParameterEntry>;
63
+ /** Local-only extra parameters applied to the underlying native ad loader. */
64
+ localExtraParameters?: ReadonlyArray<NativeExtraParameterEntry>;
65
+ /** Disables the video full-screen affordance when true. */
66
+ disableVideoFullScreen?: boolean;
67
+ /** Starts video creatives unmuted when true. */
68
+ startVideoUnmuted?: boolean;
69
+ /** Hides video media controls when true. */
70
+ hideVideoMediaControls?: boolean;
71
+ /**
72
+ * When true, the host skips template rendering and lets the JS layer
73
+ * drive layout through the `updateAssetView` + `renderNativeAd` commands.
74
+ */
75
+ manualRender?: boolean;
76
+ /** Called when an ad is successfully loaded. */
77
+ onAdLoadedEvent: DirectEventHandler<CloudXNativeAdInfoEvent>;
78
+ /** Called when the SDK fails to load an ad. */
79
+ onAdLoadFailedEvent: DirectEventHandler<CloudXNativeAdLoadFailedEvent>;
80
+ /** Called when the ad fails to render/display (e.g. manual render before load). */
81
+ onAdDisplayFailedEvent: DirectEventHandler<CloudXNativeAdLoadFailedEvent>;
82
+ /** Called when the ad is clicked. */
83
+ onAdClickedEvent: DirectEventHandler<CloudXNativeAdInfoEvent>;
84
+ /** Called when the loaded ad expires. */
85
+ onAdExpiredEvent: DirectEventHandler<CloudXNativeAdInfoEvent>;
86
+ /** Called when the ad is closed. */
87
+ onAdClosedEvent: DirectEventHandler<CloudXNativeAdInfoEvent>;
88
+ /** Called when ad revenue is paid. */
89
+ onAdRevenuePaidEvent: DirectEventHandler<CloudXNativeAdInfoEvent>;
90
+ }
91
+ export interface NativeCommands {
92
+ loadAd: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
93
+ destroyAd: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
94
+ updateAssetView: (viewRef: React.ElementRef<HostComponent<NativeProps>>, assetViewTag: Int32, assetName: string) => void;
95
+ renderNativeAd: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
96
+ }
97
+ export declare const Commands: NativeCommands;
98
+ /**
99
+ * Native in-tree view component backing the publisher-facing native ad view.
100
+ */
101
+ declare const _default: HostComponent<NativeProps>;
102
+ export default _default;
103
+ //# sourceMappingURL=CloudXNativeAdViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXNativeAdViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/CloudXNativeAdViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACR,MAAM,EACN,KAAK,EACL,kBAAkB,EAClB,WAAW,EACd,MAAM,2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,QAAQ,EAAE,cAErB,CAAC;AAEH;;GAEG;wBACyE,aAAa,CAAC,WAAW,CAAC;AAAtG,wBAAuG"}
@@ -49,6 +49,7 @@ export interface Spec extends TurboModule {
49
49
  };
50
50
  isInitialized(): Promise<boolean>;
51
51
  initialize(pluginVersion: string, appKey: string): Promise<CloudXConfiguration>;
52
+ showMediationDebugger(): Promise<boolean>;
52
53
  isTablet(): Promise<boolean>;
53
54
  getVersion(): Promise<string>;
54
55
  setMinLogLevel(level: string): void;