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

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 (524) hide show
  1. package/README.md +5 -5
  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 +92 -31
  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 +148 -56
  15. package/dist/commonjs/compiler/declarations.js.map +1 -1
  16. package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
  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/compiler/stylesheet.js +5 -0
  23. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  24. package/dist/commonjs/compiler/supports.js +2 -2
  25. package/dist/commonjs/compiler/supports.js.map +1 -1
  26. package/dist/commonjs/components/FlatList.js +1 -0
  27. package/dist/commonjs/components/FlatList.js.map +1 -1
  28. package/dist/commonjs/components/ImageBackground.js +2 -6
  29. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  30. package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
  31. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  32. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  33. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  34. package/dist/commonjs/components/index.cjs +46 -1
  35. package/dist/commonjs/components/index.cjs.map +1 -1
  36. package/dist/commonjs/jest/index.js +1 -1
  37. package/dist/commonjs/jest/index.js.map +1 -1
  38. package/dist/commonjs/metro/cache-version.js +43 -0
  39. package/dist/commonjs/metro/cache-version.js.map +1 -0
  40. package/dist/commonjs/metro/index.js +2 -0
  41. package/dist/commonjs/metro/index.js.map +1 -1
  42. package/dist/commonjs/metro/metro-transformer.js +1 -1
  43. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  44. package/dist/commonjs/metro/typescript.js +26 -6
  45. package/dist/commonjs/metro/typescript.js.map +1 -1
  46. package/dist/commonjs/native/api.js +12 -8
  47. package/dist/commonjs/native/api.js.map +1 -1
  48. package/dist/commonjs/native/conditions/attributes.js +16 -9
  49. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  50. package/dist/commonjs/native/conditions/container-query.js +11 -11
  51. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  52. package/dist/commonjs/native/conditions/media-query.js +1 -1
  53. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  54. package/dist/commonjs/native/react/interaction.js +10 -5
  55. package/dist/commonjs/native/react/interaction.js.map +1 -1
  56. package/dist/commonjs/native/react/rules.js +12 -5
  57. package/dist/commonjs/native/react/rules.js.map +1 -1
  58. package/dist/commonjs/native/react/useNativeCss.js +70 -15
  59. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  60. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  61. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  62. package/dist/commonjs/native/reactivity.js +47 -23
  63. package/dist/commonjs/native/reactivity.js.map +1 -1
  64. package/dist/commonjs/native/reanimated.js +15 -3
  65. package/dist/commonjs/native/reanimated.js.map +1 -1
  66. package/dist/commonjs/native/styles/functions/color-mix.js +64 -0
  67. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  68. package/dist/commonjs/native/styles/functions/filters.js +18 -5
  69. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  70. package/dist/commonjs/native/styles/functions/index.js +11 -0
  71. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  72. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  73. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  74. package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
  75. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  76. package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
  77. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  78. package/dist/commonjs/native/styles/index.js +382 -28
  79. package/dist/commonjs/native/styles/index.js.map +1 -1
  80. package/dist/commonjs/native/styles/resolve.js +10 -6
  81. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  82. package/dist/commonjs/native/styles/scale-factor.js +13 -0
  83. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  84. package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
  85. package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
  86. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  87. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  88. package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
  89. package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
  90. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  91. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  92. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  93. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  94. package/dist/commonjs/native/styles/variables.js +55 -43
  95. package/dist/commonjs/native/styles/variables.js.map +1 -1
  96. package/dist/commonjs/native-internal/style-collection.js +1 -1
  97. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  98. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  99. package/dist/commonjs/utilities/style-descriptor.js +4 -9
  100. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  101. package/dist/commonjs/web/api.js +2 -2
  102. package/dist/commonjs/web/api.js.map +1 -1
  103. package/dist/commonjs/web/assign-style.js +4 -1
  104. package/dist/commonjs/web/assign-style.js.map +1 -1
  105. package/dist/module/babel/import-plugin.js +11 -5
  106. package/dist/module/babel/import-plugin.js.map +1 -1
  107. package/dist/module/babel/react-native-web.js +16 -4
  108. package/dist/module/babel/react-native-web.js.map +1 -1
  109. package/dist/module/babel/react-native.js +7 -2
  110. package/dist/module/babel/react-native.js.map +1 -1
  111. package/dist/module/compiler/atRules.js +33 -0
  112. package/dist/module/compiler/atRules.js.map +1 -1
  113. package/dist/module/compiler/compiler.js +94 -33
  114. package/dist/module/compiler/compiler.js.map +1 -1
  115. package/dist/module/compiler/container-query.js +6 -1
  116. package/dist/module/compiler/container-query.js.map +1 -1
  117. package/dist/module/compiler/declarations.js +147 -56
  118. package/dist/module/compiler/declarations.js.map +1 -1
  119. package/dist/module/compiler/lightningcss-loader.js +14 -2
  120. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  121. package/dist/module/compiler/media-query.js +16 -6
  122. package/dist/module/compiler/media-query.js.map +1 -1
  123. package/dist/module/compiler/selector-builder.js +13 -3
  124. package/dist/module/compiler/selector-builder.js.map +1 -1
  125. package/dist/module/compiler/stylesheet.js +5 -0
  126. package/dist/module/compiler/stylesheet.js.map +1 -1
  127. package/dist/module/compiler/supports.js +2 -2
  128. package/dist/module/compiler/supports.js.map +1 -1
  129. package/dist/module/components/FlatList.js +1 -0
  130. package/dist/module/components/FlatList.js.map +1 -1
  131. package/dist/module/components/ImageBackground.js +2 -6
  132. package/dist/module/components/ImageBackground.js.map +1 -1
  133. package/dist/module/components/KeyboardAvoidingView.js +2 -3
  134. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  135. package/dist/module/components/SafeAreaProvider.js +4 -0
  136. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  137. package/dist/module/components/index.cjs +46 -1
  138. package/dist/module/components/index.cjs.map +1 -1
  139. package/dist/module/jest/index.js +1 -1
  140. package/dist/module/jest/index.js.map +1 -1
  141. package/dist/module/metro/cache-version.js +39 -0
  142. package/dist/module/metro/cache-version.js.map +1 -0
  143. package/dist/module/metro/index.js +2 -0
  144. package/dist/module/metro/index.js.map +1 -1
  145. package/dist/module/metro/metro-transformer.js +1 -1
  146. package/dist/module/metro/metro-transformer.js.map +1 -1
  147. package/dist/module/metro/typescript.js +26 -6
  148. package/dist/module/metro/typescript.js.map +1 -1
  149. package/dist/module/native/api.js +14 -10
  150. package/dist/module/native/api.js.map +1 -1
  151. package/dist/module/native/conditions/attributes.js +16 -9
  152. package/dist/module/native/conditions/attributes.js.map +1 -1
  153. package/dist/module/native/conditions/container-query.js +11 -11
  154. package/dist/module/native/conditions/container-query.js.map +1 -1
  155. package/dist/module/native/conditions/media-query.js +1 -1
  156. package/dist/module/native/conditions/media-query.js.map +1 -1
  157. package/dist/module/native/react/interaction.js +10 -5
  158. package/dist/module/native/react/interaction.js.map +1 -1
  159. package/dist/module/native/react/rules.js +13 -6
  160. package/dist/module/native/react/rules.js.map +1 -1
  161. package/dist/module/native/react/useNativeCss.js +73 -18
  162. package/dist/module/native/react/useNativeCss.js.map +1 -1
  163. package/dist/module/native/react/usePassthrough.js +5 -2
  164. package/dist/module/native/react/usePassthrough.js.map +1 -1
  165. package/dist/module/native/reactivity.js +44 -22
  166. package/dist/module/native/reactivity.js.map +1 -1
  167. package/dist/module/native/reanimated.js +15 -3
  168. package/dist/module/native/reanimated.js.map +1 -1
  169. package/dist/module/native/styles/functions/color-mix.js +59 -0
  170. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  171. package/dist/module/native/styles/functions/filters.js +16 -4
  172. package/dist/module/native/styles/functions/filters.js.map +1 -1
  173. package/dist/module/native/styles/functions/index.js +1 -0
  174. package/dist/module/native/styles/functions/index.js.map +1 -1
  175. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  176. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  177. package/dist/module/native/styles/functions/string-functions.js +13 -0
  178. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  179. package/dist/module/native/styles/functions/transform-functions.js +5 -4
  180. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  181. package/dist/module/native/styles/index.js +383 -28
  182. package/dist/module/native/styles/index.js.map +1 -1
  183. package/dist/module/native/styles/resolve.js +10 -6
  184. package/dist/module/native/styles/resolve.js.map +1 -1
  185. package/dist/module/native/styles/scale-factor.js +9 -0
  186. package/dist/module/native/styles/scale-factor.js.map +1 -0
  187. package/dist/module/native/styles/shorthands/_handler.js +11 -1
  188. package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
  189. package/dist/module/native/styles/shorthands/animation.js +6 -3
  190. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  191. package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
  192. package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
  193. package/dist/module/native/styles/shorthands/index.js +1 -0
  194. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  195. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  196. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  197. package/dist/module/native/styles/variables.js +55 -43
  198. package/dist/module/native/styles/variables.js.map +1 -1
  199. package/dist/module/native-internal/style-collection.js +1 -1
  200. package/dist/module/native-internal/style-collection.js.map +1 -1
  201. package/dist/module/utilities/dot-notation.types.js +2 -0
  202. package/dist/module/utilities/style-descriptor.js +4 -9
  203. package/dist/module/utilities/style-descriptor.js.map +1 -1
  204. package/dist/module/web/api.js +2 -2
  205. package/dist/module/web/api.js.map +1 -1
  206. package/dist/module/web/assign-style.js +4 -1
  207. package/dist/module/web/assign-style.js.map +1 -1
  208. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  209. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  210. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  211. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  213. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -2
  216. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  219. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  221. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +1 -0
  222. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  223. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  227. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
  229. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  231. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  232. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
  234. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
  237. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  239. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  240. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/src/native/reactivity.d.ts +13 -3
  245. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  248. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  249. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  250. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  251. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  252. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  253. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  254. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  255. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  256. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  257. package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
  258. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  259. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
  260. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  261. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  262. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  263. package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  264. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  265. package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  266. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  267. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  268. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  269. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  271. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  272. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
  274. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
  276. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  277. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
  278. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  279. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  280. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  281. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  282. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  283. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  284. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  285. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  286. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  287. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  288. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  289. package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
  290. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  291. package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
  292. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  293. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  294. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  295. package/dist/typescript/module/src/compiler/declarations.d.ts +5 -4
  296. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  297. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  298. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  299. package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
  300. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  301. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  302. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  303. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  304. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  305. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  306. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  307. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  308. package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
  309. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  310. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  311. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  312. package/dist/typescript/module/src/compiler/stylesheet.d.ts +2 -1
  313. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  314. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  315. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  316. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  317. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  318. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  319. package/dist/typescript/module/src/components/index.d.ts +16 -16
  320. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  321. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
  322. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  323. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  324. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  325. package/dist/typescript/module/src/metro/index.d.ts +1 -1
  326. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  327. package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
  328. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  329. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  330. package/dist/typescript/module/src/native/api.d.ts +5 -9
  331. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  332. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  333. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  334. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  335. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  336. package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
  337. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  338. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  339. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  340. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  341. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  342. package/dist/typescript/module/src/native/index.d.ts +3 -3
  343. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  344. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  345. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  346. package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
  347. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  348. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
  349. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  350. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  351. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  352. package/dist/typescript/module/src/native/reactivity.d.ts +13 -3
  353. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  354. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  355. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
  356. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  357. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  358. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  359. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  360. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  361. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  362. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  363. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  364. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  365. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
  366. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  367. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  368. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  369. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  370. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  371. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  372. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  373. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
  374. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  375. package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
  376. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  377. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  378. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  379. package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
  380. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  381. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  382. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  383. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  384. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  385. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  386. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  387. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  388. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  389. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  390. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  391. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  392. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  393. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  394. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  395. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  396. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  397. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  398. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  399. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  400. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  401. package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
  402. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  403. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  404. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  405. package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
  406. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  407. package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
  408. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  409. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  410. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  411. package/dist/typescript/module/src/runtime.d.ts +1 -1
  412. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  413. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  414. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  415. package/dist/typescript/module/src/runtime.types.d.ts +11 -6
  416. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  417. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
  418. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  419. package/dist/typescript/module/src/utilities/index.d.ts +3 -3
  420. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  421. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  422. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  423. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
  424. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  425. package/dist/typescript/module/src/web/api.d.ts +5 -5
  426. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  427. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  428. package/dist/typescript/module/src/web/index.d.ts +3 -3
  429. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  430. package/node/babel.mjs +4 -0
  431. package/node/compiler.mjs +2 -0
  432. package/node/metro.mjs +2 -0
  433. package/package.json +78 -29
  434. package/src/babel/import-plugin.ts +15 -4
  435. package/src/babel/react-native-web.ts +32 -3
  436. package/src/babel/react-native.ts +7 -1
  437. package/src/compiler/atRules.ts +44 -0
  438. package/src/compiler/compiler.ts +140 -42
  439. package/src/compiler/container-query.ts +8 -3
  440. package/src/compiler/declarations.ts +279 -94
  441. package/src/compiler/lightningcss-loader.ts +21 -1
  442. package/src/compiler/media-query.ts +20 -9
  443. package/src/compiler/selector-builder.ts +29 -3
  444. package/src/compiler/stylesheet.ts +6 -0
  445. package/src/compiler/supports.ts +2 -2
  446. package/src/components/FlatList.tsx +1 -0
  447. package/src/components/ImageBackground.tsx +2 -6
  448. package/src/components/KeyboardAvoidingView.tsx +2 -3
  449. package/src/components/SafeAreaProvider.tsx +1 -0
  450. package/src/components/index.cts +46 -1
  451. package/src/jest/index.ts +1 -1
  452. package/src/metro/cache-version.ts +48 -0
  453. package/src/metro/index.ts +2 -0
  454. package/src/metro/metro-transformer.ts +9 -6
  455. package/src/metro/typescript.ts +53 -6
  456. package/src/native/api.tsx +20 -14
  457. package/src/native/conditions/attributes.ts +26 -9
  458. package/src/native/conditions/container-query.ts +11 -9
  459. package/src/native/conditions/media-query.ts +1 -1
  460. package/src/native/react/interaction.ts +11 -6
  461. package/src/native/react/rules.ts +13 -5
  462. package/src/native/react/useNativeCss.ts +79 -17
  463. package/src/native/react/usePassthrough.ts +3 -2
  464. package/src/native/reactivity.ts +61 -24
  465. package/src/native/reanimated.ts +24 -5
  466. package/src/native/styles/functions/color-mix.ts +74 -0
  467. package/src/native/styles/functions/filters.ts +20 -6
  468. package/src/native/styles/functions/index.ts +1 -0
  469. package/src/native/styles/functions/numeric-functions.ts +7 -6
  470. package/src/native/styles/functions/string-functions.ts +18 -0
  471. package/src/native/styles/functions/transform-functions.ts +5 -4
  472. package/src/native/styles/index.ts +443 -36
  473. package/src/native/styles/resolve.ts +15 -11
  474. package/src/native/styles/scale-factor.ts +6 -0
  475. package/src/native/styles/shorthands/_handler.ts +14 -1
  476. package/src/native/styles/shorthands/animation.ts +8 -2
  477. package/src/native/styles/shorthands/box-shadow.ts +50 -15
  478. package/src/native/styles/shorthands/index.ts +1 -0
  479. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  480. package/src/native/styles/variables.ts +48 -38
  481. package/src/native-internal/style-collection.ts +1 -1
  482. package/src/runtime.types.ts +17 -15
  483. package/src/utilities/dot-notation.types.ts +4 -3
  484. package/src/utilities/style-descriptor.ts +11 -16
  485. package/src/web/api.tsx +7 -12
  486. package/src/web/assign-style.ts +2 -1
  487. package/types.d.ts +3 -20
  488. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  489. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  490. package/dist/module/compiler/inheritance.test.js +0 -78
  491. package/dist/module/compiler/inheritance.test.js.map +0 -1
  492. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  493. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  494. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  495. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  496. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  497. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  498. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  499. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  500. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  501. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  502. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  503. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  504. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  505. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  506. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  507. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  508. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  509. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  510. package/dist/typescript/module/eslint.config.d.mts +0 -2
  511. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  512. package/dist/typescript/module/example/app.config.d.ts +0 -4
  513. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  514. package/dist/typescript/module/example/index.d.ts +0 -2
  515. package/dist/typescript/module/example/index.d.ts.map +0 -1
  516. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  517. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  518. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  519. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  520. package/dist/typescript/module/example/src/App.d.ts +0 -3
  521. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  522. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  523. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  524. 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("--") ||
