@onekeyfe/react-native-device-utils 1.1.11 → 1.1.13
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/src/main/java/com/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtils.kt +31 -25
- package/android/src/main/java/com/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtilsPackage.kt +0 -1
- package/ios/ReactNativeDeviceUtils.swift +13 -3
- package/nitrogen/generated/android/c++/JDualScreenInfoRect.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.cpp +1 -1
- package/nitrogen/generated/android/c++/JHybridReactNativeDeviceUtilsSpec.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/DualScreenInfoRect.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/Func_void_bool.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/HybridReactNativeDeviceUtilsSpec.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/reactnativedeviceutilsOnLoad.kt +1 -1
- package/nitrogen/generated/android/reactnativedeviceutils+autolinking.cmake +1 -1
- package/nitrogen/generated/android/reactnativedeviceutils+autolinking.gradle +1 -1
- package/nitrogen/generated/android/reactnativedeviceutilsOnLoad.cpp +1 -1
- package/nitrogen/generated/android/reactnativedeviceutilsOnLoad.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtils+autolinking.rb +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Bridge.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtils-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtilsAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeDeviceUtilsAutolinking.swift +1 -1
- package/nitrogen/generated/ios/c++/HybridReactNativeDeviceUtilsSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridReactNativeDeviceUtilsSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/swift/DualScreenInfoRect.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_DualScreenInfoRect.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_std__vector_DualScreenInfoRect_.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridReactNativeDeviceUtilsSpec_cxx.swift +1 -1
- package/nitrogen/generated/shared/c++/DualScreenInfoRect.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridReactNativeDeviceUtilsSpec.hpp +1 -1
- package/package.json +3 -4
package/android/src/main/java/com/margelo/nitro/reactnativedeviceutils/ReactNativeDeviceUtils.kt
CHANGED
|
@@ -9,12 +9,14 @@ import androidx.core.util.Consumer
|
|
|
9
9
|
import androidx.window.layout.FoldingFeature
|
|
10
10
|
import androidx.window.layout.WindowInfoTracker
|
|
11
11
|
import androidx.window.layout.WindowLayoutInfo
|
|
12
|
+
import androidx.window.java.layout.WindowInfoTrackerCallbackAdapter
|
|
12
13
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
14
|
import com.facebook.react.bridge.LifecycleEventListener
|
|
14
15
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
15
16
|
import com.margelo.nitro.NitroModules
|
|
16
17
|
import com.margelo.nitro.core.Promise
|
|
17
18
|
import java.util.concurrent.Executor
|
|
19
|
+
import java.util.concurrent.CopyOnWriteArrayList
|
|
18
20
|
|
|
19
21
|
data class Listener(
|
|
20
22
|
val id: Double,
|
|
@@ -28,24 +30,15 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
|
|
|
28
30
|
private var isSpanning = false
|
|
29
31
|
private var layoutInfoConsumer: Consumer<WindowLayoutInfo>? = null
|
|
30
32
|
private var windowInfoTracker: WindowInfoTracker? = null
|
|
31
|
-
private var
|
|
33
|
+
private var callbackAdapter: WindowInfoTrackerCallbackAdapter? = null
|
|
34
|
+
private var spanningChangedListeners: MutableList<Listener> = CopyOnWriteArrayList()
|
|
32
35
|
private var isObservingLayoutChanges = false
|
|
33
36
|
private var nextListenerId = 0.0
|
|
34
37
|
private var isDualScreenDeviceDetected: Boolean? = null
|
|
35
38
|
|
|
36
|
-
companion object {
|
|
37
|
-
private var reactContext: ReactApplicationContext? = null
|
|
38
|
-
|
|
39
|
-
fun setReactContext(context: ReactApplicationContext) {
|
|
40
|
-
reactContext = context
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
39
|
init {
|
|
45
40
|
NitroModules.applicationContext?.let { ctx ->
|
|
46
41
|
ctx.addLifecycleEventListener(this)
|
|
47
|
-
} ?: run {
|
|
48
|
-
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
44
|
|
|
@@ -241,12 +234,12 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
|
|
|
241
234
|
}
|
|
242
235
|
}
|
|
243
236
|
|
|
244
|
-
override fun addSpanningChangedListener(callback: (isSpanning: Boolean) -> Unit): Double {
|
|
245
|
-
|
|
237
|
+
override fun addSpanningChangedListener(callback: (isSpanning: Boolean) -> Unit): Double = synchronized(this) {
|
|
238
|
+
val id = nextListenerId
|
|
246
239
|
nextListenerId++
|
|
247
240
|
val listener = Listener(id, callback)
|
|
248
241
|
spanningChangedListeners.add(listener)
|
|
249
|
-
return id
|
|
242
|
+
return@synchronized id
|
|
250
243
|
}
|
|
251
244
|
|
|
252
245
|
override fun removeSpanningChangedListener(id: Double) {
|
|
@@ -272,11 +265,14 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
|
|
|
272
265
|
|
|
273
266
|
// Use main executor for callbacks
|
|
274
267
|
val mainExecutor: Executor = ContextCompat.getMainExecutor(activity)
|
|
275
|
-
|
|
268
|
+
|
|
276
269
|
// Subscribe to window layout changes using the Java adapter
|
|
277
|
-
|
|
270
|
+
callbackAdapter = WindowInfoTrackerCallbackAdapter(windowInfoTracker!!)
|
|
278
271
|
|
|
279
|
-
callbackAdapter
|
|
272
|
+
if (callbackAdapter == null) {
|
|
273
|
+
return
|
|
274
|
+
}
|
|
275
|
+
callbackAdapter!!.addWindowLayoutInfoListener(
|
|
280
276
|
activity,
|
|
281
277
|
mainExecutor,
|
|
282
278
|
layoutInfoConsumer!!
|
|
@@ -292,14 +288,18 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
|
|
|
292
288
|
return
|
|
293
289
|
}
|
|
294
290
|
isObservingLayoutChanges = false
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
} catch (e: Exception) {
|
|
301
|
-
// Ignore cleanup errors
|
|
291
|
+
|
|
292
|
+
// Properly clean up window layout listener
|
|
293
|
+
try {
|
|
294
|
+
if (callbackAdapter != null && layoutInfoConsumer != null) {
|
|
295
|
+
callbackAdapter!!.removeWindowLayoutInfoListener(layoutInfoConsumer!!)
|
|
302
296
|
}
|
|
297
|
+
} catch (e: Exception) {
|
|
298
|
+
// Ignore cleanup errors
|
|
299
|
+
} finally {
|
|
300
|
+
callbackAdapter = null
|
|
301
|
+
layoutInfoConsumer = null
|
|
302
|
+
windowInfoTracker = null
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
|
|
@@ -321,8 +321,14 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
|
|
|
321
321
|
val activity = getCurrentActivity() ?: return
|
|
322
322
|
activity.runOnUiThread {
|
|
323
323
|
try {
|
|
324
|
+
// Clamp color values to valid range [0, 255]
|
|
325
|
+
val red = Math.max(0, Math.min(255, r.toInt()))
|
|
326
|
+
val green = Math.max(0, Math.min(255, g.toInt()))
|
|
327
|
+
val blue = Math.max(0, Math.min(255, b.toInt()))
|
|
328
|
+
val alpha = Math.max(0, Math.min(255, a.toInt()))
|
|
329
|
+
|
|
324
330
|
val rootView = activity.window.decorView
|
|
325
|
-
rootView.rootView.setBackgroundColor(Color.
|
|
331
|
+
rootView.rootView.setBackgroundColor(Color.argb(alpha, red, green, blue))
|
|
326
332
|
} catch (e: Exception) {
|
|
327
333
|
e.printStackTrace()
|
|
328
334
|
}
|
|
@@ -8,7 +8,6 @@ import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
|
8
8
|
class ReactNativeDeviceUtilsPackage : BaseReactPackage() {
|
|
9
9
|
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
|
|
10
10
|
// Set the React context for the DeviceUtils module
|
|
11
|
-
ReactNativeDeviceUtils.setReactContext(reactContext)
|
|
12
11
|
return null
|
|
13
12
|
}
|
|
14
13
|
|
|
@@ -33,9 +33,19 @@ class ReactNativeDeviceUtils: HybridReactNativeDeviceUtilsSpec {
|
|
|
33
33
|
|
|
34
34
|
public func changeBackgroundColor(r: Double, g: Double, b: Double, a: Double) throws -> Void {
|
|
35
35
|
DispatchQueue.main.async {
|
|
36
|
-
|
|
37
|
-
let
|
|
38
|
-
|
|
36
|
+
// Clamp color values to valid range [0, 255]
|
|
37
|
+
let red = max(0, min(255, r))
|
|
38
|
+
let green = max(0, min(255, g))
|
|
39
|
+
let blue = max(0, min(255, b))
|
|
40
|
+
let alpha = max(0, min(255, a))
|
|
41
|
+
|
|
42
|
+
let color = UIColor(red: red/255.0, green: green/255.0, blue: blue/255.0, alpha: alpha/255.0)
|
|
43
|
+
|
|
44
|
+
// Fix optional chaining syntax
|
|
45
|
+
if let window = UIApplication.shared.delegate?.window,
|
|
46
|
+
let rootViewController = window?.rootViewController {
|
|
47
|
+
rootViewController.view.backgroundColor = color
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// JHybridReactNativeDeviceUtilsSpec.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "JHybridReactNativeDeviceUtilsSpec.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// DualScreenInfoRect.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.reactnativedeviceutils
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativedeviceutils/Func_void_bool.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_bool.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.reactnativedeviceutils
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.reactnativedeviceutils
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// reactnativedeviceutilsOnLoad.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.reactnativedeviceutils
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# reactnativedeviceutils+autolinking.cmake
|
|
3
3
|
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright ©
|
|
5
|
+
# Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# This is a CMake file that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// reactnativedeviceutils+autolinking.gradle
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
/// This is a Gradle file that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// reactnativedeviceutilsOnLoad.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#ifndef BUILDING_REACTNATIVEDEVICEUTILS_WITH_GENERATED_CMAKE_PROJECT
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# ReactNativeDeviceUtils+autolinking.rb
|
|
3
3
|
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright ©
|
|
5
|
+
# Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# This is a Ruby script that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ReactNativeDeviceUtils-Swift-Cxx-Bridge.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "ReactNativeDeviceUtils-Swift-Cxx-Bridge.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ReactNativeDeviceUtils-Swift-Cxx-Bridge.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ReactNativeDeviceUtils-Swift-Cxx-Umbrella.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ReactNativeDeviceUtilsAutolinking.mm
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ReactNativeDeviceUtilsAutolinking.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
public final class ReactNativeDeviceUtilsAutolinking {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpecSwift.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridReactNativeDeviceUtilsSpecSwift.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpecSwift.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_DualScreenInfoRect.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_std__exception_ptr.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_std__vector_DualScreenInfoRect_.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpec.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpec_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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeDeviceUtilsSpec.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 © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridReactNativeDeviceUtilsSpec.hpp"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-device-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "react-native-device-utils",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"!**/.*"
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
|
-
"example": "yarn workspace react-native-device-utils-example",
|
|
38
37
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
39
38
|
"prepare": "bob build",
|
|
40
39
|
"nitrogen": "nitrogen",
|
|
@@ -78,12 +77,12 @@
|
|
|
78
77
|
"eslint-plugin-prettier": "^5.5.4",
|
|
79
78
|
"jest": "^29.7.0",
|
|
80
79
|
"lefthook": "^2.0.3",
|
|
81
|
-
"nitrogen": "
|
|
80
|
+
"nitrogen": "0.31.10",
|
|
82
81
|
"prettier": "^2.8.8",
|
|
83
82
|
"react": "19.2.0",
|
|
84
83
|
"react-native": "0.83.0",
|
|
85
84
|
"react-native-builder-bob": "^0.40.13",
|
|
86
|
-
"react-native-nitro-modules": "
|
|
85
|
+
"react-native-nitro-modules": "0.31.10",
|
|
87
86
|
"release-it": "^19.0.4",
|
|
88
87
|
"turbo": "^2.5.6",
|
|
89
88
|
"typescript": "^5.9.2"
|