react-native-css 0.0.0-nightly.08286a2 → 0.0.0-nightly.0acc293

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 (340) hide show
  1. package/dist/commonjs/compiler/atRules.js +14 -10
  2. package/dist/commonjs/compiler/atRules.js.map +1 -1
  3. package/dist/commonjs/compiler/declarations.js +10 -10
  4. package/dist/commonjs/compiler/declarations.js.map +1 -1
  5. package/dist/commonjs/compiler/keyframes.js +1 -1
  6. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  7. package/dist/commonjs/compiler/stylesheet.js +2 -5
  8. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  9. package/dist/commonjs/components/ActivityIndicator.js +6 -6
  10. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  11. package/dist/commonjs/components/Button.js +6 -6
  12. package/dist/commonjs/components/Button.js.map +1 -1
  13. package/dist/commonjs/components/FlatList.js +6 -6
  14. package/dist/commonjs/components/FlatList.js.map +1 -1
  15. package/dist/commonjs/components/Image.js +6 -6
  16. package/dist/commonjs/components/Image.js.map +1 -1
  17. package/dist/commonjs/components/ImageBackground.js +6 -6
  18. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  19. package/dist/commonjs/components/KeyboardAvoidingView.js +6 -6
  20. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  21. package/dist/commonjs/components/Pressable.js +6 -6
  22. package/dist/commonjs/components/Pressable.js.map +1 -1
  23. package/dist/commonjs/components/ScrollView.js +6 -6
  24. package/dist/commonjs/components/ScrollView.js.map +1 -1
  25. package/dist/commonjs/components/Switch.js +6 -6
  26. package/dist/commonjs/components/Switch.js.map +1 -1
  27. package/dist/commonjs/components/Text.js +6 -6
  28. package/dist/commonjs/components/Text.js.map +1 -1
  29. package/dist/commonjs/components/TextInput.js +6 -6
  30. package/dist/commonjs/components/TextInput.js.map +1 -1
  31. package/dist/commonjs/components/TouchableHighlight.js +6 -6
  32. package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
  33. package/dist/commonjs/components/TouchableOpacity.js +6 -6
  34. package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
  35. package/dist/commonjs/components/TouchableWithoutFeedback.js +6 -6
  36. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
  37. package/dist/commonjs/components/View.js +6 -6
  38. package/dist/commonjs/components/View.js.map +1 -1
  39. package/dist/commonjs/components/VirtualizedList.js +6 -6
  40. package/dist/commonjs/components/VirtualizedList.js.map +1 -1
  41. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  42. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  43. package/dist/commonjs/components/index.cjs +265 -0
  44. package/dist/commonjs/components/index.cjs.map +1 -0
  45. package/dist/commonjs/components/index.js.map +1 -1
  46. package/dist/commonjs/jest/index.js +1 -1
  47. package/dist/commonjs/jest/index.js.map +1 -1
  48. package/dist/commonjs/metro/index.js +8 -118
  49. package/dist/commonjs/metro/index.js.map +1 -1
  50. package/dist/commonjs/metro/metro-transformer.js +8 -1
  51. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  52. package/dist/commonjs/{native/metro.js → metro/override.js} +1 -1
  53. package/dist/commonjs/{native/metro.js.map → metro/override.js.map} +1 -1
  54. package/dist/commonjs/metro/resolver.js +15 -22
  55. package/dist/commonjs/metro/resolver.js.map +1 -1
  56. package/dist/commonjs/native/api.js +5 -1
  57. package/dist/commonjs/native/api.js.map +1 -1
  58. package/dist/commonjs/native/index.js +8 -8
  59. package/dist/commonjs/native/index.js.map +1 -1
  60. package/dist/commonjs/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  61. package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
  62. package/dist/commonjs/native/styles/calculate-props.js +1 -1
  63. package/dist/commonjs/native/styles/resolve.js +0 -1
  64. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  65. package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
  66. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  67. package/dist/commonjs/web/api.js +5 -2
  68. package/dist/commonjs/web/api.js.map +1 -1
  69. package/dist/module/compiler/atRules.js +14 -10
  70. package/dist/module/compiler/atRules.js.map +1 -1
  71. package/dist/module/compiler/declarations.js +10 -10
  72. package/dist/module/compiler/declarations.js.map +1 -1
  73. package/dist/module/compiler/keyframes.js +1 -1
  74. package/dist/module/compiler/keyframes.js.map +1 -1
  75. package/dist/module/compiler/stylesheet.js +2 -5
  76. package/dist/module/compiler/stylesheet.js.map +1 -1
  77. package/dist/module/components/ActivityIndicator.js +4 -3
  78. package/dist/module/components/ActivityIndicator.js.map +1 -1
  79. package/dist/module/components/Button.js +4 -3
  80. package/dist/module/components/Button.js.map +1 -1
  81. package/dist/module/components/FlatList.js +4 -3
  82. package/dist/module/components/FlatList.js.map +1 -1
  83. package/dist/module/components/Image.js +4 -3
  84. package/dist/module/components/Image.js.map +1 -1
  85. package/dist/module/components/ImageBackground.js +4 -3
  86. package/dist/module/components/ImageBackground.js.map +1 -1
  87. package/dist/module/components/KeyboardAvoidingView.js +4 -3
  88. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  89. package/dist/module/components/Pressable.js +4 -3
  90. package/dist/module/components/Pressable.js.map +1 -1
  91. package/dist/module/components/ScrollView.js +4 -3
  92. package/dist/module/components/ScrollView.js.map +1 -1
  93. package/dist/module/components/Switch.js +4 -3
  94. package/dist/module/components/Switch.js.map +1 -1
  95. package/dist/module/components/Text.js +4 -3
  96. package/dist/module/components/Text.js.map +1 -1
  97. package/dist/module/components/TextInput.js +4 -3
  98. package/dist/module/components/TextInput.js.map +1 -1
  99. package/dist/module/components/TouchableHighlight.js +4 -3
  100. package/dist/module/components/TouchableHighlight.js.map +1 -1
  101. package/dist/module/components/TouchableOpacity.js +4 -3
  102. package/dist/module/components/TouchableOpacity.js.map +1 -1
  103. package/dist/module/components/TouchableWithoutFeedback.js +4 -3
  104. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
  105. package/dist/module/components/View.js +4 -3
  106. package/dist/module/components/View.js.map +1 -1
  107. package/dist/module/components/VirtualizedList.js +4 -3
  108. package/dist/module/components/VirtualizedList.js.map +1 -1
  109. package/dist/module/components/copyComponentProperties.js +15 -0
  110. package/dist/module/components/copyComponentProperties.js.map +1 -0
  111. package/dist/module/components/index.cjs +265 -0
  112. package/dist/module/components/index.cjs.map +1 -0
  113. package/dist/module/components/index.js.map +1 -1
  114. package/dist/module/jest/index.js +1 -1
  115. package/dist/module/jest/index.js.map +1 -1
  116. package/dist/module/metro/index.js +8 -117
  117. package/dist/module/metro/index.js.map +1 -1
  118. package/dist/module/metro/metro-transformer.js +8 -1
  119. package/dist/module/metro/metro-transformer.js.map +1 -1
  120. package/dist/module/metro/override.js +4 -0
  121. package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
  122. package/dist/module/metro/resolver.js +15 -22
  123. package/dist/module/metro/resolver.js.map +1 -1
  124. package/dist/module/native/api.js +4 -1
  125. package/dist/module/native/api.js.map +1 -1
  126. package/dist/module/native/index.js +1 -1
  127. package/dist/module/native/index.js.map +1 -1
  128. package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  129. package/dist/module/native/react-native-css-metro-override.js.map +1 -0
  130. package/dist/module/native/styles/calculate-props.js +1 -1
  131. package/dist/module/native/styles/resolve.js +0 -1
  132. package/dist/module/native/styles/resolve.js.map +1 -1
  133. package/dist/module/native/styles/shorthands/animation.js +4 -1
  134. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  135. package/dist/module/web/api.js +5 -2
  136. package/dist/module/web/api.js.map +1 -1
  137. package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
  138. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
  139. package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
  140. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  141. package/dist/typescript/commonjs/example/index.d.ts +2 -0
  142. package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
  143. package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
  144. package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
  146. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
  147. package/dist/typescript/commonjs/example/src/App.d.ts +1 -0
  148. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
  149. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +1 -1
  150. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
  151. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
  152. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  153. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
  154. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  155. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
  156. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  157. package/dist/typescript/commonjs/src/components/FlatList.d.ts +3 -3
  158. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  159. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
  160. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  161. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
  162. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
  164. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
  166. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
  168. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  170. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  172. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  173. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
  174. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  175. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
  176. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
  177. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
  178. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
  179. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
  180. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  181. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  182. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  183. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +3 -3
  184. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  186. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
  188. package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
  189. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  191. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  192. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  193. package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
  194. package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/native/api.d.ts +2 -2
  197. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
  199. package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
  200. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -1
  201. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
  202. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  204. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
  205. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +1 -1
  207. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/web/api.d.ts +2 -2
  209. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  210. package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
  211. package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
  212. package/dist/typescript/module/eslint.config.d.mts +2 -0
  213. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  214. package/dist/typescript/module/example/index.d.ts +2 -0
  215. package/dist/typescript/module/example/index.d.ts.map +1 -0
  216. package/dist/typescript/module/example/metro.config.d.ts +3 -0
  217. package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
  218. package/dist/typescript/module/example/postcss.config.d.mts +7 -0
  219. package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
  220. package/dist/typescript/module/example/src/App.d.ts +1 -0
  221. package/dist/typescript/module/example/src/App.d.ts.map +1 -1
  222. package/dist/typescript/module/src/compiler/declarations.d.ts +1 -1
  223. package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
  224. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  225. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  226. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
  227. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  228. package/dist/typescript/module/src/components/Button.d.ts +2 -4
  229. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  230. package/dist/typescript/module/src/components/FlatList.d.ts +3 -3
  231. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  232. package/dist/typescript/module/src/components/Image.d.ts +2 -4
  233. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  234. package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
  235. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  236. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
  237. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  238. package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
  239. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
  240. package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
  241. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
  242. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  243. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  244. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  245. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  246. package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
  247. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  248. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
  249. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
  250. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
  251. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
  252. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
  253. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  254. package/dist/typescript/module/src/components/View.d.ts +2 -6
  255. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  256. package/dist/typescript/module/src/components/VirtualizedList.d.ts +3 -3
  257. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
  258. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  259. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  260. package/dist/typescript/module/src/components/index.d.cts +2 -0
  261. package/dist/typescript/module/src/components/index.d.cts.map +1 -0
  262. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  263. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  264. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  265. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  266. package/dist/typescript/module/src/metro/override.d.ts +2 -0
  267. package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
  268. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  269. package/dist/typescript/module/src/native/api.d.ts +2 -2
  270. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  271. package/dist/typescript/module/src/native/index.d.ts +1 -1
  272. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  273. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +1 -1
  274. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
  275. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
  276. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  277. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
  278. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  279. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +1 -1
  280. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  281. package/dist/typescript/module/src/web/api.d.ts +2 -2
  282. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  283. package/package.json +11 -12
  284. package/src/compiler/atRules.ts +16 -10
  285. package/src/compiler/declarations.ts +10 -10
  286. package/src/compiler/keyframes.ts +2 -2
  287. package/src/compiler/stylesheet.ts +3 -5
  288. package/src/components/ActivityIndicator.tsx +9 -6
  289. package/src/components/Button.tsx +9 -4
  290. package/src/components/FlatList.tsx +14 -5
  291. package/src/components/Image.tsx +9 -4
  292. package/src/components/ImageBackground.tsx +9 -6
  293. package/src/components/KeyboardAvoidingView.tsx +9 -6
  294. package/src/components/Pressable.tsx +9 -4
  295. package/src/components/ScrollView.tsx +9 -6
  296. package/src/components/Switch.tsx +9 -4
  297. package/src/components/Text.tsx +9 -4
  298. package/src/components/TextInput.tsx +9 -4
  299. package/src/components/TouchableHighlight.tsx +9 -6
  300. package/src/components/TouchableOpacity.tsx +9 -6
  301. package/src/components/TouchableWithoutFeedback.tsx +9 -6
  302. package/src/components/View.tsx +9 -4
  303. package/src/components/VirtualizedList.tsx +18 -6
  304. package/src/components/copyComponentProperties.ts +21 -0
  305. package/src/components/index.cts +263 -0
  306. package/src/components/{index.tsx → index.ts} +0 -1
  307. package/src/jest/index.ts +2 -1
  308. package/src/metro/index.ts +8 -166
  309. package/src/metro/metro-transformer.ts +15 -1
  310. package/src/metro/override.ts +1 -0
  311. package/src/metro/resolver.ts +29 -28
  312. package/src/native/api.tsx +6 -2
  313. package/src/native/index.ts +1 -2
  314. package/src/native/styles/calculate-props.ts +1 -1
  315. package/src/native/styles/resolve.ts +0 -1
  316. package/src/native/styles/shorthands/animation.ts +10 -2
  317. package/src/utilities/dot-notation.types.ts +10 -3
  318. package/src/web/api.tsx +9 -4
  319. package/dist/commonjs/poison.pill.js.map +0 -1
  320. package/dist/commonjs/runtime/native/injection.js +0 -2
  321. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  322. package/dist/module/native/metro.js +0 -5
  323. package/dist/module/poison.pill.js.map +0 -1
  324. package/dist/module/runtime/native/injection.js +0 -2
  325. package/dist/module/runtime/native/injection.js.map +0 -1
  326. package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
  327. package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
  328. package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
  329. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
  330. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
  331. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  332. package/dist/typescript/module/src/native/metro.d.ts +0 -2
  333. package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
  334. package/dist/typescript/module/src/poison.pill.d.ts +0 -2
  335. package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
  336. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
  337. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  338. package/src/native/metro.ts +0 -2
  339. package/src/runtime/native/injection.ts +0 -0
  340. /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
