react-native-css 3.0.0-nightly.fa5e95b → 3.0.0-preview.0

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 (573) hide show
  1. package/dist/commonjs/compiler/atRules.js +15 -2
  2. package/dist/commonjs/compiler/atRules.js.map +1 -1
  3. package/dist/commonjs/compiler/compiler.js +13 -8
  4. package/dist/commonjs/compiler/compiler.js.map +1 -1
  5. package/dist/commonjs/compiler/declarations.js +224 -152
  6. package/dist/commonjs/compiler/declarations.js.map +1 -1
  7. package/dist/commonjs/compiler/inheritance.test.js +12 -12
  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 +58 -25
  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/components/react-native-safe-area-context.js +17 -0
  36. package/dist/commonjs/components/react-native-safe-area-context.js.map +1 -0
  37. package/dist/commonjs/components/react-native-safe-area-context.native.js +53 -0
  38. package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -0
  39. package/dist/commonjs/jest/index.js +24 -17
  40. package/dist/commonjs/jest/index.js.map +1 -1
  41. package/dist/commonjs/metro/index.js +7 -4
  42. package/dist/commonjs/metro/index.js.map +1 -1
  43. package/dist/commonjs/metro/injection-code.js +5 -10
  44. package/dist/commonjs/metro/injection-code.js.map +1 -1
  45. package/dist/commonjs/metro/metro-transformer.js +18 -8
  46. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  47. package/dist/commonjs/metro/resolver.js +3 -0
  48. package/dist/commonjs/metro/resolver.js.map +1 -1
  49. package/dist/commonjs/poison.pill.js +10 -10
  50. package/dist/commonjs/runtime/native/api.js +8 -2
  51. package/dist/commonjs/runtime/native/api.js.map +1 -1
  52. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  53. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  54. package/dist/commonjs/runtime/native/conditions/container-query.js +7 -0
  55. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
  56. package/dist/commonjs/runtime/native/conditions/index.js +6 -40
  57. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
  58. package/dist/commonjs/runtime/native/conditions/media-query.js +16 -11
  59. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  60. package/dist/commonjs/runtime/native/react/rules.js +26 -20
  61. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  62. package/dist/commonjs/runtime/native/react/useNativeCss.js +2 -2
  63. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  64. package/dist/commonjs/runtime/native/reactivity.js +12 -21
  65. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  66. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  67. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  68. package/dist/commonjs/runtime/native/styles/calculate-props.js +29 -9
  69. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  70. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  71. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  72. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  73. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  74. package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
  75. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  76. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  77. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  78. package/dist/commonjs/runtime/native/styles/functions/index.js +83 -0
  79. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  80. package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js +32 -0
  81. package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js.map +1 -0
  82. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  83. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  84. package/dist/commonjs/runtime/native/styles/functions/string-functions.js +23 -0
  85. package/dist/commonjs/runtime/native/styles/functions/string-functions.js.map +1 -0
  86. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
  87. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  88. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  89. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  90. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  91. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  92. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +6 -37
  93. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  94. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  95. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  96. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +50 -0
  97. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  98. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  99. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  100. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  101. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  102. package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  103. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  104. package/dist/commonjs/runtime/native/styles/units.js +1 -1
  105. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  106. package/dist/commonjs/runtime/native/styles/variables.js +3 -2
  107. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
  108. package/dist/commonjs/runtime/utils/objects.js +14 -6
  109. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  110. package/dist/commonjs/runtime/utils/specificity.js +2 -1
  111. package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
  112. package/dist/commonjs/runtime/web/api.js.map +1 -1
  113. package/dist/commonjs/style-collection/index.js +110 -0
  114. package/dist/commonjs/style-collection/index.js.map +1 -0
  115. package/dist/commonjs/style-collection/root.js +28 -0
  116. package/dist/commonjs/style-collection/root.js.map +1 -0
  117. package/dist/module/compiler/atRules.js +15 -2
  118. package/dist/module/compiler/atRules.js.map +1 -1
  119. package/dist/module/compiler/compiler.js +13 -8
  120. package/dist/module/compiler/compiler.js.map +1 -1
  121. package/dist/module/compiler/compiler.types.js +1 -1
  122. package/dist/module/compiler/compiler.types.js.map +1 -1
  123. package/dist/module/compiler/declarations.js +220 -148
  124. package/dist/module/compiler/declarations.js.map +1 -1
  125. package/dist/module/compiler/inheritance.test.js +12 -12
  126. package/dist/module/compiler/inheritance.test.js.map +1 -1
  127. package/dist/module/compiler/keyframes.js +1 -1
  128. package/dist/module/compiler/keyframes.js.map +1 -1
  129. package/dist/module/compiler/pseudo-elements.js +44 -0
  130. package/dist/module/compiler/pseudo-elements.js.map +1 -0
  131. package/dist/module/compiler/selector-builder.js +496 -0
  132. package/dist/module/compiler/selector-builder.js.map +1 -0
  133. package/dist/module/compiler/selectors.js +10 -6
  134. package/dist/module/compiler/selectors.js.map +1 -1
  135. package/dist/module/compiler/stylesheet.js +56 -23
  136. package/dist/module/compiler/stylesheet.js.map +1 -1
  137. package/dist/module/compiler/supports.js +23 -0
  138. package/dist/module/compiler/supports.js.map +1 -0
  139. package/dist/module/components/ActivityIndicator.js +17 -0
  140. package/dist/module/components/ActivityIndicator.js.map +1 -0
  141. package/dist/module/components/Button.js +17 -0
  142. package/dist/module/components/Button.js.map +1 -0
  143. package/dist/module/components/FlatList.js +14 -0
  144. package/dist/module/components/FlatList.js.map +1 -0
  145. package/dist/module/components/Image.js +12 -0
  146. package/dist/module/components/Image.js.map +1 -0
  147. package/dist/module/components/Switch.js +12 -0
  148. package/dist/module/components/Switch.js.map +1 -0
  149. package/dist/module/components/TextInput.js +12 -0
  150. package/dist/module/components/TextInput.js.map +1 -0
  151. package/dist/module/components/index.js +6 -0
  152. package/dist/module/components/index.js.map +1 -1
  153. package/dist/module/components/react-native-safe-area-context.js +4 -0
  154. package/dist/module/components/react-native-safe-area-context.js.map +1 -0
  155. package/dist/module/components/react-native-safe-area-context.native.js +36 -0
  156. package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
  157. package/dist/module/jest/index.js +22 -16
  158. package/dist/module/jest/index.js.map +1 -1
  159. package/dist/module/metro/index.js +7 -4
  160. package/dist/module/metro/index.js.map +1 -1
  161. package/dist/module/metro/injection-code.js +5 -10
  162. package/dist/module/metro/injection-code.js.map +1 -1
  163. package/dist/module/metro/metro-transformer.js +18 -8
  164. package/dist/module/metro/metro-transformer.js.map +1 -1
  165. package/dist/module/metro/resolver.js +3 -0
  166. package/dist/module/metro/resolver.js.map +1 -1
  167. package/dist/module/poison.pill.js +10 -10
  168. package/dist/module/runtime/native/api.js +2 -1
  169. package/dist/module/runtime/native/api.js.map +1 -1
  170. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  171. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  172. package/dist/module/runtime/native/conditions/container-query.js +7 -0
  173. package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
  174. package/dist/module/runtime/native/conditions/index.js +6 -40
  175. package/dist/module/runtime/native/conditions/index.js.map +1 -1
  176. package/dist/module/runtime/native/conditions/media-query.js +17 -12
  177. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  178. package/dist/module/runtime/native/react/rules.js +24 -19
  179. package/dist/module/runtime/native/react/rules.js.map +1 -1
  180. package/dist/module/runtime/native/react/useNativeCss.js +1 -1
  181. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  182. package/dist/module/runtime/native/reactivity.js +11 -20
  183. package/dist/module/runtime/native/reactivity.js.map +1 -1
  184. package/dist/module/runtime/native/reanimated.js +13 -0
  185. package/dist/module/runtime/native/reanimated.js.map +1 -0
  186. package/dist/module/runtime/native/styles/calculate-props.js +30 -10
  187. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  188. package/dist/module/runtime/native/styles/defaults.js +1 -1
  189. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  190. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  191. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  192. package/dist/module/runtime/native/styles/functions/calc.js +120 -0
  193. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  194. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  195. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  196. package/dist/module/runtime/native/styles/functions/index.js +10 -0
  197. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  198. package/dist/module/runtime/native/styles/functions/numeric-functions.js +25 -0
  199. package/dist/module/runtime/native/styles/functions/numeric-functions.js.map +1 -0
  200. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  201. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  202. package/dist/module/runtime/native/styles/functions/string-functions.js +18 -0
  203. package/dist/module/runtime/native/styles/functions/string-functions.js.map +1 -0
  204. package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
  205. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  206. package/dist/module/runtime/native/styles/resolve.js +20 -44
  207. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  208. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  209. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  210. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  211. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  212. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  213. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  214. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +16 -6
  215. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  216. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  217. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  218. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  219. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  220. package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  221. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  222. package/dist/module/runtime/native/styles/units.js +1 -1
  223. package/dist/module/runtime/native/styles/units.js.map +1 -1
  224. package/dist/module/runtime/native/styles/variables.js +2 -1
  225. package/dist/module/runtime/native/styles/variables.js.map +1 -1
  226. package/dist/module/runtime/utils/objects.js +14 -6
  227. package/dist/module/runtime/utils/objects.js.map +1 -1
  228. package/dist/module/runtime/utils/specificity.js +2 -1
  229. package/dist/module/runtime/utils/specificity.js.map +1 -1
  230. package/dist/module/runtime/web/api.js.map +1 -1
  231. package/dist/module/style-collection/index.js +95 -0
  232. package/dist/module/style-collection/index.js.map +1 -0
  233. package/dist/module/style-collection/root.js +24 -0
  234. package/dist/module/style-collection/root.js.map +1 -0
  235. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -1
  237. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +11 -13
  239. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +16 -18
  241. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
  243. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
  244. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
  245. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  246. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
  247. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +7 -7
  249. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  250. package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
  251. package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
  252. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  253. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  254. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  255. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  257. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  258. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  259. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  260. package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
  261. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
  262. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  263. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/src/components/index.d.ts +6 -0
  265. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  266. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts +2 -0
  267. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
  269. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/src/jest/index.d.ts +13 -3
  271. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  272. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/src/metro/injection-code.d.ts +4 -7
  274. package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +4 -1
  276. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  277. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  278. package/dist/typescript/commonjs/src/runtime/native/api.d.ts +3 -1
  279. package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
  280. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  281. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  282. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  283. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
  284. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
  285. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
  286. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  287. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +1 -9
  288. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  289. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  290. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  291. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +1 -1
  292. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  293. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  294. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  295. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  296. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  297. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  299. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  300. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +8 -0
  301. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  302. package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
  303. package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
  304. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  305. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  306. package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
  307. package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
  308. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  309. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  310. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  311. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  312. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  313. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  314. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  315. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  316. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  317. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  318. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  319. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  320. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  321. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  322. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  323. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  324. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  325. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
  326. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  327. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
  328. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
  329. package/dist/typescript/commonjs/src/runtime/web/api.d.ts +1 -1
  330. package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
  331. package/dist/typescript/commonjs/src/style-collection/index.d.ts +14 -0
  332. package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -0
  333. package/dist/typescript/commonjs/src/style-collection/root.d.ts +11 -0
  334. package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +1 -0
  335. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  336. package/dist/typescript/module/src/compiler/compiler.d.ts +1 -1
  337. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  338. package/dist/typescript/module/src/compiler/compiler.types.d.ts +11 -13
  339. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  340. package/dist/typescript/module/src/compiler/declarations.d.ts +16 -18
  341. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  342. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
  343. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
  344. package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
  345. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  346. package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
  347. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  348. package/dist/typescript/module/src/compiler/stylesheet.d.ts +7 -7
  349. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  350. package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
  351. package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
  352. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  353. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  354. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  355. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  356. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  357. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  358. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  359. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  360. package/dist/typescript/module/src/components/Switch.d.ts +8 -0
  361. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
  362. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  363. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  364. package/dist/typescript/module/src/components/index.d.ts +6 -0
  365. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  366. package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts +2 -0
  367. package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
  368. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
  369. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
  370. package/dist/typescript/module/src/jest/index.d.ts +13 -3
  371. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  372. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  373. package/dist/typescript/module/src/metro/injection-code.d.ts +4 -7
  374. package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -1
  375. package/dist/typescript/module/src/metro/metro-transformer.d.ts +4 -1
  376. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  377. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  378. package/dist/typescript/module/src/runtime/native/api.d.ts +3 -1
  379. package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
  380. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  381. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  382. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  383. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
  384. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
  385. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
  386. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  387. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +1 -9
  388. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  389. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  390. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  391. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +1 -1
  392. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  393. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  394. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  395. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  396. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  397. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  398. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  399. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  400. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +8 -0
  401. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  402. package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
  403. package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
  404. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  405. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  406. package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
  407. package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
  408. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  409. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  410. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  411. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  412. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  413. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  414. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  415. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  416. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  417. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  418. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  419. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  420. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  421. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  422. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  423. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  424. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  425. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
  426. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  427. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
  428. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
  429. package/dist/typescript/module/src/runtime/web/api.d.ts +1 -1
  430. package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
  431. package/dist/typescript/module/src/style-collection/index.d.ts +14 -0
  432. package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -0
  433. package/dist/typescript/module/src/style-collection/root.d.ts +11 -0
  434. package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -0
  435. package/package.json +31 -15
  436. package/src/compiler/atRules.ts +16 -2
  437. package/src/compiler/compiler.ts +12 -10
  438. package/src/compiler/compiler.types.ts +11 -14
  439. package/src/compiler/declarations.ts +402 -193
  440. package/src/compiler/inheritance.test.ts +10 -10
  441. package/src/compiler/keyframes.ts +1 -1
  442. package/src/compiler/pseudo-elements.ts +54 -0
  443. package/src/compiler/selector-builder.ts +586 -0
  444. package/src/compiler/selectors.ts +20 -6
  445. package/src/compiler/stylesheet.ts +87 -33
  446. package/src/compiler/supports.ts +26 -0
  447. package/src/components/ActivityIndicator.tsx +27 -0
  448. package/src/components/Button.tsx +22 -0
  449. package/src/components/FlatList.tsx +21 -0
  450. package/src/components/Image.tsx +17 -0
  451. package/src/components/Switch.tsx +17 -0
  452. package/src/components/TextInput.tsx +17 -0
  453. package/src/components/index.tsx +6 -0
  454. package/src/components/react-native-safe-area-context.native.tsx +40 -0
  455. package/src/components/react-native-safe-area-context.tsx +1 -0
  456. package/src/jest/index.ts +25 -15
  457. package/src/metro/index.ts +12 -7
  458. package/src/metro/injection-code.ts +6 -10
  459. package/src/metro/metro-transformer.ts +27 -10
  460. package/src/metro/resolver.ts +8 -0
  461. package/src/poison.pill.ts +10 -10
  462. package/src/runtime/native/api.ts +3 -1
  463. package/src/runtime/native/conditions/attributes.ts +52 -0
  464. package/src/runtime/native/conditions/container-query.ts +5 -0
  465. package/src/runtime/native/conditions/index.ts +7 -59
  466. package/src/runtime/native/conditions/media-query.ts +18 -12
  467. package/src/runtime/native/react/rules.ts +27 -17
  468. package/src/runtime/native/react/useNativeCss.ts +1 -1
  469. package/src/runtime/native/reactivity.ts +13 -29
  470. package/src/runtime/native/reanimated.ts +22 -0
  471. package/src/runtime/native/styles/calculate-props.ts +30 -8
  472. package/src/runtime/native/styles/defaults.ts +1 -0
  473. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  474. package/src/runtime/native/styles/functions/calc.ts +121 -0
  475. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  476. package/src/runtime/native/styles/functions/index.ts +7 -0
  477. package/src/runtime/native/styles/functions/numeric-functions.ts +38 -0
  478. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  479. package/src/runtime/native/styles/functions/string-functions.ts +22 -0
  480. package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
  481. package/src/runtime/native/styles/resolve.ts +20 -63
  482. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  483. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -62
  484. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  485. package/src/runtime/native/styles/shorthands/box-shadow.ts +74 -0
  486. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  487. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  488. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +4 -2
  489. package/src/runtime/native/styles/units.ts +1 -1
  490. package/src/runtime/native/styles/variables.ts +5 -5
  491. package/src/runtime/utils/objects.ts +16 -4
  492. package/src/runtime/utils/specificity.ts +1 -0
  493. package/src/runtime/web/api.ts +1 -1
  494. package/src/style-collection/index.ts +142 -0
  495. package/src/style-collection/root.ts +35 -0
  496. package/dist/commonjs/compiler/attributes.test.js +0 -20
  497. package/dist/commonjs/compiler/attributes.test.js.map +0 -1
  498. package/dist/commonjs/doctor/index.js +0 -6
  499. package/dist/commonjs/doctor/index.js.map +0 -1
  500. package/dist/commonjs/runtime/native/injection.js +0 -98
  501. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  502. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  503. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  504. package/dist/commonjs/runtime/native/styles/box-shadow.js +0 -40
  505. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  506. package/dist/commonjs/runtime/native/styles/calc.js +0 -85
  507. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  508. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  509. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  510. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  511. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  512. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  513. package/dist/module/compiler/attributes.test.js +0 -20
  514. package/dist/module/compiler/attributes.test.js.map +0 -1
  515. package/dist/module/doctor/index.js +0 -4
  516. package/dist/module/doctor/index.js.map +0 -1
  517. package/dist/module/runtime/native/injection.js +0 -93
  518. package/dist/module/runtime/native/injection.js.map +0 -1
  519. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  520. package/dist/module/runtime/native/styles/border.js.map +0 -1
  521. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  522. package/dist/module/runtime/native/styles/calc.js +0 -79
  523. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  524. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  525. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  526. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  527. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  528. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  529. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +0 -2
  530. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +0 -1
  531. package/dist/typescript/commonjs/src/doctor/index.d.ts +0 -2
  532. package/dist/typescript/commonjs/src/doctor/index.d.ts.map +0 -1
  533. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -16
  534. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  535. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  536. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  537. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  538. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  539. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  540. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  541. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  542. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  543. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  544. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  545. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  546. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  547. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  548. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  549. package/dist/typescript/module/src/compiler/attributes.test.d.ts +0 -2
  550. package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +0 -1
  551. package/dist/typescript/module/src/doctor/index.d.ts +0 -2
  552. package/dist/typescript/module/src/doctor/index.d.ts.map +0 -1
  553. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -16
  554. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  555. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  556. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  557. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  558. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  559. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  560. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  561. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  562. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  563. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  564. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  565. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  566. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  567. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  568. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  569. package/src/compiler/attributes.test.ts +0 -28
  570. package/src/doctor/index.ts +0 -1
  571. package/src/runtime/native/injection.ts +0 -131
  572. package/src/runtime/native/styles/box-shadow.ts +0 -54
  573. package/src/runtime/native/styles/calc.ts +0 -97
