react-native-unistyles 3.0.5 → 3.0.7

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 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.26.2
24
+ yarn add react-native-edge-to-edge react-native-nitro-modules@0.26.4
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.26.2 |
31
+ | 3.0.0 | 0.26.4 |
32
32
 
33
33
  Then follow [installation guides](https://unistyl.es/v3/start/getting-started) for your platform.
34
34
 
@@ -74,9 +74,6 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
74
74
  <a href="https://github.com/ryanlanciaux">
75
75
  <img src="https://avatars.githubusercontent.com/u/85041?v=4" height="70px" width="70px" alt="ryanlanciaux" />
76
76
  </a>
77
- <a href="https://github.com/loopsware">
78
- <img src="https://avatars.githubusercontent.com/u/161434039?s=200&v=4" height="70px" width="70px" alt="loopsware" />
79
- </a>
80
77
  <a href="https://github.com/jordmccord">
81
78
  <img src="https://avatars.githubusercontent.com/u/7591840?v=4" height="70px" width="70px" alt="jordmccord" />
82
79
  </a>
@@ -134,6 +131,9 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
134
131
  <a href="https://github.com/oscklm">
135
132
  <img src="https://avatars.githubusercontent.com/u/22825865?v=4" height="60px" width="60px" alt="oscklm" />
136
133
  </a>
134
+ <a href="https://github.com/loopsware">
135
+ <img src="https://avatars.githubusercontent.com/u/161434039?s=200&v=4" height="60px" width="60px" alt="loopsware" />
136
+ </a>
137
137
 
138
138
  ## Sponsor my work
139
139
 
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../../../lib/commonjs/components/native/SafeAreaView.js",
3
+ "module": "../../../lib/module/components/native/SafeAreaView.js",
4
+ "browser": "../../../lib/module/components/native/SafeAreaView.js",
5
+ "react-native": "../../../src/components/native/SafeAreaView.tsx"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SafeAreaView = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _core = require("../../core");
9
+ const SafeAreaView = exports.SafeAreaView = (0, _core.createUnistylesElement)(_reactNative.SafeAreaView);
10
+ //# sourceMappingURL=SafeAreaView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_core","SafeAreaView","exports","createUnistylesElement","NativeSafeAreaView"],"sourceRoot":"../../../../src","sources":["components/native/SafeAreaView.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,4BAAsB,EAACC,yBAAkB,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ import { SafeAreaView as NativeSafeAreaView } from 'react-native';
4
+ import { createUnistylesElement } from '../../core';
5
+ export const SafeAreaView = createUnistylesElement(NativeSafeAreaView);
6
+ //# sourceMappingURL=SafeAreaView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SafeAreaView","NativeSafeAreaView","createUnistylesElement"],"sourceRoot":"../../../../src","sources":["components/native/SafeAreaView.tsx"],"mappings":";;AAAA,SAASA,YAAY,IAAIC,kBAAkB,QAAQ,cAAc;AACjE,SAASC,sBAAsB,QAAQ,YAAY;AAEnD,OAAO,MAAMF,YAAY,GAAGE,sBAAsB,CAACD,kBAAkB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../../plugin/src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,eAAO,MAAM,4BAA4B,UAoBxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAGxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC,WAAW,CAAM,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAchE,CAAA"}
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../../plugin/src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,eAAO,MAAM,4BAA4B,UAqBxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAGxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC,WAAW,CAAM,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAchE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const SafeAreaView: any;
2
+ //# sourceMappingURL=SafeAreaView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeAreaView.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/SafeAreaView.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,KAA6C,CAAA"}
@@ -69,13 +69,13 @@ namespace margelo::nitro::unistyles::bridge::swift {
69
69
  */
70
70
  class Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper final {
71
71
  public:
72
- explicit Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_shared<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
72
+ explicit Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_unique<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
73
73
  inline void call(std::vector<UnistyleDependency> dependencies, UnistylesNativeMiniRuntime miniRuntime) const {
74
74
  _function->operator()(dependencies, miniRuntime);
75
75
  }
76
76
  private:
77
- std::shared_ptr<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
78
- };
77
+ std::unique_ptr<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
78
+ } SWIFT_NONCOPYABLE;
79
79
  Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper);
80
80
  inline Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime value) {
81
81
  return Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::move(value));
@@ -91,13 +91,13 @@ namespace margelo::nitro::unistyles::bridge::swift {
91
91
  */
92
92
  class Func_void_UnistylesNativeMiniRuntime_Wrapper final {
93
93
  public:
94
- explicit Func_void_UnistylesNativeMiniRuntime_Wrapper(std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_shared<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
94
+ explicit Func_void_UnistylesNativeMiniRuntime_Wrapper(std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_unique<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
95
95
  inline void call(UnistylesNativeMiniRuntime miniRuntime) const {
96
96
  _function->operator()(miniRuntime);
97
97
  }
98
98
  private:
99
- std::shared_ptr<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
100
- };
99
+ std::unique_ptr<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
100
+ } SWIFT_NONCOPYABLE;
101
101
  Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper);
102
102
  inline Func_void_UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_UnistylesNativeMiniRuntime(Func_void_UnistylesNativeMiniRuntime value) {
103
103
  return Func_void_UnistylesNativeMiniRuntime_Wrapper(std::move(value));
@@ -43,7 +43,7 @@ namespace margelo::nitro::unistyles { struct UnistylesNativeMiniRuntime; }
43
43
 
44
44
  // Common C++ types used in Swift
45
45
  #include <NitroModules/ArrayBufferHolder.hpp>
46
- #include <NitroModules/AnyMapHolder.hpp>
46
+ #include <NitroModules/AnyMapUtils.hpp>
47
47
  #include <NitroModules/RuntimeError.hpp>
48
48
  #include <NitroModules/DateToChronoDate.hpp>
49
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
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.26.2",
151
+ "nitro-codegen": "0.26.4",
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.26.2",
155
+ "react-native-nitro-modules": "0.26.4",
156
156
  "react-native-reanimated": "3.17.5",
157
157
  "react-native-web": "0.20.0",
158
158
  "react-test-renderer": "19.1.0",
package/plugin/index.js CHANGED
@@ -54,7 +54,8 @@ var REACT_NATIVE_COMPONENT_NAMES = [
54
54
  "TouchableHighlight",
55
55
  "TouchableOpacity",
56
56
  "VirtualizedList",
57
- "Animated"
57
+ "Animated",
58
+ "SafeAreaView"
58
59
  // Modal - there is no exposed native handle
59
60
  // TouchableWithoutFeedback - can't accept a ref
60
61
  ];
@@ -48,7 +48,8 @@ var REACT_NATIVE_COMPONENT_NAMES = [
48
48
  "TouchableHighlight",
49
49
  "TouchableOpacity",
50
50
  "VirtualizedList",
51
- "Animated"
51
+ "Animated",
52
+ "SafeAreaView"
52
53
  // Modal - there is no exposed native handle
53
54
  // TouchableWithoutFeedback - can't accept a ref
54
55
  ];
@@ -0,0 +1,4 @@
1
+ import { SafeAreaView as NativeSafeAreaView } from 'react-native'
2
+ import { createUnistylesElement } from '../../core'
3
+
4
+ export const SafeAreaView = createUnistylesElement(NativeSafeAreaView)