react-native-unistyles 3.0.24 → 3.1.1

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 (491) hide show
  1. package/README.md +7 -6
  2. package/android/src/main/cxx/NativeUnistylesModule.cpp +7 -4
  3. package/android/src/main/cxx/NativeUnistylesModule.h +9 -3
  4. package/android/src/main/cxx/cpp-adapter.cpp +1 -1
  5. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +22 -4
  6. package/android/src/main/java/com/unistyles/UnistylesModule.kt +1 -0
  7. package/cxx/core/StyleSheetRegistry.cpp +11 -11
  8. package/cxx/core/StyleSheetRegistry.h +4 -4
  9. package/cxx/core/UnistylesRegistry.cpp +27 -14
  10. package/cxx/core/UnistylesRegistry.h +4 -1
  11. package/cxx/hybridObjects/HybridShadowRegistry.cpp +5 -0
  12. package/cxx/hybridObjects/HybridStyleSheet.cpp +2 -14
  13. package/cxx/hybridObjects/HybridStyleSheet.h +0 -2
  14. package/ios/UnistylesModuleOnLoad.mm +10 -2
  15. package/lib/commonjs/components/AdaptiveTheme.js +1 -1
  16. package/lib/commonjs/components/AdaptiveTheme.js.map +1 -1
  17. package/lib/commonjs/components/ApplyScopedTheme.js.map +1 -1
  18. package/lib/commonjs/components/Display.js.map +1 -1
  19. package/lib/commonjs/components/Hide.js.map +1 -1
  20. package/lib/commonjs/components/NamedTheme.js +2 -2
  21. package/lib/commonjs/components/NamedTheme.js.map +1 -1
  22. package/lib/commonjs/components/ScopedTheme.js.map +1 -1
  23. package/lib/commonjs/components/native/ActivityIndicator.js.map +1 -1
  24. package/lib/commonjs/components/native/Animated.js.map +1 -1
  25. package/lib/commonjs/components/native/FlatList.js.map +1 -1
  26. package/lib/commonjs/components/native/Image.js.map +1 -1
  27. package/lib/commonjs/components/native/Image.native.js.map +1 -1
  28. package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
  29. package/lib/commonjs/components/native/ImageBackground.native.js.map +1 -1
  30. package/lib/commonjs/components/native/KeyboardAvoidingView.js.map +1 -1
  31. package/lib/commonjs/components/native/NativeText.native.js.map +1 -1
  32. package/lib/commonjs/components/native/NativeView.native.js.map +1 -1
  33. package/lib/commonjs/components/native/Pressable.js.map +1 -1
  34. package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
  35. package/lib/commonjs/components/native/RefreshControl.js.map +1 -1
  36. package/lib/commonjs/components/native/SafeAreaView.js.map +1 -1
  37. package/lib/commonjs/components/native/ScrollView.js.map +1 -1
  38. package/lib/commonjs/components/native/SectionList.js.map +1 -1
  39. package/lib/commonjs/components/native/Switch.js.map +1 -1
  40. package/lib/commonjs/components/native/Text.js.map +1 -1
  41. package/lib/commonjs/components/native/TextInput.js.map +1 -1
  42. package/lib/commonjs/components/native/TouchableHighlight.js.map +1 -1
  43. package/lib/commonjs/components/native/TouchableOpacity.js.map +1 -1
  44. package/lib/commonjs/components/native/View.js.map +1 -1
  45. package/lib/commonjs/components/native/VirtualizedList.js.map +1 -1
  46. package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
  47. package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
  48. package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
  49. package/lib/commonjs/core/getClassname.js.map +1 -1
  50. package/lib/commonjs/core/parseBoxShadow.js.map +1 -1
  51. package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -1
  52. package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js +0 -1
  53. package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js.map +1 -1
  54. package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
  55. package/lib/commonjs/core/useUnistyles.js.map +1 -1
  56. package/lib/commonjs/core/warn.js.map +1 -1
  57. package/lib/commonjs/core/withUnistyles/withUnistyles.js +3 -1
  58. package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
  59. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +6 -0
  60. package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
  61. package/lib/commonjs/hooks/useMedia.js.map +1 -1
  62. package/lib/commonjs/hooks/useMedia.native.js +0 -1
  63. package/lib/commonjs/hooks/useMedia.native.js.map +1 -1
  64. package/lib/commonjs/index.js +6 -0
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/mocks.js +28 -8
  67. package/lib/commonjs/mocks.js.map +1 -1
  68. package/lib/commonjs/mq.js.map +1 -1
  69. package/lib/commonjs/reanimated/useAnimatedTheme.js.map +1 -1
  70. package/lib/commonjs/reanimated/useAnimatedTheme.native.js +0 -1
  71. package/lib/commonjs/reanimated/useAnimatedTheme.native.js.map +1 -1
  72. package/lib/commonjs/reanimated/variant/useAnimatedVariantColor.js.map +1 -1
  73. package/lib/commonjs/reanimated/variant/useUpdateVariantColor.js.map +1 -1
  74. package/lib/commonjs/reanimated/variant/useUpdateVariantColor.native.js +0 -1
  75. package/lib/commonjs/reanimated/variant/useUpdateVariantColor.native.js.map +1 -1
  76. package/lib/commonjs/server/getServerUnistyles.js.map +1 -1
  77. package/lib/commonjs/server/useServerUnistyles.js.map +1 -1
  78. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  79. package/lib/commonjs/specs/ShadowRegistry/index.js +9 -5
  80. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  81. package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
  82. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  83. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  84. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
  85. package/lib/commonjs/specs/index.native.js +1 -1
  86. package/lib/commonjs/specs/index.native.js.map +1 -1
  87. package/lib/commonjs/specs/types.js.map +1 -1
  88. package/lib/commonjs/types/index.js.map +1 -1
  89. package/lib/commonjs/types/stylesheet.js.map +1 -1
  90. package/lib/commonjs/utils.js.map +1 -1
  91. package/lib/commonjs/web/convert/index.js.map +1 -1
  92. package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -1
  93. package/lib/commonjs/web/convert/object/filter.js.map +1 -1
  94. package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -1
  95. package/lib/commonjs/web/convert/object/transform.js.map +1 -1
  96. package/lib/commonjs/web/convert/pseudo.js.map +1 -1
  97. package/lib/commonjs/web/convert/shadow/boxShadow.js.map +1 -1
  98. package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js.map +1 -1
  99. package/lib/commonjs/web/convert/shadow/textShadow.js.map +1 -1
  100. package/lib/commonjs/web/convert/types.js.map +1 -1
  101. package/lib/commonjs/web/convert/utils.js.map +1 -1
  102. package/lib/commonjs/web/create.js +1 -5
  103. package/lib/commonjs/web/create.js.map +1 -1
  104. package/lib/commonjs/web/css/core.js.map +1 -1
  105. package/lib/commonjs/web/css/state.js.map +1 -1
  106. package/lib/commonjs/web/css/utils.js.map +1 -1
  107. package/lib/commonjs/web/index.js +1 -0
  108. package/lib/commonjs/web/index.js.map +1 -1
  109. package/lib/commonjs/web/listener.js +29 -8
  110. package/lib/commonjs/web/listener.js.map +1 -1
  111. package/lib/commonjs/web/registry.js.map +1 -1
  112. package/lib/commonjs/web/runtime.js +1 -2
  113. package/lib/commonjs/web/runtime.js.map +1 -1
  114. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  115. package/lib/commonjs/web/state.js +3 -3
  116. package/lib/commonjs/web/state.js.map +1 -1
  117. package/lib/commonjs/web/utils/common.js.map +1 -1
  118. package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -1
  119. package/lib/commonjs/web/utils/unistyle.js +2 -0
  120. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  121. package/lib/commonjs/web/variants.js.map +1 -1
  122. package/lib/commonjs/web-only/getWebProps.js.map +1 -1
  123. package/lib/commonjs/web-only/index.js.map +1 -1
  124. package/lib/module/components/AdaptiveTheme.js +1 -1
  125. package/lib/module/components/AdaptiveTheme.js.map +1 -1
  126. package/lib/module/components/ApplyScopedTheme.js.map +1 -1
  127. package/lib/module/components/Display.js.map +1 -1
  128. package/lib/module/components/Hide.js.map +1 -1
  129. package/lib/module/components/NamedTheme.js +2 -2
  130. package/lib/module/components/NamedTheme.js.map +1 -1
  131. package/lib/module/components/ScopedTheme.js.map +1 -1
  132. package/lib/module/components/native/ActivityIndicator.js.map +1 -1
  133. package/lib/module/components/native/Animated.js.map +1 -1
  134. package/lib/module/components/native/FlatList.js.map +1 -1
  135. package/lib/module/components/native/Image.js.map +1 -1
  136. package/lib/module/components/native/Image.native.js.map +1 -1
  137. package/lib/module/components/native/ImageBackground.js.map +1 -1
  138. package/lib/module/components/native/ImageBackground.native.js.map +1 -1
  139. package/lib/module/components/native/KeyboardAvoidingView.js.map +1 -1
  140. package/lib/module/components/native/NativeText.native.js.map +1 -1
  141. package/lib/module/components/native/NativeView.native.js.map +1 -1
  142. package/lib/module/components/native/Pressable.js.map +1 -1
  143. package/lib/module/components/native/Pressable.native.js.map +1 -1
  144. package/lib/module/components/native/RefreshControl.js.map +1 -1
  145. package/lib/module/components/native/SafeAreaView.js.map +1 -1
  146. package/lib/module/components/native/ScrollView.js.map +1 -1
  147. package/lib/module/components/native/SectionList.js.map +1 -1
  148. package/lib/module/components/native/Switch.js.map +1 -1
  149. package/lib/module/components/native/Text.js.map +1 -1
  150. package/lib/module/components/native/TextInput.js.map +1 -1
  151. package/lib/module/components/native/TouchableHighlight.js.map +1 -1
  152. package/lib/module/components/native/TouchableOpacity.js.map +1 -1
  153. package/lib/module/components/native/View.js.map +1 -1
  154. package/lib/module/components/native/VirtualizedList.js.map +1 -1
  155. package/lib/module/core/createUnistylesElement.js.map +1 -1
  156. package/lib/module/core/createUnistylesElement.native.js.map +1 -1
  157. package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
  158. package/lib/module/core/getClassname.js.map +1 -1
  159. package/lib/module/core/parseBoxShadow.js.map +1 -1
  160. package/lib/module/core/useProxifiedUnistyles/listener.js.map +1 -1
  161. package/lib/module/core/useProxifiedUnistyles/listener.native.js +0 -1
  162. package/lib/module/core/useProxifiedUnistyles/listener.native.js.map +1 -1
  163. package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
  164. package/lib/module/core/useUnistyles.js.map +1 -1
  165. package/lib/module/core/warn.js.map +1 -1
  166. package/lib/module/core/withUnistyles/withUnistyles.js +3 -1
  167. package/lib/module/core/withUnistyles/withUnistyles.js.map +1 -1
  168. package/lib/module/core/withUnistyles/withUnistyles.native.js +6 -0
  169. package/lib/module/core/withUnistyles/withUnistyles.native.js.map +1 -1
  170. package/lib/module/hooks/useMedia.js.map +1 -1
  171. package/lib/module/hooks/useMedia.native.js +0 -1
  172. package/lib/module/hooks/useMedia.native.js.map +1 -1
  173. package/lib/module/index.js +1 -0
  174. package/lib/module/index.js.map +1 -1
  175. package/lib/module/mocks.js +28 -8
  176. package/lib/module/mocks.js.map +1 -1
  177. package/lib/module/mq.js.map +1 -1
  178. package/lib/module/reanimated/useAnimatedTheme.js.map +1 -1
  179. package/lib/module/reanimated/useAnimatedTheme.native.js +0 -1
  180. package/lib/module/reanimated/useAnimatedTheme.native.js.map +1 -1
  181. package/lib/module/reanimated/variant/useAnimatedVariantColor.js.map +1 -1
  182. package/lib/module/reanimated/variant/useUpdateVariantColor.js.map +1 -1
  183. package/lib/module/reanimated/variant/useUpdateVariantColor.native.js +0 -1
  184. package/lib/module/reanimated/variant/useUpdateVariantColor.native.js.map +1 -1
  185. package/lib/module/server/getServerUnistyles.js.map +1 -1
  186. package/lib/module/server/useServerUnistyles.js.map +1 -1
  187. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
  188. package/lib/module/specs/ShadowRegistry/index.js +9 -5
  189. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  190. package/lib/module/specs/StatusBar/index.js.map +1 -1
  191. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  192. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  193. package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
  194. package/lib/module/specs/index.native.js +1 -1
  195. package/lib/module/specs/index.native.js.map +1 -1
  196. package/lib/module/specs/types.js.map +1 -1
  197. package/lib/module/types/index.js.map +1 -1
  198. package/lib/module/types/stylesheet.js.map +1 -1
  199. package/lib/module/utils.js.map +1 -1
  200. package/lib/module/web/convert/index.js.map +1 -1
  201. package/lib/module/web/convert/object/boxShadow.js.map +1 -1
  202. package/lib/module/web/convert/object/filter.js.map +1 -1
  203. package/lib/module/web/convert/object/objectStyle.js.map +1 -1
  204. package/lib/module/web/convert/object/transform.js.map +1 -1
  205. package/lib/module/web/convert/pseudo.js.map +1 -1
  206. package/lib/module/web/convert/shadow/boxShadow.js.map +1 -1
  207. package/lib/module/web/convert/shadow/getShadowBreakpoints.js.map +1 -1
  208. package/lib/module/web/convert/shadow/textShadow.js.map +1 -1
  209. package/lib/module/web/convert/types.js.map +1 -1
  210. package/lib/module/web/convert/utils.js.map +1 -1
  211. package/lib/module/web/create.js +2 -6
  212. package/lib/module/web/create.js.map +1 -1
  213. package/lib/module/web/css/core.js.map +1 -1
  214. package/lib/module/web/css/state.js.map +1 -1
  215. package/lib/module/web/css/utils.js.map +1 -1
  216. package/lib/module/web/index.js +1 -0
  217. package/lib/module/web/index.js.map +1 -1
  218. package/lib/module/web/listener.js +29 -8
  219. package/lib/module/web/listener.js.map +1 -1
  220. package/lib/module/web/registry.js.map +1 -1
  221. package/lib/module/web/runtime.js +1 -2
  222. package/lib/module/web/runtime.js.map +1 -1
  223. package/lib/module/web/shadowRegistry.js.map +1 -1
  224. package/lib/module/web/state.js +3 -3
  225. package/lib/module/web/state.js.map +1 -1
  226. package/lib/module/web/utils/common.js.map +1 -1
  227. package/lib/module/web/utils/createUnistylesRef.js.map +1 -1
  228. package/lib/module/web/utils/unistyle.js +2 -0
  229. package/lib/module/web/utils/unistyle.js.map +1 -1
  230. package/lib/module/web/variants.js.map +1 -1
  231. package/lib/module/web-only/getWebProps.js.map +1 -1
  232. package/lib/module/web-only/index.js.map +1 -1
  233. package/lib/typescript/src/__tests__/mocks.spec.d.ts +2 -0
  234. package/lib/typescript/src/__tests__/mocks.spec.d.ts.map +1 -0
  235. package/lib/typescript/src/__tests__/web-listener.spec.d.ts +2 -0
  236. package/lib/typescript/src/__tests__/web-listener.spec.d.ts.map +1 -0
  237. package/lib/typescript/src/components/AdaptiveTheme.d.ts +1 -1
  238. package/lib/typescript/src/components/AdaptiveTheme.d.ts.map +1 -1
  239. package/lib/typescript/src/components/ApplyScopedTheme.d.ts.map +1 -1
  240. package/lib/typescript/src/components/Display.d.ts.map +1 -1
  241. package/lib/typescript/src/components/Hide.d.ts.map +1 -1
  242. package/lib/typescript/src/components/NamedTheme.d.ts +1 -1
  243. package/lib/typescript/src/components/NamedTheme.d.ts.map +1 -1
  244. package/lib/typescript/src/components/ScopedTheme.d.ts.map +1 -1
  245. package/lib/typescript/src/components/native/ActivityIndicator.d.ts.map +1 -1
  246. package/lib/typescript/src/components/native/Animated.d.ts.map +1 -1
  247. package/lib/typescript/src/components/native/FlatList.d.ts.map +1 -1
  248. package/lib/typescript/src/components/native/Image.d.ts.map +1 -1
  249. package/lib/typescript/src/components/native/Image.native.d.ts.map +1 -1
  250. package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
  251. package/lib/typescript/src/components/native/ImageBackground.native.d.ts.map +1 -1
  252. package/lib/typescript/src/components/native/KeyboardAvoidingView.d.ts.map +1 -1
  253. package/lib/typescript/src/components/native/NativeText.native.d.ts.map +1 -1
  254. package/lib/typescript/src/components/native/NativeView.native.d.ts.map +1 -1
  255. package/lib/typescript/src/components/native/Pressable.d.ts +1 -1
  256. package/lib/typescript/src/components/native/Pressable.d.ts.map +1 -1
  257. package/lib/typescript/src/components/native/Pressable.native.d.ts +1 -1
  258. package/lib/typescript/src/components/native/Pressable.native.d.ts.map +1 -1
  259. package/lib/typescript/src/components/native/RefreshControl.d.ts.map +1 -1
  260. package/lib/typescript/src/components/native/SafeAreaView.d.ts.map +1 -1
  261. package/lib/typescript/src/components/native/ScrollView.d.ts.map +1 -1
  262. package/lib/typescript/src/components/native/SectionList.d.ts.map +1 -1
  263. package/lib/typescript/src/components/native/Switch.d.ts.map +1 -1
  264. package/lib/typescript/src/components/native/Text.d.ts.map +1 -1
  265. package/lib/typescript/src/components/native/TextInput.d.ts.map +1 -1
  266. package/lib/typescript/src/components/native/TouchableHighlight.d.ts.map +1 -1
  267. package/lib/typescript/src/components/native/TouchableOpacity.d.ts.map +1 -1
  268. package/lib/typescript/src/components/native/View.d.ts.map +1 -1
  269. package/lib/typescript/src/components/native/VirtualizedList.d.ts.map +1 -1
  270. package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
  271. package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -1
  272. package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
  273. package/lib/typescript/src/core/getClassname.d.ts.map +1 -1
  274. package/lib/typescript/src/core/parseBoxShadow.d.ts.map +1 -1
  275. package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts.map +1 -1
  276. package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts +1 -1
  277. package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts.map +1 -1
  278. package/lib/typescript/src/core/useProxifiedUnistyles/types.d.ts.map +1 -1
  279. package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts +1 -1
  280. package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -1
  281. package/lib/typescript/src/core/useUnistyles.d.ts.map +1 -1
  282. package/lib/typescript/src/core/withUnistyles/types.d.ts +1 -1
  283. package/lib/typescript/src/core/withUnistyles/types.d.ts.map +1 -1
  284. package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts.map +1 -1
  285. package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts.map +1 -1
  286. package/lib/typescript/src/global.d.ts.map +1 -1
  287. package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -1
  288. package/lib/typescript/src/hooks/useMedia.native.d.ts.map +1 -1
  289. package/lib/typescript/src/index.d.ts +1 -0
  290. package/lib/typescript/src/index.d.ts.map +1 -1
  291. package/lib/typescript/src/mq.d.ts.map +1 -1
  292. package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts.map +1 -1
  293. package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts.map +1 -1
  294. package/lib/typescript/src/reanimated/variant/types.d.ts.map +1 -1
  295. package/lib/typescript/src/reanimated/variant/useAnimatedVariantColor.d.ts.map +1 -1
  296. package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.d.ts +1 -1
  297. package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.d.ts.map +1 -1
  298. package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.native.d.ts +1 -1
  299. package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.native.d.ts.map +1 -1
  300. package/lib/typescript/src/server/getServerUnistyles.d.ts +1 -1
  301. package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -1
  302. package/lib/typescript/src/server/types.d.ts.map +1 -1
  303. package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -1
  304. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  305. package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
  306. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  307. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +4 -5
  308. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
  309. package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
  310. package/lib/typescript/src/specs/StatusBar/index.d.ts +1 -1
  311. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  312. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +0 -1
  313. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
  314. package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -3
  315. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  316. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
  317. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +1 -1
  318. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  319. package/lib/typescript/src/specs/index.native.d.ts +4 -4
  320. package/lib/typescript/src/specs/index.native.d.ts.map +1 -1
  321. package/lib/typescript/src/specs/types.d.ts.map +1 -1
  322. package/lib/typescript/src/types/breakpoints.d.ts +2 -2
  323. package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
  324. package/lib/typescript/src/types/core.d.ts.map +1 -1
  325. package/lib/typescript/src/types/index.d.ts +1 -1
  326. package/lib/typescript/src/types/index.d.ts.map +1 -1
  327. package/lib/typescript/src/types/stylesheet.d.ts +1 -1
  328. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
  329. package/lib/typescript/src/types/variants.d.ts.map +1 -1
  330. package/lib/typescript/src/utils.d.ts.map +1 -1
  331. package/lib/typescript/src/web/convert/index.d.ts.map +1 -1
  332. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
  333. package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -1
  334. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
  335. package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -1
  336. package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -1
  337. package/lib/typescript/src/web/convert/types.d.ts +2 -2
  338. package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
  339. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -1
  340. package/lib/typescript/src/web/create.d.ts +1 -1
  341. package/lib/typescript/src/web/create.d.ts.map +1 -1
  342. package/lib/typescript/src/web/css/core.d.ts.map +1 -1
  343. package/lib/typescript/src/web/css/state.d.ts.map +1 -1
  344. package/lib/typescript/src/web/css/utils.d.ts.map +1 -1
  345. package/lib/typescript/src/web/index.d.ts.map +1 -1
  346. package/lib/typescript/src/web/listener.d.ts +5 -1
  347. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  348. package/lib/typescript/src/web/registry.d.ts +1 -1
  349. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  350. package/lib/typescript/src/web/runtime.d.ts +1 -1
  351. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  352. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
  353. package/lib/typescript/src/web/state.d.ts.map +1 -1
  354. package/lib/typescript/src/web/types.d.ts +1 -1
  355. package/lib/typescript/src/web/types.d.ts.map +1 -1
  356. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  357. package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -1
  358. package/lib/typescript/src/web/utils/unistyle.d.ts +1 -1
  359. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  360. package/lib/typescript/src/web/variants.d.ts.map +1 -1
  361. package/lib/typescript/src/web-only/getWebProps.d.ts.map +1 -1
  362. package/lib/typescript/src/web-only/index.d.ts.map +1 -1
  363. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +36 -42
  364. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +19 -22
  365. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +15 -18
  366. package/nitrogen/generated/android/unistylesOnLoad.cpp +14 -9
  367. package/nitrogen/generated/android/unistylesOnLoad.hpp +13 -4
  368. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +0 -1
  369. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +0 -1
  370. package/package.json +43 -44
  371. package/plugin/index.d.ts +34 -28
  372. package/plugin/index.js +113 -103
  373. package/repack-plugin/index.d.ts +2 -2
  374. package/src/components/AdaptiveTheme.tsx +8 -12
  375. package/src/components/ApplyScopedTheme.tsx +2 -0
  376. package/src/components/Display.tsx +2 -3
  377. package/src/components/Hide.tsx +2 -3
  378. package/src/components/NamedTheme.tsx +9 -14
  379. package/src/components/ScopedTheme.tsx +22 -27
  380. package/src/components/native/ActivityIndicator.tsx +1 -0
  381. package/src/components/native/Animated.tsx +2 -1
  382. package/src/components/native/FlatList.tsx +1 -0
  383. package/src/components/native/Image.native.tsx +1 -0
  384. package/src/components/native/Image.tsx +11 -7
  385. package/src/components/native/ImageBackground.native.tsx +1 -0
  386. package/src/components/native/ImageBackground.tsx +11 -7
  387. package/src/components/native/KeyboardAvoidingView.tsx +1 -0
  388. package/src/components/native/NativeText.native.tsx +3 -1
  389. package/src/components/native/NativeView.native.tsx +3 -1
  390. package/src/components/native/Pressable.native.tsx +8 -8
  391. package/src/components/native/Pressable.tsx +25 -20
  392. package/src/components/native/RefreshControl.tsx +1 -0
  393. package/src/components/native/SafeAreaView.tsx +1 -0
  394. package/src/components/native/ScrollView.tsx +1 -0
  395. package/src/components/native/SectionList.tsx +1 -0
  396. package/src/components/native/Switch.tsx +1 -0
  397. package/src/components/native/Text.tsx +1 -0
  398. package/src/components/native/TextInput.tsx +1 -0
  399. package/src/components/native/TouchableHighlight.tsx +1 -0
  400. package/src/components/native/TouchableOpacity.tsx +1 -0
  401. package/src/components/native/View.tsx +1 -0
  402. package/src/components/native/VirtualizedList.tsx +1 -0
  403. package/src/core/createUnistylesElement.native.tsx +4 -2
  404. package/src/core/createUnistylesElement.tsx +14 -17
  405. package/src/core/createUnistylesImageBackground.tsx +6 -4
  406. package/src/core/getClassname.ts +4 -11
  407. package/src/core/parseBoxShadow.ts +11 -24
  408. package/src/core/passForwardRef.ts +1 -1
  409. package/src/core/useProxifiedUnistyles/listener.native.ts +3 -3
  410. package/src/core/useProxifiedUnistyles/listener.ts +10 -3
  411. package/src/core/useProxifiedUnistyles/types.ts +2 -2
  412. package/src/core/useProxifiedUnistyles/useProxifiedUnistyles.ts +13 -9
  413. package/src/core/useUnistyles.ts +2 -1
  414. package/src/core/warn.ts +4 -4
  415. package/src/core/withUnistyles/types.ts +7 -4
  416. package/src/core/withUnistyles/withUnistyles.native.tsx +53 -44
  417. package/src/core/withUnistyles/withUnistyles.tsx +30 -24
  418. package/src/global.ts +2 -2
  419. package/src/hooks/useMedia.native.ts +2 -2
  420. package/src/hooks/useMedia.ts +6 -3
  421. package/src/index.ts +1 -0
  422. package/src/mocks.ts +74 -49
  423. package/src/mq.ts +23 -15
  424. package/src/reanimated/useAnimatedTheme.native.ts +4 -3
  425. package/src/reanimated/useAnimatedTheme.ts +6 -2
  426. package/src/reanimated/variant/types.ts +11 -10
  427. package/src/reanimated/variant/useAnimatedVariantColor.ts +7 -7
  428. package/src/reanimated/variant/useUpdateVariantColor.native.ts +10 -6
  429. package/src/reanimated/variant/useUpdateVariantColor.ts +21 -21
  430. package/src/server/getServerUnistyles.tsx +11 -4
  431. package/src/server/index.ts +0 -1
  432. package/src/server/types.ts +1 -1
  433. package/src/server/useServerUnistyles.tsx +4 -1
  434. package/src/specs/NativePlatform/NativePlatform.nitro.ts +30 -27
  435. package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +3 -3
  436. package/src/specs/ShadowRegistry/ShadowRegistry.nitro.ts +1 -1
  437. package/src/specs/ShadowRegistry/index.ts +35 -29
  438. package/src/specs/ShadowRegistry/types.ts +9 -10
  439. package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +4 -4
  440. package/src/specs/StatusBar/index.ts +5 -5
  441. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +2 -2
  442. package/src/specs/StyleSheet/index.ts +32 -27
  443. package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +1 -0
  444. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +26 -25
  445. package/src/specs/UnistylesRuntime/index.ts +20 -20
  446. package/src/specs/index.native.ts +6 -18
  447. package/src/specs/types.ts +9 -8
  448. package/src/types/accessibility.ts +2 -2
  449. package/src/types/breakpoints.ts +61 -59
  450. package/src/types/core.ts +17 -17
  451. package/src/types/index.ts +2 -9
  452. package/src/types/stylesheet.ts +27 -19
  453. package/src/types/variants.ts +3 -11
  454. package/src/utils.ts +16 -16
  455. package/src/web/convert/index.ts +6 -2
  456. package/src/web/convert/object/boxShadow.ts +23 -18
  457. package/src/web/convert/object/filter.ts +30 -13
  458. package/src/web/convert/object/objectStyle.ts +33 -23
  459. package/src/web/convert/object/transform.ts +10 -8
  460. package/src/web/convert/pseudo.ts +2 -2
  461. package/src/web/convert/shadow/boxShadow.ts +6 -6
  462. package/src/web/convert/shadow/getShadowBreakpoints.ts +4 -4
  463. package/src/web/convert/shadow/textShadow.ts +6 -6
  464. package/src/web/convert/style.ts +25 -25
  465. package/src/web/convert/types.ts +4 -3
  466. package/src/web/convert/utils.ts +20 -10
  467. package/src/web/create.ts +29 -20
  468. package/src/web/css/core.ts +2 -1
  469. package/src/web/css/state.ts +11 -8
  470. package/src/web/css/utils.ts +2 -1
  471. package/src/web/index.ts +7 -4
  472. package/src/web/listener.ts +61 -18
  473. package/src/web/mock.ts +2 -2
  474. package/src/web/registry.ts +17 -10
  475. package/src/web/runtime.ts +23 -17
  476. package/src/web/shadowRegistry.ts +26 -24
  477. package/src/web/state.ts +23 -16
  478. package/src/web/types.ts +5 -5
  479. package/src/web/utils/common.ts +7 -9
  480. package/src/web/utils/createUnistylesRef.ts +18 -14
  481. package/src/web/utils/unistyle.ts +53 -34
  482. package/src/web/variants.ts +19 -11
  483. package/src/web-only/getWebProps.ts +5 -6
  484. package/src/web-only/index.ts +0 -1
  485. package/LICENSE +0 -20
  486. package/lib/typescript/plugin/src/consts.d.ts +0 -17
  487. package/lib/typescript/plugin/src/consts.d.ts.map +0 -1
  488. package/lib/typescript/repack-plugin/src/index.d.ts +0 -18
  489. package/lib/typescript/repack-plugin/src/index.d.ts.map +0 -1
  490. package/lib/typescript/repack-plugin/src/loader.d.ts +0 -9
  491. package/lib/typescript/repack-plugin/src/loader.d.ts.map +0 -1
