react-native-css 0.0.0-nightly.416840c → 0.0.0-nightly.4562bdf

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 (793) hide show
  1. package/README.md +35 -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 +198 -39
  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 +248 -96
  17. package/dist/commonjs/compiler/declarations.js.map +1 -1
  18. package/dist/commonjs/compiler/individual-transforms.js +129 -0
  19. package/dist/commonjs/compiler/individual-transforms.js.map +1 -0
  20. package/dist/commonjs/compiler/inline-variables.js +47 -1
  21. package/dist/commonjs/compiler/inline-variables.js.map +1 -1
  22. package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
  23. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  24. package/dist/commonjs/compiler/media-query.js +16 -6
  25. package/dist/commonjs/compiler/media-query.js.map +1 -1
  26. package/dist/commonjs/compiler/selector-builder.js +18 -6
  27. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  28. package/dist/commonjs/compiler/stylesheet.js +33 -9
  29. package/dist/commonjs/compiler/stylesheet.js.map +1 -1
  30. package/dist/commonjs/compiler/supports.js +2 -2
  31. package/dist/commonjs/compiler/supports.js.map +1 -1
  32. package/dist/commonjs/components/ActivityIndicator.js +4 -4
  33. package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
  34. package/dist/commonjs/components/Button.js +4 -4
  35. package/dist/commonjs/components/Button.js.map +1 -1
  36. package/dist/commonjs/components/FlatList.js +5 -4
  37. package/dist/commonjs/components/FlatList.js.map +1 -1
  38. package/dist/commonjs/components/Image.js +4 -4
  39. package/dist/commonjs/components/Image.js.map +1 -1
  40. package/dist/commonjs/components/ImageBackground.js +6 -10
  41. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  42. package/dist/commonjs/components/KeyboardAvoidingView.js +6 -7
  43. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  44. package/dist/commonjs/components/Pressable.js +4 -4
  45. package/dist/commonjs/components/Pressable.js.map +1 -1
  46. package/dist/commonjs/components/SafeAreaProvider.js +13 -0
  47. package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
  48. package/dist/commonjs/components/ScrollView.js +4 -4
  49. package/dist/commonjs/components/ScrollView.js.map +1 -1
  50. package/dist/commonjs/components/Switch.js +4 -4
  51. package/dist/commonjs/components/Switch.js.map +1 -1
  52. package/dist/commonjs/components/Text.js +4 -4
  53. package/dist/commonjs/components/Text.js.map +1 -1
  54. package/dist/commonjs/components/TextInput.js +4 -4
  55. package/dist/commonjs/components/TextInput.js.map +1 -1
  56. package/dist/commonjs/components/TouchableHighlight.js +4 -4
  57. package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
  58. package/dist/commonjs/components/TouchableOpacity.js +4 -4
  59. package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
  60. package/dist/commonjs/components/TouchableWithoutFeedback.js +4 -4
  61. package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
  62. package/dist/commonjs/components/View.js +4 -4
  63. package/dist/commonjs/components/View.js.map +1 -1
  64. package/dist/commonjs/components/VirtualizedList.js +4 -4
  65. package/dist/commonjs/components/VirtualizedList.js.map +1 -1
  66. package/dist/commonjs/components/copyComponentProperties.js +19 -0
  67. package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
  68. package/dist/commonjs/components/index.cjs +52 -4
  69. package/dist/commonjs/components/index.cjs.map +1 -1
  70. package/dist/commonjs/components/react-native-safe-area-context.native.js +10 -0
  71. package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
  72. package/dist/commonjs/jest/index.js +3 -1
  73. package/dist/commonjs/jest/index.js.map +1 -1
  74. package/dist/commonjs/metro/cache-version.js +43 -0
  75. package/dist/commonjs/metro/cache-version.js.map +1 -0
  76. package/dist/commonjs/metro/index.js +2 -0
  77. package/dist/commonjs/metro/index.js.map +1 -1
  78. package/dist/commonjs/metro/metro-transformer.js +16 -3
  79. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  80. package/dist/commonjs/metro/resolver.js +5 -3
  81. package/dist/commonjs/metro/resolver.js.map +1 -1
  82. package/dist/commonjs/metro/typescript.js +26 -6
  83. package/dist/commonjs/metro/typescript.js.map +1 -1
  84. package/dist/commonjs/metro/warnings.js +135 -0
  85. package/dist/commonjs/metro/warnings.js.map +1 -0
  86. package/dist/commonjs/native/api.js +21 -12
  87. package/dist/commonjs/native/api.js.map +1 -1
  88. package/dist/commonjs/native/conditions/attributes.js +16 -9
  89. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  90. package/dist/commonjs/native/conditions/container-query.js +11 -11
  91. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  92. package/dist/commonjs/native/conditions/guards.js +7 -0
  93. package/dist/commonjs/native/conditions/guards.js.map +1 -1
  94. package/dist/commonjs/native/conditions/media-query.js +1 -1
  95. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  96. package/dist/commonjs/native/objects.js +11 -18
  97. package/dist/commonjs/native/objects.js.map +1 -1
  98. package/dist/commonjs/native/react/interaction.js +10 -5
  99. package/dist/commonjs/native/react/interaction.js.map +1 -1
  100. package/dist/commonjs/native/react/rules.js +45 -38
  101. package/dist/commonjs/native/react/rules.js.map +1 -1
  102. package/dist/commonjs/native/react/useNativeCss.js +80 -19
  103. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  104. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  105. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  106. package/dist/commonjs/native/reactivity.js +150 -68
  107. package/dist/commonjs/native/reactivity.js.map +1 -1
  108. package/dist/commonjs/native/reanimated.js +15 -3
  109. package/dist/commonjs/native/reanimated.js.map +1 -1
  110. package/dist/commonjs/native/styles/calculate-props.js +139 -26
  111. package/dist/commonjs/native/styles/calculate-props.js.map +1 -1
  112. package/dist/commonjs/native/styles/functions/animation-timing.js +2 -1
  113. package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -1
  114. package/dist/commonjs/native/styles/functions/color-mix.js +68 -0
  115. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
  116. package/dist/commonjs/native/styles/functions/filters.js +19 -5
  117. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  118. package/dist/commonjs/native/styles/functions/index.js +11 -0
  119. package/dist/commonjs/native/styles/functions/index.js.map +1 -1
  120. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  121. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  122. package/dist/commonjs/native/styles/functions/platform-functions.js +2 -1
  123. package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -1
  124. package/dist/commonjs/native/styles/functions/string-functions.js +22 -6
  125. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  126. package/dist/commonjs/native/styles/functions/transform-functions.js +95 -105
  127. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  128. package/dist/commonjs/native/styles/index.js +361 -34
  129. package/dist/commonjs/native/styles/index.js.map +1 -1
  130. package/dist/commonjs/native/styles/resolve.js +136 -19
  131. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  132. package/dist/commonjs/native/styles/scale-factor.js +12 -0
  133. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  134. package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
  135. package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
  136. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  137. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  138. package/dist/commonjs/native/styles/shorthands/box-shadow.js +41 -20
  139. package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
  140. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  141. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  142. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  143. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  144. package/dist/commonjs/native/styles/shorthands/transform.js +31 -8
  145. package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -1
  146. package/dist/commonjs/native/styles/variables.js +173 -48
  147. package/dist/commonjs/native/styles/variables.js.map +1 -1
  148. package/dist/commonjs/native-internal/root.js +46 -7
  149. package/dist/commonjs/native-internal/root.js.map +1 -1
  150. package/dist/commonjs/native-internal/style-collection.js +56 -74
  151. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  152. package/dist/commonjs/native-internal/variables.js +1 -1
  153. package/dist/commonjs/native-internal/variables.js.map +1 -1
  154. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  155. package/dist/commonjs/utilities/equality.js +41 -0
  156. package/dist/commonjs/utilities/equality.js.map +1 -0
  157. package/dist/commonjs/utilities/index.js +11 -0
  158. package/dist/commonjs/utilities/index.js.map +1 -1
  159. package/dist/commonjs/utilities/specificity.js +12 -12
  160. package/dist/commonjs/utilities/specificity.js.map +1 -1
  161. package/dist/commonjs/utilities/style-descriptor.js +32 -8
  162. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  163. package/dist/commonjs/web/api.js +7 -4
  164. package/dist/commonjs/web/api.js.map +1 -1
  165. package/dist/commonjs/web/assign-style.js +4 -1
  166. package/dist/commonjs/web/assign-style.js.map +1 -1
  167. package/dist/module/babel/helpers.js +6 -0
  168. package/dist/module/babel/helpers.js.map +1 -1
  169. package/dist/module/babel/import-plugin.js +22 -10
  170. package/dist/module/babel/import-plugin.js.map +1 -1
  171. package/dist/module/babel/react-native-web.js +16 -4
  172. package/dist/module/babel/react-native-web.js.map +1 -1
  173. package/dist/module/babel/react-native.js +9 -4
  174. package/dist/module/babel/react-native.js.map +1 -1
  175. package/dist/module/compiler/atRules.js +33 -0
  176. package/dist/module/compiler/atRules.js.map +1 -1
  177. package/dist/module/compiler/compiler.js +200 -41
  178. package/dist/module/compiler/compiler.js.map +1 -1
  179. package/dist/module/compiler/compiler.types.js +4 -0
  180. package/dist/module/compiler/compiler.types.js.map +1 -1
  181. package/dist/module/compiler/container-query.js +6 -1
  182. package/dist/module/compiler/container-query.js.map +1 -1
  183. package/dist/module/compiler/declarations.js +247 -95
  184. package/dist/module/compiler/declarations.js.map +1 -1
  185. package/dist/module/compiler/individual-transforms.js +125 -0
  186. package/dist/module/compiler/individual-transforms.js.map +1 -0
  187. package/dist/module/compiler/inline-variables.js +47 -1
  188. package/dist/module/compiler/inline-variables.js.map +1 -1
  189. package/dist/module/compiler/lightningcss-loader.js +14 -2
  190. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  191. package/dist/module/compiler/media-query.js +16 -6
  192. package/dist/module/compiler/media-query.js.map +1 -1
  193. package/dist/module/compiler/selector-builder.js +18 -7
  194. package/dist/module/compiler/selector-builder.js.map +1 -1
  195. package/dist/module/compiler/stylesheet.js +33 -9
  196. package/dist/module/compiler/stylesheet.js.map +1 -1
  197. package/dist/module/compiler/supports.js +2 -2
  198. package/dist/module/compiler/supports.js.map +1 -1
  199. package/dist/module/components/ActivityIndicator.js +3 -2
  200. package/dist/module/components/ActivityIndicator.js.map +1 -1
  201. package/dist/module/components/Button.js +3 -2
  202. package/dist/module/components/Button.js.map +1 -1
  203. package/dist/module/components/FlatList.js +4 -2
  204. package/dist/module/components/FlatList.js.map +1 -1
  205. package/dist/module/components/Image.js +3 -2
  206. package/dist/module/components/Image.js.map +1 -1
  207. package/dist/module/components/ImageBackground.js +5 -8
  208. package/dist/module/components/ImageBackground.js.map +1 -1
  209. package/dist/module/components/KeyboardAvoidingView.js +5 -5
  210. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  211. package/dist/module/components/Pressable.js +3 -2
  212. package/dist/module/components/Pressable.js.map +1 -1
  213. package/dist/module/components/SafeAreaProvider.js +4 -0
  214. package/dist/module/components/SafeAreaProvider.js.map +1 -0
  215. package/dist/module/components/ScrollView.js +3 -2
  216. package/dist/module/components/ScrollView.js.map +1 -1
  217. package/dist/module/components/Switch.js +3 -2
  218. package/dist/module/components/Switch.js.map +1 -1
  219. package/dist/module/components/Text.js +3 -2
  220. package/dist/module/components/Text.js.map +1 -1
  221. package/dist/module/components/TextInput.js +3 -2
  222. package/dist/module/components/TextInput.js.map +1 -1
  223. package/dist/module/components/TouchableHighlight.js +3 -2
  224. package/dist/module/components/TouchableHighlight.js.map +1 -1
  225. package/dist/module/components/TouchableOpacity.js +3 -2
  226. package/dist/module/components/TouchableOpacity.js.map +1 -1
  227. package/dist/module/components/TouchableWithoutFeedback.js +3 -2
  228. package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
  229. package/dist/module/components/View.js +3 -2
  230. package/dist/module/components/View.js.map +1 -1
  231. package/dist/module/components/VirtualizedList.js +3 -2
  232. package/dist/module/components/VirtualizedList.js.map +1 -1
  233. package/dist/module/components/copyComponentProperties.js +15 -0
  234. package/dist/module/components/copyComponentProperties.js.map +1 -0
  235. package/dist/module/components/index.cjs +52 -4
  236. package/dist/module/components/index.cjs.map +1 -1
  237. package/dist/module/components/react-native-safe-area-context.native.js +9 -1
  238. package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
  239. package/dist/module/jest/index.js +3 -1
  240. package/dist/module/jest/index.js.map +1 -1
  241. package/dist/module/metro/cache-version.js +39 -0
  242. package/dist/module/metro/cache-version.js.map +1 -0
  243. package/dist/module/metro/index.js +2 -0
  244. package/dist/module/metro/index.js.map +1 -1
  245. package/dist/module/metro/metro-transformer.js +16 -3
  246. package/dist/module/metro/metro-transformer.js.map +1 -1
  247. package/dist/module/metro/resolver.js +5 -3
  248. package/dist/module/metro/resolver.js.map +1 -1
  249. package/dist/module/metro/typescript.js +26 -6
  250. package/dist/module/metro/typescript.js.map +1 -1
  251. package/dist/module/metro/warnings.js +131 -0
  252. package/dist/module/metro/warnings.js.map +1 -0
  253. package/dist/module/native/api.js +22 -14
  254. package/dist/module/native/api.js.map +1 -1
  255. package/dist/module/native/conditions/attributes.js +16 -9
  256. package/dist/module/native/conditions/attributes.js.map +1 -1
  257. package/dist/module/native/conditions/container-query.js +11 -11
  258. package/dist/module/native/conditions/container-query.js.map +1 -1
  259. package/dist/module/native/conditions/guards.js +7 -0
  260. package/dist/module/native/conditions/guards.js.map +1 -1
  261. package/dist/module/native/conditions/media-query.js +1 -1
  262. package/dist/module/native/conditions/media-query.js.map +1 -1
  263. package/dist/module/native/objects.js +11 -18
  264. package/dist/module/native/objects.js.map +1 -1
  265. package/dist/module/native/react/interaction.js +10 -5
  266. package/dist/module/native/react/interaction.js.map +1 -1
  267. package/dist/module/native/react/rules.js +46 -39
  268. package/dist/module/native/react/rules.js.map +1 -1
  269. package/dist/module/native/react/useNativeCss.js +83 -22
  270. package/dist/module/native/react/useNativeCss.js.map +1 -1
  271. package/dist/module/native/react/usePassthrough.js +5 -2
  272. package/dist/module/native/react/usePassthrough.js.map +1 -1
  273. package/dist/module/native/reactivity.js +131 -66
  274. package/dist/module/native/reactivity.js.map +1 -1
  275. package/dist/module/native/reanimated.js +15 -3
  276. package/dist/module/native/reanimated.js.map +1 -1
  277. package/dist/module/native/styles/calculate-props.js +139 -26
  278. package/dist/module/native/styles/calculate-props.js.map +1 -1
  279. package/dist/module/native/styles/functions/animation-timing.js +2 -1
  280. package/dist/module/native/styles/functions/animation-timing.js.map +1 -1
  281. package/dist/module/native/styles/functions/color-mix.js +63 -0
  282. package/dist/module/native/styles/functions/color-mix.js.map +1 -0
  283. package/dist/module/native/styles/functions/filters.js +17 -4
  284. package/dist/module/native/styles/functions/filters.js.map +1 -1
  285. package/dist/module/native/styles/functions/index.js +1 -0
  286. package/dist/module/native/styles/functions/index.js.map +1 -1
  287. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  288. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  289. package/dist/module/native/styles/functions/platform-functions.js +2 -1
  290. package/dist/module/native/styles/functions/platform-functions.js.map +1 -1
  291. package/dist/module/native/styles/functions/string-functions.js +19 -5
  292. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  293. package/dist/module/native/styles/functions/transform-functions.js +93 -104
  294. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  295. package/dist/module/native/styles/index.js +362 -34
  296. package/dist/module/native/styles/index.js.map +1 -1
  297. package/dist/module/native/styles/resolve.js +136 -19
  298. package/dist/module/native/styles/resolve.js.map +1 -1
  299. package/dist/module/native/styles/scale-factor.js +8 -0
  300. package/dist/module/native/styles/scale-factor.js.map +1 -0
  301. package/dist/module/native/styles/shorthands/_handler.js +11 -1
  302. package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
  303. package/dist/module/native/styles/shorthands/animation.js +6 -3
  304. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  305. package/dist/module/native/styles/shorthands/box-shadow.js +43 -21
  306. package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
  307. package/dist/module/native/styles/shorthands/index.js +1 -0
  308. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  309. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  310. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  311. package/dist/module/native/styles/shorthands/transform.js +31 -8
  312. package/dist/module/native/styles/shorthands/transform.js.map +1 -1
  313. package/dist/module/native/styles/variables.js +174 -50
  314. package/dist/module/native/styles/variables.js.map +1 -1
  315. package/dist/module/native-internal/root.js +44 -7
  316. package/dist/module/native-internal/root.js.map +1 -1
  317. package/dist/module/native-internal/style-collection.js +45 -75
  318. package/dist/module/native-internal/style-collection.js.map +1 -1
  319. package/dist/module/native-internal/variables.js +2 -2
  320. package/dist/module/native-internal/variables.js.map +1 -1
  321. package/dist/module/utilities/dot-notation.types.js +2 -0
  322. package/dist/module/utilities/equality.js +37 -0
  323. package/dist/module/utilities/equality.js.map +1 -0
  324. package/dist/module/utilities/index.js +1 -0
  325. package/dist/module/utilities/index.js.map +1 -1
  326. package/dist/module/utilities/specificity.js +12 -12
  327. package/dist/module/utilities/specificity.js.map +1 -1
  328. package/dist/module/utilities/style-descriptor.js +30 -8
  329. package/dist/module/utilities/style-descriptor.js.map +1 -1
  330. package/dist/module/web/api.js +7 -4
  331. package/dist/module/web/api.js.map +1 -1
  332. package/dist/module/web/assign-style.js +4 -1
  333. package/dist/module/web/assign-style.js.map +1 -1
  334. package/dist/typescript/commonjs/src/babel/helpers.d.ts +2 -1
  335. package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
  336. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  337. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  338. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  339. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  340. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  341. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  342. package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
  343. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  344. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +26 -12
  345. package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
  346. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -3
  347. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  348. package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts +10 -0
  349. package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts.map +1 -0
  350. package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +1 -1
  351. package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -1
  352. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  353. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  354. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  355. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +2 -1
  356. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  357. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +10 -10
  358. package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
  359. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
  360. package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
  361. package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
  362. package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
  363. package/dist/typescript/commonjs/src/components/FlatList.d.ts +2 -2
  364. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  365. package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
  366. package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
  367. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
  368. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  369. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
  370. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  371. package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
  372. package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
  373. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
  374. package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
  375. package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
  376. package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
  377. package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
  378. package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
  379. package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
  380. package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
  381. package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
  382. package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
  383. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
  384. package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
  385. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
  386. package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
  387. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
  388. package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  389. package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
  390. package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
  391. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +2 -2
  392. package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
  393. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
  394. package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
  395. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +2 -1
  396. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  397. package/dist/typescript/commonjs/src/jest/index.d.ts +4 -12
  398. package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  399. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  400. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  401. package/dist/typescript/commonjs/src/metro/index.d.ts +8 -4
  402. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  403. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
  404. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  405. package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
  406. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  407. package/dist/typescript/commonjs/src/metro/warnings.d.ts +13 -0
  408. package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
  409. package/dist/typescript/commonjs/src/native/api.d.ts +5 -9
  410. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  411. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  412. package/dist/typescript/commonjs/src/native/conditions/guards.d.ts +2 -1
  413. package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -1
  414. package/dist/typescript/commonjs/src/native/objects.d.ts.map +1 -1
  415. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  416. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  417. package/dist/typescript/commonjs/src/native/react/rules.d.ts +7 -2
  418. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  419. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -4
  420. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  421. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  422. package/dist/typescript/commonjs/src/native/reactivity.d.ts +36 -18
  423. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  424. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  425. package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts +11 -2
  426. package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -1
  427. package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  428. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
  429. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
  430. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  431. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  432. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
  433. package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
  434. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  435. package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  436. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  437. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  438. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts +2 -0
  439. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  440. package/dist/typescript/commonjs/src/native/styles/index.d.ts +16 -4
  441. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  442. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +4 -1
  443. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  444. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  445. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  446. package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  447. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  448. package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  449. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  450. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  451. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  452. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  453. package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts.map +1 -1
  454. package/dist/typescript/commonjs/src/native/styles/variables.d.ts +3 -2
  455. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  456. package/dist/typescript/commonjs/src/native-internal/root.d.ts +45 -0
  457. package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
  458. package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +2 -2
  459. package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -1
  460. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  461. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  462. package/dist/typescript/commonjs/src/runtime.types.d.ts +20 -15
  463. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  464. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +3 -2
  465. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  466. package/dist/typescript/commonjs/src/utilities/equality.d.ts +2 -0
  467. package/dist/typescript/commonjs/src/utilities/equality.d.ts.map +1 -0
  468. package/dist/typescript/commonjs/src/utilities/index.d.ts +1 -0
  469. package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -1
  470. package/dist/typescript/commonjs/src/utilities/specificity.d.ts.map +1 -1
  471. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +14 -1
  472. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  473. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  474. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  475. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  476. package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
  477. package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
  478. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  479. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  480. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  481. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  482. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  483. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  484. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  485. package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
  486. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  487. package/dist/typescript/module/src/compiler/compiler.types.d.ts +27 -13
  488. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  489. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  490. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  491. package/dist/typescript/module/src/compiler/declarations.d.ts +5 -5
  492. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  493. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  494. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  495. package/dist/typescript/module/src/compiler/individual-transforms.d.ts +10 -0
  496. package/dist/typescript/module/src/compiler/individual-transforms.d.ts.map +1 -0
  497. package/dist/typescript/module/src/compiler/inline-variables.d.ts +2 -2
  498. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  499. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  500. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  501. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  502. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  503. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  504. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  505. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  506. package/dist/typescript/module/src/compiler/selector-builder.d.ts +3 -2
  507. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  508. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  509. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  510. package/dist/typescript/module/src/compiler/stylesheet.d.ts +10 -10
  511. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  512. package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
  513. package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
  514. package/dist/typescript/module/src/components/Button.d.ts +2 -4
  515. package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
  516. package/dist/typescript/module/src/components/FlatList.d.ts +2 -2
  517. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  518. package/dist/typescript/module/src/components/Image.d.ts +2 -4
  519. package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
  520. package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
  521. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  522. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
  523. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  524. package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
  525. package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
  526. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
  527. package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
  528. package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
  529. package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
  530. package/dist/typescript/module/src/components/Switch.d.ts +2 -6
  531. package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
  532. package/dist/typescript/module/src/components/Text.d.ts +2 -6
  533. package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
  534. package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
  535. package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
  536. package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
  537. package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
  538. package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
  539. package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
  540. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
  541. package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
  542. package/dist/typescript/module/src/components/View.d.ts +2 -6
  543. package/dist/typescript/module/src/components/View.d.ts.map +1 -1
  544. package/dist/typescript/module/src/components/VirtualizedList.d.ts +2 -2
  545. package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
  546. package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
  547. package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
  548. package/dist/typescript/module/src/components/index.d.ts +16 -16
  549. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  550. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +2 -1
  551. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  552. package/dist/typescript/module/src/jest/index.d.ts +4 -12
  553. package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
  554. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  555. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  556. package/dist/typescript/module/src/metro/index.d.ts +9 -5
  557. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  558. package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
  559. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  560. package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
  561. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  562. package/dist/typescript/module/src/metro/warnings.d.ts +13 -0
  563. package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
  564. package/dist/typescript/module/src/native/api.d.ts +6 -10
  565. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  566. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  567. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  568. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  569. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  570. package/dist/typescript/module/src/native/conditions/guards.d.ts +4 -3
  571. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  572. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  573. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  574. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  575. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  576. package/dist/typescript/module/src/native/index.d.ts +3 -3
  577. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  578. package/dist/typescript/module/src/native/objects.d.ts.map +1 -1
  579. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  580. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  581. package/dist/typescript/module/src/native/react/rules.d.ts +9 -4
  582. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  583. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +5 -8
  584. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  585. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  586. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  587. package/dist/typescript/module/src/native/reactivity.d.ts +36 -18
  588. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  589. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  590. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +13 -4
  591. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  592. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  593. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  594. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  595. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  596. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
  597. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
  598. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  599. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  600. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
  601. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  602. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  603. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  604. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  605. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  606. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  607. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  608. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +3 -1
  609. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  610. package/dist/typescript/module/src/native/styles/index.d.ts +20 -8
  611. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  612. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  613. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  614. package/dist/typescript/module/src/native/styles/resolve.d.ts +7 -4
  615. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  616. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  617. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  618. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  619. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  620. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  621. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  622. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  623. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  624. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  625. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  626. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  627. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  628. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  629. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  630. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  631. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  632. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  633. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  634. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  635. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  636. package/dist/typescript/module/src/native/styles/variables.d.ts +4 -3
  637. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  638. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  639. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  640. package/dist/typescript/module/src/native-internal/root.d.ts +46 -1
  641. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  642. package/dist/typescript/module/src/native-internal/style-collection.d.ts +3 -3
  643. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  644. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  645. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  646. package/dist/typescript/module/src/runtime.d.ts +1 -1
  647. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  648. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  649. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  650. package/dist/typescript/module/src/runtime.types.d.ts +20 -15
  651. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  652. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +3 -2
  653. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  654. package/dist/typescript/module/src/utilities/equality.d.ts +2 -0
  655. package/dist/typescript/module/src/utilities/equality.d.ts.map +1 -0
  656. package/dist/typescript/module/src/utilities/index.d.ts +4 -3
  657. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  658. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  659. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  660. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +14 -1
  661. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  662. package/dist/typescript/module/src/web/api.d.ts +5 -5
  663. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  664. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  665. package/dist/typescript/module/src/web/index.d.ts +3 -3
  666. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  667. package/node/babel.mjs +4 -0
  668. package/node/compiler.mjs +2 -0
  669. package/node/metro.mjs +2 -0
  670. package/package.json +81 -33
  671. package/src/babel/helpers.ts +8 -1
  672. package/src/babel/import-plugin.ts +31 -16
  673. package/src/babel/react-native-web.ts +32 -4
  674. package/src/babel/react-native.ts +9 -4
  675. package/src/compiler/atRules.ts +44 -0
  676. package/src/compiler/compiler.ts +282 -50
  677. package/src/compiler/compiler.types.ts +30 -12
  678. package/src/compiler/container-query.ts +8 -3
  679. package/src/compiler/declarations.ts +499 -241
  680. package/src/compiler/individual-transforms.ts +129 -0
  681. package/src/compiler/inline-variables.ts +67 -0
  682. package/src/compiler/lightningcss-loader.ts +21 -1
  683. package/src/compiler/media-query.ts +20 -9
  684. package/src/compiler/selector-builder.ts +34 -7
  685. package/src/compiler/stylesheet.ts +51 -15
  686. package/src/compiler/supports.ts +2 -2
  687. package/src/components/ActivityIndicator.tsx +8 -5
  688. package/src/components/Button.tsx +8 -3
  689. package/src/components/FlatList.tsx +14 -4
  690. package/src/components/Image.tsx +8 -3
  691. package/src/components/ImageBackground.tsx +10 -11
  692. package/src/components/KeyboardAvoidingView.tsx +10 -8
  693. package/src/components/Pressable.tsx +8 -3
  694. package/src/components/SafeAreaProvider.tsx +1 -0
  695. package/src/components/ScrollView.tsx +8 -5
  696. package/src/components/Switch.tsx +8 -3
  697. package/src/components/Text.tsx +8 -3
  698. package/src/components/TextInput.tsx +8 -3
  699. package/src/components/TouchableHighlight.tsx +8 -5
  700. package/src/components/TouchableOpacity.tsx +8 -5
  701. package/src/components/TouchableWithoutFeedback.tsx +8 -5
  702. package/src/components/View.tsx +8 -3
  703. package/src/components/VirtualizedList.tsx +17 -5
  704. package/src/components/copyComponentProperties.ts +21 -0
  705. package/src/components/index.cts +52 -4
  706. package/src/components/react-native-safe-area-context.native.tsx +20 -0
  707. package/src/jest/index.ts +7 -3
  708. package/src/metro/cache-version.ts +48 -0
  709. package/src/metro/index.ts +11 -4
  710. package/src/metro/metro-transformer.ts +26 -8
  711. package/src/metro/resolver.ts +10 -3
  712. package/src/metro/typescript.ts +53 -6
  713. package/src/metro/warnings.ts +187 -0
  714. package/src/native/api.tsx +32 -18
  715. package/src/native/conditions/attributes.ts +26 -9
  716. package/src/native/conditions/container-query.ts +11 -9
  717. package/src/native/conditions/guards.ts +13 -1
  718. package/src/native/conditions/media-query.ts +1 -1
  719. package/src/native/objects.ts +12 -22
  720. package/src/native/react/interaction.ts +11 -6
  721. package/src/native/react/rules.ts +58 -45
  722. package/src/native/react/useNativeCss.ts +100 -22
  723. package/src/native/react/usePassthrough.ts +3 -2
  724. package/src/native/reactivity.ts +169 -71
  725. package/src/native/reanimated.ts +24 -5
  726. package/src/native/styles/calculate-props.ts +179 -28
  727. package/src/native/styles/functions/animation-timing.ts +3 -1
  728. package/src/native/styles/functions/color-mix.ts +82 -0
  729. package/src/native/styles/functions/filters.ts +21 -6
  730. package/src/native/styles/functions/index.ts +1 -0
  731. package/src/native/styles/functions/numeric-functions.ts +7 -6
  732. package/src/native/styles/functions/platform-functions.ts +3 -1
  733. package/src/native/styles/functions/string-functions.ts +25 -5
  734. package/src/native/styles/functions/transform-functions.ts +111 -64
  735. package/src/native/styles/index.ts +425 -43
  736. package/src/native/styles/resolve.ts +188 -29
  737. package/src/native/styles/scale-factor.ts +9 -0
  738. package/src/native/styles/shorthands/_handler.ts +14 -1
  739. package/src/native/styles/shorthands/animation.ts +8 -2
  740. package/src/native/styles/shorthands/box-shadow.ts +46 -25
  741. package/src/native/styles/shorthands/index.ts +1 -0
  742. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  743. package/src/native/styles/shorthands/transform.ts +36 -11
  744. package/src/native/styles/variables.ts +251 -45
  745. package/src/native-internal/root.ts +83 -13
  746. package/src/native-internal/style-collection.ts +64 -95
  747. package/src/native-internal/variables.tsx +6 -4
  748. package/src/runtime.types.ts +38 -29
  749. package/src/utilities/dot-notation.types.ts +12 -4
  750. package/src/utilities/equality.ts +41 -0
  751. package/src/utilities/index.ts +1 -0
  752. package/src/utilities/specificity.ts +13 -12
  753. package/src/utilities/style-descriptor.ts +36 -14
  754. package/src/web/api.tsx +17 -13
  755. package/src/web/assign-style.ts +2 -1
  756. package/types.d.ts +14 -31
  757. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  758. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  759. package/dist/module/compiler/inheritance.test.js +0 -78
  760. package/dist/module/compiler/inheritance.test.js.map +0 -1
  761. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  762. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  763. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  764. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  765. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  766. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  767. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  768. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  769. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  770. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  771. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  772. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  773. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  774. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  775. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  776. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  777. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  778. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  779. package/dist/typescript/module/eslint.config.d.mts +0 -2
  780. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  781. package/dist/typescript/module/example/app.config.d.ts +0 -4
  782. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  783. package/dist/typescript/module/example/index.d.ts +0 -2
  784. package/dist/typescript/module/example/index.d.ts.map +0 -1
  785. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  786. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  787. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  788. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  789. package/dist/typescript/module/example/src/App.d.ts +0 -3
  790. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  791. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  792. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  793. package/src/compiler/inheritance.test.ts +0 -121