@@ -13,8 +13,8 @@ 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
18
  exports.parseBorderInlineWidth = parseBorderInlineWidth;
19
19
  exports.parseBorderSideWidth = parseBorderSideWidth;
20
20
  exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
@@ -25,10 +25,9 @@ exports.parseCalcArguments = parseCalcArguments;
25
25
  exports.parseCalcFn = parseCalcFn;
26
26
  exports.parseColor = parseColor;
27
27
  exports.parseColorDeclaration = parseColorDeclaration;
28
- exports.parseColorOrAuto = parseColorOrAuto;
28
+ exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
29
+ exports.parseCustomDeclaration = parseCustomDeclaration;
29
30
  exports.parseDeclaration = parseDeclaration;
30
- exports.parseDeclarationCustom = parseDeclarationCustom;
31
- exports.parseDeclarationUnparsed = parseDeclarationUnparsed;
32
31
  exports.parseDimension = parseDimension;
33
32
  exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
34
33
  exports.parseDisplay = parseDisplay;
@@ -68,6 +67,7 @@ exports.parseTextShadow = parseTextShadow;
68
67
  exports.parseTime = parseTime;
69
68
  exports.parseTranslateProp = parseTranslateProp;
70
69
  exports.parseUnparsed = parseUnparsed;
