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
@@ -7,6 +7,8 @@ import {
7
7
  type MediaQuery as CSSMediaQuery,
8
8
  type CustomAtRules,
9
9
  type MediaRule,
10
+ type ParsedComponent,
11
+ type PropertyRule,
10
12
  type Rule,
11
13
  type Visitor,
12
14
  } from "lightningcss";
@@ -15,11 +17,19 @@ import { maybeMutateReactNativeOptions, parsePropAtRule } from "./atRules";
15
17
  import type {
16
18
  CompilerOptions,
17
19
  ContainerQuery,
20
+ StyleDescriptor,
18
21
  StyleRuleMapping,
19
22
  UniqueVarInfo,
20
23
  } from "./compiler.types";
21
24
  import { parseContainerCondition } from "./container-query";
22
- import { parseDeclaration, round } from "./declarations";
25
+ import {
26
+ parseAngle,
27
+ parseColor,
28
+ parseDeclaration,
29
+ parseLength,
30
+ reduceParseUnparsed,
31
+ round,
32
+ } from "./declarations";
23
33
  import { inlineVariables } from "./inline-variables";
24
34
  import { extractKeyFrames } from "./keyframes";
25
35
  import { lightningcssLoader } from "./lightningcss-loader";
@@ -276,13 +286,15 @@ function extractRule(
276
286
  }
277
287
  }
278
288
  break;
289
+ case "property":
290
+ extractPropertyRule(rule.value, builder);
291
+ break;
279
292
  case "custom":
280
293
  case "font-face":
281
294
  case "font-palette-values":
282
295
  case "font-feature-values":
283
296
  case "namespace":
284
297
  case "layer-statement":
285
- case "property":
286
298
  case "view-transition":
287
299
  case "ignored":
288
300
  case "unknown":
@@ -377,3 +389,65 @@ function extractContainer(
377
389
  extractRule(rule, builder, mapping);
378
390
  }
379
391
  }
392
+
393
+ function extractPropertyRule(
394
+ propertyRule: PropertyRule,
395
+ builder: StylesheetBuilder,
396
+ ) {
397
+ const { initialValue, name } = propertyRule;
398
+
399
+ if (initialValue == null) {
400
+ return;
401
+ }
402
+
403
+ const varName = name.startsWith("--") ? name.slice(2) : name;
404
+ const value = parsePropertyInitialValue(initialValue, builder);
405
+
406
+ if (value !== undefined) {
407
+ builder.addRootVariable(varName, value);
408
+ }
409
+ }
410
+
411
+ function parsePropertyInitialValue(
412
+ component: ParsedComponent,
413
+ builder: StylesheetBuilder,
414
+ ): StyleDescriptor {
415
+ switch (component.type) {
416
+ case "length":
417
+ return parseLength(component.value, builder);
418
+ case "number":
419
+ case "integer":
420
+ return round(component.value);
421
+ case "percentage":
422
+ return `${round(component.value * 100)}%`;
423
+ case "color":
424
+ return parseColor(component.value, builder);
425
+ case "angle":
426
+ return parseAngle(component.value, builder);
427
+ case "length-percentage":
428
+ return parseLength(component.value, builder);
429
+ case "token-list":
430
+ return reduceParseUnparsed(
431
+ component.value,
432
+ builder,
433
+ "@property",
434
+ false,
435
+ );
436
+ case "custom-ident":
437
+ case "literal":
438
+ return component.value;
439
+ case "repeated": {
440
+ const results = component.value.components
441
+ .map((c) => parsePropertyInitialValue(c, builder))
442
+ .filter(
443
+ (v): v is NonNullable<StyleDescriptor> => v !== undefined,
444
+ );
445
+ // Unwrap single-child repeated values so downstream consumers get a
446
+ // scalar instead of a 1-element array. For example, `<length>+` with
447
+ // initial-value `10px` should produce the same shape as `<length>`.
448
+ return results.length === 1 ? results[0] : results;
449
+ }
450
+ default:
451
+ return undefined;
452
+ }
453
+ }
@@ -1228,6 +1228,8 @@ export function parseUnparsed(
1228
1228
  builder,
1229
1229
  property,
1230
1230
  );
