react-native-css 3.0.0-nightly.27bd5e2 → 3.0.0-nightly.46bc0ab

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 (479) hide show
  1. package/dist/commonjs/compiler/atRules.js +16 -3
  2. package/dist/commonjs/compiler/atRules.js.map +1 -1
  3. package/dist/commonjs/compiler/attributes.test.js +1 -1
  4. package/dist/commonjs/compiler/attributes.test.js.map +1 -1
  5. package/dist/commonjs/compiler/compiler.js +57 -18
  6. package/dist/commonjs/compiler/compiler.js.map +1 -1
  7. package/dist/commonjs/compiler/declarations.js +209 -107
  8. package/dist/commonjs/compiler/declarations.js.map +1 -1
  9. package/dist/commonjs/compiler/inheritance.test.js +7 -7
  10. package/dist/commonjs/compiler/inheritance.test.js.map +1 -1
  11. package/dist/commonjs/compiler/keyframes.js +1 -1
  12. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  13. package/dist/commonjs/compiler/selector-builder.js +457 -0
  14. package/dist/commonjs/compiler/selector-builder.js.map +1 -0
  15. package/dist/commonjs/compiler/selectors.js +10 -6
  16. package/dist/commonjs/compiler/selectors.js.map +1 -1
  17. package/dist/commonjs/compiler/stylesheet.js +136 -45
  18. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  19. package/dist/commonjs/components/ActivityIndicator.js +22 -0
  20. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  21. package/dist/commonjs/components/Button.js +22 -0
  22. package/dist/commonjs/components/Button.js.map +1 -0
  23. package/dist/commonjs/components/FlatList.js +19 -0
  24. package/dist/commonjs/components/FlatList.js.map +1 -0
  25. package/dist/commonjs/components/Image.js +17 -0
  26. package/dist/commonjs/components/Image.js.map +1 -0
  27. package/dist/commonjs/components/TextInput.js +17 -0
  28. package/dist/commonjs/components/TextInput.js.map +1 -0
  29. package/dist/commonjs/components/index.js +40 -0
  30. package/dist/commonjs/components/index.js.map +1 -1
  31. package/dist/commonjs/jest/index.js +34 -28
  32. package/dist/commonjs/jest/index.js.map +1 -1
  33. package/dist/commonjs/metro/index.js +7 -5
  34. package/dist/commonjs/metro/index.js.map +1 -1
  35. package/dist/commonjs/poison.pill.js +4 -1
  36. package/dist/commonjs/poison.pill.js.map +1 -1
  37. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  38. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  39. package/dist/commonjs/runtime/native/conditions/container-query.js +28 -21
  40. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
  41. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
  42. package/dist/commonjs/runtime/native/conditions/index.js +10 -46
  43. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
  44. package/dist/commonjs/runtime/native/conditions/media-query.js +19 -17
  45. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  46. package/dist/commonjs/runtime/native/injection.js +22 -20
  47. package/dist/commonjs/runtime/native/injection.js.map +1 -1
  48. package/dist/commonjs/runtime/native/react/interaction.js +10 -10
  49. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
  50. package/dist/commonjs/runtime/native/react/rules.js +22 -17
  51. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  52. package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
  53. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  54. package/dist/commonjs/runtime/native/reactivity.js +1 -12
  55. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  56. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  57. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  58. package/dist/commonjs/runtime/native/root.js +28 -0
  59. package/dist/commonjs/runtime/native/root.js.map +1 -0
  60. package/dist/commonjs/runtime/native/styles/calculate-props.js +56 -48
  61. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  62. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  63. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  64. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  65. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  66. package/dist/commonjs/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  67. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  68. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  69. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  70. package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
  71. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  72. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  73. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  74. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +83 -0
  75. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  76. package/dist/commonjs/runtime/native/styles/index.js +12 -12
  77. package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
  78. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  79. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  80. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  81. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  82. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +5 -36
  83. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  84. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  85. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  86. package/dist/commonjs/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +3 -3
  87. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  88. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  89. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  90. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  91. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  92. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  93. package/dist/commonjs/runtime/native/styles/units.js +7 -4
  94. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  95. package/dist/commonjs/runtime/native/styles/variables.js +3 -2
  96. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
  97. package/dist/commonjs/runtime/utils/objects.js +14 -6
  98. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  99. package/dist/commonjs/runtime/utils/specificity.js +2 -1
  100. package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
  101. package/dist/module/compiler/atRules.js +16 -3
  102. package/dist/module/compiler/atRules.js.map +1 -1
  103. package/dist/module/compiler/attributes.test.js +1 -1
  104. package/dist/module/compiler/attributes.test.js.map +1 -1
  105. package/dist/module/compiler/compiler.js +57 -18
  106. package/dist/module/compiler/compiler.js.map +1 -1
  107. package/dist/module/compiler/compiler.types.js.map +1 -1
  108. package/dist/module/compiler/declarations.js +204 -103
  109. package/dist/module/compiler/declarations.js.map +1 -1
  110. package/dist/module/compiler/inheritance.test.js +7 -7
  111. package/dist/module/compiler/inheritance.test.js.map +1 -1
  112. package/dist/module/compiler/keyframes.js +1 -1
  113. package/dist/module/compiler/keyframes.js.map +1 -1
  114. package/dist/module/compiler/selector-builder.js +452 -0
  115. package/dist/module/compiler/selector-builder.js.map +1 -0
  116. package/dist/module/compiler/selectors.js +10 -6
  117. package/dist/module/compiler/selectors.js.map +1 -1
  118. package/dist/module/compiler/stylesheet.js +135 -44
  119. package/dist/module/compiler/stylesheet.js.map +1 -1
  120. package/dist/module/components/ActivityIndicator.js +17 -0
  121. package/dist/module/components/ActivityIndicator.js.map +1 -0
  122. package/dist/module/components/Button.js +17 -0
  123. package/dist/module/components/Button.js.map +1 -0
  124. package/dist/module/components/FlatList.js +14 -0
  125. package/dist/module/components/FlatList.js.map +1 -0
  126. package/dist/module/components/Image.js +12 -0
  127. package/dist/module/components/Image.js.map +1 -0
  128. package/dist/module/components/TextInput.js +12 -0
  129. package/dist/module/components/TextInput.js.map +1 -0
  130. package/dist/module/components/index.js +5 -0
  131. package/dist/module/components/index.js.map +1 -1
  132. package/dist/module/jest/index.js +34 -13
  133. package/dist/module/jest/index.js.map +1 -1
  134. package/dist/module/metro/index.js +7 -5
  135. package/dist/module/metro/index.js.map +1 -1
  136. package/dist/module/poison.pill.js +4 -1
  137. package/dist/module/poison.pill.js.map +1 -1
  138. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  139. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  140. package/dist/module/runtime/native/conditions/container-query.js +28 -21
  141. package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
  142. package/dist/module/runtime/native/conditions/guards.js.map +1 -1
  143. package/dist/module/runtime/native/conditions/index.js +10 -46
  144. package/dist/module/runtime/native/conditions/index.js.map +1 -1
  145. package/dist/module/runtime/native/conditions/media-query.js +19 -17
  146. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  147. package/dist/module/runtime/native/injection.js +21 -19
  148. package/dist/module/runtime/native/injection.js.map +1 -1
  149. package/dist/module/runtime/native/react/interaction.js +10 -10
  150. package/dist/module/runtime/native/react/interaction.js.map +1 -1
  151. package/dist/module/runtime/native/react/rules.js +22 -17
  152. package/dist/module/runtime/native/react/rules.js.map +1 -1
  153. package/dist/module/runtime/native/react/useNativeCss.js +2 -1
  154. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  155. package/dist/module/runtime/native/reactivity.js +0 -11
  156. package/dist/module/runtime/native/reactivity.js.map +1 -1
  157. package/dist/module/runtime/native/reanimated.js +13 -0
  158. package/dist/module/runtime/native/reanimated.js.map +1 -0
  159. package/dist/module/runtime/native/root.js +24 -0
  160. package/dist/module/runtime/native/root.js.map +1 -0
  161. package/dist/module/runtime/native/styles/calculate-props.js +57 -49
  162. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  163. package/dist/module/runtime/native/styles/defaults.js +1 -1
  164. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  165. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  166. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  167. package/dist/module/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  168. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  169. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  170. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  171. package/dist/module/runtime/native/styles/functions/index.js +8 -0
  172. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  173. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  174. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  175. package/dist/module/runtime/native/styles/functions/transform-functions.js +76 -0
  176. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  177. package/dist/module/runtime/native/styles/index.js +12 -12
  178. package/dist/module/runtime/native/styles/index.js.map +1 -1
  179. package/dist/module/runtime/native/styles/resolve.js +20 -44
  180. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  181. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  182. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  183. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  184. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  185. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  186. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  187. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +2 -2
  188. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  189. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  190. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  191. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  192. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  193. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  194. package/dist/module/runtime/native/styles/units.js +7 -4
  195. package/dist/module/runtime/native/styles/units.js.map +1 -1
  196. package/dist/module/runtime/native/styles/variables.js +2 -1
  197. package/dist/module/runtime/native/styles/variables.js.map +1 -1
  198. package/dist/module/runtime/utils/objects.js +14 -6
  199. package/dist/module/runtime/utils/objects.js.map +1 -1
  200. package/dist/module/runtime/utils/specificity.js +2 -1
  201. package/dist/module/runtime/utils/specificity.js.map +1 -1
  202. package/dist/typescript/commonjs/example/app.config.d.ts +4 -0
  203. package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  205. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
  206. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  207. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +6 -7
  208. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  209. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +16 -19
  210. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  211. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +23 -0
  212. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  213. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
  214. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +23 -5
  216. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  218. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  219. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  220. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  222. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  224. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  225. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  226. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  227. package/dist/typescript/commonjs/src/components/index.d.ts +5 -0
  228. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  229. package/dist/typescript/commonjs/src/jest/index.d.ts +21 -5
  230. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  232. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  234. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  235. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +3 -3
  236. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  237. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
  238. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
  239. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
  240. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
  242. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
  245. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
  247. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +2 -1
  249. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  250. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +2 -10
  251. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  252. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  253. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  254. package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
  255. package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  257. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  258. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  259. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  260. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  261. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  262. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  263. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
  265. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  266. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  267. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  269. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  271. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  272. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  273. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  274. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  275. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  276. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  277. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  278. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  279. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  280. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  281. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  282. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  283. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  284. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  285. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
  286. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
  287. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  288. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
  289. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
  290. package/dist/typescript/module/example/app.config.d.ts +4 -0
  291. package/dist/typescript/module/example/app.config.d.ts.map +1 -0
  292. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  293. package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
  294. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  295. package/dist/typescript/module/src/compiler/compiler.types.d.ts +6 -7
  296. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  297. package/dist/typescript/module/src/compiler/declarations.d.ts +16 -19
  298. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  299. package/dist/typescript/module/src/compiler/selector-builder.d.ts +23 -0
  300. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  301. package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
  302. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  303. package/dist/typescript/module/src/compiler/stylesheet.d.ts +23 -5
  304. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  305. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  306. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  307. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  308. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  309. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  310. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  311. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  312. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  313. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  314. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  315. package/dist/typescript/module/src/components/index.d.ts +5 -0
  316. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  317. package/dist/typescript/module/src/jest/index.d.ts +21 -5
  318. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  319. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  320. package/dist/typescript/module/src/poison.pill.d.ts.map +1 -1
  321. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  322. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  323. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +3 -3
  324. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  325. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
  326. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
  327. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
  328. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
  329. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
  330. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  331. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -1
  332. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
  333. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
  334. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
  335. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
  336. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +2 -1
  337. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  338. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +2 -10
  339. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  340. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  341. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  342. package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
  343. package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
  344. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  345. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  346. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  347. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  348. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  349. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  350. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  351. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  352. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
  353. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  354. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  355. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  356. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  357. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  358. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  359. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  360. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  361. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  362. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  363. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  364. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  365. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  366. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  367. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  368. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  369. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  370. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  371. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  372. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  373. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
  374. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
  375. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  376. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
  377. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
  378. package/package.json +28 -4
  379. package/src/compiler/atRules.ts +17 -3
  380. package/src/compiler/attributes.test.ts +1 -1
  381. package/src/compiler/compiler.ts +63 -33
  382. package/src/compiler/compiler.types.ts +8 -8
  383. package/src/compiler/declarations.ts +374 -127
  384. package/src/compiler/inheritance.test.ts +6 -6
  385. package/src/compiler/keyframes.ts +1 -1
  386. package/src/compiler/selector-builder.ts +531 -0
  387. package/src/compiler/selectors.ts +20 -6
  388. package/src/compiler/stylesheet.ts +179 -42
  389. package/src/components/ActivityIndicator.tsx +27 -0
  390. package/src/components/Button.tsx +22 -0
  391. package/src/components/FlatList.tsx +21 -0
  392. package/src/components/Image.tsx +17 -0
  393. package/src/components/TextInput.tsx +17 -0
  394. package/src/components/index.tsx +5 -0
  395. package/src/jest/index.ts +45 -13
  396. package/src/metro/index.ts +12 -6
  397. package/src/poison.pill.ts +5 -1
  398. package/src/runtime/native/conditions/attributes.ts +52 -0
  399. package/src/runtime/native/conditions/container-query.ts +27 -22
  400. package/src/runtime/native/conditions/guards.ts +1 -2
  401. package/src/runtime/native/conditions/index.ts +12 -66
  402. package/src/runtime/native/conditions/media-query.ts +20 -20
  403. package/src/runtime/native/injection.ts +32 -31
  404. package/src/runtime/native/react/interaction.ts +12 -12
  405. package/src/runtime/native/react/rules.ts +23 -14
  406. package/src/runtime/native/react/useNativeCss.ts +4 -1
  407. package/src/runtime/native/reactivity.ts +2 -21
  408. package/src/runtime/native/reanimated.ts +22 -0
  409. package/src/runtime/native/root.ts +31 -0
  410. package/src/runtime/native/styles/calculate-props.ts +61 -50
  411. package/src/runtime/native/styles/defaults.ts +1 -0
  412. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  413. package/src/runtime/native/styles/{calc.ts → functions/calc.ts} +2 -2
  414. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  415. package/src/runtime/native/styles/functions/index.ts +5 -0
  416. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  417. package/src/runtime/native/styles/functions/transform-functions.ts +51 -0
  418. package/src/runtime/native/styles/index.ts +12 -12
  419. package/src/runtime/native/styles/resolve.ts +20 -63
  420. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  421. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -63
  422. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  423. package/src/runtime/native/styles/{box-shadow.ts → shorthands/box-shadow.ts} +3 -3
  424. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  425. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  426. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +1 -1
  427. package/src/runtime/native/styles/units.ts +8 -4
  428. package/src/runtime/native/styles/variables.ts +2 -6
  429. package/src/runtime/utils/objects.ts +14 -4
  430. package/src/runtime/utils/specificity.ts +1 -0
  431. package/types.d.ts +70 -0
  432. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  433. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  434. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  435. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  436. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  437. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  438. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  439. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  440. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  441. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  442. package/dist/module/runtime/native/styles/border.js.map +0 -1
  443. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  444. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  445. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  446. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  447. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  448. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  449. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  450. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  451. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  452. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  453. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  454. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  455. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  456. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  457. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  458. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  459. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  460. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  461. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  462. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  463. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  464. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  465. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  466. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  467. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  468. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  469. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  470. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  471. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  472. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  473. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  474. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  475. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  476. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  477. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  478. /package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
  479. /package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
