react-native-unistyles 3.0.0-beta.7 → 3.0.0-experimental-2025051401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/README.md +41 -19
  2. package/Unistyles.podspec +1 -0
  3. package/android/CMakeLists.txt +2 -1
  4. package/android/src/main/cxx/NativeUnistylesModule.cpp +3 -7
  5. package/android/src/main/cxx/NativeUnistylesModule.h +0 -4
  6. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +5 -1
  7. package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +11 -4
  8. package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +1 -1
  9. package/android/src/main/java/com/unistyles/UnistylesModule.kt +1 -7
  10. package/components/native/ActivityIndicator/package.json +1 -0
  11. package/components/native/Animated/package.json +1 -0
  12. package/components/native/FlatList/package.json +1 -0
  13. package/components/native/Image/package.json +2 -1
  14. package/components/native/ImageBackground/package.json +1 -0
  15. package/components/native/KeyboardAvoidingView/package.json +1 -0
  16. package/components/native/NativeText/package.json +1 -0
  17. package/components/native/NativeView/package.json +1 -0
  18. package/components/native/Pressable/package.json +1 -0
  19. package/components/native/RefreshControl/package.json +1 -0
  20. package/components/native/ScrollView/package.json +1 -0
  21. package/components/native/SectionList/package.json +1 -0
  22. package/components/native/Switch/package.json +1 -0
  23. package/components/native/Text/package.json +1 -0
  24. package/components/native/TextInput/package.json +1 -0
  25. package/components/native/TouchableHighlight/package.json +1 -0
  26. package/components/native/TouchableOpacity/package.json +1 -0
  27. package/components/native/View/package.json +1 -0
  28. package/components/native/VirtualizedList/package.json +1 -0
  29. package/cxx/common/Helpers.h +89 -0
  30. package/cxx/core/HostUnistyle.cpp +14 -5
  31. package/cxx/core/StyleSheet.h +1 -1
  32. package/cxx/core/UnistyleWrapper.h +1 -1
  33. package/cxx/core/UnistylesCommitShadowNode.h +0 -21
  34. package/cxx/core/UnistylesRegistry.cpp +74 -69
  35. package/cxx/core/UnistylesRegistry.h +1 -1
  36. package/cxx/hybridObjects/HybridShadowRegistry.cpp +2 -5
  37. package/cxx/hybridObjects/HybridStyleSheet.cpp +10 -19
  38. package/cxx/hybridObjects/HybridStyleSheet.h +3 -8
  39. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +5 -1
  40. package/cxx/parser/Parser.cpp +200 -89
  41. package/cxx/parser/Parser.h +1 -1
  42. package/cxx/shadowTree/ShadowTrafficController.h +13 -9
  43. package/cxx/shadowTree/ShadowTreeManager.cpp +64 -59
  44. package/cxx/shadowTree/ShadowTreeManager.h +0 -1
  45. package/ios/NativePlatform+ios.swift +1 -1
  46. package/ios/NativePlatformListener+ios.swift +12 -7
  47. package/ios/UnistylesModuleOnLoad.h +1 -5
  48. package/ios/UnistylesModuleOnLoad.mm +5 -13
  49. package/lib/commonjs/components/native/Image.js +27 -1
  50. package/lib/commonjs/components/native/Image.js.map +1 -1
  51. package/lib/commonjs/components/native/Image.native.js +10 -0
  52. package/lib/commonjs/components/native/Image.native.js.map +1 -0
  53. package/lib/commonjs/components/native/ImageBackground.js +21 -36
  54. package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
  55. package/lib/commonjs/components/native/Pressable.native.js +16 -2
  56. package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
  57. package/lib/commonjs/core/createUnistylesElement.js +17 -21
  58. package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
  59. package/lib/commonjs/core/createUnistylesElement.native.js +7 -1
  60. package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
  61. package/lib/commonjs/core/createUnistylesImageBackground.js +10 -4
  62. package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
  63. package/lib/commonjs/core/getClassname.js +11 -5
  64. package/lib/commonjs/core/getClassname.js.map +1 -1
  65. package/lib/commonjs/core/passForwardRef.js +3 -5
  66. package/lib/commonjs/core/passForwardRef.js.map +1 -1
  67. package/lib/commonjs/core/useProxifiedUnistyles/listener.js +5 -3
  68. package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -1
  69. package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js +15 -2
  70. package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
  71. package/lib/commonjs/core/withUnistyles/withUnistyles.js +14 -5
  72. package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
  73. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +14 -7
  74. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
  75. package/lib/commonjs/hooks/useMedia.js +4 -4
  76. package/lib/commonjs/hooks/useMedia.js.map +1 -1
  77. package/lib/commonjs/hooks/useMedia.native.js +4 -4
  78. package/lib/commonjs/hooks/useMedia.native.js.map +1 -1
  79. package/lib/commonjs/mocks.js +203 -0
  80. package/lib/commonjs/mocks.js.map +1 -0
  81. package/lib/commonjs/mq.js +1 -23
  82. package/lib/commonjs/mq.js.map +1 -1
  83. package/lib/commonjs/reanimated/index.js +13 -0
  84. package/lib/commonjs/reanimated/index.js.map +1 -0
  85. package/lib/commonjs/reanimated/useAnimatedTheme.js +22 -0
  86. package/lib/commonjs/reanimated/useAnimatedTheme.js.map +1 -0
  87. package/lib/commonjs/reanimated/useAnimatedTheme.native.js +24 -0
  88. package/lib/commonjs/reanimated/useAnimatedTheme.native.js.map +1 -0
  89. package/lib/commonjs/server/getServerUnistyles.js +9 -4
  90. package/lib/commonjs/server/getServerUnistyles.js.map +1 -1
  91. package/lib/commonjs/server/hydrateServerUnistyles.js +4 -2
  92. package/lib/commonjs/server/hydrateServerUnistyles.js.map +1 -1
  93. package/lib/commonjs/server/resetServerUnistyles.js +4 -2
  94. package/lib/commonjs/server/resetServerUnistyles.js.map +1 -1
  95. package/lib/commonjs/server/serialize.js +24 -0
  96. package/lib/commonjs/server/serialize.js.map +1 -0
  97. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  98. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  99. package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
  100. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  101. package/lib/commonjs/utils.js +23 -1
  102. package/lib/commonjs/utils.js.map +1 -1
  103. package/lib/commonjs/web/convert/index.js +4 -7
  104. package/lib/commonjs/web/convert/index.js.map +1 -1
  105. package/lib/commonjs/web/convert/object/filter.js +7 -8
  106. package/lib/commonjs/web/convert/object/filter.js.map +1 -1
  107. package/lib/commonjs/web/create.js +10 -2
  108. package/lib/commonjs/web/create.js.map +1 -1
  109. package/lib/commonjs/web/css/core.js +2 -2
  110. package/lib/commonjs/web/css/core.js.map +1 -1
  111. package/lib/commonjs/web/css/state.js +6 -3
  112. package/lib/commonjs/web/css/state.js.map +1 -1
  113. package/lib/commonjs/web/index.js +7 -12
  114. package/lib/commonjs/web/index.js.map +1 -1
  115. package/lib/commonjs/web/registry.js +11 -9
  116. package/lib/commonjs/web/registry.js.map +1 -1
  117. package/lib/commonjs/web/runtime.js +5 -1
  118. package/lib/commonjs/web/runtime.js.map +1 -1
  119. package/lib/commonjs/web/services.js +7 -2
  120. package/lib/commonjs/web/services.js.map +1 -1
  121. package/lib/commonjs/web/shadowRegistry.js +27 -10
  122. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  123. package/lib/commonjs/web/state.js +11 -2
  124. package/lib/commonjs/web/state.js.map +1 -1
  125. package/lib/commonjs/web/types.js +2 -0
  126. package/lib/commonjs/web/types.js.map +1 -1
  127. package/lib/commonjs/web/utils/createUnistylesRef.js +31 -0
  128. package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -0
  129. package/lib/commonjs/web/utils/unistyle.js +40 -14
  130. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  131. package/lib/commonjs/web-only/getWebProps.js +19 -0
  132. package/lib/commonjs/web-only/getWebProps.js.map +1 -0
  133. package/lib/commonjs/web-only/index.js +13 -0
  134. package/lib/commonjs/web-only/index.js.map +1 -0
  135. package/lib/module/components/native/Image.js +26 -2
  136. package/lib/module/components/native/Image.js.map +1 -1
  137. package/lib/module/components/native/Image.native.js +6 -0
  138. package/lib/module/components/native/Image.native.js.map +1 -0
  139. package/lib/module/components/native/ImageBackground.js +22 -37
  140. package/lib/module/components/native/ImageBackground.js.map +1 -1
  141. package/lib/module/components/native/Pressable.native.js +16 -2
  142. package/lib/module/components/native/Pressable.native.js.map +1 -1
  143. package/lib/module/core/createUnistylesElement.js +17 -21
  144. package/lib/module/core/createUnistylesElement.js.map +1 -1
  145. package/lib/module/core/createUnistylesElement.native.js +7 -1
  146. package/lib/module/core/createUnistylesElement.native.js.map +1 -1
  147. package/lib/module/core/createUnistylesImageBackground.js +10 -4
  148. package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
  149. package/lib/module/core/getClassname.js +9 -5
  150. package/lib/module/core/getClassname.js.map +1 -1
  151. package/lib/module/core/passForwardRef.js +3 -5
  152. package/lib/module/core/passForwardRef.js.map +1 -1
  153. package/lib/module/core/useProxifiedUnistyles/listener.js +3 -3
  154. package/lib/module/core/useProxifiedUnistyles/listener.js.map +1 -1
  155. package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js +15 -2
  156. package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
  157. package/lib/module/core/withUnistyles/withUnistyles.js +14 -5
  158. package/lib/module/core/withUnistyles/withUnistyles.js.map +1 -1
  159. package/lib/module/core/withUnistyles/withUnistyles.native.js +14 -7
  160. package/lib/module/core/withUnistyles/withUnistyles.native.js.map +1 -1
  161. package/lib/module/hooks/useMedia.js +1 -1
  162. package/lib/module/hooks/useMedia.js.map +1 -1
  163. package/lib/module/hooks/useMedia.native.js +1 -1
  164. package/lib/module/hooks/useMedia.native.js.map +1 -1
  165. package/lib/module/mocks.js +201 -0
  166. package/lib/module/mocks.js.map +1 -0
  167. package/lib/module/mq.js +0 -19
  168. package/lib/module/mq.js.map +1 -1
  169. package/lib/module/reanimated/index.js +4 -0
  170. package/lib/module/reanimated/index.js.map +1 -0
  171. package/lib/module/reanimated/useAnimatedTheme.js +17 -0
  172. package/lib/module/reanimated/useAnimatedTheme.js.map +1 -0
  173. package/lib/module/reanimated/useAnimatedTheme.native.js +19 -0
  174. package/lib/module/reanimated/useAnimatedTheme.native.js.map +1 -0
  175. package/lib/module/server/getServerUnistyles.js +7 -4
  176. package/lib/module/server/getServerUnistyles.js.map +1 -1
  177. package/lib/module/server/hydrateServerUnistyles.js +2 -2
  178. package/lib/module/server/hydrateServerUnistyles.js.map +1 -1
  179. package/lib/module/server/resetServerUnistyles.js +2 -2
  180. package/lib/module/server/resetServerUnistyles.js.map +1 -1
  181. package/lib/module/server/serialize.js +19 -0
  182. package/lib/module/server/serialize.js.map +1 -0
  183. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  184. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  185. package/lib/module/specs/ShadowRegistry/index.js +2 -2
  186. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  187. package/lib/module/utils.js +19 -0
  188. package/lib/module/utils.js.map +1 -1
  189. package/lib/module/web/convert/index.js +4 -7
  190. package/lib/module/web/convert/index.js.map +1 -1
  191. package/lib/module/web/convert/object/filter.js +3 -4
  192. package/lib/module/web/convert/object/filter.js.map +1 -1
  193. package/lib/module/web/create.js +9 -3
  194. package/lib/module/web/create.js.map +1 -1
  195. package/lib/module/web/css/core.js +2 -2
  196. package/lib/module/web/css/core.js.map +1 -1
  197. package/lib/module/web/css/state.js +6 -3
  198. package/lib/module/web/css/state.js.map +1 -1
  199. package/lib/module/web/index.js +4 -10
  200. package/lib/module/web/index.js.map +1 -1
  201. package/lib/module/web/registry.js +11 -9
  202. package/lib/module/web/registry.js.map +1 -1
  203. package/lib/module/web/runtime.js +5 -1
  204. package/lib/module/web/runtime.js.map +1 -1
  205. package/lib/module/web/services.js +7 -1
  206. package/lib/module/web/services.js.map +1 -1
  207. package/lib/module/web/shadowRegistry.js +27 -10
  208. package/lib/module/web/shadowRegistry.js.map +1 -1
  209. package/lib/module/web/state.js +11 -2
  210. package/lib/module/web/state.js.map +1 -1
  211. package/lib/module/web/types.js +1 -1
  212. package/lib/module/web/types.js.map +1 -1
  213. package/lib/module/web/utils/createUnistylesRef.js +24 -0
  214. package/lib/module/web/utils/createUnistylesRef.js.map +1 -0
  215. package/lib/module/web/utils/unistyle.js +32 -10
  216. package/lib/module/web/utils/unistyle.js.map +1 -1
  217. package/lib/module/web-only/getWebProps.js +14 -0
  218. package/lib/module/web-only/getWebProps.js.map +1 -0
  219. package/lib/module/web-only/index.js +4 -0
  220. package/lib/module/web-only/index.js.map +1 -0
  221. package/lib/typescript/src/components/native/Animated.d.ts.map +1 -1
  222. package/lib/typescript/src/components/native/Image.d.ts.map +1 -1
  223. package/lib/typescript/src/components/native/Image.native.d.ts +2 -0
  224. package/lib/typescript/src/components/native/Image.native.d.ts.map +1 -0
  225. package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
  226. package/lib/typescript/src/components/native/Pressable.native.d.ts.map +1 -1
  227. package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
  228. package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -1
  229. package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
  230. package/lib/typescript/src/core/getClassname.d.ts +5 -5
  231. package/lib/typescript/src/core/getClassname.d.ts.map +1 -1
  232. package/lib/typescript/src/core/passForwardRef.d.ts +1 -1
  233. package/lib/typescript/src/core/passForwardRef.d.ts.map +1 -1
  234. package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts.map +1 -1
  235. package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts.map +1 -1
  236. package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -1
  237. package/lib/typescript/src/core/warn.d.ts.map +1 -1
  238. package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts +1 -1
  239. package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts.map +1 -1
  240. package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts +1 -3
  241. package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts.map +1 -1
  242. package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -1
  243. package/lib/typescript/src/hooks/useMedia.native.d.ts.map +1 -1
  244. package/lib/typescript/src/mocks.d.ts +2 -0
  245. package/lib/typescript/src/mocks.d.ts.map +1 -0
  246. package/lib/typescript/src/mq.d.ts +0 -8
  247. package/lib/typescript/src/mq.d.ts.map +1 -1
  248. package/lib/typescript/src/reanimated/index.d.ts +2 -0
  249. package/lib/typescript/src/reanimated/index.d.ts.map +1 -0
  250. package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts +4 -0
  251. package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts.map +1 -0
  252. package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts +4 -0
  253. package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts.map +1 -0
  254. package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -1
  255. package/lib/typescript/src/server/hydrateServerUnistyles.d.ts +0 -1
  256. package/lib/typescript/src/server/hydrateServerUnistyles.d.ts.map +1 -1
  257. package/lib/typescript/src/server/resetServerUnistyles.d.ts.map +1 -1
  258. package/lib/typescript/src/server/serialize.d.ts +2 -0
  259. package/lib/typescript/src/server/serialize.d.ts.map +1 -0
  260. package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -1
  261. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +2 -1
  262. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  263. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  264. package/lib/typescript/src/types/common.d.ts +0 -1
  265. package/lib/typescript/src/types/common.d.ts.map +1 -1
  266. package/lib/typescript/src/types/stylesheet.d.ts +1 -1
  267. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
  268. package/lib/typescript/src/utils.d.ts +8 -0
  269. package/lib/typescript/src/utils.d.ts.map +1 -1
  270. package/lib/typescript/src/web/convert/index.d.ts +2 -1
  271. package/lib/typescript/src/web/convert/index.d.ts.map +1 -1
  272. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
  273. package/lib/typescript/src/web/convert/object/filter.d.ts +2 -1
  274. package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -1
  275. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
  276. package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -1
  277. package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -1
  278. package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts.map +1 -1
  279. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -1
  280. package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -1
  281. package/lib/typescript/src/web/convert/style.d.ts.map +1 -1
  282. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -1
  283. package/lib/typescript/src/web/create.d.ts.map +1 -1
  284. package/lib/typescript/src/web/css/core.d.ts.map +1 -1
  285. package/lib/typescript/src/web/css/state.d.ts +4 -1
  286. package/lib/typescript/src/web/css/state.d.ts.map +1 -1
  287. package/lib/typescript/src/web/css/utils.d.ts.map +1 -1
  288. package/lib/typescript/src/web/index.d.ts +0 -5
  289. package/lib/typescript/src/web/index.d.ts.map +1 -1
  290. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  291. package/lib/typescript/src/web/registry.d.ts +2 -2
  292. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  293. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  294. package/lib/typescript/src/web/services.d.ts +6 -1
  295. package/lib/typescript/src/web/services.d.ts.map +1 -1
  296. package/lib/typescript/src/web/shadowRegistry.d.ts +2 -2
  297. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
  298. package/lib/typescript/src/web/state.d.ts +2 -0
  299. package/lib/typescript/src/web/state.d.ts.map +1 -1
  300. package/lib/typescript/src/web/types.d.ts +3 -0
  301. package/lib/typescript/src/web/types.d.ts.map +1 -1
  302. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  303. package/lib/typescript/src/web/utils/createUnistylesRef.d.ts +11 -0
  304. package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -0
  305. package/lib/typescript/src/web/utils/unistyle.d.ts +5 -2
  306. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  307. package/lib/typescript/src/web/variants.d.ts.map +1 -1
  308. package/lib/typescript/src/web-only/getWebProps.d.ts +7 -0
  309. package/lib/typescript/src/web-only/getWebProps.d.ts.map +1 -0
  310. package/lib/typescript/src/web-only/index.d.ts +2 -0
  311. package/lib/typescript/src/web-only/index.d.ts.map +1 -0
  312. package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +2 -2
  313. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +2 -2
  314. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +19 -19
  315. package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +3 -0
  316. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_UnistylesNativeMiniRuntime.kt +7 -2
  317. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt +7 -2
  318. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +22 -22
  319. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
  320. package/nitrogen/generated/android/unistyles+autolinking.cmake +16 -0
  321. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +0 -1
  322. package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
  323. package/nitrogen/generated/shared/c++/Dimensions.hpp +1 -0
  324. package/nitrogen/generated/shared/c++/Insets.hpp +1 -0
  325. package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
  326. package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +1 -0
  327. package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +1 -0
  328. package/package.json +77 -33
  329. package/plugin/index.d.ts +51 -18
  330. package/plugin/index.js +878 -177
  331. package/reanimated/package.json +6 -0
  332. package/server/package.json +6 -0
  333. package/src/components/native/Image.native.tsx +4 -0
  334. package/src/components/native/Image.tsx +36 -3
  335. package/src/components/native/ImageBackground.tsx +20 -36
  336. package/src/components/native/Pressable.native.tsx +25 -2
  337. package/src/core/createUnistylesElement.native.tsx +13 -2
  338. package/src/core/createUnistylesElement.tsx +26 -27
  339. package/src/core/createUnistylesImageBackground.tsx +16 -5
  340. package/src/core/getClassname.ts +16 -5
  341. package/src/core/passForwardRef.ts +5 -5
  342. package/src/core/useProxifiedUnistyles/listener.ts +3 -3
  343. package/src/core/useProxifiedUnistyles/useProxifiedUnistyles.ts +18 -1
  344. package/src/core/withUnistyles/withUnistyles.native.tsx +42 -17
  345. package/src/core/withUnistyles/withUnistyles.tsx +23 -6
  346. package/src/hooks/useMedia.native.ts +1 -1
  347. package/src/hooks/useMedia.ts +1 -1
  348. package/src/mocks.ts +217 -0
  349. package/src/mq.ts +0 -24
  350. package/src/reanimated/index.ts +1 -0
  351. package/src/reanimated/useAnimatedTheme.native.ts +21 -0
  352. package/src/reanimated/useAnimatedTheme.ts +19 -0
  353. package/src/server/getServerUnistyles.tsx +15 -10
  354. package/src/server/hydrateServerUnistyles.ts +3 -2
  355. package/src/server/resetServerUnistyles.ts +4 -3
  356. package/src/server/serialize.ts +20 -0
  357. package/src/specs/NativePlatform/NativePlatform.nitro.ts +2 -1
  358. package/src/specs/ShadowRegistry/index.ts +2 -2
  359. package/src/types/common.ts +0 -1
  360. package/src/types/stylesheet.ts +1 -1
  361. package/src/utils.ts +25 -0
  362. package/src/web/convert/index.ts +5 -7
  363. package/src/web/convert/object/filter.ts +4 -4
  364. package/src/web/create.ts +10 -3
  365. package/src/web/css/core.ts +2 -2
  366. package/src/web/css/state.ts +5 -3
  367. package/src/web/index.ts +4 -16
  368. package/src/web/registry.ts +20 -11
  369. package/src/web/runtime.ts +6 -2
  370. package/src/web/services.ts +14 -1
  371. package/src/web/shadowRegistry.ts +35 -13
  372. package/src/web/state.ts +14 -2
  373. package/src/web/types.ts +9 -4
  374. package/src/web/utils/createUnistylesRef.ts +33 -0
  375. package/src/web/utils/unistyle.ts +55 -23
  376. package/src/web-only/getWebProps.ts +18 -0
  377. package/src/web-only/index.ts +2 -0
  378. package/web/package.json +6 -0
  379. package/cxx/core/UnistylesCommitHook.cpp +0 -49
  380. package/cxx/core/UnistylesCommitHook.h +0 -27
  381. package/cxx/core/UnistylesMountHook.cpp +0 -28
  382. package/cxx/core/UnistylesMountHook.h +0 -27
  383. package/lib/module/package.json +0 -1
  384. package/plugin/consts.js +0 -63
  385. package/plugin/exotic.js +0 -54
  386. package/plugin/import.js +0 -51
  387. package/plugin/ref.js +0 -11
  388. package/plugin/stylesheet.js +0 -565
  389. package/plugin/variants.js +0 -66
  390. /package/cxx/common/{Constants.h → UnistylesConstants.h} +0 -0
