react-native-css 0.0.0-nightly.99fdf44 → 0.0.0-nightly.9e1cae4

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 (397) hide show
  1. package/README.md +5 -5
  2. package/dist/commonjs/compiler/atRules.js +17 -17
  3. package/dist/commonjs/compiler/atRules.js.map +1 -1
  4. package/dist/commonjs/compiler/declarations.js +61 -10
  5. package/dist/commonjs/compiler/declarations.js.map +1 -1
  6. package/dist/commonjs/compiler/keyframes.js +1 -1
  7. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  8. package/dist/commonjs/compiler/lightningcss-loader.js +12 -2
  9. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  10. package/dist/commonjs/compiler/stylesheet.js +2 -5
  11. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  12. package/dist/commonjs/compiler/supports.js +3 -1
  13. package/dist/commonjs/compiler/supports.js.map +1 -1
  14. package/dist/commonjs/components/ActivityIndicator.js +6 -6
  15. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  16. package/dist/commonjs/components/Button.js +6 -6
  17. package/dist/commonjs/components/Button.js.map +1 -1
  18. package/dist/commonjs/components/FlatList.js +6 -6
  19. package/dist/commonjs/components/FlatList.js.map +1 -1
  20. package/dist/commonjs/components/Image.js +6 -6
  21. package/dist/commonjs/components/Image.js.map +1 -1
  22. package/dist/commonjs/components/ImageBackground.js +6 -6
  23. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  24. package/dist/commonjs/components/KeyboardAvoidingView.js +6 -6
  25. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  26. package/dist/commonjs/components/Pressable.js +6 -6
  27. package/dist/commonjs/components/Pressable.js.map +1 -1
  28. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  29. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  30. package/dist/commonjs/components/ScrollView.js +6 -6
  31. package/dist/commonjs/components/ScrollView.js.map +1 -1
  32. package/dist/commonjs/components/Switch.js +6 -6
  33. package/dist/commonjs/components/Switch.js.map +1 -1
  34. package/dist/commonjs/components/Text.js +6 -6
  35. package/dist/commonjs/components/Text.js.map +1 -1
  36. package/dist/commonjs/components/TextInput.js +6 -6
  37. package/dist/commonjs/components/TextInput.js.map +1 -1
  38. package/dist/commonjs/components/TouchableHighlight.js +6 -6
  39. package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
  40. package/dist/commonjs/components/TouchableOpacity.js +6 -6
  41. package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
  42. package/dist/commonjs/components/TouchableWithoutFeedback.js +6 -6
  43. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
  44. package/dist/commonjs/components/View.js +6 -6
  45. package/dist/commonjs/components/View.js.map +1 -1
  46. package/dist/commonjs/components/VirtualizedList.js +6 -6
  47. package/dist/commonjs/components/VirtualizedList.js.map +1 -1
  48. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  49. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  50. package/dist/commonjs/components/index.cjs +265 -0
  51. package/dist/commonjs/components/index.cjs.map +1 -0
  52. package/dist/commonjs/components/index.js.map +1 -1
  53. package/dist/commonjs/jest/index.js +1 -1
  54. package/dist/commonjs/jest/index.js.map +1 -1
  55. package/dist/commonjs/metro/index.js +8 -118
  56. package/dist/commonjs/metro/index.js.map +1 -1
  57. package/dist/commonjs/metro/metro-transformer.js +8 -1
  58. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  59. package/dist/commonjs/{native/metro.js → metro/override.js} +1 -1
  60. package/dist/commonjs/{native/metro.js.map → metro/override.js.map} +1 -1
  61. package/dist/commonjs/metro/resolver.js +15 -22
  62. package/dist/commonjs/metro/resolver.js.map +1 -1
  63. package/dist/commonjs/native/api.js +5 -1
  64. package/dist/commonjs/native/api.js.map +1 -1
  65. package/dist/commonjs/native/index.js +8 -8
  66. package/dist/commonjs/native/index.js.map +1 -1
  67. package/dist/commonjs/native/react/useNativeCss.js +11 -5
  68. package/dist/commonjs/native/react/useNativeCss.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/functions/color-mix.js +50 -0
  73. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  74. package/dist/commonjs/native/styles/functions/index.js +11 -0
  75. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  76. package/dist/commonjs/native/styles/index.js +249 -19
  77. package/dist/commonjs/native/styles/index.js.map +1 -1
  78. package/dist/commonjs/native/styles/resolve.js +0 -1
  79. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  80. package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
  81. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  82. package/dist/commonjs/web/api.js +6 -3
  83. package/dist/commonjs/web/api.js.map +1 -1
  84. package/dist/module/compiler/atRules.js +17 -17
  85. package/dist/module/compiler/atRules.js.map +1 -1
  86. package/dist/module/compiler/declarations.js +60 -10
  87. package/dist/module/compiler/declarations.js.map +1 -1
  88. package/dist/module/compiler/keyframes.js +1 -1
  89. package/dist/module/compiler/keyframes.js.map +1 -1
  90. package/dist/module/compiler/lightningcss-loader.js +12 -2
  91. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  92. package/dist/module/compiler/stylesheet.js +2 -5
  93. package/dist/module/compiler/stylesheet.js.map +1 -1
  94. package/dist/module/compiler/supports.js +3 -1
  95. package/dist/module/compiler/supports.js.map +1 -1
  96. package/dist/module/components/ActivityIndicator.js +4 -3
  97. package/dist/module/components/ActivityIndicator.js.map +1 -1
  98. package/dist/module/components/Button.js +4 -3
  99. package/dist/module/components/Button.js.map +1 -1
  100. package/dist/module/components/FlatList.js +4 -3
  101. package/dist/module/components/FlatList.js.map +1 -1
  102. package/dist/module/components/Image.js +4 -3
  103. package/dist/module/components/Image.js.map +1 -1
  104. package/dist/module/components/ImageBackground.js +4 -3
  105. package/dist/module/components/ImageBackground.js.map +1 -1
  106. package/dist/module/components/KeyboardAvoidingView.js +4 -3
  107. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  108. package/dist/module/components/Pressable.js +4 -3
  109. package/dist/module/components/Pressable.js.map +1 -1
  110. package/dist/module/components/SafeAreaProvider.js +4 -0
  111. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  112. package/dist/module/components/ScrollView.js +4 -3
  113. package/dist/module/components/ScrollView.js.map +1 -1
  114. package/dist/module/components/Switch.js +4 -3
  115. package/dist/module/components/Switch.js.map +1 -1
  116. package/dist/module/components/Text.js +4 -3
  117. package/dist/module/components/Text.js.map +1 -1
  118. package/dist/module/components/TextInput.js +4 -3
  119. package/dist/module/components/TextInput.js.map +1 -1
  120. package/dist/module/components/TouchableHighlight.js +4 -3
  121. package/dist/module/components/TouchableHighlight.js.map +1 -1
  122. package/dist/module/components/TouchableOpacity.js +4 -3
  123. package/dist/module/components/TouchableOpacity.js.map +1 -1
  124. package/dist/module/components/TouchableWithoutFeedback.js +4 -3
  125. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
  126. package/dist/module/components/View.js +4 -3
  127. package/dist/module/components/View.js.map +1 -1
  128. package/dist/module/components/VirtualizedList.js +4 -3
  129. package/dist/module/components/VirtualizedList.js.map +1 -1
  130. package/dist/module/components/copyComponentProperties.js +15 -0
  131. package/dist/module/components/copyComponentProperties.js.map +1 -0
  132. package/dist/module/components/index.cjs +265 -0
  133. package/dist/module/components/index.cjs.map +1 -0
  134. package/dist/module/components/index.js.map +1 -1
  135. package/dist/module/jest/index.js +1 -1
  136. package/dist/module/jest/index.js.map +1 -1
  137. package/dist/module/metro/index.js +8 -117
  138. package/dist/module/metro/index.js.map +1 -1
  139. package/dist/module/metro/metro-transformer.js +8 -1
  140. package/dist/module/metro/metro-transformer.js.map +1 -1
  141. package/dist/module/metro/override.js +4 -0
  142. package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
  143. package/dist/module/metro/resolver.js +15 -22
  144. package/dist/module/metro/resolver.js.map +1 -1
  145. package/dist/module/native/api.js +4 -1
  146. package/dist/module/native/api.js.map +1 -1
  147. package/dist/module/native/index.js +1 -1
  148. package/dist/module/native/index.js.map +1 -1
  149. package/dist/module/native/react/useNativeCss.js +11 -5
  150. package/dist/module/native/react/useNativeCss.js.map +1 -1
  151. package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
  152. package/dist/module/native/react-native-css-metro-override.js.map +1 -0
  153. package/dist/module/native/styles/calculate-props.js +1 -1
  154. package/dist/module/native/styles/functions/color-mix.js +45 -0
  155. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  156. package/dist/module/native/styles/functions/index.js +1 -0
  157. package/dist/module/native/styles/functions/index.js.map +1 -1
  158. package/dist/module/native/styles/index.js +250 -19
  159. package/dist/module/native/styles/index.js.map +1 -1
  160. package/dist/module/native/styles/resolve.js +0 -1
  161. package/dist/module/native/styles/resolve.js.map +1 -1
  162. package/dist/module/native/styles/shorthands/animation.js +4 -1
  163. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  164. package/dist/module/web/api.js +6 -3
  165. package/dist/module/web/api.js.map +1 -1
  166. package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
  167. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
  168. package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
  169. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  170. package/dist/typescript/commonjs/example/index.d.ts +2 -0
  171. package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
  172. package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
  173. package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
  174. package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
  175. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
  176. package/dist/typescript/commonjs/example/src/App.d.ts +1 -0
  177. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
  178. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -1
  179. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  180. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
  181. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
  182. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  183. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  184. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
  185. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  186. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
  187. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  188. package/dist/typescript/commonjs/src/components/FlatList.d.ts +3 -3
  189. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
  191. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  192. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
  193. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  194. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
  195. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
  197. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  199. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  200. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
  201. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  203. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  204. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  205. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
  207. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
  209. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
  211. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
  213. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  215. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +3 -3
  217. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  219. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  220. package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
  221. package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
  222. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  223. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
  227. package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  229. package/dist/typescript/commonjs/src/native/api.d.ts +2 -2
  230. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
  232. package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -1
  234. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
  236. package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  238. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  239. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  240. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
  244. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  245. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +1 -1
  246. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/web/api.d.ts +2 -2
  248. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  249. package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
  250. package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
  251. package/dist/typescript/module/eslint.config.d.mts +2 -0
  252. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  253. package/dist/typescript/module/example/index.d.ts +2 -0
  254. package/dist/typescript/module/example/index.d.ts.map +1 -0
  255. package/dist/typescript/module/example/metro.config.d.ts +3 -0
  256. package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
  257. package/dist/typescript/module/example/postcss.config.d.mts +7 -0
  258. package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
  259. package/dist/typescript/module/example/src/App.d.ts +1 -0
  260. package/dist/typescript/module/example/src/App.d.ts.map +1 -1
  261. package/dist/typescript/module/src/compiler/declarations.d.ts +2 -1
  262. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  263. package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
  264. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  265. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  266. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  267. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
  268. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  269. package/dist/typescript/module/src/components/Button.d.ts +2 -4
  270. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  271. package/dist/typescript/module/src/components/FlatList.d.ts +3 -3
  272. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  273. package/dist/typescript/module/src/components/Image.d.ts +2 -4
  274. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  275. package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
  276. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  277. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
  278. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  279. package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
  280. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
  281. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  282. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  283. package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
  284. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
  285. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  286. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  287. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  288. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  289. package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
  290. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  291. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
  292. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
  293. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
  294. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
  295. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
  296. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  297. package/dist/typescript/module/src/components/View.d.ts +2 -6
  298. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  299. package/dist/typescript/module/src/components/VirtualizedList.d.ts +3 -3
  300. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
  301. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  302. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  303. package/dist/typescript/module/src/components/index.d.cts +2 -0
  304. package/dist/typescript/module/src/components/index.d.cts.map +1 -0
  305. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  306. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  307. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  308. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  309. package/dist/typescript/module/src/metro/override.d.ts +2 -0
  310. package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
  311. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  312. package/dist/typescript/module/src/native/api.d.ts +2 -2
  313. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  314. package/dist/typescript/module/src/native/index.d.ts +1 -1
  315. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  316. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +1 -1
  317. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  318. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
  319. package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
  320. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  321. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  322. package/dist/typescript/module/src/native/styles/functions/index.d.ts +1 -0
  323. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  324. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  325. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  326. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
  327. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  328. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +1 -1
  329. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  330. package/dist/typescript/module/src/web/api.d.ts +2 -2
  331. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  332. package/package.json +26 -14
  333. package/src/compiler/atRules.ts +19 -18
  334. package/src/compiler/declarations.ts +106 -10
  335. package/src/compiler/keyframes.ts +2 -2
  336. package/src/compiler/lightningcss-loader.ts +20 -1
  337. package/src/compiler/stylesheet.ts +3 -5
  338. package/src/compiler/supports.ts +2 -0
  339. package/src/components/ActivityIndicator.tsx +9 -6
  340. package/src/components/Button.tsx +9 -4
  341. package/src/components/FlatList.tsx +14 -5
  342. package/src/components/Image.tsx +9 -4
  343. package/src/components/ImageBackground.tsx +9 -6
  344. package/src/components/KeyboardAvoidingView.tsx +9 -6
  345. package/src/components/Pressable.tsx +9 -4
  346. package/src/components/SafeAreaProvider.tsx +1 -0
  347. package/src/components/ScrollView.tsx +9 -6
  348. package/src/components/Switch.tsx +9 -4
  349. package/src/components/Text.tsx +9 -4
  350. package/src/components/TextInput.tsx +9 -4
  351. package/src/components/TouchableHighlight.tsx +9 -6
  352. package/src/components/TouchableOpacity.tsx +9 -6
  353. package/src/components/TouchableWithoutFeedback.tsx +9 -6
  354. package/src/components/View.tsx +9 -4
  355. package/src/components/VirtualizedList.tsx +18 -6
  356. package/src/components/copyComponentProperties.ts +21 -0
  357. package/src/components/index.cts +263 -0
  358. package/src/components/{index.tsx → index.ts} +0 -1
  359. package/src/jest/index.ts +2 -1
  360. package/src/metro/index.ts +8 -166
  361. package/src/metro/metro-transformer.ts +15 -1
  362. package/src/metro/override.ts +1 -0
  363. package/src/metro/resolver.ts +29 -28
  364. package/src/native/api.tsx +6 -2
  365. package/src/native/index.ts +1 -2
  366. package/src/native/react/useNativeCss.ts +13 -6
  367. package/src/native/styles/calculate-props.ts +1 -1
  368. package/src/native/styles/functions/color-mix.ts +68 -0
  369. package/src/native/styles/functions/index.ts +1 -0
  370. package/src/native/styles/index.ts +302 -26
  371. package/src/native/styles/resolve.ts +0 -1
  372. package/src/native/styles/shorthands/animation.ts +10 -2
  373. package/src/utilities/dot-notation.types.ts +10 -3
  374. package/src/web/api.tsx +10 -5
  375. package/types.d.ts +3 -0
  376. package/dist/commonjs/poison.pill.js.map +0 -1
  377. package/dist/commonjs/runtime/native/injection.js +0 -2
  378. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  379. package/dist/module/native/metro.js +0 -5
  380. package/dist/module/poison.pill.js.map +0 -1
  381. package/dist/module/runtime/native/injection.js +0 -2
  382. package/dist/module/runtime/native/injection.js.map +0 -1
  383. package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
  384. package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
  385. package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
  386. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
  387. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
  388. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  389. package/dist/typescript/module/src/native/metro.d.ts +0 -2
  390. package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
  391. package/dist/typescript/module/src/poison.pill.d.ts +0 -2
  392. package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
  393. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
  394. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  395. package/src/native/metro.ts +0 -2
  396. package/src/runtime/native/injection.ts +0 -0
  397. /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
