react-native-css 0.0.0-nightly.416840c → 0.0.0-nightly.4562bdf

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 (793) hide show
  1. package/README.md +35 -5
  2. package/dist/commonjs/babel/helpers.js +7 -0
  3. package/dist/commonjs/babel/helpers.js.map +1 -1
  4. package/dist/commonjs/babel/import-plugin.js +20 -8
  5. package/dist/commonjs/babel/import-plugin.js.map +1 -1
  6. package/dist/commonjs/babel/react-native-web.js +17 -4
  7. package/dist/commonjs/babel/react-native-web.js.map +1 -1
  8. package/dist/commonjs/babel/react-native.js +9 -4
  9. package/dist/commonjs/babel/react-native.js.map +1 -1
  10. package/dist/commonjs/compiler/atRules.js +35 -0
  11. package/dist/commonjs/compiler/atRules.js.map +1 -1
  12. package/dist/commonjs/compiler/compiler.js +198 -39
  13. package/dist/commonjs/compiler/compiler.js.map +1 -1
  14. package/dist/commonjs/compiler/container-query.js +6 -1
  15. package/dist/commonjs/compiler/container-query.js.map +1 -1
  16. package/dist/commonjs/compiler/declarations.js +248 -96
  17. package/dist/commonjs/compiler/declarations.js.map +1 -1
  18. package/dist/commonjs/compiler/individual-transforms.js +129 -0
  19. package/dist/commonjs/compiler/individual-transforms.js.map +1 -0
  20. package/dist/commonjs/compiler/inline-variables.js +47 -1
  21. package/dist/commonjs/compiler/inline-variables.js.map +1 -1
  22. package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
  23. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  24. package/dist/commonjs/compiler/media-query.js +16 -6
  25. package/dist/commonjs/compiler/media-query.js.map +1 -1
  26. package/dist/commonjs/compiler/selector-builder.js +18 -6
  27. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  28. package/dist/commonjs/compiler/stylesheet.js +33 -9
  29. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  30. package/dist/commonjs/compiler/supports.js +2 -2
  31. package/dist/commonjs/compiler/supports.js.map +1 -1
  32. package/dist/commonjs/components/ActivityIndicator.js +4 -4
  33. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  34. package/dist/commonjs/components/Button.js +4 -4
  35. package/dist/commonjs/components/Button.js.map +1 -1
  36. package/dist/commonjs/components/FlatList.js +5 -4
  37. package/dist/commonjs/components/FlatList.js.map +1 -1
  38. package/dist/commonjs/components/Image.js +4 -4
  39. package/dist/commonjs/components/Image.js.map +1 -1
  40. package/dist/commonjs/components/ImageBackground.js +6 -10
  41. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  42. package/dist/commonjs/components/KeyboardAvoidingView.js +6 -7
  43. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  44. package/dist/commonjs/components/Pressable.js +4 -4
  45. package/dist/commonjs/components/Pressable.js.map +1 -1
  46. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  47. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  48. package/dist/commonjs/components/ScrollView.js +4 -4
  49. package/dist/commonjs/components/ScrollView.js.map +1 -1
  50. package/dist/commonjs/components/Switch.js +4 -4
  51. package/dist/commonjs/components/Switch.js.map +1 -1
  52. package/dist/commonjs/components/Text.js +4 -4
  53. package/dist/commonjs/components/Text.js.map +1 -1
  54. package/dist/commonjs/components/TextInput.js +4 -4
  55. package/dist/commonjs/components/TextInput.js.map +1 -1
  56. package/dist/commonjs/components/TouchableHighlight.js +4 -4
  57. package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
  58. package/dist/commonjs/components/TouchableOpacity.js +4 -4
  59. package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
  60. package/dist/commonjs/components/TouchableWithoutFeedback.js +4 -4
  61. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
  62. package/dist/commonjs/components/View.js +4 -4
  63. package/dist/commonjs/components/View.js.map +1 -1
  64. package/dist/commonjs/components/VirtualizedList.js +4 -4
  65. package/dist/commonjs/components/VirtualizedList.js.map +1 -1
  66. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  67. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  68. package/dist/commonjs/components/index.cjs +52 -4
  69. package/dist/commonjs/components/index.cjs.map +1 -1
  70. package/dist/commonjs/components/react-native-safe-area-context.native.js +10 -0
  71. package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
  72. package/dist/commonjs/jest/index.js +3 -1
  73. package/dist/commonjs/jest/index.js.map +1 -1
  74. package/dist/commonjs/metro/cache-version.js +43 -0
  75. package/dist/commonjs/metro/cache-version.js.map +1 -0
  76. package/dist/commonjs/metro/index.js +2 -0
  77. package/dist/commonjs/metro/index.js.map +1 -1
  78. package/dist/commonjs/metro/metro-transformer.js +16 -3
  79. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  80. package/dist/commonjs/metro/resolver.js +5 -3
  81. package/dist/commonjs/metro/resolver.js.map +1 -1
  82. package/dist/commonjs/metro/typescript.js +26 -6
  83. package/dist/commonjs/metro/typescript.js.map +1 -1
  84. package/dist/commonjs/metro/warnings.js +135 -0
  85. package/dist/commonjs/metro/warnings.js.map +1 -0
  86. package/dist/commonjs/native/api.js +21 -12
  87. package/dist/commonjs/native/api.js.map +1 -1
  88. package/dist/commonjs/native/conditions/attributes.js +16 -9
  89. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  90. package/dist/commonjs/native/conditions/container-query.js +11 -11
  91. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  92. package/dist/commonjs/native/conditions/guards.js +7 -0
  93. package/dist/commonjs/native/conditions/guards.js.map +1 -1
  94. package/dist/commonjs/native/conditions/media-query.js +1 -1
  95. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  96. package/dist/commonjs/native/objects.js +11 -18
  97. package/dist/commonjs/native/objects.js.map +1 -1
  98. package/dist/commonjs/native/react/interaction.js +10 -5
  99. package/dist/commonjs/native/react/interaction.js.map +1 -1
  100. package/dist/commonjs/native/react/rules.js +45 -38
  101. package/dist/commonjs/native/react/rules.js.map +1 -1
  102. package/dist/commonjs/native/react/useNativeCss.js +80 -19
  103. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  104. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  105. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  106. package/dist/commonjs/native/reactivity.js +150 -68
  107. package/dist/commonjs/native/reactivity.js.map +1 -1
  108. package/dist/commonjs/native/reanimated.js +15 -3
  109. package/dist/commonjs/native/reanimated.js.map +1 -1
  110. package/dist/commonjs/native/styles/calculate-props.js +139 -26
  111. package/dist/commonjs/native/styles/calculate-props.js.map +1 -1
  112. package/dist/commonjs/native/styles/functions/animation-timing.js +2 -1
  113. package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -1
  114. package/dist/commonjs/native/styles/functions/color-mix.js +68 -0
  115. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  116. package/dist/commonjs/native/styles/functions/filters.js +19 -5
  117. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  118. package/dist/commonjs/native/styles/functions/index.js +11 -0
  119. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  120. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  121. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  122. package/dist/commonjs/native/styles/functions/platform-functions.js +2 -1
  123. package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -1
  124. package/dist/commonjs/native/styles/functions/string-functions.js +22 -6
  125. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  126. package/dist/commonjs/native/styles/functions/transform-functions.js +95 -105
  127. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  128. package/dist/commonjs/native/styles/index.js +361 -34
  129. package/dist/commonjs/native/styles/index.js.map +1 -1
  130. package/dist/commonjs/native/styles/resolve.js +136 -19
  131. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  132. package/dist/commonjs/native/styles/scale-factor.js +12 -0
  133. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  134. package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
  135. package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
  136. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  137. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  138. package/dist/commonjs/native/styles/shorthands/box-shadow.js +41 -20
  139. package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
  140. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  141. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  142. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  143. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  144. package/dist/commonjs/native/styles/shorthands/transform.js +31 -8
  145. package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -1
  146. package/dist/commonjs/native/styles/variables.js +173 -48
  147. package/dist/commonjs/native/styles/variables.js.map +1 -1
  148. package/dist/commonjs/native-internal/root.js +46 -7
  149. package/dist/commonjs/native-internal/root.js.map +1 -1
  150. package/dist/commonjs/native-internal/style-collection.js +56 -74
  151. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  152. package/dist/commonjs/native-internal/variables.js +1 -1
  153. package/dist/commonjs/native-internal/variables.js.map +1 -1
  154. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  155. package/dist/commonjs/utilities/equality.js +41 -0
  156. package/dist/commonjs/utilities/equality.js.map +1 -0
  157. package/dist/commonjs/utilities/index.js +11 -0
  158. package/dist/commonjs/utilities/index.js.map +1 -1
  159. package/dist/commonjs/utilities/specificity.js +12 -12
  160. package/dist/commonjs/utilities/specificity.js.map +1 -1
  161. package/dist/commonjs/utilities/style-descriptor.js +32 -8
  162. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  163. package/dist/commonjs/web/api.js +7 -4
  164. package/dist/commonjs/web/api.js.map +1 -1
  165. package/dist/commonjs/web/assign-style.js +4 -1
  166. package/dist/commonjs/web/assign-style.js.map +1 -1
  167. package/dist/module/babel/helpers.js +6 -0
  168. package/dist/module/babel/helpers.js.map +1 -1
  169. package/dist/module/babel/import-plugin.js +22 -10
  170. package/dist/module/babel/import-plugin.js.map +1 -1
  171. package/dist/module/babel/react-native-web.js +16 -4
  172. package/dist/module/babel/react-native-web.js.map +1 -1
  173. package/dist/module/babel/react-native.js +9 -4
  174. package/dist/module/babel/react-native.js.map +1 -1
  175. package/dist/module/compiler/atRules.js +33 -0
  176. package/dist/module/compiler/atRules.js.map +1 -1
  177. package/dist/module/compiler/compiler.js +200 -41
  178. package/dist/module/compiler/compiler.js.map +1 -1
  179. package/dist/module/compiler/compiler.types.js +4 -0
  180. package/dist/module/compiler/compiler.types.js.map +1 -1
  181. package/dist/module/compiler/container-query.js +6 -1
  182. package/dist/module/compiler/container-query.js.map +1 -1
  183. package/dist/module/compiler/declarations.js +247 -95
  184. package/dist/module/compiler/declarations.js.map +1 -1
  185. package/dist/module/compiler/individual-transforms.js +125 -0
  186. package/dist/module/compiler/individual-transforms.js.map +1 -0
  187. package/dist/module/compiler/inline-variables.js +47 -1
  188. package/dist/module/compiler/inline-variables.js.map +1 -1
  189. package/dist/module/compiler/lightningcss-loader.js +14 -2
  190. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  191. package/dist/module/compiler/media-query.js +16 -6
  192. package/dist/module/compiler/media-query.js.map +1 -1
  193. package/dist/module/compiler/selector-builder.js +18 -7
  194. package/dist/module/compiler/selector-builder.js.map +1 -1
  195. package/dist/module/compiler/stylesheet.js +33 -9
  196. package/dist/module/compiler/stylesheet.js.map +1 -1
  197. package/dist/module/compiler/supports.js +2 -2
  198. package/dist/module/compiler/supports.js.map +1 -1
  199. package/dist/module/components/ActivityIndicator.js +3 -2
  200. package/dist/module/components/ActivityIndicator.js.map +1 -1
  201. package/dist/module/components/Button.js +3 -2
  202. package/dist/module/components/Button.js.map +1 -1
  203. package/dist/module/components/FlatList.js +4 -2
  204. package/dist/module/components/FlatList.js.map +1 -1
  205. package/dist/module/components/Image.js +3 -2
  206. package/dist/module/components/Image.js.map +1 -1
  207. package/dist/module/components/ImageBackground.js +5 -8
  208. package/dist/module/components/ImageBackground.js.map +1 -1
  209. package/dist/module/components/KeyboardAvoidingView.js +5 -5
  210. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  211. package/dist/module/components/Pressable.js +3 -2
  212. package/dist/module/components/Pressable.js.map +1 -1
  213. package/dist/module/components/SafeAreaProvider.js +4 -0
  214. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  215. package/dist/module/components/ScrollView.js +3 -2
  216. package/dist/module/components/ScrollView.js.map +1 -1
  217. package/dist/module/components/Switch.js +3 -2
  218. package/dist/module/components/Switch.js.map +1 -1
  219. package/dist/module/components/Text.js +3 -2
  220. package/dist/module/components/Text.js.map +1 -1
  221. package/dist/module/components/TextInput.js +3 -2
  222. package/dist/module/components/TextInput.js.map +1 -1
  223. package/dist/module/components/TouchableHighlight.js +3 -2
  224. package/dist/module/components/TouchableHighlight.js.map +1 -1
  225. package/dist/module/components/TouchableOpacity.js +3 -2
  226. package/dist/module/components/TouchableOpacity.js.map +1 -1
  227. package/dist/module/components/TouchableWithoutFeedback.js +3 -2
  228. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
  229. package/dist/module/components/View.js +3 -2
  230. package/dist/module/components/View.js.map +1 -1
  231. package/dist/module/components/VirtualizedList.js +3 -2
  232. package/dist/module/components/VirtualizedList.js.map +1 -1
  233. package/dist/module/components/copyComponentProperties.js +15 -0
  234. package/dist/module/components/copyComponentProperties.js.map +1 -0
  235. package/dist/module/components/index.cjs +52 -4
  236. package/dist/module/components/index.cjs.map +1 -1
  237. package/dist/module/components/react-native-safe-area-context.native.js +9 -1
  238. package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
  239. package/dist/module/jest/index.js +3 -1
  240. package/dist/module/jest/index.js.map +1 -1
  241. package/dist/module/metro/cache-version.js +39 -0
  242. package/dist/module/metro/cache-version.js.map +1 -0
  243. package/dist/module/metro/index.js +2 -0
  244. package/dist/module/metro/index.js.map +1 -1
  245. package/dist/module/metro/metro-transformer.js +16 -3
  246. package/dist/module/metro/metro-transformer.js.map +1 -1
  247. package/dist/module/metro/resolver.js +5 -3
  248. package/dist/module/metro/resolver.js.map +1 -1
  249. package/dist/module/metro/typescript.js +26 -6
  250. package/dist/module/metro/typescript.js.map +1 -1
  251. package/dist/module/metro/warnings.js +131 -0
  252. package/dist/module/metro/warnings.js.map +1 -0
  253. package/dist/module/native/api.js +22 -14
  254. package/dist/module/native/api.js.map +1 -1
  255. package/dist/module/native/conditions/attributes.js +16 -9
  256. package/dist/module/native/conditions/attributes.js.map +1 -1
  257. package/dist/module/native/conditions/container-query.js +11 -11
  258. package/dist/module/native/conditions/container-query.js.map +1 -1
  259. package/dist/module/native/conditions/guards.js +7 -0
  260. package/dist/module/native/conditions/guards.js.map +1 -1
  261. package/dist/module/native/conditions/media-query.js +1 -1
  262. package/dist/module/native/conditions/media-query.js.map +1 -1
  263. package/dist/module/native/objects.js +11 -18
  264. package/dist/module/native/objects.js.map +1 -1
  265. package/dist/module/native/react/interaction.js +10 -5
  266. package/dist/module/native/react/interaction.js.map +1 -1
  267. package/dist/module/native/react/rules.js +46 -39
  268. package/dist/module/native/react/rules.js.map +1 -1
  269. package/dist/module/native/react/useNativeCss.js +83 -22
  270. package/dist/module/native/react/useNativeCss.js.map +1 -1
  271. package/dist/module/native/react/usePassthrough.js +5 -2
  272. package/dist/module/native/react/usePassthrough.js.map +1 -1
  273. package/dist/module/native/reactivity.js +131 -66
  274. package/dist/module/native/reactivity.js.map +1 -1
  275. package/dist/module/native/reanimated.js +15 -3
  276. package/dist/module/native/reanimated.js.map +1 -1
  277. package/dist/module/native/styles/calculate-props.js +139 -26
  278. package/dist/module/native/styles/calculate-props.js.map +1 -1
  279. package/dist/module/native/styles/functions/animation-timing.js +2 -1
  280. package/dist/module/native/styles/functions/animation-timing.js.map +1 -1
  281. package/dist/module/native/styles/functions/color-mix.js +63 -0
  282. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  283. package/dist/module/native/styles/functions/filters.js +17 -4
  284. package/dist/module/native/styles/functions/filters.js.map +1 -1
  285. package/dist/module/native/styles/functions/index.js +1 -0
  286. package/dist/module/native/styles/functions/index.js.map +1 -1
  287. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  288. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  289. package/dist/module/native/styles/functions/platform-functions.js +2 -1
  290. package/dist/module/native/styles/functions/platform-functions.js.map +1 -1
  291. package/dist/module/native/styles/functions/string-functions.js +19 -5
  292. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  293. package/dist/module/native/styles/functions/transform-functions.js +93 -104
  294. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  295. package/dist/module/native/styles/index.js +362 -34
  296. package/dist/module/native/styles/index.js.map +1 -1
  297. package/dist/module/native/styles/resolve.js +136 -19
  298. package/dist/module/native/styles/resolve.js.map +1 -1
  299. package/dist/module/native/styles/scale-factor.js +8 -0
  300. package/dist/module/native/styles/scale-factor.js.map +1 -0
  301. package/dist/module/native/styles/shorthands/_handler.js +11 -1
  302. package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
  303. package/dist/module/native/styles/shorthands/animation.js +6 -3
  304. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  305. package/dist/module/native/styles/shorthands/box-shadow.js +43 -21
  306. package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
  307. package/dist/module/native/styles/shorthands/index.js +1 -0
  308. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  309. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  310. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  311. package/dist/module/native/styles/shorthands/transform.js +31 -8
  312. package/dist/module/native/styles/shorthands/transform.js.map +1 -1
  313. package/dist/module/native/styles/variables.js +174 -50
  314. package/dist/module/native/styles/variables.js.map +1 -1
  315. package/dist/module/native-internal/root.js +44 -7
  316. package/dist/module/native-internal/root.js.map +1 -1
  317. package/dist/module/native-internal/style-collection.js +45 -75
  318. package/dist/module/native-internal/style-collection.js.map +1 -1
  319. package/dist/module/native-internal/variables.js +2 -2
  320. package/dist/module/native-internal/variables.js.map +1 -1
  321. package/dist/module/utilities/dot-notation.types.js +2 -0
  322. package/dist/module/utilities/equality.js +37 -0
  323. package/dist/module/utilities/equality.js.map +1 -0
  324. package/dist/module/utilities/index.js +1 -0
  325. package/dist/module/utilities/index.js.map +1 -1
  326. package/dist/module/utilities/specificity.js +12 -12
  327. package/dist/module/utilities/specificity.js.map +1 -1
  328. package/dist/module/utilities/style-descriptor.js +30 -8
  329. package/dist/module/utilities/style-descriptor.js.map +1 -1
  330. package/dist/module/web/api.js +7 -4
  331. package/dist/module/web/api.js.map +1 -1
  332. package/dist/module/web/assign-style.js +4 -1
  333. package/dist/module/web/assign-style.js.map +1 -1
  334. package/dist/typescript/commonjs/src/babel/helpers.d.ts +2 -1
  335. package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
  336. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  337. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  338. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  339. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  340. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  341. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  342. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
  343. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  344. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +26 -12
  345. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  346. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -3
  347. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  348. package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts +10 -0
  349. package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts.map +1 -0
  350. package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +1 -1
  351. package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -1
  352. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  353. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  354. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  355. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +2 -1
  356. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  357. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +10 -10
  358. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  359. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
  360. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  361. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
  362. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  363. package/dist/typescript/commonjs/src/components/FlatList.d.ts +2 -2
  364. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  365. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
  366. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  367. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
  368. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  369. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
  370. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  371. package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
  372. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
  373. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  374. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  375. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
  376. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
  377. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  378. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  379. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  380. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  381. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
  382. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  383. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
  384. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
  385. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
  386. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
  387. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
  388. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  389. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  390. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  391. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +2 -2
  392. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
  393. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  394. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  395. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +2 -1
  396. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  397. package/dist/typescript/commonjs/src/jest/index.d.ts +4 -12
  398. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  399. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  400. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  401. package/dist/typescript/commonjs/src/metro/index.d.ts +8 -4
  402. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  403. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
  404. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  405. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  406. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  407. package/dist/typescript/commonjs/src/metro/warnings.d.ts +13 -0
  408. package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
  409. package/dist/typescript/commonjs/src/native/api.d.ts +5 -9
  410. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  411. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  412. package/dist/typescript/commonjs/src/native/conditions/guards.d.ts +2 -1
  413. package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -1
  414. package/dist/typescript/commonjs/src/native/objects.d.ts.map +1 -1
  415. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  416. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  417. package/dist/typescript/commonjs/src/native/react/rules.d.ts +7 -2
  418. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  419. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -4
  420. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  421. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  422. package/dist/typescript/commonjs/src/native/reactivity.d.ts +36 -18
  423. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  424. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  425. package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts +11 -2
  426. package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -1
  427. package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  428. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  429. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  430. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  431. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  432. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  433. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  434. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  435. package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  436. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  437. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  438. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts +2 -0
  439. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  440. package/dist/typescript/commonjs/src/native/styles/index.d.ts +16 -4
  441. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  442. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +4 -1
  443. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  444. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  445. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  446. package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  447. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  448. package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  449. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  450. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  451. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  452. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  453. package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts.map +1 -1
  454. package/dist/typescript/commonjs/src/native/styles/variables.d.ts +3 -2
  455. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  456. package/dist/typescript/commonjs/src/native-internal/root.d.ts +45 -0
  457. package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
  458. package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +2 -2
  459. package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -1
  460. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  461. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  462. package/dist/typescript/commonjs/src/runtime.types.d.ts +20 -15
  463. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  464. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +3 -2
  465. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  466. package/dist/typescript/commonjs/src/utilities/equality.d.ts +2 -0
  467. package/dist/typescript/commonjs/src/utilities/equality.d.ts.map +1 -0
  468. package/dist/typescript/commonjs/src/utilities/index.d.ts +1 -0
  469. package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -1
  470. package/dist/typescript/commonjs/src/utilities/specificity.d.ts.map +1 -1
  471. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +14 -1
  472. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  473. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  474. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  475. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  476. package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
  477. package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
  478. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  479. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  480. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  481. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  482. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  483. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  484. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  485. package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
  486. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  487. package/dist/typescript/module/src/compiler/compiler.types.d.ts +27 -13
  488. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  489. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  490. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  491. package/dist/typescript/module/src/compiler/declarations.d.ts +5 -5
  492. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  493. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  494. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  495. package/dist/typescript/module/src/compiler/individual-transforms.d.ts +10 -0
  496. package/dist/typescript/module/src/compiler/individual-transforms.d.ts.map +1 -0
  497. package/dist/typescript/module/src/compiler/inline-variables.d.ts +2 -2
  498. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  499. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  500. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  501. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  502. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  503. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  504. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  505. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  506. package/dist/typescript/module/src/compiler/selector-builder.d.ts +3 -2
  507. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  508. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  509. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  510. package/dist/typescript/module/src/compiler/stylesheet.d.ts +10 -10
  511. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  512. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
  513. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  514. package/dist/typescript/module/src/components/Button.d.ts +2 -4
  515. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  516. package/dist/typescript/module/src/components/FlatList.d.ts +2 -2
  517. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  518. package/dist/typescript/module/src/components/Image.d.ts +2 -4
  519. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  520. package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
  521. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  522. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
  523. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  524. package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
  525. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
  526. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  527. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  528. package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
  529. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
  530. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  531. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  532. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  533. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  534. package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
  535. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  536. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
  537. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
  538. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
  539. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
  540. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
  541. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  542. package/dist/typescript/module/src/components/View.d.ts +2 -6
  543. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  544. package/dist/typescript/module/src/components/VirtualizedList.d.ts +2 -2
  545. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
  546. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  547. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  548. package/dist/typescript/module/src/components/index.d.ts +16 -16
  549. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  550. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +2 -1
  551. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  552. package/dist/typescript/module/src/jest/index.d.ts +4 -12
  553. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  554. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  555. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  556. package/dist/typescript/module/src/metro/index.d.ts +9 -5
  557. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  558. package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
  559. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  560. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  561. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  562. package/dist/typescript/module/src/metro/warnings.d.ts +13 -0
  563. package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
  564. package/dist/typescript/module/src/native/api.d.ts +6 -10
  565. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  566. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  567. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  568. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  569. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  570. package/dist/typescript/module/src/native/conditions/guards.d.ts +4 -3
  571. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  572. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  573. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  574. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  575. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  576. package/dist/typescript/module/src/native/index.d.ts +3 -3
  577. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  578. package/dist/typescript/module/src/native/objects.d.ts.map +1 -1
  579. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  580. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  581. package/dist/typescript/module/src/native/react/rules.d.ts +9 -4
  582. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  583. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +5 -8
  584. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  585. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  586. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  587. package/dist/typescript/module/src/native/reactivity.d.ts +36 -18
  588. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  589. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  590. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +13 -4
  591. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  592. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  593. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  594. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  595. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  596. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  597. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  598. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  599. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  600. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
  601. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  602. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  603. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  604. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  605. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  606. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  607. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  608. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +3 -1
  609. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  610. package/dist/typescript/module/src/native/styles/index.d.ts +20 -8
  611. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  612. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  613. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  614. package/dist/typescript/module/src/native/styles/resolve.d.ts +7 -4
  615. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  616. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  617. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  618. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  619. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  620. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  621. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  622. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  623. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  624. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  625. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  626. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  627. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  628. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  629. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  630. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  631. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  632. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  633. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  634. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  635. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  636. package/dist/typescript/module/src/native/styles/variables.d.ts +4 -3
  637. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  638. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  639. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  640. package/dist/typescript/module/src/native-internal/root.d.ts +46 -1
  641. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  642. package/dist/typescript/module/src/native-internal/style-collection.d.ts +3 -3
  643. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  644. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  645. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  646. package/dist/typescript/module/src/runtime.d.ts +1 -1
  647. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  648. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  649. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  650. package/dist/typescript/module/src/runtime.types.d.ts +20 -15
  651. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  652. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +3 -2
  653. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  654. package/dist/typescript/module/src/utilities/equality.d.ts +2 -0
  655. package/dist/typescript/module/src/utilities/equality.d.ts.map +1 -0
  656. package/dist/typescript/module/src/utilities/index.d.ts +4 -3
  657. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  658. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  659. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  660. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +14 -1
  661. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  662. package/dist/typescript/module/src/web/api.d.ts +5 -5
  663. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  664. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  665. package/dist/typescript/module/src/web/index.d.ts +3 -3
  666. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  667. package/node/babel.mjs +4 -0
  668. package/node/compiler.mjs +2 -0
  669. package/node/metro.mjs +2 -0
  670. package/package.json +81 -33
  671. package/src/babel/helpers.ts +8 -1
  672. package/src/babel/import-plugin.ts +31 -16
  673. package/src/babel/react-native-web.ts +32 -4
  674. package/src/babel/react-native.ts +9 -4
  675. package/src/compiler/atRules.ts +44 -0
  676. package/src/compiler/compiler.ts +282 -50
  677. package/src/compiler/compiler.types.ts +30 -12
  678. package/src/compiler/container-query.ts +8 -3
  679. package/src/compiler/declarations.ts +499 -241
  680. package/src/compiler/individual-transforms.ts +129 -0
  681. package/src/compiler/inline-variables.ts +67 -0
  682. package/src/compiler/lightningcss-loader.ts +21 -1
  683. package/src/compiler/media-query.ts +20 -9
  684. package/src/compiler/selector-builder.ts +34 -7
  685. package/src/compiler/stylesheet.ts +51 -15
  686. package/src/compiler/supports.ts +2 -2
  687. package/src/components/ActivityIndicator.tsx +8 -5
  688. package/src/components/Button.tsx +8 -3
  689. package/src/components/FlatList.tsx +14 -4
  690. package/src/components/Image.tsx +8 -3
  691. package/src/components/ImageBackground.tsx +10 -11
  692. package/src/components/KeyboardAvoidingView.tsx +10 -8
  693. package/src/components/Pressable.tsx +8 -3
  694. package/src/components/SafeAreaProvider.tsx +1 -0
  695. package/src/components/ScrollView.tsx +8 -5
  696. package/src/components/Switch.tsx +8 -3
  697. package/src/components/Text.tsx +8 -3
  698. package/src/components/TextInput.tsx +8 -3
  699. package/src/components/TouchableHighlight.tsx +8 -5
  700. package/src/components/TouchableOpacity.tsx +8 -5
  701. package/src/components/TouchableWithoutFeedback.tsx +8 -5
  702. package/src/components/View.tsx +8 -3
  703. package/src/components/VirtualizedList.tsx +17 -5
  704. package/src/components/copyComponentProperties.ts +21 -0
  705. package/src/components/index.cts +52 -4
  706. package/src/components/react-native-safe-area-context.native.tsx +20 -0
  707. package/src/jest/index.ts +7 -3
  708. package/src/metro/cache-version.ts +48 -0
  709. package/src/metro/index.ts +11 -4
  710. package/src/metro/metro-transformer.ts +26 -8
  711. package/src/metro/resolver.ts +10 -3
  712. package/src/metro/typescript.ts +53 -6
  713. package/src/metro/warnings.ts +187 -0
  714. package/src/native/api.tsx +32 -18
  715. package/src/native/conditions/attributes.ts +26 -9
  716. package/src/native/conditions/container-query.ts +11 -9
  717. package/src/native/conditions/guards.ts +13 -1
  718. package/src/native/conditions/media-query.ts +1 -1
  719. package/src/native/objects.ts +12 -22
  720. package/src/native/react/interaction.ts +11 -6
  721. package/src/native/react/rules.ts +58 -45
  722. package/src/native/react/useNativeCss.ts +100 -22
  723. package/src/native/react/usePassthrough.ts +3 -2
  724. package/src/native/reactivity.ts +169 -71
  725. package/src/native/reanimated.ts +24 -5
  726. package/src/native/styles/calculate-props.ts +179 -28
  727. package/src/native/styles/functions/animation-timing.ts +3 -1
  728. package/src/native/styles/functions/color-mix.ts +82 -0
  729. package/src/native/styles/functions/filters.ts +21 -6
  730. package/src/native/styles/functions/index.ts +1 -0
  731. package/src/native/styles/functions/numeric-functions.ts +7 -6
  732. package/src/native/styles/functions/platform-functions.ts +3 -1
  733. package/src/native/styles/functions/string-functions.ts +25 -5
  734. package/src/native/styles/functions/transform-functions.ts +111 -64
  735. package/src/native/styles/index.ts +425 -43
  736. package/src/native/styles/resolve.ts +188 -29
  737. package/src/native/styles/scale-factor.ts +9 -0
  738. package/src/native/styles/shorthands/_handler.ts +14 -1
  739. package/src/native/styles/shorthands/animation.ts +8 -2
  740. package/src/native/styles/shorthands/box-shadow.ts +46 -25
  741. package/src/native/styles/shorthands/index.ts +1 -0
  742. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  743. package/src/native/styles/shorthands/transform.ts +36 -11
  744. package/src/native/styles/variables.ts +251 -45
  745. package/src/native-internal/root.ts +83 -13
  746. package/src/native-internal/style-collection.ts +64 -95
  747. package/src/native-internal/variables.tsx +6 -4
  748. package/src/runtime.types.ts +38 -29
  749. package/src/utilities/dot-notation.types.ts +12 -4
  750. package/src/utilities/equality.ts +41 -0
  751. package/src/utilities/index.ts +1 -0
  752. package/src/utilities/specificity.ts +13 -12
  753. package/src/utilities/style-descriptor.ts +36 -14
  754. package/src/web/api.tsx +17 -13
  755. package/src/web/assign-style.ts +2 -1
  756. package/types.d.ts +14 -31
  757. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  758. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  759. package/dist/module/compiler/inheritance.test.js +0 -78
  760. package/dist/module/compiler/inheritance.test.js.map +0 -1
  761. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  762. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  763. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  764. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  765. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  766. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  767. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  768. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  769. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  770. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  771. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  772. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  773. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  774. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  775. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  776. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  777. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  778. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  779. package/dist/typescript/module/eslint.config.d.mts +0 -2
  780. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  781. package/dist/typescript/module/example/app.config.d.ts +0 -4
  782. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  783. package/dist/typescript/module/example/index.d.ts +0 -2
  784. package/dist/typescript/module/example/index.d.ts.map +0 -1
  785. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  786. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  787. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  788. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  789. package/dist/typescript/module/example/src/App.d.ts +0 -3
  790. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  791. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  792. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  793. 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,54 @@ 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",