@@ -37,87 +37,87 @@ abstract class HybridNativePlatformSpec: HybridObject() {
37
37
  }
38
38
 
39
39
  // Properties
40
-
40
+
41
41
 
42
42
  // Methods
43
43
  @DoNotStrip
44
44
  @Keep
45
45
  abstract fun getInsets(): Insets
46
-
46
+
47
47
  @DoNotStrip
48
48
  @Keep
49
49
  abstract fun getColorScheme(): ColorScheme
50
-
50
+
51
51
  @DoNotStrip
52
52
  @Keep
53
53
  abstract fun getFontScale(): Double
54
-
54
+
55
55
  @DoNotStrip
56
56
  @Keep
57
57
  abstract fun getPixelRatio(): Double
58
-
58
+
59
59
  @DoNotStrip
60
60
  @Keep
61
61
  abstract fun getOrientation(): Orientation
62
-
62
+
63
63
  @DoNotStrip
64
64
  @Keep
65
65
  abstract fun getContentSizeCategory(): String
66
-
66
+
67
67
  @DoNotStrip
68
68
  @Keep
69
69
  abstract fun getScreenDimensions(): Dimensions
70
-
70
+
71
71
  @DoNotStrip
72
72
  @Keep
73
73
  abstract fun getStatusBarDimensions(): Dimensions
