react-native-css 2.1.2 → 3.0.0-nightly.19372e8

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 (899) hide show
  1. package/{LICENSE.md → LICENSE} +6 -8
  2. package/README.md +177 -70
  3. package/dist/commonjs/babel/allowedModules.js +23 -0
  4. package/dist/commonjs/babel/allowedModules.js.map +1 -0
  5. package/dist/commonjs/babel/helpers.js +25 -0
  6. package/dist/commonjs/babel/helpers.js.map +1 -0
  7. package/dist/commonjs/babel/import-plugin.js +101 -0
  8. package/dist/commonjs/babel/import-plugin.js.map +1 -0
  9. package/dist/commonjs/babel/index.js +9 -0
  10. package/dist/commonjs/babel/index.js.map +1 -0
  11. package/dist/commonjs/babel/react-native-web.js +118 -0
  12. package/dist/commonjs/babel/react-native-web.js.map +1 -0
  13. package/dist/commonjs/babel/react-native.js +118 -0
  14. package/dist/commonjs/babel/react-native.js.map +1 -0
  15. package/dist/commonjs/compiler/atRules.js +114 -0
  16. package/dist/commonjs/compiler/atRules.js.map +1 -0
  17. package/dist/commonjs/compiler/compiler.js +281 -0
  18. package/dist/commonjs/compiler/compiler.js.map +1 -0
  19. package/dist/commonjs/compiler/compiler.types.js +4 -0
  20. package/dist/commonjs/compiler/compiler.types.js.map +1 -0
  21. package/dist/commonjs/compiler/container-query.js +63 -0
  22. package/dist/commonjs/compiler/container-query.js.map +1 -0
  23. package/dist/commonjs/compiler/declarations.js +2166 -0
  24. package/dist/commonjs/compiler/declarations.js.map +1 -0
  25. package/dist/commonjs/compiler/functions-web.js +44 -0
  26. package/dist/commonjs/compiler/functions-web.js.map +1 -0
  27. package/dist/commonjs/compiler/functions.js +59 -0
  28. package/dist/commonjs/compiler/functions.js.map +1 -0
  29. package/dist/commonjs/compiler/index.js +17 -0
  30. package/dist/commonjs/compiler/index.js.map +1 -0
  31. package/dist/commonjs/compiler/inheritance.test.js +78 -0
  32. package/dist/commonjs/compiler/inheritance.test.js.map +1 -0
  33. package/dist/commonjs/compiler/keyframes.js +60 -0
  34. package/dist/commonjs/compiler/keyframes.js.map +1 -0
  35. package/dist/commonjs/compiler/media-query.js +172 -0
  36. package/dist/commonjs/compiler/media-query.js.map +1 -0
  37. package/dist/commonjs/compiler/pseudo-elements.js +49 -0
  38. package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
  39. package/dist/commonjs/compiler/selector-builder.js +501 -0
  40. package/dist/commonjs/compiler/selector-builder.js.map +1 -0
  41. package/dist/commonjs/compiler/selectors.js +414 -0
  42. package/dist/commonjs/compiler/selectors.js.map +1 -0
  43. package/dist/commonjs/compiler/split-by-delimiter.js +21 -0
  44. package/dist/commonjs/compiler/split-by-delimiter.js.map +1 -0
  45. package/dist/commonjs/compiler/stylesheet.js +476 -0
  46. package/dist/commonjs/compiler/stylesheet.js.map +1 -0
  47. package/dist/commonjs/compiler/supports.js +27 -0
  48. package/dist/commonjs/compiler/supports.js.map +1 -0
  49. package/dist/commonjs/components/ActivityIndicator.js +22 -0
  50. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  51. package/dist/commonjs/components/Button.js +22 -0
  52. package/dist/commonjs/components/Button.js.map +1 -0
  53. package/dist/commonjs/components/FlatList.js +19 -0
  54. package/dist/commonjs/components/FlatList.js.map +1 -0
  55. package/dist/commonjs/components/Image.js +17 -0
  56. package/dist/commonjs/components/Image.js.map +1 -0
  57. package/dist/commonjs/components/Switch.js +17 -0
  58. package/dist/commonjs/components/Switch.js.map +1 -0
  59. package/dist/commonjs/components/Text.js +17 -0
  60. package/dist/commonjs/components/Text.js.map +1 -0
  61. package/dist/commonjs/components/TextInput.js +17 -0
  62. package/dist/commonjs/components/TextInput.js.map +1 -0
  63. package/dist/commonjs/components/View.js +17 -0
  64. package/dist/commonjs/components/View.js.map +1 -0
  65. package/dist/commonjs/components/index.js +84 -0
  66. package/dist/commonjs/components/index.js.map +1 -0
  67. package/dist/commonjs/doctor/index.js +6 -0
  68. package/dist/commonjs/doctor/index.js.map +1 -0
  69. package/dist/commonjs/index.js +28 -0
  70. package/dist/commonjs/index.js.map +1 -0
  71. package/dist/commonjs/jest/expect.d.js +2 -0
  72. package/dist/commonjs/jest/expect.d.js.map +1 -0
  73. package/dist/commonjs/jest/index.js +56 -0
  74. package/dist/commonjs/jest/index.js.map +1 -0
  75. package/dist/commonjs/jest/setup.js +3 -0
  76. package/dist/commonjs/jest/setup.js.map +1 -0
  77. package/dist/commonjs/jest/setupAfterEnv.js +15 -0
  78. package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
  79. package/dist/commonjs/metro/index.js +167 -0
  80. package/dist/commonjs/metro/index.js.map +1 -0
  81. package/dist/commonjs/metro/injection-code.js +32 -0
  82. package/dist/commonjs/metro/injection-code.js.map +1 -0
  83. package/dist/commonjs/metro/metro-transformer.js +21 -0
  84. package/dist/commonjs/metro/metro-transformer.js.map +1 -0
  85. package/dist/commonjs/metro/picocolors.js +71 -0
  86. package/dist/commonjs/metro/picocolors.js.map +1 -0
  87. package/dist/commonjs/metro/resolver.js +62 -0
  88. package/dist/commonjs/metro/resolver.js.map +1 -0
  89. package/dist/commonjs/metro/stringify.js +59 -0
  90. package/dist/commonjs/metro/stringify.js.map +1 -0
  91. package/dist/commonjs/metro/typescript.js +47 -0
  92. package/dist/commonjs/metro/typescript.js.map +1 -0
  93. package/dist/commonjs/package.json +1 -0
  94. package/dist/commonjs/poison.pill.js +39 -0
  95. package/dist/commonjs/poison.pill.js.map +1 -0
  96. package/dist/commonjs/runtime/index.js +17 -0
  97. package/dist/commonjs/runtime/index.js.map +1 -0
  98. package/dist/commonjs/runtime/native/api.js +90 -0
  99. package/dist/commonjs/runtime/native/api.js.map +1 -0
  100. package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
  101. package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
  102. package/dist/commonjs/runtime/native/conditions/container-query.js +123 -0
  103. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
  104. package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
  105. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
  106. package/dist/commonjs/runtime/native/conditions/index.js +40 -0
  107. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
  108. package/dist/commonjs/runtime/native/conditions/media-query.js +98 -0
  109. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
  110. package/dist/commonjs/runtime/native/index.js +28 -0
  111. package/dist/commonjs/runtime/native/index.js.map +1 -0
  112. package/dist/commonjs/runtime/native/injection.js +100 -0
  113. package/dist/commonjs/runtime/native/injection.js.map +1 -0
  114. package/dist/commonjs/runtime/native/metro.js +6 -0
  115. package/dist/commonjs/runtime/native/metro.js.map +1 -0
  116. package/dist/commonjs/runtime/native/react/interaction.js +63 -0
  117. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
  118. package/dist/commonjs/runtime/native/react/rules.js +255 -0
  119. package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
  120. package/dist/commonjs/runtime/native/react/useNativeCss.js +159 -0
  121. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
  122. package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
  123. package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
  124. package/dist/commonjs/runtime/native/reactivity.js +178 -0
  125. package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
  126. package/dist/commonjs/runtime/native/reanimated.js +17 -0
  127. package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
  128. package/dist/commonjs/runtime/native/root.js +28 -0
  129. package/dist/commonjs/runtime/native/root.js.map +1 -0
  130. package/dist/commonjs/runtime/native/styles/calculate-props.js +148 -0
  131. package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
  132. package/dist/commonjs/runtime/native/styles/constants.js +9 -0
  133. package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
  134. package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
  135. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
  136. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
  137. package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
  138. package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
  139. package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
  140. package/dist/commonjs/runtime/native/styles/functions/filters.js +84 -0
  141. package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
  142. package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
  143. package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
  144. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js +46 -0
  145. package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
  146. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
  147. package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
  148. package/dist/commonjs/runtime/native/styles/index.js +115 -0
  149. package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
  150. package/dist/commonjs/runtime/native/styles/resolve.js +106 -0
  151. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
  152. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js +79 -0
  153. package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
  154. package/dist/commonjs/runtime/native/styles/shorthands/animation.js +57 -0
  155. package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
  156. package/dist/commonjs/runtime/native/styles/shorthands/border.js +12 -0
  157. package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
  158. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +40 -0
  159. package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  160. package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
  161. package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
  162. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js +13 -0
  163. package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  164. package/dist/commonjs/runtime/native/styles/shorthands/transform.js +23 -0
  165. package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
  166. package/dist/commonjs/runtime/native/styles/units.js +52 -0
  167. package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
  168. package/dist/commonjs/runtime/native/styles/variables.js +79 -0
  169. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
  170. package/dist/commonjs/runtime/runtime.js +17 -0
  171. package/dist/commonjs/runtime/runtime.js.map +1 -0
  172. package/dist/commonjs/runtime/runtime.native.js +17 -0
  173. package/dist/commonjs/runtime/runtime.native.js.map +1 -0
  174. package/dist/commonjs/runtime/runtime.types.js +6 -0
  175. package/dist/commonjs/runtime/runtime.types.js.map +1 -0
  176. package/dist/commonjs/runtime/utils/components.js +18 -0
  177. package/dist/commonjs/runtime/utils/components.js.map +1 -0
  178. package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
  179. package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
  180. package/dist/commonjs/runtime/utils/index.js +61 -0
  181. package/dist/commonjs/runtime/utils/index.js.map +1 -0
  182. package/dist/commonjs/runtime/utils/objects.js +92 -0
  183. package/dist/commonjs/runtime/utils/objects.js.map +1 -0
  184. package/dist/commonjs/runtime/utils/specificity.js +44 -0
  185. package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
  186. package/dist/commonjs/runtime/utils/style-value.js +21 -0
  187. package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
  188. package/dist/commonjs/runtime/utils/utils.types.js +6 -0
  189. package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
  190. package/dist/commonjs/runtime/web/api.js +68 -0
  191. package/dist/commonjs/runtime/web/api.js.map +1 -0
  192. package/dist/commonjs/runtime/web/assign-style.js +27 -0
  193. package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
  194. package/dist/commonjs/runtime/web/index.js +18 -0
  195. package/dist/commonjs/runtime/web/index.js.map +1 -0
  196. package/dist/commonjs/runtime/web/metro.js +6 -0
  197. package/dist/commonjs/runtime/web/metro.js.map +1 -0
  198. package/dist/module/babel/allowedModules.js +19 -0
  199. package/dist/module/babel/allowedModules.js.map +1 -0
  200. package/dist/module/babel/helpers.js +21 -0
  201. package/dist/module/babel/helpers.js.map +1 -0
  202. package/dist/module/babel/import-plugin.js +97 -0
  203. package/dist/module/babel/import-plugin.js.map +1 -0
  204. package/dist/module/babel/index.js +9 -0
  205. package/dist/module/babel/index.js.map +1 -0
  206. package/dist/module/babel/react-native-web.js +112 -0
  207. package/dist/module/babel/react-native-web.js.map +1 -0
  208. package/dist/module/babel/react-native.js +112 -0
  209. package/dist/module/babel/react-native.js.map +1 -0
  210. package/dist/module/compiler/atRules.js +110 -0
  211. package/dist/module/compiler/atRules.js.map +1 -0
  212. package/dist/module/compiler/compiler.js +276 -0
  213. package/dist/module/compiler/compiler.js.map +1 -0
  214. package/dist/module/compiler/compiler.types.js +60 -0
  215. package/dist/module/compiler/compiler.types.js.map +1 -0
  216. package/dist/module/compiler/container-query.js +59 -0
  217. package/dist/module/compiler/container-query.js.map +1 -0
  218. package/dist/module/compiler/declarations.js +2091 -0
  219. package/dist/module/compiler/declarations.js.map +1 -0
  220. package/dist/module/compiler/functions-web.js +32 -0
  221. package/dist/module/compiler/functions-web.js.map +1 -0
  222. package/dist/module/compiler/functions.js +47 -0
  223. package/dist/module/compiler/functions.js.map +1 -0
  224. package/dist/module/compiler/index.js +9 -0
  225. package/dist/module/compiler/index.js.map +1 -0
  226. package/dist/module/compiler/inheritance.test.js +78 -0
  227. package/dist/module/compiler/inheritance.test.js.map +1 -0
  228. package/dist/module/compiler/keyframes.js +54 -0
  229. package/dist/module/compiler/keyframes.js.map +1 -0
  230. package/dist/module/compiler/media-query.js +166 -0
  231. package/dist/module/compiler/media-query.js.map +1 -0
  232. package/dist/module/compiler/pseudo-elements.js +44 -0
  233. package/dist/module/compiler/pseudo-elements.js.map +1 -0
  234. package/dist/module/compiler/selector-builder.js +496 -0
  235. package/dist/module/compiler/selector-builder.js.map +1 -0
  236. package/dist/module/compiler/selectors.js +409 -0
  237. package/dist/module/compiler/selectors.js.map +1 -0
  238. package/dist/module/compiler/split-by-delimiter.js +17 -0
  239. package/dist/module/compiler/split-by-delimiter.js.map +1 -0
  240. package/dist/module/compiler/stylesheet.js +471 -0
  241. package/dist/module/compiler/stylesheet.js.map +1 -0
  242. package/dist/module/compiler/supports.js +23 -0
  243. package/dist/module/compiler/supports.js.map +1 -0
  244. package/dist/module/components/ActivityIndicator.js +17 -0
  245. package/dist/module/components/ActivityIndicator.js.map +1 -0
  246. package/dist/module/components/Button.js +17 -0
  247. package/dist/module/components/Button.js.map +1 -0
  248. package/dist/module/components/FlatList.js +14 -0
  249. package/dist/module/components/FlatList.js.map +1 -0
  250. package/dist/module/components/Image.js +12 -0
  251. package/dist/module/components/Image.js.map +1 -0
  252. package/dist/module/components/Switch.js +12 -0
  253. package/dist/module/components/Switch.js.map +1 -0
  254. package/dist/module/components/Text.js +12 -0
  255. package/dist/module/components/Text.js.map +1 -0
  256. package/dist/module/components/TextInput.js +12 -0
  257. package/dist/module/components/TextInput.js.map +1 -0
  258. package/dist/module/components/View.js +12 -0
  259. package/dist/module/components/View.js.map +1 -0
  260. package/dist/module/components/index.js +12 -0
  261. package/dist/module/components/index.js.map +1 -0
  262. package/dist/module/doctor/index.js +4 -0
  263. package/dist/module/doctor/index.js.map +1 -0
  264. package/dist/module/index.js +5 -0
  265. package/dist/module/index.js.map +1 -0
  266. package/dist/module/jest/expect.d.js +2 -0
  267. package/dist/module/jest/expect.d.js.map +1 -0
  268. package/dist/module/jest/index.js +50 -0
  269. package/dist/module/jest/index.js.map +1 -0
  270. package/dist/module/jest/setup.js +3 -0
  271. package/dist/module/jest/setup.js.map +1 -0
  272. package/dist/module/jest/setupAfterEnv.js +15 -0
  273. package/dist/module/jest/setupAfterEnv.js.map +1 -0
  274. package/dist/module/metro/index.js +161 -0
  275. package/dist/module/metro/index.js.map +1 -0
  276. package/dist/module/metro/injection-code.js +27 -0
  277. package/dist/module/metro/injection-code.js.map +1 -0
  278. package/dist/module/metro/metro-transformer.js +17 -0
  279. package/dist/module/metro/metro-transformer.js.map +1 -0
  280. package/dist/module/metro/picocolors.js +67 -0
  281. package/dist/module/metro/picocolors.js.map +1 -0
  282. package/dist/module/metro/resolver.js +57 -0
  283. package/dist/module/metro/resolver.js.map +1 -0
  284. package/dist/module/metro/stringify.js +55 -0
  285. package/dist/module/metro/stringify.js.map +1 -0
  286. package/dist/module/metro/typescript.js +42 -0
  287. package/dist/module/metro/typescript.js.map +1 -0
  288. package/dist/module/package.json +1 -0
  289. package/dist/module/poison.pill.js +37 -0
  290. package/dist/module/poison.pill.js.map +1 -0
  291. package/dist/module/runtime/index.js +9 -0
  292. package/dist/module/runtime/index.js.map +1 -0
  293. package/dist/module/runtime/native/api.js +75 -0
  294. package/dist/module/runtime/native/api.js.map +1 -0
  295. package/dist/module/runtime/native/conditions/attributes.js +38 -0
  296. package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
  297. package/dist/module/runtime/native/conditions/container-query.js +117 -0
  298. package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
  299. package/dist/module/runtime/native/conditions/guards.js +29 -0
  300. package/dist/module/runtime/native/conditions/guards.js.map +1 -0
  301. package/dist/module/runtime/native/conditions/index.js +36 -0
  302. package/dist/module/runtime/native/conditions/index.js.map +1 -0
  303. package/dist/module/runtime/native/conditions/media-query.js +93 -0
  304. package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
  305. package/dist/module/runtime/native/index.js +5 -0
  306. package/dist/module/runtime/native/index.js.map +1 -0
  307. package/dist/module/runtime/native/injection.js +95 -0
  308. package/dist/module/runtime/native/injection.js.map +1 -0
  309. package/dist/module/runtime/native/metro.js +5 -0
  310. package/dist/module/runtime/native/metro.js.map +1 -0
  311. package/dist/module/runtime/native/react/interaction.js +59 -0
  312. package/dist/module/runtime/native/react/interaction.js.map +1 -0
  313. package/dist/module/runtime/native/react/rules.js +248 -0
  314. package/dist/module/runtime/native/react/rules.js.map +1 -0
  315. package/dist/module/runtime/native/react/useNativeCss.js +153 -0
  316. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
  317. package/dist/module/runtime/native/react/usePassthrough.js +45 -0
  318. package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
  319. package/dist/module/runtime/native/reactivity.js +166 -0
  320. package/dist/module/runtime/native/reactivity.js.map +1 -0
  321. package/dist/module/runtime/native/reanimated.js +13 -0
  322. package/dist/module/runtime/native/reanimated.js.map +1 -0
  323. package/dist/module/runtime/native/root.js +24 -0
  324. package/dist/module/runtime/native/root.js.map +1 -0
  325. package/dist/module/runtime/native/styles/calculate-props.js +143 -0
  326. package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
  327. package/dist/module/runtime/native/styles/constants.js +5 -0
  328. package/dist/module/runtime/native/styles/constants.js.map +1 -0
  329. package/dist/module/runtime/native/styles/defaults.js +65 -0
  330. package/dist/module/runtime/native/styles/defaults.js.map +1 -0
  331. package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
  332. package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
  333. package/dist/module/runtime/native/styles/functions/calc.js +120 -0
  334. package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
  335. package/dist/module/runtime/native/styles/functions/filters.js +70 -0
  336. package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
  337. package/dist/module/runtime/native/styles/functions/index.js +8 -0
  338. package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
  339. package/dist/module/runtime/native/styles/functions/platform-functions.js +36 -0
  340. package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
  341. package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
  342. package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
  343. package/dist/module/runtime/native/styles/index.js +110 -0
  344. package/dist/module/runtime/native/styles/index.js.map +1 -0
  345. package/dist/module/runtime/native/styles/resolve.js +101 -0
  346. package/dist/module/runtime/native/styles/resolve.js.map +1 -0
  347. package/dist/module/runtime/native/styles/shorthands/_handler.js +74 -0
  348. package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
  349. package/dist/module/runtime/native/styles/shorthands/animation.js +51 -0
  350. package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
  351. package/dist/module/runtime/native/styles/shorthands/border.js +8 -0
  352. package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
  353. package/dist/module/runtime/native/styles/shorthands/box-shadow.js +35 -0
  354. package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
  355. package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
  356. package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
  357. package/dist/module/runtime/native/styles/shorthands/text-shadow.js +9 -0
  358. package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
  359. package/dist/module/runtime/native/styles/shorthands/transform.js +18 -0
  360. package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
  361. package/dist/module/runtime/native/styles/units.js +43 -0
  362. package/dist/module/runtime/native/styles/units.js.map +1 -0
  363. package/dist/module/runtime/native/styles/variables.js +75 -0
  364. package/dist/module/runtime/native/styles/variables.js.map +1 -0
  365. package/dist/module/runtime/runtime.js +4 -0
  366. package/dist/module/runtime/runtime.js.map +1 -0
  367. package/dist/module/runtime/runtime.native.js +4 -0
  368. package/dist/module/runtime/runtime.native.js.map +1 -0
  369. package/dist/module/runtime/runtime.types.js +4 -0
  370. package/dist/module/runtime/runtime.types.js.map +1 -0
  371. package/dist/module/runtime/utils/components.js +14 -0
  372. package/dist/module/runtime/utils/components.js.map +1 -0
  373. package/dist/module/runtime/utils/dot-notation.types.js +2 -0
  374. package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
  375. package/dist/module/runtime/utils/index.js +8 -0
  376. package/dist/module/runtime/utils/index.js.map +1 -0
  377. package/dist/module/runtime/utils/objects.js +84 -0
  378. package/dist/module/runtime/utils/objects.js.map +1 -0
  379. package/dist/module/runtime/utils/specificity.js +39 -0
  380. package/dist/module/runtime/utils/specificity.js.map +1 -0
  381. package/dist/module/runtime/utils/style-value.js +16 -0
  382. package/dist/module/runtime/utils/style-value.js.map +1 -0
  383. package/dist/module/runtime/utils/utils.types.js +4 -0
  384. package/dist/module/runtime/utils/utils.types.js.map +1 -0
  385. package/dist/module/runtime/web/api.js +59 -0
  386. package/dist/module/runtime/web/api.js.map +1 -0
  387. package/dist/module/runtime/web/assign-style.js +23 -0
  388. package/dist/module/runtime/web/assign-style.js.map +1 -0
  389. package/dist/module/runtime/web/index.js +6 -0
  390. package/dist/module/runtime/web/index.js.map +1 -0
  391. package/dist/module/runtime/web/metro.js +5 -0
  392. package/dist/module/runtime/web/metro.js.map +1 -0
  393. package/dist/typescript/commonjs/example/app.config.d.ts +4 -0
  394. package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -0
  395. package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
  396. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
  397. package/dist/typescript/commonjs/package.json +1 -0
  398. package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
  399. package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
  400. package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
  401. package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
  402. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
  403. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
  404. package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
  405. package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
  406. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
  407. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
  408. package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
  409. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
  410. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
  411. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
  412. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +17 -0
  413. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
  414. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +197 -0
  415. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
  416. package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
  417. package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
  418. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +118 -0
  419. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
  420. package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
  421. package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
  422. package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
  423. package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
  424. package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
  425. package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
  426. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
  427. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
  428. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
  429. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
  430. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
  431. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
  432. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
  433. package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
  434. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
  435. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
  436. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +24 -0
  437. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
  438. package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts +2 -0
  439. package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts.map +1 -0
  440. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +68 -0
  441. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -0
  442. package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
  443. package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
  444. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
  445. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  446. package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
  447. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
  448. package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
  449. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
  450. package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
  451. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
  452. package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
  453. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
  454. package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
  455. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
  456. package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
  457. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  458. package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
  459. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
  460. package/dist/typescript/commonjs/src/components/index.d.ts +10 -0
  461. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
  462. package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
  463. package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
  464. package/dist/typescript/commonjs/src/index.d.ts +3 -0
  465. package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
  466. package/dist/typescript/commonjs/src/jest/index.d.ts +30 -0
  467. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
  468. package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
  469. package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
  470. package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
  471. package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
  472. package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
  473. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
  474. package/dist/typescript/commonjs/src/metro/injection-code.d.ts +16 -0
  475. package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
  476. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
  477. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
  478. package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
  479. package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
  480. package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
  481. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
  482. package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
  483. package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
  484. package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
  485. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
  486. package/dist/typescript/commonjs/src/poison.pill.d.ts +2 -0
  487. package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
  488. package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
  489. package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
  490. package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
  491. package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
  492. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
  493. package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  494. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
  495. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
  496. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
  497. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
  498. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
  499. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
  500. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
  501. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
  502. package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
  503. package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
  504. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
  505. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
  506. package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
  507. package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
  508. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
  509. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
  510. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
  511. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
  512. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +38 -0
  513. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
  514. package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
  515. package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
  516. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +55 -0
  517. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
  518. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
  519. package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
  520. package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
  521. package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
  522. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +10 -0
  523. package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
  524. package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +3 -0
  525. package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
  526. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
  527. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
  528. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  529. package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  530. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
  531. package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  532. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts +12 -0
  533. package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  534. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
  535. package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  536. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts +8 -0
  537. package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  538. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  539. package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  540. package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
  541. package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
  542. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
  543. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
  544. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts +11 -0
  545. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  546. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  547. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  548. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  549. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  550. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  551. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  552. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  553. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  554. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  555. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  556. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts +7 -0
  557. package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  558. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
  559. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
  560. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
  561. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
  562. package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
  563. package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
  564. package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
  565. package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
  566. package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +47 -0
  567. package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
  568. package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
  569. package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
  570. package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
  571. package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
  572. package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
  573. package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
  574. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +5 -0
  575. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
  576. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +13 -0
  577. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
  578. package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
  579. package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
  580. package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
  581. package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
  582. package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
  583. package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
  584. package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
  585. package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
  586. package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
  587. package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
  588. package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
  589. package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +1 -0
  590. package/dist/typescript/module/example/app.config.d.ts +4 -0
  591. package/dist/typescript/module/example/app.config.d.ts.map +1 -0
  592. package/dist/typescript/module/example/src/App.d.ts +3 -0
  593. package/dist/typescript/module/example/src/App.d.ts.map +1 -0
  594. package/dist/typescript/module/package.json +1 -0
  595. package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
  596. package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
  597. package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
  598. package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
  599. package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
  600. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
  601. package/dist/typescript/module/src/babel/index.d.ts +1 -0
  602. package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
  603. package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
  604. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
  605. package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
  606. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
  607. package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
  608. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
  609. package/dist/typescript/module/src/compiler/compiler.d.ts +17 -0
  610. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
  611. package/dist/typescript/module/src/compiler/compiler.types.d.ts +197 -0
  612. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
  613. package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
  614. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
  615. package/dist/typescript/module/src/compiler/declarations.d.ts +118 -0
  616. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
  617. package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
  618. package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
  619. package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
  620. package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
  621. package/dist/typescript/module/src/compiler/index.d.ts +7 -0
  622. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
  623. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
  624. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
  625. package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
  626. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
  627. package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
  628. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
  629. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
  630. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
  631. package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
  632. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
  633. package/dist/typescript/module/src/compiler/selectors.d.ts +24 -0
  634. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
  635. package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts +2 -0
  636. package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts.map +1 -0
  637. package/dist/typescript/module/src/compiler/stylesheet.d.ts +68 -0
  638. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -0
  639. package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
  640. package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
  641. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
  642. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  643. package/dist/typescript/module/src/components/Button.d.ts +13 -0
  644. package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
  645. package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
  646. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
  647. package/dist/typescript/module/src/components/Image.d.ts +8 -0
  648. package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
  649. package/dist/typescript/module/src/components/Switch.d.ts +8 -0
  650. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
  651. package/dist/typescript/module/src/components/Text.d.ts +8 -0
  652. package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
  653. package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
  654. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  655. package/dist/typescript/module/src/components/View.d.ts +8 -0
  656. package/dist/typescript/module/src/components/View.d.ts.map +1 -0
  657. package/dist/typescript/module/src/components/index.d.ts +10 -0
  658. package/dist/typescript/module/src/components/index.d.ts.map +1 -0
  659. package/dist/typescript/module/src/doctor/index.d.ts +2 -0
  660. package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
  661. package/dist/typescript/module/src/index.d.ts +3 -0
  662. package/dist/typescript/module/src/index.d.ts.map +1 -0
  663. package/dist/typescript/module/src/jest/index.d.ts +30 -0
  664. package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
  665. package/dist/typescript/module/src/jest/setup.d.ts +1 -0
  666. package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
  667. package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
  668. package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
  669. package/dist/typescript/module/src/metro/index.d.ts +11 -0
  670. package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
  671. package/dist/typescript/module/src/metro/injection-code.d.ts +16 -0
  672. package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
  673. package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
  674. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
  675. package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
  676. package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
  677. package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
  678. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
  679. package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
  680. package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
  681. package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
  682. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
  683. package/dist/typescript/module/src/poison.pill.d.ts +2 -0
  684. package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
  685. package/dist/typescript/module/src/runtime/index.d.ts +7 -0
  686. package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
  687. package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
  688. package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
  689. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
  690. package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
  691. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
  692. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
  693. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
  694. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
  695. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
  696. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
  697. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
  698. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
  699. package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
  700. package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
  701. package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
  702. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
  703. package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
  704. package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
  705. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
  706. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
  707. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
  708. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
  709. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +38 -0
  710. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
  711. package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
  712. package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
  713. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +55 -0
  714. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
  715. package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
  716. package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
  717. package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
  718. package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
  719. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +10 -0
  720. package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
  721. package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +3 -0
  722. package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
  723. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
  724. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
  725. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
  726. package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
  727. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
  728. package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
  729. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts +12 -0
  730. package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
  731. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
  732. package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
  733. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts +8 -0
  734. package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
  735. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
  736. package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
  737. package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
  738. package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
  739. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
  740. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
  741. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts +11 -0
  742. package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
  743. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
  744. package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
  745. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
  746. package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
  747. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
  748. package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
  749. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
  750. package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
  751. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
  752. package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
  753. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts +7 -0
  754. package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
  755. package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
  756. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
  757. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
  758. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
  759. package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
  760. package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
  761. package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
  762. package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
  763. package/dist/typescript/module/src/runtime/runtime.types.d.ts +47 -0
  764. package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
  765. package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
  766. package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
  767. package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
  768. package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
  769. package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
  770. package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
  771. package/dist/typescript/module/src/runtime/utils/objects.d.ts +5 -0
  772. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
  773. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +13 -0
  774. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
  775. package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
  776. package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
  777. package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
  778. package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
  779. package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
  780. package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
  781. package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
  782. package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
  783. package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
  784. package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
  785. package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
  786. package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
  787. package/package.json +248 -47
  788. package/src/babel/allowedModules.ts +24 -0
  789. package/src/babel/helpers.ts +40 -0
  790. package/src/babel/import-plugin.ts +176 -0
  791. package/src/babel/index.ts +9 -0
  792. package/src/babel/react-native-web.ts +226 -0
  793. package/src/babel/react-native.ts +226 -0
  794. package/src/compiler/atRules.ts +158 -0
  795. package/src/compiler/compiler.ts +305 -0
  796. package/src/compiler/compiler.types.ts +267 -0
  797. package/src/compiler/container-query.ts +97 -0
  798. package/src/compiler/declarations.ts +3177 -0
  799. package/src/compiler/functions-web.ts +44 -0
  800. package/src/compiler/functions.ts +64 -0
  801. package/src/compiler/index.ts +7 -0
  802. package/src/compiler/inheritance.test.ts +121 -0
  803. package/src/compiler/keyframes.ts +86 -0
  804. package/src/compiler/media-query.ts +251 -0
  805. package/src/compiler/pseudo-elements.ts +54 -0
  806. package/src/compiler/selector-builder.ts +586 -0
  807. package/src/compiler/selectors.ts +505 -0
  808. package/src/compiler/split-by-delimiter.ts +19 -0
  809. package/src/compiler/stylesheet.ts +681 -0
  810. package/src/compiler/supports.ts +26 -0
  811. package/src/components/ActivityIndicator.tsx +27 -0
  812. package/src/components/Button.tsx +22 -0
  813. package/src/components/FlatList.tsx +21 -0
  814. package/src/components/Image.tsx +17 -0
  815. package/src/components/Switch.tsx +17 -0
  816. package/src/components/Text.tsx +17 -0
  817. package/src/components/TextInput.tsx +17 -0
  818. package/src/components/View.tsx +17 -0
  819. package/src/components/index.tsx +10 -0
  820. package/src/doctor/index.ts +1 -0
  821. package/src/index.ts +3 -0
  822. package/src/jest/expect.d.ts +1 -0
  823. package/src/jest/index.ts +74 -0
  824. package/src/jest/setup.ts +1 -0
  825. package/src/jest/setupAfterEnv.ts +13 -0
  826. package/src/metro/index.ts +237 -0
  827. package/src/metro/injection-code.ts +38 -0
  828. package/src/metro/metro-transformer.ts +31 -0
  829. package/src/metro/picocolors.ts +77 -0
  830. package/src/metro/resolver.ts +89 -0
  831. package/src/metro/stringify.ts +59 -0
  832. package/src/metro/typescript.ts +73 -0
  833. package/src/poison.pill.ts +36 -0
  834. package/src/runtime/index.ts +7 -0
  835. package/src/runtime/native/api.ts +106 -0
  836. package/src/runtime/native/conditions/attributes.ts +52 -0
  837. package/src/runtime/native/conditions/container-query.ts +162 -0
  838. package/src/runtime/native/conditions/guards.ts +44 -0
  839. package/src/runtime/native/conditions/index.ts +54 -0
  840. package/src/runtime/native/conditions/media-query.ts +98 -0
  841. package/src/runtime/native/index.ts +4 -0
  842. package/src/runtime/native/injection.ts +132 -0
  843. package/src/runtime/native/metro.ts +2 -0
  844. package/src/runtime/native/react/interaction.ts +90 -0
  845. package/src/runtime/native/react/rules.ts +330 -0
  846. package/src/runtime/native/react/useNativeCss.ts +203 -0
  847. package/src/runtime/native/react/usePassthrough.ts +51 -0
  848. package/src/runtime/native/reactivity.ts +243 -0
  849. package/src/runtime/native/reanimated.ts +22 -0
  850. package/src/runtime/native/root.ts +31 -0
  851. package/src/runtime/native/styles/calculate-props.ts +197 -0
  852. package/src/runtime/native/styles/constants.ts +2 -0
  853. package/src/runtime/native/styles/defaults.ts +79 -0
  854. package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
  855. package/src/runtime/native/styles/functions/calc.ts +121 -0
  856. package/src/runtime/native/styles/functions/filters.ts +98 -0
  857. package/src/runtime/native/styles/functions/index.ts +5 -0
  858. package/src/runtime/native/styles/functions/platform-functions.ts +50 -0
  859. package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
  860. package/src/runtime/native/styles/index.ts +197 -0
  861. package/src/runtime/native/styles/resolve.ts +162 -0
  862. package/src/runtime/native/styles/shorthands/_handler.ts +121 -0
  863. package/src/runtime/native/styles/shorthands/animation.ts +122 -0
  864. package/src/runtime/native/styles/shorthands/border.ts +10 -0
  865. package/src/runtime/native/styles/shorthands/box-shadow.ts +54 -0
  866. package/src/runtime/native/styles/shorthands/index.ts +5 -0
  867. package/src/runtime/native/styles/shorthands/text-shadow.ts +17 -0
  868. package/src/runtime/native/styles/shorthands/transform.ts +23 -0
  869. package/src/runtime/native/styles/units.ts +57 -0
  870. package/src/runtime/native/styles/variables.ts +84 -0
  871. package/src/runtime/runtime.native.ts +1 -0
  872. package/src/runtime/runtime.ts +1 -0
  873. package/src/runtime/runtime.types.ts +130 -0
  874. package/src/runtime/utils/components.ts +15 -0
  875. package/src/runtime/utils/dot-notation.types.ts +118 -0
  876. package/src/runtime/utils/index.ts +5 -0
  877. package/src/runtime/utils/objects.ts +109 -0
  878. package/src/runtime/utils/specificity.ts +45 -0
  879. package/src/runtime/utils/style-value.ts +24 -0
  880. package/src/runtime/utils/utils.types.ts +19 -0
  881. package/src/runtime/web/api.ts +88 -0
  882. package/src/runtime/web/assign-style.ts +26 -0
  883. package/src/runtime/web/index.ts +5 -0
  884. package/src/runtime/web/metro.ts +2 -0
  885. package/types.d.ts +70 -0
  886. package/.babelrc +0 -17
  887. package/.editorconfig +0 -17
  888. package/.eslintignore +0 -3
  889. package/.eslintrc +0 -39
  890. package/.npmignore +0 -7
  891. package/build/index.js +0 -299
  892. package/build/utils.js +0 -61
  893. package/circle.yml +0 -31
  894. package/jsconfig.json +0 -9
  895. package/login.sh +0 -11
  896. package/src/index.js +0 -184
  897. package/src/utils.js +0 -32
  898. package/test/rnc.test.js +0 -258
  899. package/yarn.lock +0 -3333
