@imgly/camera-react-native 1.77.0 → 1.79.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.
package/android/build.gradle
CHANGED
|
@@ -16,7 +16,7 @@ public enum CameraBuilder {
|
|
|
16
16
|
_ settings: CameraSettings,
|
|
17
17
|
_ url: URL?,
|
|
18
18
|
_ metadata: [String: Any]?,
|
|
19
|
-
_ result: @escaping CameraBuilderResult
|
|
19
|
+
_ result: @escaping CameraBuilderResult,
|
|
20
20
|
) -> UIViewController
|
|
21
21
|
|
|
22
22
|
/// The default camera implementation.
|
|
@@ -36,11 +36,10 @@ public enum CameraBuilder {
|
|
|
36
36
|
_ settings: CameraSettings,
|
|
37
37
|
_ url: URL?,
|
|
38
38
|
_ metadata: [String: Any]?,
|
|
39
|
-
_ result: @escaping CameraBuilderResult
|
|
39
|
+
_ result: @escaping CameraBuilderResult,
|
|
40
40
|
) -> some View) -> Builder {
|
|
41
41
|
{ settings, preset, metadata, result in
|
|
42
|
-
|
|
43
|
-
return hostingController
|
|
42
|
+
UIHostingController(rootView: contentProvider(settings, preset, metadata, result))
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}
|
|
@@ -19,8 +19,7 @@ import Foundation
|
|
|
19
19
|
public static func fromDictionary(_ dictionary: [String: Any]) -> CameraSettings? {
|
|
20
20
|
do {
|
|
21
21
|
let data = try JSONSerialization.data(withJSONObject: dictionary, options: [])
|
|
22
|
-
|
|
23
|
-
return settings
|
|
22
|
+
return try JSONDecoder().decode(CameraSettings.self, from: data)
|
|
24
23
|
} catch {
|
|
25
24
|
print("Error decoding dictionary: \(error)")
|
|
26
25
|
return nil
|
package/package.json
CHANGED