react-native-css 0.0.0-nightly.d11bf3f → 0.0.0-nightly.d6f42ab

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 (377) hide show
  1. package/dist/commonjs/compiler/atRules.js +30 -16
  2. package/dist/commonjs/compiler/atRules.js.map +1 -1
  3. package/dist/commonjs/compiler/compiler.js +29 -19
  4. package/dist/commonjs/compiler/compiler.js.map +1 -1
  5. package/dist/commonjs/compiler/declarations.js +10 -10
  6. package/dist/commonjs/compiler/declarations.js.map +1 -1
  7. package/dist/commonjs/compiler/keyframes.js +1 -1
  8. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  9. package/dist/commonjs/compiler/lightningcss-loader.js +40 -0
  10. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -0
  11. package/dist/commonjs/compiler/selector-builder.js +3 -2
  12. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  13. package/dist/commonjs/compiler/stylesheet.js +5 -7
  14. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  15. package/dist/commonjs/components/ActivityIndicator.js +6 -6
  16. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  17. package/dist/commonjs/components/Button.js +6 -6
  18. package/dist/commonjs/components/Button.js.map +1 -1
  19. package/dist/commonjs/components/FlatList.js +10 -9
  20. package/dist/commonjs/components/FlatList.js.map +1 -1
  21. package/dist/commonjs/components/Image.js +6 -6
  22. package/dist/commonjs/components/Image.js.map +1 -1
  23. package/dist/commonjs/components/ImageBackground.js +22 -0
  24. package/dist/commonjs/components/ImageBackground.js.map +1 -0
  25. package/dist/commonjs/components/KeyboardAvoidingView.js +19 -0
  26. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -0
  27. package/dist/commonjs/components/Pressable.js +17 -0
  28. package/dist/commonjs/components/Pressable.js.map +1 -0
  29. package/dist/commonjs/components/ScrollView.js +18 -0
  30. package/dist/commonjs/components/ScrollView.js.map +1 -0
  31. package/dist/commonjs/components/Switch.js +6 -6
  32. package/dist/commonjs/components/Switch.js.map +1 -1
  33. package/dist/commonjs/components/Text.js +6 -6
  34. package/dist/commonjs/components/Text.js.map +1 -1
  35. package/dist/commonjs/components/TextInput.js +12 -7
  36. package/dist/commonjs/components/TextInput.js.map +1 -1
  37. package/dist/commonjs/components/TouchableHighlight.js +17 -0
  38. package/dist/commonjs/components/TouchableHighlight.js.map +1 -0
  39. package/dist/commonjs/components/TouchableOpacity.js +17 -0
  40. package/dist/commonjs/components/TouchableOpacity.js.map +1 -0
  41. package/dist/commonjs/components/TouchableWithoutFeedback.js +17 -0
  42. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -0
  43. package/dist/commonjs/components/View.js +6 -6
  44. package/dist/commonjs/components/View.js.map +1 -1
  45. package/dist/commonjs/components/VirtualizedList.js +20 -0
  46. package/dist/commonjs/components/VirtualizedList.js.map +1 -0
  47. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  48. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  49. package/dist/commonjs/components/index.cjs +265 -0
  50. package/dist/commonjs/components/index.cjs.map +1 -0
  51. package/dist/commonjs/components/index.js +65 -1
  52. package/dist/commonjs/components/index.js.map +1 -1
  53. package/dist/commonjs/index.js +0 -11
  54. package/dist/commonjs/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 +7 -117
  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/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  70. package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
  71. package/dist/commonjs/native/styles/calculate-props.js +1 -1
  72. package/dist/commonjs/native/styles/resolve.js +0 -1
  73. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  74. package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
  75. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  76. package/dist/commonjs/web/api.js +5 -2
  77. package/dist/commonjs/web/api.js.map +1 -1
  78. package/dist/module/compiler/atRules.js +30 -16
  79. package/dist/module/compiler/atRules.js.map +1 -1
  80. package/dist/module/compiler/compiler.js +25 -15
  81. package/dist/module/compiler/compiler.js.map +1 -1
  82. package/dist/module/compiler/declarations.js +10 -10
  83. package/dist/module/compiler/declarations.js.map +1 -1
  84. package/dist/module/compiler/keyframes.js +1 -1
  85. package/dist/module/compiler/keyframes.js.map +1 -1
  86. package/dist/module/compiler/lightningcss-loader.js +36 -0
  87. package/dist/module/compiler/lightningcss-loader.js.map +1 -0
  88. package/dist/module/compiler/selector-builder.js +3 -2
  89. package/dist/module/compiler/selector-builder.js.map +1 -1
  90. package/dist/module/compiler/stylesheet.js +5 -7
  91. package/dist/module/compiler/stylesheet.js.map +1 -1
  92. package/dist/module/components/ActivityIndicator.js +4 -3
  93. package/dist/module/components/ActivityIndicator.js.map +1 -1
  94. package/dist/module/components/Button.js +4 -3
  95. package/dist/module/components/Button.js.map +1 -1
  96. package/dist/module/components/FlatList.js +8 -6
  97. package/dist/module/components/FlatList.js.map +1 -1
  98. package/dist/module/components/Image.js +4 -3
  99. package/dist/module/components/Image.js.map +1 -1
  100. package/dist/module/components/ImageBackground.js +18 -0
  101. package/dist/module/components/ImageBackground.js.map +1 -0
  102. package/dist/module/components/KeyboardAvoidingView.js +15 -0
  103. package/dist/module/components/KeyboardAvoidingView.js.map +1 -0
  104. package/dist/module/components/Pressable.js +13 -0
  105. package/dist/module/components/Pressable.js.map +1 -0
  106. package/dist/module/components/ScrollView.js +14 -0
  107. package/dist/module/components/ScrollView.js.map +1 -0
  108. package/dist/module/components/Switch.js +4 -3
  109. package/dist/module/components/Switch.js.map +1 -1
  110. package/dist/module/components/Text.js +4 -3
  111. package/dist/module/components/Text.js.map +1 -1
  112. package/dist/module/components/TextInput.js +10 -4
  113. package/dist/module/components/TextInput.js.map +1 -1
  114. package/dist/module/components/TouchableHighlight.js +13 -0
  115. package/dist/module/components/TouchableHighlight.js.map +1 -0
  116. package/dist/module/components/TouchableOpacity.js +13 -0
  117. package/dist/module/components/TouchableOpacity.js.map +1 -0
  118. package/dist/module/components/TouchableWithoutFeedback.js +13 -0
  119. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -0
  120. package/dist/module/components/View.js +4 -3
  121. package/dist/module/components/View.js.map +1 -1
  122. package/dist/module/components/VirtualizedList.js +16 -0
  123. package/dist/module/components/VirtualizedList.js.map +1 -0
  124. package/dist/module/components/copyComponentProperties.js +15 -0
  125. package/dist/module/components/copyComponentProperties.js.map +1 -0
  126. package/dist/module/components/index.cjs +265 -0
  127. package/dist/module/components/index.cjs.map +1 -0
  128. package/dist/module/components/index.js +8 -0
  129. package/dist/module/components/index.js.map +1 -1
  130. package/dist/module/index.js +0 -1
  131. package/dist/module/index.js.map +1 -1
  132. package/dist/module/jest/index.js +1 -1
  133. package/dist/module/jest/index.js.map +1 -1
  134. package/dist/module/metro/index.js +7 -116
  135. package/dist/module/metro/index.js.map +1 -1
  136. package/dist/module/metro/metro-transformer.js +8 -1
  137. package/dist/module/metro/metro-transformer.js.map +1 -1
  138. package/dist/module/metro/override.js +4 -0
  139. package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
  140. package/dist/module/metro/resolver.js +15 -22
  141. package/dist/module/metro/resolver.js.map +1 -1
  142. package/dist/module/native/api.js +4 -1
  143. package/dist/module/native/api.js.map +1 -1
  144. package/dist/module/native/index.js +1 -1
  145. package/dist/module/native/index.js.map +1 -1
  146. package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  147. package/dist/module/native/react-native-css-metro-override.js.map +1 -0
  148. package/dist/module/native/styles/calculate-props.js +1 -1
  149. package/dist/module/native/styles/resolve.js +0 -1
  150. package/dist/module/native/styles/resolve.js.map +1 -1
  151. package/dist/module/native/styles/shorthands/animation.js +4 -1
  152. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  153. package/dist/module/web/api.js +5 -2
  154. package/dist/module/web/api.js.map +1 -1
  155. package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
  156. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
  157. package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
  158. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  159. package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -1
  160. package/dist/typescript/commonjs/example/index.d.ts +2 -0
  161. package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
  162. package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
  163. package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
  164. package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
  165. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
  166. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +1 -1
  169. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
  170. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts +30 -0
  172. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -0
  173. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +2 -1
  175. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  176. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -11
  177. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  178. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -11
  179. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  180. package/dist/typescript/commonjs/src/components/FlatList.d.ts +4 -8
  181. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  182. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -6
  183. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  184. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +4 -0
  185. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -0
  186. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +4 -0
  187. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -0
  188. package/dist/typescript/commonjs/src/components/Pressable.d.ts +4 -0
  189. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -0
  190. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +4 -0
  191. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -0
  192. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  193. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  194. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  195. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -6
  197. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +4 -0
  199. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -0
  200. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +4 -0
  201. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -0
  202. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +4 -0
  203. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  205. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +6 -0
  207. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -0
  208. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  209. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  210. package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
  211. package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
  212. package/dist/typescript/commonjs/src/components/index.d.ts +8 -0
  213. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/src/index.d.ts +0 -1
  215. package/dist/typescript/commonjs/src/index.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
  220. package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/src/native/api.d.ts +1 -1
  223. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
  225. package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
  227. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  229. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
  230. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +1 -1
  232. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/web/api.d.ts +2 -2
  234. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  235. package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
  236. package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
  237. package/dist/typescript/module/eslint.config.d.mts +2 -0
  238. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  239. package/dist/typescript/module/example/app.config.d.ts.map +1 -1
  240. package/dist/typescript/module/example/index.d.ts +2 -0
  241. package/dist/typescript/module/example/index.d.ts.map +1 -0
  242. package/dist/typescript/module/example/metro.config.d.ts +3 -0
  243. package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
  244. package/dist/typescript/module/example/postcss.config.d.mts +7 -0
  245. package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
  246. package/dist/typescript/module/example/src/App.d.ts.map +1 -1
  247. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  248. package/dist/typescript/module/src/compiler/declarations.d.ts +1 -1
  249. package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
  250. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  251. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts +30 -0
  252. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -0
  253. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  254. package/dist/typescript/module/src/compiler/stylesheet.d.ts +2 -1
  255. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  256. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -11
  257. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  258. package/dist/typescript/module/src/components/Button.d.ts +2 -11
  259. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  260. package/dist/typescript/module/src/components/FlatList.d.ts +4 -8
  261. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  262. package/dist/typescript/module/src/components/Image.d.ts +2 -6
  263. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  264. package/dist/typescript/module/src/components/ImageBackground.d.ts +4 -0
  265. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -0
  266. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +4 -0
  267. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -0
  268. package/dist/typescript/module/src/components/Pressable.d.ts +4 -0
  269. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -0
  270. package/dist/typescript/module/src/components/ScrollView.d.ts +4 -0
  271. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -0
  272. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  273. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  274. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  275. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  276. package/dist/typescript/module/src/components/TextInput.d.ts +2 -6
  277. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  278. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +4 -0
  279. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -0
  280. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +4 -0
  281. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -0
  282. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +4 -0
  283. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
  284. package/dist/typescript/module/src/components/View.d.ts +2 -6
  285. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  286. package/dist/typescript/module/src/components/VirtualizedList.d.ts +6 -0
  287. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -0
  288. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  289. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  290. package/dist/typescript/module/src/components/index.d.cts +2 -0
  291. package/dist/typescript/module/src/components/index.d.cts.map +1 -0
  292. package/dist/typescript/module/src/components/index.d.ts +8 -0
  293. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  294. package/dist/typescript/module/src/index.d.ts +0 -1
  295. package/dist/typescript/module/src/index.d.ts.map +1 -1
  296. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  297. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  298. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  299. package/dist/typescript/module/src/metro/override.d.ts +2 -0
  300. package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
  301. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  302. package/dist/typescript/module/src/native/api.d.ts +1 -1
  303. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  304. package/dist/typescript/module/src/native/index.d.ts +1 -1
  305. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  306. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
  307. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
  308. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  309. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
  310. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  311. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +1 -1
  312. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  313. package/dist/typescript/module/src/web/api.d.ts +2 -2
  314. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  315. package/package.json +16 -18
  316. package/src/compiler/atRules.ts +30 -17
  317. package/src/compiler/compiler.ts +27 -16
  318. package/src/compiler/declarations.ts +10 -10
  319. package/src/compiler/keyframes.ts +2 -2
  320. package/src/compiler/lightningcss-loader.ts +40 -0
  321. package/src/compiler/selector-builder.ts +6 -2
  322. package/src/compiler/stylesheet.ts +5 -7
  323. package/src/components/ActivityIndicator.tsx +11 -8
  324. package/src/components/Button.tsx +11 -6
  325. package/src/components/FlatList.tsx +20 -10
  326. package/src/components/Image.tsx +11 -6
  327. package/src/components/ImageBackground.tsx +30 -0
  328. package/src/components/KeyboardAvoidingView.tsx +27 -0
  329. package/src/components/Pressable.tsx +22 -0
  330. package/src/components/ScrollView.tsx +23 -0
  331. package/src/components/Switch.tsx +9 -4
  332. package/src/components/Text.tsx +9 -4
  333. package/src/components/TextInput.tsx +17 -7
  334. package/src/components/TouchableHighlight.tsx +25 -0
  335. package/src/components/TouchableOpacity.tsx +25 -0
  336. package/src/components/TouchableWithoutFeedback.tsx +25 -0
  337. package/src/components/View.tsx +9 -4
  338. package/src/components/VirtualizedList.tsx +37 -0
  339. package/src/components/copyComponentProperties.ts +21 -0
  340. package/src/components/index.cts +263 -0
  341. package/src/components/index.ts +17 -0
  342. package/src/index.ts +0 -2
  343. package/src/jest/index.ts +2 -1
  344. package/src/metro/index.ts +7 -165
  345. package/src/metro/metro-transformer.ts +15 -1
  346. package/src/metro/override.ts +1 -0
  347. package/src/metro/resolver.ts +29 -28
  348. package/src/native/api.tsx +6 -2
  349. package/src/native/index.ts +1 -2
  350. package/src/native/styles/calculate-props.ts +1 -1
  351. package/src/native/styles/resolve.ts +0 -1
  352. package/src/native/styles/shorthands/animation.ts +10 -2
  353. package/src/utilities/dot-notation.types.ts +10 -3
  354. package/src/web/api.tsx +9 -4
  355. package/dist/commonjs/poison.pill.js.map +0 -1
  356. package/dist/commonjs/runtime/native/injection.js +0 -2
  357. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  358. package/dist/module/native/metro.js +0 -5
  359. package/dist/module/poison.pill.js.map +0 -1
  360. package/dist/module/runtime/native/injection.js +0 -2
  361. package/dist/module/runtime/native/injection.js.map +0 -1
  362. package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
  363. package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
  364. package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
  365. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
  366. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
  367. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  368. package/dist/typescript/module/src/native/metro.d.ts +0 -2
  369. package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
  370. package/dist/typescript/module/src/poison.pill.d.ts +0 -2
  371. package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
  372. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
  373. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  374. package/src/components/index.tsx +0 -10
  375. package/src/native/metro.ts +0 -2
  376. package/src/runtime/native/injection.ts +0 -0
  377. /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