74
-
74
+
75
75
  @DoNotStrip
76
76
  @Keep
77
77
  abstract fun getNavigationBarDimensions(): Dimensions
78
-
78
+
79
79
  @DoNotStrip
80
80
  @Keep
81
81
  abstract fun getPrefersRtlDirection(): Boolean
82
-
82
+
83
83
  @DoNotStrip
84
84
  @Keep
85
85
  abstract fun setRootViewBackgroundColor(color: Double): Unit
86
-
86
+
87
87
  @DoNotStrip
88
88
  @Keep
89
89
  abstract fun setNavigationBarHidden(isHidden: Boolean): Unit
90
-
90
+
91
91
  @DoNotStrip
92
92
  @Keep
93
93
  abstract fun setStatusBarHidden(isHidden: Boolean): Unit
94
-
94
+
95
95
  @DoNotStrip
96
96
  @Keep
97
97
  abstract fun setImmersiveMode(isEnabled: Boolean): Unit
98
-
98
+
99
99
  @DoNotStrip
100
100
  @Keep
101
101
  abstract fun getMiniRuntime(): UnistylesNativeMiniRuntime
102
-
102
+
103
103
  abstract fun registerPlatformListener(callback: (dependencies: Array<UnistyleDependency>, miniRuntime: UnistylesNativeMiniRuntime) -> Unit): Unit
