react-native-css 3.0.6 → 3.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/commonjs/babel/import-plugin.js +9 -3
  3. package/dist/commonjs/babel/import-plugin.js.map +1 -1
  4. package/dist/commonjs/babel/react-native-web.js +16 -3
  5. package/dist/commonjs/babel/react-native-web.js.map +1 -1
  6. package/dist/commonjs/babel/react-native.js +7 -2
  7. package/dist/commonjs/babel/react-native.js.map +1 -1
  8. package/dist/commonjs/compiler/atRules.js +35 -0
  9. package/dist/commonjs/compiler/atRules.js.map +1 -1
  10. package/dist/commonjs/compiler/compiler.js +43 -30
  11. package/dist/commonjs/compiler/compiler.js.map +1 -1
  12. package/dist/commonjs/compiler/container-query.js +6 -1
  13. package/dist/commonjs/compiler/container-query.js.map +1 -1
  14. package/dist/commonjs/compiler/declarations.js +102 -61
  15. package/dist/commonjs/compiler/declarations.js.map +1 -1
  16. package/dist/commonjs/compiler/lightningcss-loader.js +11 -8
  17. package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
  18. package/dist/commonjs/compiler/media-query.js +16 -6
  19. package/dist/commonjs/compiler/media-query.js.map +1 -1
  20. package/dist/commonjs/compiler/selector-builder.js +13 -3
  21. package/dist/commonjs/compiler/selector-builder.js.map +1 -1
  22. package/dist/commonjs/components/FlatList.js +1 -0
  23. package/dist/commonjs/components/FlatList.js.map +1 -1
  24. package/dist/commonjs/components/ImageBackground.js +2 -6
  25. package/dist/commonjs/components/ImageBackground.js.map +1 -1
  26. package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
  27. package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
  28. package/dist/commonjs/components/index.cjs +46 -1
  29. package/dist/commonjs/components/index.cjs.map +1 -1
  30. package/dist/commonjs/jest/index.js +1 -1
  31. package/dist/commonjs/jest/index.js.map +1 -1
  32. package/dist/commonjs/metro/cache-version.js +43 -0
  33. package/dist/commonjs/metro/cache-version.js.map +1 -0
  34. package/dist/commonjs/metro/index.js +2 -0
  35. package/dist/commonjs/metro/index.js.map +1 -1
  36. package/dist/commonjs/metro/metro-transformer.js +1 -1
  37. package/dist/commonjs/metro/metro-transformer.js.map +1 -1
  38. package/dist/commonjs/metro/typescript.js +26 -6
  39. package/dist/commonjs/metro/typescript.js.map +1 -1
  40. package/dist/commonjs/native/api.js +12 -8
  41. package/dist/commonjs/native/api.js.map +1 -1
  42. package/dist/commonjs/native/conditions/attributes.js +16 -9
  43. package/dist/commonjs/native/conditions/attributes.js.map +1 -1
  44. package/dist/commonjs/native/conditions/container-query.js +11 -11
  45. package/dist/commonjs/native/conditions/container-query.js.map +1 -1
  46. package/dist/commonjs/native/conditions/media-query.js +1 -1
  47. package/dist/commonjs/native/conditions/media-query.js.map +1 -1
  48. package/dist/commonjs/native/react/interaction.js +10 -5
  49. package/dist/commonjs/native/react/interaction.js.map +1 -1
  50. package/dist/commonjs/native/react/rules.js +12 -5
  51. package/dist/commonjs/native/react/rules.js.map +1 -1
  52. package/dist/commonjs/native/react/useNativeCss.js +48 -12
  53. package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
  54. package/dist/commonjs/native/react/usePassthrough.js +5 -2
  55. package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
  56. package/dist/commonjs/native/reactivity.js +32 -22
  57. package/dist/commonjs/native/reactivity.js.map +1 -1
  58. package/dist/commonjs/native/reanimated.js +15 -3
  59. package/dist/commonjs/native/reanimated.js.map +1 -1
  60. package/dist/commonjs/native/styles/functions/color-mix.js +43 -29
  61. package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -1
  62. package/dist/commonjs/native/styles/functions/filters.js +18 -5
  63. package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
  64. package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
  65. package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
  66. package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
  67. package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
  68. package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
  69. package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
  70. package/dist/commonjs/native/styles/index.js +140 -14
  71. package/dist/commonjs/native/styles/index.js.map +1 -1
  72. package/dist/commonjs/native/styles/resolve.js +10 -6
  73. package/dist/commonjs/native/styles/resolve.js.map +1 -1
  74. package/dist/commonjs/native/styles/scale-factor.js +13 -0
  75. package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
  76. package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
  77. package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
  78. package/dist/commonjs/native/styles/shorthands/index.js +11 -0
  79. package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
  80. package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
  81. package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
  82. package/dist/commonjs/native/styles/variables.js +55 -43
  83. package/dist/commonjs/native/styles/variables.js.map +1 -1
  84. package/dist/commonjs/native-internal/style-collection.js +1 -1
  85. package/dist/commonjs/native-internal/style-collection.js.map +1 -1
  86. package/dist/commonjs/utilities/dot-notation.types.js +4 -0
  87. package/dist/commonjs/utilities/style-descriptor.js +4 -9
  88. package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
  89. package/dist/commonjs/web/api.js +1 -1
  90. package/dist/commonjs/web/api.js.map +1 -1
  91. package/dist/commonjs/web/assign-style.js +4 -1
  92. package/dist/commonjs/web/assign-style.js.map +1 -1
  93. package/dist/module/babel/import-plugin.js +11 -5
  94. package/dist/module/babel/import-plugin.js.map +1 -1
  95. package/dist/module/babel/react-native-web.js +16 -4
  96. package/dist/module/babel/react-native-web.js.map +1 -1
  97. package/dist/module/babel/react-native.js +7 -2
  98. package/dist/module/babel/react-native.js.map +1 -1
  99. package/dist/module/compiler/atRules.js +33 -0
  100. package/dist/module/compiler/atRules.js.map +1 -1
  101. package/dist/module/compiler/compiler.js +44 -31
  102. package/dist/module/compiler/compiler.js.map +1 -1
  103. package/dist/module/compiler/container-query.js +6 -1
  104. package/dist/module/compiler/container-query.js.map +1 -1
  105. package/dist/module/compiler/declarations.js +102 -61
  106. package/dist/module/compiler/declarations.js.map +1 -1
  107. package/dist/module/compiler/lightningcss-loader.js +10 -8
  108. package/dist/module/compiler/lightningcss-loader.js.map +1 -1
  109. package/dist/module/compiler/media-query.js +16 -6
  110. package/dist/module/compiler/media-query.js.map +1 -1
  111. package/dist/module/compiler/selector-builder.js +13 -3
  112. package/dist/module/compiler/selector-builder.js.map +1 -1
  113. package/dist/module/components/FlatList.js +1 -0
  114. package/dist/module/components/FlatList.js.map +1 -1
  115. package/dist/module/components/ImageBackground.js +2 -6
  116. package/dist/module/components/ImageBackground.js.map +1 -1
  117. package/dist/module/components/KeyboardAvoidingView.js +2 -3
  118. package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
  119. package/dist/module/components/index.cjs +46 -1
  120. package/dist/module/components/index.cjs.map +1 -1
  121. package/dist/module/jest/index.js +1 -1
  122. package/dist/module/jest/index.js.map +1 -1
  123. package/dist/module/metro/cache-version.js +39 -0
  124. package/dist/module/metro/cache-version.js.map +1 -0
  125. package/dist/module/metro/index.js +2 -0
  126. package/dist/module/metro/index.js.map +1 -1
  127. package/dist/module/metro/metro-transformer.js +1 -1
  128. package/dist/module/metro/metro-transformer.js.map +1 -1
  129. package/dist/module/metro/typescript.js +26 -6
  130. package/dist/module/metro/typescript.js.map +1 -1
  131. package/dist/module/native/api.js +14 -10
  132. package/dist/module/native/api.js.map +1 -1
  133. package/dist/module/native/conditions/attributes.js +16 -9
  134. package/dist/module/native/conditions/attributes.js.map +1 -1
  135. package/dist/module/native/conditions/container-query.js +11 -11
  136. package/dist/module/native/conditions/container-query.js.map +1 -1
  137. package/dist/module/native/conditions/media-query.js +1 -1
  138. package/dist/module/native/conditions/media-query.js.map +1 -1
  139. package/dist/module/native/react/interaction.js +10 -5
  140. package/dist/module/native/react/interaction.js.map +1 -1
  141. package/dist/module/native/react/rules.js +13 -6
  142. package/dist/module/native/react/rules.js.map +1 -1
  143. package/dist/module/native/react/useNativeCss.js +49 -13
  144. package/dist/module/native/react/useNativeCss.js.map +1 -1
  145. package/dist/module/native/react/usePassthrough.js +5 -2
  146. package/dist/module/native/react/usePassthrough.js.map +1 -1
  147. package/dist/module/native/reactivity.js +32 -22
  148. package/dist/module/native/reactivity.js.map +1 -1
  149. package/dist/module/native/reanimated.js +15 -3
  150. package/dist/module/native/reanimated.js.map +1 -1
  151. package/dist/module/native/styles/functions/color-mix.js +43 -29
  152. package/dist/module/native/styles/functions/color-mix.js.map +1 -1
  153. package/dist/module/native/styles/functions/filters.js +16 -4
  154. package/dist/module/native/styles/functions/filters.js.map +1 -1
  155. package/dist/module/native/styles/functions/numeric-functions.js +4 -3
  156. package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
  157. package/dist/module/native/styles/functions/string-functions.js +13 -0
  158. package/dist/module/native/styles/functions/string-functions.js.map +1 -1
  159. package/dist/module/native/styles/functions/transform-functions.js +5 -4
  160. package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
  161. package/dist/module/native/styles/index.js +140 -14
  162. package/dist/module/native/styles/index.js.map +1 -1
  163. package/dist/module/native/styles/resolve.js +10 -6
  164. package/dist/module/native/styles/resolve.js.map +1 -1
  165. package/dist/module/native/styles/scale-factor.js +9 -0
  166. package/dist/module/native/styles/scale-factor.js.map +1 -0
  167. package/dist/module/native/styles/shorthands/animation.js +6 -3
  168. package/dist/module/native/styles/shorthands/animation.js.map +1 -1
  169. package/dist/module/native/styles/shorthands/index.js +1 -0
  170. package/dist/module/native/styles/shorthands/index.js.map +1 -1
  171. package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
  172. package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
  173. package/dist/module/native/styles/variables.js +55 -43
  174. package/dist/module/native/styles/variables.js.map +1 -1
  175. package/dist/module/native-internal/style-collection.js +1 -1
  176. package/dist/module/native-internal/style-collection.js.map +1 -1
  177. package/dist/module/utilities/dot-notation.types.js +2 -0
  178. package/dist/module/utilities/style-descriptor.js +4 -9
  179. package/dist/module/utilities/style-descriptor.js.map +1 -1
  180. package/dist/module/web/api.js +1 -1
  181. package/dist/module/web/api.js.map +1 -1
  182. package/dist/module/web/assign-style.js +4 -1
  183. package/dist/module/web/assign-style.js.map +1 -1
  184. package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
  186. package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
  187. package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
  188. package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
  189. package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
  191. package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -2
  192. package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
  193. package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
  194. package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
  195. package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
  196. package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
  197. package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
  199. package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  200. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +1 -1
  201. package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
  203. package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
  205. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
  206. package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
  207. package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
  209. package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
  211. package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
  212. package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
  213. package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/src/native/reactivity.d.ts +7 -3
  217. package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
  221. package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  223. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
  224. package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
  227. package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
  229. package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
  231. package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
  232. package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
  234. package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  236. package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
  239. package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
  241. package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
  243. package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
  245. package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
  247. package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
  249. package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
  250. package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
  251. package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
  252. package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
  253. package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
  254. package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
  255. package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
  256. package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
  257. package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
  258. package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
  259. package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
  260. package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
  261. package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
  262. package/dist/typescript/module/src/compiler/declarations.d.ts +4 -4
  263. package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
  264. package/dist/typescript/module/src/compiler/index.d.ts +2 -2
  265. package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
  266. package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
  267. package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
  268. package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
  269. package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
  270. package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
  271. package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
  272. package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
  273. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
  274. package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
  275. package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
  276. package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
  277. package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
  278. package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
  279. package/dist/typescript/module/src/compiler/stylesheet.d.ts +1 -1
  280. package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
  281. package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
  282. package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
  283. package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
  284. package/dist/typescript/module/src/components/index.d.ts +16 -16
  285. package/dist/typescript/module/src/components/index.d.ts.map +1 -1
  286. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
  287. package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
  288. package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
  289. package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
  290. package/dist/typescript/module/src/metro/index.d.ts +1 -1
  291. package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
  292. package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
  293. package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
  294. package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
  295. package/dist/typescript/module/src/native/api.d.ts +5 -9
  296. package/dist/typescript/module/src/native/api.d.ts.map +1 -1
  297. package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
  298. package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
  299. package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
  300. package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
  301. package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
  302. package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
  303. package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
  304. package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
  305. package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
  306. package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
  307. package/dist/typescript/module/src/native/index.d.ts +3 -3
  308. package/dist/typescript/module/src/native/index.d.ts.map +1 -1
  309. package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
  310. package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
  311. package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
  312. package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
  313. package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
  314. package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
  315. package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
  316. package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
  317. package/dist/typescript/module/src/native/reactivity.d.ts +7 -3
  318. package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
  319. package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
  320. package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
  321. package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
  322. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
  323. package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
  324. package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
  325. package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
  326. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +1 -1
  327. package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -1
  328. package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
  329. package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
  330. package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -8
  331. package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
  332. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
  333. package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
  334. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
  335. package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
  336. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
  337. package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
  338. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
  339. package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
  340. package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
  341. package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
  342. package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
  343. package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
  344. package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
  345. package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
  346. package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
  347. package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
  348. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
  349. package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
  350. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
  351. package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
  352. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
  353. package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
  354. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
  355. package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
  356. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
  357. package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
  358. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
  359. package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
  360. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
  361. package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
  362. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
  363. package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
  364. package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
  365. package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
  366. package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
  367. package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
  368. package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
  369. package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
  370. package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
  371. package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
  372. package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
  373. package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
  374. package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
  375. package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
  376. package/dist/typescript/module/src/runtime.d.ts +1 -1
  377. package/dist/typescript/module/src/runtime.d.ts.map +1 -1
  378. package/dist/typescript/module/src/runtime.native.d.ts +1 -1
  379. package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
  380. package/dist/typescript/module/src/runtime.types.d.ts +11 -6
  381. package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
  382. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
  383. package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
  384. package/dist/typescript/module/src/utilities/index.d.ts +3 -3
  385. package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
  386. package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
  387. package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
  388. package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
  389. package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
  390. package/dist/typescript/module/src/web/api.d.ts +5 -5
  391. package/dist/typescript/module/src/web/api.d.ts.map +1 -1
  392. package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
  393. package/dist/typescript/module/src/web/index.d.ts +3 -3
  394. package/dist/typescript/module/src/web/index.d.ts.map +1 -1
  395. package/node/babel.mjs +4 -0
  396. package/node/compiler.mjs +2 -0
  397. package/node/metro.mjs +2 -0
  398. package/package.json +61 -27
  399. package/src/babel/import-plugin.ts +15 -4
  400. package/src/babel/react-native-web.ts +32 -3
  401. package/src/babel/react-native.ts +7 -1
  402. package/src/compiler/atRules.ts +44 -0
  403. package/src/compiler/compiler.ts +73 -49
  404. package/src/compiler/container-query.ts +8 -3
  405. package/src/compiler/declarations.ts +189 -100
  406. package/src/compiler/lightningcss-loader.ts +16 -15
  407. package/src/compiler/media-query.ts +20 -9
  408. package/src/compiler/selector-builder.ts +29 -3
  409. package/src/components/FlatList.tsx +1 -0
  410. package/src/components/ImageBackground.tsx +2 -6
  411. package/src/components/KeyboardAvoidingView.tsx +2 -3
  412. package/src/components/index.cts +46 -1
  413. package/src/jest/index.ts +1 -1
  414. package/src/metro/cache-version.ts +48 -0
  415. package/src/metro/index.ts +2 -0
  416. package/src/metro/metro-transformer.ts +9 -6
  417. package/src/metro/typescript.ts +53 -6
  418. package/src/native/api.tsx +20 -14
  419. package/src/native/conditions/attributes.ts +26 -9
  420. package/src/native/conditions/container-query.ts +11 -9
  421. package/src/native/conditions/media-query.ts +1 -1
  422. package/src/native/react/interaction.ts +11 -6
  423. package/src/native/react/rules.ts +13 -5
  424. package/src/native/react/useNativeCss.ts +54 -14
  425. package/src/native/react/usePassthrough.ts +3 -2
  426. package/src/native/reactivity.ts +42 -24
  427. package/src/native/reanimated.ts +24 -5
  428. package/src/native/styles/functions/color-mix.ts +45 -39
  429. package/src/native/styles/functions/filters.ts +20 -6
  430. package/src/native/styles/functions/numeric-functions.ts +7 -6
  431. package/src/native/styles/functions/string-functions.ts +18 -0
  432. package/src/native/styles/functions/transform-functions.ts +5 -4
  433. package/src/native/styles/index.ts +146 -15
  434. package/src/native/styles/resolve.ts +15 -11
  435. package/src/native/styles/scale-factor.ts +6 -0
  436. package/src/native/styles/shorthands/animation.ts +8 -2
  437. package/src/native/styles/shorthands/index.ts +1 -0
  438. package/src/native/styles/shorthands/logical-border-width.ts +32 -0
  439. package/src/native/styles/variables.ts +48 -38
  440. package/src/native-internal/style-collection.ts +1 -1
  441. package/src/runtime.types.ts +17 -15
  442. package/src/utilities/dot-notation.types.ts +4 -3
  443. package/src/utilities/style-descriptor.ts +11 -16
  444. package/src/web/api.tsx +6 -11
  445. package/src/web/assign-style.ts +2 -1
  446. package/types.d.ts +0 -20
  447. package/dist/commonjs/compiler/inheritance.test.js +0 -78
  448. package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
  449. package/dist/module/compiler/inheritance.test.js +0 -78
  450. package/dist/module/compiler/inheritance.test.js.map +0 -1
  451. package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
  452. package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
  453. package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
  454. package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
  455. package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
  456. package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
  457. package/dist/typescript/commonjs/example/index.d.ts +0 -2
  458. package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
  459. package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
  460. package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
  461. package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
  462. package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
  463. package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
  464. package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
  465. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
  466. package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
  467. package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
  468. package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
  469. package/dist/typescript/module/eslint.config.d.mts +0 -2
  470. package/dist/typescript/module/eslint.config.d.mts.map +0 -1
  471. package/dist/typescript/module/example/app.config.d.ts +0 -4
  472. package/dist/typescript/module/example/app.config.d.ts.map +0 -1
  473. package/dist/typescript/module/example/index.d.ts +0 -2
  474. package/dist/typescript/module/example/index.d.ts.map +0 -1
  475. package/dist/typescript/module/example/metro.config.d.ts +0 -3
  476. package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
  477. package/dist/typescript/module/example/postcss.config.d.mts +0 -7
  478. package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
  479. package/dist/typescript/module/example/src/App.d.ts +0 -3
  480. package/dist/typescript/module/example/src/App.d.ts.map +0 -1
  481. package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
  482. package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
  483. package/src/compiler/inheritance.test.ts +0 -121
