react-native-css 0.0.0-nightly.d6f42ab → 0.0.0-nightly.df32ce3

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 (565) hide show
  1. package/README.md +29 -5
  2. package/dist/commonjs/babel/helpers.js +7 -0
  3. package/dist/commonjs/babel/helpers.js.map +1 -1
  4. package/dist/commonjs/babel/import-plugin.js +20 -8
  5. package/dist/commonjs/babel/import-plugin.js.map +1 -1
  6. package/dist/commonjs/babel/react-native-web.js +17 -4
  7. package/dist/commonjs/babel/react-native-web.js.map +1 -1
  8. package/dist/commonjs/babel/react-native.js +9 -4
  9. package/dist/commonjs/babel/react-native.js.map +1 -1
  10. package/dist/commonjs/compiler/atRules.js +35 -0
  11. package/dist/commonjs/compiler/atRules.js.map +1 -1
  12. package/dist/commonjs/compiler/compiler.js +107 -32
  13. package/dist/commonjs/compiler/compiler.js.map +1 -1
  14. package/dist/commonjs/compiler/container-query.js +6 -1
  15. package/dist/commonjs/compiler/container-query.js.map +1 -1
  16. package/dist/commonjs/compiler/declarations.js +149 -57
  17. package/dist/commonjs/compiler/declarations.js.map +1 -1
  18. package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
  19. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  20. package/dist/commonjs/compiler/media-query.js +16 -6
  21. package/dist/commonjs/compiler/media-query.js.map +1 -1
  22. package/dist/commonjs/compiler/selector-builder.js +15 -4
  23. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  24. package/dist/commonjs/compiler/stylesheet.js +16 -3
  25. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  26. package/dist/commonjs/compiler/supports.js +2 -2
  27. package/dist/commonjs/compiler/supports.js.map +1 -1
  28. package/dist/commonjs/components/FlatList.js +1 -0
  29. package/dist/commonjs/components/FlatList.js.map +1 -1
  30. package/dist/commonjs/components/ImageBackground.js +2 -6
  31. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  32. package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
  33. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  34. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  35. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  36. package/dist/commonjs/components/index.cjs +46 -1
  37. package/dist/commonjs/components/index.cjs.map +1 -1
  38. package/dist/commonjs/jest/index.js +1 -1
  39. package/dist/commonjs/jest/index.js.map +1 -1
  40. package/dist/commonjs/metro/cache-version.js +43 -0
  41. package/dist/commonjs/metro/cache-version.js.map +1 -0
  42. package/dist/commonjs/metro/index.js +2 -0
  43. package/dist/commonjs/metro/index.js.map +1 -1
  44. package/dist/commonjs/metro/metro-transformer.js +16 -3
  45. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  46. package/dist/commonjs/metro/typescript.js +26 -6
  47. package/dist/commonjs/metro/typescript.js.map +1 -1
  48. package/dist/commonjs/metro/warnings.js +135 -0
  49. package/dist/commonjs/metro/warnings.js.map +1 -0
  50. package/dist/commonjs/native/api.js +13 -9
  51. package/dist/commonjs/native/api.js.map +1 -1
  52. package/dist/commonjs/native/conditions/attributes.js +16 -9
  53. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  54. package/dist/commonjs/native/conditions/container-query.js +11 -11
  55. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  56. package/dist/commonjs/native/conditions/media-query.js +1 -1
  57. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  58. package/dist/commonjs/native/react/interaction.js +10 -5
  59. package/dist/commonjs/native/react/interaction.js.map +1 -1
  60. package/dist/commonjs/native/react/rules.js +12 -5
  61. package/dist/commonjs/native/react/rules.js.map +1 -1
  62. package/dist/commonjs/native/react/useNativeCss.js +70 -15
  63. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  64. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  65. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  66. package/dist/commonjs/native/reactivity.js +61 -24
  67. package/dist/commonjs/native/reactivity.js.map +1 -1
  68. package/dist/commonjs/native/reanimated.js +15 -3
  69. package/dist/commonjs/native/reanimated.js.map +1 -1
  70. package/dist/commonjs/native/styles/functions/color-mix.js +64 -0
  71. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  72. package/dist/commonjs/native/styles/functions/filters.js +18 -5
  73. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  74. package/dist/commonjs/native/styles/functions/index.js +11 -0
  75. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  76. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  77. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  78. package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
  79. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  80. package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
  81. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  82. package/dist/commonjs/native/styles/index.js +382 -28
  83. package/dist/commonjs/native/styles/index.js.map +1 -1
  84. package/dist/commonjs/native/styles/resolve.js +10 -6
  85. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  86. package/dist/commonjs/native/styles/scale-factor.js +13 -0
  87. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  88. package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
  89. package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
  90. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  91. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  92. package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
  93. package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
  94. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  95. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  96. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  97. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  98. package/dist/commonjs/native/styles/variables.js +55 -43
  99. package/dist/commonjs/native/styles/variables.js.map +1 -1
  100. package/dist/commonjs/native-internal/root.js +18 -7
  101. package/dist/commonjs/native-internal/root.js.map +1 -1
  102. package/dist/commonjs/native-internal/style-collection.js +1 -1
  103. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  104. package/dist/commonjs/native-internal/variables.js +1 -1
  105. package/dist/commonjs/native-internal/variables.js.map +1 -1
  106. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  107. package/dist/commonjs/utilities/style-descriptor.js +4 -9
  108. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  109. package/dist/commonjs/web/api.js +2 -2
  110. package/dist/commonjs/web/api.js.map +1 -1
  111. package/dist/commonjs/web/assign-style.js +4 -1
  112. package/dist/commonjs/web/assign-style.js.map +1 -1
  113. package/dist/module/babel/helpers.js +6 -0
  114. package/dist/module/babel/helpers.js.map +1 -1
  115. package/dist/module/babel/import-plugin.js +22 -10
  116. package/dist/module/babel/import-plugin.js.map +1 -1
  117. package/dist/module/babel/react-native-web.js +16 -4
  118. package/dist/module/babel/react-native-web.js.map +1 -1
  119. package/dist/module/babel/react-native.js +9 -4
  120. package/dist/module/babel/react-native.js.map +1 -1
  121. package/dist/module/compiler/atRules.js +33 -0
  122. package/dist/module/compiler/atRules.js.map +1 -1
  123. package/dist/module/compiler/compiler.js +109 -34
  124. package/dist/module/compiler/compiler.js.map +1 -1
  125. package/dist/module/compiler/compiler.types.js +2 -0
  126. package/dist/module/compiler/compiler.types.js.map +1 -1
  127. package/dist/module/compiler/container-query.js +6 -1
  128. package/dist/module/compiler/container-query.js.map +1 -1
  129. package/dist/module/compiler/declarations.js +148 -57
  130. package/dist/module/compiler/declarations.js.map +1 -1
  131. package/dist/module/compiler/lightningcss-loader.js +14 -2
  132. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  133. package/dist/module/compiler/media-query.js +16 -6
  134. package/dist/module/compiler/media-query.js.map +1 -1
  135. package/dist/module/compiler/selector-builder.js +15 -4
  136. package/dist/module/compiler/selector-builder.js.map +1 -1
  137. package/dist/module/compiler/stylesheet.js +16 -3
  138. package/dist/module/compiler/stylesheet.js.map +1 -1
  139. package/dist/module/compiler/supports.js +2 -2
  140. package/dist/module/compiler/supports.js.map +1 -1
  141. package/dist/module/components/FlatList.js +1 -0
  142. package/dist/module/components/FlatList.js.map +1 -1
  143. package/dist/module/components/ImageBackground.js +2 -6
  144. package/dist/module/components/ImageBackground.js.map +1 -1
  145. package/dist/module/components/KeyboardAvoidingView.js +2 -3
  146. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  147. package/dist/module/components/SafeAreaProvider.js +4 -0
  148. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  149. package/dist/module/components/index.cjs +46 -1
  150. package/dist/module/components/index.cjs.map +1 -1
  151. package/dist/module/jest/index.js +1 -1
  152. package/dist/module/jest/index.js.map +1 -1
  153. package/dist/module/metro/cache-version.js +39 -0
  154. package/dist/module/metro/cache-version.js.map +1 -0
  155. package/dist/module/metro/index.js +2 -0
  156. package/dist/module/metro/index.js.map +1 -1
  157. package/dist/module/metro/metro-transformer.js +16 -3
  158. package/dist/module/metro/metro-transformer.js.map +1 -1
  159. package/dist/module/metro/typescript.js +26 -6
  160. package/dist/module/metro/typescript.js.map +1 -1
  161. package/dist/module/metro/warnings.js +131 -0
  162. package/dist/module/metro/warnings.js.map +1 -0
  163. package/dist/module/native/api.js +15 -11
  164. package/dist/module/native/api.js.map +1 -1
  165. package/dist/module/native/conditions/attributes.js +16 -9
  166. package/dist/module/native/conditions/attributes.js.map +1 -1
  167. package/dist/module/native/conditions/container-query.js +11 -11
  168. package/dist/module/native/conditions/container-query.js.map +1 -1
  169. package/dist/module/native/conditions/media-query.js +1 -1
  170. package/dist/module/native/conditions/media-query.js.map +1 -1
  171. package/dist/module/native/react/interaction.js +10 -5
  172. package/dist/module/native/react/interaction.js.map +1 -1
  173. package/dist/module/native/react/rules.js +13 -6
  174. package/dist/module/native/react/rules.js.map +1 -1
  175. package/dist/module/native/react/useNativeCss.js +73 -18
  176. package/dist/module/native/react/useNativeCss.js.map +1 -1
  177. package/dist/module/native/react/usePassthrough.js +5 -2
  178. package/dist/module/native/react/usePassthrough.js.map +1 -1
  179. package/dist/module/native/reactivity.js +55 -22
  180. package/dist/module/native/reactivity.js.map +1 -1
  181. package/dist/module/native/reanimated.js +15 -3
  182. package/dist/module/native/reanimated.js.map +1 -1
  183. package/dist/module/native/styles/functions/color-mix.js +59 -0
  184. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  185. package/dist/module/native/styles/functions/filters.js +16 -4
  186. package/dist/module/native/styles/functions/filters.js.map +1 -1
  187. package/dist/module/native/styles/functions/index.js +1 -0
  188. package/dist/module/native/styles/functions/index.js.map +1 -1
  189. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  190. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  191. package/dist/module/native/styles/functions/string-functions.js +13 -0
  192. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  193. package/dist/module/native/styles/functions/transform-functions.js +5 -4
  194. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  195. package/dist/module/native/styles/index.js +383 -28
  196. package/dist/module/native/styles/index.js.map +1 -1
  197. package/dist/module/native/styles/resolve.js +10 -6
  198. package/dist/module/native/styles/resolve.js.map +1 -1
  199. package/dist/module/native/styles/scale-factor.js +9 -0
  200. package/dist/module/native/styles/scale-factor.js.map +1 -0
  201. package/dist/module/native/styles/shorthands/_handler.js +11 -1
  202. package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
  203. package/dist/module/native/styles/shorthands/animation.js +6 -3
  204. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  205. package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
  206. package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
  207. package/dist/module/native/styles/shorthands/index.js +1 -0
  208. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  209. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  210. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  211. package/dist/module/native/styles/variables.js +55 -43
  212. package/dist/module/native/styles/variables.js.map +1 -1
  213. package/dist/module/native-internal/root.js +18 -7
  214. package/dist/module/native-internal/root.js.map +1 -1
  215. package/dist/module/native-internal/style-collection.js +1 -1
  216. package/dist/module/native-internal/style-collection.js.map +1 -1
  217. package/dist/module/native-internal/variables.js +2 -2
  218. package/dist/module/native-internal/variables.js.map +1 -1
  219. package/dist/module/utilities/dot-notation.types.js +2 -0
  220. package/dist/module/utilities/style-descriptor.js +4 -9
  221. package/dist/module/utilities/style-descriptor.js.map +1 -1
  222. package/dist/module/web/api.js +2 -2
  223. package/dist/module/web/api.js.map +1 -1
  224. package/dist/module/web/assign-style.js +4 -1
  225. package/dist/module/web/assign-style.js.map +1 -1
  226. package/dist/typescript/commonjs/src/babel/helpers.d.ts +2 -1
  227. package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  229. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  230. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  232. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  233. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  234. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
  235. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +6 -0
  237. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -2
  239. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  242. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +7 -8
  245. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  249. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  250. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  251. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
  252. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  253. package/dist/typescript/commonjs/src/jest/index.d.ts +2 -10
  254. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  255. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  256. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  257. package/dist/typescript/commonjs/src/metro/index.d.ts +4 -0
  258. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  259. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
  260. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  261. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  262. package/dist/typescript/commonjs/src/metro/warnings.d.ts +13 -0
  263. package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
  265. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  266. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  267. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  268. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  269. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  270. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  271. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  272. package/dist/typescript/commonjs/src/native/reactivity.d.ts +14 -3
  273. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  274. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  276. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  277. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  278. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  279. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  280. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  281. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  282. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  283. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  284. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  285. package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
  286. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  287. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
  288. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  289. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  290. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  291. package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  292. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  293. package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  294. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  295. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  296. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  297. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  299. package/dist/typescript/commonjs/src/native-internal/root.d.ts +12 -0
  300. package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
  301. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  302. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  303. package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
  304. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  305. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
  306. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  307. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
  308. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  309. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  310. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  311. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  312. package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
  313. package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
  314. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  315. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  316. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  317. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  318. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  319. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  320. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  321. package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
  322. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  323. package/dist/typescript/module/src/compiler/compiler.types.d.ts +7 -1
  324. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  325. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  326. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  327. package/dist/typescript/module/src/compiler/declarations.d.ts +5 -4
  328. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  329. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  330. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  331. package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
  332. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  333. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  334. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  335. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  336. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  337. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  338. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  339. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  340. package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
  341. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  342. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  343. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  344. package/dist/typescript/module/src/compiler/stylesheet.d.ts +7 -8
  345. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  346. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  347. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  348. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  349. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  350. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  351. package/dist/typescript/module/src/components/index.d.ts +16 -16
  352. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  353. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
  354. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  355. package/dist/typescript/module/src/jest/index.d.ts +2 -10
  356. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  357. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  358. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  359. package/dist/typescript/module/src/metro/index.d.ts +5 -1
  360. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  361. package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
  362. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  363. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  364. package/dist/typescript/module/src/metro/warnings.d.ts +13 -0
  365. package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
  366. package/dist/typescript/module/src/native/api.d.ts +5 -9
  367. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  368. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  369. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  370. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  371. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  372. package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
  373. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  374. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  375. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  376. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  377. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  378. package/dist/typescript/module/src/native/index.d.ts +3 -3
  379. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  380. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  381. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  382. package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
  383. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  384. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
  385. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  386. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  387. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  388. package/dist/typescript/module/src/native/reactivity.d.ts +14 -3
  389. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  390. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  391. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
  392. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  393. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  394. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  395. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  396. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  397. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  398. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  399. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  400. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  401. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
  402. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  403. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  404. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  405. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  406. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  407. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  408. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  409. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
  410. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  411. package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
  412. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  413. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  414. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  415. package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
  416. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  417. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  418. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  419. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  420. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  421. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  422. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  423. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  424. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  425. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  426. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  427. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  428. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  429. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  430. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  431. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  432. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  433. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  434. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  435. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  436. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  437. package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
  438. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  439. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  440. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  441. package/dist/typescript/module/src/native-internal/root.d.ts +13 -1
  442. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  443. package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
  444. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  445. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  446. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  447. package/dist/typescript/module/src/runtime.d.ts +1 -1
  448. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  449. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  450. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  451. package/dist/typescript/module/src/runtime.types.d.ts +11 -6
  452. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  453. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
  454. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  455. package/dist/typescript/module/src/utilities/index.d.ts +3 -3
  456. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  457. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  458. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  459. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
  460. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  461. package/dist/typescript/module/src/web/api.d.ts +5 -5
  462. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  463. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  464. package/dist/typescript/module/src/web/index.d.ts +3 -3
  465. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  466. package/node/babel.mjs +4 -0
  467. package/node/compiler.mjs +2 -0
  468. package/node/metro.mjs +2 -0
  469. package/package.json +78 -29
  470. package/src/babel/helpers.ts +8 -1
  471. package/src/babel/import-plugin.ts +31 -16
  472. package/src/babel/react-native-web.ts +32 -4
  473. package/src/babel/react-native.ts +9 -4
  474. package/src/compiler/atRules.ts +44 -0
  475. package/src/compiler/compiler.ts +159 -43
  476. package/src/compiler/compiler.types.ts +9 -0
  477. package/src/compiler/container-query.ts +8 -3
  478. package/src/compiler/declarations.ts +280 -95
  479. package/src/compiler/lightningcss-loader.ts +21 -1
  480. package/src/compiler/media-query.ts +20 -9
  481. package/src/compiler/selector-builder.ts +31 -4
  482. package/src/compiler/stylesheet.ts +23 -10
  483. package/src/compiler/supports.ts +2 -2
  484. package/src/components/FlatList.tsx +1 -0
  485. package/src/components/ImageBackground.tsx +2 -6
  486. package/src/components/KeyboardAvoidingView.tsx +2 -3
  487. package/src/components/SafeAreaProvider.tsx +1 -0
  488. package/src/components/index.cts +46 -1
  489. package/src/jest/index.ts +1 -1
  490. package/src/metro/cache-version.ts +48 -0
  491. package/src/metro/index.ts +7 -0
  492. package/src/metro/metro-transformer.ts +26 -8
  493. package/src/metro/typescript.ts +53 -6
  494. package/src/metro/warnings.ts +187 -0
  495. package/src/native/api.tsx +22 -17
  496. package/src/native/conditions/attributes.ts +26 -9
  497. package/src/native/conditions/container-query.ts +11 -9
  498. package/src/native/conditions/media-query.ts +1 -1
  499. package/src/native/react/interaction.ts +11 -6
  500. package/src/native/react/rules.ts +13 -5
  501. package/src/native/react/useNativeCss.ts +79 -17
  502. package/src/native/react/usePassthrough.ts +3 -2
  503. package/src/native/reactivity.ts +76 -24
  504. package/src/native/reanimated.ts +24 -5
  505. package/src/native/styles/functions/color-mix.ts +74 -0
  506. package/src/native/styles/functions/filters.ts +20 -6
  507. package/src/native/styles/functions/index.ts +1 -0
  508. package/src/native/styles/functions/numeric-functions.ts +7 -6
  509. package/src/native/styles/functions/string-functions.ts +18 -0
  510. package/src/native/styles/functions/transform-functions.ts +5 -4
  511. package/src/native/styles/index.ts +443 -36
  512. package/src/native/styles/resolve.ts +15 -11
  513. package/src/native/styles/scale-factor.ts +6 -0
  514. package/src/native/styles/shorthands/_handler.ts +14 -1
  515. package/src/native/styles/shorthands/animation.ts +8 -2
  516. package/src/native/styles/shorthands/box-shadow.ts +50 -15
  517. package/src/native/styles/shorthands/index.ts +1 -0
  518. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  519. package/src/native/styles/variables.ts +48 -38
  520. package/src/native-internal/root.ts +40 -13
  521. package/src/native-internal/style-collection.ts +1 -1
  522. package/src/native-internal/variables.tsx +6 -4
  523. package/src/runtime.types.ts +17 -15
  524. package/src/utilities/dot-notation.types.ts +4 -3
  525. package/src/utilities/style-descriptor.ts +11 -16
  526. package/src/web/api.tsx +7 -12
  527. package/src/web/assign-style.ts +2 -1
  528. package/types.d.ts +3 -20
  529. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  530. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  531. package/dist/module/compiler/inheritance.test.js +0 -78
  532. package/dist/module/compiler/inheritance.test.js.map +0 -1
  533. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  534. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  535. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  536. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  537. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  538. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  539. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  540. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  541. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  542. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  543. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  544. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  545. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  546. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  547. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  548. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  549. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  550. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  551. package/dist/typescript/module/eslint.config.d.mts +0 -2
  552. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  553. package/dist/typescript/module/example/app.config.d.ts +0 -4
  554. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  555. package/dist/typescript/module/example/index.d.ts +0 -2
  556. package/dist/typescript/module/example/index.d.ts.map +0 -1
  557. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  558. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  559. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  560. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  561. package/dist/typescript/module/example/src/App.d.ts +0 -3
  562. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  563. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  564. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  565. package/src/compiler/inheritance.test.ts +0 -121
