react-native-css 3.0.0-nightly.61014be → 3.0.0-nightly.67b5d08

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 (510) 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/compiler.js +34 -18
  4. package/dist/commonjs/compiler/compiler.js.map +1 -1
  5. package/dist/commonjs/compiler/declarations.js +214 -136
  6. package/dist/commonjs/compiler/declarations.js.map +1 -1
  7. package/dist/commonjs/compiler/inheritance.test.js +15 -15
  8. package/dist/commonjs/compiler/inheritance.test.js.map +1 -1
  9. package/dist/commonjs/compiler/keyframes.js +1 -1
  10. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  11. package/dist/commonjs/compiler/pseudo-elements.js +49 -0
  12. package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
  13. package/dist/commonjs/compiler/selector-builder.js +501 -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 +137 -46
  18. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  19. package/dist/commonjs/compiler/supports.js +27 -0
  20. package/dist/commonjs/compiler/supports.js.map +1 -0
  21. package/dist/commonjs/components/ActivityIndicator.js +22 -0
  22. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  23. package/dist/commonjs/components/Button.js +22 -0
  24. package/dist/commonjs/components/Button.js.map +1 -0
  25. package/dist/commonjs/components/FlatList.js +19 -0
  26. package/dist/commonjs/components/FlatList.js.map +1 -0
  27. package/dist/commonjs/components/Image.js +17 -0
  28. package/dist/commonjs/components/Image.js.map +1 -0
  29. package/dist/commonjs/components/Switch.js +17 -0
  30. package/dist/commonjs/components/Switch.js.map +1 -0
  31. package/dist/commonjs/components/TextInput.js +17 -0
  32. package/dist/commonjs/components/TextInput.js.map +1 -0
  33. package/dist/commonjs/components/index.js +48 -0
  34. package/dist/commonjs/components/index.js.map +1 -1
  35. package/dist/commonjs/jest/index.js +33 -10
  36. package/dist/commonjs/jest/index.js.map +1 -1
  37. package/dist/commonjs/metro/index.js +1 -1
  38. package/dist/commonjs/metro/index.js.map +1 -1
  39. package/dist/commonjs/poison.pill.js +4 -1
  40. package/dist/commonjs/poison.pill.js.map +1 -1
  41. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  42. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  43. package/dist/commonjs/runtime/native/conditions/container-query.js +28 -21
  44. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
  45. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
  46. package/dist/commonjs/runtime/native/conditions/index.js +12 -46
  47. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
  48. package/dist/commonjs/runtime/native/conditions/media-query.js +26 -21
  49. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  50. package/dist/commonjs/runtime/native/injection.js +22 -20
  51. package/dist/commonjs/runtime/native/injection.js.map +1 -1
  52. package/dist/commonjs/runtime/native/react/interaction.js +10 -10
  53. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
  54. package/dist/commonjs/runtime/native/react/rules.js +26 -24
  55. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  56. package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
  57. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  58. package/dist/commonjs/runtime/native/reactivity.js +1 -12
  59. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  60. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  61. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  62. package/dist/commonjs/runtime/native/root.js +28 -0
  63. package/dist/commonjs/runtime/native/root.js.map +1 -0
  64. package/dist/commonjs/runtime/native/styles/calculate-props.js +63 -38
  65. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  66. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  67. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  68. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  69. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  70. package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
  71. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  72. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  73. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  74. package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
  75. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  76. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  77. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  78. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
  79. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  80. package/dist/commonjs/runtime/native/styles/index.js +12 -12
  81. package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
  82. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  83. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  84. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  85. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  86. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +5 -36
  87. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  88. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  89. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  90. package/dist/commonjs/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +3 -3
  91. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  92. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  93. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  94. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  95. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  96. package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  97. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  98. package/dist/commonjs/runtime/native/styles/units.js +7 -4
  99. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  100. package/dist/commonjs/runtime/native/styles/variables.js +3 -2
  101. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
  102. package/dist/commonjs/runtime/utils/objects.js +14 -6
  103. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  104. package/dist/commonjs/runtime/utils/specificity.js +2 -1
  105. package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
  106. package/dist/module/compiler/atRules.js +16 -3
  107. package/dist/module/compiler/atRules.js.map +1 -1
  108. package/dist/module/compiler/compiler.js +34 -18
  109. package/dist/module/compiler/compiler.js.map +1 -1
  110. package/dist/module/compiler/compiler.types.js.map +1 -1
  111. package/dist/module/compiler/declarations.js +209 -132
  112. package/dist/module/compiler/declarations.js.map +1 -1
  113. package/dist/module/compiler/inheritance.test.js +15 -15
  114. package/dist/module/compiler/inheritance.test.js.map +1 -1
  115. package/dist/module/compiler/keyframes.js +1 -1
  116. package/dist/module/compiler/keyframes.js.map +1 -1
  117. package/dist/module/compiler/pseudo-elements.js +44 -0
  118. package/dist/module/compiler/pseudo-elements.js.map +1 -0
  119. package/dist/module/compiler/selector-builder.js +496 -0
  120. package/dist/module/compiler/selector-builder.js.map +1 -0
  121. package/dist/module/compiler/selectors.js +10 -6
  122. package/dist/module/compiler/selectors.js.map +1 -1
  123. package/dist/module/compiler/stylesheet.js +136 -45
  124. package/dist/module/compiler/stylesheet.js.map +1 -1
  125. package/dist/module/compiler/supports.js +23 -0
  126. package/dist/module/compiler/supports.js.map +1 -0
  127. package/dist/module/components/ActivityIndicator.js +17 -0
  128. package/dist/module/components/ActivityIndicator.js.map +1 -0
  129. package/dist/module/components/Button.js +17 -0
  130. package/dist/module/components/Button.js.map +1 -0
  131. package/dist/module/components/FlatList.js +14 -0
  132. package/dist/module/components/FlatList.js.map +1 -0
  133. package/dist/module/components/Image.js +12 -0
  134. package/dist/module/components/Image.js.map +1 -0
  135. package/dist/module/components/Switch.js +12 -0
  136. package/dist/module/components/Switch.js.map +1 -0
  137. package/dist/module/components/TextInput.js +12 -0
  138. package/dist/module/components/TextInput.js.map +1 -0
  139. package/dist/module/components/index.js +6 -0
  140. package/dist/module/components/index.js.map +1 -1
  141. package/dist/module/jest/index.js +32 -10
  142. package/dist/module/jest/index.js.map +1 -1
  143. package/dist/module/metro/index.js +1 -1
  144. package/dist/module/metro/index.js.map +1 -1
  145. package/dist/module/poison.pill.js +4 -1
  146. package/dist/module/poison.pill.js.map +1 -1
  147. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  148. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  149. package/dist/module/runtime/native/conditions/container-query.js +28 -21
  150. package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
  151. package/dist/module/runtime/native/conditions/guards.js.map +1 -1
  152. package/dist/module/runtime/native/conditions/index.js +12 -46
  153. package/dist/module/runtime/native/conditions/index.js.map +1 -1
  154. package/dist/module/runtime/native/conditions/media-query.js +27 -22
  155. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  156. package/dist/module/runtime/native/injection.js +21 -19
  157. package/dist/module/runtime/native/injection.js.map +1 -1
  158. package/dist/module/runtime/native/react/interaction.js +10 -10
  159. package/dist/module/runtime/native/react/interaction.js.map +1 -1
  160. package/dist/module/runtime/native/react/rules.js +26 -24
  161. package/dist/module/runtime/native/react/rules.js.map +1 -1
  162. package/dist/module/runtime/native/react/useNativeCss.js +2 -1
  163. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  164. package/dist/module/runtime/native/reactivity.js +0 -11
  165. package/dist/module/runtime/native/reactivity.js.map +1 -1
  166. package/dist/module/runtime/native/reanimated.js +13 -0
  167. package/dist/module/runtime/native/reanimated.js.map +1 -0
  168. package/dist/module/runtime/native/root.js +24 -0
  169. package/dist/module/runtime/native/root.js.map +1 -0
  170. package/dist/module/runtime/native/styles/calculate-props.js +64 -39
  171. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  172. package/dist/module/runtime/native/styles/defaults.js +1 -1
  173. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  174. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  175. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  176. package/dist/module/runtime/native/styles/functions/calc.js +120 -0
  177. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  178. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  179. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  180. package/dist/module/runtime/native/styles/functions/index.js +8 -0
  181. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  182. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  183. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  184. package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
  185. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  186. package/dist/module/runtime/native/styles/index.js +12 -12
  187. package/dist/module/runtime/native/styles/index.js.map +1 -1
  188. package/dist/module/runtime/native/styles/resolve.js +20 -44
  189. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  190. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  191. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  192. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  193. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  194. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  195. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  196. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +2 -2
  197. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  198. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  199. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  200. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  201. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  202. package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  203. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  204. package/dist/module/runtime/native/styles/units.js +7 -4
  205. package/dist/module/runtime/native/styles/units.js.map +1 -1
  206. package/dist/module/runtime/native/styles/variables.js +2 -1
  207. package/dist/module/runtime/native/styles/variables.js.map +1 -1
  208. package/dist/module/runtime/utils/objects.js +14 -6
  209. package/dist/module/runtime/utils/objects.js.map +1 -1
  210. package/dist/module/runtime/utils/specificity.js +2 -1
  211. package/dist/module/runtime/utils/specificity.js.map +1 -1
  212. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  213. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
  214. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +7 -8
  216. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +16 -19
  218. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
  220. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
  222. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
  224. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +21 -7
  226. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  227. package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
  228. package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
  229. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  230. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  231. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  232. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  233. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  234. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  235. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  236. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
  238. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
  239. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  240. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  241. package/dist/typescript/commonjs/src/components/index.d.ts +6 -0
  242. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/jest/index.d.ts +20 -3
  244. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  245. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  248. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  249. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +3 -3
  250. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  251. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
  252. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
  253. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
  254. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
  255. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
  256. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  257. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -1
  258. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
  259. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
  260. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
  261. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
  262. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +2 -1
  263. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  264. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +2 -10
  265. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  266. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  267. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
  269. package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +1 -1
  271. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  272. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  274. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  275. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  276. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  277. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  278. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  279. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
  280. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  281. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  282. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  283. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  284. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  285. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  286. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  287. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  288. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  289. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  290. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  291. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  292. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  293. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  294. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  295. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  296. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  297. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  299. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  300. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
  301. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
  302. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  303. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
  304. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
  305. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  306. package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
  307. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  308. package/dist/typescript/module/src/compiler/compiler.types.d.ts +7 -8
  309. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  310. package/dist/typescript/module/src/compiler/declarations.d.ts +16 -19
  311. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  312. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
  313. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
  314. package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
  315. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  316. package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
  317. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  318. package/dist/typescript/module/src/compiler/stylesheet.d.ts +21 -7
  319. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  320. package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
  321. package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
  322. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  323. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  324. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  325. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  326. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  327. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  328. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  329. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  330. package/dist/typescript/module/src/components/Switch.d.ts +8 -0
  331. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
  332. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  333. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  334. package/dist/typescript/module/src/components/index.d.ts +6 -0
  335. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  336. package/dist/typescript/module/src/jest/index.d.ts +20 -3
  337. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  338. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  339. package/dist/typescript/module/src/poison.pill.d.ts.map +1 -1
  340. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  341. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  342. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +3 -3
  343. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  344. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
  345. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
  346. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
  347. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
  348. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
  349. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  350. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -1
  351. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
  352. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
  353. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
  354. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
  355. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +2 -1
  356. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  357. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +2 -10
  358. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  359. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  360. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  361. package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
  362. package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
  363. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +1 -1
  364. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  365. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  366. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  367. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  368. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  369. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  370. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  371. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  372. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
  373. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  374. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  375. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  376. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  377. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  378. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  379. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  380. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  381. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  382. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  383. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  384. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  385. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  386. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  387. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  388. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  389. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  390. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  391. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  392. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  393. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
  394. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
  395. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  396. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
  397. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
  398. package/package.json +6 -3
  399. package/src/compiler/atRules.ts +17 -3
  400. package/src/compiler/compiler.ts +38 -32
  401. package/src/compiler/compiler.types.ts +9 -9
  402. package/src/compiler/declarations.ts +379 -166
  403. package/src/compiler/inheritance.test.ts +13 -13
  404. package/src/compiler/keyframes.ts +1 -1
  405. package/src/compiler/pseudo-elements.ts +54 -0
  406. package/src/compiler/selector-builder.ts +586 -0
  407. package/src/compiler/selectors.ts +20 -6
  408. package/src/compiler/stylesheet.ts +186 -51
  409. package/src/compiler/supports.ts +26 -0
  410. package/src/components/ActivityIndicator.tsx +27 -0
  411. package/src/components/Button.tsx +22 -0
  412. package/src/components/FlatList.tsx +21 -0
  413. package/src/components/Image.tsx +17 -0
  414. package/src/components/Switch.tsx +17 -0
  415. package/src/components/TextInput.tsx +17 -0
  416. package/src/components/index.tsx +6 -0
  417. package/src/jest/index.ts +41 -8
  418. package/src/metro/index.ts +6 -3
  419. package/src/poison.pill.ts +5 -1
  420. package/src/runtime/native/conditions/attributes.ts +52 -0
  421. package/src/runtime/native/conditions/container-query.ts +27 -22
  422. package/src/runtime/native/conditions/guards.ts +1 -2
  423. package/src/runtime/native/conditions/index.ts +14 -66
  424. package/src/runtime/native/conditions/media-query.ts +29 -25
  425. package/src/runtime/native/injection.ts +32 -31
  426. package/src/runtime/native/react/interaction.ts +12 -12
  427. package/src/runtime/native/react/rules.ts +27 -23
  428. package/src/runtime/native/react/useNativeCss.ts +4 -1
  429. package/src/runtime/native/reactivity.ts +2 -21
  430. package/src/runtime/native/reanimated.ts +22 -0
  431. package/src/runtime/native/root.ts +31 -0
  432. package/src/runtime/native/styles/calculate-props.ts +71 -39
  433. package/src/runtime/native/styles/defaults.ts +1 -0
  434. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  435. package/src/runtime/native/styles/functions/calc.ts +121 -0
  436. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  437. package/src/runtime/native/styles/functions/index.ts +5 -0
  438. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  439. package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
  440. package/src/runtime/native/styles/index.ts +12 -12
  441. package/src/runtime/native/styles/resolve.ts +20 -63
  442. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  443. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -63
  444. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  445. package/src/runtime/native/styles/{box-shadow.ts → shorthands/box-shadow.ts} +3 -3
  446. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  447. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  448. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +4 -2
  449. package/src/runtime/native/styles/units.ts +8 -4
  450. package/src/runtime/native/styles/variables.ts +2 -6
  451. package/src/runtime/utils/objects.ts +16 -4
  452. package/src/runtime/utils/specificity.ts +1 -0
  453. package/dist/commonjs/compiler/attributes.test.js +0 -20
  454. package/dist/commonjs/compiler/attributes.test.js.map +0 -1
  455. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  456. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  457. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  458. package/dist/commonjs/runtime/native/styles/calc.js +0 -85
  459. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  460. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  461. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  462. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  463. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  464. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  465. package/dist/module/compiler/attributes.test.js +0 -20
  466. package/dist/module/compiler/attributes.test.js.map +0 -1
  467. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  468. package/dist/module/runtime/native/styles/border.js.map +0 -1
  469. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  470. package/dist/module/runtime/native/styles/calc.js +0 -79
  471. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  472. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  473. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  474. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  475. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  476. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  477. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +0 -2
  478. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +0 -1
  479. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  480. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  481. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  482. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  483. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  484. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  485. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  486. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  487. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  488. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  489. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  490. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  491. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  492. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  493. package/dist/typescript/module/src/compiler/attributes.test.d.ts +0 -2
  494. package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +0 -1
  495. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  496. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  497. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  498. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  499. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  500. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  501. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  502. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  503. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  504. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  505. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  506. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  507. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  508. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  509. package/src/compiler/attributes.test.ts +0 -28
  510. package/src/runtime/native/styles/calc.ts +0 -97