@@ -1,10 +1,12 @@
1
1
  import { Animated } from 'react-native'
2
+
2
3
  import type { UnistylesBreakpoints } from '../../global'
3
4
  import type { UnistyleDependency } from '../../specs/NativePlatform/NativePlatform.nitro'
4
- import { ColorScheme, Orientation } from '../../specs/types'
5
5
  import type { StyleSheet, StyleSheetWithSuperPowers, UnistylesValues } from '../../types/stylesheet'
6
- import { isDefined, isUnistylesMq, parseMq } from '../../utils'
7
6
  import type { UnistylesRuntime } from '../runtime'
7
+
8
+ import { ColorScheme, Orientation } from '../../specs/types'
9
+ import { isDefined, isUnistylesMq, parseMq } from '../../utils'
8
10
  import * as unistyles from '../services'
9
11
  import { UNI_GENERATED_KEYS, type UniGeneratedKey, type UniGeneratedStyle } from '../types'
10
12
  import { hyphenate, keyInObject, reduceObject } from './common'
@@ -20,9 +22,9 @@ export const schemeToTheme = (scheme: ColorScheme) => {
20
22
  }
21
23
 
22
24
  export type UnistyleSecrets = {
23
- __uni__stylesheet: StyleSheetWithSuperPowers<StyleSheet>,
24
- __uni__key: string,
25
- __uni__args?: Array<any>,
25
+ __uni__stylesheet: StyleSheetWithSuperPowers<StyleSheet>
26
+ __uni__key: string
27
+ __uni__args?: Array<any>
26
28
  __stylesheetVariants: Record<string, string | boolean | undefined>
27
29
  }
