@antsomicorp/antsomirnsdk 0.1.0

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 (37) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +31 -0
  3. package/android/build.gradle +87 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/AndroidManifestNew.xml +2 -0
  7. package/android/src/main/java/com/antsomirnsdk/Antsomi.java +650 -0
  8. package/android/src/main/java/com/antsomirnsdk/AntsomirnsdkModule.java +33 -0
  9. package/android/src/main/java/com/antsomirnsdk/AntsomirnsdkPackage.java +28 -0
  10. package/antsomirnsdk.podspec +43 -0
  11. package/ios/Antsomirnsdk-Bridging-Header.h +7 -0
  12. package/ios/Antsomirnsdk.mm +64 -0
  13. package/ios/Antsomirnsdk.swift +267 -0
  14. package/ios/EventEmitter.swift +39 -0
  15. package/ios/ReactNativeEventEmitter.swift +42 -0
  16. package/lib/commonjs/events/events.js +14 -0
  17. package/lib/commonjs/events/events.js.map +1 -0
  18. package/lib/commonjs/events/helpers.js +14 -0
  19. package/lib/commonjs/events/helpers.js.map +1 -0
  20. package/lib/commonjs/index.js +122 -0
  21. package/lib/commonjs/index.js.map +1 -0
  22. package/lib/module/events/events.js +8 -0
  23. package/lib/module/events/events.js.map +1 -0
  24. package/lib/module/events/helpers.js +8 -0
  25. package/lib/module/events/helpers.js.map +1 -0
  26. package/lib/module/index.js +115 -0
  27. package/lib/module/index.js.map +1 -0
  28. package/lib/typescript/src/events/events.d.ts +7 -0
  29. package/lib/typescript/src/events/events.d.ts.map +1 -0
  30. package/lib/typescript/src/events/helpers.d.ts +3 -0
  31. package/lib/typescript/src/events/helpers.d.ts.map +1 -0
  32. package/lib/typescript/src/index.d.ts +70 -0
  33. package/lib/typescript/src/index.d.ts.map +1 -0
  34. package/package.json +165 -0
  35. package/src/events/events.ts +14 -0
  36. package/src/events/helpers.ts +11 -0
  37. package/src/index.tsx +194 -0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 KhanhHV
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # antsomirnsdk
2
+
3
+ Antsomi Reat Native SDK
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install antsomirnsdk
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import { multiply } from 'antsomirnsdk';
15
+
16
+ // ...
17
+
18
+ const result = await multiply(3, 7);
19
+ ```
20
+
21
+ ## Contributing
22
+
23
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
24
+
25
+ ## License
26
+
27
+ MIT
28
+
29
+ ---
30
+
31
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -0,0 +1,87 @@
1
+ buildscript {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ }
6
+
7
+ dependencies {
8
+ classpath "com.android.tools.build:gradle:7.2.1"
9
+ }
10
+ }
11
+
12
+ def isNewArchitectureEnabled() {
13
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
14
+ }
15
+
16
+ apply plugin: "com.android.library"
17
+
18
+ if (isNewArchitectureEnabled()) {
19
+ apply plugin: "com.facebook.react"
20
+ }
21
+
22
+ def getExtOrDefault(name) {
23
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["Antsomirnsdk_" + name]
24
+ }
25
+
26
+ def getExtOrIntegerDefault(name) {
27
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Antsomirnsdk_" + name]).toInteger()
28
+ }
29
+
30
+ def supportsNamespace() {
31
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
32
+ def major = parsed[0].toInteger()
33
+ def minor = parsed[1].toInteger()
34
+
35
+ // Namespace support was added in 7.3.0
36
+ return (major == 7 && minor >= 3) || major >= 8
37
+ }
38
+
39
+ android {
40
+ if (supportsNamespace()) {
41
+ namespace "com.antsomirnsdk"
42
+
43
+ sourceSets {
44
+ main {
45
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
46
+ }
47
+ }
48
+ }
49
+
50
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
51
+
52
+ defaultConfig {
53
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
54
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
55
+
56
+ }
57
+
58
+ buildTypes {
59
+ release {
60
+ minifyEnabled false
61
+ }
62
+ }
63
+
64
+ lintOptions {
65
+ disable "GradleCompatible"
66
+ }
67
+
68
+ compileOptions {
69
+ sourceCompatibility JavaVersion.VERSION_1_8
70
+ targetCompatibility JavaVersion.VERSION_1_8
71
+ }
72
+ }
73
+
74
+ repositories {
75
+ mavenCentral()
76
+ google()
77
+ }
78
+
79
+
80
+ dependencies {
81
+ // For < 0.71, this will be from the local maven repo
82
+ // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
83
+ //noinspection GradleDynamicVersion
84
+ implementation "com.facebook.react:react-native:+"
85
+ implementation "com.antsomi:antsomi:1.1.38"
86
+ }
87
+
@@ -0,0 +1,5 @@
1
+ Antsomirnsdk_kotlinVersion=1.7.0
2
+ Antsomirnsdk_minSdkVersion=21
3
+ Antsomirnsdk_targetSdkVersion=31
4
+ Antsomirnsdk_compileSdkVersion=31
5
+ Antsomirnsdk_ndkversion=21.4.7075529
@@ -0,0 +1,3 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.antsomirnsdk">
3
+ </manifest>
@@ -0,0 +1,2 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ </manifest>