react-native-css 0.0.0-nightly.99fdf44 → 0.0.0-nightly.a5002c5
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/README.md +5 -5
- package/dist/commonjs/babel/import-plugin.js +9 -3
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +16 -3
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +7 -2
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +52 -17
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +92 -31
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +158 -66
- 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 +15 -2
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +13 -3
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +7 -5
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +2 -2
- 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 +7 -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 +8 -12
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +8 -9
- 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/SafeAreaProvider.js +13 -0
- package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
- 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 +310 -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 +2 -2
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/cache-version.js +43 -0
- package/dist/commonjs/metro/cache-version.js.map +1 -0
- package/dist/commonjs/metro/index.js +10 -118
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +9 -2
- 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/metro/typescript.js +26 -6
- package/dist/commonjs/metro/typescript.js.map +1 -1
- package/dist/commonjs/native/api.js +17 -9
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.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/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +12 -5
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +58 -16
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/native/react/usePassthrough.js +5 -2
- package/dist/commonjs/native/react/usePassthrough.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/reactivity.js +32 -22
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/calculate-props.js +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +64 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +18 -5
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
- 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/functions/numeric-functions.js +4 -3
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +382 -28
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +10 -7
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +13 -0
- package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +11 -4
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/index.js +11 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +55 -43
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +1 -1
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +7 -4
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/commonjs/web/assign-style.js +4 -1
- package/dist/commonjs/web/assign-style.js.map +1 -1
- package/dist/module/babel/import-plugin.js +11 -5
- package/dist/module/babel/import-plugin.js.map +1 -1
- package/dist/module/babel/react-native-web.js +16 -4
- package/dist/module/babel/react-native-web.js.map +1 -1
- package/dist/module/babel/react-native.js +7 -2
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +50 -17
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +94 -33
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +157 -66
- 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 +14 -2
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +13 -3
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +7 -5
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +2 -2
- 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 +5 -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 +6 -9
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +6 -6
- 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/SafeAreaProvider.js +4 -0
- package/dist/module/components/SafeAreaProvider.js.map +1 -0
- 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 +310 -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 +2 -2
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/cache-version.js +39 -0
- package/dist/module/metro/cache-version.js.map +1 -0
- package/dist/module/metro/index.js +10 -117
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +9 -2
- 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/metro/typescript.js +26 -6
- package/dist/module/metro/typescript.js.map +1 -1
- package/dist/module/native/api.js +18 -11
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.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/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +13 -6
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +59 -17
- package/dist/module/native/react/useNativeCss.js.map +1 -1
- package/dist/module/native/react/usePassthrough.js +5 -2
- package/dist/module/native/react/usePassthrough.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/reactivity.js +32 -22
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/calculate-props.js +1 -1
- package/dist/module/native/styles/functions/color-mix.js +59 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +16 -4
- package/dist/module/native/styles/functions/filters.js.map +1 -1
- 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/functions/numeric-functions.js +4 -3
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +13 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +5 -4
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +383 -28
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +10 -7
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +9 -0
- package/dist/module/native/styles/scale-factor.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +11 -1
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +9 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/native/styles/shorthands/index.js +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -1
- package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
- package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/module/native/styles/variables.js +55 -43
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +1 -1
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +7 -4
- package/dist/module/web/api.js.map +1 -1
- package/dist/module/web/assign-style.js +4 -1
- package/dist/module/web/assign-style.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.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 +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/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.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/SafeAreaProvider.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
- 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/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
- 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/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts +5 -9
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/conditions/container-query.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/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.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/usePassthrough.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/reactivity.d.ts +7 -3
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- 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/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- 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/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.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/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +3 -2
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +4 -3
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/index.d.ts +2 -2
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +3 -3
- 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/compiler/media-query.d.ts +3 -3
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.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 -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/SafeAreaProvider.d.ts +2 -0
- package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
- 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 +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
- 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/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/module/src/native/api.d.ts +6 -10
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +5 -5
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.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/reactivity.d.ts +7 -3
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- 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/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +3 -2
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/variables.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +11 -6
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +3 -2
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/index.d.ts +3 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +87 -39
- package/src/babel/import-plugin.ts +15 -4
- package/src/babel/react-native-web.ts +32 -3
- package/src/babel/react-native.ts +7 -1
- package/src/compiler/atRules.ts +63 -18
- package/src/compiler/compiler.ts +140 -42
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +289 -104
- package/src/compiler/keyframes.ts +2 -2
- package/src/compiler/lightningcss-loader.ts +21 -1
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +29 -3
- package/src/compiler/stylesheet.ts +9 -5
- package/src/compiler/supports.ts +2 -2
- package/src/components/ActivityIndicator.tsx +9 -6
- package/src/components/Button.tsx +9 -4
- package/src/components/FlatList.tsx +15 -5
- package/src/components/Image.tsx +9 -4
- package/src/components/ImageBackground.tsx +11 -12
- package/src/components/KeyboardAvoidingView.tsx +11 -9
- package/src/components/Pressable.tsx +9 -4
- package/src/components/SafeAreaProvider.tsx +1 -0
- 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 +308 -0
- package/src/components/{index.tsx → index.ts} +0 -1
- package/src/jest/index.ts +3 -2
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +10 -166
- package/src/metro/metro-transformer.ts +24 -7
- package/src/metro/override.ts +1 -0
- package/src/metro/resolver.ts +29 -28
- package/src/metro/typescript.ts +53 -6
- package/src/native/api.tsx +24 -14
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/index.ts +1 -2
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +13 -5
- package/src/native/react/useNativeCss.ts +64 -17
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +42 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/calculate-props.ts +1 -1
- package/src/native/styles/functions/color-mix.ts +74 -0
- package/src/native/styles/functions/filters.ts +20 -6
- package/src/native/styles/functions/index.ts +1 -0
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/string-functions.ts +18 -0
- package/src/native/styles/functions/transform-functions.ts +5 -4
- package/src/native/styles/index.ts +443 -36
- package/src/native/styles/resolve.ts +15 -12
- package/src/native/styles/scale-factor.ts +6 -0
- package/src/native/styles/shorthands/_handler.ts +14 -1
- package/src/native/styles/shorthands/animation.ts +17 -3
- package/src/native/styles/shorthands/box-shadow.ts +50 -15
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/variables.ts +48 -38
- package/src/native-internal/style-collection.ts +1 -1
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +12 -4
- package/src/utilities/style-descriptor.ts +11 -16
- package/src/web/api.tsx +13 -13
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +3 -20
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
- 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/compiler/inheritance.test.js +0 -78
- package/dist/module/compiler/inheritance.test.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/example/app.config.d.ts +0 -4
- package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/src/App.d.ts +0 -2
- package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.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/example/app.config.d.ts +0 -4
- package/dist/typescript/module/example/app.config.d.ts.map +0 -1
- package/dist/typescript/module/example/src/App.d.ts +0 -2
- package/dist/typescript/module/example/src/App.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/inheritance.test.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/compiler/inheritance.test.ts +0 -121
- 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
|
@@ -4,17 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.withReactNativeCSS = withReactNativeCSS;
|
|
7
|
-
var _nodePath = require("node:path");
|
|
8
7
|
var _nodeProcess = require("node:process");
|
|
9
|
-
var
|
|
10
|
-
var _index = require("../compiler/index.js");
|
|
11
|
-
var _injectionCode = require("./injection-code.js");
|
|
8
|
+
var _cacheVersion = require("./cache-version.js");
|
|
12
9
|
var _resolver = require("./resolver.js");
|
|
13
10
|
var _typescript = require("./typescript.js");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
11
|
/* eslint-disable */
|
|
16
12
|
|
|
17
|
-
const
|
|
13
|
+
const metroOverrideResolution = {
|
|
14
|
+
type: "sourceFile",
|
|
15
|
+
filePath: require.resolve("./override")
|
|
16
|
+
};
|
|
18
17
|
function withReactNativeCSS(config, options) {
|
|
19
18
|
if (typeof config === "function") {
|
|
20
19
|
return async () => {
|
|
@@ -27,16 +26,15 @@ function withReactNativeCSS(config, options) {
|
|
|
27
26
|
const {
|
|
28
27
|
disableTypeScriptGeneration,
|
|
29
28
|
typescriptEnvPath,
|
|
30
|
-
globalClassNamePolyfill = false
|
|
31
|
-
logger = defaultLogger
|
|
29
|
+
globalClassNamePolyfill = false
|
|
32
30
|
} = options || {};
|
|
33
|
-
const loggerEnabled = "enabled" in logger ? logger.enabled : true;
|
|
34
31
|
if (disableTypeScriptGeneration !== true) {
|
|
35
32
|
(0, _typescript.setupTypeScript)(typescriptEnvPath);
|
|
36
33
|
}
|
|
37
34
|
return {
|
|
38
35
|
...config,
|
|
39
|
-
|
|
36
|
+
cacheVersion: (0, _cacheVersion.getCacheVersion)(config.cacheVersion, options),
|
|
37
|
+
transformerPath: require.resolve("./metro-transformer"),
|
|
40
38
|
transformer: {
|
|
41
39
|
...config.transformer,
|
|
42
40
|
reactNativeCSS: options
|
|
@@ -45,10 +43,8 @@ function withReactNativeCSS(config, options) {
|
|
|
45
43
|
...config.resolver,
|
|
46
44
|
sourceExts: [...(config?.resolver?.sourceExts || []), "css"],
|
|
47
45
|
resolveRequest: (context, moduleName, platform) => {
|
|
48
|
-
if (moduleName.includes("
|
|
49
|
-
return
|
|
50
|
-
type: "empty"
|
|
51
|
-
};
|
|
46
|
+
if (moduleName.includes("react-native-css-metro-override")) {
|
|
47
|
+
return metroOverrideResolution;
|
|
52
48
|
}
|
|
53
49
|
const parentResolver = config.resolver?.resolveRequest ?? context.resolveRequest;
|
|
54
50
|
|
|
@@ -60,110 +56,6 @@ function withReactNativeCSS(config, options) {
|
|
|
60
56
|
const resolved = resolver(parentResolver, context, moduleName, platform);
|
|
61
57
|
return resolved;
|
|
62
58
|
}
|
|
63
|
-
},
|
|
64
|
-
server: {
|
|
65
|
-
...config.server,
|
|
66
|
-
enhanceMiddleware(metroMiddleware, metroServer) {
|
|
67
|
-
const bundler = metroServer.getBundler().getBundler();
|
|
68
|
-
if (!bundler.__react_native_css__patched) {
|
|
69
|
-
bundler.__react_native_css__patched = true;
|
|
70
|
-
const nativeCSSFiles = new Map();
|
|
71
|
-
const webCSSFiles = new Set();
|
|
72
|
-
const nativeInjectionPath = require.resolve("../native/metro");
|
|
73
|
-
const nativeInjectionFilepaths = [
|
|
74
|
-
// CommonJS
|
|
75
|
-
nativeInjectionPath,
|
|
76
|
-
// ES Module
|
|
77
|
-
nativeInjectionPath.replace(`dist${_nodePath.sep}commonjs`, `dist${_nodePath.sep}module`),
|
|
78
|
-
// TypeScript
|
|
79
|
-
nativeInjectionPath.replace(`dist${_nodePath.sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
80
|
-
const webInjectionPath = require.resolve("../web/metro");
|
|
81
|
-
const webInjectionFilepaths = [
|
|
82
|
-
// CommonJS
|
|
83
|
-
webInjectionPath,
|
|
84
|
-
// ES Module
|
|
85
|
-
webInjectionPath.replace(`dist${_nodePath.sep}commonjs`, `dist${_nodePath.sep}module`),
|
|
86
|
-
// TypeScript
|
|
87
|
-
webInjectionPath.replace(`dist${_nodePath.sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
88
|
-
|
|
89
|
-
// Keep the original
|
|
90
|
-
const transformFile = bundler.transformFile.bind(bundler);
|
|
91
|
-
const watcher = bundler.getWatcher();
|
|
92
|
-
|
|
93
|
-
// Patch with our functionality
|
|
94
|
-
bundler.transformFile = async function (filePath, transformOptions, fileBuffer) {
|
|
95
|
-
const isCss = /\.(s?css|sass)$/.test(filePath);
|
|
96
|
-
if (transformOptions.platform === "web") {
|
|
97
|
-
if (isCss) {
|
|
98
|
-
webCSSFiles.add(filePath);
|
|
99
|
-
} else if (webInjectionFilepaths.includes(filePath)) {
|
|
100
|
-
fileBuffer = (0, _injectionCode.getWebInjectionCode)(Array.from(webCSSFiles));
|
|
101
|
-
}
|
|
102
|
-
return transformFile(filePath, transformOptions, fileBuffer);
|
|
103
|
-
} else {
|
|
104
|
-
// Handle CSS files on native platforms
|
|
105
|
-
if (isCss) {
|
|
106
|
-
const webTransform = await transformFile(filePath, {
|
|
107
|
-
...transformOptions,
|
|
108
|
-
// Force the platform to web for CSS files
|
|
109
|
-
platform: "web",
|
|
110
|
-
// Let the transformer know that we will handle compilation
|
|
111
|
-
customTransformOptions: {
|
|
112
|
-
...transformOptions.customTransformOptions,
|
|
113
|
-
reactNativeCSS: options
|
|
114
|
-
}
|
|
115
|
-
}, fileBuffer);
|
|
116
|
-
const lastTransform = nativeCSSFiles.get(filePath);
|
|
117
|
-
const last = lastTransform?.[0];
|
|
118
|
-
const next = webTransform.output[0].data.css.code.toString();
|
|
119
|
-
|
|
120
|
-
// The CSS file has changed, we need to recompile the injection file
|
|
121
|
-
if (next !== last) {
|
|
122
|
-
nativeCSSFiles.set(filePath, [next, (0, _index.compile)(next, {
|
|
123
|
-
hexColors: options?.hexColors
|
|
124
|
-
}).stylesheet()]);
|
|
125
|
-
watcher.emit("change", {
|
|
126
|
-
eventsQueue: nativeInjectionFilepaths.map(filePath => ({
|
|
127
|
-
filePath,
|
|
128
|
-
metadata: {
|
|
129
|
-
modifiedTime: Date.now(),
|
|
130
|
-
size: 1,
|
|
131
|
-
// Can be anything
|
|
132
|
-
type: "virtual" // Can be anything
|
|
133
|
-
},
|
|
134
|
-
type: "change"
|
|
135
|
-
}))
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
const nativeTransform = await transformFile(filePath, transformOptions, fileBuffer);
|
|
139
|
-
|
|
140
|
-
// Tell Expo to skip caching this file
|
|
141
|
-
nativeTransform.output[0].data.css = {
|
|
142
|
-
skipCache: true,
|
|
143
|
-
// Expo requires a `code` property
|
|
144
|
-
code: ""
|
|
145
|
-
};
|
|
146
|
-
return nativeTransform;
|
|
147
|
-
} else if (nativeInjectionFilepaths.includes(filePath)) {
|
|
148
|
-
// If this is the injection file, we to swap its content with the
|
|
149
|
-
// compiled CSS files
|
|
150
|
-
fileBuffer = (0, _injectionCode.getNativeInjectionCode)(Array.from(nativeCSSFiles.keys()).map(key => (0, _nodePath.relative)((0, _nodePath.dirname)(filePath), key)), Array.from(nativeCSSFiles.values()).map(([, value]) => value));
|
|
151
|
-
if (loggerEnabled && fileBuffer) {
|
|
152
|
-
logger(`Transformed ${filePath}`);
|
|
153
|
-
logger(fileBuffer?.toString());
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return transformFile(filePath, transformOptions, fileBuffer);
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* We don't modify the middleware, we just use this function to get the metroServer
|
|
163
|
-
* So simply return the existing middleware
|
|
164
|
-
*/
|
|
165
|
-
return config.server?.enhanceMiddleware?.(metroMiddleware, metroServer) ?? metroMiddleware;
|
|
166
|
-
}
|
|
167
59
|
}
|
|
168
60
|
};
|
|
169
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_nodeProcess","require","_cacheVersion","_resolver","_typescript","metroOverrideResolution","type","filePath","resolve","withReactNativeCSS","config","options","Number","versions","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","setupTypeScript","cacheVersion","getCacheVersion","transformerPath","transformer","reactNativeCSS","resolver","sourceExts","resolveRequest","context","moduleName","platform","includes","parentResolver","webResolver","nativeResolver","resolved"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AARA;;AAoBA,MAAMI,uBAAuB,GAAG;EAC9BC,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEN,OAAO,CAACO,OAAO,CAAC,YAAY;AACxC,CAAC;AAEM,SAASC,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,OAAOD,kBAAkB,CAAC,MAAMC,MAAM,CAAC,CAAC,EAAEC,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,IAAIC,MAAM,CAACC,qBAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAC9D;EAEA,MAAM;IACJC,2BAA2B;IAC3BC,iBAAiB;IACjBC,uBAAuB,GAAG;EAC5B,CAAC,GAAGR,OAAO,IAAI,CAAC,CAAC;EAEjB,IAAIM,2BAA2B,KAAK,IAAI,EAAE;IACxC,IAAAG,2BAAe,EAACF,iBAAiB,CAAC;EACpC;EAEA,OAAO;IACL,GAAGR,MAAM;IACTW,YAAY,EAAE,IAAAC,6BAAe,EAACZ,MAAM,CAACW,YAAY,EAAEV,OAAO,CAAC;IAC3DY,eAAe,EAAEtB,OAAO,CAACO,OAAO,CAAC,qBAAqB,CAAC;IACvDgB,WAAW,EAAE;MACX,GAAGd,MAAM,CAACc,WAAW;MACrBC,cAAc,EAAEd;IAClB,CAAC;IACDe,QAAQ,EAAE;MACR,GAAGhB,MAAM,CAACgB,QAAQ;MAClBC,UAAU,EAAE,CAAC,IAAIjB,MAAM,EAAEgB,QAAQ,EAAEC,UAAU,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;MAC5DC,cAAc,EAAEA,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,KAAK;QACjD,IAAID,UAAU,CAACE,QAAQ,CAAC,iCAAiC,CAAC,EAAE;UAC1D,OAAO3B,uBAAuB;QAChC;QAEA,MAAM4B,cAAc,GAClBvB,MAAM,CAACgB,QAAQ,EAAEE,cAAc,IAAIC,OAAO,CAACD,cAAc;;QAE3D;QACA,IAAI,CAACT,uBAAuB,EAAE;UAC5B,OAAOc,cAAc,CAACJ,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;QACtD;QAEA,MAAML,QAAQ,GAAGK,QAAQ,KAAK,KAAK,GAAGG,qBAAW,GAAGC,wBAAc;QAClE,MAAMC,QAAQ,GAAGV,QAAQ,CACvBO,cAAc,EACdJ,OAAO,EACPC,UAAU,EACVC,QACF,CAAC;QAED,OAAOK,QAAQ;MACjB;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -21,11 +21,18 @@ async function transform(config, projectRoot, filePath, data, options) {
|
|
|
21
21
|
});
|
|
22
22
|
const css = cssFile.output[0].data.css.code.toString();
|
|
23
23
|
const productionJS = (0, _index.compile)(css, {
|
|
24
|
-
...
|
|
24
|
+
...config.reactNativeCSS,
|
|
25
25
|
filename: filePath,
|
|
26
26
|
projectRoot: projectRoot
|
|
27
27
|
}).stylesheet();
|
|
28
28
|
data = Buffer.from((0, _injectionCode.getNativeInjectionCode)([], [productionJS]));
|
|
29
|
-
|
|
29
|
+
const transform = await worker.transform(config, projectRoot, `${filePath}.js`, data, options);
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
32
|
+
transform.output[0].data.css = {
|
|
33
|
+
skipCache: true,
|
|
34
|
+
code: ""
|
|
35
|
+
};
|
|
36
|
+
return transform;
|
|
30
37
|
}
|
|
31
38
|
//# sourceMappingURL=metro-transformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_metroConfig","require","_index","_injectionCode","worker","unstable_transformerPath","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","productionJS","compile","reactNativeCSS","filename","stylesheet","Buffer","from","getNativeInjectionCode"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_metroConfig","require","_index","_injectionCode","worker","unstable_transformerPath","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","productionJS","compile","reactNativeCSS","filename","stylesheet","Buffer","from","getNativeInjectionCode","skipCache"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAMA,MAAMG,MAAM;AACV;AACAH,OAAO,CAACI,qCAAwB,CAA4C;AAEvE,eAAeC,SAASA,CAC7BC,MAEC,EACDC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAA2B,EACC;EAC5B,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,KAAK,OAAO,IAAI,iBAAiB,CAACC,IAAI,CAACL,QAAQ,CAAC;EAE1E,IAAIE,OAAO,CAACI,QAAQ,KAAK,KAAK,IAAI,CAACH,KAAK,EAAE;IACxC,OAAOR,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACvE;EAEA,MAAMK,OAAO,GAAI,MAAMZ,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAE;IAC3E,GAAGC,OAAO;IACVI,QAAQ,EAAE;EACZ,CAAC,CAEA;EAED,MAAME,GAAG,GAAGD,OAAO,CAACE,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,CAACE,IAAI,CAACC,QAAQ,CAAC,CAAC;EAEtD,MAAMC,YAAY,GAAG,IAAAC,cAAO,EAACL,GAAG,EAAE;IAChC,GAAGV,MAAM,CAACgB,cAAc;IACxBC,QAAQ,EAAEf,QAAQ;IAClBD,WAAW,EAAEA;EACf,CAAC,CAAC,CAACiB,UAAU,CAAC,CAAC;EAEff,IAAI,GAAGgB,MAAM,CAACC,IAAI,CAAC,IAAAC,qCAAsB,EAAC,EAAE,EAAE,CAACP,YAAY,CAAC,CAAC,CAAC;EAE9D,MAAMf,SAAS,GAAG,MAAMF,MAAM,CAACE,SAAS,CACtCC,MAAM,EACNC,WAAW,EACX,GAAGC,QAAQ,KAAK,EAChBC,IAAI,EACJC,OACF,CAAC;;EAED;EACCL,SAAS,CAASY,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,GAAG;IACtCY,SAAS,EAAE,IAAI;IACfV,IAAI,EAAE;EACR,CAAC;EAED,OAAOb,SAAS;AAClB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["metro/override.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -14,32 +14,23 @@ function isFromThisModule(filename) {
|
|
|
14
14
|
}
|
|
15
15
|
function nativeResolver(resolver, context, moduleName, platform) {
|
|
16
16
|
const resolution = resolver(context, moduleName, platform);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// Only operate on source files
|
|
21
|
-
resolution.type !== "sourceFile" ||
|
|
22
|
-
// Skip the React Native barrel file to prevent infinite recursion
|
|
23
|
-
context.originModulePath.endsWith("react-native/index.js") ||
|
|
24
|
-
// Skip anything that isn't importing a React Native component
|
|
25
|
-
!(moduleName.startsWith("react-native") || moduleName.startsWith("react-native/"))) {
|
|
17
|
+
const isInternal = isFromThisModule(context.originModulePath);
|
|
18
|
+
const isReactNativeIndex = context.originModulePath.endsWith(`${_nodePath.sep}react-native${_nodePath.sep}index.js`);
|
|
19
|
+
if (isInternal || resolution.type !== "sourceFile" || isReactNativeIndex) {
|
|
26
20
|
return resolution;
|
|
27
21
|
}
|
|
28
22
|
if (moduleName === "react-native") {
|
|
29
23
|
return resolver(context, `react-native-css/components`, platform);
|
|
30
|
-
}
|
|
31
|
-
if (moduleName === "react-native-safe-area-context") {
|
|
24
|
+
} else if (moduleName === "react-native-safe-area-context") {
|
|
32
25
|
return resolver(context, `react-native-css/components/react-native-safe-area-context`, platform);
|
|
26
|
+
} else if (resolution.filePath.includes(`${_nodePath.sep}react-native${_nodePath.sep}Libraries${_nodePath.sep}`)) {
|
|
27
|
+
const filename = (0, _nodePath.basename)(resolution.filePath.split(_nodePath.sep).at(-1) ?? "");
|
|
28
|
+
const module = filename.split(".").at(0);
|
|
29
|
+
if (module && _allowedModules.allowedModules.has(module)) {
|
|
30
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
31
|
+
}
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
// We only care about `react-native/Library/Components/<module>.js` components
|
|
36
|
-
const segments = resolution.filePath.split(_nodePath.sep);
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
38
|
-
const module = (0, _nodePath.basename)(segments.at(-1)).split(".")[0];
|
|
39
|
-
if (!module || !_allowedModules.allowedModules.has(module)) {
|
|
40
|
-
return resolution;
|
|
41
|
-
}
|
|
42
|
-
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
33
|
+
return resolution;
|
|
43
34
|
}
|
|
44
35
|
function webResolver(resolver, context, moduleName, platform) {
|
|
45
36
|
const resolution = resolver(context, moduleName, platform);
|
|
@@ -49,7 +40,9 @@ function webResolver(resolver, context, moduleName, platform) {
|
|
|
49
40
|
// Only operate on source files
|
|
50
41
|
resolution.type !== "sourceFile" ||
|
|
51
42
|
// Skip anything that isn't importing from `react-native-web`
|
|
52
|
-
!resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}`)
|
|
43
|
+
!resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}`) ||
|
|
44
|
+
// Skip internal react-native-web files
|
|
45
|
+
resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}dist${_nodePath.sep}vendor`)) {
|
|
53
46
|
return resolution;
|
|
54
47
|
}
|
|
55
48
|
|
|
@@ -57,7 +50,7 @@ function webResolver(resolver, context, moduleName, platform) {
|
|
|
57
50
|
const segments = resolution.filePath.split(_nodePath.sep);
|
|
58
51
|
const isIndex = segments.at(-1)?.startsWith("index.");
|
|
59
52
|
const module = segments.at(-2);
|
|
60
|
-
if (!isIndex || !module || !_allowedModules.allowedModules.has(module)) {
|
|
53
|
+
if (!isIndex || !module || !_allowedModules.allowedModules.has(module) || module === "VirtualizedList") {
|
|
61
54
|
return resolution;
|
|
62
55
|
}
|
|
63
56
|
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodePath","require","_allowedModules","thisModuleDist","resolve","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","originModulePath","
|
|
1
|
+
{"version":3,"names":["_nodePath","require","_allowedModules","thisModuleDist","resolve","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","isInternal","originModulePath","isReactNativeIndex","endsWith","sep","type","filePath","includes","basename","split","at","module","allowedModules","has","webResolver","segments","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setupTypeScript = setupTypeScript;
|
|
7
7
|
var _fs = require("fs");
|
|
8
|
+
var _nodePath = require("node:path");
|
|
8
9
|
var _commentJson = require("comment-json");
|
|
9
10
|
var _picocolors = require("./picocolors.js");
|
|
10
11
|
/* eslint-disable */
|
|
@@ -15,11 +16,15 @@ function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-na
|
|
|
15
16
|
if (!ts) {
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
|
-
const configFileName = ts.findConfigFile("
|
|
19
|
+
const configFileName = ts.findConfigFile((0, _nodePath.resolve)("."), ts.sys.fileExists, "tsconfig.json");
|
|
20
|
+
if (!configFileName) return;
|
|
21
|
+
const configDirectory = (0, _nodePath.dirname)((0, _nodePath.resolve)(configFileName));
|
|
22
|
+
const environmentFile = (0, _nodePath.resolve)(envPath);
|
|
23
|
+
const relativeEnvironmentFile = (0, _nodePath.relative)(configDirectory, environmentFile);
|
|
19
24
|
const userConfig = (0, _commentJson.parse)((0, _fs.readFileSync)(configFileName, {
|
|
20
25
|
encoding: "utf-8"
|
|
21
26
|
}));
|
|
22
|
-
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig)) {
|
|
27
|
+
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig) || Object.prototype.toString.call(userConfig) !== "[object Object]") {
|
|
23
28
|
return;
|
|
24
29
|
}
|
|
25
30
|
const output = [];
|
|
@@ -30,17 +35,32 @@ function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-na
|
|
|
30
35
|
// NOTE: This file should not be edited and should be committed with your source code. It is generated by ${name}. If you need to move or disable this file, please see the documentation.`);
|
|
31
36
|
output.push(`Created ${(0, _picocolors.cyan)(envPath)}`);
|
|
32
37
|
}
|
|
33
|
-
userConfig.include
|
|
34
|
-
|
|
35
|
-
userConfig.include.push(envPath);
|
|
38
|
+
if (Array.isArray(userConfig.include) && !(Array.isArray(userConfig.files) && userConfig.files.includes(relativeEnvironmentFile)) && !userConfig.include.includes(relativeEnvironmentFile)) {
|
|
39
|
+
userConfig.include.push(relativeEnvironmentFile);
|
|
36
40
|
updatedConfig = true;
|
|
37
41
|
output.push(`Updated ${configFileName} to include the ${(0, _picocolors.cyan)(envPath)} file`);
|
|
38
42
|
}
|
|
43
|
+
|
|
44
|
+
// Resolve inheritance on a copy so comments and the user's own settings survive.
|
|
45
|
+
const effectiveConfig = ts.parseJsonConfigFileContent(JSON.parse(JSON.stringify(userConfig)), ts.sys, configDirectory, {}, (0, _nodePath.resolve)(configFileName));
|
|
46
|
+
if (!effectiveConfig.fileNames.some(file => (0, _nodePath.resolve)(file) === environmentFile)) {
|
|
47
|
+
// A files entry can include the declaration even when inherited include or
|
|
48
|
+
// exclude settings omit it. Preserve the original implicit include as well.
|
|
49
|
+
if (effectiveConfig.raw.include === undefined && effectiveConfig.raw.files === undefined) {
|
|
50
|
+
userConfig.include = new _commentJson.CommentArray("**/*");
|
|
51
|
+
}
|
|
52
|
+
userConfig.files ??= new _commentJson.CommentArray(...(effectiveConfig.raw.files || []));
|
|
53
|
+
if (Array.isArray(userConfig.files) && !userConfig.files.includes(relativeEnvironmentFile)) {
|
|
54
|
+
userConfig.files.push(relativeEnvironmentFile);
|
|
55
|
+
updatedConfig = true;
|
|
56
|
+
output.push(`Updated ${configFileName} to include the ${(0, _picocolors.cyan)(envPath)} file`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
39
59
|
if (updatedConfig) {
|
|
40
60
|
(0, _fs.writeFileSync)(configFileName, (0, _commentJson.stringify)(userConfig, null, 2));
|
|
41
61
|
}
|
|
42
62
|
if (output.length) {
|
|
43
|
-
console.log(`${(0, _picocolors.cyan)((0, _picocolors.bold)("
|
|
63
|
+
console.log(`${(0, _picocolors.cyan)((0, _picocolors.bold)("Nativewind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
|
|
44
64
|
}
|
|
45
65
|
} catch {}
|
|
46
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fs","require","_commentJson","_picocolors","setupTypeScript","envPath","name","ts","configFileName","findConfigFile","sys","fileExists","userConfig","parse","readFileSync","encoding","Array","isArray","output","updatedConfig","existsSync","writeFileSync","push","cyan","include","
|
|
1
|
+
{"version":3,"names":["_fs","require","_nodePath","_commentJson","_picocolors","setupTypeScript","envPath","name","ts","configFileName","findConfigFile","resolve","sys","fileExists","configDirectory","dirname","environmentFile","relativeEnvironmentFile","relative","userConfig","parse","readFileSync","encoding","Array","isArray","Object","prototype","toString","call","output","updatedConfig","existsSync","writeFileSync","push","cyan","include","files","includes","effectiveConfig","parseJsonConfigFileContent","JSON","stringify","fileNames","some","file","raw","undefined","CommentArray","length","console","log","bold","join"],"sourceRoot":"../../../src","sources":["metro/typescript.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -40,13 +40,17 @@ var _reactivity = require("./reactivity.js");
|
|
|
40
40
|
var _resolve = require("./styles/resolve.js");
|
|
41
41
|
/* eslint-disable */
|
|
42
42
|
|
|
43
|
+
const defaultMapping = {
|
|
44
|
+
className: "style"
|
|
45
|
+
};
|
|
46
|
+
|
|
43
47
|
/**
|
|
44
48
|
* Generates a new Higher-Order component the wraps the base component and applies the styles.
|
|
45
49
|
* This is added to the `interopComponents` map so that it can be used in the `wrapJSX` function
|
|
46
50
|
* @param baseComponent
|
|
47
51
|
* @param mapping
|
|
48
52
|
*/
|
|
49
|
-
const styled = (baseComponent, mapping, options) => {
|
|
53
|
+
const styled = (baseComponent, mapping = defaultMapping, options) => {
|
|
50
54
|
let component;
|
|
51
55
|
// const type = getComponentType(baseComponent);
|
|
52
56
|
|
|
@@ -70,7 +74,7 @@ const colorScheme = exports.colorScheme = {
|
|
|
70
74
|
return _reactivity.colorScheme.get() ?? _reactNative.Appearance.getColorScheme() ?? "light";
|
|
71
75
|
},
|
|
72
76
|
set(value) {
|
|
73
|
-
return _reactivity.colorScheme.set(value);
|
|
77
|
+
return _reactivity.colorScheme.set(value === "unspecified" ? null : value);
|
|
74
78
|
}
|
|
75
79
|
};
|
|
76
80
|
const useUnstableNativeVariable = exports.useUnstableNativeVariable = useNativeVariable;
|
|
@@ -84,19 +88,23 @@ function useNativeVariable(name) {
|
|
|
84
88
|
name = name.slice(2);
|
|
85
89
|
}
|
|
86
90
|
const inheritedVariables = (0, _react.useContext)(_nativeInternal.VariableContext);
|
|
87
|
-
const [
|
|
91
|
+
const [, forceUpdate] = (0, _react.useState)(0);
|
|
92
|
+
const [effect] = (0, _react.useState)(() => {
|
|
88
93
|
const effect = {
|
|
89
94
|
observers: new Set(),
|
|
90
|
-
run: () =>
|
|
91
|
-
...state
|
|
92
|
-
}))
|
|
95
|
+
run: () => forceUpdate(state => state + 1)
|
|
93
96
|
};
|
|
94
97
|
const get = observable => observable.get(effect);
|
|
95
|
-
return {
|
|
96
|
-
...effect,
|
|
98
|
+
return Object.assign(effect, {
|
|
97
99
|
get
|
|
98
|
-
};
|
|
100
|
+
});
|
|
99
101
|
});
|
|
102
|
+
(0, _react.useEffect)(() => {
|
|
103
|
+
// React StrictMode replays setup after cleanup without another render.
|
|
104
|
+
if (effect.observers.size === 0) forceUpdate(state => state + 1);
|
|
105
|
+
return () => (0, _reactivity.cleanupEffect)(effect);
|
|
106
|
+
}, [effect]);
|
|
107
|
+
(0, _reactivity.cleanupEffect)(effect);
|
|
100
108
|
return (0, _resolve.resolveValue)([{}, "var", [name]], effect.get, {
|
|
101
109
|
inheritedVariables
|
|
102
110
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_nativeInternal","_useNativeCss","_usePassthrough","_reactivity","_resolve","styled","baseComponent","mapping","options","component","configs","mappingToConfig","passThrough","props","usePassthrough","useNativeCss","name","displayName","exports","colorScheme","get","colorSchemeObs","Appearance","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","useState","startsWith","slice","inheritedVariables","useContext","VariableContext","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_nativeInternal","_useNativeCss","_usePassthrough","_reactivity","_resolve","defaultMapping","className","styled","baseComponent","mapping","options","component","configs","mappingToConfig","passThrough","props","usePassthrough","useNativeCss","name","displayName","exports","colorScheme","get","colorSchemeObs","Appearance","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","useState","startsWith","slice","inheritedVariables","useContext","VariableContext","forceUpdate","effect","observers","Set","run","state","observable","Object","assign","useEffect","size","cleanupEffect","resolveValue","vars","variables","VAR_SYMBOL","fromEntries","entries","map","k","v","replace"],"sourceRoot":"../../../src","sources":["native/api.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,eAAA,GAAAF,OAAA;AAUA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAOA,IAAAM,QAAA,GAAAN,OAAA;AAxBA;;AAkCA,MAAMO,cAAsE,GAAG;EAC7EC,SAAS,EAAE;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,MAAc,GAAGA,CAC5BC,aAAkC,EAClCC,OAAiC,GAAGJ,cAAc,EAClDK,OAAuB,KACpB;EACH,IAAIC,SAAc;EAClB;;EAEA,MAAMC,OAAO,GAAG,IAAAC,6BAAe,EAACJ,OAAO,CAAC;EAExC,IAAIC,OAAO,EAAEI,WAAW,EAAE;IACxBH,SAAS,GAAII,KAA0B,IAAK;MAC1C,OAAO,IAAAC,8BAAc,EAACR,aAAa,EAAEO,KAAK,EAAEH,OAAO,CAAC;IACtD,CAAC;EACH,CAAC,MAAM;IACLD,SAAS,GAAII,KAA0B,IAAK;MAC1C,OAAO,IAAAE,0BAAY,EAACT,aAAa,EAAEO,KAAK,EAAEH,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,MAAMM,IAAI,GAAGV,aAAa,CAACW,WAAW,IAAIX,aAAa,CAACU,IAAI,IAAI,SAAS;EACzEP,SAAS,CAACQ,WAAW,GAAG,cAAcD,IAAI,EAAE;EAC5C,OAAOP,SAAS;AAClB,CAAC;AAACS,OAAA,CAAAb,MAAA,GAAAA,MAAA;AAEK,MAAMc,WAAwB,GAAAD,OAAA,CAAAC,WAAA,GAAG;EACtCC,GAAGA,CAAA,EAAG;IACJ,OAAOC,uBAAc,CAACD,GAAG,CAAC,CAAC,IAAIE,uBAAU,CAACC,cAAc,CAAC,CAAC,IAAI,OAAO;EACvE,CAAC;EACDC,GAAGA,CAACC,KAAK,EAAE;IACT,OAAOJ,uBAAc,CAACG,GAAG,CAACC,KAAK,KAAK,aAAa,GAAG,IAAI,GAAGA,KAAK,CAAC;EACnE;AACF,CAAC;AAEM,MAAMC,yBAAyB,GAAAR,OAAA,CAAAQ,yBAAA,GAAGC,iBAAiB;AAEnD,MAAMC,aAAa,GAAGA,CAI3BnB,SAAY,EACZoB,aAAoB,EACpBtB,OAAU,KACP;EACH,MAAM,CAACuB,MAAM,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM,IAAApB,6BAAe,EAACJ,OAAO,CAAC,CAAC;EACzD,OAAO,IAAAQ,0BAAY,EAACN,SAAS,EAAEoB,aAAa,EAAEC,MAAM,CAAC;AACvD,CAAC;AAACZ,OAAA,CAAAU,aAAA,GAAAA,aAAA;AAEK,SAASD,iBAAiBA,CAACX,IAAY,EAAE;EAC9C,IAAIA,IAAI,CAACgB,UAAU,CAAC,IAAI,CAAC,EAAE;IACzBhB,IAAI,GAAGA,IAAI,CAACiB,KAAK,CAAC,CAAC,CAAC;EACtB;EAEA,MAAMC,kBAAkB,GAAG,IAAAC,iBAAU,EAACC,+BAAe,CAAC;EACtD,MAAM,GAAGC,WAAW,CAAC,GAAG,IAAAN,eAAQ,EAAC,CAAC,CAAC;EACnC,MAAM,CAACO,MAAM,CAAC,GAAG,IAAAP,eAAQ,EAAC,MAAM;IAC9B,MAAMO,MAAc,GAAG;MACrBC,SAAS,EAAE,IAAIC,GAAG,CAAC,CAAC;MACpBC,GAAG,EAAEA,CAAA,KAAMJ,WAAW,CAAEK,KAAK,IAAKA,KAAK,GAAG,CAAC;IAC7C,CAAC;IAED,MAAMtB,GAAW,GAAIuB,UAAU,IAAKA,UAAU,CAACvB,GAAG,CAACkB,MAAM,CAAC;IAE1D,OAAOM,MAAM,CAACC,MAAM,CAACP,MAAM,EAAE;MAAElB;IAAI,CAAC,CAAC;EACvC,CAAC,CAAC;EAEF,IAAA0B,gBAAS,EAAC,MAAM;IACd;IACA,IAAIR,MAAM,CAACC,SAAS,CAACQ,IAAI,KAAK,CAAC,EAAEV,WAAW,CAAEK,KAAK,IAAKA,KAAK,GAAG,CAAC,CAAC;IAClE,OAAO,MAAM,IAAAM,yBAAa,EAACV,MAAM,CAAC;EACpC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EACZ,IAAAU,yBAAa,EAACV,MAAM,CAAC;EACrB,OAAO,IAAAW,qBAAY,EAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAACjC,IAAI,CAAC,CAAC,EAAEsB,MAAM,CAAClB,GAAG,EAAE;IAAEc;EAAmB,CAAC,CAAC;AAC9E;;AAEA;AACA;AACA;AACO,SAASgB,IAAIA,CAACC,SAA0C,EAAa;EAC1E,OAAOP,MAAM,CAACC,MAAM,CAClB;IAAE,CAACO,sBAAU,GAAG;EAAS,CAAC,EAC1BR,MAAM,CAACS,WAAW,CAChBT,MAAM,CAACU,OAAO,CAACH,SAAS,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK,CAACD,CAAC,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAED,CAAC,CAAC,CACrE,CACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ exports.testAttributes = testAttributes;
|
|
|
7
7
|
function testAttributes(queries, props, guards) {
|
|
8
8
|
return queries.every(query => testAttribute(query, props, guards));
|
|
9
9
|
}
|
|
10
|
-
function testAttribute([type, prop, operator, testValue], props, guards) {
|
|
10
|
+
function testAttribute([type, prop, operator, testValue, caseSensitivity], props, guards) {
|
|
11
11
|
let value = undefined;
|
|
12
12
|
if (props) {
|
|
13
13
|
if (type === "a") {
|
|
@@ -21,21 +21,28 @@ function testAttribute([type, prop, operator, testValue], props, guards) {
|
|
|
21
21
|
if (!operator) {
|
|
22
22
|
return value !== undefined && value !== null && value !== false;
|
|
23
23
|
}
|
|
24
|
+
if (operator === "!") return !value;
|
|
25
|
+
if (value === undefined || value === null || testValue === undefined) return false;
|
|
26
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return false;
|
|
27
|
+
let actual = String(value);
|
|
28
|
+
if (caseSensitivity === "i") {
|
|
29
|
+
// CSS attribute flags fold ASCII letters only, not Unicode characters.
|
|
30
|
+
actual = actual.replace(/[A-Z]/g, letter => letter.toLowerCase());
|
|
31
|
+
testValue = testValue.replace(/[A-Z]/g, letter => letter.toLowerCase());
|
|
32
|
+
}
|
|
24
33
|
switch (operator) {
|
|
25
|
-
case "!":
|
|
26
|
-
return !value;
|
|
27
34
|
case "=":
|
|
28
|
-
return
|
|
35
|
+
return actual === testValue;
|
|
29
36
|
case "~=":
|
|
30
|
-
return testValue &&
|
|
37
|
+
return testValue !== "" && actual.split(/[\t\n\f\r ]+/).includes(testValue);
|
|
31
38
|
case "|=":
|
|
32
|
-
return testValue
|
|
39
|
+
return actual === testValue || actual.startsWith(testValue + "-");
|
|
33
40
|
case "^=":
|
|
34
|
-
return testValue &&
|
|
41
|
+
return testValue !== "" && actual.startsWith(testValue);
|
|
35
42
|
case "$=":
|
|
36
|
-
return testValue &&
|
|
43
|
+
return testValue !== "" && actual.endsWith(testValue);
|
|
37
44
|
case "*=":
|
|
38
|
-
return testValue &&
|
|
45
|
+
return testValue !== "" && actual.includes(testValue);
|
|
39
46
|
default:
|
|
40
47
|
operator;
|
|
41
48
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["testAttributes","queries","props","guards","every","query","testAttribute","type","prop","operator","testValue","value","undefined","dataSet","push","
|
|
1
|
+
{"version":3,"names":["testAttributes","queries","props","guards","every","query","testAttribute","type","prop","operator","testValue","caseSensitivity","value","undefined","dataSet","push","actual","String","replace","letter","toLowerCase","split","includes","startsWith","endsWith"],"sourceRoot":"../../../../src","sources":["native/conditions/attributes.ts"],"mappings":";;;;;;AAIO,SAASA,cAAcA,CAC5BC,OAAyB,EACzBC,KAAiD,EACjDC,MAAqB,EACrB;EACA,OAAOF,OAAO,CAACG,KAAK,CAAEC,KAAK,IAAKC,aAAa,CAACD,KAAK,EAAEH,KAAK,EAAEC,MAAM,CAAC,CAAC;AACtE;AAEA,SAASG,aAAaA,CACpB,CAACC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,eAAe,CAAiB,EAClET,KAAiD,EACjDC,MAAqB,EACrB;EACA,IAAIS,KAAc,GAAGC,SAAS;EAE9B,IAAIX,KAAK,EAAE;IACT,IAAIK,IAAI,KAAK,GAAG,EAAE;MAChBK,KAAK,GAAGV,KAAK,CAACM,IAAI,CAAC;IACrB,CAAC,MAAM;MACL,MAAMM,OAAO,GAAGZ,KAAK,CAACY,OAA8C;MACpEF,KAAK,GAAGE,OAAO,GAAGN,IAAI,CAAC;IACzB;EACF;EAEAL,MAAM,CAACY,IAAI,CAAC,CAACR,IAAI,EAAEC,IAAI,EAAEI,KAAK,CAAC,CAAC;EAEhC,IAAI,CAACH,QAAQ,EAAE;IACb,OAAOG,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,KAAK;EACjE;EAEA,IAAIH,QAAQ,KAAK,GAAG,EAAE,OAAO,CAACG,KAAK;EACnC,IAAIA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIF,SAAS,KAAKG,SAAS,EAClE,OAAO,KAAK;EAEd,IACE,OAAOD,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,SAAS,EAE1B,OAAO,KAAK;EACd,IAAII,MAAM,GAAGC,MAAM,CAACL,KAAK,CAAC;EAC1B,IAAID,eAAe,KAAK,GAAG,EAAE;IAC3B;IACAK,MAAM,GAAGA,MAAM,CAACE,OAAO,CAAC,QAAQ,EAAGC,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC,CAAC,CAAC;IACnEV,SAAS,GAAGA,SAAS,CAACQ,OAAO,CAAC,QAAQ,EAAGC,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC,CAAC,CAAC;EAC3E;EAEA,QAAQX,QAAQ;IACd,KAAK,GAAG;MACN,OAAOO,MAAM,KAAKN,SAAS;IAC7B,KAAK,IAAI;MACP,OACEA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACK,KAAK,CAAC,cAAc,CAAC,CAACC,QAAQ,CAACZ,SAAS,CAAC;IAExE,KAAK,IAAI;MACP,OAAOM,MAAM,KAAKN,SAAS,IAAIM,MAAM,CAACO,UAAU,CAACb,SAAS,GAAG,GAAG,CAAC;IACnE,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACO,UAAU,CAACb,SAAS,CAAC;IACzD,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACQ,QAAQ,CAACd,SAAS,CAAC;IACvD,KAAK,IAAI;MACP,OAAOA,SAAS,KAAK,EAAE,IAAIM,MAAM,CAACM,QAAQ,CAACZ,SAAS,CAAC;IACvD;MACED,QAAQ;MACR,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
|
|
@@ -7,10 +7,9 @@ exports.DEFAULT_CONTAINER_NAME = void 0;
|
|
|
7
7
|
exports.testContainerQueries = testContainerQueries;
|
|
8
8
|
exports.testContainerQuery = testContainerQuery;
|
|
9
9
|
var _reactivity = require("../reactivity.js");
|
|
10
|
+
var _attributes = require("./attributes.js");
|
|
10
11
|
/* eslint-disable */
|
|
11
12
|
|
|
12
|
-
// import { testAttributes } from "./attributes";
|
|
13
|
-
|
|
14
13
|
const DEFAULT_CONTAINER_NAME = exports.DEFAULT_CONTAINER_NAME = "c:___default___";
|
|
15
14
|
function testContainerQueries(queries, inheritedContainers, guards, get) {
|
|
16
15
|
return queries.every(query => {
|
|
@@ -25,14 +24,15 @@ function testContainerQuery(query, inheritedContainers, guards, get) {
|
|
|
25
24
|
return false;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
// Ancestor snapshots have their own context guard. Their attributes must not
|
|
28
|
+
// be compared with this descendant's props by the ordinary attribute guards.
|
|
29
|
+
if (query.a && !(0, _attributes.testAttributes)(query.a, container.props, [])) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (query.m && !testContainerMediaCondition(query.m, container.key, get)) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
|
-
if (query.p && !testContainerPseudoCondition(query.p, container, get)) {
|
|
35
|
+
if (query.p && !testContainerPseudoCondition(query.p, container.key, get)) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
38
|
return true;
|
|
@@ -83,11 +83,11 @@ function testContainerMediaCondition(condition, containerKey, get) {
|
|
|
83
83
|
case ">":
|
|
84
84
|
return left > right;
|
|
85
85
|
case ">=":
|
|
86
|
-
return left
|
|
86
|
+
return left >= right;
|
|
87
87
|
case "<":
|
|
88
|
-
return left
|
|
88
|
+
return left < right;
|
|
89
89
|
case "<=":
|
|
90
|
-
return left
|
|
90
|
+
return left <= right;
|
|
91
91
|
default:
|
|
92
92
|
condition[0];
|
|
93
93
|
return false;
|