react-native-css 0.0.0-nightly.08286a2 → 0.0.0-nightly.126d37e

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 (420) hide show
  1. package/README.md +5 -5
  2. package/dist/commonjs/compiler/atRules.js +14 -10
  3. package/dist/commonjs/compiler/atRules.js.map +1 -1
  4. package/dist/commonjs/compiler/compiler.js +49 -1
  5. package/dist/commonjs/compiler/compiler.js.map +1 -1
  6. package/dist/commonjs/compiler/declarations.js +61 -10
  7. package/dist/commonjs/compiler/declarations.js.map +1 -1
  8. package/dist/commonjs/compiler/keyframes.js +1 -1
  9. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  10. package/dist/commonjs/compiler/lightningcss-loader.js +12 -2
  11. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  12. package/dist/commonjs/compiler/stylesheet.js +7 -5
  13. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  14. package/dist/commonjs/compiler/supports.js +2 -2
  15. package/dist/commonjs/compiler/supports.js.map +1 -1
  16. package/dist/commonjs/components/ActivityIndicator.js +6 -6
  17. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  18. package/dist/commonjs/components/Button.js +6 -6
  19. package/dist/commonjs/components/Button.js.map +1 -1
  20. package/dist/commonjs/components/FlatList.js +6 -6
  21. package/dist/commonjs/components/FlatList.js.map +1 -1
  22. package/dist/commonjs/components/Image.js +6 -6
  23. package/dist/commonjs/components/Image.js.map +1 -1
  24. package/dist/commonjs/components/ImageBackground.js +6 -6
  25. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  26. package/dist/commonjs/components/KeyboardAvoidingView.js +6 -6
  27. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  28. package/dist/commonjs/components/Pressable.js +6 -6
  29. package/dist/commonjs/components/Pressable.js.map +1 -1
  30. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  31. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  32. package/dist/commonjs/components/ScrollView.js +6 -6
  33. package/dist/commonjs/components/ScrollView.js.map +1 -1
  34. package/dist/commonjs/components/Switch.js +6 -6
  35. package/dist/commonjs/components/Switch.js.map +1 -1
  36. package/dist/commonjs/components/Text.js +6 -6
  37. package/dist/commonjs/components/Text.js.map +1 -1
  38. package/dist/commonjs/components/TextInput.js +6 -6
  39. package/dist/commonjs/components/TextInput.js.map +1 -1
  40. package/dist/commonjs/components/TouchableHighlight.js +6 -6
  41. package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
  42. package/dist/commonjs/components/TouchableOpacity.js +6 -6
  43. package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
  44. package/dist/commonjs/components/TouchableWithoutFeedback.js +6 -6
  45. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
  46. package/dist/commonjs/components/View.js +6 -6
  47. package/dist/commonjs/components/View.js.map +1 -1
  48. package/dist/commonjs/components/VirtualizedList.js +6 -6
  49. package/dist/commonjs/components/VirtualizedList.js.map +1 -1
  50. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  51. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  52. package/dist/commonjs/components/index.cjs +265 -0
  53. package/dist/commonjs/components/index.cjs.map +1 -0
  54. package/dist/commonjs/components/index.js.map +1 -1
  55. package/dist/commonjs/jest/index.js +1 -1
  56. package/dist/commonjs/jest/index.js.map +1 -1
  57. package/dist/commonjs/metro/index.js +8 -118
  58. package/dist/commonjs/metro/index.js.map +1 -1
  59. package/dist/commonjs/metro/metro-transformer.js +8 -1
  60. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  61. package/dist/commonjs/{native/metro.js → metro/override.js} +1 -1
  62. package/dist/commonjs/{native/metro.js.map → metro/override.js.map} +1 -1
  63. package/dist/commonjs/metro/resolver.js +15 -22
  64. package/dist/commonjs/metro/resolver.js.map +1 -1
  65. package/dist/commonjs/native/api.js +5 -1
  66. package/dist/commonjs/native/api.js.map +1 -1
  67. package/dist/commonjs/native/index.js +8 -8
  68. package/dist/commonjs/native/index.js.map +1 -1
  69. package/dist/commonjs/native/react/useNativeCss.js +11 -5
  70. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  71. package/dist/commonjs/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  72. package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
  73. package/dist/commonjs/native/styles/calculate-props.js +1 -1
  74. package/dist/commonjs/native/styles/functions/color-mix.js +50 -0
  75. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  76. package/dist/commonjs/native/styles/functions/index.js +11 -0
  77. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  78. package/dist/commonjs/native/styles/index.js +247 -19
  79. package/dist/commonjs/native/styles/index.js.map +1 -1
  80. package/dist/commonjs/native/styles/resolve.js +0 -1
  81. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  82. package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
  83. package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
  84. package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
  85. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  86. package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
  87. package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
  88. package/dist/commonjs/web/api.js +6 -3
  89. package/dist/commonjs/web/api.js.map +1 -1
  90. package/dist/module/compiler/atRules.js +14 -10
  91. package/dist/module/compiler/atRules.js.map +1 -1
  92. package/dist/module/compiler/compiler.js +50 -2
  93. package/dist/module/compiler/compiler.js.map +1 -1
  94. package/dist/module/compiler/declarations.js +60 -10
  95. package/dist/module/compiler/declarations.js.map +1 -1
  96. package/dist/module/compiler/keyframes.js +1 -1
  97. package/dist/module/compiler/keyframes.js.map +1 -1
  98. package/dist/module/compiler/lightningcss-loader.js +12 -2
  99. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  100. package/dist/module/compiler/stylesheet.js +7 -5
  101. package/dist/module/compiler/stylesheet.js.map +1 -1
  102. package/dist/module/compiler/supports.js +2 -2
  103. package/dist/module/compiler/supports.js.map +1 -1
  104. package/dist/module/components/ActivityIndicator.js +4 -3
  105. package/dist/module/components/ActivityIndicator.js.map +1 -1
  106. package/dist/module/components/Button.js +4 -3
  107. package/dist/module/components/Button.js.map +1 -1
  108. package/dist/module/components/FlatList.js +4 -3
  109. package/dist/module/components/FlatList.js.map +1 -1
  110. package/dist/module/components/Image.js +4 -3
  111. package/dist/module/components/Image.js.map +1 -1
  112. package/dist/module/components/ImageBackground.js +4 -3
  113. package/dist/module/components/ImageBackground.js.map +1 -1
  114. package/dist/module/components/KeyboardAvoidingView.js +4 -3
  115. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  116. package/dist/module/components/Pressable.js +4 -3
  117. package/dist/module/components/Pressable.js.map +1 -1
  118. package/dist/module/components/SafeAreaProvider.js +4 -0
  119. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  120. package/dist/module/components/ScrollView.js +4 -3
  121. package/dist/module/components/ScrollView.js.map +1 -1
  122. package/dist/module/components/Switch.js +4 -3
  123. package/dist/module/components/Switch.js.map +1 -1
  124. package/dist/module/components/Text.js +4 -3
  125. package/dist/module/components/Text.js.map +1 -1
  126. package/dist/module/components/TextInput.js +4 -3
  127. package/dist/module/components/TextInput.js.map +1 -1
  128. package/dist/module/components/TouchableHighlight.js +4 -3
  129. package/dist/module/components/TouchableHighlight.js.map +1 -1
  130. package/dist/module/components/TouchableOpacity.js +4 -3
  131. package/dist/module/components/TouchableOpacity.js.map +1 -1
  132. package/dist/module/components/TouchableWithoutFeedback.js +4 -3
  133. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
  134. package/dist/module/components/View.js +4 -3
  135. package/dist/module/components/View.js.map +1 -1
  136. package/dist/module/components/VirtualizedList.js +4 -3
  137. package/dist/module/components/VirtualizedList.js.map +1 -1
  138. package/dist/module/components/copyComponentProperties.js +15 -0
  139. package/dist/module/components/copyComponentProperties.js.map +1 -0
  140. package/dist/module/components/index.cjs +265 -0
  141. package/dist/module/components/index.cjs.map +1 -0
  142. package/dist/module/components/index.js.map +1 -1
  143. package/dist/module/jest/index.js +1 -1
  144. package/dist/module/jest/index.js.map +1 -1
  145. package/dist/module/metro/index.js +8 -117
  146. package/dist/module/metro/index.js.map +1 -1
  147. package/dist/module/metro/metro-transformer.js +8 -1
  148. package/dist/module/metro/metro-transformer.js.map +1 -1
  149. package/dist/module/metro/override.js +4 -0
  150. package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
  151. package/dist/module/metro/resolver.js +15 -22
  152. package/dist/module/metro/resolver.js.map +1 -1
  153. package/dist/module/native/api.js +4 -1
  154. package/dist/module/native/api.js.map +1 -1
  155. package/dist/module/native/index.js +1 -1
  156. package/dist/module/native/index.js.map +1 -1
  157. package/dist/module/native/react/useNativeCss.js +11 -5
  158. package/dist/module/native/react/useNativeCss.js.map +1 -1
  159. package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  160. package/dist/module/native/react-native-css-metro-override.js.map +1 -0
  161. package/dist/module/native/styles/calculate-props.js +1 -1
  162. package/dist/module/native/styles/functions/color-mix.js +45 -0
  163. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  164. package/dist/module/native/styles/functions/index.js +1 -0
  165. package/dist/module/native/styles/functions/index.js.map +1 -1
  166. package/dist/module/native/styles/index.js +248 -19
  167. package/dist/module/native/styles/index.js.map +1 -1
  168. package/dist/module/native/styles/resolve.js +0 -1
  169. package/dist/module/native/styles/resolve.js.map +1 -1
  170. package/dist/module/native/styles/shorthands/_handler.js +11 -1
  171. package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
  172. package/dist/module/native/styles/shorthands/animation.js +4 -1
  173. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  174. package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
  175. package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
  176. package/dist/module/web/api.js +6 -3
  177. package/dist/module/web/api.js.map +1 -1
  178. package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
  179. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
  180. package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
  181. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  182. package/dist/typescript/commonjs/example/index.d.ts +2 -0
  183. package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
  184. package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
  185. package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
  186. package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
  187. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
  188. package/dist/typescript/commonjs/example/src/App.d.ts +1 -0
  189. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  191. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -1
  192. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  193. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
  194. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
  195. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +1 -0
  197. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
  199. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  200. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
  201. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/src/components/FlatList.d.ts +3 -3
  203. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  204. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
  205. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
  207. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
  209. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
  211. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  213. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  214. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
  215. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  217. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  219. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
  221. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
  223. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
  225. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
  227. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  229. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +3 -3
  231. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
  232. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  233. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  234. package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
  235. package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
  236. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  237. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  239. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
  241. package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
  242. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/native/api.d.ts +2 -2
  244. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  245. package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
  246. package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -1
  248. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  249. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
  250. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
  251. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  252. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  253. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  254. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  255. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  256. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  257. package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  258. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
  259. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  260. package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  261. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +1 -1
  262. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  263. package/dist/typescript/commonjs/src/web/api.d.ts +2 -2
  264. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  265. package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
  266. package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
  267. package/dist/typescript/module/eslint.config.d.mts +2 -0
  268. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  269. package/dist/typescript/module/example/index.d.ts +2 -0
  270. package/dist/typescript/module/example/index.d.ts.map +1 -0
  271. package/dist/typescript/module/example/metro.config.d.ts +3 -0
  272. package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
  273. package/dist/typescript/module/example/postcss.config.d.mts +7 -0
  274. package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
  275. package/dist/typescript/module/example/src/App.d.ts +1 -0
  276. package/dist/typescript/module/example/src/App.d.ts.map +1 -1
  277. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  278. package/dist/typescript/module/src/compiler/declarations.d.ts +2 -1
  279. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  280. package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
  281. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  282. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  283. package/dist/typescript/module/src/compiler/stylesheet.d.ts +1 -0
  284. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  285. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
  286. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  287. package/dist/typescript/module/src/components/Button.d.ts +2 -4
  288. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  289. package/dist/typescript/module/src/components/FlatList.d.ts +3 -3
  290. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  291. package/dist/typescript/module/src/components/Image.d.ts +2 -4
  292. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  293. package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
  294. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  295. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
  296. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  297. package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
  298. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
  299. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  300. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  301. package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
  302. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
  303. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  304. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  305. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  306. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  307. package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
  308. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  309. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
  310. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
  311. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
  312. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
  313. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
  314. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  315. package/dist/typescript/module/src/components/View.d.ts +2 -6
  316. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  317. package/dist/typescript/module/src/components/VirtualizedList.d.ts +3 -3
  318. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
  319. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  320. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  321. package/dist/typescript/module/src/components/index.d.cts +2 -0
  322. package/dist/typescript/module/src/components/index.d.cts.map +1 -0
  323. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  324. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  325. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  326. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  327. package/dist/typescript/module/src/metro/override.d.ts +2 -0
  328. package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
  329. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  330. package/dist/typescript/module/src/native/api.d.ts +2 -2
  331. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  332. package/dist/typescript/module/src/native/index.d.ts +1 -1
  333. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  334. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +1 -1
  335. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  336. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
  337. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
  338. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  339. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  340. package/dist/typescript/module/src/native/styles/functions/index.d.ts +1 -0
  341. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  342. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  343. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  344. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  345. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
  346. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  347. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  348. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +1 -1
  349. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  350. package/dist/typescript/module/src/web/api.d.ts +2 -2
  351. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  352. package/package.json +27 -14
  353. package/src/compiler/atRules.ts +16 -10
  354. package/src/compiler/compiler.ts +76 -2
  355. package/src/compiler/declarations.ts +106 -10
  356. package/src/compiler/keyframes.ts +2 -2
  357. package/src/compiler/lightningcss-loader.ts +20 -1
  358. package/src/compiler/stylesheet.ts +9 -5
  359. package/src/compiler/supports.ts +2 -2
  360. package/src/components/ActivityIndicator.tsx +9 -6
  361. package/src/components/Button.tsx +9 -4
  362. package/src/components/FlatList.tsx +14 -5
  363. package/src/components/Image.tsx +9 -4
  364. package/src/components/ImageBackground.tsx +9 -6
  365. package/src/components/KeyboardAvoidingView.tsx +9 -6
  366. package/src/components/Pressable.tsx +9 -4
  367. package/src/components/SafeAreaProvider.tsx +1 -0
  368. package/src/components/ScrollView.tsx +9 -6
  369. package/src/components/Switch.tsx +9 -4
  370. package/src/components/Text.tsx +9 -4
  371. package/src/components/TextInput.tsx +9 -4
  372. package/src/components/TouchableHighlight.tsx +9 -6
  373. package/src/components/TouchableOpacity.tsx +9 -6
  374. package/src/components/TouchableWithoutFeedback.tsx +9 -6
  375. package/src/components/View.tsx +9 -4
  376. package/src/components/VirtualizedList.tsx +18 -6
  377. package/src/components/copyComponentProperties.ts +21 -0
  378. package/src/components/index.cts +263 -0
  379. package/src/components/{index.tsx → index.ts} +0 -1
  380. package/src/jest/index.ts +2 -1
  381. package/src/metro/index.ts +8 -166
  382. package/src/metro/metro-transformer.ts +15 -1
  383. package/src/metro/override.ts +1 -0
  384. package/src/metro/resolver.ts +29 -28
  385. package/src/native/api.tsx +6 -2
  386. package/src/native/index.ts +1 -2
  387. package/src/native/react/useNativeCss.ts +13 -6
  388. package/src/native/styles/calculate-props.ts +1 -1
  389. package/src/native/styles/functions/color-mix.ts +68 -0
  390. package/src/native/styles/functions/index.ts +1 -0
  391. package/src/native/styles/index.ts +302 -26
  392. package/src/native/styles/resolve.ts +0 -1
  393. package/src/native/styles/shorthands/_handler.ts +14 -1
  394. package/src/native/styles/shorthands/animation.ts +10 -2
  395. package/src/native/styles/shorthands/box-shadow.ts +50 -15
  396. package/src/utilities/dot-notation.types.ts +10 -3
  397. package/src/web/api.tsx +10 -5
  398. package/types.d.ts +3 -0
  399. package/dist/commonjs/poison.pill.js.map +0 -1
  400. package/dist/commonjs/runtime/native/injection.js +0 -2
  401. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  402. package/dist/module/native/metro.js +0 -5
  403. package/dist/module/poison.pill.js.map +0 -1
  404. package/dist/module/runtime/native/injection.js +0 -2
  405. package/dist/module/runtime/native/injection.js.map +0 -1
  406. package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
  407. package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
  408. package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
  409. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
  410. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
  411. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  412. package/dist/typescript/module/src/native/metro.d.ts +0 -2
  413. package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
  414. package/dist/typescript/module/src/poison.pill.d.ts +0 -2
  415. package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
  416. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
  417. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  418. package/src/native/metro.ts +0 -2
  419. package/src/runtime/native/injection.ts +0 -0
  420. /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