@@ -1228,6 +1295,8 @@ export function parseUnparsed(
1228
1295
  builder,
1229
1296
  property,
1230
1297
  );
1298
+ case "color-mix":
1299
+ return parseColorMix(tokenOrValue.value.arguments, builder, property);
1231
1300
  default: {
1232
1301
  builder.addWarning("value", `${tokenOrValue.value.name}()`);
1233
1302
  return;
@@ -1592,11 +1661,23 @@ export function parseColorDeclaration(
1592
1661
  builder: StylesheetBuilder,
1593
1662
  ) {
1594
1663
  builder.addDescriptor(
1595
- declaration.property,
1664
+ propertyRename[declaration.property] ?? declaration.property,
1596
1665
  parseColor(declaration.value, builder),
1597
1666
  );
1598
1667
  }
1599
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
+
1600
1681
  export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1601
1682
  if (typeof cssColor === "string") {
1602
1683
  if (namedColors.has(cssColor)) {
@@ -1651,28 +1732,44 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1651
1732
  case "lab":
1652
1733
  color = new Color({
1653
1734
  space: cssColor.type,
1654
- coords: [cssColor.l, cssColor.a, cssColor.b],
1735
+ coords: [
1736
+ nanToZero(cssColor.l),
1737
+ nanToZero(cssColor.a),
1738
+ nanToZero(cssColor.b),
1739
+ ],
1655
1740
  alpha: cssColor.alpha,
1656
1741
  });
1657
1742
  break;
1658
1743
  case "lch":
1659
1744
  color = new Color({
1660
1745
  space: cssColor.type,
1661
- coords: [cssColor.l, cssColor.c, cssColor.h],
1746
+ coords: [
1747
+ nanToZero(cssColor.l),
1748
+ nanToZero(cssColor.c),
1749
+ nanToZero(cssColor.h),
1750
+ ],
1662
1751
  alpha: cssColor.alpha,
1663
1752
  });
1664
1753
  break;
1665
1754
  case "oklab":
1666
1755
  color = new Color({
1667
1756
  space: cssColor.type,
1668
- coords: [cssColor.l, cssColor.a, cssColor.b],
1757
+ coords: [
1758
+ nanToZero(cssColor.l),
1759
+ nanToZero(cssColor.a),
1760
+ nanToZero(cssColor.b),
1761
+ ],
1669
1762
  alpha: cssColor.alpha,
1670
1763
  });
1671
1764
  break;
1672
1765
  case "oklch":
1673
1766
  color = new Color({
1674
1767
  space: cssColor.type,
1675
- coords: [cssColor.l, cssColor.c, cssColor.h],
1768
+ coords: [
1769
+ nanToZero(cssColor.l),
1770
+ nanToZero(cssColor.c),
1771
+ nanToZero(cssColor.h),
1772
+ ],
1676
1773
  alpha: cssColor.alpha,
1677
1774
  });
1678
1775
  break;
@@ -2120,12 +2217,8 @@ export function parseBorderBlockWidth(
2120
2217
  const start = parseBorderSideWidth(declaration.value.start, builder);
2121
2218
  const end = parseBorderSideWidth(declaration.value.end, builder);
2122
2219
 
2123
- if (start === end) {
2124
- builder.addDescriptor("border-block-width", start);
2125
- } else {
2126
- builder.addDescriptor("border-block-start-width", start);
2127
- builder.addDescriptor("border-block-end-width", end);
2128
- }
2220
+ builder.addDescriptor("border-top-width", start);
2221
+ builder.addDescriptor("border-bottom-width", end);
2129
2222
  }
2130
2223
 
2131
2224
  function parseBorderBlockStyle(
@@ -2135,12 +2228,8 @@ function parseBorderBlockStyle(
2135
2228
  const start = parseBorderStyle(declaration.value.start, builder);
2136
2229
  const end = parseBorderStyle(declaration.value.end, builder);
2137
2230
 
2138
- if (start == end) {
2139
- builder.addDescriptor("border-block-style", start);
2140
- } else {
2141
- builder.addDescriptor("border-block-start-style", start);
2142
- builder.addDescriptor("border-block-end-style", end);
2143
- }
2231
+ dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
2232
+ dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
2144
2233
  }
2145
2234
 
2146
2235
  export function parseBorderSideWidthDeclaration(
@@ -2148,7 +2237,7 @@ export function parseBorderSideWidthDeclaration(
2148
2237
  builder: StylesheetBuilder,
2149
2238
  ) {
2150
2239
  builder.addDescriptor(
2151
- declaration.property,
2240
+ propertyRename[declaration.property] ?? declaration.property,
2152
2241
  parseBorderSideWidth(declaration.value, builder),
2153
2242
  );
2154
2243
  }
@@ -2192,12 +2281,10 @@ export function parseLineHeightDeclaration(
2192
2281
  declaration: DeclarationType<"line-height">,
2193
2282
  builder: StylesheetBuilder,
2194
2283
  ) {
2195
- builder.addDescriptor("line-height", [
2196
- {},
2197
- "lineHeight",
2198
- [parseLineHeight(declaration.value, builder)],
2199
- 1,
2200
- ]);
2284
+ builder.addDescriptor(
2285
+ "line-height",
2286
+ parseLineHeight(declaration.value, builder),
2287
+ );
2201
2288
  }
2202
2289
 
2203
2290
  export function parseLineHeight(
@@ -2208,7 +2295,7 @@ export function parseLineHeight(
2208
2295
  case "normal":
2209
2296
  return undefined;
2210
2297
  case "number":
2211
- return [{}, "em", [value.value], 1];
2298
+ return [{}, "em", value.value, 1];
2212
2299
  case "length": {
2213
2300
  const length = value.value;
2214
2301
 
@@ -2633,6 +2720,100 @@ export function parseCalcFn(
2633
2720
  return;
2634
2721
  }
2635
2722
 
2723
+ export function parseColorMix(
2724
+ tokens: TokenOrValue[],
2725
+ builder: StylesheetBuilder,
2726
+ property: string,
2727
+ ): StyleDescriptor {
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
+ );
2734
+ if (
2735
+ typeof inToken !== "object" ||
2736
+ inToken.type !== "token" ||
2737
+ inToken.value.type !== "ident" ||
2738
+ inToken.value.value !== "in"
2739
+ ) {
2740
+ return;
2741
+ }
2742
+
2743
+ if (
2744
+ typeof whitespace !== "object" ||
2745
+ whitespace.type !== "token" ||
2746
+ whitespace.value.type !== "white-space"
2747
+ ) {
2748
+ return;
2749
+ }
2750
+
2751
+ if (
2752
+ typeof comma !== "object" ||
2753
+ comma.type !== "token" ||
2754
+ comma.value.type !== "comma"
2755
+ ) {
2756
+ return;
2757
+ }
2758
+
2759
+ const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
2760
+ if (typeof colorSpaceArg !== "string") {
2761
+ return;
2762
+ }
2763
+
2764
+ let nextToken = rest.shift();
2765
+
2766
+ const leftColorArg = parseUnparsed(nextToken, builder, property);
2767
+
2768
+ if (!leftColorArg) {
2769
+ return;
2770
+ }
2771
+
2772
+ nextToken = rest.shift();
2773
+
2774
+ let leftColorPercentage: StyleDescriptor | undefined;
2775
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2776
+ leftColorPercentage = parseUnparsed(nextToken, builder, property);
2777
+ nextToken = rest.shift();
2778
+ }
2779
+
2780
+ if (
2781
+ typeof nextToken !== "object" ||
2782
+ nextToken.type !== "token" ||
2783
+ nextToken.value.type !== "comma"
2784
+ ) {
2785
+ return;
2786
+ }
2787
+
2788
+ nextToken = rest.shift();
2789
+
2790
+ const rightColorArg = parseUnparsed(nextToken, builder, property);
2791
+
2792
+ nextToken = rest.shift();
2793
+ let rightColorPercentage: StyleDescriptor | undefined;
2794
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2795
+ rightColorPercentage = parseUnparsed(nextToken, builder, property);
2796
+ nextToken = rest.shift();
2797
+ }
2798
+
2799
+ // We should have expired all tokens now
2800
+ if (nextToken) {
2801
+ return;
2802
+ }
2803
+
2804
+ return [
2805
+ {},
2806
+ "colorMix",
2807
+ [
2808
+ colorSpaceArg,
2809
+ leftColorArg,
2810
+ leftColorPercentage,
2811
+ rightColorArg,
2812
+ rightColorPercentage,
2813
+ ],
2814
+ ];
2815
+ }
2816
+
2636
2817
  export function parseCalcArguments(
2637
2818
  [...args]: TokenOrValue[],
2638
2819
  builder: StylesheetBuilder,
@@ -3007,21 +3188,25 @@ function parseBackgroundImage(
3007
3188
  declaration: DeclarationType<"background-image">,
3008
3189
  builder: StylesheetBuilder,
3009
3190
  ) {
3010
- builder.addDescriptor(
3011
- "experimental_backgroundImage",
3012
- declaration.value.flatMap((image): StyleDescriptor[] => {
3013
- switch (image.type) {
3014
- case "gradient": {
3015
- const gradient = parseGradient(image.value, builder);
3016
- 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"];
3017
3203
  }
3018
- case "none":
3019
- return ["none"];
3020
- }
3021
3204
 
3022
- return [];
3023
- }),
3024
- );
3205
+ return [];
3206
+ }),
3207
+ ", ",
3208
+ ],
3209
+ ]);
3025
3210
  return;
3026
3211
  }
3027
3212
 
@@ -3076,10 +3261,10 @@ function parseGradientItem(
3076
3261
  args.push(parseLength(item.position, builder));
3077
3262
  }
3078
3263
 
3079
- return [{}, "@colorStop", args, 1];
3264
+ return [{}, "colorStop", args, 1];
3080
3265
  }
