react-native-unistyles 3.0.0-alpha.28 → 3.0.0-alpha.29
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -0
- package/android/CMakeLists.txt +12 -21
- package/cxx/core/UnistylesMountHook.cpp +0 -10
- package/cxx/core/UnistylesMountHook.h +3 -8
- package/cxx/hybridObjects/HybridStyleSheet.cpp +66 -32
- package/cxx/hybridObjects/HybridStyleSheet.h +9 -1
- package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +15 -7
- package/cxx/hybridObjects/HybridUnistylesRuntime.h +5 -1
- package/cxx/parser/Parser.cpp +0 -1
- package/ios/NativePlatform+ios.swift +16 -5
- package/ios/NativePlatform+keyboard.swift +83 -0
- package/ios/NativePlatformListener+ios.swift +19 -6
- package/ios/UnistylesModuleOnLoad.h +3 -1
- package/ios/UnistylesModuleOnLoad.mm +11 -1
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mq.js +4 -1
- package/lib/commonjs/mq.js.map +1 -2
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +1 -0
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -2
- package/lib/commonjs/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +1 -1
- package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -2
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -2
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -3
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +2 -1
- package/lib/commonjs/specs/TurboUnistyles/index.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +2 -1
- package/lib/commonjs/specs/index.js.map +1 -1
- package/lib/commonjs/specs/index.web.js.map +2 -1
- package/lib/commonjs/web/convert/index.js +7 -1
- package/lib/commonjs/web/convert/shadow.js +5 -1
- package/lib/commonjs/web/convert/shadow.js.map +1 -2
- package/lib/commonjs/web/convert/textShadow.js +4 -1
- package/lib/commonjs/web/convert/textShadow.js.map +1 -2
- package/lib/commonjs/web/convert/transform.js.map +1 -2
- package/lib/commonjs/web/create.js +6 -5
- package/lib/commonjs/web/create.js.map +1 -2
- package/lib/commonjs/web/mock.js.map +1 -2
- package/lib/commonjs/web/registry.js +1 -4
- package/lib/commonjs/web/registry.js.map +1 -1
- package/lib/commonjs/web/runtime.js.map +1 -2
- package/lib/commonjs/web/shadowRegistry.js +1 -4
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/utils/common.js +3 -1
- package/lib/commonjs/web/utils/common.js.map +1 -2
- package/lib/commonjs/web/variants/index.js.map +1 -1
- package/lib/module/common.js.map +1 -1
- package/lib/module/core/useBreakpoint.js.map +1 -1
- package/lib/module/core/useBreakpoint.native.js.map +1 -2
- package/lib/module/core/useTheme.js.map +1 -2
- package/lib/module/core/useTheme.native.js.map +1 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/mq.js +4 -1
- package/lib/module/mq.js.map +1 -2
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +7 -5
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +2 -1
- package/lib/module/specs/NavigtionBar/index.js.map +1 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -2
- package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +2 -1
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -2
- package/lib/module/specs/index.js.map +2 -1
- package/lib/module/specs/types.js +10 -10
- package/lib/module/specs/types.js.map +2 -1
- package/lib/module/web/convert/boxShadow.js +4 -1
- package/lib/module/web/convert/boxShadow.js.map +1 -2
- package/lib/module/web/convert/pseudo.js.map +1 -2
- package/lib/module/web/convert/shadow.js +5 -1
- package/lib/module/web/convert/shadow.js.map +1 -2
- package/lib/module/web/convert/style.js.map +1 -2
- package/lib/module/web/convert/textShadow.js +4 -1
- package/lib/module/web/convert/textShadow.js.map +1 -2
- package/lib/module/web/convert/transform.js.map +1 -2
- package/lib/module/web/convert/utils.js.map +1 -2
- package/lib/module/web/create.js +2 -5
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/index.js +2 -1
- package/lib/module/web/index.js.map +1 -2
- package/lib/module/web/listener.js.map +1 -2
- package/lib/module/web/mock.js.map +1 -2
- package/lib/module/web/registry.js +5 -6
- package/lib/module/web/registry.js.map +1 -2
- package/lib/module/web/runtime.js.map +1 -2
- package/lib/module/web/shadowRegistry.js +11 -6
- package/lib/module/web/shadowRegistry.js.map +1 -2
- package/lib/module/web/utils/index.js.map +1 -1
- package/lib/module/web/utils/unistyle.js.map +1 -2
- package/lib/module/web/variants/index.js.map +1 -1
- package/lib/module/web/variants/useVariants.js +2 -1
- package/lib/module/web/variants/useVariants.js.map +1 -2
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +4 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types/breakpoints.d.ts +11 -11
- package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -1
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void.hpp +48 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +9 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +3 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void.kt +45 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
- package/nitrogen/generated/android/unistylesOnLoad.cpp +2 -0
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +29 -1
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +6 -0
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +27 -0
- package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
- package/package.json +1 -1
- package/plugin/common.js +9 -0
- package/plugin/stylesheet.js +7 -1
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +5 -2
- package/src/types/breakpoints.ts +25 -13
- package/src/web/create.ts +2 -5
- package/src/web/registry.ts +2 -5
- package/src/web/shadowRegistry.ts +2 -5
- package/src/common.js +0 -4
- package/src/core/index.js +0 -2
- package/src/core/useBreakpoint.js +0 -14
- package/src/core/useBreakpoint.native.js +0 -16
- package/src/core/useTheme.js +0 -14
- package/src/core/useTheme.native.js +0 -16
- package/src/index.js +0 -3
- package/src/mq.js +0 -38
- package/src/web/convert/boxShadow.js +0 -59
- package/src/web/convert/index.js +0 -56
- package/src/web/convert/pseudo.js +0 -131
- package/src/web/convert/shadow.js +0 -50
- package/src/web/convert/style.js +0 -137
- package/src/web/convert/textShadow.js +0 -56
- package/src/web/convert/transform.js +0 -65
- package/src/web/convert/types.js +0 -2
- package/src/web/convert/utils.js +0 -39
- package/src/web/create.js +0 -39
- package/src/web/index.js +0 -22
- package/src/web/listener.js +0 -26
- package/src/web/mock.js +0 -21
- package/src/web/mq.js +0 -14
- package/src/web/registry.js +0 -168
- package/src/web/runtime.js +0 -160
- package/src/web/shadowRegistry.js +0 -99
- package/src/web/utils/common.js +0 -79
- package/src/web/utils/index.js +0 -2
- package/src/web/utils/unistyle.js +0 -72
- package/src/web/variants/getVariants.js +0 -26
- package/src/web/variants/index.js +0 -2
- package/src/web/variants/useVariants.js +0 -50
package/README.md
CHANGED
@@ -28,6 +28,7 @@ Install CocoaPods dependencies / generate native folders with Expo:
|
|
28
28
|
|
29
29
|
```shell
|
30
30
|
pod install
|
31
|
+
or
|
31
32
|
npx expo prebuild
|
32
33
|
```
|
33
34
|
|
@@ -68,6 +69,12 @@ npx expo prebuild
|
|
68
69
|
<a href="https://github.com/mwarger">
|
69
70
|
<img src="https://avatars.githubusercontent.com/u/686823?v=4" height="70px" width="70px" alt="mwarger" />
|
70
71
|
</a>
|
72
|
+
<a href="https://github.com/biw">
|
73
|
+
<img src="https://avatars.githubusercontent.com/u/6139501?v=4" height="70px" width="70px" alt="biw" />
|
74
|
+
</a>
|
75
|
+
<a href="https://github.com/happyfloat">
|
76
|
+
<img src="https://avatars.githubusercontent.com/u/186333704?s=200&v=4" height="70px" width="70px" alt="happyfloat" />
|
77
|
+
</a>
|
71
78
|
|
72
79
|
## Past sponsors
|
73
80
|
|
package/android/CMakeLists.txt
CHANGED
@@ -35,28 +35,19 @@ set_target_properties(unistyles PROPERTIES
|
|
35
35
|
find_package(ReactAndroid REQUIRED CONFIG)
|
36
36
|
find_package(fbjni REQUIRED CONFIG)
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
)
|
38
|
+
# REACTNATIVE_MERGED_SO doesnt work as of RN 0.76.0-rc.3
|
39
|
+
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
|
40
|
+
target_link_libraries(unistyles ReactAndroid::reactnative)
|
41
|
+
else()
|
42
|
+
target_link_libraries(unistyles
|
43
|
+
ReactAndroid::turbomodulejsijni
|
44
|
+
ReactAndroid::react_nativemodule_core
|
45
|
+
android
|
46
|
+
fbjni::fbjni
|
47
|
+
)
|
48
|
+
endif()
|
48
49
|
|
49
50
|
target_link_libraries(unistyles
|
50
51
|
ReactAndroid::jsi
|
51
|
-
|
52
|
-
ReactAndroid::react_nativemodule_core
|
53
|
-
android
|
54
|
-
ReactAndroid::react_render_core
|
55
|
-
ReactAndroid::runtimeexecutor
|
56
|
-
ReactAndroid::fabricjni
|
57
|
-
ReactAndroid::react_debug
|
58
|
-
ReactAndroid::react_render_core
|
59
|
-
ReactAndroid::react_render_componentregistry
|
60
|
-
ReactAndroid::rrc_view
|
61
|
-
ReactAndroid::folly_runtime
|
52
|
+
fbjni::fbjni
|
62
53
|
)
|
@@ -25,13 +25,3 @@ void core::UnistylesMountHook::shadowTreeDidMount(RootShadowNode::Shared const &
|
|
25
25
|
// so, resume Unistyles commits
|
26
26
|
registry.trafficController.resumeUnistylesTraffic();
|
27
27
|
}
|
28
|
-
|
29
|
-
shadow::ShadowLeafUpdates core::UnistylesMountHook::getUnistylesUpdates() {
|
30
|
-
auto& registry = core::UnistylesRegistry::get();
|
31
|
-
auto parser = parser::Parser(this->_unistylesRuntime);
|
32
|
-
auto dependencyMap = registry.buildDependencyMap(*this->_rt);
|
33
|
-
|
34
|
-
// don't rebuild dependency map, at this point it's already done
|
35
|
-
|
36
|
-
return parser.dependencyMapToShadowLeafUpdates(dependencyMap);
|
37
|
-
}
|
@@ -11,20 +11,15 @@ namespace margelo::nitro::unistyles::core {
|
|
11
11
|
using namespace facebook::react;
|
12
12
|
|
13
13
|
struct UnistylesMountHook : public UIManagerMountHook {
|
14
|
-
UnistylesMountHook(std::shared_ptr<UIManager> uiManager
|
15
|
-
|
16
|
-
|
17
|
-
}
|
14
|
+
UnistylesMountHook(std::shared_ptr<UIManager> uiManager) : _uiManager{uiManager} {
|
15
|
+
_uiManager->registerMountHook(*this);
|
16
|
+
}
|
18
17
|
|
19
18
|
~UnistylesMountHook() noexcept override;
|
20
19
|
|
21
20
|
void shadowTreeDidMount(RootShadowNode::Shared const &rootShadowNode, double mountTime) noexcept override;
|
22
21
|
|
23
|
-
shadow::ShadowLeafUpdates getUnistylesUpdates();
|
24
|
-
|
25
22
|
private:
|
26
|
-
jsi::Runtime* _rt;
|
27
|
-
std::shared_ptr<HybridUnistylesRuntime> _unistylesRuntime;
|
28
23
|
std::shared_ptr<UIManager> _uiManager;
|
29
24
|
};
|
30
25
|
|
@@ -67,9 +67,9 @@ jsi::Value HybridStyleSheet::configure(jsi::Runtime &rt, const jsi::Value &thisV
|
|
67
67
|
});
|
68
68
|
|
69
69
|
verifyAndSelectTheme(rt);
|
70
|
-
|
70
|
+
|
71
71
|
auto& state = core::UnistylesRegistry::get().getState(rt);
|
72
|
-
|
72
|
+
|
73
73
|
state.hasUserConfig = true;
|
74
74
|
|
75
75
|
return jsi::Value::undefined();
|
@@ -80,10 +80,10 @@ jsi::Value HybridStyleSheet::init(jsi::Runtime &rt, const jsi::Value &thisVal, c
|
|
80
80
|
auto& registry = core::UnistylesRegistry::get();
|
81
81
|
|
82
82
|
registry.createState(rt);
|
83
|
-
|
83
|
+
|
84
84
|
loadExternalMethods(thisVal, rt);
|
85
85
|
registerHooks(rt);
|
86
|
-
|
86
|
+
|
87
87
|
return jsi::Value::undefined();
|
88
88
|
}
|
89
89
|
|
@@ -227,50 +227,84 @@ void HybridStyleSheet::loadExternalMethods(const jsi::Value& thisValue, jsi::Run
|
|
227
227
|
|
228
228
|
void HybridStyleSheet::registerHooks(jsi::Runtime& rt) {
|
229
229
|
this->_unistylesCommitHook = std::make_shared<core::UnistylesCommitHook>(this->_uiManager, this->_unistylesRuntime, rt);
|
230
|
-
this->_unistylesMountHook = std::make_shared<core::UnistylesMountHook>(this->_uiManager
|
230
|
+
this->_unistylesMountHook = std::make_shared<core::UnistylesMountHook>(this->_uiManager);
|
231
231
|
}
|
232
232
|
|
233
233
|
void HybridStyleSheet::onPlatformDependenciesChange(std::vector<UnistyleDependency> dependencies) {
|
234
|
-
|
235
|
-
|
236
|
-
auto& rt = this->_unistylesRuntime->getRuntime();
|
237
|
-
|
238
|
-
// re-compute new breakpoint
|
239
|
-
auto dimensionsIt = std::find(dependencies.begin(), dependencies.end(), UnistyleDependency::DIMENSIONS);
|
240
|
-
|
241
|
-
if (dimensionsIt != dependencies.end()) {
|
242
|
-
registry.getState(rt).computeCurrentBreakpoint(this->_unistylesRuntime->getScreen().width);
|
234
|
+
if (this->_unistylesRuntime == nullptr) {
|
235
|
+
return;
|
243
236
|
}
|
244
237
|
|
245
|
-
|
246
|
-
|
247
|
-
|
238
|
+
this->_unistylesRuntime->runOnJSThread([this, &dependencies](jsi::Runtime& rt){
|
239
|
+
auto& registry = core::UnistylesRegistry::get();
|
240
|
+
auto parser = parser::Parser(this->_unistylesRuntime);
|
248
241
|
|
249
|
-
|
250
|
-
|
251
|
-
// we need to rebuild all dependent StyleSheets as well
|
252
|
-
auto dependentStyleSheets = registry.getStyleSheetsToRefresh(rt, hasNewColorScheme, dependencies.size() > 1);
|
242
|
+
// re-compute new breakpoint
|
243
|
+
auto dimensionsIt = std::find(dependencies.begin(), dependencies.end(), UnistyleDependency::DIMENSIONS);
|
253
244
|
|
254
|
-
|
255
|
-
|
256
|
-
|
245
|
+
if (dimensionsIt != dependencies.end()) {
|
246
|
+
registry.getState(rt).computeCurrentBreakpoint(this->_unistylesRuntime->getScreen().width);
|
247
|
+
}
|
248
|
+
|
249
|
+
// check if color scheme changed and then if Unistyles state depend on it (adaptive themes)
|
250
|
+
auto colorSchemeIt = std::find(dependencies.begin(), dependencies.end(), UnistyleDependency::COLORSCHEME);
|
251
|
+
auto hasNewColorScheme = colorSchemeIt != dependencies.end();
|
257
252
|
|
258
|
-
|
253
|
+
// in a later step, we will rebuild only Unistyles with mounted StyleSheets
|
254
|
+
// however, user may have StyleSheets with components that haven't mounted yet
|
255
|
+
// we need to rebuild all dependent StyleSheets as well
|
256
|
+
auto dependentStyleSheets = registry.getStyleSheetsToRefresh(rt, hasNewColorScheme, dependencies.size() > 1);
|
257
|
+
|
258
|
+
if (hasNewColorScheme) {
|
259
|
+
this->_unistylesRuntime->includeDependenciesForColorSchemeChange(dependencies);
|
260
|
+
}
|
259
261
|
|
260
|
-
|
262
|
+
this->notifyJSListeners(dependencies);
|
261
263
|
|
262
|
-
|
264
|
+
auto dependencyMap = registry.buildDependencyMap(rt, dependencies);
|
265
|
+
|
266
|
+
if (dependencyMap.size() == 0) {
|
267
|
+
return;
|
268
|
+
}
|
269
|
+
|
270
|
+
parser.rebuildUnistylesInDependencyMap(rt, dependencyMap, dependentStyleSheets);
|
271
|
+
|
272
|
+
// this is required, otherwise shadow tree will ignore Unistyles commit
|
273
|
+
registry.trafficController.setHasUnistylesCommit(true);
|
274
|
+
|
275
|
+
auto shadowLeafUpdates = parser.dependencyMapToShadowLeafUpdates(dependencyMap);
|
276
|
+
|
277
|
+
shadow::ShadowTreeManager::updateShadowTree(rt, shadowLeafUpdates);
|
278
|
+
});
|
279
|
+
}
|
280
|
+
|
281
|
+
void HybridStyleSheet::onImeChange() {
|
282
|
+
if (this->_unistylesRuntime == nullptr) {
|
263
283
|
return;
|
264
284
|
}
|
265
285
|
|
266
|
-
|
286
|
+
this->_unistylesRuntime->runOnJSThread([this](jsi::Runtime& rt){
|
287
|
+
auto& registry = core::UnistylesRegistry::get();
|
288
|
+
auto parser = parser::Parser(this->_unistylesRuntime);
|
289
|
+
std::vector<UnistyleDependency> dependencies{UnistyleDependency::IME};
|
267
290
|
|
268
|
-
|
269
|
-
registry.trafficController.setHasUnistylesCommit(true);
|
291
|
+
this->notifyJSListeners(dependencies);
|
270
292
|
|
271
|
-
|
293
|
+
auto dependencyMap = registry.buildDependencyMap(rt, dependencies);
|
272
294
|
|
273
|
-
|
295
|
+
if (dependencyMap.size() == 0) {
|
296
|
+
return;
|
297
|
+
}
|
298
|
+
|
299
|
+
parser.rebuildUnistylesInDependencyMap(rt, dependencyMap, {});
|
300
|
+
|
301
|
+
// this is required, otherwise shadow tree will ignore Unistyles commit
|
302
|
+
registry.trafficController.setHasUnistylesCommit(true);
|
303
|
+
|
304
|
+
auto shadowLeafUpdates = parser.dependencyMapToShadowLeafUpdates(dependencyMap);
|
305
|
+
|
306
|
+
shadow::ShadowTreeManager::updateShadowTree(rt, shadowLeafUpdates);
|
307
|
+
});
|
274
308
|
}
|
275
309
|
|
276
310
|
void HybridStyleSheet::notifyJSListeners(std::vector<UnistyleDependency>& dependencies) {
|
@@ -22,7 +22,14 @@ struct HybridStyleSheet: public HybridUnistylesStyleSheetSpec {
|
|
22
22
|
this->_unistylesRuntime->registerPlatformListener(
|
23
23
|
std::bind(&HybridStyleSheet::onPlatformDependenciesChange, this, std::placeholders::_1)
|
24
24
|
);
|
25
|
+
this->_unistylesRuntime->registerImeListener(
|
26
|
+
std::bind(&HybridStyleSheet::onImeChange, this)
|
27
|
+
);
|
25
28
|
}
|
29
|
+
|
30
|
+
~HybridStyleSheet() {
|
31
|
+
this->_unistylesRuntime->unregisterPlatformListeners();
|
32
|
+
}
|
26
33
|
|
27
34
|
jsi::Value create(jsi::Runtime& rt,
|
28
35
|
const jsi::Value& thisValue,
|
@@ -50,7 +57,7 @@ struct HybridStyleSheet: public HybridUnistylesStyleSheetSpec {
|
|
50
57
|
double getHairlineWidth() override;
|
51
58
|
double getUnid() override;
|
52
59
|
std::function<void ()> addChangeListener(const std::function<void (const std::vector<UnistyleDependency> &)>& onChanged) override;
|
53
|
-
|
60
|
+
|
54
61
|
private:
|
55
62
|
void parseSettings(jsi::Runtime& rt, jsi::Object settings);
|
56
63
|
void parseBreakpoints(jsi::Runtime& rt, jsi::Object breakpoints);
|
@@ -60,6 +67,7 @@ private:
|
|
60
67
|
void loadExternalMethods(const jsi::Value& thisValue, jsi::Runtime& rt);
|
61
68
|
void registerHooks(jsi::Runtime& rt);
|
62
69
|
void onPlatformDependenciesChange(std::vector<UnistyleDependency> dependencies);
|
70
|
+
void onImeChange();
|
63
71
|
void notifyJSListeners(std::vector<UnistyleDependency>& dependencies);
|
64
72
|
|
65
73
|
double __unid = -1;
|
@@ -114,19 +114,19 @@ void HybridUnistylesRuntime::calculateNewThemeAndDependencies(std::vector<Unisty
|
|
114
114
|
|
115
115
|
jsi::Value HybridUnistylesRuntime::getTheme(jsi::Runtime &rt, const jsi::Value &thisValue, const jsi::Value *args, size_t count) {
|
116
116
|
helpers::assertThat(rt, count <= 1, "UnistylesRuntime.getTheme expected to be called with 0 or 1 argument.");
|
117
|
-
|
117
|
+
|
118
118
|
auto& state = core::UnistylesRegistry::get().getState(*_rt);
|
119
|
-
|
119
|
+
|
120
120
|
if (count == 1) {
|
121
121
|
helpers::assertThat(rt, args[0].isString(), "UnistylesRuntime.getTheme expected to be called with string.");
|
122
|
-
|
122
|
+
|
123
123
|
auto themeName = args[0].asString(rt).utf8(rt);
|
124
|
-
|
124
|
+
|
125
125
|
helpers::assertThat(rt, state.hasTheme(themeName), "Unistyles: You're trying to get theme '" + themeName + "' but it wasn't registered.");
|
126
|
-
|
126
|
+
|
127
127
|
return state.getJSThemeByName(themeName);
|
128
128
|
}
|
129
|
-
|
129
|
+
|
130
130
|
return state.getCurrentJSTheme();
|
131
131
|
}
|
132
132
|
|
@@ -212,7 +212,7 @@ jsi::Value HybridUnistylesRuntime::getMiniRuntimeAsValue(jsi::Runtime& rt) {
|
|
212
212
|
obj.setProperty(rt, "navigationBar", JSIConverter<Dimensions>::toJSI(rt, miniRuntime.navigationBar));
|
213
213
|
obj.setProperty(rt, "isPortrait", JSIConverter<bool>::toJSI(rt, miniRuntime.isPortrait));
|
214
214
|
obj.setProperty(rt, "isLandscape", JSIConverter<bool>::toJSI(rt, miniRuntime.isLandscape));
|
215
|
-
|
215
|
+
|
216
216
|
return obj;
|
217
217
|
}
|
218
218
|
|
@@ -225,6 +225,14 @@ void HybridUnistylesRuntime::registerPlatformListener(const std::function<void(s
|
|
225
225
|
this->_onDependenciesChange = listener;
|
226
226
|
}
|
227
227
|
|
228
|
+
void HybridUnistylesRuntime::registerImeListener(const std::function<void()>& listener) {
|
229
|
+
this->_nativePlatform.registerImeListener(listener);
|
230
|
+
}
|
231
|
+
|
232
|
+
void HybridUnistylesRuntime::unregisterPlatformListeners() {
|
233
|
+
this->_nativePlatform.unregisterPlatformListeners();
|
234
|
+
}
|
235
|
+
|
228
236
|
void HybridUnistylesRuntime::includeDependenciesForColorSchemeChange(std::vector<UnistyleDependency>& deps) {
|
229
237
|
auto& registry = core::UnistylesRegistry::get();
|
230
238
|
auto& state = registry.getState(*this->_rt);
|
@@ -13,7 +13,8 @@
|
|
13
13
|
namespace margelo::nitro::unistyles {
|
14
14
|
|
15
15
|
struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
|
16
|
-
HybridUnistylesRuntime(Unistyles::HybridNativePlatformSpecCxx nativePlatform, jsi::Runtime& rt
|
16
|
+
HybridUnistylesRuntime(Unistyles::HybridNativePlatformSpecCxx nativePlatform, jsi::Runtime& rt, std::function<void(std::function<void(jsi::Runtime&)>&&)> runOnJSThread)
|
17
|
+
: HybridObject(TAG), _nativePlatform{nativePlatform}, _rt{&rt}, runOnJSThread(std::move(runOnJSThread)) {}
|
17
18
|
|
18
19
|
jsi::Value getTheme(jsi::Runtime& rt,
|
19
20
|
const jsi::Value& thisValue,
|
@@ -55,6 +56,8 @@ struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
|
|
55
56
|
double getPixelRatio() override;
|
56
57
|
double getFontScale() override;
|
57
58
|
void registerPlatformListener(const std::function<void(std::vector<UnistyleDependency>)>& listener);
|
59
|
+
void registerImeListener(const std::function<void()>& listener);
|
60
|
+
void unregisterPlatformListeners();
|
58
61
|
|
59
62
|
void setTheme(const std::string &themeName) override;
|
60
63
|
void setAdaptiveThemes(bool isEnabled) override;
|
@@ -65,6 +68,7 @@ struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
|
|
65
68
|
jsi::Runtime& getRuntime();
|
66
69
|
void includeDependenciesForColorSchemeChange(std::vector<UnistyleDependency>& deps);
|
67
70
|
void calculateNewThemeAndDependencies(std::vector<UnistyleDependency>& deps);
|
71
|
+
std::function<void(std::function<void(jsi::Runtime&)>&&)> runOnJSThread;
|
68
72
|
|
69
73
|
private:
|
70
74
|
jsi::Runtime* _rt;
|
package/cxx/parser/Parser.cpp
CHANGED
@@ -15,7 +15,6 @@ void parser::Parser::buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
|
|
15
15
|
|
16
16
|
jsi::Object styleValue = propertyValue.asObject(rt);
|
17
17
|
|
18
|
-
|
19
18
|
if (styleValue.isFunction(rt)) {
|
20
19
|
styleSheet->unistyles[styleKey] = std::make_shared<UnistyleDynamicFunction>(
|
21
20
|
UnistyleType::DynamicFunction,
|
@@ -4,13 +4,16 @@ import Foundation
|
|
4
4
|
import Combine
|
5
5
|
import NitroModules
|
6
6
|
|
7
|
-
typealias
|
7
|
+
typealias CxxDependencyListener = (Array<UnistyleDependency>) -> Void
|
8
|
+
typealias CxxImeListener = () -> Void
|
8
9
|
|
9
10
|
class NativeIOSPlatform: HybridNativePlatformSpec {
|
10
11
|
var miniRuntime: UnistylesNativeMiniRuntime?
|
12
|
+
var keyboardAnimation = KeyboardAnimation()
|
11
13
|
var cancellables = Set<AnyCancellable>()
|
12
14
|
|
13
|
-
var
|
15
|
+
var dependencyListeners: Array<CxxDependencyListener> = []
|
16
|
+
var imeListeners: Array<CxxImeListener> = []
|
14
17
|
var hybridContext = margelo.nitro.HybridContext()
|
15
18
|
var memorySize: Int {
|
16
19
|
return getSizeOf(self)
|
@@ -20,10 +23,12 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
20
23
|
self.miniRuntime = self.buildMiniRuntime()
|
21
24
|
|
22
25
|
setupPlatformListeners()
|
26
|
+
setupKeyboardListeners()
|
23
27
|
}
|
24
28
|
|
25
29
|
deinit {
|
26
30
|
removePlatformListeners()
|
31
|
+
removeKeyboardListeners()
|
27
32
|
}
|
28
33
|
|
29
34
|
func getMiniRuntime() -> UnistylesNativeMiniRuntime {
|
@@ -32,7 +37,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
32
37
|
|
33
38
|
func buildMiniRuntime() -> UnistylesNativeMiniRuntime {
|
34
39
|
let orientation = self.getOrientation()
|
35
|
-
|
40
|
+
|
36
41
|
return UnistylesNativeMiniRuntime(
|
37
42
|
colorScheme: self.getColorScheme(),
|
38
43
|
screen: self.getScreenDimensions(),
|
@@ -193,7 +198,13 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
193
198
|
|
194
199
|
let safeArea = window.safeAreaInsets
|
195
200
|
|
196
|
-
return Insets(
|
201
|
+
return Insets(
|
202
|
+
top: safeArea.top,
|
203
|
+
bottom: safeArea.bottom,
|
204
|
+
left: safeArea.left,
|
205
|
+
right: safeArea.right,
|
206
|
+
ime: keyboardAnimation.animatedImeInset
|
207
|
+
)
|
197
208
|
}
|
198
209
|
|
199
210
|
if Thread.isMainThread {
|
@@ -279,7 +290,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
279
290
|
func getNavigationBarDimensions() -> Dimensions {
|
280
291
|
return Dimensions(width: 0, height: 0);
|
281
292
|
}
|
282
|
-
|
293
|
+
|
283
294
|
func setStatusBarHidden(isHidden: Bool) throws {
|
284
295
|
self.onWindowChange(Notification(name: NSNotification.Name("RCTWindowFrameDidChangeNotification")))
|
285
296
|
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import Foundation
|
2
|
+
|
3
|
+
struct KeyboardAnimation {
|
4
|
+
var animatedImeInset: CGFloat = 0
|
5
|
+
var keyboardHeight: CGFloat = 0
|
6
|
+
var animationDuration: Double = 0
|
7
|
+
var displayLink: CADisplayLink?
|
8
|
+
var startTime: CFTimeInterval = 0
|
9
|
+
var from: CGFloat = 0
|
10
|
+
var to: CGFloat = 0
|
11
|
+
}
|
12
|
+
|
13
|
+
extension NativeIOSPlatform {
|
14
|
+
func setupKeyboardListeners() {
|
15
|
+
NotificationCenter.default.addObserver(self, selector: #selector(onKeyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)
|
16
|
+
NotificationCenter.default.addObserver(self, selector: #selector(onKeyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
|
17
|
+
}
|
18
|
+
|
19
|
+
func removeKeyboardListeners() {
|
20
|
+
keyboardAnimation.displayLink?.invalidate()
|
21
|
+
|
22
|
+
NotificationCenter.default.removeObserver(
|
23
|
+
self,
|
24
|
+
name: UIResponder.keyboardWillShowNotification,
|
25
|
+
object: nil
|
26
|
+
)
|
27
|
+
NotificationCenter.default.removeObserver(
|
28
|
+
self,
|
29
|
+
name: UIResponder.keyboardWillHideNotification,
|
30
|
+
object: nil
|
31
|
+
)
|
32
|
+
}
|
33
|
+
|
34
|
+
@objc func onKeyboardWillShow(notification: NSNotification) {
|
35
|
+
guard let frame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { return }
|
36
|
+
guard let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? Double else { return }
|
37
|
+
|
38
|
+
keyboardAnimation.keyboardHeight = frame.height
|
39
|
+
keyboardAnimation.animationDuration = duration
|
40
|
+
|
41
|
+
startAnimation(toValue: keyboardAnimation.keyboardHeight)
|
42
|
+
}
|
43
|
+
|
44
|
+
@objc func onKeyboardWillHide(notification: NSNotification) {
|
45
|
+
guard let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? Double else { return }
|
46
|
+
|
47
|
+
keyboardAnimation.animationDuration = duration
|
48
|
+
|
49
|
+
startAnimation(toValue: 0)
|
50
|
+
}
|
51
|
+
|
52
|
+
func startAnimation(toValue targetValue: CGFloat) {
|
53
|
+
keyboardAnimation.startTime = CACurrentMediaTime()
|
54
|
+
keyboardAnimation.displayLink?.invalidate()
|
55
|
+
|
56
|
+
keyboardAnimation.from = keyboardAnimation.animatedImeInset
|
57
|
+
keyboardAnimation.to = targetValue
|
58
|
+
|
59
|
+
if (keyboardAnimation.from == keyboardAnimation.to) {
|
60
|
+
return
|
61
|
+
}
|
62
|
+
|
63
|
+
keyboardAnimation.displayLink = CADisplayLink(target: self, selector: #selector(updateAnimation))
|
64
|
+
keyboardAnimation.displayLink?.add(to: .main, forMode: .default)
|
65
|
+
}
|
66
|
+
|
67
|
+
@objc func updateAnimation() {
|
68
|
+
let elapsedTime = CACurrentMediaTime() - keyboardAnimation.startTime
|
69
|
+
let linearProgress = min(elapsedTime / keyboardAnimation.animationDuration, 1)
|
70
|
+
let easedProgress = 1 - pow(1 - linearProgress, 3)
|
71
|
+
|
72
|
+
// Interpolate between 'from' and 'to'
|
73
|
+
keyboardAnimation.animatedImeInset = keyboardAnimation.from + (keyboardAnimation.to - keyboardAnimation.from) * CGFloat(easedProgress)
|
74
|
+
|
75
|
+
self.emitImeEvent()
|
76
|
+
self.miniRuntime?.insets.ime = keyboardAnimation.animatedImeInset
|
77
|
+
|
78
|
+
if linearProgress >= 1 {
|
79
|
+
keyboardAnimation.displayLink?.invalidate()
|
80
|
+
keyboardAnimation.displayLink = nil
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
@@ -13,23 +13,36 @@ extension NativeIOSPlatform {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
func removePlatformListeners() {
|
16
|
-
|
16
|
+
self.unregisterPlatformListeners()
|
17
|
+
}
|
18
|
+
|
19
|
+
func registerPlatformListener(callback: @escaping (CxxDependencyListener)) throws {
|
20
|
+
self.dependencyListeners.append(callback)
|
17
21
|
}
|
18
22
|
|
19
|
-
func
|
20
|
-
|
23
|
+
func registerImeListener(callback: @escaping (() -> Void)) throws {
|
24
|
+
self.imeListeners.append(callback)
|
21
25
|
}
|
22
26
|
|
23
27
|
func emitCxxEvent(dependencies: Array<UnistyleDependency>) {
|
24
|
-
self.
|
28
|
+
self.dependencyListeners.forEach { $0(dependencies) }
|
29
|
+
}
|
30
|
+
|
31
|
+
func emitImeEvent() {
|
32
|
+
self.imeListeners.forEach { $0() }
|
33
|
+
}
|
34
|
+
|
35
|
+
func unregisterPlatformListeners() {
|
36
|
+
cancellables.removeAll()
|
37
|
+
dependencyListeners.removeAll()
|
38
|
+
imeListeners.removeAll()
|
25
39
|
}
|
26
40
|
|
27
41
|
@objc func onWindowChange(_ notification: Notification) {
|
28
|
-
// add small delay (10ms) to make sure all values are up ot date
|
29
42
|
guard let currentMiniRuntime = self.miniRuntime else {
|
30
43
|
return
|
31
44
|
}
|
32
|
-
|
45
|
+
|
33
46
|
let newMiniRuntime = self.buildMiniRuntime()
|
34
47
|
let changedDependencies = UnistylesNativeMiniRuntime.diff(lhs: currentMiniRuntime, rhs: newMiniRuntime)
|
35
48
|
|
@@ -14,9 +14,11 @@
|
|
14
14
|
#import "TurboUnistyles/TurboUnistyles.h"
|
15
15
|
#import <React/RCTSurfacePresenter.h>
|
16
16
|
#import <React/RCTScheduler.h>
|
17
|
+
#import <React/RCTRuntimeExecutorModule.h>
|
18
|
+
#import <ReactCommon/RCTRuntimeExecutor.h>
|
17
19
|
|
18
20
|
@interface UnistylesModule: RCTEventEmitter<NativeTurboUnistylesSpec>
|
19
21
|
@end
|
20
22
|
|
21
|
-
@interface UnistylesModule()<RCTTurboModuleWithJSIBindings>
|
23
|
+
@interface UnistylesModule()<RCTTurboModuleWithJSIBindings, RCTRuntimeExecutorModule>
|
22
24
|
@end
|
@@ -12,6 +12,8 @@ RCT_EXPORT_MODULE(Unistyles)
|
|
12
12
|
|
13
13
|
__weak RCTSurfacePresenter* _surfacePresenter;
|
14
14
|
|
15
|
+
@synthesize runtimeExecutor = _runtimeExecutor;
|
16
|
+
|
15
17
|
+ (BOOL)requiresMainQueueSetup {
|
16
18
|
return YES;
|
17
19
|
}
|
@@ -35,8 +37,16 @@ __weak RCTSurfacePresenter* _surfacePresenter;
|
|
35
37
|
}
|
36
38
|
|
37
39
|
- (void)createHybrids:(jsi::Runtime&)rt {
|
40
|
+
auto runOnJSThread = ([executor = _runtimeExecutor](std::function<void(jsi::Runtime& rt)> &&callback) {
|
41
|
+
__block auto objcCallback = callback;
|
42
|
+
|
43
|
+
[executor execute:^(jsi::Runtime& rt){
|
44
|
+
objcCallback(rt);
|
45
|
+
}];
|
46
|
+
});
|
47
|
+
|
38
48
|
auto nativePlatform = Unistyles::NativePlatform::create();
|
39
|
-
auto unistylesRuntime = std::make_shared<HybridUnistylesRuntime>(nativePlatform, rt);
|
49
|
+
auto unistylesRuntime = std::make_shared<HybridUnistylesRuntime>(nativePlatform, rt, runOnJSThread);
|
40
50
|
auto uiManager = [_surfacePresenter scheduler].uiManager;
|
41
51
|
auto styleSheet = std::make_shared<HybridStyleSheet>(unistylesRuntime, uiManager);
|
42
52
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_useBreakpoint","require","_useTheme"],"sourceRoot":"../../../src","sources":["core/index.
|
1
|
+
{"version":3,"names":["_useBreakpoint","require","_useTheme"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_specs","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","_core"],"sourceRoot":"../../src","sources":["index.
|
1
|
+
{"version":3,"names":["_specs","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","_core"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,GAAA,GAAAb,OAAA;AAEA,IAAAc,KAAA,GAAAd,OAAA","ignoreList":[]}
|
package/lib/commonjs/mq.js
CHANGED
@@ -11,6 +11,7 @@ const getMQValue = value => {
|
|
11
11
|
if (value === null) {
|
12
12
|
return 0;
|
13
13
|
}
|
14
|
+
|
14
15
|
// todo take it from js
|
15
16
|
const breakpoints = {
|
16
17
|
xs: 0,
|
@@ -19,9 +20,11 @@ const getMQValue = value => {
|
|
19
20
|
lg: 800,
|
20
21
|
xl: 1200
|
21
22
|
};
|
23
|
+
|
22
24
|
// @ts-ignore
|
23
25
|
return breakpoints[value] ?? 0;
|
24
26
|
};
|
27
|
+
|
25
28
|
/**
|
26
29
|
* Utility to create cross-platform media queries
|
27
30
|
* @returns - JavaScript symbol to be used in your stylesheet
|
@@ -42,4 +45,4 @@ const mq = exports.mq = {
|
|
42
45
|
}
|
43
46
|
})
|
44
47
|
};
|
45
|
-
//# sourceMappingURL=mq.js.
|
48
|
+
//# sourceMappingURL=mq.js.map
|
package/lib/commonjs/mq.js.map
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
{"version":3,"names":["getMQValue","value","breakpoints","xs","sm","md","lg","xl","mq","exports","only","width","wMin","wMax","Infinity","height","hMin","hMax","and"],"sourceRoot":"../../src","sources":["mq.
|
2
|
-
gnoreList":[]}
|
1
|
+
{"version":3,"names":["getMQValue","value","breakpoints","xs","sm","md","lg","xl","mq","exports","only","width","wMin","wMax","Infinity","height","hMin","hMax","and"],"sourceRoot":"../../src","sources":["mq.ts"],"mappings":";;;;;;AAsBA,MAAMA,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EAEA,IAAIA,KAAK,KAAK,IAAI,EAAE;IAChB,OAAO,CAAC;EACZ;;EAEA;EACA,MAAMC,WAAW,GAAG;IAChBC,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE;EACR,CAAC;;EAED;EACA,OAAOL,WAAW,CAACD,KAAK,CAAC,IAAI,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMO,EAAa,GAAAC,OAAA,CAAAD,EAAA,GAAG;EACzBE,IAAI,EAAE;IACFC,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KAAM,MAAMd,UAAU,CAACY,IAAI,CAAC,KAAKZ,UAAU,CAACa,IAAI,CAAC,GAAyB;IACvIE,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KAAM,MAAMd,UAAU,CAACgB,IAAI,CAAC,KAAKhB,UAAU,CAACiB,IAAI,CAAC;EACnH,CAAC;EACDN,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,MAAM;IAC/DI,GAAG,EAAE;MACDH,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KACzD,MAAMd,UAAU,CAACY,IAAI,CAAC,KAAKZ,UAAU,CAACa,IAAI,CAAC,OAAOb,UAAU,CAACgB,IAAI,CAAC,KAAKhB,UAAU,CAACiB,IAAI,CAAC;IAChG;EACJ,CAAC,CAAC;EACFF,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,MAAM;IAChEI,GAAG,EAAE;MACDP,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KACxD,MAAMd,UAAU,CAACY,IAAI,CAAC,KAAKZ,UAAU,CAACa,IAAI,CAAC,OAAOb,UAAU,CAACgB,IAAI,CAAC,KAAKhB,UAAU,CAACiB,IAAI,CAAC;IAChG;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
@@ -19,6 +19,7 @@ let UnistyleDependency = exports.UnistyleDependency = /*#__PURE__*/function (Uni
|
|
19
19
|
UnistyleDependency[UnistyleDependency["FontScale"] = 11] = "FontScale";
|
20
20
|
UnistyleDependency[UnistyleDependency["StatusBar"] = 12] = "StatusBar";
|
21
21
|
UnistyleDependency[UnistyleDependency["NavigationBar"] = 13] = "NavigationBar";
|
22
|
+
UnistyleDependency[UnistyleDependency["Ime"] = 14] = "Ime";
|
22
23
|
return UnistyleDependency;
|
23
24
|
}({}); // represents any native API that can communicate with Unistyles
|
24
25
|
// not available from JS
|