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
@@ -4,13 +4,28 @@
4
4
 
5
5
  import Color from "colorjs.io";
6
6
  import { isStyleFunction } from "../utilities/index.js";
7
+ import { isMappingProperty } from "./atRules.js";
7
8
  import { parseEasingFunction, parseIterationCount } from "./keyframes.js";
8
9
  import { toRNProperty } from "./selectors.js";
9
10
  const CommaSeparator = Symbol("CommaSeparator");
10
11
  const propertyRename = {
11
- "background-image": "experimental_backgroundImage"
12
+ "background-image": "experimental_backgroundImage",
13
+ // React Native has no border-inline-* props, but ships the equivalent
14
+ // RTL-aware border-start-* / border-end-* props
15
+ "border-inline-end-color": "border-end-color",
16
+ "border-inline-end-width": "border-end-width",
17
+ "border-inline-start-color": "border-start-color",
18
+ "border-inline-start-width": "border-start-width",
19
+ "border-block-start-width": "border-top-width",
20
+ "border-block-end-width": "border-bottom-width",
21
+ "font-variant-caps": "font-variant"
12
22
  };
13
- const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "line-height", "rotate", "scale", "text-shadow", "transform", "translate"]);
23
+
24
+ // React Native only supports a uniform borderStyle, so per-side border
25
+ // styles have no native equivalent and are dropped. "solid" is dropped
26
+ // silently as it matches React Native's default rendering.
27
+ const unsupportedLogicalStyles = new Set(["border-inline-style", "border-inline-start-style", "border-inline-end-style", "border-block-style", "border-block-start-style", "border-block-end-style"]);
28
+ const unparsedRuntimeParsing = new Set(["animation", "animation-name", "border", "border-block-width", "border-inline-width", "box-shadow", "filter", "line-height", "rotate", "scale", "text-shadow", "transform", "translate"]);
14
29
  const parsers = {
15
30
  "align-content": parseAlignContent,
16
31
  "align-items": parseAlignItems,
@@ -34,10 +49,11 @@ const parsers = {
34
49
  "border-block-color": parseBorderColor,
35
50
  "border-block-end": parseBorderBlockEnd,
36
51
  "border-block-end-color": parseColorDeclaration,
52
+ "border-block-end-style": parseBorderInlineStyle,
37
53
  "border-block-end-width": parseBorderSideWidthDeclaration,
38
54
  "border-block-start": parseBorderBlockStart,
39
55
  "border-block-start-color": parseColorDeclaration,
40
- "border-block-start-style": parseBorderStyleDeclaration,
56
+ "border-block-start-style": parseBorderInlineStyle,
41
57
  "border-block-start-width": parseBorderSideWidthDeclaration,
42
58
  "border-block-style": parseBorderBlockStyle,
43
59
  "border-block-width": parseBorderBlockWidth,
@@ -240,8 +256,8 @@ function parseInsetInline({
240
256
  value
241
257
  }, builder) {
242
258
  builder.addShorthand("inset-inline", {
243
- "inset-block-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
244
- "inset-block-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
259
+ "inset-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
260
+ "inset-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
245
261
  });
246
262
  }
247
263
  function parseInset({
@@ -275,14 +291,14 @@ function parseBorderColor(declaration, builder) {
275
291
  } else {
276
292
  const start = parseColor(declaration.value.start, builder);
277
293
  const end = parseColor(declaration.value.end, builder);
278
- if (start === end) {
294
+ if (declaration.property === "border-inline-color") {
295
+ builder.addDescriptor("border-start-color", start);
296
+ builder.addDescriptor("border-end-color", end);
297
+ } else if (start === end) {
279
298
  builder.addDescriptor(declaration.property, start);
280
- } else if (declaration.property === "border-block-color") {
299
+ } else {
281
300
  builder.addDescriptor("border-top-color", start);
282
301
  builder.addDescriptor("border-bottom-color", end);
283
- } else {
284
- builder.addDescriptor("border-left-color", start);
285
- builder.addDescriptor("border-right-color", end);
286
302
  }
287
303
  }
288
304
  }
@@ -316,53 +332,65 @@ function parseBorderBlock({
316
332
  value
317
333
  }, builder) {
318
334
  builder.addDescriptor("border-block-color", parseColor(value.color, builder));
319
- builder.addDescriptor("border-block-width", parseBorderSideWidth(value.width, builder));
320
- builder.addDescriptor("border-block-style", parseBorderStyle(value.style, builder));
335
+ const width = parseBorderSideWidth(value.width, builder);
336
+ builder.addDescriptor("border-top-width", width);
337
+ builder.addDescriptor("border-bottom-width", width);
338
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-style");
321
339
  }
322
340
  function parseBorderBlockStart({
323
341
  value
324
342
  }, builder) {
325
343
  builder.addDescriptor("border-block-start-color", parseColor(value.color, builder));
326
- builder.addDescriptor("border-block-start-width", parseBorderSideWidth(value.width, builder));
344
+ builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
345
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-start-style");
327
346
  }
328
347
  function parseBorderBlockEnd({
329
348
  value
330
349
  }, builder) {
331
350
  builder.addDescriptor("border-block-end-color", parseColor(value.color, builder));
332
- builder.addDescriptor("border-block-end-width", parseBorderSideWidth(value.width, builder));
351
+ builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
352
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-end-style");
333
353
  }
334
354
  function parseBorderInline({
335
355
  value
336
356
  }, builder) {
337
- builder.addDescriptor("border-inline-color", parseColor(value.color, builder));
338
- builder.addDescriptor("border-inline-width", parseBorderSideWidth(value.width, builder));
339
- builder.addDescriptor("border-inline-style", parseBorderStyle(value.style, builder));
357
+ const color = parseColor(value.color, builder);
358
+ const width = parseBorderSideWidth(value.width, builder);
359
+ builder.addDescriptor("border-start-color", color);
360
+ builder.addDescriptor("border-end-color", color);
361
+ builder.addDescriptor("border-start-width", width);
362
+ builder.addDescriptor("border-end-width", width);
363
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-style");
340
364
  }
341
365
  function parseBorderInlineStart({
342
366
  value
343
367
  }, builder) {
344
- builder.addDescriptor("border-inline-start-color", parseColor(value.color, builder));
345
- builder.addDescriptor("border-inline-start-width", parseBorderSideWidth(value.width, builder));
346
- builder.addDescriptor("border-inline-start-style", parseBorderStyle(value.style, builder));
368
+ builder.addDescriptor("border-start-color", parseColor(value.color, builder));
369
+ builder.addDescriptor("border-start-width", parseBorderSideWidth(value.width, builder));
370
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-start-style");
347
371
  }
348
372
  function parseBorderInlineEnd({
349
373
  value
350
374
  }, builder) {
351
- builder.addDescriptor("border-inline-end-color", parseColor(value.color, builder));
352
- builder.addDescriptor("border-inline-end-width", parseBorderSideWidth(value.width, builder));
353
- builder.addDescriptor("border-inline-end-style", parseBorderStyle(value.style, builder));
375
+ builder.addDescriptor("border-end-color", parseColor(value.color, builder));
376
+ builder.addDescriptor("border-end-width", parseBorderSideWidth(value.width, builder));
377
+ dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-end-style");
354
378
  }
355
379
  export function parseBorderInlineWidth(declaration, builder) {
356
- builder.addDescriptor("border-inline-width", parseBorderSideWidth(declaration.value.start, builder));
380
+ builder.addDescriptor("border-start-width", parseBorderSideWidth(declaration.value.start, builder));
381
+ builder.addDescriptor("border-end-width", parseBorderSideWidth(declaration.value.end, builder));
357
382
  }
358
383
  export function parseBorderInlineStyle(declaration, builder) {
359
384
  if (typeof declaration.value === "string") {
360
- builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value, builder));
361
- } else if (declaration.value.start === declaration.value.end) {
362
- builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value.start, builder));
385
+ dropUnsupportedInlineStyle(parseBorderStyle(declaration.value, builder), builder, declaration.property);
363
386
  } else {
364
- builder.addDescriptor("border-inline-start-style", parseBorderStyle(declaration.value.start, builder));
365
- builder.addDescriptor("border-inline-end-style", parseBorderStyle(declaration.value.end, builder));
387
+ dropUnsupportedInlineStyle(parseBorderStyle(declaration.value.start, builder), builder, "border-inline-start-style");
388
+ dropUnsupportedInlineStyle(parseBorderStyle(declaration.value.end, builder), builder, "border-inline-end-style");
389
+ }
390
+ }
391
+ function dropUnsupportedInlineStyle(style, builder, property) {
392
+ if (style !== undefined && style !== "solid") {
393
+ builder.addWarning("style", property, style);
366
394
  }
367
395
  }