@@ -2,6 +2,7 @@
2
2
 
3
3
  /* eslint-disable */
4
4
  import { versions } from "node:process";
5
+ import { getCacheVersion } from "./cache-version.js";
5
6
  import { nativeResolver, webResolver } from "./resolver.js";
6
7
  import { setupTypeScript } from "./typescript.js";
7
8
  const metroOverrideResolution = {
@@ -27,6 +28,7 @@ export function withReactNativeCSS(config, options) {
27
28
  }
28
29
  return {
29
30
  ...config,
31
+ cacheVersion: getCacheVersion(config.cacheVersion, options),
30
32
  transformerPath: require.resolve("./metro-transformer"),
31
33
  transformer: {
32
34
  ...config.transformer,
@@ -1 +1 @@
1
- {"version":3,"names":["versions","nativeResolver","webResolver","setupTypeScript","metroOverrideResolution","type","filePath","require","resolve","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","transformerPath","transformer","reactNativeCSS","resolver","sourceExts","resolveRequest","context","moduleName","platform","includes","parentResolver","resolved"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;AAAA;AACA,SAASA,QAAQ,QAAQ,cAAc;AAKvC,SAASC,cAAc,EAAEC,WAAW,QAAQ,eAAY;AACxD,SAASC,eAAe,QAAQ,iBAAc;AAY9C,MAAMC,uBAAuB,GAAG;EAC9BC,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEC,OAAO,CAACC,OAAO,CAAC,YAAY;AACxC,CAAC;AAED,OAAO,SAASC,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,OAAOD,kBAAkB,CAAC,MAAMC,MAAM,CAAC,CAAC,EAAEC,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,IAAIC,MAAM,CAACZ,QAAQ,CAACa,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAC9D;EAEA,MAAM;IACJC,2BAA2B;IAC3BC,iBAAiB;IACjBC,uBAAuB,GAAG;EAC5B,CAAC,GAAGP,OAAO,IAAI,CAAC,CAAC;EAEjB,IAAIK,2BAA2B,KAAK,IAAI,EAAE;IACxCb,eAAe,CAACc,iBAAiB,CAAC;EACpC;EAEA,OAAO;IACL,GAAGP,MAAM;IACTS,eAAe,EAAEZ,OAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC;IACvDY,WAAW,EAAE;MACX,GAAGV,MAAM,CAACU,WAAW;MACrBC,cAAc,EAAEV;IAClB,CAAC;IACDW,QAAQ,EAAE;MACR,GAAGZ,MAAM,CAACY,QAAQ;MAClBC,UAAU,EAAE,CAAC,IAAIb,MAAM,EAAEY,QAAQ,EAAEC,UAAU,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;MAC5DC,cAAc,EAAEA,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,KAAK;QACjD,IAAID,UAAU,CAACE,QAAQ,CAAC,iCAAiC,CAAC,EAAE;UAC1D,OAAOxB,uBAAuB;QAChC;QAEA,MAAMyB,cAAc,GAClBnB,MAAM,CAACY,QAAQ,EAAEE,cAAc,IAAIC,OAAO,CAACD,cAAc;;QAE3D;QACA,IAAI,CAACN,uBAAuB,EAAE;UAC5B,OAAOW,cAAc,CAACJ,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;QACtD;QAEA,MAAML,QAAQ,GAAGK,QAAQ,KAAK,KAAK,GAAGzB,WAAW,GAAGD,cAAc;QAClE,MAAM6B,QAAQ,GAAGR,QAAQ,CACvBO,cAAc,EACdJ,OAAO,EACPC,UAAU,EACVC,QACF,CAAC;QAED,OAAOG,QAAQ;MACjB;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["versions","getCacheVersion","nativeResolver","webResolver","setupTypeScript","metroOverrideResolution","type","filePath","require","resolve","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","cacheVersion","transformerPath","transformer","reactNativeCSS","resolver","sourceExts","resolveRequest","context","moduleName","platform","includes","parentResolver","resolved"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;AAAA;AACA,SAASA,QAAQ,QAAQ,cAAc;AAKvC,SAASC,eAAe,QAAQ,oBAAiB;AACjD,SAASC,cAAc,EAAEC,WAAW,QAAQ,eAAY;AACxD,SAASC,eAAe,QAAQ,iBAAc;AAiB9C,MAAMC,uBAAuB,GAAG;EAC9BC,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEC,OAAO,CAACC,OAAO,CAAC,YAAY;AACxC,CAAC;AAED,OAAO,SAASC,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,OAAOD,kBAAkB,CAAC,MAAMC,MAAM,CAAC,CAAC,EAAEC,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,IAAIC,MAAM,CAACb,QAAQ,CAACc,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAC9D;EAEA,MAAM;IACJC,2BAA2B;IAC3BC,iBAAiB;IACjBC,uBAAuB,GAAG;EAC5B,CAAC,GAAGP,OAAO,IAAI,CAAC,CAAC;EAEjB,IAAIK,2BAA2B,KAAK,IAAI,EAAE;IACxCb,eAAe,CAACc,iBAAiB,CAAC;EACpC;EAEA,OAAO;IACL,GAAGP,MAAM;IACTS,YAAY,EAAEnB,eAAe,CAACU,MAAM,CAACS,YAAY,EAAER,OAAO,CAAC;IAC3DS,eAAe,EAAEb,OAAO,CAACC,OAAO,CAAC,qBAAqB,CAAC;IACvDa,WAAW,EAAE;MACX,GAAGX,MAAM,CAACW,WAAW;MACrBC,cAAc,EAAEX;IAClB,CAAC;IACDY,QAAQ,EAAE;MACR,GAAGb,MAAM,CAACa,QAAQ;MAClBC,UAAU,EAAE,CAAC,IAAId,MAAM,EAAEa,QAAQ,EAAEC,UAAU,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;MAC5DC,cAAc,EAAEA,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,KAAK;QACjD,IAAID,UAAU,CAACE,QAAQ,CAAC,iCAAiC,CAAC,EAAE;UAC1D,OAAOzB,uBAAuB;QAChC;QAEA,MAAM0B,cAAc,GAClBpB,MAAM,CAACa,QAAQ,EAAEE,cAAc,IAAIC,OAAO,CAACD,cAAc;;QAE3D;QACA,IAAI,CAACP,uBAAuB,EAAE;UAC5B,OAAOY,cAAc,CAACJ,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;QACtD;QAEA,MAAML,QAAQ,GAAGK,QAAQ,KAAK,KAAK,GAAG1B,WAAW,GAAGD,cAAc;QAClE,MAAM8B,QAAQ,GAAGR,QAAQ,CACvBO,cAAc,EACdJ,OAAO,EACPC,UAAU,EACVC,QACF,CAAC;QAED,OAAOG,QAAQ;MACjB;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  import { unstable_transformerPath } from "@expo/metro-config";
4
4
  import { compile } from "../compiler/index.js";
5
5
  import { getNativeInjectionCode } from "./injection-code.js";
6
+ import { reportCompilerWarnings } from "./warnings.js";
6
7
  const worker =
7
8
  // eslint-disable-next-line @typescript-eslint/no-require-imports
8
9
  require(unstable_transformerPath);
@@ -16,11 +17,23 @@ export async function transform(config, projectRoot, filePath, data, options) {
16
17
  platform: "web"
17
18
  });
18
19
  const css = cssFile.output[0].data.css.code.toString();
19
- const productionJS = compile(css, {
20
- ...options.reactNativeCSS,
20
+ const {
21
+ warnings: warningLevel,
22
+ ...compilerOptions
23
+ } = config.reactNativeCSS ?? {};
24
+ const compiled = compile(css, {
25
+ ...compilerOptions,
21
26
  filename: filePath,
22
27
  projectRoot: projectRoot
23
- }).stylesheet();
28
+ });
29
+ const productionJS = compiled.stylesheet();
30
+
31
+ // Nothing downstream of the transformer sees the compile result, so this is the one place a build can report it
32
+ reportCompilerWarnings(compiled.warnings(), {
33
+ filename: filePath,
34
+ projectRoot,
35
+ level: warningLevel
36
+ });
24
37
  data = Buffer.from(getNativeInjectionCode([], [productionJS]));
25
38
  const transform = await worker.transform(config, projectRoot, `${filePath}.js`, data, options);
26
39
 
@@ -1 +1 @@
1
- {"version":3,"names":["unstable_transformerPath","compile","getNativeInjectionCode","worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","productionJS","reactNativeCSS","filename","stylesheet","Buffer","from","skipCache"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;AAAA,SAASA,wBAAwB,QAAQ,oBAAoB;AAO7D,SAASC,OAAO,QAA8B,sBAAa;AAC3D,SAASC,sBAAsB,QAAQ,qBAAkB;AAEzD,MAAMC,MAAM;AACV;AACAC,OAAO,CAACJ,wBAAwB,CAA4C;AAE9E,OAAO,eAAeK,SAASA,CAC7BC,MAA2B,EAC3BC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAEC,EAC2B;EAC5B,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,KAAK,OAAO,IAAI,iBAAiB,CAACC,IAAI,CAACL,QAAQ,CAAC;EAE1E,IAAIE,OAAO,CAACI,QAAQ,KAAK,KAAK,IAAI,CAACH,KAAK,EAAE;IACxC,OAAOR,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACvE;EAEA,MAAMK,OAAO,GAAI,MAAMZ,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAE;IAC3E,GAAGC,OAAO;IACVI,QAAQ,EAAE;EACZ,CAAC,CAEA;EAED,MAAME,GAAG,GAAGD,OAAO,CAACE,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,CAACE,IAAI,CAACC,QAAQ,CAAC,CAAC;EAEtD,MAAMC,YAAY,GAAGnB,OAAO,CAACe,GAAG,EAAE;IAChC,GAAGN,OAAO,CAACW,cAAc;IACzBC,QAAQ,EAAEd,QAAQ;IAClBD,WAAW,EAAEA;EACf,CAAC,CAAC,CAACgB,UAAU,CAAC,CAAC;EAEfd,IAAI,GAAGe,MAAM,CAACC,IAAI,CAACvB,sBAAsB,CAAC,EAAE,EAAE,CAACkB,YAAY,CAAC,CAAC,CAAC;EAE9D,MAAMf,SAAS,GAAG,MAAMF,MAAM,CAACE,SAAS,CACtCC,MAAM,EACNC,WAAW,EACX,GAAGC,QAAQ,KAAK,EAChBC,IAAI,EACJC,OACF,CAAC;;EAED;EACCL,SAAS,CAASY,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,GAAG;IACtCU,SAAS,EAAE,IAAI;IACfR,IAAI,EAAE;EACR,CAAC;EAED,OAAOb,SAAS;AAClB","ignoreList":[]}
1
+ {"version":3,"names":["unstable_transformerPath","compile","getNativeInjectionCode","reportCompilerWarnings","worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","warnings","warningLevel","compilerOptions","reactNativeCSS","compiled","filename","productionJS","stylesheet","level","Buffer","from","skipCache"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;AAAA,SAASA,wBAAwB,QAAQ,oBAAoB;AAM7D,SAASC,OAAO,QAA8B,sBAAa;AAC3D,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,sBAAsB,QAA2B,eAAY;AAMtE,MAAMC,MAAM;AACV;AACAC,OAAO,CAACL,wBAAwB,CAA4C;AAE9E,OAAO,eAAeM,SAASA,CAC7BC,MAIC,EACDC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAA2B,EACC;EAC5B,MAAMC,KA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K,EAChBC,IAAI,EACJC,OACF,CAAC;;EAED;EACCL,SAAS,CAASY,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,GAAG;IACtCe,SAAS,EAAE,IAAI;IACfb,IAAI,EAAE;EACR,CAAC;EAED,OAAOb,SAAS;AAClB","ignoreList":[]}
@@ -10,7 +10,7 @@ function isFromThisModule(filename) {
10
10
  export function nativeResolver(resolver, context, moduleName, platform) {
11
11
  const resolution = resolver(context, moduleName, platform);
12
12
  const isInternal = isFromThisModule(context.originModulePath);
13
- const isReactNativeIndex = context.originModulePath.endsWith(`react-native${sep}index.js`);
13
+ const isReactNativeIndex = context.originModulePath.endsWith(`${sep}react-native${sep}index.js`);
14
14
  if (isInternal || resolution.type !== "sourceFile" || isReactNativeIndex) {
15
15
  return resolution;
16
16
  }
@@ -35,7 +35,9 @@ export function webResolver(resolver, context, moduleName, platform) {
35
35
  // Only operate on source files
36
36
  resolution.type !== "sourceFile" ||
37
37
  // Skip anything that isn't importing from `react-native-web`
38
- !resolution.filePath.includes(`${sep}react-native-web${sep}`)) {
38
+ !resolution.filePath.includes(`${sep}react-native-web${sep}`) ||
39
+ // Skip internal react-native-web files
40
+ resolution.filePath.includes(`${sep}react-native-web${sep}dist${sep}vendor`)) {
39
41
  return resolution;
40
42
  }
41
43
 
@@ -43,7 +45,7 @@ export function webResolver(resolver, context, moduleName, platform) {
43
45
  const segments = resolution.filePath.split(sep);
44
46
  const isIndex = segments.at(-1)?.startsWith("index.");
45
47
  const module = segments.at(-2);
46
- if (!isIndex || !module || !allowedModules.has(module)) {
48
+ if (!isIndex || !module || !allowedModules.has(module) || module === "VirtualizedList") {
47
49
  return resolution;
48
50
  }
49
51
  return resolver(context, `react-native-css/components/${module}`, platform);
@@ -1 +1 @@
1
- {"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","isInternal","originModulePath","isReactNativeIndex","endsWith","type","filePath","includes","split","at","module","has","webResolver","segments","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,QAAQ,WAAW;AAQlD,SAASC,cAAc,QAAQ,4BAAyB;AAExD,MAAMC,cAAc,GAAGH,OAAO,CAACI,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAGL,OAAO,CAACI,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACL,cAAc,CAAC,IAAII,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEA,OAAO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAC1D,MAAME,UAAU,GAAGT,gBAAgB,CAACK,OAAO,CAACK,gBAAgB,CAAC;EAC7D,MAAMC,kBAAkB,GAAGN,OAAO,CAACK,gBAAgB,CAACE,QAAQ,CAC1D,eAAejB,GAAG,UACpB,CAAC;EAED,IAAIc,UAAU,IAAID,UAAU,CAACK,IAAI,KAAK,YAAY,IAAIF,kBAAkB,EAAE;IACxE,OAAOH,UAAU;EACnB;EAEA,IAAIF,UAAU,KAAK,cAAc,EAAE;IACjC,OAAOF,QAAQ,CAACC,OAAO,EAAE,6BAA6B,EAAEE,QAAQ,CAAC;EACnE,CAAC,MAAM,IAAID,UAAU,KAAK,gCAAgC,EAAE;IAC1D,OAAOF,QAAQ,CACbC,OAAO,EACP,4DAA4D,EAC5DE,QACF,CAAC;EACH,CAAC,MAAM,IACLC,UAAU,CAACM,QAAQ,CAACC,QAAQ,CAAC,GAAGpB,GAAG,eAAeA,GAAG,YAAYA,GAAG,EAAE,CAAC,EACvE;IACA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AACC,OAAO,EAAE,+BAA+Ba,MAAM,EAAE,EAAEX,QAAQ,CAAC;AAC7E","ignoreList":[]}
1
+ {"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","isInternal","originModulePath","isReactNativeIndex","endsWith","type","filePath","includes","split","at","module","has","webResolver","segments","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,QAAQ,WAAW;AAQlD,SAASC,cAAc,QAAQ,4BAAyB;AAExD,MAAMC,cAAc,GAAGH,OAAO,CAACI,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAGL,OAAO,CAACI,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACL,cAAc,CAAC,IAAII,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEA,OAAO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAC1D,MAAME,UAAU,GAAGT,gBAAgB,CAACK,OAAO,CAACK,gBAAgB,CAAC;EAC7D,MAAMC,kBAAkB,GAAGN,OAAO,CAACK,gBAAgB,CAACE,QAAQ,CAC1D,GAAGjB,GAAG,eAAeA,GAAG,UAC1B,CAAC;EAED,IAAIc,UAAU,IAAID,UAAU,CAACK,IAAI,KAAK,YAAY,IAAIF,kBAAkB,EAAE;IACxE,OAAOH,UAAU;EACnB;EAEA,IAAIF,UAAU,KAAK,cAAc,EAAE;IACjC,OAAOF,QAAQ,CAACC,OAAO,EAAE,6BAA6B,EAAEE,QAAQ,CAAC;EACnE,CAAC,M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G,CAAC;EAC/C,MAAM2B,OAAO,GAAGD,QAAQ,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEf,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMgB,MAAM,GAAGG,QAAQ,CAACJ,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IACE,CAACK,OAAO,IACR,CAACJ,MAAM,IACP,CAACtB,cAAc,CAACuB,GAAG,CAACD,MAAM,CAAC,IAC3BA,MAAM,KAAK,iBAAiB,EAC5B;IACA,OAAOV,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+Ba,MAAM,EAAE,EAAEX,QAAQ,CAAC;AAC7E","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  /* eslint-disable */
4
4
  import { existsSync, readFileSync, writeFileSync } from "fs";
5
+ import { dirname, relative, resolve } from "node:path";
5
6
  import { CommentArray, parse, stringify } from "comment-json";
6
7
  import { bold, cyan } from "./picocolors.js";
7
8
  export function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-native-css") {
@@ -10,11 +11,15 @@ export function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "r
10
11
  if (!ts) {
11
12
  return;
12
13
  }
13
- const configFileName = ts.findConfigFile("./", ts.sys.fileExists, "tsconfig.json");
14
+ const configFileName = ts.findConfigFile(resolve("."), ts.sys.fileExists, "tsconfig.json");
15
+ if (!configFileName) return;
16
+ const configDirectory = dirname(resolve(configFileName));
17
+ const environmentFile = resolve(envPath);
18
+ const relativeEnvironmentFile = relative(configDirectory, environmentFile);
14
19
  const userConfig = parse(readFileSync(configFileName, {
15
20
  encoding: "utf-8"
16
21
  }));
17
- if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig)) {
22
+ if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig) || Object.prototype.toString.call(userConfig) !== "[object Object]") {
18
23
  return;
19
24
  }
20
25
  const output = [];
@@ -25,17 +30,32 @@ export function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "r
25
30
  // NOTE: This file should not be edited and should be committed with your source code. It is generated by ${name}. If you need to move or disable this file, please see the documentation.`);
26
31
  output.push(`Created ${cyan(envPath)}`);
27
32
  }
28
- userConfig.include ??= new CommentArray(envPath);
29
- if (Array.isArray(userConfig.include) && !userConfig.include.includes(envPath)) {
30
- userConfig.include.push(envPath);
33
+ if (Array.isArray(userConfig.include) && !(Array.isArray(userConfig.files) && userConfig.files.includes(relativeEnvironmentFile)) && !userConfig.include.includes(relativeEnvironmentFile)) {
34
+ userConfig.include.push(relativeEnvironmentFile);
31
35
  updatedConfig = true;
32
36
  output.push(`Updated ${configFileName} to include the ${cyan(envPath)} file`);
33
37
  }
38
+
39
+ // Resolve inheritance on a copy so comments and the user's own settings survive.
40
+ const effectiveConfig = ts.parseJsonConfigFileContent(JSON.parse(JSON.stringify(userConfig)), ts.sys, configDirectory, {}, resolve(configFileName));
41
+ if (!effectiveConfig.fileNames.some(file => resolve(file) === environmentFile)) {
42
+ // A files entry can include the declaration even when inherited include or
43
+ // exclude settings omit it. Preserve the original implicit include as well.
44
+ if (effectiveConfig.raw.include === undefined && effectiveConfig.raw.files === undefined) {
45
+ userConfig.include = new CommentArray("**/*");
46
+ }
47
+ userConfig.files ??= new CommentArray(...(effectiveConfig.raw.files || []));
48
+ if (Array.isArray(userConfig.files) && !userConfig.files.includes(relativeEnvironmentFile)) {
49
+ userConfig.files.push(relativeEnvironmentFile);
50
+ updatedConfig = true;
51
+ output.push(`Updated ${configFileName} to include the ${cyan(envPath)} file`);
52
+ }
53
+ }
34
54
  if (updatedConfig) {
35
55
  writeFileSync(configFileName, stringify(userConfig, null, 2));
36
56
  }
37
57
  if (output.length) {
38
- console.log(`${cyan(bold("NativeWind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
58
+ console.log(`${cyan(bold("Nativewind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
39
59
  }
40
60
  } catch {}
41
61
  }
@@ -1 +1 @@
1
- {"version":3,"names":["existsSync","readFileSync","writeFileSync","CommentArray","parse","stringify","bold","cyan","setupTypeScript","envPath","name","ts","require","configFileName","findConfigFile","sys","fileExists","userConfig","encoding","Array","isArray","output","updatedConfig","push","include","includes","length","console","log","join"],"sourceRoot":"../../../src","sources":["metro/typescript.ts"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,YAAY,EAAEC,aAAa,QAAQ,IAAI;AAE5D,SAASC,YAAY,EAAEC,KAAK,EAAEC,SAAS,QAAQ,cAAc;AAE7D,SAASC,IAAI,EAAEC,IAAI,QAAQ,iBAAc;AAEzC,OAAO,SAASC,eAAeA,CAC7BC,OAAO,GAAG,2BAA2B,EACrCC,IAAI,GAAG,kBAAkB,EACzB;EACA,IAAI;IACF,MAAMC,EAAE,GAAGC,OAAO,CAAC,YAAY,CAAC;IAChC,IAAI,CAACD,EAAE,EAAE;MACP;IACF;IAEA,MAAME,cAAc,GAAGF,EAAE,CAACG,cAAc,CACtC,IAAI,EACJH,EAAE,CAACI,GAAG,CAACC,UAAU,EACjB,eACF,CAAC;IAED,MAAMC,UAAU,GAAGb,KAAK,CACtBH,YAAY,CAACY,cAAc,EAAE;MAC3BK,QAAQ,EAAE;IACZ,CAAC,CACH,CAAC;IAED,IACE,OAAOD,UAAU,KAAK,QAAQ,IAC9B,CAACA,UAAU,IACXE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EACzB;MACA;IACF;IAEA,MAAMI,MAAgB,GAAG,EAAE;IAC3B,IAAIC,aAAa,GAAG,KAAK;IAEzB,IAAI,CAACtB,UAAU,CAACS,OAAO,CAAC,EAAE;MACxBP,aAAa,CACXO,OAAO,EACP;AACR;AACA,4GAA4GC,IAAI,2EAC1G,CAAC;MACDW,MAAM,CAACE,IAAI,CAAC,WAAWhB,IAAI,CAACE,OAAO,CAAC,EAAE,CAAC;IACzC;IAEAQ,UAAU,CAACO,OAAO,KAAK,IAAIrB,YAAY,CAACM,OAAO,CAAC;IAChD,IACEU,KAAK,CAACC,OAAO,CAACH,UAAU,CAACO,OAAO,CAAC,IACjC,CAACP,UAAU,CAACO,OAAO,CAACC,QAAQ,CAAChB,OAAO,CAAC,EACrC;MACAQ,UAAU,CAACO,OAAO,CAACD,IAAI,CAACd,OAAO,CAAC;MAChCa,aAAa,GAAG,IAAI;MACpBD,MAAM,CAACE,IAAI,CACT,WAAWV,cAAc,mBAAmBN,IAAI,CAACE,OAAO,CAAC,OAC3D,CAAC;IACH;IAEA,IAAIa,aAAa,EAAE;MACjBpB,aAAa,CAACW,cAAc,EAAER,SAAS,CAACY,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D;IAEA,IAAII,MAAM,CAACK,MAAM,EAAE;MACjBC,OAAO,CAACC,GAAG,CACT,GAAGrB,IAAI,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC,2EAA2Ee,MAAM,CAACQ,IAAI,CAAC,QAAQ,CAAC,EAC7H,CAAC;IACH;EACF,CAAC,CAAC,MAAM,CAAC;AACX","ignoreList":[]}
1
+ {"version":3,"names":["existsSync","readFileSync","writeFileSync","dirname","relative","resolve","CommentArray","parse","stringify","bold","cyan","setupTypeScript","envPath","name","ts","require","configFileName","findConfigFile","sys","fileExists","configDirectory","environmentFile","relativeEnvironmentFile","userConfig","encoding","Array","isArray","Object","prototype","toString","call","output","updatedConfig","push","include","files","includes","effectiveConfig","parseJsonConfigFileContent","JSON","fileNames","some","file","raw","undefined","length","console","log","join"],"sourceRoot":"../../../src","sources":["metro/typescript.ts"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,YAAY,EAAEC,aAAa,QAAQ,IAAI;AAC5D,SAASC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,WAAW;AAEtD,SAASC,YAAY,EAAEC,KAAK,EAAEC,SAAS,QAAQ,cAAc;AAE7D,SAASC,IAAI,EAAEC,IAAI,QAAQ,iBAAc;AAEzC,OAAO,SAASC,eAAeA,CAC7BC,OAAO,G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;IACF;IAEA,IAAIoB,aAAa,EAAE;MACjB9B,aAAa,CAACc,cAAc,EAAER,SAAS,CAACe,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D;IAEA,IAAIQ,MAAM,CAACc,MAAM,EAAE;MACjBC,OAAO,CAACC,GAAG,CACT,GAAGrC,IAAI,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC,2EAA2EsB,MAAM,CAACiB,IAAI,CAAC,QAAQ,CAAC,EAC7H,CAAC;IACH;EACF,CAAC,CAAC,MAAM,CAAC;AACX","ignoreList":[]}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ import { relative } from "path";
4
+
5
+ /** "summary" prints one capped block per CSS file, "verbose" lists every entry, "none" prints nothing */
6
+
7
+ const SUMMARY_ENTRY_LIMIT = 10;
8
+ const SUMMARY_VALUE_LIMIT = 5;
9
+ const SUMMARY_VALUE_LENGTH_LIMIT = 60;
10
+ const PREFIX = "react-native-css";
11
+
12
+ // Metro re-transforms a CSS file on every rebuild, so a file's block prints again only when its warnings change
13
+ const lastReportedByFile = new Map();
14
+
15
+ // Metro forwards each transform worker's stderr to the bundler's terminal, and a warning never fails the build
16
+ export function reportCompilerWarnings(warnings, options) {
17
+ const {
18
+ filename,
19
+ projectRoot,
20
+ level = "summary"
21
+ } = options;
22
+ if (level === "none") {
23
+ return;
24
+ }
25
+ const message = formatCompilerWarnings(warnings, {
26
+ displayPath: toDisplayPath(filename, projectRoot),
27
+ verbose: level === "verbose"
28
+ });
29
+ if (message === undefined) {
30
+ lastReportedByFile.delete(filename);
31
+ return;
32
+ }
33
+ if (lastReportedByFile.get(filename) === message) {
34
+ return;
35
+ }
36
+ lastReportedByFile.set(filename, message);
37
+ console.warn(message);
38
+ }
39
+
40
+ // Plain text: Metro's transform workers write to a pipe, where colour would never render
41
+ export function formatCompilerWarnings(warnings, options) {
42
+ const {
43
+ displayPath,
44
+ verbose = false
45
+ } = options;
46
+ const droppedCount = (warnings.properties?.length ?? 0) + (warnings.functions?.length ?? 0) + Object.values(warnings.values ?? {}).reduce((total, entries) => total + entries.length, 0);
47
+
48
+ // A syntax warning sends the reader to their stylesheet rather than to what React Native lacks, so it is counted apart
49
+ const syntaxCount = warnings.syntax?.length ?? 0;
50
+ if (droppedCount === 0 && syntaxCount === 0) {
51
+ return undefined;
52
+ }
53
+ const properties = limit(unique(warnings.properties), verbose);
54
+ const functions = limit(unique(warnings.functions), verbose);
55
+ const rendered = renderValues(warnings.values, verbose);
56
+ const values = limit(rendered.entries, verbose);
57
+ const syntax = limit(unique(warnings.syntax), verbose);
58
+ const claims = [];
59
+ if (droppedCount > 0) {
60
+ claims.push(`${droppedCount} ${pluralize(droppedCount, "declaration")} dropped, no React Native equivalent`);
61
+ }
62
+ if (syntaxCount > 0) {
63
+ claims.push(`${syntaxCount} syntax ${pluralize(syntaxCount, "warning")}`);
64
+ }
65
+ const lines = [`${PREFIX}: ${displayPath} - ${claims.join("; ")}`];
66
+ if (syntax.shown.length > 0) {
67
+ lines.push(` syntax: ${syntax.shown.join("; ")}${suffix(syntax.hidden)}`);
68
+ }
69
+ if (properties.shown.length > 0) {
70
+ lines.push(` properties: ${properties.shown.join(", ")}${suffix(properties.hidden)}`);
71
+ }
72
+ if (values.shown.length > 0) {
73
+ lines.push(` values: ${values.shown.join("; ")}${suffix(values.hidden)}`);
74
+ }
75
+ if (functions.shown.length > 0) {
76
+ lines.push(` functions: ${functions.shown.join(", ")}${suffix(functions.hidden)}`);
77
+ }
78
+ if (properties.hidden + values.hidden + functions.hidden + rendered.hidden + syntax.hidden > 0) {
79
+ lines.push(` Set reactNativeCSS.warnings to "verbose" for the full list, or "none" to silence this.`);
80
+ }
81
+ return lines.join("\n");
82
+ }
83
+ function toDisplayPath(filename, projectRoot) {
84
+ const relativePath = relative(projectRoot, filename);
85
+ return relativePath === "" || relativePath.startsWith("..") ? filename : relativePath;
86
+ }
87
+ function renderValues(values, verbose) {
88
+ let hidden = 0;
89
+ const entries = [];
90
+ const recordedByProperty = values ?? {};
91
+ for (const property of Object.keys(recordedByProperty).sort()) {
92
+ const distinct = unique(recordedByProperty[property]);
93
+ const shown = verbose ? distinct : distinct.slice(0, SUMMARY_VALUE_LIMIT);
94
+ hidden += distinct.length - shown.length;
95
+ const rendered = shown.map(value => truncate(value, verbose));
96
+ entries.push(`${property}: ${rendered.join(", ")}${suffix(distinct.length - shown.length)}`);
97
+ }
98
+ return {
99
+ entries,
100
+ hidden
101
+ };
102
+ }
103
+ function limit(entries, verbose) {
104
+ if (verbose || entries.length <= SUMMARY_ENTRY_LIMIT) {
105
+ return {
106
+ shown: entries,
107
+ hidden: 0
108
+ };
109
+ }
110
+ return {
111
+ shown: entries.slice(0, SUMMARY_ENTRY_LIMIT),
112
+ hidden: entries.length - SUMMARY_ENTRY_LIMIT
113
+ };
114
+ }
115
+ function suffix(hidden) {
116
+ return hidden > 0 ? ` (+${hidden} more)` : "";
117
+ }
118
+
119
+ // Code-unit order rather than localeCompare, whose collation varies with the ICU build
120
+ function unique(entries) {
121
+ return entries ? [...new Set(entries)].sort() : [];
122
+ }
123
+
124
+ // An unresolved calc() is recorded as its whole lightningcss node, hundreds of characters long
125
+ function truncate(value, verbose) {
126
+ return verbose || value.length <= SUMMARY_VALUE_LENGTH_LIMIT ? value : `${value.slice(0, SUMMARY_VALUE_LENGTH_LIMIT)}...`;
127
+ }
128
+ function pluralize(count, noun) {
129
+ return count === 1 ? noun : `${noun}s`;
130
+ }
131
+ //# sourceMappingURL=warnings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["relative","SUMMARY_ENTRY_LIMIT","SUMMARY_VALUE_LIMIT","SUMMARY_VALUE_LENGTH_LIMIT","PREFIX","lastReportedByFile","Map","reportCompilerWarnings","warnings","options","filename","projectRoot","level","message","formatCompilerWarnings","displayPath","toDisplayPath","verbose","undefined","delete","get","set","console","warn","droppedCount","properties","length","functions","Object","values","reduce","total","entries","syntaxCount","syntax","limit","unique","rendered","renderValues","claims","push","pluralize","lines","join","shown","suffix","hidden","relativePath","startsWith","recordedByProperty","property","keys","sort","distinct","slice","map","value","truncate","Set","count","noun"],"sourceRoot":"../../../src","sources":["metro/warnings.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,MAAM;;AAI/B;;AAGA,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,0BAA0B,GAAG,EAAE;AAErC,MAAMC,MAAM,GAAG,kBAAkB;;AAEjC;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAiB,CAAC;;AAEpD;AACA,OAAO,SAASC,sBAAsBA,CACpCC,QAA0B,EAC1BC,OAIC,EACK;EACN,MAAM;IAAEC,QAAQ;IAAEC,WAAW;IAAEC,KAAK,GAAG;EAAU,CAAC,GAAGH,OAAO;EAE5D,IAAIG,KAAK,KAAK,MAAM,EAAE;IACpB;EACF;EAEA,MAAMC,OAAO,GAAGC,sBAAsB,CAACN,QAAQ,EAAE;IAC/CO,WAAW,EAAEC,aAAa,CAACN,QAAQ,EAAEC,WAAW,CAAC;IACjDM,OAAO,EAAEL,KAAK,KAAK;EACrB,CAAC,CAAC;EAEF,IAAIC,OAAO,KAAKK,SAAS,EAAE;IACzBb,kBAAkB,CAACc,MAAM,CAACT,QAAQ,CAAC;IACnC;EACF;EAEA,IAAIL,kBAAkB,CAACe,GAAG,CAACV,QAAQ,CAAC,KAAKG,OAAO,EAAE;IAChD;EACF;EAEAR,kBAAkB,CAACgB,GAAG,CAACX,QAAQ,EAAEG,OAAO,CAAC;EAEzCS,OAAO,CAACC,IAAI,CAACV,OAAO,CAAC;AACvB;;AAEA;AACA,OAAO,SAASC,sBAAsBA,CACpCN,QAA0B,EAC1BC,OAA+D,EAC3C;EACpB,MAAM;IAAEM,WAAW;IAAEE,OAAO,GAAG;EAAM,CAAC,GAAGR,OAAO;EAEhD,MAAMe,YAAY,GAChB,CAAChB,QAAQ,CAACiB,UAAU,EAAEC,MAAM,IAAI,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MAAE2C,KAAK,EAAEZ,OAAO;MAAEc,MAAM,EAAE;IAAE,CAAC;EACtC;EAEA,OAAO;IACLF,KAAK,EAAEZ,OAAO,CAACsB,KAAK,CAAC,CAAC,EAAErD,mBAAmB,CAAC;IAC5C6C,MAAM,EAAEd,OAAO,CAACN,MAAM,GAAGzB;EAC3B,CAAC;AACH;AAEA,SAAS4C,MAAMA,CAACC,MAAc,EAAU;EACtC,OAAOA,MAAM,GAAG,CAAC,GAAG,MAAMA,MAAM,QAAQ,GAAG,EAAE;AAC/C;;AAEA;AACA,SAASV,MAAMA,CAACJ,OAA6B,EAAY;EACvD,OAAOA,OAAO,GAAG,CAAC,GAAG,IAAI0B,GAAG,CAAC1B,OAAO,CAAC,CAAC,CAACoB,IAAI,CAAC,CAAC,GAAG,EAAE;AACpD;;AAEA;AACA,SAASK,QAAQA,CAACD,KAAa,EAAEvC,OAAgB,EAAU;EACzD,OAAOA,OAAO,IAAIuC,KAAK,CAAC9B,MAAM,IAAIvB,0BAA0B,GACxDqD,KAAK,GACL,GAAGA,KAAK,CAACF,KAAK,CAAC,CAAC,EAAEnD,0BAA0B,CAAC,KAAK;AACxD;AAEA,SAASsC,SAASA,CAACkB,KAAa,EAAEC,IAAY,EAAU;EACtD,OAAOD,KAAK,KAAK,CAAC,GAAGC,IAAI,GAAG,GAAGA,IAAI,GAAG;AACxC","ignoreList":[]}
@@ -1,15 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  /* eslint-disable */
4
- import { useContext, useState } from "react";
4
+ import { useContext, useEffect, useState } from "react";
5
5
  import { Appearance } from "react-native";
6
6
  import { VariableContext } from "react-native-css/native-internal";
7
+ import { commaListItems } from "react-native-css/utilities";
7
8
  import { mappingToConfig, useNativeCss } from "./react/useNativeCss.js";
8
9
  import { usePassthrough } from "./react/usePassthrough.js";
9
- import { colorScheme as colorSchemeObs, VAR_SYMBOL } from "./reactivity.js";
10
+ import { cleanupEffect, colorScheme as colorSchemeObs, toVariableRecord, VAR_SYMBOL } from "./reactivity.js";
10
11
  import { resolveValue } from "./styles/resolve.js";
11
12
  export { StyleCollection, VariableContext, VariableContextProvider } from "react-native-css/native-internal";
12
13
  export { useNativeCss };
14
+ const defaultMapping = {
15
+ className: "style"
16
+ };
13
17
 
14
18
  /**
15
19
  * Generates a new Higher-Order component the wraps the base component and applies the styles.
@@ -17,7 +21,7 @@ export { useNativeCss };
17
21
  * @param baseComponent
18
22
  * @param mapping
19
23
  */
20
- export const styled = (baseComponent, mapping, options) => {
24
+ export const styled = (baseComponent, mapping = defaultMapping, options) => {
21
25
  let component;
22
26
  // const type = getComponentType(baseComponent);
23
27
 
@@ -40,7 +44,7 @@ export const colorScheme = {
40
44
  return colorSchemeObs.get() ?? Appearance.getColorScheme() ?? "light";
41
45
  },
42
46
  set(value) {
43
- return colorSchemeObs.set(value);
47
+ return colorSchemeObs.set(value === "light" || value === "dark" ? value : null);
44
48
  }
45
49
  };
46
50
  export const useUnstableNativeVariable = useNativeVariable;
@@ -53,22 +57,26 @@ export function useNativeVariable(name) {
53
57
  name = name.slice(2);
54
58
  }
55
59
  const inheritedVariables = useContext(VariableContext);
56
- const [effect, setState] = useState(() => {
60
+ const [, forceUpdate] = useState(0);
61
+ const [effect] = useState(() => {
57
62
  const effect = {
58
63
  observers: new Set(),
59
- run: () => setState(state => ({
60
- ...state
61
- }))
64
+ run: () => forceUpdate(state => state + 1)
62
65
  };
63
66
  const get = observable => observable.get(effect);
64
- return {
65
- ...effect,
67
+ return Object.assign(effect, {
66
68
  get
67
- };
69
+ });
68
70
  });
69
- return resolveValue([{}, "var", [name]], effect.get, {
71
+ useEffect(() => {
72
+ // React StrictMode replays setup after cleanup without another render.
73
+ if (effect.observers.size === 0) forceUpdate(state => state + 1);
74
+ return () => cleanupEffect(effect);
75
+ }, [effect]);
76
+ cleanupEffect(effect);
77
+ return commaListItems(resolveValue([{}, "var", [name]], effect.get, {
70
78
  inheritedVariables
71
- });
79
+ }));
72
80
  }
73
81
 
74
82
  /**
@@ -77,6 +85,6 @@ export function useNativeVariable(name) {
77
85
  export function vars(variables) {
78
86
  return Object.assign({
79
87
  [VAR_SYMBOL]: "inline"
80
- }, Object.fromEntries(Object.entries(variables).map(([k, v]) => [k.replace(/^--/, ""), v])));
88
+ }, toVariableRecord(variables));
81
89
  }
82
90
  //# sourceMappingURL=api.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","useState","Appearance","VariableContext","mappingToConfig","useNativeCss","usePassthrough","colorScheme","colorSchemeObs","VAR_SYMBOL","resolveValue","StyleCollection","VariableContextProvider","styled","baseComponent","mapping","options","component","configs","passThrough","props","name","displayName","get","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","startsWith","slice","inheritedVariables","effect","setState","observers","Set","run","state","observable","vars","variables","Object","assign","fromEntries","entries","map","k","v","replace"],"sourceRoot":"../../../src","sources":["native/api.tsx"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAC5C,SAASC,UAAU,QAAQ,cAAc;AAGzC,SAASC,eAAe,QAAQ,kCAAkC;AASlE,SAASC,eAAe,EAAEC,YAAY,QAAQ,yBAAsB;AACpE,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SACEC,WAAW,IAAIC,cAAc,EAC7BC,UAAU,QAGL,iBAAc;AACrB,SAASC,YAAY,QAAQ,qBAAkB;AAE/C,SACEC,eAAe,EACfR,eAAe,EACfS,uBAAuB,QAClB,kCAAkC;AAEzC,SAASP,YAAY;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMQ,MAAM,GAAGA,CAIpBC,aAAgB,EAChBC,OAAU,EACVC,OAAuB,KACpB;EACH,IAAIC,SAAc;EAClB;;EAEA,MAAMC,OAAO,GAAGd,eAAe,CAACW,OAAO,CAAC;EAExC,IAAIC,OAAO,EAAEG,WAAW,EAAE;IACxBF,SAAS,GAAIG,KAA0B,IAAK;MAC1C,OAAOd,cAAc,CAACQ,aAAa,EA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AAIC,GAAG,CAAC,CAAC;MACpBC,GAAG,EAAEA,CAAA,KAAMH,QAAQ,CAAEI,KAAK,KAAM;QAAE,GAAGA;MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,MAAMjB,GAAW,GAAIkB,UAAU,IAAKA,UAAU,CAAClB,GAAG,CAACY,MAAM,CAAC;IAE1D,OAAO;MAAE,GAAGA,MAAM;MAAEZ;IAAI,CAAC;EAC3B,CAAC,CAAC;EAEF,OAAOb,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAACW,IAAI,CAAC,CAAC,EAAEc,MAAM,CAACZ,GAAG,EAAE;IAAEW;EAAmB,CAAC,CAAC;AAC9E;;AAEA;AACA;AACA;AACA,OAAO,SAASQ,IAAIA,CAACC,SAA0C,EAAE;EAC/D,OAAOC,MAAM,CAACC,MAAM,CAClB;IAAE,CAACpC,UAAU,GAAG;EAAS,CAAC,EAC1BmC,MAAM,CAACE,WAAW,CAChBF,MAAM,CAACG,OAAO,CAACJ,SAAS,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK,CAACD,CAAC,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAED,CAAC,CAAC,CACrE,CACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["useContext","useEffect","useState","Appearance","VariableContext","commaListItems","mappingToConfig","useNativeCss","usePassthrough","cleanupEffect","colorScheme","colorSchemeObs","toVariableRecord","VAR_SYMBOL","resolveValue","StyleCollection","VariableContextProvider","defaultMapping","className","styled","baseComponent","mapping","options","component","configs","passThrough","props","name","displayName","get","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","startsWith","slice","inheritedVariables","forceUpdate","effect","observers","Set","run","state","observable","Object","assign","size","vars","variables"],"sourceRoot":"../../../src","sources":["native/api.tsx"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAA4B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CAACO,IAAI,KAAK,CAAC,EAAET,WAAW,CAAEK,KAAK,IAAKA,KAAK,GAAG,CAAC,CAAC;IAClE,OAAO,MAAMrC,aAAa,CAACiC,MAAM,CAAC;EACpC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EACZjC,aAAa,CAACiC,MAAM,CAAC;EACrB,OAAOrC,cAAc,CACnBS,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAACa,IAAI,CAAC,CAAC,EAAEe,MAAM,CAACb,GAAG,EAAE;IAAEW;EAAmB,CAAC,CACtE,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASW,IAAIA,CAACC,SAA0C,EAAa;EAC1E,OAAOJ,MAAM,CAACC,MAAM,CAClB;IAAE,CAACpC,UAAU,GAAG;EAAS,CAAC,EAC1BD,gBAAgB,CAACwC,SAAS,CAC5B,CAAC;AACH","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  export function testAttributes(queries, props, guards) {
4
4
  return queries.every(query => testAttribute(query, props, guards));
5
5
  }
6
- function testAttribute([type, prop, operator, testValue], props, guards) {
6
+ function testAttribute([type, prop, operator, testValue, caseSensitivity], props, guards) {
7
7
  let value = undefined;
8
8
  if (props) {
9
9
  if (type === "a") {
@@ -17,21 +17,28 @@ function testAttribute([type, prop, operator, testValue], props, guards) {
17
17
  if (!operator) {
18
18
  return value !== undefined && value !== null && value !== false;
19
19
  }
20
+ if (operator === "!") return !value;
21
+ if (value === undefined || value === null || testValue === undefined) return false;
22
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return false;
23
+ let actual = String(value);
24
+ if (caseSensitivity === "i") {
25
+ // CSS attribute flags fold ASCII letters only, not Unicode characters.
26
+ actual = actual.replace(/[A-Z]/g, letter => letter.toLowerCase());
27
+ testValue = testValue.replace(/[A-Z]/g, letter => letter.toLowerCase());
28
+ }
20
29
  switch (operator) {
21
- case "!":
22
- return !value;
23
30
  case "=":
24
- return value == testValue;
31
+ return actual === testValue;
25
32
  case "~=":
26
- return testValue && value?.toString().split(" ").includes(testValue);
33
+ return testValue !== "" && actual.split(/[\t\n\f\r ]+/).includes(testValue);
27
34
  case "|=":
28
- return testValue && value?.toString().startsWith(testValue + "-");
35
+ return actual === testValue || actual.startsWith(testValue + "-");
29
36
  case "^=":
30
- return testValue && value?.toString().startsWith(testValue);
37
+ return testValue !== "" && actual.startsWith(testValue);
31
38
  case "$=":
32
- return testValue && value?.toString().endsWith(testValue);
39
+ return testValue !== "" && actual.endsWith(testValue);
33
40
  case "*=":
34
- return testValue && value?.toString().includes(testValue);
41
+ return testValue !== "" && actual.includes(testValue);
35
42
  default:
36
43
  operator;
37
44
  return false;
@@ -1 +1 @@
1
- {"version":3,"names":["testAttributes","queries","props","guards","every","query","testAttribute","type","prop","operator","testValue","value","undefined","dataSet","push","toString","split","includes","startsWith","endsWith"],"sourceRoot":"../../../../src","sources":["native/conditions/attributes.ts"],"mappings":";;AAIA,OAAO,SAASA,cAAcA,CAC5BC,OAAyB,EACzBC,KAAiD,EACjDC,MAAqB,EACrB;EACA,OAAOF,OAAO,CAACG,KAAK,CAAEC,KAAK,IAAKC,aAAa,CAACD,KAAK,EAAEH,KAAK,EAAEC,MAAM,CAAC,CAAC;AACtE;AAEA,SAASG,aAAaA,CACpB,CAACC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,CAAiB,EACjDR,KAAiD,EACjDC,MAAqB,EACrB;EACA,IAAIQ,KAAc,GAAGC,SAAS;EAE9B,IAAIV,KAAK,EAAE;IACT,IAAIK,IAAI,KAAK,GAAG,EAAE;MAChBI,KAAK,GAAGT,KAAK,CAACM,IAAI,CAAC;IACrB,CAAC,MAAM;MACL,MAAMK,OAAO,GAAGX,KAAK,CAACW,OAA8C;MACpEF,KAAK,GAAGE,OAAO,GAAGL,IAAI,CAAC;IACzB;EACF;EAEAL,MAAM,CAACW,IAAI,CAAC,CAACP,IAAI,EAAEC,IAAI,EAAEG,KAAK,CAAC,CAAC;EAEhC,IAAI,CAACF,QAAQ,EAAE;IACb,OAAOE,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,KAAK;EACjE;EAEA,QAAQF,QAAQ;IACd,KAAK,GAAG;MACN,OAAO,CAACE,KAAK;IACf,KAAK,GAAG;MACN,OAAOA,KAAK,IAAID,SAAS;IAC3B,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,QAAQ,CAACP,SAAS,CAAC;IACtE,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACG,UAAU,CAACR,SAAS,GAAG,GAAG,CAAC;IACnE,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACG,UAAU,CAACR,SAAS,CAAC;IAC7D,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACI,QAAQ,CAACT,SAAS,CAAC;IAC3D,KAAK,IAAI;MACP,OAAOA,SAAS,IAAIC,KAAK,EAAEI,QAAQ,CAAC,CAAC,CAACE,QAAQ,CAACP,SAAS,CAAC;IAC3D;MACED,QAAQ;MACR,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["testAttributes","queries","props","guards","every","query","testAttribute","type","prop","operator","testValue","caseSensitivity","value","undefined","dataSet","push","actual","String","replace","letter","toLowerCase","split","includes","startsWith","endsWith"],"sourceRoot":"../../../../src","sources":["native/conditions/attributes.ts"],"mappings":";;AAIA,OAAO,SAASA,cAAcA,CAC5BC,OAAyB,EACzBC,KAAiD,EACjDC,MAAqB,EACrB;EACA,OAAOF,OAAO,CAACG,KAAK,CAAEC,KAAK,IAAKC,aAAa,CAACD,KAAK,EAAEH,KAAK,EAAEC,MAAM,CAAC,CAAC;AACtE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AOO,MAAM,KAAKN,SAAS;IAC7B,KAAK,IAAI;MACP,OACEA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACK,KAAK,CAAC,cAAc,CAAC,CAACC,QAAQ,CAACZ,SAAS,CAAC;IAExE,KAAK,IAAI;MACP,OAAOM,MAAM,KAAKN,SAAS,IAAIM,MAAM,CAACO,UAAU,CAACb,SAAS,GAAG,GAAG,CAAC;IACnE,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACO,UAAU,CAACb,SAAS,CAAC;IACzD,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACQ,QAAQ,CAACd,SAAS,CAAC;IACvD,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACM,QAAQ,CAACZ,SAAS,CAAC;IACvD;MACED,QAAQ;MACR,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
 
5
5
  import { activeFamily, containerHeightFamily, containerWidthFamily, focusFamily, hoverFamily } from "../reactivity.js";
6
- // import { testAttributes } from "./attributes";
7
-
6
+ import { testAttributes } from "./attributes.js";
8
7
  export const DEFAULT_CONTAINER_NAME = "c:___default___";
9
8
  export function testContainerQueries(queries, inheritedContainers, guards, get) {
10
9
  return queries.every(query => {
@@ -19,14 +18,15 @@ export function testContainerQuery(query, inheritedContainers, guards, get) {
19
18
  return false;
20
19
  }
21
20
 
22
- // if (query.a && !testAttributes(query.a, container.props, guards)) {
23
- // return false;
24
- // }
25
-
26
- if (query.m && !testContainerMediaCondition(query.m, container, get)) {
21
+ // Ancestor snapshots have their own context guard. Their attributes must not
22
+ // be compared with this descendant's props by the ordinary attribute guards.
23
+ if (query.a && !testAttributes(query.a, container.props, [])) {
24
+ return false;
25
+ }
26
+ if (query.m && !testContainerMediaCondition(query.m, container.key, get)) {
27
27
  return false;
28
28
  }
29
- if (query.p && !testContainerPseudoCondition(query.p, container, get)) {
29
+ if (query.p && !testContainerPseudoCondition(query.p, container.key, get)) {
30
30
  return false;
31
31
  }
32
32
  return true;
@@ -77,11 +77,11 @@ function testContainerMediaCondition(condition, containerKey, get) {
77
77
  case ">":
78
78
  return left > right;
79
79
  case ">=":
80
- return left > right;
80
+ return left >= right;
81
81
  case "<":
82
- return left > right;
82
+ return left < right;
83
83
  case "<=":
84
- return left > right;
84
+ return left <= right;
85
85
  default:
86
86
  condition[0];
87
87
  return false;
@@ -1 +1 @@
1
- {"version":3,"names":["activeFamily","containerHeightFamily","containerWidthFamily","focusFamily","hoverFamily","DEFAULT_CONTAINER_NAME","testContainerQueries","queries","inheritedContainers","guards","get","every","query","testContainerQuery","name","n","container","push","m","testContainerMediaCondition","p","testContainerPseudoCondition","containerKey","h","a","f","condition","some","left","getContainerFeatureValue","right","width","height"],"sourceRoot":"../../../../src","sources":["native/conditions/container-query.ts"],"mappings":";;AAAA;;AASA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,oBAAoB,EACpBC,WAAW,EACXC,WAAW,QAGN,kBAAe;AACtB;;AAGA,OAAO,MAAMC,sBAAsB,GAAG,iBAAiB;AAEvD,OAAO,SAASC,oBAAoBA,CAClCC,OAAyB,EACzBC,mBAA0C,EAC1CC,MAAqB,EACrBC,GAAW,EACX;EACA,OAAOH,OAAO,CAACI,KAAK,CAAEC,KAAK,IAAK;IAC9B,OAAOC,kBAAkB,CAACD,KAAK,EAAEJ,mBAAmB,EAAEC,MAAM,EAAEC,GAAG,CAAC;EACpE,CAAC,CAAC;AACJ;AAEA,OAAO,SAASG,kBAAkBA,CAChCD,KAAqB,EACrBJ,mBAA0C,EAC1CC,MAAqB,EACrBC,GAAW,EACF;EACT,MAAMI,IAAI,GAAGF,KAAK,CAACG,CAAC,IAAIV,sBAAsB;EAC9C,MAAMW,SAAS,GAAGR,mBAAmB,CAACM,IAAI,CAAE;EAE5CL,MAAM,CAACQ,IAAI,CAAC,CAAC,GAAG,EAAEH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G,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;IACjD,KAAK,cAAc;MAAE;QACnB,MAAMS,KAAK,GAAGrB,GAAG,CAACR,oBAAoB,CAACoB,YAAY,CAAC,CAAC;QACrD,MAAMU,MAAM,GAAGtB,GAAG,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;QACvD,OAAOS,KAAK,GAAGC,MAAM;MACvB;IACA,KAAK,aAAa;MAChB,MAAMD,KAAK,GAAGrB,GAAG,CAACR,oBAAoB,CAACoB,YAAY,CAAC,CAAC;MACrD,MAAMU,MAAM,GAAGtB,GAAG,CAACT,qBAAqB,CAACqB,YAAY,CAAC,CAAC;MACvD,OAAOS,KAAK,GAAGC,MAAM,GAAG,WAAW,GAAG,UAAU;IAClD,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB;MACE;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["activeFamily","containerHeightFamily","containerWidthFamily","focusFamily","hoverFamily","testAttributes","DEFAULT_CONTAINER_NAME","testContainerQueries","queries","inheritedContainers","guards","get","every","query","testContainerQuery","name","n","container","push","a","props","m","testContainerMediaCondition","key","p","testContainerPseudoCondition","containerKey","h","f","condition","some","left","getContainerFeatureValue","right","width","height"],"sourceRoot":"../../../../src","sources":["native/conditions/container-query.ts"],"mappings":";;AAAA;;AASA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,oBAAoB,EACpBC,WAAW,EACXC,WAAW,QAGN,kBAAe;AACtB,SAASC,cAAc,QAAQ,iBAAc;AAG7C,OAAO,MAAMC,sBAAsB,GAAG,iBAAiB;AAEvD,OAAO,SAASC,oBAAoBA,CAClCC,OAAyB,EACzBC,mBAA0C,EAC1CC,MAAqB,EACrBC,GAAW,EACX;EACA,OAAOH,OAAO,CAACI,KAAK,CAAEC,KAAK,IAAK;IAC9B,OAAOC,kBAAkB,CAACD,KAAK,EAAEJ,mBAAmB,EAAEC,MAAM,EAAEC,GAAG,CAAC;EACpE,CAAC,CAAC;AACJ;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IE,KAAK;UACtB,KAAK,GAAG;YACN,OAAOF,IAAI,GAAGE,KAAK;UACrB,KAAK,IAAI;YACP,OAAOF,IAAI,IAAIE,KAAK;UACtB;YACEJ,SAAS,CAAC,CAAC,CAAC;YACZ,OAAO,KAAK;QAChB;MACF;IACA;MACEA,SAAS;MACT,OAAO,KAAK;EAChB;AACF;AAEA,SAASG,wBAAwBA,CAC/BjB,IAAgD,EAChDW,YAAqB,EACrBf,GAAW,EACM;EACjB,QAAQI,IAAI;IACV,KAAK,OAAO;MACV,OAAOJ,GAAG,CAACT,oBAAoB,CAACwB,YAAY,CAAC,CAAC;IAChD,KAAK,QAAQ;MACX,OAAOf,GAAG,CAACV,qBAAqB,CAACyB,YAAY,CAAC,CAAC;IACjD,KAAK,cAAc;MAAE;QACnB,MAAMQ,KAAK,GAAGvB,GAAG,CAACT,oBAAoB,CAACwB,YAAY,CAAC,CAAC;QACrD,MAAMS,MAAM,GAAGxB,GAAG,CAACV,qBAAqB,CAACyB,YAAY,CAAC,CAAC;QACvD,OAAOQ,KAAK,GAAGC,MAAM;MACvB;IACA,KAAK,aAAa;MAChB,MAAMD,KAAK,GAAGvB,GAAG,CAACT,oBAAoB,CAACwB,YAAY,CAAC,CAAC;MACrD,MAAMS,MAAM,GAAGxB,GAAG,CAACV,qBAAqB,CAACyB,YAAY,CAAC,CAAC;MACvD,OAAOQ,KAAK,GAAGC,MAAM,GAAG,WAAW,GAAG,UAAU;IAClD,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB;MACE;EACJ;AACF","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  /* eslint-disable */
4
4
 
5
+ import { registeredInheritance } from "react-native-css/native-internal";
5
6
  export function testGuards(state, currentProps, inheritedVariables, inheritedContainers) {
6
7
  return state.guards?.some(guard => {
7
8
  let result = false;
@@ -18,10 +19,16 @@ export function testGuards(state, currentProps, inheritedVariables, inheritedCon
18
19
  // Variables
19
20
  result = inheritedVariables[guard[1]] !== guard[2];
20
21
  break;
22
+ case "n":
23
+ // A non-inheriting variable's value counts only once a later registration lets it inherit
24
+ result = registeredInheritance(guard[1]).get() && inheritedVariables[guard[1]] !== guard[2];
25
+ break;
21
26
  case "c":
22
27
  // Containers
23
28
  result = inheritedContainers[guard[1]] !== guard[2];
24
29
  break;
30
+ default:
31
+ guard;
25
32
  }
26
33
  return result;
27
34
  });