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.
Files changed (180) hide show
  1. package/android/build.gradle +4 -4
  2. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +13 -30
  3. package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +22 -18
  4. package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +10 -5
  5. package/cxx/core/UnistyleWrapper.h +27 -10
  6. package/cxx/core/UnistylesRegistry.cpp +34 -10
  7. package/cxx/core/UnistylesRegistry.h +2 -2
  8. package/cxx/hybridObjects/HybridNavigationBar.cpp +0 -4
  9. package/cxx/hybridObjects/HybridNavigationBar.h +0 -1
  10. package/cxx/hybridObjects/HybridShadowRegistry.cpp +7 -3
  11. package/cxx/hybridObjects/HybridStatusBar.cpp +0 -4
  12. package/cxx/hybridObjects/HybridStatusBar.h +0 -1
  13. package/cxx/hybridObjects/HybridStyleSheet.cpp +59 -28
  14. package/cxx/hybridObjects/HybridStyleSheet.h +7 -3
  15. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +37 -6
  16. package/cxx/hybridObjects/HybridUnistylesRuntime.h +7 -3
  17. package/cxx/parser/Parser.cpp +7 -7
  18. package/cxx/parser/Parser.h +2 -2
  19. package/ios/NativePlatform+ios.swift +2 -4
  20. package/ios/NativePlatform+keyboard.swift +1 -1
  21. package/ios/NativePlatformListener+ios.swift +6 -6
  22. package/ios/UnistylesModuleOnLoad.h +1 -6
  23. package/lib/commonjs/core/createUnistylesComponent.js +27 -20
  24. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -1
  25. package/lib/commonjs/core/createUnistylesComponent.native.js +14 -17
  26. package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -1
  27. package/lib/commonjs/specs/NavigtionBar/index.js +0 -15
  28. package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
  29. package/lib/commonjs/specs/ShadowRegistry/index.js +5 -7
  30. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  31. package/lib/commonjs/specs/StatusBar/index.js +0 -5
  32. package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
  33. package/lib/commonjs/specs/UnistylesRuntime/index.js +0 -2
  34. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
  35. package/lib/commonjs/utils.js +26 -0
  36. package/lib/commonjs/utils.js.map +1 -0
  37. package/lib/commonjs/web/convert/index.js +1 -1
  38. package/lib/commonjs/web/convert/object/boxShadow.js +2 -1
  39. package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -1
  40. package/lib/commonjs/web/convert/object/objectStyle.js +3 -2
  41. package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -1
  42. package/lib/commonjs/web/convert/shadow/boxShadow.js +1 -1
  43. package/lib/commonjs/web/convert/shadow/textShadow.js +1 -1
  44. package/lib/commonjs/web/create.js +2 -1
  45. package/lib/commonjs/web/create.js.map +1 -1
  46. package/lib/commonjs/web/index.js +1 -1
  47. package/lib/commonjs/web/listener.js +18 -2
  48. package/lib/commonjs/web/listener.js.map +1 -1
  49. package/lib/commonjs/web/mock.js +1 -2
  50. package/lib/commonjs/web/mock.js.map +1 -1
  51. package/lib/commonjs/web/runtime.js +5 -2
  52. package/lib/commonjs/web/runtime.js.map +1 -1
  53. package/lib/commonjs/web/shadowRegistry.js +53 -73
  54. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  55. package/lib/commonjs/web/utils/common.js +1 -24
  56. package/lib/commonjs/web/utils/common.js.map +1 -1
  57. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  58. package/lib/commonjs/web/variants/getVariants.js +1 -1
  59. package/lib/module/core/createUnistylesComponent.js +28 -21
  60. package/lib/module/core/createUnistylesComponent.js.map +1 -1
  61. package/lib/module/core/createUnistylesComponent.native.js +15 -18
  62. package/lib/module/core/createUnistylesComponent.native.js.map +1 -1
  63. package/lib/module/specs/NavigtionBar/index.js +0 -10
  64. package/lib/module/specs/NavigtionBar/index.js.map +1 -1
  65. package/lib/module/specs/ShadowRegistry/index.js +5 -7
  66. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  67. package/lib/module/specs/StatusBar/index.js +1 -6
  68. package/lib/module/specs/StatusBar/index.js.map +1 -1
  69. package/lib/module/specs/UnistylesRuntime/index.js +0 -2
  70. package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
  71. package/lib/module/utils.js +21 -0
  72. package/lib/module/utils.js.map +1 -0
  73. package/lib/module/web/convert/index.js +1 -1
  74. package/lib/module/web/convert/index.js.map +1 -1
  75. package/lib/module/web/convert/object/boxShadow.js +2 -1
  76. package/lib/module/web/convert/object/boxShadow.js.map +1 -1
  77. package/lib/module/web/convert/object/objectStyle.js +2 -1
  78. package/lib/module/web/convert/object/objectStyle.js.map +1 -1
  79. package/lib/module/web/convert/shadow/boxShadow.js +1 -1
  80. package/lib/module/web/convert/shadow/boxShadow.js.map +1 -1
  81. package/lib/module/web/convert/shadow/textShadow.js +1 -1
  82. package/lib/module/web/convert/shadow/textShadow.js.map +1 -1
  83. package/lib/module/web/create.js +2 -1
  84. package/lib/module/web/create.js.map +1 -1
  85. package/lib/module/web/index.js +1 -1
  86. package/lib/module/web/index.js.map +1 -1
  87. package/lib/module/web/listener.js +18 -2
  88. package/lib/module/web/listener.js.map +1 -1
  89. package/lib/module/web/mock.js +1 -2
  90. package/lib/module/web/mock.js.map +1 -1
  91. package/lib/module/web/runtime.js +6 -3
  92. package/lib/module/web/runtime.js.map +1 -1
  93. package/lib/module/web/shadowRegistry.js +51 -71
  94. package/lib/module/web/shadowRegistry.js.map +1 -1
  95. package/lib/module/web/utils/common.js +0 -22
  96. package/lib/module/web/utils/common.js.map +1 -1
  97. package/lib/module/web/utils/unistyle.js.map +1 -1
  98. package/lib/module/web/variants/getVariants.js +1 -1
  99. package/lib/module/web/variants/getVariants.js.map +1 -1
  100. package/lib/typescript/src/core/createUnistylesComponent.d.ts +1 -1
  101. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -1
  102. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +1 -1
  103. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -1
  104. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +2 -4
  105. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  106. package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts +0 -1
  107. package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
  108. package/lib/typescript/src/specs/NavigtionBar/index.d.ts +1 -15
  109. package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -1
  110. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +3 -3
  111. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  112. package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts +0 -1
  113. package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
  114. package/lib/typescript/src/specs/StatusBar/index.d.ts +2 -9
  115. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  116. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  117. package/lib/typescript/src/utils.d.ts +2 -0
  118. package/lib/typescript/src/utils.d.ts.map +1 -0
  119. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
  120. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
  121. package/lib/typescript/src/web/create.d.ts.map +1 -1
  122. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  123. package/lib/typescript/src/web/mock.d.ts.map +1 -1
  124. package/lib/typescript/src/web/runtime.d.ts +1 -1
  125. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  126. package/lib/typescript/src/web/shadowRegistry.d.ts +1 -3
  127. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
  128. package/lib/typescript/src/web/utils/common.d.ts +0 -4
  129. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  130. package/lib/typescript/src/web/utils/unistyle.d.ts +1 -1
  131. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  132. package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +57 -0
  133. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +69 -0
  134. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +8 -16
  135. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +2 -4
  136. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void_std__vector_UnistyleDependency_.kt → Func_void_UnistylesNativeMiniRuntime.kt} +5 -5
  137. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void.kt → Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt} +5 -5
  138. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +4 -12
  139. package/nitrogen/generated/android/unistylesOnLoad.cpp +4 -4
  140. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +43 -30
  141. package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +2 -8
  142. package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +2 -4
  143. package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +10 -32
  144. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +0 -2
  145. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +2 -4
  146. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +0 -1
  147. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +0 -1
  148. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +0 -1
  149. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +0 -1
  150. package/package.json +4 -2
  151. package/plugin/common.js +12 -1
  152. package/plugin/index.js +12 -10
  153. package/plugin/ref.js +80 -15
  154. package/plugin/style.js +113 -18
  155. package/src/core/createUnistylesComponent.native.tsx +15 -22
  156. package/src/core/createUnistylesComponent.tsx +29 -23
  157. package/src/specs/NativePlatform/NativePlatform.nitro.ts +2 -4
  158. package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +0 -1
  159. package/src/specs/NavigtionBar/index.ts +1 -30
  160. package/src/specs/ShadowRegistry/index.ts +8 -11
  161. package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +0 -1
  162. package/src/specs/StatusBar/index.ts +2 -17
  163. package/src/specs/UnistylesRuntime/index.ts +1 -2
  164. package/src/utils.ts +22 -0
  165. package/src/web/convert/index.ts +1 -1
  166. package/src/web/convert/object/boxShadow.ts +2 -1
  167. package/src/web/convert/object/objectStyle.ts +2 -1
  168. package/src/web/convert/shadow/boxShadow.ts +1 -1
  169. package/src/web/convert/shadow/textShadow.ts +1 -1
  170. package/src/web/create.ts +2 -1
  171. package/src/web/index.ts +1 -1
  172. package/src/web/listener.ts +22 -2
  173. package/src/web/mock.ts +1 -2
  174. package/src/web/runtime.ts +7 -3
  175. package/src/web/shadowRegistry.ts +55 -70
  176. package/src/web/utils/common.ts +0 -26
  177. package/src/web/utils/unistyle.ts +1 -1
  178. package/src/web/variants/getVariants.ts +1 -1
  179. package/nitrogen/generated/android/c++/JFunc_void.hpp +0 -48
  180. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +0 -60