@@ -47,11 +47,11 @@ export function maybeMutateReactNativeOptions(
47
47
  }
48
48
 
49
49
  /***********************************************
50
- * @prop *
50
+ * @nativeMapping *
51
51
  ***********************************************/
52
52
 
53
- function isPropAtRule(rule: Rule | PropAtRule): rule is PropAtRule {
54
- return rule.type === "unknown" && rule.value.name === "prop";
53
+ function isNativeMappingAtRule(rule: Rule | PropAtRule): rule is PropAtRule {
54
+ return rule.type === "unknown" && rule.value.name === "nativeMapping";
55
55
  }
56
56
 
57
57
  export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
@@ -71,14 +71,14 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
71
71
  if (!rules) return mapping;
72
72
 
73
73
  for (const rule of rules) {
74
- if (!isPropAtRule(rule)) continue;
74
+ if (!isNativeMappingAtRule(rule)) continue;
75
75
 
76
76
  if (rule.value.prelude.length > 0) {
77
77
  const prelude = rule.value.prelude.filter((item) => {
78
78
  return item.value.type !== "white-space";
79
79
  });
80
80
 
81
- propAtRuleBlock(prelude, mapping);
81
+ nativeMappingAtRuleBlock(prelude, mapping);
82
82
  } else if (rule.value.block) {
83
83
  // Remove all whitespace tokens
84
84
  const blocks = rule.value.block.filter((item) => {
@@ -91,7 +91,7 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
91
91
  });
92
92
 
93
93
  for (const block of blockRules) {
94
- propAtRuleBlock(block, mapping);
94
+ nativeMappingAtRuleBlock(block, mapping);
95
95
  }
96
96
  }
97
97
  }
@@ -99,7 +99,7 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
99
99
  return mapping;
100
100
  }