3081
3266
  case "hint":
3082
- return parseLength(item.value, builder);
3267
+ return [{}, "gradientPosition", parseLength(item.value, builder), 1];
3083
3268
  }
3084
3269
  }
3085
3270
 
@@ -3179,7 +3364,7 @@ function parseFilter(
3179
3364
  } as unknown as StyleDescriptor;
3180
3365
  case "hue-rotate":
3181
3366
  return {
3182
- [value.type]: parseAngle(value.value, builder),
3367
+ [toRNProperty(value.type)]: parseAngle(value.value, builder),
3183
3368
  } as unknown as StyleDescriptor;
3184
3369
  case "drop-shadow":
3185
3370
  return [
@@ -1,3 +1,6 @@
1
+ /* eslint-disable @typescript-eslint/no-require-imports */
2
+ import { dirname, resolve } from "node:path";
3
+
1
4
  export function lightningcssLoader() {
2
5
  let lightningcssPath: string | undefined;
3
6
 
@@ -28,11 +31,28 @@ export function lightningcssLoader() {
28
31
  );
29
32
  }
30
33
 
31
- // eslint-disable-next-line @typescript-eslint/no-require-imports
32
34
  const { transform: lightningcss, Features } = require(
33
35
  lightningcssPath,
34
36
  ) as typeof import("lightningcss");
35
37
 
38
+ let version: unknown;
39
+ try {
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;
46
+ } catch {
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
+ );
54
+ }
55
+
36
56
  return {
37
57
  lightningcss,
38
58
  Features,