104
-
104
+
105
105
  @DoNotStrip
106
106
  @Keep
107
- fun registerPlatformListener_cxx(callback: Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime): Unit {
107
+ private fun registerPlatformListener_cxx(callback: Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime): Unit {
108
108
  val __result = registerPlatformListener(callback)
109
109
  return __result
110
110
  }
111
-
111
+
112
112
  abstract fun registerImeListener(callback: (miniRuntime: UnistylesNativeMiniRuntime) -> Unit): Unit
113
-
113
+
114
114
  @DoNotStrip
115
115
  @Keep
116
- fun registerImeListener_cxx(callback: Func_void_UnistylesNativeMiniRuntime): Unit {
116
+ private fun registerImeListener_cxx(callback: Func_void_UnistylesNativeMiniRuntime): Unit {
117
117
  val __result = registerImeListener(callback)
118
118
  return __result
119
119
  }
120
-
120
+
121
121
  @DoNotStrip
122
122
  @Keep
123
123
  abstract fun unregisterPlatformListeners(): Unit
@@ -30,7 +30,8 @@ enum class UnistyleDependency {
30
30
  FONTSCALE,
31
31
  STATUSBAR,
32
32
  NAVIGATIONBAR,
33
- IME;
33
+ IME,
34
+ RTL;
34
35
 
35
36
  @DoNotStrip
36
37
  @Keep
@@ -40,6 +40,22 @@ target_sources(
40
40
  # Define a flag to check if we are building properly
41
41
  add_definitions(-DBUILDING_UNISTYLES_WITH_GENERATED_CMAKE_PROJECT)
42
42
 
43
+ # From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
44
+ # Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
45
+ target_compile_definitions(
46
+ unistyles PRIVATE
47
+ -DFOLLY_NO_CONFIG=1
48
+ -DFOLLY_HAVE_CLOCK_GETTIME=1
49
+ -DFOLLY_USE_LIBCPP=1
50
+ -DFOLLY_CFG_NO_COROUTINES=1
51
+ -DFOLLY_MOBILE=1
52
+ -DFOLLY_HAVE_RECVMMSG=1
53
+ -DFOLLY_HAVE_PTHREAD=1
54
+ # Once we target android-23 above, we can comment
55
+ # the following line. NDK uses GNU style stderror_r() after API 23.
56
+ -DFOLLY_HAVE_XSI_STRERROR_R=1
57
+ )
58
+
43
59
  # Add all libraries required by the generated specs
44
60
  find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
45
61
  find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
@@ -44,7 +44,6 @@ namespace margelo::nitro::unistyles { struct UnistylesNativeMiniRuntime; }
44
44
  // Common C++ types used in Swift
45
45
  #include <NitroModules/ArrayBufferHolder.hpp>
46
46
  #include <NitroModules/AnyMapHolder.hpp>
47
- #include <NitroModules/HybridContext.hpp>
48
47
  #include <NitroModules/RuntimeError.hpp>
49
48
 
50
49
  // Forward declarations of Swift defined types
@@ -47,6 +47,8 @@ public extension UnistyleDependency {
47
47
  self = .navigationbar
48
48
  case "Ime":
49
49
  self = .ime
50
+ case "Rtl":
51
+ self = .rtl
50
52
  default:
51
53
  return nil
52
54
  }
@@ -87,6 +89,8 @@ public extension UnistyleDependency {
87
89
  return "NavigationBar"
88
90
  case .ime:
89
91
  return "Ime"
92
+ case .rtl:
93
+ return "Rtl"
90
94
  }
91
95
  }
92
96
  }
@@ -33,6 +33,7 @@ namespace margelo::nitro::unistyles {
33
33
  double height SWIFT_PRIVATE;
34
34
 
35
35
  public:
36
+ Dimensions() = default;
36
37
  explicit Dimensions(double width, double height): width(width), height(height) {}
37
38
  };
38
39
 
@@ -36,6 +36,7 @@ namespace margelo::nitro::unistyles {
36
36
  double ime SWIFT_PRIVATE;
37
37
 
38
38
  public:
39
+ Insets() = default;
39
40
  explicit Insets(double top, double bottom, double left, double right, double ime): top(top), bottom(bottom), left(left), right(right), ime(ime) {}
40
41
  };
41
42
 
@@ -40,6 +40,7 @@ namespace margelo::nitro::unistyles {
40
40
  STATUSBAR SWIFT_NAME(statusbar) = 12,
41
41
  NAVIGATIONBAR SWIFT_NAME(navigationbar) = 13,
42
42
  IME SWIFT_NAME(ime) = 14,
43
+ RTL SWIFT_NAME(rtl) = 15,
43
44
  } CLOSED_ENUM;
44
45
 
45
46
  } // namespace margelo::nitro::unistyles
@@ -70,7 +71,7 @@ namespace margelo::nitro {
70
71
  return false;
71
72
  }
72
73
  // Check if we are within the bounds of the enum.
73
- return integer >= 0 && integer <= 14;
74
+ return integer >= 0 && integer <= 15;
74
75
  }
