@rusaint/react-native 0.11.5 → 0.13.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 (43) hide show
  1. package/RusaintReactNative.podspec +44 -0
  2. package/android/CMakeLists.txt +3 -4
  3. package/android/build.gradle +1 -0
  4. package/android/src/main/jniLibs/arm64-v8a/librusaint_ffi.a +0 -0
  5. package/android/src/main/jniLibs/armeabi-v7a/librusaint_ffi.a +0 -0
  6. package/android/src/main/jniLibs/x86/librusaint_ffi.a +0 -0
  7. package/android/src/main/jniLibs/x86_64/librusaint_ffi.a +0 -0
  8. package/build/RusaintReactNative.xcframework/Info.plist +4 -4
  9. package/build/RusaintReactNative.xcframework/_CodeSignature/CodeDirectory +0 -0
  10. package/build/RusaintReactNative.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  11. package/build/RusaintReactNative.xcframework/_CodeSignature/CodeResources +6 -6
  12. package/build/RusaintReactNative.xcframework/_CodeSignature/CodeSignature +0 -0
  13. package/build/RusaintReactNative.xcframework/ios-arm64/librusaint_ffi.a +0 -0
  14. package/build/RusaintReactNative.xcframework/ios-arm64-simulator/librusaint_ffi.a +0 -0
  15. package/lib/commonjs/generated/rusaint.js +39 -35
  16. package/lib/commonjs/generated/rusaint.js.map +1 -1
  17. package/lib/commonjs/generated/rusaint_ffi.js +598 -559
  18. package/lib/commonjs/generated/rusaint_ffi.js.map +1 -1
  19. package/lib/commonjs/index.js +11 -1
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/module/generated/rusaint.js +39 -35
  22. package/lib/module/generated/rusaint.js.map +1 -1
  23. package/lib/module/generated/rusaint_ffi.js +598 -559
  24. package/lib/module/generated/rusaint_ffi.js.map +1 -1
  25. package/lib/module/index.js +7 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/typescript/commonjs/src/generated/rusaint.d.ts +1 -1
  28. package/lib/typescript/commonjs/src/generated/rusaint.d.ts.map +1 -1
  29. package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts +89 -1
  30. package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts.map +1 -1
  31. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  32. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  33. package/lib/typescript/module/src/generated/rusaint.d.ts +1 -1
  34. package/lib/typescript/module/src/generated/rusaint.d.ts.map +1 -1
  35. package/lib/typescript/module/src/generated/rusaint_ffi.d.ts +89 -1
  36. package/lib/typescript/module/src/generated/rusaint_ffi.d.ts.map +1 -1
  37. package/lib/typescript/module/src/index.d.ts +1 -0
  38. package/lib/typescript/module/src/index.d.ts.map +1 -1
  39. package/package.json +19 -19
  40. package/rusaint-react-native.podspec +1 -1
  41. package/src/generated/rusaint.ts +68 -64
  42. package/src/generated/rusaint_ffi.ts +1186 -1133
  43. package/src/index.tsx +7 -0
@@ -0,0 +1,44 @@
1
+ # Generated by uniffi-bindgen-react-native
2
+ require "json"
3
+
4
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
5
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
6
+
7
+ Pod::Spec.new do |s|
8
+ s.name = "RusaintReactNative"
9
+ s.version = package["version"]
10
+ s.summary = package["description"]
11
+ s.homepage = package["homepage"]
12
+ s.license = package["license"]
13
+ s.authors = package["author"]
14
+
15
+ s.platforms = { :ios => min_ios_version_supported }
16
+ s.source = { :git => "https://github.com/EATSTEAK/rusaint.git", :tag => "#{s.version}" }
17
+
18
+ s.source_files = "ios/**/*.{h,m,mm,swift}", "ios/generated/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}", "cpp/generated/**/*.{hpp,cpp,c,h}"
19
+ s.vendored_frameworks = "build/RusaintReactNative.xcframework"
20
+ s.dependency "uniffi-bindgen-react-native", "0.29.3-1"
21
+
22
+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23
+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
24
+ if respond_to?(:install_modules_dependencies, true)
25
+ install_modules_dependencies(s)
26
+ else
27
+ s.dependency "React-Core"
28
+
29
+ # Don't install the dependencies when we run `pod install` in the old architecture.
30
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
31
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
32
+ s.pod_target_xcconfig = {
33
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
34
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
35
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
36
+ }
37
+ s.dependency "React-Codegen"
38
+ s.dependency "RCT-Folly"
39
+ s.dependency "RCTRequired"
40
+ s.dependency "RCTTypeSafety"
41
+ s.dependency "ReactCommon/turbomodule/core"
42
+ end
43
+ end
44
+ end
@@ -11,10 +11,9 @@ execute_process(
11
11
  OUTPUT_VARIABLE UNIFFI_BINDGEN_PATH
12
12
  OUTPUT_STRIP_TRAILING_WHITESPACE
13
13
  )
