react-native-css 3.0.0-nightly.75f8b74 → 3.0.0-nightly.8dd703d

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 (416) 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 +26 -17
  6. package/dist/commonjs/compiler/compiler.js.map +1 -1
  7. package/dist/commonjs/compiler/declarations.js +186 -92
  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 +122 -43
  18. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  19. package/dist/commonjs/jest/index.js +27 -9
  20. package/dist/commonjs/jest/index.js.map +1 -1
  21. package/dist/commonjs/metro/index.js +1 -1
  22. package/dist/commonjs/metro/index.js.map +1 -1
  23. package/dist/commonjs/poison.pill.js +4 -1
  24. package/dist/commonjs/poison.pill.js.map +1 -1
  25. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  26. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  27. package/dist/commonjs/runtime/native/conditions/container-query.js +28 -21
  28. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
  29. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
  30. package/dist/commonjs/runtime/native/conditions/index.js +10 -46
  31. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
  32. package/dist/commonjs/runtime/native/conditions/media-query.js +19 -17
  33. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  34. package/dist/commonjs/runtime/native/injection.js +3 -2
  35. package/dist/commonjs/runtime/native/injection.js.map +1 -1
  36. package/dist/commonjs/runtime/native/react/interaction.js +10 -10
  37. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
  38. package/dist/commonjs/runtime/native/react/rules.js +9 -9
  39. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  40. package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
  41. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  42. package/dist/commonjs/runtime/native/reactivity.js +1 -12
  43. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  44. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  45. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  46. package/dist/commonjs/runtime/native/root.js +28 -0
  47. package/dist/commonjs/runtime/native/root.js.map +1 -0
  48. package/dist/commonjs/runtime/native/styles/calculate-props.js +56 -48
  49. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  50. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  51. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  52. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  53. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  54. package/dist/commonjs/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  55. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  56. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  57. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  58. package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
  59. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  60. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  61. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  62. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +83 -0
  63. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  64. package/dist/commonjs/runtime/native/styles/index.js +12 -12
  65. package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
  66. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  67. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  68. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  69. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  70. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +5 -36
  71. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  72. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  73. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  74. package/dist/commonjs/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +3 -3
  75. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  76. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  77. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  78. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  79. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  80. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  81. package/dist/commonjs/runtime/native/styles/units.js +7 -4
  82. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  83. package/dist/commonjs/runtime/native/styles/variables.js +3 -2
  84. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
  85. package/dist/commonjs/runtime/utils/objects.js +25 -5
  86. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  87. package/dist/commonjs/runtime/utils/specificity.js +2 -1
  88. package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
  89. package/dist/module/compiler/atRules.js +16 -3
  90. package/dist/module/compiler/atRules.js.map +1 -1
  91. package/dist/module/compiler/attributes.test.js +1 -1
  92. package/dist/module/compiler/attributes.test.js.map +1 -1
  93. package/dist/module/compiler/compiler.js +26 -17
  94. package/dist/module/compiler/compiler.js.map +1 -1
  95. package/dist/module/compiler/compiler.types.js.map +1 -1
  96. package/dist/module/compiler/declarations.js +181 -88
  97. package/dist/module/compiler/declarations.js.map +1 -1
  98. package/dist/module/compiler/inheritance.test.js +7 -7
  99. package/dist/module/compiler/inheritance.test.js.map +1 -1
  100. package/dist/module/compiler/keyframes.js +1 -1
  101. package/dist/module/compiler/keyframes.js.map +1 -1
  102. package/dist/module/compiler/selector-builder.js +452 -0
  103. package/dist/module/compiler/selector-builder.js.map +1 -0
  104. package/dist/module/compiler/selectors.js +10 -6
  105. package/dist/module/compiler/selectors.js.map +1 -1
  106. package/dist/module/compiler/stylesheet.js +121 -42
  107. package/dist/module/compiler/stylesheet.js.map +1 -1
  108. package/dist/module/jest/index.js +26 -8
  109. package/dist/module/jest/index.js.map +1 -1
  110. package/dist/module/metro/index.js +1 -1
  111. package/dist/module/metro/index.js.map +1 -1
  112. package/dist/module/poison.pill.js +4 -1
  113. package/dist/module/poison.pill.js.map +1 -1
  114. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  115. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  116. package/dist/module/runtime/native/conditions/container-query.js +28 -21
  117. package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
  118. package/dist/module/runtime/native/conditions/guards.js.map +1 -1
  119. package/dist/module/runtime/native/conditions/index.js +10 -46
  120. package/dist/module/runtime/native/conditions/index.js.map +1 -1
  121. package/dist/module/runtime/native/conditions/media-query.js +19 -17
  122. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  123. package/dist/module/runtime/native/injection.js +2 -1
  124. package/dist/module/runtime/native/injection.js.map +1 -1
  125. package/dist/module/runtime/native/react/interaction.js +10 -10
  126. package/dist/module/runtime/native/react/interaction.js.map +1 -1
  127. package/dist/module/runtime/native/react/rules.js +9 -9
  128. package/dist/module/runtime/native/react/rules.js.map +1 -1
  129. package/dist/module/runtime/native/react/useNativeCss.js +2 -1
  130. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  131. package/dist/module/runtime/native/reactivity.js +0 -11
  132. package/dist/module/runtime/native/reactivity.js.map +1 -1
  133. package/dist/module/runtime/native/reanimated.js +13 -0
  134. package/dist/module/runtime/native/reanimated.js.map +1 -0
  135. package/dist/module/runtime/native/root.js +24 -0
  136. package/dist/module/runtime/native/root.js.map +1 -0
  137. package/dist/module/runtime/native/styles/calculate-props.js +57 -49
  138. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  139. package/dist/module/runtime/native/styles/defaults.js +1 -1
  140. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  141. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  142. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  143. package/dist/module/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  144. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  145. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  146. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  147. package/dist/module/runtime/native/styles/functions/index.js +8 -0
  148. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  149. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  150. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  151. package/dist/module/runtime/native/styles/functions/transform-functions.js +76 -0
  152. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  153. package/dist/module/runtime/native/styles/index.js +12 -12
  154. package/dist/module/runtime/native/styles/index.js.map +1 -1
  155. package/dist/module/runtime/native/styles/resolve.js +20 -44
  156. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  157. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  158. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  159. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  160. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  161. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  162. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  163. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +2 -2
  164. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  165. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  166. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  167. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  168. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  169. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  170. package/dist/module/runtime/native/styles/units.js +7 -4
  171. package/dist/module/runtime/native/styles/units.js.map +1 -1
  172. package/dist/module/runtime/native/styles/variables.js +2 -1
  173. package/dist/module/runtime/native/styles/variables.js.map +1 -1
  174. package/dist/module/runtime/utils/objects.js +25 -5
  175. package/dist/module/runtime/utils/objects.js.map +1 -1
  176. package/dist/module/runtime/utils/specificity.js +2 -1
  177. package/dist/module/runtime/utils/specificity.js.map +1 -1
  178. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  179. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
  180. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  181. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +5 -4
  182. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  183. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +16 -19
  184. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +23 -0
  186. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
  188. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
  189. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +21 -7
  190. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  191. package/dist/typescript/commonjs/src/jest/index.d.ts +19 -2
  192. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  193. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  194. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -1
  195. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  196. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +3 -3
  198. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  199. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
  200. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
  201. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
  202. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
  203. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
  204. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  205. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
  207. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +2 -1
  209. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +2 -10
  211. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  213. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  214. package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
  215. package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
  216. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  219. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  220. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  221. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  222. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  223. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  224. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
  225. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  226. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  227. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  229. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  230. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  232. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  233. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  234. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  235. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  236. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  238. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  239. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  240. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  241. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  242. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  243. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  244. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  245. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
  249. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
  250. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  251. package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
  252. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  253. package/dist/typescript/module/src/compiler/compiler.types.d.ts +5 -4
  254. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  255. package/dist/typescript/module/src/compiler/declarations.d.ts +16 -19
  256. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  257. package/dist/typescript/module/src/compiler/selector-builder.d.ts +23 -0
  258. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  259. package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
  260. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  261. package/dist/typescript/module/src/compiler/stylesheet.d.ts +21 -7
  262. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  263. package/dist/typescript/module/src/jest/index.d.ts +19 -2
  264. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  265. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  266. package/dist/typescript/module/src/poison.pill.d.ts.map +1 -1
  267. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  268. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  269. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +3 -3
  270. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  271. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
  272. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
  273. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
  274. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
  275. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
  276. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  277. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -1
  278. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
  279. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
  280. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +2 -1
  281. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  282. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +2 -10
  283. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  284. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  285. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  286. package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
  287. package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
  288. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  289. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  290. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  291. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  292. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  293. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  294. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  295. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  296. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
  297. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  298. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  299. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  300. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  301. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  302. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  303. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  304. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  305. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  306. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  307. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  308. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  309. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  310. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  311. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  312. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  313. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  314. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  315. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  316. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  317. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
  318. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
  319. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  320. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
  321. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
  322. package/package.json +3 -3
  323. package/src/compiler/atRules.ts +17 -3
  324. package/src/compiler/attributes.test.ts +1 -1
  325. package/src/compiler/compiler.ts +30 -31
  326. package/src/compiler/compiler.types.ts +7 -5
  327. package/src/compiler/declarations.ts +331 -112
  328. package/src/compiler/inheritance.test.ts +6 -6
  329. package/src/compiler/keyframes.ts +1 -1
  330. package/src/compiler/selector-builder.ts +531 -0
  331. package/src/compiler/selectors.ts +20 -6
  332. package/src/compiler/stylesheet.ts +168 -48
  333. package/src/jest/index.ts +32 -8
  334. package/src/metro/index.ts +6 -3
  335. package/src/poison.pill.ts +5 -1
  336. package/src/runtime/native/conditions/attributes.ts +52 -0
  337. package/src/runtime/native/conditions/container-query.ts +27 -22
  338. package/src/runtime/native/conditions/guards.ts +1 -2
  339. package/src/runtime/native/conditions/index.ts +12 -66
  340. package/src/runtime/native/conditions/media-query.ts +20 -20
  341. package/src/runtime/native/injection.ts +1 -1
  342. package/src/runtime/native/react/interaction.ts +12 -12
  343. package/src/runtime/native/react/rules.ts +9 -9
  344. package/src/runtime/native/react/useNativeCss.ts +4 -1
  345. package/src/runtime/native/reactivity.ts +2 -21
  346. package/src/runtime/native/reanimated.ts +22 -0
  347. package/src/runtime/native/root.ts +31 -0
  348. package/src/runtime/native/styles/calculate-props.ts +61 -50
  349. package/src/runtime/native/styles/defaults.ts +1 -0
  350. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  351. package/src/runtime/native/styles/{calc.ts → functions/calc.ts} +2 -2
  352. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  353. package/src/runtime/native/styles/functions/index.ts +5 -0
  354. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  355. package/src/runtime/native/styles/functions/transform-functions.ts +51 -0
  356. package/src/runtime/native/styles/index.ts +12 -12
  357. package/src/runtime/native/styles/resolve.ts +20 -63
  358. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  359. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -63
  360. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  361. package/src/runtime/native/styles/{box-shadow.ts → shorthands/box-shadow.ts} +3 -3
  362. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  363. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  364. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +1 -1
  365. package/src/runtime/native/styles/units.ts +8 -4
  366. package/src/runtime/native/styles/variables.ts +2 -6
  367. package/src/runtime/utils/objects.ts +24 -3
  368. package/src/runtime/utils/specificity.ts +1 -0
  369. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  370. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  371. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  372. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  373. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  374. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  375. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  376. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  377. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  378. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  379. package/dist/module/runtime/native/styles/border.js.map +0 -1
  380. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  381. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  382. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  383. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  384. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  385. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  386. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  387. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  388. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  389. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  390. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  391. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  392. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  393. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  394. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  395. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  396. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  397. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  398. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  399. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  400. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  401. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  402. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  403. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  404. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  405. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  406. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  407. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  408. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  409. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  410. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  411. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  412. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  413. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  414. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  415. /package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
  416. /package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