@@ -205,9 +205,32 @@ UnistylesCxxMiniRuntime HybridUnistylesRuntime::getMiniRuntime() {
205
205
  return cxxMiniRuntime;
206
206
  }
207
207
 
208
- jsi::Value HybridUnistylesRuntime::getMiniRuntimeAsValue(jsi::Runtime& rt) {
209
- auto miniRuntime = this->getMiniRuntime();
208
+ UnistylesCxxMiniRuntime HybridUnistylesRuntime::buildMiniRuntimeFromNativeRuntime(UnistylesNativeMiniRuntime& nativeMiniRuntime) {
209
+ UnistylesCxxMiniRuntime cxxMiniRuntime{
210
+ this->getThemeName(),
211
+ this->getBreakpoint(),
212
+ this->getHasAdaptiveThemes(),
213
+ nativeMiniRuntime.colorScheme,
214
+ nativeMiniRuntime.screen,
215
+ nativeMiniRuntime.contentSizeCategory,
216
+ nativeMiniRuntime.insets,
217
+ nativeMiniRuntime.pixelRatio,
218
+ nativeMiniRuntime.fontScale,
219
+ nativeMiniRuntime.rtl,
220
+ nativeMiniRuntime.statusBar,
221
+ nativeMiniRuntime.navigationBar,
222
+ nativeMiniRuntime.isPortrait,
223
+ nativeMiniRuntime.isLandscape
224
+ };
225
+
226
+ return cxxMiniRuntime;
227
+ }
228
+
229
+ jsi::Value HybridUnistylesRuntime::getMiniRuntimeAsValue(jsi::Runtime& rt, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime) {
210
230
  jsi::Object obj(rt);
231
+ auto miniRuntime = maybeMiniRuntime.has_value()
232
+ ? this->buildMiniRuntimeFromNativeRuntime(maybeMiniRuntime.value())
233
+ : this->getMiniRuntime();
211
234
 
212
235
  // auto generated by nitro, but can't be accessed due to static inline function
213
236
  obj.setProperty(rt, "themeName", JSIConverter<std::optional<std::string>>::toJSI(rt, miniRuntime.themeName));
@@ -228,16 +251,20 @@ jsi::Value HybridUnistylesRuntime::getMiniRuntimeAsValue(jsi::Runtime& rt) {
228
251
  return obj;
229
252
  }
230
253
 
231
- void HybridUnistylesRuntime::registerPlatformListener(const std::function<void(std::vector<UnistyleDependency>)>& listener) {
232
- this->_nativePlatform.registerPlatformListener(listener);
254
+ void HybridUnistylesRuntime::registerPlatformListener(const std::function<void (std::vector<UnistyleDependency>)>& listener) {
233
255
  this->_onDependenciesChange = listener;
234
256
  }
235
257
 
236
- void HybridUnistylesRuntime::registerImeListener(const std::function<void()>& listener) {
258
+ void HybridUnistylesRuntime::registerNativePlatformListener(const std::function<void(std::vector<UnistyleDependency>, UnistylesNativeMiniRuntime)>& listener) {
259
+ this->_nativePlatform.registerPlatformListener(listener);
260
+ this->_onNativeDependenciesChange = listener;
261
+ }
262
+
263
+ void HybridUnistylesRuntime::registerImeListener(const std::function<void(UnistylesNativeMiniRuntime)>& listener) {
237
264
  this->_nativePlatform.registerImeListener(listener);
238
265
  }
239
266
 
240
- void HybridUnistylesRuntime::unregisterPlatformListeners() {
267
+ void HybridUnistylesRuntime::unregisterNativePlatformListeners() {
241
268
  this->_nativePlatform.unregisterPlatformListeners();
242
269
  }
243
270
 
@@ -252,3 +279,7 @@ void HybridUnistylesRuntime::includeDependenciesForColorSchemeChange(std::vector
252
279
 
253
280
  this->calculateNewThemeAndDependencies(deps);
254
281
  }
282
+
283
+ jsi::Runtime& HybridUnistylesRuntime::getRuntime() {
284
+ return *this->_rt;
285
+ }
@@ -56,8 +56,9 @@ struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
56
56
  double getPixelRatio() override;
57
57
  double getFontScale() override;
58
58
  void registerPlatformListener(const std::function<void(std::vector<UnistyleDependency>)>& listener);
59
- void registerImeListener(const std::function<void()>& listener);
60
- void unregisterPlatformListeners();
59
+ void registerNativePlatformListener(const std::function<void(std::vector<UnistyleDependency>, UnistylesNativeMiniRuntime)>& listener);
60
+ void registerImeListener(const std::function<void(UnistylesNativeMiniRuntime)>& listener);
61
+ void unregisterNativePlatformListeners();
61
62
 
62
63
  void setTheme(const std::string &themeName) override;
63
64
  void setAdaptiveThemes(bool isEnabled) override;
@@ -66,7 +67,9 @@ struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
66
67
  UnistylesCxxMiniRuntime getMiniRuntime() override;
67
68
  std::unordered_map<std::string, double> getBreakpoints() override;
68
69
 
69
- jsi::Value getMiniRuntimeAsValue(jsi::Runtime& rt);
70
+ jsi::Runtime& getRuntime();
71
+ UnistylesCxxMiniRuntime buildMiniRuntimeFromNativeRuntime(UnistylesNativeMiniRuntime& nativeMiniRuntime);
72
+ jsi::Value getMiniRuntimeAsValue(jsi::Runtime& rt, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime);
70
73
  void includeDependenciesForColorSchemeChange(std::vector<UnistyleDependency>& deps);
71
74
  void calculateNewThemeAndDependencies(std::vector<UnistyleDependency>& deps);
72
75
  std::function<void(std::function<void(jsi::Runtime&)>&&)> runOnJSThread;
@@ -77,6 +80,7 @@ private:
77
80
  std::shared_ptr<HybridStatusBar> _statusBar;
78
81
  Unistyles::HybridNativePlatformSpecCxx _nativePlatform;
79
82
  std::function<void(std::vector<UnistyleDependency>)> _onDependenciesChange;
83
+ std::function<void(std::vector<UnistyleDependency>, UnistylesNativeMiniRuntime)> _onNativeDependenciesChange;
80
84
  };
81
85
 
82
86
  }
@@ -9,7 +9,7 @@ using Variants = std::vector<std::pair<std::string, std::string>>;
9
9
 
10
10
  // called only once while processing StyleSheet.create
11
11
  void parser::Parser::buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet) {
12
- jsi::Object unwrappedStyleSheet = this->unwrapStyleSheet(rt, styleSheet);
12
+ jsi::Object unwrappedStyleSheet = this->unwrapStyleSheet(rt, styleSheet, std::nullopt);
13
13
 
14
14
  helpers::enumerateJSIObject(rt, unwrappedStyleSheet, [&](const std::string& styleKey, jsi::Value& propertyValue){
15
15
  helpers::assertThat(rt, propertyValue.isObject(), "Unistyles: Style with name '" + styleKey + "' is not a function or object.");
@@ -36,7 +36,7 @@ void parser::Parser::buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
36
36
  });
37
37
  }
38
38
 
39
- jsi::Object parser::Parser::unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet) {
39
+ jsi::Object parser::Parser::unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime) {
40
40
  // firstly we need to get object representation of user's StyleSheet
41
41
  // StyleSheet can be a function or an object
42
42
 
@@ -58,7 +58,7 @@ jsi::Object parser::Parser::unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<S
58
58
 
59
59
  // stylesheet also has a mini runtime dependency
60
60
  // StyleSheetType::ThemableWithMiniRuntime
61
- auto miniRuntime = this->_unistylesRuntime->getMiniRuntimeAsValue(rt);
61
+ auto miniRuntime = this->_unistylesRuntime->getMiniRuntimeAsValue(rt, maybeMiniRuntime);
62
62
 
63
63
  return styleSheet->rawValue
64
64
  .asFunction(rt)
@@ -98,13 +98,13 @@ void parser::Parser::rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_
98
98
  }
99
99
 
100
100
  // rebuild all unistyles that are affected by platform event
101
- void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, DependencyMap& dependencyMap, std::vector<std::shared_ptr<core::StyleSheet>>& styleSheets) {
101
+ void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, DependencyMap& dependencyMap, std::vector<std::shared_ptr<core::StyleSheet>>& styleSheets, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime) {
102
102
  std::unordered_map<std::shared_ptr<StyleSheet>, jsi::Value> parsedStyleSheets{};
103
103
  std::unordered_map<std::shared_ptr<core::Unistyle>, bool> parsedUnistyles{};
104
104
 
105
105
  // parse all stylesheets that depends on changes
106
106
  for (auto styleSheet : styleSheets) {
107
- parsedStyleSheets.emplace(styleSheet, this->unwrapStyleSheet(rt, styleSheet));
107
+ parsedStyleSheets.emplace(styleSheet, this->unwrapStyleSheet(rt, styleSheet, maybeMiniRuntime));
108
108
  }
109
109
 
110
110
  // then parse all visible Unistyles managed by Unistyle
@@ -113,7 +113,7 @@ void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, Dependenc
113
113
 
114
114
  // stylesheet may be optional for exotic unistyles
115
115
  if (styleSheet != nullptr && !parsedStyleSheets.contains(styleSheet)) {
116
- parsedStyleSheets.emplace(styleSheet, this->unwrapStyleSheet(rt, styleSheet));
116
+ parsedStyleSheets.emplace(styleSheet, this->unwrapStyleSheet(rt, styleSheet, maybeMiniRuntime));
117
117
  }
118
118
 
119
119
  for (auto& unistyleData : unistyles) {
@@ -137,7 +137,7 @@ void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, Dependenc
137
137
 
138
138
  // we may hit now other StyleSheets that are referenced from affected nodes
139
139
  if (unistyleStyleSheet != nullptr && !parsedStyleSheets.contains(unistyleStyleSheet)) {
140
- parsedStyleSheets.emplace(unistyleStyleSheet, this->unwrapStyleSheet(rt, unistyleStyleSheet));
140
+ parsedStyleSheets.emplace(unistyleStyleSheet, this->unwrapStyleSheet(rt, unistyleStyleSheet, maybeMiniRuntime));
141
141
  }
142
142
 
143
143
  // StyleSheet might have styles that are not affected
@@ -24,13 +24,13 @@ struct Parser {
24
24
  void buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
25
25
  void parseUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
26
26
  void rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Variants& variants);
27
- void rebuildUnistylesInDependencyMap(jsi::Runtime& rt, core::DependencyMap& dependencyMap, std::vector<std::shared_ptr<core::StyleSheet>>& styleSheets);
27
+ void rebuildUnistylesInDependencyMap(jsi::Runtime& rt, core::DependencyMap& dependencyMap, std::vector<std::shared_ptr<core::StyleSheet>>& styleSheets, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime);
28
28
  void rebuildShadowLeafUpdates(jsi::Runtime& rt, core::DependencyMap& dependencyMap);
29
29
  folly::dynamic parseStylesToShadowTreeStyles(jsi::Runtime& rt, const std::vector<std::shared_ptr<UnistyleData>>& unistyles);
30
30
  void rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Unistyle::Shared unistyle, const Variants& variants, std::optional<std::vector<folly::dynamic>>);
31
31
 
32
32
  private:
33
- jsi::Object unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
33
+ jsi::Object unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, std::optional<UnistylesNativeMiniRuntime>);
34
34
  jsi::Object parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, std::optional<Variants> variants);