@@ -0,0 +1,263 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
3
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
4
+ /* eslint-disable @typescript-eslint/no-require-imports */
5
+
6
+ module.exports = {
7
+ get ActivityIndicator() {
8
+ return require("./ActivityIndicator").ActivityIndicator;
9
+ },
10
+ get Button() {
11
+ return require("./Button").Button;
12
+ },
13
+ get FlatList() {
14
+ return require("./FlatList").FlatList;
15
+ },
16
+ get Image() {
17
+ return require("./Image").Image;
18
+ },
19
+ get ImageBackground() {
20
+ return require("./ImageBackground").ImageBackground;
21
+ },
22
+ get KeyboardAvoidingView() {
23
+ return require("./KeyboardAvoidingView").KeyboardAvoidingView;
24
+ },
25
+ get Pressable() {
26
+ return require("./Pressable").Pressable;
27
+ },
28
+ get ScrollView() {
29
+ return require("./ScrollView").ScrollView;
30
+ },
31
+ get Switch() {
32
+ return require("./Switch").Switch;
33
+ },
34
+ get Text() {
35
+ return require("./Text").Text;
36
+ },
37
+ get TextInput() {
38
+ return require("./TextInput").TextInput;
39
+ },
40
+ get TouchableHighlight() {
41
+ return require("./TouchableHighlight").TouchableHighlight;
42
+ },
43
+ get TouchableOpacity() {
44
+ return require("./TouchableOpacity").TouchableOpacity;
45
+ },
46
+ get View() {
47
+ return require("./View").View;
48
+ },
49
+ get VirtualizedList() {
50
+ return require("./VirtualizedList").VirtualizedList;
51
+ },
52
+
53
+ /**
54
+ * We need to return
55
+ */
56
+ get DrawerLayoutAndroid() {
57
+ return require("react-native").DrawerLayoutAndroid;
58
+ },
59
+ get InputAccessoryView() {
60
+ return require("react-native").InputAccessoryView;
61
+ },
62
+ get experimental_LayoutConformance() {
63
+ return require("react-native").experimental_LayoutConformance;
64
+ },
65
+ get Modal() {
66
+ return require("react-native").Modal;
67
+ },
68
+ get ProgressBarAndroid() {
69
+ return require("react-native").ProgressBarAndroid;
70
+ },
71
+ get RefreshControl() {
72
+ return require("react-native").RefreshControl;
73
+ },
74
+ get SafeAreaView() {
75
+ return require("react-native").SafeAreaView;
76
+ },
77
+ get SectionList() {
78
+ return require("react-native").SectionList;
79
+ },
80
+ get StatusBar() {
81
+ return require("react-native").StatusBar;
82
+ },
83
+ get unstable_TextAncestorContext() {
84
+ return require("react-native").unstable_TextAncestorContext;
85
+ },
86
+ get Touchable() {
87
+ return require("react-native").Touchable;
88
+ },
89
+ get TouchableNativeFeedback() {
90
+ return require("react-native").TouchableNativeFeedback;
91
+ },
92
+ get TouchableWithoutFeedback() {
93
+ return require("react-native").TouchableWithoutFeedback;
94
+ },
95
+ get VirtualizedSectionList() {
96
+ return require("react-native").VirtualizedSectionList;
97
+ },
98
+ get unstable_VirtualView() {
99
+ return require("react-native").unstable_VirtualView;
100
+ },
101
+ get AccessibilityInfo() {
102
+ return require("react-native").AccessibilityInfo;
103
+ },
104
+ get ActionSheetIOS() {
105
+ return require("react-native").ActionSheetIOS;
106
+ },
107
+ get Alert() {
108
+ return require("react-native").Alert;
109
+ },
110
+ get Animated() {
111
+ return require("react-native").Animated;
112
+ },
113
+ get Appearance() {
114
+ return require("react-native").Appearance;
115
+ },
116
+ get AppRegistry() {
117
+ return require("react-native").AppRegistry;
118
+ },
119
+ get AppState() {
120
+ return require("react-native").AppState;
121
+ },
122
+ get BackHandler() {
123
+ return require("react-native").BackHandler;
124
+ },
125
+ get Clipboard() {
126
+ return require("react-native").Clipboard;
127
+ },
128
+ get codegenNativeCommands() {
129
+ return require("react-native").codegenNativeCommands;
130
+ },
131
+ get codegenNativeComponent() {
132
+ return require("react-native").codegenNativeComponent;
133
+ },
134
+ get DeviceEventEmitter() {
135
+ return require("react-native").DeviceEventEmitter;
136
+ },
137
+ get DeviceInfo() {
138
+ return require("react-native").DeviceInfo;
139
+ },
140
+ get DevMenu() {
141
+ return require("react-native").DevMenu;
142
+ },
143
+ get DevSettings() {
144
+ return require("react-native").DevSettings;
145
+ },
146
+ get Dimensions() {
147
+ return require("react-native").Dimensions;
148
+ },
149
+ get DynamicColorIOS() {
150
+ return require("react-native").DynamicColorIOS;
151
+ },
152
+ get Easing() {
153
+ return require("react-native").Easing;
154
+ },
155
+ get findNodeHandle() {
156
+ return require("react-native").findNodeHandle;
157
+ },
158
+ get I18nManager() {
159
+ return require("react-native").I18nManager;
160
+ },
161
+ get InteractionManager() {
162
+ return require("react-native").InteractionManager;
163
+ },
164
+ get Keyboard() {
165
+ return require("react-native").Keyboard;
166
+ },
167
+ get LayoutAnimation() {
168
+ return require("react-native").LayoutAnimation;
169
+ },
170
+ get Linking() {
171
+ return require("react-native").Linking;
172
+ },
173
+ get LogBox() {
174
+ return require("react-native").LogBox;
175
+ },
176
+ get NativeAppEventEmitter() {
177
+ return require("react-native").NativeAppEventEmitter;
178
+ },
179
+ get NativeDialogManagerAndroid() {
180
+ return require("react-native").NativeDialogManagerAndroid;
181
+ },
182
+ get NativeEventEmitter() {
183
+ return require("react-native").NativeEventEmitter;
184
+ },
185
+ get NativeModules() {
186
+ return require("react-native").NativeModules;
187
+ },
188
+ get Networking() {
189
+ return require("react-native").Networking;
190
+ },
191
+ get PanResponder() {
192
+ return require("react-native").PanResponder;
193
+ },
194
+ get PermissionsAndroid() {
195
+ return require("react-native").PermissionsAndroid;
196
+ },
197
+ get PixelRatio() {
198
+ return require("react-native").PixelRatio;
199
+ },
200
+ get Platform() {
201
+ return require("react-native").Platform;
202
+ },
203
+ get PlatformColor() {
204
+ return require("react-native").PlatformColor;
205
+ },
206
+ get PushNotificationIOS() {
207
+ return require("react-native").PushNotificationIOS;
208
+ },
209
+ get processColor() {
210
+ return require("react-native").processColor;
211
+ },
212
+ get registerCallableModule() {
213
+ return require("react-native").registerCallableModule;
214
+ },
215
+ get requireNativeComponent() {
216
+ return require("react-native").requireNativeComponent;
217
+ },
218
+ get RootTagContext() {
219
+ return require("react-native").RootTagContext;
220
+ },
221
+ get Settings() {
222
+ return require("react-native").Settings;
223
+ },
224
+ get Share() {
225
+ return require("react-native").Share;
226
+ },
227
+ get StyleSheet() {
228
+ return require("react-native").StyleSheet;
229
+ },
230
+ get Systrace() {
231
+ return require("react-native").Systrace;
232
+ },
233
+ get ToastAndroid() {
234
+ return require("react-native").ToastAndroid;
235
+ },
236
+ get TurboModuleRegistry() {
237
+ return require("react-native").TurboModuleRegistry;
238
+ },
239
+ get UIManager() {
240
+ return require("react-native").UIManager;
241
+ },
242
+ get unstable_batchedUpdates() {
243
+ return require("react-native").unstable_batchedUpdates;
244
+ },
245
+ get useAnimatedValue() {
246
+ return require("react-native").useAnimatedValue;
247
+ },
248
+ get useColorScheme() {
249
+ return require("react-native").useColorScheme;
250
+ },
251
+ get useWindowDimensions() {
252
+ return require("react-native").useWindowDimensions;
253
+ },
254
+ get UTFSequence() {
255
+ return require("react-native").UTFSequence;
256
+ },
257
+ get Vibration() {
258
+ return require("react-native").Vibration;
259
+ },
260
+ get VirtualViewMode() {
261
+ return require("react-native").VirtualViewMode;
262
+ },
263
+ };
@@ -0,0 +1,17 @@
1
+ export * from "react-native";
2
+ export { ActivityIndicator } from "./ActivityIndicator";
3
+ export { Button } from "./Button";
4
+ export { FlatList } from "./FlatList";
5
+ export { Image } from "./Image";
6
+ export { ImageBackground } from "./ImageBackground";
7
+ export { KeyboardAvoidingView } from "./KeyboardAvoidingView";
8
+ export { Pressable } from "./Pressable";
9
+ export { ScrollView } from "./ScrollView";
10
+ export { Switch } from "./Switch";
11
+ export { Text } from "./Text";
12
+ export { TextInput } from "./TextInput";
13
+ export { TouchableHighlight } from "./TouchableHighlight";
14
+ export { TouchableOpacity } from "./TouchableOpacity";
15
+ export { TouchableWithoutFeedback } from "./TouchableWithoutFeedback";
16
+ export { View } from "./View";
17
+ export { VirtualizedList } from "./VirtualizedList";
package/src/index.ts CHANGED
@@ -1,3 +1 @@
1
1
  export * from "./runtime";
