react-native-unistyles 3.0.8 → 3.0.9
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/README.md +2 -2
- package/nitrogen/generated/android/c++/JColorScheme.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +1 -0
- package/nitrogen/generated/android/c++/JOrientation.hpp +1 -1
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/ColorScheme.kt +4 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +4 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +10 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Orientation.kt +3 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +17 -21
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +22 -0
- package/package.json +3 -3
package/README.md
CHANGED
@@ -21,14 +21,14 @@ yarn add react-native-unistyles
|
|
21
21
|
Install dependencies:
|
22
22
|
|
23
23
|
```shell
|
24
|
-
yarn add react-native-edge-to-edge react-native-nitro-modules@0.27.
|
24
|
+
yarn add react-native-edge-to-edge react-native-nitro-modules@0.27.5
|
25
25
|
```
|
26
26
|
|
27
27
|
> To avoid unexpected behavior, always use a fixed version of `react-native-nitro-modules`
|
28
28
|
|
29
29
|
| react-native-unistyles | react-native-nitro-modules |
|
30
30
|
|------------------------|----------------------------|
|
31
|
-
| 3.0.0 | 0.27.
|
31
|
+
| 3.0.0 | 0.27.5 |
|
32
32
|
|
33
33
|
Then follow [installation guides](https://unistyl.es/v3/start/getting-started) for your platform.
|
34
34
|
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::unistyles {
|
|
29
29
|
[[nodiscard]]
|
30
30
|
ColorScheme toCpp() const {
|
31
31
|
static const auto clazz = javaClassStatic();
|
32
|
-
static const auto fieldOrdinal = clazz->getField<int>("
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
33
33
|
int ordinal = this->getFieldValue(fieldOrdinal);
|
34
34
|
return static_cast<ColorScheme>(ordinal);
|
35
35
|
}
|
@@ -29,6 +29,7 @@ namespace margelo::nitro::unistyles {
|
|
29
29
|
// C++ constructor (called from Java via `initHybrid()`)
|
30
30
|
explicit JHybridNativePlatformSpec(jni::alias_ref<jhybridobject> jThis) :
|
31
31
|
HybridObject(HybridNativePlatformSpec::TAG),
|
32
|
+
HybridBase(jThis),
|
32
33
|
_javaPart(jni::make_global(jThis)) {}
|
33
34
|
|
34
35
|
public:
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::unistyles {
|
|
29
29
|
[[nodiscard]]
|
30
30
|
Orientation toCpp() const {
|
31
31
|
static const auto clazz = javaClassStatic();
|
32
|
-
static const auto fieldOrdinal = clazz->getField<int>("
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
33
33
|
int ordinal = this->getFieldValue(fieldOrdinal);
|
34
34
|
return static_cast<Orientation>(ordinal);
|
35
35
|
}
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::unistyles {
|
|
29
29
|
[[nodiscard]]
|
30
30
|
UnistyleDependency toCpp() const {
|
31
31
|
static const auto clazz = javaClassStatic();
|
32
|
-
static const auto fieldOrdinal = clazz->getField<int>("
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
33
33
|
int ordinal = this->getFieldValue(fieldOrdinal);
|
34
34
|
return static_cast<UnistyleDependency>(ordinal);
|
35
35
|
}
|
@@ -15,12 +15,8 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
15
15
|
*/
|
16
16
|
@DoNotStrip
|
17
17
|
@Keep
|
18
|
-
enum class ColorScheme {
|
19
|
-
DARK,
|
20
|
-
LIGHT,
|
21
|
-
UNSPECIFIED;
|
22
|
-
|
23
|
-
@DoNotStrip
|
24
|
-
@Keep
|
25
|
-
private val _ordinal = ordinal
|
18
|
+
enum class ColorScheme(@DoNotStrip @Keep val value: Int) {
|
19
|
+
DARK(0),
|
20
|
+
LIGHT(1),
|
21
|
+
UNSPECIFIED(2);
|
26
22
|
}
|
@@ -21,10 +21,20 @@ data class Insets
|
|
21
21
|
@DoNotStrip
|
22
22
|
@Keep
|
23
23
|
constructor(
|
24
|
+
@DoNotStrip
|
25
|
+
@Keep
|
24
26
|
val top: Double,
|
27
|
+
@DoNotStrip
|
28
|
+
@Keep
|
25
29
|
val bottom: Double,
|
30
|
+
@DoNotStrip
|
31
|
+
@Keep
|
26
32
|
val left: Double,
|
33
|
+
@DoNotStrip
|
34
|
+
@Keep
|
27
35
|
val right: Double,
|
36
|
+
@DoNotStrip
|
37
|
+
@Keep
|
28
38
|
val ime: Double
|
29
39
|
) {
|
30
40
|
/* main constructor */
|
@@ -15,11 +15,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
15
15
|
*/
|
16
16
|
@DoNotStrip
|
17
17
|
@Keep
|
18
|
-
enum class Orientation {
|
19
|
-
PORTRAIT,
|
20
|
-
LANDSCAPE;
|
21
|
-
|
22
|
-
@DoNotStrip
|
23
|
-
@Keep
|
24
|
-
private val _ordinal = ordinal
|
18
|
+
enum class Orientation(@DoNotStrip @Keep val value: Int) {
|
19
|
+
PORTRAIT(0),
|
20
|
+
LANDSCAPE(1);
|
25
21
|
}
|
@@ -15,25 +15,21 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
15
15
|
*/
|
16
16
|
@DoNotStrip
|
17
17
|
@Keep
|
18
|
-
enum class UnistyleDependency {
|
19
|
-
THEME,
|
20
|
-
THEMENAME,
|
21
|
-
ADAPTIVETHEMES,
|
22
|
-
BREAKPOINTS,
|
23
|
-
VARIANTS,
|
24
|
-
COLORSCHEME,
|
25
|
-
DIMENSIONS,
|
26
|
-
ORIENTATION,
|
27
|
-
CONTENTSIZECATEGORY,
|
28
|
-
INSETS,
|
29
|
-
PIXELRATIO,
|
30
|
-
FONTSCALE,
|
31
|
-
STATUSBAR,
|
32
|
-
NAVIGATIONBAR,
|
33
|
-
IME,
|
34
|
-
RTL;
|
35
|
-
|
36
|
-
@DoNotStrip
|
37
|
-
@Keep
|
38
|
-
private val _ordinal = ordinal
|
18
|
+
enum class UnistyleDependency(@DoNotStrip @Keep val value: Int) {
|
19
|
+
THEME(0),
|
20
|
+
THEMENAME(1),
|
21
|
+
ADAPTIVETHEMES(2),
|
22
|
+
BREAKPOINTS(3),
|
23
|
+
VARIANTS(4),
|
24
|
+
COLORSCHEME(5),
|
25
|
+
DIMENSIONS(6),
|
26
|
+
ORIENTATION(7),
|
27
|
+
CONTENTSIZECATEGORY(8),
|
28
|
+
INSETS(9),
|
29
|
+
PIXELRATIO(10),
|
30
|
+
FONTSCALE(11),
|
31
|
+
STATUSBAR(12),
|
32
|
+
NAVIGATIONBAR(13),
|
33
|
+
IME(14),
|
34
|
+
RTL(15);
|
39
35
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt
CHANGED
@@ -21,16 +21,38 @@ data class UnistylesNativeMiniRuntime
|
|
21
21
|
@DoNotStrip
|
22
22
|
@Keep
|
23
23
|
constructor(
|
24
|
+
@DoNotStrip
|
25
|
+
@Keep
|
24
26
|
val colorScheme: ColorScheme,
|
27
|
+
@DoNotStrip
|
28
|
+
@Keep
|
25
29
|
val screen: Dimensions,
|
30
|
+
@DoNotStrip
|
31
|
+
@Keep
|
26
32
|
val contentSizeCategory: String,
|
33
|
+
@DoNotStrip
|
34
|
+
@Keep
|
27
35
|
val insets: Insets,
|
36
|
+
@DoNotStrip
|
37
|
+
@Keep
|
28
38
|
val pixelRatio: Double,
|
39
|
+
@DoNotStrip
|
40
|
+
@Keep
|
29
41
|
val fontScale: Double,
|
42
|
+
@DoNotStrip
|
43
|
+
@Keep
|
30
44
|
val rtl: Boolean,
|
45
|
+
@DoNotStrip
|
46
|
+
@Keep
|
31
47
|
val statusBar: Dimensions,
|
48
|
+
@DoNotStrip
|
49
|
+
@Keep
|
32
50
|
val navigationBar: Dimensions,
|
51
|
+
@DoNotStrip
|
52
|
+
@Keep
|
33
53
|
val isPortrait: Boolean,
|
54
|
+
@DoNotStrip
|
55
|
+
@Keep
|
34
56
|
val isLandscape: Boolean
|
35
57
|
) {
|
36
58
|
/* main constructor */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.9",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "NODE_ENV=babel-test jest ./plugin",
|
@@ -148,11 +148,11 @@
|
|
148
148
|
"husky": "9.1.7",
|
149
149
|
"jest": "29.7.0",
|
150
150
|
"metro-react-native-babel-preset": "0.77.0",
|
151
|
-
"nitro-codegen": "0.27.
|
151
|
+
"nitro-codegen": "0.27.5",
|
152
152
|
"react": "19.1.0",
|
153
153
|
"react-native": "0.79.2",
|
154
154
|
"react-native-builder-bob": "0.40.10",
|
155
|
-
"react-native-nitro-modules": "0.27.
|
155
|
+
"react-native-nitro-modules": "0.27.5",
|
156
156
|
"react-native-reanimated": "3.17.5",
|
157
157
|
"react-native-web": "0.20.0",
|
158
158
|
"react-test-renderer": "19.1.0",
|