react-native-css 3.0.0-nightly.26b272f → 3.0.0-nightly.46bc0ab

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) 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/declarations.js +103 -80
  4. package/dist/commonjs/compiler/declarations.js.map +1 -1
  5. package/dist/commonjs/compiler/keyframes.js +1 -1
  6. package/dist/commonjs/compiler/keyframes.js.map +1 -1
  7. package/dist/commonjs/compiler/stylesheet.js +14 -8
  8. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  9. package/dist/commonjs/components/ActivityIndicator.js +22 -0
  10. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  11. package/dist/commonjs/components/Button.js +22 -0
  12. package/dist/commonjs/components/Button.js.map +1 -0
  13. package/dist/commonjs/components/FlatList.js +19 -0
  14. package/dist/commonjs/components/FlatList.js.map +1 -0
  15. package/dist/commonjs/components/Image.js +17 -0
  16. package/dist/commonjs/components/Image.js.map +1 -0
  17. package/dist/commonjs/components/TextInput.js +17 -0
  18. package/dist/commonjs/components/TextInput.js.map +1 -0
  19. package/dist/commonjs/components/index.js +40 -0
  20. package/dist/commonjs/components/index.js.map +1 -1
  21. package/dist/commonjs/jest/index.js +21 -14
  22. package/dist/commonjs/jest/index.js.map +1 -1
  23. package/dist/commonjs/runtime/native/conditions/media-query.js +2 -0
  24. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
  25. package/dist/commonjs/runtime/native/injection.js +19 -18
  26. package/dist/commonjs/runtime/native/injection.js.map +1 -1
  27. package/dist/commonjs/runtime/native/react/rules.js +13 -8
  28. package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
  29. package/dist/commonjs/runtime/native/react/useNativeCss.js +2 -2
  30. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
  31. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  32. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  33. package/dist/commonjs/runtime/native/styles/calculate-props.js +5 -2
  34. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
  35. package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
  36. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
  37. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  38. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  39. package/dist/commonjs/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  40. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  41. package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
  42. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  43. package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
  44. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  45. package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
  46. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  47. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +83 -0
  48. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  49. package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
  50. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
  51. package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  52. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  53. package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +5 -36
  54. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  55. package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
  56. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  57. package/dist/commonjs/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +3 -3
  58. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  59. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  60. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  61. package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
  62. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  63. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  64. package/dist/commonjs/runtime/native/styles/units.js +1 -1
  65. package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
  66. package/dist/commonjs/runtime/utils/objects.js +14 -6
  67. package/dist/commonjs/runtime/utils/objects.js.map +1 -1
  68. package/dist/module/compiler/atRules.js +15 -2
  69. package/dist/module/compiler/atRules.js.map +1 -1
  70. package/dist/module/compiler/compiler.types.js.map +1 -1
  71. package/dist/module/compiler/declarations.js +100 -77
  72. package/dist/module/compiler/declarations.js.map +1 -1
  73. package/dist/module/compiler/keyframes.js +1 -1
  74. package/dist/module/compiler/keyframes.js.map +1 -1
  75. package/dist/module/compiler/stylesheet.js +14 -8
  76. package/dist/module/compiler/stylesheet.js.map +1 -1
  77. package/dist/module/components/ActivityIndicator.js +17 -0
  78. package/dist/module/components/ActivityIndicator.js.map +1 -0
  79. package/dist/module/components/Button.js +17 -0
  80. package/dist/module/components/Button.js.map +1 -0
  81. package/dist/module/components/FlatList.js +14 -0
  82. package/dist/module/components/FlatList.js.map +1 -0
  83. package/dist/module/components/Image.js +12 -0
  84. package/dist/module/components/Image.js.map +1 -0
  85. package/dist/module/components/TextInput.js +12 -0
  86. package/dist/module/components/TextInput.js.map +1 -0
  87. package/dist/module/components/index.js +5 -0
  88. package/dist/module/components/index.js.map +1 -1
  89. package/dist/module/jest/index.js +20 -14
  90. package/dist/module/jest/index.js.map +1 -1
  91. package/dist/module/runtime/native/conditions/media-query.js +2 -0
  92. package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
  93. package/dist/module/runtime/native/injection.js +19 -18
  94. package/dist/module/runtime/native/injection.js.map +1 -1
  95. package/dist/module/runtime/native/react/rules.js +13 -8
  96. package/dist/module/runtime/native/react/rules.js.map +1 -1
  97. package/dist/module/runtime/native/react/useNativeCss.js +1 -1
  98. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
  99. package/dist/module/runtime/native/reanimated.js +13 -0
  100. package/dist/module/runtime/native/reanimated.js.map +1 -0
  101. package/dist/module/runtime/native/styles/calculate-props.js +6 -3
  102. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
  103. package/dist/module/runtime/native/styles/defaults.js +1 -1
  104. package/dist/module/runtime/native/styles/defaults.js.map +1 -1
  105. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  106. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  107. package/dist/module/runtime/native/styles/{calc.js → functions/calc.js} +1 -1
  108. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  109. package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
  110. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  111. package/dist/module/runtime/native/styles/functions/index.js +8 -0
  112. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  113. package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
  114. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  115. package/dist/module/runtime/native/styles/functions/transform-functions.js +76 -0
  116. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  117. package/dist/module/runtime/native/styles/resolve.js +20 -44
  118. package/dist/module/runtime/native/styles/resolve.js.map +1 -1
  119. package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
  120. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  121. package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
  122. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  123. package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
  124. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  125. package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +2 -2
  126. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  127. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  128. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  129. package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
  130. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  131. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  132. package/dist/module/runtime/native/styles/units.js +1 -1
  133. package/dist/module/runtime/native/styles/units.js.map +1 -1
  134. package/dist/module/runtime/utils/objects.js +14 -6
  135. package/dist/module/runtime/utils/objects.js.map +1 -1
  136. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  137. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +1 -3
  138. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  139. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +9 -9
  140. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  141. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  142. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  143. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  144. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  145. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  146. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  147. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  148. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  149. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  150. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  151. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  152. package/dist/typescript/commonjs/src/components/index.d.ts +5 -0
  153. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
  154. package/dist/typescript/commonjs/src/jest/index.d.ts +11 -1
  155. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  156. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -1
  157. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
  158. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
  159. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  160. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  161. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  162. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
  164. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  165. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  166. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  167. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  168. package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  169. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  170. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
  171. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  172. package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  173. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  174. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  175. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  176. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
  177. package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  178. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  179. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  180. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  182. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  184. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  186. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  188. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  190. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
  192. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  193. package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -3
  194. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  195. package/dist/typescript/module/src/compiler/declarations.d.ts +9 -9
  196. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  197. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  198. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  199. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  200. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  201. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  202. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  203. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  204. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  205. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  206. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  207. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  208. package/dist/typescript/module/src/components/index.d.ts +5 -0
  209. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  210. package/dist/typescript/module/src/jest/index.d.ts +11 -1
  211. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  212. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -1
  213. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
  214. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
  215. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
  216. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  217. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  218. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
  219. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
  220. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  221. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  222. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  223. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  224. package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
  225. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  226. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
  227. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  228. package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
  229. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  230. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  231. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  232. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
  233. package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
  234. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  235. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  236. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  237. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  238. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  239. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  240. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  241. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  242. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  243. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  244. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  245. package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
  246. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  247. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
  248. package/package.json +1 -1
  249. package/src/compiler/atRules.ts +16 -2
  250. package/src/compiler/compiler.types.ts +1 -3
  251. package/src/compiler/declarations.ts +182 -95
  252. package/src/compiler/keyframes.ts +1 -1
  253. package/src/compiler/stylesheet.ts +17 -7
  254. package/src/components/ActivityIndicator.tsx +27 -0
  255. package/src/components/Button.tsx +22 -0
  256. package/src/components/FlatList.tsx +21 -0
  257. package/src/components/Image.tsx +17 -0
  258. package/src/components/TextInput.tsx +17 -0
  259. package/src/components/index.tsx +5 -0
  260. package/src/jest/index.ts +22 -13
  261. package/src/runtime/native/conditions/media-query.ts +2 -0
  262. package/src/runtime/native/injection.ts +31 -30
  263. package/src/runtime/native/react/rules.ts +14 -5
  264. package/src/runtime/native/react/useNativeCss.ts +1 -1
  265. package/src/runtime/native/reanimated.ts +22 -0
  266. package/src/runtime/native/styles/calculate-props.ts +4 -3
  267. package/src/runtime/native/styles/defaults.ts +1 -0
  268. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  269. package/src/runtime/native/styles/{calc.ts → functions/calc.ts} +2 -2
  270. package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
  271. package/src/runtime/native/styles/functions/index.ts +5 -0
  272. package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
  273. package/src/runtime/native/styles/functions/transform-functions.ts +51 -0
  274. package/src/runtime/native/styles/resolve.ts +20 -63
  275. package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
  276. package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -63
  277. package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
  278. package/src/runtime/native/styles/{box-shadow.ts → shorthands/box-shadow.ts} +3 -3
  279. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  280. package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
  281. package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +1 -1
  282. package/src/runtime/native/styles/units.ts +1 -1
  283. package/src/runtime/utils/objects.ts +14 -4
  284. package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
  285. package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
  286. package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
  287. package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
  288. package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
  289. package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
  290. package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
  291. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
  292. package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
  293. package/dist/module/runtime/native/styles/animation.js.map +0 -1
  294. package/dist/module/runtime/native/styles/border.js.map +0 -1
  295. package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
  296. package/dist/module/runtime/native/styles/calc.js.map +0 -1
  297. package/dist/module/runtime/native/styles/filters.js.map +0 -1
  298. package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
  299. package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
  300. package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
  301. package/dist/module/runtime/native/styles/transform.js.map +0 -1
  302. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
  303. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
  304. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
  305. package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
  306. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
  307. package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  308. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
  309. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
  310. package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
  311. package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  312. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  313. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
  314. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  315. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
  316. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
  317. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
  318. package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
  319. package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
  320. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
  321. package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
  322. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
  323. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
  324. package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
  325. package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
  326. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
  327. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
  328. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
  329. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
  330. /package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
  331. /package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
