react-native-nitro-web-image 0.8.4 → 0.9.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.
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/nitrogen/generated/android/NitroWebImage+autolinking.cmake +1 -1
- package/nitrogen/generated/android/NitroWebImage+autolinking.gradle +1 -1
- package/nitrogen/generated/android/NitroWebImageOnLoad.cpp +1 -1
- package/nitrogen/generated/android/NitroWebImageOnLoad.hpp +1 -1
- package/nitrogen/generated/android/c++/JAsyncImageLoadOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JAsyncImagePriority.hpp +4 -5
- package/nitrogen/generated/android/c++/JHybridWebImageFactorySpec.cpp +14 -1
- package/nitrogen/generated/android/c++/JHybridWebImageFactorySpec.hpp +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/web/image/AsyncImageLoadOptions.kt +4 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/web/image/AsyncImagePriority.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/web/image/HybridWebImageFactorySpec.kt +6 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/web/image/NitroWebImageOnLoad.kt +1 -1
- package/nitrogen/generated/ios/NitroWebImage+autolinking.rb +2 -2
- package/nitrogen/generated/ios/NitroWebImage-Swift-Cxx-Bridge.cpp +2 -1
- package/nitrogen/generated/ios/NitroWebImage-Swift-Cxx-Bridge.hpp +1 -1
- package/nitrogen/generated/ios/NitroWebImage-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/NitroWebImageAutolinking.mm +1 -1
- package/nitrogen/generated/ios/NitroWebImageAutolinking.swift +1 -1
- package/nitrogen/generated/ios/c++/HybridWebImageFactorySpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridWebImageFactorySpecSwift.hpp +10 -1
- package/nitrogen/generated/ios/swift/AsyncImageLoadOptions.swift +76 -183
- package/nitrogen/generated/ios/swift/AsyncImagePriority.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_margelo__nitro__image__HybridImageSpec_.swift +3 -2
- package/nitrogen/generated/ios/swift/HybridWebImageFactorySpec.swift +8 -2
- package/nitrogen/generated/ios/swift/HybridWebImageFactorySpec_cxx.swift +18 -3
- package/nitrogen/generated/shared/c++/AsyncImageLoadOptions.hpp +37 -29
- package/nitrogen/generated/shared/c++/AsyncImagePriority.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWebImageFactorySpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWebImageFactorySpec.hpp +1 -1
- package/package.json +3 -3
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
/// HybridWebImageFactorySpec_cxx.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
9
9
|
import NitroModules
|
|
10
10
|
import NitroImage
|
|
11
|
-
import NitroModules
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* A class implementation that bridges HybridWebImageFactorySpec over to C++.
|
|
@@ -78,7 +77,7 @@ open class HybridWebImageFactorySpec_cxx {
|
|
|
78
77
|
*/
|
|
79
78
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridWebImageFactorySpec_ {
|
|
80
79
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
81
|
-
if cachedCxxPart
|
|
80
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
82
81
|
return cachedCxxPart
|
|
83
82
|
} else {
|
|
84
83
|
let newCxxPart = bridge.create_std__shared_ptr_HybridWebImageFactorySpec_(self.toUnsafe())
|
|
@@ -98,6 +97,14 @@ open class HybridWebImageFactorySpec_cxx {
|
|
|
98
97
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
99
98
|
}
|
|
100
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Compares this object with the given [other] object for reference equality.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func equals(other: HybridWebImageFactorySpec_cxx) -> Bool {
|
|
105
|
+
return self.__implementation === other.__implementation
|
|
106
|
+
}
|
|
107
|
+
|
|
101
108
|
/**
|
|
102
109
|
* Call dispose() on the Swift class.
|
|
103
110
|
* This _may_ be called manually from JS.
|
|
@@ -107,6 +114,14 @@ open class HybridWebImageFactorySpec_cxx {
|
|
|
107
114
|
self.__implementation.dispose()
|
|
108
115
|
}
|
|
109
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Call toString() on the Swift class.
|
|
119
|
+
*/
|
|
120
|
+
@inline(__always)
|
|
121
|
+
public func toString() -> String {
|
|
122
|
+
return self.__implementation.toString()
|
|
123
|
+
}
|
|
124
|
+
|
|
110
125
|
// Properties
|
|
111
126
|
|
|
112
127
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AsyncImageLoadOptions.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `AsyncImagePriority` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::web::image { enum class AsyncImagePriority; }
|
|
@@ -35,7 +40,7 @@ namespace margelo::nitro::web::image {
|
|
|
35
40
|
/**
|
|
36
41
|
* A struct which can be represented as a JavaScript object (AsyncImageLoadOptions).
|
|
37
42
|
*/
|
|
38
|
-
struct AsyncImageLoadOptions {
|
|
43
|
+
struct AsyncImageLoadOptions final {
|
|
39
44
|
public:
|
|
40
45
|
std::optional<AsyncImagePriority> priority SWIFT_PRIVATE;
|
|
41
46
|
std::optional<bool> forceRefresh SWIFT_PRIVATE;
|
|
@@ -50,6 +55,9 @@ namespace margelo::nitro::web::image {
|
|
|
50
55
|
public:
|
|
51
56
|
AsyncImageLoadOptions() = default;
|
|
52
57
|
explicit AsyncImageLoadOptions(std::optional<AsyncImagePriority> priority, std::optional<bool> forceRefresh, std::optional<std::string> cacheKey, std::optional<bool> continueInBackground, std::optional<bool> allowInvalidSSLCertificates, std::optional<bool> scaleDownLargeImages, std::optional<bool> queryMemoryDataSync, std::optional<bool> queryDiskDataSync, std::optional<bool> decodeImage): priority(priority), forceRefresh(forceRefresh), cacheKey(cacheKey), continueInBackground(continueInBackground), allowInvalidSSLCertificates(allowInvalidSSLCertificates), scaleDownLargeImages(scaleDownLargeImages), queryMemoryDataSync(queryMemoryDataSync), queryDiskDataSync(queryDiskDataSync), decodeImage(decodeImage) {}
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
friend bool operator==(const AsyncImageLoadOptions& lhs, const AsyncImageLoadOptions& rhs) = default;
|
|
53
61
|
};
|
|
54
62
|
|
|
55
63
|
} // namespace margelo::nitro::web::image
|
|
@@ -62,28 +70,28 @@ namespace margelo::nitro {
|
|
|
62
70
|
static inline margelo::nitro::web::image::AsyncImageLoadOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
71
|
jsi::Object obj = arg.asObject(runtime);
|
|
64
72
|
return margelo::nitro::web::image::AsyncImageLoadOptions(
|
|
65
|
-
JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::fromJSI(runtime, obj.getProperty(runtime, "priority")),
|
|
66
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "forceRefresh")),
|
|
67
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "cacheKey")),
|
|
68
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "continueInBackground")),
|
|
69
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "allowInvalidSSLCertificates")),
|
|
70
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "scaleDownLargeImages")),
|
|
71
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "queryMemoryDataSync")),
|
|
72
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "queryDiskDataSync")),
|
|
73
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "decodeImage"))
|
|
73
|
+
JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priority"))),
|
|
74
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "forceRefresh"))),
|
|
75
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cacheKey"))),
|
|
76
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "continueInBackground"))),
|
|
77
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowInvalidSSLCertificates"))),
|
|
78
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "scaleDownLargeImages"))),
|
|
79
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "queryMemoryDataSync"))),
|
|
80
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "queryDiskDataSync"))),
|
|
81
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "decodeImage")))
|
|
74
82
|
);
|
|
75
83
|
}
|
|
76
84
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::web::image::AsyncImageLoadOptions& arg) {
|
|
77
85
|
jsi::Object obj(runtime);
|
|
78
|
-
obj.setProperty(runtime, "priority", JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::toJSI(runtime, arg.priority));
|
|
79
|
-
obj.setProperty(runtime, "forceRefresh", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.forceRefresh));
|
|
80
|
-
obj.setProperty(runtime, "cacheKey", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.cacheKey));
|
|
81
|
-
obj.setProperty(runtime, "continueInBackground", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.continueInBackground));
|
|
82
|
-
obj.setProperty(runtime, "allowInvalidSSLCertificates", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.allowInvalidSSLCertificates));
|
|
83
|
-
obj.setProperty(runtime, "scaleDownLargeImages", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.scaleDownLargeImages));
|
|
84
|
-
obj.setProperty(runtime, "queryMemoryDataSync", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.queryMemoryDataSync));
|
|
85
|
-
obj.setProperty(runtime, "queryDiskDataSync", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.queryDiskDataSync));
|
|
86
|
-
obj.setProperty(runtime, "decodeImage", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.decodeImage));
|
|
86
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "priority"), JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::toJSI(runtime, arg.priority));
|
|
87
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "forceRefresh"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.forceRefresh));
|
|
88
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "cacheKey"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.cacheKey));
|
|
89
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "continueInBackground"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.continueInBackground));
|
|
90
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowInvalidSSLCertificates"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.allowInvalidSSLCertificates));
|
|
91
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "scaleDownLargeImages"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.scaleDownLargeImages));
|
|
92
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "queryMemoryDataSync"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.queryMemoryDataSync));
|
|
93
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "queryDiskDataSync"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.queryDiskDataSync));
|
|
94
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "decodeImage"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.decodeImage));
|
|
87
95
|
return obj;
|
|
88
96
|
}
|
|
89
97
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -94,15 +102,15 @@ namespace margelo::nitro {
|
|
|
94
102
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
95
103
|
return false;
|
|
96
104
|
}
|
|
97
|
-
if (!JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::canConvert(runtime, obj.getProperty(runtime, "priority"))) return false;
|
|
98
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "forceRefresh"))) return false;
|
|
99
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "cacheKey"))) return false;
|
|
100
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "continueInBackground"))) return false;
|
|
101
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "allowInvalidSSLCertificates"))) return false;
|
|
102
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "scaleDownLargeImages"))) return false;
|
|
103
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "queryMemoryDataSync"))) return false;
|
|
104
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "queryDiskDataSync"))) return false;
|
|
105
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "decodeImage"))) return false;
|
|
105
|
+
if (!JSIConverter<std::optional<margelo::nitro::web::image::AsyncImagePriority>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "priority")))) return false;
|
|
106
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "forceRefresh")))) return false;
|
|
107
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cacheKey")))) return false;
|
|
108
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "continueInBackground")))) return false;
|
|
109
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowInvalidSSLCertificates")))) return false;
|
|
110
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "scaleDownLargeImages")))) return false;
|
|
111
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "queryMemoryDataSync")))) return false;
|
|
112
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "queryDiskDataSync")))) return false;
|
|
113
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "decodeImage")))) return false;
|
|
106
114
|
return true;
|
|
107
115
|
}
|
|
108
116
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridWebImageFactorySpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridWebImageFactorySpec.hpp"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-web-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "react-native-nitro-web-image",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@biomejs/biome": "2.2.6",
|
|
62
62
|
"@types/react": "^19.0.6",
|
|
63
|
-
"nitrogen": "0.
|
|
63
|
+
"nitrogen": "0.32.1",
|
|
64
64
|
"react": "19.1.0",
|
|
65
65
|
"react-native": "0.81.0",
|
|
66
|
-
"react-native-nitro-modules": "0.
|
|
66
|
+
"react-native-nitro-modules": "0.32.1",
|
|
67
67
|
"react-native-nitro-image": "../react-native-nitro-image",
|
|
68
68
|
"typescript": "5.8.3"
|
|
69
69
|
},
|