react-native-unistyles 3.0.0-alpha.4 → 3.0.0-alpha.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (539) hide show
  1. package/README.md +7 -0
  2. package/Unistyles.podspec +1 -1
  3. package/android/CMakeLists.txt +19 -45
  4. package/android/build.gradle +6 -5
  5. package/android/src/main/cxx/NativeUnistylesModule.cpp +71 -0
  6. package/android/src/main/cxx/NativeUnistylesModule.h +42 -0
  7. package/android/src/main/cxx/cpp-adapter.cpp +8 -86
  8. package/android/src/main/java/com/unistyles/Equatable.kt +61 -0
  9. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +285 -0
  10. package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +152 -0
  11. package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +59 -0
  12. package/android/src/main/java/com/unistyles/UnistylesModule.kt +51 -0
  13. package/android/src/main/java/com/unistyles/UnistylesPackage.kt +16 -14
  14. package/cxx/NativePlatform.h +11 -0
  15. package/cxx/common/Constants.h +3 -0
  16. package/cxx/common/Helpers.h +140 -5
  17. package/cxx/core/HostStyle.cpp +10 -6
  18. package/cxx/core/HostStyle.h +4 -0
  19. package/cxx/core/StyleSheet.h +0 -2
  20. package/cxx/core/StyleSheetRegistry.cpp +9 -17
  21. package/cxx/core/StyleSheetRegistry.h +3 -4
  22. package/cxx/core/Unistyle.h +8 -11
  23. package/cxx/core/UnistyleData.h +23 -0
  24. package/cxx/core/UnistyleWrapper.h +108 -13
  25. package/cxx/core/UnistylesCommitHook.cpp +14 -15
  26. package/cxx/core/UnistylesCommitHook.h +6 -11
  27. package/cxx/core/UnistylesCommitShadowNode.h +13 -0
  28. package/cxx/core/UnistylesMountHook.cpp +28 -0
  29. package/cxx/core/UnistylesMountHook.h +27 -0
  30. package/cxx/core/UnistylesRegistry.cpp +119 -83
  31. package/cxx/core/UnistylesRegistry.h +16 -14
  32. package/cxx/core/UnistylesState.cpp +29 -8
  33. package/cxx/core/UnistylesState.h +5 -2
  34. package/cxx/hybridObjects/HybridNavigationBar.cpp +0 -4
  35. package/cxx/hybridObjects/HybridNavigationBar.h +3 -4
  36. package/cxx/hybridObjects/HybridShadowRegistry.cpp +16 -11
  37. package/cxx/hybridObjects/HybridStatusBar.cpp +0 -4
  38. package/cxx/hybridObjects/HybridStatusBar.h +3 -4
  39. package/cxx/hybridObjects/HybridStyleSheet.cpp +154 -23
  40. package/cxx/hybridObjects/HybridStyleSheet.h +27 -5
  41. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +96 -14
  42. package/cxx/hybridObjects/HybridUnistylesRuntime.h +19 -3
  43. package/cxx/parser/Parser.cpp +226 -175
  44. package/cxx/parser/Parser.h +11 -15
  45. package/cxx/shadowTree/ShadowLeafUpdate.h +2 -1
  46. package/cxx/shadowTree/ShadowTrafficController.h +71 -0
  47. package/cxx/shadowTree/ShadowTreeManager.cpp +23 -18
  48. package/cxx/shadowTree/ShadowTreeManager.h +3 -2
  49. package/ios/Equatable.swift +2 -1
  50. package/ios/NativePlatform+ios.swift +21 -7
  51. package/ios/NativePlatform+keyboard.swift +83 -0
  52. package/ios/NativePlatformListener+ios.swift +37 -24
  53. package/ios/Unistyles.h +1 -0
  54. package/ios/UnistylesModuleOnLoad.h +8 -2
  55. package/ios/UnistylesModuleOnLoad.mm +9 -1
  56. package/lib/commonjs/components/Display.js +18 -0
  57. package/lib/commonjs/components/Display.js.map +1 -0
  58. package/lib/commonjs/components/Hide.js +18 -0
  59. package/lib/commonjs/components/Hide.js.map +1 -0
  60. package/lib/commonjs/components/index.js +20 -0
  61. package/lib/commonjs/components/index.js.map +1 -0
  62. package/lib/commonjs/components/useMedia.js +59 -0
  63. package/lib/commonjs/components/useMedia.js.map +1 -0
  64. package/lib/commonjs/components/useMedia.web.js +43 -0
  65. package/lib/commonjs/components/useMedia.web.js.map +1 -0
  66. package/lib/commonjs/core/createUnistylesComponent.js +79 -0
  67. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -0
  68. package/lib/commonjs/core/createUnistylesComponent.native.js +82 -0
  69. package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -0
  70. package/lib/commonjs/core/index.js +13 -0
  71. package/lib/commonjs/core/index.js.map +1 -0
  72. package/lib/commonjs/index.js +21 -11
  73. package/lib/commonjs/index.js.map +1 -1
  74. package/lib/commonjs/mq.js +25 -12
  75. package/lib/commonjs/mq.js.map +1 -1
  76. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  77. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  78. package/lib/commonjs/specs/NavigtionBar/index.js +0 -15
  79. package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
  80. package/lib/commonjs/specs/ShadowRegistry/index.js +10 -6
  81. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  82. package/lib/commonjs/specs/StatusBar/index.js +0 -5
  83. package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
  84. package/lib/commonjs/specs/StyleSheet/index.js +1 -0
  85. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  86. package/lib/commonjs/specs/UnistylesRuntime/index.js +1 -3
  87. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
  88. package/lib/commonjs/specs/index.js +7 -0
  89. package/lib/commonjs/specs/index.js.map +1 -1
  90. package/lib/commonjs/specs/index.web.js +1 -1
  91. package/lib/commonjs/types/stylesheet.js.map +1 -1
  92. package/lib/commonjs/utils.js +26 -0
  93. package/lib/commonjs/utils.js.map +1 -0
  94. package/lib/commonjs/web/convert/index.js +79 -0
  95. package/lib/commonjs/web/convert/index.js.map +1 -0
  96. package/lib/commonjs/web/convert/module.d.js +2 -0
  97. package/lib/commonjs/web/convert/module.d.js.map +1 -0
  98. package/lib/commonjs/web/convert/object/boxShadow.js +59 -0
  99. package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -0
  100. package/lib/commonjs/web/convert/object/filter.js +42 -0
  101. package/lib/commonjs/web/convert/object/filter.js.map +1 -0
  102. package/lib/commonjs/web/convert/object/index.js +39 -0
  103. package/lib/commonjs/web/convert/object/index.js.map +1 -0
  104. package/lib/commonjs/web/convert/object/objectStyle.js +56 -0
  105. package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -0
  106. package/lib/commonjs/web/convert/object/transform.js +27 -0
  107. package/lib/commonjs/web/convert/object/transform.js.map +1 -0
  108. package/lib/commonjs/web/convert/pseudo.js +10 -0
  109. package/lib/commonjs/web/convert/pseudo.js.map +1 -0
  110. package/lib/commonjs/web/convert/shadow/boxShadow.js +62 -0
  111. package/lib/commonjs/web/convert/shadow/boxShadow.js.map +1 -0
  112. package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js +38 -0
  113. package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
  114. package/lib/commonjs/web/convert/shadow/index.js +28 -0
  115. package/lib/commonjs/web/convert/shadow/index.js.map +1 -0
  116. package/lib/commonjs/web/convert/shadow/textShadow.js +59 -0
  117. package/lib/commonjs/web/convert/shadow/textShadow.js.map +1 -0
  118. package/lib/commonjs/web/convert/style.js +93 -0
  119. package/lib/commonjs/web/convert/style.js.map +1 -0
  120. package/lib/commonjs/web/convert/types.js +9 -0
  121. package/lib/commonjs/web/convert/types.js.map +1 -0
  122. package/lib/commonjs/web/convert/utils.js +59 -0
  123. package/lib/commonjs/web/convert/utils.js.map +1 -0
  124. package/lib/commonjs/web/create.js +49 -0
  125. package/lib/commonjs/web/create.js.map +1 -0
  126. package/lib/commonjs/web/index.js +60 -0
  127. package/lib/commonjs/web/index.js.map +1 -0
  128. package/lib/commonjs/web/listener.js +61 -0
  129. package/lib/commonjs/web/listener.js.map +1 -0
  130. package/lib/commonjs/web/mock.js +27 -0
  131. package/lib/commonjs/web/mock.js.map +1 -0
  132. package/lib/commonjs/web/registry.js +172 -0
  133. package/lib/commonjs/web/registry.js.map +1 -0
  134. package/lib/commonjs/web/runtime.js +173 -0
  135. package/lib/commonjs/web/runtime.js.map +1 -0
  136. package/lib/commonjs/web/shadowRegistry.js +142 -0
  137. package/lib/commonjs/web/shadowRegistry.js.map +1 -0
  138. package/lib/commonjs/web/state.js +73 -0
  139. package/lib/commonjs/web/state.js.map +1 -0
  140. package/lib/commonjs/web/utils/common.js +39 -0
  141. package/lib/commonjs/web/utils/common.js.map +1 -0
  142. package/lib/commonjs/web/utils/index.js +28 -0
  143. package/lib/commonjs/web/utils/index.js.map +1 -0
  144. package/lib/commonjs/web/utils/unistyle.js +85 -0
  145. package/lib/commonjs/web/utils/unistyle.js.map +1 -0
  146. package/lib/commonjs/web/variants/getVariants.js +39 -0
  147. package/lib/commonjs/web/variants/getVariants.js.map +1 -0
  148. package/lib/commonjs/web/variants/index.js +28 -0
  149. package/lib/commonjs/web/variants/index.js.map +1 -0
  150. package/lib/commonjs/web/variants/useVariants.js +59 -0
  151. package/lib/commonjs/web/variants/useVariants.js.map +1 -0
  152. package/lib/module/components/Display.js +13 -0
  153. package/lib/module/components/Display.js.map +1 -0
  154. package/lib/module/components/Hide.js +13 -0
  155. package/lib/module/components/Hide.js.map +1 -0
  156. package/lib/module/components/index.js +5 -0
  157. package/lib/module/components/index.js.map +1 -0
  158. package/lib/module/components/useMedia.js +54 -0
  159. package/lib/module/components/useMedia.js.map +1 -0
  160. package/lib/module/components/useMedia.web.js +38 -0
  161. package/lib/module/components/useMedia.web.js.map +1 -0
  162. package/lib/module/core/createUnistylesComponent.js +72 -0
  163. package/lib/module/core/createUnistylesComponent.js.map +1 -0
  164. package/lib/module/core/createUnistylesComponent.native.js +75 -0
  165. package/lib/module/core/createUnistylesComponent.native.js.map +1 -0
  166. package/lib/module/core/index.js +4 -0
  167. package/lib/module/core/index.js.map +1 -0
  168. package/lib/module/index.js +2 -9
  169. package/lib/module/index.js.map +1 -1
  170. package/lib/module/mq.js +21 -11
  171. package/lib/module/mq.js.map +1 -1
  172. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  173. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  174. package/lib/module/specs/NavigtionBar/index.js +0 -10
  175. package/lib/module/specs/NavigtionBar/index.js.map +1 -1
  176. package/lib/module/specs/ShadowRegistry/index.js +10 -6
  177. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  178. package/lib/module/specs/StatusBar/index.js +1 -6
  179. package/lib/module/specs/StatusBar/index.js.map +1 -1
  180. package/lib/module/specs/StyleSheet/index.js +1 -0
  181. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  182. package/lib/module/specs/UnistylesRuntime/index.js +1 -3
  183. package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
  184. package/lib/module/specs/index.js +2 -1
  185. package/lib/module/specs/index.js.map +1 -1
  186. package/lib/module/specs/index.web.js +1 -1
  187. package/lib/module/specs/index.web.js.map +1 -1
  188. package/lib/module/types/stylesheet.js.map +1 -1
  189. package/lib/module/utils.js +21 -0
  190. package/lib/module/utils.js.map +1 -0
  191. package/lib/module/web/convert/index.js +74 -0
  192. package/lib/module/web/convert/index.js.map +1 -0
  193. package/lib/module/web/convert/module.d.js +2 -0
  194. package/lib/module/web/convert/module.d.js.map +1 -0
  195. package/lib/module/web/convert/object/boxShadow.js +54 -0
  196. package/lib/module/web/convert/object/boxShadow.js.map +1 -0
  197. package/lib/module/web/convert/object/filter.js +37 -0
  198. package/lib/module/web/convert/object/filter.js.map +1 -0
  199. package/lib/module/web/convert/object/index.js +6 -0
  200. package/lib/module/web/convert/object/index.js.map +1 -0
  201. package/lib/module/web/convert/object/objectStyle.js +51 -0
  202. package/lib/module/web/convert/object/objectStyle.js.map +1 -0
  203. package/lib/module/web/convert/object/transform.js +22 -0
  204. package/lib/module/web/convert/object/transform.js.map +1 -0
  205. package/lib/module/web/convert/pseudo.js +5 -0
  206. package/lib/module/web/convert/pseudo.js.map +1 -0
  207. package/lib/module/web/convert/shadow/boxShadow.js +57 -0
  208. package/lib/module/web/convert/shadow/boxShadow.js.map +1 -0
  209. package/lib/module/web/convert/shadow/getShadowBreakpoints.js +33 -0
  210. package/lib/module/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
  211. package/lib/module/web/convert/shadow/index.js +5 -0
  212. package/lib/module/web/convert/shadow/index.js.map +1 -0
  213. package/lib/module/web/convert/shadow/textShadow.js +54 -0
  214. package/lib/module/web/convert/shadow/textShadow.js.map +1 -0
  215. package/lib/module/web/convert/style.js +88 -0
  216. package/lib/module/web/convert/style.js.map +1 -0
  217. package/lib/module/web/convert/types.js +5 -0
  218. package/lib/module/web/convert/types.js.map +1 -0
  219. package/lib/module/web/convert/utils.js +45 -0
  220. package/lib/module/web/convert/utils.js.map +1 -0
  221. package/lib/module/web/create.js +44 -0
  222. package/lib/module/web/create.js.map +1 -0
  223. package/lib/module/web/index.js +26 -0
  224. package/lib/module/web/index.js.map +1 -0
  225. package/lib/module/web/listener.js +57 -0
  226. package/lib/module/web/listener.js.map +1 -0
  227. package/lib/module/web/mock.js +23 -0
  228. package/lib/module/web/mock.js.map +1 -0
  229. package/lib/module/web/registry.js +168 -0
  230. package/lib/module/web/registry.js.map +1 -0
  231. package/lib/module/web/runtime.js +169 -0
  232. package/lib/module/web/runtime.js.map +1 -0
  233. package/lib/module/web/shadowRegistry.js +138 -0
  234. package/lib/module/web/shadowRegistry.js.map +1 -0
  235. package/lib/module/web/state.js +69 -0
  236. package/lib/module/web/state.js.map +1 -0
  237. package/lib/module/web/utils/common.js +28 -0
  238. package/lib/module/web/utils/common.js.map +1 -0
  239. package/lib/module/web/utils/index.js +5 -0
  240. package/lib/module/web/utils/index.js.map +1 -0
  241. package/lib/module/web/utils/unistyle.js +72 -0
  242. package/lib/module/web/utils/unistyle.js.map +1 -0
  243. package/lib/module/web/variants/getVariants.js +34 -0
  244. package/lib/module/web/variants/getVariants.js.map +1 -0
  245. package/lib/module/web/variants/index.js +5 -0
  246. package/lib/module/web/variants/index.js.map +1 -0
  247. package/lib/module/web/variants/useVariants.js +54 -0
  248. package/lib/module/web/variants/useVariants.js.map +1 -0
  249. package/lib/typescript/src/components/Display.d.ts +7 -0
  250. package/lib/typescript/src/components/Display.d.ts.map +1 -0
  251. package/lib/typescript/src/components/Hide.d.ts +7 -0
  252. package/lib/typescript/src/components/Hide.d.ts.map +1 -0
  253. package/lib/typescript/src/components/index.d.ts +3 -0
  254. package/lib/typescript/src/components/index.d.ts.map +1 -0
  255. package/lib/typescript/src/components/useMedia.d.ts +6 -0
  256. package/lib/typescript/src/components/useMedia.d.ts.map +1 -0
  257. package/lib/typescript/src/components/useMedia.web.d.ts +6 -0
  258. package/lib/typescript/src/components/useMedia.web.d.ts.map +1 -0
  259. package/lib/typescript/src/core/createUnistylesComponent.d.ts +8 -0
  260. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -0
  261. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +8 -0
  262. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -0
  263. package/lib/typescript/src/core/index.d.ts +2 -0
  264. package/lib/typescript/src/core/index.d.ts.map +1 -0
  265. package/lib/typescript/src/index.d.ts +3 -0
  266. package/lib/typescript/src/index.d.ts.map +1 -1
  267. package/lib/typescript/src/mq.d.ts +8 -0
  268. package/lib/typescript/src/mq.d.ts.map +1 -1
  269. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +7 -5
  270. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  271. package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts +0 -1
  272. package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
  273. package/lib/typescript/src/specs/NavigtionBar/index.d.ts +1 -10
  274. package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -1
  275. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +4 -4
  276. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  277. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +3 -0
  278. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
  279. package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts +0 -1
  280. package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
  281. package/lib/typescript/src/specs/StatusBar/index.d.ts +2 -4
  282. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  283. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +3 -1
  284. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
  285. package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -1
  286. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  287. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts +1 -1
  288. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
  289. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +3 -1
  290. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  291. package/lib/typescript/src/specs/index.d.ts +4 -2
  292. package/lib/typescript/src/specs/index.d.ts.map +1 -1
  293. package/lib/typescript/src/specs/index.web.d.ts +1 -1
  294. package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
  295. package/lib/typescript/src/types/breakpoints.d.ts +11 -11
  296. package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
  297. package/lib/typescript/src/types/common.d.ts +1 -0
  298. package/lib/typescript/src/types/common.d.ts.map +1 -1
  299. package/lib/typescript/src/types/index.d.ts +1 -1
  300. package/lib/typescript/src/types/index.d.ts.map +1 -1
  301. package/lib/typescript/src/types/stylesheet.d.ts +6 -4
  302. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
  303. package/lib/typescript/src/types/variants.d.ts +4 -1
  304. package/lib/typescript/src/types/variants.d.ts.map +1 -1
  305. package/lib/typescript/src/utils.d.ts +2 -0
  306. package/lib/typescript/src/utils.d.ts.map +1 -0
  307. package/lib/typescript/src/web/convert/index.d.ts +3 -0
  308. package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
  309. package/lib/typescript/src/web/convert/object/boxShadow.d.ts +9 -0
  310. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -0
  311. package/lib/typescript/src/web/convert/object/filter.d.ts +3 -0
  312. package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -0
  313. package/lib/typescript/src/web/convert/object/index.d.ts +4 -0
  314. package/lib/typescript/src/web/convert/object/index.d.ts.map +1 -0
  315. package/lib/typescript/src/web/convert/object/objectStyle.d.ts +5 -0
  316. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -0
  317. package/lib/typescript/src/web/convert/object/transform.d.ts +3 -0
  318. package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -0
  319. package/lib/typescript/src/web/convert/pseudo.d.ts +6 -0
  320. package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -0
  321. package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts +8 -0
  322. package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts.map +1 -0
  323. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts +2 -0
  324. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -0
  325. package/lib/typescript/src/web/convert/shadow/index.d.ts +3 -0
  326. package/lib/typescript/src/web/convert/shadow/index.d.ts.map +1 -0
  327. package/lib/typescript/src/web/convert/shadow/textShadow.d.ts +8 -0
  328. package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -0
  329. package/lib/typescript/src/web/convert/style.d.ts +2 -0
  330. package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
  331. package/lib/typescript/{web → src/web}/convert/types.d.ts +8 -2
  332. package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
  333. package/lib/typescript/src/web/convert/utils.d.ts +12 -0
  334. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
  335. package/lib/typescript/src/web/create.d.ts +1443 -0
  336. package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
  337. package/lib/typescript/src/web/index.d.ts +1459 -0
  338. package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
  339. package/lib/typescript/{web/listener → src/web}/listener.d.ts +5 -2
  340. package/lib/typescript/src/web/listener.d.ts.map +1 -0
  341. package/lib/typescript/src/web/mock.d.ts +5 -0
  342. package/lib/typescript/src/web/mock.d.ts.map +1 -0
  343. package/lib/typescript/src/web/registry.d.ts +24 -0
  344. package/lib/typescript/src/web/registry.d.ts.map +1 -0
  345. package/lib/typescript/{web → src/web}/runtime.d.ts +11 -10
  346. package/lib/typescript/src/web/runtime.d.ts.map +1 -0
  347. package/lib/typescript/src/web/shadowRegistry.d.ts +17 -0
  348. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
  349. package/lib/typescript/src/web/state.d.ts +18 -0
  350. package/lib/typescript/src/web/state.d.ts.map +1 -0
  351. package/lib/typescript/src/web/utils/common.d.ts +8 -0
  352. package/lib/typescript/src/web/utils/common.d.ts.map +1 -0
  353. package/lib/typescript/src/web/utils/index.d.ts +3 -0
  354. package/lib/typescript/src/web/utils/index.d.ts.map +1 -0
  355. package/lib/typescript/src/web/utils/unistyle.d.ts +20 -0
  356. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -0
  357. package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
  358. package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
  359. package/lib/typescript/src/web/variants/index.d.ts +3 -0
  360. package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
  361. package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
  362. package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
  363. package/nitrogen/generated/android/c++/JColorScheme.hpp +1 -1
  364. package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +57 -0
  365. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +69 -0
  366. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +35 -34
  367. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +15 -6
  368. package/nitrogen/generated/android/c++/JOrientation.hpp +1 -1
  369. package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +4 -1
  370. package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +9 -7
  371. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +1 -0
  372. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void_std__vector_UnistyleDependency_.kt → Func_void_UnistylesNativeMiniRuntime.kt} +6 -5
  373. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt +46 -0
  374. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +25 -13
  375. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +1 -0
  376. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
  377. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +3 -1
  378. package/nitrogen/generated/android/unistyles+autolinking.cmake +13 -1
  379. package/nitrogen/generated/android/unistyles+autolinking.gradle +2 -0
  380. package/nitrogen/generated/android/{UnistylesOnLoad.cpp → unistylesOnLoad.cpp} +6 -4
  381. package/nitrogen/generated/android/{UnistylesOnLoad.hpp → unistylesOnLoad.hpp} +1 -1
  382. package/nitrogen/generated/ios/Unistyles+autolinking.rb +6 -4
  383. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +25 -0
  384. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +73 -38
  385. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +0 -29
  386. package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +8 -8
  387. package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +4 -16
  388. package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +156 -115
  389. package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
  390. package/nitrogen/generated/ios/swift/UnistylesNativeMiniRuntime.swift +16 -5
  391. package/nitrogen/generated/shared/c++/ColorScheme.hpp +2 -2
  392. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +2 -2
  393. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +6 -3
  394. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +0 -1
  395. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -1
  396. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.cpp +1 -0
  397. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +5 -0
  398. package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
  399. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +0 -1
  400. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -1
  401. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +2 -1
  402. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +10 -4
  403. package/nitrogen/generated/shared/c++/Orientation.hpp +2 -2
  404. package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
  405. package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +10 -9
  406. package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +9 -8
  407. package/package.json +20 -30
  408. package/plugin/common.js +31 -3
  409. package/plugin/index.js +107 -18
  410. package/plugin/ref.js +129 -13
  411. package/plugin/style.js +189 -22
  412. package/plugin/stylesheet.js +53 -3
  413. package/plugin/variants.js +33 -0
  414. package/src/components/Display.tsx +12 -0
  415. package/src/components/Hide.tsx +12 -0
  416. package/src/components/index.ts +2 -0
  417. package/src/components/useMedia.ts +64 -0
  418. package/src/components/useMedia.web.ts +47 -0
  419. package/src/core/createUnistylesComponent.native.tsx +83 -0
  420. package/src/core/createUnistylesComponent.tsx +84 -0
  421. package/src/core/index.ts +1 -0
  422. package/src/index.ts +3 -12
  423. package/src/mq.ts +27 -9
  424. package/src/specs/NativePlatform/NativePlatform.nitro.ts +7 -5
  425. package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +0 -1
  426. package/src/specs/NavigtionBar/index.ts +1 -25
  427. package/src/specs/ShadowRegistry/index.ts +16 -10
  428. package/src/specs/ShadowRegistry/types.ts +4 -1
  429. package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +0 -1
  430. package/src/specs/StatusBar/index.ts +2 -12
  431. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +4 -1
  432. package/src/specs/StyleSheet/index.ts +6 -1
  433. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -1
  434. package/src/specs/UnistylesRuntime/index.ts +5 -4
  435. package/src/specs/index.ts +6 -2
  436. package/src/specs/index.web.ts +1 -1
  437. package/src/types/breakpoints.ts +25 -13
  438. package/src/types/common.ts +1 -0
  439. package/src/types/index.ts +1 -1
  440. package/src/types/stylesheet.ts +7 -5
  441. package/src/types/variants.ts +7 -1
  442. package/src/utils.ts +22 -0
  443. package/{web → src/web}/convert/index.ts +25 -25
  444. package/src/web/convert/object/boxShadow.ts +55 -0
  445. package/src/web/convert/object/filter.ts +39 -0
  446. package/src/web/convert/object/index.ts +3 -0
  447. package/src/web/convert/object/objectStyle.ts +69 -0
  448. package/src/web/convert/object/transform.ts +24 -0
  449. package/src/web/convert/pseudo.ts +137 -0
  450. package/src/web/convert/shadow/boxShadow.ts +50 -0
  451. package/src/web/convert/shadow/getShadowBreakpoints.ts +34 -0
  452. package/src/web/convert/shadow/index.ts +2 -0
  453. package/src/web/convert/shadow/textShadow.ts +48 -0
  454. package/{web → src/web}/convert/style.ts +61 -10
  455. package/{web → src/web}/convert/types.ts +9 -2
  456. package/{web → src/web}/convert/utils.ts +11 -5
  457. package/src/web/create.ts +48 -0
  458. package/{web → src/web}/index.ts +4 -3
  459. package/src/web/listener.ts +63 -0
  460. package/{web → src/web}/mock.ts +3 -14
  461. package/src/web/registry.ts +215 -0
  462. package/{web → src/web}/runtime.ts +32 -21
  463. package/src/web/shadowRegistry.ts +145 -0
  464. package/src/web/state.ts +94 -0
  465. package/src/web/utils/common.ts +45 -0
  466. package/src/web/utils/index.ts +2 -0
  467. package/src/web/utils/unistyle.ts +108 -0
  468. package/src/web/variants/getVariants.ts +42 -0
  469. package/src/web/variants/index.ts +2 -0
  470. package/src/web/variants/useVariants.ts +65 -0
  471. package/android/src/main/cxx/helpers.cpp +0 -105
  472. package/android/src/main/cxx/helpers.h +0 -16
  473. package/android/src/main/cxx/platform.cpp +0 -170
  474. package/android/src/main/cxx/platform.h +0 -20
  475. package/lib/typescript/example/App.d.ts +0 -4
  476. package/lib/typescript/example/App.d.ts.map +0 -1
  477. package/lib/typescript/example/unistyles.d.ts +0 -63
  478. package/lib/typescript/example/unistyles.d.ts.map +0 -1
  479. package/lib/typescript/expo-example/App.d.ts +0 -4
  480. package/lib/typescript/expo-example/App.d.ts.map +0 -1
  481. package/lib/typescript/expo-example/unistyles.d.ts +0 -63
  482. package/lib/typescript/expo-example/unistyles.d.ts.map +0 -1
  483. package/lib/typescript/web/convert/boxShadow.d.ts +0 -3
  484. package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
  485. package/lib/typescript/web/convert/breakpoint.d.ts +0 -3
  486. package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
  487. package/lib/typescript/web/convert/index.d.ts +0 -4
  488. package/lib/typescript/web/convert/index.d.ts.map +0 -1
  489. package/lib/typescript/web/convert/shadow.d.ts +0 -2
  490. package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
  491. package/lib/typescript/web/convert/style.d.ts +0 -3
  492. package/lib/typescript/web/convert/style.d.ts.map +0 -1
  493. package/lib/typescript/web/convert/textShadow.d.ts +0 -3
  494. package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
  495. package/lib/typescript/web/convert/transform.d.ts +0 -5
  496. package/lib/typescript/web/convert/transform.d.ts.map +0 -1
  497. package/lib/typescript/web/convert/types.d.ts.map +0 -1
  498. package/lib/typescript/web/convert/utils.d.ts +0 -8
  499. package/lib/typescript/web/convert/utils.d.ts.map +0 -1
  500. package/lib/typescript/web/create.d.ts +0 -2449
  501. package/lib/typescript/web/index.d.ts +0 -2464
  502. package/lib/typescript/web/listener/index.d.ts +0 -2
  503. package/lib/typescript/web/listener/index.d.ts.map +0 -1
  504. package/lib/typescript/web/listener/listener.d.ts.map +0 -1
  505. package/lib/typescript/web/mock.d.ts +0 -14
  506. package/lib/typescript/web/mock.d.ts.map +0 -1
  507. package/lib/typescript/web/mq.d.ts +0 -4
  508. package/lib/typescript/web/mq.d.ts.map +0 -1
  509. package/lib/typescript/web/pseudo.d.ts +0 -4
  510. package/lib/typescript/web/pseudo.d.ts.map +0 -1
  511. package/lib/typescript/web/registry.d.ts +0 -12
  512. package/lib/typescript/web/registry.d.ts.map +0 -1
  513. package/lib/typescript/web/runtime.d.ts.map +0 -1
  514. package/lib/typescript/web/state.d.ts +0 -24
  515. package/lib/typescript/web/state.d.ts.map +0 -1
  516. package/lib/typescript/web/useVariants.d.ts +0 -3
  517. package/lib/typescript/web/useVariants.d.ts.map +0 -1
  518. package/lib/typescript/web/utils.d.ts +0 -18
  519. package/lib/typescript/web/utils.d.ts.map +0 -1
  520. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +0 -60
  521. package/plugin/__tests__/dependencies.spec.js +0 -360
  522. package/plugin/__tests__/ref.spec.js +0 -991
  523. package/plugin/__tests__/stylesheet.spec.js +0 -396
  524. package/web/convert/boxShadow.ts +0 -72
  525. package/web/convert/breakpoint.ts +0 -21
  526. package/web/convert/shadow.ts +0 -68
  527. package/web/convert/textShadow.ts +0 -69
  528. package/web/convert/transform.ts +0 -89
  529. package/web/create.ts +0 -102
  530. package/web/listener/index.ts +0 -1
  531. package/web/listener/listener.ts +0 -33
  532. package/web/mq.ts +0 -19
  533. package/web/pseudo.ts +0 -11
  534. package/web/registry.ts +0 -41
  535. package/web/state.ts +0 -148
  536. package/web/useVariants.ts +0 -99
  537. package/web/utils.ts +0 -95
  538. /package/nitrogen/generated/android/{UnistylesOnLoad.kt → unistylesOnLoad.kt} +0 -0
  539. /package/{web → src/web}/convert/module.d.ts +0 -0
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMedia = void 0;
7
+ var _react = require("react");
8
+ var _specs = require("../specs");
9
+ var _mq = require("../mq");
10
+ const useMedia = config => {
11
+ const computeIsVisible = () => {
12
+ const maybeMq = config.mq;
13
+ if (!(0, _mq.isUnistylesMq)(maybeMq)) {
14
+ console.error(`🦄 Unistyles: Received invalid mq: ${maybeMq}`);
15
+ return false;
16
+ }
17
+ const parsedMq = (0, _mq.parseMq)(maybeMq);
18
+ if (!(0, _mq.isValidMq)(parsedMq)) {
19
+ console.error(`🦄 Unistyles: Received invalid mq where min is greater than max: ${maybeMq}`);
20
+ return false;
21
+ }
22
+ const {
23
+ width,
24
+ height
25
+ } = _specs.UnistylesRuntime.screen;
26
+ if (parsedMq.minWidth !== undefined && width < parsedMq.minWidth) {
27
+ return false;
28
+ }
29
+ if (parsedMq.maxWidth !== undefined && width > parsedMq.maxWidth) {
30
+ return false;
31
+ }
32
+ if (parsedMq.minHeight !== undefined && height < parsedMq.minHeight) {
33
+ return false;
34
+ }
35
+ if (parsedMq.maxHeight !== undefined && height > parsedMq.maxHeight) {
36
+ return false;
37
+ }
38
+ return true;
39
+ };
40
+ const [isVisible, setIsVisible] = (0, _react.useState)(computeIsVisible());
41
+ (0, _react.useEffect)(() => {
42
+ setIsVisible(computeIsVisible());
43
+ }, [config.mq]);
44
+ (0, _react.useLayoutEffect)(() => {
45
+ const removeChangeListener = _specs.StyleSheet.addChangeListener(dependencies => {
46
+ if (dependencies.includes(_specs.UnistyleDependency.Breakpoints)) {
47
+ setIsVisible(computeIsVisible());
48
+ }
49
+ });
50
+ return () => {
51
+ removeChangeListener();
52
+ };
53
+ }, [config.mq]);
54
+ return {
55
+ isVisible
56
+ };
57
+ };
58
+ exports.useMedia = useMedia;
59
+ //# sourceMappingURL=useMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_specs","_mq","useMedia","config","computeIsVisible","maybeMq","mq","isUnistylesMq","console","error","parsedMq","parseMq","isValidMq","width","height","UnistylesRuntime","screen","minWidth","undefined","maxWidth","minHeight","maxHeight","isVisible","setIsVisible","useState","useEffect","useLayoutEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","includes","UnistyleDependency","Breakpoints","exports"],"sourceRoot":"../../../src","sources":["components/useMedia.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAF,OAAA;AAEO,MAAMG,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,gBAAgB,GAAGA,CAAA,KAAe;IACpC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAuB;IAE9C,IAAI,CAAC,IAAAC,iBAAa,EAACF,OAAO,CAAC,EAAE;MACzBG,OAAO,CAACC,KAAK,CAAC,sCAAsCJ,OAAO,EAAE,CAAC;MAE9D,OAAO,KAAK;IAChB;IAEA,MAAMK,QAAQ,GAAG,IAAAC,WAAO,EAACN,OAAO,CAAC;IAEjC,IAAI,CAAC,IAAAO,aAAS,EAACF,QAAQ,CAAC,EAAE;MACtBF,OAAO,CAACC,KAAK,CAAC,oEAAoEJ,OAAO,EAAE,CAAC;MAE5F,OAA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AY,OAAA,CAAAhC,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMedia = void 0;
7
+ var _react = require("react");
8
+ var _mq = require("../mq");
9
+ const useMedia = config => {
10
+ const disposeRef = (0, _react.useRef)(() => {});
11
+ const [isVisible, setIsVisible] = (0, _react.useState)(() => {
12
+ const maybeMq = config.mq;
13
+ if (!(0, _mq.isUnistylesMq)(maybeMq)) {
14
+ console.error(`🦄 Unistyles: Received invalid mq: ${maybeMq}`);
15
+ return false;
16
+ }
17
+ const parsedMq = (0, _mq.parseMq)(maybeMq);
18
+ if (!(0, _mq.isValidMq)(parsedMq)) {
19
+ console.error(`🦄 Unistyles: Received invalid mq where min is greater than max: ${maybeMq}`);
20
+ return false;
21
+ }
22
+ const {
23
+ minWidth,
24
+ maxWidth,
25
+ minHeight,
26
+ maxHeight
27
+ } = parsedMq;
28
+ const mediaQuery = [minWidth !== undefined ? `(min-width: ${minWidth}px)` : undefined, maxWidth !== undefined ? `(max-width: ${maxWidth}px)` : undefined, minHeight !== undefined ? `(min-height: ${minHeight}px)` : undefined, maxHeight !== undefined ? `(max-height: ${maxHeight}px)` : undefined].filter(Boolean).join(' and ');
29
+ const media = window.matchMedia(mediaQuery);
30
+ const handler = event => setIsVisible(event.matches);
31
+ media.addEventListener('change', handler);
32
+ disposeRef.current = () => media.removeEventListener('change', handler);
33
+ return media.matches;
34
+ });
35
+
36
+ // Unmount
37
+ (0, _react.useEffect)(() => () => disposeRef.current(), []);
38
+ return {
39
+ isVisible
40
+ };
41
+ };
42
+ exports.useMedia = useMedia;
43
+ //# sourceMappingURL=useMedia.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_mq","useMedia","config","disposeRef","useRef","isVisible","setIsVisible","useState","maybeMq","mq","isUnistylesMq","console","error","parsedMq","parseMq","isValidMq","minWidth","maxWidth","minHeight","maxHeight","mediaQuery","undefined","filter","Boolean","join","media","window","matchMedia","handler","event","matches","addEventListener","current","removeEventListener","useEffect","exports"],"sourceRoot":"../../../src","sources":["components/useMedia.web.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAAC,MAAM,CAAC,CAAC,CAAC;EACnC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM;IAC7C,MAAMC,OAAO,GAAGN,MAAM,CAACO,EAAuB;IAE9C,IAAI,CAAC,IAAAC,iBAAa,EAACF,OAAO,CAAC,EAAE;MACzBG,OAAO,CAACC,KAAK,CAAC,sCAAsCJ,OAAO,EAAE,CAAC;MAE9D,OAAO,KAAK;IAChB;IAEA,MAAMK,QAAQ,GAAG,IAAAC,WAAO,EAACN,OAAO,CAAC;IAEjC,IAAI,CAAC,IAAAO,aAAS,EAACF,QAAQ,CAAC,EAAE;MACtBF,OAAO,CAACC,KAAK,CAAC,oEAAoEJ,OAAO,EAAE,CAAC;MAE5F,OAAO,KAAK;IAChB;IAEA,MAAM;MAAEQ,QAAQ;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAAU,CAAC,GAAGN,QAAQ;IAE7D,MAAMO,UAAU,GAAG,CACfJ,QAAQ,KAAKK,SAAS,GAAG,eAAeL,QAAQ,KAAK,GAAGK,SAAS,EACjEJ,QAAQ,KAAKI,SAAS,GAAG,eAAeJ,QAAQ,KAAK,GAAGI,SAAS,EACjEH,SAAS,KAAKG,SAAS,GAAG,gBAAgBH,SAAS,KAAK,GAAGG,SAAS,EACpEF,SAAS,KAAKE,SAAS,GAAG,gBAAgBF,SAAS,KAAK,GAAGE,SAAS,CACvE,CAACC,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;IAE/B,MAAMC,KAAK,GAAGC,MAAM,CAACC,UAAU,CAACP,UAAU,CAAC;IAC3C,MAAMQ,OAAO,GAAIC,KAA0B,IAAKvB,YAAY,CAACuB,KAAK,CAACC,OAAO,CAAC;IAE3EL,KAAK,CAACM,gBAAgB,CAAC,QAAQ,EAAEH,OAAO,CAAC;IACzCzB,UAAU,CAAC6B,OAAO,GAAG,MAAMP,KAAK,CAACQ,mBAAmB,CAAC,QAAQ,EAAEL,OAAO,CAAC;IAEvE,OAAOH,KAAK,CAACK,OAAO;EACxB,CAAC,CAAC;;EAEF;EACA,IAAAI,gBAAS,EAAC,MAAM,MAAM/B,UAAU,CAAC6B,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;EAE/C,OAAO;IACH3B;EACJ,CAAC;AACL,CAAC;AAAA8B,OAAA,CAAAlC,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createUnistylesComponent = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _specs = require("../specs");
9
+ var _NativePlatform = require("../specs/NativePlatform");
10
+ var _listener = require("../web/listener");
11
+ var _web = require("../web");
12
+ var _utils = require("../web/utils");
13
+ var _utils2 = require("../utils");
14
+ var _jsxRuntime = require("react/jsx-runtime");
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); }
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; }
17
+ const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
18
+ const ALL_DEPENDENCIES = Object.values(_NativePlatform.UnistyleDependency).filter(dependency => typeof dependency === 'number');
19
+ const useShadowRegistry = style => {
20
+ const [ref] = (0, _react.useState)(document.createElement('div'));
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]);
33
+ (0, _react.useEffect)(() => () => {
34
+ // Remove styles on unmount
35
+ if (style) {
36
+ _web.UnistylesShadowRegistry.add(null, [style], undefined, []);
37
+ }
38
+ });
39
+ return classNames;
40
+ };
41
+ const createUnistylesComponent = (Component, mappings) => {
42
+ return /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
43
+ const narrowedProps = props;
44
+ const [mappingsProps, setMappingsProps] = (0, _react.useState)(mappings?.(_specs.UnistylesRuntime.getTheme()));
45
+ const styleClassNames = useShadowRegistry(narrowedProps.style);
46
+ const contentContainerStyleClassNames = useShadowRegistry(narrowedProps.contentContainerStyle);
47
+ (0, _react.useEffect)(() => {
48
+ const disposeMappings = _listener.UnistylesListener.addListeners(ALL_DEPENDENCIES, () => {
49
+ if (!mappings) {
50
+ disposeMappings();
51
+ return;
52
+ }
53
+ return setMappingsProps(mappings(_specs.UnistylesRuntime.getTheme()));
54
+ });
55
+ return () => disposeMappings();
56
+ }, [mappingsProps, narrowedProps.style]);
57
+ const combinedProps = {
58
+ ...(0, _utils2.deepMergeObjects)(props, mappingsProps ?? {}),
59
+ ...(narrowedProps.style ? {
60
+ style: {
61
+ $$css: true,
62
+ 'unistyles': styleClassNames.join(' ')
63
+ }
64
+ } : {}),
65
+ ...(narrowedProps.contentContainerStyle ? {
66
+ style: {
67
+ $$css: true,
68
+ 'unistyles': contentContainerStyleClassNames.join(' ')
69
+ }
70
+ } : {})
71
+ };
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
73
+ ...combinedProps,
74
+ ref: ref
75
+ });
76
+ });
77
+ };
78
+ exports.createUnistylesComponent = createUnistylesComponent;
79
+ //# sourceMappingURL=createUnistylesComponent.js.map
@@ -0,0 +1 @@
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,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,I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5B,iBAAiB,CAACsB,aAAa,CAACO,qBAAqB,CAAC;IAE9F,IAAAb,gBAAS,EAAC,MAAM;MACZ,MAAMc,eAAe,GAAGC,2BAAiB,CAACC,YAAY,CAACrC,gBAAgB,EAAE,MAAM;QAC3E,IAAI,CAACwB,QAAQ,EAAE;UACXW,eAAe,CAAC,CAAC;UAEjB;QACJ;QAEA,OAAON,gBAAgB,CAACL,QAAQ,CAACM,uBAAgB,CAACC,QAAQ,CAAC,CAAC,CAAC,CAAC;MAClE,CAAC,CAAC;MAEF,OAAO,MAAMI,eAAe,CAAC,CAAC;IAClC,CAAC,EAAE,CAACP,aAAa,EAAED,aAAa,CAACrB,KAAK,CAAC,CAAC;IAExC,MAAMgC,aAAa,GAAG;MAClB,GAAG,IAAAC,wBAAgB,EAACb,KAAK,EAAGE,aAAa,IAAI,CAAC,CAAY,CAAC;MAC3D,IAAGD,aAAa,CAACrB,KAAK,GAAG;QACrBA,KAAK,EAAE;UACHkC,KAAK,EAAE,IAAI;UACX,WAAW,EAAER,eAAe,CAACS,IAAI,CAAC,GAAG;QACzC;MACJ,CAAC,GAAG,CAAC,CAAC;MACN,IAAGd,aAAa,CAACO,qBAAqB,GAAG;QACrC5B,KAAK,EAAE;UACHkC,KAAK,EAAE,IAAI;UACX,WAAW,EAAEP,+BAA+B,CAACQ,IAAI,CAAC,GAAG;QACzD;MACJ,CAAC,GAAG,CAAC,CAAC;IACV,CAAsB;IAEtB,oBAAO,IAAA/D,WAAA,CAAAgE,GAAA,EAACnB,SAAS;MAAA,GAAKe,aAAa;MAAE/B,GAAG,EAAEA;IAAI,CAAE,CAAC;EACrD,CAAC,CAAC;AACN,CAAC;AAAAoC,OAAA,CAAArB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createUnistylesComponent = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _specs = require("../specs");
9
+ var _utils = require("../utils");
10
+ var _jsxRuntime = require("react/jsx-runtime");
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); }
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; }
13
+ const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
14
+ const createUnistylesComponent = (Component, mappings) => {
15
+ return /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
16
+ const narrowedProps = props;
17
+ const [theme, setTheme] = (0, _react.useState)(_specs.UnistylesRuntime.getTheme());
18
+ const [, setRt] = (0, _react.useState)(0);
19
+ const stylesRef = (0, _react.useRef)({});
20
+ const isForcedRef = (0, _react.useRef)(false);
21
+ if (!isForcedRef.current) {
22
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
23
+ if (narrowedProps?.[propName]) {
24
+ if (Array.isArray(narrowedProps[propName])) {
25
+ console.error(`🦄 Unistyles: createUnistylesComponent requires ${propName} to be an object. Please check props for component: ${Component.displayName}`);
26
+ }
27
+
28
+ // @ts-expect-error - this is hidden from TS
29
+ if (props[propName].__unistyles_name && !props[propName].__proto__?.getStyle) {
30
+ console.error(`🦄 Unistyles: createUnistylesComponent received style that is not bound. You likely used the spread operator on a Unistyle style. Please check props for component: ${Component.displayName}`);
31
+ }
32
+ stylesRef.current = {
33
+ ...stylesRef.current,
34
+ [propName]: narrowedProps[propName]
35
+ };
36
+ }
37
+ });
38
+ }
39
+ (0, _react.useEffect)(() => {
40
+ const removeChangeListener = _specs.StyleSheet.addChangeListener(dependencies => {
41
+ const componentDependencies = narrowedProps.style?.__proto__.uni__dependencies || mappings?.(theme).style?.__proto__.uni__dependencies;
42
+ if (dependencies.includes(_specs.UnistyleDependency.Theme) && (!componentDependencies || componentDependencies.includes(_specs.UnistyleDependency.Theme))) {
43
+ setTheme(_specs.UnistylesRuntime.getTheme());
44
+
45
+ // override with Unistyles styles
46
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
47
+ if (narrowedProps?.[propName]) {
48
+ stylesRef.current = {
49
+ ...stylesRef.current,
50
+ // @ts-expect-error - this is hidden from TS
51
+ [propName]: props[propName].__proto__?.getStyle?.() || props[propName]
52
+ };
53
+ }
54
+ });
55
+ isForcedRef.current = true;
56
+ }
57
+ if (dependencies.some(dependency => dependency >= 2) && (!componentDependencies || componentDependencies.some(dependency => dependency >= 2))) {
58
+ setRt(prevState => prevState + 1);
59
+ }
60
+ });
61
+ return () => {
62
+ removeChangeListener();
63
+ };
64
+ }, []);
65
+ const mergedProps = mappings?.(theme) ?? {};
66
+ const finalProps = (0, _utils.deepMergeObjects)(mergedProps, props);
67
+
68
+ // override with Unistyles styles
69
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
70
+ if (finalProps[propName]) {
71
+ finalProps[propName] = stylesRef.current[propName];
72
+ }
73
+ });
74
+ isForcedRef.current = false;
75
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
76
+ ...finalProps,
77
+ ref: ref
78
+ });
79
+ });
80
+ };
81
+ exports.createUnistylesComponent = createUnistylesComponent;
82
+ //# sourceMappingURL=createUnistylesComponent.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_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,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAA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AC,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":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "createUnistylesComponent", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _createUnistylesComponent.createUnistylesComponent;
10
+ }
11
+ });
12
+ var _createUnistylesComponent = require("./createUnistylesComponent");
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_createUnistylesComponent","require"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA","ignoreList":[]}
@@ -4,15 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- mq: true
7
+ mq: true,
8
+ createUnistylesComponent: true
8
9
  };