368
396
  function parseFlexFlow({
@@ -528,7 +556,7 @@ function parseScale({
528
556
  }
529
557
  export function parseScaleValue(translate, prop, builder) {
530
558
  if (translate === "none") {
531
- return 0;
559
+ return 1;
532
560
  }
533
561
  return parseLength(translate[prop], builder);
534
562
  }
@@ -578,6 +606,10 @@ export function parseUnparsedDeclaration(declaration, builder) {
578
606
  builder.addWarning("property", property);
579
607
  return;
580
608
  }
609
+ if (unsupportedLogicalStyles.has(property)) {
610
+ builder.addWarning("property", property);
611
+ return;
612
+ }
581
613
  builder.setWarningProperty(property);
582
614
 
583
615
  /**
@@ -614,7 +646,10 @@ export function parseUnparsedDeclaration(declaration, builder) {
614
646
  }
615
647
  export function parseCustomDeclaration(declaration, builder) {
616
648
  const property = declaration.value.name;
617
- if (property === "-webkit-line-clamp") {
649
+ if (isMappingProperty(property)) {
650
+ // Consumed before declarations so property order cannot affect mapping.
651
+ return;
652
+ } else if (property === "-webkit-line-clamp") {
618
653
  builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
619
654
  } else if (property === "-rn-ripple-style") {
620
655
  if (parseUnparsed(declaration.value.value, builder, property) === "borderless") {
@@ -635,6 +670,11 @@ export function parseCustomDeclaration(declaration, builder) {
635
670
  builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
636
671
  } else if (property === "corner-shape") {
637
672
  parseCornerShape(declaration.value, builder);
673
+ } else if (property === "font-variant") {
674
+ const parsedFontVariant = parseFontVariantCaps(parseUnparsed(declaration.value.value, builder, property), builder);
675
+ if (parsedFontVariant !== undefined) {
676
+ builder.addDescriptor(property, parsedFontVariant);
677
+ }
638
678
  } else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
639
679
  builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
640
680
  } else {
@@ -1087,7 +1127,19 @@ export function parseFontColorDeclaration(declaration, builder) {
1087
1127
  }
1088
1128
  }
1089
1129
  export function parseColorDeclaration(declaration, builder) {
1090
- builder.addDescriptor(declaration.property, parseColor(declaration.value, builder));
1130
+ builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, parseColor(declaration.value, builder));
1131
+ }
1132
+
1133
+ /**
1134
+ * Lab/LCH/OKLab/OKLCH channels can be `NaN` when lightningcss resolves a
1135
+ * degenerate `color-mix()` at compile time (e.g. mixing black with
1136
+ * `transparent` in oklab yields `NaN` for the a/b chromaticity channels).
1137
+ * Passing `NaN` to colorjs.io produces an invalid string such as
1138
+ * `#NaNNaNNaN80`, which React Native silently discards. Per CSS Color 4 a
1139
+ * missing component is treated as `0`, so coerce `NaN` to `0`.
1140
+ */
1141
+ function nanToZero(value) {
1142
+ return Number.isNaN(value) ? 0 : value;
1091
1143
  }
1092
1144
  export function parseColor(cssColor, builder) {
1093
1145
  if (typeof cssColor === "string") {
@@ -1140,28 +1192,28 @@ export function parseColor(cssColor, builder) {
1140
1192
  case "lab":
1141
1193
  color = new Color({
1142
1194
  space: cssColor.type,
1143
- coords: [cssColor.l, cssColor.a, cssColor.b],
1195
+ coords: [nanToZero(cssColor.l), nanToZero(cssColor.a), nanToZero(cssColor.b)],
1144
1196
  alpha: cssColor.alpha
1145
1197
  });
1146
1198
  break;
1147
1199
  case "lch":
1148
1200
  color = new Color({
1149
1201
  space: cssColor.type,
1150
- coords: [cssColor.l, cssColor.c, cssColor.h],
1202
+ coords: [nanToZero(cssColor.l), nanToZero(cssColor.c), nanToZero(cssColor.h)],
1151
1203
  alpha: cssColor.alpha
1152
1204
  });
1153
1205
  break;
1154
1206
  case "oklab":
1155
1207
  color = new Color({
1156
1208
  space: cssColor.type,
1157
- coords: [cssColor.l, cssColor.a, cssColor.b],
1209
+ coords: [nanToZero(cssColor.l), nanToZero(cssColor.a), nanToZero(cssColor.b)],
1158
1210
  alpha: cssColor.alpha
1159
1211
  });
1160
1212
  break;
1161
1213
  case "oklch":
1162
1214
  color = new Color({
1163
1215
  space: cssColor.type,
1164
- coords: [cssColor.l, cssColor.c, cssColor.h],
1216
+ coords: [nanToZero(cssColor.l), nanToZero(cssColor.c), nanToZero(cssColor.h)],
1165
1217
  alpha: cssColor.alpha
1166
1218
  });
1167
1219
  break;
@@ -1470,25 +1522,17 @@ export function parseBorderStyle(value, builder) {
1470
1522
  export function parseBorderBlockWidth(declaration, builder) {
1471
1523
  const start = parseBorderSideWidth(declaration.value.start, builder);
1472
1524
  const end = parseBorderSideWidth(declaration.value.end, builder);
1473
- if (start === end) {
1474
- builder.addDescriptor("border-block-width", start);
1475
- } else {
1476
- builder.addDescriptor("border-block-start-width", start);
1477
- builder.addDescriptor("border-block-end-width", end);
1478
- }
1525
+ builder.addDescriptor("border-top-width", start);
1526
+ builder.addDescriptor("border-bottom-width", end);
1479
1527
  }
1480
1528
  function parseBorderBlockStyle(declaration, builder) {
1481
1529
  const start = parseBorderStyle(declaration.value.start, builder);
1482
1530
  const end = parseBorderStyle(declaration.value.end, builder);
1483
- if (start == end) {
1484
- builder.addDescriptor("border-block-style", start);
1485
- } else {
1486
- builder.addDescriptor("border-block-start-style", start);
1487
- builder.addDescriptor("border-block-end-style", end);
1488
- }
1531
+ dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
1532
+ dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
1489
1533
  }
1490
1534
  export function parseBorderSideWidthDeclaration(declaration, builder) {
1491
- builder.addDescriptor(declaration.property, parseBorderSideWidth(declaration.value, builder));
1535
+ builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, parseBorderSideWidth(declaration.value, builder));
1492
1536
  }
1493
1537
  export function parseBorderSideWidth(value, builder) {
1494
1538
  if (value.type === "length") {
@@ -1517,14 +1561,14 @@ function parseFontFamily({
1517
1561
  return value[0];
1518
1562
  }
1519
1563
  export function parseLineHeightDeclaration(declaration, builder) {
1520
- builder.addDescriptor("line-height", [{}, "lineHeight", [parseLineHeight(declaration.value, builder)], 1]);
1564
+ builder.addDescriptor("line-height", parseLineHeight(declaration.value, builder));
1521
1565
  }
1522
1566
  export function parseLineHeight(value, builder) {
1523
1567
  switch (value.type) {
1524
1568
  case "normal":
1525
1569
  return undefined;
1526
1570
  case "number":
1527
- return [{}, "em", [value.value], 1];
1571
+ return [{}, "em", value.value, 1];
1528
1572
  case "length":
1529
1573
  {
1530
1574
  const length = value.value;
@@ -1837,7 +1881,8 @@ export function parseCalcFn(name, tokens, builder, property) {
1837
1881
  return;
1838
1882
  }
1839
1883
  export function parseColorMix(tokens, builder, property) {
1840
- const [inToken, whitespace, colorSpace, comma, ...rest] = tokens;
1884
+ const [inToken, whitespace, colorSpace, comma, ...remaining] = tokens;
1885
+ const rest = remaining.filter(token => token.type !== "token" || !["white-space", "comment"].includes(token.value.type));
1841
1886
  if (typeof inToken !== "object" || inToken.type !== "token" || inToken.value.type !== "ident" || inToken.value.value !== "in") {
1842
1887
  return;
1843
1888
  }
@@ -1867,10 +1912,6 @@ export function parseColorMix(tokens, builder, property) {
1867
1912
  }
1868
1913
  nextToken = rest.shift();
1869
1914
  const rightColorArg = parseUnparsed(nextToken, builder, property);
1870
- if (rightColorArg === "transparent") {
1871
- // Ignore the rest, treat as single color with alpha
1872
- return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage]];
1873
- }
1874
1915
  nextToken = rest.shift();
1875
1916
  let rightColorPercentage;
1876
1917
  if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
@@ -2138,7 +2179,7 @@ export function kebabCase(str) {
2138
2179
  return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase());
2139
2180
  }
2140
2181
  function parseBackgroundImage(declaration, builder) {
2141
- builder.addDescriptor("experimental_backgroundImage", declaration.value.flatMap(image => {
2182
+ builder.addDescriptor("experimental_backgroundImage", [{}, "join", [declaration.value.flatMap(image => {
2142
2183
  switch (image.type) {
2143
2184
  case "gradient":
2144
2185
  {
@@ -2149,7 +2190,7 @@ function parseBackgroundImage(declaration, builder) {
2149
2190
  return ["none"];
2150
2191
  }
2151
2192
  return [];
2152
- }));
2193
+ }), ", "]]);
2153
2194
  return;
2154
2195
  }
2155
2196
  function parseGradient(gradient, builder) {
@@ -2185,10 +2226,10 @@ function parseGradientItem(item, builder) {
2185
2226
  if (item.position) {
2186
2227
  args.push(parseLength(item.position, builder));
2187
2228
  }
2188
- return [{}, "@colorStop", args, 1];
2229
+ return [{}, "colorStop", args, 1];
2189
2230
  }
2190
2231
  case "hint":
2191
- return parseLength(item.value, builder);
2232
+ return [{}, "gradientPosition", parseLength(item.value, builder), 1];
2192
2233
  }
2193
2234
  }
2194
2235
  function parseObjectFit(declaration, builder) {
@@ -2247,7 +2288,7 @@ function parseFilter(declaration, builder) {
2247
2288
  };
2248
2289
  case "hue-rotate":
2249
2290
  return {
2250
- [value.type]: parseAngle(value.value, builder)
2291
+ [toRNProperty(value.type)]: parseAngle(value.value, builder)
2251
2292
  };
2252
2293
  case "drop-shadow":
2253
2294
  return [{}, toRNProperty(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];