react-native-css 3.0.6 → 3.1.0-rc.0

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 (483) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/commonjs/babel/import-plugin.js +9 -3
  3. package/dist/commonjs/babel/import-plugin.js.map +1 -1
  4. package/dist/commonjs/babel/react-native-web.js +16 -3
  5. package/dist/commonjs/babel/react-native-web.js.map +1 -1
  6. package/dist/commonjs/babel/react-native.js +7 -2
  7. package/dist/commonjs/babel/react-native.js.map +1 -1
  8. package/dist/commonjs/compiler/atRules.js +35 -0
  9. package/dist/commonjs/compiler/atRules.js.map +1 -1
  10. package/dist/commonjs/compiler/compiler.js +43 -30
  11. package/dist/commonjs/compiler/compiler.js.map +1 -1
  12. package/dist/commonjs/compiler/container-query.js +6 -1
  13. package/dist/commonjs/compiler/container-query.js.map +1 -1
  14. package/dist/commonjs/compiler/declarations.js +102 -61
  15. package/dist/commonjs/compiler/declarations.js.map +1 -1
  16. package/dist/commonjs/compiler/lightningcss-loader.js +11 -8
  17. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  18. package/dist/commonjs/compiler/media-query.js +16 -6
  19. package/dist/commonjs/compiler/media-query.js.map +1 -1
  20. package/dist/commonjs/compiler/selector-builder.js +13 -3
  21. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  22. package/dist/commonjs/components/FlatList.js +1 -0
  23. package/dist/commonjs/components/FlatList.js.map +1 -1
  24. package/dist/commonjs/components/ImageBackground.js +2 -6
  25. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  26. package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
  27. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  28. package/dist/commonjs/components/index.cjs +46 -1
  29. package/dist/commonjs/components/index.cjs.map +1 -1
  30. package/dist/commonjs/jest/index.js +1 -1
  31. package/dist/commonjs/jest/index.js.map +1 -1
  32. package/dist/commonjs/metro/cache-version.js +43 -0
  33. package/dist/commonjs/metro/cache-version.js.map +1 -0
  34. package/dist/commonjs/metro/index.js +2 -0
  35. package/dist/commonjs/metro/index.js.map +1 -1
  36. package/dist/commonjs/metro/metro-transformer.js +1 -1
  37. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  38. package/dist/commonjs/metro/typescript.js +26 -6
  39. package/dist/commonjs/metro/typescript.js.map +1 -1
  40. package/dist/commonjs/native/api.js +12 -8
  41. package/dist/commonjs/native/api.js.map +1 -1
  42. package/dist/commonjs/native/conditions/attributes.js +16 -9
  43. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  44. package/dist/commonjs/native/conditions/container-query.js +11 -11
  45. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  46. package/dist/commonjs/native/conditions/media-query.js +1 -1
  47. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  48. package/dist/commonjs/native/react/interaction.js +10 -5
  49. package/dist/commonjs/native/react/interaction.js.map +1 -1
  50. package/dist/commonjs/native/react/rules.js +12 -5
  51. package/dist/commonjs/native/react/rules.js.map +1 -1
  52. package/dist/commonjs/native/react/useNativeCss.js +48 -12
  53. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  54. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  55. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  56. package/dist/commonjs/native/reactivity.js +32 -22
  57. package/dist/commonjs/native/reactivity.js.map +1 -1
  58. package/dist/commonjs/native/reanimated.js +15 -3
  59. package/dist/commonjs/native/reanimated.js.map +1 -1
  60. package/dist/commonjs/native/styles/functions/color-mix.js +43 -29
  61. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -1
  62. package/dist/commonjs/native/styles/functions/filters.js +18 -5
  63. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  64. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  65. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  66. package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
  67. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  68. package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
  69. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  70. package/dist/commonjs/native/styles/index.js +140 -14
  71. package/dist/commonjs/native/styles/index.js.map +1 -1
  72. package/dist/commonjs/native/styles/resolve.js +10 -6
  73. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  74. package/dist/commonjs/native/styles/scale-factor.js +13 -0
  75. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  76. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  77. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  78. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  79. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  80. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  81. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  82. package/dist/commonjs/native/styles/variables.js +55 -43
  83. package/dist/commonjs/native/styles/variables.js.map +1 -1
  84. package/dist/commonjs/native-internal/style-collection.js +1 -1
  85. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  86. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  87. package/dist/commonjs/utilities/style-descriptor.js +4 -9
  88. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  89. package/dist/commonjs/web/api.js +1 -1
  90. package/dist/commonjs/web/api.js.map +1 -1
  91. package/dist/commonjs/web/assign-style.js +4 -1
  92. package/dist/commonjs/web/assign-style.js.map +1 -1
  93. package/dist/module/babel/import-plugin.js +11 -5
  94. package/dist/module/babel/import-plugin.js.map +1 -1
  95. package/dist/module/babel/react-native-web.js +16 -4
  96. package/dist/module/babel/react-native-web.js.map +1 -1
  97. package/dist/module/babel/react-native.js +7 -2
  98. package/dist/module/babel/react-native.js.map +1 -1
  99. package/dist/module/compiler/atRules.js +33 -0
  100. package/dist/module/compiler/atRules.js.map +1 -1
  101. package/dist/module/compiler/compiler.js +44 -31
  102. package/dist/module/compiler/compiler.js.map +1 -1
  103. package/dist/module/compiler/container-query.js +6 -1
  104. package/dist/module/compiler/container-query.js.map +1 -1
  105. package/dist/module/compiler/declarations.js +102 -61
  106. package/dist/module/compiler/declarations.js.map +1 -1
  107. package/dist/module/compiler/lightningcss-loader.js +10 -8
  108. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  109. package/dist/module/compiler/media-query.js +16 -6
  110. package/dist/module/compiler/media-query.js.map +1 -1
  111. package/dist/module/compiler/selector-builder.js +13 -3
  112. package/dist/module/compiler/selector-builder.js.map +1 -1
  113. package/dist/module/components/FlatList.js +1 -0
  114. package/dist/module/components/FlatList.js.map +1 -1
  115. package/dist/module/components/ImageBackground.js +2 -6
  116. package/dist/module/components/ImageBackground.js.map +1 -1
  117. package/dist/module/components/KeyboardAvoidingView.js +2 -3
  118. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  119. package/dist/module/components/index.cjs +46 -1
  120. package/dist/module/components/index.cjs.map +1 -1
  121. package/dist/module/jest/index.js +1 -1
  122. package/dist/module/jest/index.js.map +1 -1
  123. package/dist/module/metro/cache-version.js +39 -0
  124. package/dist/module/metro/cache-version.js.map +1 -0
  125. package/dist/module/metro/index.js +2 -0
  126. package/dist/module/metro/index.js.map +1 -1
  127. package/dist/module/metro/metro-transformer.js +1 -1
  128. package/dist/module/metro/metro-transformer.js.map +1 -1
  129. package/dist/module/metro/typescript.js +26 -6
  130. package/dist/module/metro/typescript.js.map +1 -1
  131. package/dist/module/native/api.js +14 -10
  132. package/dist/module/native/api.js.map +1 -1
  133. package/dist/module/native/conditions/attributes.js +16 -9
  134. package/dist/module/native/conditions/attributes.js.map +1 -1
  135. package/dist/module/native/conditions/container-query.js +11 -11
  136. package/dist/module/native/conditions/container-query.js.map +1 -1
  137. package/dist/module/native/conditions/media-query.js +1 -1
  138. package/dist/module/native/conditions/media-query.js.map +1 -1
  139. package/dist/module/native/react/interaction.js +10 -5
  140. package/dist/module/native/react/interaction.js.map +1 -1
  141. package/dist/module/native/react/rules.js +13 -6
  142. package/dist/module/native/react/rules.js.map +1 -1
  143. package/dist/module/native/react/useNativeCss.js +49 -13
  144. package/dist/module/native/react/useNativeCss.js.map +1 -1
  145. package/dist/module/native/react/usePassthrough.js +5 -2
  146. package/dist/module/native/react/usePassthrough.js.map +1 -1
  147. package/dist/module/native/reactivity.js +32 -22
  148. package/dist/module/native/reactivity.js.map +1 -1
  149. package/dist/module/native/reanimated.js +15 -3
  150. package/dist/module/native/reanimated.js.map +1 -1
  151. package/dist/module/native/styles/functions/color-mix.js +43 -29
  152. package/dist/module/native/styles/functions/color-mix.js.map +1 -1
  153. package/dist/module/native/styles/functions/filters.js +16 -4
  154. package/dist/module/native/styles/functions/filters.js.map +1 -1
  155. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  156. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  157. package/dist/module/native/styles/functions/string-functions.js +13 -0
  158. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  159. package/dist/module/native/styles/functions/transform-functions.js +5 -4
  160. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  161. package/dist/module/native/styles/index.js +140 -14
  162. package/dist/module/native/styles/index.js.map +1 -1
  163. package/dist/module/native/styles/resolve.js +10 -6
  164. package/dist/module/native/styles/resolve.js.map +1 -1
  165. package/dist/module/native/styles/scale-factor.js +9 -0
  166. package/dist/module/native/styles/scale-factor.js.map +1 -0
  167. package/dist/module/native/styles/shorthands/animation.js +6 -3
  168. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  169. package/dist/module/native/styles/shorthands/index.js +1 -0
  170. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  171. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  172. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  173. package/dist/module/native/styles/variables.js +55 -43
  174. package/dist/module/native/styles/variables.js.map +1 -1
  175. package/dist/module/native-internal/style-collection.js +1 -1
  176. package/dist/module/native-internal/style-collection.js.map +1 -1
  177. package/dist/module/utilities/dot-notation.types.js +2 -0
  178. package/dist/module/utilities/style-descriptor.js +4 -9
  179. package/dist/module/utilities/style-descriptor.js.map +1 -1
  180. package/dist/module/web/api.js +1 -1
  181. package/dist/module/web/api.js.map +1 -1
  182. package/dist/module/web/assign-style.js +4 -1
  183. package/dist/module/web/assign-style.js.map +1 -1
  184. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  186. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  187. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  188. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  189. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  191. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -2
  192. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  193. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  194. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  195. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  197. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  199. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  200. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
  201. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  203. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  205. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
  206. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  207. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
  209. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  211. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  212. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  213. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/src/native/reactivity.d.ts +7 -3
  217. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  221. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  223. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  224. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
  227. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
  229. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  231. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  232. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  234. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  236. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  239. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
  241. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
  243. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
  245. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  247. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  249. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  250. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  251. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  252. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  253. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  254. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  255. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  256. package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
  257. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  258. package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
  259. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  260. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  261. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  262. package/dist/typescript/module/src/compiler/declarations.d.ts +4 -4
  263. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  264. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  265. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  266. package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
  267. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  268. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  269. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  270. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  271. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  272. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  273. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  274. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  275. package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
  276. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  277. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  278. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  279. package/dist/typescript/module/src/compiler/stylesheet.d.ts +1 -1
  280. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  281. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  282. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  283. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  284. package/dist/typescript/module/src/components/index.d.ts +16 -16
  285. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  286. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
  287. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  288. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  289. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  290. package/dist/typescript/module/src/metro/index.d.ts +1 -1
  291. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  292. package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
  293. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  294. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  295. package/dist/typescript/module/src/native/api.d.ts +5 -9
  296. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  297. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  298. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  299. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  300. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  301. package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
  302. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  303. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  304. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  305. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  306. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  307. package/dist/typescript/module/src/native/index.d.ts +3 -3
  308. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  309. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  310. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  311. package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
  312. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  313. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
  314. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  315. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  316. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  317. package/dist/typescript/module/src/native/reactivity.d.ts +7 -3
  318. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  319. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  320. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
  321. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  322. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  323. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  324. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  325. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  326. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +1 -1
  327. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -1
  328. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  329. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  330. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -8
  331. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  332. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  333. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  334. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  335. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  336. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  337. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  338. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
  339. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  340. package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
  341. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  342. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  343. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  344. package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
  345. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  346. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  347. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  348. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  349. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  350. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  351. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  352. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  353. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  354. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  355. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  356. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  357. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  358. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  359. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  360. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  361. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  362. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  363. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  364. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  365. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  366. package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
  367. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  368. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  369. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  370. package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
  371. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  372. package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
  373. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  374. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  375. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  376. package/dist/typescript/module/src/runtime.d.ts +1 -1
  377. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  378. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  379. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  380. package/dist/typescript/module/src/runtime.types.d.ts +11 -6
  381. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  382. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
  383. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  384. package/dist/typescript/module/src/utilities/index.d.ts +3 -3
  385. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  386. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  387. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  388. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
  389. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  390. package/dist/typescript/module/src/web/api.d.ts +5 -5
  391. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  392. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  393. package/dist/typescript/module/src/web/index.d.ts +3 -3
  394. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  395. package/node/babel.mjs +4 -0
  396. package/node/compiler.mjs +2 -0
  397. package/node/metro.mjs +2 -0
  398. package/package.json +61 -27
  399. package/src/babel/import-plugin.ts +15 -4
  400. package/src/babel/react-native-web.ts +32 -3
  401. package/src/babel/react-native.ts +7 -1
  402. package/src/compiler/atRules.ts +44 -0
  403. package/src/compiler/compiler.ts +73 -49
  404. package/src/compiler/container-query.ts +8 -3
  405. package/src/compiler/declarations.ts +189 -100
  406. package/src/compiler/lightningcss-loader.ts +16 -15
  407. package/src/compiler/media-query.ts +20 -9
  408. package/src/compiler/selector-builder.ts +29 -3
  409. package/src/components/FlatList.tsx +1 -0
  410. package/src/components/ImageBackground.tsx +2 -6
  411. package/src/components/KeyboardAvoidingView.tsx +2 -3
  412. package/src/components/index.cts +46 -1
  413. package/src/jest/index.ts +1 -1
  414. package/src/metro/cache-version.ts +48 -0
  415. package/src/metro/index.ts +2 -0
  416. package/src/metro/metro-transformer.ts +9 -6
  417. package/src/metro/typescript.ts +53 -6
  418. package/src/native/api.tsx +20 -14
  419. package/src/native/conditions/attributes.ts +26 -9
  420. package/src/native/conditions/container-query.ts +11 -9
  421. package/src/native/conditions/media-query.ts +1 -1
  422. package/src/native/react/interaction.ts +11 -6
  423. package/src/native/react/rules.ts +13 -5
  424. package/src/native/react/useNativeCss.ts +54 -14
  425. package/src/native/react/usePassthrough.ts +3 -2
  426. package/src/native/reactivity.ts +42 -24
  427. package/src/native/reanimated.ts +24 -5
  428. package/src/native/styles/functions/color-mix.ts +45 -39
  429. package/src/native/styles/functions/filters.ts +20 -6
  430. package/src/native/styles/functions/numeric-functions.ts +7 -6
  431. package/src/native/styles/functions/string-functions.ts +18 -0
  432. package/src/native/styles/functions/transform-functions.ts +5 -4
  433. package/src/native/styles/index.ts +146 -15
  434. package/src/native/styles/resolve.ts +15 -11
  435. package/src/native/styles/scale-factor.ts +6 -0
  436. package/src/native/styles/shorthands/animation.ts +8 -2
  437. package/src/native/styles/shorthands/index.ts +1 -0
  438. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  439. package/src/native/styles/variables.ts +48 -38
  440. package/src/native-internal/style-collection.ts +1 -1
  441. package/src/runtime.types.ts +17 -15
  442. package/src/utilities/dot-notation.types.ts +4 -3
  443. package/src/utilities/style-descriptor.ts +11 -16
  444. package/src/web/api.tsx +6 -11
  445. package/src/web/assign-style.ts +2 -1
  446. package/types.d.ts +0 -20
  447. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  448. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  449. package/dist/module/compiler/inheritance.test.js +0 -78
  450. package/dist/module/compiler/inheritance.test.js.map +0 -1
  451. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  452. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  453. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  454. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  455. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  456. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  457. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  458. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  459. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  460. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  461. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  462. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  463. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  464. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  465. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  466. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  467. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  468. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  469. package/dist/typescript/module/eslint.config.d.mts +0 -2
  470. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  471. package/dist/typescript/module/example/app.config.d.ts +0 -4
  472. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  473. package/dist/typescript/module/example/index.d.ts +0 -2
  474. package/dist/typescript/module/example/index.d.ts.map +0 -1
  475. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  476. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  477. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  478. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  479. package/dist/typescript/module/example/src/App.d.ts +0 -3
  480. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  481. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  482. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  483. package/src/compiler/inheritance.test.ts +0 -121