@@ -1,4 +1,4 @@
1
- import type { ClassicComponentClass, ComponentClass, ComponentProps, ComponentType, ForwardRefExoticComponent, FunctionComponent, ReactElement } from "react";
1
+ import type { ClassicComponentClass, ComponentClass, ComponentProps, ComponentPropsWithRef, ComponentType, ForwardRefExoticComponent, FunctionComponent, ReactElement } from "react";
2
2
  import type { ColorSchemeName, ImageStyle, TextStyle, ViewStyle } from "react-native";
3
3
  import type { DotNotation, ResolveDotPath } from "react-native-css/utilities";
4
4
  /******************************** API ********************************/
@@ -8,8 +8,13 @@ export type StyledReactElement<C extends ReactComponent, M extends StyledConfigu
8
8
  export type StyledProps<P, M extends StyledConfiguration<any>> = P & {
9
9
  [K in keyof M as K extends string ? M[K] extends undefined | false ? never : M[K] extends true | string | object ? K : never : never]?: string;
10
10
  };
11
- export type Styled = <const C extends ReactComponent, const M extends StyledConfiguration<C>>(component: C, mapping: M & StyledConfiguration<C>, options?: StyledOptions) => StyledComponent<C, M>;
12
- type StyledComponent<C extends ReactComponent, M extends StyledConfiguration<C>> = ComponentType<ComponentProps<C> & {
11
+ export interface Styled {
12
+ <const C extends ReactComponent>(component: C, mapping?: undefined, options?: StyledOptions): ComponentType<ComponentPropsWithRef<C> & {
13
+ className?: string;
14
+ }>;
15
+ <const C extends ReactComponent, const M extends StyledConfiguration<C>>(component: C, mapping: M & StyledConfiguration<C>, options?: StyledOptions): StyledComponent<C, M>;
16
+ }
17
+ type StyledComponent<C extends ReactComponent, M extends StyledConfiguration<C>> = ComponentType<ComponentPropsWithRef<C> & {
13
18
  [K in keyof M as K extends string ? M[K] extends undefined | false ? never : M[K] extends true | string | object ? K : never : never]?: string;
14
19
  }>;
15
20
  export type StyledConfiguration<C extends ReactComponent, K extends string = string> = Record<K, boolean | ComponentPropsDotNotation<C> | StyledConfigurationObject<C, ComponentPropsDotNotation<C> | false>>;
@@ -17,7 +22,7 @@ interface StyledConfigurationObject<C extends ReactComponent, T extends Componen
17
22
  target: T;
18
23
  nativeStyleMapping?: T extends false ? NativeStyleMapping<string, ComponentProps<C>> : NativeStyleMapping<ResolveDotPath<T, ComponentProps<C>>, ComponentProps<C>>;
19
24
  /** @deprecated Please use nativeStyleMapping */
20
- nativeStyleToProp?: NativeStyleMapping<ResolveDotPath<T, ComponentProps<C>>, ComponentProps<C>>;
25
+ nativeStyleToProp?: StyledConfigurationObject<C, T>["nativeStyleMapping"];
21
26
  }