75
76
  };
76
77
 
@@ -54,6 +54,7 @@ namespace margelo::nitro::unistyles {
54
54
  bool isLandscape SWIFT_PRIVATE;
55
55
 
56
56
  public:
57
+ UnistylesCxxMiniRuntime() = default;
57
58
  explicit UnistylesCxxMiniRuntime(std::optional<std::string> themeName, std::optional<std::string> breakpoint, bool hasAdaptiveThemes, ColorScheme colorScheme, Dimensions screen, std::string contentSizeCategory, Insets insets, double pixelRatio, double fontScale, bool rtl, Dimensions statusBar, Dimensions navigationBar, bool isPortrait, bool isLandscape): themeName(themeName), breakpoint(breakpoint), hasAdaptiveThemes(hasAdaptiveThemes), colorScheme(colorScheme), screen(screen), contentSizeCategory(contentSizeCategory), insets(insets), pixelRatio(pixelRatio), fontScale(fontScale), rtl(rtl), statusBar(statusBar), navigationBar(navigationBar), isPortrait(isPortrait), isLandscape(isLandscape) {}
58
59
  };
59
60
 
@@ -50,6 +50,7 @@ namespace margelo::nitro::unistyles {
50
50
  bool isLandscape SWIFT_PRIVATE;
51
51
 
52
52
  public:
53
+ UnistylesNativeMiniRuntime() = default;
53
54
  explicit UnistylesNativeMiniRuntime(ColorScheme colorScheme, Dimensions screen, std::string contentSizeCategory, Insets insets, double pixelRatio, double fontScale, bool rtl, Dimensions statusBar, Dimensions navigationBar, bool isPortrait, bool isLandscape): colorScheme(colorScheme), screen(screen), contentSizeCategory(contentSizeCategory), insets(insets), pixelRatio(pixelRatio), fontScale(fontScale), rtl(rtl), statusBar(statusBar), navigationBar(navigationBar), isPortrait(isPortrait), isLandscape(isLandscape) {}
54
55
  };
