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

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 (660) hide show
  1. package/{LICENSE.md → LICENSE} +6 -8
  2. package/README.md +10 -86
  3. package/dist/commonjs/babel/helpers.js +129 -0
  4. package/dist/commonjs/babel/helpers.js.map +1 -0
  5. package/dist/commonjs/babel/import-plugin.js +97 -0
  6. package/dist/commonjs/babel/import-plugin.js.map +1 -0
  7. package/dist/commonjs/babel/index.js +9 -0
  8. package/dist/commonjs/babel/index.js.map +1 -0
  9. package/dist/commonjs/compiler/add.js +175 -0
  10. package/dist/commonjs/compiler/add.js.map +1 -0
  11. package/dist/commonjs/compiler/compiler.js +466 -0
  12. package/dist/commonjs/compiler/compiler.js.map +1 -0
  13. package/dist/commonjs/compiler/compiler.types.js +4 -0
  14. package/dist/commonjs/compiler/compiler.types.js.map +1 -0
  15. package/dist/commonjs/compiler/container-query.js +63 -0
  16. package/dist/commonjs/compiler/container-query.js.map +1 -0
  17. package/dist/commonjs/compiler/declarations.js +1843 -0
  18. package/dist/commonjs/compiler/declarations.js.map +1 -0
  19. package/dist/commonjs/compiler/functions-web.js +44 -0
  20. package/dist/commonjs/compiler/functions-web.js.map +1 -0
  21. package/dist/commonjs/compiler/functions.js +59 -0
  22. package/dist/commonjs/compiler/functions.js.map +1 -0
  23. package/dist/commonjs/compiler/index.js +17 -0
  24. package/dist/commonjs/compiler/index.js.map +1 -0
  25. package/dist/commonjs/compiler/keyframes.js +69 -0
  26. package/dist/commonjs/compiler/keyframes.js.map +1 -0
  27. package/dist/commonjs/compiler/media-query.js +172 -0
  28. package/dist/commonjs/compiler/media-query.js.map +1 -0
  29. package/dist/commonjs/compiler/selectors.js +330 -0
  30. package/dist/commonjs/compiler/selectors.js.map +1 -0
  31. package/dist/commonjs/components/ActivityIndicator.js +20 -0
  32. package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
  33. package/dist/commonjs/components/SafeAreaProvider/index.js +41 -0
  34. package/dist/commonjs/components/SafeAreaProvider/index.js.map +1 -0
  35. package/dist/commonjs/components/SafeAreaProvider/index.web.js +13 -0
  36. package/dist/commonjs/components/SafeAreaProvider/index.web.js.map +1 -0
  37. package/dist/commonjs/components/Text.js +15 -0
  38. package/dist/commonjs/components/Text.js.map +1 -0
  39. package/dist/commonjs/components/TextInput.js +20 -0
  40. package/dist/commonjs/components/TextInput.js.map +1 -0
  41. package/dist/commonjs/components/View.js +15 -0
  42. package/dist/commonjs/components/View.js.map +1 -0
  43. package/dist/commonjs/components/index.js +36 -0
  44. package/dist/commonjs/components/index.js.map +1 -0
  45. package/dist/commonjs/doctor/index.js +6 -0
  46. package/dist/commonjs/doctor/index.js.map +1 -0
  47. package/dist/commonjs/index.js +17 -0
  48. package/dist/commonjs/index.js.map +1 -0
  49. package/dist/commonjs/jest/expect.d.js +2 -0
  50. package/dist/commonjs/jest/expect.d.js.map +1 -0
  51. package/dist/commonjs/jest/index.js +49 -0
  52. package/dist/commonjs/jest/index.js.map +1 -0
  53. package/dist/commonjs/jest/setup.js +3 -0
  54. package/dist/commonjs/jest/setup.js.map +1 -0
  55. package/dist/commonjs/jest/setupAfterEnv.js +15 -0
  56. package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
  57. package/dist/commonjs/metro/index.js +106 -0
  58. package/dist/commonjs/metro/index.js.map +1 -0
  59. package/dist/commonjs/metro/injection-code.js +12 -0
  60. package/dist/commonjs/metro/injection-code.js.map +1 -0
  61. package/dist/commonjs/metro/metro-transformer.js +21 -0
  62. package/dist/commonjs/metro/metro-transformer.js.map +1 -0
  63. package/dist/commonjs/metro/picocolors.js +71 -0
  64. package/dist/commonjs/metro/picocolors.js.map +1 -0
  65. package/dist/commonjs/metro/stringify.js +59 -0
  66. package/dist/commonjs/metro/stringify.js.map +1 -0
  67. package/dist/commonjs/metro/typescript.js +47 -0
  68. package/dist/commonjs/metro/typescript.js.map +1 -0
  69. package/dist/commonjs/package.json +1 -0
  70. package/dist/commonjs/runtime/index.js +17 -0
  71. package/dist/commonjs/runtime/index.js.map +1 -0
  72. package/dist/commonjs/runtime/native/api.js +90 -0
  73. package/dist/commonjs/runtime/native/api.js.map +1 -0
  74. package/dist/commonjs/runtime/native/conditions/container-query.js +116 -0
  75. package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
  76. package/dist/commonjs/runtime/native/conditions/guards.js +27 -0
  77. package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
  78. package/dist/commonjs/runtime/native/conditions/index.js +74 -0
  79. package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
  80. package/dist/commonjs/runtime/native/conditions/media-query.js +91 -0
  81. package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
  82. package/dist/commonjs/runtime/native/index.js +18 -0
  83. package/dist/commonjs/runtime/native/index.js.map +1 -0
  84. package/dist/commonjs/runtime/native/injection.js +80 -0
  85. package/dist/commonjs/runtime/native/injection.js.map +1 -0
  86. package/dist/commonjs/runtime/native/metro.js +6 -0
  87. package/dist/commonjs/runtime/native/metro.js.map +1 -0
  88. package/dist/commonjs/runtime/native/react/interaction.js +63 -0
  89. package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
  90. package/dist/commonjs/runtime/native/react/rules.js +257 -0
  91. package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
  92. package/dist/commonjs/runtime/native/react/useNativeCss.js +158 -0
  93. package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
  94. package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
  95. package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
  96. package/dist/commonjs/runtime/native/reactivity.js +193 -0
  97. package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
  98. package/dist/commonjs/runtime/native/styles/animation.js +90 -0
  99. package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
  100. package/dist/commonjs/runtime/native/styles/calc.js +113 -0
  101. package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
  102. package/dist/commonjs/runtime/native/styles/constants.js +8 -0
  103. package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
  104. package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
  105. package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
  106. package/dist/commonjs/runtime/native/styles/index.js +223 -0
  107. package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
  108. package/dist/commonjs/runtime/native/styles/resolve.js +96 -0
  109. package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
  110. package/dist/commonjs/runtime/native/styles/shorthand.js +62 -0
  111. package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -0
  112. package/dist/commonjs/runtime/native/styles/text-shadow.js +13 -0
  113. package/dist/commonjs/runtime/native/styles/text-shadow.js.map +1 -0
  114. package/dist/commonjs/runtime/native/styles/transform.js +17 -0
  115. package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
  116. package/dist/commonjs/runtime/native/styles/units.js +46 -0
  117. package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
  118. package/dist/commonjs/runtime/native/styles/variables.js +57 -0
  119. package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
  120. package/dist/commonjs/runtime/runtime.js +17 -0
  121. package/dist/commonjs/runtime/runtime.js.map +1 -0
  122. package/dist/commonjs/runtime/runtime.native.js +17 -0
  123. package/dist/commonjs/runtime/runtime.native.js.map +1 -0
  124. package/dist/commonjs/runtime/runtime.types.js +6 -0
  125. package/dist/commonjs/runtime/runtime.types.js.map +1 -0
  126. package/dist/commonjs/runtime/utils/components.js +18 -0
  127. package/dist/commonjs/runtime/utils/components.js.map +1 -0
  128. package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
  129. package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
  130. package/dist/commonjs/runtime/utils/index.js +61 -0
  131. package/dist/commonjs/runtime/utils/index.js.map +1 -0
  132. package/dist/commonjs/runtime/utils/objects.js +71 -0
  133. package/dist/commonjs/runtime/utils/objects.js.map +1 -0
  134. package/dist/commonjs/runtime/utils/specificity.js +43 -0
  135. package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
  136. package/dist/commonjs/runtime/utils/style-value.js +14 -0
  137. package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
  138. package/dist/commonjs/runtime/utils/utils.types.js +6 -0
  139. package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
  140. package/dist/commonjs/runtime/web/api.js +68 -0
  141. package/dist/commonjs/runtime/web/api.js.map +1 -0
  142. package/dist/commonjs/runtime/web/assign-style.js +27 -0
  143. package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
  144. package/dist/commonjs/runtime/web/index.js +17 -0
  145. package/dist/commonjs/runtime/web/index.js.map +1 -0
  146. package/dist/module/babel/helpers.js +120 -0
  147. package/dist/module/babel/helpers.js.map +1 -0
  148. package/dist/module/babel/import-plugin.js +93 -0
  149. package/dist/module/babel/import-plugin.js.map +1 -0
  150. package/dist/module/babel/index.js +9 -0
  151. package/dist/module/babel/index.js.map +1 -0
  152. package/dist/module/compiler/add.js +168 -0
  153. package/dist/module/compiler/add.js.map +1 -0
  154. package/dist/module/compiler/compiler.js +461 -0
  155. package/dist/module/compiler/compiler.js.map +1 -0
  156. package/dist/module/compiler/compiler.types.js +72 -0
  157. package/dist/module/compiler/compiler.types.js.map +1 -0
  158. package/dist/module/compiler/container-query.js +59 -0
  159. package/dist/module/compiler/container-query.js.map +1 -0
  160. package/dist/module/compiler/declarations.js +1834 -0
  161. package/dist/module/compiler/declarations.js.map +1 -0
  162. package/dist/module/compiler/functions-web.js +32 -0
  163. package/dist/module/compiler/functions-web.js.map +1 -0
  164. package/dist/module/compiler/functions.js +47 -0
  165. package/dist/module/compiler/functions.js.map +1 -0
  166. package/dist/module/compiler/index.js +9 -0
  167. package/dist/module/compiler/index.js.map +1 -0
  168. package/dist/module/compiler/keyframes.js +63 -0
  169. package/dist/module/compiler/keyframes.js.map +1 -0
  170. package/dist/module/compiler/media-query.js +166 -0
  171. package/dist/module/compiler/media-query.js.map +1 -0
  172. package/dist/module/compiler/selectors.js +325 -0
  173. package/dist/module/compiler/selectors.js.map +1 -0
  174. package/dist/module/components/ActivityIndicator.js +16 -0
  175. package/dist/module/components/ActivityIndicator.js.map +1 -0
  176. package/dist/module/components/SafeAreaProvider/index.js +36 -0
  177. package/dist/module/components/SafeAreaProvider/index.js.map +1 -0
  178. package/dist/module/components/SafeAreaProvider/index.web.js +4 -0
  179. package/dist/module/components/SafeAreaProvider/index.web.js.map +1 -0
  180. package/dist/module/components/Text.js +11 -0
  181. package/dist/module/components/Text.js.map +1 -0
  182. package/dist/module/components/TextInput.js +16 -0
  183. package/dist/module/components/TextInput.js.map +1 -0
  184. package/dist/module/components/View.js +11 -0
  185. package/dist/module/components/View.js.map +1 -0
  186. package/dist/module/components/index.js +6 -0
  187. package/dist/module/components/index.js.map +1 -0
  188. package/dist/module/doctor/index.js +4 -0
  189. package/dist/module/doctor/index.js.map +1 -0
  190. package/dist/module/index.js +4 -0
  191. package/dist/module/index.js.map +1 -0
  192. package/dist/module/jest/expect.d.js +2 -0
  193. package/dist/module/jest/expect.d.js.map +1 -0
  194. package/dist/module/jest/index.js +28 -0
  195. package/dist/module/jest/index.js.map +1 -0
  196. package/dist/module/jest/setup.js +3 -0
  197. package/dist/module/jest/setup.js.map +1 -0
  198. package/dist/module/jest/setupAfterEnv.js +15 -0
  199. package/dist/module/jest/setupAfterEnv.js.map +1 -0
  200. package/dist/module/metro/index.js +100 -0
  201. package/dist/module/metro/index.js.map +1 -0
  202. package/dist/module/metro/injection-code.js +8 -0
  203. package/dist/module/metro/injection-code.js.map +1 -0
  204. package/dist/module/metro/metro-transformer.js +17 -0
  205. package/dist/module/metro/metro-transformer.js.map +1 -0
  206. package/dist/module/metro/picocolors.js +67 -0
  207. package/dist/module/metro/picocolors.js.map +1 -0
  208. package/dist/module/metro/stringify.js +55 -0
  209. package/dist/module/metro/stringify.js.map +1 -0
  210. package/dist/module/metro/typescript.js +42 -0
  211. package/dist/module/metro/typescript.js.map +1 -0
  212. package/dist/module/package.json +1 -0
  213. package/dist/module/runtime/index.js +9 -0
  214. package/dist/module/runtime/index.js.map +1 -0
  215. package/dist/module/runtime/native/api.js +75 -0
  216. package/dist/module/runtime/native/api.js.map +1 -0
  217. package/dist/module/runtime/native/conditions/container-query.js +110 -0
  218. package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
  219. package/dist/module/runtime/native/conditions/guards.js +23 -0
  220. package/dist/module/runtime/native/conditions/guards.js.map +1 -0
  221. package/dist/module/runtime/native/conditions/index.js +70 -0
  222. package/dist/module/runtime/native/conditions/index.js.map +1 -0
  223. package/dist/module/runtime/native/conditions/media-query.js +86 -0
  224. package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
  225. package/dist/module/runtime/native/index.js +6 -0
  226. package/dist/module/runtime/native/index.js.map +1 -0
  227. package/dist/module/runtime/native/injection.js +75 -0
  228. package/dist/module/runtime/native/injection.js.map +1 -0
  229. package/dist/module/runtime/native/metro.js +5 -0
  230. package/dist/module/runtime/native/metro.js.map +1 -0
  231. package/dist/module/runtime/native/react/interaction.js +59 -0
  232. package/dist/module/runtime/native/react/interaction.js.map +1 -0
  233. package/dist/module/runtime/native/react/rules.js +251 -0
  234. package/dist/module/runtime/native/react/rules.js.map +1 -0
  235. package/dist/module/runtime/native/react/useNativeCss.js +152 -0
  236. package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
  237. package/dist/module/runtime/native/react/usePassthrough.js +45 -0
  238. package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
  239. package/dist/module/runtime/native/reactivity.js +181 -0
  240. package/dist/module/runtime/native/reactivity.js.map +1 -0
  241. package/dist/module/runtime/native/styles/animation.js +85 -0
  242. package/dist/module/runtime/native/styles/animation.js.map +1 -0
  243. package/dist/module/runtime/native/styles/calc.js +108 -0
  244. package/dist/module/runtime/native/styles/calc.js.map +1 -0
  245. package/dist/module/runtime/native/styles/constants.js +4 -0
  246. package/dist/module/runtime/native/styles/constants.js.map +1 -0
  247. package/dist/module/runtime/native/styles/defaults.js +65 -0
  248. package/dist/module/runtime/native/styles/defaults.js.map +1 -0
  249. package/dist/module/runtime/native/styles/index.js +218 -0
  250. package/dist/module/runtime/native/styles/index.js.map +1 -0
  251. package/dist/module/runtime/native/styles/resolve.js +92 -0
  252. package/dist/module/runtime/native/styles/resolve.js.map +1 -0
  253. package/dist/module/runtime/native/styles/shorthand.js +57 -0
  254. package/dist/module/runtime/native/styles/shorthand.js.map +1 -0
  255. package/dist/module/runtime/native/styles/text-shadow.js +9 -0
  256. package/dist/module/runtime/native/styles/text-shadow.js.map +1 -0
  257. package/dist/module/runtime/native/styles/transform.js +12 -0
  258. package/dist/module/runtime/native/styles/transform.js.map +1 -0
  259. package/dist/module/runtime/native/styles/units.js +37 -0
  260. package/dist/module/runtime/native/styles/units.js.map +1 -0
  261. package/dist/module/runtime/native/styles/variables.js +53 -0
  262. package/dist/module/runtime/native/styles/variables.js.map +1 -0
  263. package/dist/module/runtime/runtime.js +4 -0
  264. package/dist/module/runtime/runtime.js.map +1 -0
  265. package/dist/module/runtime/runtime.native.js +4 -0
  266. package/dist/module/runtime/runtime.native.js.map +1 -0
  267. package/dist/module/runtime/runtime.types.js +4 -0
  268. package/dist/module/runtime/runtime.types.js.map +1 -0
  269. package/dist/module/runtime/utils/components.js +14 -0
  270. package/dist/module/runtime/utils/components.js.map +1 -0
  271. package/dist/module/runtime/utils/dot-notation.types.js +2 -0
  272. package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
  273. package/dist/module/runtime/utils/index.js +8 -0
  274. package/dist/module/runtime/utils/index.js.map +1 -0
  275. package/dist/module/runtime/utils/objects.js +64 -0
  276. package/dist/module/runtime/utils/objects.js.map +1 -0
  277. package/dist/module/runtime/utils/specificity.js +38 -0
  278. package/dist/module/runtime/utils/specificity.js.map +1 -0
  279. package/dist/module/runtime/utils/style-value.js +10 -0
  280. package/dist/module/runtime/utils/style-value.js.map +1 -0
  281. package/dist/module/runtime/utils/utils.types.js +4 -0
  282. package/dist/module/runtime/utils/utils.types.js.map +1 -0
  283. package/dist/module/runtime/web/api.js +59 -0
  284. package/dist/module/runtime/web/api.js.map +1 -0
  285. package/dist/module/runtime/web/assign-style.js +23 -0
  286. package/dist/module/runtime/web/assign-style.js.map +1 -0
  287. package/dist/module/runtime/web/index.js +4 -0
  288. package/dist/module/runtime/web/index.js.map +1 -0
  289. package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
  290. package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
  291. package/dist/typescript/commonjs/package.json +1 -0
  292. package/dist/typescript/commonjs/src/babel/helpers.d.ts +18 -0
  293. package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
  294. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
  295. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
  296. package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
  297. package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/src/compiler/add.d.ts +10 -0
  299. package/dist/typescript/commonjs/src/compiler/add.d.ts.map +1 -0
  300. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +10 -0
  301. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
  302. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +279 -0
  303. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
  304. package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
  305. package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
  306. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +28 -0
  307. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
  308. package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
  309. package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
  310. package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
  311. package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
  312. package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
  313. package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
  314. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +6 -0
  315. package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
  316. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
  317. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
  318. package/dist/typescript/commonjs/src/compiler/selectors.d.ts +18 -0
  319. package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
  320. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +3 -0
  321. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
  322. package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts +4 -0
  323. package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts.map +1 -0
  324. package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.d.ts +2 -0
  325. package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.d.ts.map +1 -0
  326. package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
  327. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
  328. package/dist/typescript/commonjs/src/components/TextInput.d.ts +13 -0
  329. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
  330. package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
  331. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
  332. package/dist/typescript/commonjs/src/components/index.d.ts +4 -0
  333. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
  334. package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
  335. package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
  336. package/dist/typescript/commonjs/src/index.d.ts +2 -0
  337. package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
  338. package/dist/typescript/commonjs/src/jest/index.d.ts +14 -0
  339. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
  340. package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
  341. package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
  342. package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
  343. package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
  344. package/dist/typescript/commonjs/src/metro/index.d.ts +10 -0
  345. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
  346. package/dist/typescript/commonjs/src/metro/injection-code.d.ts +2 -0
  347. package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
  348. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
  349. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
  350. package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
  351. package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
  352. package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
  353. package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
  354. package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
  355. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
  356. package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
  357. package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
  358. package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
  359. package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
  360. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
  361. package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
  362. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
  363. package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
  364. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
  365. package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
  366. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
  367. package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
  368. package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
  369. package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
  370. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
  371. package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
  372. package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
  373. package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
  374. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
  375. package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
  376. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +6 -0
  377. package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
  378. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +37 -0
  379. package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
  380. package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
  381. package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
  382. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +63 -0
  383. package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
  384. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +8 -0
  385. package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -0
  386. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +3 -0
  387. package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +1 -0
  388. package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +2 -0
  389. package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
  390. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
  391. package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
  392. package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +20 -0
  393. package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
  394. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +14 -0
  395. package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
  396. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +12 -0
  397. package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -0
  398. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +2 -0
  399. package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
  400. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts +7 -0
  401. package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +1 -0
  402. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
  403. package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
  404. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
  405. package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
  406. package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
  407. package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
  408. package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
  409. package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
  410. package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +62 -0
  411. package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
  412. package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
  413. package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
  414. package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
  415. package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
  416. package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
  417. package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
  418. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +4 -0
  419. package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
  420. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +12 -0
  421. package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
  422. package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +3 -0
  423. package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
  424. package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
  425. package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
  426. package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
  427. package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
  428. package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
  429. package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
  430. package/dist/typescript/commonjs/src/runtime/web/index.d.ts +3 -0
  431. package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
  432. package/dist/typescript/module/example/src/App.d.ts +3 -0
  433. package/dist/typescript/module/example/src/App.d.ts.map +1 -0
  434. package/dist/typescript/module/package.json +1 -0
  435. package/dist/typescript/module/src/babel/helpers.d.ts +18 -0
  436. package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
  437. package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
  438. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
  439. package/dist/typescript/module/src/babel/index.d.ts +1 -0
  440. package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
  441. package/dist/typescript/module/src/compiler/add.d.ts +10 -0
  442. package/dist/typescript/module/src/compiler/add.d.ts.map +1 -0
  443. package/dist/typescript/module/src/compiler/compiler.d.ts +10 -0
  444. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
  445. package/dist/typescript/module/src/compiler/compiler.types.d.ts +279 -0
  446. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
  447. package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
  448. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
  449. package/dist/typescript/module/src/compiler/declarations.d.ts +28 -0
  450. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
  451. package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
  452. package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
  453. package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
  454. package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
  455. package/dist/typescript/module/src/compiler/index.d.ts +7 -0
  456. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
  457. package/dist/typescript/module/src/compiler/keyframes.d.ts +6 -0
  458. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
  459. package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
  460. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
  461. package/dist/typescript/module/src/compiler/selectors.d.ts +18 -0
  462. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
  463. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +3 -0
  464. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
  465. package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts +4 -0
  466. package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts.map +1 -0
  467. package/dist/typescript/module/src/components/SafeAreaProvider/index.web.d.ts +2 -0
  468. package/dist/typescript/module/src/components/SafeAreaProvider/index.web.d.ts.map +1 -0
  469. package/dist/typescript/module/src/components/Text.d.ts +8 -0
  470. package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
  471. package/dist/typescript/module/src/components/TextInput.d.ts +13 -0
  472. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
  473. package/dist/typescript/module/src/components/View.d.ts +8 -0
  474. package/dist/typescript/module/src/components/View.d.ts.map +1 -0
  475. package/dist/typescript/module/src/components/index.d.ts +4 -0
  476. package/dist/typescript/module/src/components/index.d.ts.map +1 -0
  477. package/dist/typescript/module/src/doctor/index.d.ts +2 -0
  478. package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
  479. package/dist/typescript/module/src/index.d.ts +2 -0
  480. package/dist/typescript/module/src/index.d.ts.map +1 -0
  481. package/dist/typescript/module/src/jest/index.d.ts +14 -0
  482. package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
  483. package/dist/typescript/module/src/jest/setup.d.ts +1 -0
  484. package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
  485. package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
  486. package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
  487. package/dist/typescript/module/src/metro/index.d.ts +10 -0
  488. package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
  489. package/dist/typescript/module/src/metro/injection-code.d.ts +2 -0
  490. package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
  491. package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
  492. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
  493. package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
  494. package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
  495. package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
  496. package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
  497. package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
  498. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
  499. package/dist/typescript/module/src/runtime/index.d.ts +7 -0
  500. package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
  501. package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
  502. package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
  503. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
  504. package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
  505. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
  506. package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
  507. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
  508. package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
  509. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
  510. package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
  511. package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
  512. package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
  513. package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
  514. package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
  515. package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
  516. package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
  517. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
  518. package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
  519. package/dist/typescript/module/src/runtime/native/react/rules.d.ts +6 -0
  520. package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
  521. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +37 -0
  522. package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
  523. package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
  524. package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
  525. package/dist/typescript/module/src/runtime/native/reactivity.d.ts +63 -0
  526. package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
  527. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +8 -0
  528. package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -0
  529. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +3 -0
  530. package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +1 -0
  531. package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +2 -0
  532. package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
  533. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
  534. package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
  535. package/dist/typescript/module/src/runtime/native/styles/index.d.ts +20 -0
  536. package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
  537. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +14 -0
  538. package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
  539. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +12 -0
  540. package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -0
  541. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +2 -0
  542. package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
  543. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts +7 -0
  544. package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +1 -0
  545. package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
  546. package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
  547. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
  548. package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
  549. package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
  550. package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
  551. package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
  552. package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
  553. package/dist/typescript/module/src/runtime/runtime.types.d.ts +62 -0
  554. package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
  555. package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
  556. package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
  557. package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
  558. package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
  559. package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
  560. package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
  561. package/dist/typescript/module/src/runtime/utils/objects.d.ts +4 -0
  562. package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
  563. package/dist/typescript/module/src/runtime/utils/specificity.d.ts +12 -0
  564. package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
  565. package/dist/typescript/module/src/runtime/utils/style-value.d.ts +3 -0
  566. package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
  567. package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
  568. package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
  569. package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
  570. package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
  571. package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
  572. package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
  573. package/dist/typescript/module/src/runtime/web/index.d.ts +3 -0
  574. package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
  575. package/package.json +191 -45
  576. package/src/babel/helpers.ts +182 -0
  577. package/src/babel/import-plugin.ts +183 -0
  578. package/src/babel/index.ts +9 -0
  579. package/src/compiler/add.ts +257 -0
  580. package/src/compiler/compiler.ts +627 -0
  581. package/src/compiler/compiler.types.ts +372 -0
  582. package/src/compiler/container-query.ts +97 -0
  583. package/src/compiler/declarations.ts +3146 -0
  584. package/src/compiler/functions-web.ts +44 -0
  585. package/src/compiler/functions.ts +64 -0
  586. package/src/compiler/index.ts +7 -0
  587. package/src/compiler/keyframes.ts +100 -0
  588. package/src/compiler/media-query.ts +250 -0
  589. package/src/compiler/selectors.ts +473 -0
  590. package/src/components/ActivityIndicator.tsx +19 -0
  591. package/src/components/SafeAreaProvider/index.tsx +50 -0
  592. package/src/components/SafeAreaProvider/index.web.tsx +1 -0
  593. package/src/components/Text.tsx +15 -0
  594. package/src/components/TextInput.tsx +20 -0
  595. package/src/components/View.tsx +15 -0
  596. package/src/components/index.tsx +4 -0
  597. package/src/doctor/index.ts +1 -0
  598. package/src/index.ts +1 -0
  599. package/src/jest/expect.d.ts +1 -0
  600. package/src/jest/index.ts +40 -0
  601. package/src/jest/setup.ts +1 -0
  602. package/src/jest/setupAfterEnv.ts +13 -0
  603. package/src/metro/index.ts +137 -0
  604. package/src/metro/injection-code.ts +8 -0
  605. package/src/metro/metro-transformer.ts +31 -0
  606. package/src/metro/picocolors.ts +77 -0
  607. package/src/metro/stringify.ts +59 -0
  608. package/src/metro/typescript.ts +73 -0
  609. package/src/runtime/index.ts +7 -0
  610. package/src/runtime/native/api.ts +106 -0
  611. package/src/runtime/native/conditions/container-query.ts +157 -0
  612. package/src/runtime/native/conditions/guards.ts +37 -0
  613. package/src/runtime/native/conditions/index.ts +106 -0
  614. package/src/runtime/native/conditions/media-query.ts +92 -0
  615. package/src/runtime/native/index.ts +5 -0
  616. package/src/runtime/native/injection.ts +101 -0
  617. package/src/runtime/native/metro.ts +2 -0
  618. package/src/runtime/native/react/interaction.ts +90 -0
  619. package/src/runtime/native/react/rules.ts +333 -0
  620. package/src/runtime/native/react/useNativeCss.ts +200 -0
  621. package/src/runtime/native/react/usePassthrough.ts +51 -0
  622. package/src/runtime/native/reactivity.ts +266 -0
  623. package/src/runtime/native/styles/animation.ts +142 -0
  624. package/src/runtime/native/styles/calc.ts +120 -0
  625. package/src/runtime/native/styles/constants.ts +1 -0
  626. package/src/runtime/native/styles/defaults.ts +78 -0
  627. package/src/runtime/native/styles/index.ts +333 -0
  628. package/src/runtime/native/styles/resolve.ts +131 -0
  629. package/src/runtime/native/styles/shorthand.ts +101 -0
  630. package/src/runtime/native/styles/text-shadow.ts +17 -0
  631. package/src/runtime/native/styles/transform.ts +15 -0
  632. package/src/runtime/native/styles/units.ts +48 -0
  633. package/src/runtime/native/styles/variables.ts +72 -0
  634. package/src/runtime/runtime.native.ts +1 -0
  635. package/src/runtime/runtime.ts +1 -0
  636. package/src/runtime/runtime.types.ts +155 -0
  637. package/src/runtime/utils/components.ts +15 -0
  638. package/src/runtime/utils/dot-notation.types.ts +118 -0
  639. package/src/runtime/utils/index.ts +5 -0
  640. package/src/runtime/utils/objects.ts +82 -0
  641. package/src/runtime/utils/specificity.ts +44 -0
  642. package/src/runtime/utils/style-value.ts +12 -0
  643. package/src/runtime/utils/utils.types.ts +19 -0
  644. package/src/runtime/web/api.ts +88 -0
  645. package/src/runtime/web/assign-style.ts +26 -0
  646. package/src/runtime/web/index.ts +2 -0
  647. package/.babelrc +0 -8
  648. package/.editorconfig +0 -17
  649. package/.eslintignore +0 -3
  650. package/.eslintrc +0 -39
  651. package/.npmignore +0 -7
  652. package/build/index.js +0 -294
  653. package/build/utils.js +0 -54
  654. package/circle.yml +0 -31
  655. package/jsconfig.json +0 -9
  656. package/login.sh +0 -11
  657. package/src/index.js +0 -184
  658. package/src/utils.js +0 -32
  659. package/test/rnc.test.js +0 -258
  660. package/yarn.lock +0 -3333
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable */
4
+ import { createElement, Fragment, useContext, useEffect, useState } from "react";
5
+ import { Pressable, View } from "react-native";
6
+ import { testGuards } from "../conditions/guards.js";
7
+ import { cleanupEffect, ContainerContext, VariableContext } from "../reactivity.js";
8
+ import { getStyledProps } from "../styles/index.js";
9
+ import { animatedComponentFamily } from "../styles/animation.js";
10
+ import { updateRules } from "./rules.js";
11
+ /**
12
+ * useNativeCss is the native implementation of the useCssElement hook.
13
+ */
14
+ export function useNativeCss(type, originalProps, configs = [{
15
+ source: "className",
16
+ target: "style"
17
+ }]) {
18
+ const inheritedVariables = useContext(VariableContext);
19
+ const inheritedContainers = useContext(ContainerContext);
20
+ const [state, setState] = useState(() => {
21
+ // Both effects share the same observers to improve memory usage
22
+ const observers = new Set();
23
+
24
+ /**
25
+ * When fired, this effect will force the rules to be re-evaluated.
26
+ * This will cause a re-render if there are different rules
27
+ *
28
+ * Use this when a rule condition changes, e.g FastRefresh or media queries
29
+ */
30
+ const ruleEffect = {
31
+ observers,
32
+ run: () => setState(state => updateRules(state))
33
+ };
34
+
35
+ /**
36
+ * When fired, this effect will force a re-render of the component.
37
+ * This will cause a re-fetch of the styles.
38
+ *
39
+ * Use this when a value changes, e.g vm units or light / dark mode
40
+ */
41
+ const styleEffect = {
42
+ observers,
43
+ run: () => setState(state => ({
44
+ ...state
45
+ }))
46
+ };
47
+ return updateRules({
48
+ ruleEffect,
49
+ styleEffect,
50
+ configs,
51
+ inheritedContainers,
52
+ inheritedVariables,
53
+ pressable: type === View ? false : undefined
54
+ }, originalProps, inheritedVariables, inheritedContainers, false, false);
55
+ });
56
+
57
+ // Both effects share the same observers, so we only need to cleanup one of them
58
+ useEffect(() => () => cleanupEffect(state.ruleEffect), [state.ruleEffect]);
59
+
60
+ // Check if our derived state has changed (e.g the className prop)
61
+ if (testGuards(state, originalProps, inheritedVariables, inheritedContainers)) {
62
+ /**
63
+ * Get the new state
64
+ * Note, this might result in the same styles, but the guards will now be different
65
+ */
66
+ setState(updateRules(state, originalProps, inheritedVariables, inheritedContainers, true));
67
+
68
+ // We can bail on rendering as the result of this render will be discarded
69
+ return /*#__PURE__*/createElement(Fragment);
70
+ }
71
+ let props = getStyledProps(state, originalProps);
72
+ if (type === View && props?.onPress) {
73
+ type = Pressable;
74
+ }
75
+ if (state.animated) {
76
+ type = animatedComponentFamily(type);
77
+ }
78
+ if (state.variables) {
79
+ props = {
80
+ value: state.variables,
81
+ children: /*#__PURE__*/createElement(type, props)
82
+ };
83
+ type = VariableContext.Provider;
84
+ }
85
+ if (state.containers) {
86
+ props = {
87
+ value: state.containers,
88
+ children: /*#__PURE__*/createElement(type, props)
89
+ };
90
+ type = ContainerContext.Provider;
91
+ }
92
+ return /*#__PURE__*/createElement(type, props);
93
+ }
94
+
95
+ /**
96
+ * Convert the styled() mapping to a config array
97
+ */
98
+ export function mappingToConfig(mapping) {
99
+ return Object.entries(mapping).flatMap(([key, value]) => {
100
+ if (value === true) {
101
+ return {
102
+ source: key,
103
+ target: key
104
+ };
105
+ } else if (value === false) {
106
+ return {
107
+ source: key,
108
+ target: false
109
+ };
110
+ } else if (typeof value === "string") {
111
+ return {
112
+ source: key,
113
+ target: value.split(".")
114
+ };
115
+ } else if (typeof value === "object") {
116
+ if (Array.isArray(value)) {
117
+ return {
118
+ source: key,
119
+ target: value
120
+ };
121
+ }
122
+ if ("target" in value) {
123
+ if (value.target === false) {
124
+ return {
125
+ source: key,
126
+ target: false
127
+ };
128
+ } else if (typeof value.target === "string") {
129
+ const target = value.target.split(".");
130
+ if (target.length === 1) {
131
+ return {
132
+ source: key,
133
+ target: target[0]
134
+ };
135
+ } else {
136
+ return {
137
+ source: key,
138
+ target
139
+ };
140
+ }
141
+ } else if (Array.isArray(value.target)) {
142
+ return {
143
+ source: key,
144
+ target: value.target
145
+ };
146
+ }
147
+ }
148
+ }
149
+ throw new Error(`styled(): Invalid mapping for ${key}: ${value}`);
150
+ });
151
+ }
152
+ //# sourceMappingURL=useNativeCss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElement","Fragment","useContext","useEffect","useState","Pressable","View","testGuards","cleanupEffect","ContainerContext","VariableContext","getStyledProps","animatedComponentFamily","updateRules","useNativeCss","type","originalProps","configs","source","target","inheritedVariables","inheritedContainers","state","setState","observers","Set","ruleEffect","run","styleEffect","pressable","undefined","props","onPress","animated","variables","value","children","Provider","containers","mappingToConfig","mapping","Object","entries","flatMap","key","split","Array","isArray","length","Error"],"sourceRoot":"../../../../../src","sources":["runtime/native/react/useNativeCss.ts"],"mappings":";;AAAA;AACA,SACEA,aAAa,EACbC,QAAQ,EACRC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAG9C,SAASC,UAAU,QAA0B,yBAAsB;AACnE,SACEC,aAAa,EACbC,gBAAgB,EAChBC,eAAe,QAIV,kBAAe;AACtB,SAASC,cAAc,QAAsB,oBAAW;AACxD,SAASC,uBAAuB,QAAQ,wBAAqB;AAC7D,SAASC,WAAW,QAAQ,YAAS;AAiCrC;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAC1BC,IAAwB,EACxBC,aAAqD,EACrDC,OAAiB,GAAG,CAAC;EAAEC,MAAM,EAAE,WAAW;EAAEC,MAAM,EAAE;AAAQ,CAAC,CAAC,EAC9D;EACA,MAAMC,kBAAkB,GAAGlB,UAAU,CAACQ,eAAe,CAAC;EACtD,MAAMW,mBAAmB,GAAGnB,UAAU,CAACO,gBAAgB,CAAC;EAExD,MAAM,CAACa,KAAK,EAAEC,QAAQ,CAAC,GAAGnB,QAAQ,CAAC,MAAsB;IACvD;IACA,MAAMoB,SAAS,GAAG,IAAIC,GAAG,CAAS,CAAC;;IAEnC;AACJ;AACA;AACA;AACA;AACA;IACI,MAAMC,UAAkB,GAAG;MACzBF,SAAS;MACTG,GAAG,EAAEA,CAAA,KAAMJ,QAAQ,CAAED,KAAK,IAAKT,WAAW,CAACS,KAAK,CAAC;IACnD,CAAC;;IAED;AACJ;AACA;AACA;AACA;AACA;IACI,MAAMM,WAAmB,GAAG;MAC1BJ,SAAS;MACTG,GAAG,EAAEA,CAAA,KAAMJ,QAAQ,CAAED,KAAK,KAAM;QAAE,GAAGA;MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,OAAOT,WAAW,CAChB;MACEa,UAAU;MACV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AAC,EAAE;YACvB,OAAO;cAAE9B,MAAM,EAAE0B,GAAG;cAAEzB,MAAM,EAAEA,MAAM,CAAC,CAAC;YAAG,CAAC;UAC5C,CAAC,MAAM;YACL,OAAO;cAAED,MAAM,EAAE0B,GAAG;cAAEzB;YAAO,CAAC;UAChC;QACF,CAAC,MAAM,IAAI2B,KAAK,CAACC,OAAO,CAACZ,KAAK,CAAChB,MAAM,CAAC,EAAE;UACtC,OAAO;YAAED,MAAM,EAAE0B,GAAG;YAAEzB,MAAM,EAAEgB,KAAK,CAAChB;UAAO,CAAC;QAC9C;MACF;IACF;IAEA,MAAM,IAAI8B,KAAK,CAAC,iCAAiCL,GAAG,KAAKT,KAAK,EAAE,CAAC;EACnE,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable */
4
+ import { createElement } from "react";
5
+ import { INLINE_RULE_SYMBOL } from "./rules.js";
6
+ const cache = new Map();
7
+ export function usePassthrough(type, {
8
+ ...props
9
+ }, configs) {
10
+ for (const config of configs) {
11
+ let {
12
+ source,
13
+ target
14
+ } = config;
15
+ const classNames = props[source];
16
+ let styles = cache.get(source);
17
+ if (styles === undefined) {
18
+ styles = {
19
+ [INLINE_RULE_SYMBOL]: classNames
20
+ };
21
+ }
22
+ delete props[source];
23
+ if (classNames === undefined || target === false) {
24
+ continue;
25
+ }
26
+ let targetProps = props;
27
+ if (Array.isArray(target)) {
28
+ for (let i = 0; i < target.length - 1; i++) {
29
+ const prop = target[i];
30
+ props[prop] ??= {};
31
+ targetProps = props[prop];
32
+ }
33
+ target = target[target.length - 1];
34
+ }
35
+ if (Array.isArray(targetProps[target])) {
36
+ targetProps[target] = [...targetProps[target], styles];
37
+ } else if (targetProps[target]) {
38
+ targetProps[target] = [targetProps[target], styles];
39
+ } else {
40
+ targetProps[target] = styles;
41
+ }
42
+ }
43
+ return /*#__PURE__*/createElement(type, props);
44
+ }
45
+ //# sourceMappingURL=usePassthrough.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElement","INLINE_RULE_SYMBOL","cache","Map","usePassthrough","type","props","configs","config","source","target","classNames","styles","get","undefined","targetProps","Array","isArray","i","length","prop"],"sourceRoot":"../../../../../src","sources":["runtime/native/react/usePassthrough.ts"],"mappings":";;AAAA;AACA,SAASA,aAAa,QAA4B,OAAO;AAEzD,SAASC,kBAAkB,QAAQ,YAAS;AAG5C,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAA8B,CAAC;AAEpD,OAAO,SAASC,cAAcA,CAC5BC,IAAwB,EACxB;EAAE,GAAGC;AAA2B,CAAC,EACjCC,OAAiB,EACjB;EACA,KAAK,MAAMC,MAAM,IAAID,OAAO,EAAE;IAC5B,IAAI;MAAEE,MAAM;MAAEC;IAAO,CAAC,GAAGF,MAAM;IAE/B,MAAMG,UAAU,GAAGL,KAAK,CAACG,MAAM,CAAC;IAEhC,IAAIG,MAAM,GAAGV,KAAK,CAACW,GAAG,CAACJ,MAAM,CAAC;IAC9B,IAAIG,MAAM,KAAKE,SAAS,EAAE;MACxBF,MAAM,GAAG;QAAE,CAACX,kBAAkB,GAAGU;MAAW,CAAC;IAC/C;IAEA,OAAOL,KAAK,CAACG,MAAM,CAAC;IAEpB,IAAIE,UAAU,KAAKG,SAAS,IAAIJ,MAAM,KAAK,KAAK,EAAE;MAChD;IACF;IAEA,IAAIK,WAAW,GAAGT,KAAK;IAEvB,IAAIU,KAAK,CAACC,OAAO,CAACP,MAAM,CAAC,EAAE;MACzB,KAAK,IAAIQ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGR,MAAM,CAACS,MAAM,GAAG,CAAC,EAAED,CAAC,EAAE,EAAE;QAC1C,MAAME,IAAI,GAAGV,MAAM,CAACQ,CAAC,CAAE;QACvBZ,KAAK,CAACc,IAAI,CAAC,KAAK,CAAC,CAAC;QAClBL,WAAW,GAAGT,KAAK,CAACc,IAAI,CAAC;MAC3B;MACAV,MAAM,GAAGA,MAAM,CAACA,MAAM,CAACS,MAAM,GAAG,CAAC,CAAE;IACrC;IAEA,IAAIH,KAAK,CAACC,OAAO,CAACF,WAAW,CAACL,MAAM,CAAC,CAAC,EAAE;MACtCK,WAAW,CAACL,MAAM,CAAC,GAAG,CAAC,GAAGK,WAAW,CAACL,MAAM,CAAC,EAAEE,MAAM,CAAC;IACxD,CAAC,MAAM,IAAIG,WAAW,CAACL,MAAM,CAAC,EAAE;MAC9BK,WAAW,CAACL,MAAM,CAAC,GAAG,CAACK,WAAW,CAACL,MAAM,CAAC,EAAEE,MAAM,CAAC;IACrD,CAAC,MAAM;MACLG,WAAW,CAACL,MAAM,CAAC,GAAGE,MAAM;IAC9B;EACF;EAEA,oBAAOZ,aAAa,CAACK,IAAI,EAAEC,KAAK,CAAC;AACnC","ignoreList":[]}
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable */
4
+ import { createContext } from "react";
5
+ import { Appearance, Dimensions } from "react-native";
6
+ export const observableBatch = {};
7
+ export function observable(init, equality = Object.is) {
8
+ let value;
9
+ let isStatic = typeof init !== "function";
10
+ let didInit;
11
+ let lastArg;
12
+ if (typeof init !== "function") {
13
+ value = init;
14
+ didInit = true;
15
+ }
16
+ const observers = new Set();
17
+ const effect = {
18
+ observers,
19
+ run: () => {
20
+ if (!isStatic) {
21
+ const nextValue = init(getter, lastArg);
22
+ if (equality(value, nextValue)) {
23
+ return;
24
+ }
25
+ value = nextValue;
26
+ }
27
+ notify();
28
+ }
29
+ };
30
+ const getter = observable => observable.get(effect);
31
+ function get(effect) {
32
+ if (effect) {
33
+ observers.add(effect);
34
+ }
35
+ if (!didInit) {
36
+ value = init(getter, undefined);
37
+ }
38
+ return value;
39
+ }
40
+ function set(arg) {
41
+ if (isStatic) {
42
+ if (equality(value, arg)) {
43
+ return;
44
+ }
45
+ value = arg;
46
+ } else {
47
+ const nextValue = init(getter, arg);
48
+ didInit = true;
49
+ lastArg = arg;
50
+ if (equality(value, nextValue)) {
51
+ return;
52
+ }
53
+ value = nextValue;
54
+ }
55
+ notify();
56
+ return obs;
57
+ }
58
+ function notify() {
59
+ Array.from(observers).forEach(observer => {
60
+ if (observableBatch.current) {
61
+ observableBatch.current.add(observer);
62
+ } else {
63
+ observer.run();
64
+ }
65
+ });
66
+ }
67
+ const obs = {
68
+ observers,
69
+ get,
70
+ set,
71
+ run: effect.run
72
+ };
73
+ return obs;
74
+ }
75
+ export function cleanupEffect(effect) {
76
+ if (!effect) return;
77
+ for (const dep of effect.observers) {
78
+ dep.observers.delete(effect);
79
+ }
80
+ effect.observers.clear();
81
+ }
82
+
83
+ /** Family Helpers ************************************************************/
84
+
85
+ export function family(fn) {
86
+ const map = new Map();
87
+ return Object.assign((key, args) => {
88
+ let value = map.get(key);
89
+ if (!value) {
90
+ value = fn(key, args);
91
+ map.set(key, value);
92
+ }
93
+ return value;
94
+ }, {
95
+ delete(key) {
96
+ return map.delete(key);
97
+ },
98
+ clear() {
99
+ return map.clear();
100
+ }
101
+ });
102
+ }
103
+ export function weakFamily(fn) {
104
+ const map = new WeakMap();
105
+ return Object.assign((key, args) => {
106
+ let value = map.get(key);
107
+ if (!value) {
108
+ value = fn(key, args);
109
+ map.set(key, value);
110
+ }
111
+ return value;
112
+ }, {
113
+ has: key => map.has(key)
114
+ });
115
+ }
116
+
117
+ /********************************* Variables **********************************/
118
+
119
+ export const VAR_SYMBOL = Symbol("react-native-css.var");
120
+ export const VariableContext = /*#__PURE__*/createContext({
121
+ [VAR_SYMBOL]: true
122
+ });
123
+ const lightDarkFamily = () => {
124
+ return family(() => {
125
+ const obs = observable((read, lightDark = [undefined, undefined]) => {
126
+ const colorSchemeName = read(colorScheme) ?? Appearance.getColorScheme() ?? "light";
127
+ return colorSchemeName === "dark" ? lightDark[1] ?? lightDark[0] : lightDark[0];
128
+ });
129
+ return obs;
130
+ });
131
+ };
132
+ export const rootVariables = lightDarkFamily();
133
+ export const universalVariables = lightDarkFamily();
134
+
135
+ /** Units *********************************************************************/
136
+
137
+ export const rem = observable(14);
138
+
139
+ /** Pseudo Classes ************************************************************/
140
+
141
+ export const hoverFamily = weakFamily(() => observable(false));
142
+ export const activeFamily = weakFamily(() => observable(false));
143
+ export const focusFamily = weakFamily(() => observable(false));
144
+
145
+ /** Dimensions ****************************************************************/
146
+
147
+ export const dimensions = observable(Dimensions.get("window"));
148
+ export const vw = observable((read, value) => value ?? read(dimensions)?.width);
149
+ export const vh = observable((read, value) => value ?? read(dimensions)?.height);
150
+
151
+ /** Color Scheme **************************************************************/
152
+
153
+ export const colorScheme = observable(Appearance.getColorScheme());
154
+ colorScheme.set(Appearance.getColorScheme());
155
+ colorScheme.get({
156
+ observers: new Set(),
157
+ run: () => Appearance.setColorScheme(colorScheme.get())
158
+ });
159
+
160
+ /** Containers ****************************************************************/
161
+
162
+ export const ContainerContext = /*#__PURE__*/createContext({});
163
+ export const containerLayoutFamily = weakFamily(() => {
164
+ return observable({
165
+ x: 0,
166
+ y: 0,
167
+ width: 0,
168
+ height: 0
169
+ });
170
+ });
171
+ export const containerWidthFamily = weakFamily(key => {
172
+ return observable(read => {
173
+ return read(containerLayoutFamily(key))?.width || 0;
174
+ });
175
+ });
176
+ export const containerHeightFamily = weakFamily(key => {
177
+ return observable(read => {
178
+ return read(containerLayoutFamily(key))?.width || 0;
179
+ });
180
+ });
181
+ //# sourceMappingURL=reactivity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","Appearance","Dimensions","observableBatch","observable","init","equality","Object","is","value","isStatic","didInit","lastArg","observers","Set","effect","run","nextValue","getter","notify","get","add","undefined","set","arg","obs","Array","from","forEach","observer","current","cleanupEffect","dep","delete","clear","family","fn","map","Map","assign","key","args","weakFamily","WeakMap","has","VAR_SYMBOL","Symbol","VariableContext","lightDarkFamily","read","lightDark","colorSchemeName","colorScheme","getColorScheme","rootVariables","universalVariables","rem","hoverFamily","activeFamily","focusFamily","dimensions","vw","width","vh","height","setColorScheme","ContainerContext","containerLayoutFamily","x","y","containerWidthFamily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AW,GAAGhD,UAAU,CACnCH,UAAU,CAACoD,cAAc,CAAC,CAC5B,CAAC;AACDD,WAAW,CAAC7B,GAAG,CAACtB,UAAU,CAACoD,cAAc,CAAC,CAAC,CAAC;AAC5CD,WAAW,CAAChC,GAAG,CAAC;EACdP,SAAS,EAAE,IAAIC,GAAG,CAAC,CAAC;EACpBE,GAAG,EAAEA,CAAA,KAAMf,UAAU,CAACgE,cAAc,CAACb,WAAW,CAAChC,GAAG,CAAC,CAAC;AACxD,CAAC,CAAC;;AAEF;;AAGA,OAAO,MAAM8C,gBAAgB,gBAAGlE,aAAa,CAAwB,CAAC,CAAC,CAAC;AAExE,OAAO,MAAMmE,qBAAqB,GAAGzB,UAAU,CAAC,MAAM;EACpD,OAAOtC,UAAU,CAAkB;IACjCgE,CAAC,EAAE,CAAC;IACJC,CAAC,EAAE,CAAC;IACJP,KAAK,EAAE,CAAC;IACRE,MAAM,EAAE;EACV,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,MAAMM,oBAAoB,GAAG5B,UAAU,CAAEF,GAAG,IAAK;EACtD,OAAOpC,UAAU,CAAE6C,IAAI,IAAK;IAC1B,OAAOA,IAAI,CAACkB,qBAAqB,CAAC3B,GAAG,CAAC,CAAC,EAAEsB,KAAK,IAAI,CAAC;EACrD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,MAAMS,qBAAqB,GAAG7B,UAAU,CAAEF,GAAG,IAAK;EACvD,OAAOpC,UAAU,CAAE6C,IAAI,IAAK;IAC1B,OAAOA,IAAI,CAACkB,qBAAqB,CAAC3B,GAAG,CAAC,CAAC,EAAEsB,KAAK,IAAI,CAAC;EACrD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable */
4
+
5
+ import { StyleCollection } from "../injection.js";
6
+ import { observable, weakFamily } from "../reactivity.js";
7
+ import { shorthandHandler } from "./shorthand.js";
8
+ const name = ["n", "string", "none"];
9
+ const delay = ["de", "number", 0];
10
+ const duration = ["du", "number", 0];
11
+ const fill = ["f", ["none", "forwards", "backwards", "both"], "none"];
12
+ const iteration = ["i", "number", 1];
13
+ const playState = ["p", ["running", "paused"], "running"];
14
+ const direction = ["di", ["normal", "reverse", "alternate", "alternate-reverse"], "normal"];
15
+ const easing = ["e", ["linear", "ease", "ease-in", "ease-out", "ease-in-out"], "ease"];
16
+ export const animationShorthand = shorthandHandler([[name], [duration, name], [name, duration], [duration, delay, name], [duration, delay, iteration, name], [duration, delay, iteration, easing, name], [name, duration, easing, delay, iteration, fill]], [name, delay, direction, duration, fill, iteration, playState, easing]);
17
+ export const animation = (resolveValue, value, get, {
18
+ inheritedVariables
19
+ }) => {
20
+ const name = resolveValue(value[2]);
21
+
22
+ /**
23
+ * Get a stable reference to the StyleProp observer.
24
+ * We can use that as a WeakKey
25
+ */
26
+ return get(animationFamily(get, {
27
+ name,
28
+ resolveValue,
29
+ inheritedVariables
30
+ }));
31
+ };
32
+ const animationFamily = weakFamily((_, options) => {
33
+ const {
34
+ name: nameDescriptor,
35
+ resolveValue
36
+ } = options;
37
+ return observable(get => {
38
+ const names = resolveValue(nameDescriptor);
39
+ if (!Array.isArray(names)) {
40
+ return;
41
+ }
42
+ return names.map(name => {
43
+ const keyframes = get(StyleCollection.keyframes(name));
44
+ const animation = {};
45
+ for (const [progress, declarations] of keyframes) {
46
+ const result = {};
47
+
48
+ // This code needs to match calculateProps
49
+ // TODO: Refactor this to use the same code
50
+ for (const declaration of declarations) {
51
+ let target = result;
52
+ if (!Array.isArray(declaration)) {
53
+ // Static styles
54
+ Object.assign(target, declaration);
55
+ } else {
56
+ // Dynamic styles
57
+ let value = declaration[0];
58
+ let propPath = declaration[1];
59
+ let prop = "";
60
+ if (typeof propPath === "string") {
61
+ prop = propPath;
62
+ } else {
63
+ prop = propPath[0];
64
+ for (let i = 0; i < propPath.length - 2 && typeof prop === "string"; i++) {
65
+ target = target[prop] ??= {};
66
+ prop = propPath[i + 1];
67
+ }
68
+ }
69
+ value = resolveValue(value);
70
+ }
71
+ }
72
+ animation[progress] = result;
73
+ }
74
+ return animation;
75
+ });
76
+ });
77
+ });
78
+ export const animatedComponentFamily = weakFamily(component => {
79
+ if ("displayName" in component && component.displayName?.startsWith("Animated.")) {
80
+ return component;
81
+ }
82
+ const createAnimatedComponent = require("react-native-reanimated").createAnimatedComponent;
83
+ return createAnimatedComponent(component);
84
+ });
85
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleCollection","observable","weakFamily","shorthandHandler","name","delay","duration","fill","iteration","playState","direction","easing","animationShorthand","animation","resolveValue","value","get","inheritedVariables","animationFamily","_","options","nameDescriptor","names","Array","isArray","map","keyframes","progress","declarations","result","declaration","target","Object","assign","propPath","prop","i","length","animatedComponentFamily","component","displayName","startsWith","createAnimatedComponent","require"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/animation.ts"],"mappings":";;AAAA;;AAIA,SAASA,eAAe,QAAQ,iBAAc;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAqB,kBAAe;AAEnE,SAASC,gBAAgB,QAAQ,gBAAa;AAE9C,MAAMC,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAU;AAC7C,MAAMC,KAAK,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAU;AAC1C,MAAMC,QAAQ,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAU;AAC7C,MAAMC,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,CAAU;AAC9E,MAAMC,SAAS,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAU;AAC7C,MAAMC,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,SAAS,CAAU;AAClE,MAAMC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AC;cACxB;YACF;YAEArB,KAAK,GAAGD,YAAY,CAACC,KAAK,CAAC;UAC7B;QACF;QAEAF,SAAS,CAACc,QAAQ,CAAC,GAAGE,MAAM;MAC9B;MAEA,OAAOhB,SAAS;IAClB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CACF,CAAC;AAED,OAAO,MAAMyB,uBAAuB,GAAGpC,UAAU,CAC9CqC,SAAwB,IAAK;EAC5B,IACE,aAAa,IAAIA,SAAS,IAC1BA,SAAS,CAACC,WAAW,EAAEC,UAAU,CAAC,WAAW,CAAC,EAC9C;IACA,OAAOF,SAAS;EAClB;EAEA,MAAMG,uBAAuB,GAC3BC,OAAO,CAAC,yBAAyB,CAAC,CAACD,uBAAuB;EAE5D,OAAOA,uBAAuB,CAACH,SAAS,CAAC;AAC3C,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable */
4
+
5
+ const calcPrecedence = {
6
+ "+": 1,
7
+ "-": 1,
8
+ "*": 2,
9
+ "/": 2
10
+ };
11
+ export const calc = (resolveValue, func) => {
12
+ let mode;
13
+ const values = [];
14
+ const ops = [];
15
+ const args = func[2];
16
+ if (!args) return;
17
+ for (let token of args) {
18
+ switch (typeof token) {
19
+ case "undefined":
20
+ // Fail on an undefined value
21
+ return;
22
+ case "number":
23
+ if (!mode) mode = "number";
24
+ if (mode !== "number") return;
25
+ values.push(token);
26
+ continue;
27
+ case "object":
28
+ {
29
+ // All values should resolve to a numerical value
30
+ const value = resolveValue(token);
31
+ switch (typeof value) {
32
+ case "number":
33
+ {
34
+ if (!mode) mode = "number";
35
+ if (mode !== "number") return;
36
+ values.push(value);
37
+ continue;
38
+ }
39
+ case "string":
40
+ {
41
+ if (!value.endsWith("%")) {
42
+ return;
43
+ }
44
+ if (!mode) mode = "percentage";
45
+ if (mode !== "percentage") return;
46
+ values.push(Number.parseFloat(value.slice(0, -1)));
47
+ continue;
48
+ }
49
+ default:
50
+ return;
51
+ }
52
+ }
53
+ case "string":
54
+ {
55
+ if (token === "(") {
56
+ ops.push(token);
57
+ } else if (token === ")") {
58
+ // Resolve all values within the brackets
59
+ while (ops.length && ops[ops.length - 1] !== "(") {
60
+ applyCalcOperator(ops.pop(), values.pop(), values.pop(), values);
61
+ }
62
+ ops.pop();
63
+ } else if (token.endsWith("%")) {
64
+ if (!mode) mode = "percentage";
65
+ if (mode !== "percentage") return;
66
+ values.push(Number.parseFloat(token.slice(0, -1)));
67
+ } else {
68
+ // This means we have an operator
69
+ while (ops.length && ops[ops.length - 1] &&
70
+ // @ts-ignore
71
+ calcPrecedence[ops[ops.length - 1]] >= calcPrecedence[token]) {
72
+ applyCalcOperator(ops.pop(), values.pop(), values.pop(), values);
73
+ }
74
+ ops.push(token);
75
+ }
76
+ }
77
+ }
78
+ }
79
+ while (ops.length) {
80
+ applyCalcOperator(ops.pop(), values.pop(), values.pop(), values);
81
+ }
82
+ if (!mode) return;
83
+ const num = values[0];
84
+ if (typeof num !== "number") {
85
+ return;
86
+ }
87
+ const value = Math.round((num + Number.EPSILON) * 100) / 100;
88
+ if (mode === "percentage") {
89
+ return `${value}%`;
90
+ }
91
+ return value;
92
+ };
93
+ function applyCalcOperator(operator, b,
94
+ // These are reversed because we pop them off the stack
95
+ a, values) {
96
+ switch (operator) {
97
+ case "+":
98
+ return values.push(a + b);
99
+ case "-":
100
+ return values.push(a - b);
101
+ case "*":
102
+ return values.push(a * b);
103
+ case "/":
104
+ return values.push(a / b);
105
+ }
106
+ return;
107
+ }
108
+ //# sourceMappingURL=calc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["calcPrecedence","calc","resolveValue","func","mode","values","ops","args","token","push","value","endsWith","Number","parseFloat","slice","length","applyCalcOperator","pop","num","Math","round","EPSILON","operator","b","a"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/calc.ts"],"mappings":";;AAAA;;AAGA,MAAMA,cAAsC,GAAG;EAC7C,GAAG,EAAE,CAAC;EACN,GAAG,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,CAAC,EAAGZ,MAAM,CAACY,GAAG,CAAC,CAAC,EAAGZ,MAAM,CAAC;EACrE;EAEA,IAAI,CAACD,IAAI,EAAE;EAEX,MAAMc,GAAG,GAAGb,MAAM,CAAC,CAAC,CAAC;EAErB,IAAI,OAAOa,GAAG,KAAK,QAAQ,EAAE;IAC3B;EACF;EAEA,MAAMR,KAAK,GAAGS,IAAI,CAACC,KAAK,CAAC,CAACF,GAAG,GAAGN,MAAM,CAACS,OAAO,IAAI,GAAG,CAAC,GAAG,GAAG;EAE5D,IAAIjB,IAAI,KAAK,YAAY,EAAE;IACzB,OAAO,GAAGM,KAAK,GAAG;EACpB;EAEA,OAAOA,KAAK;AACd,CAAC;AAED,SAASM,iBAAiBA,CACxBM,QAAgB,EAChBC,CAAS;AAAE;AACXC,CAAS,EACTnB,MAAgB,EAChB;EACA,QAAQiB,QAAQ;IACd,KAAK,GAAG;MACN,OAAOjB,MAAM,CAACI,IAAI,CAACe,CAAC,GAAGD,CAAC,CAAC;IAC3B,KAAK,GAAG;MACN,OAAOlB,MAAM,CAACI,IAAI,CAACe,CAAC,GAAGD,CAAC,CAAC;IAC3B,KAAK,GAAG;MACN,OAAOlB,MAAM,CAACI,IAAI,CAACe,CAAC,GAAGD,CAAC,CAAC;IAC3B,KAAK,GAAG;MACN,OAAOlB,MAAM,CAACI,IAAI,CAACe,CAAC,GAAGD,CAAC,CAAC;EAC7B;EAEA;AACF","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export const emVariableName = "__rn-css-em";
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["emVariableName"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAG,aAAa","ignoreList":[]}