28
30
 
@@ -32,10 +34,11 @@ export const assignSecrets = <T>(object: T, secrets: UnistyleSecrets) => {
32
34
  // @ts-expect-error assign hidden secrets
33
35
  object[`unistyles_${secretsId}`] = {}
34
36
  // @ts-expect-error assign hidden secrets
35
- Object.defineProperties(object[`unistyles_${secretsId}`], reduceObject(secrets, secret => ({
37
+ // prettier-ignore
38
+ Object.defineProperties(object[`unistyles_${secretsId}`], reduceObject(secrets, (secret) => ({
36
39
  value: secret,
37
40
  enumerable: false,
38
- configurable: true
41
+ configurable: true,
39
42
  })))
40
43
 
41
44
  return object
@@ -52,17 +55,20 @@ export const extractSecrets = (object: any) => {
52
55
  return undefined
53
56
  }
54
57
 
55
- return reduceObject(Object.getOwnPropertyDescriptors(secrets), secret => secret.value)
58
+ return reduceObject(Object.getOwnPropertyDescriptors(secrets), (secret) => secret.value)
56
59
  }
57
60
 
58
61
  export const removeInlineStyles = (values: UnistylesValues) => {
59
62
  const returnValue = {}
60
63
 
61
- Object.defineProperties(returnValue, reduceObject(values, value => ({
62
- value,
63
- enumerable: false,
64
- configurable: true
65
- })))
64
+ Object.defineProperties(
65
+ returnValue,
66
+ reduceObject(values, (value) => ({
67
+ value,
68
+ enumerable: false,
69
+ configurable: true,
70
+ })),
71
+ )
66
72
 
67
73
  return returnValue
68
74
  }
@@ -79,21 +85,25 @@ export const getMediaQuery = (query: string, allBreakpoints: Array<string>) => {
79
85
  minWidth ? `(min-width: ${minWidth}px)` : undefined,
80
86
  maxWidth ? `(max-width: ${maxWidth}px)` : undefined,
81
87
  minHeight ? `(min-height: ${minHeight}px)` : undefined,
82
- maxHeight ? `(max-height: ${maxHeight}px)` : undefined
83
- ].filter(Boolean).join(' and ')
88
+ maxHeight ? `(max-height: ${maxHeight}px)` : undefined,
89
+ ]
90
+ .filter(Boolean)
91
+ .join(' and ')
84
92
  return `@media ${queries}`
85
93
  }
86
94
 
87
95
  const breakpointValue = unistyles.services.runtime.breakpoints[query as keyof UnistylesBreakpoints] ?? 0
88
96
  const nextBreakpoint = allBreakpoints
89
97
  .filter((b): b is keyof UnistylesBreakpoints => b in unistyles.services.runtime.breakpoints)
90
- .map(b => unistyles.services.runtime.breakpoints[b] as number)
98
+ .map((b) => unistyles.services.runtime.breakpoints[b] as number)
91
99
  .sort((a, b) => a - b)
92
- .find(b => b > breakpointValue)
100
+ .find((b) => b > breakpointValue)
93
101
  const queries = [
94
102
  `(min-width: ${breakpointValue}px)`,
95
103
  nextBreakpoint ? `(max-width: ${nextBreakpoint - 1}px)` : undefined,
96
- ].filter(Boolean).join(' and ')
104
+ ]
105
+ .filter(Boolean)
106
+ .join(' and ')
97
107
 
98
108
  return `@media ${queries}`
99
109
  }