75
+ // React Native maps paddingBlock/paddingInline to the same Yoga edges as
76
+ // paddingVertical/paddingHorizontal, but Android's TextInput only sees the
77
+ // latter and otherwise keeps its theme padding
78
+ "padding-block": "padding-vertical",
79
+ "padding-inline": "padding-horizontal",
65
80
  };
66
81
 
82
+ // React Native only supports a uniform borderStyle, so per-side border
83
+ // styles have no native equivalent and are dropped. "solid" is dropped
84
+ // silently as it matches React Native's default rendering.
85
+ const unsupportedLogicalStyles = new Set([
86
+ "border-inline-style",
87
+ "border-inline-start-style",
88
+ "border-inline-end-style",
89
+ "border-block-style",
90
+ "border-block-start-style",
91
+ "border-block-end-style",
92
+ ]);
93
+
94
+ // One key set per property, so a later declaration replaces an earlier one; Android and iOS rank borderBlockColor against borderTopColor oppositely
95
+ const blockColorEdges = [
96
+ "border-top-color",
97
+ "border-bottom-color",
98
+ ] as const satisfies readonly [string, string];
99
+
100
+ // React Native has no borderInlineColor, so the RTL-aware pair is the inline axis's only target
101
+ const inlineColorEdges = [
102
+ "border-start-color",
103
+ "border-end-color",
104
+ ] as const satisfies readonly [string, string];
105
+
67
106
  const unparsedRuntimeParsing = new Set([
68
107
  "animation",
108
+ "animation-name",
69
109
  "border",
110
+ "border-block-width",
111
+ "border-inline-width",
70
112
  "box-shadow",
113
+ "filter",
71
114
  "line-height",
72
115
  "rotate",
73
116
  "scale",
@@ -76,6 +119,12 @@ const unparsedRuntimeParsing = new Set([
76
119
  "translate",
77
120
  ]);
78
121
 
122
+ // css-transforms-2 §3: the translate and scale properties take an optional z, which the functions of the same name do not
123
+ const INDIVIDUAL_TRANSFORM_RESOLVERS: ReadonlyMap<string, string> = new Map([
124
+ ["scale", "individualScale"],
125
+ ["translate", "individualTranslate"],
126
+ ]);
127
+
79
128
  const parsers: {
80
129
  [K in Declaration["property"]]?: Parser<K>;
81
130
  } = {
@@ -101,10 +150,11 @@ const parsers: {
101
150
  "border-block-color": parseBorderColor,
102
151
  "border-block-end": parseBorderBlockEnd,
103
152
  "border-block-end-color": parseColorDeclaration,
153
+ "border-block-end-style": parseBorderInlineStyle,
104
154
  "border-block-end-width": parseBorderSideWidthDeclaration,
105
155
  "border-block-start": parseBorderBlockStart,
106
156
  "border-block-start-color": parseColorDeclaration,
107
- "border-block-start-style": parseBorderStyleDeclaration,
157
+ "border-block-start-style": parseBorderInlineStyle,
108
158
  "border-block-start-width": parseBorderSideWidthDeclaration,
109
159
  "border-block-style": parseBorderBlockStyle,
110
160
  "border-block-width": parseBorderBlockWidth,
@@ -289,7 +339,7 @@ function parseWithParser(declaration: Declaration, builder: StylesheetBuilder) {
289
339
  if (declaration.property in parsers) {
290
340
  const parser = parsers[declaration.property] as Parser;
291
341
 
292
- builder.descriptorProperty = declaration.property;
342
+ builder.descriptorProperties = [declaration.property];
293
343
 
294
344
  builder.setWarningProperty(declaration.property);
295
345
  const value = parser(declaration, builder, declaration.property);
@@ -320,11 +370,11 @@ function parseInsetInline(
320
370
  builder: StylesheetBuilder,
321
371
  ) {
322
372
  builder.addShorthand("inset-inline", {
323
- "inset-block-start": parseLengthPercentageOrAuto(
373
+ "inset-inline-start": parseLengthPercentageOrAuto(
324
374
  value.inlineStart,
325
375
  builder,
326
376
  ),
327
- "inset-block-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
377
+ "inset-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
328
378
  });
329
379
  }
330
380
 
@@ -364,6 +414,16 @@ function parseBorderRadius(
364
414
  });
365
415
  }
366
416
 
417
+ // light-dark() addresses its dark half to descriptorProperties, so a parser that expands onto other properties names them
418
+ function parseColorFor(
419
+ targets: readonly string[],
420
+ cssColor: CssColor,
421
+ builder: StylesheetBuilder,
422
+ ) {
423
+ builder.descriptorProperties = targets;
424
+ return parseColor(cssColor, builder);
425
+ }
426
+
367
427
  function parseBorderColor(
368
428
  declaration: DeclarationType<
369
429
  "border-color" | "border-block-color" | "border-inline-color"
@@ -378,18 +438,20 @@ function parseBorderColor(
378
438
  "border-right-color": parseColor(declaration.value.right, builder),
379
439
  });
380
440
  } else {
381
- const start = parseColor(declaration.value.start, builder);
382
- const end = parseColor(declaration.value.end, builder);
383
-
384
- if (start === end) {
385
- builder.addDescriptor(declaration.property, start);
386
- } else if (declaration.property === "border-block-color") {
387
- builder.addDescriptor("border-top-color", start);
388
- builder.addDescriptor("border-bottom-color", end);
389
- } else {
390
- builder.addDescriptor("border-left-color", start);
391
- builder.addDescriptor("border-right-color", end);
392
- }
441
+ // Each edge parses its own colour, so a light-dark() component opens its dark rule over the edge it feeds
442
+ const [startProperty, endProperty] =
443
+ declaration.property === "border-inline-color"
444
+ ? inlineColorEdges
445
+ : blockColorEdges;
446
+
447
+ builder.addDescriptor(
448
+ startProperty,
449
+ parseColorFor([startProperty], declaration.value.start, builder),
450
+ );
451
+ builder.addDescriptor(
452
+ endProperty,
453
+ parseColorFor([endProperty], declaration.value.end, builder),
454
+ );
393
455
  }
394
456
  }
395
457
 
@@ -436,14 +498,17 @@ function parseBorderBlock(
436
498
  { value }: DeclarationType<"border-block">,
437
499
  builder: StylesheetBuilder,
438
500
  ) {
439
- 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",
501
+ const color = parseColorFor(blockColorEdges, value.color, builder);
502
+ const width = parseBorderSideWidth(value.width, builder);
503
+
504
+ builder.addDescriptor(blockColorEdges[0], color);
505
+ builder.addDescriptor(blockColorEdges[1], color);
506
+ builder.addDescriptor("border-top-width", width);
507
+ builder.addDescriptor("border-bottom-width", width);
508
+ dropUnsupportedInlineStyle(
446
509
  parseBorderStyle(value.style, builder),
510
+ builder,
511
+ "border-block-style",
447
512
  );
448
513
  }
449
514
 
@@ -456,9 +521,14 @@ function parseBorderBlockStart(
456
521
  parseColor(value.color, builder),
457
522
  );
458
523
  builder.addDescriptor(
459
- "border-block-start-width",
524
+ "border-top-width",
460
525
  parseBorderSideWidth(value.width, builder),
461
526
  );
527
+ dropUnsupportedInlineStyle(
528
+ parseBorderStyle(value.style, builder),
529
+ builder,
530
+ "border-block-start-style",
531
+ );
462
532
  }
463
533
 
464
534
  function parseBorderBlockEnd(
@@ -470,26 +540,31 @@ function parseBorderBlockEnd(
470
540
  parseColor(value.color, builder),
471
541
  );
472
542
  builder.addDescriptor(
473
- "border-block-end-width",
543
+ "border-bottom-width",
474
544
  parseBorderSideWidth(value.width, builder),
475
545
  );
546
+ dropUnsupportedInlineStyle(
547
+ parseBorderStyle(value.style, builder),
548
+ builder,
549
+ "border-block-end-style",
550
+ );
476
551
  }
477
552
 
478
553
  function parseBorderInline(
479
554
  { value }: DeclarationType<"border-inline">,
480
555
  builder: StylesheetBuilder,
481
556
  ) {
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",
557
+ const color = parseColor(value.color, builder);
558
+ const width = parseBorderSideWidth(value.width, builder);
559
+
560
+ builder.addDescriptor("border-start-color", color);
561
+ builder.addDescriptor("border-end-color", color);
562
+ builder.addDescriptor("border-start-width", width);
563
+ builder.addDescriptor("border-end-width", width);
564
+ dropUnsupportedInlineStyle(
492
565
  parseBorderStyle(value.style, builder),
566
+ builder,
567
+ "border-inline-style",
493
568
  );
494
569
  }
495
570
 
@@ -497,17 +572,15 @@ function parseBorderInlineStart(
497
572
  { value }: DeclarationType<"border-inline-start">,
498
573
  builder: StylesheetBuilder,
499
574
  ) {
575
+ builder.addDescriptor("border-start-color", parseColor(value.color, builder));
500
576
  builder.addDescriptor(
501
- "border-inline-start-color",
502
- parseColor(value.color, builder),
503
- );
504
- builder.addDescriptor(
505
- "border-inline-start-width",
577
+ "border-start-width",
506
578
  parseBorderSideWidth(value.width, builder),
507
579
  );
508
- builder.addDescriptor(
509
- "border-inline-start-style",
580
+ dropUnsupportedInlineStyle(
510
581
  parseBorderStyle(value.style, builder),
582
+ builder,
583
+ "border-inline-start-style",
511
584
  );
512
585
  }
513
586
 
@@ -515,17 +588,15 @@ function parseBorderInlineEnd(
515
588
  { value }: DeclarationType<"border-inline-end">,
516
589
  builder: StylesheetBuilder,
517
590
  ) {
591
+ builder.addDescriptor("border-end-color", parseColor(value.color, builder));
518
592
  builder.addDescriptor(
519
- "border-inline-end-color",
520
- parseColor(value.color, builder),
521
- );
522
- builder.addDescriptor(
523
- "border-inline-end-width",
593
+ "border-end-width",
524
594
  parseBorderSideWidth(value.width, builder),
525
595
  );
526
- builder.addDescriptor(
527
- "border-inline-end-style",
596
+ dropUnsupportedInlineStyle(
528
597
  parseBorderStyle(value.style, builder),
598
+ builder,
599
+ "border-inline-end-style",
529
600
  );
530
601
  }
531
602
 
@@ -534,9 +605,13 @@ export function parseBorderInlineWidth(
534
605
  builder: StylesheetBuilder,
535
606
  ) {
536
607
  builder.addDescriptor(
537
- "border-inline-width",
608
+ "border-start-width",
538
609
  parseBorderSideWidth(declaration.value.start, builder),
539
610
  );
611
+ builder.addDescriptor(
612
+ "border-end-width",
613
+ parseBorderSideWidth(declaration.value.end, builder),
614
+ );
540
615
  }
541
616
 
542
617
  export function parseBorderInlineStyle(
@@ -544,31 +619,41 @@ export function parseBorderInlineStyle(
544
619
  | "border-inline-style"
545
620
  | "border-inline-start-style"
546
621
  | "border-inline-end-style"
622
+ | "border-block-start-style"
623
+ | "border-block-end-style"
547
624
  >,
548
625
  builder: StylesheetBuilder,
549
626
  ) {
550
627
  if (typeof declaration.value === "string") {
551
- builder.addDescriptor(
552
- declaration.property,
628
+ dropUnsupportedInlineStyle(
553
629
  parseBorderStyle(declaration.value, builder),
554
- );
555
- } else if (declaration.value.start === declaration.value.end) {
556
- builder.addDescriptor(
630
+ builder,
557
631
  declaration.property,
558
- parseBorderStyle(declaration.value.start, builder),
559
632
  );
560
633
  } else {
561
- builder.addDescriptor(
562
- "border-inline-start-style",
634
+ dropUnsupportedInlineStyle(
563
635
  parseBorderStyle(declaration.value.start, builder),
636
+ builder,
637
+ "border-inline-start-style",
564
638
  );
565
- builder.addDescriptor(
566
- "border-inline-end-style",
639
+ dropUnsupportedInlineStyle(
567
640
  parseBorderStyle(declaration.value.end, builder),
641
+ builder,
642
+ "border-inline-end-style",
568
643
  );
569
644
  }
570
645
  }
571
646
 
647
+ function dropUnsupportedInlineStyle(
648
+ style: string | undefined,
649
+ builder: StylesheetBuilder,
650
+ property: string,
651
+ ) {
652
+ if (style !== undefined && style !== "solid") {
653
+ builder.addWarning("style", property, style);
654
+ }
655
+ }
656
+
572
657
  function parseFlexFlow(
573
658
  { value }: DeclarationType<"flex-flow">,
574
659
  builder: StylesheetBuilder,
@@ -649,7 +734,7 @@ function parsePaddingBlock(
649
734
  { value }: DeclarationType<"padding-block">,
650
735
  builder: StylesheetBuilder,
651
736
  ) {
652
- builder.addShorthand("padding-block", {
737
+ builder.addShorthand("padding-vertical", {
653
738
  "padding-block-start": parseLengthPercentageOrAuto(
654
739
  value.blockStart,
655
740
  builder,
@@ -662,7 +747,7 @@ function parsePaddingInline(
662
747
  { value }: DeclarationType<"padding-inline">,
663
748
  builder: StylesheetBuilder,
664
749
  ) {
665
- builder.addShorthand("padding-inline", {
750
+ builder.addShorthand("padding-horizontal", {
666
751
  "padding-inline-start": parseLengthPercentageOrAuto(
667
752
  value.inlineStart,
668
753
  builder,
@@ -689,146 +774,131 @@ function parseFont(
689
774
  builder.addDescriptor("font-weight", parseFontWeight(value.weight, builder));
690
775
  }
691
776
 
777
+ type TransformFunction = Extract<
778
+ StyleFunction,
779
+ [Record<never, never>, string, StyleDescriptor]
780
+ >;
781
+
782
+ // An argument React Native has no equivalent for leaves the declaration invalid there, and an invalid declaration is ignored (CSS 2.2 §4.2)
783
+ function hasUnconvertibleArgument(
784
+ functions: readonly TransformFunction[],
785
+ ): boolean {
786
+ return functions.some(([, , argument]) => argument === undefined);
787
+ }
788
+
692
789
  function parseTransform(
693
790
  { value }: DeclarationType<"transform">,
694
791
  builder: StylesheetBuilder,
695
792
  ) {
696
- builder.addDescriptor("transform", [
697
- {},
698
- "transform",
699
- value.flatMap((t): StyleDescriptor[] => {
700
- switch (t.type) {
701
- case "perspective":
702
- return [[{}, "perspective", parseLength(t.value, builder)]];
703
- case "translate":
704
- return [
705
- [
706
- {},
707
- "translateX",
708
- parseLengthOrCoercePercentageToRuntime(t.value[0], builder),
709
- ],
710
- [
711
- [
712
- {},
713
- "translateY",
714
- parseLengthOrCoercePercentageToRuntime(t.value[1], builder),
715
- ],
716
- ],
717
- ];
718
- case "translateX":
719
- return [
720
- [
721
- {},
722
- "translateX",
723
- parseLengthOrCoercePercentageToRuntime(t.value, builder),
724
- ],
725
- ];
726
- case "translateY":
727
- return [
728
- [
729
- {},
730
- "translateY",
731
- parseLengthOrCoercePercentageToRuntime(t.value, builder),
732
- ],
733
- ];
734
- case "rotate":
735
- return [[{}, "rotate", parseAngle(t.value, builder)]];
736
- case "rotateX":
737
- return [[{}, "rotateX", parseAngle(t.value, builder)]];
738
- case "rotateY":
739
- return [[{}, "rotateY", parseAngle(t.value, builder)]];
740
- case "rotateZ":
741
- return [[{}, "rotateZ", parseAngle(t.value, builder)]];
742
- case "scale":
743
- return [
744
- [{}, "scaleX", parseLength(t.value[0], builder)],
745
- [{}, "scaleY", parseLength(t.value[1], builder)],
746
- ];
747
- case "scaleX":
748
- return [[{}, "scaleX", parseLength(t.value, builder)]];
749
- case "scaleY":
750
- return [[{}, "scaleY", parseLength(t.value, builder)]];
751
- case "skew":
752
- return [
753
- [{}, "skewX", parseAngle(t.value[0], builder)],
754
- [{}, "skewY", parseAngle(t.value[1], builder)],
755
- ];
756
- case "skewX":
757
- return [[{}, "skewX", parseAngle(t.value, builder)]];
758
- case "skewY":
759
- return [[{}, "skewY", parseAngle(t.value, builder)]];
760
- case "translateZ":
761
- case "translate3d":
762
- case "scaleZ":
763
- case "scale3d":
764
- case "rotate3d":
765
- case "matrix":
766
- case "matrix3d":
767
- return [[]];
768
- }
769
- }),
770
- ]);
771
- return;
793
+ const functions = value.flatMap((t): TransformFunction[] => {
794
+ switch (t.type) {
795
+ case "perspective":
796
+ return [[{}, "perspective", parseLength(t.value, builder)]];
797
+ case "translate":
798
+ return [
799
+ [{}, "translateX", parseLength(t.value[0], builder)],
800
+ [{}, "translateY", parseLength(t.value[1], builder)],
801
+ ];
802
+ case "translateX":
803
+ return [[{}, "translateX", parseLength(t.value, builder)]];
804
+ case "translateY":
805
+ return [[{}, "translateY", parseLength(t.value, builder)]];
806
+ case "rotate":
807
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
808
+ case "rotateX":
809
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
810
+ case "rotateY":
811
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
812
+ case "rotateZ":
813
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
814
+ case "scale":
815
+ return [
816
+ [{}, "scaleX", parseLength(t.value[0], builder)],
817
+ [{}, "scaleY", parseLength(t.value[1], builder)],
818
+ ];
819
+ case "scaleX":
820
+ return [[{}, "scaleX", parseLength(t.value, builder)]];
821
+ case "scaleY":
822
+ return [[{}, "scaleY", parseLength(t.value, builder)]];
823
+ case "skew":
824
+ return [
825
+ [{}, "skewX", parseAngle(t.value[0], builder)],
826
+ [{}, "skewY", parseAngle(t.value[1], builder)],
827
+ ];
828
+ case "skewX":
829
+ return [[{}, "skewX", parseAngle(t.value, builder)]];
830
+ case "skewY":
831
+ return [[{}, "skewY", parseAngle(t.value, builder)]];
832
+ case "translateZ":
833
+ case "translate3d":
834
+ case "scaleZ":
835
+ case "scale3d":
836
+ case "rotate3d":
837
+ case "matrix":
838
+ case "matrix3d":
839
+ return [];
840
+ }
841
+ });
842
+
843
+ if (hasUnconvertibleArgument(functions)) {
844
+ return;
845
+ }
846
+
847
+ builder.addDescriptor("transform", [{}, "transform", functions]);
772
848
  }
773
849
 
774
850
  function parseTranslate(
775
851
  { value }: DeclarationType<"translate">,
776
852
  builder: StylesheetBuilder,
777
853
  ) {
778
- builder.addDescriptor("translateX", [
779
- {},
780
- "translateX",
781
- parseTranslateProp(value, "x", builder),
782
- ]);
783
- builder.addDescriptor("translateY", [
784
- {},
785
- "translateY",
786
- parseTranslateProp(value, "y", builder),
787
- ]);
854
+ const translations: TransformFunction[] = [
855
+ [{}, "translateX", parseTranslateProp(value, "x", builder)],
856
+ [{}, "translateY", parseTranslateProp(value, "y", builder)],
857
+ ];
858
+
859
+ if (hasUnconvertibleArgument(translations)) {
860
+ return;
861
+ }
862
+
863
+ builder.addDescriptor("translate", translations);
788
864
  }
789
865
 
790
866
  function parseRotate(
791
867
  { value }: DeclarationType<"rotate">,
792
868
  builder: StylesheetBuilder,
793
869
  ) {
870
+ const angle = parseAngle(value.angle, builder);
871
+ const rotations: TransformFunction[] = [];
872
+
794
873
  if (value.x) {
795
- builder.addDescriptor("rotateX", [
796
- {},
797
- "rotateX",
798
- parseAngle(value.angle, builder),
799
- ]);
874
+ rotations.push([{}, "rotateX", angle]);
800
875
  }
801
876
 
802
877
  if (value.y) {
803
- builder.addDescriptor("rotateY", [
804
- {},
805
- "rotateY",
806
- parseAngle(value.angle, builder),
807
- ]);
878
+ rotations.push([{}, "rotateY", angle]);
808
879
  }
809
880
 
810
881
  if (value.z) {
811
- builder.addDescriptor("rotateZ", [
812
- {},
813
- "rotateZ",
814
- parseAngle(value.angle, builder),
815
- ]);
882
+ rotations.push([{}, "rotateZ", angle]);
816
883
  }
884
+
885
+ if (hasUnconvertibleArgument(rotations)) {
886
+ return;
887
+ }
888
+
889
+ builder.addDescriptor(
890
+ "rotate",
891
+ rotations.length === 1 ? rotations[0] : rotations,
892
+ );
817
893
  }
818
894
 
819
895
  function parseScale(
820
896
  { value }: DeclarationType<"scale">,
821
897
  builder: StylesheetBuilder,
822
898
  ) {
823
- builder.addDescriptor("scaleX", [
824
- {},
825
- "scaleX",
826
- parseScaleValue(value, "x", builder),
827
- ]);
828
- builder.addDescriptor("scaleY", [
829
- {},
830
- "scaleY",
831
- parseScaleValue(value, "y", builder),
899
+ builder.addDescriptor("scale", [
900
+ [{}, "scaleX", parseScaleValue(value, "x", builder)],
901
+ [{}, "scaleY", parseScaleValue(value, "y", builder)],
832
902
  ]);
833
903
  }
834
904
 
@@ -838,7 +908,7 @@ export function parseScaleValue(
838
908
  builder: StylesheetBuilder,
839
909
  ): StyleDescriptor {
840
910
  if (translate === "none") {
841
- return 0;
911
+ return 1;
842
912
  }
843
913
 
844
914
  return parseLength(translate[prop], builder);
@@ -916,6 +986,11 @@ export function parseUnparsedDeclaration(
916
986
  return;
917
987
  }
918
988
 
989
+ if (unsupportedLogicalStyles.has(property)) {
990
+ builder.addWarning("property", property);
991
+ return;
992
+ }
993
+
919
994
  builder.setWarningProperty(property);
920
995
 
921
996
  /**
@@ -926,10 +1001,28 @@ export function parseUnparsedDeclaration(
926
1001
  property = rename;
927
1002
  }
928
1003
 
1004
+ // A var() axis colour lands on its edge pair as two declarations, so a later edge colour replaces it in cascade order
1005
+ const edges =
1006
+ property === "border-inline-color"
1007
+ ? inlineColorEdges
1008
+ : property === "border-block-color"
1009
+ ? blockColorEdges
1010
+ : undefined;
1011
+
1012
+ if (edges) {
1013
+ builder.descriptorProperties = edges;
1014
+ const value = parseUnparsed(declaration.value.value, builder, property);
1015
+ const pair =
1016
+ Array.isArray(value) && !isStyleFunction(value) && value.length === 2;
1017
+ builder.addDescriptor(edges[0], pair ? value[0] : value);
1018
+ builder.addDescriptor(edges[1], pair ? value[1] : value);
1019
+ return;
1020
+ }
1021
+
929
1022
  /**
930
1023
  * Unparsed shorthand properties need to be parsed at runtime
931
1024
  */
932
- builder.descriptorProperty = property;
1025
+ builder.descriptorProperties = [property];
933
1026
 
934
1027
  if (unparsedRuntimeParsing.has(property)) {
935
1028
  const args = parseUnparsed(declaration.value.value, builder, property);
@@ -937,7 +1030,12 @@ export function parseUnparsedDeclaration(
937
1030
  if (property === "animation") {
938
1031
  builder.addDescriptor("animation", [{}, property, args]);
939
1032
  } else {
940
- builder.addDescriptor(property, [{}, toRNProperty(property), args, 1]);
1033
+ builder.addDescriptor(property, [
1034
+ {},
1035
+ INDIVIDUAL_TRANSFORM_RESOLVERS.get(property) ?? toRNProperty(property),
1036
+ args,
1037
+ 1,
1038
+ ]);
941
1039
  }
942
1040
  } else {
943
1041
  const value = parseUnparsed(declaration.value.value, builder, property);
@@ -966,7 +1064,10 @@ export function parseCustomDeclaration(
966
1064
  ) {
967
1065
  const property = declaration.value.name;
968
1066
 
969
- if (property === "-webkit-line-clamp") {
1067
+ if (isMappingProperty(property)) {
1068
+ // Consumed before declarations so property order cannot affect mapping.
1069
+ return;
1070
+ } else if (property === "-webkit-line-clamp") {
970
1071
  builder.addDescriptor(
971
1072
  property,
972
1073
  parseUnparsed(declaration.value.value, builder, property),
@@ -997,6 +1098,24 @@ export function parseCustomDeclaration(
997
1098
  );
998
1099
  } else if (property === "corner-shape") {
999
1100
  parseCornerShape(declaration.value, builder);
1101
+ } else if (property === "font-variant") {
1102
+ const parsedFontVariant = parseFontVariantCaps(
1103
+ parseUnparsed(
1104
+ declaration.value.value,
1105
+ builder,
1106
+ property,
1107
+ ) as FontVariantCaps,
1108
+ builder,
1109
+ );
1110
+ if (parsedFontVariant !== undefined) {
1111
+ builder.addDescriptor(property, parsedFontVariant);
1112
+ }
1113
+ } else if (
1114
+ property.startsWith("--") &&
1115
+ isSoleInitial(declaration.value.value)
1116
+ ) {
1117
+ // css-variables-1 §2.2: the guaranteed-invalid value, which still overrides an earlier declaration
1118
+ builder.addDescriptor(property, [{}, "initial"]);
1000
1119
  } else if (
1001
1120
  validProperties.has(property) ||
1002
1121
  property.startsWith("--") ||
@@ -1011,6 +1130,18 @@ export function parseCustomDeclaration(
1011
1130
  }
1012
1131
  }
1013
1132
 
1133
+ function isSoleInitial(tokens: TokenOrValue[]) {
1134
+ const value = tokens.filter(
1135
+ (token) => token.type !== "token" || token.value.type !== "white-space",
1136
+ );
1137
+ return (
1138
+ value.length === 1 &&
1139
+ value[0]?.type === "token" &&
1140
+ value[0].value.type === "ident" &&
1141
+ value[0].value.value.toLowerCase() === "initial"
1142
+ );
1143
+ }
1144
+
1014
1145
  export function reduceParseUnparsed(
1015
1146
  tokenOrValues: TokenOrValue[],
1016
1147
  builder: StylesheetBuilder,
@@ -1039,8 +1170,9 @@ export function reduceParseUnparsed(
1039
1170
  }
1040
1171
  }
1041
1172
 
1042
- // Groups are the tokens grouped together by comma location
1043
- // If a group only has 1 item, it shouldn't be an array
1173
+ // Groups are the tokens grouped together by comma location. Each stays an
1174
+ // array, so a one-token item of a comma-separated list stays distinct from
1175
+ // a token of a space-separated one (css-variables-1 §2.1)
1044
1176
  groups = groups.flatMap((group): StyleDescriptor[] => {
1045
1177
  if (!Array.isArray(group)) {
1046
1178
  return [];
@@ -1054,7 +1186,7 @@ export function reduceParseUnparsed(
1054
1186
  if (first === undefined) {
1055
1187
  return [];
1056
1188
  } else {
1057
- return [first];
1189
+ return [[first]];
1058
1190
  }
1059
1191
  } else if (
1060
1192
  // This is a special case for <ratio> values
@@ -1066,13 +1198,19 @@ export function reduceParseUnparsed(
1066
1198
  )
1067
1199
  ) {
1068
1200
  // eslint-disable-next-line @typescript-eslint/no-base-to-string
1069
- return [group.join(" ")];
1201
+ return [[group.join(" ")]];
1070
1202
  } else {
1071
1203
  return [group];
1072
1204
  }
1073
1205
  });
1074
1206
 
1075
- return groups.length === 1 ? groups[0] : groups;
1207
+ if (groups.length !== 1) {
1208
+ return groups;
1209
+ }
1210
+
1211
+ // A lone group is the value, and a lone token the group
1212
+ const group = groups[0] as StyleDescriptor[];
1213
+ return group.length === 1 ? group[0] : group;
1076
1214
  }
1077
1215
 
1078
1216
  export function unparsedFunction(
@@ -1228,6 +1366,8 @@ export function parseUnparsed(
1228
1366
  builder,
1229
1367
  property,
1230
1368
  );
1369
+ case "color-mix":
1370
+ return parseColorMix(tokenOrValue.value.arguments, builder, property);
1231
1371
  default: {
1232
1372
  builder.addWarning("value", `${tokenOrValue.value.name}()`);
1233
1373
  return;
@@ -1440,6 +1580,7 @@ export function parseLength(
1440
1580
  switch (length.type) {
1441
1581
  case "calc": {
1442
1582
  // TODO: Add the calc polyfill
1583
+ builder.addWarning("value", "calc()");
1443
1584
  return undefined;
1444
1585
  }
1445
1586
  case "number": {
@@ -1592,11 +1733,23 @@ export function parseColorDeclaration(
1592
1733
  builder: StylesheetBuilder,
1593
1734
  ) {
1594
1735
  builder.addDescriptor(
1595
- declaration.property,
1736
+ propertyRename[declaration.property] ?? declaration.property,
1596
1737
  parseColor(declaration.value, builder),
1597
1738
  );
1598
1739
  }
1599
1740
 
1741
+ /**
1742
+ * Lab/LCH/OKLab/OKLCH channels can be `NaN` when lightningcss resolves a
1743
+ * degenerate `color-mix()` at compile time (e.g. mixing black with
1744
+ * `transparent` in oklab yields `NaN` for the a/b chromaticity channels).
1745
+ * Passing `NaN` to colorjs.io produces an invalid string such as
1746
+ * `#NaNNaNNaN80`, which React Native silently discards. Per CSS Color 4 a
1747
+ * missing component is treated as `0`, so coerce `NaN` to `0`.
1748
+ */
1749
+ function nanToZero(value: number): number {
1750
+ return Number.isNaN(value) ? 0 : value;
1751
+ }
1752
+
1600
1753
  export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1601
1754
  if (typeof cssColor === "string") {
1602
1755
  if (namedColors.has(cssColor)) {
@@ -1651,28 +1804,44 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1651
1804
  case "lab":
1652
1805
  color = new Color({
1653
1806
  space: cssColor.type,
1654
- coords: [cssColor.l, cssColor.a, cssColor.b],
1807
+ coords: [
1808
+ nanToZero(cssColor.l),
1809
+ nanToZero(cssColor.a),
1810
+ nanToZero(cssColor.b),
1811
+ ],
1655
1812
  alpha: cssColor.alpha,
1656
1813
  });
1657
1814
  break;
1658
1815
  case "lch":
1659
1816
  color = new Color({
1660
1817
  space: cssColor.type,
1661
- coords: [cssColor.l, cssColor.c, cssColor.h],
1818
+ coords: [
1819
+ nanToZero(cssColor.l),
1820
+ nanToZero(cssColor.c),
1821
+ nanToZero(cssColor.h),
1822
+ ],
1662
1823
  alpha: cssColor.alpha,
1663
1824
  });
1664
1825
  break;
1665
1826
  case "oklab":
1666
1827
  color = new Color({
1667
1828
  space: cssColor.type,
1668
- coords: [cssColor.l, cssColor.a, cssColor.b],
1829
+ coords: [
1830
+ nanToZero(cssColor.l),
1831
+ nanToZero(cssColor.a),
1832
+ nanToZero(cssColor.b),
1833
+ ],
1669
1834
  alpha: cssColor.alpha,
1670
1835
  });
1671
1836
  break;
1672
1837
  case "oklch":
1673
1838
  color = new Color({
1674
1839
  space: cssColor.type,
1675
- coords: [cssColor.l, cssColor.c, cssColor.h],
1840
+ coords: [
1841
+ nanToZero(cssColor.l),
1842
+ nanToZero(cssColor.c),
1843
+ nanToZero(cssColor.h),
1844
+ ],
1676
1845
  alpha: cssColor.alpha,
1677
1846
  });
1678
1847
  break;
@@ -1740,7 +1909,13 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
1740
1909
  if (!hexColors || colorPrecision) {
1741
1910
  return color?.toString({ precision: colorPrecision ?? 3 });
1742
1911
  } else {
1743
- return color?.toString({ format: "hex" });
1912
+ // Clip out-of-gamut channels, as React Native and every browser do, so a
1913
+ // folded color matches the same color resolved at runtime. toString()
1914
+ // alone would gamut map it with the CSS Color 4 algorithm instead.
1915
+ return color
1916
+ ?.to("srgb")
1917
+ .toGamut({ method: "clip" })
1918
+ .toString({ format: "hex" });
1744
1919
  }
1745
1920
  }
1746
1921
 
@@ -2120,12 +2295,8 @@ export function parseBorderBlockWidth(
2120
2295
  const start = parseBorderSideWidth(declaration.value.start, builder);
2121
2296
  const end = parseBorderSideWidth(declaration.value.end, builder);
2122
2297
 
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
- }
2298
+ builder.addDescriptor("border-top-width", start);
2299
+ builder.addDescriptor("border-bottom-width", end);
2129
2300
  }
2130
2301
 
2131
2302
  function parseBorderBlockStyle(
@@ -2135,12 +2306,8 @@ function parseBorderBlockStyle(
2135
2306
  const start = parseBorderStyle(declaration.value.start, builder);
2136
2307
  const end = parseBorderStyle(declaration.value.end, builder);
2137
2308
 
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
- }
2309
+ dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
2310
+ dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
2144
2311
  }
2145
2312
 
2146
2313
  export function parseBorderSideWidthDeclaration(
@@ -2148,7 +2315,7 @@ export function parseBorderSideWidthDeclaration(
2148
2315
  builder: StylesheetBuilder,
2149
2316
  ) {
2150
2317
  builder.addDescriptor(
2151
- declaration.property,
2318
+ propertyRename[declaration.property] ?? declaration.property,
2152
2319
  parseBorderSideWidth(declaration.value, builder),
2153
2320
  );
2154
2321
  }
@@ -2192,12 +2359,10 @@ export function parseLineHeightDeclaration(
2192
2359
  declaration: DeclarationType<"line-height">,
2193
2360
  builder: StylesheetBuilder,
2194
2361
  ) {
2195
- builder.addDescriptor("line-height", [
2196
- {},
2197
- "lineHeight",
2198
- [parseLineHeight(declaration.value, builder)],
2199
- 1,
2200
- ]);
2362
+ builder.addDescriptor(
2363
+ "line-height",
2364
+ parseLineHeight(declaration.value, builder),
2365
+ );
2201
2366
  }
2202
2367
 
2203
2368
  export function parseLineHeight(
@@ -2208,7 +2373,7 @@ export function parseLineHeight(
2208
2373
  case "normal":
2209
2374
  return undefined;
2210
2375
  case "number":
2211
- return [{}, "em", [value.value], 1];
2376
+ return [{}, "em", value.value, 1];
2212
2377
  case "length": {
2213
2378
  const length = value.value;
2214
2379
 
@@ -2221,7 +2386,7 @@ export function parseLineHeight(
2221
2386
  "style",
2222
2387
  "line-height",
2223
2388
  typeof length.value === "number"
2224
- ? length.value
2389
+ ? String(length.value)
2225
2390
  : JSON.stringify(length.value),
2226
2391
  );
2227
2392
  return;
@@ -2314,13 +2479,6 @@ export function parseFontVariantCaps(
2314
2479
  return undefined;
2315
2480
  }
2316
2481
 
2317
- export function parseLengthOrCoercePercentageToRuntime(
2318
- value: Length | DimensionPercentageFor_LengthValue | NumberOrPercentage,
2319
- builder: StylesheetBuilder,
2320
- ): StyleDescriptor {
2321
- return parseLength(value, builder);
2322
- }
2323
-
2324
2482
  export function parseGap(
2325
2483
  declaration: DeclarationType<"gap" | "column-gap" | "row-gap">,
2326
2484
  builder: StylesheetBuilder,
@@ -2633,6 +2791,102 @@ export function parseCalcFn(
2633
2791
  return;
2634
2792
  }
2635
2793
 
2794
+ export function parseColorMix(
2795
+ tokens: TokenOrValue[],
2796
+ builder: StylesheetBuilder,
2797
+ property: string,
2798
+ ): StyleDescriptor {
2799
+ const [inToken, whitespace, colorSpace, comma, ...remaining] = tokens;
2800
+ const rest = remaining.filter(
2801
+ (token) =>
2802
+ token.type !== "token" ||
2803
+ !["white-space", "comment"].includes(token.value.type),
2804
+ );
2805
+ if (
2806
+ typeof inToken !== "object" ||
2807
+ inToken.type !== "token" ||
2808
+ inToken.value.type !== "ident" ||
2809
+ inToken.value.value !== "in"
2810
+ ) {
2811
+ return;
2812
+ }
2813
+
2814
+ if (
2815
+ typeof whitespace !== "object" ||
2816
+ whitespace.type !== "token" ||
2817
+ whitespace.value.type !== "white-space"
2818
+ ) {
2819
+ return;
2820
+ }
2821
+
2822
+ if (
2823
+ typeof comma !== "object" ||
2824
+ comma.type !== "token" ||
2825
+ comma.value.type !== "comma"
2826
+ ) {
2827
+ return;
2828
+ }
2829
+
2830
+ const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
2831
+ if (typeof colorSpaceArg !== "string") {
2832
+ return;
2833
+ }
2834
+
2835
+ let nextToken = rest.shift();
2836
+
2837
+ const leftColorArg = parseUnparsed(nextToken, builder, property);
2838
+
2839
+ if (!leftColorArg) {
2840
+ return;
2841
+ }
2842
+
2843
+ nextToken = rest.shift();
2844
+
2845
+ let leftColorPercentage: StyleDescriptor | undefined;
2846
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2847
+ leftColorPercentage = parseUnparsed(nextToken, builder, property);
2848
+ nextToken = rest.shift();
2849
+ }
2850
+
2851
+ if (
2852
+ typeof nextToken !== "object" ||
2853
+ nextToken.type !== "token" ||
2854
+ nextToken.value.type !== "comma"
2855
+ ) {
2856
+ return;
2857
+ }
2858
+
2859
+ nextToken = rest.shift();
2860
+
2861
+ const rightColorArg = parseUnparsed(nextToken, builder, property);
2862
+
2863
+ nextToken = rest.shift();
2864
+ let rightColorPercentage: StyleDescriptor | undefined;
2865
+ if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
2866
+ rightColorPercentage = parseUnparsed(nextToken, builder, property);
2867
+ nextToken = rest.shift();
2868
+ }
2869
+
2870
+ // We should have expired all tokens now
2871
+ if (nextToken) {
2872
+ return;
2873
+ }
2874
+
2875
+ return [
2876
+ {},
2877
+ "colorMix",
2878
+ // Omitted weights must not leave holes: Metro serializes them as null,
2879
+ // which the native resolver rejects.
2880
+ [
2881
+ colorSpaceArg,
2882
+ leftColorArg,
2883
+ leftColorPercentage,
2884
+ rightColorArg,
2885
+ rightColorPercentage,
2886
+ ].filter((arg) => arg !== undefined),
2887
+ ];
2888
+ }
2889
+
2636
2890
  export function parseCalcArguments(
2637
2891
  [...args]: TokenOrValue[],
2638
2892
  builder: StylesheetBuilder,
@@ -2755,10 +3009,10 @@ export function parseUnresolvedColor(
2755
3009
  {},
2756
3010
  "rgba",
2757
3011
  [
2758
- round(color.r * 255),
2759
- round(color.g * 255),
2760
- round(color.b * 255),
2761
- parseUnparsed(color.alpha, builder, property),
3012
+ [round(color.r * 255)],
3013
+ [round(color.g * 255)],
3014
+ [round(color.b * 255)],
3015
+ [parseUnparsed(color.alpha, builder, property)],
2762
3016
  ],
2763
3017
  ];
2764
3018
  case "hsl":
@@ -2766,10 +3020,10 @@ export function parseUnresolvedColor(
2766
3020
  {},
2767
3021
  color.type,
2768
3022
  [
2769
- color.h,
2770
- color.s,
2771
- color.l,
2772
- parseUnparsed(color.alpha, builder, property),
3023
+ [color.h],
3024
+ [color.s],
3025
+ [color.l],
3026
+ [parseUnparsed(color.alpha, builder, property)],
2773
3027
  ],
2774
3028
  ];
2775
3029
  case "light-dark": {
@@ -3007,21 +3261,25 @@ function parseBackgroundImage(
3007
3261
  declaration: DeclarationType<"background-image">,
3008
3262
  builder: StylesheetBuilder,
3009
3263
  ) {
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] : [];
3264
+ builder.addDescriptor("experimental_backgroundImage", [
3265
+ {},
3266
+ "join",
3267
+ [
3268
+ declaration.value.flatMap((image): StyleDescriptor[] => {
3269
+ switch (image.type) {
3270
+ case "gradient": {
3271
+ const gradient = parseGradient(image.value, builder);
3272
+ return gradient ? [gradient] : [];
3273
+ }
3274
+ case "none":
3275
+ return ["none"];
3017
3276
  }
3018
- case "none":
3019
- return ["none"];
3020
- }
3021
3277
 
3022
- return [];
3023
- }),
3024
- );
3278
+ return [];
3279
+ }),
3280
+ ", ",
3281
+ ],
3282
+ ]);
3025
3283
  return;
3026
3284
  }
3027
3285
 
@@ -3035,8 +3293,8 @@ function parseGradient(
3035
3293
  {},
3036
3294
  "linear-gradient",
3037
3295
  [
3038
- parseLineDirection(gradient.direction, builder),
3039
- ...gradient.items.map((item) => parseGradientItem(item, builder)),
3296
+ [parseLineDirection(gradient.direction, builder)],
3297
+ ...gradient.items.map((item) => [parseGradientItem(item, builder)]),
3040
3298
  ],
3041
3299
  ];
3042
3300
  }
@@ -3076,10 +3334,10 @@ function parseGradientItem(
3076
3334
  args.push(parseLength(item.position, builder));
3077
3335
  }
3078
3336
 
3079
- return [{}, "@colorStop", args, 1];
3337
+ return [{}, "colorStop", args, 1];
3080
3338
  }
3081
3339
  case "hint":
3082
- return parseLength(item.value, builder);
3340
+ return [{}, "gradientPosition", parseLength(item.value, builder), 1];
3083
3341
  }
3084
3342
  }
3085
3343
 
@@ -3179,7 +3437,7 @@ function parseFilter(
3179
3437
  } as unknown as StyleDescriptor;
3180
3438
  case "hue-rotate":
3181
3439
  return {
3182
- [value.type]: parseAngle(value.value, builder),
3440
+ [toRNProperty(value.type)]: parseAngle(value.value, builder),
3183
3441
  } as unknown as StyleDescriptor;
3184
3442
  case "drop-shadow":
3185
3443
  return [