react-native-css 0.0.0-nightly.81d3fdb → 0.0.0-nightly.8a01f75
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 +8 -8
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +51 -0
- 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 +12 -2
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +1 -1
- package/dist/commonjs/compiler/supports.js +3 -1
- package/dist/commonjs/compiler/supports.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 +6 -6
- 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 +6 -6
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +6 -6
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/commonjs/components/Pressable.js +6 -6
- package/dist/commonjs/components/Pressable.js.map +1 -1
- package/dist/commonjs/components/ScrollView.js +6 -6
- package/dist/commonjs/components/ScrollView.js.map +1 -1
- 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 +6 -6
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/TouchableHighlight.js +6 -6
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
- package/dist/commonjs/components/TouchableOpacity.js +6 -6
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
- package/dist/commonjs/components/TouchableWithoutFeedback.js +6 -6
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/commonjs/components/View.js +6 -6
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/components/VirtualizedList.js +6 -6
- package/dist/commonjs/components/VirtualizedList.js.map +1 -1
- 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.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 +8 -118
- 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/native/react/useNativeCss.js +11 -5
- package/dist/commonjs/native/react/useNativeCss.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/functions/color-mix.js +50 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/index.js +11 -0
- package/dist/commonjs/native/styles/functions/index.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +50 -7
- package/dist/commonjs/native/styles/index.js.map +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 +8 -8
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/declarations.js +50 -0
- 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 +12 -2
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +1 -1
- package/dist/module/compiler/supports.js +3 -1
- package/dist/module/compiler/supports.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 +4 -3
- 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 +4 -3
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +4 -3
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/module/components/Pressable.js +4 -3
- package/dist/module/components/Pressable.js.map +1 -1
- package/dist/module/components/ScrollView.js +4 -3
- package/dist/module/components/ScrollView.js.map +1 -1
- 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 +4 -3
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/TouchableHighlight.js +4 -3
- package/dist/module/components/TouchableHighlight.js.map +1 -1
- package/dist/module/components/TouchableOpacity.js +4 -3
- package/dist/module/components/TouchableOpacity.js.map +1 -1
- package/dist/module/components/TouchableWithoutFeedback.js +4 -3
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/module/components/View.js +4 -3
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/components/VirtualizedList.js +4 -3
- package/dist/module/components/VirtualizedList.js.map +1 -1
- 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.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 +8 -117
- 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/native/react/useNativeCss.js +11 -5
- package/dist/module/native/react/useNativeCss.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/functions/color-mix.js +45 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/index.js +1 -0
- package/dist/module/native/styles/functions/index.js.map +1 -1
- package/dist/module/native/styles/index.js +50 -7
- package/dist/module/native/styles/index.js.map +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/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 +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +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.map +1 -1
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +3 -3
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
- 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 -4
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
- 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 +3 -3
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
- 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.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 +2 -2
- 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/useNativeCss.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.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/functions/color-mix.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- 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/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 +1 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +2 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +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.map +1 -1
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Button.d.ts +2 -4
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts +3 -3
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Image.d.ts +2 -4
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
- package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
- package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
- 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 -4
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
- 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 +3 -3
- package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
- 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.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 +2 -2
- 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/useNativeCss.d.ts +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.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/functions/color-mix.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +1 -0
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- 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 +12 -12
- package/src/compiler/atRules.ts +8 -8
- package/src/compiler/declarations.ts +96 -0
- package/src/compiler/keyframes.ts +2 -2
- package/src/compiler/lightningcss-loader.ts +20 -1
- package/src/compiler/stylesheet.ts +1 -1
- package/src/compiler/supports.ts +2 -0
- package/src/components/ActivityIndicator.tsx +9 -6
- package/src/components/Button.tsx +9 -4
- package/src/components/FlatList.tsx +14 -5
- package/src/components/Image.tsx +9 -4
- package/src/components/ImageBackground.tsx +9 -6
- package/src/components/KeyboardAvoidingView.tsx +9 -6
- package/src/components/Pressable.tsx +9 -4
- package/src/components/ScrollView.tsx +9 -6
- package/src/components/Switch.tsx +9 -4
- package/src/components/Text.tsx +9 -4
- package/src/components/TextInput.tsx +9 -4
- package/src/components/TouchableHighlight.tsx +9 -6
- package/src/components/TouchableOpacity.tsx +9 -6
- package/src/components/TouchableWithoutFeedback.tsx +9 -6
- package/src/components/View.tsx +9 -4
- package/src/components/VirtualizedList.tsx +18 -6
- package/src/components/copyComponentProperties.ts +21 -0
- package/src/components/index.cts +263 -0
- package/src/components/{index.tsx → index.ts} +0 -1
- package/src/jest/index.ts +2 -1
- package/src/metro/index.ts +8 -166
- 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/react/useNativeCss.ts +13 -6
- package/src/native/styles/functions/color-mix.ts +68 -0
- package/src/native/styles/functions/index.ts +1 -0
- package/src/native/styles/index.ts +72 -9
- 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/types.d.ts +3 -0
- 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/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,68 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
|
+
import type { PlainColorObject } from "colorjs.io";
|
|
3
|
+
import {
|
|
4
|
+
ColorSpace,
|
|
5
|
+
to as convert,
|
|
6
|
+
mix,
|
|
7
|
+
OKLab,
|
|
8
|
+
P3,
|
|
9
|
+
parse,
|
|
10
|
+
sRGB,
|
|
11
|
+
type ColorConstructor,
|
|
12
|
+
} from "colorjs.io/fn";
|
|
13
|
+
|
|
14
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
15
|
+
|
|
16
|
+
ColorSpace.register(sRGB);
|
|
17
|
+
ColorSpace.register(P3);
|
|
18
|
+
ColorSpace.register(OKLab);
|
|
19
|
+
|
|
20
|
+
export const colorMix: StyleFunctionResolver = (resolveValue, value) => {
|
|
21
|
+
const args = resolveValue(value[2]);
|
|
22
|
+
|
|
23
|
+
if (!Array.isArray(args) || args.length < 3) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const space = args.shift();
|
|
29
|
+
|
|
30
|
+
let left: ColorConstructor | PlainColorObject = parse(
|
|
31
|
+
args.shift() as string,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
let next = args.shift();
|
|
35
|
+
|
|
36
|
+
if (typeof next === "string" && next.endsWith("%")) {
|
|
37
|
+
left.alpha = parseFloat(next) / 100;
|
|
38
|
+
next = args.shift();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (next === undefined) {
|
|
42
|
+
if (left.spaceId !== "srgb") {
|
|
43
|
+
left = convert(left, "srgb");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return `rgba(${(left.coords[0] ?? 0) * 255}, ${(left.coords[1] ?? 0) * 255}, ${(left.coords[2] ?? 0) * 255}, ${left.alpha})`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (typeof next !== "string") {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const right = parse(next);
|
|
53
|
+
|
|
54
|
+
next = args.shift();
|
|
55
|
+
if (next && typeof next === "string" && next.endsWith("%")) {
|
|
56
|
+
right.alpha = parseFloat(next) / 100;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const result = mix(left, right, {
|
|
60
|
+
space,
|
|
61
|
+
outputSpace: "srgb",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return `rgba(${(result.coords[0] ?? 0) * 255}, ${(result.coords[1] ?? 0) * 255}, ${(result.coords[2] ?? 0) * 255}, ${result.alpha})`;
|
|
65
|
+
} catch {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -49,10 +49,19 @@ export function getStyledProps(
|
|
|
49
49
|
const styledProps = state.stylesObs?.get(state.styleEffect);
|
|
50
50
|
|
|
51
51
|
for (const config of state.configs) {
|
|
52
|
-
result = deepMergeConfig(
|
|
52
|
+
result = deepMergeConfig(
|
|
53
|
+
config,
|
|
54
|
+
nativeStyleMapping(config, styledProps?.normal),
|
|
55
|
+
inline,
|
|
56
|
+
true,
|
|
57
|
+
);
|
|
53
58
|
|
|
54
59
|
if (styledProps?.important) {
|
|
55
|
-
result = deepMergeConfig(
|
|
60
|
+
result = deepMergeConfig(
|
|
61
|
+
config,
|
|
62
|
+
result,
|
|
63
|
+
nativeStyleMapping(config, styledProps.important),
|
|
64
|
+
);
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
// Apply the handlers
|
|
@@ -122,11 +131,11 @@ function deepMergeConfig(
|
|
|
122
131
|
right: Record<string, any> | undefined | null,
|
|
123
132
|
rightIsInline = false,
|
|
124
133
|
) {
|
|
125
|
-
if (!
|
|
134
|
+
if (!right) {
|
|
126
135
|
return { ...left };
|
|
127
136
|
}
|
|
128
137
|
|
|
129
|
-
let result = Object.assign({}, left, right);
|
|
138
|
+
let result = config.target ? Object.assign({}, left, right) : { ...left };
|
|
130
139
|
|
|
131
140
|
if (
|
|
132
141
|
right &&
|
|
@@ -140,7 +149,7 @@ function deepMergeConfig(
|
|
|
140
149
|
/**
|
|
141
150
|
* If target is a path, deep merge until we get to the last key
|
|
142
151
|
*/
|
|
143
|
-
if (Array.isArray(config.target)
|
|
152
|
+
if (Array.isArray(config.target)) {
|
|
144
153
|
for (let i = 0; i < config.target.length - 1; i++) {
|
|
145
154
|
const key = config.target[i];
|
|
146
155
|
|
|
@@ -159,11 +168,9 @@ function deepMergeConfig(
|
|
|
159
168
|
return result;
|
|
160
169
|
}
|
|
161
170
|
|
|
162
|
-
const target =
|
|
163
|
-
? config.target[0]
|
|
164
|
-
: config.target;
|
|
171
|
+
const target = config.target;
|
|
165
172
|
|
|
166
|
-
if (target === undefined) {
|
|
173
|
+
if (target === undefined || target === false) {
|
|
167
174
|
return result;
|
|
168
175
|
}
|
|
169
176
|
|
|
@@ -196,3 +203,59 @@ function deepMergeConfig(
|
|
|
196
203
|
|
|
197
204
|
return result;
|
|
198
205
|
}
|
|
206
|
+
|
|
207
|
+
function nativeStyleMapping(
|
|
208
|
+
config: Config,
|
|
209
|
+
props: Record<string, any> | undefined,
|
|
210
|
+
) {
|
|
211
|
+
if (!config.nativeStyleMapping || !props) {
|
|
212
|
+
return props;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
let source: Record<string, any> | undefined;
|
|
216
|
+
|
|
217
|
+
if (typeof config.target === "string") {
|
|
218
|
+
source = props[config.target];
|
|
219
|
+
} else if (config.target === false) {
|
|
220
|
+
source = props["style"];
|
|
221
|
+
} else {
|
|
222
|
+
const tokens = [...config.target];
|
|
223
|
+
const lastToken = tokens.pop()!;
|
|
224
|
+
|
|
225
|
+
source = props;
|
|
226
|
+
for (const token of tokens) {
|
|
227
|
+
source = source[token];
|
|
228
|
+
if (!source) {
|
|
229
|
+
return props;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
source = source[lastToken];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (!source) {
|
|
237
|
+
return props;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
for (const [key, path] of Object.entries(config.nativeStyleMapping)) {
|
|
241
|
+
const styleValue = source[key];
|
|
242
|
+
|
|
243
|
+
delete source[key];
|
|
244
|
+
|
|
245
|
+
if (styleValue === undefined) {
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
let target = props;
|
|
250
|
+
const tokens = path.split(".");
|
|
251
|
+
const lastToken = tokens.pop();
|
|
252
|
+
for (const token of tokens) {
|
|
253
|
+
target[token] ??= {};
|
|
254
|
+
target = target[token];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
target[lastToken!] = styleValue;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return props;
|
|
261
|
+
}
|
|
@@ -76,8 +76,6 @@ export const animation: StyleFunctionResolver = (
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
animationShortHandTuples.pop();
|
|
80
|
-
|
|
81
79
|
const nameTuple = animationShortHandTuples.find(
|
|
82
80
|
(tuple) => tuple[1] === "animationName",
|
|
83
81
|
);
|
|
@@ -121,3 +119,13 @@ export const animation: StyleFunctionResolver = (
|
|
|
121
119
|
|
|
122
120
|
return applyShorthand(animationShortHandTuples);
|
|
123
121
|
};
|
|
122
|
+
|
|
123
|
+
export const animationName: StyleFunctionResolver = (
|
|
124
|
+
resolveValue,
|
|
125
|
+
value,
|
|
126
|
+
get,
|
|
127
|
+
options,
|
|
128
|
+
) => {
|
|
129
|
+
const shorthand: any = animation(resolveValue, value, get, options);
|
|
130
|
+
return shorthand.animationName;
|
|
131
|
+
};
|
|
@@ -29,9 +29,16 @@ export type StyleProp<T> =
|
|
|
29
29
|
// ---------- Type Helpers ----------
|
|
30
30
|
|
|
31
31
|
// Unwrap nested arrays (from RecursiveArray)
|
|
32
|
-
type UnwrapRecursiveArray<
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
type UnwrapRecursiveArray<
|
|
33
|
+
T,
|
|
34
|
+
Depth extends unknown[] = [],
|
|
35
|
+
MaxDepth extends number = 10
|
|
36
|
+
> = Depth["length"] extends MaxDepth
|
|
37
|
+
? T
|
|
38
|
+
: T extends (infer I)[]
|
|
39
|
+
? UnwrapRecursiveArray<I, [...Depth, unknown], MaxDepth>
|
|
40
|
+
: T;
|
|
41
|
+
|
|
35
42
|
|
|
36
43
|
// Remove null, false, undefined, etc.
|
|
37
44
|
type RemoveFalsy<T> = Exclude<T, Falsy>;
|
package/src/web/api.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createElement,
|
|
3
3
|
useMemo,
|
|
4
|
-
type
|
|
4
|
+
type ComponentPropsWithRef,
|
|
5
|
+
type ComponentType,
|
|
5
6
|
type PropsWithChildren,
|
|
6
7
|
} from "react";
|
|
7
8
|
import { Appearance } from "react-native";
|
|
@@ -17,15 +18,19 @@ import type {
|
|
|
17
18
|
import type { ReactComponent } from "../runtime.types";
|
|
18
19
|
import { assignStyle } from "./assign-style";
|
|
19
20
|
|
|
21
|
+
const defaultMapping: StyledConfiguration<ComponentType<{ style: unknown }>> = {
|
|
22
|
+
className: "style",
|
|
23
|
+
};
|
|
24
|
+
|
|
20
25
|
export const styled = <
|
|
21
26
|
const C extends ReactComponent,
|
|
22
27
|
const M extends StyledConfiguration<C>,
|
|
23
28
|
>(
|
|
24
29
|
baseComponent: C,
|
|
25
|
-
mapping: M,
|
|
30
|
+
mapping: M = defaultMapping as M,
|
|
26
31
|
_options?: StyledOptions,
|
|
27
32
|
) => {
|
|
28
|
-
return (props: StyledProps<
|
|
33
|
+
return (props: StyledProps<ComponentPropsWithRef<C>, M>) => {
|
|
29
34
|
return useCssElement(baseComponent, mapping, props);
|
|
30
35
|
};
|
|
31
36
|
};
|
|
@@ -93,7 +98,7 @@ export function VariableContextProvider(
|
|
|
93
98
|
) {
|
|
94
99
|
const style = useMemo(() => {
|
|
95
100
|
return {
|
|
96
|
-
display: "
|
|
101
|
+
display: "contents",
|
|
97
102
|
...Object.fromEntries(
|
|
98
103
|
Object.entries(props.value).map(([key, value]) => [
|
|
99
104
|
key.startsWith("--") ? key : `--${key}`,
|
package/types.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["canWarn","process","env","NODE_ENV","Error"],"sourceRoot":"../../src","sources":["poison.pill.ts"],"mappings":";;;;;AAAA,MAAMA,OAAO,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM;AAE/C,IAAIH,OAAO,EAAE;EACX,MAAM,IAAII,KAAK,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["runtime/native/injection.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["canWarn","process","env","NODE_ENV","Error"],"sourceRoot":"../../src","sources":["poison.pill.ts"],"mappings":";;AAAA,MAAMA,OAAO,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM;AAE/C,IAAIH,OAAO,EAAE;EACX,MAAM,IAAII,KAAK,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF;AAEA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["runtime/native/injection.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metro.d.ts","sourceRoot":"","sources":["../../../../../src/native/metro.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poison.pill.d.ts","sourceRoot":"","sources":["../../../../src/poison.pill.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=injection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../../src/runtime/native/injection.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metro.d.ts","sourceRoot":"","sources":["../../../../../src/native/metro.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poison.pill.d.ts","sourceRoot":"","sources":["../../../../src/poison.pill.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=injection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../../src/runtime/native/injection.ts"],"names":[],"mappings":""}
|
package/src/native/metro.ts
DELETED
|
File without changes
|
|
File without changes
|