rnwind 0.0.1 → 0.0.2

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 (330) hide show
  1. package/lib/cjs/core/parser/animation.cjs +427 -0
  2. package/lib/cjs/core/parser/animation.cjs.map +1 -0
  3. package/lib/cjs/core/parser/animation.d.ts +126 -0
  4. package/lib/cjs/core/parser/border-dispatcher.cjs +180 -0
  5. package/lib/cjs/core/parser/border-dispatcher.cjs.map +1 -0
  6. package/lib/cjs/core/parser/border-dispatcher.d.ts +15 -0
  7. package/lib/cjs/core/parser/case-convert.cjs +15 -0
  8. package/lib/cjs/core/parser/case-convert.cjs.map +1 -0
  9. package/lib/cjs/core/parser/case-convert.d.ts +6 -0
  10. package/lib/cjs/core/parser/color-properties-dispatcher.cjs +84 -0
  11. package/lib/cjs/core/parser/color-properties-dispatcher.cjs.map +1 -0
  12. package/lib/cjs/core/parser/color-properties-dispatcher.d.ts +19 -0
  13. package/lib/cjs/core/parser/color.cjs +164 -0
  14. package/lib/cjs/core/parser/color.cjs.map +1 -0
  15. package/lib/cjs/core/parser/color.d.ts +12 -0
  16. package/lib/cjs/core/parser/constants.cjs +21 -0
  17. package/lib/cjs/core/parser/constants.cjs.map +1 -0
  18. package/lib/cjs/core/parser/constants.d.ts +8 -0
  19. package/lib/cjs/core/parser/declaration.cjs +347 -0
  20. package/lib/cjs/core/parser/declaration.cjs.map +1 -0
  21. package/lib/cjs/core/parser/declaration.d.ts +15 -0
  22. package/lib/cjs/core/parser/gradient.cjs +132 -0
  23. package/lib/cjs/core/parser/gradient.cjs.map +1 -0
  24. package/lib/cjs/core/parser/gradient.d.ts +59 -0
  25. package/lib/cjs/core/parser/haptics.cjs +73 -0
  26. package/lib/cjs/core/parser/haptics.cjs.map +1 -0
  27. package/lib/cjs/core/parser/haptics.d.ts +47 -0
  28. package/lib/cjs/core/parser/index.d.ts +8 -0
  29. package/lib/cjs/core/parser/keyframes.cjs +95 -0
  30. package/lib/cjs/core/parser/keyframes.cjs.map +1 -0
  31. package/lib/cjs/core/parser/keyframes.d.ts +26 -0
  32. package/lib/cjs/core/parser/layout-dispatcher.cjs +100 -0
  33. package/lib/cjs/core/parser/layout-dispatcher.cjs.map +1 -0
  34. package/lib/cjs/core/parser/layout-dispatcher.d.ts +14 -0
  35. package/lib/cjs/core/parser/length.cjs +96 -0
  36. package/lib/cjs/core/parser/length.cjs.map +1 -0
  37. package/lib/cjs/core/parser/length.d.ts +48 -0
  38. package/lib/cjs/core/parser/motion-dispatcher.cjs +77 -0
  39. package/lib/cjs/core/parser/motion-dispatcher.cjs.map +1 -0
  40. package/lib/cjs/core/parser/motion-dispatcher.d.ts +11 -0
  41. package/lib/cjs/core/parser/property.cjs +22 -0
  42. package/lib/cjs/core/parser/property.cjs.map +1 -0
  43. package/lib/cjs/core/parser/property.d.ts +8 -0
  44. package/lib/cjs/core/parser/safe-area.cjs +404 -0
  45. package/lib/cjs/core/parser/safe-area.cjs.map +1 -0
  46. package/lib/cjs/core/parser/safe-area.d.ts +39 -0
  47. package/lib/cjs/core/parser/selector.cjs +22 -0
  48. package/lib/cjs/core/parser/selector.cjs.map +1 -0
  49. package/lib/cjs/core/parser/selector.d.ts +11 -0
  50. package/lib/cjs/core/parser/shorthand.cjs +156 -0
  51. package/lib/cjs/core/parser/shorthand.cjs.map +1 -0
  52. package/lib/cjs/core/parser/shorthand.d.ts +61 -0
  53. package/lib/cjs/core/parser/text-truncate.cjs +78 -0
  54. package/lib/cjs/core/parser/text-truncate.cjs.map +1 -0
  55. package/lib/cjs/core/parser/text-truncate.d.ts +44 -0
  56. package/lib/cjs/core/parser/theme-vars.cjs +414 -0
  57. package/lib/cjs/core/parser/theme-vars.cjs.map +1 -0
  58. package/lib/cjs/core/parser/theme-vars.d.ts +61 -0
  59. package/lib/cjs/core/parser/tokens.cjs +304 -0
  60. package/lib/cjs/core/parser/tokens.cjs.map +1 -0
  61. package/lib/cjs/core/parser/tokens.d.ts +45 -0
  62. package/lib/cjs/core/parser/transform.cjs +198 -0
  63. package/lib/cjs/core/parser/transform.cjs.map +1 -0
  64. package/lib/cjs/core/parser/transform.d.ts +36 -0
  65. package/lib/cjs/core/parser/tw-parser.cjs +1567 -0
  66. package/lib/cjs/core/parser/tw-parser.cjs.map +1 -0
  67. package/lib/cjs/core/parser/tw-parser.d.ts +194 -0
  68. package/lib/cjs/core/parser/types.d.ts +37 -0
  69. package/lib/cjs/core/parser/typography-dispatcher.cjs +93 -0
  70. package/lib/cjs/core/parser/typography-dispatcher.cjs.map +1 -0
  71. package/lib/cjs/core/parser/typography-dispatcher.d.ts +11 -0
  72. package/lib/cjs/core/parser/typography.cjs +97 -0
  73. package/lib/cjs/core/parser/typography.cjs.map +1 -0
  74. package/lib/cjs/core/parser/typography.d.ts +43 -0
  75. package/lib/cjs/core/style-builder/build-style.cjs +397 -0
  76. package/lib/cjs/core/style-builder/build-style.cjs.map +1 -0
  77. package/lib/cjs/core/style-builder/build-style.d.ts +54 -0
  78. package/lib/cjs/core/style-builder/index.d.ts +3 -0
  79. package/lib/cjs/core/style-builder/union-builder.cjs +326 -0
  80. package/lib/cjs/core/style-builder/union-builder.cjs.map +1 -0
  81. package/lib/cjs/core/style-builder/union-builder.d.ts +128 -0
  82. package/lib/cjs/core/types.d.ts +14 -0
  83. package/lib/cjs/metro/dts.cjs +127 -0
  84. package/lib/cjs/metro/dts.cjs.map +1 -0
  85. package/lib/cjs/metro/dts.d.ts +16 -0
  86. package/lib/cjs/metro/index.cjs +19 -0
  87. package/lib/cjs/metro/index.cjs.map +1 -0
  88. package/lib/cjs/metro/index.d.ts +9 -0
  89. package/lib/cjs/metro/resolver.cjs +47 -0
  90. package/lib/cjs/metro/resolver.cjs.map +1 -0
  91. package/lib/cjs/metro/resolver.d.ts +22 -0
  92. package/lib/cjs/metro/state.cjs +251 -0
  93. package/lib/cjs/metro/state.cjs.map +1 -0
  94. package/lib/cjs/metro/state.d.ts +72 -0
  95. package/lib/cjs/metro/transform-ast.cjs +1255 -0
  96. package/lib/cjs/metro/transform-ast.cjs.map +1 -0
  97. package/lib/cjs/metro/transform-ast.d.ts +73 -0
  98. package/lib/cjs/metro/transformer.cjs +345 -0
  99. package/lib/cjs/metro/transformer.cjs.map +1 -0
  100. package/lib/cjs/metro/transformer.d.ts +47 -0
  101. package/lib/cjs/metro/warn-unknown-classes.cjs +86 -0
  102. package/lib/cjs/metro/warn-unknown-classes.cjs.map +1 -0
  103. package/lib/cjs/metro/warn-unknown-classes.d.ts +21 -0
  104. package/lib/cjs/metro/with-config.cjs +196 -0
  105. package/lib/cjs/metro/with-config.cjs.map +1 -0
  106. package/lib/cjs/metro/with-config.d.ts +57 -0
  107. package/lib/cjs/runtime/chain-handlers.cjs +37 -0
  108. package/lib/cjs/runtime/chain-handlers.cjs.map +1 -0
  109. package/lib/cjs/runtime/chain-handlers.d.ts +33 -0
  110. package/lib/cjs/runtime/components/rnwind-provider.cjs +98 -0
  111. package/lib/cjs/runtime/components/rnwind-provider.cjs.map +1 -0
  112. package/lib/cjs/runtime/components/rnwind-provider.d.ts +84 -0
  113. package/lib/cjs/runtime/gradient-types.d.ts +58 -0
  114. package/lib/cjs/runtime/haptics.cjs +113 -0
  115. package/lib/cjs/runtime/haptics.cjs.map +1 -0
  116. package/lib/cjs/runtime/haptics.d.ts +48 -0
  117. package/lib/cjs/runtime/hooks/use-css.cjs +21 -0
  118. package/lib/cjs/runtime/hooks/use-css.cjs.map +1 -0
  119. package/lib/cjs/runtime/hooks/use-css.d.ts +11 -0
  120. package/lib/cjs/runtime/hooks/use-interact.cjs +46 -0
  121. package/lib/cjs/runtime/hooks/use-interact.cjs.map +1 -0
  122. package/lib/cjs/runtime/hooks/use-interact.d.ts +42 -0
  123. package/lib/cjs/runtime/hooks/use-scheme.cjs +68 -0
  124. package/lib/cjs/runtime/hooks/use-scheme.cjs.map +1 -0
  125. package/lib/cjs/runtime/hooks/use-scheme.d.ts +34 -0
  126. package/lib/cjs/runtime/index.cjs +45 -0
  127. package/lib/cjs/runtime/index.cjs.map +1 -0
  128. package/lib/cjs/runtime/index.d.ts +27 -0
  129. package/lib/cjs/runtime/interactive-box.cjs +35 -0
  130. package/lib/cjs/runtime/interactive-box.cjs.map +1 -0
  131. package/lib/cjs/runtime/interactive-box.d.ts +40 -0
  132. package/lib/cjs/runtime/lookup-css.cjs +542 -0
  133. package/lib/cjs/runtime/lookup-css.cjs.map +1 -0
  134. package/lib/cjs/runtime/lookup-css.d.ts +164 -0
  135. package/lib/cjs/runtime/types.d.ts +29 -0
  136. package/lib/cjs/testing/index.cjs +367 -0
  137. package/lib/cjs/testing/index.cjs.map +1 -0
  138. package/lib/cjs/testing/index.d.ts +145 -0
  139. package/lib/esm/core/parser/animation.d.ts +126 -0
  140. package/lib/esm/core/parser/animation.mjs +408 -0
  141. package/lib/esm/core/parser/animation.mjs.map +1 -0
  142. package/lib/esm/core/parser/border-dispatcher.d.ts +15 -0
  143. package/lib/esm/core/parser/border-dispatcher.mjs +178 -0
  144. package/lib/esm/core/parser/border-dispatcher.mjs.map +1 -0
  145. package/lib/esm/core/parser/case-convert.d.ts +6 -0
  146. package/lib/esm/core/parser/case-convert.mjs +13 -0
  147. package/lib/esm/core/parser/case-convert.mjs.map +1 -0
  148. package/lib/esm/core/parser/color-properties-dispatcher.d.ts +19 -0
  149. package/lib/esm/core/parser/color-properties-dispatcher.mjs +82 -0
  150. package/lib/esm/core/parser/color-properties-dispatcher.mjs.map +1 -0
  151. package/lib/esm/core/parser/color.d.ts +12 -0
  152. package/lib/esm/core/parser/color.mjs +162 -0
  153. package/lib/esm/core/parser/color.mjs.map +1 -0
  154. package/lib/esm/core/parser/constants.d.ts +8 -0
  155. package/lib/esm/core/parser/constants.mjs +13 -0
  156. package/lib/esm/core/parser/constants.mjs.map +1 -0
  157. package/lib/esm/core/parser/declaration.d.ts +15 -0
  158. package/lib/esm/core/parser/declaration.mjs +345 -0
  159. package/lib/esm/core/parser/declaration.mjs.map +1 -0
  160. package/lib/esm/core/parser/gradient.d.ts +59 -0
  161. package/lib/esm/core/parser/gradient.mjs +130 -0
  162. package/lib/esm/core/parser/gradient.mjs.map +1 -0
  163. package/lib/esm/core/parser/haptics.d.ts +47 -0
  164. package/lib/esm/core/parser/haptics.mjs +71 -0
  165. package/lib/esm/core/parser/haptics.mjs.map +1 -0
  166. package/lib/esm/core/parser/index.d.ts +8 -0
  167. package/lib/esm/core/parser/keyframes.d.ts +26 -0
  168. package/lib/esm/core/parser/keyframes.mjs +91 -0
  169. package/lib/esm/core/parser/keyframes.mjs.map +1 -0
  170. package/lib/esm/core/parser/layout-dispatcher.d.ts +14 -0
  171. package/lib/esm/core/parser/layout-dispatcher.mjs +98 -0
  172. package/lib/esm/core/parser/layout-dispatcher.mjs.map +1 -0
  173. package/lib/esm/core/parser/length.d.ts +48 -0
  174. package/lib/esm/core/parser/length.mjs +90 -0
  175. package/lib/esm/core/parser/length.mjs.map +1 -0
  176. package/lib/esm/core/parser/motion-dispatcher.d.ts +11 -0
  177. package/lib/esm/core/parser/motion-dispatcher.mjs +75 -0
  178. package/lib/esm/core/parser/motion-dispatcher.mjs.map +1 -0
  179. package/lib/esm/core/parser/property.d.ts +8 -0
  180. package/lib/esm/core/parser/property.mjs +20 -0
  181. package/lib/esm/core/parser/property.mjs.map +1 -0
  182. package/lib/esm/core/parser/safe-area.d.ts +39 -0
  183. package/lib/esm/core/parser/safe-area.mjs +402 -0
  184. package/lib/esm/core/parser/safe-area.mjs.map +1 -0
  185. package/lib/esm/core/parser/selector.d.ts +11 -0
  186. package/lib/esm/core/parser/selector.mjs +20 -0
  187. package/lib/esm/core/parser/selector.mjs.map +1 -0
  188. package/lib/esm/core/parser/shorthand.d.ts +61 -0
  189. package/lib/esm/core/parser/shorthand.mjs +148 -0
  190. package/lib/esm/core/parser/shorthand.mjs.map +1 -0
  191. package/lib/esm/core/parser/text-truncate.d.ts +44 -0
  192. package/lib/esm/core/parser/text-truncate.mjs +75 -0
  193. package/lib/esm/core/parser/text-truncate.mjs.map +1 -0
  194. package/lib/esm/core/parser/theme-vars.d.ts +61 -0
  195. package/lib/esm/core/parser/theme-vars.mjs +409 -0
  196. package/lib/esm/core/parser/theme-vars.mjs.map +1 -0
  197. package/lib/esm/core/parser/tokens.d.ts +45 -0
  198. package/lib/esm/core/parser/tokens.mjs +298 -0
  199. package/lib/esm/core/parser/tokens.mjs.map +1 -0
  200. package/lib/esm/core/parser/transform.d.ts +36 -0
  201. package/lib/esm/core/parser/transform.mjs +193 -0
  202. package/lib/esm/core/parser/transform.mjs.map +1 -0
  203. package/lib/esm/core/parser/tw-parser.d.ts +194 -0
  204. package/lib/esm/core/parser/tw-parser.mjs +1565 -0
  205. package/lib/esm/core/parser/tw-parser.mjs.map +1 -0
  206. package/lib/esm/core/parser/types.d.ts +37 -0
  207. package/lib/esm/core/parser/typography-dispatcher.d.ts +11 -0
  208. package/lib/esm/core/parser/typography-dispatcher.mjs +91 -0
  209. package/lib/esm/core/parser/typography-dispatcher.mjs.map +1 -0
  210. package/lib/esm/core/parser/typography.d.ts +43 -0
  211. package/lib/esm/core/parser/typography.mjs +91 -0
  212. package/lib/esm/core/parser/typography.mjs.map +1 -0
  213. package/lib/esm/core/style-builder/build-style.d.ts +54 -0
  214. package/lib/esm/core/style-builder/build-style.mjs +395 -0
  215. package/lib/esm/core/style-builder/build-style.mjs.map +1 -0
  216. package/lib/esm/core/style-builder/index.d.ts +3 -0
  217. package/lib/esm/core/style-builder/union-builder.d.ts +128 -0
  218. package/lib/esm/core/style-builder/union-builder.mjs +324 -0
  219. package/lib/esm/core/style-builder/union-builder.mjs.map +1 -0
  220. package/lib/esm/core/types.d.ts +14 -0
  221. package/lib/esm/metro/dts.d.ts +16 -0
  222. package/lib/esm/metro/dts.mjs +125 -0
  223. package/lib/esm/metro/dts.mjs.map +1 -0
  224. package/lib/esm/metro/index.d.ts +9 -0
  225. package/lib/esm/metro/index.mjs +6 -0
  226. package/lib/esm/metro/index.mjs.map +1 -0
  227. package/lib/esm/metro/resolver.d.ts +22 -0
  228. package/lib/esm/metro/resolver.mjs +43 -0
  229. package/lib/esm/metro/resolver.mjs.map +1 -0
  230. package/lib/esm/metro/state.d.ts +72 -0
  231. package/lib/esm/metro/state.mjs +243 -0
  232. package/lib/esm/metro/state.mjs.map +1 -0
  233. package/lib/esm/metro/transform-ast.d.ts +73 -0
  234. package/lib/esm/metro/transform-ast.mjs +1234 -0
  235. package/lib/esm/metro/transform-ast.mjs.map +1 -0
  236. package/lib/esm/metro/transformer.d.ts +47 -0
  237. package/lib/esm/metro/transformer.mjs +322 -0
  238. package/lib/esm/metro/transformer.mjs.map +1 -0
  239. package/lib/esm/metro/warn-unknown-classes.d.ts +21 -0
  240. package/lib/esm/metro/warn-unknown-classes.mjs +84 -0
  241. package/lib/esm/metro/warn-unknown-classes.mjs.map +1 -0
  242. package/lib/esm/metro/with-config.d.ts +57 -0
  243. package/lib/esm/metro/with-config.mjs +194 -0
  244. package/lib/esm/metro/with-config.mjs.map +1 -0
  245. package/lib/esm/runtime/chain-handlers.d.ts +33 -0
  246. package/lib/esm/runtime/chain-handlers.mjs +34 -0
  247. package/lib/esm/runtime/chain-handlers.mjs.map +1 -0
  248. package/lib/esm/runtime/components/rnwind-provider.d.ts +84 -0
  249. package/lib/esm/runtime/components/rnwind-provider.mjs +94 -0
  250. package/lib/esm/runtime/components/rnwind-provider.mjs.map +1 -0
  251. package/lib/esm/runtime/gradient-types.d.ts +58 -0
  252. package/lib/esm/runtime/haptics.d.ts +48 -0
  253. package/lib/esm/runtime/haptics.mjs +110 -0
  254. package/lib/esm/runtime/haptics.mjs.map +1 -0
  255. package/lib/esm/runtime/hooks/use-css.d.ts +11 -0
  256. package/lib/esm/runtime/hooks/use-css.mjs +19 -0
  257. package/lib/esm/runtime/hooks/use-css.mjs.map +1 -0
  258. package/lib/esm/runtime/hooks/use-interact.d.ts +42 -0
  259. package/lib/esm/runtime/hooks/use-interact.mjs +44 -0
  260. package/lib/esm/runtime/hooks/use-interact.mjs.map +1 -0
  261. package/lib/esm/runtime/hooks/use-scheme.d.ts +34 -0
  262. package/lib/esm/runtime/hooks/use-scheme.mjs +63 -0
  263. package/lib/esm/runtime/hooks/use-scheme.mjs.map +1 -0
  264. package/lib/esm/runtime/index.d.ts +27 -0
  265. package/lib/esm/runtime/index.mjs +18 -0
  266. package/lib/esm/runtime/index.mjs.map +1 -0
  267. package/lib/esm/runtime/interactive-box.d.ts +40 -0
  268. package/lib/esm/runtime/interactive-box.mjs +33 -0
  269. package/lib/esm/runtime/interactive-box.mjs.map +1 -0
  270. package/lib/esm/runtime/lookup-css.d.ts +164 -0
  271. package/lib/esm/runtime/lookup-css.mjs +531 -0
  272. package/lib/esm/runtime/lookup-css.mjs.map +1 -0
  273. package/lib/esm/runtime/types.d.ts +29 -0
  274. package/lib/esm/testing/index.d.ts +145 -0
  275. package/lib/esm/testing/index.mjs +344 -0
  276. package/lib/esm/testing/index.mjs.map +1 -0
  277. package/package.json +79 -13
  278. package/preset.css +1171 -0
  279. package/src/core/parser/animation.ts +404 -0
  280. package/src/core/parser/border-dispatcher.ts +176 -0
  281. package/src/core/parser/case-convert.ts +10 -0
  282. package/src/core/parser/color-properties-dispatcher.ts +78 -0
  283. package/src/core/parser/color.ts +157 -0
  284. package/src/core/parser/constants.ts +11 -0
  285. package/src/core/parser/declaration.ts +340 -0
  286. package/src/core/parser/gradient.ts +148 -0
  287. package/src/core/parser/haptics.ts +88 -0
  288. package/src/core/parser/index.ts +8 -0
  289. package/src/core/parser/keyframes.ts +84 -0
  290. package/src/core/parser/layout-dispatcher.ts +92 -0
  291. package/src/core/parser/length.ts +100 -0
  292. package/src/core/parser/motion-dispatcher.ts +89 -0
  293. package/src/core/parser/property.ts +15 -0
  294. package/src/core/parser/safe-area.ts +404 -0
  295. package/src/core/parser/selector.ts +17 -0
  296. package/src/core/parser/shorthand.ts +152 -0
  297. package/src/core/parser/text-truncate.ts +79 -0
  298. package/src/core/parser/theme-vars.ts +412 -0
  299. package/src/core/parser/tokens.ts +286 -0
  300. package/src/core/parser/transform.ts +195 -0
  301. package/src/core/parser/tw-parser.ts +1709 -0
  302. package/src/core/parser/types.ts +45 -0
  303. package/src/core/parser/typography-dispatcher.ts +83 -0
  304. package/src/core/parser/typography.ts +83 -0
  305. package/src/core/style-builder/build-style.ts +442 -0
  306. package/src/core/style-builder/index.ts +3 -0
  307. package/src/core/style-builder/union-builder.ts +328 -0
  308. package/src/core/types.ts +15 -0
  309. package/src/metro/dts.ts +128 -0
  310. package/src/metro/index.ts +9 -0
  311. package/src/metro/resolver.ts +42 -0
  312. package/src/metro/state.ts +257 -0
  313. package/src/metro/transform-ast.ts +1498 -0
  314. package/src/metro/transformer.ts +347 -0
  315. package/src/metro/warn-unknown-classes.ts +79 -0
  316. package/src/metro/with-config.ts +229 -0
  317. package/src/runtime/chain-handlers.ts +47 -0
  318. package/src/runtime/components/rnwind-provider.tsx +144 -0
  319. package/src/runtime/gradient-types.ts +60 -0
  320. package/src/runtime/haptics.ts +120 -0
  321. package/src/runtime/hooks/use-css.ts +16 -0
  322. package/src/runtime/hooks/use-interact.ts +65 -0
  323. package/src/runtime/hooks/use-scheme.ts +63 -0
  324. package/src/runtime/index.ts +54 -0
  325. package/src/runtime/interactive-box.tsx +57 -0
  326. package/src/runtime/lookup-css.ts +628 -0
  327. package/src/runtime/types.ts +32 -0
  328. package/src/testing/index.ts +507 -0
  329. package/src/types/tailwindcss-node.d.ts +33 -0
  330. package/src/index.ts +0 -1