55
56
 
package/package.json CHANGED
@@ -1,44 +1,72 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0-experimental-2025051401",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
- "test": "jest",
7
- "test:coverage": "jest --passWithNoTests --coverage",
6
+ "test": "NODE_ENV=babel-test jest ./plugin",
7
+ "test:coverage": "NODE_ENV=babel-test jest --passWithNoTests --coverage",
8
8
  "tsc": "node_modules/typescript/bin/tsc --noEmit",
9
9
  "lint": "biome lint",
10
10
  "check": "biome check --write",
11
11
  "check:ci": "biome check",
12
- "prepare": "husky && bob build",
13
- "precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn check' 'yarn test'",
14
- "release": "release-it"
12
+ "prepare": "husky && bob build && yarn plugin:build",
13
+ "precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn check' 'yarn test' 'yarn circular:check'",
14
+ "release": "release-it",
15
+ "plugin:build": "node plugin/esbuild.js",
16
+ "circular:check": "dpdm --no-warning --no-tree -T --exit-code circular:1 src/**/*.ts",
17
+ "components:build": "node build-components.js"
15
18
  },
16
19
  "main": "lib/commonjs/index.js",
17
20
  "module": "lib/module/index.js",
21
+ "browser": "lib/module/index.js",
18
22
  "types": "lib/typescript/src/index.d.ts",
