@thealteroffice/react-native-adgeist 0.0.16 → 0.0.18
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.
- package/android/build.gradle +1 -1
- package/android/generated/java/com/adgeist/NativeAdgeistSpec.java +83 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNAdgeistSpec-generated.cpp +98 -0
- package/android/generated/jni/RNAdgeistSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +149 -0
- package/android/generated/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +170 -0
- package/android/src/main/java/com/adgeist/implementation/AdgeistModuleImpl.kt +101 -9
- package/android/src/newarch/java/com/AdgeistModule.kt +93 -2
- package/android/src/oldarch/java/com/AdgeistModule.kt +101 -4
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec-generated.mm +42 -7
- package/ios/generated/RNAdgeistSpec/RNAdgeistSpec.h +57 -10
- package/ios/generated/RNAdgeistSpecJSI-generated.cpp +81 -14
- package/ios/generated/RNAdgeistSpecJSI.h +54 -9
- package/lib/module/NativeAdgeist.js.map +1 -1
- package/lib/module/components/BannerAd.js +201 -63
- package/lib/module/components/BannerAd.js.map +1 -1
- package/lib/module/utilities.js +16 -0
- package/lib/module/utilities.js.map +1 -0
- package/lib/typescript/src/NativeAdgeist.d.ts +6 -1
- package/lib/typescript/src/NativeAdgeist.d.ts.map +1 -1
- package/lib/typescript/src/components/BannerAd.d.ts.map +1 -1
- package/lib/typescript/src/utilities.d.ts +5 -0
- package/lib/typescript/src/utilities.d.ts.map +1 -0
- package/package.json +8 -2
- package/src/NativeAdgeist.ts +61 -9
- package/src/components/BannerAd.tsx +283 -77
- package/src/utilities.ts +13 -0
- package/plugin/build/android/withRNAdgeistMainApplication.d.ts +0 -3
- package/plugin/build/android/withRNAdgeistMainApplication.js +0 -65
- package/plugin/build/index.d.ts +0 -3
- package/plugin/build/index.js +0 -25
- package/plugin/build/ios/withRNAdgeistAppDelegate.d.ts +0 -4
- package/plugin/build/ios/withRNAdgeistAppDelegate.js +0 -66
package/plugin/build/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
|
-
const withRNAdgeistMainApplication_1 = require("./android/withRNAdgeistMainApplication");
|
|
5
|
-
const withRNAdgeistAppDelegate_1 = require("./ios/withRNAdgeistAppDelegate");
|
|
6
|
-
/**
|
|
7
|
-
* So, expo config plugin are awesome and the documentation is well written, but I still needed to look around to see
|
|
8
|
-
* how other projects actually modify the AppDelegate. I've found react-native-firebase to implement a plugin config
|
|
9
|
-
* that changes the AppDelegate, so I'll leave their link as reference:
|
|
10
|
-
* https://github.com/invertase/react-native-firebase/blob/main/packages/app/plugin/src/ios/appDelegate.ts
|
|
11
|
-
*
|
|
12
|
-
* Kudos to them, because this stuff is hard!
|
|
13
|
-
*
|
|
14
|
-
* @param config
|
|
15
|
-
*/
|
|
16
|
-
const withRNAdgeist = (config) => {
|
|
17
|
-
return (0, config_plugins_1.withPlugins)(config, [
|
|
18
|
-
//Android
|
|
19
|
-
withRNAdgeistMainApplication_1.withRNAdgeistMainApplication,
|
|
20
|
-
//iOS
|
|
21
|
-
withRNAdgeistAppDelegate_1.withRNAdgeistAppDelegate,
|
|
22
|
-
]);
|
|
23
|
-
};
|
|
24
|
-
const pak = require('@thealteroffice/react-native-adgeist/package.json');
|
|
25
|
-
exports.default = (0, config_plugins_1.createRunOncePlugin)(withRNAdgeist, pak.name, pak.version);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
export declare const withRNAdgeistAppDelegate: ConfigPlugin;
|
|
3
|
-
export declare function swiftFileUpdater(originalContents: string): string;
|
|
4
|
-
export declare function objCFileUpdater(originalContents: string): string;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withRNAdgeistAppDelegate = void 0;
|
|
4
|
-
exports.swiftFileUpdater = swiftFileUpdater;
|
|
5
|
-
exports.objCFileUpdater = objCFileUpdater;
|
|
6
|
-
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
|
-
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
8
|
-
const withRNAdgeistAppDelegate = (config) => {
|
|
9
|
-
return (0, config_plugins_1.withAppDelegate)(config, readAppDelegateFileAndUpdateContents);
|
|
10
|
-
};
|
|
11
|
-
exports.withRNAdgeistAppDelegate = withRNAdgeistAppDelegate;
|
|
12
|
-
async function readAppDelegateFileAndUpdateContents(config) {
|
|
13
|
-
const { modResults: appDelegateFile } = config;
|
|
14
|
-
const worker = getCompatibleFileUpdater(appDelegateFile.language);
|
|
15
|
-
appDelegateFile.contents = worker(appDelegateFile.contents);
|
|
16
|
-
return config;
|
|
17
|
-
}
|
|
18
|
-
function getCompatibleFileUpdater(language) {
|
|
19
|
-
switch (language) {
|
|
20
|
-
case 'objc':
|
|
21
|
-
case 'objcpp': {
|
|
22
|
-
return objCFileUpdater;
|
|
23
|
-
}
|
|
24
|
-
case 'swift':
|
|
25
|
-
return swiftFileUpdater;
|
|
26
|
-
default:
|
|
27
|
-
throw new Error(`Cannot add React Native Adgeist code to AppDelegate of language "${language}"`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function swiftFileUpdater(originalContents) {
|
|
31
|
-
const wantsToAddAnyCodeBlock = ``;
|
|
32
|
-
const rightBeforeLastClosingBrace = /didFinishLaunchingWithOptions:\s*launchOptions\)/g;
|
|
33
|
-
const pasteInTheListJustAfterTheClosingBracket = 2;
|
|
34
|
-
const results = (0, generateCode_1.mergeContents)({
|
|
35
|
-
tag: '@react-native-adgeist/implementation',
|
|
36
|
-
src: originalContents,
|
|
37
|
-
newSrc: wantsToAddAnyCodeBlock,
|
|
38
|
-
anchor: rightBeforeLastClosingBrace,
|
|
39
|
-
offset: pasteInTheListJustAfterTheClosingBracket,
|
|
40
|
-
comment: '// React Native Ageist',
|
|
41
|
-
});
|
|
42
|
-
return results.contents;
|
|
43
|
-
}
|
|
44
|
-
function objCFileUpdater(originalContents) {
|
|
45
|
-
const libraryHeaderImportCodeBlock = '#import "Adgeist.h"\n';
|
|
46
|
-
const rightBeforeAppDelegateImplementation = /@implementation\s+\w+/g;
|
|
47
|
-
const headerImportMergeResults = (0, generateCode_1.mergeContents)({
|
|
48
|
-
tag: '@react-native-adgeist/library-header-import',
|
|
49
|
-
src: originalContents,
|
|
50
|
-
newSrc: libraryHeaderImportCodeBlock,
|
|
51
|
-
anchor: rightBeforeAppDelegateImplementation,
|
|
52
|
-
offset: 0,
|
|
53
|
-
comment: '// React Native Ageist',
|
|
54
|
-
});
|
|
55
|
-
const wantsToAddAnyCodeBlock = ``;
|
|
56
|
-
const rightBeforeLastClosingEnd = /@end[^@]*$/g;
|
|
57
|
-
const implementationMergeResults = (0, generateCode_1.mergeContents)({
|
|
58
|
-
tag: '@react-native-adgeist/implementation',
|
|
59
|
-
src: headerImportMergeResults.contents,
|
|
60
|
-
newSrc: wantsToAddAnyCodeBlock,
|
|
61
|
-
anchor: rightBeforeLastClosingEnd,
|
|
62
|
-
offset: 0,
|
|
63
|
-
comment: '// React Native Ageist',
|
|
64
|
-
});
|
|
65
|
-
return implementationMergeResults.contents;
|
|
66
|
-
}
|