@@ -0,0 +1,427 @@
1
+ 'use strict';
2
+
3
+ var caseConvert = require('./case-convert.cjs');
4
+
5
+ /**
6
+ * Convert one PropertyId ident into the camelCase RN style key
7
+ * Reanimated v4's CSS engine matches against. Tailwind emits CSS names
8
+ * in kebab-case (`background-color`); RN stores `backgroundColor` in
9
+ * the actual style object, and Reanimated only fires a transition when
10
+ * the watched key matches the changed key — so kebab-case here would
11
+ * silently no-op every multi-word color/border transition.
12
+ *
13
+ * Special cases:
14
+ * - `'all'` passes through unchanged.
15
+ * - `--tw-*` Tailwind internal custom props are dropped — they have
16
+ * no RN equivalent and Reanimated can't watch them.
17
+ * - Other `--user-defined` custom props pass through verbatim.
18
+ * @param property Typed property identifier.
19
+ * @returns RN-style key, or null when the property has no RN equivalent.
20
+ */
21
+ function propertyIdToString(property) {
22
+ // Custom properties surface in two shapes: either as `{property:
23
+ // 'custom', value: {name: '--x'}}` or — when lightningcss recognises
24
+ // the leading `--` directly in propertyId — as `{property: '--x'}`.
25
+ // Handle both, drop Tailwind internals, keep user customs verbatim.
26
+ if (property.property === 'custom' && 'value' in property) {
27
+ const { value } = property;
28
+ const customName = value && typeof value === 'object' && 'name' in value && typeof value.name === 'string' ? value.name : null;
29
+ if (!customName)
30
+ return null;
31
+ return customName.startsWith('--tw-') ? null : customName;
32
+ }
33
+ if (typeof property.property === 'string' && property.property.startsWith('--')) {
34
+ return property.property.startsWith('--tw-') ? null : property.property;
35
+ }
36
+ if (property.property === 'all')
37
+ return 'all';
38
+ return caseConvert.kebabToCamel(property.property);
39
+ }
40
+ /**
41
+ * Collapse a single-element list into its scalar, otherwise return the
42
+ * list unchanged. Reanimated accepts both forms; the scalar is the
43
+ * common case.
44
+ * @param values Values to collapse.
45
+ * @returns A scalar when the list has one element, otherwise the list.
46
+ */
47
+ function singleOrArray(values) {
48
+ if (values.length === 1)
49
+ return values[0];
50
+ return values;
51
+ }
52
+ /**
53
+ * Render a number without trailing noise (strips IEEE drift beyond 4
54
+ * decimals, then removes trailing zeros).
55
+ * @param value Number to format.
56
+ * @returns Compact string form.
57
+ */
58
+ function formatNumber(value) {
59
+ const rounded = Math.round(value * 10_000) / 10_000;
60
+ return String(rounded);
61
+ }
62
+ /**
63
+ * Reanimated v4's CSS engine doesn't accept `cubic-bezier(...)` as a
64
+ * string — only the predefined keywords `linear`, `ease`, `ease-in`,
65
+ * `ease-out`, `ease-in-out`, `step-start`, `step-end`. Tailwind's
66
+ * `transition-colors` / `ease-in-out` / etc. emit the CSS-standard
67
+ * Material curves as cubic-bezier; we snap those to the closest
68
+ * predefined keyword by matching the well-known control-point shapes,
69
+ * falling back to `ease-in-out` (the most common Tailwind default).
70
+ *
71
+ * Direct matches:
72
+ * - `cubic-bezier(0.25, 0.1, 0.25, 1)` → `ease` (CSS spec default)
73
+ * - `cubic-bezier(0.4, 0, 1, 1)` → `ease-in`
74
+ * - `cubic-bezier(0, 0, 0.2, 1)` → `ease-out`
75
+ * - `cubic-bezier(0.4, 0, 0.2, 1)` → `ease-in-out` (Material standard)
76
+ * - linear shape (`x1=y1=0, x2=y2=1`) → `linear`
77
+ *
78
+ * Anything else: classify by control-point shape — front-loaded curves
79
+ * → `ease-in`, back-loaded → `ease-out`, both → `ease-in-out`.
80
+ * @param x1 First control-point x (0–1).
81
+ * @param y1 First control-point y (0–1).
82
+ * @param x2 Second control-point x (0–1).
83
+ * @param y2 Second control-point y (0–1).
84
+ * @returns Closest matching CSS easing keyword.
85
+ */
86
+ function snapCubicBezierToKeyword(x1, y1, x2, y2) {
87
+ if (matchesBezier(x1, y1, x2, y2, 0, 0, 1, 1))
88
+ return 'linear';
89
+ if (matchesBezier(x1, y1, x2, y2, 0.25, 0.1, 0.25, 1))
90
+ return 'ease';
91
+ if (matchesBezier(x1, y1, x2, y2, 0.4, 0, 1, 1))
92
+ return 'ease-in';
93
+ if (matchesBezier(x1, y1, x2, y2, 0, 0, 0.2, 1))
94
+ return 'ease-out';
95
+ if (matchesBezier(x1, y1, x2, y2, 0.4, 0, 0.2, 1))
96
+ return 'ease-in-out';
97
+ // Heuristic for unknown bezier shapes:
98
+ // - x1 ≈ 0 → starts straight (decelerates) → ease-out
99
+ // - x2 ≈ 1 → ends straight (accelerates) → ease-in
100
+ // - both small, both medium → ease-in-out
101
+ const startsFlat = x1 < 0.1;
102
+ const endsFlat = x2 > 0.9;
103
+ if (startsFlat && !endsFlat)
104
+ return 'ease-out';
105
+ if (!startsFlat && endsFlat)
106
+ return 'ease-in';
107
+ return 'ease-in-out';
108
+ }
109
+ /**
110
+ * Approximate equality of two cubic-bezier control-point sets — IEEE
111
+ * float noise from lightningcss / culori means literal `===` rarely
112
+ * holds, so we tolerate a tiny epsilon.
113
+ * @param ax1 Actual first x.
114
+ * @param ay1 Actual first y.
115
+ * @param ax2 Actual second x.
116
+ * @param ay2 Actual second y.
117
+ * @param tx1 Target first x.
118
+ * @param ty1 Target first y.
119
+ * @param tx2 Target second x.
120
+ * @param ty2 Target second y.
121
+ * @returns Whether the two beziers are component-wise within 0.01 of each other.
122
+ */
123
+ function matchesBezier(ax1, ay1, ax2, ay2, tx1, ty1, tx2, ty2) {
124
+ const tolerance = 0.01;
125
+ return (Math.abs(ax1 - tx1) < tolerance &&
126
+ Math.abs(ay1 - ty1) < tolerance &&
127
+ Math.abs(ax2 - tx2) < tolerance &&
128
+ Math.abs(ay2 - ty2) < tolerance);
129
+ }
130
+ /**
131
+ * Serialize a lightningcss `EasingFunction` into a CSS string Reanimated
132
+ * v4's CSS engine understands. Reanimated accepts the same timing-function
133
+ * strings as CSS transitions/animations, so we emit the canonical CSS
134
+ * form.
135
+ * @param fn Typed easing function.
136
+ * @returns CSS string, e.g. `'linear'` / `'ease-in-out'` / `'cubic-bezier(0.4, 0, 0.2, 1)'`.
137
+ */
138
+ function easingFunctionToString(fn) {
139
+ switch (fn.type) {
140
+ case 'linear': {
141
+ return 'linear';
142
+ }
143
+ case 'ease':
144
+ case 'ease-in':
145
+ case 'ease-out':
146
+ case 'ease-in-out': {
147
+ return fn.type;
148
+ }
149
+ case 'cubic-bezier': {
150
+ return snapCubicBezierToKeyword(fn.x1, fn.y1, fn.x2, fn.y2);
151
+ }
152
+ case 'steps': {
153
+ const pos = fn.position?.type ?? 'end';
154
+ return `steps(${fn.count}, ${pos})`;
155
+ }
156
+ default: {
157
+ return 'ease';
158
+ }
159
+ }
160
+ }
161
+ /**
162
+ * Format a `Time` value into a CSS string (`150ms`, `1s`). Reanimated's
163
+ * CSS engine accepts either `ms` or `s`; we pick `ms` unless the value
164
+ * is a whole-second multiple for readability.
165
+ * @param time Typed time value.
166
+ * @returns CSS time string.
167
+ */
168
+ function timeToString(time) {
169
+ if (time.type === 'milliseconds')
170
+ return `${formatNumber(time.value)}ms`;
171
+ return `${formatNumber(time.value)}s`;
172
+ }
173
+ /**
174
+ * Convert a single `animation-name` value to a string. Tailwind's
175
+ * `animate-none` produces `{ type: 'none' }` which we drop.
176
+ * @param name Typed animation name.
177
+ * @returns Keyframe identifier, or null when `none`.
178
+ */
179
+ function animationNameToString(name) {
180
+ if (name.type === 'none')
181
+ return null;
182
+ if (name.type === 'ident')
183
+ return name.value;
184
+ if (name.type === 'string')
185
+ return name.value;
186
+ return null;
187
+ }
188
+ /**
189
+ * Convert a single `animation-iteration-count` value to the CSS shape
190
+ * Reanimated wants: either a finite integer or the `'infinite'` string.
191
+ * @param count Typed iteration count.
192
+ * @returns Number or `'infinite'`.
193
+ */
194
+ function iterationCountToValue(count) {
195
+ if (count.type === 'infinite')
196
+ return 'infinite';
197
+ return count.value;
198
+ }
199
+ /**
200
+ * Decompose the `animation: <name> <duration> <timing> <iteration> …`
201
+ * shorthand into the per-property RN entries Reanimated consumes. A single
202
+ * `animation` declaration can name multiple animations — we emit the first
203
+ * one (Tailwind's `animate-*` utilities always emit exactly one).
204
+ * @param animations Parsed animation list from lightningcss.
205
+ * @returns RN entries, empty when the shorthand names `none`.
206
+ */
207
+ function animationShorthandToEntries(animations) {
208
+ const [first] = animations;
209
+ if (!first)
210
+ return [];
211
+ const name = animationNameToString(first.name);
212
+ if (!name)
213
+ return [];
214
+ const entries = [['animationName', name]];
215
+ if (first.duration)
216
+ entries.push(['animationDuration', timeToString(first.duration)]);
217
+ if (first.timingFunction)
218
+ entries.push(['animationTimingFunction', easingFunctionToString(first.timingFunction)]);
219
+ if (first.iterationCount)
220
+ entries.push(['animationIterationCount', iterationCountToValue(first.iterationCount)]);
221
+ if (first.direction && first.direction !== 'normal')
222
+ entries.push(['animationDirection', first.direction]);
223
+ if (first.fillMode && first.fillMode !== 'none')
224
+ entries.push(['animationFillMode', first.fillMode]);
225
+ if (first.delay && first.delay.value !== 0)
226
+ entries.push(['animationDelay', timeToString(first.delay)]);
227
+ if (first.playState && first.playState !== 'running')
228
+ entries.push(['animationPlayState', first.playState]);
229
+ return entries;
230
+ }
231
+ /**
232
+ * Emit `animationName` for a standalone `animation-name: spin` declaration.
233
+ * @param names Typed `animation-name` list.
234
+ * @returns Single-entry `animationName` or empty when `none`.
235
+ */
236
+ function animationNameEntries(names) {
237
+ const [first] = names;
238
+ if (!first)
239
+ return [];
240
+ const name = animationNameToString(first);
241
+ if (!name)
242
+ return [];
243
+ return [['animationName', name]];
244
+ }
245
+ /**
246
+ * Emit `animationDuration` for a standalone `animation-duration` declaration.
247
+ * @param durations Typed duration list.
248
+ * @returns Single-entry list.
249
+ */
250
+ function animationDurationEntries(durations) {
251
+ const [first] = durations;
252
+ if (!first)
253
+ return [];
254
+ return [['animationDuration', timeToString(first)]];
255
+ }
256
+ /**
257
+ * Emit `animationTimingFunction` for a standalone `animation-timing-function`.
258
+ * @param fns Typed timing-function list.
259
+ * @returns Single-entry list.
260
+ */
261
+ function animationTimingFunctionEntries(fns) {
262
+ const [first] = fns;
263
+ if (!first)
264
+ return [];
265
+ return [['animationTimingFunction', easingFunctionToString(first)]];
266
+ }
267
+ /**
268
+ * Emit `animationIterationCount` for a standalone declaration.
269
+ * @param counts Typed iteration-count list.
270
+ * @returns Single-entry list.
271
+ */
272
+ function animationIterationCountEntries(counts) {
273
+ const [first] = counts;
274
+ if (!first)
275
+ return [];
276
+ return [['animationIterationCount', iterationCountToValue(first)]];
277
+ }
278
+ /**
279
+ * Emit `animationDelay` for a standalone declaration.
280
+ * @param delays Typed delay list.
281
+ * @returns Single-entry list.
282
+ */
283
+ function animationDelayEntries(delays) {
284
+ const [first] = delays;
285
+ if (!first)
286
+ return [];
287
+ return [['animationDelay', timeToString(first)]];
288
+ }
289
+ /**
290
+ * Emit `animationDirection` for a standalone declaration.
291
+ * @param directions Typed direction list.
292
+ * @returns Single-entry list.
293
+ */
294
+ function animationDirectionEntries(directions) {
295
+ const [first] = directions;
296
+ if (!first)
297
+ return [];
298
+ return [['animationDirection', first]];
299
+ }
300
+ /**
301
+ * Emit `animationFillMode` for a standalone declaration.
302
+ * @param modes Typed fill-mode list.
303
+ * @returns Single-entry list.
304
+ */
305
+ function animationFillModeEntries(modes) {
306
+ const [first] = modes;
307
+ if (!first)
308
+ return [];
309
+ return [['animationFillMode', first]];
310
+ }
311
+ /**
312
+ * Emit `animationPlayState` for a standalone declaration.
313
+ * @param states Typed play-state list.
314
+ * @returns Single-entry list.
315
+ */
316
+ function animationPlayStateEntries(states) {
317
+ const [first] = states;
318
+ if (!first)
319
+ return [];
320
+ return [['animationPlayState', first]];
321
+ }
322
+ /**
323
+ * Convert the `transition-property` list into an RN-consumable form.
324
+ * Reanimated accepts either a string (`'all'`, `'opacity'`) or an array
325
+ * of property names. We emit the array shape even for singletons so the
326
+ * runtime can handle it uniformly.
327
+ * @param properties Typed transition-property list.
328
+ * @returns Single-entry list with `transitionProperty`.
329
+ */
330
+ function transitionPropertyEntries(properties) {
331
+ const names = properties.map((p) => propertyIdToString(p)).filter((name) => name !== null);
332
+ if (names.length === 0)
333
+ return [];
334
+ if (names.length === 1)
335
+ return [['transitionProperty', names[0]]];
336
+ return [['transitionProperty', names]];
337
+ }
338
+ /**
339
+ * Decompose the `transition: <prop> <duration> <timing> <delay>` shorthand
340
+ * into the per-property RN entries Reanimated consumes. A declaration can
341
+ * name multiple transitions; we emit one entry per slot, collapsing
342
+ * identical slots into a scalar.
343
+ * @param transitions Parsed transition list from lightningcss.
344
+ * @returns RN entries — zero or more.
345
+ */
346
+ function transitionShorthandToEntries(transitions) {
347
+ if (transitions.length === 0)
348
+ return [];
349
+ const properties = [];
350
+ const durations = [];
351
+ const timings = [];
352
+ const delays = [];
353
+ for (const t of transitions) {
354
+ const name = propertyIdToString(t.property);
355
+ if (name)
356
+ properties.push(name);
357
+ if (t.duration)
358
+ durations.push(timeToString(t.duration));
359
+ if (t.timingFunction)
360
+ timings.push(easingFunctionToString(t.timingFunction));
361
+ if (t.delay)
362
+ delays.push(timeToString(t.delay));
363
+ }
364
+ const entries = [];
365
+ if (properties.length > 0)
366
+ entries.push(['transitionProperty', singleOrArray(properties)]);
367
+ if (durations.length > 0)
368
+ entries.push(['transitionDuration', singleOrArray(durations)]);
369
+ if (timings.length > 0)
370
+ entries.push(['transitionTimingFunction', singleOrArray(timings)]);
371
+ if (delays.some((d) => d !== '0s'))
372
+ entries.push(['transitionDelay', singleOrArray(delays)]);
373
+ return entries;
374
+ }
375
+ /**
376
+ * Emit `transitionDuration` for a standalone declaration.
377
+ * @param durations Typed duration list.
378
+ * @returns Single-entry list.
379
+ */
380
+ function transitionDurationEntries(durations) {
381
+ if (durations.length === 0)
382
+ return [];
383
+ const strings = durations.map((d) => timeToString(d));
384
+ return [['transitionDuration', singleOrArray(strings)]];
385
+ }
386
+ /**
387
+ * Emit `transitionTimingFunction` for a standalone declaration.
388
+ * @param fns Typed timing-function list.
389
+ * @returns Single-entry list.
390
+ */
391
+ function transitionTimingFunctionEntries(fns) {
392
+ if (fns.length === 0)
393
+ return [];
394
+ const strings = fns.map((f) => easingFunctionToString(f));
395
+ return [['transitionTimingFunction', singleOrArray(strings)]];
396
+ }
397
+ /**
398
+ * Emit `transitionDelay` for a standalone declaration.
399
+ * @param delays Typed delay list.
400
+ * @returns Single-entry list.
401
+ */
402
+ function transitionDelayEntries(delays) {
403
+ if (delays.length === 0)
404
+ return [];
405
+ const strings = delays.map((d) => timeToString(d));
406
+ return [['transitionDelay', singleOrArray(strings)]];
407
+ }
408
+
409
+ exports.animationDelayEntries = animationDelayEntries;
410
+ exports.animationDirectionEntries = animationDirectionEntries;
411
+ exports.animationDurationEntries = animationDurationEntries;
412
+ exports.animationFillModeEntries = animationFillModeEntries;
413
+ exports.animationIterationCountEntries = animationIterationCountEntries;
414
+ exports.animationNameEntries = animationNameEntries;
415
+ exports.animationNameToString = animationNameToString;
416
+ exports.animationPlayStateEntries = animationPlayStateEntries;
417
+ exports.animationShorthandToEntries = animationShorthandToEntries;
418
+ exports.animationTimingFunctionEntries = animationTimingFunctionEntries;
419
+ exports.easingFunctionToString = easingFunctionToString;
420
+ exports.iterationCountToValue = iterationCountToValue;
421
+ exports.timeToString = timeToString;
422
+ exports.transitionDelayEntries = transitionDelayEntries;
423
+ exports.transitionDurationEntries = transitionDurationEntries;
424
+ exports.transitionPropertyEntries = transitionPropertyEntries;
425
+ exports.transitionShorthandToEntries = transitionShorthandToEntries;
426
+ exports.transitionTimingFunctionEntries = transitionTimingFunctionEntries;
427
+ //# sourceMappingURL=animation.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.cjs","sources":["../../../../../src/core/parser/animation.ts"],"sourcesContent":["import type {\n Animation,\n AnimationDirection,\n AnimationFillMode,\n AnimationIterationCount,\n AnimationName,\n AnimationPlayState,\n EasingFunction,\n PropertyId,\n Time,\n Transition,\n} from 'lightningcss'\nimport { kebabToCamel } from './case-convert'\nimport type { RNEntry } from './types'\n\n/**\n * Convert one PropertyId ident into the camelCase RN style key\n * Reanimated v4's CSS engine matches against. Tailwind emits CSS names\n * in kebab-case (`background-color`); RN stores `backgroundColor` in\n * the actual style object, and Reanimated only fires a transition when\n * the watched key matches the changed key — so kebab-case here would\n * silently no-op every multi-word color/border transition.\n *\n * Special cases:\n * - `'all'` passes through unchanged.\n * - `--tw-*` Tailwind internal custom props are dropped — they have\n * no RN equivalent and Reanimated can't watch them.\n * - Other `--user-defined` custom props pass through verbatim.\n * @param property Typed property identifier.\n * @returns RN-style key, or null when the property has no RN equivalent.\n */\nfunction propertyIdToString(property: PropertyId): string | null {\n // Custom properties surface in two shapes: either as `{property:\n // 'custom', value: {name: '--x'}}` or — when lightningcss recognises\n // the leading `--` directly in propertyId — as `{property: '--x'}`.\n // Handle both, drop Tailwind internals, keep user customs verbatim.\n if (property.property === 'custom' && 'value' in property) {\n const { value } = property\n const customName = value && typeof value === 'object' && 'name' in value && typeof value.name === 'string' ? value.name : null\n if (!customName) return null\n return customName.startsWith('--tw-') ? null : customName\n }\n if (typeof property.property === 'string' && property.property.startsWith('--')) {\n return property.property.startsWith('--tw-') ? null : property.property\n }\n if (property.property === 'all') return 'all'\n return kebabToCamel(property.property)\n}\n\n/**\n * Collapse a single-element list into its scalar, otherwise return the\n * list unchanged. Reanimated accepts both forms; the scalar is the\n * common case.\n * @param values Values to collapse.\n * @returns A scalar when the list has one element, otherwise the list.\n */\nfunction singleOrArray<T>(values: readonly T[]): T | readonly T[] {\n if (values.length === 1) return values[0]!\n return values\n}\n\n/**\n * Render a number without trailing noise (strips IEEE drift beyond 4\n * decimals, then removes trailing zeros).\n * @param value Number to format.\n * @returns Compact string form.\n */\nfunction formatNumber(value: number): string {\n const rounded = Math.round(value * 10_000) / 10_000\n return String(rounded)\n}\n\n/**\n * Reanimated v4's CSS engine doesn't accept `cubic-bezier(...)` as a\n * string — only the predefined keywords `linear`, `ease`, `ease-in`,\n * `ease-out`, `ease-in-out`, `step-start`, `step-end`. Tailwind's\n * `transition-colors` / `ease-in-out` / etc. emit the CSS-standard\n * Material curves as cubic-bezier; we snap those to the closest\n * predefined keyword by matching the well-known control-point shapes,\n * falling back to `ease-in-out` (the most common Tailwind default).\n *\n * Direct matches:\n * - `cubic-bezier(0.25, 0.1, 0.25, 1)` → `ease` (CSS spec default)\n * - `cubic-bezier(0.4, 0, 1, 1)` → `ease-in`\n * - `cubic-bezier(0, 0, 0.2, 1)` → `ease-out`\n * - `cubic-bezier(0.4, 0, 0.2, 1)` → `ease-in-out` (Material standard)\n * - linear shape (`x1=y1=0, x2=y2=1`) → `linear`\n *\n * Anything else: classify by control-point shape — front-loaded curves\n * → `ease-in`, back-loaded → `ease-out`, both → `ease-in-out`.\n * @param x1 First control-point x (0–1).\n * @param y1 First control-point y (0–1).\n * @param x2 Second control-point x (0–1).\n * @param y2 Second control-point y (0–1).\n * @returns Closest matching CSS easing keyword.\n */\nfunction snapCubicBezierToKeyword(x1: number, y1: number, x2: number, y2: number): string {\n if (matchesBezier(x1, y1, x2, y2, 0, 0, 1, 1)) return 'linear'\n if (matchesBezier(x1, y1, x2, y2, 0.25, 0.1, 0.25, 1)) return 'ease'\n if (matchesBezier(x1, y1, x2, y2, 0.4, 0, 1, 1)) return 'ease-in'\n if (matchesBezier(x1, y1, x2, y2, 0, 0, 0.2, 1)) return 'ease-out'\n if (matchesBezier(x1, y1, x2, y2, 0.4, 0, 0.2, 1)) return 'ease-in-out'\n // Heuristic for unknown bezier shapes:\n // - x1 ≈ 0 → starts straight (decelerates) → ease-out\n // - x2 ≈ 1 → ends straight (accelerates) → ease-in\n // - both small, both medium → ease-in-out\n const startsFlat = x1 < 0.1\n const endsFlat = x2 > 0.9\n if (startsFlat && !endsFlat) return 'ease-out'\n if (!startsFlat && endsFlat) return 'ease-in'\n return 'ease-in-out'\n}\n\n/**\n * Approximate equality of two cubic-bezier control-point sets — IEEE\n * float noise from lightningcss / culori means literal `===` rarely\n * holds, so we tolerate a tiny epsilon.\n * @param ax1 Actual first x.\n * @param ay1 Actual first y.\n * @param ax2 Actual second x.\n * @param ay2 Actual second y.\n * @param tx1 Target first x.\n * @param ty1 Target first y.\n * @param tx2 Target second x.\n * @param ty2 Target second y.\n * @returns Whether the two beziers are component-wise within 0.01 of each other.\n */\nfunction matchesBezier(\n ax1: number,\n ay1: number,\n ax2: number,\n ay2: number,\n tx1: number,\n ty1: number,\n tx2: number,\n ty2: number,\n): boolean {\n const tolerance = 0.01\n return (\n Math.abs(ax1 - tx1) < tolerance &&\n Math.abs(ay1 - ty1) < tolerance &&\n Math.abs(ax2 - tx2) < tolerance &&\n Math.abs(ay2 - ty2) < tolerance\n )\n}\n\n/**\n * Serialize a lightningcss `EasingFunction` into a CSS string Reanimated\n * v4's CSS engine understands. Reanimated accepts the same timing-function\n * strings as CSS transitions/animations, so we emit the canonical CSS\n * form.\n * @param fn Typed easing function.\n * @returns CSS string, e.g. `'linear'` / `'ease-in-out'` / `'cubic-bezier(0.4, 0, 0.2, 1)'`.\n */\nexport function easingFunctionToString(fn: EasingFunction): string {\n switch (fn.type) {\n case 'linear': {\n return 'linear'\n }\n case 'ease':\n case 'ease-in':\n case 'ease-out':\n case 'ease-in-out': {\n return fn.type\n }\n case 'cubic-bezier': {\n return snapCubicBezierToKeyword(fn.x1, fn.y1, fn.x2, fn.y2)\n }\n case 'steps': {\n const pos = fn.position?.type ?? 'end'\n return `steps(${fn.count}, ${pos})`\n }\n default: {\n return 'ease'\n }\n }\n}\n\n/**\n * Format a `Time` value into a CSS string (`150ms`, `1s`). Reanimated's\n * CSS engine accepts either `ms` or `s`; we pick `ms` unless the value\n * is a whole-second multiple for readability.\n * @param time Typed time value.\n * @returns CSS time string.\n */\nexport function timeToString(time: Time): string {\n if (time.type === 'milliseconds') return `${formatNumber(time.value)}ms`\n return `${formatNumber(time.value)}s`\n}\n\n/**\n * Convert a single `animation-name` value to a string. Tailwind's\n * `animate-none` produces `{ type: 'none' }` which we drop.\n * @param name Typed animation name.\n * @returns Keyframe identifier, or null when `none`.\n */\nexport function animationNameToString(name: AnimationName): string | null {\n if (name.type === 'none') return null\n if (name.type === 'ident') return name.value\n if (name.type === 'string') return name.value\n return null\n}\n\n/**\n * Convert a single `animation-iteration-count` value to the CSS shape\n * Reanimated wants: either a finite integer or the `'infinite'` string.\n * @param count Typed iteration count.\n * @returns Number or `'infinite'`.\n */\nexport function iterationCountToValue(count: AnimationIterationCount): number | string {\n if (count.type === 'infinite') return 'infinite'\n return count.value\n}\n\n/**\n * Decompose the `animation: <name> <duration> <timing> <iteration> …`\n * shorthand into the per-property RN entries Reanimated consumes. A single\n * `animation` declaration can name multiple animations — we emit the first\n * one (Tailwind's `animate-*` utilities always emit exactly one).\n * @param animations Parsed animation list from lightningcss.\n * @returns RN entries, empty when the shorthand names `none`.\n */\nexport function animationShorthandToEntries(animations: readonly Animation[]): readonly RNEntry[] {\n const [first] = animations\n if (!first) return []\n const name = animationNameToString(first.name)\n if (!name) return []\n const entries: RNEntry[] = [['animationName', name]]\n if (first.duration) entries.push(['animationDuration', timeToString(first.duration)])\n if (first.timingFunction) entries.push(['animationTimingFunction', easingFunctionToString(first.timingFunction)])\n if (first.iterationCount) entries.push(['animationIterationCount', iterationCountToValue(first.iterationCount)])\n if (first.direction && first.direction !== 'normal') entries.push(['animationDirection', first.direction])\n if (first.fillMode && first.fillMode !== 'none') entries.push(['animationFillMode', first.fillMode])\n if (first.delay && first.delay.value !== 0) entries.push(['animationDelay', timeToString(first.delay)])\n if (first.playState && first.playState !== 'running') entries.push(['animationPlayState', first.playState])\n return entries\n}\n\n/**\n * Emit `animationName` for a standalone `animation-name: spin` declaration.\n * @param names Typed `animation-name` list.\n * @returns Single-entry `animationName` or empty when `none`.\n */\nexport function animationNameEntries(names: readonly AnimationName[]): readonly RNEntry[] {\n const [first] = names\n if (!first) return []\n const name = animationNameToString(first)\n if (!name) return []\n return [['animationName', name]]\n}\n\n/**\n * Emit `animationDuration` for a standalone `animation-duration` declaration.\n * @param durations Typed duration list.\n * @returns Single-entry list.\n */\nexport function animationDurationEntries(durations: readonly Time[]): readonly RNEntry[] {\n const [first] = durations\n if (!first) return []\n return [['animationDuration', timeToString(first)]]\n}\n\n/**\n * Emit `animationTimingFunction` for a standalone `animation-timing-function`.\n * @param fns Typed timing-function list.\n * @returns Single-entry list.\n */\nexport function animationTimingFunctionEntries(fns: readonly EasingFunction[]): readonly RNEntry[] {\n const [first] = fns\n if (!first) return []\n return [['animationTimingFunction', easingFunctionToString(first)]]\n}\n\n/**\n * Emit `animationIterationCount` for a standalone declaration.\n * @param counts Typed iteration-count list.\n * @returns Single-entry list.\n */\nexport function animationIterationCountEntries(counts: readonly AnimationIterationCount[]): readonly RNEntry[] {\n const [first] = counts\n if (!first) return []\n return [['animationIterationCount', iterationCountToValue(first)]]\n}\n\n/**\n * Emit `animationDelay` for a standalone declaration.\n * @param delays Typed delay list.\n * @returns Single-entry list.\n */\nexport function animationDelayEntries(delays: readonly Time[]): readonly RNEntry[] {\n const [first] = delays\n if (!first) return []\n return [['animationDelay', timeToString(first)]]\n}\n\n/**\n * Emit `animationDirection` for a standalone declaration.\n * @param directions Typed direction list.\n * @returns Single-entry list.\n */\nexport function animationDirectionEntries(directions: readonly AnimationDirection[]): readonly RNEntry[] {\n const [first] = directions\n if (!first) return []\n return [['animationDirection', first]]\n}\n\n/**\n * Emit `animationFillMode` for a standalone declaration.\n * @param modes Typed fill-mode list.\n * @returns Single-entry list.\n */\nexport function animationFillModeEntries(modes: readonly AnimationFillMode[]): readonly RNEntry[] {\n const [first] = modes\n if (!first) return []\n return [['animationFillMode', first]]\n}\n\n/**\n * Emit `animationPlayState` for a standalone declaration.\n * @param states Typed play-state list.\n * @returns Single-entry list.\n */\nexport function animationPlayStateEntries(states: readonly AnimationPlayState[]): readonly RNEntry[] {\n const [first] = states\n if (!first) return []\n return [['animationPlayState', first]]\n}\n\n/**\n * Convert the `transition-property` list into an RN-consumable form.\n * Reanimated accepts either a string (`'all'`, `'opacity'`) or an array\n * of property names. We emit the array shape even for singletons so the\n * runtime can handle it uniformly.\n * @param properties Typed transition-property list.\n * @returns Single-entry list with `transitionProperty`.\n */\nexport function transitionPropertyEntries(properties: readonly PropertyId[]): readonly RNEntry[] {\n const names = properties.map((p) => propertyIdToString(p)).filter((name): name is string => name !== null)\n if (names.length === 0) return []\n if (names.length === 1) return [['transitionProperty', names[0]!]]\n return [['transitionProperty', names]]\n}\n\n/**\n * Decompose the `transition: <prop> <duration> <timing> <delay>` shorthand\n * into the per-property RN entries Reanimated consumes. A declaration can\n * name multiple transitions; we emit one entry per slot, collapsing\n * identical slots into a scalar.\n * @param transitions Parsed transition list from lightningcss.\n * @returns RN entries — zero or more.\n */\nexport function transitionShorthandToEntries(transitions: readonly Transition[]): readonly RNEntry[] {\n if (transitions.length === 0) return []\n const properties: string[] = []\n const durations: string[] = []\n const timings: string[] = []\n const delays: string[] = []\n for (const t of transitions) {\n const name = propertyIdToString(t.property)\n if (name) properties.push(name)\n if (t.duration) durations.push(timeToString(t.duration))\n if (t.timingFunction) timings.push(easingFunctionToString(t.timingFunction))\n if (t.delay) delays.push(timeToString(t.delay))\n }\n const entries: RNEntry[] = []\n if (properties.length > 0) entries.push(['transitionProperty', singleOrArray(properties)])\n if (durations.length > 0) entries.push(['transitionDuration', singleOrArray(durations)])\n if (timings.length > 0) entries.push(['transitionTimingFunction', singleOrArray(timings)])\n if (delays.some((d) => d !== '0s')) entries.push(['transitionDelay', singleOrArray(delays)])\n return entries\n}\n\n/**\n * Emit `transitionDuration` for a standalone declaration.\n * @param durations Typed duration list.\n * @returns Single-entry list.\n */\nexport function transitionDurationEntries(durations: readonly Time[]): readonly RNEntry[] {\n if (durations.length === 0) return []\n const strings = durations.map((d) => timeToString(d))\n return [['transitionDuration', singleOrArray(strings)]]\n}\n\n/**\n * Emit `transitionTimingFunction` for a standalone declaration.\n * @param fns Typed timing-function list.\n * @returns Single-entry list.\n */\nexport function transitionTimingFunctionEntries(fns: readonly EasingFunction[]): readonly RNEntry[] {\n if (fns.length === 0) return []\n const strings = fns.map((f) => easingFunctionToString(f))\n return [['transitionTimingFunction', singleOrArray(strings)]]\n}\n\n/**\n * Emit `transitionDelay` for a standalone declaration.\n * @param delays Typed delay list.\n * @returns Single-entry list.\n */\nexport function transitionDelayEntries(delays: readonly Time[]): readonly RNEntry[] {\n if (delays.length === 0) return []\n const strings = delays.map((d) => timeToString(d))\n return [['transitionDelay', singleOrArray(strings)]]\n}\n"],"names":["kebabToCamel"],"mappings":";;;;AAeA;;;;;;;;;;;;;;;AAeG;AACH,SAAS,kBAAkB,CAAC,QAAoB,EAAA;;;;;IAK9C,IAAI,QAAQ,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI,QAAQ,EAAE;AACzD,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ;AAC1B,QAAA,MAAM,UAAU,GAAG,KAAK,IAAI,OAAO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CAAC,CAAC;AAC/D;AAEA;;;;AAIG;AACG,SAAU,sBAAsB,CAAC,MAAuB,EAAA;AAC5D,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE;AAClC,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,126 @@
1
+ import type { Animation, AnimationDirection, AnimationFillMode, AnimationIterationCount, AnimationName, AnimationPlayState, EasingFunction, PropertyId, Time, Transition } from 'lightningcss';
2
+ import type { RNEntry } from './types';
3
+ /**
4
+ * Serialize a lightningcss `EasingFunction` into a CSS string Reanimated
5
+ * v4's CSS engine understands. Reanimated accepts the same timing-function
6
+ * strings as CSS transitions/animations, so we emit the canonical CSS
7
+ * form.
8
+ * @param fn Typed easing function.
9
+ * @returns CSS string, e.g. `'linear'` / `'ease-in-out'` / `'cubic-bezier(0.4, 0, 0.2, 1)'`.
10
+ */
11
+ export declare function easingFunctionToString(fn: EasingFunction): string;
12
+ /**
13
+ * Format a `Time` value into a CSS string (`150ms`, `1s`). Reanimated's
14
+ * CSS engine accepts either `ms` or `s`; we pick `ms` unless the value
15
+ * is a whole-second multiple for readability.
16
+ * @param time Typed time value.
17
+ * @returns CSS time string.
18
+ */
19
+ export declare function timeToString(time: Time): string;
20
+ /**
21
+ * Convert a single `animation-name` value to a string. Tailwind's
22
+ * `animate-none` produces `{ type: 'none' }` which we drop.
23
+ * @param name Typed animation name.
24
+ * @returns Keyframe identifier, or null when `none`.
25
+ */
26
+ export declare function animationNameToString(name: AnimationName): string | null;
27
+ /**
28
+ * Convert a single `animation-iteration-count` value to the CSS shape
29
+ * Reanimated wants: either a finite integer or the `'infinite'` string.
30
+ * @param count Typed iteration count.
31
+ * @returns Number or `'infinite'`.
32
+ */
33
+ export declare function iterationCountToValue(count: AnimationIterationCount): number | string;
34
+ /**
35
+ * Decompose the `animation: <name> <duration> <timing> <iteration> …`
36
+ * shorthand into the per-property RN entries Reanimated consumes. A single
37
+ * `animation` declaration can name multiple animations — we emit the first
38
+ * one (Tailwind's `animate-*` utilities always emit exactly one).
39
+ * @param animations Parsed animation list from lightningcss.
40
+ * @returns RN entries, empty when the shorthand names `none`.
41
+ */
42
+ export declare function animationShorthandToEntries(animations: readonly Animation[]): readonly RNEntry[];
43
+ /**
44
+ * Emit `animationName` for a standalone `animation-name: spin` declaration.
45
+ * @param names Typed `animation-name` list.
46
+ * @returns Single-entry `animationName` or empty when `none`.
47
+ */
48
+ export declare function animationNameEntries(names: readonly AnimationName[]): readonly RNEntry[];
49
+ /**
50
+ * Emit `animationDuration` for a standalone `animation-duration` declaration.
51
+ * @param durations Typed duration list.
52
+ * @returns Single-entry list.
53
+ */
54
+ export declare function animationDurationEntries(durations: readonly Time[]): readonly RNEntry[];
55
+ /**
56
+ * Emit `animationTimingFunction` for a standalone `animation-timing-function`.
57
+ * @param fns Typed timing-function list.
58
+ * @returns Single-entry list.
59
+ */
60
+ export declare function animationTimingFunctionEntries(fns: readonly EasingFunction[]): readonly RNEntry[];
61
+ /**
62
+ * Emit `animationIterationCount` for a standalone declaration.
63
+ * @param counts Typed iteration-count list.
64
+ * @returns Single-entry list.
65
+ */
66
+ export declare function animationIterationCountEntries(counts: readonly AnimationIterationCount[]): readonly RNEntry[];
67
+ /**
68
+ * Emit `animationDelay` for a standalone declaration.
69
+ * @param delays Typed delay list.
70
+ * @returns Single-entry list.
71
+ */
72
+ export declare function animationDelayEntries(delays: readonly Time[]): readonly RNEntry[];
73
+ /**
74
+ * Emit `animationDirection` for a standalone declaration.
75
+ * @param directions Typed direction list.
76
+ * @returns Single-entry list.
77
+ */
78
+ export declare function animationDirectionEntries(directions: readonly AnimationDirection[]): readonly RNEntry[];
79
+ /**
80
+ * Emit `animationFillMode` for a standalone declaration.
81
+ * @param modes Typed fill-mode list.
82
+ * @returns Single-entry list.
83
+ */
84
+ export declare function animationFillModeEntries(modes: readonly AnimationFillMode[]): readonly RNEntry[];
85
+ /**
86
+ * Emit `animationPlayState` for a standalone declaration.
87
+ * @param states Typed play-state list.
88
+ * @returns Single-entry list.
89
+ */
90
+ export declare function animationPlayStateEntries(states: readonly AnimationPlayState[]): readonly RNEntry[];
91
+ /**
92
+ * Convert the `transition-property` list into an RN-consumable form.
93
+ * Reanimated accepts either a string (`'all'`, `'opacity'`) or an array
94
+ * of property names. We emit the array shape even for singletons so the
95
+ * runtime can handle it uniformly.
96
+ * @param properties Typed transition-property list.
97
+ * @returns Single-entry list with `transitionProperty`.
98
+ */
99
+ export declare function transitionPropertyEntries(properties: readonly PropertyId[]): readonly RNEntry[];
100
+ /**
101
+ * Decompose the `transition: <prop> <duration> <timing> <delay>` shorthand
102
+ * into the per-property RN entries Reanimated consumes. A declaration can
103
+ * name multiple transitions; we emit one entry per slot, collapsing
104
+ * identical slots into a scalar.
105
+ * @param transitions Parsed transition list from lightningcss.
106
+ * @returns RN entries — zero or more.
107
+ */
108
+ export declare function transitionShorthandToEntries(transitions: readonly Transition[]): readonly RNEntry[];
109
+ /**
110
+ * Emit `transitionDuration` for a standalone declaration.
111
+ * @param durations Typed duration list.
112
+ * @returns Single-entry list.
113
+ */
114
+ export declare function transitionDurationEntries(durations: readonly Time[]): readonly RNEntry[];
115
+ /**
116
+ * Emit `transitionTimingFunction` for a standalone declaration.
117
+ * @param fns Typed timing-function list.
118
+ * @returns Single-entry list.
119
+ */
120
+ export declare function transitionTimingFunctionEntries(fns: readonly EasingFunction[]): readonly RNEntry[];
121
+ /**
122
+ * Emit `transitionDelay` for a standalone declaration.
123
+ * @param delays Typed delay list.
124
+ * @returns Single-entry list.
125
+ */
126
+ export declare function transitionDelayEntries(delays: readonly Time[]): readonly RNEntry[];