@@ -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
  }
@@ -727,8 +786,8 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
727
786
  case "scaleY":
728
787
  case "translateX":
729
788
  case "translateY":
730
- tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
731
- return unparsedFunction(tokenOrValue, builder);
789
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
790
+ case "blur":
732
791
  case "brightness":
733
792
  case "contrast":
734
793
  case "cubic-bezier":
@@ -742,7 +801,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
742
801
  case "linear-gradient":
743
802
  case "opacity":
744
803
  case "pixelScale":
745
- case "pixelSizeForLayoutSize":
804
+ case "getPixelSizeForLayoutSize":
746
805
  case "platformColor":
747
806
  case "radial-gradient":
748
807
  case "rgb":
@@ -752,17 +811,17 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
752
811
  case "sepia":
753
812
  case "shadow":
754
813
  case "steps":
755
- return unparsedFunction(tokenOrValue, builder);
814
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
756
815
  case "hairlineWidth":
757
816
  return [{}, tokenOrValue.value.name, []];
758
817
  case "calc":
759
818
  case "max":
760
819
  case "min":
761
820
  case "clamp":
762
- return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
821
+ return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
763
822
  default:
764
823
  {
765
- builder.addWarning("function", tokenOrValue.value.name);
824
+ builder.addWarning("value", `${tokenOrValue.value.name}()`);
766
825
  return;
767
826
  }
