rnwind 0.0.1 → 0.0.3

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 +193 -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 +120 -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 +110 -0
  36. package/lib/cjs/core/parser/length.cjs.map +1 -0
  37. package/lib/cjs/core/parser/length.d.ts +51 -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 +188 -0
  51. package/lib/cjs/core/parser/shorthand.cjs.map +1 -0
  52. package/lib/cjs/core/parser/shorthand.d.ts +67 -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 +467 -0
  57. package/lib/cjs/core/parser/theme-vars.cjs.map +1 -0
  58. package/lib/cjs/core/parser/theme-vars.d.ts +82 -0
  59. package/lib/cjs/core/parser/tokens.cjs +486 -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 +1680 -0
  66. package/lib/cjs/core/parser/tw-parser.cjs.map +1 -0
  67. package/lib/cjs/core/parser/tw-parser.d.ts +210 -0
  68. package/lib/cjs/core/parser/types.d.ts +37 -0
  69. package/lib/cjs/core/parser/typography-dispatcher.cjs +108 -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 +444 -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 +301 -0
  93. package/lib/cjs/metro/state.cjs.map +1 -0
  94. package/lib/cjs/metro/state.d.ts +88 -0
  95. package/lib/cjs/metro/transform-ast.cjs +1472 -0
  96. package/lib/cjs/metro/transform-ast.cjs.map +1 -0
  97. package/lib/cjs/metro/transform-ast.d.ts +88 -0
  98. package/lib/cjs/metro/transformer.cjs +372 -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 +79 -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 +191 -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 +118 -0
  172. package/lib/esm/core/parser/layout-dispatcher.mjs.map +1 -0
  173. package/lib/esm/core/parser/length.d.ts +51 -0
  174. package/lib/esm/core/parser/length.mjs +104 -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 +67 -0
  189. package/lib/esm/core/parser/shorthand.mjs +180 -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 +82 -0
  195. package/lib/esm/core/parser/theme-vars.mjs +461 -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 +480 -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 +210 -0
  204. package/lib/esm/core/parser/tw-parser.mjs +1678 -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 +106 -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 +442 -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 +88 -0
  231. package/lib/esm/metro/state.mjs +291 -0
  232. package/lib/esm/metro/state.mjs.map +1 -0
  233. package/lib/esm/metro/transform-ast.d.ts +88 -0
  234. package/lib/esm/metro/transform-ast.mjs +1451 -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 +349 -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 +79 -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 +80 -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 +191 -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 +111 -0
  291. package/src/core/parser/length.ts +114 -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 +182 -0
  297. package/src/core/parser/text-truncate.ts +79 -0
  298. package/src/core/parser/theme-vars.ts +465 -0
  299. package/src/core/parser/tokens.ts +456 -0
  300. package/src/core/parser/transform.ts +195 -0
  301. package/src/core/parser/tw-parser.ts +1828 -0
  302. package/src/core/parser/types.ts +45 -0
  303. package/src/core/parser/typography-dispatcher.ts +97 -0
  304. package/src/core/parser/typography.ts +83 -0
  305. package/src/core/style-builder/build-style.ts +500 -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 +305 -0
  313. package/src/metro/transform-ast.ts +1729 -0
  314. package/src/metro/transformer.ts +372 -0
  315. package/src/metro/warn-unknown-classes.ts +79 -0
  316. package/src/metro/with-config.ts +251 -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,198 @@