10
+ Object.defineProperty(exports, "createUnistylesComponent", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _core.createUnistylesComponent;
14
+ }
15
+ });
9
16
  Object.defineProperty(exports, "mq", {
10
17
  enumerable: true,
11
18
  get: function () {
12
19
  return _mq.mq;
13
20
  }
14
21
  });
15
- var _react = _interopRequireDefault(require("react"));
16
22
  var _specs = require("./specs");
17
23
  Object.keys(_specs).forEach(function (key) {
18
24
  if (key === "default" || key === "__esModule") return;
@@ -26,13 +32,17 @@ Object.keys(_specs).forEach(function (key) {
26
32
  });
27
33
  });
28
34
  var _mq = require("./mq");
29
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
30
- // todo verify true min version
31
- const minReactVersionRequiredByUnistyles = '18.3.1';
32
- if (_react.default.version < minReactVersionRequiredByUnistyles) {
33
- throw new Error(`
34
- You are using an outdated version of React (${_react.default.version}).
35
- Unistyles requires at least React ${minReactVersionRequiredByUnistyles}.
36
- `);
37
- }
35
+ var _core = require("./core");
36
+ var _components = require("./components");
37
+ Object.keys(_components).forEach(function (key) {
38
+ if (key === "default" || key === "__esModule") return;
39
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
40
+ if (key in exports && exports[key] === _components[key]) return;
41
+ Object.defineProperty(exports, key, {
42
+ enumerable: true,
43
+ get: function () {
44
+ return _components[key];
45
+ }
46
+ });
47
+ });
38
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_specs","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","e","__esModule","default","minReactVersionRequiredByUnistyles","React","version","Error"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,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,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,GAAA,GAAAd,OAAA;AAAyB,SAAAD,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGzB;AACA,MAAMG,kCAAkC,GAAG,QAAQ;AAEnD,IAAIC,cAAK,CAACC,OAAO,GAAGF,kCAAkC,EAAE;EACpD,MAAM,IAAIG,KAAK,CAAC;AACpB,sDAAsDF,cAAK,CAACC,OAAO;AACnE,4CAA4CF,kCAAkC;AAC9E,KAAK,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"names":["_specs","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","_core","_components"],"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;AAEA,IAAAe,WAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,WAAA,EAAAZ,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,MAAAW,WAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,WAAA,CAAAX,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -3,7 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mq = void 0;
6
+ exports.parseMq = exports.mq = exports.isValidMq = exports.isUnistylesMq = void 0;
7
+ var _specs = require("./specs");
8
+ const IS_UNISTYLES_REGEX = /:([hw])\[(\d+)(?:,\s*(\d+|Infinity))?]/;
9
+ const UNISTYLES_WIDTH_REGEX = /:(w)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
10
+ const UNISTYLES_HEIGHT_REGEX = /:(h)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
7
11
  const getMQValue = value => {
8
12
  if (typeof value === 'number') {
9
13
  return value;
@@ -11,17 +15,7 @@ const getMQValue = value => {
11
15
  if (value === null) {
12
16
  return 0;
13
17
  }
14
-
15
- // todo take it from js
16
- const breakpoints = {
17
- xs: 0,
18
- sm: 300,
19
- md: 500,
20
- lg: 800,
21
- xl: 1200
22
- };
23
-
24
- // @ts-ignore
18
+ const breakpoints = _specs.UnistylesRuntime.breakpoints;
25
19
  return breakpoints[value] ?? 0;
26
20
  };
27
21
 
@@ -45,4 +39,23 @@ const mq = exports.mq = {
45
39
  }
46
40
  })