19
23
  "source": "src/index",
20
24
  "exports": {
21
25
  ".": {
22
26
  "types": "./lib/typescript/src/index.d.ts",
23
- "module": "./lib/module/index.js",
24
- "default": "./lib/commonjs/index.js",
25
- "react-native": "./src/index"
27
+ "import": "./lib/module/index.js",
28
+ "browser": "./lib/module/index.js",
29
+ "react-native": "./src/index.ts",
30
+ "default": "./lib/commonjs/index.js"
31
+ },
32
+ "./mocks": {
33
+ "import": "./lib/module/mocks.js",
34
+ "browser": "./lib/module/mocks.js",
35
+ "react-native": "./src/mocks.ts",
36
+ "default": "./lib/commonjs/mocks.js"
26
37
  },
27
38
  "./components/native/*": {
28
- "module": "./lib/module/components/native/*",
29
- "default": "./lib/commonjs/components/native/*",
30
- "react-native": "./src/components/native/*"
39
+ "import": "./lib/module/components/native/*",
40
+ "browser": "./lib/module/components/native/*",
41
+ "react-native": "./src/components/native/*",
42
+ "default": "./lib/commonjs/components/native/*"
31
43
  },
32
44
  "./plugin": {
33
- "module": "./plugin/index.js",
45
+ "import": "./plugin/index.js",
46
+ "types": "./plugin/index.d.ts",
34
47
  "default": "./plugin/index.js"
35
48
  },
36
49
  "./package.json": "./package.json",
37
50
  "./server": {
38
51
  "types": "./lib/typescript/src/server/index.d.ts",
39
- "module": "./lib/module/server/index.js",
40
- "default": "./lib/commonjs/server/index.js",
41
- "react-native": "./src/server"
52
+ "import": "./lib/module/server/index.js",
53
+ "browser": "./lib/module/server/index.js",
54
+ "react-native": "./src/server/index.ts",
55
+ "default": "./lib/commonjs/server/index.js"
56
+ },
57
+ "./web": {
58
+ "types": "./lib/typescript/src/web-only/index.d.ts",
59
+ "import": "./lib/module/web-only/index.js",
60
+ "browser": "./lib/module/web-only/index.js",
61
+ "react-native": "./src/web-only/index.ts",
62
+ "default": "./lib/commonjs/web-only/index.js"
63
+ },
64
+ "./reanimated": {
65
+ "types": "./lib/typescript/src/reanimated/index.d.ts",
66
+ "import": "./lib/module/reanimated/index.js",
67
+ "browser": "./lib/module/reanimated/index.js",
68
+ "react-native": "./src/reanimated/index.ts",
69
+ "default": "./lib/commonjs/reanimated/index.js"
42
70
  }
43
71
  },
44
72
  "files": [
@@ -51,9 +79,14 @@
51
79
  "plugin",
52
80
  "web",
53
81
  "components",
82
+ "server",
83
+ "web-only",
84
+ "reanimated",
54
85
  "react-native.config.js",
55
86
  "Unistyles.podspec",
56
87
  "!plugin/__tests__",
88
+ "!plugin/src",
89
+ "!plugin/esbuild.js",
57
90
  "!ios/build",
58
91
  "!android/build",
59
92
  "!android/gradle",
@@ -83,37 +116,48 @@
83
116
  "registry": "https://registry.npmjs.org/"
84
117
  },
85
118
  "devDependencies": {
86
- "@babel/plugin-syntax-jsx": "7.25.9",
87
- "@babel/preset-flow": "7.25.9",
88
- "@babel/preset-typescript": "7.26.0",
119
+ "@babel/core": "7.27.1",
120
+ "@babel/plugin-syntax-jsx": "7.27.1",
121
+ "@babel/preset-flow": "7.27.1",
122
+ "@babel/preset-typescript": "7.27.1",
123
+ "@babel/types": "7.27.1",
89
124
  "@biomejs/biome": "1.9.4",
90
- "@commitlint/config-conventional": "19.6.0",
91
- "@react-native/normalize-colors": "0.77.0",
125
+ "@commitlint/config-conventional": "19.8.1",
126
+ "@react-native/normalize-colors": "0.79.2",
92
127
  "@release-it/conventional-changelog": "8.0.2",
93
128
  "@types/jest": "29.5.14",
94
- "@types/react": "18.3.12",
129
+ "@types/react": "19.1.4",
95
130
  "babel-plugin-tester": "11.0.4",
96
- "commitlint": "19.6.1",
131
+ "commitlint": "19.8.1",
97
132
  "concurrently": "9.1.2",
133
+ "dpdm": "3.14.0",
134
+ "esbuild": "0.25.4",
98
135
  "husky": "9.1.7",
99
136
  "jest": "29.7.0",
100
137
  "metro-react-native-babel-preset": "0.77.0",
101
- "nitro-codegen": "0.22.1",
102
- "react": "18.3.1",
103
- "react-native": "0.77.0",
104
- "react-native-builder-bob": "0.33.1",
105
- "react-native-nitro-modules": "0.22.1",
106
- "react-native-web": "0.19.13",
107
- "react-test-renderer": "18.3.1",
108
- "release-it": "17.6.0",
109
- "typescript": "5.7.3"
138
+ "nitro-codegen": "0.25.2",
139
+ "react": "19.1.0",
140
+ "react-native": "0.79.2",
141
+ "react-native-builder-bob": "0.40.10",
142
+ "react-native-nitro-modules": "0.25.2",
143
+ "react-native-reanimated": "3.17.5",
144
+ "react-native-web": "0.20.0",
145
+ "react-test-renderer": "19.1.0",
146
+ "release-it": "17.11.0",
147
+ "typescript": "5.8.3"
110
148
  },
