@developer_tribe/react-native-comnyx 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 (127) hide show
  1. package/.editorconfig +15 -0
  2. package/.gitattributes +3 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yml +68 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. package/.github/actions/setup/action.yml +36 -0
  6. package/.github/workflows/ci.yml +165 -0
  7. package/.gitignore +86 -0
  8. package/.idea/.gitignore +8 -0
  9. package/.idea/codeStyles/Project.xml +59 -0
  10. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  11. package/.idea/comnyx-rn.iml +12 -0
  12. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  13. package/.idea/modules.xml +8 -0
  14. package/.idea/prettier.xml +6 -0
  15. package/.idea/vcs.xml +6 -0
  16. package/.idea/workspace.xml +71 -0
  17. package/.nvmrc +1 -0
  18. package/.watchmanconfig +1 -0
  19. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
  20. package/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +28 -0
  21. package/.yarn/releases/yarn-3.6.1.cjs +874 -0
  22. package/.yarnrc.yml +10 -0
  23. package/CODE_OF_CONDUCT.md +133 -0
  24. package/CONTRIBUTING.md +130 -0
  25. package/Comnyx.podspec +26 -0
  26. package/LICENSE +20 -0
  27. package/README.md +33 -0
  28. package/android/build.gradle +100 -0
  29. package/android/generated/java/com/comnyx/NativeComnyxSpec.java +37 -0
  30. package/android/generated/jni/CMakeLists.txt +36 -0
  31. package/android/generated/jni/RNComnyxSpec-generated.cpp +32 -0
  32. package/android/generated/jni/RNComnyxSpec.h +31 -0
  33. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +28 -0
  34. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +71 -0
  35. package/android/gradle.properties +5 -0
  36. package/android/src/main/AndroidManifest.xml +3 -0
  37. package/android/src/main/AndroidManifestNew.xml +2 -0
  38. package/android/src/main/java/com/comnyx/ComnyxModule.kt +23 -0
  39. package/android/src/main/java/com/comnyx/ComnyxPackage.kt +33 -0
  40. package/babel.config.js +3 -0
  41. package/example/.bundle/config +2 -0
  42. package/example/.watchmanconfig +1 -0
  43. package/example/Gemfile +10 -0
  44. package/example/README.md +97 -0
  45. package/example/android/app/build.gradle +133 -0
  46. package/example/android/app/debug.keystore +0 -0
  47. package/example/android/app/proguard-rules.pro +10 -0
  48. package/example/android/app/src/debug/AndroidManifest.xml +9 -0
  49. package/example/android/app/src/main/AndroidManifest.xml +26 -0
  50. package/example/android/app/src/main/java/comnyx/example/MainActivity.kt +22 -0
  51. package/example/android/app/src/main/java/comnyx/example/MainApplication.kt +44 -0
  52. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  53. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  54. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  55. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  56. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  57. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  58. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  59. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  60. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  61. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  62. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  63. package/example/android/app/src/main/res/values/strings.xml +3 -0
  64. package/example/android/app/src/main/res/values/styles.xml +9 -0
  65. package/example/android/build.gradle +21 -0
  66. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  67. package/example/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  68. package/example/android/gradle.properties +39 -0
  69. package/example/android/gradlew +251 -0
  70. package/example/android/gradlew.bat +94 -0
  71. package/example/android/settings.gradle +6 -0
  72. package/example/app.json +4 -0
  73. package/example/babel.config.js +12 -0
  74. package/example/index.js +5 -0
  75. package/example/ios/.xcode.env +11 -0
  76. package/example/ios/ComnyxExample/AppDelegate.swift +30 -0
  77. package/example/ios/ComnyxExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  78. package/example/ios/ComnyxExample/Images.xcassets/Contents.json +6 -0
  79. package/example/ios/ComnyxExample/Info.plist +52 -0
  80. package/example/ios/ComnyxExample/LaunchScreen.storyboard +47 -0
  81. package/example/ios/ComnyxExample/PrivacyInfo.xcprivacy +37 -0
  82. package/example/ios/ComnyxExample.xcodeproj/project.pbxproj +505 -0
  83. package/example/ios/ComnyxExample.xcodeproj/xcshareddata/xcschemes/ComnyxExample.xcscheme +88 -0
  84. package/example/ios/Podfile +43 -0
  85. package/example/jest.config.js +3 -0
  86. package/example/metro.config.js +18 -0
  87. package/example/package.json +31 -0
  88. package/example/react-native.config.js +21 -0
  89. package/example/src/App.tsx +20 -0
  90. package/ios/Comnyx.h +6 -0
  91. package/ios/Comnyx.mm +18 -0
  92. package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +39 -0
  93. package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +63 -0
  94. package/ios/generated/RNComnyxSpecJSI-generated.cpp +28 -0
  95. package/ios/generated/RNComnyxSpecJSI.h +71 -0
  96. package/lefthook.yml +14 -0
  97. package/lib/commonjs/NativeComnyx.ts +8 -0
  98. package/lib/commonjs/index.js +12 -0
  99. package/lib/commonjs/index.js.map +1 -0
  100. package/lib/commonjs/package.json +1 -0
  101. package/lib/module/NativeComnyx.ts +8 -0
  102. package/lib/module/index.js +7 -0
  103. package/lib/module/index.js.map +1 -0
  104. package/lib/module/package.json +1 -0
  105. package/lib/typescript/commonjs/package.json +1 -0
  106. package/lib/typescript/commonjs/src/NativeComnyx.d.ts +7 -0
  107. package/lib/typescript/commonjs/src/NativeComnyx.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/src/__tests__/index.test.d.ts +1 -0
  109. package/lib/typescript/commonjs/src/__tests__/index.test.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/src/index.d.ts +2 -0
  111. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  112. package/lib/typescript/module/package.json +1 -0
  113. package/lib/typescript/module/src/NativeComnyx.d.ts +7 -0
  114. package/lib/typescript/module/src/NativeComnyx.d.ts.map +1 -0
  115. package/lib/typescript/module/src/__tests__/index.test.d.ts +1 -0
  116. package/lib/typescript/module/src/__tests__/index.test.d.ts.map +1 -0
  117. package/lib/typescript/module/src/index.d.ts +2 -0
  118. package/lib/typescript/module/src/index.d.ts.map +1 -0
  119. package/package.json +203 -0
  120. package/react-native.config.js +12 -0
  121. package/src/NativeComnyx.ts +8 -0
  122. package/src/__tests__/index.test.tsx +1 -0
  123. package/src/index.tsx +5 -0
  124. package/tsconfig.build.json +4 -0
  125. package/tsconfig.json +30 -0
  126. package/turbo.json +36 -0
  127. package/yarn.lock +9251 -0