@@ -0,0 +1,2166 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.addAnimationValue = addAnimationValue;
7
+ exports.addTransitionValue = addTransitionValue;
8
+ exports.allEqual = allEqual;
9
+ exports.equal = equal;
10
+ exports.kebabCase = kebabCase;
11
+ exports.parseAlignContent = parseAlignContent;
12
+ exports.parseAlignItems = parseAlignItems;
13
+ exports.parseAlignSelf = parseAlignSelf;
14
+ exports.parseAngle = parseAngle;
15
+ exports.parseAspectRatio = parseAspectRatio;
16
+ exports.parseBorderBlockWidth = parseBorderBlockWidth;
17
+ exports.parseBorderInlineStyle = parseBorderInlineStyle;
18
+ exports.parseBorderInlineWidth = parseBorderInlineWidth;
19
+ exports.parseBorderSideWidth = parseBorderSideWidth;
20
+ exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
21
+ exports.parseBorderStyle = parseBorderStyle;
22
+ exports.parseBorderStyleDeclaration = parseBorderStyleDeclaration;
23
+ exports.parseBoxShadow = parseBoxShadow;
24
+ exports.parseCalcArguments = parseCalcArguments;
25
+ exports.parseCalcFn = parseCalcFn;
26
+ exports.parseColor = parseColor;
27
+ exports.parseColorDeclaration = parseColorDeclaration;
28
+ exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
29
+ exports.parseCustomDeclaration = parseCustomDeclaration;
30
+ exports.parseDeclaration = parseDeclaration;
31
+ exports.parseDimension = parseDimension;
32
+ exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
33
+ exports.parseDisplay = parseDisplay;
34
+ exports.parseEnv = parseEnv;
35
+ exports.parseFontColorDeclaration = parseFontColorDeclaration;
36
+ exports.parseFontSize = parseFontSize;
37
+ exports.parseFontSizeDeclaration = parseFontSizeDeclaration;
38
+ exports.parseFontStyle = parseFontStyle;
39
+ exports.parseFontStyleDeclaration = parseFontStyleDeclaration;
40
+ exports.parseFontVariantCaps = parseFontVariantCaps;
41
+ exports.parseFontVariantCapsDeclaration = parseFontVariantCapsDeclaration;
42
+ exports.parseFontWeight = parseFontWeight;
43
+ exports.parseFontWeightDeclaration = parseFontWeightDeclaration;
44
+ exports.parseGap = parseGap;
45
+ exports.parseJustifyContent = parseJustifyContent;
46
+ exports.parseLength = parseLength;
47
+ exports.parseLengthDeclaration = parseLengthDeclaration;
48
+ exports.parseLengthOrCoercePercentageToRuntime = parseLengthOrCoercePercentageToRuntime;
49
+ exports.parseLengthPercentageOrAuto = parseLengthPercentageOrAuto;
50
+ exports.parseLengthPercentageOrAutoDeclaration = parseLengthPercentageOrAutoDeclaration;
51
+ exports.parseLineHeight = parseLineHeight;
52
+ exports.parseLineHeightDeclaration = parseLineHeightDeclaration;
53
+ exports.parseOverflow = parseOverflow;
54
+ exports.parsePointerEvents = parsePointerEvents;
55
+ exports.parsePosition = parsePosition;
56
+ exports.parseSVGPaint = parseSVGPaint;
57
+ exports.parseScaleValue = parseScaleValue;
58
+ exports.parseSize = parseSize;
59
+ exports.parseSize2DDimensionPercentage = parseSize2DDimensionPercentage;
60
+ exports.parseSize2DDimensionPercentageDeclaration = parseSize2DDimensionPercentageDeclaration;
61
+ exports.parseSizeDeclaration = parseSizeDeclaration;
62
+ exports.parseTextAlign = parseTextAlign;
63
+ exports.parseTextDecorationLine = parseTextDecorationLine;
64
+ exports.parseTextDecorationLineDeclaration = parseTextDecorationLineDeclaration;
65
+ exports.parseTextDecorationStyle = parseTextDecorationStyle;
66
+ exports.parseTextShadow = parseTextShadow;
67
+ exports.parseTime = parseTime;
68
+ exports.parseTranslateProp = parseTranslateProp;
69
+ exports.parseUnparsed = parseUnparsed;
70
+ exports.parseUnparsedDeclaration = parseUnparsedDeclaration;
71
+ exports.parseUnresolvedColor = parseUnresolvedColor;
72
+ exports.parseUserSelect = parseUserSelect;
73
+ exports.parseVerticalAlign = parseVerticalAlign;
74
+ exports.reduceParseUnparsed = reduceParseUnparsed;
75
+ exports.round = round;
76
+ exports.unparsedFunction = unparsedFunction;
77
+ var _colorjs = _interopRequireDefault(require("colorjs.io"));
78
+ var _keyframes = require("./keyframes.js");
79
+ var _selectors = require("./selectors.js");
80
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
81
+ // cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto
82
+
83
+ const CommaSeparator = Symbol("CommaSeparator");
84
+ const propertyRename = {
85
+ "background-image": "experimental_backgroundImage"
86
+ };
87
+
88
+ // TODO: We need a better way to handle this
89
+ const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
90
+ const parsers = {
91
+ "align-content": parseAlignContent,
92
+ "align-items": parseAlignItems,
93
+ "align-self": parseAlignSelf,
94
+ "animation": addAnimationValue,
95
+ "animation-delay": addAnimationValue,
96
+ "animation-direction": addAnimationValue,
97
+ "animation-duration": addAnimationValue,
98
+ "animation-fill-mode": addAnimationValue,
99
+ "animation-iteration-count": addAnimationValue,
100
+ "animation-name": addAnimationValue,
101
+ "animation-play-state": addAnimationValue,
102
+ "animation-timing-function": addAnimationValue,
103
+ "aspect-ratio": parseAspectRatio,
104
+ "background-color": parseColorDeclaration,
105
+ "background-image": parseBackgroundImage,
106
+ "block-size": parseSizeDeclaration,
107
+ "border": parseBorder,
108
+ "border-block": parseBorderBlock,
109
+ "border-block-color": parseBorderColor,
110
+ "border-block-end": parseBorderBlockEnd,
111
+ "border-block-end-color": parseColorDeclaration,
112
+ "border-block-end-width": parseBorderSideWidthDeclaration,
113
+ "border-block-start": parseBorderBlockStart,
114
+ "border-block-start-color": parseColorDeclaration,
115
+ "border-block-start-width": parseBorderSideWidthDeclaration,
116
+ "border-block-style": parseBorderBlockStyle,
117
+ "border-block-width": parseBorderBlockWidth,
118
+ "border-bottom": parseBorderSide,
119
+ "border-bottom-color": parseColorDeclaration,
120
+ "border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
121
+ "border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
122
+ "border-bottom-style": parseBorderStyleDeclaration,
123
+ "border-bottom-width": parseBorderSideWidthDeclaration,
124
+ "border-color": parseBorderColor,
125
+ "border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
126
+ "border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
127
+ "border-inline": parseBorderInline,
128
+ "border-inline-color": parseBorderColor,
129
+ "border-inline-end": parseBorderInlineEnd,
130
+ "border-inline-end-color": parseColorDeclaration,
131
+ "border-inline-end-style": parseBorderInlineStyle,
132
+ "border-inline-end-width": parseBorderSideWidthDeclaration,
133
+ "border-inline-start": parseBorderInlineStart,
134
+ "border-inline-start-color": parseColorDeclaration,
135
+ "border-inline-start-style": parseBorderInlineStyle,
136
+ "border-inline-start-width": parseBorderSideWidthDeclaration,
137
+ "border-inline-style": parseBorderInlineStyle,
138
+ "border-inline-width": parseBorderInlineWidth,
139
+ "border-left": parseBorderSide,
140
+ "border-left-color": parseColorDeclaration,
141
+ "border-left-style": parseBorderStyleDeclaration,
142
+ "border-left-width": parseBorderSideWidthDeclaration,
143
+ "border-radius": parseBorderRadius,
144
+ "border-right": parseBorderSide,
145
+ "border-right-color": parseColorDeclaration,
146
+ "border-right-style": parseBorderStyleDeclaration,
147
+ "border-right-width": parseBorderSideWidthDeclaration,
148
+ "border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
149
+ "border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
150
+ "border-style": parseBorderStyleDeclaration,
151
+ "border-top": parseBorderSide,
152
+ "border-top-color": parseColorDeclaration,
153
+ "border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
154
+ "border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
155
+ "border-top-style": parseBorderStyleDeclaration,
156
+ "border-top-width": parseBorderSideWidthDeclaration,
157
+ "border-width": parseBorderWidth,
158
+ "bottom": parseSizeDeclaration,
159
+ "box-shadow": parseBoxShadow,
160
+ "caret-color": parseColorOrAutoDeclaration,
161
+ "color": parseFontColorDeclaration,
162
+ "column-gap": parseGap,
163
+ "container": parseContainer,
164
+ "container-name": parseContainerName,
165
+ "container-type": parseContainerType,
166
+ "display": parseDisplay,
167
+ "fill": parseSVGPaint,
168
+ "filter": parseFilter,
169
+ "flex": parseFlex,
170
+ "flex-basis": parseLengthPercentageOrAutoDeclaration,
171
+ "flex-direction": ({
172
+ value
173
+ }) => value,
174
+ "flex-flow": parseFlexFlow,
175
+ "flex-grow": ({
176
+ value
177
+ }) => value,
178
+ "flex-shrink": ({
179
+ value
180
+ }) => value,
181
+ "flex-wrap": ({
182
+ value
183
+ }) => value,
184
+ "font": parseFont,
185
+ "font-family": parseFontFamily,
186
+ "font-size": parseFontSizeDeclaration,
187
+ "font-style": parseFontStyleDeclaration,
188
+ "font-variant-caps": parseFontVariantCapsDeclaration,
189
+ "font-weight": parseFontWeightDeclaration,
190
+ "gap": parseGap,
191
+ "height": parseSizeDeclaration,
192
+ "inline-size": parseSizeDeclaration,
193
+ "inset": parseInset,
194
+ "inset-block": parseInsetBlock,
195
+ "inset-block-end": parseLengthPercentageOrAutoDeclaration,
196
+ "inset-block-start": parseLengthPercentageOrAutoDeclaration,
197
+ "inset-inline": parseInsetInline,
198
+ "inset-inline-end": parseLengthPercentageOrAutoDeclaration,
199
+ "inset-inline-start": parseLengthPercentageOrAutoDeclaration,
200
+ "justify-content": parseJustifyContent,
201
+ "left": parseSizeDeclaration,
202
+ "letter-spacing": parseLetterSpacing,
203
+ "line-height": parseLineHeightDeclaration,
204
+ "margin": parseMargin,
205
+ "margin-block": parseMarginBlock,
206
+ "margin-block-end": parseLengthPercentageOrAutoDeclaration,
207
+ "margin-block-start": parseLengthPercentageOrAutoDeclaration,
208
+ "margin-bottom": parseSizeDeclaration,
209
+ "margin-inline": parseMarginInline,
210
+ "margin-inline-end": parseLengthPercentageOrAutoDeclaration,
211
+ "margin-inline-start": parseLengthPercentageOrAutoDeclaration,
212
+ "margin-left": parseSizeDeclaration,
213
+ "margin-right": parseSizeDeclaration,
214
+ "margin-top": parseSizeDeclaration,
215
+ "max-block-size": parseSizeDeclaration,
216
+ "max-height": parseSizeDeclaration,
217
+ "max-inline-size": parseSizeDeclaration,
218
+ "max-width": parseSizeDeclaration,
219
+ "min-block-size": parseSizeDeclaration,
220
+ "min-height": parseSizeDeclaration,
221
+ "min-inline-size": parseSizeDeclaration,
222
+ "min-width": parseSizeDeclaration,
223
+ "opacity": ({
224
+ value
225
+ }) => value,
226
+ "overflow": parseOverflow,
227
+ "padding": parsePadding,
228
+ "padding-block": parsePaddingBlock,
229
+ "padding-block-end": parseLengthPercentageOrAutoDeclaration,
230
+ "padding-block-start": parseLengthPercentageOrAutoDeclaration,
231
+ "padding-bottom": parseSizeDeclaration,
232
+ "padding-inline": parsePaddingInline,
233
+ "padding-inline-end": parseLengthPercentageOrAutoDeclaration,
234
+ "padding-inline-start": parseLengthPercentageOrAutoDeclaration,
235
+ "padding-left": parseSizeDeclaration,
236
+ "padding-right": parseSizeDeclaration,
237
+ "padding-top": parseSizeDeclaration,
238
+ "position": parsePosition,
239
+ "right": parseSizeDeclaration,
240
+ "rotate": parseRotate,
241
+ "row-gap": parseGap,
242
+ "scale": parseScale,
243
+ "stroke": parseSVGPaint,
244
+ "stroke-width": parseLengthDeclaration,
245
+ "text-align": parseTextAlign,
246
+ "text-decoration": parseTextDecoration,
247
+ "text-decoration-color": parseColorDeclaration,
248
+ "text-decoration-line": parseTextDecorationLineDeclaration,
249
+ "text-decoration-style": parseTextDecorationStyle,
250
+ "text-shadow": parseTextShadow,
251
+ "text-transform": ({
252
+ value
253
+ }) => value.case,
254
+ "top": parseSizeDeclaration,
255
+ "transform": parseTransform,
256
+ "transition": addTransitionValue,
257
+ "transition-delay": addTransitionValue,
258
+ "transition-duration": addTransitionValue,
259
+ "transition-property": addTransitionValue,
260
+ "transition-timing-function": addTransitionValue,
261
+ "translate": parseTranslate,
262
+ "user-select": parseUserSelect,
263
+ "vertical-align": parseVerticalAlign,
264
+ "width": parseSizeDeclaration,
265
+ "z-index": parseZIndex
266
+ };
267
+
268
+ // This is missing LightningCSS types
269
+ parsers["pointer-events"] = parsePointerEvents;
270
+ const validProperties = new Set(Object.keys(parsers));
271
+ function parseDeclaration(declaration, builder) {
272
+ if ("vendorPrefix" in declaration && declaration.vendorPrefix.length) {
273
+ return;
274
+ }
275
+ if ("value" in declaration && typeof declaration.value === "object" && "vendorPrefix" in declaration.value && Array.isArray(declaration.value.vendorPrefix) && declaration.value.vendorPrefix.length) {
276
+ return;
277
+ }
278
+ if (declaration.property === "unparsed") {
279
+ parseUnparsedDeclaration(declaration, builder);
280
+ } else if (declaration.property === "custom") {
281
+ parseCustomDeclaration(declaration, builder);
282
+ } else {
283
+ parseWithParser(declaration, builder);
284
+ }
285
+ }
286
+ function parseWithParser(declaration, builder) {
287
+ if (declaration.property in parsers) {
288
+ const parser = parsers[declaration.property];
289
+ builder.descriptorProperty = declaration.property;
290
+ builder.setWarningProperty(declaration.property);
291
+ const value = parser(declaration, builder, declaration.property);
292
+ if (value !== undefined) {
293
+ builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, value);
294
+ }
295
+ } else {
296
+ builder.addWarning("property", declaration.property);
297
+ }
298
+ }
299
+ function parseInsetBlock({
300
+ value
301
+ }, builder) {
302
+ builder.addShorthand("inset-block", {
303
+ "inset-block-start": parseLengthPercentageOrAuto(value.blockStart, builder),
304
+ "inset-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder)
305
+ });
306
+ }
307
+ function parseInsetInline({
308
+ value
309
+ }, builder) {
310
+ builder.addShorthand("inset-inline", {
311
+ "inset-block-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
312
+ "inset-block-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
313
+ });
314
+ }
315
+ function parseInset({
316
+ value
317
+ }, builder) {
318
+ builder.addShorthand("inset", {
319
+ top: parseLengthPercentageOrAuto(value.top, builder),
320
+ bottom: parseLengthPercentageOrAuto(value.bottom, builder),
321
+ left: parseLengthPercentageOrAuto(value.left, builder),
322
+ right: parseLengthPercentageOrAuto(value.right, builder)
323
+ });
324
+ }
325
+ function parseBorderRadius({
326
+ value
327
+ }, builder) {
328
+ builder.addShorthand("border-radius", {
329
+ "border-bottom-left-radius": parseSize2DDimensionPercentage(value.bottomLeft, builder),
330
+ "border-bottom-right-radius": parseSize2DDimensionPercentage(value.bottomRight, builder),
331
+ "border-top-left-radius": parseSize2DDimensionPercentage(value.topLeft, builder),
332
+ "border-top-right-radius": parseSize2DDimensionPercentage(value.topRight, builder)
333
+ });
334
+ }
335
+ function parseBorderColor(declaration, builder) {
336
+ switch (declaration.property) {
337
+ case "border-color":
338
+ builder.addShorthand("border-color", {
339
+ "border-top-color": parseColor(declaration.value.top, builder),
340
+ "border-bottom-color": parseColor(declaration.value.bottom, builder),
341
+ "border-left-color": parseColor(declaration.value.left, builder),
342
+ "border-right-color": parseColor(declaration.value.right, builder)
343
+ });
344
+ break;
345
+ case "border-block-color":
346
+ builder.addDescriptor("border-top-color", parseColor(declaration.value.start, builder));
347
+ builder.addDescriptor("border-bottom-color", parseColor(declaration.value.end, builder));
348
+ break;
349
+ case "border-inline-color":
350
+ builder.addDescriptor("border-left-color", parseColor(declaration.value.start, builder));
351
+ builder.addDescriptor("border-right-color", parseColor(declaration.value.end, builder));
352
+ break;
353
+ }
354
+ }
355
+ function parseBorderWidth({
356
+ value
357
+ }, builder) {
358
+ builder.addShorthand("border-width", {
359
+ "border-top-width": parseBorderSideWidth(value.top, builder),
360
+ "border-bottom-width": parseBorderSideWidth(value.bottom, builder),
361
+ "border-left-width": parseBorderSideWidth(value.left, builder),
362
+ "border-right-width": parseBorderSideWidth(value.right, builder)
363
+ });
364
+ }
365
+ function parseBorder({
366
+ value
367
+ }, builder) {
368
+ builder.addShorthand("border", {
369
+ "border-width": parseBorderSideWidth(value.width, builder),
370
+ "border-style": parseBorderStyle(value.style, builder),
371
+ "border-color": parseColor(value.color, builder)
372
+ });
373
+ }
374
+ function parseBorderSide({
375
+ value,
376
+ property
377
+ }, builder) {
378
+ builder.addDescriptor(property + "-color", parseColor(value.color, builder));
379
+ builder.addDescriptor(property + "-width", parseBorderSideWidth(value.width, builder));
380
+ }
381
+ function parseBorderBlock({
382
+ value
383
+ }, builder) {
384
+ builder.addDescriptor("border-top-color", parseColor(value.color, builder));
385
+ builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
386
+ builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
387
+ builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
388
+ }
389
+ function parseBorderBlockStart({
390
+ value
391
+ }, builder) {
392
+ builder.addDescriptor("border-top-color", parseColor(value.color, builder));
393
+ builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
394
+ }
395
+ function parseBorderBlockEnd({
396
+ value
397
+ }, builder) {
398
+ builder.addDescriptor("border-bottom-color", parseColor(value.color, builder));
399
+ builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
400
+ }
401
+ function parseBorderInline({
402
+ value
403
+ }, builder) {
404
+ builder.addDescriptor("border-left-color", parseColor(value.color, builder));
405
+ builder.addDescriptor("border-right-color", parseColor(value.color, builder));
406
+ builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
407
+ builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
408
+ }
409
+ function parseBorderInlineStart({
410
+ value
411
+ }, builder) {
412
+ builder.addDescriptor("border-left-color", parseColor(value.color, builder));
413
+ builder.addDescriptor("border-left-width", parseBorderSideWidth(value.width, builder));
414
+ }
415
+ function parseBorderInlineEnd({
416
+ value
417
+ }, builder) {
418
+ builder.addDescriptor("border-right-color", parseColor(value.color, builder));
419
+ builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
420
+ }
421
+ function parseBorderInlineWidth(declaration, builder) {
422
+ builder.addDescriptor("border-left-width", parseBorderSideWidth(declaration.value.start, builder));
423
+ builder.addDescriptor("border-right-width", parseBorderSideWidth(declaration.value.end, builder));
424
+ }
425
+ function parseBorderInlineStyle(declaration, builder) {
426
+ if (typeof declaration.value === "string") {
427
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value, builder));
428
+ } else if (declaration.value.start === declaration.value.end) {
429
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value.start, builder));
430
+ } else {
431
+ builder.addWarning("property", "border-inline-style");
432
+ }
433
+ }
434
+ function parseFlexFlow({
435
+ value
436
+ }, builder) {
437
+ builder.addDescriptor("flexWrap", value.wrap);
438
+ builder.addDescriptor("flexDirection", value.direction);
439
+ }
440
+ function parseFlex({
441
+ value
442
+ }, builder) {
443
+ builder.addDescriptor("flex-grow", value.grow);
444
+ builder.addDescriptor("flex-shrink", value.shrink);
445
+ builder.addDescriptor("flex-basis", parseLengthPercentageOrAuto(value.basis, builder));
446
+ }
447
+ function parseMargin({
448
+ value
449
+ }, builder) {
450
+ builder.addShorthand("margin", {
451
+ "margin-top": parseSize(value.top, builder, {
452
+ allowAuto: true
453
+ }),
454
+ "margin-bottom": parseSize(value.bottom, builder, {
455
+ allowAuto: true
456
+ }),
457
+ "margin-left": parseSize(value.left, builder, {
458
+ allowAuto: true
459
+ }),
460
+ "margin-right": parseSize(value.right, builder, {
461
+ allowAuto: true
462
+ })
463
+ });
464
+ }
465
+ function parseMarginBlock({
466
+ value
467
+ }, builder) {
468
+ builder.addShorthand("margin-block", {
469
+ "margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder),
470
+ "margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder)
471
+ });
472
+ }
473
+ function parseMarginInline({
474
+ value
475
+ }, builder) {
476
+ builder.addShorthand("margin-inline", {
477
+ "margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
478
+ "margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
479
+ });
480
+ }
481
+ function parsePadding({
482
+ value
483
+ }, builder) {
484
+ builder.addShorthand("padding", {
485
+ "padding-top": parseSize(value.top, builder),
486
+ "padding-bottom": parseSize(value.bottom, builder),
487
+ "padding-left": parseSize(value.left, builder),
488
+ "padding-right": parseSize(value.right, builder)
489
+ });
490
+ }
491
+ function parsePaddingBlock({
492
+ value
493
+ }, builder) {
494
+ builder.addShorthand("padding-block", {
495
+ "padding-block-start": parseLengthPercentageOrAuto(value.blockStart, builder),
496
+ "padding-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder)
497
+ });
498
+ }
499
+ function parsePaddingInline({
500
+ value
501
+ }, builder) {
502
+ builder.addShorthand("padding-inline", {
503
+ "padding-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
504
+ "padding-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
505
+ });
506
+ }
507
+ function parseFont({
508
+ value
509
+ }, builder) {
510
+ builder.addDescriptor("font-family", value.family[0]);
511
+ builder.addDescriptor("line-height", parseLineHeight(value.lineHeight, builder));
512
+ builder.addDescriptor("font-size", parseFontSize(value.size, builder));
513
+ builder.addDescriptor("font-style", parseFontStyle(value.style, builder));
514
+ builder.addDescriptor("font-variant-caps", parseFontVariantCaps(value.variantCaps, builder));
515
+ builder.addDescriptor("font-weight", parseFontWeight(value.weight, builder));
516
+ }
517
+ function parseTransform({
518
+ value
519
+ }, builder) {
520
+ builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
521
+ switch (t.type) {
522
+ case "perspective":
523
+ return [[{}, "perspective", parseLength(t.value, builder)]];
524
+ case "translate":
525
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
526
+ case "translateX":
527
+ return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
528
+ case "translateY":
529
+ return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
530
+ case "rotate":
531
+ return [[{}, "rotate", parseAngle(t.value, builder)]];
532
+ case "rotateX":
533
+ return [[{}, "rotateX", parseAngle(t.value, builder)]];
534
+ case "rotateY":
535
+ return [[{}, "rotateY", parseAngle(t.value, builder)]];
536
+ case "rotateZ":
537
+ return [[{}, "rotateZ", parseAngle(t.value, builder)]];
538
+ case "scale":
539
+ return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
540
+ case "scaleX":
541
+ return [[{}, "scaleX", parseLength(t.value, builder)]];
542
+ case "scaleY":
543
+ return [[{}, "scaleY", parseLength(t.value, builder)]];
544
+ case "skew":
545
+ return [[{}, "skewX", parseAngle(t.value[0], builder)], [{}, "skewY", parseAngle(t.value[1], builder)]];
546
+ case "skewX":
547
+ return [[{}, "skewX", parseAngle(t.value, builder)]];
548
+ case "skewY":
549
+ return [[{}, "skewY", parseAngle(t.value, builder)]];
550
+ case "translateZ":
551
+ case "translate3d":
552
+ case "scaleZ":
553
+ case "scale3d":
554
+ case "rotate3d":
555
+ case "matrix":
556
+ case "matrix3d":
557
+ return [[]];
558
+ }
559
+ })]);
560
+ return;
561
+ }
562
+ function parseTranslate({
563
+ value
564
+ }, builder) {
565
+ builder.addDescriptor("translateX", [{}, "translateX", parseTranslateProp(value, "x", builder)]);
566
+ builder.addDescriptor("translateY", [{}, "translateY", parseTranslateProp(value, "y", builder)]);
567
+ }
568
+ function parseRotate({
569
+ value
570
+ }, builder) {
571
+ if (value.x) {
572
+ builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
573
+ }
574
+ if (value.y) {
575
+ builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
576
+ }
577
+ if (value.z) {
578
+ builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
579
+ }
580
+ }
581
+ function parseScale({
582
+ value
583
+ }, builder) {
584
+ builder.addDescriptor("scaleX", [{}, "scaleX", parseScaleValue(value, "x", builder)]);
585
+ builder.addDescriptor("scaleY", [{}, "scaleY", parseScaleValue(value, "y", builder)]);
586
+ }
587
+ function parseScaleValue(translate, prop, builder) {
588
+ if (translate === "none") {
589
+ return 0;
590
+ }
591
+ return parseLength(translate[prop], builder);
592
+ }
593
+ function parseLetterSpacing({
594
+ value
595
+ }, builder) {
596
+ if (value.type === "normal") {
597
+ return;
598
+ }
599
+ const descriptor = parseLength(value.value, builder);
600
+ if (Array.isArray(descriptor) && descriptor[1] === "em" && typeof descriptor[2] === "number") {
601
+ return descriptor[2];
602
+ }
603
+ return descriptor;
604
+ }
605
+ function parseTextDecoration({
606
+ value
607
+ }, builder) {
608
+ builder.addDescriptor("text-decoration-color", parseColor(value.color, builder));
609
+ builder.addDescriptor("text-decoration-line", parseTextDecorationLine(value.line, builder));
610
+ }
611
+ function parseZIndex({
612
+ value
613
+ }, builder) {
614
+ if (value.type === "integer") {
615
+ return parseLength(value.value, builder);
616
+ } else {
617
+ builder.addWarning("value", value.type);
618
+ return;
619
+ }
620
+ }
621
+ function parseContainerType(_declaration, builder) {
622
+ builder.addContainer(["___default___"]);
623
+ return;
624
+ }
625
+ function parseContainerName({
626
+ value
627
+ }, builder) {
628
+ builder.addContainer(value.type === "none" ? false : value.value);
629
+ return;
630
+ }
631
+ function parseContainer({
632
+ value
633
+ }, builder) {
634
+ builder.addContainer(value.name.type === "none" ? false : value.name.value);
635
+ return;
636
+ }
637
+ function parseUnparsedDeclaration(declaration, builder) {
638
+ let property = declaration.value.propertyId.property;
639
+ if (!(property in parsers)) {
640
+ builder.addWarning("property", property);
641
+ return;
642
+ }
643
+ builder.setWarningProperty(property);
644
+
645
+ /**
646
+ * React Native doesn't support all the logical properties
647
+ */
648
+ const rename = propertyRename[property];
649
+ if (rename) {
650
+ property = rename;
651
+ }
652
+
653
+ /**
654
+ * Unparsed shorthand properties need to be parsed at runtime
655
+ */
656
+ builder.descriptorProperty = property;
657
+ if (unparsedRuntimeParsing.has(property)) {
658
+ const args = parseUnparsed(declaration.value.value, builder, property);
659
+ if (property === "animation") {
660
+ builder.addDescriptor("animation", [{}, property, args]);
661
+ } else {
662
+ builder.addDescriptor(property, [{}, (0, _selectors.toRNProperty)(property), args, 1]);
663
+ }
664
+ } else {
665
+ const value = parseUnparsed(declaration.value.value, builder, property);
666
+ builder.addDescriptor(property, value);
667
+ if (property === "font-size") {
668
+ builder.addDescriptor("--__rn-css-em", value);
669
+ }
670
+ if (property === "color") {
671
+ builder.addDescriptor("--__rn-css-current-color", value);
672
+ }
673
+ }
674
+ }
675
+ function parseCustomDeclaration(declaration, builder) {
676
+ const property = declaration.value.name;
677
+ if (property === "-webkit-line-clamp") {
678
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
679
+ } else if (property === "-rn-ripple-style") {
680
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
681
+ } else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
682
+ builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
683
+ } else {
684
+ builder.addWarning("property", declaration.value.name);
685
+ }
686
+ }
687
+ function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
688
+ const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
689
+ if (result.length === 0) {
690
+ return undefined;
691
+ }
692
+ let currentGroup = [];
693
+ let groups = [currentGroup];
694
+ for (const value of result) {
695
+ if (value === CommaSeparator) {
696
+ currentGroup = [];
697
+ groups.push(currentGroup);
698
+ } else {
699
+ currentGroup.push(value);
700
+ }
701
+ }
702
+
703
+ // Groups are the tokens grouped together by comma location
704
+ // If a group only has 1 item, it shouldn't be an array
705
+ groups = groups.flatMap(group => {
706
+ if (!Array.isArray(group)) {
707
+ return [];
708
+ }
709
+ if (group.length === 0) {
710
+ return [];
711
+ } else if (group.length === 1) {
712
+ const first = group[0];
713
+ if (first === undefined) {
714
+ return [];
715
+ } else {
716
+ return [first];
717
+ }
718
+ } else if (
719
+ // This is a special case for <ratio> values
720
+ group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
721
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
722
+ return [group.join(" ")];
723
+ } else {
724
+ return [group];
725
+ }
726
+ });
727
+ return groups.length === 1 ? groups[0] : groups;
728
+ }
729
+ function unparsedFunction(token, builder, property, allowAuto) {
730
+ return [{}, (0, _selectors.toRNProperty)(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
731
+ }
732
+
733
+ /**
734
+ * When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
735
+ * This export function best efforts parsing it into a export function that we can evaluate at runtime
736
+ */
737
+ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
738
+ if (tokenOrValue === undefined || tokenOrValue === null) {
739
+ return;
740
+ }
741
+ if (typeof tokenOrValue === "string") {
742
+ if (tokenOrValue === "true") {
743
+ return true;
744
+ } else if (tokenOrValue === "false") {
745
+ return false;
746
+ } else if (tokenOrValue === "currentcolor") {
747
+ return [{}, "var", "__rn-css-current-color"];
748
+ } else {
749
+ return tokenOrValue;
750
+ }
751
+ }
752
+ if (typeof tokenOrValue === "number") {
753
+ return round(tokenOrValue);
754
+ }
755
+ if (Array.isArray(tokenOrValue)) {
756
+ const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
757
+ if (!args) return;
758
+ if (Array.isArray(args) && args.length === 1) return args[0];
759
+ return args;
760
+ }
761
+ switch (tokenOrValue.type) {
762
+ case "unresolved-color":
763
+ {
764
+ return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
765
+ }
766
+ case "var":
767
+ {
768
+ let args = tokenOrValue.value.name.ident.slice(2);
769
+ const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
770
+ if (fallback !== undefined) {
771
+ args = [args, fallback];
772
+ }
773
+ return [{}, "var", args, 1];
774
+ }
775
+ case "function":
776
+ {
777
+ switch (tokenOrValue.value.name) {
778
+ case "blur":
779
+ case "brightness":
780
+ case "contrast":
781
+ case "cubic-bezier":
782
+ case "drop-shadow":
783
+ case "fontScale":
784
+ case "getPixelSizeForLayoutSize":
785
+ case "grayscale":
786
+ case "hsl":
787
+ case "hsla":
788
+ case "hue-rotate":
789
+ case "invert":
790
+ case "opacity":
791
+ case "pixelScale":
792
+ case "platformColor":
793
+ case "rgb":
794
+ case "rgba":
795
+ case "rotate":
796
+ case "rotateX":
797
+ case "rotateY":
798
+ case "roundToNearestPixel":
799
+ case "saturate":
800
+ case "scale":
801
+ case "scaleX":
802
+ case "scaleY":
803
+ case "sepia":
804
+ case "shadow":
805
+ case "skewX":
806
+ case "skewY":
807
+ case "steps":
808
+ case "translate":
809
+ case "translateX":
810
+ case "translateY":
811
+ return unparsedFunction(tokenOrValue, builder, property, allowAuto);
812
+ case "linear-gradient":
813
+ case "radial-gradient":
814
+ // These are special as React Native requires the '-' in their name
815
+ return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
816
+ case "hairlineWidth":
817
+ return [{}, tokenOrValue.value.name, []];
818
+ case "calc":
819
+ case "max":
820
+ case "min":
821
+ case "clamp":
822
+ return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
823
+ default:
824
+ {
825
+ builder.addWarning("value", `${tokenOrValue.value.name}()`);
826
+ return;
827
+ }
828
+ }
829
+ }
830
+ case "length":
831
+ return parseLength(tokenOrValue.value, builder);
832
+ case "angle":
833
+ return parseAngle(tokenOrValue.value, builder);
834
+ case "token":
835
+ switch (tokenOrValue.value.type) {
836
+ case "string":
837
+ case "ident":
838
+ {
839
+ const value = tokenOrValue.value.value;
840
+ if (!allowAuto && value === "auto") {
841
+ builder.addWarning("value", value);
842
+ return;
843
+ }
844
+ if (value === "inherit" || value === "initial") {
845
+ builder.addWarning("value", value);
846
+ return;
847
+ } else if (value === "currentcolor") {
848
+ return [{}, "var", "__rn-css-current-color"];
849
+ }
850
+ if (value === "true") {
851
+ return true;
852
+ } else if (value === "false") {
853
+ return false;
854
+ } else if (value === "infinity") {
855
+ return Number.MAX_SAFE_INTEGER;
856
+ } else {
857
+ return value;
858
+ }
859
+ }
860
+ case "number":
861
+ {
862
+ return round(tokenOrValue.value.value);
863
+ }
864
+ case "function":
865
+ builder.addWarning("value", tokenOrValue.value.value);
866
+ return;
867
+ case "percentage":
868
+ return `${round(tokenOrValue.value.value * 100)}%`;
869
+ case "dimension":
870
+ return parseDimension(tokenOrValue.value, builder);
871
+ case "comma":
872
+ return CommaSeparator;
873
+ case "delim":
874
+ {
875
+ if (tokenOrValue.value.value === "/") {
876
+ return tokenOrValue.value.value;
877
+ }
878
+ return;
879
+ }
880
+ case "at-keyword":
881
+ case "hash":
882
+ case "id-hash":
883
+ case "unquoted-url":
884
+ case "white-space":
885
+ case "comment":
886
+ case "colon":
887
+ case "semicolon":
888
+ case "include-match":
889
+ case "dash-match":
890
+ case "prefix-match":
891
+ case "suffix-match":
892
+ case "substring-match":
893
+ case "cdo":
894
+ case "cdc":
895
+ case "parenthesis-block":
896
+ case "square-bracket-block":
897
+ case "curly-bracket-block":
898
+ case "bad-url":
899
+ case "bad-string":
900
+ case "close-parenthesis":
901
+ case "close-square-bracket":
902
+ case "close-curly-bracket":
903
+ return;
904
+ default:
905
+ {
906
+ tokenOrValue.value;
907
+ return;
908
+ }
909
+ }
910
+ case "color":
911
+ return parseColor(tokenOrValue.value, builder);
912
+ case "env":
913
+ return parseEnv(tokenOrValue.value, builder);
914
+ case "time":
915
+ return parseTime(tokenOrValue.value);
916
+ case "url":
917
+ case "resolution":
918
+ case "dashed-ident":
919
+ case "animation-name":
920
+ return;
921
+ default:
922
+ {
923
+ tokenOrValue;
924
+ }
925
+ }
926
+ return;
927
+ }
928
+ function parseLengthDeclaration(declaration, builder) {
929
+ return parseLength(declaration.value, builder);
930
+ }
931
+ function parseLength(length, builder) {
932
+ const {
933
+ inlineRem = 14
934
+ } = builder.getOptions();
935
+ if (typeof length === "number") {
936
+ return round(length);
937
+ }
938
+ if ("unit" in length) {
939
+ switch (length.unit) {
940
+ case "px":
941
+ {
942
+ if (length.value === Infinity) {
943
+ return 9999;
944
+ } else if (length.value === -Infinity) {
945
+ return -9999;
946
+ } else {
947
+ // Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
948
+ const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
949
+ return round(value);
950
+ }
951
+ }
952
+ case "rem":
953
+ if (typeof inlineRem === "number") {
954
+ return length.value * inlineRem;
955
+ } else {
956
+ return [{}, "rem", round(length.value)];
957
+ }
958
+ case "vw":
959
+ case "vh":
960
+ case "em":
961
+ return [{}, length.unit, round(length.value), 1];
962
+ case "in":
963
+ case "cm":
964
+ case "mm":
965
+ case "q":
966
+ case "pt":
967
+ case "pc":
968
+ case "ex":
969
+ case "rex":
970
+ case "ch":
971
+ case "rch":
972
+ case "cap":
973
+ case "rcap":
974
+ case "ic":
975
+ case "ric":
976
+ case "lh":
977
+ case "rlh":
978
+ case "lvw":
979
+ case "svw":
980
+ case "dvw":
981
+ case "cqw":
982
+ case "lvh":
983
+ case "svh":
984
+ case "dvh":
985
+ case "cqh":
986
+ case "vi":
987
+ case "svi":
988
+ case "lvi":
989
+ case "dvi":
990
+ case "cqi":
991
+ case "vb":
992
+ case "svb":
993
+ case "lvb":
994
+ case "dvb":
995
+ case "cqb":
996
+ case "vmin":
997
+ case "svmin":
998
+ case "lvmin":
999
+ case "dvmin":
1000
+ case "cqmin":
1001
+ case "vmax":
1002
+ case "svmax":
1003
+ case "lvmax":
1004
+ case "dvmax":
1005
+ case "cqmax":
1006
+ builder.addWarning("value", `${length.value}${length.unit}`);
1007
+ return undefined;
1008
+ default:
1009
+ {
1010
+ length.unit;
1011
+ }
1012
+ }
1013
+ } else {
1014
+ switch (length.type) {
1015
+ case "calc":
1016
+ {
1017
+ // TODO: Add the calc polyfill
1018
+ return undefined;
1019
+ }
1020
+ case "number":
1021
+ {
1022
+ return round(length.value);
1023
+ }
1024
+ case "percentage":
1025
+ {
1026
+ return `${round(length.value * 100)}%`;
1027
+ }
1028
+ case "dimension":
1029
+ case "value":
1030
+ {
1031
+ return parseLength(length.value, builder);
1032
+ }
1033
+ }
1034
+ }
1035
+ return;
1036
+ }
1037
+ function parseAngle(angle, builder) {
1038
+ if (typeof angle === "number") {
1039
+ return `${angle}deg`;
1040
+ }
1041
+ switch (angle.type) {
1042
+ case "deg":
1043
+ case "rad":
1044
+ return `${angle.value}${angle.type}`;
1045
+ default:
1046
+ builder.addWarning("value", `${angle.value} ${angle.type}`);
1047
+ return undefined;
1048
+ }
1049
+ }
1050
+ function parseSizeDeclaration(declaration, builder) {
1051
+ return parseSize(declaration.value, builder);
1052
+ }
1053
+ function parsePointerEvents({
1054
+ value
1055
+ }, builder) {
1056
+ switch (value) {
1057
+ case "none":
1058
+ case "box-none":
1059
+ case "box-only":
1060
+ case "auto":
1061
+ return value;
1062
+ case "visible":
1063
+ case "visiblePainted":
1064
+ case "visibleFill":
1065
+ case "visibleStroke":
1066
+ case "painted":
1067
+ case "fill":
1068
+ case "stroke":
1069
+ builder.addWarning("value", value);
1070
+ }
1071
+ return;
1072
+ }
1073
+ function parseSize(size, builder, options, {
1074
+ allowAuto = false
1075
+ } = {}) {
1076
+ allowAuto = (typeof options === "object" ? options.allowAuto : allowAuto) ?? false;
1077
+ switch (size.type) {
1078
+ case "length-percentage":
1079
+ return parseLength(size.value, builder);
1080
+ case "none":
1081
+ return size.type;
1082
+ case "auto":
1083
+ if (allowAuto) {
1084
+ return size.type;
1085
+ } else {
1086
+ builder.addWarning("value", size.type);
1087
+ return undefined;
1088
+ }
1089
+ case "min-content":
1090
+ case "max-content":
1091
+ case "fit-content":
1092
+ case "fit-content-function":
1093
+ case "stretch":
1094
+ case "contain":
1095
+ builder.addWarning("value", size.type);
1096
+ return undefined;
1097
+ default:
1098
+ {
1099
+ size;
1100
+ }
1101
+ }
1102
+ return;
1103
+ }
1104
+ function parseColorOrAutoDeclaration({
1105
+ value
1106
+ }, builder) {
1107
+ if (value.type === "auto") {
1108
+ builder.addWarning("value", `Invalid color value ${value.type}`);
1109
+ return;
1110
+ } else {
1111
+ return parseColor(value.value, builder);
1112
+ }
1113
+ }
1114
+ function parseFontColorDeclaration(declaration, builder) {
1115
+ parseColorDeclaration(declaration, builder);
1116
+ builder.addDescriptor("--__rn-css-color", parseColor(declaration.value, builder));
1117
+ }
1118
+ function parseColorDeclaration(declaration, builder) {
1119
+ builder.addDescriptor(declaration.property, parseColor(declaration.value, builder));
1120
+ }
1121
+ function parseColor(cssColor, builder) {
1122
+ if (typeof cssColor === "string") {
1123
+ if (namedColors.has(cssColor)) {
1124
+ return cssColor;
1125
+ }
1126
+ return;
1127
+ }
1128
+ let color;
1129
+ const {
1130
+ hexColors = true,
1131
+ colorPrecision
1132
+ } = builder.getOptions();
1133
+ switch (cssColor.type) {
1134
+ case "currentcolor":
1135
+ return [{}, "var", "__rn-css-current-color"];
1136
+ case "light-dark":
1137
+ {
1138
+ const extraRule = {
1139
+ s: [],
1140
+ m: [["=", "prefers-color-scheme", "dark"]]
1141
+ };
1142
+ builder.addUnnamedDescriptor(parseColor(cssColor.dark, builder), false, extraRule);
1143
+ builder.addExtraRule(extraRule);
1144
+ return parseColor(cssColor.light, builder);
1145
+ }
1146
+ case "rgb":
1147
+ {
1148
+ color = new _colorjs.default({
1149
+ space: "sRGB",
1150
+ coords: [cssColor.r / 255, cssColor.g / 255, cssColor.b / 255],
1151
+ alpha: cssColor.alpha
1152
+ });
1153
+ break;
1154
+ }
1155
+ case "hsl":
1156
+ color = new _colorjs.default({
1157
+ space: cssColor.type,
1158
+ coords: [cssColor.h, cssColor.s, cssColor.l],
1159
+ alpha: cssColor.alpha
1160
+ });
1161
+ break;
1162
+ case "hwb":
1163
+ color = new _colorjs.default({
1164
+ space: cssColor.type,
1165
+ coords: [cssColor.h, cssColor.w, cssColor.b],
1166
+ alpha: cssColor.alpha
1167
+ });
1168
+ break;
1169
+ case "lab":
1170
+ color = new _colorjs.default({
1171
+ space: cssColor.type,
1172
+ coords: [cssColor.l, cssColor.a, cssColor.b],
1173
+ alpha: cssColor.alpha
1174
+ });
1175
+ break;
1176
+ case "lch":
1177
+ color = new _colorjs.default({
1178
+ space: cssColor.type,
1179
+ coords: [cssColor.l, cssColor.c, cssColor.h],
1180
+ alpha: cssColor.alpha
1181
+ });
1182
+ break;
1183
+ case "oklab":
1184
+ color = new _colorjs.default({
1185
+ space: cssColor.type,
1186
+ coords: [cssColor.l, cssColor.a, cssColor.b],
1187
+ alpha: cssColor.alpha
1188
+ });
1189
+ break;
1190
+ case "oklch":
1191
+ color = new _colorjs.default({
1192
+ space: cssColor.type,
1193
+ coords: [cssColor.l, cssColor.c, cssColor.h],
1194
+ alpha: cssColor.alpha
1195
+ });
1196
+ break;
1197
+ case "srgb":
1198
+ color = new _colorjs.default({
1199
+ space: cssColor.type,
1200
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1201
+ alpha: cssColor.alpha
1202
+ });
1203
+ break;
1204
+ case "srgb-linear":
1205
+ color = new _colorjs.default({
1206
+ space: cssColor.type,
1207
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1208
+ alpha: cssColor.alpha
1209
+ });
1210
+ break;
1211
+ case "display-p3":
1212
+ color = new _colorjs.default({
1213
+ space: "p3",
1214
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1215
+ alpha: cssColor.alpha
1216
+ });
1217
+ break;
1218
+ case "a98-rgb":
1219
+ color = new _colorjs.default({
1220
+ space: "a98rgb",
1221
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1222
+ alpha: cssColor.alpha
1223
+ });
1224
+ break;
1225
+ case "prophoto-rgb":
1226
+ color = new _colorjs.default({
1227
+ space: "prophoto",
1228
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1229
+ alpha: cssColor.alpha
1230
+ });
1231
+ break;
1232
+ case "rec2020":
1233
+ color = new _colorjs.default({
1234
+ space: cssColor.type,
1235
+ coords: [cssColor.r, cssColor.g, cssColor.b],
1236
+ alpha: cssColor.alpha
1237
+ });
1238
+ break;
1239
+ case "xyz-d50":
1240
+ color = new _colorjs.default({
1241
+ space: cssColor.type,
1242
+ coords: [cssColor.x, cssColor.y, cssColor.z],
1243
+ alpha: cssColor.alpha
1244
+ });
1245
+ break;
1246
+ case "xyz-d65":
1247
+ color = new _colorjs.default({
1248
+ space: cssColor.type,
1249
+ coords: [cssColor.x, cssColor.y, cssColor.z],
1250
+ alpha: cssColor.alpha
1251
+ });
1252
+ break;
1253
+ default:
1254
+ {
1255
+ cssColor;
1256
+ }
1257
+ }
1258
+ if (!hexColors || colorPrecision) {
1259
+ return color?.toString({
1260
+ precision: colorPrecision ?? 3
1261
+ });
1262
+ } else {
1263
+ return color?.toString({
1264
+ format: "hex"
1265
+ });
1266
+ }
1267
+ }
1268
+ function parseLengthPercentageOrAutoDeclaration(value, builder) {
1269
+ return parseLengthPercentageOrAuto(value.value, builder);
1270
+ }
1271
+ function parseLengthPercentageOrAuto(lengthPercentageOrAuto, builder, {
1272
+ allowAuto = false
1273
+ } = {}) {
1274
+ switch (lengthPercentageOrAuto.type) {
1275
+ case "auto":
1276
+ if (allowAuto) {
1277
+ return lengthPercentageOrAuto.type;
1278
+ } else {
1279
+ builder.addWarning("value", lengthPercentageOrAuto.type);
1280
+ return undefined;
1281
+ }
1282
+ case "length-percentage":
1283
+ return parseLength(lengthPercentageOrAuto.value, builder);
1284
+ default:
1285
+ {
1286
+ lengthPercentageOrAuto;
1287
+ }
1288
+ }
1289
+ return;
1290
+ }
1291
+ function parseJustifyContent(declaration, builder) {
1292
+ const allowed = new Set(["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"]);
1293
+ let value;
1294
+ switch (declaration.value.type) {
1295
+ case "normal":
1296
+ case "left":
1297
+ case "right":
1298
+ value = declaration.value.type;
1299
+ break;
1300
+ case "content-distribution":
1301
+ case "content-position":
1302
+ value = declaration.value.value;
1303
+ break;
1304
+ default:
1305
+ {
1306
+ declaration.value;
1307
+ }
1308
+ }
1309
+ if (value && !allowed.has(value)) {
1310
+ builder.addWarning("value", value);
1311
+ return;
1312
+ }
1313
+ return value;
1314
+ }
1315
+ function parseAlignContent(declaration, builder) {
1316
+ const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around"]);
1317
+ let value;
1318
+ switch (declaration.value.type) {
1319
+ case "normal":
1320
+ case "baseline-position":
1321
+ value = declaration.value.type;
1322
+ break;
1323
+ case "content-distribution":
1324
+ case "content-position":
1325
+ value = declaration.value.value;
1326
+ break;
1327
+ default:
1328
+ {
1329
+ declaration.value;
1330
+ }
1331
+ }
1332
+ if (value && !allowed.has(value)) {
1333
+ builder.addWarning("value", value);
1334
+ return;
1335
+ }
1336
+ return value;
1337
+ }
1338
+ function parseAlignItems(alignItems, builder) {
1339
+ const allowed = new Set(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]);
1340
+ let value;
1341
+ switch (alignItems.value.type) {
1342
+ case "normal":
1343
+ value = "auto";
1344
+ break;
1345
+ case "stretch":
1346
+ value = alignItems.value.type;
1347
+ break;
1348
+ case "baseline-position":
1349
+ value = "baseline";
1350
+ break;
1351
+ case "self-position":
1352
+ value = alignItems.value.value;
1353
+ break;
1354
+ default:
1355
+ {
1356
+ alignItems.value;
1357
+ }
1358
+ }
1359
+ if (value && !allowed.has(value)) {
1360
+ builder.addWarning("value", value);
1361
+ return;
1362
+ }
1363
+ return value;
1364
+ }
1365
+ function parseAlignSelf(alignSelf, builder) {
1366
+ const allowed = new Set(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]);
1367
+ let value;
1368
+ switch (alignSelf.value.type) {
1369
+ case "normal":
1370
+ case "auto":
1371
+ value = "auto";
1372
+ break;
1373
+ case "stretch":
1374
+ value = alignSelf.value.type;
1375
+ break;
1376
+ case "baseline-position":
1377
+ value = "baseline";
1378
+ break;
1379
+ case "self-position":
1380
+ value = alignSelf.value.value;
1381
+ break;
1382
+ default:
1383
+ {
1384
+ alignSelf.value;
1385
+ }
1386
+ }
1387
+ if (value && !allowed.has(value)) {
1388
+ builder.addWarning("value", value);
1389
+ return;
1390
+ }
1391
+ return value;
1392
+ }
1393
+ function parseFontWeightDeclaration(declaration, builder) {
1394
+ return parseFontWeight(declaration.value, builder);
1395
+ }
1396
+ function parseFontWeight(fontWeight, builder) {
1397
+ switch (fontWeight.type) {
1398
+ case "absolute":
1399
+ if (fontWeight.value.type === "weight") {
1400
+ return fontWeight.value.value.toString();
1401
+ } else {
1402
+ return fontWeight.value.type;
1403
+ }
1404
+ case "bolder":
1405
+ case "lighter":
1406
+ builder.addWarning("value", fontWeight.type);
1407
+ return;
1408
+ default:
1409
+ {
1410
+ fontWeight;
1411
+ }
1412
+ }
1413
+ return;
1414
+ }
1415
+ function parseTextShadow(declaration, builder) {
1416
+ const [textShadow] = declaration.value;
1417
+ if (!textShadow) {
1418
+ return;
1419
+ }
1420
+ builder.addDescriptor("textShadowColor", parseColor(textShadow.color, builder));
1421
+ builder.addDescriptor("textShadowOffset.width", parseLength(textShadow.xOffset, builder));
1422
+ builder.addDescriptor("textShadowOffset.height", parseLength(textShadow.yOffset, builder));
1423
+ builder.addDescriptor("textShadowRadius", parseLength(textShadow.blur, builder));
1424
+ }
1425
+ function parseTextDecorationStyle(declaration, builder) {
1426
+ const allowed = new Set(["solid", "double", "dotted", "dashed"]);
1427
+ if (allowed.has(declaration.value)) {
1428
+ return declaration.value;
1429
+ }
1430
+ builder.addWarning("value", declaration.value);
1431
+ return;
1432
+ }
1433
+ function parseTextDecorationLineDeclaration(declaration, builder) {
1434
+ return parseTextDecorationLine(declaration.value, builder);
1435
+ }
1436
+ function parseTextDecorationLine(value, builder) {
1437
+ if (!Array.isArray(value)) {
1438
+ if (value === "none") {
1439
+ return value;
1440
+ }
1441
+ builder.addWarning("value", value);
1442
+ return;
1443
+ }
1444
+ const set = new Set(value);
1445
+ if (set.has("underline")) {
1446
+ if (set.has("line-through")) {
1447
+ return "underline line-through";
1448
+ } else {
1449
+ return "underline";
1450
+ }
1451
+ } else if (set.has("line-through")) {
1452
+ return "line-through";
1453
+ }
1454
+ builder.addWarning("value", value.join(" "));
1455
+ return undefined;
1456
+ }
1457
+ function parsePosition({
1458
+ value
1459
+ }, builder) {
1460
+ if (value.type === "absolute" || value.type === "relative") {
1461
+ return value.type;
1462
+ }
1463
+ builder.addWarning("value", value.type);
1464
+ return;
1465
+ }
1466
+ function parseOverflow({
1467
+ value
1468
+ }, builder) {
1469
+ const allowed = new Set(["visible", "hidden"]);
1470
+ if (allowed.has(value.x)) {
1471
+ return value.x;
1472
+ }
1473
+ builder.addWarning("value", value.x);
1474
+ return undefined;
1475
+ }
1476
+ function parseBorderStyleDeclaration(declaration, builder) {
1477
+ return parseBorderStyle(declaration.value, builder);
1478
+ }
1479
+ function parseBorderStyle(value, builder) {
1480
+ const allowed = new Set(["solid", "dotted", "dashed"]);
1481
+ if (typeof value === "string") {
1482
+ if (allowed.has(value)) {
1483
+ return value;
1484
+ } else {
1485
+ builder.addWarning("value", value);
1486
+ return undefined;
1487
+ }
1488
+ } else if (value.top === value.bottom && value.top === value.left && value.top === value.right && allowed.has(value.top)) {
1489
+ return value.top;
1490
+ }
1491
+ builder.addWarning("value", value.top);
1492
+ return undefined;
1493
+ }
1494
+ function parseBorderBlockWidth(declaration, builder) {
1495
+ builder.addDescriptor("border-top-width", parseBorderSideWidth(declaration.value.start, builder));
1496
+ builder.addDescriptor("border-bottom-width", parseBorderSideWidth(declaration.value.end, builder));
1497
+ }
1498
+ function parseBorderBlockStyle(declaration, builder) {
1499
+ if (declaration.value.start === declaration.value.end) {
1500
+ builder.addDescriptor("border-style", parseBorderStyle(declaration.value.start, builder));
1501
+ } else {
1502
+ builder.addWarning("property", "border-block-style");
1503
+ }
1504
+ }
1505
+ function parseBorderSideWidthDeclaration(declaration, builder) {
1506
+ if (declaration.property.includes("block")) {
1507
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "top" : "bottom"}-width`, parseBorderSideWidth(declaration.value, builder));
1508
+ return;
1509
+ } else if (declaration.property.includes("inline")) {
1510
+ builder.addDescriptor(`border-${declaration.property.includes("start") ? "left" : "right"}-width`, parseBorderSideWidth(declaration.value, builder));
1511
+ return;
1512
+ } else {
1513
+ return parseBorderSideWidth(declaration.value, builder);
1514
+ }
1515
+ }
1516
+ function parseBorderSideWidth(value, builder) {
1517
+ if (value.type === "length") {
1518
+ return parseLength(value.value, builder);
1519
+ }
1520
+ builder.addWarning("value", value.type);
1521
+ return undefined;
1522
+ }
1523
+ function parseVerticalAlign({
1524
+ value
1525
+ }, builder) {
1526
+ if (value.type === "length") {
1527
+ return undefined;
1528
+ }
1529
+ const allowed = new Set(["auto", "top", "bottom", "middle"]);
1530
+ if (allowed.has(value.value)) {
1531
+ return value.value;
1532
+ }
1533
+ builder.addWarning("value", value.value);
1534
+ return undefined;
1535
+ }
1536
+ function parseFontFamily({
1537
+ value
1538
+ }) {
1539
+ // React Native only allows one font family - better hope this is the right one :)
1540
+ return value[0];
1541
+ }
1542
+ function parseLineHeightDeclaration(declaration, builder) {
1543
+ return parseLineHeight(declaration.value, builder);
1544
+ }
1545
+ function parseLineHeight(value, builder) {
1546
+ switch (value.type) {
1547
+ case "normal":
1548
+ return undefined;
1549
+ case "number":
1550
+ return [{}, "em", [value.value], 1];
1551
+ case "length":
1552
+ {
1553
+ const length = value.value;
1554
+ switch (length.type) {
1555
+ case "dimension":
1556
+ return parseLength(length, builder);
1557
+ case "percentage":
1558
+ case "calc":
1559
+ builder.addWarning("style", "line-height", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
1560
+ return;
1561
+ default:
1562
+ {
1563
+ length;
1564
+ }
1565
+ }
1566
+ return;
1567
+ }
1568
+ default:
1569
+ {
1570
+ value;
1571
+ }
1572
+ }
1573
+ return;
1574
+ }
1575
+ function parseFontSizeDeclaration(declaration, builder) {
1576
+ const fontSize = parseFontSize(declaration.value, builder);
1577
+ builder.addDescriptor("fontSize", fontSize);
1578
+ builder.addDescriptor("--__rn-css-em", fontSize);
1579
+ }
1580
+ function parseFontSize(value, builder) {
1581
+ switch (value.type) {
1582
+ case "length":
1583
+ return parseLength(value.value, builder);
1584
+ case "absolute":
1585
+ case "relative":
1586
+ builder.addWarning("value", value.value);
1587
+ return undefined;
1588
+ default:
1589
+ {
1590
+ value;
1591
+ }
1592
+ }
1593
+ return;
1594
+ }
1595
+ function parseFontStyleDeclaration(declaration, builder) {
1596
+ return parseFontStyle(declaration.value, builder);
1597
+ }
1598
+ function parseFontStyle(value, builder) {
1599
+ switch (value.type) {
1600
+ case "normal":
1601
+ case "italic":
1602
+ return value.type;
1603
+ case "oblique":
1604
+ builder.addWarning("value", value.type);
1605
+ return undefined;
1606
+ default:
1607
+ {
1608
+ value;
1609
+ }
1610
+ }
1611
+ return;
1612
+ }
1613
+ function parseFontVariantCapsDeclaration(declaration, builder) {
1614
+ return parseFontVariantCaps(declaration.value, builder);
1615
+ }
1616
+ function parseFontVariantCaps(value, builder) {
1617
+ const allowed = new Set(["small-caps", "oldstyle-nums", "lining-nums", "tabular-nums", "proportional-nums"]);
1618
+ if (allowed.has(value)) {
1619
+ return value;
1620
+ }
1621
+ builder.addWarning("value", value);
1622
+ return undefined;
1623
+ }
1624
+ function parseLengthOrCoercePercentageToRuntime(value, builder) {
1625
+ return parseLength(value, builder);
1626
+ }
1627
+ function parseGap(declaration, builder) {
1628
+ if ("column" in declaration.value) {
1629
+ builder.addDescriptor("row-gap", parseGapValue(declaration.value.row, builder));
1630
+ builder.addDescriptor("column-gap", parseGapValue(declaration.value.column, builder));
1631
+ return;
1632
+ } else {
1633
+ if (declaration.value.type === "normal") {
1634
+ builder.addWarning("value", declaration.value.type);
1635
+ return;
1636
+ }
1637
+ return parseLength(declaration.value.value, builder);
1638
+ }
1639
+ }
1640
+ function parseGapValue(value, builder) {
1641
+ if (value.type === "normal") {
1642
+ return;
1643
+ } else {
1644
+ return parseLength(value.value, builder);
1645
+ }
1646
+ }
1647
+ function parseTextAlign({
1648
+ value
1649
+ }, builder) {
1650
+ const allowed = new Set(["auto", "left", "right", "center", "justify"]);
1651
+ if (allowed.has(value)) {
1652
+ return value;
1653
+ }
1654
+ builder.addWarning("value", value);
1655
+ return undefined;
1656
+ }
1657
+ function parseBoxShadow({
1658
+ value
1659
+ }, builder) {
1660
+ for (const [index, shadow] of value.entries()) {
1661
+ builder.addDescriptor(`boxShadow.[${index}].color`, parseColor(shadow.color, builder));
1662
+ builder.addDescriptor(`boxShadow.[${index}].offsetX`, parseLength(shadow.xOffset, builder));
1663
+ builder.addDescriptor(`boxShadow.[${index}].offsetY`, parseLength(shadow.yOffset, builder));
1664
+ builder.addDescriptor(`boxShadow.[${index}].blurRadius`, parseLength(shadow.blur, builder));
1665
+ builder.addDescriptor(`boxShadow.[${index}].spreadDistance`, parseLength(shadow.spread, builder));
1666
+ builder.addDescriptor(`boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
1667
+ }
1668
+ }
1669
+ function parseDisplay({
1670
+ value
1671
+ }, builder) {
1672
+ if (value.type === "keyword") {
1673
+ if (value.value === "none") {
1674
+ return value.value;
1675
+ } else {
1676
+ builder.addWarning("value", value.value);
1677
+ return;
1678
+ }
1679
+ } else {
1680
+ if (value.outside === "block") {
1681
+ switch (value.inside.type) {
1682
+ case "flow":
1683
+ if (value.isListItem) {
1684
+ builder.addWarning("value", "list-item");
1685
+ } else {
1686
+ builder.addWarning("value", "block");
1687
+ }
1688
+ return;
1689
+ case "flex":
1690
+ return value.inside.type;
1691
+ case "flow-root":
1692
+ case "table":
1693
+ case "box":
1694
+ case "grid":
1695
+ case "ruby":
1696
+ builder.addWarning("value", value.inside.type);
1697
+ return;
1698
+ }
1699
+ } else {
1700
+ switch (value.inside.type) {
1701
+ case "flow":
1702
+ builder.addWarning("value", "inline");
1703
+ return;
1704
+ case "flow-root":
1705
+ builder.addWarning("value", "inline-block");
1706
+ return;
1707
+ case "table":
1708
+ builder.addWarning("value", "inline-table");
1709
+ return;
1710
+ case "flex":
1711
+ builder.addWarning("value", "inline-flex");
1712
+ return;
1713
+ case "box":
1714
+ case "grid":
1715
+ builder.addWarning("value", "inline-grid");
1716
+ return;
1717
+ case "ruby":
1718
+ builder.addWarning("value", value.inside.type);
1719
+ return;
1720
+ }
1721
+ }
1722
+ }
1723
+ }
1724
+ function parseAspectRatio({
1725
+ value
1726
+ }) {
1727
+ if (!value.ratio) {
1728
+ return;
1729
+ } else if (value.auto) {
1730
+ return "auto";
1731
+ } else {
1732
+ const [width, height] = value.ratio;
1733
+ if (width === height) {
1734
+ return 1;
1735
+ } else {
1736
+ return `${width}/${height}`;
1737
+ }
1738
+ }
1739
+ }
1740
+ function parseDimension({
1741
+ unit,
1742
+ value
1743
+ }, builder) {
1744
+ switch (unit) {
1745
+ case "px":
1746
+ if (value === Infinity) {
1747
+ return 9999;
1748
+ } else {
1749
+ return value;
1750
+ }
1751
+ case "%":
1752
+ return `${value}%`;
1753
+ case "rnh":
1754
+ case "rnw":
1755
+ return [{}, unit, [value / 100], 1];
1756
+ default:
1757
+ {
1758
+ builder.addWarning("value", `${value}${unit}`);
1759
+ return;
1760
+ }
1761
+ }
1762
+ }
1763
+ function parseUserSelect({
1764
+ value
1765
+ }, builder) {
1766
+ const allowed = ["auto", "text", "none", "contain", "all"];
1767
+ if (allowed.includes(value)) {
1768
+ return value;
1769
+ } else {
1770
+ builder.addWarning("value", value);
1771
+ return;
1772
+ }
1773
+ }
1774
+ function parseSVGPaint({
1775
+ value,
1776
+ property
1777
+ }, builder) {
1778
+ let parsedValue;
1779
+ if (value.type === "none") {
1780
+ parsedValue = "transparent";
1781
+ } else if (value.type === "color") {
1782
+ parsedValue = parseColor(value.value, builder);
1783
+ } else {
1784
+ return;
1785
+ }
1786
+ builder.addDescriptor(property, parsedValue);
1787
+ }
1788
+ function round(number) {
1789
+ return Math.round((number + Number.EPSILON) * 10000) / 10000;
1790
+ }
1791
+ function parseDimensionPercentageFor_LengthValue(value, builder) {
1792
+ if (value.type === "calc") {
1793
+ return undefined;
1794
+ } else if (value.type === "percentage") {
1795
+ return `${value.value}%`;
1796
+ } else {
1797
+ return parseLength(value.value, builder);
1798
+ }
1799
+ }
1800
+ const allowAutoProperties = new Set(["pointer-events"]);
1801
+ function parseEnv(value, builder) {
1802
+ switch (value.name.type) {
1803
+ case "ua":
1804
+ switch (value.name.value) {
1805
+ case "safe-area-inset-top":
1806
+ case "safe-area-inset-right":
1807
+ case "safe-area-inset-bottom":
1808
+ case "safe-area-inset-left":
1809
+ return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
1810
+ case "viewport-segment-width":
1811
+ case "viewport-segment-height":
1812
+ case "viewport-segment-top":
1813
+ case "viewport-segment-left":
1814
+ case "viewport-segment-bottom":
1815
+ case "viewport-segment-right":
1816
+ }
1817
+ break;
1818
+ case "custom":
1819
+ case "unknown":
1820
+ }
1821
+ return;
1822
+ }
1823
+ function parseCalcFn(name, tokens, builder, property) {
1824
+ const args = parseCalcArguments(tokens, builder, property);
1825
+ if (args) {
1826
+ return [{}, name, args];
1827
+ }
1828
+ return;
1829
+ }
1830
+ function parseCalcArguments([...args], builder, property) {
1831
+ const parsed = [];
1832
+ for (const arg of args) {
1833
+ switch (arg.type) {
1834
+ case "env":
1835
+ {
1836
+ parsed.push(parseEnv(arg.value, builder));
1837
+ break;
1838
+ }
1839
+ case "var":
1840
+ case "function":
1841
+ case "unresolved-color":
1842
+ {
1843
+ const value = parseUnparsed(arg, builder, property);
1844
+ if (value === undefined) {
1845
+ return undefined;
1846
+ }
1847
+ parsed.push(value);
1848
+ break;
1849
+ }
1850
+ case "length":
1851
+ {
1852
+ const value = parseLength(arg.value, builder);
1853
+ if (value !== undefined) {
1854
+ parsed.push(value);
1855
+ }
1856
+ break;
1857
+ }
1858
+ case "color":
1859
+ case "url":
1860
+ case "angle":
1861
+ case "time":
1862
+ case "resolution":
1863
+ case "dashed-ident":
1864
+ break;
1865
+ case "token":
1866
+ switch (arg.value.type) {
1867
+ case "delim":
1868
+ switch (arg.value.value) {
1869
+ case "+":
1870
+ case "-":
1871
+ case "*":
1872
+ case "/":
1873
+ parsed.push(arg.value.value);
1874
+ break;
1875
+ }
1876
+ break;
1877
+ case "percentage":
1878
+ parsed.push(`${round(arg.value.value * 100)}%`);
1879
+ break;
1880
+ case "number":
1881
+ {
1882
+ parsed.push(round(arg.value.value));
1883
+ break;
1884
+ }
1885
+ case "parenthesis-block":
1886
+ {
1887
+ parsed.push("(");
1888
+ break;
1889
+ }
1890
+ case "close-parenthesis":
1891
+ parsed.push(")");
1892
+ break;
1893
+ case "string":
1894
+ case "function":
1895
+ case "ident":
1896
+ case "at-keyword":
1897
+ case "hash":
1898
+ case "id-hash":
1899
+ case "unquoted-url":
1900
+ case "dimension":
1901
+ case "white-space":
1902
+ case "comment":
1903
+ case "colon":
1904
+ case "semicolon":
1905
+ case "comma":
1906
+ case "include-match":
1907
+ case "dash-match":
1908
+ case "prefix-match":
1909
+ case "suffix-match":
1910
+ case "substring-match":
1911
+ case "cdo":
1912
+ case "cdc":
1913
+ case "square-bracket-block":
1914
+ case "curly-bracket-block":
1915
+ case "bad-url":
1916
+ case "bad-string":
1917
+ case "close-square-bracket":
1918
+ case "close-curly-bracket":
1919
+ }
1920
+ }
1921
+ }
1922
+ return parsed;
1923
+ }
1924
+ function parseTranslateProp(value, prop, builder) {
1925
+ if (value === "none") {
1926
+ return 0;
1927
+ }
1928
+ return parseLength(value[prop], builder);
1929
+ }
1930
+ function parseUnresolvedColor(color, builder, property, allowAuto) {
1931
+ switch (color.type) {
1932
+ case "rgb":
1933
+ return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
1934
+ case "hsl":
1935
+ return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
1936
+ case "light-dark":
1937
+ {
1938
+ const extraRule = builder.extendRule({
1939
+ m: [["=", "prefers-color-scheme", "dark"]]
1940
+ });
1941
+ builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
1942
+ builder.addExtraRule(extraRule);
1943
+ return reduceParseUnparsed(color.light, builder, property, allowAuto);
1944
+ }
1945
+ default:
1946
+ color;
1947
+ }
1948
+ return;
1949
+ }
1950
+ function allEqual(...params) {
1951
+ return params.every((param, index, array) => {
1952
+ return index === 0 ? true : equal(array[0], param);
1953
+ });
1954
+ }
1955
+ function equal(a, b) {
1956
+ if (a === b) return true;
1957
+ if (typeof a !== typeof b) return false;
1958
+ if (a === null || b === null) return false;
1959
+ if (Array.isArray(a) && Array.isArray(b)) {
1960
+ if (a.length !== b.length) return false;
1961
+ for (let i = 0; i < a.length; i++) {
1962
+ if (!equal(a[i], b[i])) return false;
1963
+ }
1964
+ return true;
1965
+ }
1966
+ if (typeof a === "object" && typeof b === "object") {
1967
+ if (Object.keys(a).length !== Object.keys(b).length) return false;
1968
+ for (const key in a) {
1969
+ if (!equal(a[key], b[key])) return false;
1970
+ }
1971
+ return true;
1972
+ }
1973
+ return false;
1974
+ }
1975
+ function parseTime(time) {
1976
+ return time.type === "milliseconds" ? time.value : time.value * 1000;
1977
+ }
1978
+ function parseSize2DDimensionPercentageDeclaration(declaration, builder) {
1979
+ return parseSize2DDimensionPercentage(declaration.value, builder);
1980
+ }
1981
+ function parseSize2DDimensionPercentage(value, builder) {
1982
+ return parseLength(value[0], builder);
1983
+ }
1984
+ function addTransitionValue(declaration, builder) {
1985
+ switch (declaration.property) {
1986
+ case "transition":
1987
+ {
1988
+ const grouped = {};
1989
+ for (const animation of declaration.value) {
1990
+ for (const [key, value] of Object.entries(animation)) {
1991
+ grouped[key] ??= [];
1992
+ grouped[key].push(value);
1993
+ }
1994
+ }
1995
+ for (const [property, value] of Object.entries(grouped)) {
1996
+ addTransitionValue({
1997
+ property: `transition-${kebabCase(property)}`,
1998
+ value
1999
+ }, builder);
2000
+ }
2001
+ break;
2002
+ }
2003
+ case "transition-property":
2004
+ {
2005
+ builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers || v === "all" || v === "none").map(v => (0, _selectors.toRNProperty)(v)));
2006
+ return;
2007
+ }
2008
+ case "transition-duration":
2009
+ builder.addDescriptor(declaration.property, declaration.value.map(t => parseTime(t)));
2010
+ return;
2011
+ case "transition-delay":
2012
+ builder.addDescriptor(declaration.property, declaration.value.map(t => parseTime(t)));
2013
+ return;
2014
+ case "transition-timing-function":
2015
+ builder.addDescriptor(declaration.property, (0, _keyframes.parseEasingFunction)(declaration.value));
2016
+ return;
2017
+ }
2018
+ }
2019
+ function addAnimationValue(declaration, builder) {
2020
+ switch (declaration.property) {
2021
+ case "animation":
2022
+ {
2023
+ const grouped = {};
2024
+ for (const animation of declaration.value) {
2025
+ for (const [key, value] of Object.entries(animation)) {
2026
+ grouped[key] ??= [];
2027
+ grouped[key].push(value);
2028
+ }
2029
+ }
2030
+ for (const [property, value] of Object.entries(grouped)) {
2031
+ addAnimationValue({
2032
+ property: `animation-${kebabCase(property)}`,
2033
+ value
2034
+ }, builder);
2035
+ }
2036
+ break;
2037
+ }
2038
+ case "animation-delay":
2039
+ {
2040
+ builder.addDescriptor(declaration.property, declaration.value.map(t => parseTime(t)));
2041
+ break;
2042
+ }
2043
+ case "animation-direction":
2044
+ {
2045
+ builder.addDescriptor(declaration.property, declaration.value);
2046
+ break;
2047
+ }
2048
+ case "animation-duration":
2049
+ {
2050
+ builder.addDescriptor(declaration.property, declaration.value.map(t => parseTime(t)));
2051
+ break;
2052
+ }
2053
+ case "animation-fill-mode":
2054
+ {
2055
+ builder.addDescriptor(declaration.property, declaration.value);
2056
+ break;
2057
+ }
2058
+ case "animation-iteration-count":
2059
+ {
2060
+ builder.addDescriptor(declaration.property, (0, _keyframes.parseIterationCount)(declaration.value));
2061
+ break;
2062
+ }
2063
+ case "animation-name":
2064
+ {
2065
+ builder.addDescriptor(declaration.property, declaration.value.map(v => v.type === "none" ? "none" : [{}, "animationName", [v.value], 1]));
2066
+ break;
2067
+ }
2068
+ case "animation-play-state":
2069
+ {
2070
+ builder.addDescriptor(declaration.property, declaration.value);
2071
+ break;
2072
+ }
2073
+ case "animation-timing-function":
2074
+ {
2075
+ builder.addDescriptor(declaration.property, (0, _keyframes.parseEasingFunction)(declaration.value));
2076
+ break;
2077
+ }
2078
+ }
2079
+ }
2080
+ function kebabCase(str) {
2081
+ return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase());
2082
+ }
2083
+ function parseBackgroundImage(declaration, builder) {
2084
+ builder.addDescriptor("experimental_backgroundImage", declaration.value.flatMap(image => {
2085
+ switch (image.type) {
2086
+ case "gradient":
2087
+ {
2088
+ const gradient = parseGradient(image.value, builder);
2089
+ return gradient ? [gradient] : [];
2090
+ }
2091
+ case "none":
2092
+ return ["none"];
2093
+ }
2094
+ return [];
2095
+ }));
2096
+ return;
2097
+ }
2098
+ function parseGradient(gradient, builder) {
2099
+ switch (gradient.type) {
2100
+ case "linear":
2101
+ {
2102
+ return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
2103
+ }
2104
+ }
2105
+ return;
2106
+ }
2107
+ function parseLineDirection(lineDirection, builder) {
2108
+ switch (lineDirection.type) {
2109
+ case "corner":
2110
+ return `to ${lineDirection.horizontal} ${lineDirection.vertical}`;
2111
+ case "horizontal":
2112
+ case "vertical":
2113
+ return `to ${lineDirection.value}`;
2114
+ case "angle":
2115
+ return parseAngle(lineDirection.value, builder);
2116
+ default:
2117
+ {
2118
+ lineDirection;
2119
+ }
2120
+ }
2121
+ return;
2122
+ }
2123
+ function parseGradientItem(item, builder) {
2124
+ switch (item.type) {
2125
+ case "color-stop":
2126
+ {
2127
+ const args = [parseColor(item.color, builder)];
2128
+ if (item.position) {
2129
+ args.push(parseLength(item.position, builder));
2130
+ }
2131
+ return [{}, "@colorStop", args, 1];
2132
+ }
2133
+ case "hint":
2134
+ return parseLength(item.value, builder);
2135
+ }
2136
+ }
2137
+ function parseFilter(declaration, builder) {
2138
+ if (declaration.value.type === "none") {
2139
+ return "unset";
2140
+ }
2141
+ return declaration.value.value.map(value => {
2142
+ switch (value.type) {
2143
+ case "opacity":
2144
+ case "blur":
2145
+ case "brightness":
2146
+ case "contrast":
2147
+ case "grayscale":
2148
+ case "invert":
2149
+ case "saturate":
2150
+ case "sepia":
2151
+ return {
2152
+ [value.type]: parseLength(value.value, builder)
2153
+ };
2154
+ case "hue-rotate":
2155
+ return {
2156
+ [value.type]: parseAngle(value.value, builder)
2157
+ };
2158
+ case "drop-shadow":
2159
+ return [{}, (0, _selectors.toRNProperty)(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
2160
+ case "url":
2161
+ return;
2162
+ }
2163
+ }).filter(value => value !== undefined);
2164
+ }
2165
+ const namedColors = new Set(["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"]);
2166
+ //# sourceMappingURL=declarations.js.map