@@ -3,7 +3,6 @@
3
3
  import Color from "colorjs.io";
4
4
  import type {
5
5
  Angle,
6
- BorderBlockColor,
7
6
  BorderSideWidth,
8
7
  BorderStyle,
9
8
  ColorOrAuto,
@@ -15,6 +14,7 @@ import type {
15
14
  FontStyle,
16
15
  FontVariantCaps,
17
16
  FontWeight,
17
+ GapValue,
18
18
  Gradient,
19
19
  GradientItemFor_DimensionPercentageFor_LengthValue,
20
20
  Length,
@@ -62,12 +62,16 @@ const propertyRename: Record<string, string> = {
62
62
  "background-image": "experimental_backgroundImage",
63
63
  };
64
64
 
65
+ // TODO: We need a better way to handle this
65
66
  const unparsedRuntimeParsing = new Set([
66
67
  "animation",
68
+ "border",
69
+ "box-shadow",
67
70
  "text-shadow",
68
71
  "transform",
69
- "box-shadow",
70
- "border",
72
+ "scale",
73
+ "rotate",
74
+ "translate",
71
75
  ]);
72
76
 
73
77
  const parsers: {
@@ -91,37 +95,44 @@ const parsers: {
91
95
  "block-size": parseSizeDeclaration,
92
96
  "border": parseBorder,
93
97
  "border-block": parseBorderBlock,
94
- "border-block-color": parseBorderBlockColor,
98
+ "border-block-color": parseBorderColor,
95
99
  "border-block-end": parseBorderBlockEnd,
96
100
  "border-block-end-color": parseColorDeclaration,
97
101
  "border-block-end-width": parseBorderSideWidthDeclaration,
98
102
  "border-block-start": parseBorderBlockStart,
99
103
  "border-block-start-color": parseColorDeclaration,
100
104
  "border-block-start-width": parseBorderSideWidthDeclaration,
105
+ "border-block-style": parseBorderBlockStyle,
101
106
  "border-block-width": parseBorderBlockWidth,
102
107
  "border-bottom": parseBorderSide,
103
108
  "border-bottom-color": parseColorDeclaration,
104
109
  "border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
105
110
  "border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
111
+ "border-bottom-style": parseBorderStyleDeclaration,
106
112
  "border-bottom-width": parseBorderSideWidthDeclaration,
107
113
  "border-color": parseBorderColor,
108
114
  "border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
109
115
  "border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
110
116
  "border-inline": parseBorderInline,
111
- "border-inline-color": parseBorderBlockColor,
117
+ "border-inline-color": parseBorderColor,
112
118
  "border-inline-end": parseBorderInlineEnd,
113
119
  "border-inline-end-color": parseColorDeclaration,
120
+ "border-inline-end-style": parseBorderInlineStyle,
114
121
  "border-inline-end-width": parseBorderSideWidthDeclaration,
115
122
  "border-inline-start": parseBorderInlineStart,
116
123
  "border-inline-start-color": parseColorDeclaration,
124
+ "border-inline-start-style": parseBorderInlineStyle,
117
125
  "border-inline-start-width": parseBorderSideWidthDeclaration,
118
- "border-inline-width": parseBorderBlockWidth,
126
+ "border-inline-style": parseBorderInlineStyle,
127
+ "border-inline-width": parseBorderInlineWidth,
119
128
  "border-left": parseBorderSide,
120
129
  "border-left-color": parseColorDeclaration,
130
+ "border-left-style": parseBorderStyleDeclaration,
121
131
  "border-left-width": parseBorderSideWidthDeclaration,
122
132
  "border-radius": parseBorderRadius,
123
133
  "border-right": parseBorderSide,
124
134
  "border-right-color": parseColorDeclaration,
135
+ "border-right-style": parseBorderStyleDeclaration,
125
136
  "border-right-width": parseBorderSideWidthDeclaration,
126
137
  "border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
127
138
  "border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
@@ -130,11 +141,12 @@ const parsers: {
130
141
  "border-top-color": parseColorDeclaration,
131
142
  "border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
132
143
  "border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
144
+ "border-top-style": parseBorderStyleDeclaration,
133
145
  "border-top-width": parseBorderSideWidthDeclaration,
134
146
  "border-width": parseBorderWidth,
135
147
  "bottom": parseSizeDeclaration,
136
148
  "box-shadow": parseBoxShadow,
137
- "caret-color": parseColorOrAuto,
149
+ "caret-color": parseColorOrAutoDeclaration,
138
150
  "color": parseFontColorDeclaration,
139
151
  "column-gap": parseGap,
140
152
  "container": parseContainer,
@@ -255,9 +267,9 @@ export function parseDeclaration(
255
267
  }
256
268
 
257
269
  if (declaration.property === "unparsed") {
258
- parseDeclarationUnparsed(declaration, builder);
270
+ parseUnparsedDeclaration(declaration, builder);
259
271
  } else if (declaration.property === "custom") {
260
- parseDeclarationCustom(declaration, builder);
272
+ parseCustomDeclaration(declaration, builder);
261
273
  } else {
262
274
  parseWithParser(declaration, builder);
263
275
  }
@@ -269,6 +281,7 @@ function parseWithParser(declaration: Declaration, builder: StylesheetBuilder) {
269
281
 
270
282
  builder.descriptorProperty = declaration.property;
271
283
 
284
+ builder.setWarningProperty(declaration.property);
272
285
  const value = parser(declaration, builder, declaration.property);
273
286
 
274
287
  if (value !== undefined) {
@@ -342,15 +355,41 @@ function parseBorderRadius(
342
355
  }
343
356
 
344
357
  function parseBorderColor(
345
- { value }: DeclarationType<"border-color">,
358
+ declaration: DeclarationType<
359
+ "border-color" | "border-block-color" | "border-inline-color"
360
+ >,
346
361
  builder: StylesheetBuilder,
347
362
  ) {
348
- builder.addShorthand("border-color", {
349
- "border-top-color": parseColor(value.top, builder),
350
- "border-bottom-color": parseColor(value.bottom, builder),
351
- "border-left-color": parseColor(value.left, builder),
352
- "border-right-color": parseColor(value.right, builder),
353
- });
363
+ switch (declaration.property) {
364
+ case "border-color":
365
+ builder.addShorthand("border-color", {
366
+ "border-top-color": parseColor(declaration.value.top, builder),
367
+ "border-bottom-color": parseColor(declaration.value.bottom, builder),
368
+ "border-left-color": parseColor(declaration.value.left, builder),
369
+ "border-right-color": parseColor(declaration.value.right, builder),
370
+ });
371
+ break;
372
+ case "border-block-color":
373
+ builder.addDescriptor(
374
+ "border-top-color",
375
+ parseColor(declaration.value.start, builder),
376
+ );
377
+ builder.addDescriptor(
378
+ "border-bottom-color",
379
+ parseColor(declaration.value.end, builder),
380
+ );
381
+ break;
382
+ case "border-inline-color":
383
+ builder.addDescriptor(
384
+ "border-left-color",
385
+ parseColor(declaration.value.start, builder),
386
+ );
387
+ builder.addDescriptor(
388
+ "border-right-color",
389
+ parseColor(declaration.value.end, builder),
390
+ );
391
+ break;
392
+ }
354
393
  }
355
394
 
356
395
  function parseBorderWidth(
@@ -474,6 +513,43 @@ function parseBorderInlineEnd(
474
513
  );
475
514
  }
476
515
 
516
+ export function parseBorderInlineWidth(
517
+ declaration: DeclarationType<"border-inline-width">,
518
+ builder: StylesheetBuilder,
519
+ ) {
520
+ builder.addDescriptor(
521
+ "border-left-width",
522
+ parseBorderSideWidth(declaration.value.start, builder),
523
+ );
524
+ builder.addDescriptor(
525
+ "border-right-width",
526
+ parseBorderSideWidth(declaration.value.end, builder),
527
+ );
528
+ }
529
+
530
+ export function parseBorderInlineStyle(
531
+ declaration: DeclarationType<
532
+ | "border-inline-style"
533
+ | "border-inline-start-style"
534
+ | "border-inline-end-style"
535
+ >,
536
+ builder: StylesheetBuilder,
537
+ ) {
538
+ if (typeof declaration.value === "string") {
539
+ builder.addDescriptor(
540
+ "border-style",
541
+ parseBorderStyle(declaration.value, builder),
542
+ );
543
+ } else if (declaration.value.start === declaration.value.end) {
544
+ builder.addDescriptor(
545
+ "border-style",
546
+ parseBorderStyle(declaration.value.start, builder),
547
+ );
548
+ } else {
549
+ builder.addWarning("property", "border-inline-style");
550
+ }
551
+ }
552
+
477
553
  function parseFlexFlow(
478
554
  { value }: DeclarationType<"flex-flow">,
479
555
  builder: StylesheetBuilder,
@@ -594,22 +670,22 @@ function parseTransform(
594
670
  ) {
595
671
  builder.addDescriptor("transform", [
596
672
  {},
597
- "@transform",
673
+ "transform",
598
674
  value.flatMap((t): StyleDescriptor[] => {
599
675
  switch (t.type) {
600
676
  case "perspective":
601
- return [[{}, "@perspective", parseLength(t.value, builder)]];
677
+ return [[{}, "perspective", parseLength(t.value, builder)]];
602
678
  case "translate":
603
679
  return [
604
680
  [
605
681
  {},
606
- "@translateX",
682
+ "translateX",
607
683
  parseLengthOrCoercePercentageToRuntime(t.value[0], builder),
608
684
  ],
609
685
  [
610
686
  [
611
687
  {},
612
- "@translateY",
688
+ "translateY",
613
689
  parseLengthOrCoercePercentageToRuntime(t.value[1], builder),
614
690
  ],
615
691
  ],
@@ -618,7 +694,7 @@ function parseTransform(
618
694
  return [
619
695
  [
620
696
  {},
621
- "@translateX",
697
+ "translateX",
622
698
  parseLengthOrCoercePercentageToRuntime(t.value, builder),
623
699
  ],
624
700
  ];
@@ -626,22 +702,22 @@ function parseTransform(
626
702
  return [
627
703
  [
628
704
  {},
629
- "@translateY",
705
+ "translateY",
630
706
  parseLengthOrCoercePercentageToRuntime(t.value, builder),
631
707
  ],
632
708
  ];
633
709
  case "rotate":
634
- return [[{}, "@rotate", parseAngle(t.value, builder)]];
710
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
635
711
  case "rotateX":
636
- return [[{}, "@rotateX", parseAngle(t.value, builder)]];
712
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
637
713
  case "rotateY":
638
- return [[{}, "@rotateY", parseAngle(t.value, builder)]];
714
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
639
715
  case "rotateZ":
640
- return [[{}, "@rotateZ", parseAngle(t.value, builder)]];
716
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
641
717
  case "scale":
642
718
  return [
643
- [{}, "@scaleX", parseLength(t.value[0], builder)],
644
- [{}, "@scaleY", parseLength(t.value[1], builder)],
719
+ [{}, "scaleX", parseLength(t.value[0], builder)],
720
+ [{}, "scaleY", parseLength(t.value[1], builder)],
645
721
  ];
646
722
  case "scaleX":
647
723
  return [[{}, "scaleX", parseLength(t.value, builder)]];
@@ -690,21 +766,29 @@ function parseRotate(
690
766
  { value }: DeclarationType<"rotate">,
691
767
  builder: StylesheetBuilder,
692
768
  ) {
693
- builder.addDescriptor("rotateX", [
694
- {},
695
- "rotateX",
696
- parseAngle(value.x, builder),
697
- ]);
698
- builder.addDescriptor("rotateY", [
699
- {},
700
- "rotateY",
701
- parseAngle(value.y, builder),
702
- ]);
703
- builder.addDescriptor("rotateZ", [
704
- {},
705
- "rotateZ",
706
- parseAngle(value.z, builder),
707
- ]);
769
+ if (value.x) {
770
+ builder.addDescriptor("rotateX", [
771
+ {},
772
+ "rotateX",
773
+ parseAngle(value.angle, builder),
774
+ ]);
775
+ }
776
+
777
+ if (value.y) {
778
+ builder.addDescriptor("rotateY", [
779
+ {},
780
+ "rotateY",
781
+ parseAngle(value.angle, builder),
782
+ ]);
783
+ }
784
+
785
+ if (value.z) {
786
+ builder.addDescriptor("rotateZ", [
787
+ {},
788
+ "rotateZ",
789
+ parseAngle(value.angle, builder),
790
+ ]);
791
+ }
708
792
  }
709
793
 
710
794
  function parseScale(
@@ -742,7 +826,17 @@ function parseLetterSpacing(
742
826
  if (value.type === "normal") {
743
827
  return;
744
828
  }
745
- return parseLength(value.value, builder);
829
+ const descriptor = parseLength(value.value, builder);
830
+
831
+ if (
832
+ Array.isArray(descriptor) &&
833
+ descriptor[1] === "em" &&
834
+ typeof descriptor[2] === "number"
835
+ ) {
836
+ return descriptor[2];
837
+ }
838
+
839
+ return descriptor;
746
840
  }
747
841
 
748
842
  function parseTextDecoration(
@@ -771,7 +865,11 @@ function parseZIndex(
771
865
  }
772
866
  }
773
867
 
774
- function parseContainerType(_value: unknown, _builder: StylesheetBuilder) {
868
+ function parseContainerType(
869
+ _declaration: DeclarationType<"container-type">,
870
+ builder: StylesheetBuilder,
871
+ ) {
872
+ builder.addContainer(["___default___"]);
775
873
  return;
776
874
  }
777
875
 
@@ -791,7 +889,7 @@ function parseContainer(
791
889
  return;
792
890
  }
793
891
 
794
- export function parseDeclarationUnparsed(
892
+ export function parseUnparsedDeclaration(
795
893
  declaration: Extract<Declaration, { property: "unparsed" }>,
796
894
  builder: StylesheetBuilder,
797
895
  ) {
@@ -802,6 +900,8 @@ export function parseDeclarationUnparsed(
802
900
  return;
803
901
  }
804
902
 
903
+ builder.setWarningProperty(property);
904
+
805
905
  /**
806
906
  * React Native doesn't support all the logical properties
807
907
  */
@@ -816,24 +916,15 @@ export function parseDeclarationUnparsed(
816
916
  builder.descriptorProperty = property;
817
917
 
818
918
  if (unparsedRuntimeParsing.has(property)) {
819
- const args = parseUnparsed(declaration.value.value, builder);
919
+ const args = parseUnparsed(declaration.value.value, builder, property);
820
920
 
821
921
  if (property === "animation") {
822
- builder.addDescriptor("animation", [
823
- {},
824
- `@${toRNProperty(property)}`,
825
- args,
826
- ]);
922
+ builder.addDescriptor("animation", [{}, property, args]);
827
923
  } else {
828
- builder.addDescriptor(property, [
829
- {},
830
- `@${toRNProperty(property)}`,
831
- args,
832
- 1,
833
- ]);
924
+ builder.addDescriptor(property, [{}, toRNProperty(property), args, 1]);
834
925
  }
835
926
  } else {
836
- const value = parseUnparsed(declaration.value.value, builder);
927
+ const value = parseUnparsed(declaration.value.value, builder, property);
837
928
 
838
929
  builder.addDescriptor(property, value);
839
930
 
@@ -847,19 +938,31 @@ export function parseDeclarationUnparsed(
847
938
  }
848
939
  }
849
940
 
850
- export function parseDeclarationCustom(
941
+ export function parseCustomDeclaration(
851
942
  declaration: Extract<Declaration, { property: "custom" }>,
852
943
  builder: StylesheetBuilder,
853
944
  ) {
854
945
  const property = declaration.value.name;
855
- if (
946
+
947
+ if (property === "-webkit-line-clamp") {
948
+ builder.addDescriptor(
949
+ property,
950
+ parseUnparsed(declaration.value.value, builder, property),
951
+ );
952
+ } else if (property === "-rn-ripple-style") {
953
+ builder.addDescriptor(
954
+ property,
955
+ parseUnparsed(declaration.value.value, builder, property) ===
956
+ "borderless",
957
+ );
958
+ } else if (
856
959
  validProperties.has(property) ||
857
960
  property.startsWith("--") ||
858
961
  property.startsWith("-rn-")
859
962
  ) {
860
963
  builder.addDescriptor(
861
964
  property,
862
- parseUnparsed(declaration.value.value, builder, allowAuto.has(property)),
965
+ parseUnparsed(declaration.value.value, builder, property),
863
966
  );
864
967
  } else {
865
968
  builder.addWarning("property", declaration.value.name);
@@ -869,9 +972,13 @@ export function parseDeclarationCustom(
869
972
  export function reduceParseUnparsed(
870
973
  tokenOrValues: TokenOrValue[],
871
974
  builder: StylesheetBuilder,
975
+ property: string,
976
+ allowAuto: boolean,
872
977
  ): StyleDescriptor {
873
978
  const result = tokenOrValues
874
- .map((tokenOrValue) => parseUnparsed(tokenOrValue, builder))
979
+ .map((tokenOrValue) =>
980
+ parseUnparsed(tokenOrValue, builder, property, allowAuto),
981
+ )
875
982
  .filter((v) => v !== undefined);
876
983
 
877
984
  if (result.length === 0) {
@@ -890,6 +997,8 @@ export function reduceParseUnparsed(
890
997
  }
891
998
  }
892
999
 
1000
+ // Groups are the tokens grouped together by comma location
1001
+ // If a group only has 1 item, it shouldn't be an array
893
1002
  groups = groups.flatMap((group): StyleDescriptor[] => {
894
1003
  if (!Array.isArray(group)) {
895
1004
  return [];
@@ -905,6 +1014,17 @@ export function reduceParseUnparsed(
905
1014
  } else {
906
1015
  return [first];
907
1016
  }
1017
+ } else if (
1018
+ // This is a special case for <ratio> values
1019
+ group.includes("/") &&
1020
+ group.every((item) =>
1021
+ typeof item === "string" && item === "/"
1022
+ ? item
1023
+ : typeof item === "number",
1024
+ )
1025
+ ) {
1026
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
1027
+ return [group.join(" ")];
908
1028
  } else {
909
1029
  return [group];
910
1030
  }
@@ -916,11 +1036,13 @@ export function reduceParseUnparsed(
916
1036
  export function unparsedFunction(
917
1037
  token: Extract<TokenOrValue, { type: "function" }>,
918
1038
  builder: StylesheetBuilder,
1039
+ property: string,
1040
+ allowAuto: boolean,
919
1041
  ): StyleFunction {
920
1042
  return [
921
1043
  {},
922
- token.value.name,
923
- reduceParseUnparsed(token.value.arguments, builder),
1044
+ toRNProperty(token.value.name),
1045
+ reduceParseUnparsed(token.value.arguments, builder, property, allowAuto),
924
1046
  ];
925
1047
  }
926
1048
 
@@ -937,7 +1059,8 @@ export function parseUnparsed(
937
1059
  | undefined
938
1060
  | null,
939
1061
  builder: StylesheetBuilder,
940
- allowAuto = false,
1062
+ property: string,
1063
+ allowAuto = allowAutoProperties.has(property),
941
1064
  ): StyleDescriptor {
942
1065
  if (tokenOrValue === undefined || tokenOrValue === null) {
943
1066
  return;
@@ -960,7 +1083,12 @@ export function parseUnparsed(
960
1083
  }
961
1084
 
962
1085
  if (Array.isArray(tokenOrValue)) {
963
- const args = reduceParseUnparsed(tokenOrValue, builder);
1086
+ const args = reduceParseUnparsed(
1087
+ tokenOrValue,
1088
+ builder,
1089
+ property,
1090
+ allowAuto,
1091
+ );
964
1092
  if (!args) return;
965
1093
  if (Array.isArray(args) && args.length === 1) return args[0];
966
1094
  return args;
@@ -968,11 +1096,21 @@ export function parseUnparsed(
968
1096
 
969
1097
  switch (tokenOrValue.type) {
970
1098
  case "unresolved-color": {
971
- return parseUnresolvedColor(tokenOrValue.value, builder);
1099
+ return parseUnresolvedColor(
1100
+ tokenOrValue.value,
1101
+ builder,
1102
+ property,
1103
+ allowAuto,
1104
+ );
972
1105
  }
973
1106
  case "var": {
974
1107
  let args: StyleDescriptor = tokenOrValue.value.name.ident.slice(2);
975
- const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
1108
+ const fallback = parseUnparsed(
1109
+ tokenOrValue.value.fallback,
1110
+ builder,
1111
+ property,
1112
+ allowAuto,
1113
+ );
976
1114
  if (fallback !== undefined) {
977
1115
  args = [args, fallback];
978
1116
  }
@@ -981,43 +1119,53 @@ export function parseUnparsed(
981
1119
  }
982
1120
  case "function": {
983
1121
  switch (tokenOrValue.value.name) {
984
- case "translate":
985
- case "rotate":
986
- case "rotateX":
987
- case "rotateY":
988
- case "skewX":
989
- case "skewY":
990
- case "scale":
991
- case "scaleX":
992
- case "scaleY":
993
- case "translateX":
994
- case "translateY":
995
- tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
996
- return unparsedFunction(tokenOrValue, builder);
1122
+ case "blur":
997
1123
  case "brightness":
998
1124
  case "contrast":
999
1125
  case "cubic-bezier":
1000
1126
  case "drop-shadow":
1001
1127
  case "fontScale":
1128
+ case "getPixelSizeForLayoutSize":
1002
1129
  case "grayscale":
1003
1130
  case "hsl":
1004
1131
  case "hsla":
1005
1132
  case "hue-rotate":
1006
1133
  case "invert":
1007
- case "linear-gradient":
1008
1134
  case "opacity":
1009
1135
  case "pixelScale":
1010
- case "pixelSizeForLayoutSize":
1011
1136
  case "platformColor":
1012
- case "radial-gradient":
1013
1137
  case "rgb":
1014
1138
  case "rgba":
1139
+ case "rotate":
1140
+ case "rotateX":
1141
+ case "rotateY":
1015
1142
  case "roundToNearestPixel":
1016
1143
  case "saturate":
1144
+ case "scale":
1145
+ case "scaleX":
1146
+ case "scaleY":
1017
1147
  case "sepia":
1018
1148
  case "shadow":
1149
+ case "skewX":
1150
+ case "skewY":
1019
1151
  case "steps":
1020
- return unparsedFunction(tokenOrValue, builder);
1152
+ case "translate":
1153
+ case "translateX":
1154
+ case "translateY":
1155
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
1156
+ case "linear-gradient":
1157
+ case "radial-gradient":
1158
+ // These are special as React Native requires the '-' in their name
1159
+ return [
1160
+ {},
1161
+ tokenOrValue.value.name,
1162
+ reduceParseUnparsed(
1163
+ tokenOrValue.value.arguments,
1164
+ builder,
1165
+ property,
1166
+ allowAuto,
1167
+ ),
1168
+ ];
1021
1169
  case "hairlineWidth":
1022
1170
  return [{}, tokenOrValue.value.name, []];
1023
1171
  case "calc":
@@ -1028,9 +1176,10 @@ export function parseUnparsed(
1028
1176
  tokenOrValue.value.name,
1029
1177
  tokenOrValue.value.arguments,
1030
1178
  builder,
1179
+ property,
1031
1180
  );
1032
1181
  default: {
1033
- builder.addWarning("function", tokenOrValue.value.name);
1182
+ builder.addWarning("value", `${tokenOrValue.value.name}()`);
1034
1183
  return;
1035
1184
  }
1036
1185
  }
@@ -1060,6 +1209,8 @@ export function parseUnparsed(
1060
1209
  return true;
1061
1210
  } else if (value === "false") {
1062
1211
  return false;
1212
+ } else if (value === "infinity") {
1213
+ return Number.MAX_SAFE_INTEGER;
1063
1214
  } else {
1064
1215
  return value;
1065
1216
  }
@@ -1076,11 +1227,16 @@ export function parseUnparsed(
1076
1227
  return parseDimension(tokenOrValue.value, builder);
1077
1228
  case "comma":
1078
1229
  return CommaSeparator as unknown as StyleDescriptor;
1230
+ case "delim": {
1231
+ if (tokenOrValue.value.value === "/") {
1232
+ return tokenOrValue.value.value;
1233
+ }
1234
+ return;
1235
+ }
1079
1236
  case "at-keyword":
1080
1237
  case "hash":
1081
1238
  case "id-hash":
1082
1239
  case "unquoted-url":
1083
- case "delim":
1084
1240
  case "white-space":
1085
1241
  case "comment":
1086
1242
  case "colon":
@@ -1151,23 +1307,35 @@ export function parseLength(
1151
1307
  const { inlineRem = 14 } = builder.getOptions();
1152
1308
 
1153
1309
  if (typeof length === "number") {
1154
- return length;
1310
+ return round(length);
1155
1311
  }
1156
1312
 
1157
1313
  if ("unit" in length) {
1158
1314
  switch (length.unit) {
1159
- case "px":
1160
- return length.value;
1315
+ case "px": {
1316
+ if (length.value === Infinity) {
1317
+ return 9999;
1318
+ } else if (length.value === -Infinity) {
1319
+ return -9999;
1320
+ } else {
1321
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
1322
+ const value = Math.max(
1323
+ Math.min(length.value, Number.MAX_SAFE_INTEGER),
1324
+ Number.MIN_SAFE_INTEGER,
1325
+ );
1326
+ return round(value);
1327
+ }
1328
+ }
1161
1329
  case "rem":
1162
1330
  if (typeof inlineRem === "number") {
1163
1331
  return length.value * inlineRem;
1164
1332
  } else {
1165
- return [{}, "rem", length.value];
1333
+ return [{}, "rem", round(length.value)];
1166
1334
  }
1167
1335
  case "vw":
1168
1336
  case "vh":
1169
1337
  case "em":
1170
- return [{}, length.unit, length.value, 1];
1338
+ return [{}, length.unit, round(length.value), 1];
1171
1339
  case "in":
1172
1340
  case "cm":
1173
1341
  case "mm":
@@ -1250,7 +1418,7 @@ export function parseAngle(angle: Angle | number, builder: StylesheetBuilder) {
1250
1418
  case "rad":
1251
1419
  return `${angle.value}${angle.type}`;
1252
1420
  default:
1253
- builder.addWarning("value", angle.value);
1421
+ builder.addWarning("value", `${angle.value} ${angle.type}`);
1254
1422
  return undefined;
1255
1423
  }
1256
1424
  }
@@ -1333,7 +1501,7 @@ export function parseSize(
1333
1501
  return;
1334
1502
  }
1335
1503
 
1336
- export function parseColorOrAuto(
1504
+ export function parseColorOrAutoDeclaration(
1337
1505
  { value }: { value: ColorOrAuto },
1338
1506
  builder: StylesheetBuilder,
1339
1507
  ) {
@@ -1835,7 +2003,13 @@ export function parseOverflow(
1835
2003
  }
1836
2004
 
1837
2005
  export function parseBorderStyleDeclaration(
1838
- declaration: DeclarationType<"border-style">,
2006
+ declaration: DeclarationType<
2007
+ | "border-style"
2008
+ | "border-left-style"
2009
+ | "border-right-style"
2010
+ | "border-top-style"
2011
+ | "border-bottom-style"
2012
+ >,
1839
2013
  builder: StylesheetBuilder,
1840
2014
  ) {
1841
2015
  return parseBorderStyle(declaration.value, builder);
@@ -1868,17 +2042,8 @@ export function parseBorderStyle(
1868
2042
  return undefined;
1869
2043
  }
1870
2044
 
1871
- export function parseBorderBlockColor(
1872
- { value }: { value: BorderBlockColor },
1873
- builder: StylesheetBuilder,
1874
- ) {
1875
- builder.addDescriptor("border-top-color", parseColor(value.start, builder));
1876
- builder.addDescriptor("border-bottom-color", parseColor(value.end, builder));
1877
- return;
1878
- }
1879
-
1880
2045
  export function parseBorderBlockWidth(
1881
- declaration: DeclarationType<"border-block-width" | "border-inline-width">,
2046
+ declaration: DeclarationType<"border-block-width">,
1882
2047
  builder: StylesheetBuilder,
1883
2048
  ) {
1884
2049
  builder.addDescriptor(
@@ -1891,11 +2056,48 @@ export function parseBorderBlockWidth(
1891
2056
  );
1892
2057
  }
1893
2058
 
2059
+ function parseBorderBlockStyle(
2060
+ declaration: DeclarationType<"border-block-style">,
2061
+ builder: StylesheetBuilder,
2062
+ ) {
2063
+ if (declaration.value.start === declaration.value.end) {
2064
+ builder.addDescriptor(
2065
+ "border-style",
2066
+ parseBorderStyle(declaration.value.start, builder),
2067
+ );
2068
+ } else {
2069
+ builder.addWarning("property", "border-block-style");
2070
+ }
2071
+ }
2072
+
1894
2073
  export function parseBorderSideWidthDeclaration(
1895
- declaration: { value: BorderSideWidth },
2074
+ declaration: DeclarationType<
2075
+ | "border-block-end-width"
2076
+ | "border-block-start-width"
2077
+ | "border-bottom-width"
2078
+ | "border-inline-end-width"
2079
+ | "border-inline-start-width"
2080
+ | "border-left-width"
2081
+ | "border-right-width"
2082
+ | "border-top-width"
2083
+ >,
1896
2084
  builder: StylesheetBuilder,
1897
2085
  ) {
1898
- return parseBorderSideWidth(declaration.value, builder);
2086
+ if (declaration.property.includes("block")) {
2087
+ builder.addDescriptor(
2088
+ `border-${declaration.property.includes("start") ? "top" : "bottom"}-width`,
2089
+ parseBorderSideWidth(declaration.value, builder),
2090
+ );
2091
+ return;
2092
+ } else if (declaration.property.includes("inline")) {
2093
+ builder.addDescriptor(
2094
+ `border-${declaration.property.includes("start") ? "left" : "right"}-width`,
2095
+ parseBorderSideWidth(declaration.value, builder),
2096
+ );
2097
+ return;
2098
+ } else {
2099
+ return parseBorderSideWidth(declaration.value, builder);
2100
+ }
1899
2101
  }
1900
2102
 
1901
2103
  export function parseBorderSideWidth(
@@ -1958,7 +2160,8 @@ export function parseLineHeight(
1958
2160
  case "percentage":
1959
2161
  case "calc":
1960
2162
  builder.addWarning(
1961
- "value",
2163
+ "style",
2164
+ "line-height",
1962
2165
  typeof length.value === "number"
1963
2166
  ? length.value
1964
2167
  : JSON.stringify(length.value),
@@ -2065,8 +2268,14 @@ export function parseGap(
2065
2268
  builder: StylesheetBuilder,
2066
2269
  ) {
2067
2270
  if ("column" in declaration.value) {
2068
- builder.addDescriptor("row-gap", parseGap(declaration, builder));
2069
- builder.addDescriptor("column-gap", parseGap(declaration, builder));
2271
+ builder.addDescriptor(
2272
+ "row-gap",
2273
+ parseGapValue(declaration.value.row, builder),
2274
+ );
2275
+ builder.addDescriptor(
2276
+ "column-gap",
2277
+ parseGapValue(declaration.value.column, builder),
2278
+ );
2070
2279
 
2071
2280
  return;
2072
2281
  } else {
@@ -2079,6 +2288,17 @@ export function parseGap(
2079
2288
  }
2080
2289
  }
2081
2290
 
2291
+ function parseGapValue(
2292
+ value: GapValue,
2293
+ builder: StylesheetBuilder,
2294
+ ): StyleDescriptor {
2295
+ if (value.type === "normal") {
2296
+ return;
2297
+ } else {
2298
+ return parseLength(value.value, builder);
2299
+ }
2300
+ }
2301
+
2082
2302
  export function parseTextAlign(
2083
2303
  { value }: DeclarationType<"text-align">,
2084
2304
  builder: StylesheetBuilder,
@@ -2204,7 +2424,11 @@ export function parseDimension(
2204
2424
  ): StyleDescriptor {
2205
2425
  switch (unit) {
2206
2426
  case "px":
2207
- return value;
2427
+ if (value === Infinity) {
2428
+ return 9999;
2429
+ } else {
2430
+ return value;
2431
+ }
2208
2432
  case "%":
2209
2433
  return `${value}%`;
2210
2434
  case "rnh":
@@ -2231,20 +2455,24 @@ export function parseUserSelect(
2231
2455
  }
2232
2456
 
2233
2457
  export function parseSVGPaint(
2234
- { value }: DeclarationType<"fill" | "stroke">,
2458
+ { value, property }: DeclarationType<"fill" | "stroke">,
2235
2459
  builder: StylesheetBuilder,
2236
2460
  ) {
2461
+ let parsedValue: StyleDescriptor | undefined;
2462
+
2237
2463
  if (value.type === "none") {
2238
- return "transparent";
2464
+ parsedValue = "transparent";
2239
2465
  } else if (value.type === "color") {
2240
- return parseColor(value.value, builder);
2466
+ parsedValue = parseColor(value.value, builder);
2467
+ } else {
2468
+ return;
2241
2469
  }
2242
2470
 
2243
- return;
2471
+ builder.addDescriptor(property, parsedValue);
2244
2472
  }
2245
2473
 
2246
2474
  export function round(number: number) {
2247
- return Math.round((number + Number.EPSILON) * 100) / 100;
2475
+ return Math.round((number + Number.EPSILON) * 10000) / 10000;
2248
2476
  }
2249
2477
 
2250
2478
  export function parseDimensionPercentageFor_LengthValue(
@@ -2260,7 +2488,7 @@ export function parseDimensionPercentageFor_LengthValue(
2260
2488
  }
2261
2489
  }
2262
2490
 
2263
- const allowAuto = new Set(["pointer-events"]);
2491
+ const allowAutoProperties = new Set(["pointer-events"]);
2264
2492
 
2265
2493
  export function parseEnv(
2266
2494
  value: EnvironmentVariable,
@@ -2278,7 +2506,7 @@ export function parseEnv(
2278
2506
  "var",
2279
2507
  [
2280
2508
  `--react-native-css-${value.name.value}`,
2281
- parseUnparsed(value.fallback, builder),
2509
+ parseUnparsed(value.fallback, builder, value.name.value),
2282
2510
  ],
2283
2511
  1,
2284
2512
  ];
@@ -2301,8 +2529,9 @@ export function parseCalcFn(
2301
2529
  name: string,
2302
2530
  tokens: TokenOrValue[],
2303
2531
  builder: StylesheetBuilder,
2532
+ property: string,
2304
2533
  ): StyleDescriptor {
2305
- const args = parseCalcArguments(tokens, builder);
2534
+ const args = parseCalcArguments(tokens, builder, property);
2306
2535
  if (args) {
2307
2536
  return [{}, name, args];
2308
2537
  }
@@ -2313,6 +2542,7 @@ export function parseCalcFn(
2313
2542
  export function parseCalcArguments(
2314
2543
  [...args]: TokenOrValue[],
2315
2544
  builder: StylesheetBuilder,
2545
+ property: string,
2316
2546
  ) {
2317
2547
  const parsed: StyleDescriptor[] = [];
2318
2548
 
@@ -2327,7 +2557,7 @@ export function parseCalcArguments(
2327
2557
  case "var":
2328
2558
  case "function":
2329
2559
  case "unresolved-color": {
2330
- const value = parseUnparsed(arg, builder);
2560
+ const value = parseUnparsed(arg, builder, property);
2331
2561
 
2332
2562
  if (value === undefined) {
2333
2563
  return undefined;
@@ -2403,7 +2633,7 @@ export function parseCalcArguments(
2403
2633
  // Then drop the surrounding parenthesis
2404
2634
  .slice(1, -1);
2405
2635
 
2406
- parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
2636
+ parsed.push(parseCalcFn("calc", innerCalcArgs, builder, property));
2407
2637
 
2408
2638
  break;
2409
2639
  }
@@ -2456,6 +2686,8 @@ export function parseTranslateProp(
2456
2686
  export function parseUnresolvedColor(
2457
2687
  color: UnresolvedColor,
2458
2688
  builder: StylesheetBuilder,
2689
+ property: string,
2690
+ allowAuto: boolean,
2459
2691
  ): StyleDescriptor {
2460
2692
  switch (color.type) {
2461
2693
  case "rgb":
@@ -2466,26 +2698,31 @@ export function parseUnresolvedColor(
2466
2698
  round(color.r * 255),
2467
2699
  round(color.g * 255),
2468
2700
  round(color.b * 255),
2469
- parseUnparsed(color.alpha, builder),
2701
+ parseUnparsed(color.alpha, builder, property),
2470
2702
  ],
2471
2703
  ];
2472
2704
  case "hsl":
2473
2705
  return [
2474
2706
  {},
2475
2707
  color.type,
2476
- [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)],
2708
+ [
2709
+ color.h,
2710
+ color.s,
2711
+ color.l,
2712
+ parseUnparsed(color.alpha, builder, property),
2713
+ ],
2477
2714
  ];
2478
2715
  case "light-dark": {
2479
2716
  const extraRule = builder.extendRule({
2480
2717
  m: [["=", "prefers-color-scheme", "dark"]],
2481
2718
  });
2482
2719
  builder.addUnnamedDescriptor(
2483
- reduceParseUnparsed(color.dark, builder),
2720
+ reduceParseUnparsed(color.dark, builder, property, allowAuto),
2484
2721
  false,
2485
2722
  extraRule,
2486
2723
  );
2487
2724
  builder.addExtraRule(extraRule);
2488
- return reduceParseUnparsed(color.light, builder);
2725
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
2489
2726
  }
2490
2727
  default:
2491
2728
  color satisfies never;
@@ -2731,7 +2968,7 @@ function parseGradient(
2731
2968
  case "linear": {
2732
2969
  return [
2733
2970
  {},
2734
- "@linear-gradient",
2971
+ "linear-gradient",
2735
2972
  [
2736
2973
  parseLineDirection(gradient.direction, builder),
2737
2974
  ...gradient.items.map((item) => parseGradientItem(item, builder)),
@@ -2808,6 +3045,16 @@ function parseFilter(
2808
3045
  [value.type]: parseAngle(value.value, builder),
2809
3046
  } as unknown as StyleDescriptor;
2810
3047
  case "drop-shadow":
3048
+ return [
3049
+ {},
3050
+ toRNProperty(value.type),
3051
+ [
3052
+ parseLength(value.value.xOffset, builder),
3053
+ parseLength(value.value.yOffset, builder),
3054
+ parseLength(value.value.blur, builder),
3055
+ parseColor(value.value.color, builder),
3056
+ ],
3057
+ ] as unknown as StyleDescriptor;
2811
3058
  case "url":
2812
3059
  return;
2813
3060
  }