14
- string(REGEX
15
- REPLACE "/package\\.json$" ""
16
- UNIFFI_BINDGEN_PATH ${UNIFFI_BINDGEN_PATH}
17
- )
14
+ # Get the directory; get_filename_component and cmake_path will normalize
15
+ # paths with Windows path separators.
16
+ get_filename_component(UNIFFI_BINDGEN_PATH "${UNIFFI_BINDGEN_PATH}" DIRECTORY)
18
17
 
19
18
  # Specifies a path to native header files.
20
19
  include_directories(
@@ -67,6 +67,7 @@ android {
67
67
  minSdkVersion getExtOrIntegerDefault("minSdkVersion")
68
68
  targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
69
69
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
70
+ consumerProguardFiles 'proguard-rules.pro'
70
71
 
71
72
  buildFeatures {
72
73
  prefab true
@@ -8,7 +8,7 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>librusaint_ffi.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64-simulator</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>librusaint_ffi.a</string>
14
14
  <key>SupportedArchitectures</key>
@@ -17,14 +17,12 @@
17
17
  </array>
18
18
  <key>SupportedPlatform</key>
19
19
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
20
  </dict>
23
21
  <dict>
24
22
  <key>BinaryPath</key>
25
23
  <string>librusaint_ffi.a</string>
26
24
  <key>LibraryIdentifier</key>
27
- <string>ios-arm64</string>
25
+ <string>ios-arm64-simulator</string>
28
26
  <key>LibraryPath</key>
29
27
  <string>librusaint_ffi.a</string>
30
28
  <key>SupportedArchitectures</key>
@@ -33,6 +31,8 @@
33
31
  </array>
34
32
  <key>SupportedPlatform</key>
35
33
  <string>ios</string>
34
+ <key>SupportedPlatformVariant</key>
35
+ <string>simulator</string>
36
36
  </dict>
37
37
  </array>
38
38
  <key>CFBundlePackageType</key>
@@ -6,11 +6,11 @@
6
6
  <dict>
7
7
  <key>ios-arm64-simulator/librusaint_ffi.a</key>
8
8
  <data>
9
- rxRUQMINgJIu7e87BeW1o3Q2HPE=
9
+ CRTTHgcW4dDq9a/FjS7ogRM21JA=
10
10
  </data>
11
11
  <key>ios-arm64/librusaint_ffi.a</key>
12
12
  <data>
13
- nXwS/5oa+gjo5+XcBCh2C+Mw29k=
13
+ jVrayJupjiY7d7mh4Xb+c+COW/s=
14
14
  </data>
15
15
  </dict>
16
16
  <key>files2</key>
@@ -19,22 +19,22 @@
19
19
  <dict>
20
20
  <key>hash</key>
21
21
  <data>
22
- rxRUQMINgJIu7e87BeW1o3Q2HPE=
22
+ CRTTHgcW4dDq9a/FjS7ogRM21JA=
23
23
  </data>
24
24
  <key>hash2</key>
25
25
  <data>
26
- 1+mnUXn37KNdsDUusjkppwhqQhsEkawQK9kFWDhF8zA=
26
+ IMOZqYP7u91B5tCcee8o773fNIAbF0GegzhLIQgFu9g=
27
27
  </data>
28
28
  </dict>
29
29
  <key>ios-arm64/librusaint_ffi.a</key>
30
30
  <dict>
31
31
  <key>hash</key>
32
32
  <data>
33
- nXwS/5oa+gjo5+XcBCh2C+Mw29k=
33
+ jVrayJupjiY7d7mh4Xb+c+COW/s=
34
34
  </data>
35
35
  <key>hash2</key>
36
36
  <data>
37
- fjR7D8x6V0kys6atBKrXv71LQMz5ELYFX9nIpGXcwE4=
37
+ MhpP35Y+OdJllMZMH224v60w+RMIo1nr1riuwx7fpP8=
38
38
  </data>
39
39
  </dict>
40
40
  </dict>
@@ -11,7 +11,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
11
11
  // Trust me, you don't want to mess with it!
12
12
 
13
13
  // Get converters from the other files, if any.
14
- const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller();
14
+ const uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(() => ({
15
+ code: 0
16
+ }));
15
17
  const uniffiIsDebug =
16
18
  // @ts-ignore -- The process global might not be defined
17
19
  typeof process !== 'object' ||
@@ -466,7 +468,7 @@ const FfiConverterTypeGraduationRequirement = (() => {
466
468
  return {
467
469
  name: FfiConverterString.read(from),
468
470
  requirement: FfiConverterOptionalUInt32.read(from),
469
- calcuation: FfiConverterOptionalFloat32.read(from),
471
+ calculation: FfiConverterOptionalFloat32.read(from),
470
472
  difference: FfiConverterOptionalFloat32.read(from),
471
473
  result: _uniffiBindgenReactNative.FfiConverterBool.read(from),
472
474
  category: FfiConverterString.read(from),
@@ -476,14 +478,14 @@ const FfiConverterTypeGraduationRequirement = (() => {
476
478
  write(value, into) {
477
479
  FfiConverterString.write(value.name, into);
478
480
  FfiConverterOptionalUInt32.write(value.requirement, into);
479
- FfiConverterOptionalFloat32.write(value.calcuation, into);
481
+ FfiConverterOptionalFloat32.write(value.calculation, into);
480
482
  FfiConverterOptionalFloat32.write(value.difference, into);
481
483
  _uniffiBindgenReactNative.FfiConverterBool.write(value.result, into);
482
484
  FfiConverterString.write(value.category, into);
483
485
  FfiConverterArrayString.write(value.lectures, into);
484
486
  }
485
487
  allocationSize(value) {
486
- return FfiConverterString.allocationSize(value.name) + FfiConverterOptionalUInt32.allocationSize(value.requirement) + FfiConverterOptionalFloat32.allocationSize(value.calcuation) + FfiConverterOptionalFloat32.allocationSize(value.difference) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.result) + FfiConverterString.allocationSize(value.category) + FfiConverterArrayString.allocationSize(value.lectures);
488
+ return FfiConverterString.allocationSize(value.name) + FfiConverterOptionalUInt32.allocationSize(value.requirement) + FfiConverterOptionalFloat32.allocationSize(value.calculation) + FfiConverterOptionalFloat32.allocationSize(value.difference) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.result) + FfiConverterString.allocationSize(value.category) + FfiConverterArrayString.allocationSize(value.lectures);
487
489
  }
488
490
  }
489
491
  return new FFIConverter();
@@ -3044,37 +3046,39 @@ class LectureCategoryBuilder extends _uniffiBindgenReactNative.UniffiAbstractObj
3044
3046
  }
3045
3047
  }
3046
3048
  exports.LectureCategoryBuilder = LectureCategoryBuilder;
3047
- const uniffiTypeLectureCategoryBuilderObjectFactory = {
3048
- create(pointer) {
3049
- const instance = Object.create(LectureCategoryBuilder.prototype);
3050
- instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3051
- instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
3052
- instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'LectureCategoryBuilder';
3053
- return instance;
3054
- },
3055
- bless(p) {
3056
- return uniffiCaller.rustCall(/*caller:*/status => (0, _rusaintFfi.default)().ubrn_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
3057
- },
3058
- unbless(ptr) {
3059
- ptr.markDestroyed();
3060
- },
3061
- pointer(obj) {
3062
- if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
3063
- throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
3064
- }
3065
- return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
3066
- },
3067
- clonePointer(obj) {
3068
- const pointer = this.pointer(obj);
3069
- return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _rusaintFfi.default)().ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3070
- },
3071
- freePointer(pointer) {
3072
- uniffiCaller.rustCall(/*caller:*/callStatus => (0, _rusaintFfi.default)().ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3073
- },
3074
- isConcreteType(obj) {
3075
- return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'LectureCategoryBuilder';
3076
- }
3077
- };
3049
+ const uniffiTypeLectureCategoryBuilderObjectFactory = (() => {
3050
+ return {
3051
+ create(pointer) {
3052
+ const instance = Object.create(LectureCategoryBuilder.prototype);
3053
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3054
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
3055
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'LectureCategoryBuilder';
3056
+ return instance;
3057
+ },
3058
+ bless(p) {
3059
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _rusaintFfi.default)().ubrn_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
3060
+ },
3061
+ unbless(ptr) {
3062
+ ptr.markDestroyed();
3063
+ },
3064
+ pointer(obj) {
3065
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
3066
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
3067
+ }
3068
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
3069
+ },
3070
+ clonePointer(obj) {
3071
+ const pointer = this.pointer(obj);
3072
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _rusaintFfi.default)().ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3073
+ },
3074
+ freePointer(pointer) {
3075
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _rusaintFfi.default)().ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3076
+ },
3077
+ isConcreteType(obj) {
3078
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'LectureCategoryBuilder';
3079
+ }
3080
+ };
3081
+ })();
3078
3082
  // FfiConverter for LectureCategoryBuilderInterface
3079
3083
  const FfiConverterTypeLectureCategoryBuilder = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeLectureCategoryBuilderObjectFactory);
3080
3084