package/README.md CHANGED
@@ -117,7 +117,7 @@ export default function App() {
117
117
  return (
118
118
  <MyView className="container">
119
119
  <MyView className="box" />
120
- </View>
120
+ </MyView>
121
121
  );
122
122
  }
123
123
  ```
@@ -176,15 +176,15 @@ export default function App() {
176
176
  > This hook may not support all features of the library.
177
177
  > This hooks does not support container queries or inheritance for children elements.
178
178
 
179
- #### `useNativeCssVariable`
179
+ #### `useNativeVariable`
180
180
 
181
- If you just require a CSS variable value, you can use the `useNativeCssVariable` hook:
181
+ If you just require a CSS variable value, you can use the `useNativeVariable` hook:
182
182
 
183
183
  ```ts
184
- import { useNativeCssVariable } from 'react-native-css';
184
+ import { useNativeVariable } from 'react-native-css';
185
185
 
186
186
  export default function App() {
187
- const myColor = useNativeCssVariable("--my-color");
187
+ const myColor = useNativeVariable("--my-color");
188
188
 
189
189
  return (
190
190
  <View style={{ backgroundColor: myColor }}>
@@ -20,11 +20,11 @@ function maybeMutateReactNativeOptions(rule, _builder) {
20
20
  }
21
21
 
22
22
  /***********************************************
23
- * @prop *
23
+ * @nativeMapping *
24
24
  ***********************************************/
25
25
 
26
- function isPropAtRule(rule) {
27
- return rule.type === "unknown" && rule.value.name === "prop";
26
+ function isNativeMappingAtRule(rule) {
27
+ return rule.type === "unknown" && rule.value.name === "nativeMapping";
28
28
  }
29
29
  function parsePropAtRule(rules) {
30
30
  // Include any default mapping here
@@ -41,12 +41,12 @@ function parsePropAtRule(rules) {
41
41
  };
42
42
  if (!rules) return mapping;
43
43
  for (const rule of rules) {
44
- if (!isPropAtRule(rule)) continue;
44
+ if (!isNativeMappingAtRule(rule)) continue;
45
45
  if (rule.value.prelude.length > 0) {
46
46
  const prelude = rule.value.prelude.filter(item => {
47
47
  return item.value.type !== "white-space";
48
48
  });
49
- propAtRuleBlock(prelude, mapping);
49
+ nativeMappingAtRuleBlock(prelude, mapping);
50
50
  } else if (rule.value.block) {
51
51
  // Remove all whitespace tokens
52
52
  const blocks = rule.value.block.filter(item => {
@@ -58,19 +58,19 @@ function parsePropAtRule(rules) {
58
58
  return item.value.type === "semicolon";
59
59
  });
60
60
  for (const block of blockRules) {
61
- propAtRuleBlock(block, mapping);
61
+ nativeMappingAtRuleBlock(block, mapping);
62
62
  }
63
63
  }
64
64
  }
65
65
  return mapping;
66
66
  }
67
- function propAtRuleBlock(token, mapping = {}) {
67
+ function nativeMappingAtRuleBlock(token, mapping = {}) {
68
68
  let [from, to] = (0, _splitByDelimiter.splitByDelimiter)(token, item => {
69
69
  return item.value.type === "colon";
70
70
  });
71
71
 
72
- // @props <to>; (has no from value)
73
- if (!to && from) {
72
+ // @nativeMapping <to>; (has no from value)
73
+ if (!to) {
74
74
  to = from;
75
75
  from = [{
76
76
  type: "token",
@@ -82,27 +82,27 @@ function propAtRuleBlock(token, mapping = {}) {
82
82
  }
83
83
 
84
84
  // We can only map from a single property
85
- if (!from || from.length !== 1) {
85
+ if (!from || from.length !== 1 || !to) {
86
86
  return mapping;
87
87
  }
88
88
  const fromToken = from[0];
89
89
  if (!fromToken || fromToken.value.type !== "ident") {
90
90
  return mapping;
91
91
  }
92
- if (!to) {
93
- mapping["*"] = (0, _selectors.toRNProperty)(fromToken.value.value);
94
- return mapping;
95
- }
96
- mapping[(0, _selectors.toRNProperty)(fromToken.value.value)] = to.flatMap((item, index) => {
92
+ let value = to.flatMap((item, index) => {
97
93
  switch (item.value.type) {
98
94
  case "delim":
99
- return index === 0 && item.value.value === "*" ? ["*"] : [];
95
+ return index === 0 && item.value.value === "&" ? ["&"] : [];
100
96
  case "ident":
101
- return [(0, _selectors.toRNProperty)(item.value.value)];
97
+ return item.value.value.split(".").map(part => (0, _selectors.toRNProperty)(part));
102
98
  default:
103
99
  return [];
104
100
  }
105
101
  });
102
+ if (value.length === 2 && value[0] === "&" && value[1]) {
103
+ value = value[1];
104
+ }
105
+ mapping[(0, _selectors.toRNProperty)(fromToken.value.value)] = value;
106
106
  return mapping;
107
107
  }
108
108
  //# sourceMappingURL=atRules.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isPropAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","propAtRuleBlock","block","blocks","blockRules","splitByDelimiter","token","from","to","fromToken","toRNProperty","flatMap","index"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAYA;AACA;AACA;;AAcO,SAASE,6BAA6BA,CAC3CC,IAA8B,EAC9BC,QAA2B,EAC3B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;;EAEA;AACF;;AAEA;AACA;AACA;;AAEA,SAASC,YAAYA,CAACL,IAAuB,EAAsB;EACjE,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,MAAM;AAC9D;AAEO,SAASE,eAAeA,CAACC,KAA6B,EAAE;EAC7D;EACA,MAAMC,OAAyB,GAAG;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,oBAAoB,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MACzC;QACE,OAAO,EAAE;IACb;EACF,CAAC,CAAC;EAEF,OAAOK,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isNativeMappingAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","nativeMappingAtRuleBlock","block","blocks","blockRules","splitByDelimiter","token","from","to","fromToken","flatMap","index","split","map","part","toRNProperty"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAYA;AACA;AACA;;AAcO,SAASE,6BAA6BA,CAC3CC,IAA8B,EAC9BC,QAA2B,EAC3B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;;EAEA;AACF;;AAEA;AACA;AACA;;AAEA,SAASC,qBAAqBA,CAACL,IAAuB,EAAsB;EAC1E,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,eAAe;AACvE;AAEO,SAASE,eAAeA,CAACC,KAA6B,EAAE;EAC7D;EACA,MAAMC,OAAyB,GAAG;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,oBAAoB,EAAE,CAAC,eAAe,CAAC;IACvC,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC/C,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;IACpD,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC;IACjD,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,YAAY;EACrD,CAAC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.parseCalcArguments = parseCalcArguments;
27
27
  exports.parseCalcFn = parseCalcFn;
28
28
  exports.parseColor = parseColor;
29
29
  exports.parseColorDeclaration = parseColorDeclaration;
30
+ exports.parseColorMix = parseColorMix;
30
31
  exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
31
32
  exports.parseCustomDeclaration = parseCustomDeclaration;
32
33
  exports.parseDeclaration = parseDeclaration;
@@ -862,6 +863,8 @@ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoPro
862
863
  case "min":
863
864
  case "clamp":
864
865
  return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
866
+ case "color-mix":
867
+ return parseColorMix(tokenOrValue.value.arguments, builder, property);
865
868
  default:
866
869
  {
867
870
  builder.addWarning("value", `${tokenOrValue.value.name}()`);
@@ -1472,8 +1475,8 @@ function parseTextShadow(declaration, builder) {
1472
1475
  return;
1473
1476
  }
1474
1477
  builder.addDescriptor("textShadowColor", parseColor(textShadow.color, builder));
1475
- builder.addDescriptor("*.textShadowOffset.width", parseLength(textShadow.xOffset, builder));
1476
- builder.addDescriptor("*.textShadowOffset.height", parseLength(textShadow.yOffset, builder));
1478
+ builder.addDescriptor("&.textShadowOffset.width", parseLength(textShadow.xOffset, builder));
1479
+ builder.addDescriptor("&.textShadowOffset.height", parseLength(textShadow.yOffset, builder));
1477
1480
  builder.addDescriptor("textShadowRadius", parseLength(textShadow.blur, builder));
1478
1481
  }
1479
1482
  function parseTextDecorationStyle(declaration, builder) {
@@ -1717,12 +1720,12 @@ function parseBoxShadow({
1717
1720
  value
1718
1721
  }, builder) {
1719
1722
  for (const [index, shadow] of value.entries()) {
1720
- builder.addDescriptor(`*.boxShadow.[${index}].color`, parseColor(shadow.color, builder));
1721
- builder.addDescriptor(`*.boxShadow.[${index}].offsetX`, parseLength(shadow.xOffset, builder));
1722
- builder.addDescriptor(`*.boxShadow.[${index}].offsetY`, parseLength(shadow.yOffset, builder));
1723
- builder.addDescriptor(`*.boxShadow.[${index}].blurRadius`, parseLength(shadow.blur, builder));
1724
- builder.addDescriptor(`*.boxShadow.[${index}].spreadDistance`, parseLength(shadow.spread, builder));
1725
- builder.addDescriptor(`*.boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
1723
+ builder.addDescriptor(`&.boxShadow.[${index}].color`, parseColor(shadow.color, builder));
1724
+ builder.addDescriptor(`&.boxShadow.[${index}].offsetX`, parseLength(shadow.xOffset, builder));
1725
+ builder.addDescriptor(`&.boxShadow.[${index}].offsetY`, parseLength(shadow.yOffset, builder));
1726
+ builder.addDescriptor(`&.boxShadow.[${index}].blurRadius`, parseLength(shadow.blur, builder));
1727
+ builder.addDescriptor(`&.boxShadow.[${index}].spreadDistance`, parseLength(shadow.spread, builder));
1728
+ builder.addDescriptor(`&.boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
1726
1729
  }
1727
1730
  }
1728
1731
  function parseBoxSizing(declaration, builder) {
@@ -1914,6 +1917,54 @@ function parseCalcFn(name, tokens, builder, property) {
1914
1917
  }
1915
1918
  return;
1916
1919
  }
1920
+ function parseColorMix(tokens, builder, property) {
1921
+ const [inToken, whitespace, colorSpace, comma, ...rest] = tokens;
1922
+ if (typeof inToken !== "object" || inToken.type !== "token" || inToken.value.type !== "ident" || inToken.value.value !== "in") {
1923
+ return;
1924
+ }
1925
+ if (typeof whitespace !== "object" || whitespace.type !== "token" || whitespace.value.type !== "white-space") {
1926
+ return;
1927
+ }
1928
+ if (typeof comma !== "object" || comma.type !== "token" || comma.value.type !== "comma") {
1929
+ return;
1930
+ }
1931
+ const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
1932
+ if (typeof colorSpaceArg !== "string") {
1933
+ return;
1934
+ }
1935
+ let nextToken = rest.shift();
1936
+ const leftColorArg = parseUnparsed(nextToken, builder, property);
1937
+ if (!leftColorArg) {
1938
+ return;
1939
+ }
1940
+ nextToken = rest.shift();
1941
+ let leftColorPercentage;
1942
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
1943
+ leftColorPercentage = parseUnparsed(nextToken, builder, property);
1944
+ nextToken = rest.shift();
1945
+ }
1946
+ if (typeof nextToken !== "object" || nextToken.type !== "token" || nextToken.value.type !== "comma") {
1947
+ return;
1948
+ }
1949
+ nextToken = rest.shift();
1950
+ const rightColorArg = parseUnparsed(nextToken, builder, property);
1951
+ if (rightColorArg === "transparent") {
1952
+ // Ignore the rest, treat as single color with alpha
1953
+ return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage]];
1954
+ }
1955
+ nextToken = rest.shift();
1956
+ let rightColorPercentage;
1957
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
1958
+ rightColorPercentage = parseUnparsed(nextToken, builder, property);
1959
+ nextToken = rest.shift();
1960
+ }
1961
+
1962
+ // We should have expired all tokens now
1963
+ if (nextToken) {
1964
+ return;
1965
+ }
1966
+ return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage, rightColorArg, rightColorPercentage]];
1967
+ }
1917
1968
  function parseCalcArguments([...args], builder, property) {
1918
1969
  const parsed = [];
1919
1970
  for (const arg of args) {
@@ -2223,13 +2274,13 @@ function parseGradientItem(item, builder) {
2223
2274
  }
2224
2275
  function parseObjectFit(declaration, builder) {
2225
2276
  builder.addMapping({
2226
- "object-fit": "contentFit"
2277
+ "object-fit": ["contentFit"]
2227
2278
  });
2228
2279
  builder.addDescriptor("object-fit", parseUnparsed(declaration.value, builder, "object-fit"));
2229
2280
  }
2230
2281
  function parseObjectPosition(declaration, builder) {
2231
2282
  builder.addMapping({
2232
- "object-position": "contentPosition"
2283
+ "object-position": ["contentPosition"]
2233
2284
  });
2234
2285
  builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
2235
2286
  }