@@ -0,0 +1,27 @@
1
+ import {
2
+ ActivityIndicator as RNActivityIndicator,
3
+ type ActivityIndicatorProps,
4
+ } from "react-native";
5
+
6
+ import {
7
+ useCssElement,
8
+ type StyledConfiguration,
9
+ type StyledProps,
10
+ } from "../runtime";
11
+
12
+ const mapping = {
13
+ className: {
14
+ target: "style",
15
+ nativeStyleMapping: {
16
+ color: "color",
17
+ },
18
+ },
19
+ } satisfies StyledConfiguration<typeof RNActivityIndicator>;
20
+
21
+ export function ActivityIndicator(
22
+ props: StyledProps<ActivityIndicatorProps, typeof mapping>,
23
+ ) {
24
+ return useCssElement(RNActivityIndicator, props, mapping);
25
+ }
26
+
27
+ export default ActivityIndicator;
@@ -0,0 +1,22 @@
1
+ import { Button as RNButton, type ButtonProps } from "react-native";
2
+
3
+ import {
4
+ useCssElement,
5
+ type StyledConfiguration,
6
+ type StyledProps,
7
+ } from "../runtime";
8
+
9
+ const mapping = {
10
+ className: {
11
+ target: false,
12
+ nativeStyleMapping: {
13
+ color: "color",
14
+ },
15
+ },
16
+ } satisfies StyledConfiguration<typeof RNButton>;
17
+
18
+ export function Button(props: StyledProps<ButtonProps, typeof mapping>) {
19
+ return useCssElement(RNButton, props, mapping);
20
+ }
21
+
22
+ export default Button;
@@ -0,0 +1,21 @@
1
+ import { FlatList as RNFlatList, type FlatListProps } from "react-native";
2
+
3
+ import {
4
+ useCssElement,
5
+ type StyledConfiguration,
6
+ type StyledProps,
7
+ } from "../runtime";
8
+
9
+ const mapping = {
10
+ columnWrapperStyle: "columnWrapperStyle",
11
+ listFooterComponentClassName: "ListFooterComponentStyle",
12
+ listHeaderComponentClassName: "ListHeaderComponentStyle",
13
+ } satisfies StyledConfiguration<typeof RNFlatList>;
14
+
15
+ export function FlatList<ItemT>(
16
+ props: StyledProps<FlatListProps<ItemT>, typeof mapping>,
17
+ ) {
18
+ return useCssElement(RNFlatList, props, mapping);
19
+ }
20
+
21
+ export default FlatList;
@@ -0,0 +1,17 @@
1
+ import { Image as RNImage, type ImageProps } from "react-native";
2
+
3
+ import {
4
+ useCssElement,
5
+ type StyledConfiguration,
6
+ type StyledProps,
7
+ } from "../runtime";
8
+
9
+ const mapping = {
10
+ className: "style",
11
+ } satisfies StyledConfiguration<typeof RNImage>;
12
+
13
+ export function Image(props: StyledProps<ImageProps, typeof mapping>) {
14
+ return useCssElement(RNImage, props, mapping);
15
+ }
16
+
17
+ export default Image;
@@ -0,0 +1,17 @@
1
+ import { TextInput as RNTextInput, type TextInputProps } from "react-native";
2
+
3
+ import {
4
+ useCssElement,
5
+ type StyledConfiguration,
6
+ type StyledProps,
7
+ } from "../runtime";
8
+
9
+ const mapping = {
10
+ className: "style",
11
+ } satisfies StyledConfiguration<typeof RNTextInput>;
12
+
13
+ export function TextInput(props: StyledProps<TextInputProps, typeof mapping>) {
14
+ return useCssElement(RNTextInput, props, mapping);
15
+ }
16
+
17
+ export default TextInput;
@@ -1,4 +1,9 @@
1
1
  export * from "react-native";
