react-native-css 0.0.0-nightly.08286a2 → 0.0.0-nightly.0b4380e
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 +35 -5
- package/dist/commonjs/babel/helpers.js +7 -0
- package/dist/commonjs/babel/helpers.js.map +1 -1
- package/dist/commonjs/babel/import-plugin.js +20 -8
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +17 -4
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +9 -4
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +49 -10
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +188 -38
- 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 +159 -67
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inline-variables.js +47 -1
- package/dist/commonjs/compiler/inline-variables.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 +16 -4
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +20 -8
- 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 +313 -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 +4 -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 +24 -4
- 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/metro/warnings.js +135 -0
- package/dist/commonjs/metro/warnings.js.map +1 -0
- package/dist/commonjs/native/api.js +18 -10
- 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/guards.js +7 -0
- package/dist/commonjs/native/conditions/guards.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 +45 -38
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +80 -19
- 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 +64 -24
- 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 +165 -48
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/root.js +46 -7
- package/dist/commonjs/native-internal/root.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +22 -37
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/native-internal/variables.js +1 -1
- package/dist/commonjs/native-internal/variables.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/equality.js +41 -0
- package/dist/commonjs/utilities/equality.js.map +1 -0
- package/dist/commonjs/utilities/index.js +11 -0
- package/dist/commonjs/utilities/index.js.map +1 -1
- 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/helpers.js +6 -0
- package/dist/module/babel/helpers.js.map +1 -1
- package/dist/module/babel/import-plugin.js +22 -10
- 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 +9 -4
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +47 -10
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +190 -40
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +2 -0
- package/dist/module/compiler/compiler.types.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 +158 -67
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inline-variables.js +47 -1
- package/dist/module/compiler/inline-variables.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 +16 -5
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +20 -8
- 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 +313 -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 +4 -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 +24 -4
- 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/metro/warnings.js +131 -0
- package/dist/module/metro/warnings.js.map +1 -0
- package/dist/module/native/api.js +19 -12
- 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/guards.js +7 -0
- package/dist/module/native/conditions/guards.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 +46 -39
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +83 -22
- 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 +58 -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 +166 -50
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/root.js +44 -7
- package/dist/module/native-internal/root.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +10 -37
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/native-internal/variables.js +2 -2
- package/dist/module/native-internal/variables.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/equality.js +37 -0
- package/dist/module/utilities/equality.js.map +1 -0
- package/dist/module/utilities/index.js +1 -0
- package/dist/module/utilities/index.js.map +1 -1
- 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/helpers.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.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 +1 -5
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +13 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.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/inline-variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.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 +2 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +8 -8
- 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 +2 -10
- 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 +4 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
- 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/metro/warnings.d.ts +13 -0
- package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
- 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/conditions/guards.d.ts +2 -1
- package/dist/typescript/commonjs/src/native/conditions/guards.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 +7 -2
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -4
- 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 +15 -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 +5 -4
- 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 +3 -2
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +38 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/commonjs/src/native-internal/style-collection.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/equality.d.ts +2 -0
- package/dist/typescript/commonjs/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/utilities/index.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/helpers.d.ts +2 -1
- package/dist/typescript/module/src/babel/helpers.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 +3 -7
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +14 -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 +2 -2
- 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 +3 -2
- 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 +8 -8
- 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 +2 -10
- 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 +5 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
- 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/metro/warnings.d.ts +13 -0
- package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
- 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 +4 -3
- 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 +9 -4
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +5 -8
- 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 +15 -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 +9 -8
- 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 +4 -3
- 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 +39 -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 +3 -3
- 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/equality.d.ts +2 -0
- package/dist/typescript/module/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/index.d.ts +4 -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 +86 -39
- package/src/babel/helpers.ts +8 -1
- package/src/babel/import-plugin.ts +31 -16
- package/src/babel/react-native-web.ts +32 -4
- package/src/babel/react-native.ts +9 -4
- package/src/compiler/atRules.ts +60 -10
- package/src/compiler/compiler.ts +266 -49
- package/src/compiler/compiler.types.ts +17 -0
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +290 -105
- package/src/compiler/inline-variables.ts +67 -0
- 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 +32 -5
- package/src/compiler/stylesheet.ts +38 -15
- 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 +311 -0
- package/src/components/{index.tsx → index.ts} +0 -1
- package/src/jest/index.ts +5 -2
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +15 -166
- package/src/metro/metro-transformer.ts +41 -9
- package/src/metro/override.ts +1 -0
- package/src/metro/resolver.ts +29 -28
- package/src/metro/typescript.ts +53 -6
- package/src/metro/warnings.ts +187 -0
- package/src/native/api.tsx +26 -17
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/guards.ts +13 -1
- 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 +58 -45
- package/src/native/react/useNativeCss.ts +95 -21
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +79 -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 +444 -37
- 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 +242 -45
- package/src/native-internal/root.ts +83 -13
- package/src/native-internal/style-collection.ts +21 -46
- package/src/native-internal/variables.tsx +6 -4
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +12 -4
- package/src/utilities/equality.ts +41 -0
- package/src/utilities/index.ts +1 -0
- 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
package/src/compiler/compiler.ts
CHANGED
|
@@ -4,31 +4,61 @@ import { inspect } from "node:util";
|
|
|
4
4
|
import { debug } from "debug";
|
|
5
5
|
import {
|
|
6
6
|
type ContainerRule,
|
|
7
|
-
type MediaQuery as CSSMediaQuery,
|
|
8
7
|
type CustomAtRules,
|
|
9
8
|
type MediaRule,
|
|
9
|
+
type ParsedComponent,
|
|
10
|
+
type PropertyRule,
|
|
10
11
|
type Rule,
|
|
11
12
|
type Visitor,
|
|
13
|
+
type Warning,
|
|
12
14
|
} from "lightningcss";
|
|
13
15
|
|
|
14
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
maybeMutateReactNativeOptions,
|
|
18
|
+
parsePropAtRule,
|
|
19
|
+
parsePropDeclarations,
|
|
20
|
+
} from "./atRules";
|
|
15
21
|
import type {
|
|
16
22
|
CompilerOptions,
|
|
17
23
|
ContainerQuery,
|
|
24
|
+
StyleDescriptor,
|
|
18
25
|
StyleRuleMapping,
|
|
19
26
|
UniqueVarInfo,
|
|
20
27
|
} from "./compiler.types";
|
|
21
28
|
import { parseContainerCondition } from "./container-query";
|
|
22
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
parseAngle,
|
|
31
|
+
parseColor,
|
|
32
|
+
parseDeclaration,
|
|
33
|
+
parseLength,
|
|
34
|
+
reduceParseUnparsed,
|
|
35
|
+
round,
|
|
36
|
+
} from "./declarations";
|
|
23
37
|
import { inlineVariables } from "./inline-variables";
|
|
24
38
|
import { extractKeyFrames } from "./keyframes";
|
|
25
39
|
import { lightningcssLoader } from "./lightningcss-loader";
|
|
26
40
|
import { parseMediaQuery } from "./media-query";
|
|
41
|
+
import { isUniversalSelector } from "./selector-builder";
|
|
27
42
|
import { StylesheetBuilder } from "./stylesheet";
|
|
28
43
|
import { supportsConditionValid } from "./supports";
|
|
29
44
|
|
|
30
45
|
const defaultLogger = debug("react-native-css:compiler");
|
|
31
46
|
|
|
47
|
+
// lightningcss reports this package's own at-rule as unknown
|
|
48
|
+
const OWN_AT_RULE_WARNING = "Unknown at rule: @nativeMapping";
|
|
49
|
+
|
|
50
|
+
// The warning is the only record of what lightningcss could not parse; only the first pass reads the author's CSS
|
|
51
|
+
function reportSyntaxWarnings(
|
|
52
|
+
builder: StylesheetBuilder,
|
|
53
|
+
warnings: Warning[],
|
|
54
|
+
): void {
|
|
55
|
+
for (const warning of warnings) {
|
|
56
|
+
if (warning.message !== OWN_AT_RULE_WARNING) {
|
|
57
|
+
builder.addSyntaxWarning(warning.message);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
32
62
|
/**
|
|
33
63
|
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
34
64
|
*
|
|
@@ -74,17 +104,88 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
74
104
|
|
|
75
105
|
const vars = new Map<string, UniqueVarInfo>();
|
|
76
106
|
|
|
77
|
-
|
|
107
|
+
// Determine the effective rem multiplier for compile-time inlining.
|
|
108
|
+
// If inlineRem is explicitly set, use that. Otherwise, scan for
|
|
109
|
+
// :root { font-size: Npx } in the CSS to allow CSS-based configuration.
|
|
110
|
+
let effectiveRem: number | false = options.inlineRem ?? undefined!;
|
|
111
|
+
if (effectiveRem === undefined) {
|
|
112
|
+
const css = typeof code === "string" ? code : code.toString();
|
|
113
|
+
const match = css.match(/:root\s*\{[^}]*font-size:\s*([\d.]+)px/);
|
|
114
|
+
effectiveRem = match?.[1] ? parseFloat(match[1]) : 14;
|
|
115
|
+
options.inlineRem = effectiveRem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const inlining = options.inlineVariables !== false;
|
|
119
|
+
|
|
120
|
+
const firstPassVisitor: Visitor<CustomAtRules> = {
|
|
121
|
+
// Registered from the first pass, since lightningcss prints only the last @property of a name, valid or not
|
|
122
|
+
StyleSheetExit(sheet) {
|
|
123
|
+
const nonInheriting = registerProperties(
|
|
124
|
+
collectRegistrations(sheet.rules),
|
|
125
|
+
builder,
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
if (!inlining) {
|
|
129
|
+
return sheet;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const universalDeclarations = countUniversalDeclarations(sheet.rules);
|
|
133
|
+
|
|
134
|
+
// A non-inheriting property has one value on every element only when universal rules are all that declare it
|
|
135
|
+
const runtimeVariables = new Set(
|
|
136
|
+
Array.from(nonInheriting).filter((name) => {
|
|
137
|
+
const declarations = vars.get(name)?.count;
|
|
138
|
+
return (
|
|
139
|
+
declarations === undefined ||
|
|
140
|
+
universalDeclarations.get(name) !== declarations
|
|
141
|
+
);
|
|
142
|
+
}),
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
return inlineVariables(sheet, vars, runtimeVariables);
|
|
146
|
+
},
|
|
147
|
+
Rule(rule) {
|
|
148
|
+
if (
|
|
149
|
+
rule.type === "unknown" &&
|
|
150
|
+
["cssInterop", "react-native"].includes(rule.value.name)
|
|
151
|
+
) {
|
|
152
|
+
throw new Error(
|
|
153
|
+
`Unsupported @${rule.value.name} configuration. Use the compiler inlineVariables.exclude option to preserve variables, @media (prefers-color-scheme: dark) for dark mode, and React Native Appearance.setColorScheme() for manual selection.`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
// Reject before variable inlining can erase an unsupported condition and
|
|
157
|
+
// accidentally turn its values into unconditional declarations.
|
|
158
|
+
if (
|
|
159
|
+
rule.type === "style" &&
|
|
160
|
+
rule.value.selectors.some(
|
|
161
|
+
(selector) =>
|
|
162
|
+
selector.some(
|
|
163
|
+
(part) => part.type === "pseudo-class" && part.kind === "root",
|
|
164
|
+
) &&
|
|
165
|
+
selector.some(
|
|
166
|
+
(part) =>
|
|
167
|
+
part.type === "class" ||
|
|
168
|
+
(part.type === "attribute" && part.name === "class"),
|
|
169
|
+
),
|
|
170
|
+
)
|
|
171
|
+
) {
|
|
172
|
+
throw new Error(
|
|
173
|
+
"Class-qualified :root selectors are unsupported on native. Use @media (prefers-color-scheme: dark) for dark mode, and React Native Appearance.setColorScheme() for manual selection.",
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
};
|
|
78
178
|
|
|
79
|
-
if (
|
|
179
|
+
if (effectiveRem !== false) {
|
|
180
|
+
const remMultiplier = effectiveRem;
|
|
80
181
|
firstPassVisitor.Length = (length) => {
|
|
81
|
-
if (length.unit !== "rem"
|
|
82
|
-
return
|
|
182
|
+
if (length.unit !== "rem") {
|
|
183
|
+
return undefined;
|
|
83
184
|
}
|
|
84
185
|
|
|
85
186
|
return {
|
|
86
187
|
unit: "px",
|
|
87
|
-
value: round(length.value *
|
|
188
|
+
value: round(length.value * remMultiplier),
|
|
88
189
|
};
|
|
89
190
|
};
|
|
90
191
|
}
|
|
@@ -109,12 +210,9 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
109
210
|
vars.set(decl.value.name, entry);
|
|
110
211
|
}
|
|
111
212
|
};
|
|
112
|
-
firstPassVisitor.StyleSheetExit = (sheet) => {
|
|
113
|
-
return inlineVariables(sheet, vars);
|
|
114
|
-
};
|
|
115
213
|
}
|
|
116
214
|
|
|
117
|
-
const { code: firstPass } = lightningcss({
|
|
215
|
+
const { code: firstPass, warnings: firstPassWarnings } = lightningcss({
|
|
118
216
|
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
119
217
|
include: Features.DoublePositionGradients | Features.ColorFunction,
|
|
120
218
|
exclude: Features.VendorPrefixes,
|
|
@@ -147,7 +245,6 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
147
245
|
const visitor: Visitor<typeof customAtRules> = {
|
|
148
246
|
Rule(rule) {
|
|
149
247
|
maybeMutateReactNativeOptions(rule, builder);
|
|
150
|
-
return rule;
|
|
151
248
|
},
|
|
152
249
|
StyleSheetExit(sheet) {
|
|
153
250
|
if (isLoggerEnabled) {
|
|
@@ -164,7 +261,6 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
164
261
|
}
|
|
165
262
|
|
|
166
263
|
logger(`Exiting lightningcss`);
|
|
167
|
-
return sheet;
|
|
168
264
|
},
|
|
169
265
|
};
|
|
170
266
|
|
|
@@ -175,6 +271,8 @@ export function compile(code: Buffer | string, options: CompilerOptions = {}) {
|
|
|
175
271
|
projectRoot: options.projectRoot ?? process.cwd(),
|
|
176
272
|
});
|
|
177
273
|
|
|
274
|
+
reportSyntaxWarnings(builder, firstPassWarnings);
|
|
275
|
+
|
|
178
276
|
return {
|
|
179
277
|
stylesheet: () => builder.getNativeStyleSheet(),
|
|
180
278
|
warnings: () => builder.getWarnings(),
|
|
@@ -233,7 +331,12 @@ function extractRule(
|
|
|
233
331
|
const value = rule.value;
|
|
234
332
|
|
|
235
333
|
const declarationBlock = value.declarations;
|
|
236
|
-
mapping = {
|
|
334
|
+
mapping = {
|
|
335
|
+
...mapping,
|
|
336
|
+
...parsePropAtRule(value.rules),
|
|
337
|
+
...parsePropDeclarations(declarationBlock?.declarations),
|
|
338
|
+
...parsePropDeclarations(declarationBlock?.importantDeclarations),
|
|
339
|
+
};
|
|
237
340
|
|
|
238
341
|
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
239
342
|
builder = builder.fork("style", value.selectors);
|
|
@@ -276,13 +379,13 @@ function extractRule(
|
|
|
276
379
|
}
|
|
277
380
|
}
|
|
278
381
|
break;
|
|
382
|
+
case "property":
|
|
279
383
|
case "custom":
|
|
280
384
|
case "font-face":
|
|
281
385
|
case "font-palette-values":
|
|
282
386
|
case "font-feature-values":
|
|
283
387
|
case "namespace":
|
|
284
388
|
case "layer-statement":
|
|
285
|
-
case "property":
|
|
286
389
|
case "view-transition":
|
|
287
390
|
case "ignored":
|
|
288
391
|
case "unknown":
|
|
@@ -314,39 +417,16 @@ function extractMedia(
|
|
|
314
417
|
builder: StylesheetBuilder,
|
|
315
418
|
mapping: StyleRuleMapping,
|
|
316
419
|
) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
// Initialize an empty array to store screen media queries
|
|
320
|
-
const media: CSSMediaQuery[] = [];
|
|
321
|
-
|
|
322
|
-
// Iterate over all media queries in the mediaRule
|
|
420
|
+
// Comma separated queries are alternatives. Each branch inherits the outer
|
|
421
|
+
// conditions without adding its siblings as required conjunctions.
|
|
323
422
|
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
(mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not") ||
|
|
327
|
-
// If this is a @media not print {}
|
|
328
|
-
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
329
|
-
(mediaQuery.mediaType !== "print" &&
|
|
330
|
-
mediaQuery.qualifier === "not" &&
|
|
331
|
-
mediaQuery.condition === null)
|
|
332
|
-
) {
|
|
423
|
+
const queryBuilder = builder.fork("media");
|
|
424
|
+
if (!parseMediaQuery(mediaQuery, queryBuilder)) {
|
|
333
425
|
continue;
|
|
334
426
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (media.length === 0) {
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
for (const m of media) {
|
|
344
|
-
parseMediaQuery(m, builder);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
348
|
-
for (const rule of mediaRule.rules) {
|
|
349
|
-
extractRule(rule, builder, mapping);
|
|
427
|
+
for (const rule of mediaRule.rules) {
|
|
428
|
+
extractRule(rule, queryBuilder, mapping);
|
|
429
|
+
}
|
|
350
430
|
}
|
|
351
431
|
}
|
|
352
432
|
|
|
@@ -363,9 +443,12 @@ function extractContainer(
|
|
|
363
443
|
builder = builder.fork("container");
|
|
364
444
|
|
|
365
445
|
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
|
|
446
|
+
const condition = parseContainerCondition(containerRule.condition, builder);
|
|
447
|
+
if (!condition) {
|
|
448
|
+
// An unsupported condition must not turn into an unconditional container.
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
const query: ContainerQuery = { m: condition };
|
|
369
452
|
|
|
370
453
|
if (containerRule.name) {
|
|
371
454
|
query.n = `c:${containerRule.name}`;
|
|
@@ -377,3 +460,137 @@ function extractContainer(
|
|
|
377
460
|
extractRule(rule, builder, mapping);
|
|
378
461
|
}
|
|
379
462
|
}
|
|
463
|
+
|
|
464
|
+
// Browsers register the last @property of a name, in a layer, in @container and under an @supports that holds, and one in @media only while it matches
|
|
465
|
+
function collectRegistrations(
|
|
466
|
+
rules: readonly Rule[],
|
|
467
|
+
conditional = false,
|
|
468
|
+
registrations = new Map<string, PropertyRule>(),
|
|
469
|
+
) {
|
|
470
|
+
for (const rule of rules) {
|
|
471
|
+
switch (rule.type) {
|
|
472
|
+
case "property":
|
|
473
|
+
if (!conditional) {
|
|
474
|
+
registrations.set(rule.value.name, rule.value);
|
|
475
|
+
}
|
|
476
|
+
break;
|
|
477
|
+
case "media":
|
|
478
|
+
collectRegistrations(rule.value.rules, true, registrations);
|
|
479
|
+
break;
|
|
480
|
+
case "supports":
|
|
481
|
+
collectRegistrations(
|
|
482
|
+
rule.value.rules,
|
|
483
|
+
conditional || !supportsConditionValid(rule.value.condition),
|
|
484
|
+
registrations,
|
|
485
|
+
);
|
|
486
|
+
break;
|
|
487
|
+
case "container":
|
|
488
|
+
case "layer-block":
|
|
489
|
+
collectRegistrations(rule.value.rules, conditional, registrations);
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return registrations;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// Registers the properties whose initial value has a descriptor, and returns the names that do not inherit
|
|
498
|
+
function registerProperties(
|
|
499
|
+
registrations: ReadonlyMap<string, PropertyRule>,
|
|
500
|
+
builder: StylesheetBuilder,
|
|
501
|
+
): ReadonlySet<string> {
|
|
502
|
+
const nonInheriting = new Set<string>();
|
|
503
|
+
|
|
504
|
+
for (const [name, { inherits, initialValue }] of registrations) {
|
|
505
|
+
const value =
|
|
506
|
+
initialValue == null
|
|
507
|
+
? undefined
|
|
508
|
+
: parsePropertyInitialValue(initialValue, builder);
|
|
509
|
+
|
|
510
|
+
// Left unregistered, since without its initial value the property would fall back where CSS gives that value
|
|
511
|
+
if (initialValue != null && value === undefined) {
|
|
512
|
+
continue;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
builder.registerProperty(name.slice(2), inherits, value);
|
|
516
|
+
if (!inherits) {
|
|
517
|
+
nonInheriting.add(name);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return nonInheriting;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// Counts each custom property's declarations in universal rules every element shares: at the top level, in a layer or under an @supports, whose declarations the inliner reads too, and not under @media or @container
|
|
525
|
+
function countUniversalDeclarations(
|
|
526
|
+
rules: readonly Rule[],
|
|
527
|
+
counts = new Map<string, number>(),
|
|
528
|
+
) {
|
|
529
|
+
for (const rule of rules) {
|
|
530
|
+
switch (rule.type) {
|
|
531
|
+
case "style":
|
|
532
|
+
if (rule.value.selectors.some(isUniversalSelector)) {
|
|
533
|
+
const { declarations = [], importantDeclarations = [] } =
|
|
534
|
+
rule.value.declarations ?? {};
|
|
535
|
+
for (const declaration of [
|
|
536
|
+
...declarations,
|
|
537
|
+
...importantDeclarations,
|
|
538
|
+
]) {
|
|
539
|
+
if (declaration.property === "custom") {
|
|
540
|
+
const { name } = declaration.value;
|
|
541
|
+
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
break;
|
|
546
|
+
case "layer-block":
|
|
547
|
+
countUniversalDeclarations(rule.value.rules, counts);
|
|
548
|
+
break;
|
|
549
|
+
case "supports":
|
|
550
|
+
countUniversalDeclarations(rule.value.rules, counts);
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
return counts;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
function parsePropertyInitialValue(
|
|
559
|
+
component: ParsedComponent,
|
|
560
|
+
builder: StylesheetBuilder,
|
|
561
|
+
): StyleDescriptor {
|
|
562
|
+
switch (component.type) {
|
|
563
|
+
case "length":
|
|
564
|
+
return parseLength(component.value, builder);
|
|
565
|
+
case "number":
|
|
566
|
+
case "integer":
|
|
567
|
+
return round(component.value);
|
|
568
|
+
case "percentage":
|
|
569
|
+
return `${round(component.value * 100)}%`;
|
|
570
|
+
case "color":
|
|
571
|
+
return parseColor(component.value, builder);
|
|
572
|
+
case "angle":
|
|
573
|
+
return parseAngle(component.value, builder);
|
|
574
|
+
case "length-percentage":
|
|
575
|
+
return parseLength(component.value, builder);
|
|
576
|
+
case "token-list":
|
|
577
|
+
return reduceParseUnparsed(component.value, builder, "@property", false);
|
|
578
|
+
case "custom-ident":
|
|
579
|
+
case "literal":
|
|
580
|
+
return component.value;
|
|
581
|
+
case "repeated": {
|
|
582
|
+
const results = component.value.components.map((item) =>
|
|
583
|
+
parsePropertyInitialValue(item, builder),
|
|
584
|
+
);
|
|
585
|
+
if (results.includes(undefined)) {
|
|
586
|
+
return undefined;
|
|
587
|
+
}
|
|
588
|
+
// Unwrap single-child repeated values so downstream consumers get a
|
|
589
|
+
// scalar instead of a 1-element array. For example, `<length>+` with
|
|
590
|
+
// initial-value `10px` should produce the same shape as `<length>`.
|
|
591
|
+
return results.length === 1 ? results[0] : results;
|
|
592
|
+
}
|
|
593
|
+
default:
|
|
594
|
+
return undefined;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
@@ -24,6 +24,15 @@ export interface InlineVariableOptions {
|
|
|
24
24
|
exclude?: `--${string}`[];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
// A channel is absent when the compile recorded nothing on it
|
|
28
|
+
export interface CompilerWarnings {
|
|
29
|
+
properties?: string[];
|
|
30
|
+
values?: Record<string, string[]>;
|
|
31
|
+
functions?: string[];
|
|
32
|
+
// CSS lightningcss could not parse, which the author fixes in their stylesheet
|
|
33
|
+
syntax?: string[];
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
/**
|
|
28
37
|
* A `react-native-css` StyleSheet
|
|
29
38
|
*/
|
|
@@ -40,6 +49,8 @@ export interface ReactNativeCssStyleSheet {
|
|
|
40
49
|
vr?: RootVariables;
|
|
41
50
|
/** Universal Variables */
|
|
42
51
|
vu?: RootVariables;
|
|
52
|
+
/** Registered Properties */
|
|
53
|
+
vp?: PropertyRegistration[];
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
/******************************** Styles ********************************/
|
|
@@ -154,6 +165,12 @@ export type VariableValue =
|
|
|
154
165
|
|
|
155
166
|
export type RootVariables = [string, VariableValue[]][];
|
|
156
167
|
|
|
168
|
+
export type PropertyRegistration = readonly [
|
|
169
|
+
string, // name
|
|
170
|
+
boolean, // inherits
|
|
171
|
+
StyleDescriptor?, // initial value
|
|
172
|
+
];
|
|
173
|
+
|
|
157
174
|
export type InlineVariable = {
|
|
158
175
|
[VAR_SYMBOL]: "inline";
|
|
159
176
|
[key: string]: unknown | undefined;
|
|
@@ -36,9 +36,14 @@ function parseContainerQueryCondition(
|
|
|
36
36
|
const query = parseContainerCondition(condition.value, builder);
|
|
37
37
|
return query ? ["!", query] : undefined;
|
|
38
38
|
case "operation":
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const parsed = condition.conditions.map((c) =>
|
|
40
|
+
parseContainerCondition(c, builder),
|
|
41
|
+
);
|
|
42
|
+
if (condition.operator === "and" && parsed.some((c) => !c)) {
|
|
43
|
+
// Dropping a conjunct would broaden the query to unrelated containers.
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const conditions = parsed.filter((c): c is MediaCondition => !!c);
|
|
42
47
|
|
|
43
48
|
if (conditions.length === 0) {
|
|
44
49
|
return;
|