react-native-unistyles 3.0.10 → 3.0.11
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 +8 -8
- package/cxx/shadowTree/ShadowTreeManager.cpp +1 -1
- package/lib/commonjs/web/index.js +3 -3
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/module/web/index.js +3 -3
- package/lib/module/web/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +4 -4
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +28 -28
- package/package.json +44 -4
- package/src/index.ts +1 -1
- package/src/web/index.ts +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.
|
24
|
+
yarn add react-native-edge-to-edge react-native-nitro-modules@0.29.3
|
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.
|
31
|
+
| 3.0.0 | 0.29.3 |
|
32
32
|
|
33
33
|
Then follow [installation guides](https://unistyl.es/v3/start/getting-started) for your platform.
|
34
34
|
|
@@ -59,12 +59,6 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
|
|
59
59
|
<a href="https://galaxies.dev">
|
60
60
|
<img src="https://avatars.githubusercontent.com/u/118431096?s=200&v=4" height="70px" width="70px" alt="galaxies-dev" />
|
61
61
|
</a>
|
62
|
-
<a href="https://github.com/mobily">
|
63
|
-
<img src="https://avatars.githubusercontent.com/u/1467712?v=4" height="70px" width="70px" alt="mobily" />
|
64
|
-
</a>
|
65
|
-
<a href="https://github.com/mwarger">
|
66
|
-
<img src="https://avatars.githubusercontent.com/u/686823?v=4" height="70px" width="70px" alt="mwarger" />
|
67
|
-
</a>
|
68
62
|
<a href="https://github.com/biw">
|
69
63
|
<img src="https://avatars.githubusercontent.com/u/6139501?v=4" height="70px" width="70px" alt="biw" />
|
70
64
|
</a>
|
@@ -134,6 +128,12 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
|
|
134
128
|
<a href="https://github.com/loopsware">
|
135
129
|
<img src="https://avatars.githubusercontent.com/u/161434039?s=200&v=4" height="60px" width="60px" alt="loopsware" />
|
136
130
|
</a>
|
131
|
+
<a href="https://github.com/mobily">
|
132
|
+
<img src="https://avatars.githubusercontent.com/u/1467712?v=4" height="60px" width="60px" alt="mobily" />
|
133
|
+
</a>
|
134
|
+
<a href="https://github.com/mwarger">
|
135
|
+
<img src="https://avatars.githubusercontent.com/u/686823?v=4" height="60px" width="60px" alt="mwarger" />
|
136
|
+
</a>
|
137
137
|
|
138
138
|
## Sponsor my work
|
139
139
|
|
@@ -27,7 +27,7 @@ void shadow::ShadowTreeManager::updateShadowTree(jsi::Runtime& rt) {
|
|
27
27
|
std::make_unique<folly::dynamic>(props);
|
28
28
|
}
|
29
29
|
|
30
|
-
UIManagerBinding::getBinding(rt)->getUIManager().updateShadowTree(tagToProps);
|
30
|
+
UIManagerBinding::getBinding(rt)->getUIManager().updateShadowTree(std::move(tagToProps));
|
31
31
|
#else
|
32
32
|
const auto& shadowTreeRegistry = UIManagerBinding::getBinding(rt)->getUIManager().getShadowTreeRegistry();
|
33
33
|
|
@@ -9,7 +9,7 @@ var _exportNames = {
|
|
9
9
|
UnistylesShadowRegistry: true
|
10
10
|
};
|
11
11
|
exports.UnistylesShadowRegistry = exports.UnistylesRuntime = exports.StyleSheet = void 0;
|
12
|
-
var
|
12
|
+
var _reactNative = require("react-native");
|
13
13
|
var _create = require("./create");
|
14
14
|
var unistyles = _interopRequireWildcard(require("./services"));
|
15
15
|
var _mock = require("./mock");
|
@@ -42,8 +42,8 @@ const StyleSheet = exports.StyleSheet = {
|
|
42
42
|
right: 0,
|
43
43
|
bottom: 0
|
44
44
|
},
|
45
|
-
compose: (a, b) =>
|
46
|
-
flatten: (...styles) =>
|
45
|
+
compose: (a, b) => _reactNative.StyleSheet.compose(a, b),
|
46
|
+
flatten: (...styles) => _reactNative.StyleSheet.flatten(...styles),
|
47
47
|
hairlineWidth: 1
|
48
48
|
};
|
49
49
|
const UnistylesRuntime = exports.UnistylesRuntime = unistyles.services.runtime;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["_reactNative","require","_create","unistyles","_interopRequireWildcard","_mock","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor","StyleSheet","configure","services","state","init","create","absoluteFill","position","left","top","right","bottom","absoluteFillObject","compose","a","b","RNStyleSheet","flatten","styles","hairlineWidth","UnistylesRuntime","runtime","UnistylesShadowRegistry","shadowRegistry"],"sourceRoot":"../../../src","sources":["web/index.ts"],"mappings":"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","ignoreList":[]}
|
package/lib/module/web/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import {
|
3
|
+
import { StyleSheet as RNStyleSheet } from 'react-native';
|
4
4
|
import { create } from './create';
|
5
5
|
import * as unistyles from './services';
|
6
6
|
export const StyleSheet = {
|
@@ -20,8 +20,8 @@ export const StyleSheet = {
|
|
20
20
|
right: 0,
|
21
21
|
bottom: 0
|
22
22
|
},
|
23
|
-
compose: (a, b) =>
|
24
|
-
flatten: (...styles) =>
|
23
|
+
compose: (a, b) => RNStyleSheet.compose(a, b),
|
24
|
+
flatten: (...styles) => RNStyleSheet.flatten(...styles),
|
25
25
|
hairlineWidth: 1
|
26
26
|
};
|
27
27
|
export const UnistylesRuntime = unistyles.services.runtime;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["StyleSheet","RNStyleSheet","create","unistyles","configure","services","state","init","absoluteFill","position","left","top","right","bottom","absoluteFillObject","compose","a","b","flatten","styles","hairlineWidth","UnistylesRuntime","runtime","UnistylesShadowRegistry","shadowRegistry"],"sourceRoot":"../../../src","sources":["web/index.ts"],"mappings":";;AAAA,SAASA,UAAU,IAAIC,YAAY,QAAQ,cAAc;AAIzD,SAASC,MAAM,QAAQ,UAAU;AACjC,OAAO,KAAKC,SAAS,MAAM,YAAY;AAEvC,OAAO,MAAMH,UAAU,GAAG;EACtBI,SAAS,EAAED,SAAS,CAACE,QAAQ,CAACC,KAAK,CAACC,IAAI;EACxCL,MAAM,EAAEA,MAAM;EACdM,YAAY,EAAE;IACVC,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACZ,CAAC;EACDC,kBAAkB,EAAE;IAChBL,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACZ,CAAC;EACDE,OAAO,EAAEA,CAACC,CAAS,EAAEC,CAAS,KAAKhB,YAAY,CAACc,OAAO,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC7DC,OAAO,EAAEA,CAAC,GAAGC,MAAqB,KAAKlB,YAAY,CAACiB,OAAO,CAAC,GAAGC,MAAM,CAAC;EACtEC,aAAa,EAAE;AACnB,CAAuC;AAEvC,OAAO,MAAMC,gBAAgB,GAAGlB,SAAS,CAACE,QAAQ,CAACiB,OAAmD;AACtG,OAAO,MAAMC,uBAAuB,GAAGpB,SAAS,CAACE,QAAQ,CAACmB,cAAiE;AAE3H,cAAc,QAAQ","ignoreList":[]}
|
@@ -2,7 +2,7 @@ export { StyleSheet, UnistylesRuntime, StatusBar, NavigationBar } from './specs'
|
|
2
2
|
export { mq } from './mq';
|
3
3
|
export type { UnistylesThemes, UnistylesBreakpoints } from './global';
|
4
4
|
export { withUnistyles, useUnistyles, createUnistylesElement } from './core';
|
5
|
-
export type { UnistylesVariants } from './types';
|
5
|
+
export type { UnistylesVariants, IOSContentSizeCategory, AndroidContentSizeCategory } from './types';
|
6
6
|
export { Display, Hide, ScopedTheme } from './components';
|
7
7
|
export { useServerUnistyles, hydrateServerUnistyles, getServerUnistyles, resetServerUnistyles } from './server';
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAC5E,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAC5E,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AACpG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AACvG,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAIlF,eAAO,MAAM,UAAU,EAoBP,OAAO,gBAAgB,CAAA;AAEvC,eAAO,MAAM,gBAAgB,EAA4C,OAAO,sBAAsB,CAAA;AACtG,eAAO,MAAM,uBAAuB,EAAmD,OAAO,6BAA6B,CAAA;AAE3H,cAAc,QAAQ,CAAA"}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
namespace margelo::nitro::unistyles::bridge::swift {
|
15
15
|
|
16
16
|
// pragma MARK: std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>
|
17
|
-
Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) {
|
17
|
+
Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) noexcept {
|
18
18
|
auto swiftClosure = Unistyles::Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime::fromUnsafe(swiftClosureWrapper);
|
19
19
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<UnistyleDependency>& dependencies, const UnistylesNativeMiniRuntime& miniRuntime) mutable -> void {
|
20
20
|
swiftClosure.call(dependencies, miniRuntime);
|
@@ -22,7 +22,7 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
// pragma MARK: std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>
|
25
|
-
Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) {
|
25
|
+
Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) noexcept {
|
26
26
|
auto swiftClosure = Unistyles::Func_void_UnistylesNativeMiniRuntime::fromUnsafe(swiftClosureWrapper);
|
27
27
|
return [swiftClosure = std::move(swiftClosure)](const UnistylesNativeMiniRuntime& miniRuntime) mutable -> void {
|
28
28
|
swiftClosure.call(miniRuntime);
|
@@ -30,11 +30,11 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
// pragma MARK: std::shared_ptr<HybridNativePlatformSpec>
|
33
|
-
std::shared_ptr<HybridNativePlatformSpec> create_std__shared_ptr_HybridNativePlatformSpec_(void* _Nonnull swiftUnsafePointer) {
|
33
|
+
std::shared_ptr<HybridNativePlatformSpec> create_std__shared_ptr_HybridNativePlatformSpec_(void* _Nonnull swiftUnsafePointer) noexcept {
|
34
34
|
Unistyles::HybridNativePlatformSpec_cxx swiftPart = Unistyles::HybridNativePlatformSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
35
35
|
return std::make_shared<margelo::nitro::unistyles::HybridNativePlatformSpecSwift>(swiftPart);
|
36
36
|
}
|
37
|
-
void* _Nonnull get_std__shared_ptr_HybridNativePlatformSpec_(std__shared_ptr_HybridNativePlatformSpec_ cppType) {
|
37
|
+
void* _Nonnull get_std__shared_ptr_HybridNativePlatformSpec_(std__shared_ptr_HybridNativePlatformSpec_ cppType) noexcept {
|
38
38
|
std::shared_ptr<margelo::nitro::unistyles::HybridNativePlatformSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::unistyles::HybridNativePlatformSpecSwift>(cppType);
|
39
39
|
#ifdef NITRO_DEBUG
|
40
40
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
@@ -53,7 +53,7 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
53
53
|
* Specialized version of `std::vector<UnistyleDependency>`.
|
54
54
|
*/
|
55
55
|
using std__vector_UnistyleDependency_ = std::vector<UnistyleDependency>;
|
56
|
-
inline std::vector<UnistyleDependency> create_std__vector_UnistyleDependency_(size_t size) {
|
56
|
+
inline std::vector<UnistyleDependency> create_std__vector_UnistyleDependency_(size_t size) noexcept {
|
57
57
|
std::vector<UnistyleDependency> vector;
|
58
58
|
vector.reserve(size);
|
59
59
|
return vector;
|
@@ -70,14 +70,14 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
70
70
|
class Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper final {
|
71
71
|
public:
|
72
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
|
-
inline void call(std::vector<UnistyleDependency> dependencies, UnistylesNativeMiniRuntime miniRuntime) const {
|
73
|
+
inline void call(std::vector<UnistyleDependency> dependencies, UnistylesNativeMiniRuntime miniRuntime) const noexcept {
|
74
74
|
_function->operator()(dependencies, miniRuntime);
|
75
75
|
}
|
76
76
|
private:
|
77
77
|
std::unique_ptr<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
|
78
78
|
} SWIFT_NONCOPYABLE;
|
79
|
-
Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper);
|
80
|
-
inline Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime value) {
|
79
|
+
Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) noexcept;
|
80
|
+
inline Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime value) noexcept {
|
81
81
|
return Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::move(value));
|
82
82
|
}
|
83
83
|
|
@@ -92,14 +92,14 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
92
92
|
class Func_void_UnistylesNativeMiniRuntime_Wrapper final {
|
93
93
|
public:
|
94
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
|
-
inline void call(UnistylesNativeMiniRuntime miniRuntime) const {
|
95
|
+
inline void call(UnistylesNativeMiniRuntime miniRuntime) const noexcept {
|
96
96
|
_function->operator()(miniRuntime);
|
97
97
|
}
|
98
98
|
private:
|
99
99
|
std::unique_ptr<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
|
100
100
|
} SWIFT_NONCOPYABLE;
|
101
|
-
Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper);
|
102
|
-
inline Func_void_UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_UnistylesNativeMiniRuntime(Func_void_UnistylesNativeMiniRuntime value) {
|
101
|
+
Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* _Nonnull swiftClosureWrapper) noexcept;
|
102
|
+
inline Func_void_UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_UnistylesNativeMiniRuntime(Func_void_UnistylesNativeMiniRuntime value) noexcept {
|
103
103
|
return Func_void_UnistylesNativeMiniRuntime_Wrapper(std::move(value));
|
104
104
|
}
|
105
105
|
|
@@ -108,91 +108,91 @@ namespace margelo::nitro::unistyles::bridge::swift {
|
|
108
108
|
* Specialized version of `std::shared_ptr<HybridNativePlatformSpec>`.
|
109
109
|
*/
|
110
110
|
using std__shared_ptr_HybridNativePlatformSpec_ = std::shared_ptr<HybridNativePlatformSpec>;
|
111
|
-
std::shared_ptr<HybridNativePlatformSpec> create_std__shared_ptr_HybridNativePlatformSpec_(void* _Nonnull swiftUnsafePointer);
|
112
|
-
void* _Nonnull get_std__shared_ptr_HybridNativePlatformSpec_(std__shared_ptr_HybridNativePlatformSpec_ cppType);
|
111
|
+
std::shared_ptr<HybridNativePlatformSpec> create_std__shared_ptr_HybridNativePlatformSpec_(void* _Nonnull swiftUnsafePointer) noexcept;
|
112
|
+
void* _Nonnull get_std__shared_ptr_HybridNativePlatformSpec_(std__shared_ptr_HybridNativePlatformSpec_ cppType) noexcept;
|
113
113
|
|
114
114
|
// pragma MARK: std::weak_ptr<HybridNativePlatformSpec>
|
115
115
|
using std__weak_ptr_HybridNativePlatformSpec_ = std::weak_ptr<HybridNativePlatformSpec>;
|
116
|
-
inline std__weak_ptr_HybridNativePlatformSpec_ weakify_std__shared_ptr_HybridNativePlatformSpec_(const std::shared_ptr<HybridNativePlatformSpec>& strong) { return strong; }
|
116
|
+
inline std__weak_ptr_HybridNativePlatformSpec_ weakify_std__shared_ptr_HybridNativePlatformSpec_(const std::shared_ptr<HybridNativePlatformSpec>& strong) noexcept { return strong; }
|
117
117
|
|
118
118
|
// pragma MARK: Result<Insets>
|
119
119
|
using Result_Insets_ = Result<Insets>;
|
120
|
-
inline Result_Insets_ create_Result_Insets_(const Insets& value) {
|
120
|
+
inline Result_Insets_ create_Result_Insets_(const Insets& value) noexcept {
|
121
121
|
return Result<Insets>::withValue(value);
|
122
122
|
}
|
123
|
-
inline Result_Insets_ create_Result_Insets_(const std::exception_ptr& error) {
|
123
|
+
inline Result_Insets_ create_Result_Insets_(const std::exception_ptr& error) noexcept {
|
124
124
|
return Result<Insets>::withError(error);
|
125
125
|
}
|
126
126
|
|
127
127
|
// pragma MARK: Result<ColorScheme>
|
128
128
|
using Result_ColorScheme_ = Result<ColorScheme>;
|
129
|
-
inline Result_ColorScheme_ create_Result_ColorScheme_(ColorScheme value) {
|
129
|
+
inline Result_ColorScheme_ create_Result_ColorScheme_(ColorScheme value) noexcept {
|
130
130
|
return Result<ColorScheme>::withValue(std::move(value));
|
131
131
|
}
|
132
|
-
inline Result_ColorScheme_ create_Result_ColorScheme_(const std::exception_ptr& error) {
|
132
|
+
inline Result_ColorScheme_ create_Result_ColorScheme_(const std::exception_ptr& error) noexcept {
|
133
133
|
return Result<ColorScheme>::withError(error);
|
134
134
|
}
|
135
135
|
|
136
136
|
// pragma MARK: Result<double>
|
137
137
|
using Result_double_ = Result<double>;
|
138
|
-
inline Result_double_ create_Result_double_(double value) {
|
138
|
+
inline Result_double_ create_Result_double_(double value) noexcept {
|
139
139
|
return Result<double>::withValue(std::move(value));
|
140
140
|
}
|
141
|
-
inline Result_double_ create_Result_double_(const std::exception_ptr& error) {
|
141
|
+
inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
|
142
142
|
return Result<double>::withError(error);
|
143
143
|
}
|
144
144
|
|
145
145
|
// pragma MARK: Result<Orientation>
|
146
146
|
using Result_Orientation_ = Result<Orientation>;
|
147
|
-
inline Result_Orientation_ create_Result_Orientation_(Orientation value) {
|
147
|
+
inline Result_Orientation_ create_Result_Orientation_(Orientation value) noexcept {
|
148
148
|
return Result<Orientation>::withValue(std::move(value));
|
149
149
|
}
|
150
|
-
inline Result_Orientation_ create_Result_Orientation_(const std::exception_ptr& error) {
|
150
|
+
inline Result_Orientation_ create_Result_Orientation_(const std::exception_ptr& error) noexcept {
|
151
151
|
return Result<Orientation>::withError(error);
|
152
152
|
}
|
153
153
|
|
154
154
|
// pragma MARK: Result<std::string>
|
155
155
|
using Result_std__string_ = Result<std::string>;
|
156
|
-
inline Result_std__string_ create_Result_std__string_(const std::string& value) {
|
156
|
+
inline Result_std__string_ create_Result_std__string_(const std::string& value) noexcept {
|
157
157
|
return Result<std::string>::withValue(value);
|
158
158
|
}
|
159
|
-
inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) {
|
159
|
+
inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) noexcept {
|
160
160
|
return Result<std::string>::withError(error);
|
161
161
|
}
|
162
162
|
|
163
163
|
// pragma MARK: Result<Dimensions>
|
164
164
|
using Result_Dimensions_ = Result<Dimensions>;
|
165
|
-
inline Result_Dimensions_ create_Result_Dimensions_(const Dimensions& value) {
|
165
|
+
inline Result_Dimensions_ create_Result_Dimensions_(const Dimensions& value) noexcept {
|
166
166
|
return Result<Dimensions>::withValue(value);
|
167
167
|
}
|
168
|
-
inline Result_Dimensions_ create_Result_Dimensions_(const std::exception_ptr& error) {
|
168
|
+
inline Result_Dimensions_ create_Result_Dimensions_(const std::exception_ptr& error) noexcept {
|
169
169
|
return Result<Dimensions>::withError(error);
|
170
170
|
}
|
171
171
|
|
172
172
|
// pragma MARK: Result<bool>
|
173
173
|
using Result_bool_ = Result<bool>;
|
174
|
-
inline Result_bool_ create_Result_bool_(bool value) {
|
174
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
175
175
|
return Result<bool>::withValue(std::move(value));
|
176
176
|
}
|
177
|
-
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) {
|
177
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
178
178
|
return Result<bool>::withError(error);
|
179
179
|
}
|
180
180
|
|
181
181
|
// pragma MARK: Result<void>
|
182
182
|
using Result_void_ = Result<void>;
|
183
|
-
inline Result_void_ create_Result_void_() {
|
183
|
+
inline Result_void_ create_Result_void_() noexcept {
|
184
184
|
return Result<void>::withValue();
|
185
185
|
}
|
186
|
-
inline Result_void_ create_Result_void_(const std::exception_ptr& error) {
|
186
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
187
187
|
return Result<void>::withError(error);
|
188
188
|
}
|
189
189
|
|
190
190
|
// pragma MARK: Result<UnistylesNativeMiniRuntime>
|
191
191
|
using Result_UnistylesNativeMiniRuntime_ = Result<UnistylesNativeMiniRuntime>;
|
192
|
-
inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const UnistylesNativeMiniRuntime& value) {
|
192
|
+
inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const UnistylesNativeMiniRuntime& value) noexcept {
|
193
193
|
return Result<UnistylesNativeMiniRuntime>::withValue(value);
|
194
194
|
}
|
195
|
-
inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const std::exception_ptr& error) {
|
195
|
+
inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const std::exception_ptr& error) noexcept {
|
196
196
|
return Result<UnistylesNativeMiniRuntime>::withError(error);
|
197
197
|
}
|
198
198
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.11",
|
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.
|
151
|
+
"nitro-codegen": "0.29.3",
|
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.
|
155
|
+
"react-native-nitro-modules": "0.29.3",
|
156
156
|
"react-native-reanimated": "3.17.5",
|
157
157
|
"react-native-web": "0.20.0",
|
158
158
|
"react-test-renderer": "19.1.0",
|
@@ -213,7 +213,47 @@
|
|
213
213
|
},
|
214
214
|
"plugins": {
|
215
215
|
"@release-it/conventional-changelog": {
|
216
|
-
"
|
216
|
+
"writerOpts": {
|
217
|
+
"groupBy": "type",
|
218
|
+
"commitGroupsSort": [
|
219
|
+
"feat",
|
220
|
+
"fix",
|
221
|
+
"perf",
|
222
|
+
"refactor",
|
223
|
+
"docs",
|
224
|
+
"chore"
|
225
|
+
],
|
226
|
+
"commitsSort": [
|
227
|
+
"scope",
|
228
|
+
"subject"
|
229
|
+
]
|
230
|
+
},
|
231
|
+
"types": [
|
232
|
+
{
|
233
|
+
"type": "feat",
|
234
|
+
"section": "Features"
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"type": "fix",
|
238
|
+
"section": "Bug Fixes"
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"type": "perf",
|
242
|
+
"section": "Performance Improvements"
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"type": "refactor",
|
246
|
+
"section": "Code Refactoring"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"type": "docs",
|
250
|
+
"section": "Documentation"
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"type": "chore",
|
254
|
+
"section": "Maintenance"
|
255
|
+
}
|
256
|
+
]
|
217
257
|
}
|
218
258
|
}
|
219
259
|
},
|
package/src/index.ts
CHANGED
@@ -10,6 +10,6 @@ export { StyleSheet, UnistylesRuntime, StatusBar, NavigationBar } from './specs'
|
|
10
10
|
export { mq } from './mq'
|
11
11
|
export type { UnistylesThemes, UnistylesBreakpoints } from './global'
|
12
12
|
export { withUnistyles, useUnistyles, createUnistylesElement } from './core'
|
13
|
-
export type { UnistylesVariants } from './types'
|
13
|
+
export type { UnistylesVariants, IOSContentSizeCategory, AndroidContentSizeCategory } from './types'
|
14
14
|
export { Display, Hide, ScopedTheme } from './components'
|
15
15
|
export { useServerUnistyles, hydrateServerUnistyles, getServerUnistyles, resetServerUnistyles } from './server'
|
package/src/web/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
+
import { StyleSheet as RNStyleSheet } from 'react-native'
|
1
2
|
import type { UnistylesShadowRegistry as NativeUnistylesShadowRegistry } from '../specs/ShadowRegistry'
|
2
3
|
import type { StyleSheet as NativeStyleSheet } from '../specs/StyleSheet'
|
3
4
|
import type { Runtime as NativeUnistylesRuntime } from '../specs/UnistylesRuntime'
|
4
|
-
import { deepMergeObjects } from '../utils'
|
5
5
|
import { create } from './create'
|
6
6
|
import * as unistyles from './services'
|
7
7
|
|
@@ -22,8 +22,8 @@ export const StyleSheet = {
|
|
22
22
|
right: 0,
|
23
23
|
bottom: 0
|
24
24
|
},
|
25
|
-
compose: (a: object, b: object) =>
|
26
|
-
flatten: (...styles: Array<object>) =>
|
25
|
+
compose: (a: object, b: object) => RNStyleSheet.compose(a, b),
|
26
|
+
flatten: (...styles: Array<object>) => RNStyleSheet.flatten(...styles),
|
27
27
|
hairlineWidth: 1
|
28
28
|
} as unknown as typeof NativeStyleSheet
|
29
29
|
|