@@ -0,0 +1,21 @@
1
+ const path = require('path');
2
+ const pkg = require('../package.json');
3
+
4
+ module.exports = {
5
+ project: {
6
+ ios: {
7
+ automaticPodsInstallation: true,
8
+ },
9
+ },
10
+ dependencies: {
11
+ [pkg.name]: {
12
+ root: path.join(__dirname, '..'),
13
+ platforms: {
14
+ // Codegen script incorrectly fails without this
15
+ // So we explicitly specify the platforms with empty object
16
+ ios: {},
17
+ android: {},
18
+ },
19
+ },
20
+ },
21
+ };
@@ -0,0 +1,20 @@
1
+ import { Text, View, StyleSheet } from 'react-native';
2
+ import { multiply } from 'react-native-comnyx';
3
+
4
+ const result = multiply(3, 7);
5
+
6
+ export default function App() {
7
+ return (
8
+ <View style={styles.container}>
9
+ <Text>Result: {result}</Text>
10
+ </View>
11
+ );
12
+ }
13
+
14
+ const styles = StyleSheet.create({
15
+ container: {
16
+ flex: 1,
17
+ alignItems: 'center',
18
+ justifyContent: 'center',
19
+ },
20
+ });
package/ios/Comnyx.h ADDED
@@ -0,0 +1,6 @@
1
+
2
+ #import "generated/RNComnyxSpec/RNComnyxSpec.h"
3
+
4
+ @interface Comnyx : NSObject <NativeComnyxSpec>
5
+
6
+ @end
package/ios/Comnyx.mm ADDED
@@ -0,0 +1,18 @@
1
+ #import "Comnyx.h"
2
+
3
+ @implementation Comnyx
4
+ RCT_EXPORT_MODULE()
5
+
6
+ - (NSNumber *)multiply:(double)a b:(double)b {
7
+ NSNumber *result = @(a * b);
8
+
9
+ return result;
10
+ }
11
+
12
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
13
+ (const facebook::react::ObjCTurboModule::InitParams &)params
14
+ {
15
+ return std::make_shared<facebook::react::NativeComnyxSpecJSI>(params);
16
+ }
17
+
18
+ @end
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "RNComnyxSpec.h"
15
+
16
+
17
+ @implementation NativeComnyxSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+
27
+ namespace facebook::react {
28
+
29
+ static facebook::jsi::Value __hostFunction_NativeComnyxSpecJSI_multiply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
30
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, NumberKind, "multiply", @selector(multiply:b:), args, count);
31
+ }
32
+
33
+ NativeComnyxSpecJSI::NativeComnyxSpecJSI(const ObjCTurboModule::InitParams &params)
34
+ : ObjCTurboModule(params) {
35
+
36
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxSpecJSI_multiply};
37
+
38
+ }
39
+ } // namespace facebook::react
@@ -0,0 +1,63 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of RNComnyxSpec symbols
19
+ #ifndef RNComnyxSpec_H
20
+ #define RNComnyxSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeComnyxSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (NSNumber *)multiply:(double)a
39
+ b:(double)b;
40
+
41
+ @end
42
+
43
+ @interface NativeComnyxSpecBase : NSObject {
44
+ @protected
45
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
46
+ }
47
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
48
+
49
+
50
+ @end
51
+
52
+ namespace facebook::react {
53
+ /**
54
+ * ObjC++ class for module 'NativeComnyx'
55
+ */
56
+ class JSI_EXPORT NativeComnyxSpecJSI : public ObjCTurboModule {
57
+ public:
58
+ NativeComnyxSpecJSI(const ObjCTurboModule::InitParams &params);
59
+ };
60
+ } // namespace facebook::react
61
+
62
+ NS_ASSUME_NONNULL_END
63
+ #endif // RNComnyxSpec_H
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "RNComnyxSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeComnyxCxxSpecJSI_multiply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeComnyxCxxSpecJSI *>(&turboModule)->multiply(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
18
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
19
+ );
20
+ }
21
+
22
+ NativeComnyxCxxSpecJSI::NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
23
+ : TurboModule("Comnyx", jsInvoker) {
24
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxCxxSpecJSI_multiply};
25
+ }
26
+
27
+
28
+ } // namespace facebook::react
@@ -0,0 +1,71 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ class JSI_EXPORT NativeComnyxCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual double multiply(jsi::Runtime &rt, double a, double b) = 0;
24
+
25
+ };
26
+
27
+ template <typename T>
28
+ class JSI_EXPORT NativeComnyxCxxSpec : public TurboModule {
29
+ public:
30
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
31
+ return delegate_.create(rt, propName);
32
+ }
33
+
34
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
35
+ return delegate_.getPropertyNames(runtime);
36
+ }
37
+
38
+ static constexpr std::string_view kModuleName = "Comnyx";
39
+
40
+ protected:
41
+ NativeComnyxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
42
+ : TurboModule(std::string{NativeComnyxCxxSpec::kModuleName}, jsInvoker),
43
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
44
+
45
+
46
+ private:
47
+ class Delegate : public NativeComnyxCxxSpecJSI {
48
+ public:
49
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
50
+ NativeComnyxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
51
+
52
+ }
53
+
54
+ double multiply(jsi::Runtime &rt, double a, double b) override {
55
+ static_assert(
56
+ bridging::getParameterCount(&T::multiply) == 3,
57
+ "Expected multiply(...) to have 3 parameters");
58
+
59
+ return bridging::callFromJs<double>(
60
+ rt, &T::multiply, jsInvoker_, instance_, std::move(a), std::move(b));
61
+ }
62
+
63
+ private:
64
+ friend class NativeComnyxCxxSpec;
65
+ T *instance_;
66
+ };
67
+
68
+ Delegate delegate_;
69
+ };
70
+
71
+ } // namespace facebook::react
package/lefthook.yml ADDED
@@ -0,0 +1,14 @@
1
+ pre-commit:
2
+ parallel: true
3
+ commands:
4
+ lint:
5
+ glob: "*.{js,ts,jsx,tsx}"
6
+ run: npx eslint {staged_files}
7
+ types:
8
+ glob: "*.{js,ts, jsx, tsx}"
9
+ run: npx tsc
10
+ commit-msg:
11
+ parallel: true
12
+ commands:
13
+ commitlint:
14
+ run: npx commitlint --edit
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ multiply(a: number, b: number): number;
6
+ }
7
+
8
+ export default TurboModuleRegistry.getEnforcing<Spec>('Comnyx');
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.multiply = multiply;
7
+ var _NativeComnyx = _interopRequireDefault(require("./NativeComnyx"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function multiply(a, b) {
10
+ return _NativeComnyx.default.multiply(a, b);
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_NativeComnyx","_interopRequireDefault","require","e","__esModule","default","multiply","a","b","Comnyx"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7B,SAASG,QAAQA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACrD,OAAOC,qBAAM,CAACH,QAAQ,CAACC,CAAC,EAAEC,CAAC,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ multiply(a: number, b: number): number;
6
+ }
7
+
8
+ export default TurboModuleRegistry.getEnforcing<Spec>('Comnyx');
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ import Comnyx from './NativeComnyx';
4
+ export function multiply(a, b) {
5
+ return Comnyx.multiply(a, b);
6
+ }
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Comnyx","multiply","a","b"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,gBAAgB;AAEnC,OAAO,SAASC,QAAQA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACrD,OAAOH,MAAM,CAACC,QAAQ,CAACC,CAAC,EAAEC,CAAC,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,7 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ multiply(a: number, b: number): number;
4
+ }
5
+ declare const _default: Spec;
6
+ export default _default;
7
+ //# sourceMappingURL=NativeComnyx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeComnyx.d.ts","sourceRoot":"","sources":["../../../../src/NativeComnyx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;;AAED,wBAAgE"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function multiply(a: number, b: number): number;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,7 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ multiply(a: number, b: number): number;
4
+ }
5
+ declare const _default: Spec;
6
+ export default _default;
7
+ //# sourceMappingURL=NativeComnyx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeComnyx.d.ts","sourceRoot":"","sources":["../../../../src/NativeComnyx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;;AAED,wBAAgE"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function multiply(a: number, b: number): number;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD"}
package/package.json ADDED
@@ -0,0 +1,203 @@
1
+ {
2
+ "name": "@developer_tribe/react-native-comnyx",
3
+ "version": "0.1.0",
4
+ "description": "React Native chat component with integrated support panel, enabling real-time customer communication and efficient agent workflow management.",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/commonjs/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./lib/typescript/module/src/index.d.ts",
12
+ "default": "./lib/module/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
16
+ "default": "./lib/commonjs/index.js"
17
+ }
18
+ }
19
+ },
20
+ "files": [
21
+ "src",
22
+ "lib",
23
+ "android",
24
+ "ios",
25
+ "cpp",
26
+ "*.podspec",
27
+ "react-native.config.js",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!**/__tests__",
35
+ "!**/__fixtures__",
36
+ "!**/__mocks__",
37
+ "!**/.*"
38
+ ],
39
+ "scripts": {
40
+ "test": "jest",
41
+ "typecheck": "tsc",
42
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
43
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
44
+ "prepare": "bob build",
45
+ "release": "release-it"
46
+ },
47
+ "keywords": [
48
+ "react-native",
49
+ "ios",
50
+ "android"
51
+ ],
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://www.npmjs.com.git"
55
+ },
56
+ "author": "tribe <sefa.demir@tribe.us> (https://www.npmjs.com)",
57
+ "license": "MIT",
58
+ "bugs": {
59
+ "url": "https://www.npmjs.com/issues"
60
+ },
61
+ "homepage": "https://www.npmjs.com#readme",
62
+ "publishConfig": {
63
+ "registry": "https://registry.npmjs.org/"
64
+ },
65
+ "devDependencies": {
66
+ "@commitlint/config-conventional": "^19.6.0",
67
+ "@evilmartians/lefthook": "^1.5.0",
68
+ "@react-native-community/cli": "15.0.1",
69
+ "@react-native/eslint-config": "^0.73.1",
70
+ "@release-it/conventional-changelog": "^9.0.2",
71
+ "@types/jest": "^29.5.5",
72
+ "@types/react": "^18.2.44",
73
+ "commitlint": "^19.6.1",
74
+ "del-cli": "^5.1.0",
75
+ "eslint": "^8.51.0",
76
+ "eslint-config-prettier": "^9.0.0",
77
+ "eslint-plugin-prettier": "^5.0.1",
78
+ "jest": "^29.7.0",
79
+ "prettier": "^3.0.3",
80
+ "react": "19.0.0",
81
+ "react-native": "0.78.1",
82
+ "react-native-builder-bob": "^0.38.3",
83
+ "release-it": "^17.10.0",
84
+ "turbo": "^1.10.7",
85
+ "typescript": "^5.2.2"
86
+ },
87
+ "resolutions": {
88
+ "@types/react": "^18.2.44"
89
+ },
90
+ "peerDependencies": {
91
+ "react": "*",
92
+ "react-native": "*"
93
+ },
94
+ "packageManager": "yarn@3.6.1",
95
+ "jest": {
96
+ "preset": "react-native",
97
+ "modulePathIgnorePatterns": [
98
+ "<rootDir>/example/node_modules",
99
+ "<rootDir>/lib/"
100
+ ]
101
+ },
102
+ "commitlint": {
103
+ "extends": [
104
+ "@commitlint/config-conventional"
105
+ ]
106
+ },
107
+ "release-it": {
108
+ "git": {
109
+ "commitMessage": "chore: release ${version}",
110
+ "tagName": "v${version}"
111
+ },
112
+ "npm": {
113
+ "publish": true
114
+ },
115
+ "github": {
116
+ "release": true
117
+ },
118
+ "plugins": {
119
+ "@release-it/conventional-changelog": {
120
+ "preset": {
121
+ "name": "angular"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "eslintConfig": {
127
+ "root": true,
128
+ "extends": [
129
+ "@react-native",
130
+ "prettier"
131
+ ],
132
+ "rules": {
133
+ "react/react-in-jsx-scope": "off",
134
+ "prettier/prettier": [
135
+ "error",
136
+ {
137
+ "quoteProps": "consistent",
138
+ "singleQuote": true,
139
+ "tabWidth": 2,
140
+ "trailingComma": "es5",
141
+ "useTabs": false
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ "eslintIgnore": [
147
+ "node_modules/",
148
+ "lib/"
149
+ ],
150
+ "prettier": {
151
+ "quoteProps": "consistent",
152
+ "singleQuote": true,
153
+ "tabWidth": 2,
154
+ "trailingComma": "es5",
155
+ "useTabs": false
156
+ },
157
+ "react-native-builder-bob": {
158
+ "source": "src",
159
+ "output": "lib",
160
+ "targets": [
161
+ "codegen",
162
+ [
163
+ "commonjs",
164
+ {
165
+ "esm": true
166
+ }
167
+ ],
168
+ [
169
+ "module",
170
+ {
171
+ "esm": true
172
+ }
173
+ ],
174
+ [
175
+ "typescript",
176
+ {
177
+ "project": "tsconfig.build.json"
178
+ }
179
+ ]
180
+ ]
181
+ },
182
+ "codegenConfig": {
183
+ "name": "RNComnyxSpec",
184
+ "type": "modules",
185
+ "jsSrcsDir": "src",
186
+ "outputDir": {
187
+ "ios": "ios/generated",
188
+ "android": "android/generated"
189
+ },
190
+ "android": {
191
+ "javaPackageName": "com.comnyx"
192
+ },
193
+ "includesGeneratedCode": true
194
+ },
195
+ "create-react-native-library": {
196
+ "type": "turbo-module",
197
+ "languages": "kotlin-objc",
198
+ "version": "0.48.6"
199
+ },
200
+ "engines": {
201
+ "node": ">=22.0.0"
202
+ }
203
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @type {import('@react-native-community/cli-types').UserDependencyConfig}
3
+ */
4
+ module.exports = {
5
+ dependency: {
6
+ platforms: {
7
+ android: {
8
+ cmakeListsPath: 'generated/jni/CMakeLists.txt',
9
+ },
10
+ },
11
+ },
12
+ };
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ multiply(a: number, b: number): number;
6
+ }
7
+
8
+ export default TurboModuleRegistry.getEnforcing<Spec>('Comnyx');
@@ -0,0 +1 @@
1
+ it.todo('write a test');
package/src/index.tsx ADDED
@@ -0,0 +1,5 @@
1
+ import Comnyx from './NativeComnyx';
2
+
3
+ export function multiply(a: number, b: number): number {
4
+ return Comnyx.multiply(a, b);
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig",
3
+ "exclude": ["example", "lib"]
4
+ }