react-native-css 0.0.0-nightly.d11bf3f → 0.0.0-nightly.d6f42ab
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.
- package/dist/commonjs/compiler/atRules.js +30 -16
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +29 -19
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +10 -10
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/keyframes.js +1 -1
- package/dist/commonjs/compiler/keyframes.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +40 -0
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +3 -2
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +5 -7
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/components/ActivityIndicator.js +6 -6
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
- package/dist/commonjs/components/Button.js +6 -6
- package/dist/commonjs/components/Button.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +10 -9
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/Image.js +6 -6
- package/dist/commonjs/components/Image.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +22 -0
- package/dist/commonjs/components/ImageBackground.js.map +1 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js +19 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/commonjs/components/Pressable.js +17 -0
- package/dist/commonjs/components/Pressable.js.map +1 -0
- package/dist/commonjs/components/ScrollView.js +18 -0
- package/dist/commonjs/components/ScrollView.js.map +1 -0
- package/dist/commonjs/components/Switch.js +6 -6
- package/dist/commonjs/components/Switch.js.map +1 -1
- package/dist/commonjs/components/Text.js +6 -6
- package/dist/commonjs/components/Text.js.map +1 -1
- package/dist/commonjs/components/TextInput.js +12 -7
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/TouchableHighlight.js +17 -0
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -0
- package/dist/commonjs/components/TouchableOpacity.js +17 -0
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js +17 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/commonjs/components/View.js +6 -6
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/components/VirtualizedList.js +20 -0
- package/dist/commonjs/components/VirtualizedList.js.map +1 -0
- package/dist/commonjs/components/copyComponentProperties.js +19 -0
- package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
- package/dist/commonjs/components/index.cjs +265 -0
- package/dist/commonjs/components/index.cjs.map +1 -0
- package/dist/commonjs/components/index.js +65 -1
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/index.js +0 -11
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/jest/index.js +1 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +7 -117
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +8 -1
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/{native/metro.js → metro/override.js} +1 -1
- package/dist/commonjs/{native/metro.js.map → metro/override.js.map} +1 -1
- package/dist/commonjs/metro/resolver.js +15 -22
- package/dist/commonjs/metro/resolver.js.map +1 -1
- package/dist/commonjs/native/api.js +5 -1
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/index.js +8 -8
- package/dist/commonjs/native/index.js.map +1 -1
- package/dist/commonjs/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
- package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
- package/dist/commonjs/native/styles/calculate-props.js +1 -1
- package/dist/commonjs/native/styles/resolve.js +0 -1
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/web/api.js +5 -2
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/module/compiler/atRules.js +30 -16
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +25 -15
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/declarations.js +10 -10
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/keyframes.js +1 -1
- package/dist/module/compiler/keyframes.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +36 -0
- package/dist/module/compiler/lightningcss-loader.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +3 -2
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +5 -7
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/components/ActivityIndicator.js +4 -3
- package/dist/module/components/ActivityIndicator.js.map +1 -1
- package/dist/module/components/Button.js +4 -3
- package/dist/module/components/Button.js.map +1 -1
- package/dist/module/components/FlatList.js +8 -6
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/Image.js +4 -3
- package/dist/module/components/Image.js.map +1 -1
- package/dist/module/components/ImageBackground.js +18 -0
- package/dist/module/components/ImageBackground.js.map +1 -0
- package/dist/module/components/KeyboardAvoidingView.js +15 -0
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/module/components/Pressable.js +13 -0
- package/dist/module/components/Pressable.js.map +1 -0
- package/dist/module/components/ScrollView.js +14 -0
- package/dist/module/components/ScrollView.js.map +1 -0
- package/dist/module/components/Switch.js +4 -3
- package/dist/module/components/Switch.js.map +1 -1
- package/dist/module/components/Text.js +4 -3
- package/dist/module/components/Text.js.map +1 -1
- package/dist/module/components/TextInput.js +10 -4
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/TouchableHighlight.js +13 -0
- package/dist/module/components/TouchableHighlight.js.map +1 -0
- package/dist/module/components/TouchableOpacity.js +13 -0
- package/dist/module/components/TouchableOpacity.js.map +1 -0
- package/dist/module/components/TouchableWithoutFeedback.js +13 -0
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/module/components/View.js +4 -3
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/components/VirtualizedList.js +16 -0
- package/dist/module/components/VirtualizedList.js.map +1 -0
- package/dist/module/components/copyComponentProperties.js +15 -0
- package/dist/module/components/copyComponentProperties.js.map +1 -0
- package/dist/module/components/index.cjs +265 -0
- package/dist/module/components/index.cjs.map +1 -0
- package/dist/module/components/index.js +8 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/jest/index.js +1 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +7 -116
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +8 -1
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/override.js +4 -0
- package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
- package/dist/module/metro/resolver.js +15 -22
- package/dist/module/metro/resolver.js.map +1 -1
- package/dist/module/native/api.js +4 -1
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/index.js +1 -1
- package/dist/module/native/index.js.map +1 -1
- package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
- package/dist/module/native/react-native-css-metro-override.js.map +1 -0
- package/dist/module/native/styles/calculate-props.js +1 -1
- package/dist/module/native/styles/resolve.js +0 -1
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +4 -1
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/web/api.js +5 -2
- package/dist/module/web/api.js.map +1 -1
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
- package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -1
- package/dist/typescript/commonjs/example/index.d.ts +2 -0
- package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +2 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -11
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Button.d.ts +2 -11
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +4 -8
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Image.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
- package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
- package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/index.d.ts +0 -1
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +2 -2
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/eslint.config.d.mts +2 -0
- package/dist/typescript/module/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/example/app.config.d.ts.map +1 -1
- package/dist/typescript/module/example/index.d.ts +2 -0
- package/dist/typescript/module/example/index.d.ts.map +1 -0
- package/dist/typescript/module/example/metro.config.d.ts +3 -0
- package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/module/example/postcss.config.d.mts +7 -0
- package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +2 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -11
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Button.d.ts +2 -11
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts +4 -8
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Image.d.ts +2 -6
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts +4 -0
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +4 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Pressable.d.ts +4 -0
- package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts +4 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Switch.d.ts +2 -6
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Text.d.ts +2 -6
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TextInput.d.ts +2 -6
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +2 -6
- package/dist/typescript/module/src/components/View.d.ts.map +1 -1
- package/dist/typescript/module/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
- package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.cts +2 -0
- package/dist/typescript/module/src/components/index.d.cts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +8 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/index.d.ts +0 -1
- package/dist/typescript/module/src/index.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/override.d.ts +2 -0
- package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/module/src/native/api.d.ts +1 -1
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +1 -1
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +2 -2
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/package.json +16 -18
- package/src/compiler/atRules.ts +30 -17
- package/src/compiler/compiler.ts +27 -16
- package/src/compiler/declarations.ts +10 -10
- package/src/compiler/keyframes.ts +2 -2
- package/src/compiler/lightningcss-loader.ts +40 -0
- package/src/compiler/selector-builder.ts +6 -2
- package/src/compiler/stylesheet.ts +5 -7
- package/src/components/ActivityIndicator.tsx +11 -8
- package/src/components/Button.tsx +11 -6
- package/src/components/FlatList.tsx +20 -10
- package/src/components/Image.tsx +11 -6
- package/src/components/ImageBackground.tsx +30 -0
- package/src/components/KeyboardAvoidingView.tsx +27 -0
- package/src/components/Pressable.tsx +22 -0
- package/src/components/ScrollView.tsx +23 -0
- package/src/components/Switch.tsx +9 -4
- package/src/components/Text.tsx +9 -4
- package/src/components/TextInput.tsx +17 -7
- package/src/components/TouchableHighlight.tsx +25 -0
- package/src/components/TouchableOpacity.tsx +25 -0
- package/src/components/TouchableWithoutFeedback.tsx +25 -0
- package/src/components/View.tsx +9 -4
- package/src/components/VirtualizedList.tsx +37 -0
- package/src/components/copyComponentProperties.ts +21 -0
- package/src/components/index.cts +263 -0
- package/src/components/index.ts +17 -0
- package/src/index.ts +0 -2
- package/src/jest/index.ts +2 -1
- package/src/metro/index.ts +7 -165
- package/src/metro/metro-transformer.ts +15 -1
- package/src/metro/override.ts +1 -0
- package/src/metro/resolver.ts +29 -28
- package/src/native/api.tsx +6 -2
- package/src/native/index.ts +1 -2
- package/src/native/styles/calculate-props.ts +1 -1
- package/src/native/styles/resolve.ts +0 -1
- package/src/native/styles/shorthands/animation.ts +10 -2
- package/src/utilities/dot-notation.types.ts +10 -3
- package/src/web/api.tsx +9 -4
- package/dist/commonjs/poison.pill.js.map +0 -1
- package/dist/commonjs/runtime/native/injection.js +0 -2
- package/dist/commonjs/runtime/native/injection.js.map +0 -1
- package/dist/module/native/metro.js +0 -5
- package/dist/module/poison.pill.js.map +0 -1
- package/dist/module/runtime/native/injection.js +0 -2
- package/dist/module/runtime/native/injection.js.map +0 -1
- package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
- package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/module/src/native/metro.d.ts +0 -2
- package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
- package/dist/typescript/module/src/poison.pill.d.ts +0 -2
- package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
- package/src/components/index.tsx +0 -10
- package/src/native/metro.ts +0 -2
- package/src/runtime/native/injection.ts +0 -0
- /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TouchableHighlightProps } from "react-native";
|
|
2
|
+
export declare const TouchableHighlight: import("react").ForwardRefExoticComponent<TouchableHighlightProps & import("react").RefAttributes<import("react-native").View>>;
|
|
3
|
+
export default TouchableHighlight;
|
|
4
|
+
//# sourceMappingURL=TouchableHighlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableHighlight.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AActB,eAAO,MAAM,kBAAkB,iIAK9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TouchableOpacityProps } from "react-native";
|
|
2
|
+
export declare const TouchableOpacity: import("react").ForwardRefExoticComponent<TouchableOpacityProps & import("react").RefAttributes<import("react-native").View>>;
|
|
3
|
+
export default TouchableOpacity;
|
|
4
|
+
//# sourceMappingURL=TouchableOpacity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableOpacity.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableOpacity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AActB,eAAO,MAAM,gBAAgB,+HAK5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableWithoutFeedback.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableWithoutFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,IAAI,0BAA0B,EAEvD,MAAM,cAAc,CAAC;AActB,eAAO,MAAM,wBAAwB,mCAKpC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const mapping: {
|
|
4
|
-
className: "style";
|
|
5
|
-
};
|
|
6
|
-
export declare function View(props: StyledProps<ViewProps, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").FunctionComponentElement<import("react").FragmentProps>;
|
|
1
|
+
import { View as RNView } from "react-native";
|
|
2
|
+
export declare const View: typeof RNView;
|
|
7
3
|
export default View;
|
|
8
4
|
//# sourceMappingURL=View.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../../src/components/View.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../../src/components/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,MAAM,EAAkB,MAAM,cAAc,CAAC;AAc9D,eAAO,MAAM,IAAI,eAKhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { VirtualizedList as RNVirtualizedList, type VirtualizedListProps } from "react-native";
|
|
3
|
+
import { type StyledConfiguration, type StyledProps } from "react-native-css";
|
|
4
|
+
export declare const VirtualizedList: typeof RNVirtualizedList & (<ItemT>(props: StyledProps<VirtualizedListProps<ItemT>, StyledConfiguration<typeof RNVirtualizedList>>) => ReactNode);
|
|
5
|
+
export default VirtualizedList;
|
|
6
|
+
//# sourceMappingURL=VirtualizedList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualizedList.d.ts","sourceRoot":"","sources":["../../../../../src/components/VirtualizedList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,eAAe,IAAI,iBAAiB,EACpC,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAW1B,eAAO,MAAM,eAAe,EAOZ,OAAO,iBAAiB,GACtC,CAAC,CAAC,KAAK,EACL,KAAK,EAAE,WAAW,CAChB,oBAAoB,CAAC,KAAK,CAAC,EAC3B,mBAAmB,CAAC,OAAO,iBAAiB,CAAC,CAC9C,KACE,SAAS,CAAC,CAAC;AAElB,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
type AnyComponent = ComponentType<any>;
|
|
3
|
+
export declare function copyComponentProperties<T extends AnyComponent>(BaseComponent: T, Component: AnyComponent): T;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=copyComponentProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyComponentProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/copyComponentProperties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,KAAK,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAEvC,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAC5D,aAAa,EAAE,CAAC,EAChB,SAAS,EAAE,YAAY,GAYQ,CAAC,CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../../src/components/index.cts"],"names":[],"mappings":""}
|
|
@@ -3,8 +3,16 @@ export { ActivityIndicator } from "./ActivityIndicator";
|
|
|
3
3
|
export { Button } from "./Button";
|
|
4
4
|
export { FlatList } from "./FlatList";
|
|
5
5
|
export { Image } from "./Image";
|
|
6
|
+
export { ImageBackground } from "./ImageBackground";
|
|
7
|
+
export { KeyboardAvoidingView } from "./KeyboardAvoidingView";
|
|
8
|
+
export { Pressable } from "./Pressable";
|
|
9
|
+
export { ScrollView } from "./ScrollView";
|
|
6
10
|
export { Switch } from "./Switch";
|
|
7
11
|
export { Text } from "./Text";
|
|
8
12
|
export { TextInput } from "./TextInput";
|
|
13
|
+
export { TouchableHighlight } from "./TouchableHighlight";
|
|
14
|
+
export { TouchableOpacity } from "./TouchableOpacity";
|
|
15
|
+
export { TouchableWithoutFeedback } from "./TouchableWithoutFeedback";
|
|
9
16
|
export { View } from "./View";
|
|
17
|
+
export { VirtualizedList } from "./VirtualizedList";
|
|
10
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/jest/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK1E,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,IAAI,CAAC;QACb,UAAU,QAAQ,CAAC,CAAC;YAClB,mBAAmB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;SACzC;KACF;CACF;AAED,eAAO,MAAM,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/jest/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK1E,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,IAAI,CAAC;QACb,UAAU,QAAQ,CAAC,CAAC;YAClB,mBAAmB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;SACzC;KACF;CACF;AAED,eAAO,MAAM,MAAM,qBAAqB,CAAC;AAezC,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;EAoBpD;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,EACE,KAAoB,EACpB,GAAG,OAAO,EACX,GAAE,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO;;;;;;;EAY1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/metro/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/metro/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAEhE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,mEAAmE;IACnE,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAOD,wBAAgB,kBAAkB,CAChC,CAAC,SAAS,WAAW,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC,EACpD,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,CAAC,CAwDnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metro-transformer.d.ts","sourceRoot":"","sources":["../../../../../src/metro/metro-transformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAO5D,wBAAsB,SAAS,CAC7B,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,GAAG;IAC5B,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CAC9C,GACA,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"metro-transformer.d.ts","sourceRoot":"","sources":["../../../../../src/metro/metro-transformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAO5D,wBAAsB,SAAS,CAC7B,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,GAAG;IAC5B,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CAC9C,GACA,OAAO,CAAC,iBAAiB,CAAC,CAuC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override.d.ts","sourceRoot":"","sources":["../../../../../src/metro/override.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../../src/metro/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AAaxB,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,UAAU,
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../../src/metro/resolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AAaxB,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,UAAU,CAmCZ;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,UAAU,CA+BZ"}
|
|
@@ -10,7 +10,7 @@ export { useNativeCss };
|
|
|
10
10
|
* @param baseComponent
|
|
11
11
|
* @param mapping
|
|
12
12
|
*/
|
|
13
|
-
export declare const styled: <const C extends ReactComponent<any>, const M extends StyledConfiguration<C>>(baseComponent: C, mapping
|
|
13
|
+
export declare const styled: <const C extends ReactComponent<any>, const M extends StyledConfiguration<C>>(baseComponent: C, mapping?: M, options?: StyledOptions) => any;
|
|
14
14
|
export declare const colorScheme: ColorScheme;
|
|
15
15
|
export declare const useUnstableNativeVariable: typeof useNativeVariable;
|
|
16
16
|
export declare const useCssElement: <const C extends ReactComponent<any>, const M extends StyledConfiguration<C>>(component: C, incomingProps: Props, mapping: M) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").FunctionComponentElement<import("react").FragmentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/native/api.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAEL,UAAU,EAGX,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,eAAe,EACf,eAAe,EACf,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/native/api.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,KAAK,EACV,WAAW,EACX,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAEL,UAAU,EAGX,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,eAAe,EACf,eAAe,EACf,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,CAAC;AAMxB;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GACjB,KAAK,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,CAAC,EAEtC,eAAe,CAAC,EAChB,UAAS,CAAuB,EAChC,UAAU,aAAa,QAoBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,0BAAoB,CAAC;AAE3D,eAAO,MAAM,aAAa,GACxB,KAAK,CAAC,CAAC,SAAS,cAAc,CAAC,GAAG,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,CAAC,EAEtC,WAAW,CAAC,EACZ,eAAe,KAAK,EACpB,SAAS,CAAC,qKAIX,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,OAkB7C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;;;;EAO9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/native/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/native/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,mBAAmB,kBAAkB,CAAC;AACtC,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-native-css-metro-override.d.ts","sourceRoot":"","sources":["../../../../../src/native/react-native-css-metro-override.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/resolve.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQxD,MAAM,MAAM,kBAAkB,GAAG,CAC/B,KAAK,EAAE,eAAe,EACtB,WAAW,CAAC,EAAE,OAAO,KAClB,OAAO,CAAC;AAEb,MAAM,MAAM,qBAAqB,GAAG,CAClC,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC;AAEb,MAAM,MAAM,aAAa,GAAG,CAC1B,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../../../src/native/styles/resolve.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQxD,MAAM,MAAM,kBAAkB,GAAG,CAC/B,KAAK,EAAE,eAAe,EACtB,WAAW,CAAC,EAAE,OAAO,KAClB,OAAO,CAAC;AAEb,MAAM,MAAM,qBAAqB,GAAG,CAClC,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC;AAEb,MAAM,MAAM,aAAa,GAAG,CAC1B,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC;AAYb,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,eAAe,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IAC7C,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;CACxC,CAAC;AAEF,wBAAgB,YAAY,CAC1B,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,GAC3B,GAAG,CA8FL"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { StyleFunctionResolver } from "../resolve";
|
|
2
2
|
export declare const animationShorthand: import("../resolve").StyleResolver;
|
|
3
3
|
export declare const animation: StyleFunctionResolver;
|
|
4
|
+
export declare const animationName: StyleFunctionResolver;
|
|
4
5
|
//# sourceMappingURL=animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../../../../../src/native/styles/shorthands/animation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAgCxD,eAAO,MAAM,kBAAkB,oCAuB9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../../../../../src/native/styles/shorthands/animation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAgCxD,eAAO,MAAM,kBAAkB,oCAuB9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,qBA2DvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,qBAQ3B,CAAC"}
|
|
@@ -6,7 +6,7 @@ type Primitive = string | number | boolean | bigint | symbol | null | undefined
|
|
|
6
6
|
interface RecursiveArray<T> extends Array<T | ReadonlyArray<T> | RecursiveArray<T>> {
|
|
7
7
|
}
|
|
8
8
|
export type StyleProp<T> = T | RegisteredStyle<T> | RecursiveArray<T | RegisteredStyle<T> | Falsy> | Falsy;
|
|
9
|
-
type UnwrapRecursiveArray<T> = T extends (infer I)[] ? UnwrapRecursiveArray<I> : T;
|
|
9
|
+
type UnwrapRecursiveArray<T, Depth extends unknown[] = [], MaxDepth extends number = 10> = Depth["length"] extends MaxDepth ? T : T extends (infer I)[] ? UnwrapRecursiveArray<I, [...Depth, unknown], MaxDepth> : T;
|
|
10
10
|
type RemoveFalsy<T> = Exclude<T, Falsy>;
|
|
11
11
|
type RemoveRegisteredStyle<T> = T extends RegisteredStyle<any> ? never : T;
|
|
12
12
|
type ExtractStyleObject<T> = RemoveRegisteredStyle<RemoveFalsy<UnwrapRecursiveArray<T extends StyleProp<infer U> ? U : T>>>;
|
|
@@ -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,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"dot-notation.types.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/dot-notation.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentPropsWithRef, type PropsWithChildren } from "react";
|
|
2
2
|
import type { ColorScheme, Props, StyledConfiguration, StyledOptions, StyledProps } from "react-native-css";
|
|
3
3
|
import type { ReactComponent } from "../runtime.types";
|
|
4
|
-
export declare const styled: <const C extends ReactComponent, const M extends StyledConfiguration<C>>(baseComponent: C, mapping
|
|
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>>;
|
|
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
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/web/api.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,
|
|
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,MAAM,GACjB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC9B,KAAK,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,CAAC,EAEtC,eAAe,CAAC,EAChB,UAAS,CAAuB,EAChC,WAAW,aAAa,MAEhB,OAAO,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,2FAGxD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,cAAc,EACpD,WAAW,CAAC,EACZ,eAAe,KAAK,EACpB,SAAS,mBAAmB,CAAC,CAAC,CAAC,2FA4BhC,CAAC;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,2CAe5E;AAED,eAAO,MAAM,iBAAiB,aAE7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAErC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-css",
|
|
3
|
-
"version": "0.0.0-nightly.
|
|
3
|
+
"version": "0.0.0-nightly.d6f42ab",
|
|
4
4
|
"description": "A CSS polyfill for React Native",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,19 +37,18 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"./components": {
|
|
40
|
-
"source": "./src/components/index.
|
|
41
|
-
"react-native": "./src/components/index.tsx",
|
|
40
|
+
"source": "./src/components/index.cts",
|
|
42
41
|
"import": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
42
|
+
"default": "./dist/module/components/index.cjs",
|
|
43
|
+
"types": "./dist/typescript/module/src/components/index.d.ts"
|
|
45
44
|
},
|
|
46
45
|
"require": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
46
|
+
"default": "./dist/commonjs/components/index.cjs",
|
|
47
|
+
"types": "./dist/typescript/commonjs/src/components/index.d.ts"
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
"./components/*": {
|
|
52
|
-
"source": "./src/components/*.
|
|
51
|
+
"source": "./src/components/*.tsx",
|
|
53
52
|
"react-native": "./src/components/*.tsx",
|
|
54
53
|
"import": {
|
|
55
54
|
"types": "./dist/typescript/module/src/components/*.d.ts",
|
|
@@ -192,16 +191,15 @@
|
|
|
192
191
|
"debug": "^4.4.1"
|
|
193
192
|
},
|
|
194
193
|
"peerDependencies": {
|
|
195
|
-
"@expo/metro-config": ">=
|
|
196
|
-
"
|
|
197
|
-
"react": "
|
|
198
|
-
"react-native": "0.81.1"
|
|
194
|
+
"@expo/metro-config": ">=54",
|
|
195
|
+
"react": ">=19",
|
|
196
|
+
"react-native": ">=0.81"
|
|
199
197
|
},
|
|
200
198
|
"devDependencies": {
|
|
201
199
|
"@babel/core": "^7.28.0",
|
|
202
200
|
"@commitlint/config-conventional": "^19.8.1",
|
|
203
201
|
"@eslint/js": "^9.30.1",
|
|
204
|
-
"@expo/metro-config": "~0.
|
|
202
|
+
"@expo/metro-config": "~54.0.5",
|
|
205
203
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",
|
|
206
204
|
"@tailwindcss/postcss": "^4.1.12",
|
|
207
205
|
"@testing-library/react-native": "^13.3.3",
|
|
@@ -212,22 +210,22 @@
|
|
|
212
210
|
"@types/react": "^19.1.10",
|
|
213
211
|
"@types/react-test-renderer": "^19",
|
|
214
212
|
"babel-plugin-tester": "^12.0.0",
|
|
215
|
-
"babel-preset-expo": "~
|
|
216
|
-
"commitlint": "^
|
|
213
|
+
"babel-preset-expo": "~54.0.3",
|
|
214
|
+
"commitlint": "^20.0.0",
|
|
217
215
|
"eas-build-cache-provider": "^16.4.2",
|
|
218
216
|
"eslint": "^9.30.1",
|
|
219
217
|
"eslint-config-prettier": "^10.1.5",
|
|
220
218
|
"eslint-plugin-prettier": "^5.5.1",
|
|
221
|
-
"expo": "54.0.
|
|
219
|
+
"expo": "54.0.10",
|
|
222
220
|
"jest": "^29.7.0",
|
|
223
|
-
"jest-expo": "~54.0.
|
|
221
|
+
"jest-expo": "~54.0.12",
|
|
224
222
|
"lefthook": "^1.12.3",
|
|
225
223
|
"lightningcss": "^1.30.1",
|
|
226
224
|
"metro-runtime": "^0.83.0",
|
|
227
225
|
"postcss": "^8.5.6",
|
|
228
226
|
"prettier": "^3.6.2",
|
|
229
227
|
"react": "19.1.0",
|
|
230
|
-
"react-native": "0.81.
|
|
228
|
+
"react-native": "0.81.4",
|
|
231
229
|
"react-native-builder-bob": "^0.40.13",
|
|
232
230
|
"react-native-reanimated": "~4.1.0",
|
|
233
231
|
"react-native-safe-area-context": "5.6.1",
|
package/src/compiler/atRules.ts
CHANGED
|
@@ -47,11 +47,11 @@ export function maybeMutateReactNativeOptions(
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/***********************************************
|
|
50
|
-
* @
|
|
50
|
+
* @nativeMapping *
|
|
51
51
|
***********************************************/
|
|
52
52
|
|
|
53
|
-
function
|
|
54
|
-
return rule.type === "unknown" && rule.value.name === "
|
|
53
|
+
function isNativeMappingAtRule(rule: Rule | PropAtRule): rule is PropAtRule {
|
|
54
|
+
return rule.type === "unknown" && rule.value.name === "nativeMapping";
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
@@ -71,14 +71,14 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
71
71
|
if (!rules) return mapping;
|
|
72
72
|
|
|
73
73
|
for (const rule of rules) {
|
|
74
|
-
if (!
|
|
74
|
+
if (!isNativeMappingAtRule(rule)) continue;
|
|
75
75
|
|
|
76
76
|
if (rule.value.prelude.length > 0) {
|
|
77
77
|
const prelude = rule.value.prelude.filter((item) => {
|
|
78
78
|
return item.value.type !== "white-space";
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
nativeMappingAtRuleBlock(prelude, mapping);
|
|
82
82
|
} else if (rule.value.block) {
|
|
83
83
|
// Remove all whitespace tokens
|
|
84
84
|
const blocks = rule.value.block.filter((item) => {
|
|
@@ -91,7 +91,7 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
for (const block of blockRules) {
|
|
94
|
-
|
|
94
|
+
nativeMappingAtRuleBlock(block, mapping);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -99,38 +99,51 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
99
99
|
return mapping;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function
|
|
102
|
+
function nativeMappingAtRuleBlock(
|
|
103
103
|
token: Extract<TokenOrValue, { type: "token" }>[],
|
|
104
104
|
mapping: StyleRuleMapping = {},
|
|
105
105
|
): StyleRuleMapping {
|
|
106
|
-
|
|
106
|
+
let [from, to] = splitByDelimiter(token, (item) => {
|
|
107
107
|
return item.value.type === "colon";
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
// @nativeMapping <to>; (has no from value)
|
|
111
|
+
if (!to) {
|
|
112
|
+
to = from;
|
|
113
|
+
from = [
|
|
114
|
+
{
|
|
115
|
+
type: "token",
|
|
116
|
+
value: { type: "ident", value: "*" },
|
|
117
|
+
},
|
|
118
|
+
];
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
|
|
115
|
-
if (!
|
|
121
|
+
// We can only map from a single property
|
|
122
|
+
if (!from || from.length !== 1 || !to) {
|
|
116
123
|
return mapping;
|
|
117
124
|
}
|
|
118
125
|
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
const fromToken = from[0];
|
|
127
|
+
if (!fromToken || fromToken.value.type !== "ident") {
|
|
121
128
|
return mapping;
|
|
122
129
|
}
|
|
123
130
|
|
|
124
|
-
|
|
131
|
+
let value: string | string[] = to.flatMap((item, index) => {
|
|
125
132
|
switch (item.value.type) {
|
|
126
133
|
case "delim":
|
|
127
|
-
return index === 0 && item.value.value === "
|
|
134
|
+
return index === 0 && item.value.value === "&" ? ["&"] : [];
|
|
128
135
|
case "ident":
|
|
129
|
-
return
|
|
136
|
+
return item.value.value.split(".").map((part) => toRNProperty(part));
|
|
130
137
|
default:
|
|
131
138
|
return [];
|
|
132
139
|
}
|
|
133
140
|
});
|
|
134
141
|
|
|
142
|
+
if (value.length === 2 && value[0] === "&" && value[1]) {
|
|
143
|
+
value = value[1];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
mapping[toRNProperty(fromToken.value.value)] = value;
|
|
147
|
+
|
|
135
148
|
return mapping;
|
|
136
149
|
}
|
package/src/compiler/compiler.ts
CHANGED
|
@@ -3,8 +3,6 @@ import { inspect } from "node:util";
|
|
|
3
3
|
|
|
4
4
|
import { debug } from "debug";
|
|
5
5
|
import {
|
|
6
|
-
Features,
|
|
7
|
-
transform as lightningcss,
|
|
8
6
|
type ContainerRule,
|
|
9
7
|
type MediaQuery as CSSMediaQuery,
|
|
10
8
|
type CustomAtRules,
|
|
@@ -17,12 +15,14 @@ import { maybeMutateReactNativeOptions, parsePropAtRule } from "./atRules";
|
|
|
17
15
|
import type {
|
|
18
16
|
CompilerOptions,
|
|
19
17
|
ContainerQuery,
|
|
18
|
+
StyleRuleMapping,
|
|
20
19
|
UniqueVarInfo,
|
|
21
20
|
} from "./compiler.types";
|
|
22
21
|
import { parseContainerCondition } from "./container-query";
|
|
23
22
|
import { parseDeclaration, round } from "./declarations";
|
|
24
23
|
import { inlineVariables } from "./inline-variables";
|
|
25
24
|
import { extractKeyFrames } from "./keyframes";
|
|
25
|
+
import { lightningcssLoader } from "./lightningcss-loader";
|
|
26
26
|
import { parseMediaQuery } from "./media-query";
|
|
27
27
|
import { StylesheetBuilder } from "./stylesheet";
|
|
28
28
|
import { supportsConditionValid } from "./supports";
|
|
@@ -58,6 +58,8 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
58
58
|
|
|
59
59
|
const builder = new StylesheetBuilder(options);
|
|
60
60
|
|
|
61
|
+
const { lightningcss, Features } = lightningcssLoader();
|
|
62
|
+
|
|
61
63
|
logger(`Lightningcss first pass`);
|
|
62
64
|
|
|
63
65
|
/**
|
|
@@ -182,7 +184,11 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
182
184
|
/**
|
|
183
185
|
* Extracts style declarations and animations from a given CSS rule, based on its type.
|
|
184
186
|
*/
|
|
185
|
-
function extractRule(
|
|
187
|
+
function extractRule(
|
|
188
|
+
rule: Rule,
|
|
189
|
+
builder: StylesheetBuilder,
|
|
190
|
+
mapping: StyleRuleMapping = {},
|
|
191
|
+
) {
|
|
186
192
|
// Check the rule's type to determine which extraction function to call
|
|
187
193
|
switch (rule.type) {
|
|
188
194
|
case "keyframes": {
|
|
@@ -192,12 +198,12 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
192
198
|
}
|
|
193
199
|
case "container": {
|
|
194
200
|
// If the rule is a container, extract it with the `extractedContainer` function
|
|
195
|
-
extractContainer(rule.value, builder);
|
|
201
|
+
extractContainer(rule.value, builder, mapping);
|
|
196
202
|
break;
|
|
197
203
|
}
|
|
198
204
|
case "media": {
|
|
199
205
|
// If the rule is a media query, extract it with the `extractMedia` function
|
|
200
|
-
extractMedia(rule.value, builder);
|
|
206
|
+
extractMedia(rule.value, builder, mapping);
|
|
201
207
|
break;
|
|
202
208
|
}
|
|
203
209
|
case "nested-declarations": {
|
|
@@ -206,7 +212,7 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
206
212
|
const declarationBlock = value.declarations;
|
|
207
213
|
if (declarationBlock) {
|
|
208
214
|
if (declarationBlock.declarations?.length) {
|
|
209
|
-
builder.newNestedRule();
|
|
215
|
+
builder.newNestedRule({ mapping });
|
|
210
216
|
for (const declaration of declarationBlock.declarations) {
|
|
211
217
|
parseDeclaration(declaration, builder);
|
|
212
218
|
}
|
|
@@ -214,7 +220,7 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
214
220
|
}
|
|
215
221
|
|
|
216
222
|
if (declarationBlock.importantDeclarations?.length) {
|
|
217
|
-
builder.newNestedRule({ important: true });
|
|
223
|
+
builder.newNestedRule({ mapping, important: true });
|
|
218
224
|
for (const declaration of declarationBlock.importantDeclarations) {
|
|
219
225
|
parseDeclaration(declaration, builder);
|
|
220
226
|
}
|
|
@@ -227,13 +233,13 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
227
233
|
const value = rule.value;
|
|
228
234
|
|
|
229
235
|
const declarationBlock = value.declarations;
|
|
230
|
-
|
|
236
|
+
mapping = { ...mapping, ...parsePropAtRule(value.rules) };
|
|
231
237
|
|
|
232
238
|
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
233
239
|
builder = builder.fork("style", value.selectors);
|
|
234
240
|
|
|
235
241
|
if (declarationBlock) {
|
|
236
|
-
if (declarationBlock.declarations) {
|
|
242
|
+
if (declarationBlock.declarations?.length) {
|
|
237
243
|
builder.newRule(mapping);
|
|
238
244
|
for (const declaration of declarationBlock.declarations) {
|
|
239
245
|
parseDeclaration(declaration, builder);
|
|
@@ -241,7 +247,7 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
241
247
|
builder.applyRuleToSelectors();
|
|
242
248
|
}
|
|
243
249
|
|
|
244
|
-
if (declarationBlock.importantDeclarations) {
|
|
250
|
+
if (declarationBlock.importantDeclarations?.length) {
|
|
245
251
|
builder.newRule(mapping, { important: true });
|
|
246
252
|
for (const declaration of declarationBlock.importantDeclarations) {
|
|
247
253
|
parseDeclaration(declaration, builder);
|
|
@@ -252,7 +258,7 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
252
258
|
|
|
253
259
|
if (value.rules) {
|
|
254
260
|
for (const nestedRule of value.rules) {
|
|
255
|
-
extractRule(nestedRule, builder);
|
|
261
|
+
extractRule(nestedRule, builder, mapping);
|
|
256
262
|
}
|
|
257
263
|
}
|
|
258
264
|
|
|
@@ -260,13 +266,13 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
260
266
|
}
|
|
261
267
|
case "layer-block":
|
|
262
268
|
for (const layerRule of rule.value.rules) {
|
|
263
|
-
extractRule(layerRule, builder);
|
|
269
|
+
extractRule(layerRule, builder, mapping);
|
|
264
270
|
}
|
|
265
271
|
break;
|
|
266
272
|
case "supports":
|
|
267
273
|
if (supportsConditionValid(rule.value.condition)) {
|
|
268
274
|
for (const layerRule of rule.value.rules) {
|
|
269
|
-
extractRule(layerRule, builder);
|
|
275
|
+
extractRule(layerRule, builder, mapping);
|
|
270
276
|
}
|
|
271
277
|
}
|
|
272
278
|
break;
|
|
@@ -303,7 +309,11 @@ function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
|
303
309
|
*
|
|
304
310
|
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
305
311
|
*/
|
|
306
|
-
function extractMedia(
|
|
312
|
+
function extractMedia(
|
|
313
|
+
mediaRule: MediaRule,
|
|
314
|
+
builder: StylesheetBuilder,
|
|
315
|
+
mapping: StyleRuleMapping,
|
|
316
|
+
) {
|
|
307
317
|
builder = builder.fork("media");
|
|
308
318
|
|
|
309
319
|
// Initialize an empty array to store screen media queries
|
|
@@ -336,7 +346,7 @@ function extractMedia(mediaRule: MediaRule, builder: StylesheetBuilder) {
|
|
|
336
346
|
|
|
337
347
|
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
338
348
|
for (const rule of mediaRule.rules) {
|
|
339
|
-
extractRule(rule, builder);
|
|
349
|
+
extractRule(rule, builder, mapping);
|
|
340
350
|
}
|
|
341
351
|
}
|
|
342
352
|
|
|
@@ -348,6 +358,7 @@ function extractMedia(mediaRule: MediaRule, builder: StylesheetBuilder) {
|
|
|
348
358
|
function extractContainer(
|
|
349
359
|
containerRule: ContainerRule,
|
|
350
360
|
builder: StylesheetBuilder,
|
|
361
|
+
mapping: StyleRuleMapping,
|
|
351
362
|
) {
|
|
352
363
|
builder = builder.fork("container");
|
|
353
364
|
|
|
@@ -363,6 +374,6 @@ function extractContainer(
|
|
|
363
374
|
builder.addContainerQuery(query);
|
|
364
375
|
|
|
365
376
|
for (const rule of containerRule.rules) {
|
|
366
|
-
extractRule(rule, builder);
|
|
377
|
+
extractRule(rule, builder, mapping);
|
|
367
378
|
}
|
|
368
379
|
}
|