react-native-unistyles 3.0.0-alpha.38 → 3.0.0-alpha.39
Sign up to get free protection for your applications and to get access to all the features.
- package/android/build.gradle +4 -4
- package/android/src/main/java/com/unistyles/NativePlatform+android.kt +13 -30
- package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +22 -18
- package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +10 -5
- package/cxx/core/UnistyleWrapper.h +27 -10
- package/cxx/core/UnistylesRegistry.cpp +34 -10
- package/cxx/core/UnistylesRegistry.h +2 -2
- package/cxx/hybridObjects/HybridNavigationBar.cpp +0 -4
- package/cxx/hybridObjects/HybridNavigationBar.h +0 -1
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +7 -3
- package/cxx/hybridObjects/HybridStatusBar.cpp +0 -4
- package/cxx/hybridObjects/HybridStatusBar.h +0 -1
- package/cxx/hybridObjects/HybridStyleSheet.cpp +59 -28
- package/cxx/hybridObjects/HybridStyleSheet.h +7 -3
- package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +37 -6
- package/cxx/hybridObjects/HybridUnistylesRuntime.h +7 -3
- package/cxx/parser/Parser.cpp +7 -7
- package/cxx/parser/Parser.h +2 -2
- package/ios/NativePlatform+ios.swift +2 -4
- package/ios/NativePlatform+keyboard.swift +1 -1
- package/ios/NativePlatformListener+ios.swift +6 -6
- package/ios/UnistylesModuleOnLoad.h +1 -6
- package/lib/commonjs/core/createUnistylesComponent.js +27 -20
- package/lib/commonjs/core/createUnistylesComponent.js.map +1 -1
- package/lib/commonjs/core/createUnistylesComponent.native.js +14 -17
- package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -1
- package/lib/commonjs/specs/NavigtionBar/index.js +0 -15
- package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +5 -7
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StatusBar/index.js +0 -5
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js +0 -2
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/commonjs/utils.js +26 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +1 -1
- package/lib/commonjs/web/convert/object/boxShadow.js +2 -1
- package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -1
- package/lib/commonjs/web/convert/object/objectStyle.js +3 -2
- package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -1
- package/lib/commonjs/web/convert/shadow/boxShadow.js +1 -1
- package/lib/commonjs/web/convert/shadow/textShadow.js +1 -1
- package/lib/commonjs/web/create.js +2 -1
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/index.js +1 -1
- package/lib/commonjs/web/listener.js +18 -2
- package/lib/commonjs/web/listener.js.map +1 -1
- package/lib/commonjs/web/mock.js +1 -2
- package/lib/commonjs/web/mock.js.map +1 -1
- package/lib/commonjs/web/runtime.js +5 -2
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/shadowRegistry.js +53 -73
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/utils/common.js +1 -24
- package/lib/commonjs/web/utils/common.js.map +1 -1
- package/lib/commonjs/web/utils/unistyle.js.map +1 -1
- package/lib/commonjs/web/variants/getVariants.js +1 -1
- package/lib/module/core/createUnistylesComponent.js +28 -21
- package/lib/module/core/createUnistylesComponent.js.map +1 -1
- package/lib/module/core/createUnistylesComponent.native.js +15 -18
- package/lib/module/core/createUnistylesComponent.native.js.map +1 -1
- package/lib/module/specs/NavigtionBar/index.js +0 -10
- package/lib/module/specs/NavigtionBar/index.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +5 -7
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StatusBar/index.js +1 -6
- package/lib/module/specs/StatusBar/index.js.map +1 -1
- package/lib/module/specs/UnistylesRuntime/index.js +0 -2
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/module/utils.js +21 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/web/convert/index.js +1 -1
- package/lib/module/web/convert/index.js.map +1 -1
- package/lib/module/web/convert/object/boxShadow.js +2 -1
- package/lib/module/web/convert/object/boxShadow.js.map +1 -1
- package/lib/module/web/convert/object/objectStyle.js +2 -1
- package/lib/module/web/convert/object/objectStyle.js.map +1 -1
- package/lib/module/web/convert/shadow/boxShadow.js +1 -1
- package/lib/module/web/convert/shadow/boxShadow.js.map +1 -1
- package/lib/module/web/convert/shadow/textShadow.js +1 -1
- package/lib/module/web/convert/shadow/textShadow.js.map +1 -1
- package/lib/module/web/create.js +2 -1
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/index.js +1 -1
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/listener.js +18 -2
- package/lib/module/web/listener.js.map +1 -1
- package/lib/module/web/mock.js +1 -2
- package/lib/module/web/mock.js.map +1 -1
- package/lib/module/web/runtime.js +6 -3
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/shadowRegistry.js +51 -71
- package/lib/module/web/shadowRegistry.js.map +1 -1
- package/lib/module/web/utils/common.js +0 -22
- package/lib/module/web/utils/common.js.map +1 -1
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/module/web/variants/getVariants.js +1 -1
- package/lib/module/web/variants/getVariants.js.map +1 -1
- package/lib/typescript/src/core/createUnistylesComponent.d.ts +1 -1
- package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +1 -1
- package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +2 -4
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts +0 -1
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts +1 -15
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +3 -3
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts +0 -1
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/index.d.ts +2 -9
- package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +2 -0
- package/lib/typescript/src/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/mock.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts +1 -1
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/shadowRegistry.d.ts +1 -3
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/common.d.ts +0 -4
- package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +57 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +8 -16
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +2 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void_std__vector_UnistyleDependency_.kt → Func_void_UnistylesNativeMiniRuntime.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void.kt → Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +4 -12
- package/nitrogen/generated/android/unistylesOnLoad.cpp +4 -4
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +43 -30
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +2 -8
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +2 -4
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +10 -32
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +0 -2
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +2 -4
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +0 -1
- package/package.json +4 -2
- package/plugin/common.js +12 -1
- package/plugin/index.js +12 -10
- package/plugin/ref.js +80 -15
- package/plugin/style.js +113 -18
- package/src/core/createUnistylesComponent.native.tsx +15 -22
- package/src/core/createUnistylesComponent.tsx +29 -23
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +2 -4
- package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +0 -1
- package/src/specs/NavigtionBar/index.ts +1 -30
- package/src/specs/ShadowRegistry/index.ts +8 -11
- package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +0 -1
- package/src/specs/StatusBar/index.ts +2 -17
- package/src/specs/UnistylesRuntime/index.ts +1 -2
- package/src/utils.ts +22 -0
- package/src/web/convert/index.ts +1 -1
- package/src/web/convert/object/boxShadow.ts +2 -1
- package/src/web/convert/object/objectStyle.ts +2 -1
- package/src/web/convert/shadow/boxShadow.ts +1 -1
- package/src/web/convert/shadow/textShadow.ts +1 -1
- package/src/web/create.ts +2 -1
- package/src/web/index.ts +1 -1
- package/src/web/listener.ts +22 -2
- package/src/web/mock.ts +1 -2
- package/src/web/runtime.ts +7 -3
- package/src/web/shadowRegistry.ts +55 -70
- package/src/web/utils/common.ts +0 -26
- package/src/web/utils/unistyle.ts +1 -1
- package/src/web/variants/getVariants.ts +1 -1
- package/nitrogen/generated/android/c++/JFunc_void.hpp +0 -48
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +0 -60
@@ -1,48 +0,0 @@
|
|
1
|
-
///
|
2
|
-
/// JFunc_void.hpp
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
4
|
-
/// https://github.com/mrousavy/nitro
|
5
|
-
/// Copyright © 2024 Marc Rousavy @ Margelo
|
6
|
-
///
|
7
|
-
|
8
|
-
#pragma once
|
9
|
-
|
10
|
-
#include <fbjni/fbjni.h>
|
11
|
-
#include <functional>
|
12
|
-
|
13
|
-
#include <functional>
|
14
|
-
|
15
|
-
namespace margelo::nitro::unistyles {
|
16
|
-
|
17
|
-
using namespace facebook;
|
18
|
-
|
19
|
-
/**
|
20
|
-
* C++ representation of the callback Func_void.
|
21
|
-
* This is a Kotlin `() -> Unit`, backed by a `std::function<...>`.
|
22
|
-
*/
|
23
|
-
struct JFunc_void final: public jni::HybridClass<JFunc_void> {
|
24
|
-
public:
|
25
|
-
static jni::local_ref<JFunc_void::javaobject> fromCpp(const std::function<void()>& func) {
|
26
|
-
return JFunc_void::newObjectCxxArgs(func);
|
27
|
-
}
|
28
|
-
|
29
|
-
public:
|
30
|
-
void call() {
|
31
|
-
return _func();
|
32
|
-
}
|
33
|
-
|
34
|
-
public:
|
35
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/unistyles/Func_void;";
|
36
|
-
static void registerNatives() {
|
37
|
-
registerHybrid({makeNativeMethod("call", JFunc_void::call)});
|
38
|
-
}
|
39
|
-
|
40
|
-
private:
|
41
|
-
explicit JFunc_void(const std::function<void()>& func): _func(func) { }
|
42
|
-
|
43
|
-
private:
|
44
|
-
friend HybridBase;
|
45
|
-
std::function<void()> _func;
|
46
|
-
};
|
47
|
-
|
48
|
-
} // namespace margelo::nitro::unistyles
|
@@ -1,60 +0,0 @@
|
|
1
|
-
///
|
2
|
-
/// JFunc_void_std__vector_UnistyleDependency_.hpp
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
4
|
-
/// https://github.com/mrousavy/nitro
|
5
|
-
/// Copyright © 2024 Marc Rousavy @ Margelo
|
6
|
-
///
|
7
|
-
|
8
|
-
#pragma once
|
9
|
-
|
10
|
-
#include <fbjni/fbjni.h>
|
11
|
-
#include <functional>
|
12
|
-
|
13
|
-
#include <functional>
|
14
|
-
#include <vector>
|
15
|
-
#include "UnistyleDependency.hpp"
|
16
|
-
#include "JUnistyleDependency.hpp"
|
17
|
-
|
18
|
-
namespace margelo::nitro::unistyles {
|
19
|
-
|
20
|
-
using namespace facebook;
|
21
|
-
|
22
|
-
/**
|
23
|
-
* C++ representation of the callback Func_void_std__vector_UnistyleDependency_.
|
24
|
-
* This is a Kotlin `(dependencies: Array<UnistyleDependency>) -> Unit`, backed by a `std::function<...>`.
|
25
|
-
*/
|
26
|
-
struct JFunc_void_std__vector_UnistyleDependency_ final: public jni::HybridClass<JFunc_void_std__vector_UnistyleDependency_> {
|
27
|
-
public:
|
28
|
-
static jni::local_ref<JFunc_void_std__vector_UnistyleDependency_::javaobject> fromCpp(const std::function<void(const std::vector<UnistyleDependency>& /* dependencies */)>& func) {
|
29
|
-
return JFunc_void_std__vector_UnistyleDependency_::newObjectCxxArgs(func);
|
30
|
-
}
|
31
|
-
|
32
|
-
public:
|
33
|
-
void call(jni::alias_ref<jni::JArrayClass<JUnistyleDependency>> dependencies) {
|
34
|
-
return _func([&]() {
|
35
|
-
size_t __size = dependencies->size();
|
36
|
-
std::vector<UnistyleDependency> __vector;
|
37
|
-
__vector.reserve(__size);
|
38
|
-
for (size_t __i = 0; __i < __size; __i++) {
|
39
|
-
auto __element = dependencies->getElement(__i);
|
40
|
-
__vector.push_back(__element->toCpp());
|
41
|
-
}
|
42
|
-
return __vector;
|
43
|
-
}());
|
44
|
-
}
|
45
|
-
|
46
|
-
public:
|
47
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency_;";
|
48
|
-
static void registerNatives() {
|
49
|
-
registerHybrid({makeNativeMethod("call", JFunc_void_std__vector_UnistyleDependency_::call)});
|
50
|
-
}
|
51
|
-
|
52
|
-
private:
|
53
|
-
explicit JFunc_void_std__vector_UnistyleDependency_(const std::function<void(const std::vector<UnistyleDependency>& /* dependencies */)>& func): _func(func) { }
|
54
|
-
|
55
|
-
private:
|
56
|
-
friend HybridBase;
|
57
|
-
std::function<void(const std::vector<UnistyleDependency>& /* dependencies */)> _func;
|
58
|
-
};
|
59
|
-
|
60
|
-
} // namespace margelo::nitro::unistyles
|