@@ -13,8 +13,9 @@ exports.parseAlignItems = parseAlignItems;
13
13
  exports.parseAlignSelf = parseAlignSelf;
14
14
  exports.parseAngle = parseAngle;
15
15
  exports.parseAspectRatio = parseAspectRatio;
16
- exports.parseBorderBlockColor = parseBorderBlockColor;
17
16
  exports.parseBorderBlockWidth = parseBorderBlockWidth;
17
+ exports.parseBorderInlineStyle = parseBorderInlineStyle;
18
+ exports.parseBorderInlineWidth = parseBorderInlineWidth;
18
19
  exports.parseBorderSideWidth = parseBorderSideWidth;
19
20
  exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
20
21
  exports.parseBorderStyle = parseBorderStyle;
@@ -24,10 +25,9 @@ exports.parseCalcArguments = parseCalcArguments;
24
25
  exports.parseCalcFn = parseCalcFn;
25
26
  exports.parseColor = parseColor;
26
27
  exports.parseColorDeclaration = parseColorDeclaration;
27
- exports.parseColorOrAuto = parseColorOrAuto;
28
+ exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
29
+ exports.parseCustomDeclaration = parseCustomDeclaration;
28
30
  exports.parseDeclaration = parseDeclaration;
29
- exports.parseDeclarationCustom = parseDeclarationCustom;
30
- exports.parseDeclarationUnparsed = parseDeclarationUnparsed;
31
31
  exports.parseDimension = parseDimension;