1
+ 'use strict';
2
+
3
+ var length = require('./length.cjs');
4
+
5
+ /**
6
+ * Map a single typed transform function into zero-or-more RN transform
7
+ * operations. Compound ops (like `translate`, `scale`, `skew`) expand
8
+ * into per-axis entries the way RN expects them.
9
+ * @param fn Typed transform function.
10
+ * @returns RN transform operations.
11
+ */
12
+ function mapTransformFunction(fn) {
13
+ switch (fn.type) {
14
+ case 'rotate':
15
+ case 'rotateZ': {
16
+ return [{ rotate: angleToString(fn.value) }];
17
+ }
18
+ case 'rotateX': {
19
+ return [{ rotateX: angleToString(fn.value) }];
20
+ }
21
+ case 'rotateY': {
22
+ return [{ rotateY: angleToString(fn.value) }];
23
+ }
24
+ case 'scale': {
25
+ const [x, y] = fn.value;
26
+ return [{ scaleX: numberOrPercentageToNumber(x) }, { scaleY: numberOrPercentageToNumber(y) }];
27
+ }
28
+ case 'scaleX': {
29
+ return [{ scaleX: numberOrPercentageToNumber(fn.value) }];
30
+ }
31
+ case 'scaleY': {
32
+ return [{ scaleY: numberOrPercentageToNumber(fn.value) }];
33
+ }
34
+ case 'translateX': {
35
+ return [{ translateX: lengthOrPercentToNumber(fn.value) }];
36
+ }
37
+ case 'translateY': {
38
+ return [{ translateY: lengthOrPercentToNumber(fn.value) }];
39
+ }
40
+ case 'translate': {
41
+ const [x, y] = fn.value;
42
+ const out = [{ translateX: lengthOrPercentToNumber(x) }];
43
+ if (y)
44
+ out.push({ translateY: lengthOrPercentToNumber(y) });
45
+ return out;
46
+ }
47
+ case 'translate3d': {
48
+ const [x, y] = fn.value;
49
+ return [{ translateX: lengthOrPercentToNumber(x) }, { translateY: lengthOrPercentToNumber(y) }];
50
+ }
51
+ case 'skew': {
52
+ const [x, y] = fn.value;
53
+ const out = [{ skewX: angleToString(x) }];
54
+ if (y)
55
+ out.push({ skewY: angleToString(y) });
56
+ return out;
57
+ }
58
+ case 'skewX': {
59
+ return [{ skewX: angleToString(fn.value) }];
60
+ }
61
+ case 'skewY': {
62
+ return [{ skewY: angleToString(fn.value) }];
63
+ }
64
+ default: {
65
+ // RN doesn't have a direct equivalent for `matrix()` / `matrix3d()` /
66
+ // `perspective()` at the transform-op level — skip silently. Tailwind's
67
+ // generated transforms stay within rotate/translate/scale/skew.
68
+ return null;
69
+ }
70
+ }
71
+ }
72
+ /**
73
+ * Serialize a typed angle into the CSS degree string RN accepts
74
+ * (`'45deg'`, `'0.5turn'` → `'180deg'`).
75
+ * @param angle Typed angle.
76
+ * @returns Degree string.
77
+ */
78
+ function angleToString(angle) {
79
+ switch (angle.type) {
80
+ case 'deg': {
81
+ return `${formatNumber(angle.value)}deg`;
82
+ }
83
+ case 'rad': {
84
+ return `${formatNumber((angle.value * 180) / Math.PI)}deg`;
85
+ }
86
+ case 'grad': {
87
+ return `${formatNumber((angle.value * 360) / 400)}deg`;
88
+ }
89
+ case 'turn': {
90
+ return `${formatNumber(angle.value * 360)}deg`;
91
+ }
92
+ default: {
93
+ return '0deg';
94
+ }
95
+ }
96
+ }
97
+ /**
98
+ * Convert a `NumberOrPercentage` to a plain number. Percentages become
99
+ * their fractional equivalent (e.g. `50%` → `0.5`).
100
+ * @param value Typed value.
101
+ * @returns Plain number.
102
+ */
103
+ function numberOrPercentageToNumber(value) {
104
+ if (value.type === 'percentage')
105
+ return value.value;
106
+ return value.value;
107
+ }
108
+ /**
109
+ * Convert a length-or-percentage used by translate into the shape RN
110
+ * accepts (`number` for px, `string` for `%`). Percentages stay as
111
+ * strings so RN layout can resolve them against the element size.
112
+ * @param value Typed length or percentage.
113
+ * @returns RN-style translate value.
114
+ */
115
+ function lengthOrPercentToNumber(value) {
116
+ if (value.type === 'dimension')
117
+ return length.lengthToPx(value.value);
118
+ if (value.type === 'value')
119
+ return length.lengthToPx(value.value);
120
+ if (value.type === 'percentage')
121
+ return `${formatNumber(value.value * 100)}%`;
122
+ return 0;
123
+ }
124
+ /**
125
+ * Render a number without trailing IEEE noise.
126
+ * @param value Number to format.
127
+ * @returns Compact string form.
128
+ */
129
+ function formatNumber(value) {
130
+ const rounded = Math.round(value * 10_000) / 10_000;
131
+ return String(rounded);
132
+ }
133
+ /**
134
+ * Convert lightningcss's typed `transform: ...` value into RN's
135
+ * `transform: [{ op: value }, ...]` array. RN supports a restricted subset
136
+ * of CSS transforms — this function picks out the ones it actually
137
+ * handles and drops the rest.
138
+ *
139
+ * Reanimated v4's CSS engine reads this same array shape, so the output
140
+ * is drop-in for both static RN `style` props and `Animated.View` styles.
141
+ * @param fns Typed transform function list.
142
+ * @returns Zero-or-one RN entry with the `transform` array.
143
+ */
144
+ function transformFunctionsToEntries(fns) {
145
+ const ops = [];
146
+ for (const fn of fns) {
147
+ const mapped = mapTransformFunction(fn);
148
+ if (mapped)
149
+ ops.push(...mapped);
150
+ }
151
+ if (ops.length === 0)
152
+ return [];
153
+ return [['transform', ops]];
154
+ }
155
+ /**
156
+ * Convert Tailwind v4's typed `rotate: ...` (individual property) into
157
+ * the RN transform array. Tailwind's `rotate-*` utilities emit this
158
+ * property rather than the classic `transform: rotate(...)` shorthand.
159
+ * @param value Typed rotate value.
160
+ * @returns Zero-or-one RN entry.
161
+ */
162
+ function rotateToEntries(value) {
163
+ if (value === 'none')
164
+ return [];
165
+ return [['transform', [{ rotate: angleToString(value.angle) }]]];
166
+ }
167
+ /**
168
+ * Convert Tailwind v4's typed `translate: ...` into the RN transform
169
+ * array. Both axes are emitted as separate ops so each is independently
170
+ * animatable by Reanimated.
171
+ * @param value Typed translate value.
172
+ * @returns Zero-or-one RN entry.
173
+ */
174
+ function translateToEntries(value) {
175
+ if (value === 'none')
176
+ return [];
177
+ const ops = [{ translateX: lengthOrPercentToNumber(value.x) }];
178
+ const yNumber = lengthOrPercentToNumber(value.y);
179
+ if (yNumber !== 0)
180
+ ops.push({ translateY: yNumber });
181
+ return [['transform', ops]];
182
+ }
183
+ /**
184
+ * Convert Tailwind v4's typed `scale: ...` into the RN transform array.
185
+ * @param value Typed scale value.
186
+ * @returns Zero-or-one RN entry.
187
+ */
188
+ function scaleToEntries(value) {
189
+ if (value === 'none')
190
+ return [];
191
+ return [['transform', [{ scaleX: numberOrPercentageToNumber(value.x) }, { scaleY: numberOrPercentageToNumber(value.y) }]]];
192
+ }
193
+
194
+ exports.rotateToEntries = rotateToEntries;
195
+ exports.scaleToEntries = scaleToEntries;
196
+ exports.transformFunctionsToEntries = transformFunctionsToEntries;
197
+ exports.translateToEntries = translateToEntries;
198
+ //# sourceMappingURL=transform.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.cjs","sources":["../../../../../src/core/parser/transform.ts"],"sourcesContent":["import type { Angle, LengthValue, NumberOrPercentage, Rotate, Scale, Transform, Translate } from 'lightningcss'\nimport type { RNEntry } from './types'\nimport { lengthToPx } from './length'\n\ntype RnTransformRecord = Record<string, string | number>\n\ntype DimensionPercent =\n | { type: 'dimension'; value: LengthValue }\n | { type: 'percentage'; value: number }\n | { type: 'calc'; value: unknown }\n\n/**\n * Map a single typed transform function into zero-or-more RN transform\n * operations. Compound ops (like `translate`, `scale`, `skew`) expand\n * into per-axis entries the way RN expects them.\n * @param fn Typed transform function.\n * @returns RN transform operations.\n */\nfunction mapTransformFunction(fn: Transform): RnTransformRecord[] | null {\n switch (fn.type) {\n case 'rotate':\n case 'rotateZ': {\n return [{ rotate: angleToString(fn.value) }]\n }\n case 'rotateX': {\n return [{ rotateX: angleToString(fn.value) }]\n }\n case 'rotateY': {\n return [{ rotateY: angleToString(fn.value) }]\n }\n case 'scale': {\n const [x, y] = fn.value\n return [{ scaleX: numberOrPercentageToNumber(x) }, { scaleY: numberOrPercentageToNumber(y) }]\n }\n case 'scaleX': {\n return [{ scaleX: numberOrPercentageToNumber(fn.value) }]\n }\n case 'scaleY': {\n return [{ scaleY: numberOrPercentageToNumber(fn.value) }]\n }\n case 'translateX': {\n return [{ translateX: lengthOrPercentToNumber(fn.value) }]\n }\n case 'translateY': {\n return [{ translateY: lengthOrPercentToNumber(fn.value) }]\n }\n case 'translate': {\n const [x, y] = fn.value\n const out: RnTransformRecord[] = [{ translateX: lengthOrPercentToNumber(x) }]\n if (y) out.push({ translateY: lengthOrPercentToNumber(y) })\n return out\n }\n case 'translate3d': {\n const [x, y] = fn.value\n return [{ translateX: lengthOrPercentToNumber(x) }, { translateY: lengthOrPercentToNumber(y) }]\n }\n case 'skew': {\n const [x, y] = fn.value\n const out: RnTransformRecord[] = [{ skewX: angleToString(x) }]\n if (y) out.push({ skewY: angleToString(y) })\n return out\n }\n case 'skewX': {\n return [{ skewX: angleToString(fn.value) }]\n }\n case 'skewY': {\n return [{ skewY: angleToString(fn.value) }]\n }\n default: {\n // RN doesn't have a direct equivalent for `matrix()` / `matrix3d()` /\n // `perspective()` at the transform-op level — skip silently. Tailwind's\n // generated transforms stay within rotate/translate/scale/skew.\n return null\n }\n }\n}\n\n/**\n * Serialize a typed angle into the CSS degree string RN accepts\n * (`'45deg'`, `'0.5turn'` → `'180deg'`).\n * @param angle Typed angle.\n * @returns Degree string.\n */\nfunction angleToString(angle: Angle): string {\n switch (angle.type) {\n case 'deg': {\n return `${formatNumber(angle.value)}deg`\n }\n case 'rad': {\n return `${formatNumber((angle.value * 180) / Math.PI)}deg`\n }\n case 'grad': {\n return `${formatNumber((angle.value * 360) / 400)}deg`\n }\n case 'turn': {\n return `${formatNumber(angle.value * 360)}deg`\n }\n default: {\n return '0deg'\n }\n }\n}\n\n/**\n * Convert a `NumberOrPercentage` to a plain number. Percentages become\n * their fractional equivalent (e.g. `50%` → `0.5`).\n * @param value Typed value.\n * @returns Plain number.\n */\nfunction numberOrPercentageToNumber(value: NumberOrPercentage): number {\n if (value.type === 'percentage') return value.value\n return value.value\n}\n\n/**\n * Convert a length-or-percentage used by translate into the shape RN\n * accepts (`number` for px, `string` for `%`). Percentages stay as\n * strings so RN layout can resolve them against the element size.\n * @param value Typed length or percentage.\n * @returns RN-style translate value.\n */\nfunction lengthOrPercentToNumber(value: DimensionPercent | { type: 'value'; value: LengthValue }): number | string {\n if (value.type === 'dimension') return lengthToPx(value.value)\n if (value.type === 'value') return lengthToPx(value.value)\n if (value.type === 'percentage') return `${formatNumber(value.value * 100)}%`\n return 0\n}\n\n/**\n * Render a number without trailing IEEE noise.\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 * Convert lightningcss's typed `transform: ...` value into RN's\n * `transform: [{ op: value }, ...]` array. RN supports a restricted subset\n * of CSS transforms — this function picks out the ones it actually\n * handles and drops the rest.\n *\n * Reanimated v4's CSS engine reads this same array shape, so the output\n * is drop-in for both static RN `style` props and `Animated.View` styles.\n * @param fns Typed transform function list.\n * @returns Zero-or-one RN entry with the `transform` array.\n */\nexport function transformFunctionsToEntries(fns: readonly Transform[]): readonly RNEntry[] {\n const ops: RnTransformRecord[] = []\n for (const fn of fns) {\n const mapped = mapTransformFunction(fn)\n if (mapped) ops.push(...mapped)\n }\n if (ops.length === 0) return []\n return [['transform', ops]]\n}\n\n/**\n * Convert Tailwind v4's typed `rotate: ...` (individual property) into\n * the RN transform array. Tailwind's `rotate-*` utilities emit this\n * property rather than the classic `transform: rotate(...)` shorthand.\n * @param value Typed rotate value.\n * @returns Zero-or-one RN entry.\n */\nexport function rotateToEntries(value: Rotate | 'none'): readonly RNEntry[] {\n if (value === 'none') return []\n return [['transform', [{ rotate: angleToString(value.angle) }]]]\n}\n\n/**\n * Convert Tailwind v4's typed `translate: ...` into the RN transform\n * array. Both axes are emitted as separate ops so each is independently\n * animatable by Reanimated.\n * @param value Typed translate value.\n * @returns Zero-or-one RN entry.\n */\nexport function translateToEntries(value: Translate | 'none'): readonly RNEntry[] {\n if (value === 'none') return []\n const ops: RnTransformRecord[] = [{ translateX: lengthOrPercentToNumber(value.x) }]\n const yNumber = lengthOrPercentToNumber(value.y)\n if (yNumber !== 0) ops.push({ translateY: yNumber })\n return [['transform', ops]]\n}\n\n/**\n * Convert Tailwind v4's typed `scale: ...` into the RN transform array.\n * @param value Typed scale value.\n * @returns Zero-or-one RN entry.\n */\nexport function scaleToEntries(value: Scale | 'none'): readonly RNEntry[] {\n if (value === 'none') return []\n return [['transform', [{ scaleX: numberOrPercentageToNumber(value.x) }, { scaleY: numberOrPercentageToNumber(value.y) }]]]\n}\n"],"names":["lengthToPx"],"mappings":";;;;AAWA;;;;;;AAMG;AACH,SAAS,oBAAoB,CAAC,EAAa,EAAA;AACzC,IAAA,QAAQ,EAAE,CAAC,IAAI;AACb,QAAA,KAAK,QAAQ;QAC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W,EAAE,CAAC,EAAE,MAAM,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5H;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ import type { Rotate, Scale, Transform, Translate } from 'lightningcss';
2
+ import type { RNEntry } from './types';
3
+ /**
4
+ * Convert lightningcss's typed `transform: ...` value into RN's
5
+ * `transform: [{ op: value }, ...]` array. RN supports a restricted subset
6
+ * of CSS transforms — this function picks out the ones it actually
7
+ * handles and drops the rest.
8
+ *
9
+ * Reanimated v4's CSS engine reads this same array shape, so the output
10
+ * is drop-in for both static RN `style` props and `Animated.View` styles.
11
+ * @param fns Typed transform function list.
12
+ * @returns Zero-or-one RN entry with the `transform` array.
13
+ */
14
+ export declare function transformFunctionsToEntries(fns: readonly Transform[]): readonly RNEntry[];
15
+ /**
16
+ * Convert Tailwind v4's typed `rotate: ...` (individual property) into
17
+ * the RN transform array. Tailwind's `rotate-*` utilities emit this
18
+ * property rather than the classic `transform: rotate(...)` shorthand.
19
+ * @param value Typed rotate value.
20
+ * @returns Zero-or-one RN entry.
21
+ */
22
+ export declare function rotateToEntries(value: Rotate | 'none'): readonly RNEntry[];
23
+ /**
24
+ * Convert Tailwind v4's typed `translate: ...` into the RN transform
25
+ * array. Both axes are emitted as separate ops so each is independently
26
+ * animatable by Reanimated.
27
+ * @param value Typed translate value.
28
+ * @returns Zero-or-one RN entry.
29
+ */
30
+ export declare function translateToEntries(value: Translate | 'none'): readonly RNEntry[];
31
+ /**
32
+ * Convert Tailwind v4's typed `scale: ...` into the RN transform array.
33
+ * @param value Typed scale value.
34
+ * @returns Zero-or-one RN entry.
35
+ */
36
+ export declare function scaleToEntries(value: Scale | 'none'): readonly RNEntry[];