47
41
  };
42
+ const parseMq = mq => {
43
+ const [, width, fromW, toW] = UNISTYLES_WIDTH_REGEX.exec(mq) || [];
44
+ const [, height, fromH, toH] = UNISTYLES_HEIGHT_REGEX.exec(mq) || [];
45
+ return {
46
+ minWidth: !width || fromW === 'Infinity' ? undefined : Number(fromW),
47
+ maxWidth: !width || toW === 'Infinity' ? undefined : Number(toW),
48
+ minHeight: !height || fromH === 'Infinity' ? undefined : Number(fromH),
49
+ maxHeight: !height || toH === 'Infinity' ? undefined : Number(toH)
50
+ };
51
+ };
52
+ exports.parseMq = parseMq;
53
+ const isUnistylesMq = mq => IS_UNISTYLES_REGEX.test(mq);
54
+ exports.isUnistylesMq = isUnistylesMq;
55
+ const isValidMq = parsedMQ => {
56
+ const isWidthValid = parsedMQ.minWidth === undefined || parsedMQ.maxWidth === undefined || parsedMQ.minWidth <= parsedMQ.maxWidth;
57
+ const isHeightValid = parsedMQ.minHeight === undefined || parsedMQ.maxHeight === undefined || parsedMQ.minHeight <= parsedMQ.maxHeight;
58
+ return isWidthValid && isHeightValid;
59
+ };
60
+ exports.isValidMq = isValidMq;
48
61
  //# sourceMappingURL=mq.js.map