35
35
  jsi::Value parseSecondLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Value& nestedObject);
36
36
  jsi::Function createDynamicFunctionProxy(jsi::Runtime& rt, Unistyle::Shared unistyle);
@@ -4,8 +4,8 @@ import Foundation
4
4
  import Combine
5
5
  import NitroModules
6
6
 
7
- typealias CxxDependencyListener = (Array<UnistyleDependency>) -> Void
8
- typealias CxxImeListener = () -> Void
7
+ typealias CxxDependencyListener = (Array<UnistyleDependency>, UnistylesNativeMiniRuntime) -> Void
8
+ typealias CxxImeListener = (UnistylesNativeMiniRuntime) -> Void
9
9
 
10
10
  class NativeIOSPlatform: HybridNativePlatformSpec {
11
11
  var miniRuntime: UnistylesNativeMiniRuntime?
@@ -296,9 +296,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
296
296
  }
297
297
 
298
298
  // not implemented for iOS as there are no such APIs
299
- func setNavigationBarBackgroundColor(color: Double) throws {}
300
299
  func setNavigationBarHidden(isHidden: Bool) throws {}
301
- func setStatusBarBackgroundColor(color: Double) throws {}
302
300
 
303
301
  // implemented from JS
304
302
  func setImmersiveMode(isEnabled: Bool) throws {}