70
+ exports.parseUnparsedDeclaration = parseUnparsedDeclaration;
71
71
  exports.parseUnresolvedColor = parseUnresolvedColor;
72
72
  exports.parseUserSelect = parseUserSelect;
73
73
  exports.parseVerticalAlign = parseVerticalAlign;
@@ -84,7 +84,9 @@ const CommaSeparator = Symbol("CommaSeparator");
84
84
  const propertyRename = {
85
85
  "background-image": "experimental_backgroundImage"
86
86
  };
87
- 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"]);
88
90
  const parsers = {
89
91
  "align-content": parseAlignContent,
90
92
  "align-items": parseAlignItems,
@@ -104,37 +106,45 @@ const parsers = {
104
106
  "block-size": parseSizeDeclaration,
105
107
  "border": parseBorder,
106
108
  "border-block": parseBorderBlock,
107
- "border-block-color": parseBorderBlockColor,
109
+ "border-block-color": parseBorderColor,
108
110
  "border-block-end": parseBorderBlockEnd,
109
111
  "border-block-end-color": parseColorDeclaration,
110
112
  "border-block-end-width": parseBorderSideWidthDeclaration,
111
113
  "border-block-start": parseBorderBlockStart,
112
114
  "border-block-start-color": parseColorDeclaration,
115
+ "border-block-start-style": parseBorderStyleDeclaration,
113
116
  "border-block-start-width": parseBorderSideWidthDeclaration,
117
+ "border-block-style": parseBorderBlockStyle,
114
118
  "border-block-width": parseBorderBlockWidth,
115
119
  "border-bottom": parseBorderSide,
116
120
  "border-bottom-color": parseColorDeclaration,
117
121
  "border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
118
122
  "border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
123
+ "border-bottom-style": parseBorderStyleDeclaration,
119
124
  "border-bottom-width": parseBorderSideWidthDeclaration,
120
125
  "border-color": parseBorderColor,
121
126
  "border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
122
127
  "border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
123
128
  "border-inline": parseBorderInline,
124
- "border-inline-color": parseBorderBlockColor,
129
+ "border-inline-color": parseBorderColor,
125
130
  "border-inline-end": parseBorderInlineEnd,
126
131
  "border-inline-end-color": parseColorDeclaration,
132
+ "border-inline-end-style": parseBorderInlineStyle,
127
133
  "border-inline-end-width": parseBorderSideWidthDeclaration,
128
134
  "border-inline-start": parseBorderInlineStart,
129
135
  "border-inline-start-color": parseColorDeclaration,
136
+ "border-inline-start-style": parseBorderInlineStyle,
130
137
  "border-inline-start-width": parseBorderSideWidthDeclaration,
138
+ "border-inline-style": parseBorderInlineStyle,
131
139
  "border-inline-width": parseBorderInlineWidth,
132
140
  "border-left": parseBorderSide,
133
141
  "border-left-color": parseColorDeclaration,
142
+ "border-left-style": parseBorderStyleDeclaration,
134
143
  "border-left-width": parseBorderSideWidthDeclaration,
135
144
  "border-radius": parseBorderRadius,
136
145
  "border-right": parseBorderSide,
137
146
  "border-right-color": parseColorDeclaration,
147
+ "border-right-style": parseBorderStyleDeclaration,
138
148
  "border-right-width": parseBorderSideWidthDeclaration,
139
149
  "border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
140
150
  "border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
@@ -143,11 +153,12 @@ const parsers = {
143
153
  "border-top-color": parseColorDeclaration,
144
154
  "border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
145
155
  "border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
156
+ "border-top-style": parseBorderStyleDeclaration,
146
157
  "border-top-width": parseBorderSideWidthDeclaration,
147
158
  "border-width": parseBorderWidth,
148
159
  "bottom": parseSizeDeclaration,
149
160
  "box-shadow": parseBoxShadow,
150
- "caret-color": parseColorOrAuto,
161
+ "caret-color": parseColorOrAutoDeclaration,
151
162
  "color": parseFontColorDeclaration,
152
163
  "column-gap": parseGap,
153
164
  "container": parseContainer,
@@ -251,6 +262,7 @@ const parsers = {
251
262
  "translate": parseTranslate,
252
263
  "user-select": parseUserSelect,
253
264
  "vertical-align": parseVerticalAlign,
265
+ "visibility": parseVisibility,
254
266
  "width": parseSizeDeclaration,
255
267
  "z-index": parseZIndex
256
268
  };
@@ -266,9 +278,9 @@ function parseDeclaration(declaration, builder) {
266
278
  return;
267
279
  }
268
280
  if (declaration.property === "unparsed") {
269
- parseDeclarationUnparsed(declaration, builder);
281
+ parseUnparsedDeclaration(declaration, builder);
270
282
  } else if (declaration.property === "custom") {
271
- parseDeclarationCustom(declaration, builder);
283
+ parseCustomDeclaration(declaration, builder);
272
284
  } else {
273
285
  parseWithParser(declaration, builder);
274
286
  }
@@ -322,15 +334,25 @@ function parseBorderRadius({
322
334
  "border-top-right-radius": parseSize2DDimensionPercentage(value.topRight, builder)
323
335
  });
324
336
  }
325
- function parseBorderColor({
326
- value
327
- }, builder) {
328
- builder.addShorthand("border-color", {
329
- "border-top-color": parseColor(value.top, builder),
330
- "border-bottom-color": parseColor(value.bottom, builder),
331
- "border-left-color": parseColor(value.left, builder),
332
- "border-right-color": parseColor(value.right, builder)
333
- });
337
+ function parseBorderColor(declaration, builder) {
338
+ switch (declaration.property) {
339
+ case "border-color":
340
+ builder.addShorthand("border-color", {
341
+ "border-top-color": parseColor(declaration.value.top, builder),
342
+ "border-bottom-color": parseColor(declaration.value.bottom, builder),
343
+ "border-left-color": parseColor(declaration.value.left, builder),
344
+ "border-right-color": parseColor(declaration.value.right, builder)
345
+ });
346
+ break;
347
+ case "border-block-color":
348
+ builder.addDescriptor("border-top-color", parseColor(declaration.value.start, builder));
349
+ builder.addDescriptor("border-bottom-color", parseColor(declaration.value.end, builder));
350
+ break;
351
+ case "border-inline-color":
352
+ builder.addDescriptor("border-left-color", parseColor(declaration.value.start, builder));
353
+ builder.addDescriptor("border-right-color", parseColor(declaration.value.end, builder));
354
+ break;
355
+ }
334
356
  }
335
357
  function parseBorderWidth({
336
358
  value
@@ -361,46 +383,55 @@ function parseBorderSide({
361
383
  function parseBorderBlock({
362
384
  value
363
385
  }, builder) {
364
- builder.addDescriptor("border-top-color", parseColor(value.color, builder));
365
- builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
366
- builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
367
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
386
+ builder.addDescriptor("border-block-color", parseColor(value.color, builder));
387
+ builder.addDescriptor("border-block-width", parseBorderSideWidth(value.width, builder));
388
+ builder.addDescriptor("border-block-style", parseBorderStyle(value.style, builder));
368
389
  }
369
390
  function parseBorderBlockStart({
370
391
  value
371
392
  }, builder) {
372
- builder.addDescriptor("border-top-color", parseColor(value.color, builder));
373
- builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
393
+ builder.addDescriptor("border-block-start-color", parseColor(value.color, builder));
394
+ builder.addDescriptor("border-block-start-width", parseBorderSideWidth(value.width, builder));
374
395
  }
375
396
  function parseBorderBlockEnd({
376
397
  value
377
398
  }, builder) {
378
- builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
379
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
399
+ builder.addDescriptor("border-block-end-color", parseColor(value.color, builder));
400
+ builder.addDescriptor("border-block-end-width", parseBorderSideWidth(value.width, builder));
380
401
  }
381
402
  function parseBorderInline({
382
403
  value
383
404
  }, builder) {
384
- builder.addDescriptor("border-left-color", parseColor(value.color, builder));
385
- builder.addDescriptor("border-right-color", parseColor(value.color, builder));
386
- builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
387
- builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
405
+ builder.addDescriptor("border-inline-color", parseColor(value.color, builder));
406
+ builder.addDescriptor("border-inline-width", parseBorderSideWidth(value.width, builder));
407
+ builder.addDescriptor("border-inline-style", parseBorderStyle(value.style, builder));
388
408
  }
389
409
  function parseBorderInlineStart({
390
410
  value
391
411
  }, builder) {
392
- builder.addDescriptor("border-left-color", parseColor(value.color, builder));
393
- builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
412
+ builder.addDescriptor("border-inline-start-color", parseColor(value.color, builder));
413
+ builder.addDescriptor("border-inline-start-width", parseBorderSideWidth(value.width, builder));
414
+ builder.addDescriptor("border-inline-start-style", parseBorderStyle(value.style, builder));
394
415
  }
395
416
  function parseBorderInlineEnd({
396
417
  value
397
418
  }, builder) {
398
- builder.addDescriptor("border-right-color", parseColor(value.color, builder));
399
- builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
419
+ builder.addDescriptor("border-inline-end-color", parseColor(value.color, builder));
420
+ builder.addDescriptor("border-inline-end-width", parseBorderSideWidth(value.width, builder));
421
+ builder.addDescriptor("border-inline-end-style", parseBorderStyle(value.style, builder));
400
422
  }
401
423
  function parseBorderInlineWidth(declaration, builder) {
402
- builder.addDescriptor("border-left-width", parseBorderSideWidth(declaration.value.start, builder));
403
- builder.addDescriptor("border-right-width", parseBorderSideWidth(declaration.value.end, builder));
424
+ builder.addDescriptor("border-inline-width", parseBorderSideWidth(declaration.value.start, builder));
425
+ }
426
+ function parseBorderInlineStyle(declaration, builder) {
427
+ if (typeof declaration.value === "string") {
428
+ builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value, builder));
429
+ } else if (declaration.value.start === declaration.value.end) {
430
+ builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value.start, builder));
431
+ } else {
432
+ builder.addDescriptor("border-inline-start-style", parseBorderStyle(declaration.value.start, builder));
433
+ builder.addDescriptor("border-inline-end-style", parseBorderStyle(declaration.value.end, builder));
434
+ }
404
435
  }
405
436
  function parseFlexFlow({
406
437
  value
@@ -488,26 +519,26 @@ function parseFont({
488
519
  function parseTransform({
489
520
  value
490
521
  }, builder) {
491
- builder.addDescriptor("transform", [{}, "@transform", value.flatMap(t => {
522
+ builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
492
523
  switch (t.type) {
493
524
  case "perspective":
494
- return [[{}, "@perspective", parseLength(t.value, builder)]];
525
+ return [[{}, "perspective", parseLength(t.value, builder)]];
495
526
  case "translate":
496
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
527
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
497
528
  case "translateX":
498
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
529
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
499
530
  case "translateY":
500
- return [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
531
+ return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
501
532
  case "rotate":
502
- return [[{}, "@rotate", parseAngle(t.value, builder)]];
533
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
503
534
  case "rotateX":
504
- return [[{}, "@rotateX", parseAngle(t.value, builder)]];
535
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
505
536
  case "rotateY":
506
- return [[{}, "@rotateY", parseAngle(t.value, builder)]];
537
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
507
538
  case "rotateZ":
508
- return [[{}, "@rotateZ", parseAngle(t.value, builder)]];
539
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
509
540
  case "scale":
510
- return [[{}, "@scaleX", parseLength(t.value[0], builder)], [{}, "@scaleY", parseLength(t.value[1], builder)]];
541
+ return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
511
542
  case "scaleX":
512
543
  return [[{}, "scaleX", parseLength(t.value, builder)]];
513
544
  case "scaleY":
@@ -539,9 +570,15 @@ function parseTranslate({
539
570
  function parseRotate({
540
571
  value
541
572
  }, builder) {
542
- builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.x, builder)]);
543
- builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.y, builder)]);
544
- builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.z, builder)]);
573
+ if (value.x) {
574
+ builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
575
+ }
576
+ if (value.y) {
577
+ builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
578
+ }
579
+ if (value.z) {
580
+ builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
581
+ }
545
582
  }
546
583
  function parseScale({
547
584
  value
@@ -583,7 +620,8 @@ function parseZIndex({
583
620
  return;
584
621
  }
585
622
  }
586
- function parseContainerType(_value, _builder) {
623
+ function parseContainerType(_declaration, builder) {
624
+ builder.addContainer(["___default___"]);
587
625
  return;
588
626
  }
589
627
  function parseContainerName({
@@ -598,7 +636,7 @@ function parseContainer({
598
636
  builder.addContainer(value.name.type === "none" ? false : value.name.value);
599
637
  return;
600
638
  }
601
- function parseDeclarationUnparsed(declaration, builder) {
639
+ function parseUnparsedDeclaration(declaration, builder) {
602
640
  let property = declaration.value.propertyId.property;
603
641
  if (!(property in parsers)) {
604
642
  builder.addWarning("property", property);
@@ -619,14 +657,14 @@ function parseDeclarationUnparsed(declaration, builder) {
619
657
  */
620
658
  builder.descriptorProperty = property;
621
659
  if (unparsedRuntimeParsing.has(property)) {
622
- const args = parseUnparsed(declaration.value.value, builder);
660
+ const args = parseUnparsed(declaration.value.value, builder, property);
623
661
  if (property === "animation") {
624
- builder.addDescriptor("animation", [{}, `@${(0, _selectors.toRNProperty)(property)}`, args]);
662
+ builder.addDescriptor("animation", [{}, property, args]);
625
663
  } else {
626
- builder.addDescriptor(property, [{}, `@${(0, _selectors.toRNProperty)(property)}`, args, 1]);
664
+ builder.addDescriptor(property, [{}, (0, _selectors.toRNProperty)(property), args, 1]);
627
665
  }
628
666
  } else {
629
- const value = parseUnparsed(declaration.value.value, builder);
667
+ const value = parseUnparsed(declaration.value.value, builder, property);
630
668
  builder.addDescriptor(property, value);
631
669
  if (property === "font-size") {
632
670
  builder.addDescriptor("--__rn-css-em", value);
@@ -636,22 +674,26 @@ function parseDeclarationUnparsed(declaration, builder) {
636
674
  }
637
675
  }
638
676
  }
639
- function parseDeclarationCustom(declaration, builder) {
677
+ function parseCustomDeclaration(declaration, builder) {
640
678
  const property = declaration.value.name;
641
- if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
642
- builder.setWarningProperty(property);
643
- builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, allowAuto.has(property)));
644
- } else if (property === "-webkit-line-clamp") {
645
- builder.addMapping({
646
- [property]: ["numberOfLines"]
647
- });
648
- builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, allowAuto.has(property)));
679
+ if (property === "-webkit-line-clamp") {
680
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
681
+ } else if (property === "-rn-ripple-style") {
682
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
683
+ } else if (property === "object-fit") {
684
+ // https://github.com/parcel-bundler/lightningcss/issues/1046
685
+ parseObjectFit(declaration.value, builder);
686
+ } else if (property === "object-position") {
687
+ // https://github.com/parcel-bundler/lightningcss/issues/1047
688
+ parseObjectPosition(declaration.value, builder);
689
+ } else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
690
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
649
691
  } else {
650
692
  builder.addWarning("property", declaration.value.name);
651
693
  }
652
694
  }
653
- function reduceParseUnparsed(tokenOrValues, builder) {
654
- const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder)).filter(v => v !== undefined);
695
+ function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
696
+ const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
655
697
  if (result.length === 0) {
656
698
  return undefined;
657
699
  }
@@ -665,6 +707,9 @@ function reduceParseUnparsed(tokenOrValues, builder) {
665
707
  currentGroup.push(value);
666
708
  }
667
709
  }
710
+
711
+ // Groups are the tokens grouped together by comma location
712
+ // If a group only has 1 item, it shouldn't be an array
668
713
  groups = groups.flatMap(group => {
669
714
  if (!Array.isArray(group)) {
670
715
  return [];
@@ -678,21 +723,26 @@ function reduceParseUnparsed(tokenOrValues, builder) {
678
723
  } else {
679
724
  return [first];
680
725
  }
726
+ } else if (
727
+ // This is a special case for <ratio> values
728
+ group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
729
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
730
+ return [group.join(" ")];
681
731
  } else {
682
732
  return [group];
683
733
  }
684
734
  });
685
735
  return groups.length === 1 ? groups[0] : groups;
686
736
  }
687
- function unparsedFunction(token, builder) {
688
- return [{}, token.value.name, reduceParseUnparsed(token.value.arguments, builder)];
737
+ function unparsedFunction(token, builder, property, allowAuto) {
738
+ return [{}, (0, _selectors.toRNProperty)(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
689
739
  }
690
740
 
691
741
  /**
692
742
  * When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
693
743
  * This export function best efforts parsing it into a export function that we can evaluate at runtime
694
744
  */
695
- function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
745
+ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
696
746
  if (tokenOrValue === undefined || tokenOrValue === null) {
697
747
  return;
698
748
  }
@@ -711,7 +761,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
711
761
  return round(tokenOrValue);
712
762
  }
713
763
  if (Array.isArray(tokenOrValue)) {
714
- const args = reduceParseUnparsed(tokenOrValue, builder);
764
+ const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
715
765
  if (!args) return;
716
766
  if (Array.isArray(args) && args.length === 1) return args[0];
717
767
  return args;
@@ -719,12 +769,12 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
719
769
  switch (tokenOrValue.type) {
720
770
  case "unresolved-color":
721
771
  {
722
- return parseUnresolvedColor(tokenOrValue.value, builder);
772
+ return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
723
773
  }
724
774
  case "var":
725
775
  {
726
776
  let args = tokenOrValue.value.name.ident.slice(2);
727
- const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
777
+ const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
728
778
  if (fallback !== undefined) {
729
779
  args = [args, fallback];
730
780
  }
@@ -733,50 +783,51 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
733
783
  case "function":
734
784
  {
735
785
  switch (tokenOrValue.value.name) {
736
- case "translate":
737
- case "rotate":
738
- case "rotateX":
739
- case "rotateY":
740
- case "skewX":
741
- case "skewY":
742
- case "scale":
743
- case "scaleX":
744
- case "scaleY":
745
- case "translateX":
746
- case "translateY":
747
- tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
748
- return unparsedFunction(tokenOrValue, builder);
786
+ case "blur":
749
787
  case "brightness":
750
788
  case "contrast":
751
789
  case "cubic-bezier":
752
790
  case "drop-shadow":
753
791
  case "fontScale":
792
+ case "getPixelSizeForLayoutSize":
754
793
  case "grayscale":
755
794
  case "hsl":
756
795
  case "hsla":
757
796
  case "hue-rotate":
758
797
  case "invert":
759
- case "linear-gradient":
760
798
  case "opacity":
761
799
  case "pixelScale":
762
- case "pixelSizeForLayoutSize":
763
800
  case "platformColor":
764
- case "radial-gradient":
765
801
  case "rgb":
766
802
  case "rgba":
803
+ case "rotate":
804
+ case "rotateX":
805
+ case "rotateY":
767
806
  case "roundToNearestPixel":
768
807
  case "saturate":
808
+ case "scale":
809
+ case "scaleX":
810
+ case "scaleY":
769
811
  case "sepia":
770
812
  case "shadow":
813
+ case "skewX":
814
+ case "skewY":
771
815
  case "steps":
772
- return unparsedFunction(tokenOrValue, builder);
816
+ case "translate":
817
+ case "translateX":
818
+ case "translateY":
819
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
820
+ case "linear-gradient":
821
+ case "radial-gradient":
822
+ // These are special as React Native requires the '-' in their name
823
+ return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
773
824
  case "hairlineWidth":
774
825
  return [{}, tokenOrValue.value.name, []];
775
826
  case "calc":
776
827
  case "max":
777
828
  case "min":
778
829
  case "clamp":
779
- return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
830
+ return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
780
831
  default:
781
832
  {
782
833
  builder.addWarning("value", `${tokenOrValue.value.name}()`);
@@ -798,7 +849,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
798
849
  builder.addWarning("value", value);
799
850
  return;
800
851
  }
801
- if (value === "inherit") {
852
+ if (value === "inherit" || value === "initial") {
802
853
  builder.addWarning("value", value);
803
854
  return;
804
855
  } else if (value === "currentcolor") {
@@ -808,6 +859,8 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
808
859
  return true;
809
860
  } else if (value === "false") {
810
861
  return false;
862
+ } else if (value === "infinity") {
863
+ return Number.MAX_SAFE_INTEGER;
811
864
  } else {
812
865
  return value;
813
866
  }
@@ -825,11 +878,17 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
825
878
  return parseDimension(tokenOrValue.value, builder);
826
879
  case "comma":
827
880
  return CommaSeparator;
881
+ case "delim":
882
+ {
883
+ if (tokenOrValue.value.value === "/") {
884
+ return tokenOrValue.value.value;
885
+ }
886
+ return;
887
+ }
828
888
  case "at-keyword":
829
889
  case "hash":
830
890
  case "id-hash":
831
891
  case "unquoted-url":
832
- case "delim":
833
892
  case "white-space":
834
893
  case "comment":
835
894
  case "colon":
@@ -893,7 +952,9 @@ function parseLength(length, builder) {
893
952
  } else if (length.value === -Infinity) {
894
953
  return -9999;
895
954
  } else {
896
- return round(length.value);
955
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
956
+ const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
957
+ return round(value);
897
958
  }
898
959
  }
899
960
  case "rem":
@@ -1048,7 +1109,7 @@ function parseSize(size, builder, options, {
1048
1109
  }
1049
1110
  return;
1050
1111
  }
1051
- function parseColorOrAuto({
1112
+ function parseColorOrAutoDeclaration({
1052
1113
  value
1053
1114
  }, builder) {
1054
1115
  if (value.type === "auto") {
@@ -1438,19 +1499,28 @@ function parseBorderStyle(value, builder) {
1438
1499
  builder.addWarning("value", value.top);
1439
1500
  return undefined;
1440
1501
  }
1441
- function parseBorderBlockColor({
1442
- value
1443
- }, builder) {
1444
- builder.addDescriptor("border-top-color", parseColor(value.start, builder));
1445
- builder.addDescriptor("border-bottom-color", parseColor(value.end, builder));
1446
- return;
1447
- }
1448
1502
  function parseBorderBlockWidth(declaration, builder) {
1449
- builder.addDescriptor("border-top-width", parseBorderSideWidth(declaration.value.start, builder));
1450
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(declaration.value.end, builder));
1503
+ const start = parseBorderSideWidth(declaration.value.start, builder);
1504
+ const end = parseBorderSideWidth(declaration.value.end, builder);
1505
+ if (start === end) {
1506
+ builder.addDescriptor("border-block-width", start);
1507
+ } else {
1508
+ builder.addDescriptor("border-block-start-width", start);
1509
+ builder.addDescriptor("border-block-end-width", end);
1510
+ }
1511
+ }
1512
+ function parseBorderBlockStyle(declaration, builder) {
1513
+ const start = parseBorderStyle(declaration.value.start, builder);
1514
+ const end = parseBorderStyle(declaration.value.end, builder);
1515
+ if (start == end) {
1516
+ builder.addDescriptor("border-block-style", start);
1517
+ } else {
1518
+ builder.addDescriptor("border-block-start-style", start);
1519
+ builder.addDescriptor("border-block-end-style", end);
1520
+ }
1451
1521
  }
1452
1522
  function parseBorderSideWidthDeclaration(declaration, builder) {
1453
- return parseBorderSideWidth(declaration.value, builder);
1523
+ builder.addDescriptor(declaration.property, parseBorderSideWidth(declaration.value, builder));
1454
1524
  }
1455
1525
  function parseBorderSideWidth(value, builder) {
1456
1526
  if (value.type === "length") {
@@ -1711,14 +1781,18 @@ function parseUserSelect({
1711
1781
  }
1712
1782
  }
1713
1783
  function parseSVGPaint({
1714
- value
1784
+ value,
1785
+ property
1715
1786
  }, builder) {
1787
+ let parsedValue;
1716
1788
  if (value.type === "none") {
1717
- return "transparent";
1789
+ parsedValue = "transparent";
1718
1790
  } else if (value.type === "color") {
1719
- return parseColor(value.value, builder);
1791
+ parsedValue = parseColor(value.value, builder);
1792
+ } else {
1793
+ return;
1720
1794
  }
1721
- return;
1795
+ builder.addDescriptor(property, parsedValue);
1722
1796
  }
1723
1797
  function round(number) {
1724
1798
  return Math.round((number + Number.EPSILON) * 10000) / 10000;
@@ -1732,7 +1806,7 @@ function parseDimensionPercentageFor_LengthValue(value, builder) {
1732
1806
  return parseLength(value.value, builder);
1733
1807
  }
1734
1808
  }
1735
- const allowAuto = new Set(["pointer-events"]);
1809
+ const allowAutoProperties = new Set(["pointer-events"]);
1736
1810
  function parseEnv(value, builder) {
1737
1811
  switch (value.name.type) {
1738
1812
  case "ua":
@@ -1741,7 +1815,7 @@ function parseEnv(value, builder) {
1741
1815
  case "safe-area-inset-right":
1742
1816
  case "safe-area-inset-bottom":
1743
1817
  case "safe-area-inset-left":
1744
- return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
1818
+ return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
1745
1819
  case "viewport-segment-width":
1746
1820
  case "viewport-segment-height":
1747
1821
  case "viewport-segment-top":
@@ -1755,17 +1829,16 @@ function parseEnv(value, builder) {
1755
1829
  }
1756
1830
  return;
1757
1831
  }
1758
- function parseCalcFn(name, tokens, builder) {
1759
- const args = parseCalcArguments(tokens, builder);
1832
+ function parseCalcFn(name, tokens, builder, property) {
1833
+ const args = parseCalcArguments(tokens, builder, property);
1760
1834
  if (args) {
1761
1835
  return [{}, name, args];
1762
1836
  }
1763
1837
  return;
1764
1838
  }
1765
- function parseCalcArguments([...args], builder) {
1839
+ function parseCalcArguments([...args], builder, property) {
1766
1840
  const parsed = [];
1767
- let mode;
1768
- for (const [currentIndex, arg] of args.entries()) {
1841
+ for (const arg of args) {
1769
1842
  switch (arg.type) {
1770
1843
  case "env":
1771
1844
  {
@@ -1776,7 +1849,7 @@ function parseCalcArguments([...args], builder) {
1776
1849
  case "function":
1777
1850
  case "unresolved-color":
1778
1851
  {
1779
- const value = parseUnparsed(arg, builder);
1852
+ const value = parseUnparsed(arg, builder, property);
1780
1853
  if (value === undefined) {
1781
1854
  return undefined;
1782
1855
  }
@@ -1811,44 +1884,21 @@ function parseCalcArguments([...args], builder) {
1811
1884
  }
1812
1885
  break;
1813
1886
  case "percentage":
1814
- mode ??= "percentage";
1815
- if (mode !== "percentage") return;
1816
- parsed.push(`${arg.value.value * 100}%`);
1887
+ parsed.push(`${round(arg.value.value * 100)}%`);
1817
1888
  break;
1818
1889
  case "number":
1819
1890
  {
1820
- mode ??= "number";
1821
- if (mode !== "number") return;
1822
- parsed.push(arg.value.value);
1891
+ parsed.push(round(arg.value.value));
1823
1892
  break;
1824
1893
  }
1825
1894
  case "parenthesis-block":
1826
1895
  {
1827
- /**
1828
- * If we have a parenthesis block, we just treat it as a nested calc function
1829
- * Because there could be multiple parenthesis blocks, this is recursive
1830
- */
1831
- let closeParenthesisIndex = -1;
1832
- for (let index = args.length - 1; index > 0; index--) {
1833
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1834
- const value = args[index];
1835
- if (value.type === "token" && value.value.type === "close-parenthesis") {
1836
- closeParenthesisIndex = index;
1837
- break;
1838
- }
1839
- }
1840
- if (closeParenthesisIndex === -1) {
1841
- return;
1842
- }
1843
- const innerCalcArgs = args
1844
- // Extract the inner calcArgs including the parenthesis. This mutates args
1845
- .splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
1846
- // Then drop the surrounding parenthesis
1847
- .slice(1, -1);
1848
- parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
1896
+ parsed.push("(");
1849
1897
  break;
1850
1898
  }
1851
1899
  case "close-parenthesis":
1900
+ parsed.push(")");
1901
+ break;
1852
1902
  case "string":
1853
1903
  case "function":
1854
1904
  case "ident":
@@ -1886,20 +1936,20 @@ function parseTranslateProp(value, prop, builder) {
1886
1936
  }
1887
1937
  return parseLength(value[prop], builder);
1888
1938
  }
1889
- function parseUnresolvedColor(color, builder) {
1939
+ function parseUnresolvedColor(color, builder, property, allowAuto) {
1890
1940
  switch (color.type) {
1891
1941
  case "rgb":
1892
- return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
1942
+ return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
1893
1943
  case "hsl":
1894
- return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
1944
+ return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
1895
1945
  case "light-dark":
1896
1946
  {
1897
1947
  const extraRule = builder.extendRule({
1898
1948
  m: [["=", "prefers-color-scheme", "dark"]]
1899
1949
  });
1900
- builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
1950
+ builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
1901
1951
  builder.addExtraRule(extraRule);
1902
- return reduceParseUnparsed(color.light, builder);
1952
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
1903
1953
  }
1904
1954
  default:
1905
1955
  color;
@@ -1961,7 +2011,7 @@ function addTransitionValue(declaration, builder) {
1961
2011
  }
1962
2012
  case "transition-property":
1963
2013
  {
1964
- builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers || v === "all" || v === "none").map(v => (0, _selectors.toRNProperty)(v)));
2014
+ builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers && !["visibility"].includes(v) || v === "all" || v === "none").map(v => (0, _selectors.toRNProperty)(v)));
1965
2015
  return;
1966
2016
  }
1967
2017
  case "transition-duration":
@@ -2058,7 +2108,7 @@ function parseGradient(gradient, builder) {
2058
2108
  switch (gradient.type) {
2059
2109
  case "linear":
2060
2110
  {
2061
- return [{}, "@linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2111
+ return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2062
2112
  }
2063
2113
  }
2064
2114
  return;
@@ -2093,6 +2143,27 @@ function parseGradientItem(item, builder) {
2093
2143
  return parseLength(item.value, builder);
2094
2144
  }
2095
2145
  }
2146
+ function parseObjectFit(declaration, builder) {
2147
+ builder.addMapping({
2148
+ "object-fit": "contentFit"
2149
+ });
2150
+ builder.addDescriptor("object-fit", parseUnparsed(declaration.value, builder, "object-fit"));
2151
+ }
2152
+ function parseObjectPosition(declaration, builder) {
2153
+ builder.addMapping({
2154
+ "object-position": "contentPosition"
2155
+ });
2156
+ builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
2157
+ }
2158
+ function parseVisibility(declaration, builder) {
2159
+ if (declaration.value === "visible") {
2160
+ builder.addDescriptor("opacity", 1);
2161
+ } else if (declaration.value === "hidden") {
2162
+ builder.addDescriptor("opacity", 0);
2163
+ } else {
2164
+ builder.addWarning("value", declaration.value);
2165
+ }
2166
+ }
2096
2167
  function parseFilter(declaration, builder) {
2097
2168
  if (declaration.value.type === "none") {
2098
2169
  return "unset";
@@ -2115,6 +2186,7 @@ function parseFilter(declaration, builder) {
2115
2186
  [value.type]: parseAngle(value.value, builder)
2116
2187
  };
2117
2188
  case "drop-shadow":
2189
+ 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)]];
2118
2190
  case "url":
2119
2191
  return;
2120
2192
  }