2
2
 
3
+ export { ActivityIndicator } from "./ActivityIndicator";
4
+ export { Button } from "./Button";
5
+ export { FlatList } from "./FlatList";
6
+ export { Image } from "./Image";
3
7
  export { Text } from "./Text";
8
+ export { TextInput } from "./TextInput";
4
9
  export { View } from "./View";
package/src/jest/index.ts CHANGED
@@ -32,21 +32,11 @@ const debugDefault = Boolean(
32
32
 
33
33
  export function registerCSS(
34
34
  css: string,
35
- {
36
- debug = debugDefault,
37
- ...options
38
- }: CompilerOptions & { debug?: boolean } = {},
35
+ options: CompilerOptions & { debug?: boolean } = {},
39
36
  ) {
40
- const logger = debug
41
- ? (text: string) => {
42
- // Just log the rules
43
- if (text.startsWith("[")) {
44
- console.log(`Rules:\n---\n${text}`);
45
- }
46
- }
47
- : undefined;
37
+ const { debug = debugDefault } = options;
38
+ const compiled = compileWithAutoDebug(css, options);
48
39
 
49
- const compiled = compile(css, { ...options, logger });
50
40
  if (debug) {
51
41
  console.log(
52
42
  `Compiled:\n---\n${inspect(
@@ -63,3 +53,22 @@ export function registerCSS(
63
53
 
64
54
  return compiled;
65
55
  }
56
+
57
+ export function compileWithAutoDebug(
58
+ css: string,
59
+ {
60
+ debug = debugDefault,
61
+ ...options
62
+ }: CompilerOptions & { debug?: boolean } = {},
63
+ ) {
64
+ const logger = debug
65
+ ? (text: string) => {
66
+ // Just log the rules
67
+ if (text.startsWith("[")) {
68
+ console.log(`Rules:\n---\n${text}`);
69
+ }
70
+ }
71
+ : undefined;
72
+
73
+ return compile(css, { ...options, logger });
74
+ }
@@ -38,6 +38,8 @@ function testComparison(mediaQuery: MediaCondition, get: Getter): Boolean {
38
38
  const right = mediaQuery[2];
39
39
 
40
40
  switch (mediaQuery[1]) {
41
+ case "hover":
42
+ return true;
41
43
  case "platform":
42
44
  return right === "native" || right === Platform.OS;
43
45
  case "prefers-color-scheme": {
@@ -3,6 +3,7 @@ import type {
3
3
  ReactNativeCssStyleSheet,
4
4
  StyleRuleSet,
5
5
  } from "../../compiler";
6
+ import { DEFAULT_CONTAINER_NAME } from "./conditions/container-query";
6
7
  import {
7
8
  family,
8
9
  observable,
@@ -27,6 +28,36 @@ StyleCollection.keyframes = family<string, Observable<Animation_V2[1]>>(() => {
27
28
  StyleCollection.inject = function (options: ReactNativeCssStyleSheet) {
28
29
  observableBatch.current = new Set();
29
30
 
31
+ StyleCollection.styles("will-change-variable").set([
32
+ {
33
+ s: [0],
34
+ v: [],
35
+ },
36
+ ]);
37
+
38
+ StyleCollection.styles("will-change-container").set([
39
+ {
40
+ s: [0],
41
+ c: [DEFAULT_CONTAINER_NAME],
42
+ },
43
+ ]);
44
+
45
+ StyleCollection.styles("will-change-animation").set([
46
+ {
47
+ s: [0],
48
+ a: true,
49
+ },
50
+ ]);
51
+
52
+ StyleCollection.styles("will-change-pressable").set([
53
+ {
54
+ s: [0],
55
+ p: {
56
+ h: 1,
57
+ },
58
+ },
59
+ ]);
60
+
30
61
  if (options.s) {
31
62
  for (const style of options.s) {
32
63
  StyleCollection.styles(style[0]).set(style[1]);
@@ -99,33 +130,3 @@ function isDeepEqual(a: unknown, b: unknown): boolean {
99
130
 
100
131
  return true;
101
132
  }
102
-
103
- StyleCollection.styles("will-change-variable").set([
104
- {
105
- s: [0],
106
- v: [],
107
- },
108
- ]);
109
-
110
- StyleCollection.styles("will-change-container").set([
111
- {
112
- s: [0],
113
- c: [],
114
- },
115
- ]);
116
-
117
- StyleCollection.styles("will-change-animation").set([
118
- {
119
- s: [0],
120
- a: true,
121
- },
122
- ]);
123
-
124
- StyleCollection.styles("will-change-pressable").set([
125
- {
126
- s: [0],
127
- p: {
128
- h: 1,
129
- },
130
- },
131
- ]);
@@ -12,6 +12,7 @@ import {
12
12
  hoverFamily,
13
13
  VAR_SYMBOL,
14
14
  weakFamily,
15
+ type ContainerContextValue,
15
16
  type VariableContextValue,
16
17
  } from "../reactivity";
17
18
  import { stylesFamily } from "../styles";
@@ -36,8 +37,8 @@ export function updateRules(
36
37
 
37
38
  let usesVariables = false;
38
39
 
39
- let variables = state.variables ? inheritedVariables : undefined;
40
- let containers = state.containers ? inheritedContainers : undefined;
40
+ let variables: VariableContextValue | undefined;
41
+ let containers: ContainerContextValue | undefined;
41
42
  const inlineVariables = new Set<InlineVariable>();
42
43
 
43
44
  let animated = false;
@@ -101,6 +102,16 @@ export function updateRules(
101
102
 
102
103
  usesVariables ||= Boolean(rule.dv);
103
104
 
105
+ // We do this even if the rule doesn't match so we can maintain a consistent render tree
106
+ // We we need to inject React context
107
+ if (rule.v) {
108
+ variables ??= inheritedVariables;
109
+ }
110
+
111
+ if (rule.c) {
112
+ containers ??= inheritedContainers;
113
+ }
114
+
104
115
  if (
105
116
  !testRule(
106
117
  rule,
@@ -114,11 +125,8 @@ export function updateRules(
114
125
  }
115
126
 
116
127
  if (rule.v) {
117
- // We're going to set a value, so we need to create a new object
118
128
  if (variables === inheritedVariables) {
119
129
  variables = { ...inheritedVariables };
120
- } else {
121
- variables ??= { ...inheritedVariables };
122
130
  }
123
131
 
124
132
  for (const v of rule.v) {
@@ -199,6 +207,7 @@ export function updateRules(
199
207
  guards,
200
208
  animated,
201
209
  pressable,
210
+ variables,
202
211
  };
203
212
  }
204
213
 
@@ -20,8 +20,8 @@ import {
20
20
  type Getter,
21
21
  type VariableContextValue,
22
22
  } from "../reactivity";
23
+ import { animatedComponentFamily } from "../reanimated";
23
24
  import { getStyledProps, stylesFamily } from "../styles";
24
- import { animatedComponentFamily } from "../styles/animation";
25
25
  import { updateRules } from "./rules";
26
26
 
27
27
  export type Config = {
@@ -0,0 +1,22 @@
1
+ import type { ComponentType } from "react";
2
+
3
+ import { weakFamily } from "./reactivity";
4
+
5
+ export const animatedComponentFamily = weakFamily(
6
+ (component: ComponentType) => {
7
+ if (
8
+ "displayName" in component &&
9
+ component.displayName?.startsWith("Animated.")
10
+ ) {
11
+ return component;
12
+ }
13
+
14
+ const createAnimatedComponent =
15
+ // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-member-access
16
+ require("react-native-reanimated").createAnimatedComponent as (
17
+ component: ComponentType,
18
+ ) => ComponentType;
19
+
20
+ return createAnimatedComponent(component);
21
+ },
22
+ );
@@ -4,7 +4,7 @@ import type {
4
4
  StyleDeclaration,
5
5
  StyleRule,
6
6
  } from "../../../compiler";
7
- import { applyValue, Specificity as S } from "../../utils";
7
+ import { applyValue, getDeepPath, Specificity as S } from "../../utils";
8
8
  import type { RenderGuard } from "../conditions/guards";
9
9
  import {
10
10
  VAR_SYMBOL,
@@ -147,9 +147,10 @@ export function applyDeclarations(
147
147
  * mutate the props object and not create a new one
148
148
  */
149
149
  const originalValue = value;
150
- value = {};
150
+ // This needs to be a object with the [prop] so we can discover in transform arrays
151
+ value = { [prop]: true };
151
152
  delayedStyles.push(() => {
152
- if (target[prop] === value) {
153
+ if (getDeepPath(target, prop) === value) {
153
154
  delete target[prop];
154
155
  value = resolveValue(originalValue, get, {
155
156
  inlineVariables,
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable */
2
2
  export const transformKeys = new Set([
3
+ "translate",
3
4
  "translateX",
4
5
  "translateY",
5
6
  "scale",
@@ -0,0 +1,44 @@
1
+ import type { StyleFunctionResolver } from "../resolve";
2
+
3
+ /* eslint-disable @typescript-eslint/no-require-imports */
4
+ const advancedTimingFunctions: Record<
5
+ string,
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ () => (...args: any[]) => unknown
8
+ > = {
9
+ cubicBezier: () => {
10
+ return (
11
+ require("react-native-reanimated") as typeof import("react-native-reanimated")
12
+ ).cubicBezier;
13
+ },
14
+ steps: () => {
15
+ return (
16
+ require("react-native-reanimated") as typeof import("react-native-reanimated")
17
+ ).steps;
18
+ },
19
+ };
20
+
21
+ const timingFunctionResolver: StyleFunctionResolver = (resolveValue, value) => {
22
+ const name = value[1];
23
+ const resolver = advancedTimingFunctions[name];
24
+
25
+ if (!resolver) {
26
+ return;
27
+ }
28
+
29
+ const args = resolveValue(value[2]);
30
+
31
+ if (!Array.isArray(args)) {
32
+ return;
33
+ }
34
+
35
+ const fn = resolver();
36
+
37
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
38
+ const result = fn(...args);
39
+
40
+ return result;
41
+ };
42
+
43
+ export const cubicBezier = timingFunctionResolver;
44
+ export const steps = timingFunctionResolver;
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
- import { isStyleDescriptorArray } from "../../utils";
3
- import type { StyleFunctionResolver } from "./resolve";
2
+ import { isStyleDescriptorArray } from "../../../utils";
3
+ import type { StyleFunctionResolver } from "../resolve";
4
4
 
5
5
  const calcPrecedence: Record<string, number> = {
6
6
  "+": 1,
@@ -1,6 +1,6 @@
1
- import { isStyleDescriptorArray } from "../../utils";
2
- import type { StyleFunctionResolver } from "./resolve";
3
- import { shorthandHandler } from "./shorthand";
1
+ import { isStyleDescriptorArray } from "../../../utils";
2
+ import type { StyleFunctionResolver } from "../resolve";
3
+ import { shorthandHandler } from "../shorthands/_handler";
4
4
 
5
5
  export const blur: StyleFunctionResolver = (resolveValue, value) => {
6
6
  const args = resolveValue(value[2]);
@@ -0,0 +1,5 @@
1
+ export * from "./animation-timing";
2
+ export * from "./calc";
3
+ export * from "./filters";
4
+ export * from "./platform-functions";
5
+ export * from "./transform-functions";
@@ -1,6 +1,6 @@
1
1
  import { PixelRatio, PlatformColor, StyleSheet } from "react-native";
2
2
 
3
- import type { StyleFunctionResolver } from "./resolve";
3
+ import type { StyleFunctionResolver } from "../resolve";
4
4
 
5
5
  export const platformColor: StyleFunctionResolver = (resolveValue, value) => {
6
6
  const color: unknown = resolveValue(value[2]);
@@ -25,7 +25,7 @@ export const fontScale: StyleFunctionResolver = () => {
25
25
  return PixelRatio.getFontScale();
26
26
  };
27
27
 
28
- export const pixelSizeForLayoutSize: StyleFunctionResolver = (
28
+ export const getPixelSizeForLayoutSize: StyleFunctionResolver = (
29
29
  resolveValue,
30
30
  value,
31
31
  ) => {
@@ -0,0 +1,51 @@
1
+ import type { StyleFunctionResolver } from "../resolve";
2
+
3
+ export const scale: StyleFunctionResolver = (resolveValue, descriptor) => {
4
+ const values = resolveValue(descriptor[2]);
5
+
6
+ if (Array.isArray(values)) {
7
+ const [x, y] = values as [string | number][];
8
+
9
+ if (values.length === 2 && x === y) {
10
+ return { scale: x };
11
+ } else if (values.length === 2) {
12
+ return [{ scaleX: x }, { scaleY: y }];
13
+ } else {
14
+ return { scale: x };
15
+ }
16
+ } else {
17
+ return { scale: values };
18
+ }
19
+ };
20
+
21
+ export const rotate: StyleFunctionResolver = (resolveValue, descriptor) => {
22
+ const values = resolveValue(descriptor[2]);
23
+
24
+ if (Array.isArray(values)) {
25
+ const [x, y, z] = values as [string | number][];
26
+
27
+ if (values.length === 3 && x === y && x === z) {
28
+ return { rotate: values };
29
+ } else if (values.length === 3) {
30
+ return [{ rotateX: x }, { rotateY: y }, { rotateZ: z }];
31
+ } else if (values.length === 2) {
32
+ return [{ rotateX: x }, { rotateY: y }];
33
+ } else {
34
+ return { rotate: values };
35
+ }
36
+ } else {
37
+ return { rotate: values };
38
+ }
39
+ };
40
+
41
+ export const translate: StyleFunctionResolver = (resolveValue, descriptor) => {
42
+ const values = resolveValue(descriptor[2]);
43
+
44
+ if (Array.isArray(values)) {
45
+ const [x, y] = values as [string | number][];
46
+
47
+ return [{ translateX: x }, { translateY: y }];
48
+ } else {
49
+ return { translateX: values };
50
+ }
51
+ };
@@ -7,34 +7,10 @@ import type {
7
7
  } from "../../../compiler";
8
8
  import type { RenderGuard } from "../conditions/guards";
9
9
  import { type Getter, type VariableContextValue } from "../reactivity";
10
- import { animation, timingFunctionResolver } from "./animation";
11
- import { border } from "./border";
12
- import { boxShadow } from "./box-shadow";
13
- import { calc } from "./calc";
14
10
  import type { calculateProps } from "./calculate-props";
15
11
  import { transformKeys } from "./defaults";
16
- import {
17
- blur,
18
- brightness,
19
- contrast,
20
- dropShadow,
21
- grayscale,
22
- hueRotate,
23
- invert,
24
- opacity,
25
- saturate,
26
- sepia,
27
- } from "./filters";
28
- import {
29
- fontScale,
30
- hairlineWidth,
31
- pixelRatio,
32
- pixelSizeForLayoutSize,
33
- platformColor,
34
- roundToNearestPixel,
35
- } from "./platform-functions";
36
- import { textShadow } from "./text-shadow";
37
- import { transform } from "./transform";
12
+ import * as functions from "./functions";
13
+ import * as shorthands from "./shorthands";
38
14
  import { em, rem, vh, vw } from "./units";
39
15
  import { varResolver } from "./variables";
40
16
 
@@ -57,34 +33,12 @@ export type StyleResolver = (
57
33
  options: ResolveValueOptions,
58
34
  ) => unknown;
59
35
 
60
- const functions: Record<string, StyleFunctionResolver> = {
61
- "@animation": animation,
62
- "@border": border,
63
- "@boxShadow": boxShadow,
64
- "@textShadow": textShadow,
65
- "@transform": transform,
66
- "animationName": animation,
67
- "cubic-bezier": timingFunctionResolver,
68
- "steps": timingFunctionResolver,
69
- "hue-rotate": hueRotate,
70
- "drop-shadow": dropShadow,
71
- blur,
72
- brightness,
73
- calc,
74
- contrast,
36
+ const functionResolvers = {
37
+ ...shorthands,
38
+ ...functions,
39
+ animationName: shorthands.animation,
75
40
  em,
76
- fontScale,
77
- grayscale,
78
- hairlineWidth,
79
- invert,
80
- opacity,
81
- pixelRatio,
82
- pixelSizeForLayoutSize,
83
- platformColor,
84
41
  rem,
85
- roundToNearestPixel,
86
- saturate,
87
- sepia,
88
42
  vh,
89
43
  vw,
90
44
  };
@@ -116,10 +70,16 @@ export function resolveValue(
116
70
  case "number":
117
71
  case "boolean":
118
72
  return value;
119
- case "string":
120
- return value.endsWith("px") // Inline vars() might set a value with a px suffix
121
- ? parseInt(value.slice(0, -2), 10)
122
- : value;
73
+ case "string": {
74
+ if (value === "unset") {
75
+ return null;
76
+ } else if (value.endsWith("px")) {
77
+ // Inline vars() might set a value with a px suffix
78
+ return parseInt(value.slice(0, -2), 10);
79
+ } else {
80
+ return value;
81
+ }
82
+ }
123
83
  case "object": {
124
84
  if (!Array.isArray(value)) {
125
85
  return value;
@@ -145,8 +105,8 @@ export function resolveValue(
145
105
 
146
106
  if (name === "var") {
147
107
  return varResolver(simpleResolve, value, get, options);
148
- } else if (name in functions) {
149
- const fn = functions[name];
108
+ } else if (name in functionResolvers) {
109
+ const fn = functionResolvers[name as keyof typeof functionResolvers];
150
110
 
151
111
  if (typeof fn !== "function") {
152
112
  throw new Error(`Unknown function: ${name}`);
@@ -160,11 +120,7 @@ export function resolveValue(
160
120
  ) as StyleDescriptor;
161
121
  } else if (transformKeys.has(name)) {
162
122
  // translate, rotate, scale, etc.
163
- const args = value[2];
164
- return simpleResolve(args, castToArray);
165
- } else if (transformKeys.has(name.slice(1))) {
166
- // @translate, @rotate, @scale, etc.
167
- return { [name.slice(1)]: simpleResolve(value[2], castToArray) };
123
+ return { [name]: simpleResolve(value[2], castToArray) };
168
124
  } else {
169
125
  let args = simpleResolve(value[2], castToArray);
170
126
 
@@ -178,6 +134,7 @@ export function resolveValue(
178
134
  }
179
135
  return arg;
180
136
  })
137
+ .filter((value) => value !== "/")
181
138
  .join(", ");
182
139
 
183
140
  if (name === "radial-gradient") {
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable */
2
- import { setDeepPath } from "../../utils/objects";
3
- import { isStyleDescriptorArray } from "../../utils/style-value";
4
- import { ShortHandSymbol } from "./constants";
5
- import { defaultValues } from "./defaults";
6
- import type { StyleResolver } from "./resolve";
2
+ import { setDeepPath } from "../../../utils/objects";
3
+ import { isStyleDescriptorArray } from "../../../utils/style-value";
4
+ import { ShortHandSymbol } from "../constants";
5
+ import { defaultValues } from "../defaults";
6
+ import type { StyleResolver } from "../resolve";
7
7
 
8
8
  type ShorthandType =
9
9
  | "string"