101
101
 
102
- function propAtRuleBlock(
102
+ function nativeMappingAtRuleBlock(
103
103
  token: Extract<TokenOrValue, { type: "token" }>[],
104
104
  mapping: StyleRuleMapping = {},
105
105
  ): StyleRuleMapping {
@@ -107,7 +107,7 @@ function propAtRuleBlock(
107
107
  return item.value.type === "colon";
108
108
  });
109
109
 
110
- // @props <to>; (has no from value)
110
+ // @nativeMapping <to>; (has no from value)
111
111
  if (!to) {
112
112
  to = from;
113
113
  from = [
@@ -128,10 +128,10 @@ function propAtRuleBlock(
128
128
  return mapping;
129
129
  }
130
130
 
131
- mapping[toRNProperty(fromToken.value.value)] = to.flatMap((item, index) => {
131
+ let value: string | string[] = to.flatMap((item, index) => {
132
132
  switch (item.value.type) {
133
133
  case "delim":
134
- return index === 0 && item.value.value === "*" ? ["*"] : [];
134
+ return index === 0 && item.value.value === "&" ? ["&"] : [];
135
135
  case "ident":
136
136
  return item.value.value.split(".").map((part) => toRNProperty(part));
137
137
  default:
@@ -139,5 +139,11 @@ function propAtRuleBlock(
139
139
  }
140
140
  });
141
141
 
142
+ if (value.length === 2 && value[0] === "&" && value[1]) {
143
+ value = value[1];
144
+ }
145
+
146
+ mapping[toRNProperty(fromToken.value.value)] = value;
147
+
142
148
  return mapping;
143
149
  }
@@ -1984,11 +1984,11 @@ export function parseTextShadow(
1984
1984
  parseColor(textShadow.color, builder),
1985
1985
  );
1986
1986
  builder.addDescriptor(
1987
- "*.textShadowOffset.width",
1987
+ "&.textShadowOffset.width",
1988
1988
  parseLength(textShadow.xOffset, builder),
1989
1989
  );
1990
1990
  builder.addDescriptor(
1991
- "*.textShadowOffset.height",
1991
+ "&.textShadowOffset.height",
1992
1992
  parseLength(textShadow.yOffset, builder),
1993
1993
  );
1994
1994
  builder.addDescriptor(
@@ -2374,27 +2374,27 @@ export function parseBoxShadow(
2374
2374
  ) {
2375
2375
  for (const [index, shadow] of value.entries()) {
2376
2376
  builder.addDescriptor(
2377
- `*.boxShadow.[${index}].color`,
2377
+ `&.boxShadow.[${index}].color`,
2378
2378
  parseColor(shadow.color, builder),
2379
2379
  );
2380
2380
  builder.addDescriptor(
2381
- `*.boxShadow.[${index}].offsetX`,
2381
+ `&.boxShadow.[${index}].offsetX`,
2382
2382
  parseLength(shadow.xOffset, builder),
2383
2383
  );
2384
2384
  builder.addDescriptor(
2385
- `*.boxShadow.[${index}].offsetY`,
2385
+ `&.boxShadow.[${index}].offsetY`,
2386
2386
  parseLength(shadow.yOffset, builder),
2387
2387
  );
2388
2388
  builder.addDescriptor(
2389
- `*.boxShadow.[${index}].blurRadius`,
2389
+ `&.boxShadow.[${index}].blurRadius`,
2390
2390
  parseLength(shadow.blur, builder),
2391
2391
  );
2392
2392
  builder.addDescriptor(
2393
- `*.boxShadow.[${index}].spreadDistance`,
2393
+ `&.boxShadow.[${index}].spreadDistance`,
2394
2394
  parseLength(shadow.spread, builder),
2395
2395
  );
2396
2396
  builder.addDescriptor(
2397
- `*.boxShadow.[${index}].inset`,
2397
+ `&.boxShadow.[${index}].inset`,
2398
2398
  shadow.inset ? true : undefined,
2399
2399
  );
2400
2400
  }
@@ -3088,7 +3088,7 @@ function parseObjectFit(
3088
3088
  builder: StylesheetBuilder,
3089
3089
  ) {
3090
3090
  builder.addMapping({
3091
- "object-fit": "contentFit",
3091
+ "object-fit": ["contentFit"],
3092
3092
  });
3093
3093
  builder.addDescriptor(
3094
3094
  "object-fit",
@@ -3101,7 +3101,7 @@ function parseObjectPosition(
3101
3101
  builder: StylesheetBuilder,
3102
3102
  ) {
3103
3103
  builder.addMapping({
3104
- "object-position": "contentPosition",
3104
+ "object-position": ["contentPosition"],
3105
3105
  });
3106
3106
  builder.addDescriptor("object-position", [
3107
3107
  {},
@@ -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
 
@@ -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
  }
@@ -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;
@@ -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;
@@ -7,16 +7,19 @@ 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 RNTouchableHighlight> = {
13
15
  className: "style",
14
16
  };
15
17
 
16
- export function TouchableHighlight(
17
- props: StyledProps<TouchableHighlightProps, typeof mapping>,
18
- ) {
19
- return useCssElement(RNTouchableHighlight, props, mapping);
20
- }
18
+ export const TouchableHighlight = copyComponentProperties(
19
+ RNTouchableHighlight,
20
+ (props: StyledProps<TouchableHighlightProps, typeof mapping>) => {
21
+ return useCssElement(RNTouchableHighlight, props, mapping);
22
+ },
23
+ );
21
24
 
22
25
  export default TouchableHighlight;
@@ -7,16 +7,19 @@ 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 RNTouchableOpacity> = {
13
15
  className: "style",
14
16
  };
15
17
 
16
- export function TouchableOpacity(
17
- props: StyledProps<TouchableOpacityProps, typeof mapping>,
18
- ) {
19
- return useCssElement(RNTouchableOpacity, props, mapping);
20
- }
18
+ export const TouchableOpacity = copyComponentProperties(
19
+ RNTouchableOpacity,
20
+ (props: StyledProps<TouchableOpacityProps, typeof mapping>) => {
21
+ return useCssElement(RNTouchableOpacity, props, mapping);
22
+ },
23
+ );
21
24
 
22
25
  export default TouchableOpacity;
@@ -7,16 +7,19 @@ 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 RNTouchableWithoutFeedback> = {
13
15
  className: "style",
14
16
  };
15
17
 
16
- export function TouchableWithoutFeedback(
17
- props: StyledProps<TouchableWithoutFeedbackProps, typeof mapping>,
18
- ) {
19
- return useCssElement(RNTouchableWithoutFeedback, props, mapping);
20
- }
18
+ export const TouchableWithoutFeedback = copyComponentProperties(
19
+ RNTouchableWithoutFeedback,
20
+ (props: StyledProps<TouchableWithoutFeedbackProps, typeof mapping>) => {
21
+ return useCssElement(RNTouchableWithoutFeedback, props, mapping);
22
+ },
23
+ );
21
24
 
22
25
  export default TouchableWithoutFeedback;
@@ -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 RNView>;
12
14
 
13
- export function View(props: StyledProps<ViewProps, typeof mapping>) {
14
- return useCssElement(RNView, props, mapping);
15
- }
15
+ export const View = copyComponentProperties(
16
+ RNView,
17
+ (props: StyledProps<ViewProps, typeof mapping>) => {
18
+ return useCssElement(RNView, props, mapping);
19
+ },
20
+ );
16
21
 
17
22
  export default View;
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from "react";
1
2
  import {
2
3
  VirtualizedList as RNVirtualizedList,
3
4
  type VirtualizedListProps,
@@ -7,7 +8,9 @@ import {
7
8
  useCssElement,
8
9
  type StyledConfiguration,
9
10
  type StyledProps,
10
- } from "../runtime";
11
+ } from "react-native-css";
12
+
13
+ import { copyComponentProperties } from "./copyComponentProperties";
11
14
 
12
15
  const mapping: StyledConfiguration<typeof RNVirtualizedList> = {
13
16
  className: "style",
@@ -16,10 +19,19 @@ const mapping: StyledConfiguration<typeof RNVirtualizedList> = {
16
19
  contentContainerClassName: "contentContainerStyle",
17
20
  };
18
21
 
19
- export function VirtualizedList<ItemT>(
20
- props: StyledProps<VirtualizedListProps<ItemT>, typeof mapping>,
21
- ) {
22
- return useCssElement(RNVirtualizedList, props, mapping);
23
- }
22
+ export const VirtualizedList = copyComponentProperties(
23
+ RNVirtualizedList,
24
+ function <ItemT>(
25
+ props: StyledProps<VirtualizedListProps<ItemT>, typeof mapping>,
26
+ ) {
27
+ return useCssElement(RNVirtualizedList, props, mapping);
28
+ },
29
+ ) as unknown as typeof RNVirtualizedList &
30
+ (<ItemT>(
31
+ props: StyledProps<
32
+ VirtualizedListProps<ItemT>,
33
+ StyledConfiguration<typeof RNVirtualizedList>
34
+ >,
35
+ ) => ReactNode);
24
36
 
25
37
  export default VirtualizedList;
@@ -0,0 +1,21 @@
1
+ import type { ComponentType } from "react";
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
+ type AnyComponent = ComponentType<any>;
5
+
6
+ export function copyComponentProperties<T extends AnyComponent>(
7
+ BaseComponent: T,
8
+ Component: AnyComponent,
9
+ ) {
10
+ for (const [key, value] of Object.entries(BaseComponent)) {
11
+ if (key === "$$typeof" || key === "render" || key === "contextType") {
12
+ continue;
13
+ }
14
+
15
+ (Component as unknown as Record<string, unknown>)[key] = value;
16
+ }
17
+
18
+ Component.displayName = BaseComponent.displayName;
19
+
20
+ return Component as unknown as T;
21
+ }