@@ -103,22 +113,20 @@ export const extractUnistyleDependencies = (value: any) => {
103
113
  return []
104
114
  }
105
115
 
106
- const dependencies: Array<UnistyleDependency> = keyInObject(value, 'uni__dependencies') ? value.uni__dependencies : []
116
+ const dependencies: Array<UnistyleDependency> = keyInObject(value, 'uni__dependencies')
117
+ ? value.uni__dependencies
118
+ : []
107
119
 
108
120
  return Array.isArray(dependencies) ? dependencies : []
109
121
  }
110
122
 
111
123
  export const checkForProp = (value: any, prop: string): boolean => {
112
124
  if (Array.isArray(value)) {
113
- return value.some(nestedValue => checkForProp(nestedValue, prop))
125
+ return value.some((nestedValue) => checkForProp(nestedValue, prop))
114
126
  }
115
127
 
116
128
  if (typeof value === 'object' && value !== null) {
117
- return keyInObject(value, prop)
118
- ? true
119
- : keyInObject(value, '_web')
120
- ? checkForProp(value._web, prop)
121
- : false
129
+ return keyInObject(value, prop) ? true : keyInObject(value, '_web') ? checkForProp(value._web, prop) : false
122
130
  }
123
131
 
124
132
  return false
@@ -134,9 +142,8 @@ export const checkForAnimated = (value: any): boolean => {
134
142
  const secrets = extractSecrets(value)
135
143
 
136
144
  // @ts-expect-error React Native Web exports Animated.AnimatedNode as Animated.Node
137
- return value instanceof Animated.Node ||
138
- objectValues.length > 0 && objectValues.some(checkForAnimated) ||
139
- secrets && Object.keys(secrets).length === 0
145
+ // prettier-ignore
146
+ return value instanceof Animated.Node || objectValues.length > 0 && objectValues.some(checkForAnimated) || secrets && Object.keys(secrets).length === 0
140
147
  }
141
148
 
142
149
  return false
@@ -145,12 +152,19 @@ export const checkForAnimated = (value: any): boolean => {
145
152
  export const isGeneratedUnistyle = (value: Record<string, any>): value is UniGeneratedStyle => {
146
153
  const keys = Object.keys(value)
147
154
 
148
- return keys.length > 0 && keys.every(key => UNI_GENERATED_KEYS.includes(key as UniGeneratedKey))
155
+ return keys.length > 0 && keys.every((key) => UNI_GENERATED_KEYS.includes(key as UniGeneratedKey))
149
156
  }
150
157
 
151
158
  export const convertTheme = (key: string, value: any, prev = '-'): [string, any] => {
152
159
  if (typeof value === 'object' && value !== null) {
153
- return [key, Object.fromEntries(Object.entries(value).map(([nestedKey, nestedValue]) => convertTheme(nestedKey, nestedValue, `${prev}-${key}`)))]
160
+ return [
161
+ key,
162
+ Object.fromEntries(
163
+ Object.entries(value).map(([nestedKey, nestedValue]) =>
164
+ convertTheme(nestedKey, nestedValue, `${prev}-${key}`),
165
+ ),
166
+ ),
167
+ ]
154
168
  }
155
169
 
156
170
  if (typeof value === 'string') {
@@ -160,7 +174,10 @@ export const convertTheme = (key: string, value: any, prev = '-'): [string, any]
160
174
  return [key, value]
161
175
  }
162
176
 
163
- export const getClosestBreakpointValue = <T>(runtime: UnistylesRuntime, values: Partial<Record<keyof UnistylesBreakpoints, T>>) => {
177
+ export const getClosestBreakpointValue = <T>(
178
+ runtime: UnistylesRuntime,
179
+ values: Partial<Record<keyof UnistylesBreakpoints, T>>,
180
+ ) => {
164
181
  const breakpoints = runtime.breakpoints
165
182
  const breakpointValues = Object.entries(values)
166
183
  // Filter out non-breakpoint values
@@ -168,9 +185,11 @@ export const getClosestBreakpointValue = <T>(runtime: UnistylesRuntime, values:
168
185
  // Sort in descending order
169
186
  .sort(([a], [b]) => (breakpoints[b] ?? 0) - (breakpoints[a] ?? 0))
170
187
  // Get breakpoint value with highest priority
171
- const [_, currentBreakpointValue] = breakpointValues.find(
172
- ([key]) => isDefined(runtime.breakpoint) && (breakpoints[key] ?? 0) <= (breakpoints[runtime.breakpoint] ?? 0)
173
- ) ?? []
188
+ const [_, currentBreakpointValue] =
189
+ breakpointValues.find(
190
+ ([key]) =>
191
+ isDefined(runtime.breakpoint) && (breakpoints[key] ?? 0) <= (breakpoints[runtime.breakpoint] ?? 0),
192
+ ) ?? []
174
193
 
175
194
  return currentBreakpointValue
176
195
  }
@@ -1,12 +1,15 @@
1
1
  import type { UnistylesValues } from '../types'
2
+
2
3
  import { deepMergeObjects } from '../utils'
3
4
  import { keyInObject } from './utils'
4
5
 
5
6
  type StylesWithVariants = {
6
- variants: Record<string, string | boolean | undefined>,
7
- compoundVariants?: Array<Record<string, string | boolean | undefined> & {
8
- styles: Record<string, any>
9
- }>
7
+ variants: Record<string, string | boolean | undefined>
8
+ compoundVariants?: Array<
9
+ Record<string, string | boolean | undefined> & {
10
+ styles: Record<string, any>
11
+ }
12
+ >
10
13
  }
11
14
  const hasVariants = (value: any): value is StylesWithVariants => {
12
15
  return keyInObject(value, 'variants')
@@ -28,15 +31,20 @@ export const getVariants = (styles: UnistylesValues, selectedVariants: Record<st
28
31
  return selectedVariantStyles
29
32
  })
30
33
 
31
- const compoundVariantStyles = styles.compoundVariants?.flatMap(compoundVariant => {
32
- const { styles, ...conditions } = compoundVariant
34
+ const compoundVariantStyles =
35
+ styles.compoundVariants?.flatMap((compoundVariant) => {
36
+ const { styles, ...conditions } = compoundVariant
33
37
 
34
- if (Object.entries(conditions).some(([variant, value]) => String(selectedVariants[variant]) !== String(value))) {
35
- return []
36
- }
38
+ if (
39
+ Object.entries(conditions).some(
40
+ ([variant, value]) => String(selectedVariants[variant]) !== String(value),
41
+ )
42
+ ) {
43
+ return []
44
+ }
37
45
 
38
- return styles
39
- }) ?? []
46
+ return styles
47
+ }) ?? []
40
48
 
41
49
  return deepMergeObjects(...variantStyles, ...compoundVariantStyles)
42
50
  }
@@ -1,6 +1,8 @@
1
1
  import type { StyleProp } from 'react-native'
2
- import { getClassName } from '../core'
2
+
3
3
  import type { RNStyle, UnistylesValues } from '../types'
4
+
5
+ import { getClassName } from '../core'
4
6
  import { createUnistylesRef } from '../web/utils/createUnistylesRef'
5
7
 
6
8
  export const getWebProps = <T>(style: StyleProp<RNStyle>, forwardedRef?: React.ForwardedRef<T>) => {
@@ -9,10 +11,7 @@ export const getWebProps = <T>(style: StyleProp<RNStyle>, forwardedRef?: React.F
9
11
  const [generatedStyles] = styles ?? []
10
12
 
11
13
  return {
12
- className: [
13
- generatedStyles?.hash,
14
- generatedStyles?.injectedClassName,
15
- ].filter(Boolean).join(' '),
16
- ref
14
+ className: [generatedStyles?.hash, generatedStyles?.injectedClassName].filter(Boolean).join(' '),
15
+ ref,
17
16
  }
18
17
  }
@@ -1,2 +1 @@
1
-
2
1
  export { getWebProps } from './getWebProps'
package/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023-2025 Jacek Pudysz
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- SOFTWARE.
@@ -1,17 +0,0 @@
1
- import type { RemapConfig } from '../index';
2
- export declare const REACT_NATIVE_COMPONENT_NAMES: string[];
3
- /**
4
- * auto replace RN imports to Unistyles imports under these paths
5
- * our implementation simply borrows 'ref' to register it in ShadowRegistry
6
- * so we won't affect anyone's implementation
7
- */
8
- export declare const REPLACE_WITH_UNISTYLES_PATHS: string[];
9
- /**
10
- * this is more powerful API as it allows to convert unmatched imports to Unistyles
11
- */
12
- export declare const REPLACE_WITH_UNISTYLES_EXOTIC_PATHS: Array<RemapConfig>;
13
- /**
14
- * this list will additionally detect React Native direct imports
15
- */
16
- export declare const NATIVE_COMPONENTS_PATHS: Pick<RemapConfig, 'imports'>;
17
- //# sourceMappingURL=consts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../../plugin/src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,eAAO,MAAM,4BAA4B,UAqBxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAGxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC,WAAW,CAAM,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAchE,CAAA"}
@@ -1,18 +0,0 @@
1
- import { getModulePaths } from '@callstack/repack';
2
- import type { Compiler, RspackPluginInstance } from '@rspack/core';
3
- import type { UnistylesPluginOptions } from 'react-native-unistyles/plugin';
4
- import { unistylesLoader } from './loader';
5
- export declare const BASE_REPACK_EXCLUDE_PATHS: RegExp[];
6
- type RuleExcludePaths = ReturnType<typeof getModulePaths>;
7
- interface ConstructorParams {
8
- ruleExcludePaths?: RuleExcludePaths;
9
- unistylesPluginOptions?: UnistylesPluginOptions;
10
- }
11
- export declare class RepackUnistylePlugin implements RspackPluginInstance {
12
- private ruleExcludePaths;
13
- private unistylesPluginOptions;
14
- constructor({ ruleExcludePaths, unistylesPluginOptions }?: ConstructorParams);
15
- apply(compiler: Compiler): void;
16
- }
17
- export default unistylesLoader;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../repack-plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,eAAO,MAAM,yBAAyB,UAcpC,CAAA;AAEF,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAEzD,UAAU,iBAAiB;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;CAClD;AAwBD,qBAAa,oBAAqB,YAAW,oBAAoB;IAC7D,OAAO,CAAC,gBAAgB,CAAA;IACxB,OAAO,CAAC,sBAAsB,CAAA;gBAElB,EAAE,gBAA4C,EAAE,sBAAsB,EAAE,GAAE,iBAAsB;IAK5G,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAG3B;AAED,eAAe,eAAe,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { LoaderContext } from '@rspack/core';
2
- import type { UnistylesPluginOptions } from '../../plugin';
3
- interface UnistylesLoaderOptions {
4
- babelPlugins?: string[];
5
- unistylesPluginOptions?: UnistylesPluginOptions;
6
- }
7
- export declare function unistylesLoader(this: LoaderContext<UnistylesLoaderOptions>, source: string): void;
8
- export {};
9
- //# sourceMappingURL=loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../repack-plugin/src/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAK1D,UAAU,sBAAsB;IAC5B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;CAClD;AAMD,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,sBAAsB,CAAC,EAAE,MAAM,EAAE,MAAM,QAuC1F"}