@@ -17,6 +17,149 @@ import {
17
17
  } from "../reactivity";
18
18
  import { calculateProps } from "./calculate-props";
19
19
 
20
+ /**
21
+ * Checks if the left style object has any properties that are not present in the right style object.
22
+ * This is used to determine if styles need to be preserved in an array or if right can completely override left.
23
+ *
24
+ * Note: This intentionally only checks one direction (left → right). We don't need to check if right has
25
+ * properties that left doesn't have, because right will always be applied/merged. The question we're
26
+ * answering is: "Does left have any properties that would be lost if we just used right?" If yes, we
27
+ * create a style array [left, right] to preserve both. If no, right can safely replace left entirely.
28
+ *
29
+ * @param left - The left style object to check
30
+ * @param right - The right style object to compare against
31
+ * @returns true if left has at least one property key that doesn't exist in right, false otherwise
32
+ *
33
+ * @example
34
+ * hasNonOverlappingProperties({color: 'red', fontSize: 12}, {color: 'blue'}) // true - fontSize is not in right
35
+ * hasNonOverlappingProperties({color: 'red'}, {color: 'blue', fontSize: 12}) // false - all left keys exist in right
36
+ */
37
+ function hasNonOverlappingProperties(
38
+ left: Record<string, any>,
39
+ right: Record<string, any>,
40
+ ): boolean {
41
+ // Null safety check
42
+ if (!left || !right) {
43
+ return false;
44
+ }
45
+
46
+ // Only check own properties to avoid prototype pollution
47
+ for (const key in left) {
48
+ if (Object.prototype.hasOwnProperty.call(left, key)) {
49
+ if (!Object.prototype.hasOwnProperty.call(right, key)) {
50
+ return true;
51
+ }
52
+ }
53
+ }
54
+ return false;
55
+ }
56
+
57
+ /**
58
+ * Flattens a style array into a single object when possible, with rightmost values taking precedence.
59
+ * Returns the original array if it contains any non-plain objects, arrays, or CSS variable objects.
60
+ *
61
+ * Note: This function assumes the input array has already been filtered (e.g., by filterCssVariables),
62
+ * so empty arrays should not reach this function. If they do, they will be treated as non-flattenable.
63
+ *
64
+ * @param styleArray - The style array to potentially flatten
65
+ * @returns A single merged object if all items are plain objects, otherwise the original array
66
+ */
67
+ function flattenStyleArray(styleArray: any[]): any {
68
+ // Check if we can flatten to a single object (all items are plain objects)
69
+ for (const item of styleArray) {
70
+ // Use explicit null check instead of !item to allow falsy values like 0 or false
71
+ if (
72
+ item == null ||
73
+ typeof item !== "object" ||
74
+ Array.isArray(item) ||
75
+ Object.prototype.hasOwnProperty.call(item, VAR_SYMBOL)
76
+ ) {
77
+ return styleArray;
78
+ }
79
+ }
80
+
81
+ // Use reduce to avoid spread operator performance issues with large arrays
82
+ return styleArray.reduce((acc, item) => Object.assign(acc, item), {});
83
+ }
84
+
85
+ /**
86
+ * Recursively filters out CSS variable objects (with VAR_SYMBOL) from style values.
87
+ * This prevents CSS variable runtime objects from leaking into React Native component props.
88
+ *
89
+ * @param value - The value to filter (can be any type: object, array, primitive, etc.)
90
+ * @param depth - Internal recursion depth counter to prevent stack overflow (max 100)
91
+ * @returns The filtered value with CSS variables removed, or `undefined` if the entire value
92
+ * should be filtered out (e.g., empty arrays, objects with only VAR_SYMBOL properties)
93
+ *
94
+ * Filtering behavior:
95
+ * - Objects with VAR_SYMBOL property: returns `undefined` (completely filtered)
96
+ * - Arrays: filters out VAR_SYMBOL objects, returns `undefined` if empty after filtering
97
+ * - Objects: recursively filters properties, returns `undefined` if no properties remain
98
+ * - Primitives (null, undefined, numbers, strings, booleans): returned as-is
99
+ * - Symbol properties: intentionally filtered out for React Native compatibility
100
+ *
101
+ * @example
102
+ * filterCssVariables({fontSize: 16, color: {[VAR_SYMBOL]: true}}) // {fontSize: 16}
103
+ * filterCssVariables([{margin: 10}, {[VAR_SYMBOL]: true}]) // [{margin: 10}]
104
+ * filterCssVariables({color: {[VAR_SYMBOL]: true}}) // undefined (all props filtered)
105
+ */
106
+ function filterCssVariables(value: any, depth = 0): any | undefined {
107
+ // Prevent stack overflow on deeply nested structures
108
+ if (depth > 100) {
109
+ return value;
110
+ }
111
+
112
+ if (value === null || value === undefined) {
113
+ return value;
114
+ }
115
+
116
+ if (Array.isArray(value)) {
117
+ // Single-pass filter with map operation
118
+ const filtered: any[] = [];
119
+
120
+ for (const item of value) {
121
+ const filteredItem = filterCssVariables(item, depth + 1);
122
+ if (
123
+ filteredItem !== undefined &&
124
+ !(
125
+ typeof filteredItem === "object" &&
126
+ filteredItem !== null &&
127
+ Object.prototype.hasOwnProperty.call(filteredItem, VAR_SYMBOL)
128
+ )
129
+ ) {
130
+ filtered.push(filteredItem);
131
+ }
132
+ }
133
+
134
+ return filtered.length > 0 ? filtered : undefined;
135
+ }
136
+
137
+ if (typeof value === "object") {
138
+ // If the object itself has VAR_SYMBOL, filter it out (check own property only)
139
+ if (Object.prototype.hasOwnProperty.call(value, VAR_SYMBOL)) {
140
+ return undefined;
141
+ }
142
+
143
+ // Otherwise, filter VAR_SYMBOL properties from nested objects
144
+ const filtered: Record<string, any> = {};
145
+ let hasProperties = false;
146
+
147
+ // Use Object.keys to only iterate own string properties (not inherited, not Symbols)
148
+ // This intentionally filters out Symbol properties for React Native compatibility
149
+ for (const key of Object.keys(value)) {
150
+ const filteredValue = filterCssVariables(value[key], depth + 1);
151
+ if (filteredValue !== undefined) {
152
+ filtered[key] = filteredValue;
153
+ hasProperties = true;
154
+ }
155
+ }
156
+
157
+ return hasProperties ? filtered : undefined;
158
+ }
159
+
160
+ return value;
161
+ }
162
+
20
163
  export const stylesFamily = family(
21
164
  (
22
165
  hash: string,
@@ -29,9 +172,10 @@ export const stylesFamily = family(
29
172
  /**
30
173
  * A family is a map, so we need to cleanup the observers when the the hash is no longer used
31
174
  */
175
+ const unsubscribe = obs.unsubscribe;
32
176
  return Object.assign(obs, {
33
- cleanup: (effect: Effect) => {
34
- obs.observers.delete(effect);
177
+ unsubscribe: (effect: Effect) => {
178
+ unsubscribe(effect);
35
179
  if (obs.observers.size === 0) {
36
180
  stylesFamily.delete(hash);
37
181
  }
@@ -43,16 +187,50 @@ export const stylesFamily = family(
43
187
  export function getStyledProps(
44
188
  state: ComponentState,
45
189
  inline: Record<string, any> | undefined | null,
190
+ adaptProps: (
191
+ props: Record<string, any> | undefined,
192
+ ) => Record<string, any> | undefined = (props) => props,
46
193
  ) {
47
194
  let result: Record<string, any> | undefined;
48
195
 
49
196
  const styledProps = state.stylesObs?.get(state.styleEffect);
50
197
 
198
+ // Each config merges a complete props object. Preserve its full target path
199
+ // before the next config merges unrelated inline props over that object.
200
+ const computedTargets: { path: string[]; value: unknown }[] = [];
201
+ const consumedSources: string[] = [];
202
+
51
203
  for (const config of state.configs) {
52
- result = deepMergeConfig(config, styledProps?.normal, inline, true);
204
+ result = deepMergeConfig(
205
+ config,
206
+ nativeStyleMapping(config, adaptProps(styledProps?.normal)),
207
+ inline,
208
+ true,
209
+ );
53
210
 
54
211
  if (styledProps?.important) {
55
- result = deepMergeConfig(config, result, styledProps.important);
212
+ result = deepMergeConfig(
213
+ config,
214
+ result,
215
+ nativeStyleMapping(config, adaptProps(styledProps.important)),
216
+ );
217
+ }
218
+
219
+ if (result && config.target) {
220
+ const path = Array.isArray(config.target)
221
+ ? config.target
222
+ : [config.target];
223
+ let target = result;
224
+ for (const key of path.slice(0, -1)) target = target?.[key];
225
+ const key = path[path.length - 1];
226
+ if (target && key && key in target) {
227
+ computedTargets.push({ path, value: target[key] });
228
+ }
229
+ }
230
+
231
+ // Track consumed className sources for cleanup
232
+ if (config.source !== config.target) {
233
+ consumedSources.push(config.source);
56
234
  }
57
235
 
58
236
  // Apply the handlers
@@ -113,6 +291,68 @@ export function getStyledProps(
113
291
  }
114
292
  }
115
293
 
294
+ // Restore correctly-merged target props that may have been overwritten
295
+ // by later config iterations' Object.assign({}, left, right)
296
+ if (result) {
297
+ for (const { path, value } of computedTargets) {
298
+ let target = result;
299
+ for (const key of path.slice(0, -1)) {
300
+ const existing = target[key];
301
+ target = target[key] = Array.isArray(existing)
302
+ ? [...existing]
303
+ : { ...existing };
304
+ }
305
+ target[path[path.length - 1]!] = value;
306
+ }
307
+ for (const source of consumedSources) {
308
+ delete result[source];
309
+ }
310
+ }
311
+
312
+ return result;
313
+ }
314
+
315
+ /**
316
+ * Merges two prop objects, skipping keys from `right` whose value is `undefined`
317
+ * or an empty plain object.
318
+ *
319
+ * `Object.assign({}, left, right)` copies all enumerable own properties from `right`,
320
+ * including those with value `undefined` or `{}`. When a component passes
321
+ * `style={undefined}` or `contentContainerStyle={{}}`, the computed NativeWind
322
+ * style from `left` gets overwritten. This function prevents that by only copying
323
+ * values that carry meaningful style information.
324
+ *
325
+ * Empty object detection uses inline `for...in` instead of a separate function or
326
+ * `Object.keys().length` — avoids both function call overhead and intermediate array
327
+ * allocation on a hot path (called per-prop per-render). Consistent with how the
328
+ * `["style"]` target path handles this via `filterCssVariables({})` returning `undefined`.
329
+ *
330
+ * @param left - The computed NativeWind props (className-derived styles)
331
+ * @param right - The inline props from the component (guaranteed non-null by caller; may contain undefined values)
332
+ * @returns A new object with all properties from `left`, overridden only by meaningful values from `right`
333
+ */
334
+ function mergeDefinedProps(
335
+ left: Record<string, any> | undefined,
336
+ right: Record<string, any>,
337
+ ) {
338
+ const result = left ? { ...left } : {};
339
+ for (const key in right) {
340
+ const value = right[key];
341
+ if (value === undefined) continue;
342
+ // Non-object values (strings, numbers, booleans, null, arrays): always assign
343
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
344
+ result[key] = value;
345
+ continue;
346
+ }
347
+ // Plain object: assign only if non-empty. An empty style object (e.g.,
348
+ // contentContainerStyle={{}}) has no properties to apply and should not
349
+ // overwrite computed className styles. The for...in loop only executes
350
+ // if the object has enumerable keys — empty objects are skipped.
351
+ for (const _ in value) {
352
+ result[key] = value;
353
+ break;
354
+ }
355
+ }
116
356
  return result;
117
357
  }
118
358
 
@@ -122,11 +362,96 @@ function deepMergeConfig(
122
362
  right: Record<string, any> | undefined | null,
123
363
  rightIsInline = false,
124
364
  ) {
125
- if (!config.target || !right) {
365
+ if (!right) {
126
366
  return { ...left };
127
367
  }
128
368
 
129
- let result = Object.assign({}, left, right);
369
+ // Handle style merging to support both className and inline style props
370
+ let result: Record<string, any>;
371
+ if (config.target) {
372
+ if (
373
+ Array.isArray(config.target) &&
374
+ config.target.length === 1 &&
375
+ config.target[0] === "style"
376
+ ) {
377
+ // Special handling for style target when we have inline styles
378
+ result = { ...left, ...right };
379
+
380
+ // Handle null/undefined inline styles
381
+ if (right?.style === null || right?.style === undefined) {
382
+ if (left?.style) {
383
+ result.style = left.style;
384
+ }
385
+ } else if (rightIsInline && right?.style) {
386
+ // Filter inline styles if rightIsInline is true
387
+ const filteredRightStyle = filterCssVariables(right.style);
388
+
389
+ if (left?.style) {
390
+ if (!filteredRightStyle) {
391
+ // All inline styles were CSS variables, only use left
392
+ result.style = left.style;
393
+ } else {
394
+ const leftStyle = left.style;
395
+
396
+ // For arrays or objects, check if we need to create a style array
397
+ const leftIsObject =
398
+ typeof leftStyle === "object" && !Array.isArray(leftStyle);
399
+ const rightIsObject =
400
+ typeof filteredRightStyle === "object" &&
401
+ !Array.isArray(filteredRightStyle);
402
+
403
+ if (leftIsObject && rightIsObject) {
404
+ if (hasNonOverlappingProperties(leftStyle, filteredRightStyle)) {
405
+ result.style = [leftStyle, filteredRightStyle];
406
+ } else {
407
+ // All left properties are in right, right overrides
408
+ result.style = filteredRightStyle;
409
+ }
410
+ } else {
411
+ // One or both are arrays, merge them
412
+ result.style = [leftStyle, filteredRightStyle];
413
+ }
414
+ }
415
+ } else {
416
+ // No left style, just use filtered right
417
+ if (filteredRightStyle) {
418
+ result.style = filteredRightStyle;
419
+ } else {
420
+ // All filtered out, remove style prop
421
+ delete result.style;
422
+ }
423
+ }
424
+ } else if (!rightIsInline && right?.style) {
425
+ // Merging non-inline styles (e.g., important styles)
426
+ if (left?.style) {
427
+ // If left.style is an array, append right.style
428
+ if (Array.isArray(left.style)) {
429
+ const combined = [...left.style, right.style];
430
+ result.style = flattenStyleArray(combined);
431
+ } else if (
432
+ typeof left.style === "object" &&
433
+ typeof right.style === "object"
434
+ ) {
435
+ // Both are objects, check for overlaps
436
+ if (hasNonOverlappingProperties(left.style, right.style)) {
437
+ result.style = flattenStyleArray([left.style, right.style]);
438
+ } else {
439
+ // All left properties are overridden by right
440
+ result.style = right.style;
441
+ }
442
+ } else {
443
+ // One or both are arrays/mixed types
444
+ const combined = [left.style, right.style];
445
+ result.style = flattenStyleArray(combined);
446
+ }
447
+ }
448
+ }
449
+ } else {
450
+ result = mergeDefinedProps(left, right);
451
+ }
452
+ } else {
453
+ result = mergeDefinedProps(left, right);
454
+ }
130
455
 
131
456
  if (
132
457
  right &&
@@ -140,53 +465,74 @@ function deepMergeConfig(
140
465
  /**
141
466
  * If target is a path, deep merge until we get to the last key
142
467
  */
143
- if (Array.isArray(config.target) && config.target.length > 1) {
144
- for (let i = 0; i < config.target.length - 1; i++) {
145
- const key = config.target[i];
146
-
147
- if (key === undefined) {
148
- return result;
149
- }
150
-
468
+ if (Array.isArray(config.target)) {
469
+ if (config.target.length > 1) {
470
+ const key = config.target[0]!;
151
471
  result[key] = deepMergeConfig(
152
- { source: config.source, target: config.target.slice(i + 1) },
472
+ { source: config.source, target: config.target.slice(1) },
153
473
  left?.[key],
154
474
  right?.[key],
155
475
  rightIsInline,
156
476
  );
157
477
  }
158
478
 
479
+ // For length-1 array targets (e.g. ["contentContainerStyle"]), the loop
480
+ // above runs 0 iterations. Merge the target prop so inline styles don't
481
+ // silently overwrite className-computed styles (same as string target path).
482
+ const finalKey = config.target[config.target.length - 1];
483
+ if (config.target.length === 1 && finalKey && rightIsInline) {
484
+ let rightValue = right?.[finalKey];
485
+ if (rightValue !== undefined) {
486
+ rightValue = filterCssVariables(rightValue);
487
+ }
488
+ if (rightValue === undefined || rightValue === null) {
489
+ // Inline is empty or fully filtered — preserve className-computed value
490
+ if (left && finalKey in left) {
491
+ result[finalKey] = left[finalKey];
492
+ } else {
493
+ // No left value either — remove unfiltered inline value from result
494
+ delete result[finalKey];
495
+ }
496
+ } else if (left && finalKey in left) {
497
+ const leftValue = left[finalKey];
498
+ const leftIsObj =
499
+ typeof leftValue === "object" &&
500
+ leftValue !== null &&
501
+ !Array.isArray(leftValue);
502
+ const rightIsObj =
503
+ typeof rightValue === "object" &&
504
+ rightValue !== null &&
505
+ !Array.isArray(rightValue);
506
+ if (leftIsObj && rightIsObj) {
507
+ if (hasNonOverlappingProperties(leftValue, rightValue)) {
508
+ result[finalKey] = [leftValue, rightValue];
509
+ } else {
510
+ // All left keys are in right — use filtered right value
511
+ result[finalKey] = rightValue;
512
+ }
513
+ } else {
514
+ result[finalKey] = [leftValue, rightValue];
515
+ }
516
+ } else {
517
+ // No left value — use filtered right value (not the unfiltered one from mergeDefinedProps)
518
+ result[finalKey] = rightValue;
519
+ }
520
+ }
521
+
159
522
  return result;
160
523
  }
161
524
 
162
- const target = Array.isArray(config.target)
163
- ? config.target[0]
164
- : config.target;
525
+ const target = config.target;
165
526
 
166
- if (target === undefined) {
527
+ if (target === undefined || target === false) {
167
528
  return result;
168
529
  }
169
530
 
170
531
  let rightValue = right?.[target];
171
532
 
172
533
  // Strip any inline variables from the target
173
- if (rightIsInline && rightValue) {
174
- if (Array.isArray(rightValue)) {
175
- rightValue = rightValue.filter((v) => {
176
- return typeof v !== "object" || !(v && VAR_SYMBOL in v);
177
- });
178
-
179
- if (rightValue.length === 0) {
180
- rightValue = undefined;
181
- }
182
- } else if (
183
- typeof rightValue === "object" &&
184
- rightValue &&
185
- VAR_SYMBOL in rightValue
186
- ) {
187
- rightValue = undefined;
188
- delete result[target][VAR_SYMBOL];
189
- }
534
+ if (rightIsInline && rightValue !== undefined) {
535
+ rightValue = filterCssVariables(rightValue);
190
536
  }
191
537
 
192
538
  if (rightValue !== undefined) {
@@ -196,3 +542,64 @@ function deepMergeConfig(
196
542
 
197
543
  return result;
198
544
  }
545
+
546
+ function nativeStyleMapping(
547
+ config: Config,
548
+ props: Record<string, any> | undefined,
549
+ ) {
550
+ if (!props) {
551
+ return props;
552
+ }
553
+ if (!config.nativeStyleMapping) {
554
+ if (config.target === false) delete props.style;
555
+ return props;
556
+ }
557
+
558
+ let source: Record<string, any> | undefined;
559
+
560
+ if (typeof config.target === "string") {
561
+ source = props[config.target];
562
+ } else if (config.target === false) {
563
+ source = props["style"];
564
+ } else {
565
+ const tokens = [...config.target];
566
+ const lastToken = tokens.pop()!;
567
+
568
+ source = props;
569
+ for (const token of tokens) {
570
+ source = source[token];
571
+ if (!source) {
572
+ return props;
573
+ }
574
+ }
575
+
576
+ source = source[lastToken];
577
+ }
578
+
579
+ if (!source) {
580
+ return props;
581
+ }
582
+
583
+ for (const [key, path] of Object.entries(config.nativeStyleMapping)) {
584
+ const styleValue = source[key];
585
+
586
+ delete source[key];
587
+
588
+ if (styleValue === undefined) {
589
+ continue;
590
+ }
591
+
592
+ let target = props;
593
+ const tokens = path.split(".");
594
+ const lastToken = tokens.pop();
595
+ for (const token of tokens) {
596
+ target[token] ??= {};
597
+ target = target[token];
598
+ }
599
+
600
+ target[lastToken!] = styleValue;
601
+ }
602
+
603
+ if (config.target === false) delete props.style;
604
+ return props;
605
+ }
@@ -5,6 +5,7 @@ import type {
5
5
  StyleDescriptor,
6
6
  StyleFunction,
7
7
  } from "react-native-css/compiler";
8
+ import { isStyleDescriptorArray } from "react-native-css/utilities";
8
9
 
9
10
  import type { RenderGuard } from "../conditions/guards";
10
11
  import { type Getter, type VariableContextValue } from "../reactivity";
@@ -12,6 +13,7 @@ import type { calculateProps } from "./calculate-props";
12
13
  import { transformKeys } from "./defaults";
13
14
  import * as functions from "./functions";
14
15
  import { lineHeight } from "./line-height";
16
+ import { scaleFactor } from "./scale-factor";
15
17
  import * as shorthands from "./shorthands";
16
18
  import { em, rem, vh, vw } from "./units";
17
19
  import { varResolver } from "./variables";
@@ -51,6 +53,7 @@ export type ResolveValueOptions = {
51
53
  inlineVariables?: InlineVariable | undefined;
52
54
  renderGuards?: RenderGuard[];
53
55
  variableHistory?: Set<string>;
56
+ variableCycles?: Set<string>;
54
57
  /** Pass down to perform recursive calculations and avoid circular dependencies */
55
58
  calculateProps?: typeof calculateProps;
56
59
  };
@@ -77,7 +80,7 @@ export function resolveValue(
77
80
  return null;
78
81
  } else if (value.endsWith("px")) {
79
82
  // Inline vars() might set a value with a px suffix
80
- return parseInt(value.slice(0, -2), 10);
83
+ return parseFloat(value.slice(0, -2));
81
84
  } else {
82
85
  return value;
83
86
  }
@@ -87,7 +90,7 @@ export function resolveValue(
87
90
  return value;
88
91
  }
89
92
 
90
- if (isDescriptorArray(value)) {
93
+ if (isStyleDescriptorArray(value)) {
91
94
  value = value
92
95
  .map((d) => resolveValue(d, get, options))
93
96
  .filter((d) => d !== undefined);
@@ -122,7 +125,16 @@ export function resolveValue(
122
125
  ) as StyleDescriptor;
123
126
  } else if (transformKeys.has(name)) {
124
127
  // translate, rotate, scale, etc.
125
- return { [name]: simpleResolve(value[2], castToArray) };
128
+ let resolved = simpleResolve(value[2], castToArray);
129
+ // CSS scale percentages describe a factor, unlike translation percentages.
130
+ if (
131
+ (name === "scaleX" || name === "scaleY" || name === "scale") &&
132
+ typeof resolved === "string" &&
133
+ resolved.endsWith("%")
134
+ ) {
135
+ resolved = scaleFactor(resolved);
136
+ }
137
+ return { [name]: resolved };
126
138
  } else {
127
139
  let args = simpleResolve(value[2], castToArray);
128
140
 
@@ -154,11 +166,3 @@ export function resolveValue(
154
166
  }
155
167
  }
156
168
  }
157
-
158
- function isDescriptorArray(
159
- value: StyleDescriptor | StyleDescriptor[],
160
- ): value is StyleDescriptor[] {
161
- return Array.isArray(value) && typeof value[0] === "object"
162
- ? Array.isArray(value[0])
163
- : true;
164
- }
@@ -0,0 +1,6 @@
1
+ export function scaleFactor(value: unknown) {
2
+ if (typeof value === "string" && value.endsWith("%")) {
3
+ return Number(value.slice(0, -1)) / 100;
4
+ }
5
+ return value;
6
+ }
@@ -1,5 +1,8 @@
1
1
  /* eslint-disable */
2
- import { isStyleDescriptorArray } from "react-native-css/utilities";
2
+ import {
3
+ isStyleDescriptorArray,
4
+ isStyleFunction,
5
+ } from "react-native-css/utilities";
3
6
 
4
7
  import { setDeepPath } from "../../objects";
5
8
  import { ShortHandSymbol } from "../constants";
@@ -56,6 +59,16 @@ export function shorthandHandler(
56
59
  return type.includes(value) || type.includes(typeof value);
57
60
  }
58
61
 
62
+ // Style functions (var, calc, env, etc.) are unresolved at pattern-match
63
+ // time — their actual values won't be known until runtime variable
64
+ // resolution. Accepting them in any type slot makes pattern matching
65
+ // less strict when variables are involved, but rejecting them would
66
+ // break variable-based shadows entirely (e.g. box-shadow: var(--shadow)
67
+ // where --shadow resolves to "0 4px 6px -1px #000").
68
+ if (isStyleFunction(value)) {
69
+ return true;
70
+ }
71
+
59
72
  switch (type) {
60
73
  case "string":
61
74
  case "number":
@@ -39,6 +39,8 @@ export const animationShorthand = shorthandHandler(
39
39
  [name],
40
40
  [duration, name],
41
41
  [name, duration],
42
+ [name, duration, timingFunction],
43
+ [duration, timingFunction, name],
42
44
  [name, duration, iteration],
43
45
  [name, duration, timingFunction, iteration],
44
46
  [duration, delay, name],
@@ -67,7 +69,7 @@ export const animation: StyleFunctionResolver = (
67
69
  ) => {
68
70
  const animationShortHandTuples = animationShorthand(
69
71
  resolveValue,
70
- value,
72
+ [value[2]],
71
73
  get,
72
74
  options,
73
75
  );
@@ -86,6 +88,10 @@ export const animation: StyleFunctionResolver = (
86
88
  return;
87
89
  }
88
90
 
91
+ if (name === "none") {
92
+ return applyShorthand(animationShortHandTuples);
93
+ }
94
+
89
95
  const keyframes = get(StyleCollection.keyframes(name));
90
96
 
91
97
  const animation: Record<string, any> = {};
@@ -127,5 +133,5 @@ export const animationName: StyleFunctionResolver = (
127
133
  options,
128
134
  ) => {
129
135
  const shorthand: any = animation(resolveValue, value, get, options);
130
- return shorthand.animationName;
136
+ return shorthand?.animationName;
131
137
  };