@@ -24,45 +24,39 @@ export function nativeResolver(
24
24
  platform: string | null,
25
25
  ): Resolution {
26
26
  const resolution = resolver(context, moduleName, platform);
27
+ const isInternal = isFromThisModule(context.originModulePath);
28
+ const isReactNativeIndex = context.originModulePath.endsWith(
29
+ `${sep}react-native${sep}index.js`,
30
+ );
27
31
 
28
- if (
29
- // Don't include our internal files
30
- isFromThisModule(context.originModulePath) ||
31
- // Only operate on source files
32
- resolution.type !== "sourceFile" ||
33
- // Skip the React Native barrel file to prevent infinite recursion
34
- context.originModulePath.endsWith("react-native/index.js") ||
35
- // Skip anything that isn't importing a React Native component
36
- !(
37
- moduleName.startsWith("react-native") ||
38
- moduleName.startsWith("react-native/")
39
- )
40
- ) {
32
+ if (isInternal || resolution.type !== "sourceFile" || isReactNativeIndex) {
41
33
  return resolution;
42
34
  }
43
35
 
44
36
  if (moduleName === "react-native") {
45
37
  return resolver(context, `react-native-css/components`, platform);
46
- }
47
-
48
- if (moduleName === "react-native-safe-area-context") {
38
+ } else if (moduleName === "react-native-safe-area-context") {
49
39
  return resolver(
50
40
  context,
51
41
  `react-native-css/components/react-native-safe-area-context`,
52
42
  platform,
53
43
  );
44
+ } else if (
45
+ resolution.filePath.includes(`${sep}react-native${sep}Libraries${sep}`)
46
+ ) {
47
+ const filename = basename(resolution.filePath.split(sep).at(-1) ?? "");
48
+ const module = filename.split(".").at(0);
49
+
50
+ if (module && allowedModules.has(module)) {
51
+ return resolver(
52
+ context,
53
+ `react-native-css/components/${module}`,
54
+ platform,
55
+ );
56
+ }
54
57
  }
55
58
 
56
- // We only care about `react-native/Library/Components/<module>.js` components
57
- const segments = resolution.filePath.split(sep);
58
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
59
- const module = basename(segments.at(-1)!).split(".")[0];
60
-
61
- if (!module || !allowedModules.has(module)) {
62
- return resolution;
63
- }
64
-
65
- return resolver(context, `react-native-css/components/${module}`, platform);
59
+ return resolution;
66
60
  }
67
61
 
68
62
  export function webResolver(
@@ -79,7 +73,9 @@ export function webResolver(
79
73
  // Only operate on source files
80
74
  resolution.type !== "sourceFile" ||
81
75
  // Skip anything that isn't importing from `react-native-web`
82
- !resolution.filePath.includes(`${sep}react-native-web${sep}`)
76
+ !resolution.filePath.includes(`${sep}react-native-web${sep}`) ||
77
+ // Skip internal react-native-web files
78
+ resolution.filePath.includes(`${sep}react-native-web${sep}dist${sep}vendor`)
83
79
  ) {
84
80
  return resolution;
85
81
  }
@@ -89,7 +85,12 @@ export function webResolver(
89
85
  const isIndex = segments.at(-1)?.startsWith("index.");
90
86
  const module = segments.at(-2);
91
87
 
92
- if (!isIndex || !module || !allowedModules.has(module)) {
88
+ if (
89
+ !isIndex ||
90
+ !module ||
91
+ !allowedModules.has(module) ||
92
+ module === "VirtualizedList"
93
+ ) {
93
94
  return resolution;
94
95
  }
95
96
 
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- import { useContext, useState } from "react";
2
+ import { useContext, useState, type ComponentType } from "react";
3
3
  import { Appearance } from "react-native";
4
4
 
5
5
  import type { StyleDescriptor } from "react-native-css/compiler";
@@ -30,6 +30,10 @@ export {
30
30
 
31
31
  export { useNativeCss };
32
32
 
33
+ const defaultMapping: StyledConfiguration<ComponentType<{ style: unknown }>> = {
34
+ className: "style",
35
+ };
36
+
33
37
  /**
34
38
  * Generates a new Higher-Order component the wraps the base component and applies the styles.
35
39
  * This is added to the `interopComponents` map so that it can be used in the `wrapJSX` function
@@ -41,7 +45,7 @@ export const styled = <
41
45
  const M extends StyledConfiguration<C>,
42
46
  >(
43
47
  baseComponent: C,
44
- mapping: M,
48
+ mapping: M = defaultMapping as M,
45
49
  options?: StyledOptions,
46
50
  ) => {
47
51
  let component: any;
@@ -1,4 +1,3 @@
1
- export * from "./metro";
2
-
3
1
  export * from "./api";
4
2
  export type * from "../runtime.types";
3
+ export * from "./react-native-css-metro-override";
@@ -172,29 +172,36 @@ export function useNativeCss(
172
172
  export function mappingToConfig(mapping: StyledConfiguration<any>) {
173
173
  return Object.entries(mapping).flatMap(([key, value]): Config => {
174
174
  if (value === true) {
175
- return { source: key, target: key };
175
+ return {
176
+ source: key,
177
+ target: key,
178
+ };
176
179
  } else if (value === false) {
177
180
  return { source: key, target: false };
178
181
  } else if (typeof value === "string") {
179
182
  return { source: key, target: value.split(".") };
180
183
  } else if (typeof value === "object") {
184
+ const nativeStyleMapping = value.nativeStyleMapping as
185
+ | Record<string, string>
186
+ | undefined;
187
+
181
188
  if (Array.isArray(value)) {
182
- return { source: key, target: value };
189
+ return { source: key, target: value, nativeStyleMapping };
183
190
  }
184
191
 
185
192
  if ("target" in value) {
186
193
  if (value.target === false) {
187
- return { source: key, target: false };
194
+ return { source: key, target: false, nativeStyleMapping };
188
195
  } else if (typeof value.target === "string") {
189
196
  const target = value.target.split(".");
190
197
 
191
198
  if (target.length === 1) {
192
- return { source: key, target: target[0]! };
199
+ return { source: key, target: target[0]!, nativeStyleMapping };
193
200
  } else {
194
- return { source: key, target };
201
+ return { source: key, target, nativeStyleMapping };
195
202
  }
196
203
  } else if (Array.isArray(value.target)) {
197
- return { source: key, target: value.target };
204
+ return { source: key, target: value.target, nativeStyleMapping };
198
205
  }
199
206
  }
200
207
  }
@@ -129,7 +129,7 @@ export function applyDeclarations(
129
129
  const final = rest.pop();
130
130
 
131
131
  if (final) {
132
- if (first !== "*") {
132
+ if (first !== "&") {
133
133
  topLevelTarget[first] ??= {};
134
134
  target = topLevelTarget[first];
135
135
  }
@@ -0,0 +1,68 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
2
+ import type { PlainColorObject } from "colorjs.io";
3
+ import {
4
+ ColorSpace,
5
+ to as convert,
6
+ mix,
7
+ OKLab,
8
+ P3,
9
+ parse,
10
+ sRGB,
11
+ type ColorConstructor,
12
+ } from "colorjs.io/fn";
13
+
14
+ import type { StyleFunctionResolver } from "../resolve";
15
+
16
+ ColorSpace.register(sRGB);
17
+ ColorSpace.register(P3);
18
+ ColorSpace.register(OKLab);
19
+
20
+ export const colorMix: StyleFunctionResolver = (resolveValue, value) => {
21
+ const args = resolveValue(value[2]);
22
+
23
+ if (!Array.isArray(args) || args.length < 3) {
24
+ return;
25
+ }
26
+
27
+ try {
28
+ const space = args.shift();
29
+
30
+ let left: ColorConstructor | PlainColorObject = parse(
31
+ args.shift() as string,
32
+ );
33
+
34
+ let next = args.shift();
35
+
36
+ if (typeof next === "string" && next.endsWith("%")) {
37
+ left.alpha = parseFloat(next) / 100;
38
+ next = args.shift();
39
+ }
40
+
41
+ if (next === undefined) {
42
+ if (left.spaceId !== "srgb") {
43
+ left = convert(left, "srgb");
44
+ }
45
+
46
+ return `rgba(${(left.coords[0] ?? 0) * 255}, ${(left.coords[1] ?? 0) * 255}, ${(left.coords[2] ?? 0) * 255}, ${left.alpha})`;
47
+ }
48
+
49
+ if (typeof next !== "string") {
50
+ return;
51
+ }
52
+ const right = parse(next);
53
+
54
+ next = args.shift();
55
+ if (next && typeof next === "string" && next.endsWith("%")) {
56
+ right.alpha = parseFloat(next) / 100;
57
+ }
58
+
59
+ const result = mix(left, right, {
60
+ space,
61
+ outputSpace: "srgb",
62
+ });
63
+
64
+ return `rgba(${(result.coords[0] ?? 0) * 255}, ${(result.coords[1] ?? 0) * 255}, ${(result.coords[2] ?? 0) * 255}, ${result.alpha})`;
65
+ } catch {
66
+ return;
67
+ }
68
+ };
@@ -5,3 +5,4 @@ export * from "./numeric-functions";
5
5
  export * from "./platform-functions";
6
6
  export * from "./string-functions";
7
7
  export * from "./transform-functions";
8
+ export * from "./color-mix";
@@ -17,6 +17,149 @@ import {
17
17
  } from "../reactivity";
18
18
  import { calculateProps } from "./calculate-props";
19
19
 
20
+ /**
21
+ * Checks if the left style object has any properties that are not present in the right style object.
22
+ * This is used to determine if styles need to be preserved in an array or if right can completely override left.
23
+ *
24
+ * Note: This intentionally only checks one direction (left → right). We don't need to check if right has
25
+ * properties that left doesn't have, because right will always be applied/merged. The question we're
26
+ * answering is: "Does left have any properties that would be lost if we just used right?" If yes, we
27
+ * create a style array [left, right] to preserve both. If no, right can safely replace left entirely.
28
+ *
29
+ * @param left - The left style object to check
30
+ * @param right - The right style object to compare against
31
+ * @returns true if left has at least one property key that doesn't exist in right, false otherwise
32
+ *
33
+ * @example
34
+ * hasNonOverlappingProperties({color: 'red', fontSize: 12}, {color: 'blue'}) // true - fontSize is not in right
35
+ * hasNonOverlappingProperties({color: 'red'}, {color: 'blue', fontSize: 12}) // false - all left keys exist in right
36
+ */
37
+ function hasNonOverlappingProperties(
38
+ left: Record<string, any>,
39
+ right: Record<string, any>,
40
+ ): boolean {
41
+ // Null safety check
42
+ if (!left || !right) {
43
+ return false;
44
+ }
45
+
46
+ // Only check own properties to avoid prototype pollution
47
+ for (const key in left) {
48
+ if (Object.prototype.hasOwnProperty.call(left, key)) {
49
+ if (!Object.prototype.hasOwnProperty.call(right, key)) {
50
+ return true;
51
+ }
52
+ }
53
+ }
54
+ return false;
55
+ }
56
+
57
+ /**
58
+ * Flattens a style array into a single object when possible, with rightmost values taking precedence.
59
+ * Returns the original array if it contains any non-plain objects, arrays, or CSS variable objects.
60
+ *
61
+ * Note: This function assumes the input array has already been filtered (e.g., by filterCssVariables),
62
+ * so empty arrays should not reach this function. If they do, they will be treated as non-flattenable.
63
+ *
64
+ * @param styleArray - The style array to potentially flatten
65
+ * @returns A single merged object if all items are plain objects, otherwise the original array
66
+ */
67
+ function flattenStyleArray(styleArray: any[]): any {
68
+ // Check if we can flatten to a single object (all items are plain objects)
69
+ for (const item of styleArray) {
70
+ // Use explicit null check instead of !item to allow falsy values like 0 or false
71
+ if (
72
+ item == null ||
73
+ typeof item !== "object" ||
74
+ Array.isArray(item) ||
75
+ Object.prototype.hasOwnProperty.call(item, VAR_SYMBOL)
76
+ ) {
77
+ return styleArray;
78
+ }
79
+ }
80
+
81
+ // Use reduce to avoid spread operator performance issues with large arrays
82
+ return styleArray.reduce((acc, item) => Object.assign(acc, item), {});
83
+ }
84
+
85
+ /**
86
+ * Recursively filters out CSS variable objects (with VAR_SYMBOL) from style values.
87
+ * This prevents CSS variable runtime objects from leaking into React Native component props.
88
+ *
89
+ * @param value - The value to filter (can be any type: object, array, primitive, etc.)
90
+ * @param depth - Internal recursion depth counter to prevent stack overflow (max 100)
91
+ * @returns The filtered value with CSS variables removed, or `undefined` if the entire value
92
+ * should be filtered out (e.g., empty arrays, objects with only VAR_SYMBOL properties)
93
+ *
94
+ * Filtering behavior:
95
+ * - Objects with VAR_SYMBOL property: returns `undefined` (completely filtered)
96
+ * - Arrays: filters out VAR_SYMBOL objects, returns `undefined` if empty after filtering
97
+ * - Objects: recursively filters properties, returns `undefined` if no properties remain
98
+ * - Primitives (null, undefined, numbers, strings, booleans): returned as-is
99
+ * - Symbol properties: intentionally filtered out for React Native compatibility
100
+ *
101
+ * @example
102
+ * filterCssVariables({fontSize: 16, color: {[VAR_SYMBOL]: true}}) // {fontSize: 16}
103
+ * filterCssVariables([{margin: 10}, {[VAR_SYMBOL]: true}]) // [{margin: 10}]
104
+ * filterCssVariables({color: {[VAR_SYMBOL]: true}}) // undefined (all props filtered)
105
+ */
106
+ function filterCssVariables(value: any, depth = 0): any | undefined {
107
+ // Prevent stack overflow on deeply nested structures
108
+ if (depth > 100) {
109
+ return value;
110
+ }
111
+
112
+ if (value === null || value === undefined) {
113
+ return value;
114
+ }
115
+
116
+ if (Array.isArray(value)) {
117
+ // Single-pass filter with map operation
118
+ const filtered: any[] = [];
119
+
120
+ for (const item of value) {
121
+ const filteredItem = filterCssVariables(item, depth + 1);
122
+ if (
123
+ filteredItem !== undefined &&
124
+ !(
125
+ typeof filteredItem === "object" &&
126
+ filteredItem !== null &&
127
+ Object.prototype.hasOwnProperty.call(filteredItem, VAR_SYMBOL)
128
+ )
129
+ ) {
130
+ filtered.push(filteredItem);
131
+ }
132
+ }
133
+
134
+ return filtered.length > 0 ? filtered : undefined;
135
+ }
136
+
137
+ if (typeof value === "object") {
138
+ // If the object itself has VAR_SYMBOL, filter it out (check own property only)
139
+ if (Object.prototype.hasOwnProperty.call(value, VAR_SYMBOL)) {
140
+ return undefined;
141
+ }
142
+
143
+ // Otherwise, filter VAR_SYMBOL properties from nested objects
144
+ const filtered: Record<string, any> = {};
145
+ let hasProperties = false;
146
+
147
+ // Use Object.keys to only iterate own string properties (not inherited, not Symbols)
148
+ // This intentionally filters out Symbol properties for React Native compatibility
149
+ for (const key of Object.keys(value)) {
150
+ const filteredValue = filterCssVariables(value[key], depth + 1);
151
+ if (filteredValue !== undefined) {
152
+ filtered[key] = filteredValue;
153
+ hasProperties = true;
154
+ }
155
+ }
156
+
157
+ return hasProperties ? filtered : undefined;
158
+ }
159
+
160
+ return value;
161
+ }
162
+
20
163
  export const stylesFamily = family(
21
164
  (
22
165
  hash: string,
@@ -49,10 +192,19 @@ export function getStyledProps(
49
192
  const styledProps = state.stylesObs?.get(state.styleEffect);
50
193
 
51
194
  for (const config of state.configs) {
52
- result = deepMergeConfig(config, styledProps?.normal, inline, true);
195
+ result = deepMergeConfig(
196
+ config,
197
+ nativeStyleMapping(config, styledProps?.normal),
198
+ inline,
199
+ true,
200
+ );
53
201
 
54
202
  if (styledProps?.important) {
55
- result = deepMergeConfig(config, result, styledProps.important);
203
+ result = deepMergeConfig(
204
+ config,
205
+ result,
206
+ nativeStyleMapping(config, styledProps.important),
207
+ );
56
208
  }
57
209
 
58
210
  // Apply the handlers
@@ -122,11 +274,96 @@ function deepMergeConfig(
122
274
  right: Record<string, any> | undefined | null,
123
275
  rightIsInline = false,
124
276
  ) {
125
- if (!config.target || !right) {
277
+ if (!right) {
126
278
  return { ...left };
127
279
  }
128
280
 
129
- let result = Object.assign({}, left, right);
281
+ // Handle style merging to support both className and inline style props
282
+ let result: Record<string, any>;
283
+ if (config.target) {
284
+ if (
285
+ Array.isArray(config.target) &&
286
+ config.target.length === 1 &&
287
+ config.target[0] === "style"
288
+ ) {
289
+ // Special handling for style target when we have inline styles
290
+ result = { ...left, ...right };
291
+
292
+ // Handle null/undefined inline styles
293
+ if (right?.style === null || right?.style === undefined) {
294
+ if (left?.style) {
295
+ result.style = left.style;
296
+ }
297
+ } else if (rightIsInline && right?.style) {
298
+ // Filter inline styles if rightIsInline is true
299
+ const filteredRightStyle = filterCssVariables(right.style);
300
+
301
+ if (left?.style) {
302
+ if (!filteredRightStyle) {
303
+ // All inline styles were CSS variables, only use left
304
+ result.style = left.style;
305
+ } else {
306
+ const leftStyle = left.style;
307
+
308
+ // For arrays or objects, check if we need to create a style array
309
+ const leftIsObject =
310
+ typeof leftStyle === "object" && !Array.isArray(leftStyle);
311
+ const rightIsObject =
312
+ typeof filteredRightStyle === "object" &&
313
+ !Array.isArray(filteredRightStyle);
314
+
315
+ if (leftIsObject && rightIsObject) {
316
+ if (hasNonOverlappingProperties(leftStyle, filteredRightStyle)) {
317
+ result.style = [leftStyle, filteredRightStyle];
318
+ } else {
319
+ // All left properties are in right, right overrides
320
+ result.style = filteredRightStyle;
321
+ }
322
+ } else {
323
+ // One or both are arrays, merge them
324
+ result.style = [leftStyle, filteredRightStyle];
325
+ }
326
+ }
327
+ } else {
328
+ // No left style, just use filtered right
329
+ if (filteredRightStyle) {
330
+ result.style = filteredRightStyle;
331
+ } else {
332
+ // All filtered out, remove style prop
333
+ delete result.style;
334
+ }
335
+ }
336
+ } else if (!rightIsInline && right?.style) {
337
+ // Merging non-inline styles (e.g., important styles)
338
+ if (left?.style) {
339
+ // If left.style is an array, append right.style
340
+ if (Array.isArray(left.style)) {
341
+ const combined = [...left.style, right.style];
342
+ result.style = flattenStyleArray(combined);
343
+ } else if (
344
+ typeof left.style === "object" &&
345
+ typeof right.style === "object"
346
+ ) {
347
+ // Both are objects, check for overlaps
348
+ if (hasNonOverlappingProperties(left.style, right.style)) {
349
+ result.style = flattenStyleArray([left.style, right.style]);
350
+ } else {
351
+ // All left properties are overridden by right
352
+ result.style = right.style;
353
+ }
354
+ } else {
355
+ // One or both are arrays/mixed types
356
+ const combined = [left.style, right.style];
357
+ result.style = flattenStyleArray(combined);
358
+ }
359
+ }
360
+ }
361
+ } else {
362
+ result = Object.assign({}, left, right);
363
+ }
364
+ } else {
365
+ result = Object.assign({}, left, right);
366
+ }
130
367
 
131
368
  if (
132
369
  right &&
@@ -140,7 +377,7 @@ function deepMergeConfig(
140
377
  /**
141
378
  * If target is a path, deep merge until we get to the last key
142
379
  */
143
- if (Array.isArray(config.target) && config.target.length > 1) {
380
+ if (Array.isArray(config.target)) {
144
381
  for (let i = 0; i < config.target.length - 1; i++) {
145
382
  const key = config.target[i];
146
383
 
@@ -159,34 +396,17 @@ function deepMergeConfig(
159
396
  return result;
160
397
  }
161
398
 
162
- const target = Array.isArray(config.target)
163
- ? config.target[0]
164
- : config.target;
399
+ const target = config.target;
165
400
 
166
- if (target === undefined) {
401
+ if (target === undefined || target === false) {
167
402
  return result;
168
403
  }
169
404
 
170
405
  let rightValue = right?.[target];
171
406
 
172
407
  // Strip any inline variables from the target
173
- if (rightIsInline && rightValue) {
174
- if (Array.isArray(rightValue)) {
175
- rightValue = rightValue.filter((v) => {
176
- return typeof v !== "object" || !(v && VAR_SYMBOL in v);
177
- });
178
-
179
- if (rightValue.length === 0) {
180
- rightValue = undefined;
181
- }
182
- } else if (
183
- typeof rightValue === "object" &&
184
- rightValue &&
185
- VAR_SYMBOL in rightValue
186
- ) {
187
- rightValue = undefined;
188
- delete result[target][VAR_SYMBOL];
189
- }
408
+ if (rightIsInline && rightValue !== undefined) {
409
+ rightValue = filterCssVariables(rightValue);
190
410
  }
191
411
 
192
412
  if (rightValue !== undefined) {
@@ -196,3 +416,59 @@ function deepMergeConfig(
196
416
 
197
417
  return result;
198
418
  }
419
+
420
+ function nativeStyleMapping(
421
+ config: Config,
422
+ props: Record<string, any> | undefined,
423
+ ) {
424
+ if (!config.nativeStyleMapping || !props) {
425
+ return props;
426
+ }
427
+
428
+ let source: Record<string, any> | undefined;
429
+
430
+ if (typeof config.target === "string") {
431
+ source = props[config.target];
432
+ } else if (config.target === false) {
433
+ source = props["style"];
434
+ } else {
435
+ const tokens = [...config.target];
436
+ const lastToken = tokens.pop()!;
437
+
438
+ source = props;
439
+ for (const token of tokens) {
440
+ source = source[token];
441
+ if (!source) {
442
+ return props;
443
+ }
444
+ }
445
+
446
+ source = source[lastToken];
447
+ }
448
+
449
+ if (!source) {
450
+ return props;
451
+ }
452
+
453
+ for (const [key, path] of Object.entries(config.nativeStyleMapping)) {
454
+ const styleValue = source[key];
455
+
456
+ delete source[key];
457
+
458
+ if (styleValue === undefined) {
459
+ continue;
460
+ }
461
+
462
+ let target = props;
463
+ const tokens = path.split(".");
464
+ const lastToken = tokens.pop();
465
+ for (const token of tokens) {
466
+ target[token] ??= {};
467
+ target = target[token];
468
+ }
469
+
470
+ target[lastToken!] = styleValue;
471
+ }
472
+
473
+ return props;
474
+ }
@@ -38,7 +38,6 @@ export type StyleResolver = (
38
38
  const functionResolvers = {
39
39
  ...shorthands,
40
40
  ...functions,
41
- animationName: shorthands.animation,
42
41
  lineHeight,
43
42
  em,
44
43
  rem,
@@ -1,5 +1,8 @@
1
1
  /* eslint-disable */
2
- import { isStyleDescriptorArray } from "react-native-css/utilities";
2
+ import {
3
+ isStyleDescriptorArray,
4
+ isStyleFunction,
5
+ } from "react-native-css/utilities";
3
6
 
4
7
  import { setDeepPath } from "../../objects";
5
8
  import { ShortHandSymbol } from "../constants";
@@ -56,6 +59,16 @@ export function shorthandHandler(
56
59
  return type.includes(value) || type.includes(typeof value);
57
60
  }
58
61
 
62
+ // Style functions (var, calc, env, etc.) are unresolved at pattern-match
63
+ // time — their actual values won't be known until runtime variable
64
+ // resolution. Accepting them in any type slot makes pattern matching
65
+ // less strict when variables are involved, but rejecting them would
66
+ // break variable-based shadows entirely (e.g. box-shadow: var(--shadow)
67
+ // where --shadow resolves to "0 4px 6px -1px #000").
68
+ if (isStyleFunction(value)) {
69
+ return true;
70
+ }
71
+
59
72
  switch (type) {
60
73
  case "string":
61
74
  case "number":
@@ -76,8 +76,6 @@ export const animation: StyleFunctionResolver = (
76
76
  return;
77
77
  }
78
78
 
79
- animationShortHandTuples.pop();
80
-
81
79
  const nameTuple = animationShortHandTuples.find(
82
80
  (tuple) => tuple[1] === "animationName",
83
81
  );
@@ -121,3 +119,13 @@ export const animation: StyleFunctionResolver = (
121
119
 
122
120
  return applyShorthand(animationShortHandTuples);
123
121
  };
122
+
123
+ export const animationName: StyleFunctionResolver = (
124
+ resolveValue,
125
+ value,
126
+ get,
127
+ options,
128
+ ) => {
129
+ const shorthand: any = animation(resolveValue, value, get, options);
130
+ return shorthand.animationName;
131
+ };