111
149
  "peerDependencies": {
112
150
  "@react-native/normalize-colors": "*",
113
151
  "react": "*",
114
152
  "react-native": ">=0.76.0",
115
153
  "react-native-edge-to-edge": "*",
116
- "react-native-nitro-modules": "*"
154
+ "react-native-nitro-modules": "*",
155
+ "react-native-reanimated": "*"
156
+ },
157
+ "peerDependenciesMeta": {
158
+ "react-native-reanimated": {
159
+ "optional": true
160
+ }
117
161
  },
118
162
  "workspaces": [
119
163
  "example",
package/plugin/index.d.ts CHANGED
@@ -1,18 +1,43 @@
1
- type RemapImport = {
1
+ interface RemapImport {
2
+ /**
3
+ * The target import name if `isDefault` is false.
4
+ */
2
5
  name?: string,
6
+
7
+ /**
8
+ * Whether the import is default.
9
+ */
3
10
  isDefault: boolean,
11
+
12
+ /**
13
+ * The path to the target import.
14
+ */
4
15
  path: string,
16
+
17
+ /**
18
+ * The name of the Unistyles component, check `react-native-unistyles/src/components/native`
19
+ */
5
20
  mapTo: string
6
21
  }
7
22
 
8
- type RemapConfig = {
23
+ /**
24
+ * A more powerful API that allows converting unmatched imports to Unistyles.
25
+ */
26
+ export interface RemapConfig {
27
+ /**
28
+ * The node_modules path.
29
+ */
9
30
  path: string,
31
+
32
+ /**
33
+ * An array of import objects with the following properties:
34
+ */
10
35
  imports: Array<RemapImport>
11
36
  }
12
37
 
13
38
  export interface UnistylesPluginOptions {
14
39
  /**
15
- * Example: "src" or "apps/mobile"
40
+ * Example: 'src' or 'apps/mobile'
16
41
  * Add this option if some of your components don't have `react-native-unistyles` import.
17
42
  * Babel plugin will automatically process all files under this root.
18
43
  */
@@ -25,29 +50,41 @@ export interface UnistylesPluginOptions {
25
50
  autoProcessImports?: Array<string>,
26
51
 
27
52
  /**
28
- * Example: [{
29
- * path: "node_modules/custom-library/components",
53
+ * Example:
54
+ * ```js
55
+ * [{
56
+ * path: 'node_modules/custom-library/components',
30
57
  * imports: [
31
58
  * {
32
- * name: "NativeText",
59
+ * name: 'NativeText',
33
60
  * isDefault: false,
34
- * path: "react-native/Libraries/Text/TextNativeComponent",
35
- * mapTo: "NativeText"
61
+ * path: 'react-native/Libraries/Text/TextNativeComponent',
62
+ * mapTo: 'NativeText'
36
63
  * },
37
64
  * {
38
65
  * isDefault: true,
39
- * path: "react-native/Libraries/Components/View/ViewNativeComponent",
40
- * mapTo: "NativeView"
66
+ * path: 'react-native/Libraries/Components/View/ViewNativeComponent',
67
+ * mapTo: 'NativeView'
41
68
  * }
42
69
  * ]
43
70
  * }]
71
+ * ```
44
72
  *
45
73
  * Will map:
46
- * import { NativeText } from "react-native/Libraries/Text/TextNativeComponent"
47
- * to Unistyles "NativeText"
48
74
  *
49
- * import View from "react-native/Libraries/Components/View/ViewNativeComponent"
50
- * to Unistyles "NativeView"
75
+ * ```js
76
+ * import { NativeText } from 'react-native/Libraries/Text/TextNativeComponent'
77
+ * ```
78
+ *
79
+ * to Unistyles 'NativeText'
80
+ *
81
+ * and
82
+ *
83
+ * ```js
84
+ * import View from 'react-native/Libraries/Components/View/ViewNativeComponent'
85
+ * ```
86
+ *
87
+ * to Unistyles 'NativeView'
51
88
  *
52
89
  * This is the most powerful way of remapping imports. If 3rd party library uses imports different from `react-native` we can remap them to `react-native-unistyles` factories.
53
90
  * Internally we do that for raw RCTView and RCTText components.
@@ -83,7 +120,3 @@ export interface UnistylesPluginOptions {
83
120
  */
84
121
  isLocal?: boolean
85
122
  }
86
-
87
- export interface UnistylesPluginPass {
88
- opts: UnistylesPluginOptions
89
- }