@@ -37,6 +37,7 @@ import type {
37
37
  } from "lightningcss";
38
38
 
39
39
  import { isStyleFunction } from "../utilities";
40
+ import { isMappingProperty } from "./atRules";
40
41
  import type {
41
42
  StyleDescriptor,
42
43
  StyleFunction,
@@ -62,12 +63,37 @@ type Parser<T extends Declaration["property"] = Declaration["property"]> = (
62
63
 
63
64
  const propertyRename: Record<string, string> = {
64
65
  "background-image": "experimental_backgroundImage",
66
+ // React Native has no border-inline-* props, but ships the equivalent
67
+ // RTL-aware border-start-* / border-end-* props
68
+ "border-inline-end-color": "border-end-color",
69
+ "border-inline-end-width": "border-end-width",
70
+ "border-inline-start-color": "border-start-color",
71
+ "border-inline-start-width": "border-start-width",
72
+ "border-block-start-width": "border-top-width",
73
+ "border-block-end-width": "border-bottom-width",
74
+ "font-variant-caps": "font-variant",
65
75
  };
66
76
 
77
+ // React Native only supports a uniform borderStyle, so per-side border
78
+ // styles have no native equivalent and are dropped. "solid" is dropped
79
+ // silently as it matches React Native's default rendering.
80
+ const unsupportedLogicalStyles = new Set([
81
+ "border-inline-style",
82
+ "border-inline-start-style",
83
+ "border-inline-end-style",
84
+ "border-block-style",
85
+ "border-block-start-style",
86
+ "border-block-end-style",
87
+ ]);
88
+
67
89
  const unparsedRuntimeParsing = new Set([
68
90
  "animation",
91
+ "animation-name",
69
92
  "border",
93
+ "border-block-width",
94
+ "border-inline-width",
70
95
  "box-shadow",
96
+ "filter",
71
97
  "line-height",
72
98
  "rotate",
73
99
  "scale",
@@ -101,10 +127,11 @@ const parsers: {
101
127
  "border-block-color": parseBorderColor,
102
128
  "border-block-end": parseBorderBlockEnd,
103
129
  "border-block-end-color": parseColorDeclaration,
130
+ "border-block-end-style": parseBorderInlineStyle,
104
131
  "border-block-end-width": parseBorderSideWidthDeclaration,
105
132
  "border-block-start": parseBorderBlockStart,
106
133
  "border-block-start-color": parseColorDeclaration,
107
- "border-block-start-style": parseBorderStyleDeclaration,
134
+ "border-block-start-style": parseBorderInlineStyle,
108
135
  "border-block-start-width": parseBorderSideWidthDeclaration,
109
136
  "border-block-style": parseBorderBlockStyle,
110
137
  "border-block-width": parseBorderBlockWidth,
@@ -320,11 +347,11 @@ function parseInsetInline(
320
347
  builder: StylesheetBuilder,
321
348
  ) {
322
349
  builder.addShorthand("inset-inline", {
323
- "inset-block-start": parseLengthPercentageOrAuto(
350
+ "inset-inline-start": parseLengthPercentageOrAuto(
324
351
  value.inlineStart,
325
352
  builder,
326
353
  ),
327
- "inset-block-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
354
+ "inset-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
328
355
  });
329
356
  }
330
357
 
@@ -381,14 +408,14 @@ function parseBorderColor(
381
408
  const start = parseColor(declaration.value.start, builder);
382
409
  const end = parseColor(declaration.value.end, builder);
383
410
 
384
- if (start === end) {
411
+ if (declaration.property === "border-inline-color") {
412
+ builder.addDescriptor("border-start-color", start);
413
+ builder.addDescriptor("border-end-color", end);
414
+ } else if (start === end) {
385
415
  builder.addDescriptor(declaration.property, start);
386
- } else if (declaration.property === "border-block-color") {
416
+ } else {
387
417
  builder.addDescriptor("border-top-color", start);
388
418
  builder.addDescriptor("border-bottom-color", end);
389
- } else {
390
- builder.addDescriptor("border-left-color", start);
391
- builder.addDescriptor("border-right-color", end);
392
419
  }
393
420
  }
394
421
  }
@@ -437,13 +464,13 @@ function parseBorderBlock(
437
464
  builder: StylesheetBuilder,
438
465
  ) {
439
466
  builder.addDescriptor("border-block-color", parseColor(value.color, builder));
440
- builder.addDescriptor(
441
- "border-block-width",
442
- parseBorderSideWidth(value.width, builder),
443
- );
444
- builder.addDescriptor(
445
- "border-block-style",
467
+ const width = parseBorderSideWidth(value.width, builder);
468
+ builder.addDescriptor("border-top-width", width);
469
+ builder.addDescriptor("border-bottom-width", width);
470
+ dropUnsupportedInlineStyle(
446
471
  parseBorderStyle(value.style, builder),
472
+ builder,
473
+ "border-block-style",
447
474
  );
448
475
  }
449
476
 
@@ -456,9 +483,14 @@ function parseBorderBlockStart(
456
483
  parseColor(value.color, builder),
457
484
  );
458
485
  builder.addDescriptor(
459
- "border-block-start-width",
486
+ "border-top-width",
460
487
  parseBorderSideWidth(value.width, builder),
461
488
  );
489
+ dropUnsupportedInlineStyle(
490
+ parseBorderStyle(value.style, builder),
491
+ builder,
492
+ "border-block-start-style",
493
+ );
462
494
  }
463
495
 
464
496
  function parseBorderBlockEnd(
@@ -470,26 +502,31 @@ function parseBorderBlockEnd(
470
502
  parseColor(value.color, builder),
471
503
  );
472
504
  builder.addDescriptor(
473
- "border-block-end-width",
505
+ "border-bottom-width",
474
506
  parseBorderSideWidth(value.width, builder),
475
507
  );
508
+ dropUnsupportedInlineStyle(
509
+ parseBorderStyle(value.style, builder),
510
+ builder,
511
+ "border-block-end-style",
512
+ );
476
513
  }
477
514
 
478
515
  function parseBorderInline(
479
516
  { value }: DeclarationType<"border-inline">,
480
517
  builder: StylesheetBuilder,
481
518
  ) {
482
- builder.addDescriptor(
483
- "border-inline-color",
484
- parseColor(value.color, builder),
485
- );
486
- builder.addDescriptor(
487
- "border-inline-width",
488
- parseBorderSideWidth(value.width, builder),
489
- );
490
- builder.addDescriptor(
491
- "border-inline-style",
519
+ const color = parseColor(value.color, builder);
520
+ const width = parseBorderSideWidth(value.width, builder);
521
+
522
+ builder.addDescriptor("border-start-color", color);
523
+ builder.addDescriptor("border-end-color", color);
524
+ builder.addDescriptor("border-start-width", width);
525
+ builder.addDescriptor("border-end-width", width);
526
+ dropUnsupportedInlineStyle(
492
527
  parseBorderStyle(value.style, builder),
528
+ builder,
529
+ "border-inline-style",
493
530
  );
494
531
  }
495
532
 
@@ -497,17 +534,15 @@ function parseBorderInlineStart(
497
534
  { value }: DeclarationType<"border-inline-start">,
498
535
  builder: StylesheetBuilder,
499
536
  ) {
537
+ builder.addDescriptor("border-start-color", parseColor(value.color, builder));
500
538
  builder.addDescriptor(
501
- "border-inline-start-color",
502
- parseColor(value.color, builder),
503
- );
504
- builder.addDescriptor(
505
- "border-inline-start-width",
539
+ "border-start-width",
506
540
  parseBorderSideWidth(value.width, builder),
507
541
  );
508
- builder.addDescriptor(
509
- "border-inline-start-style",
542
+ dropUnsupportedInlineStyle(
510
543
  parseBorderStyle(value.style, builder),
544
+ builder,
545
+ "border-inline-start-style",
511
546
  );
512
547
  }
513
548
 
@@ -515,17 +550,15 @@ function parseBorderInlineEnd(
515
550
  { value }: DeclarationType<"border-inline-end">,
516
551
  builder: StylesheetBuilder,
517
552
  ) {
553
+ builder.addDescriptor("border-end-color", parseColor(value.color, builder));
518
554
  builder.addDescriptor(
519
- "border-inline-end-color",
520
- parseColor(value.color, builder),
521
- );
522
- builder.addDescriptor(
523
- "border-inline-end-width",
555
+ "border-end-width",
524
556
  parseBorderSideWidth(value.width, builder),
525
557
  );
526
- builder.addDescriptor(
527
- "border-inline-end-style",
558
+ dropUnsupportedInlineStyle(
528
559
  parseBorderStyle(value.style, builder),
560
+ builder,
561
+ "border-inline-end-style",
529
562
  );
530
563
  }
531
564
 
@@ -534,9 +567,13 @@ export function parseBorderInlineWidth(
534
567
  builder: StylesheetBuilder,
535
568
  ) {
536
569
  builder.addDescriptor(
537
- "border-inline-width",
570
+ "border-start-width",
538
571
  parseBorderSideWidth(declaration.value.start, builder),
539
572
  );
573
+ builder.addDescriptor(
574
+ "border-end-width",
575
+ parseBorderSideWidth(declaration.value.end, builder),
576
+ );
540
577
  }
541
578
 
542
579
  export function parseBorderInlineStyle(
@@ -544,31 +581,41 @@ export function parseBorderInlineStyle(
544
581
  | "border-inline-style"
545
582
  | "border-inline-start-style"
546
583
  | "border-inline-end-style"
584
+ | "border-block-start-style"
585
+ | "border-block-end-style"
547
586
  >,
548
587
  builder: StylesheetBuilder,
549
588
  ) {
550
589
  if (typeof declaration.value === "string") {
551
- builder.addDescriptor(
552
- declaration.property,
590
+ dropUnsupportedInlineStyle(
553
591
  parseBorderStyle(declaration.value, builder),
554
- );
555
- } else if (declaration.value.start === declaration.value.end) {
556
- builder.addDescriptor(
592
+ builder,
557
593
  declaration.property,
558
- parseBorderStyle(declaration.value.start, builder),
559
594
  );
560
595
  } else {
561
- builder.addDescriptor(
562
- "border-inline-start-style",
596
+ dropUnsupportedInlineStyle(
563
597
  parseBorderStyle(declaration.value.start, builder),
598
+ builder,
599
+ "border-inline-start-style",
564
600
  );
565
- builder.addDescriptor(
566
- "border-inline-end-style",
601
+ dropUnsupportedInlineStyle(
567
602
  parseBorderStyle(declaration.value.end, builder),
603
+ builder,
604
+ "border-inline-end-style",
568
605
  );
569
606
  }
570
607
  }
571
608
 
609
+ function dropUnsupportedInlineStyle(
610
+ style: string | undefined,
611
+ builder: StylesheetBuilder,
612
+ property: string,
613
+ ) {
614
+ if (style !== undefined && style !== "solid") {
615
+ builder.addWarning("style", property, style);
616
+ }
617
+ }
618
+
572
619
  function parseFlexFlow(
573
620
  { value }: DeclarationType<"flex-flow">,
574
621
  builder: StylesheetBuilder,
@@ -838,7 +885,7 @@ export function parseScaleValue(
838
885
  builder: StylesheetBuilder,
839
886
  ): StyleDescriptor {
840
887
  if (translate === "none") {
841
- return 0;
888
+ return 1;
842
889
  }
843
890
 
844
891
  return parseLength(translate[prop], builder);
@@ -916,6 +963,11 @@ export function parseUnparsedDeclaration(
916
963
  return;
917
964
  }
918
965
 
966
+ if (unsupportedLogicalStyles.has(property)) {
967
+ builder.addWarning("property", property);
968
+ return;
969
+ }
970
+
919
971
  builder.setWarningProperty(property);
920
972
 
921
973
  /**
@@ -966,7 +1018,10 @@ export function parseCustomDeclaration(
966
1018
  ) {
967
1019
  const property = declaration.value.name;
968
1020
 
969
- if (property === "-webkit-line-clamp") {
1021
+ if (isMappingProperty(property)) {
1022
+ // Consumed before declarations so property order cannot affect mapping.
1023
+ return;
1024
+ } else if (property === "-webkit-line-clamp") {
970
1025
  builder.addDescriptor(
971
1026
  property,
972
1027
  parseUnparsed(declaration.value.value, builder, property),
@@ -997,6 +1052,18 @@ export function parseCustomDeclaration(
997
1052
  );
998
1053
  } else if (property === "corner-shape") {
999
1054
  parseCornerShape(declaration.value, builder);
1055
+ } else if (property === "font-variant") {
1056
+ const parsedFontVariant = parseFontVariantCaps(
1057
+ parseUnparsed(
1058
+ declaration.value.value,
1059
+ builder,
1060
+ property,
1061
+ ) as FontVariantCaps,
1062
+ builder,
1063
+ );
1064
+ if (parsedFontVariant !== undefined) {
1065
+ builder.addDescriptor(property, parsedFontVariant);
1066
+ }
1000
1067
  } else if (
1001
1068
  validProperties.has(property) ||
1002
1069
  property.startsWith("--") ||
@@ -1594,11 +1661,23 @@ export function parseColorDeclaration(
1594
1661
  builder: StylesheetBuilder,
1595
1662
  ) {
1596
1663
  builder.addDescriptor(
1597
- declaration.property,
1664
+ propertyRename[declaration.property] ?? declaration.property,
1598
1665
  parseColor(declaration.value, builder),
1599
1666
  );
1600
1667
  }
1601
1668
 
1669
+ /**
1670
+ * Lab/LCH/OKLab/OKLCH channels can be `NaN` when lightningcss resolves a
1671
+ * degenerate `color-mix()` at compile time (e.g. mixing black with
1672
+ * `transparent` in oklab yields `NaN` for the a/b chromaticity channels).
1673
+ * Passing `NaN` to colorjs.io produces an invalid string such as
1674
+ * `#NaNNaNNaN80`, which React Native silently discards. Per CSS Color 4 a
1675
+ * missing component is treated as `0`, so coerce `NaN` to `0`.
1676
+ */
1677
+ function nanToZero(value: number): number {
1678
+ return Number.isNaN(value) ? 0 : value;
1679
+ }
1680
+
1602
1681
  export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1603
1682
  if (typeof cssColor === "string") {
1604
1683
  if (namedColors.has(cssColor)) {
@@ -1653,28 +1732,44 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1653
1732
  case "lab":
1654
1733
  color = new Color({
1655
1734
  space: cssColor.type,
1656
- coords: [cssColor.l, cssColor.a, cssColor.b],
1735
+ coords: [
1736
+ nanToZero(cssColor.l),
1737
+ nanToZero(cssColor.a),
1738
+ nanToZero(cssColor.b),
1739
+ ],
1657
1740
  alpha: cssColor.alpha,
1658
1741
  });
1659
1742
  break;
1660
1743
  case "lch":
1661
1744
  color = new Color({
1662
1745
  space: cssColor.type,
1663
- coords: [cssColor.l, cssColor.c, cssColor.h],
1746
+ coords: [
1747
+ nanToZero(cssColor.l),
1748
+ nanToZero(cssColor.c),
1749
+ nanToZero(cssColor.h),
1750
+ ],
1664
1751
  alpha: cssColor.alpha,
1665
1752
  });
1666
1753
  break;
1667
1754
  case "oklab":
1668
1755
  color = new Color({
1669
1756
  space: cssColor.type,
1670
- coords: [cssColor.l, cssColor.a, cssColor.b],
1757
+ coords: [
1758
+ nanToZero(cssColor.l),
1759
+ nanToZero(cssColor.a),
1760
+ nanToZero(cssColor.b),
1761
+ ],
1671
1762
  alpha: cssColor.alpha,
1672
1763
  });
1673
1764
  break;
1674
1765
  case "oklch":
1675
1766
  color = new Color({
1676
1767
  space: cssColor.type,
1677
- coords: [cssColor.l, cssColor.c, cssColor.h],
1768
+ coords: [
1769
+ nanToZero(cssColor.l),
1770
+ nanToZero(cssColor.c),
1771
+ nanToZero(cssColor.h),
1772
+ ],
1678
1773
  alpha: cssColor.alpha,
1679
1774
  });
1680
1775
  break;
@@ -2122,12 +2217,8 @@ export function parseBorderBlockWidth(
2122
2217
  const start = parseBorderSideWidth(declaration.value.start, builder);
2123
2218
  const end = parseBorderSideWidth(declaration.value.end, builder);
2124
2219
 
2125
- if (start === end) {
2126
- builder.addDescriptor("border-block-width", start);
2127
- } else {
2128
- builder.addDescriptor("border-block-start-width", start);
2129
- builder.addDescriptor("border-block-end-width", end);
2130
- }
2220
+ builder.addDescriptor("border-top-width", start);
2221
+ builder.addDescriptor("border-bottom-width", end);
2131
2222
  }
2132
2223
 
2133
2224
  function parseBorderBlockStyle(
@@ -2137,12 +2228,8 @@ function parseBorderBlockStyle(
2137
2228
  const start = parseBorderStyle(declaration.value.start, builder);
2138
2229
  const end = parseBorderStyle(declaration.value.end, builder);
2139
2230
 
2140
- if (start == end) {
2141
- builder.addDescriptor("border-block-style", start);
2142
- } else {
2143
- builder.addDescriptor("border-block-start-style", start);
2144
- builder.addDescriptor("border-block-end-style", end);
2145
- }
2231
+ dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
2232
+ dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
2146
2233
  }
2147
2234
 
2148
2235
  export function parseBorderSideWidthDeclaration(
@@ -2150,7 +2237,7 @@ export function parseBorderSideWidthDeclaration(
2150
2237
  builder: StylesheetBuilder,
2151
2238
  ) {
2152
2239
  builder.addDescriptor(
2153
- declaration.property,
2240
+ propertyRename[declaration.property] ?? declaration.property,
2154
2241
  parseBorderSideWidth(declaration.value, builder),
2155
2242
  );
2156
2243
  }
@@ -2194,12 +2281,10 @@ export function parseLineHeightDeclaration(
2194
2281
  declaration: DeclarationType<"line-height">,
2195
2282
  builder: StylesheetBuilder,
2196
2283
  ) {
2197
- builder.addDescriptor("line-height", [
2198
- {},
2199
- "lineHeight",
2200
- [parseLineHeight(declaration.value, builder)],
2201
- 1,
2202
- ]);
2284
+ builder.addDescriptor(
2285
+ "line-height",
2286
+ parseLineHeight(declaration.value, builder),
2287
+ );
2203
2288
  }
2204
2289
 
2205
2290
  export function parseLineHeight(
@@ -2210,7 +2295,7 @@ export function parseLineHeight(
2210
2295
  case "normal":
2211
2296
  return undefined;
2212
2297
  case "number":
2213
- return [{}, "em", [value.value], 1];
2298
+ return [{}, "em", value.value, 1];
2214
2299
  case "length": {
2215
2300
  const length = value.value;
2216
2301
 
@@ -2640,7 +2725,12 @@ export function parseColorMix(
2640
2725
  builder: StylesheetBuilder,
2641
2726
  property: string,
2642
2727
  ): StyleDescriptor {
2643
- const [inToken, whitespace, colorSpace, comma, ...rest] = tokens;
2728
+ const [inToken, whitespace, colorSpace, comma, ...remaining] = tokens;
2729
+ const rest = remaining.filter(
2730
+ (token) =>
2731
+ token.type !== "token" ||
2732
+ !["white-space", "comment"].includes(token.value.type),
2733
+ );
2644
2734
  if (
2645
2735
  typeof inToken !== "object" ||
2646
2736
  inToken.type !== "token" ||
@@ -2699,11 +2789,6 @@ export function parseColorMix(
2699
2789
 
2700
2790
  const rightColorArg = parseUnparsed(nextToken, builder, property);
2701
2791
 
2702
- if (rightColorArg === "transparent") {
2703
- // Ignore the rest, treat as single color with alpha
2704
- return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage]];
2705
- }
2706
-
2707
2792
  nextToken = rest.shift();
2708
2793
  let rightColorPercentage: StyleDescriptor | undefined;
2709
2794
  if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
@@ -3103,21 +3188,25 @@ function parseBackgroundImage(
3103
3188
  declaration: DeclarationType<"background-image">,
3104
3189
  builder: StylesheetBuilder,
3105
3190
  ) {
3106
- builder.addDescriptor(
3107
- "experimental_backgroundImage",
3108
- declaration.value.flatMap((image): StyleDescriptor[] => {
3109
- switch (image.type) {
3110
- case "gradient": {
3111
- const gradient = parseGradient(image.value, builder);
3112
- return gradient ? [gradient] : [];
3191
+ builder.addDescriptor("experimental_backgroundImage", [
3192
+ {},
3193
+ "join",
3194
+ [
3195
+ declaration.value.flatMap((image): StyleDescriptor[] => {
3196
+ switch (image.type) {
3197
+ case "gradient": {
3198
+ const gradient = parseGradient(image.value, builder);
3199
+ return gradient ? [gradient] : [];
3200
+ }
3201
+ case "none":
3202
+ return ["none"];
3113
3203
  }
3114
- case "none":
3115
- return ["none"];
3116
- }
3117
3204
 
3118
- return [];
3119
- }),
3120
- );
3205
+ return [];
3206
+ }),
3207
+ ", ",
3208
+ ],
3209
+ ]);
3121
3210
  return;
3122
3211
  }
3123
3212
 
@@ -3172,10 +3261,10 @@ function parseGradientItem(
3172
3261
  args.push(parseLength(item.position, builder));
3173
3262
  }
3174
3263
 
3175
- return [{}, "@colorStop", args, 1];
3264
+ return [{}, "colorStop", args, 1];
3176
3265
  }
3177
3266
  case "hint":
3178
- return parseLength(item.value, builder);
3267
+ return [{}, "gradientPosition", parseLength(item.value, builder), 1];
3179
3268
  }
3180
3269
  }
3181
3270
 
@@ -3275,7 +3364,7 @@ function parseFilter(
3275
3364
  } as unknown as StyleDescriptor;
3276
3365
  case "hue-rotate":
3277
3366
  return {
3278
- [value.type]: parseAngle(value.value, builder),
3367
+ [toRNProperty(value.type)]: parseAngle(value.value, builder),
3279
3368
  } as unknown as StyleDescriptor;
3280
3369
  case "drop-shadow":
3281
3370
  return [
@@ -1,4 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-require-imports */
2
+ import { dirname, resolve } from "node:path";
3
+
2
4
  export function lightningcssLoader() {
3
5
  let lightningcssPath: string | undefined;
4
6
 
@@ -33,23 +35,22 @@ export function lightningcssLoader() {
33
35
  lightningcssPath,
34
36
  ) as typeof import("lightningcss");
35
37
 
38
+ let version: unknown;
36
39
  try {
37
- const lightningcssPackageJSONPath = require.resolve("../../package.json", {
38
- paths: [lightningcssPath],
39
- });
40
-
41
- const packageJSON = require(lightningcssPackageJSONPath) as Record<
42
- string,
43
- unknown
44
- >;
45
-
46
- if (packageJSON.version === "1.30.2") {
47
- throw new Error(
48
- "[react-native-css] lightningcss version 1.30.2 has a critical bug that breaks compilation. Please pin the version of lightningcss to 1.30.1; or try upgrading.",
49
- );
50
- }
40
+ // Lightning CSS keeps its entry in node/ and does not export package.json.
41
+ // Resolve relative to the selected copy, not the consumer or this loader.
42
+ const packageJSON = require(
43
+ resolve(dirname(lightningcssPath), "../package.json"),
44
+ ) as Record<string, unknown>;
45
+ version = packageJSON.version;
51
46
  } catch {
52
- // Intentionally left empty
47
+ // Some bundlers do not retain package metadata. Loading remains supported.
48
+ }
49
+
50
+ if (version === "1.30.2") {
51
+ throw new Error(
52
+ "[react-native-css] lightningcss version 1.30.2 has a critical bug that breaks compilation. Please pin the version of lightningcss to 1.30.1; or try upgrading.",
53
+ );
53
54
  }
54
55
 
55
56
  return {
@@ -24,9 +24,10 @@ export function parseMediaQuery(
24
24
  let condition: MediaCondition | undefined;
25
25
 
26
26
  if (query.mediaType) {
27
- // Print is for printing documents
27
+ // Native screens never match print. Negating that media type matches
28
+ // regardless of the remaining feature tests in the same conjunction.
28
29
  if (query.mediaType === "print") {
29
- return;
30
+ return query.qualifier === "not";
30
31
  }
31
32
 
32
33
  // These all/screen are not conditions, they always apply
@@ -40,7 +41,7 @@ export function parseMediaQuery(
40
41
 
41
42
  // If any of these are undefined, the media query is invalid
42
43
  if (!condition || condition.some((v) => v === undefined)) {
43
- return;
44
+ return false;
44
45
  }
45
46
  }
46
47
 
@@ -50,7 +51,8 @@ export function parseMediaQuery(
50
51
  : platformCondition || condition;
51
52
 
52
53
  if (!mediaQuery) {
53
- return;
54
+ // Unqualified all/screen apply; not all and not screen do not.
55
+ return query.qualifier !== "not";
54
56
  }
55
57
 
56
58
  if (query.qualifier === "not") {
@@ -58,6 +60,7 @@ export function parseMediaQuery(
58
60
  }
59
61
 
60
62
  builder.addMediaQuery(mediaQuery);
63
+ return true;
61
64
  }
62
65
 
63
66
  function parseMediaQueryCondition(
@@ -65,15 +68,23 @@ function parseMediaQueryCondition(
65
68
  builder: StylesheetBuilder,
66
69
  ): MediaCondition | undefined {
67
70
  switch (query.type) {
68
- case "feature":
69
- return parseFeature(query.value, builder);
71
+ case "feature": {
72
+ const feature = parseFeature(query.value, builder);
73
+ return feature?.some((value) => value === undefined)
74
+ ? undefined
75
+ : feature;
76
+ }
70
77
  case "not":
71
78
  const mediaQuery = parseMediaQueryCondition(query.value, builder);
72
79
  return mediaQuery ? ["!", mediaQuery] : undefined;
73
80
  case "operation":
74
- const mediaQueries = query.conditions
75
- .map((c) => parseMediaQueryCondition(c, builder))
76
- .filter((v): v is MediaCondition => !!v);
81
+ const parsed = query.conditions.map((c) =>
82
+ parseMediaQueryCondition(c, builder),
83
+ );
84
+ if (query.operator === "and" && parsed.some((c) => !c)) {
85
+ return;
86
+ }
87
+ const mediaQueries = parsed.filter((v): v is MediaCondition => !!v);
77
88
 
78
89
  if (mediaQueries.length === 0) {
79
90
  return;