react-native-css 3.0.0-nightly.75f8b74 → 3.0.0-nightly.9c84741

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 (610) hide show
  1. package/dist/commonjs/compiler/atRules.js +16 -3
  2. package/dist/commonjs/compiler/atRules.js.map +1 -1
  3. package/dist/commonjs/compiler/compiler.js +37 -21
  4. package/dist/commonjs/compiler/compiler.js.map +1 -1
  5. package/dist/commonjs/compiler/declarations.js +255 -154
  6. package/dist/commonjs/compiler/declarations.js.map +1 -1
  7. package/dist/commonjs/compiler/inheritance.test.js +15 -15
  8. package/dist/commonjs/compiler/inheritance.test.js.map +1 -1
  9. package/dist/commonjs/compiler/keyframes.js +1 -1
  10. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  11. package/dist/commonjs/compiler/pseudo-elements.js +49 -0
  12. package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
  13. package/dist/commonjs/compiler/selector-builder.js +501 -0
  14. package/dist/commonjs/compiler/selector-builder.js.map +1 -0
  15. package/dist/commonjs/compiler/selectors.js +10 -6
  16. package/dist/commonjs/compiler/selectors.js.map +1 -1
  17. package/dist/commonjs/compiler/stylesheet.js +137 -46
  18. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  19. package/dist/commonjs/compiler/supports.js +27 -0
  20. package/dist/commonjs/compiler/supports.js.map +1 -0
  21. package/dist/commonjs/components/ActivityIndicator.js +22 -0
  22. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  23. package/dist/commonjs/components/Button.js +22 -0
  24. package/dist/commonjs/components/Button.js.map +1 -0
  25. package/dist/commonjs/components/FlatList.js +19 -0
  26. package/dist/commonjs/components/FlatList.js.map +1 -0
  27. package/dist/commonjs/components/Image.js +17 -0
  28. package/dist/commonjs/components/Image.js.map +1 -0
  29. package/dist/commonjs/components/Switch.js +17 -0
  30. package/dist/commonjs/components/Switch.js.map +1 -0
  31. package/dist/commonjs/components/TextInput.js +17 -0
  32. package/dist/commonjs/components/TextInput.js.map +1 -0
  33. package/dist/commonjs/components/index.js +48 -0
  34. package/dist/commonjs/components/index.js.map +1 -1
  35. package/dist/commonjs/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 +30 -12
  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 +14 -11
  50. package/dist/commonjs/poison.pill.js.map +1 -1
  51. package/dist/commonjs/runtime/native/api.js +8 -2
  52. package/dist/commonjs/runtime/native/api.js.map +1 -1
  53. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  54. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  55. package/dist/commonjs/runtime/native/conditions/container-query.js +28 -21
  56. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
  57. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
  58. package/dist/commonjs/runtime/native/conditions/index.js +12 -46
  59. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
  60. package/dist/commonjs/runtime/native/conditions/media-query.js +26 -21
  61. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  62. package/dist/commonjs/runtime/native/react/interaction.js +10 -10
  63. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
  64. package/dist/commonjs/runtime/native/react/rules.js +33 -27
  65. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  66. package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
  67. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  68. package/dist/commonjs/runtime/native/reactivity.js +12 -12
  69. package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
  70. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  71. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  72. package/dist/commonjs/runtime/native/styles/calculate-props.js +63 -38
  73. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  74. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  75. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  76. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  77. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  78. package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
  79. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  80. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  81. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  82. package/dist/commonjs/runtime/native/styles/functions/index.js +83 -0
  83. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  84. package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js +32 -0
  85. package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js.map +1 -0
  86. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  87. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  88. package/dist/commonjs/runtime/native/styles/functions/string-functions.js +23 -0
  89. package/dist/commonjs/runtime/native/styles/functions/string-functions.js.map +1 -0
  90. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
  91. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  92. package/dist/commonjs/runtime/native/styles/index.js +12 -12
  93. package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
  94. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  95. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  96. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  97. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  98. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +6 -37
  99. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  100. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  101. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  102. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +50 -0
  103. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  104. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  105. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  106. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  107. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  108. package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  109. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  110. package/dist/commonjs/runtime/native/styles/units.js +7 -4
  111. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  112. package/dist/commonjs/runtime/native/styles/variables.js +3 -2
  113. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
  114. package/dist/commonjs/runtime/utils/objects.js +14 -6
  115. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  116. package/dist/commonjs/runtime/utils/specificity.js +2 -1
  117. package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
  118. package/dist/commonjs/runtime/web/api.js.map +1 -1
  119. package/dist/commonjs/style-collection/index.js +110 -0
  120. package/dist/commonjs/style-collection/index.js.map +1 -0
  121. package/dist/commonjs/style-collection/root.js +28 -0
  122. package/dist/commonjs/style-collection/root.js.map +1 -0
  123. package/dist/module/compiler/atRules.js +16 -3
  124. package/dist/module/compiler/atRules.js.map +1 -1
  125. package/dist/module/compiler/compiler.js +37 -21
  126. package/dist/module/compiler/compiler.js.map +1 -1
  127. package/dist/module/compiler/compiler.types.js +1 -1
  128. package/dist/module/compiler/compiler.types.js.map +1 -1
  129. package/dist/module/compiler/declarations.js +250 -150
  130. package/dist/module/compiler/declarations.js.map +1 -1
  131. package/dist/module/compiler/inheritance.test.js +15 -15
  132. package/dist/module/compiler/inheritance.test.js.map +1 -1
  133. package/dist/module/compiler/keyframes.js +1 -1
  134. package/dist/module/compiler/keyframes.js.map +1 -1
  135. package/dist/module/compiler/pseudo-elements.js +44 -0
  136. package/dist/module/compiler/pseudo-elements.js.map +1 -0
  137. package/dist/module/compiler/selector-builder.js +496 -0
  138. package/dist/module/compiler/selector-builder.js.map +1 -0
  139. package/dist/module/compiler/selectors.js +10 -6
  140. package/dist/module/compiler/selectors.js.map +1 -1
  141. package/dist/module/compiler/stylesheet.js +136 -45
  142. package/dist/module/compiler/stylesheet.js.map +1 -1
  143. package/dist/module/compiler/supports.js +23 -0
  144. package/dist/module/compiler/supports.js.map +1 -0
  145. package/dist/module/components/ActivityIndicator.js +17 -0
  146. package/dist/module/components/ActivityIndicator.js.map +1 -0
  147. package/dist/module/components/Button.js +17 -0
  148. package/dist/module/components/Button.js.map +1 -0
  149. package/dist/module/components/FlatList.js +14 -0
  150. package/dist/module/components/FlatList.js.map +1 -0
  151. package/dist/module/components/Image.js +12 -0
  152. package/dist/module/components/Image.js.map +1 -0
  153. package/dist/module/components/Switch.js +12 -0
  154. package/dist/module/components/Switch.js.map +1 -0
  155. package/dist/module/components/TextInput.js +12 -0
  156. package/dist/module/components/TextInput.js.map +1 -0
  157. package/dist/module/components/index.js +6 -0
  158. package/dist/module/components/index.js.map +1 -1
  159. package/dist/module/components/react-native-safe-area-context.js +4 -0
  160. package/dist/module/components/react-native-safe-area-context.js.map +1 -0
  161. package/dist/module/components/react-native-safe-area-context.native.js +36 -0
  162. package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
  163. package/dist/module/jest/index.js +28 -10
  164. package/dist/module/jest/index.js.map +1 -1
  165. package/dist/module/metro/index.js +7 -4
  166. package/dist/module/metro/index.js.map +1 -1
  167. package/dist/module/metro/injection-code.js +5 -10
  168. package/dist/module/metro/injection-code.js.map +1 -1
  169. package/dist/module/metro/metro-transformer.js +18 -8
  170. package/dist/module/metro/metro-transformer.js.map +1 -1
  171. package/dist/module/metro/resolver.js +3 -0
  172. package/dist/module/metro/resolver.js.map +1 -1
  173. package/dist/module/poison.pill.js +14 -11
  174. package/dist/module/poison.pill.js.map +1 -1
  175. package/dist/module/runtime/native/api.js +2 -1
  176. package/dist/module/runtime/native/api.js.map +1 -1
  177. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  178. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  179. package/dist/module/runtime/native/conditions/container-query.js +28 -21
  180. package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
  181. package/dist/module/runtime/native/conditions/guards.js.map +1 -1
  182. package/dist/module/runtime/native/conditions/index.js +12 -46
  183. package/dist/module/runtime/native/conditions/index.js.map +1 -1
  184. package/dist/module/runtime/native/conditions/media-query.js +27 -22
  185. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  186. package/dist/module/runtime/native/react/interaction.js +10 -10
  187. package/dist/module/runtime/native/react/interaction.js.map +1 -1
  188. package/dist/module/runtime/native/react/rules.js +31 -26
  189. package/dist/module/runtime/native/react/rules.js.map +1 -1
  190. package/dist/module/runtime/native/react/useNativeCss.js +2 -1
  191. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  192. package/dist/module/runtime/native/reactivity.js +11 -11
  193. package/dist/module/runtime/native/reactivity.js.map +1 -1
  194. package/dist/module/runtime/native/reanimated.js +13 -0
  195. package/dist/module/runtime/native/reanimated.js.map +1 -0
  196. package/dist/module/runtime/native/styles/calculate-props.js +64 -39
  197. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  198. package/dist/module/runtime/native/styles/defaults.js +1 -1
  199. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  200. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  201. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  202. package/dist/module/runtime/native/styles/functions/calc.js +120 -0
  203. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  204. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  205. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  206. package/dist/module/runtime/native/styles/functions/index.js +10 -0
  207. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  208. package/dist/module/runtime/native/styles/functions/numeric-functions.js +25 -0
  209. package/dist/module/runtime/native/styles/functions/numeric-functions.js.map +1 -0
  210. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  211. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  212. package/dist/module/runtime/native/styles/functions/string-functions.js +18 -0
  213. package/dist/module/runtime/native/styles/functions/string-functions.js.map +1 -0
  214. package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
  215. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  216. package/dist/module/runtime/native/styles/index.js +12 -12
  217. package/dist/module/runtime/native/styles/index.js.map +1 -1
  218. package/dist/module/runtime/native/styles/resolve.js +20 -44
  219. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  220. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  221. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  222. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  223. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  224. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  225. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  226. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +16 -6
  227. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  228. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  229. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  230. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  231. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  232. package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
  233. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  234. package/dist/module/runtime/native/styles/units.js +7 -4
  235. package/dist/module/runtime/native/styles/units.js.map +1 -1
  236. package/dist/module/runtime/native/styles/variables.js +2 -1
  237. package/dist/module/runtime/native/styles/variables.js.map +1 -1
  238. package/dist/module/runtime/utils/objects.js +14 -6
  239. package/dist/module/runtime/utils/objects.js.map +1 -1
  240. package/dist/module/runtime/utils/specificity.js +2 -1
  241. package/dist/module/runtime/utils/specificity.js.map +1 -1
  242. package/dist/module/runtime/web/api.js.map +1 -1
  243. package/dist/module/style-collection/index.js +95 -0
  244. package/dist/module/style-collection/index.js.map +1 -0
  245. package/dist/module/style-collection/root.js +24 -0
  246. package/dist/module/style-collection/root.js.map +1 -0
  247. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
  249. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  250. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +16 -17
  251. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  252. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +18 -19
  253. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  254. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
  255. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
  257. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  258. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
  259. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
  260. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +23 -9
  261. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  262. package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
  263. package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  265. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  266. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  267. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  269. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  271. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  272. package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
  273. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
  274. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  275. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  276. package/dist/typescript/commonjs/src/components/index.d.ts +6 -0
  277. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  278. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts +2 -0
  279. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
  280. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
  281. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
  282. package/dist/typescript/commonjs/src/jest/index.d.ts +20 -3
  283. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  284. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  285. package/dist/typescript/commonjs/src/metro/injection-code.d.ts +4 -7
  286. package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -1
  287. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +4 -1
  288. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  289. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  290. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -1
  291. package/dist/typescript/commonjs/src/runtime/native/api.d.ts +3 -1
  292. package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
  293. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  294. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  295. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +3 -3
  296. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  297. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
  298. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
  299. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
  300. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
  301. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
  302. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  303. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
  304. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
  305. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
  306. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
  307. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +2 -1
  308. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  309. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +2 -10
  310. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
  311. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  312. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  313. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +1 -1
  314. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  315. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  316. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  317. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  318. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  319. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  320. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  321. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  322. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +8 -0
  323. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  324. package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
  325. package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
  326. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  327. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  328. package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
  329. package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
  330. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  331. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  332. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  333. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  334. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  335. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  336. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  337. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  338. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  339. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  340. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  341. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  342. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  343. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  344. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  345. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  346. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  347. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
  348. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
  349. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  350. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
  351. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
  352. package/dist/typescript/commonjs/src/runtime/web/api.d.ts +1 -1
  353. package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
  354. package/dist/typescript/commonjs/src/style-collection/index.d.ts +14 -0
  355. package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -0
  356. package/dist/typescript/commonjs/src/style-collection/root.d.ts +11 -0
  357. package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +1 -0
  358. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  359. package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
  360. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  361. package/dist/typescript/module/src/compiler/compiler.types.d.ts +16 -17
  362. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  363. package/dist/typescript/module/src/compiler/declarations.d.ts +18 -19
  364. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  365. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
  366. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
  367. package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
  368. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  369. package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
  370. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  371. package/dist/typescript/module/src/compiler/stylesheet.d.ts +23 -9
  372. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  373. package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
  374. package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
  375. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  376. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  377. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  378. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  379. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  380. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  381. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  382. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  383. package/dist/typescript/module/src/components/Switch.d.ts +8 -0
  384. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
  385. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  386. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  387. package/dist/typescript/module/src/components/index.d.ts +6 -0
  388. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  389. package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts +2 -0
  390. package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
  391. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
  392. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
  393. package/dist/typescript/module/src/jest/index.d.ts +20 -3
  394. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  395. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  396. package/dist/typescript/module/src/metro/injection-code.d.ts +4 -7
  397. package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -1
  398. package/dist/typescript/module/src/metro/metro-transformer.d.ts +4 -1
  399. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  400. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  401. package/dist/typescript/module/src/poison.pill.d.ts.map +1 -1
  402. package/dist/typescript/module/src/runtime/native/api.d.ts +3 -1
  403. package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
  404. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  405. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  406. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +3 -3
  407. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
  408. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
  409. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
  410. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
  411. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
  412. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
  413. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
  414. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
  415. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
  416. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
  417. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
  418. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +2 -1
  419. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  420. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +2 -10
  421. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
  422. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  423. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  424. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +1 -1
  425. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  426. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  427. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  428. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  429. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  430. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  431. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  432. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  433. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +8 -0
  434. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  435. package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
  436. package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
  437. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  438. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  439. package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
  440. package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
  441. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  442. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  443. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  444. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  445. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  446. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  447. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  448. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  449. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  450. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  451. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  452. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  453. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  454. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  455. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  456. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  457. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  458. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
  459. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
  460. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  461. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
  462. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
  463. package/dist/typescript/module/src/runtime/web/api.d.ts +1 -1
  464. package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
  465. package/dist/typescript/module/src/style-collection/index.d.ts +14 -0
  466. package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -0
  467. package/dist/typescript/module/src/style-collection/root.d.ts +11 -0
  468. package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -0
  469. package/package.json +32 -16
  470. package/src/compiler/atRules.ts +17 -3
  471. package/src/compiler/compiler.ts +40 -33
  472. package/src/compiler/compiler.types.ts +18 -19
  473. package/src/compiler/declarations.ts +447 -192
  474. package/src/compiler/inheritance.test.ts +13 -13
  475. package/src/compiler/keyframes.ts +1 -1
  476. package/src/compiler/pseudo-elements.ts +54 -0
  477. package/src/compiler/selector-builder.ts +586 -0
  478. package/src/compiler/selectors.ts +20 -6
  479. package/src/compiler/stylesheet.ts +188 -53
  480. package/src/compiler/supports.ts +26 -0
  481. package/src/components/ActivityIndicator.tsx +27 -0
  482. package/src/components/Button.tsx +22 -0
  483. package/src/components/FlatList.tsx +21 -0
  484. package/src/components/Image.tsx +17 -0
  485. package/src/components/Switch.tsx +17 -0
  486. package/src/components/TextInput.tsx +17 -0
  487. package/src/components/index.tsx +6 -0
  488. package/src/components/react-native-safe-area-context.native.tsx +40 -0
  489. package/src/components/react-native-safe-area-context.tsx +1 -0
  490. package/src/jest/index.ts +35 -10
  491. package/src/metro/index.ts +12 -7
  492. package/src/metro/injection-code.ts +6 -10
  493. package/src/metro/metro-transformer.ts +27 -10
  494. package/src/metro/resolver.ts +8 -0
  495. package/src/poison.pill.ts +15 -11
  496. package/src/runtime/native/api.ts +3 -1
  497. package/src/runtime/native/conditions/attributes.ts +52 -0
  498. package/src/runtime/native/conditions/container-query.ts +27 -22
  499. package/src/runtime/native/conditions/guards.ts +1 -2
  500. package/src/runtime/native/conditions/index.ts +14 -66
  501. package/src/runtime/native/conditions/media-query.ts +29 -25
  502. package/src/runtime/native/react/interaction.ts +12 -12
  503. package/src/runtime/native/react/rules.ts +34 -24
  504. package/src/runtime/native/react/useNativeCss.ts +4 -1
  505. package/src/runtime/native/reactivity.ts +14 -21
  506. package/src/runtime/native/reanimated.ts +22 -0
  507. package/src/runtime/native/styles/calculate-props.ts +71 -39
  508. package/src/runtime/native/styles/defaults.ts +1 -0
  509. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  510. package/src/runtime/native/styles/functions/calc.ts +121 -0
  511. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  512. package/src/runtime/native/styles/functions/index.ts +7 -0
  513. package/src/runtime/native/styles/functions/numeric-functions.ts +38 -0
  514. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  515. package/src/runtime/native/styles/functions/string-functions.ts +22 -0
  516. package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
  517. package/src/runtime/native/styles/index.ts +12 -12
  518. package/src/runtime/native/styles/resolve.ts +20 -63
  519. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  520. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -62
  521. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  522. package/src/runtime/native/styles/shorthands/box-shadow.ts +74 -0
  523. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  524. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  525. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +4 -2
  526. package/src/runtime/native/styles/units.ts +8 -4
  527. package/src/runtime/native/styles/variables.ts +5 -5
  528. package/src/runtime/utils/objects.ts +16 -4
  529. package/src/runtime/utils/specificity.ts +1 -0
  530. package/src/runtime/web/api.ts +1 -1
  531. package/src/style-collection/index.ts +142 -0
  532. package/src/style-collection/root.ts +35 -0
  533. package/dist/commonjs/compiler/attributes.test.js +0 -20
  534. package/dist/commonjs/compiler/attributes.test.js.map +0 -1
  535. package/dist/commonjs/doctor/index.js +0 -6
  536. package/dist/commonjs/doctor/index.js.map +0 -1
  537. package/dist/commonjs/runtime/native/injection.js +0 -98
  538. package/dist/commonjs/runtime/native/injection.js.map +0 -1
  539. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  540. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  541. package/dist/commonjs/runtime/native/styles/box-shadow.js +0 -40
  542. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  543. package/dist/commonjs/runtime/native/styles/calc.js +0 -85
  544. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  545. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  546. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  547. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  548. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  549. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  550. package/dist/module/compiler/attributes.test.js +0 -20
  551. package/dist/module/compiler/attributes.test.js.map +0 -1
  552. package/dist/module/doctor/index.js +0 -4
  553. package/dist/module/doctor/index.js.map +0 -1
  554. package/dist/module/runtime/native/injection.js +0 -93
  555. package/dist/module/runtime/native/injection.js.map +0 -1
  556. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  557. package/dist/module/runtime/native/styles/border.js.map +0 -1
  558. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  559. package/dist/module/runtime/native/styles/calc.js +0 -79
  560. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  561. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  562. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  563. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  564. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  565. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  566. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +0 -2
  567. package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +0 -1
  568. package/dist/typescript/commonjs/src/doctor/index.d.ts +0 -2
  569. package/dist/typescript/commonjs/src/doctor/index.d.ts.map +0 -1
  570. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -16
  571. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
  572. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  573. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  574. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  575. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  576. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  577. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  578. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  579. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  580. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  581. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  582. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  583. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  584. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  585. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  586. package/dist/typescript/module/src/compiler/attributes.test.d.ts +0 -2
  587. package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +0 -1
  588. package/dist/typescript/module/src/doctor/index.d.ts +0 -2
  589. package/dist/typescript/module/src/doctor/index.d.ts.map +0 -1
  590. package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -16
  591. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
  592. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  593. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  594. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  595. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  596. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  597. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  598. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  599. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  600. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  601. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  602. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  603. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  604. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  605. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  606. package/src/compiler/attributes.test.ts +0 -28
  607. package/src/doctor/index.ts +0 -1
  608. package/src/runtime/native/injection.ts +0 -131
  609. package/src/runtime/native/styles/box-shadow.ts +0 -54
  610. package/src/runtime/native/styles/calc.ts +0 -97