2
-
3
- export * from "./poison.pill";
package/src/jest/index.ts CHANGED
@@ -27,7 +27,8 @@ beforeEach(() => {
27
27
 
28
28
  const debugDefault = Boolean(
29
29
  process.env.REACT_NATIVE_CSS_TEST_DEBUG &&
30
- process.env.NODE_OPTIONS?.includes("--inspect"),
30
+ typeof process.env.NODE_OPTIONS === "string" &&
31
+ process.env.NODE_OPTIONS.includes("--inspect"),
31
32
  );
32
33
 
33
34
  export function registerCSS(
@@ -1,16 +1,9 @@
1
1
  /* eslint-disable */
2
- import { dirname, relative, sep } from "node:path";
3
2
  import { versions } from "node:process";
4
3
 
5
- import debug from "debug";
6
4
  import type { MetroConfig } from "metro-config";
7
5
 
8
- import {
9
- compile,
10
- type CompilerOptions,
11
- type ReactNativeCssStyleSheet,
12
- } from "../compiler";
13
- import { getNativeInjectionCode, getWebInjectionCode } from "./injection-code";
6
+ import { type CompilerOptions } from "../compiler";
14
7
  import { nativeResolver, webResolver } from "./resolver";
15
8
  import { setupTypeScript } from "./typescript";
16
9
 
@@ -24,7 +17,10 @@ export interface WithReactNativeCSSOptions extends CompilerOptions {
24
17
  hexColors?: boolean;
25
18
  }
26
19
 
27
- const defaultLogger = debug("react-native-css:metro");
20
+ const metroOverrideResolution = {
21
+ type: "sourceFile",
22
+ filePath: require.resolve("./override"),
23
+ };
28
24
 
29
25
  export function withReactNativeCSS<
30
26
  T extends MetroConfig | (() => Promise<MetroConfig>),
@@ -43,11 +39,8 @@ export function withReactNativeCSS<
43
39
  disableTypeScriptGeneration,
44
40
  typescriptEnvPath,
45
41
  globalClassNamePolyfill = false,
46
- logger = defaultLogger,
47
42
  } = options || {};
48
43
 
49
- const loggerEnabled = "enabled" in logger ? logger.enabled : true;
50
-
51
44
  if (disableTypeScriptGeneration !== true) {
52
45
  setupTypeScript(typescriptEnvPath);
53
46
  }
@@ -63,8 +56,8 @@ export function withReactNativeCSS<
63
56
  ...config.resolver,
64
57
  sourceExts: [...(config?.resolver?.sourceExts || []), "css"],
65
58
  resolveRequest: (context, moduleName, platform) => {
66
- if (moduleName.includes("poison.pill")) {
67
- return { type: "empty" };
59
+ if (moduleName.includes("react-native-css-metro-override")) {
60
+ return metroOverrideResolution;
68
61
  }
69
62
 
70
63
  const parentResolver =
@@ -86,156 +79,5 @@ export function withReactNativeCSS<
86
79
  return resolved;
87
80
  },
88
81
  },
89
- server: {
90
- ...config.server,
91
- enhanceMiddleware(metroMiddleware, metroServer) {
92
- const bundler: any = metroServer.getBundler().getBundler();
93
-
94
- if (!bundler.__react_native_css__patched) {
95
- bundler.__react_native_css__patched = true;
96
-
97
- const nativeCSSFiles = new Map<
98
- string,
99
- [string, ReactNativeCssStyleSheet]
100
- >();
101
- const webCSSFiles = new Set<string>();
102
-
103
- const nativeInjectionPath = require.resolve("../native/metro");
104
- const nativeInjectionFilepaths = [
105
- // CommonJS
106
- nativeInjectionPath,
107
- // ES Module
108
- nativeInjectionPath.replace(
109
- `dist${sep}commonjs`,
110
- `dist${sep}module`,
111
- ),
112
- // TypeScript
113
- nativeInjectionPath
114
- .replace(`dist${sep}commonjs`, `src`)
115
- .replace(".js", ".ts"),
116
- ];
117
-
118
- const webInjectionPath = require.resolve("../web/metro");
119
- const webInjectionFilepaths = [
120
- // CommonJS
121
- webInjectionPath,
122
- // ES Module
123
- webInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
124
- // TypeScript
125
- webInjectionPath
126
- .replace(`dist${sep}commonjs`, `src`)
127
- .replace(".js", ".ts"),
128
- ];
129
-
130
- // Keep the original
131
- const transformFile = bundler.transformFile.bind(bundler);
132
-
133
- const watcher = bundler.getWatcher();
134
-
135
- // Patch with our functionality
136
- bundler.transformFile = async function (
137
- filePath: string,
138
- transformOptions: any,
139
- fileBuffer?: Buffer,
140
- ) {
141
- const isCss = /\.(s?css|sass)$/.test(filePath);
142
-
143
- if (transformOptions.platform === "web") {
144
- if (isCss) {
145
- webCSSFiles.add(filePath);
146
- } else if (webInjectionFilepaths.includes(filePath)) {
147
- fileBuffer = getWebInjectionCode(Array.from(webCSSFiles));
148
- }
149
-
150
- return transformFile(filePath, transformOptions, fileBuffer);
151
- } else {
152
- // Handle CSS files on native platforms
153
- if (isCss) {
154
- const webTransform = await transformFile(
155
- filePath,
156
- {
157
- ...transformOptions,
158
- // Force the platform to web for CSS files
159
- platform: "web",
160
- // Let the transformer know that we will handle compilation
161
- customTransformOptions: {
162
- ...transformOptions.customTransformOptions,
163
- reactNativeCSS: options,
164
- },
165
- },
166
- fileBuffer,
167
- );
168
-
169
- const lastTransform = nativeCSSFiles.get(filePath);
170
- const last = lastTransform?.[0];
171
- const next = webTransform.output[0].data.css.code.toString();
172
-
173
- // The CSS file has changed, we need to recompile the injection file
174
- if (next !== last) {
175
- nativeCSSFiles.set(filePath, [
176
- next,
177
- compile(next, {
178
- hexColors: options?.hexColors,
179
- }).stylesheet(),
180
- ]);
181
-
182
- watcher.emit("change", {
183
- eventsQueue: nativeInjectionFilepaths.map((filePath) => ({
184
- filePath,
185
- metadata: {
186
- modifiedTime: Date.now(),
187
- size: 1, // Can be anything
188
- type: "virtual", // Can be anything
189
- },
190
- type: "change",
191
- })),
192
- });
193
- }
194
-
195
- const nativeTransform = await transformFile(
196
- filePath,
197
- transformOptions,
198
- fileBuffer,
199
- );
200
-
201
- // Tell Expo to skip caching this file
202
- nativeTransform.output[0].data.css = {
203
- skipCache: true,
204
- // Expo requires a `code` property
205
- code: "",
206
- };
207
-
208
- return nativeTransform;
209
- } else if (nativeInjectionFilepaths.includes(filePath)) {
210
- // If this is the injection file, we to swap its content with the
211
- // compiled CSS files
212
- fileBuffer = getNativeInjectionCode(
213
- Array.from(nativeCSSFiles.keys()).map((key) =>
214
- relative(dirname(filePath), key),
215
- ),
216
- Array.from(nativeCSSFiles.values()).map(([, value]) => value),
217
- );
218
-
219
- if (loggerEnabled && fileBuffer) {
220
- logger(`Transformed ${filePath}`);
221
- logger(fileBuffer?.toString());
222
- }
223
- }
224
-
225
- return transformFile(filePath, transformOptions, fileBuffer);
226
- }
227
- };
228
- }
229
-
230
- /**
231
- * We don't modify the middleware, we just use this function to get the metroServer
232
- * So simply return the existing middleware
233
- */
234
- return (
235
- config.server?.enhanceMiddleware?.(metroMiddleware, metroServer) ??
236
- metroMiddleware
237
- );
238
- },
239
- },
240
82
  };
241
83
  }
@@ -44,5 +44,19 @@ export async function transform(
44
44
 
45
45
  data = Buffer.from(getNativeInjectionCode([], [productionJS]));
46
46
 
47
- return worker.transform(config, projectRoot, `${filePath}.js`, data, options);
47
+ const transform = await worker.transform(
48
+ config,
49
+ projectRoot,
50
+ `${filePath}.js`,
51
+ data,
52
+ options,
53
+ );
54
+
55
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
56
+ (transform as any).output[0].data.css = {
57
+ skipCache: true,
58
+ code: "",
59
+ };
60
+
61
+ return transform;
48
62
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -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";
@@ -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
  }
@@ -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,
@@ -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
+ };