768
827
  }
@@ -791,6 +850,8 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
791
850
  return true;
792
851
  } else if (value === "false") {
793
852
  return false;
853
+ } else if (value === "infinity") {
854
+ return Number.MAX_SAFE_INTEGER;
794
855
  } else {
795
856
  return value;
796
857
  }
@@ -808,11 +869,17 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
808
869
  return parseDimension(tokenOrValue.value, builder);
809
870
  case "comma":
810
871
  return CommaSeparator;
872
+ case "delim":
873
+ {
874
+ if (tokenOrValue.value.value === "/") {
875
+ return tokenOrValue.value.value;
876
+ }
877
+ return;
878
+ }
811
879
  case "at-keyword":
812
880
  case "hash":
813
881
  case "id-hash":
814
882
  case "unquoted-url":
815
- case "delim":
816
883
  case "white-space":
817
884
  case "comment":
818
885
  case "colon":
@@ -865,22 +932,32 @@ function parseLength(length, builder) {
865
932
  inlineRem = 14
866
933
  } = builder.getOptions();
867
934
  if (typeof length === "number") {
868
- return length;
935
+ return round(length);
869
936
  }
870
937
  if ("unit" in length) {
871
938
  switch (length.unit) {
872
939
  case "px":
873
- return length.value;
940
+ {
941
+ if (length.value === Infinity) {
942
+ return 9999;
943
+ } else if (length.value === -Infinity) {
944
+ return -9999;
945
+ } else {
946
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
947
+ const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
948
+ return round(value);
949
+ }
950
+ }
874
951
  case "rem":
875
952
  if (typeof inlineRem === "number") {
876
953
  return length.value * inlineRem;
877
954
  } else {
878
- return [{}, "rem", length.value];
955
+ return [{}, "rem", round(length.value)];
879
956
  }
880
957
  case "vw":
881
958
  case "vh":
882
959
  case "em":
883
- return [{}, length.unit, length.value, 1];
960
+ return [{}, length.unit, round(length.value), 1];
884
961
  case "in":
885
962
  case "cm":
886
963
  case "mm":
@@ -965,7 +1042,7 @@ function parseAngle(angle, builder) {
965
1042
  case "rad":
966
1043
  return `${angle.value}${angle.type}`;
967
1044
  default:
968
- builder.addWarning("value", angle.value);
1045
+ builder.addWarning("value", `${angle.value} ${angle.type}`);
969
1046
  return undefined;
970
1047
  }
971
1048
  }
@@ -1023,7 +1100,7 @@ function parseSize(size, builder, options, {
1023
1100
  }
1024
1101
  return;
1025
1102
  }
1026
- function parseColorOrAuto({
1103
+ function parseColorOrAutoDeclaration({
1027
1104
  value
1028
1105
  }, builder) {
1029
1106
  if (value.type === "auto") {
@@ -1413,19 +1490,27 @@ function parseBorderStyle(value, builder) {
1413
1490
  builder.addWarning("value", value.top);
1414
1491
  return undefined;
1415
1492
  }
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
1493
  function parseBorderBlockWidth(declaration, builder) {
1424
1494
  builder.addDescriptor("border-top-width", parseBorderSideWidth(declaration.value.start, builder));
1425
1495
  builder.addDescriptor("border-bottom-width", parseBorderSideWidth(declaration.value.end, builder));
1426
1496
  }
1497
+ function parseBorderBlockStyle(declaration, builder) {
1498
+ if (declaration.value.start === declaration.value.end) {
1499
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value.start, builder));
1500
+ } else {
1501
+ builder.addWarning("property", "border-block-style");
1502
+ }
1503
+ }
1427
1504
  function parseBorderSideWidthDeclaration(declaration, builder) {
1428
- return parseBorderSideWidth(declaration.value, builder);
1505
+ if (declaration.property.includes("block")) {
1506
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "top" : "bottom"}-width`, parseBorderSideWidth(declaration.value, builder));
1507
+ return;
1508
+ } else if (declaration.property.includes("inline")) {
1509
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "left" : "right"}-width`, parseBorderSideWidth(declaration.value, builder));
1510
+ return;
1511
+ } else {
1512
+ return parseBorderSideWidth(declaration.value, builder);
1513
+ }
1429
1514
  }
1430
1515
  function parseBorderSideWidth(value, builder) {
1431
1516
  if (value.type === "length") {
@@ -1470,7 +1555,7 @@ function parseLineHeight(value, builder) {
1470
1555
  return parseLength(length, builder);
1471
1556
  case "percentage":
1472
1557
  case "calc":
1473
- builder.addWarning("value", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1558
+ builder.addWarning("style", "line-height", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1474
1559
  return;
1475
1560
  default:
1476
1561
  {
@@ -1657,7 +1742,11 @@ function parseDimension({
1657
1742
  }, builder) {
1658
1743
  switch (unit) {
1659
1744
  case "px":
1660
- return value;
1745
+ if (value === Infinity) {
1746
+ return 9999;
1747
+ } else {
1748
+ return value;
1749
+ }
1661
1750
  case "%":
1662
1751
  return `${value}%`;
1663
1752
  case "rnh":
@@ -1682,17 +1771,21 @@ function parseUserSelect({
1682
1771
  }
1683
1772
  }
1684
1773
  function parseSVGPaint({
1685
- value
1774
+ value,
1775
+ property
1686
1776
  }, builder) {
1777
+ let parsedValue;
1687
1778
  if (value.type === "none") {
1688
- return "transparent";
1779
+ parsedValue = "transparent";
1689
1780
  } else if (value.type === "color") {
1690
- return parseColor(value.value, builder);
1781
+ parsedValue = parseColor(value.value, builder);
1782
+ } else {
1783
+ return;
1691
1784
  }
1692
- return;
1785
+ builder.addDescriptor(property, parsedValue);
1693
1786
  }
1694
1787
  function round(number) {
1695
- return Math.round((number + Number.EPSILON) * 100) / 100;
1788
+ return Math.round((number + Number.EPSILON) * 10000) / 10000;
1696
1789
  }
1697
1790
  function parseDimensionPercentageFor_LengthValue(value, builder) {
1698
1791
  if (value.type === "calc") {
@@ -1703,7 +1796,7 @@ function parseDimensionPercentageFor_LengthValue(value, builder) {
1703
1796
  return parseLength(value.value, builder);
1704
1797
  }
1705
1798
  }
1706
- const allowAuto = new Set(["pointer-events"]);
1799
+ const allowAutoProperties = new Set(["pointer-events"]);
1707
1800
  function parseEnv(value, builder) {
1708
1801
  switch (value.name.type) {
1709
1802
  case "ua":
@@ -1712,7 +1805,7 @@ function parseEnv(value, builder) {
1712
1805
  case "safe-area-inset-right":
1713
1806
  case "safe-area-inset-bottom":
1714
1807
  case "safe-area-inset-left":
1715
- return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
1808
+ return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
1716
1809
  case "viewport-segment-width":
1717
1810
  case "viewport-segment-height":
1718
1811
  case "viewport-segment-top":
@@ -1726,14 +1819,14 @@ function parseEnv(value, builder) {
1726
1819
  }
1727
1820
  return;
1728
1821
  }
1729
- function parseCalcFn(name, tokens, builder) {
1730
- const args = parseCalcArguments(tokens, builder);
1822
+ function parseCalcFn(name, tokens, builder, property) {
1823
+ const args = parseCalcArguments(tokens, builder, property);
1731
1824
  if (args) {
1732
1825
  return [{}, name, args];
1733
1826
  }
1734
1827
  return;
1735
1828
  }
1736
- function parseCalcArguments([...args], builder) {
1829
+ function parseCalcArguments([...args], builder, property) {
1737
1830
  const parsed = [];
1738
1831
  let mode;
1739
1832
  for (const [currentIndex, arg] of args.entries()) {
@@ -1747,7 +1840,7 @@ function parseCalcArguments([...args], builder) {
1747
1840
  case "function":
1748
1841
  case "unresolved-color":
1749
1842
  {
1750
- const value = parseUnparsed(arg, builder);
1843
+ const value = parseUnparsed(arg, builder, property);
1751
1844
  if (value === undefined) {
1752
1845
  return undefined;
1753
1846
  }
@@ -1816,7 +1909,7 @@ function parseCalcArguments([...args], builder) {
1816
1909
  .splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
1817
1910
  // Then drop the surrounding parenthesis
1818
1911
  .slice(1, -1);
1819
- parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
1912
+ parsed.push(parseCalcFn("calc", innerCalcArgs, builder, property));
1820
1913
  break;
1821
1914
  }
1822
1915
  case "close-parenthesis":
@@ -1857,20 +1950,20 @@ function parseTranslateProp(value, prop, builder) {
1857
1950
  }
1858
1951
  return parseLength(value[prop], builder);
1859
1952
  }
1860
- function parseUnresolvedColor(color, builder) {
1953
+ function parseUnresolvedColor(color, builder, property, allowAuto) {
1861
1954
  switch (color.type) {
1862
1955
  case "rgb":
1863
- return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
1956
+ return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
1864
1957
  case "hsl":
1865
- return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
1958
+ return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
1866
1959
  case "light-dark":
1867
1960
  {
1868
1961
  const extraRule = builder.extendRule({
1869
1962
  m: [["=", "prefers-color-scheme", "dark"]]
1870
1963
  });
1871
- builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
1964
+ builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
1872
1965
  builder.addExtraRule(extraRule);
1873
- return reduceParseUnparsed(color.light, builder);
1966
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
1874
1967
  }
1875
1968
  default:
1876
1969
  color;
@@ -2029,7 +2122,7 @@ function parseGradient(gradient, builder) {
2029
2122
  switch (gradient.type) {
2030
2123
  case "linear":
2031
2124
  {
2032
- return [{}, "@linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2125
+ return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2033
2126
  }
2034
2127
  }
2035
2128
  return;
@@ -2086,6 +2179,7 @@ function parseFilter(declaration, builder) {
2086
2179
  [value.type]: parseAngle(value.value, builder)
2087
2180
  };
2088
2181
  case "drop-shadow":
2182
+ 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)]];
2089
2183
  case "url":
2090
2184
  return;
2091
2185
  }