@@ -9,7 +9,9 @@ const CommaSeparator = Symbol("CommaSeparator");
9
9
  const propertyRename = {
10
10
  "background-image": "experimental_backgroundImage"
11
11
  };
12
- const unparsedRuntimeParsing = new Set(["animation", "text-shadow", "transform", "box-shadow", "border"]);
12
+
13
+ // TODO: We need a better way to handle this
14
+ const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
13
15
  const parsers = {
14
16
  "align-content": parseAlignContent,
15
17
  "align-items": parseAlignItems,
@@ -29,37 +31,45 @@ const parsers = {
29
31
  "block-size": parseSizeDeclaration,
30
32
  "border": parseBorder,
31
33
  "border-block": parseBorderBlock,
32
- "border-block-color": parseBorderBlockColor,
34
+ "border-block-color": parseBorderColor,
33
35
  "border-block-end": parseBorderBlockEnd,
34
36
  "border-block-end-color": parseColorDeclaration,
35
37
  "border-block-end-width": parseBorderSideWidthDeclaration,
36
38
  "border-block-start": parseBorderBlockStart,
37
39
  "border-block-start-color": parseColorDeclaration,
40
+ "border-block-start-style": parseBorderStyleDeclaration,
38
41
  "border-block-start-width": parseBorderSideWidthDeclaration,
42
+ "border-block-style": parseBorderBlockStyle,
39
43
  "border-block-width": parseBorderBlockWidth,
40
44
  "border-bottom": parseBorderSide,
41
45
  "border-bottom-color": parseColorDeclaration,
42
46
  "border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
43
47
  "border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
48
+ "border-bottom-style": parseBorderStyleDeclaration,
44
49
  "border-bottom-width": parseBorderSideWidthDeclaration,
45
50
  "border-color": parseBorderColor,
46
51
  "border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
47
52
  "border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
48
53
  "border-inline": parseBorderInline,
49
- "border-inline-color": parseBorderBlockColor,
54
+ "border-inline-color": parseBorderColor,
50
55
  "border-inline-end": parseBorderInlineEnd,
51
56
  "border-inline-end-color": parseColorDeclaration,
57
+ "border-inline-end-style": parseBorderInlineStyle,
52
58
  "border-inline-end-width": parseBorderSideWidthDeclaration,
53
59
  "border-inline-start": parseBorderInlineStart,
54
60
  "border-inline-start-color": parseColorDeclaration,
61
+ "border-inline-start-style": parseBorderInlineStyle,
55
62
  "border-inline-start-width": parseBorderSideWidthDeclaration,
56
- "border-inline-width": parseBorderBlockWidth,
63
+ "border-inline-style": parseBorderInlineStyle,
64
+ "border-inline-width": parseBorderInlineWidth,
57
65
  "border-left": parseBorderSide,
58
66
  "border-left-color": parseColorDeclaration,
67
+ "border-left-style": parseBorderStyleDeclaration,
59
68
  "border-left-width": parseBorderSideWidthDeclaration,
60
69
  "border-radius": parseBorderRadius,
61
70
  "border-right": parseBorderSide,
62
71
  "border-right-color": parseColorDeclaration,
72
+ "border-right-style": parseBorderStyleDeclaration,
63
73
  "border-right-width": parseBorderSideWidthDeclaration,
64
74
  "border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
65
75
  "border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
@@ -68,11 +78,12 @@ const parsers = {
68
78
  "border-top-color": parseColorDeclaration,
69
79
  "border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
70
80
  "border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
81
+ "border-top-style": parseBorderStyleDeclaration,
71
82
  "border-top-width": parseBorderSideWidthDeclaration,
72
83
  "border-width": parseBorderWidth,
73
84
  "bottom": parseSizeDeclaration,
74
85
  "box-shadow": parseBoxShadow,
75
- "caret-color": parseColorOrAuto,
86
+ "caret-color": parseColorOrAutoDeclaration,
76
87
  "color": parseFontColorDeclaration,
77
88
  "column-gap": parseGap,
78
89
  "container": parseContainer,
@@ -176,6 +187,7 @@ const parsers = {
176
187
  "translate": parseTranslate,
177
188
  "user-select": parseUserSelect,
178
189
  "vertical-align": parseVerticalAlign,
190
+ "visibility": parseVisibility,
179
191
  "width": parseSizeDeclaration,
180
192
  "z-index": parseZIndex
181
193
  };
@@ -191,9 +203,9 @@ export function parseDeclaration(declaration, builder) {
191
203
  return;
192
204
  }
193
205
  if (declaration.property === "unparsed") {
194
- parseDeclarationUnparsed(declaration, builder);
206
+ parseUnparsedDeclaration(declaration, builder);
195
207
  } else if (declaration.property === "custom") {
196
- parseDeclarationCustom(declaration, builder);
208
+ parseCustomDeclaration(declaration, builder);
197
209
  } else {
198
210
  parseWithParser(declaration, builder);
199
211
  }
@@ -202,6 +214,7 @@ function parseWithParser(declaration, builder) {
202
214
  if (declaration.property in parsers) {
203
215
  const parser = parsers[declaration.property];
204
216
  builder.descriptorProperty = declaration.property;
217
+ builder.setWarningProperty(declaration.property);
205
218
  const value = parser(declaration, builder, declaration.property);
206
219
  if (value !== undefined) {
207
220
  builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, value);
@@ -246,15 +259,25 @@ function parseBorderRadius({
246
259
  "border-top-right-radius": parseSize2DDimensionPercentage(value.topRight, builder)
247
260
  });
248
261
  }
249
- function parseBorderColor({
250
- value
251
- }, builder) {
252
- builder.addShorthand("border-color", {
253
- "border-top-color": parseColor(value.top, builder),
254
- "border-bottom-color": parseColor(value.bottom, builder),
255
- "border-left-color": parseColor(value.left, builder),
256
- "border-right-color": parseColor(value.right, builder)
257
- });
262
+ function parseBorderColor(declaration, builder) {
263
+ switch (declaration.property) {
264
+ case "border-color":
265
+ builder.addShorthand("border-color", {
266
+ "border-top-color": parseColor(declaration.value.top, builder),
267
+ "border-bottom-color": parseColor(declaration.value.bottom, builder),
268
+ "border-left-color": parseColor(declaration.value.left, builder),
269
+ "border-right-color": parseColor(declaration.value.right, builder)
270
+ });
271
+ break;
272
+ case "border-block-color":
273
+ builder.addDescriptor("border-top-color", parseColor(declaration.value.start, builder));
274
+ builder.addDescriptor("border-bottom-color", parseColor(declaration.value.end, builder));
275
+ break;
276
+ case "border-inline-color":
277
+ builder.addDescriptor("border-left-color", parseColor(declaration.value.start, builder));
278
+ builder.addDescriptor("border-right-color", parseColor(declaration.value.end, builder));
279
+ break;
280
+ }
258
281
  }
259
282
  function parseBorderWidth({
260
283
  value
@@ -285,42 +308,55 @@ function parseBorderSide({
285
308
  function parseBorderBlock({
286
309
  value
287
310
  }, builder) {
288
- builder.addDescriptor("border-top-color", parseColor(value.color, builder));
289
- builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
290
- builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
291
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
311
+ builder.addDescriptor("border-block-color", parseColor(value.color, builder));
312
+ builder.addDescriptor("border-block-width", parseBorderSideWidth(value.width, builder));
313
+ builder.addDescriptor("border-block-style", parseBorderStyle(value.style, builder));
292
314
  }
293
315
  function parseBorderBlockStart({
294
316
  value
295
317
  }, builder) {
296
- builder.addDescriptor("border-top-color", parseColor(value.color, builder));
297
- builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
318
+ builder.addDescriptor("border-block-start-color", parseColor(value.color, builder));
319
+ builder.addDescriptor("border-block-start-width", parseBorderSideWidth(value.width, builder));
298
320
  }
299
321
  function parseBorderBlockEnd({
300
322
  value
301
323
  }, builder) {
302
- builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
303
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
324
+ builder.addDescriptor("border-block-end-color", parseColor(value.color, builder));
325
+ builder.addDescriptor("border-block-end-width", parseBorderSideWidth(value.width, builder));
304
326
  }
305
327
  function parseBorderInline({
306
328
  value
307
329
  }, builder) {
308
- builder.addDescriptor("border-left-color", parseColor(value.color, builder));
309
- builder.addDescriptor("border-right-color", parseColor(value.color, builder));
310
- builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
311
- builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
330
+ builder.addDescriptor("border-inline-color", parseColor(value.color, builder));
331
+ builder.addDescriptor("border-inline-width", parseBorderSideWidth(value.width, builder));
332
+ builder.addDescriptor("border-inline-style", parseBorderStyle(value.style, builder));
312
333
  }
313
334
  function parseBorderInlineStart({
314
335
  value
315
336
  }, builder) {
316
- builder.addDescriptor("border-left-color", parseColor(value.color, builder));
317
- builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
337
+ builder.addDescriptor("border-inline-start-color", parseColor(value.color, builder));
338
+ builder.addDescriptor("border-inline-start-width", parseBorderSideWidth(value.width, builder));
339
+ builder.addDescriptor("border-inline-start-style", parseBorderStyle(value.style, builder));
318
340
  }
319
341
  function parseBorderInlineEnd({
320
342
  value
321
343
  }, builder) {
322
- builder.addDescriptor("border-right-color", parseColor(value.color, builder));
323
- builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
344
+ builder.addDescriptor("border-inline-end-color", parseColor(value.color, builder));
345
+ builder.addDescriptor("border-inline-end-width", parseBorderSideWidth(value.width, builder));
346
+ builder.addDescriptor("border-inline-end-style", parseBorderStyle(value.style, builder));
347
+ }
348
+ export function parseBorderInlineWidth(declaration, builder) {
349
+ builder.addDescriptor("border-inline-width", parseBorderSideWidth(declaration.value.start, builder));
350
+ }
351
+ export function parseBorderInlineStyle(declaration, builder) {
352
+ if (typeof declaration.value === "string") {
353
+ builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value, builder));
354
+ } else if (declaration.value.start === declaration.value.end) {
355
+ builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value.start, builder));
356
+ } else {
357
+ builder.addDescriptor("border-inline-start-style", parseBorderStyle(declaration.value.start, builder));
358
+ builder.addDescriptor("border-inline-end-style", parseBorderStyle(declaration.value.end, builder));
359
+ }
324
360
  }
325
361
  function parseFlexFlow({
326
362
  value
@@ -408,26 +444,26 @@ function parseFont({
408
444
  function parseTransform({
409
445
  value
410
446
  }, builder) {
411
- builder.addDescriptor("transform", [{}, "@transform", value.flatMap(t => {
447
+ builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
412
448
  switch (t.type) {
413
449
  case "perspective":
414
- return [[{}, "@perspective", parseLength(t.value, builder)]];
450
+ return [[{}, "perspective", parseLength(t.value, builder)]];
415
451
  case "translate":
416
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
452
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
417
453
  case "translateX":
418
- return [[{}, "@translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
454
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
419
455
  case "translateY":
420
- return [[{}, "@translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
456
+ return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
421
457
  case "rotate":
422
- return [[{}, "@rotate", parseAngle(t.value, builder)]];
458
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
423
459
  case "rotateX":
424
- return [[{}, "@rotateX", parseAngle(t.value, builder)]];
460
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
425
461
  case "rotateY":
426
- return [[{}, "@rotateY", parseAngle(t.value, builder)]];
462
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
427
463
  case "rotateZ":
428
- return [[{}, "@rotateZ", parseAngle(t.value, builder)]];
464
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
429
465
  case "scale":
430
- return [[{}, "@scaleX", parseLength(t.value[0], builder)], [{}, "@scaleY", parseLength(t.value[1], builder)]];
466
+ return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
431
467
  case "scaleX":
432
468
  return [[{}, "scaleX", parseLength(t.value, builder)]];
433
469
  case "scaleY":
@@ -459,9 +495,15 @@ function parseTranslate({
459
495
  function parseRotate({
460
496
  value
461
497
  }, builder) {
462
- builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.x, builder)]);
463
- builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.y, builder)]);
464
- builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.z, builder)]);
498
+ if (value.x) {
499
+ builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
500
+ }
501
+ if (value.y) {
502
+ builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
503
+ }
504
+ if (value.z) {
505
+ builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
506
+ }
465
507
  }
466
508
  function parseScale({
467
509
  value
@@ -481,7 +523,11 @@ function parseLetterSpacing({
481
523
  if (value.type === "normal") {
482
524
  return;
483
525
  }
484
- return parseLength(value.value, builder);
526
+ const descriptor = parseLength(value.value, builder);
527
+ if (Array.isArray(descriptor) && descriptor[1] === "em" && typeof descriptor[2] === "number") {
528
+ return descriptor[2];
529
+ }
530
+ return descriptor;
485
531
  }
486
532
  function parseTextDecoration({
487
533
  value
@@ -499,7 +545,8 @@ function parseZIndex({
499
545
  return;
500
546
  }
501
547
  }
502
- function parseContainerType(_value, _builder) {
548
+ function parseContainerType(_declaration, builder) {
549
+ builder.addContainer(["___default___"]);
503
550
  return;
504
551
  }
505
552
  function parseContainerName({
@@ -514,12 +561,13 @@ function parseContainer({
514
561
  builder.addContainer(value.name.type === "none" ? false : value.name.value);
515
562
  return;
516
563
  }
517
- export function parseDeclarationUnparsed(declaration, builder) {
564
+ export function parseUnparsedDeclaration(declaration, builder) {
518
565
  let property = declaration.value.propertyId.property;
519
566
  if (!(property in parsers)) {
520
567
  builder.addWarning("property", property);
521
568
  return;
522
569
  }
570
+ builder.setWarningProperty(property);
523
571
 
524
572
  /**
525
573
  * React Native doesn't support all the logical properties
@@ -534,14 +582,14 @@ export function parseDeclarationUnparsed(declaration, builder) {
534
582
  */
535
583
  builder.descriptorProperty = property;
536
584
  if (unparsedRuntimeParsing.has(property)) {
537
- const args = parseUnparsed(declaration.value.value, builder);
585
+ const args = parseUnparsed(declaration.value.value, builder, property);
538
586
  if (property === "animation") {
539
- builder.addDescriptor("animation", [{}, `@${toRNProperty(property)}`, args]);
587
+ builder.addDescriptor("animation", [{}, property, args]);
540
588
  } else {
541
- builder.addDescriptor(property, [{}, `@${toRNProperty(property)}`, args, 1]);
589
+ builder.addDescriptor(property, [{}, toRNProperty(property), args, 1]);
542
590
  }
543
591
  } else {
544
- const value = parseUnparsed(declaration.value.value, builder);
592
+ const value = parseUnparsed(declaration.value.value, builder, property);
545
593
  builder.addDescriptor(property, value);
546
594
  if (property === "font-size") {
547
595
  builder.addDescriptor("--__rn-css-em", value);
@@ -551,16 +599,26 @@ export function parseDeclarationUnparsed(declaration, builder) {
551
599
  }
552
600
  }
553
601
  }
554
- export function parseDeclarationCustom(declaration, builder) {
602
+ export function parseCustomDeclaration(declaration, builder) {
555
603
  const property = declaration.value.name;
556
- if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
557
- builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, allowAuto.has(property)));
604
+ if (property === "-webkit-line-clamp") {
605
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
606
+ } else if (property === "-rn-ripple-style") {
607
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
608
+ } else if (property === "object-fit") {
609
+ // https://github.com/parcel-bundler/lightningcss/issues/1046
610
+ parseObjectFit(declaration.value, builder);
611
+ } else if (property === "object-position") {
612
+ // https://github.com/parcel-bundler/lightningcss/issues/1047
613
+ parseObjectPosition(declaration.value, builder);
614
+ } else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
615
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
558
616
  } else {
559
617
  builder.addWarning("property", declaration.value.name);
560
618
  }
561
619
  }
562
- export function reduceParseUnparsed(tokenOrValues, builder) {
563
- const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder)).filter(v => v !== undefined);
620
+ export function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
621
+ const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
564
622
  if (result.length === 0) {
565
623
  return undefined;
566
624
  }
@@ -574,6 +632,9 @@ export function reduceParseUnparsed(tokenOrValues, builder) {
574
632
  currentGroup.push(value);
575
633
  }
576
634
  }
635
+
636
+ // Groups are the tokens grouped together by comma location
637
+ // If a group only has 1 item, it shouldn't be an array
577
638
  groups = groups.flatMap(group => {
578
639
  if (!Array.isArray(group)) {
579
640
  return [];
@@ -587,21 +648,26 @@ export function reduceParseUnparsed(tokenOrValues, builder) {
587
648
  } else {
588
649
  return [first];
589
650
  }
651
+ } else if (
652
+ // This is a special case for <ratio> values
653
+ group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
654
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
655
+ return [group.join(" ")];
590
656
  } else {
591
657
  return [group];
592
658
  }
593
659
  });
594
660
  return groups.length === 1 ? groups[0] : groups;
595
661
  }
596
- export function unparsedFunction(token, builder) {
597
- return [{}, token.value.name, reduceParseUnparsed(token.value.arguments, builder)];
662
+ export function unparsedFunction(token, builder, property, allowAuto) {
663
+ return [{}, toRNProperty(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
598
664
  }
599
665
 
600
666
  /**
601
667
  * When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
602
668
  * This export function best efforts parsing it into a export function that we can evaluate at runtime
603
669
  */
604
- export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
670
+ export function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
605
671
  if (tokenOrValue === undefined || tokenOrValue === null) {
606
672
  return;
607
673
  }
@@ -620,7 +686,7 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
620
686
  return round(tokenOrValue);
621
687
  }
622
688
  if (Array.isArray(tokenOrValue)) {
623
- const args = reduceParseUnparsed(tokenOrValue, builder);
689
+ const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
624
690
  if (!args) return;
625
691
  if (Array.isArray(args) && args.length === 1) return args[0];
626
692
  return args;
@@ -628,12 +694,12 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
628
694
  switch (tokenOrValue.type) {
629
695
  case "unresolved-color":
630
696
  {
631
- return parseUnresolvedColor(tokenOrValue.value, builder);
697
+ return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
632
698
  }
633
699
  case "var":
634
700
  {
635
701
  let args = tokenOrValue.value.name.ident.slice(2);
636
- const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
702
+ const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
637
703
  if (fallback !== undefined) {
638
704
  args = [args, fallback];
639
705
  }
@@ -642,53 +708,54 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
642
708
  case "function":
643
709
  {
644
710
  switch (tokenOrValue.value.name) {
645
- case "translate":
646
- case "rotate":
647
- case "rotateX":
648
- case "rotateY":
649
- case "skewX":
650
- case "skewY":
651
- case "scale":
652
- case "scaleX":
653
- case "scaleY":
654
- case "translateX":
655
- case "translateY":
656
- tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
657
- return unparsedFunction(tokenOrValue, builder);
711
+ case "blur":
658
712
  case "brightness":
659
713
  case "contrast":
660
714
  case "cubic-bezier":
661
715
  case "drop-shadow":
662
716
  case "fontScale":
717
+ case "getPixelSizeForLayoutSize":
663
718
  case "grayscale":
664
719
  case "hsl":
665
720
  case "hsla":
666
721
  case "hue-rotate":
667
722
  case "invert":
668
- case "linear-gradient":
669
723
  case "opacity":
670
724
  case "pixelScale":
671
- case "pixelSizeForLayoutSize":
672
725
  case "platformColor":
673
- case "radial-gradient":
674
726
  case "rgb":
675
727
  case "rgba":
728
+ case "rotate":
729
+ case "rotateX":
730
+ case "rotateY":
676
731
  case "roundToNearestPixel":
677
732
  case "saturate":
733
+ case "scale":
734
+ case "scaleX":
735
+ case "scaleY":
678
736
  case "sepia":
679
737
  case "shadow":
738
+ case "skewX":
739
+ case "skewY":
680
740
  case "steps":
681
- return unparsedFunction(tokenOrValue, builder);
741
+ case "translate":
742
+ case "translateX":
743
+ case "translateY":
744
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
745
+ case "linear-gradient":
746
+ case "radial-gradient":
747
+ // These are special as React Native requires the '-' in their name
748
+ return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
682
749
  case "hairlineWidth":
683
750
  return [{}, tokenOrValue.value.name, []];
684
751
  case "calc":
685
752
  case "max":
686
753
  case "min":
687
754
  case "clamp":
688
- return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
755
+ return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
689
756
  default:
690
757
  {
691
- builder.addWarning("function", tokenOrValue.value.name);
758
+ builder.addWarning("value", `${tokenOrValue.value.name}()`);
692
759
  return;
693
760
  }
694
761
  }
@@ -707,7 +774,7 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
707
774
  builder.addWarning("value", value);
708
775
  return;
709
776
  }
710
- if (value === "inherit") {
777
+ if (value === "inherit" || value === "initial") {
711
778
  builder.addWarning("value", value);
712
779
  return;
713
780
  } else if (value === "currentcolor") {
@@ -717,6 +784,8 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
717
784
  return true;
718
785
  } else if (value === "false") {
719
786
  return false;
787
+ } else if (value === "infinity") {
788
+ return Number.MAX_SAFE_INTEGER;
720
789
  } else {
721
790
  return value;
722
791
  }
@@ -734,11 +803,17 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
734
803
  return parseDimension(tokenOrValue.value, builder);
735
804
  case "comma":
736
805
  return CommaSeparator;
806
+ case "delim":
807
+ {
808
+ if (tokenOrValue.value.value === "/") {
809
+ return tokenOrValue.value.value;
810
+ }
811
+ return;
812
+ }
737
813
  case "at-keyword":
738
814
  case "hash":
739
815
  case "id-hash":
740
816
  case "unquoted-url":
741
- case "delim":
742
817
  case "white-space":
743
818
  case "comment":
744
819
  case "colon":
@@ -791,22 +866,32 @@ export function parseLength(length, builder) {
791
866
  inlineRem = 14
792
867
  } = builder.getOptions();
793
868
  if (typeof length === "number") {
794
- return length;
869
+ return round(length);
795
870
  }
796
871
  if ("unit" in length) {
797
872
  switch (length.unit) {
798
873
  case "px":
799
- return length.value;
874
+ {
875
+ if (length.value === Infinity) {
876
+ return 9999;
877
+ } else if (length.value === -Infinity) {
878
+ return -9999;
879
+ } else {
880
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
881
+ const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
882
+ return round(value);
883
+ }
884
+ }
800
885
  case "rem":
801
886
  if (typeof inlineRem === "number") {
802
887
  return length.value * inlineRem;
803
888
  } else {
804
- return [{}, "rem", length.value];
889
+ return [{}, "rem", round(length.value)];
805
890
  }
806
891
  case "vw":
807
892
  case "vh":
808
893
  case "em":
809
- return [{}, length.unit, length.value, 1];
894
+ return [{}, length.unit, round(length.value), 1];
810
895
  case "in":
811
896
  case "cm":
812
897
  case "mm":
@@ -891,7 +976,7 @@ export function parseAngle(angle, builder) {
891
976
  case "rad":
892
977
  return `${angle.value}${angle.type}`;
893
978
  default:
894
- builder.addWarning("value", angle.value);
979
+ builder.addWarning("value", `${angle.value} ${angle.type}`);
895
980
  return undefined;
896
981
  }
897
982
  }
@@ -949,7 +1034,7 @@ export function parseSize(size, builder, options, {
949
1034
  }
950
1035
  return;
951
1036
  }
952
- export function parseColorOrAuto({
1037
+ export function parseColorOrAutoDeclaration({
953
1038
  value
954
1039
  }, builder) {
955
1040
  if (value.type === "auto") {
@@ -1339,19 +1424,28 @@ export function parseBorderStyle(value, builder) {
1339
1424
  builder.addWarning("value", value.top);
1340
1425
  return undefined;
1341
1426
  }
1342
- export function parseBorderBlockColor({
1343
- value
1344
- }, builder) {
1345
- builder.addDescriptor("border-top-color", parseColor(value.start, builder));
1346
- builder.addDescriptor("border-bottom-color", parseColor(value.end, builder));
1347
- return;
1348
- }
1349
1427
  export function parseBorderBlockWidth(declaration, builder) {
1350
- builder.addDescriptor("border-top-width", parseBorderSideWidth(declaration.value.start, builder));
1351
- builder.addDescriptor("border-bottom-width", parseBorderSideWidth(declaration.value.end, builder));
1428
+ const start = parseBorderSideWidth(declaration.value.start, builder);
1429
+ const end = parseBorderSideWidth(declaration.value.end, builder);
1430
+ if (start === end) {
1431
+ builder.addDescriptor("border-block-width", start);
1432
+ } else {
1433
+ builder.addDescriptor("border-block-start-width", start);
1434
+ builder.addDescriptor("border-block-end-width", end);
1435
+ }
1436
+ }
1437
+ function parseBorderBlockStyle(declaration, builder) {
1438
+ const start = parseBorderStyle(declaration.value.start, builder);
1439
+ const end = parseBorderStyle(declaration.value.end, builder);
1440
+ if (start == end) {
1441
+ builder.addDescriptor("border-block-style", start);
1442
+ } else {
1443
+ builder.addDescriptor("border-block-start-style", start);
1444
+ builder.addDescriptor("border-block-end-style", end);
1445
+ }
1352
1446
  }
1353
1447
  export function parseBorderSideWidthDeclaration(declaration, builder) {
1354
- return parseBorderSideWidth(declaration.value, builder);
1448
+ builder.addDescriptor(declaration.property, parseBorderSideWidth(declaration.value, builder));
1355
1449
  }
1356
1450
  export function parseBorderSideWidth(value, builder) {
1357
1451
  if (value.type === "length") {
@@ -1396,7 +1490,7 @@ export function parseLineHeight(value, builder) {
1396
1490
  return parseLength(length, builder);
1397
1491
  case "percentage":
1398
1492
  case "calc":
1399
- builder.addWarning("value", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1493
+ builder.addWarning("style", "line-height", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1400
1494
  return;
1401
1495
  default:
1402
1496
  {
@@ -1583,7 +1677,11 @@ export function parseDimension({
1583
1677
  }, builder) {
1584
1678
  switch (unit) {
1585
1679
  case "px":
1586
- return value;
1680
+ if (value === Infinity) {
1681
+ return 9999;
1682
+ } else {
1683
+ return value;
1684
+ }
1587
1685
  case "%":
1588
1686
  return `${value}%`;
1589
1687
  case "rnh":
@@ -1608,17 +1706,21 @@ export function parseUserSelect({
1608
1706
  }
1609
1707
  }
1610
1708
  export function parseSVGPaint({
1611
- value
1709
+ value,
1710
+ property
1612
1711
  }, builder) {
1712
+ let parsedValue;
1613
1713
  if (value.type === "none") {
1614
- return "transparent";
1714
+ parsedValue = "transparent";
1615
1715
  } else if (value.type === "color") {
1616
- return parseColor(value.value, builder);
1716
+ parsedValue = parseColor(value.value, builder);
1717
+ } else {
1718
+ return;
1617
1719
  }
1618
- return;
1720
+ builder.addDescriptor(property, parsedValue);
1619
1721
  }
1620
1722
  export function round(number) {
1621
- return Math.round((number + Number.EPSILON) * 100) / 100;
1723
+ return Math.round((number + Number.EPSILON) * 10000) / 10000;
1622
1724
  }
1623
1725
  export function parseDimensionPercentageFor_LengthValue(value, builder) {
1624
1726
  if (value.type === "calc") {
@@ -1629,7 +1731,7 @@ export function parseDimensionPercentageFor_LengthValue(value, builder) {
1629
1731
  return parseLength(value.value, builder);
1630
1732
  }
1631
1733
  }
1632
- const allowAuto = new Set(["pointer-events"]);
1734
+ const allowAutoProperties = new Set(["pointer-events"]);
1633
1735
  export function parseEnv(value, builder) {
1634
1736
  switch (value.name.type) {
1635
1737
  case "ua":
@@ -1638,7 +1740,7 @@ export function parseEnv(value, builder) {
1638
1740
  case "safe-area-inset-right":
1639
1741
  case "safe-area-inset-bottom":
1640
1742
  case "safe-area-inset-left":
1641
- return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
1743
+ return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
1642
1744
  case "viewport-segment-width":
1643
1745
  case "viewport-segment-height":
1644
1746
  case "viewport-segment-top":
@@ -1652,17 +1754,16 @@ export function parseEnv(value, builder) {
1652
1754
  }
1653
1755
  return;
1654
1756
  }
1655
- export function parseCalcFn(name, tokens, builder) {
1656
- const args = parseCalcArguments(tokens, builder);
1757
+ export function parseCalcFn(name, tokens, builder, property) {
1758
+ const args = parseCalcArguments(tokens, builder, property);
1657
1759
  if (args) {
1658
1760
  return [{}, name, args];
1659
1761
  }
1660
1762
  return;
1661
1763
  }
1662
- export function parseCalcArguments([...args], builder) {
1764
+ export function parseCalcArguments([...args], builder, property) {
1663
1765
  const parsed = [];
1664
- let mode;
1665
- for (const [currentIndex, arg] of args.entries()) {
1766
+ for (const arg of args) {
1666
1767
  switch (arg.type) {
1667
1768
  case "env":
1668
1769
  {
@@ -1673,7 +1774,7 @@ export function parseCalcArguments([...args], builder) {
1673
1774
  case "function":
1674
1775
  case "unresolved-color":
1675
1776
  {
1676
- const value = parseUnparsed(arg, builder);
1777
+ const value = parseUnparsed(arg, builder, property);
1677
1778
  if (value === undefined) {
1678
1779
  return undefined;
1679
1780
  }
@@ -1708,44 +1809,21 @@ export function parseCalcArguments([...args], builder) {
1708
1809
  }
1709
1810
  break;
1710
1811
  case "percentage":
1711
- mode ??= "percentage";
1712
- if (mode !== "percentage") return;
1713
- parsed.push(`${arg.value.value * 100}%`);
1812
+ parsed.push(`${round(arg.value.value * 100)}%`);
1714
1813
  break;
1715
1814
  case "number":
1716
1815
  {
1717
- mode ??= "number";
1718
- if (mode !== "number") return;
1719
- parsed.push(arg.value.value);
1816
+ parsed.push(round(arg.value.value));
1720
1817
  break;
1721
1818
  }
1722
1819
  case "parenthesis-block":
1723
1820
  {
1724
- /**
1725
- * If we have a parenthesis block, we just treat it as a nested calc function
1726
- * Because there could be multiple parenthesis blocks, this is recursive
1727
- */
1728
- let closeParenthesisIndex = -1;
1729
- for (let index = args.length - 1; index > 0; index--) {
1730
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1731
- const value = args[index];
1732
- if (value.type === "token" && value.value.type === "close-parenthesis") {
1733
- closeParenthesisIndex = index;
1734
- break;
1735
- }
1736
- }
1737
- if (closeParenthesisIndex === -1) {
1738
- return;
1739
- }
1740
- const innerCalcArgs = args
1741
- // Extract the inner calcArgs including the parenthesis. This mutates args
1742
- .splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
1743
- // Then drop the surrounding parenthesis
1744
- .slice(1, -1);
1745
- parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
1821
+ parsed.push("(");
1746
1822
  break;
1747
1823
  }
1748
1824
  case "close-parenthesis":
1825
+ parsed.push(")");
1826
+ break;
1749
1827
  case "string":
1750
1828
  case "function":
1751
1829
  case "ident":
@@ -1783,20 +1861,20 @@ export function parseTranslateProp(value, prop, builder) {
1783
1861
  }
1784
1862
  return parseLength(value[prop], builder);
1785
1863
  }
1786
- export function parseUnresolvedColor(color, builder) {
1864
+ export function parseUnresolvedColor(color, builder, property, allowAuto) {
1787
1865
  switch (color.type) {
1788
1866
  case "rgb":
1789
- return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
1867
+ return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
1790
1868
  case "hsl":
1791
- return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
1869
+ return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
1792
1870
  case "light-dark":
1793
1871
  {
1794
1872
  const extraRule = builder.extendRule({
1795
1873
  m: [["=", "prefers-color-scheme", "dark"]]
1796
1874
  });
1797
- builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
1875
+ builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
1798
1876
  builder.addExtraRule(extraRule);
1799
- return reduceParseUnparsed(color.light, builder);
1877
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
1800
1878
  }
1801
1879
  default:
1802
1880
  color;
@@ -1858,7 +1936,7 @@ export function addTransitionValue(declaration, builder) {
1858
1936
  }
1859
1937
  case "transition-property":
1860
1938
  {
1861
- builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers || v === "all" || v === "none").map(v => toRNProperty(v)));
1939
+ builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers && !["visibility"].includes(v) || v === "all" || v === "none").map(v => toRNProperty(v)));
1862
1940
  return;
1863
1941
  }
1864
1942
  case "transition-duration":
@@ -1955,7 +2033,7 @@ function parseGradient(gradient, builder) {
1955
2033
  switch (gradient.type) {
1956
2034
  case "linear":
1957
2035
  {
1958
- return [{}, "@linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2036
+ return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
1959
2037
  }
1960
2038
  }
1961
2039
  return;
@@ -1990,6 +2068,27 @@ function parseGradientItem(item, builder) {
1990
2068
  return parseLength(item.value, builder);
1991
2069
  }
1992
2070
  }
2071
+ function parseObjectFit(declaration, builder) {
2072
+ builder.addMapping({
2073
+ "object-fit": "contentFit"
2074
+ });
2075
+ builder.addDescriptor("object-fit", parseUnparsed(declaration.value, builder, "object-fit"));
2076
+ }
2077
+ function parseObjectPosition(declaration, builder) {
2078
+ builder.addMapping({
2079
+ "object-position": "contentPosition"
2080
+ });
2081
+ builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
2082
+ }
2083
+ function parseVisibility(declaration, builder) {
2084
+ if (declaration.value === "visible") {
2085
+ builder.addDescriptor("opacity", 1);
2086
+ } else if (declaration.value === "hidden") {
2087
+ builder.addDescriptor("opacity", 0);
2088
+ } else {
2089
+ builder.addWarning("value", declaration.value);
2090
+ }
2091
+ }
1993
2092
  function parseFilter(declaration, builder) {
1994
2093
  if (declaration.value.type === "none") {
1995
2094
  return "unset";
@@ -2012,6 +2111,7 @@ function parseFilter(declaration, builder) {
2012
2111
  [value.type]: parseAngle(value.value, builder)
2013
2112
  };
2014
2113
  case "drop-shadow":
2114
+ return [{}, toRNProperty(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
2015
2115
  case "url":
2016
2116
  return;
2017
2117
  }