32
32
  exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
33
33
  exports.parseDisplay = parseDisplay;
@@ -67,6 +67,7 @@ exports.parseTextShadow = parseTextShadow;
67
67
  exports.parseTime = parseTime;
68
68
  exports.parseTranslateProp = parseTranslateProp;
69
69
  exports.parseUnparsed = parseUnparsed;
70
+ exports.parseUnparsedDeclaration = parseUnparsedDeclaration;
70
71
  exports.parseUnresolvedColor = parseUnresolvedColor;
71
72
  exports.parseUserSelect = parseUserSelect;
72
73
  exports.parseVerticalAlign = parseVerticalAlign;
@@ -83,7 +84,9 @@ const CommaSeparator = Symbol("CommaSeparator");
83
84
  const propertyRename = {
84
85
  "background-image": "experimental_backgroundImage"
85
86
  };
86
- const unparsedRuntimeParsing = new Set(["animation", "text-shadow", "transform", "box-shadow", "border"]);
87
+
88
+ // TODO: We need a better way to handle this
89
+ const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
87
90
  const parsers = {
88
91
  "align-content": parseAlignContent,
89
92
  "align-items": parseAlignItems,
@@ -103,37 +106,44 @@ const parsers = {
103
106
  "block-size": parseSizeDeclaration,
104
107
  "border": parseBorder,
105
108
  "border-block": parseBorderBlock,
106
- "border-block-color": parseBorderBlockColor,
109
+ "border-block-color": parseBorderColor,
107
110
  "border-block-end": parseBorderBlockEnd,
108
111
  "border-block-end-color": parseColorDeclaration,
109
112
  "border-block-end-width": parseBorderSideWidthDeclaration,
110
113
  "border-block-start": parseBorderBlockStart,
111
114
  "border-block-start-color": parseColorDeclaration,
112
115
  "border-block-start-width": parseBorderSideWidthDeclaration,
116
+ "border-block-style": parseBorderBlockStyle,
113
117
  "border-block-width": parseBorderBlockWidth,
114
118
  "border-bottom": parseBorderSide,
115
119
  "border-bottom-color": parseColorDeclaration,
116
120
  "border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
117
121
  "border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
122
+ "border-bottom-style": parseBorderStyleDeclaration,
118
123
  "border-bottom-width": parseBorderSideWidthDeclaration,
119
124
  "border-color": parseBorderColor,
120
125
  "border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
121
126
  "border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
122
127
  "border-inline": parseBorderInline,
123
- "border-inline-color": parseBorderBlockColor,
128
+ "border-inline-color": parseBorderColor,
124
129
  "border-inline-end": parseBorderInlineEnd,
125
130
  "border-inline-end-color": parseColorDeclaration,
131
+ "border-inline-end-style": parseBorderInlineStyle,
126
132
  "border-inline-end-width": parseBorderSideWidthDeclaration,
127
133
  "border-inline-start": parseBorderInlineStart,
128
134
  "border-inline-start-color": parseColorDeclaration,
135
+ "border-inline-start-style": parseBorderInlineStyle,
129
136
  "border-inline-start-width": parseBorderSideWidthDeclaration,
130
- "border-inline-width": parseBorderBlockWidth,
137
+ "border-inline-style": parseBorderInlineStyle,
138
+ "border-inline-width": parseBorderInlineWidth,
131
139
  "border-left": parseBorderSide,
132
140
  "border-left-color": parseColorDeclaration,
141
+ "border-left-style": parseBorderStyleDeclaration,
133
142
  "border-left-width": parseBorderSideWidthDeclaration,
134
143
  "border-radius": parseBorderRadius,
135
144
  "border-right": parseBorderSide,
136
145
  "border-right-color": parseColorDeclaration,
146
+ "border-right-style": parseBorderStyleDeclaration,
137
147
  "border-right-width": parseBorderSideWidthDeclaration,
138
148
  "border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
139
149
  "border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
@@ -142,11 +152,12 @@ const parsers = {
142
152
  "border-top-color": parseColorDeclaration,
143
153
  "border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
144
154
  "border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
155
+ "border-top-style": parseBorderStyleDeclaration,
145
156
  "border-top-width": parseBorderSideWidthDeclaration,
146
157
  "border-width": parseBorderWidth,
147
158
  "bottom": parseSizeDeclaration,
148
159
  "box-shadow": parseBoxShadow,
149
- "caret-color": parseColorOrAuto,
160
+ "caret-color": parseColorOrAutoDeclaration,
150
161
  "color": parseFontColorDeclaration,
151
162
  "column-gap": parseGap,
152
163
  "container": parseContainer,
@@ -265,9 +276,9 @@ function parseDeclaration(declaration, builder) {
265
276
  return;
266
277
  }
267
278
  if (declaration.property === "unparsed") {
268
- parseDeclarationUnparsed(declaration, builder);
279
+ parseUnparsedDeclaration(declaration, builder);
269
280
  } else if (declaration.property === "custom") {
270
- parseDeclarationCustom(declaration, builder);
281
+ parseCustomDeclaration(declaration, builder);
271
282
  } else {
272
283
  parseWithParser(declaration, builder);
273
284
  }
@@ -276,6 +287,7 @@ function parseWithParser(declaration, builder) {
276
287
  if (declaration.property in parsers) {
277
288
  const parser = parsers[declaration.property];
278
289
  builder.descriptorProperty = declaration.property;
290
+ builder.setWarningProperty(declaration.property);
279
291
  const value = parser(declaration, builder, declaration.property);
280
292
  if (value !== undefined) {
281
293
  builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, value);
@@ -320,15 +332,25 @@ function parseBorderRadius({
320
332
  "border-top-right-radius": parseSize2DDimensionPercentage(value.topRight, builder)
321
333
  });
322
334
  }
323
- function parseBorderColor({
324
- value
325
- }, builder) {
326
- builder.addShorthand("border-color", {
327
- "border-top-color": parseColor(value.top, builder),
328
- "border-bottom-color": parseColor(value.bottom, builder),
329
- "border-left-color": parseColor(value.left, builder),
330
- "border-right-color": parseColor(value.right, builder)
331
- });
335
+ function parseBorderColor(declaration, builder) {
336
+ switch (declaration.property) {
337
+ case "border-color":
338
+ builder.addShorthand("border-color", {
339
+ "border-top-color": parseColor(declaration.value.top, builder),
340
+ "border-bottom-color": parseColor(declaration.value.bottom, builder),
341
+ "border-left-color": parseColor(declaration.value.left, builder),
342
+ "border-right-color": parseColor(declaration.value.right, builder)
343
+ });
344
+ break;
345
+ case "border-block-color":
346
+ builder.addDescriptor("border-top-color", parseColor(declaration.value.start, builder));
347
+ builder.addDescriptor("border-bottom-color", parseColor(declaration.value.end, builder));
348
+ break;
349
+ case "border-inline-color":
350
+ builder.addDescriptor("border-left-color", parseColor(declaration.value.start, builder));
351
+ builder.addDescriptor("border-right-color", parseColor(declaration.value.end, builder));
352
+ break;
353
+ }
332
354
  }
333
355
  function parseBorderWidth({
334
356
  value
@@ -396,6 +418,19 @@ function parseBorderInlineEnd({
396
418
  builder.addDescriptor("border-right-color", parseColor(value.color, builder));
397
419
  builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
398
420
  }
421
+ function parseBorderInlineWidth(declaration, builder) {
422
+ builder.addDescriptor("border-left-width", parseBorderSideWidth(declaration.value.start, builder));
423
+ builder.addDescriptor("border-right-width", parseBorderSideWidth(declaration.value.end, builder));
424
+ }
425
+ function parseBorderInlineStyle(declaration, builder) {
426
+ if (typeof declaration.value === "string") {
427
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value, builder));
428
+ } else if (declaration.value.start === declaration.value.end) {
429
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value.start, builder));
430
+ } else {
431
+ builder.addWarning("property", "border-inline-style");
432
+ }
433
+ }
399
434
  function parseFlexFlow({
400
435
  value
401
436
  }, builder) {
@@ -482,26 +517,26 @@ function parseFont({
482
517
  function parseTransform({
483
518
  value
484
519
  }, builder) {
485
- builder.addDescriptor("transform", [{}, "@transform", value.flatMap(t => {
520
+ builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
486
521
  switch (t.type) {
487
522
  case "perspective":
488
- return [[{}, "@perspective", parseLength(t.value, builder)]];
523
+ return [[{}, "perspective", parseLength(t.value, builder)]];
489
524
  case "translate":
490
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
525
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
491
526
  case "translateX":
492
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
527
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
493
528
  case "translateY":
494
- return [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
529
+ return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
495
530
  case "rotate":
496
- return [[{}, "@rotate", parseAngle(t.value, builder)]];
531
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
497
532
  case "rotateX":
498
- return [[{}, "@rotateX", parseAngle(t.value, builder)]];
533
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
499
534
  case "rotateY":
500
- return [[{}, "@rotateY", parseAngle(t.value, builder)]];
535
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
501
536
  case "rotateZ":
502
- return [[{}, "@rotateZ", parseAngle(t.value, builder)]];
537
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
503
538
  case "scale":
504
- return [[{}, "@scaleX", parseLength(t.value[0], builder)], [{}, "@scaleY", parseLength(t.value[1], builder)]];
539
+ return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
505
540
  case "scaleX":
506
541
  return [[{}, "scaleX", parseLength(t.value, builder)]];
507
542
  case "scaleY":
@@ -533,9 +568,15 @@ function parseTranslate({
533
568
  function parseRotate({
534
569
  value
535
570
  }, builder) {
536
- builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.x, builder)]);
537
- builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.y, builder)]);
538
- builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.z, builder)]);
571
+ if (value.x) {
572
+ builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
573
+ }
574
+ if (value.y) {
575
+ builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
576
+ }
577
+ if (value.z) {
578
+ builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
579
+ }
539
580
  }
540
581
  function parseScale({
541
582
  value
@@ -555,7 +596,11 @@ function parseLetterSpacing({
555
596
  if (value.type === "normal") {
556
597
  return;
557
598
  }
558
- return parseLength(value.value, builder);
599
+ const descriptor = parseLength(value.value, builder);
600
+ if (Array.isArray(descriptor) && descriptor[1] === "em" && typeof descriptor[2] === "number") {
601
+ return descriptor[2];
602
+ }
603
+ return descriptor;
559
604
  }
560
605
  function parseTextDecoration({
561
606
  value
@@ -573,7 +618,8 @@ function parseZIndex({
573
618
  return;
574
619
  }
575
620
  }
576
- function parseContainerType(_value, _builder) {
621
+ function parseContainerType(_declaration, builder) {
622
+ builder.addContainer(["___default___"]);
577
623
  return;
578
624
  }
579
625
  function parseContainerName({
@@ -588,12 +634,13 @@ function parseContainer({
588
634
  builder.addContainer(value.name.type === "none" ? false : value.name.value);
589
635
  return;
590
636
  }
591
- function parseDeclarationUnparsed(declaration, builder) {
637
+ function parseUnparsedDeclaration(declaration, builder) {
592
638
  let property = declaration.value.propertyId.property;
593
639
  if (!(property in parsers)) {
594
640
  builder.addWarning("property", property);
595
641
  return;
596
642
  }
643
+ builder.setWarningProperty(property);
597
644
 
598
645
  /**
599
646
  * React Native doesn't support all the logical properties
@@ -608,14 +655,14 @@ function parseDeclarationUnparsed(declaration, builder) {
608
655
  */
609
656
  builder.descriptorProperty = property;
610
657
  if (unparsedRuntimeParsing.has(property)) {
611
- const args = parseUnparsed(declaration.value.value, builder);
658
+ const args = parseUnparsed(declaration.value.value, builder, property);
612
659
  if (property === "animation") {
613
- builder.addDescriptor("animation", [{}, `@${(0, _selectors.toRNProperty)(property)}`, args]);
660
+ builder.addDescriptor("animation", [{}, property, args]);
614
661
  } else {
615
- builder.addDescriptor(property, [{}, `@${(0, _selectors.toRNProperty)(property)}`, args, 1]);
662
+ builder.addDescriptor(property, [{}, (0, _selectors.toRNProperty)(property), args, 1]);
616
663
  }
617
664
  } else {
618
- const value = parseUnparsed(declaration.value.value, builder);
665
+ const value = parseUnparsed(declaration.value.value, builder, property);
619
666
  builder.addDescriptor(property, value);
620
667
  if (property === "font-size") {
621
668
  builder.addDescriptor("--__rn-css-em", value);
@@ -625,16 +672,20 @@ function parseDeclarationUnparsed(declaration, builder) {
625
672
  }
626
673
  }
627
674
  }
628
- function parseDeclarationCustom(declaration, builder) {
675
+ function parseCustomDeclaration(declaration, builder) {
629
676
  const property = declaration.value.name;
630
- if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
631
- builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, allowAuto.has(property)));
677
+ if (property === "-webkit-line-clamp") {
678
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
679
+ } else if (property === "-rn-ripple-style") {
680
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
681
+ } else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
682
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
632
683
  } else {
633
684
  builder.addWarning("property", declaration.value.name);
634
685
  }
635
686
  }
636
- function reduceParseUnparsed(tokenOrValues, builder) {
637
- const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder)).filter(v => v !== undefined);
687
+ function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
688
+ const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
638
689
  if (result.length === 0) {
639
690
  return undefined;
640
691
  }
@@ -648,6 +699,9 @@ function reduceParseUnparsed(tokenOrValues, builder) {
648
699
  currentGroup.push(value);
649
700
  }
650
701
  }
702
+
703
+ // Groups are the tokens grouped together by comma location
704
+ // If a group only has 1 item, it shouldn't be an array
651
705
  groups = groups.flatMap(group => {
652
706
  if (!Array.isArray(group)) {
653
707
  return [];
@@ -661,21 +715,26 @@ function reduceParseUnparsed(tokenOrValues, builder) {
661
715
  } else {
662
716
  return [first];
663
717
  }
718
+ } else if (
719
+ // This is a special case for <ratio> values
720
+ group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
721
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
722
+ return [group.join(" ")];
664
723
  } else {
665
724
  return [group];
666
725
  }
667
726
  });
668
727
  return groups.length === 1 ? groups[0] : groups;
669
728
  }
670
- function unparsedFunction(token, builder) {
671
- return [{}, token.value.name, reduceParseUnparsed(token.value.arguments, builder)];
729
+ function unparsedFunction(token, builder, property, allowAuto) {
730
+ return [{}, (0, _selectors.toRNProperty)(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
672
731
  }
673
732
 
674
733
  /**
675
734
  * When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
676
735
  * This export function best efforts parsing it into a export function that we can evaluate at runtime
677
736
  */
678
- function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
737
+ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
679
738
  if (tokenOrValue === undefined || tokenOrValue === null) {
680
739
  return;
681
740
  }
@@ -694,7 +753,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
694
753
  return round(tokenOrValue);
695
754
  }
696
755
  if (Array.isArray(tokenOrValue)) {
697
- const args = reduceParseUnparsed(tokenOrValue, builder);
756
+ const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
698
757
  if (!args) return;
699
758
  if (Array.isArray(args) && args.length === 1) return args[0];
700
759
  return args;
@@ -702,12 +761,12 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
702
761
  switch (tokenOrValue.type) {
703
762
  case "unresolved-color":
704
763
  {
705
- return parseUnresolvedColor(tokenOrValue.value, builder);
764
+ return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
706
765
  }
707
766
  case "var":
708
767
  {
709
768
  let args = tokenOrValue.value.name.ident.slice(2);
710
- const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
769
+ const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
711
770
  if (fallback !== undefined) {
712
771
  args = [args, fallback];
713
772
  }
@@ -716,53 +775,54 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
716
775
  case "function":
717
776
  {
718
777
  switch (tokenOrValue.value.name) {
719
- case "translate":
720
- case "rotate":
721
- case "rotateX":
722
- case "rotateY":
723
- case "skewX":
724
- case "skewY":
725
- case "scale":
726
- case "scaleX":
727
- case "scaleY":
728
- case "translateX":
729
- case "translateY":
730
- tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
731
- return unparsedFunction(tokenOrValue, builder);
778
+ case "blur":
732
779
  case "brightness":
733
780
  case "contrast":
734
781
  case "cubic-bezier":
735
782
  case "drop-shadow":
736
783
  case "fontScale":
784
+ case "getPixelSizeForLayoutSize":
737
785
  case "grayscale":
738
786
  case "hsl":
739
787
  case "hsla":
740
788
  case "hue-rotate":
741
789
  case "invert":
742
- case "linear-gradient":
743
790
  case "opacity":
744
791
  case "pixelScale":
745
- case "pixelSizeForLayoutSize":
746
792
  case "platformColor":
747
- case "radial-gradient":
748
793
  case "rgb":
749
794
  case "rgba":
795
+ case "rotate":
796
+ case "rotateX":
797
+ case "rotateY":
750
798
  case "roundToNearestPixel":
751
799
  case "saturate":
800
+ case "scale":
801
+ case "scaleX":
802
+ case "scaleY":
752
803
  case "sepia":
753
804
  case "shadow":
805
+ case "skewX":
806
+ case "skewY":
754
807
  case "steps":
755
- return unparsedFunction(tokenOrValue, builder);
808
+ case "translate":
809
+ case "translateX":
810
+ case "translateY":
811
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
812
+ case "linear-gradient":
813
+ case "radial-gradient":
814
+ // These are special as React Native requires the '-' in their name
815
+ return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
756
816
  case "hairlineWidth":
757
817
  return [{}, tokenOrValue.value.name, []];
758
818
  case "calc":
759
819
  case "max":
760
820
  case "min":
761
821
  case "clamp":
762
- return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
822
+ return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
763
823
  default:
764
824
  {
765
- builder.addWarning("function", tokenOrValue.value.name);
825
+ builder.addWarning("value", `${tokenOrValue.value.name}()`);
766
826
  return;
767
827
  }
768
828
  }
@@ -791,6 +851,8 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
791
851
  return true;
792
852
  } else if (value === "false") {
793
853
  return false;
854
+ } else if (value === "infinity") {
855
+ return Number.MAX_SAFE_INTEGER;
794
856
  } else {
795
857
  return value;
796
858
  }
@@ -808,11 +870,17 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
808
870
  return parseDimension(tokenOrValue.value, builder);
809
871
  case "comma":
810
872
  return CommaSeparator;
873
+ case "delim":
874
+ {
875
+ if (tokenOrValue.value.value === "/") {
876
+ return tokenOrValue.value.value;
877
+ }
878
+ return;
879
+ }
811
880
  case "at-keyword":
812
881
  case "hash":
813
882
  case "id-hash":
814
883
  case "unquoted-url":
815
- case "delim":
816
884
  case "white-space":
817
885
  case "comment":
818
886
  case "colon":
@@ -865,22 +933,32 @@ function parseLength(length, builder) {
865
933
  inlineRem = 14
866
934
  } = builder.getOptions();
867
935
  if (typeof length === "number") {
868
- return length;
936
+ return round(length);
869
937
  }
870
938
  if ("unit" in length) {
871
939
  switch (length.unit) {
872
940
  case "px":
873
- return length.value;
941
+ {
942
+ if (length.value === Infinity) {
943
+ return 9999;
944
+ } else if (length.value === -Infinity) {
945
+ return -9999;
946
+ } else {
947
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
948
+ const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
949
+ return round(value);
950
+ }
951
+ }
874
952
  case "rem":
875
953
  if (typeof inlineRem === "number") {
876
954
  return length.value * inlineRem;
877
955
  } else {
878
- return [{}, "rem", length.value];
956
+ return [{}, "rem", round(length.value)];
879
957
  }
880
958
  case "vw":
881
959
  case "vh":
882
960
  case "em":
883
- return [{}, length.unit, length.value, 1];
961
+ return [{}, length.unit, round(length.value), 1];
884
962
  case "in":
885
963
  case "cm":
886
964
  case "mm":
@@ -965,7 +1043,7 @@ function parseAngle(angle, builder) {
965
1043
  case "rad":
966
1044
  return `${angle.value}${angle.type}`;
967
1045
  default:
968
- builder.addWarning("value", angle.value);
1046
+ builder.addWarning("value", `${angle.value} ${angle.type}`);
969
1047
  return undefined;
970
1048
  }
971
1049
  }
@@ -1023,7 +1101,7 @@ function parseSize(size, builder, options, {
1023
1101
  }
1024
1102
  return;
1025
1103
  }
1026
- function parseColorOrAuto({
1104
+ function parseColorOrAutoDeclaration({
1027
1105
  value
1028
1106
  }, builder) {
1029
1107
  if (value.type === "auto") {
@@ -1413,19 +1491,27 @@ function parseBorderStyle(value, builder) {
1413
1491
  builder.addWarning("value", value.top);
1414
1492
  return undefined;
1415
1493
  }
1416
- function parseBorderBlockColor({
1417
- value
1418
- }, builder) {
1419
- builder.addDescriptor("border-top-color", parseColor(value.start, builder));
1420
- builder.addDescriptor("border-bottom-color", parseColor(value.end, builder));
1421
- return;
1422
- }
1423
1494
  function parseBorderBlockWidth(declaration, builder) {
1424
1495
  builder.addDescriptor("border-top-width", parseBorderSideWidth(declaration.value.start, builder));
1425
1496
  builder.addDescriptor("border-bottom-width", parseBorderSideWidth(declaration.value.end, builder));
1426
1497
  }
1498
+ function parseBorderBlockStyle(declaration, builder) {
1499
+ if (declaration.value.start === declaration.value.end) {
1500
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value.start, builder));
1501
+ } else {
1502
+ builder.addWarning("property", "border-block-style");
1503
+ }
1504
+ }
1427
1505
  function parseBorderSideWidthDeclaration(declaration, builder) {
1428
- return parseBorderSideWidth(declaration.value, builder);
1506
+ if (declaration.property.includes("block")) {
1507
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "top" : "bottom"}-width`, parseBorderSideWidth(declaration.value, builder));
1508
+ return;
1509
+ } else if (declaration.property.includes("inline")) {
1510
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "left" : "right"}-width`, parseBorderSideWidth(declaration.value, builder));
1511
+ return;
1512
+ } else {
1513
+ return parseBorderSideWidth(declaration.value, builder);
1514
+ }
1429
1515
  }
1430
1516
  function parseBorderSideWidth(value, builder) {
1431
1517
  if (value.type === "length") {
@@ -1470,7 +1556,7 @@ function parseLineHeight(value, builder) {
1470
1556
  return parseLength(length, builder);
1471
1557
  case "percentage":
1472
1558
  case "calc":
1473
- builder.addWarning("value", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1559
+ builder.addWarning("style", "line-height", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1474
1560
  return;
1475
1561
  default:
1476
1562
  {
@@ -1540,8 +1626,8 @@ function parseLengthOrCoercePercentageToRuntime(value, builder) {
1540
1626
  }
1541
1627
  function parseGap(declaration, builder) {
1542
1628
  if ("column" in declaration.value) {
1543
- builder.addDescriptor("row-gap", parseGap(declaration, builder));
1544
- builder.addDescriptor("column-gap", parseGap(declaration, builder));
1629
+ builder.addDescriptor("row-gap", parseGapValue(declaration.value.row, builder));
1630
+ builder.addDescriptor("column-gap", parseGapValue(declaration.value.column, builder));
1545
1631
  return;
1546
1632
  } else {
1547
1633
  if (declaration.value.type === "normal") {
@@ -1551,6 +1637,13 @@ function parseGap(declaration, builder) {
1551
1637
  return parseLength(declaration.value.value, builder);
1552
1638
  }
1553
1639
  }
1640
+ function parseGapValue(value, builder) {
1641
+ if (value.type === "normal") {
1642
+ return;
1643
+ } else {
1644
+ return parseLength(value.value, builder);
1645
+ }
1646
+ }
1554
1647
  function parseTextAlign({
1555
1648
  value
1556
1649
  }, builder) {
@@ -1650,7 +1743,11 @@ function parseDimension({
1650
1743
  }, builder) {
1651
1744
  switch (unit) {
1652
1745
  case "px":
1653
- return value;
1746
+ if (value === Infinity) {
1747
+ return 9999;
1748
+ } else {
1749
+ return value;
1750
+ }
1654
1751
  case "%":
1655
1752
  return `${value}%`;
1656
1753
  case "rnh":
@@ -1675,17 +1772,21 @@ function parseUserSelect({
1675
1772
  }
1676
1773
  }
1677
1774
  function parseSVGPaint({
1678
- value
1775
+ value,
1776
+ property
1679
1777
  }, builder) {
1778
+ let parsedValue;
1680
1779
  if (value.type === "none") {
1681
- return "transparent";
1780
+ parsedValue = "transparent";
1682
1781
  } else if (value.type === "color") {
1683
- return parseColor(value.value, builder);
1782
+ parsedValue = parseColor(value.value, builder);
1783
+ } else {
1784
+ return;
1684
1785
  }
1685
- return;
1786
+ builder.addDescriptor(property, parsedValue);
1686
1787
  }
1687
1788
  function round(number) {
1688
- return Math.round((number + Number.EPSILON) * 100) / 100;
1789
+ return Math.round((number + Number.EPSILON) * 10000) / 10000;
1689
1790
  }
1690
1791
  function parseDimensionPercentageFor_LengthValue(value, builder) {
1691
1792
  if (value.type === "calc") {
@@ -1696,7 +1797,7 @@ function parseDimensionPercentageFor_LengthValue(value, builder) {
1696
1797
  return parseLength(value.value, builder);
1697
1798
  }
1698
1799
  }
1699
- const allowAuto = new Set(["pointer-events"]);
1800
+ const allowAutoProperties = new Set(["pointer-events"]);
1700
1801
  function parseEnv(value, builder) {
1701
1802
  switch (value.name.type) {
1702
1803
  case "ua":
@@ -1705,7 +1806,7 @@ function parseEnv(value, builder) {
1705
1806
  case "safe-area-inset-right":
1706
1807
  case "safe-area-inset-bottom":
1707
1808
  case "safe-area-inset-left":
1708
- return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
1809
+ return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
1709
1810
  case "viewport-segment-width":
1710
1811
  case "viewport-segment-height":
1711
1812
  case "viewport-segment-top":
@@ -1719,17 +1820,16 @@ function parseEnv(value, builder) {
1719
1820
  }
1720
1821
  return;
1721
1822
  }
1722
- function parseCalcFn(name, tokens, builder) {
1723
- const args = parseCalcArguments(tokens, builder);
1823
+ function parseCalcFn(name, tokens, builder, property) {
1824
+ const args = parseCalcArguments(tokens, builder, property);
1724
1825
  if (args) {
1725
1826
  return [{}, name, args];
1726
1827
  }
1727
1828
  return;
1728
1829
  }
1729
- function parseCalcArguments([...args], builder) {
1830
+ function parseCalcArguments([...args], builder, property) {
1730
1831
  const parsed = [];
1731
- let mode;
1732
- for (const [currentIndex, arg] of args.entries()) {
1832
+ for (const arg of args) {
1733
1833
  switch (arg.type) {
1734
1834
  case "env":
1735
1835
  {
@@ -1740,7 +1840,7 @@ function parseCalcArguments([...args], builder) {
1740
1840
  case "function":
1741
1841
  case "unresolved-color":
1742
1842
  {
1743
- const value = parseUnparsed(arg, builder);
1843
+ const value = parseUnparsed(arg, builder, property);
1744
1844
  if (value === undefined) {
1745
1845
  return undefined;
1746
1846
  }
@@ -1775,44 +1875,21 @@ function parseCalcArguments([...args], builder) {
1775
1875
  }
1776
1876
  break;
1777
1877
  case "percentage":
1778
- mode ??= "percentage";
1779
- if (mode !== "percentage") return;
1780
- parsed.push(`${arg.value.value * 100}%`);
1878
+ parsed.push(`${round(arg.value.value * 100)}%`);
1781
1879
  break;
1782
1880
  case "number":
1783
1881
  {
1784
- mode ??= "number";
1785
- if (mode !== "number") return;
1786
- parsed.push(arg.value.value);
1882
+ parsed.push(round(arg.value.value));
1787
1883
  break;
1788
1884
  }
1789
1885
  case "parenthesis-block":
1790
1886
  {
1791
- /**
1792
- * If we have a parenthesis block, we just treat it as a nested calc function
1793
- * Because there could be multiple parenthesis blocks, this is recursive
1794
- */
1795
- let closeParenthesisIndex = -1;
1796
- for (let index = args.length - 1; index > 0; index--) {
1797
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1798
- const value = args[index];
1799
- if (value.type === "token" && value.value.type === "close-parenthesis") {
1800
- closeParenthesisIndex = index;
1801
- break;
1802
- }
1803
- }
1804
- if (closeParenthesisIndex === -1) {
1805
- return;
1806
- }
1807
- const innerCalcArgs = args
1808
- // Extract the inner calcArgs including the parenthesis. This mutates args
1809
- .splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
1810
- // Then drop the surrounding parenthesis
1811
- .slice(1, -1);
1812
- parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
1887
+ parsed.push("(");
1813
1888
  break;
1814
1889
  }
1815
1890
  case "close-parenthesis":
1891
+ parsed.push(")");
1892
+ break;
1816
1893
  case "string":
1817
1894
  case "function":
1818
1895
  case "ident":
@@ -1850,20 +1927,20 @@ function parseTranslateProp(value, prop, builder) {
1850
1927
  }
1851
1928
  return parseLength(value[prop], builder);
1852
1929
  }
1853
- function parseUnresolvedColor(color, builder) {
1930
+ function parseUnresolvedColor(color, builder, property, allowAuto) {
1854
1931
  switch (color.type) {
1855
1932
  case "rgb":
1856
- return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
1933
+ return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
1857
1934
  case "hsl":
1858
- return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
1935
+ return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
1859
1936
  case "light-dark":
1860
1937
  {
1861
1938
  const extraRule = builder.extendRule({
1862
1939
  m: [["=", "prefers-color-scheme", "dark"]]
1863
1940
  });
1864
- builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
1941
+ builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
1865
1942
  builder.addExtraRule(extraRule);
1866
- return reduceParseUnparsed(color.light, builder);
1943
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
1867
1944
  }
1868
1945
  default:
1869
1946
  color;
@@ -2022,7 +2099,7 @@ function parseGradient(gradient, builder) {
2022
2099
  switch (gradient.type) {
2023
2100
  case "linear":
2024
2101
  {
2025
- return [{}, "@linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2102
+ return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2026
2103
  }
2027
2104
  }
2028
2105
  return;
@@ -2079,6 +2156,7 @@ function parseFilter(declaration, builder) {
2079
2156
  [value.type]: parseAngle(value.value, builder)
2080
2157
  };
2081
2158
  case "drop-shadow":
2159
+ return [{}, (0, _selectors.toRNProperty)(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
2082
2160
  case "url":
2083
2161
  return;
2084
2162
  }