react-native-css 2.1.1 → 3.0.0-nightly.0

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