@@ -72,8 +72,8 @@ extension NativeIOSPlatform {
72
72
  // Interpolate between 'from' and 'to'
73
73
  keyboardAnimation.animatedImeInset = keyboardAnimation.from + (keyboardAnimation.to - keyboardAnimation.from) * CGFloat(easedProgress)
74
74
 
75
- self.emitImeEvent()
76
75
  self.miniRuntime?.insets.ime = keyboardAnimation.animatedImeInset
76
+ self.emitImeEvent(updatedMiniRuntime: self.miniRuntime!)
77
77
 
78
78
  if linearProgress >= 1 {
79
79
  keyboardAnimation.displayLink?.invalidate()
@@ -20,16 +20,16 @@ extension NativeIOSPlatform {
20
20
  self.dependencyListeners.append(callback)
21
21
  }
22
22
 
23
- func registerImeListener(callback: @escaping (() -> Void)) throws {
23
+ func registerImeListener(callback: @escaping ((UnistylesNativeMiniRuntime) -> Void)) throws {
24
24
  self.imeListeners.append(callback)
25
25
  }
26
26
 
27
- func emitCxxEvent(dependencies: Array<UnistyleDependency>) {
28
- self.dependencyListeners.forEach { $0(dependencies) }
27
+ func emitCxxEvent(dependencies: Array<UnistyleDependency>, updatedMiniRuntime: UnistylesNativeMiniRuntime) {
28
+ self.dependencyListeners.forEach { $0(dependencies, updatedMiniRuntime) }
29
29
  }
30
30
 
31
- func emitImeEvent() {
32
- self.imeListeners.forEach { $0() }
31
+ func emitImeEvent(updatedMiniRuntime: UnistylesNativeMiniRuntime) {
32
+ self.imeListeners.forEach { $0(updatedMiniRuntime) }
33
33
  }
34
34
 
35
35
  func unregisterPlatformListeners() {
@@ -48,7 +48,7 @@ extension NativeIOSPlatform {
48
48
 
49
49
  if (changedDependencies.count > 0) {
50
50
  self.miniRuntime = newMiniRuntime
51
- self.emitCxxEvent(dependencies: changedDependencies)
51
+ self.emitCxxEvent(dependencies: changedDependencies, updatedMiniRuntime: newMiniRuntime)
52
52
  }
53
53
  }
54
54
  }
@@ -4,18 +4,13 @@
4
4
  #error "Unistyles 3.0 requires your project to have New Architecture enabled."
5
5
  #endif
6
6
 
7
- #if __has_include(<ReactCommon/RCTTurboModuleWithJSIBindings.h>)
8
- #import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
9
- #else
10
- #error "Unistyles 3.0 requires your project to use React Native 0.75 or higher."
11
- #endif
12
-
13
7
  #import <React/RCTEventEmitter.h>
14
8
  #import "TurboUnistyles/TurboUnistyles.h"
15
9
  #import <React/RCTSurfacePresenter.h>
16
10
  #import <React/RCTScheduler.h>
17
11
  #import <React/RCTRuntimeExecutorModule.h>
18
12
  #import <ReactCommon/RCTRuntimeExecutor.h>
13
+ #import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
19
14
 
20
15
  @interface UnistylesModule: RCTEventEmitter<NativeTurboUnistylesSpec>
21
16
  @end
@@ -10,33 +10,40 @@ var _NativePlatform = require("../specs/NativePlatform");
10
10
  var _listener = require("../web/listener");
11
11
  var _web = require("../web");
12
12
  var _utils = require("../web/utils");
13
+ var _utils2 = require("../utils");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
17
  const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
17
18
  const ALL_DEPENDENCIES = Object.values(_NativePlatform.UnistyleDependency).filter(dependency => typeof dependency === 'number');
18
19
  const useShadowRegistry = style => {
19
- const [classNames, setClassNames] = (0, _react.useState)([]);
20
20
  const [ref] = (0, _react.useState)(document.createElement('div'));
21
- if (style) {
22
- _web.UnistylesShadowRegistry.add(ref, style).then(newClassNames => {
23
- if ((0, _utils.equal)(classNames, newClassNames)) {
24
- return;
25
- }
26
- setClassNames(newClassNames);
27
- });
28
- }
21
+ const oldClassNames = (0, _react.useRef)([]);
22
+ const classNames = (0, _react.useMemo)(() => {
23
+ if (!style) {
24
+ return [];
25
+ }
26
+ const newClassNames = _web.UnistylesShadowRegistry.add(ref, [style], undefined, []) ?? [];
27
+ if ((0, _utils.equal)(oldClassNames.current, newClassNames)) {
28
+ return oldClassNames.current;
29
+ }
30
+ oldClassNames.current = newClassNames;
31
+ return newClassNames;
32
+ }, [style]);
29
33
  (0, _react.useEffect)(() => () => {
30
34
  // Remove styles on unmount
31
- _web.UnistylesShadowRegistry.add(null, style);
35
+ if (style) {
36
+ _web.UnistylesShadowRegistry.add(null, [style], undefined, []);
37
+ }
32
38
  });
33
39
  return classNames;
34
40
  };
35
41
  const createUnistylesComponent = (Component, mappings) => {
36
- return props => {
42
+ return /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
43
+ const narrowedProps = props;
37
44
  const [mappingsProps, setMappingsProps] = (0, _react.useState)(mappings?.(_specs.UnistylesRuntime.getTheme()));
38
- const styleClassNames = useShadowRegistry(props.style);
39
- const contentContainerStyleClassNames = useShadowRegistry(props.contentContainerStyle);
45
+ const styleClassNames = useShadowRegistry(narrowedProps.style);
46
+ const contentContainerStyleClassNames = useShadowRegistry(narrowedProps.contentContainerStyle);
40
47
  (0, _react.useEffect)(() => {
41
48
  const disposeMappings = _listener.UnistylesListener.addListeners(ALL_DEPENDENCIES, () => {
42
49
  if (!mappings) {
@@ -46,17 +53,16 @@ const createUnistylesComponent = (Component, mappings) => {
46
53
  return setMappingsProps(mappings(_specs.UnistylesRuntime.getTheme()));
47
54
  });
48
55
  return () => disposeMappings();
49
- }, [mappingsProps, props.style]);
56
+ }, [mappingsProps, narrowedProps.style]);
50
57
  const combinedProps = {
51
- ...mappingsProps,
52
- ...props,
53
- ...(props.style ? {
58
+ ...(0, _utils2.deepMergeObjects)(props, mappingsProps ?? {}),
59
+ ...(narrowedProps.style ? {
54
60
  style: {
55
61
  $$css: true,
56
62
  'unistyles': styleClassNames.join(' ')
57
63
  }
58
64
  } : {}),
59
- ...(props.contentContainerStyle ? {
65
+ ...(narrowedProps.contentContainerStyle ? {
60
66
  style: {
61
67
  $$css: true,
62
68
  'unistyles': contentContainerStyleClassNames.join(' ')
@@ -64,9 +70,10 @@ const createUnistylesComponent = (Component, mappings) => {
64
70
  } : {})
65
71
  };
66
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
67
- ...combinedProps
73
+ ...combinedProps,
74
+ ref: ref
68
75
  });
69
- };
76
+ });
70
77
  };
71
78
  exports.createUnistylesComponent = createUnistylesComponent;
72
79
  //# sourceMappingURL=createUnistylesComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_NativePlatform","_listener","_web","_utils","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","ALL_DEPENDENCIES","values","UnistyleDependency","filter","dependency","useShadowRegistry","style","classNames","setClassNames","useState","ref","document","createElement","UnistylesShadowRegistry","add","then","newClassNames","equal","useEffect","createUnistylesComponent","Component","mappings","props","mappingsProps","setMappingsProps","UnistylesRuntime","getTheme","styleClassNames","contentContainerStyleClassNames","contentContainerStyle","disposeMappings","UnistylesListener","addListeners","combinedProps","$$css","join","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAA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AAG;QACbA,KAAK,EAAE;UACH4B,KAAK,EAAE,IAAI;UACX,WAAW,EAAEP,eAAe,CAACQ,IAAI,CAAC,GAAG;QACzC;MACJ,CAAC,GAAG,CAAC,CAAC;MACN,IAAGb,KAAK,CAACO,qBAAqB,GAAG;QAC7BvB,KAAK,EAAE;UACH4B,KAAK,EAAE,IAAI;UACX,WAAW,EAAEN,+BAA+B,CAACO,IAAI,CAAC,GAAG;QACzD;MACJ,CAAC,GAAG,CAAC,CAAC;IACV,CAAsB;IAEtB,oBAAO,IAAAzD,WAAA,CAAA0D,GAAA,EAAChB,SAAS;MAAA,GAAKa;IAAa,CAAG,CAAC;EAC3C,CAAC;AACL,CAAC;AAAAI,OAAA,CAAAlB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_NativePlatform","_listener","_web","_utils","_utils2","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","ALL_DEPENDENCIES","values","UnistyleDependency","filter","dependency","useShadowRegistry","style","ref","useState","document","createElement","oldClassNames","useRef","classNames","useMemo","newClassNames","UnistylesShadowRegistry","add","undefined","equal","current","useEffect","createUnistylesComponent","Component","mappings","forwardRef","props","narrowedProps","mappingsProps","setMappingsProps","UnistylesRuntime","getTheme","styleClassNames","contentContainerStyleClassNames","contentContainerStyle","disposeMappings","UnistylesListener","addListeners","combinedProps","deepMergeObjects","$$css","join","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,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ignoreList":[]}
@@ -6,20 +6,22 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createUnistylesComponent = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _specs = require("../specs");
9
+ var _utils = require("../utils");
9
10
  var _jsxRuntime = require("react/jsx-runtime");
10
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
13
  const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
13
14
  const createUnistylesComponent = (Component, mappings) => {
14
- return props => {
15
+ return /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
16
+ const narrowedProps = props;
15
17
  const [theme, setTheme] = (0, _react.useState)(_specs.UnistylesRuntime.getTheme());
16
18
  const [, setRt] = (0, _react.useState)(0);
17
19
  const stylesRef = (0, _react.useRef)({});
18
20
  const isForcedRef = (0, _react.useRef)(false);
19
21
  if (!isForcedRef.current) {
20
22
  SUPPORTED_STYLE_PROPS.forEach(propName => {
21
- if (props?.[propName]) {
22
- if (Array.isArray(props[propName])) {
23
+ if (narrowedProps?.[propName]) {
24
+ if (Array.isArray(narrowedProps[propName])) {
23
25
  console.error(`🦄 Unistyles: createUnistylesComponent requires ${propName} to be an object. Please check props for component: ${Component.displayName}`);
24
26
  }
25
27
 
@@ -29,20 +31,20 @@ const createUnistylesComponent = (Component, mappings) => {
29
31
  }
30
32
  stylesRef.current = {
31
33
  ...stylesRef.current,
32
- [propName]: props[propName]
34
+ [propName]: narrowedProps[propName]
33
35
  };
34
36
  }
35
37
  });
36
38
  }
37
39
  (0, _react.useEffect)(() => {
38
40
  const removeChangeListener = _specs.StyleSheet.addChangeListener(dependencies => {
39
- const componentDependencies = props.style?.__proto__.uni__dependencies || mappings?.(theme).style?.__proto__.uni__dependencies;
41
+ const componentDependencies = narrowedProps.style?.__proto__.uni__dependencies || mappings?.(theme).style?.__proto__.uni__dependencies;
40
42
  if (dependencies.includes(_specs.UnistyleDependency.Theme) && (!componentDependencies || componentDependencies.includes(_specs.UnistyleDependency.Theme))) {
41
43
  setTheme(_specs.UnistylesRuntime.getTheme());
42
44
 
43
45
  // override with Unistyles styles
44
46
  SUPPORTED_STYLE_PROPS.forEach(propName => {
45
- if (props?.[propName]) {
47
+ if (narrowedProps?.[propName]) {
46
48
  stylesRef.current = {
47
49
  ...stylesRef.current,
48
50
  // @ts-expect-error - this is hidden from TS
@@ -61,25 +63,20 @@ const createUnistylesComponent = (Component, mappings) => {
61
63
  };
62
64
  }, []);
63
65
  const mergedProps = mappings?.(theme) ?? {};
64
- Object.keys(props).forEach(key => {
65
- if (key in mergedProps) {
66
- mergedProps[key] = Object.assign(props[key], mergedProps[key]);
67
- return;
68
- }
69
- mergedProps[key] = props[key];
70
- });
66
+ const finalProps = (0, _utils.deepMergeObjects)(mergedProps, props);
71
67
 
72
68
  // override with Unistyles styles
73
69
  SUPPORTED_STYLE_PROPS.forEach(propName => {
74
- if (mergedProps[propName]) {
75
- mergedProps[propName] = stylesRef.current[propName];
70
+ if (finalProps[propName]) {
71
+ finalProps[propName] = stylesRef.current[propName];
76
72
  }
77
73
  });
78
74
  isForcedRef.current = false;
79
75
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
80
- ...mergedProps
76
+ ...finalProps,
77
+ ref: ref
81
78
  });
82
- };
79
+ });
83
80
  };
84
81
  exports.createUnistylesComponent = createUnistylesComponent;
85
82
  //# sourceMappingURL=createUnistylesComponent.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","useState","UnistylesRuntime","getTheme","setRt","stylesRef","useRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","getStyle","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","UnistyleDependency","Theme","some","dependency","prevState","mergedProps","keys","key","assign","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAqG,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,W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utils","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","forwardRef","props","ref","narrowedProps","theme","setTheme","useState","UnistylesRuntime","getTheme","setRt","stylesRef","useRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","getStyle","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","UnistyleDependency","Theme","some","dependency","prevState","mergedProps","finalProps","deepMergeObjects","jsx","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA2C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc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ACJ,CAAC,CAAC;UAEFH,WAAW,CAACC,OAAO,GAAG,IAAI;QAC9B;QAEA,IAAIc,YAAY,CAACO,IAAI,CAACC,UAAU,IAAIA,UAAU,IAAI,CAAC,CAAC,KAAK,CAACP,qBAAqB,IAAIA,qBAAqB,CAACM,IAAI,CAACC,UAAU,IAAIA,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;UAC3I1B,KAAK,CAAC2B,SAAS,IAAIA,SAAS,GAAG,CAAC,CAAC;QACrC;MACJ,CAAC,CAAC;MAEF,OAAO,MAAM;QACTZ,oBAAoB,CAAC,CAAC;MAC1B,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;IAEN,MAAMa,WAAW,GAAGtC,QAAQ,GAAGK,KAAK,CAAC,IAA2B,CAAC,CAAC;IAClE,MAAMkC,UAAU,GAAG,IAAAC,uBAAgB,EAACF,WAAW,EAAEpC,KAAK,CAAC;;IAEvD;IACAL,qBAAqB,CAACkB,OAAO,CAACC,QAAQ,IAAI;MACtC,IAAIuB,UAAU,CAACvB,QAAQ,CAAC,EAAE;QACtBuB,UAAU,CAACvB,QAAQ,CAAC,GAAGL,SAAS,CAACG,OAAO,CAACE,QAAQ,CAAC;MACtD;IACJ,CAAC,CAAC;IAEFH,WAAW,CAACC,OAAO,GAAG,KAAK;IAE3B,oBAAO,IAAAtC,WAAA,CAAAiE,GAAA,EAAC1C,SAAS;MAAA,GAAKwC,UAAU;MAAYpC,GAAG,EAAEA;IAAI,CAAE,CAAC;EAC5D,CAAC,CAAC;AACN,CAAC;AAAAuC,OAAA,CAAA5C,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.attachNavigationBarJSMethods = void 0;
7
- var _reactNative = require("react-native");
8
- const attachNavigationBarJSMethods = hybridObject => {
9
- const privateHybrid = hybridObject;
10
- privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
11
- hybridObject.setBackgroundColor = color => {
12
- const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
13
- privateHybrid._setBackgroundColor(parsedColor);
14
- };
15
- };
16
- exports.attachNavigationBarJSMethods = attachNavigationBarJSMethods;
17
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAcO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;IAE5CH,aAAa,CAACC,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC;AAAAE,OAAA,CAAAR,4BAAA,GAAAA,4BAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":"","ignoreList":[]}
@@ -14,17 +14,15 @@ const findShadowNodeForHandle = handle => {
14
14
  }
15
15
  return node;
16
16
  };
17
- HybridShadowRegistry.add = (handle, style, variants, args) => {
17
+ HybridShadowRegistry.add = (handle, styles, variants, args) => {
18
18
  // virtualized nodes can be null
19
- if (!handle || !style) {
19
+ if (!handle || !styles || !Array.isArray(styles)) {
20
20
  return;
21
21
  }
22
22
 
23
- // don't register Reanimated styles
24
- if (style?.initial?.updater) {
25
- return;
26
- }
27
- HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {}, args ?? []);
23
+ // filter Reanimated styles
24
+ const filteredStyles = styles.filter(style => !style?.initial?.updater);
25
+ HybridShadowRegistry.link(findShadowNodeForHandle(handle), filteredStyles, variants ?? {}, args ?? []);
28
26
  };
29
27
  HybridShadowRegistry.remove = handle => {
30
28
  if (!handle) {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","args","initial","updater","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC1D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,KAAK,EAAE;IACnB;EACJ;;EAEA;EACA,IAAIA,KAAK,EAAEG,OAAO,EAAEC,OAAO,EAAE;IACzB;EACJ;EAEAhB,oBAAoB,CAACiB,IAAI,CAACd,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AACjG,CAAC;AAEDd,oBAAoB,CAACkB,MAAM,GAAGd,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAACmB,MAAM,CAAChB,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAMgB,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGpB,oBAA4D","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","styles","variants","args","Array","isArray","filteredStyles","filter","style","initial","updater","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,MAAM,EAAEC,QAAQ,EAAEC,IAAI,KAAK;EAC3D;EACA,IAAI,CAACV,MAAM,IAAI,CAACQ,MAAM,IAAI,CAACG,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,EAAE;IAC9C;EACJ;;EAEA;EACA,MAAMK,cAAc,GAAGL,MAAM,CAACM,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC;EACvErB,oBAAoB,CAACsB,IAAI,CAACnB,uBAAuB,CAACC,MAAM,CAAC,EAAEa,cAAc,EAAEJ,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AAC1G,CAAC;AAEDd,oBAAoB,CAACuB,MAAM,GAAGnB,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAACwB,MAAM,CAACrB,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAMqB,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGzB,oBAA4D","ignoreList":[]}
@@ -23,11 +23,6 @@ const attachStatusBarJSMethods = hybridObject => {
23
23
  _reactNative.StatusBar.setHidden(isHidden, animation);
24
24
  privateHybrid._setHidden(isHidden);
25
25
  };
26
- privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
27
- hybridObject.setBackgroundColor = color => {
28
- const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
29
- privateHybrid._setBackgroundColor(parsedColor);
30
- };
31
26
  };
32
27
  exports.attachStatusBarJSMethods = attachStatusBarJSMethods;
33
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_types","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","StatusBarStyle","Light","NativeStatusBar","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAiBO,MAAME,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKE,qBAAc,CAACC,KAAK;QACrB,OAAOC,sBAAe,CAACC,WAAW,CAAC,eAAe,EAAEJ,QAAQ,CAAC;MACjE,KAAKC,qBAAc,CAACI,IAAI;QACpB,OAAOF,sBAAe,CAACC,WAAW,CAAC,cAAc,EAAEJ,QAAQ,CAAC;MAChE,KAAKC,qBAAc,CAACK,OAAO;QACvB,OAAOH,sBAAe,CAACC,WAAW,CAAC,SAAS,EAAEJ,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMO,aAAa,GAAGV,YAAyC;EAE/DU,aAAa,CAACC,UAAU,GAAGX,YAAY,CAACY,SAAS;EACjDZ,YAAY,CAACY,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFR,sBAAe,CAACM,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;EAEDH,aAAa,CAACK,mBAAmB,GAAGf,YAAY,CAACgB,kBAAkB;EACnEhB,YAAY,CAACgB,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;IAE5CP,aAAa,CAACK,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC;AAAAE,OAAA,CAAArB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_types","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","StatusBarStyle","Light","NativeStatusBar","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","exports"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAUO,MAAME,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKE,qBAAc,CAACC,KAAK;QACrB,OAAOC,sBAAe,CAACC,WAAW,CAAC,eAAe,EAAEJ,QAAQ,CAAC;MACjE,KAAKC,qBAAc,CAACI,IAAI;QACpB,OAAOF,sBAAe,CAACC,WAAW,CAAC,cAAc,EAAEJ,QAAQ,CAAC;MAChE,KAAKC,qBAAc,CAACK,OAAO;QACvB,OAAOH,sBAAe,CAACC,WAAW,CAAC,SAAS,EAAEJ,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMO,aAAa,GAAGV,YAAyC;EAE/DU,aAAa,CAACC,UAAU,GAAGX,YAAY,CAACY,SAAS;EACjDZ,YAAY,CAACY,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFR,sBAAe,CAACM,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;AACL,CAAC;AAAAE,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -7,7 +7,6 @@ exports.Runtime = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _reactNativeNitroModules = require("react-native-nitro-modules");
9
9
  var _StatusBar = require("../StatusBar");
10
- var _NavigtionBar = require("../NavigtionBar");
11
10
  var _common = require("../../common");
12
11
  const HybridUnistylesRuntime = _reactNativeNitroModules.NitroModules.createHybridObject('UnistylesRuntime');
13
12
  HybridUnistylesRuntime.statusBar = HybridUnistylesRuntime.createHybridStatusBar();
@@ -21,6 +20,5 @@ if (_common.isIOS) {
21
20
  HybridUnistylesRuntime.setImmersiveMode = isEnabled => HybridUnistylesRuntime.statusBar.setHidden(isEnabled, 'fade');
22
21
  }
23
22
  (0, _StatusBar.attachStatusBarJSMethods)(HybridUnistylesRuntime.statusBar);
24
- (0, _NavigtionBar.attachNavigationBarJSMethods)(HybridUnistylesRuntime.navigationBar);
25
23
  const Runtime = exports.Runtime = HybridUnistylesRuntime;
26
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","_NavigtionBar","_common","HybridUnistylesRuntime","NitroModules","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","processColor","isIOS","setImmersiveMode","isEnabled","setHidden","attachStatusBarJSMethods","attachNavigationBarJSMethods","Runtime","exports"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAkCA,MAAMK,sBAAsB,GAAGC,qCAAY,CACtCC,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpEF,sBAAsB,CAACG,SAAS,GAAGH,sBAAsB,CAACI,qBAAqB,CAAC,CAAC;AACjFJ,sBAAsB,CAACK,aAAa,GAAGL,sBAAsB,CAACM,yBAAyB,CAAC,CAAC;AACzFN,sBAAsB,CAACO,2BAA2B,GAAGP,sBAAsB,CAACQ,0BAA0B;AAEtGR,sBAAsB,CAACQ,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;EAE5CT,sBAAsB,CAACO,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIE,aAAK,EAAE;EACPZ,sBAAsB,CAACa,gBAAgB,GAAIC,SAAkB,IAAKd,sBAAsB,CAACG,SAAS,CAACY,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEA,IAAAE,mCAAwB,EAAChB,sBAAsB,CAACG,SAAS,CAAC;AAC1D,IAAAc,0CAA4B,EAACjB,sBAAsB,CAACK,aAAa,CAAC;AAE3D,MAAMa,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGlB,sBAA0C","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","_common","HybridUnistylesRuntime","NitroModules","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","processColor","isIOS","setImmersiveMode","isEnabled","setHidden","attachStatusBarJSMethods","Runtime","exports"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AAkCA,MAAMI,sBAAsB,GAAGC,qCAAY,CACtCC,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpEF,sBAAsB,CAACG,SAAS,GAAGH,sBAAsB,CAACI,qBAAqB,CAAC,CAAC;AACjFJ,sBAAsB,CAACK,aAAa,GAAGL,sBAAsB,CAACM,yBAAyB,CAAC,CAAC;AACzFN,sBAAsB,CAACO,2BAA2B,GAAGP,sBAAsB,CAACQ,0BAA0B;AAEtGR,sBAAsB,CAACQ,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;EAE5CT,sBAAsB,CAACO,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIE,aAAK,EAAE;EACPZ,sBAAsB,CAACa,gBAAgB,GAAIC,SAAkB,IAAKd,sBAAsB,CAACG,SAAS,CAACY,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEA,IAAAE,mCAAwB,EAAChB,sBAAsB,CAACG,SAAS,CAAC;AAEnD,MAAMc,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGjB,sBAA0C","ignoreList":[]}