1231
+ case "color-mix":
1232
+ return parseColorMix(tokenOrValue.value.arguments, builder, property);
1231
1233
  default: {
1232
1234
  builder.addWarning("value", `${tokenOrValue.value.name}()`);
1233
1235
  return;
@@ -1984,11 +1986,11 @@ export function parseTextShadow(
1984
1986
  parseColor(textShadow.color, builder),
1985
1987
  );
1986
1988
  builder.addDescriptor(
1987
- "*.textShadowOffset.width",
1989
+ "&.textShadowOffset.width",
1988
1990
  parseLength(textShadow.xOffset, builder),
1989
1991
  );
1990
1992
  builder.addDescriptor(
1991
- "*.textShadowOffset.height",
1993
+ "&.textShadowOffset.height",
1992
1994
  parseLength(textShadow.yOffset, builder),
1993
1995
  );
1994
1996
  builder.addDescriptor(
@@ -2374,27 +2376,27 @@ export function parseBoxShadow(
2374
2376
  ) {
2375
2377
  for (const [index, shadow] of value.entries()) {
2376
2378
  builder.addDescriptor(
2377
- `*.boxShadow.[${index}].color`,
2379
+ `&.boxShadow.[${index}].color`,
2378
2380
  parseColor(shadow.color, builder),
2379
2381
  );
2380
2382
  builder.addDescriptor(
2381
- `*.boxShadow.[${index}].offsetX`,
2383
+ `&.boxShadow.[${index}].offsetX`,
2382
2384
  parseLength(shadow.xOffset, builder),
2383
2385
  );
2384
2386
  builder.addDescriptor(
2385
- `*.boxShadow.[${index}].offsetY`,
2387
+ `&.boxShadow.[${index}].offsetY`,
2386
2388
  parseLength(shadow.yOffset, builder),
2387
2389
  );
2388
2390
  builder.addDescriptor(
2389
- `*.boxShadow.[${index}].blurRadius`,
2391
+ `&.boxShadow.[${index}].blurRadius`,
2390
2392
  parseLength(shadow.blur, builder),
2391
2393
  );
2392
2394
  builder.addDescriptor(
2393
- `*.boxShadow.[${index}].spreadDistance`,
2395
+ `&.boxShadow.[${index}].spreadDistance`,
2394
2396
  parseLength(shadow.spread, builder),
2395
2397
  );
2396
2398
  builder.addDescriptor(
2397
- `*.boxShadow.[${index}].inset`,
2399
+ `&.boxShadow.[${index}].inset`,
2398
2400
  shadow.inset ? true : undefined,
2399
2401
  );
2400
2402
  }
@@ -2633,6 +2635,100 @@ export function parseCalcFn(
2633
2635
  return;
2634
2636
  }
2635
2637
 
2638
+ export function parseColorMix(
2639
+ tokens: TokenOrValue[],
2640
+ builder: StylesheetBuilder,
2641
+ property: string,
2642
+ ): StyleDescriptor {
2643
+ const [inToken, whitespace, colorSpace, comma, ...rest] = tokens;
2644
+ if (
2645
+ typeof inToken !== "object" ||
2646
+ inToken.type !== "token" ||
2647
+ inToken.value.type !== "ident" ||
2648
+ inToken.value.value !== "in"
2649
+ ) {
2650
+ return;
2651
+ }
2652
+
2653
+ if (
2654
+ typeof whitespace !== "object" ||
2655
+ whitespace.type !== "token" ||
2656
+ whitespace.value.type !== "white-space"
2657
+ ) {
2658
+ return;
2659
+ }
2660
+
2661
+ if (
2662
+ typeof comma !== "object" ||
2663
+ comma.type !== "token" ||
2664
+ comma.value.type !== "comma"
2665
+ ) {
2666
+ return;
2667
+ }
2668
+
2669
+ const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
2670
+ if (typeof colorSpaceArg !== "string") {
2671
+ return;
2672
+ }
2673
+
2674
+ let nextToken = rest.shift();
2675
+
2676
+ const leftColorArg = parseUnparsed(nextToken, builder, property);
2677
+
2678
+ if (!leftColorArg) {
2679
+ return;
2680
+ }
2681
+
2682
+ nextToken = rest.shift();
2683
+
2684
+ let leftColorPercentage: StyleDescriptor | undefined;
2685
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2686
+ leftColorPercentage = parseUnparsed(nextToken, builder, property);
2687
+ nextToken = rest.shift();
2688
+ }
2689
+
2690
+ if (
2691
+ typeof nextToken !== "object" ||
2692
+ nextToken.type !== "token" ||
2693
+ nextToken.value.type !== "comma"
2694
+ ) {
2695
+ return;
2696
+ }
2697
+
2698
+ nextToken = rest.shift();
2699
+
2700
+ const rightColorArg = parseUnparsed(nextToken, builder, property);
2701
+
2702
+ if (rightColorArg === "transparent") {
2703
+ // Ignore the rest, treat as single color with alpha
2704
+ return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage]];
2705
+ }
2706
+
2707
+ nextToken = rest.shift();
2708
+ let rightColorPercentage: StyleDescriptor | undefined;
2709
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2710
+ rightColorPercentage = parseUnparsed(nextToken, builder, property);
2711
+ nextToken = rest.shift();
2712
+ }
2713
+
2714
+ // We should have expired all tokens now
2715
+ if (nextToken) {
2716
+ return;
2717
+ }
2718
+
2719
+ return [
2720
+ {},
2721
+ "colorMix",
2722
+ [
2723
+ colorSpaceArg,
2724
+ leftColorArg,
2725
+ leftColorPercentage,
2726
+ rightColorArg,
2727
+ rightColorPercentage,
2728
+ ],
2729
+ ];
2730
+ }
2731
+
2636
2732
  export function parseCalcArguments(
2637
2733
  [...args]: TokenOrValue[],
2638
2734
  builder: StylesheetBuilder,
@@ -3088,7 +3184,7 @@ function parseObjectFit(
3088
3184
  builder: StylesheetBuilder,
3089
3185
  ) {
3090
3186
  builder.addMapping({
3091
- "object-fit": "contentFit",
3187
+ "object-fit": ["contentFit"],
3092
3188
  });
3093
3189
  builder.addDescriptor(
3094
3190
  "object-fit",
@@ -3101,7 +3197,7 @@ function parseObjectPosition(
3101
3197
  builder: StylesheetBuilder,
3102
3198
  ) {
3103
3199
  builder.addMapping({
3104
- "object-position": "contentPosition",
3200
+ "object-position": ["contentPosition"],
3105
3201
  });
3106
3202
  builder.addDescriptor("object-position", [
3107
3203
  {},
@@ -10,9 +10,9 @@ import type { StylesheetBuilder } from "./stylesheet";
10
10
 
11
11
  export function parseIterationCount(
12
12
  value: AnimationIterationCount[],
13
- ): number[] {
13
+ ): (number | "infinite")[] {
14
14
  return value.map((value) => {
15
- return value.type === "infinite" ? -1 : value.value;
15
+ return value.type === "infinite" ? value.type : value.value;
16
16
  });
17
17
  }
18
18
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-require-imports */
1
2
  export function lightningcssLoader() {
2
3
  let lightningcssPath: string | undefined;
3
4
 
@@ -28,11 +29,29 @@ export function lightningcssLoader() {
28
29
  );
29
30
  }
30
31
 
31
- // eslint-disable-next-line @typescript-eslint/no-require-imports
32
32
  const { transform: lightningcss, Features } = require(
33
33
  lightningcssPath,
34
34
  ) as typeof import("lightningcss");
35
35
 
36
+ try {
37
+ const lightningcssPackageJSONPath = require.resolve("../../package.json", {
38
+ paths: [lightningcssPath],
39
+ });
40
+
41
+ const packageJSON = require(lightningcssPackageJSONPath) as Record<
42
+ string,
43
+ unknown
44
+ >;
45
+
46
+ if (packageJSON.version === "1.30.2") {
47
+ throw new Error(
48
+ "[react-native-css] lightningcss version 1.30.2 has a critical bug that breaks compilation. Please pin the version of lightningcss to 1.30.1; or try upgrading.",
49
+ );
50
+ }
51
+ } catch {
52
+ // Intentionally left empty
53
+ }
54
+
36
55
  return {
37
56
  lightningcss,
38
57
  Features,
@@ -56,7 +56,7 @@ export class StylesheetBuilder {
56
56
  private ruleTemplate: StyleRule = {
57
57
  s: [],
58
58
  },
59
- // Any default mapping should be included in the @prop parsing
59
+ // Any default mapping should be included in the @nativeMapping parsing
60
60
  private mapping: StyleRuleMapping = {},
61
61
  public descriptorProperty?: string,
62
62
  private shared: {
@@ -403,12 +403,10 @@ export class StylesheetBuilder {
403
403
  } else {
404
404
  forceTuple = true;
405
405
  }
406
- } else if (propPath) {
407
- forceTuple = true;
408
- } else {
409
- propPath = property;
410
406
  }
411
407
 
408
+ propPath ??= property;
409
+
412
410
  if (forceTuple && !Array.isArray(propPath)) {
413
411
  propPath = [propPath];
414
412
  }
@@ -579,6 +577,12 @@ export class StylesheetBuilder {
579
577
  this.ruleTemplate.cq.push(query);
580
578
  }
581
579
 
580
+ addRootVariable(name: string, value: StyleDescriptor) {
581
+ this.shared.rootVariables ??= {};
582
+ this.shared.rootVariables[name] ??= [];
583
+ this.shared.rootVariables[name].push([value]);
584
+ }
585
+
582
586
  newAnimationFrames(name: string) {
583
587
  this.shared.animations ??= {};
584
588
 
@@ -21,6 +21,6 @@ export function supportsConditionValid(condition: SupportsCondition): boolean {
21
21
  }
22
22
 
23
23
  const declarations: Record<string, string[]> = {
24
- // We don't actually support this, but its needed for Tailwind CSS
25
- "-moz-orient": ["inline"],
24
+ // Special text used by TailwindCSS. We should probably change this to all color-mix
25
+ color: ["color-mix(in lab, red, red)"],
26
26
  };
@@ -7,7 +7,9 @@ import {
7
7
  useCssElement,
8
8
  type StyledConfiguration,
9
9
  type StyledProps,
10
- } from "../runtime";
10
+ } from "react-native-css";
11
+
12
+ import { copyComponentProperties } from "./copyComponentProperties";
11
13
 
12
14
  const mapping: StyledConfiguration<typeof RNActivityIndicator> = {
13
15
  className: {
@@ -18,10 +20,11 @@ const mapping: StyledConfiguration<typeof RNActivityIndicator> = {
18
20
  },
19
21
  };
20
22
 
21
- export function ActivityIndicator(
22
- props: StyledProps<ActivityIndicatorProps, typeof mapping>,
23
- ) {
24
- return useCssElement(RNActivityIndicator, props, mapping);
25
- }
23
+ export const ActivityIndicator = copyComponentProperties(
24
+ RNActivityIndicator,
25
+ (props: StyledProps<ActivityIndicatorProps, typeof mapping>) => {
26
+ return useCssElement(RNActivityIndicator, props, mapping);
27
+ },
28
+ );
26
29
 
27
30
  export default ActivityIndicator;
@@ -4,7 +4,9 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping: StyledConfiguration<typeof RNButton> = {
10
12
  className: {
@@ -15,8 +17,11 @@ const mapping: StyledConfiguration<typeof RNButton> = {
15
17
  },
16
18
  };
17
19
 
18
- export function Button(props: StyledProps<ButtonProps, typeof mapping>) {
19
- return useCssElement(RNButton, props, mapping);
20
- }
20
+ export const Button = copyComponentProperties(
21
+ RNButton,
22
+ (props: StyledProps<ButtonProps, typeof mapping>) => {
23
+ return useCssElement(RNButton, props, mapping);
24
+ },
25
+ );
21
26
 
22
27
  export default Button;
@@ -1,10 +1,13 @@
1
+ import type { ReactNode } from "react";
1
2
  import { FlatList as RNFlatList, type FlatListProps } from "react-native";
2
3
 
3
4
  import {
4
5
  useCssElement,
5
6
  type StyledConfiguration,
6
7
  type StyledProps,
7
- } from "../runtime";
8
+ } from "react-native-css";
9
+
10
+ import { copyComponentProperties } from "./copyComponentProperties";
8
11
 
9
12
  const mapping: StyledConfiguration<typeof RNFlatList> = {
10
13
  ListFooterComponentClassName: "ListFooterComponentStyle",
@@ -13,10 +16,16 @@ const mapping: StyledConfiguration<typeof RNFlatList> = {
13
16
  contentContainerClassName: "contentContainerStyle",
14
17
  };
15
18
 
16
- export function FlatList<ItemT>(
17
- props: StyledProps<FlatListProps<ItemT>, typeof mapping>,
18
- ) {
19
+ export const FlatList = copyComponentProperties(RNFlatList, function <
20
+ ItemT,
21
+ >(props: StyledProps<FlatListProps<ItemT>, typeof mapping>) {
19
22
  return useCssElement(RNFlatList, props, mapping);
20
- }
23
+ }) as unknown as typeof RNFlatList &
24
+ (<ItemT>(
25
+ props: StyledProps<
26
+ FlatListProps<ItemT>,
27
+ StyledConfiguration<typeof RNFlatList>
28
+ >,
29
+ ) => ReactNode);
21
30
 
22
31
  export default FlatList;
@@ -4,14 +4,19 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping: StyledConfiguration<typeof RNImage> = {
10
12
  className: "style",
11
13
  };
12
14
 
13
- export function Image(props: StyledProps<ImageProps, typeof mapping>) {
14
- return useCssElement(RNImage, props, mapping);
15
- }
15
+ export const Image = copyComponentProperties(
16
+ RNImage,
17
+ (props: StyledProps<ImageProps, typeof mapping>) => {
18
+ return useCssElement(RNImage, props, mapping);
19
+ },
20
+ );
16
21
 
17
22
  export default Image;
@@ -7,7 +7,9 @@ import {
7
7
  useCssElement,
8
8
  type StyledConfiguration,
9
9
  type StyledProps,
10
- } from "../runtime";
10
+ } from "react-native-css";
11
+
12
+ import { copyComponentProperties } from "./copyComponentProperties";
11
13
 
12
14
  const mapping: StyledConfiguration<typeof RNImageBackground> = {
13
15
  className: {
@@ -18,10 +20,11 @@ const mapping: StyledConfiguration<typeof RNImageBackground> = {
18
20
  },
19
21
  };
20
22
 
21
- export function ImageBackground(
22
- props: StyledProps<ImageBackgroundProps, typeof mapping>,
23
- ) {
24
- return useCssElement(RNImageBackground, props, mapping);
25
- }
23
+ export const ImageBackground = copyComponentProperties(
24
+ RNImageBackground,
25
+ (props: StyledProps<ImageBackgroundProps, typeof mapping>) => {
26
+ return useCssElement(RNImageBackground, props, mapping);
27
+ },
28
+ );
26
29
 
27
30
  export default ImageBackground;
@@ -7,7 +7,9 @@ import {
7
7
  useCssElement,
8
8
  type StyledConfiguration,
9
9
  type StyledProps,
10
- } from "../runtime";
10
+ } from "react-native-css";
11
+
12
+ import { copyComponentProperties } from "./copyComponentProperties";
11
13
 
12
14
  const mapping: StyledConfiguration<typeof RNKeyboardAvoidingView> = {
13
15
  className: {
@@ -15,10 +17,11 @@ const mapping: StyledConfiguration<typeof RNKeyboardAvoidingView> = {
15
17
  },
16
18
  };
17
19
 
18
- export function KeyboardAvoidingView(
19
- props: StyledProps<KeyboardAvoidingViewProps, typeof mapping>,
20
- ) {
21
- return useCssElement(RNKeyboardAvoidingView, props, mapping);
22
- }
20
+ export const KeyboardAvoidingView = copyComponentProperties(
21
+ RNKeyboardAvoidingView,
22
+ (props: StyledProps<KeyboardAvoidingViewProps, typeof mapping>) => {
23
+ return useCssElement(RNKeyboardAvoidingView, props, mapping);
24
+ },
25
+ );
23
26
 
24
27
  export default KeyboardAvoidingView;
@@ -4,14 +4,19 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping: StyledConfiguration<typeof RNPressable> = {
10
12
  className: "style",
11
13
  };
12
14
 
13
- export function Pressable(props: StyledProps<PressableProps, typeof mapping>) {
14
- return useCssElement(RNPressable, props, mapping);
15
- }
15
+ export const Pressable = copyComponentProperties(
16
+ RNPressable,
17
+ (props: StyledProps<PressableProps, typeof mapping>) => {
18
+ return useCssElement(RNPressable, props, mapping);
19
+ },
20
+ );
16
21
 
17
22
  export default Pressable;
@@ -0,0 +1 @@
1
+ export { SafeAreaProvider } from "react-native-css/components/react-native-safe-area-context";
@@ -4,17 +4,20 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping: StyledConfiguration<typeof RNScrollView> = {
10
12
  className: "style",
11
13
  contentContainerClassName: "contentContainerStyle",
12
14
  };
13
15
 
14
- export function ScrollView(
15
- props: StyledProps<ScrollViewProps, typeof mapping>,
16
- ) {
17
- return useCssElement(RNScrollView, props, mapping);
18
- }
16
+ export const ScrollView = copyComponentProperties(
17
+ RNScrollView,
18
+ (props: StyledProps<ScrollViewProps, typeof mapping>) => {
19
+ return useCssElement(RNScrollView, props, mapping);
20
+ },
21
+ );
19
22
 
20
23
  export default ScrollView;
@@ -4,14 +4,19 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping = {
10
12
  className: "style",
11
13
  } satisfies StyledConfiguration<typeof RNSwitch>;
12
14
 
13
- export function Switch(props: StyledProps<SwitchProps, typeof mapping>) {
14
- return useCssElement(RNSwitch, props, mapping);
15
- }
15
+ export const Switch = copyComponentProperties(
16
+ RNSwitch,
17
+ (props: StyledProps<SwitchProps, typeof mapping>) => {
18
+ return useCssElement(RNSwitch, props, mapping);
19
+ },
20
+ );
16
21
 
17
22
  export default Switch;
@@ -4,14 +4,19 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "react-native-css/native";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping = {
10
12
  className: "style",
11
13
  } satisfies StyledConfiguration<typeof RNText>;
12
14
 
13
- export function Text(props: StyledProps<TextProps, typeof mapping>) {
14
- return useCssElement(RNText, props, mapping);
15
- }
15
+ export const Text = copyComponentProperties(
16
+ RNText,
17
+ (props: StyledProps<TextProps, typeof mapping>) => {
18
+ return useCssElement(RNText, props, mapping);
19
+ },
20
+ );
16
21
 
17
22
  export default Text;
@@ -4,7 +4,9 @@ import {
4
4
  useCssElement,
5
5
  type StyledConfiguration,
6
6
  type StyledProps,
7
- } from "../runtime";
7
+ } from "react-native-css";
8
+
9
+ import { copyComponentProperties } from "./copyComponentProperties";
8
10
 
9
11
  const mapping: StyledConfiguration<typeof RNTextInput> = {
10
12
  className: {
@@ -15,8 +17,11 @@ const mapping: StyledConfiguration<typeof RNTextInput> = {
15
17
  },
16
18
  };
17
19
 
18
- export function TextInput(props: StyledProps<TextInputProps, typeof mapping>) {
19
- return useCssElement(RNTextInput, props, mapping);
20
- }
20
+ export const TextInput = copyComponentProperties(
21
+ RNTextInput,
22
+ (props: StyledProps<TextInputProps, typeof mapping>) => {
23
+ return useCssElement(RNTextInput, props, mapping);
24
+ },
25
+ );
21
26
 
22
27
  export default TextInput;