@@ -1 +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.ts"],"mappings":";;;;;;AAsBA,MAAMA,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ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AAU,CAACY,IAAI,CAAC,KAAKZ,UAAU,CAACa,IAAI,CAAC,OAAOb,UAAU,CAACgB,IAAI,CAAC,KAAKhB,UAAU,CAACiB,IAAI,CAAC;IAChG;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_specs","require","IS_UNISTYLES_REGEX","UNISTYLES_WIDTH_REGEX","UNISTYLES_HEIGHT_REGEX","getMQValue","value","breakpoints","UnistylesRuntime","mq","exports","only","width","wMin","wMax","Infinity","height","hMin","hMax","and","parseMq","fromW","toW","exec","fromH","toH","minWidth","undefined","Number","maxWidth","minHeight","maxHeight","isUnistylesMq","test","isValidMq","parsedMQ","isWidthValid","isHeightValid"],"sourceRoot":"../../src","sources":["mq.ts"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,kBAAkB,GAAG,wCAAwC;AACnE,MAAMC,qBAAqB,GAAG,qCAAqC;AACnE,MAAMC,sBAAsB,GAAG,qCAAqC;AAqBpE,MAAMC,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,MAAMC,WAAW,GAAGC,uBAAgB,CAACD,WAAW;EAEhD,OAAOA,WAAW,CAACD,KAAK,CAAC,IAAI,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMG,EAAa,GAAAC,OAAA,CAAAD,EAAA,GAAG;EACzBE,IAAI,EAAE;IACFC,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KAAM,MAAMV,UAAU,CAACQ,IAAI,CAAC,KAAKR,UAAU,CAACS,IAAI,CAAC,GAAyB;IACvIE,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KAAM,MAAMV,UAAU,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AAE,CAACd,MAAM,IAAIQ,KAAK,KAAK,UAAU,GAAGG,SAAS,GAAGC,MAAM,CAACJ,KAAK,CAAC;IACtEO,SAAS,EAAE,CAACf,MAAM,IAAIS,GAAG,KAAK,UAAU,GAAGE,SAAS,GAAGC,MAAM,CAACH,GAAG;EACrE,CAAC;AACL,CAAC;AAAAf,OAAA,CAAAU,OAAA,GAAAA,OAAA;AAEM,MAAMY,aAAa,GAAIvB,EAAU,IAAKP,kBAAkB,CAAC+B,IAAI,CAACxB,EAAE,CAAC;AAAAC,OAAA,CAAAsB,aAAA,GAAAA,aAAA;AAEjE,MAAME,SAAS,GAAIC,QAAoC,IAAK;EAC/D,MAAMC,YAAY,GAAGD,QAAQ,CAACT,QAAQ,KAAKC,SAAS,IAAIQ,QAAQ,CAACN,QAAQ,KAAKF,SAAS,IAAIQ,QAAQ,CAACT,QAAQ,IAAIS,QAAQ,CAACN,QAAQ;EACjI,MAAMQ,aAAa,GAAGF,QAAQ,CAACL,SAAS,KAAKH,SAAS,IAAIQ,QAAQ,CAACJ,SAAS,KAAKJ,SAAS,IAAIQ,QAAQ,CAACL,SAAS,IAAIK,QAAQ,CAACJ,SAAS;EAEtI,OAAOK,YAAY,IAAIC,aAAa;AACxC,CAAC;AAAA3B,OAAA,CAAAwB,SAAA,GAAAA,SAAA","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
@@ -1 +1 @@
1
- {"version":3,"names":["UnistyleDependency","exports"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/NativePlatform.nitro.ts"],"mappings":";;;;;;IAMYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA,OA8B9B;AACA","ignoreList":[]}
1
+ {"version":3,"names":["UnistyleDependency","exports"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/NativePlatform.nitro.ts"],"mappings":";;;;;;IAMYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA,OAgC9B;AACA","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);
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;AASO,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;IAEvCH,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,21 @@ const findShadowNodeForHandle = handle => {
14
14
  }
15
15
  return node;
16
16
  };
17
- HybridShadowRegistry.add = (handle, style) => {
18
- if (!handle || !style?.__unid) {
17
+ HybridShadowRegistry.add = (handle, styles, variants, args) => {
18
+ // virtualized nodes can be null
19
+ if (!handle || !styles || !Array.isArray(styles)) {
19
20
  return;
20
21
  }
21
- HybridShadowRegistry.link(findShadowNodeForHandle(handle), style);
22
+
23
+ // filter Reanimated styles and styles that are undefined
24
+ const filteredStyles = styles.filter(style => !style?.initial?.updater).filter(Boolean);
25
+ HybridShadowRegistry.link(findShadowNodeForHandle(handle), filteredStyles, variants ?? {}, args ?? []);
22
26
  };
23
- HybridShadowRegistry.remove = (handle, style) => {
24
- if (!handle || !style?.__unid) {
27
+ HybridShadowRegistry.remove = handle => {
28
+ if (!handle) {
25
29
  return;
26
30
  }
27
- HybridShadowRegistry.unlink(findShadowNodeForHandle(handle), style);
31
+ HybridShadowRegistry.unlink(findShadowNodeForHandle(handle));
28
32
  };
29
33
  const UnistylesShadowRegistry = exports.UnistylesShadowRegistry = HybridShadowRegistry;
30
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","__unid","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,KAAK;EAC1C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACc,IAAI,CAACX,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACrE,CAAC;AAEDZ,oBAAoB,CAACe,MAAM,GAAG,CAACX,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACgB,MAAM,CAACb,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQM,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGjB,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","Boolean","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,CACxBM,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC,CACzCH,MAAM,CAACI,OAAO,CAAC;EAEpBtB,oBAAoB,CAACuB,IAAI,CAACpB,uBAAuB,CAACC,MAAM,CAAC,EAAEa,cAAc,EAAEJ,QAAQ,IAAI,CAAC,CAAC,EAAEC,IAAI,IAAI,EAAE,CAAC;AAC1G,CAAC;AAEDd,oBAAoB,CAACwB,MAAM,GAAGpB,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAACyB,MAAM,CAACtB,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAMsB,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG1B,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);
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;AAYO,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;IAEvCP,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":[]}
@@ -14,5 +14,6 @@ HybridUnistylesStyleSheet.compose = _reactNative.StyleSheet.compose;
14
14
  HybridUnistylesStyleSheet.jsMethods = {
15
15
  processColor: _reactNative.processColor
16
16
  };
17
+ HybridUnistylesStyleSheet.init();
17
18
  const StyleSheet = exports.StyleSheet = HybridUnistylesStyleSheet;
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeNitroModules","require","_reactNative","HybridUnistylesStyleSheet","NitroModules","createHybridObject","absoluteFillObject","NativeStyleSheet","absoluteFill","flatten","compose","jsMethods","processColor","StyleSheet","exports"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AA+BA,MAAME,yBAAyB,GAAGC,qCAAY,CACzCC,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnEF,yBAAyB,CAACG,kBAAkB,GAAGC,uBAAgB,CAACD,kBAAkB;AAClFH,yBAAyB,CAACK,YAAY,GAAGD,uBAAgB,CAACC,YAAY;AACtEL,yBAAyB,CAACM,OAAO,GAAGF,uBAAgB,CAACE,OAAO;AAC5DN,yBAAyB,CAACO,OAAO,GAAGH,uBAAgB,CAACG,OAAO;AAC5DP,yBAAyB,CAACQ,SAAS,GAAG;EAClCC,YAAY,EAAZA;AACJ,CAAC;AAEM,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGV,yBAAmE","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeNitroModules","require","_reactNative","HybridUnistylesStyleSheet","NitroModules","createHybridObject","absoluteFillObject","NativeStyleSheet","absoluteFill","flatten","compose","jsMethods","processColor","init","StyleSheet","exports"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAgCA,MAAME,yBAAyB,GAAGC,qCAAY,CACzCC,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnEF,yBAAyB,CAACG,kBAAkB,GAAGC,uBAAgB,CAACD,kBAAkB;AAClFH,yBAAyB,CAACK,YAAY,GAAGD,uBAAgB,CAACC,YAAY;AACtEL,yBAAyB,CAACM,OAAO,GAAGF,uBAAgB,CAACE,OAAO;AAC5DN,yBAAyB,CAACO,OAAO,GAAGH,uBAAgB,CAACG,OAAO;AAC5DP,yBAAyB,CAACQ,SAAS,GAAG;EAClCC,YAAY,EAAZA;AACJ,CAAC;AAEDT,yBAAyB,CAACU,IAAI,CAAC,CAAC;AAIzB,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGX,yBAAsE","ignoreList":[]}
@@ -7,20 +7,18 @@ 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();
14
13
  HybridUnistylesRuntime.navigationBar = HybridUnistylesRuntime.createHybridNavigationBar();
15
14
  HybridUnistylesRuntime._setRootViewBackgroundColor = HybridUnistylesRuntime.setRootViewBackgroundColor;
16
15
  HybridUnistylesRuntime.setRootViewBackgroundColor = color => {
17
- const parsedColor = (0, _reactNative.processColor)(color);
16
+ const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
18
17
  HybridUnistylesRuntime._setRootViewBackgroundColor(parsedColor);
19
18
  };
20
19
  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;AAgCA,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;EAEvCT,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":[]}