22
27
  type NativeStyleMapping<T, S> = T extends object ? {
23
28
  [K in keyof T as K extends string ? K : never]: true | DotNotation<S>;
@@ -42,8 +47,8 @@ export type Callback = () => void;
42
47
  export type RNStyle = ViewStyle & TextStyle & ImageStyle;
43
48
  /******************************** Globals ********************************/
44
49
  export interface ColorScheme {
45
- get: () => ColorSchemeName;
46
- set: (value: ColorSchemeName) => void;
50
+ get: () => ColorSchemeName | null | undefined;
51
+ set: (value: ColorSchemeName | null | undefined) => void;
47
52
  }
48
53
  export {};
49
54
  //# sourceMappingURL=runtime.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.types.d.ts","sourceRoot":"","sources":["../../../../src/runtime.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,aA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AC;AAEjC,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,cAAc,IAAI,WAAW,CAC3E,cAAc,CAAC,CAAC,CAAC,CAClB,CAAC;AAEF,gFAAgF;AAEhF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAExD,CAAC,CAAC,EAAE,KAAK,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,SAAS,GACT,IAAI,GACJ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAC9C,CAAC,MAAM,OAAO,CAAC,CAAC;AAEpB,gFAAgF;AAEhF,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAC3D,MAAM,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC;AAClC,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzD,iFAAiF;AAEjF,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,GAAG,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CAC1D"}
@@ -1,3 +1,4 @@
1
+ import type { Component, ReactElement } from "react";
1
2
  type Falsy = undefined | null | false | "";
2
3
  type RegisteredStyle<T> = number & {
3
4
  __registeredStyleBrand: T;
@@ -10,7 +11,7 @@ type UnwrapRecursiveArray<T, Depth extends unknown[] = [], MaxDepth extends numb
10
11
  type RemoveFalsy<T> = Exclude<T, Falsy>;
11
12
  type RemoveRegisteredStyle<T> = T extends RegisteredStyle<any> ? never : T;
12
13
  type ExtractStyleObject<T> = RemoveRegisteredStyle<RemoveFalsy<UnwrapRecursiveArray<T extends StyleProp<infer U> ? U : T>>>;
13
- type IsPlainObject<T> = T extends object ? T extends Function ? false : T extends readonly any[] ? false : true : false;
14
+ type IsPlainObject<T> = T extends object ? T extends Function | Component | ReactElement ? false : T extends readonly any[] ? false : true : false;
14
15
  type Split<T extends string, Delimiter extends string> = T extends `${infer Head}${Delimiter}${infer Tail}` ? [Head, ...Split<Tail, Delimiter>] : [T];
15
16
  type ParsePath<T extends string> = T extends `${infer Head}[${number}]${infer Rest}` ? [Head, number, ...ParsePath<Rest extends `.${infer R}` ? R : Rest>] : Split<T, ".">;
16
17
  type ResolvePath<T, Parts extends readonly any[]> = Parts extends [
@@ -1 +1 @@
1
- {"version":3,"file":"dot-notation.types.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/dot-notation.types.ts"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;AAC3C,KAAK,eAAe,CAAC,CAAC,IAAI,MAAM,GAAG;IAAE,sBAAsB,EAAE,CAAC,CAAA;CAAE,CAAC;AAEjE,KAAK,SAAS,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,GACT,IAAI,GACJ,MAAM,GACN,KAAK,GACL,IAAI,CAAC;AAET,UAAU,cAAc,CAAC,CAAC,CACxB,SAAQ,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;CAAG;AAE5D,MAAM,MAAM,SAAS,CAAC,CAAC,IACnB,CAAC,GACD,eAAe,CAAC,CAAC,CAAC,GAClB,cAAc,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAC9C,KAAK,CAAC;AAKV,KAAK,oBAAoB,CACvB,CAAC,EACD,KAAK,SAAS,OAAO,EAAE,GAAG,EAAE,EAC5B,QAAQ,SAAS,MAAM,GAAG,EAAE,IAC1B,KAAK,CAAC,QAAQ,CAAC,SAAS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,IAAI,SAAS,MAAM,IAAI,WAAW,CAC9D,CAAC,EACD,SAAS,CAAC,IAAI,CAAC,CAChB,CAAC"}
@@ -1,4 +1,4 @@
1
- export * from "./specificity";
2
- export * from "./style-descriptor";
3
- export * from "./dot-notation.types";
1
+ export * from "./specificity.js";
2
+ export * from "./style-descriptor.js";
3
+ export * from "./dot-notation.types.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAe,CAAC;AAC9B,cAAc,uBAAoB,CAAC;AACnC,cAAc,yBAAsB,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { SpecificityArray, StyleRule } from "../compiler";
2
- import type { InlineStyleRecord } from "../runtime.types";
1
+ import type { SpecificityArray, StyleRule } from "../compiler/index.js";
2
+ import type { InlineStyleRecord } from "../runtime.types.js";
3
3
  export declare const Specificity: {
4
4
  Order: number;
5
5
  ClassName: number;
@@ -1 +1 @@
1
- {"version":3,"file":"specificity.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/specificity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,eAAO,MAAM,WAAW;;;;;;;CASvB,CAAC;AAQF,eAAO,MAAM,iBAAiB,EAAE,gBAAqB,CAAC;AAGtD,eAAO,MAAM,oBAAoB,GAC/B,GAAG,SAAS,GAAG,iBAAiB,EAChC,GAAG,SAAS,GAAG,iBAAiB,WAkBjC,CAAC"}
1
+ {"version":3,"file":"specificity.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/specificity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,sBAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAkB,CAAC;AAE1D,eAAO,MAAM,WAAW;;;;;;;CASvB,CAAC;AAQF,eAAO,MAAM,iBAAiB,EAAE,gBAAqB,CAAC;AAGtD,eAAO,MAAM,oBAAoB,GAC/B,GAAG,SAAS,GAAG,iBAAiB,EAChC,GAAG,SAAS,GAAG,iBAAiB,WAkBjC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { StyleDescriptor, StyleFunction } from "react-native-css/compiler";
2
2
  export declare function isStyleDescriptorArray(value: unknown): value is StyleDescriptor[];
3
- export declare function isStyleFunction(value: StyleDescriptor): value is StyleFunction;
3
+ export declare function isStyleFunction(value: unknown): value is StyleFunction;
4
4
  //# sourceMappingURL=style-descriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style-descriptor.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/style-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,EAAE,CAO5B;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,eAAe,GACrB,KAAK,IAAI,aAAa,CAQxB"}
1
+ {"version":3,"file":"style-descriptor.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/style-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,EAAE,CAE5B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAUtE"}
@@ -1,7 +1,7 @@
1
- import { type ComponentPropsWithRef, type PropsWithChildren } from "react";
2
- import type { ColorScheme, Props, StyledConfiguration, StyledOptions, StyledProps } from "react-native-css";
3
- import type { ReactComponent } from "../runtime.types";
4
- export declare const styled: <const C extends ReactComponent, const M extends StyledConfiguration<C>>(baseComponent: C, mapping?: M, _options?: StyledOptions) => (props: StyledProps<ComponentPropsWithRef<C>, M>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
1
+ import { type PropsWithChildren } from "react";
2
+ import type { ColorScheme, Props, StyledConfiguration } from "react-native-css";
3
+ import type { ReactComponent, Styled } from "../runtime.types.js";
4
+ export declare const styled: Styled;
5
5
  export declare const useCssElement: <C extends ReactComponent>(component: C, incomingProps: Props, mapping: StyledConfiguration<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
6
6
  export declare const colorScheme: ColorScheme;
7
7
  /**
@@ -10,7 +10,7 @@ export declare const colorScheme: ColorScheme;
10
10
  export declare function vars(variables: Record<string, string | number>): Record<string, string>;
11
11
  export declare function VariableContextProvider(props: PropsWithChildren<{
12
12
  value: Record<`--${string}`, string | number>;
13
- }>): import("react/jsx-runtime").JSX.Element;
13
+ }>): import("react").JSX.Element;
14
14
  export declare const useNativeVariable: () => never;
15
15
  export declare const useUnstableNativeVariable: () => never;
16
16
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/web/api.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,mBAAmB,EACnB,aAAa,EACb,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,eAAO,MAAM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AAEF,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,0BAW9D;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;CAAE,CAAC,+BAe5E;AAED,eAAO,MAAM,iBAAiB,aAE7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAErC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"assign-style.d.ts","sourceRoot":"","sources":["../../../../../src/web/assign-style.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,uBAqB3B"}
1
+ {"version":3,"file":"assign-style.d.ts","sourceRoot":"","sources":["../../../../../src/web/assign-style.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,uBAsB3B"}
@@ -1,4 +1,4 @@
1
- import "./metro";
2
- export type * from "../runtime.types";
3
- export * from "./api";
1
+ import "./metro.js";
2
+ export type * from "../runtime.types.js";
3
+ export * from "./api.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,CAAC;AAEjB,mBAAmB,kBAAkB,CAAC;AACtC,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/index.ts"],"names":[],"mappings":"AACA,OAAO,YAAS,CAAC;AAEjB,mBAAmB,qBAAkB,CAAC;AACtC,cAAc,UAAO,CAAC"}
package/node/babel.mjs ADDED
@@ -0,0 +1,4 @@
1
+ // Preserve the callable default export when Node loads the preset as ESM.
2
+ import implementation from "../dist/commonjs/babel/index.js";
3
+
4
+ export default implementation.default;
@@ -0,0 +1,2 @@
1
+ // Node ESM entry for the CommonJS tooling implementation.
2
+ export { compile } from "../dist/commonjs/compiler/index.js";
package/node/metro.mjs ADDED
@@ -0,0 +1,2 @@
1
+ // Node ESM entry for the CommonJS tooling implementation.
2
+ export { withReactNativeCSS } from "../dist/commonjs/metro/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-css",
3
- "version": "3.0.6",
3
+ "version": "3.1.0-rc.0",
4
4
  "description": "Use CSS stylesheets in React Native",
5
5
  "exports": {
6
6
  ".": {
@@ -18,7 +18,7 @@
18
18
  "source": "./src/compiler/index.ts",
19
19
  "import": {
20
20
  "types": "./dist/typescript/module/src/compiler/index.d.ts",
21
- "default": "./dist/module/compiler/index.js"
21
+ "default": "./node/compiler.mjs"
22
22
  },
23
23
  "require": {
24
24
  "types": "./dist/typescript/commonjs/src/compiler/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "source": "./src/babel/index.ts",
30
30
  "import": {
31
31
  "types": "./dist/typescript/module/src/babel/index.d.ts",
32
- "default": "./dist/module/babel/index.js"
32
+ "default": "./node/babel.mjs"
33
33
  },
34
34
  "require": {
35
35
  "types": "./dist/typescript/commonjs/src/babel/index.d.ts",
@@ -59,6 +59,30 @@
59
59
  "default": "./dist/commonjs/components/react-native-safe-area-context.js"
60
60
  }
61
61
  },
62
+ "./components/copyComponentProperties": {
63
+ "source": "./src/components/copyComponentProperties.ts",
64
+ "react-native": "./src/components/copyComponentProperties.ts",
65
+ "import": {
66
+ "types": "./dist/typescript/module/src/components/copyComponentProperties.d.ts",
67
+ "default": "./dist/module/components/copyComponentProperties.js"
68
+ },
69
+ "require": {
70
+ "types": "./dist/typescript/commonjs/src/components/copyComponentProperties.d.ts",
71
+ "default": "./dist/commonjs/components/copyComponentProperties.js"
72
+ }
73
+ },
74
+ "./components/index": {
75
+ "source": "./src/components/index.cts",
76
+ "import": {
77
+ "default": "./dist/module/components/index.cjs",
78
+ "types": "./dist/typescript/module/src/components/index.d.ts"
79
+ },
80
+ "require": {
81
+ "default": "./dist/commonjs/components/index.cjs",
82
+ "types": "./dist/typescript/commonjs/src/components/index.d.ts"
83
+ },
84
+ "react-native": "./src/components/index.cts"
85
+ },
62
86
  "./components/*": {
63
87
  "source": "./src/components/*.tsx",
64
88
  "react-native": "./src/components/*.tsx",
@@ -87,7 +111,7 @@
87
111
  "source": "./src/metro/index.ts",
88
112
  "import": {
89
113
  "types": "./dist/typescript/module/src/metro/index.d.ts",
90
- "default": "./dist/module/metro/index.js"
114
+ "default": "./node/metro.mjs"
91
115
  },
92
116
  "require": {
93
117
  "types": "./dist/typescript/commonjs/src/metro/index.d.ts",
@@ -164,7 +188,7 @@
164
188
  "start": "yarn example start",
165
189
  "start:build": "yarn build && yarn example build",
166
190
  "start:debug": "yarn build && yarn example debug",
167
- "test": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --experimental-vm-modules\" jest",
191
+ "test": "jest",
168
192
  "typecheck": "tsc --noEmit"
169
193
  },
170
194
  "keywords": [
@@ -191,15 +215,18 @@
191
215
  "files": [
192
216
  "src",
193
217
  "dist",
218
+ "node",
194
219
  "types.d.ts",
195
220
  "!**/__tests__",
196
221
  "!**/__fixtures__",
197
- "!**/__mocks__"
222
+ "!**/__mocks__",
223
+ "!**/*.test.*",
224
+ "!**/*.spec.*"
198
225
  ],
199
226
  "dependencies": {
200
227
  "@types/debug": "^4.1.12",
201
228
  "babel-plugin-react-compiler": "^19.1.0-rc.2",
202
- "colorjs.io": "0.6.0-alpha.1",
229
+ "colorjs.io": "0.7.0",
203
230
  "comment-json": "^4.2.5",
204
231
  "debug": "^4.4.1"
205
232
  },
@@ -210,46 +237,48 @@
210
237
  "react-native": ">=0.81"
211
238
  },
212
239
  "devDependencies": {
213
- "@babel/core": "^7.28.0",
214
- "@commitlint/config-conventional": "^19.8.1",
215
- "@eslint/js": "^9.30.1",
216
- "@expo/metro-config": "~54.0.5",
240
+ "@babel/core": "^7.29.0",
241
+ "@commitlint/config-conventional": "^20.5.0",
242
+ "@eslint/js": "^10.0.1",
243
+ "@expo/metro-config": "57.0.12",
217
244
  "@ianvs/prettier-plugin-sort-imports": "^4.4.2",
245
+ "@react-native/jest-preset": "0.86.3",
246
+ "@react-native/metro-config": "0.86.3",
218
247
  "@release-it/conventional-changelog": "10.0.1",
219
248
  "@tailwindcss/postcss": "^4.1.12",
220
249
  "@testing-library/react-native": "^13.3.3",
221
250
  "@tsconfig/react-native": "^3.0.6",
222
251
  "@types/babel__core": "^7",
223
252
  "@types/jest": "^30.0.0",
224
- "@types/react": "^19.1.10",
253
+ "@types/react": "~19.2.0",
225
254
  "@types/react-test-renderer": "^19",
226
255
  "babel-plugin-tester": "^12.0.0",
227
- "babel-preset-expo": "~54.0.3",
256
+ "babel-preset-expo": "57.0.11",
228
257
  "commitlint": "^20.0.0",
229
258
  "eas-build-cache-provider": "^16.4.2",
230
259
  "eslint": "^9.30.1",
231
260
  "eslint-config-prettier": "^10.1.5",
232
261
  "eslint-plugin-prettier": "^5.5.1",
233
- "expo": "54.0.10",
262
+ "expo": "57.0.22",
234
263
  "jest": "^29.7.0",
235
- "jest-expo": "~54.0.12",
236
- "lefthook": "^1.12.3",
264
+ "jest-expo": "57.0.5",
265
+ "lefthook": "^2.1.5",
237
266
  "lightningcss": "^1.30.1",
238
- "metro-runtime": "^0.83.0",
267
+ "metro-runtime": "^0.84.2",
239
268
  "postcss": "^8.5.6",
240
269
  "prettier": "^3.6.2",
241
- "react": "19.1.0",
242
- "react-native": "0.81.4",
243
- "react-native-builder-bob": "^0.40.13",
244
- "react-native-reanimated": "~4.1.0",
245
- "react-native-safe-area-context": "5.6.1",
246
- "react-native-worklets": "~0.5.0",
270
+ "react": "19.2.3",
271
+ "react-native": "0.86.3",
272
+ "react-native-builder-bob": "^0.43.0",
273
+ "react-native-reanimated": "4.5.1",
274
+ "react-native-safe-area-context": "~5.7.0",
275
+ "react-native-worklets": "0.10.1",
247
276
  "react-refresh": "^0.17.0",
248
- "react-test-renderer": "19.1.0",
249
- "release-it": "^19.0.4",
277
+ "react-test-renderer": "19.2.3",
278
+ "release-it": "^20.2.1",
250
279
  "tailwindcss": "^4.1.12",
251
280
  "tailwindcss-safe-area": "^1.1.0",
252
- "typescript": "^5.9.2",
281
+ "typescript": "~6.0.3",
253
282
  "typescript-eslint": "^8.40.0"
254
283
  },
255
284
  "react-native-builder-bob": {
@@ -268,7 +297,12 @@
268
297
  "esm": true
269
298
  }
270
299
  ],
271
- "typescript"
300
+ [
301
+ "typescript",
302
+ {
303
+ "project": "tsconfig.build.json"
304
+ }
305
+ ]
272
306
  ]
273
307
  },
274
308
  "packageManager": "yarn@4.9.2",
@@ -1,4 +1,4 @@
1
- import { resolve } from "path";
1
+ import { basename, dirname, resolve, sep } from "path";
2
2
 
3
3
  import { type PluginObj } from "@babel/core";
4
4
  import type { Statement } from "@babel/types";
@@ -16,6 +16,7 @@ import {
16
16
  import {
17
17
  handleReactNativeWebIdentifierRequire,
18
18
  handleReactNativeWebImport,
19
+ handleReactNativeWebInteropRequireDefault,
19
20
  handleReactNativeWebObjectPatternRequire,
20
21
  } from "./react-native-web";
21
22
 
@@ -26,8 +27,12 @@ export default function ({
26
27
  }): PluginObj<PluginState> {
27
28
  const processed = new WeakSet();
28
29
 
29
- const thisModuleDist = resolve(__dirname, "../../../dist");
30
- const thisModuleSrc = resolve(__dirname, "../../../src");
30
+ const packageRoot = resolve(
31
+ __dirname,
32
+ basename(dirname(__dirname)) === "src" ? "../.." : "../../..",
33
+ );
34
+ const thisModuleDist = resolve(packageRoot, "dist") + sep;
35
+ const thisModuleSrc = resolve(packageRoot, "src") + sep;
31
36
 
32
37
  function isFromThisModule(filename: string): boolean {
33
38
  return (
@@ -94,6 +99,11 @@ export default function ({
94
99
  return;
95
100
  }
96
101
 
102
+ // A local function called require is not the module loader.
103
+ if (path.scope.getBinding("require")) {
104
+ return;
105
+ }
106
+
97
107
  const initArg = init.arguments.at(0);
98
108
 
99
109
  if (!initArg) {
@@ -152,10 +162,11 @@ export default function ({
152
162
  if (!source) {
153
163
  return;
154
164
  }
155
- statements = handleReactNativeWebIdentifierRequire(
165
+ statements = handleReactNativeWebInteropRequireDefault(
156
166
  path,
157
167
  t,
158
168
  id.name,
169
+ init,
159
170
  source,
160
171
  state.filename,
161
172
  );
@@ -1,7 +1,8 @@
1
- import { resolve } from "path";
1
+ import { dirname, resolve } from "path";
2
2
 
3
3
  import { type NodePath } from "@babel/traverse";
4
4
  import tBabelTypes, {
5
+ type CallExpression,
5
6
  type ImportDeclaration,
6
7
  type ObjectPattern,
7
8
  type Statement,
@@ -14,7 +15,7 @@ type BabelTypes = typeof tBabelTypes;
14
15
 
15
16
  function parseReactNativeWebSource(source: string, filename: string) {
16
17
  if (source.startsWith(".")) {
17
- source = resolve(filename, source);
18
+ source = resolve(dirname(filename), source);
18
19
 
19
20
  const internalPath = source.split("react-native-web/dist")[1];
20
21
  if (!internalPath) {
@@ -48,6 +49,7 @@ export function handleReactNativeWebImport(
48
49
  filename: string,
49
50
  ): Statement[] | undefined {
50
51
  const { specifiers, source } = declaration;
52
+ if (declaration.importKind && declaration.importKind !== "value") return;
51
53
 
52
54
  const rnwSource = parseReactNativeWebSource(source.value, filename);
53
55
  if (!rnwSource) {
@@ -76,7 +78,7 @@ export function handleReactNativeWebImport(
76
78
  } else {
77
79
  statements.push(
78
80
  t.importDeclaration(
79
- [t.importSpecifier(specifier.local, specifier.local)],
81
+ [t.importSpecifier(specifier.local, t.identifier(name))],
80
82
  t.stringLiteral(`react-native-css/components/${name}`),
81
83
  ),
82
84
  );
@@ -89,6 +91,10 @@ export function handleReactNativeWebImport(
89
91
  ),
90
92
  );
91
93
  } else {
94
+ if (specifier.importKind && specifier.importKind !== "value") {
95
+ statements.push(t.importDeclaration([specifier], source));
96
+ continue;
97
+ }
92
98
  const localName = t.isStringLiteral(specifier.imported)
93
99
  ? specifier.imported.value
94
100
  : specifier.imported.name;
@@ -158,6 +164,28 @@ export function handleReactNativeWebIdentifierRequire(
158
164
  }
159
165
  }
160
166
 
167
+ export function handleReactNativeWebInteropRequireDefault(
168
+ path: NodePath<VariableDeclaration>,
169
+ t: BabelTypes,
170
+ id: string,
171
+ init: CallExpression,
172
+ source: string,
173
+ filename: string,
174
+ ) {
175
+ const parsed = parseReactNativeWebSource(source, filename);
176
+ if (!parsed) return;
177
+
178
+ const wrapped = t.cloneNode(init);
179
+ wrapped.arguments = [
180
+ t.callExpression(t.identifier("require"), [t.stringLiteral(parsed.source)]),
181
+ ];
182
+ return [
183
+ t.variableDeclaration(path.node.kind, [
184
+ t.variableDeclarator(t.identifier(id), wrapped),
185
+ ]),
186
+ ];
187
+ }
188
+
161
189
  export function handleReactNativeWebObjectPatternRequire(
162
190
  path: NodePath<VariableDeclaration>,
163
191
  t: BabelTypes,
@@ -180,6 +208,7 @@ export function handleReactNativeWebObjectPatternRequire(
180
208
  // We need to exit as we do not handle `const { Text, ...rest } = require('react-native-web');`
181
209
  return;
182
210
  } else if (
211
+ identifier.computed ||
183
212
  !(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))
184
213
  ) {
185
214
  // Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native-web');`
@@ -48,6 +48,7 @@ export function handleReactNativeImport(
48
48
  filename: string,
49
49
  ): Statement[] | undefined {
50
50
  const { specifiers, source } = declaration;
51
+ if (declaration.importKind && declaration.importKind !== "value") return;
51
52
 
52
53
  const rnwSource = parseReactNativeSource(source.value, filename);
53
54
  if (!rnwSource) {
@@ -76,7 +77,7 @@ export function handleReactNativeImport(
76
77
  } else {
77
78
  statements.push(
78
79
  t.importDeclaration(
79
- [t.importSpecifier(specifier.local, specifier.local)],
80
+ [t.importSpecifier(specifier.local, t.identifier(name))],
80
81
  t.stringLiteral(`react-native-css/components/${name}`),
81
82
  ),
82
83
  );
@@ -89,6 +90,10 @@ export function handleReactNativeImport(
89
90
  ),
90
91
  );
91
92
  } else {
93
+ if (specifier.importKind && specifier.importKind !== "value") {
94
+ statements.push(t.importDeclaration([specifier], source));
95
+ continue;
96
+ }
92
97
  const localName = t.isStringLiteral(specifier.imported)
93
98
  ? specifier.imported.value
94
99
  : specifier.imported.name;
@@ -180,6 +185,7 @@ export function handleReactNativeObjectPatternRequire(
180
185
  // We need to exit as we do not handle `const { Text, ...rest } = require('react-native');`
181
186
  return;
182
187
  } else if (
188
+ identifier.computed ||
183
189
  !(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))
184
190
  ) {
185
191
  // Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native');`
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ Declaration,
2
3
  DeclarationBlock,
3
4
  ParsedComponent,
4
5
  Rule,
@@ -99,6 +100,49 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
99
100
  return mapping;
100
101
  }
101
102
 
103
+ const mappingProperty = "-rn-native-mapping";
104
+
105
+ export function isMappingProperty(name: string) {
106
+ return name === mappingProperty || name.startsWith(`${mappingProperty}-`);
107
+ }
108
+
109
+ /** Declaration metadata survives the optimizer flattening nested at rules. */
110
+ export function parsePropDeclarations(declarations: Declaration[] = []) {
111
+ const mapping: StyleRuleMapping = {};
112
+ for (const declaration of declarations) {
113
+ if (
114
+ declaration.property !== "custom" ||
115
+ !isMappingProperty(declaration.value.name)
116
+ ) {
117
+ continue;
118
+ }
119
+ const { name, value } = declaration.value;
120
+ const target = value.filter(
121
+ (item): item is Extract<TokenOrValue, { type: "token" }> =>
122
+ item.type === "token" && item.value.type !== "white-space",
123
+ );
124
+ if (target.length === 0) continue;
125
+ nativeMappingAtRuleBlock(
126
+ [
127
+ {
128
+ type: "token",
129
+ value: {
130
+ type: "ident",
131
+ value:
132
+ name === mappingProperty
133
+ ? "*"
134
+ : name.slice(mappingProperty.length + 1),
135
+ },
136
+ },
137
+ { type: "token", value: { type: "colon" } },
138
+ ...target,
139
+ ],
140
+ mapping,
141
+ );
142
+ }
143
+ return mapping;
144
+ }
145
+
102
146
  function nativeMappingAtRuleBlock(
103
147
  token: Extract<TokenOrValue, { type: "token" }>[],
104
148
  mapping: StyleRuleMapping = {},