react-native-css 0.0.0-nightly.416840c → 0.0.0-nightly.4562bdf
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 +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +198 -39
- 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 +248 -96
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/individual-transforms.js +129 -0
- package/dist/commonjs/compiler/individual-transforms.js.map +1 -0
- package/dist/commonjs/compiler/inline-variables.js +47 -1
- package/dist/commonjs/compiler/inline-variables.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 +18 -6
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +33 -9
- 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 +4 -4
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
- package/dist/commonjs/components/Button.js +4 -4
- package/dist/commonjs/components/Button.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +5 -4
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/Image.js +4 -4
- package/dist/commonjs/components/Image.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +6 -10
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +6 -7
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/commonjs/components/Pressable.js +4 -4
- 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 +4 -4
- package/dist/commonjs/components/ScrollView.js.map +1 -1
- package/dist/commonjs/components/Switch.js +4 -4
- package/dist/commonjs/components/Switch.js.map +1 -1
- package/dist/commonjs/components/Text.js +4 -4
- package/dist/commonjs/components/Text.js.map +1 -1
- package/dist/commonjs/components/TextInput.js +4 -4
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/TouchableHighlight.js +4 -4
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
- package/dist/commonjs/components/TouchableOpacity.js +4 -4
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
- package/dist/commonjs/components/TouchableWithoutFeedback.js +4 -4
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/commonjs/components/View.js +4 -4
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/components/VirtualizedList.js +4 -4
- 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 +52 -4
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.native.js +10 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/commonjs/jest/index.js +3 -1
- 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 +2 -0
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +16 -3
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/resolver.js +5 -3
- 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 +21 -12
- 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/objects.js +11 -18
- package/dist/commonjs/native/objects.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/native/reactivity.js +150 -68
- 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 +139 -26
- package/dist/commonjs/native/styles/calculate-props.js.map +1 -1
- package/dist/commonjs/native/styles/functions/animation-timing.js +2 -1
- package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +68 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +19 -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/platform-functions.js +2 -1
- package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +22 -6
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +95 -105
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +361 -34
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +136 -19
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +12 -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 +6 -3
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +41 -20
- 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/shorthands/transform.js +31 -8
- package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -1
- package/dist/commonjs/native/styles/variables.js +173 -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 +56 -74
- 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/specificity.js +12 -12
- package/dist/commonjs/utilities/specificity.js.map +1 -1
- package/dist/commonjs/utilities/style-descriptor.js +32 -8
- 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 +33 -0
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +200 -41
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +4 -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 +247 -95
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/individual-transforms.js +125 -0
- package/dist/module/compiler/individual-transforms.js.map +1 -0
- package/dist/module/compiler/inline-variables.js +47 -1
- package/dist/module/compiler/inline-variables.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 +18 -7
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +33 -9
- 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 +3 -2
- package/dist/module/components/ActivityIndicator.js.map +1 -1
- package/dist/module/components/Button.js +3 -2
- package/dist/module/components/Button.js.map +1 -1
- package/dist/module/components/FlatList.js +4 -2
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/Image.js +3 -2
- package/dist/module/components/Image.js.map +1 -1
- package/dist/module/components/ImageBackground.js +5 -8
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +5 -5
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/module/components/Pressable.js +3 -2
- 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 +3 -2
- package/dist/module/components/ScrollView.js.map +1 -1
- package/dist/module/components/Switch.js +3 -2
- package/dist/module/components/Switch.js.map +1 -1
- package/dist/module/components/Text.js +3 -2
- package/dist/module/components/Text.js.map +1 -1
- package/dist/module/components/TextInput.js +3 -2
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/TouchableHighlight.js +3 -2
- package/dist/module/components/TouchableHighlight.js.map +1 -1
- package/dist/module/components/TouchableOpacity.js +3 -2
- package/dist/module/components/TouchableOpacity.js.map +1 -1
- package/dist/module/components/TouchableWithoutFeedback.js +3 -2
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/module/components/View.js +3 -2
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/components/VirtualizedList.js +3 -2
- 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 +52 -4
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/components/react-native-safe-area-context.native.js +9 -1
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/module/jest/index.js +3 -1
- 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 +2 -0
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +16 -3
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/resolver.js +5 -3
- 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 +22 -14
- 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/objects.js +11 -18
- package/dist/module/native/objects.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/native/reactivity.js +131 -66
- 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 +139 -26
- package/dist/module/native/styles/calculate-props.js.map +1 -1
- package/dist/module/native/styles/functions/animation-timing.js +2 -1
- package/dist/module/native/styles/functions/animation-timing.js.map +1 -1
- package/dist/module/native/styles/functions/color-mix.js +63 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +17 -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/platform-functions.js +2 -1
- package/dist/module/native/styles/functions/platform-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +19 -5
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +93 -104
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +362 -34
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +136 -19
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +8 -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 +6 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/box-shadow.js +43 -21
- 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/shorthands/transform.js +31 -8
- package/dist/module/native/styles/shorthands/transform.js.map +1 -1
- package/dist/module/native/styles/variables.js +174 -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 +45 -75
- 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/specificity.js +12 -12
- package/dist/module/utilities/specificity.js.map +1 -1
- package/dist/module/utilities/style-descriptor.js +30 -8
- 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 +26 -12
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -3
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts.map +1 -0
- 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/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 +10 -10
- 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 +2 -2
- 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 +2 -2
- 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/react-native-safe-area-context.native.d.ts +2 -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 +4 -12
- 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 +8 -4
- 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/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/objects.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/reactivity.d.ts +36 -18
- 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/calculate-props.d.ts +11 -2
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.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/platform-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 +2 -0
- 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 +16 -4
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +4 -1
- 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.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/shorthands/transform.d.ts.map +1 -1
- 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 +45 -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 +20 -15
- 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/specificity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +14 -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 +27 -13
- 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 +5 -5
- 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/individual-transforms.d.ts +10 -0
- package/dist/typescript/module/src/compiler/individual-transforms.d.ts.map +1 -0
- 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 +2 -2
- 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 +10 -10
- 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 +2 -2
- 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 +2 -2
- 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.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 +2 -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 +4 -12
- 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 +9 -5
- 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/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/objects.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/reactivity.d.ts +36 -18
- 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 +13 -4
- 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 +3 -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 +20 -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 +7 -4
- 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 +2 -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 +46 -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 +20 -15
- 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 +14 -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 +81 -33
- 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 +44 -0
- package/src/compiler/compiler.ts +282 -50
- package/src/compiler/compiler.types.ts +30 -12
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +499 -241
- package/src/compiler/individual-transforms.ts +129 -0
- package/src/compiler/inline-variables.ts +67 -0
- package/src/compiler/lightningcss-loader.ts +21 -1
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +34 -7
- package/src/compiler/stylesheet.ts +51 -15
- package/src/compiler/supports.ts +2 -2
- package/src/components/ActivityIndicator.tsx +8 -5
- package/src/components/Button.tsx +8 -3
- package/src/components/FlatList.tsx +14 -4
- package/src/components/Image.tsx +8 -3
- package/src/components/ImageBackground.tsx +10 -11
- package/src/components/KeyboardAvoidingView.tsx +10 -8
- package/src/components/Pressable.tsx +8 -3
- package/src/components/SafeAreaProvider.tsx +1 -0
- package/src/components/ScrollView.tsx +8 -5
- package/src/components/Switch.tsx +8 -3
- package/src/components/Text.tsx +8 -3
- package/src/components/TextInput.tsx +8 -3
- package/src/components/TouchableHighlight.tsx +8 -5
- package/src/components/TouchableOpacity.tsx +8 -5
- package/src/components/TouchableWithoutFeedback.tsx +8 -5
- package/src/components/View.tsx +8 -3
- package/src/components/VirtualizedList.tsx +17 -5
- package/src/components/copyComponentProperties.ts +21 -0
- package/src/components/index.cts +52 -4
- package/src/components/react-native-safe-area-context.native.tsx +20 -0
- package/src/jest/index.ts +7 -3
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +11 -4
- package/src/metro/metro-transformer.ts +26 -8
- package/src/metro/resolver.ts +10 -3
- package/src/metro/typescript.ts +53 -6
- package/src/metro/warnings.ts +187 -0
- package/src/native/api.tsx +32 -18
- 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/objects.ts +12 -22
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +58 -45
- package/src/native/react/useNativeCss.ts +100 -22
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +169 -71
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/calculate-props.ts +179 -28
- package/src/native/styles/functions/animation-timing.ts +3 -1
- package/src/native/styles/functions/color-mix.ts +82 -0
- package/src/native/styles/functions/filters.ts +21 -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/platform-functions.ts +3 -1
- package/src/native/styles/functions/string-functions.ts +25 -5
- package/src/native/styles/functions/transform-functions.ts +111 -64
- package/src/native/styles/index.ts +425 -43
- package/src/native/styles/resolve.ts +188 -29
- package/src/native/styles/scale-factor.ts +9 -0
- package/src/native/styles/shorthands/_handler.ts +14 -1
- package/src/native/styles/shorthands/animation.ts +8 -2
- package/src/native/styles/shorthands/box-shadow.ts +46 -25
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/shorthands/transform.ts +36 -11
- package/src/native/styles/variables.ts +251 -45
- package/src/native-internal/root.ts +83 -13
- package/src/native-internal/style-collection.ts +64 -95
- package/src/native-internal/variables.tsx +6 -4
- package/src/runtime.types.ts +38 -29
- 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/specificity.ts +13 -12
- package/src/utilities/style-descriptor.ts +36 -14
- package/src/web/api.tsx +17 -13
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +14 -31
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.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/typescript/commonjs/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
- package/dist/typescript/commonjs/eslint.config.d.mts.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/index.d.ts +0 -2
- package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
- 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/module/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/eslint.config.d.mts +0 -2
- package/dist/typescript/module/eslint.config.d.mts.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/index.d.ts +0 -2
- package/dist/typescript/module/example/index.d.ts.map +0 -1
- package/dist/typescript/module/example/metro.config.d.ts +0 -3
- package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/module/example/postcss.config.d.mts +0 -7
- package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/module/example/src/App.d.ts +0 -3
- 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/src/compiler/inheritance.test.ts +0 -121
|
@@ -5,6 +5,11 @@ import type {
|
|
|
5
5
|
StyleDescriptor,
|
|
6
6
|
StyleFunction,
|
|
7
7
|
} from "react-native-css/compiler";
|
|
8
|
+
import {
|
|
9
|
+
isCommaList,
|
|
10
|
+
isStyleDescriptorArray,
|
|
11
|
+
isStyleFunction,
|
|
12
|
+
} from "react-native-css/utilities";
|
|
8
13
|
|
|
9
14
|
import type { RenderGuard } from "../conditions/guards";
|
|
10
15
|
import { type Getter, type VariableContextValue } from "../reactivity";
|
|
@@ -12,6 +17,7 @@ import type { calculateProps } from "./calculate-props";
|
|
|
12
17
|
import { transformKeys } from "./defaults";
|
|
13
18
|
import * as functions from "./functions";
|
|
14
19
|
import { lineHeight } from "./line-height";
|
|
20
|
+
import { scaleFactor } from "./scale-factor";
|
|
15
21
|
import * as shorthands from "./shorthands";
|
|
16
22
|
import { em, rem, vh, vw } from "./units";
|
|
17
23
|
import { varResolver } from "./variables";
|
|
@@ -51,6 +57,7 @@ export type ResolveValueOptions = {
|
|
|
51
57
|
inlineVariables?: InlineVariable | undefined;
|
|
52
58
|
renderGuards?: RenderGuard[];
|
|
53
59
|
variableHistory?: Set<string>;
|
|
60
|
+
variableCycles?: Set<string>;
|
|
54
61
|
/** Pass down to perform recursive calculations and avoid circular dependencies */
|
|
55
62
|
calculateProps?: typeof calculateProps;
|
|
56
63
|
};
|
|
@@ -59,6 +66,8 @@ export function resolveValue(
|
|
|
59
66
|
value: StyleDescriptor,
|
|
60
67
|
get: Getter,
|
|
61
68
|
options: ResolveValueOptions,
|
|
69
|
+
/** The caller has already found value to be a style function */
|
|
70
|
+
isFunction?: boolean,
|
|
62
71
|
): any {
|
|
63
72
|
const { castToArray } = options;
|
|
64
73
|
|
|
@@ -77,7 +86,7 @@ export function resolveValue(
|
|
|
77
86
|
return null;
|
|
78
87
|
} else if (value.endsWith("px")) {
|
|
79
88
|
// Inline vars() might set a value with a px suffix
|
|
80
|
-
return
|
|
89
|
+
return parseFloat(value.slice(0, -2));
|
|
81
90
|
} else {
|
|
82
91
|
return value;
|
|
83
92
|
}
|
|
@@ -87,26 +96,18 @@ export function resolveValue(
|
|
|
87
96
|
return value;
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
if (
|
|
91
|
-
value
|
|
92
|
-
.map((d) => resolveValue(d, get, options))
|
|
93
|
-
.filter((d) => d !== undefined);
|
|
94
|
-
|
|
95
|
-
if (castToArray && !Array.isArray(value)) {
|
|
96
|
-
return [value];
|
|
97
|
-
} else {
|
|
98
|
-
return value;
|
|
99
|
-
}
|
|
99
|
+
if (!isFunction && isStyleDescriptorArray(value)) {
|
|
100
|
+
return resolveList(value, get, options);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
const name = value[1];
|
|
103
|
+
const name = (value as StyleFunction)[1];
|
|
103
104
|
|
|
104
105
|
const simpleResolve: SimpleResolveValue = (value) => {
|
|
105
106
|
return resolveValue(value, get, options);
|
|
106
107
|
};
|
|
107
108
|
|
|
108
109
|
if (name === "var") {
|
|
109
|
-
return varResolver(simpleResolve, value, get, options);
|
|
110
|
+
return varResolver(simpleResolve, value as StyleFunction, get, options);
|
|
110
111
|
} else if (name in functionResolvers) {
|
|
111
112
|
const fn = functionResolvers[name as keyof typeof functionResolvers];
|
|
112
113
|
|
|
@@ -122,22 +123,25 @@ export function resolveValue(
|
|
|
122
123
|
) as StyleDescriptor;
|
|
123
124
|
} else if (transformKeys.has(name)) {
|
|
124
125
|
// translate, rotate, scale, etc.
|
|
125
|
-
|
|
126
|
+
const resolved = simpleResolve(value[2], castToArray);
|
|
127
|
+
// CSS scale percentages describe a factor, unlike translation percentages.
|
|
128
|
+
const component =
|
|
129
|
+
name === "scaleX" || name === "scaleY" || name === "scale"
|
|
130
|
+
? scaleFactor(resolved)
|
|
131
|
+
: resolved;
|
|
132
|
+
|
|
133
|
+
return component === undefined || component === null
|
|
134
|
+
? null
|
|
135
|
+
: { [name]: component };
|
|
126
136
|
} else {
|
|
127
137
|
let args = simpleResolve(value[2], castToArray);
|
|
128
138
|
|
|
129
139
|
if (args === undefined) {
|
|
130
140
|
return;
|
|
131
141
|
} else if (Array.isArray(args)) {
|
|
132
|
-
let joinedArgs = args
|
|
133
|
-
.map((
|
|
134
|
-
|
|
135
|
-
return arg.flat().join(" ");
|
|
136
|
-
}
|
|
137
|
-
return arg;
|
|
138
|
-
})
|
|
139
|
-
.filter((value) => value !== "/")
|
|
140
|
-
.join(", ");
|
|
142
|
+
let joinedArgs = isCommaList(args)
|
|
143
|
+
? args.map((item: readonly unknown[]) => item.join(" ")).join(", ")
|
|
144
|
+
: args.join(" ");
|
|
141
145
|
|
|
142
146
|
if (name === "radial-gradient") {
|
|
143
147
|
// Nativewind / Tailwind CSS hack which can force the 'in oklab' color space
|
|
@@ -155,10 +159,165 @@ export function resolveValue(
|
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
161
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Resolves a list descriptor. A comma-separated list holds each item as the
|
|
164
|
+
* array of its tokens; anything else is a space-separated list of tokens.
|
|
165
|
+
*
|
|
166
|
+
* A token that resolves to a list is substituted by its tokens, as
|
|
167
|
+
* css-variables-1 §3 substitutes a var(): a space-separated list joins the
|
|
168
|
+
* current item, and a comma-separated one splits it.
|
|
169
|
+
*
|
|
170
|
+
* Resolved values are resolved again (variables cache them), so the result
|
|
171
|
+
* keeps the same shape: a flat array for a space-separated list, an array of
|
|
172
|
+
* arrays for a comma-separated one.
|
|
173
|
+
*/
|
|
174
|
+
function resolveList(
|
|
175
|
+
list: StyleDescriptor[],
|
|
176
|
+
get: Getter,
|
|
177
|
+
options: ResolveValueOptions,
|
|
178
|
+
): unknown[] {
|
|
179
|
+
// Classify the first entry once: a style function is a token, any other
|
|
180
|
+
// array is an item of a comma-separated list. Only an array led by a plain
|
|
181
|
+
// object needs isStyleFunction's Object.keys, and resolveValue is told the
|
|
182
|
+
// answer so it does not pay for it twice.
|
|
183
|
+
const first = list[0];
|
|
184
|
+
let isCommaSeparated = false;
|
|
185
|
+
let firstIsFunction = false;
|
|
186
|
+
|
|
187
|
+
if (Array.isArray(first)) {
|
|
188
|
+
const lead: unknown = first[0];
|
|
189
|
+
if (
|
|
190
|
+
typeof lead === "object" &&
|
|
191
|
+
lead !== null &&
|
|
192
|
+
!Array.isArray(lead) &&
|
|
193
|
+
isStyleFunction(first)
|
|
194
|
+
) {
|
|
195
|
+
firstIsFunction = true;
|
|
196
|
+
} else {
|
|
197
|
+
isCommaSeparated = true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (!isCommaSeparated && list.length === 1) {
|
|
202
|
+
// Fast path for a lone token: its list, if it resolves to one, is the value
|
|
203
|
+
const resolved: unknown = resolveValue(first, get, options, firstIsFunction);
|
|
204
|
+
return Array.isArray(resolved)
|
|
205
|
+
? resolved
|
|
206
|
+
: resolved === undefined
|
|
207
|
+
? []
|
|
208
|
+
: [resolved];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Allocated only once the list turns out to be comma-separated
|
|
212
|
+
let items: unknown[][] | undefined = isCommaSeparated ? [] : undefined;
|
|
213
|
+
let item: unknown[] = [];
|
|
214
|
+
|
|
215
|
+
// Indexed loops and the inlined common case of appendList: this runs for
|
|
216
|
+
// every list on every render, and Hermes pays for iterators and calls
|
|
217
|
+
for (let index = 0; index < list.length; index++) {
|
|
218
|
+
const entry = list[index];
|
|
219
|
+
|
|
220
|
+
if (isCommaSeparated && (index === 0 || isItem(entry))) {
|
|
221
|
+
const tokens = entry as StyleDescriptor[];
|
|
222
|
+
|
|
223
|
+
// In a comma-separated list the item is empty here, as each entry closes it
|
|
224
|
+
if (tokens.length === 1) {
|
|
225
|
+
// Fast path for a one-token item, as most are: no item to build and reset
|
|
226
|
+
const resolved: unknown = resolveValue(tokens[0], get, options);
|
|
227
|
+
if (!Array.isArray(resolved)) {
|
|
228
|
+
if (resolved !== undefined) items!.push([resolved]);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
item = appendList(resolved, item, (items ??= []));
|
|
232
|
+
} else {
|
|
233
|
+
for (let tokenIndex = 0; tokenIndex < tokens.length; tokenIndex++) {
|
|
234
|
+
const resolved: unknown = resolveValue(
|
|
235
|
+
tokens[tokenIndex],
|
|
236
|
+
get,
|
|
237
|
+
options,
|
|
238
|
+
);
|
|
239
|
+
if (!Array.isArray(resolved)) {
|
|
240
|
+
if (resolved !== undefined) item.push(resolved);
|
|
241
|
+
} else {
|
|
242
|
+
item = appendList(resolved, item, (items ??= []));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
} else {
|
|
247
|
+
// A lone token in an item's place, or a space-separated list's token
|
|
248
|
+
const resolved: unknown = resolveValue(
|
|
249
|
+
entry,
|
|
250
|
+
get,
|
|
251
|
+
options,
|
|
252
|
+
index === 0 && firstIsFunction,
|
|
253
|
+
);
|
|
254
|
+
if (!Array.isArray(resolved)) {
|
|
255
|
+
if (resolved !== undefined) item.push(resolved);
|
|
256
|
+
} else {
|
|
257
|
+
item = appendList(resolved, item, (items ??= []));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (isCommaSeparated && item.length > 0) {
|
|
262
|
+
items!.push(item);
|
|
263
|
+
item = [];
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (items === undefined || items.length === 0) {
|
|
268
|
+
return item;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (item.length > 0) items.push(item);
|
|
272
|
+
return items;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Whether an entry after the first of a comma-separated list is an item, an
|
|
277
|
+
* array of tokens, rather than a lone token in an item's place. Only a style
|
|
278
|
+
* function, `[{}, name]`, is an array led by a plain object, so the full
|
|
279
|
+
* check runs only for one of those or for a resolved item led by an object,
|
|
280
|
+
* such as `[{ rotate }, "x"]`.
|
|
281
|
+
*/
|
|
282
|
+
function isItem(entry: StyleDescriptor): entry is StyleDescriptor[] {
|
|
283
|
+
if (!Array.isArray(entry)) return false;
|
|
284
|
+
const lead: unknown = entry[0];
|
|
285
|
+
return (
|
|
286
|
+
typeof lead !== "object" ||
|
|
287
|
+
lead === null ||
|
|
288
|
+
Array.isArray(lead) ||
|
|
289
|
+
!isStyleFunction(entry)
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Substitutes a resolved list into the current item and returns the item
|
|
295
|
+
* later tokens join. A resolved value holds no style functions, so a list led
|
|
296
|
+
* by an array is comma-separated: its first item continues the current one
|
|
297
|
+
* and each later item starts its own. Any other list joins the current item.
|
|
298
|
+
*/
|
|
299
|
+
function appendList(
|
|
300
|
+
resolved: unknown[],
|
|
301
|
+
item: unknown[],
|
|
302
|
+
items: unknown[][],
|
|
303
|
+
): unknown[] {
|
|
304
|
+
if (!Array.isArray(resolved[0])) {
|
|
305
|
+
for (let index = 0; index < resolved.length; index++) {
|
|
306
|
+
item.push(resolved[index]);
|
|
307
|
+
}
|
|
308
|
+
return item;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
for (let index = 0; index < resolved.length; index++) {
|
|
312
|
+
if (index > 0) {
|
|
313
|
+
items.push(item);
|
|
314
|
+
item = [];
|
|
315
|
+
}
|
|
316
|
+
const group = resolved[index] as unknown[];
|
|
317
|
+
for (let valueIndex = 0; valueIndex < group.length; valueIndex++) {
|
|
318
|
+
item.push(group[valueIndex]);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
return item;
|
|
164
323
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// React Native takes a scale only as a number, and its transform validator throws on anything else
|
|
2
|
+
export function scaleFactor(value: unknown): number | null {
|
|
3
|
+
const factor =
|
|
4
|
+
typeof value === "string" && value.endsWith("%")
|
|
5
|
+
? Number(value.slice(0, -1)) / 100
|
|
6
|
+
: value;
|
|
7
|
+
|
|
8
|
+
return typeof factor === "number" ? factor : null;
|
|
9
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
isStyleDescriptorArray,
|
|
4
|
+
isStyleFunction,
|
|
5
|
+
} from "react-native-css/utilities";
|
|
3
6
|
|
|
4
7
|
import { setDeepPath } from "../../objects";
|
|
5
8
|
import { ShortHandSymbol } from "../constants";
|
|
@@ -56,6 +59,16 @@ export function shorthandHandler(
|
|
|
56
59
|
return type.includes(value) || type.includes(typeof value);
|
|
57
60
|
}
|
|
58
61
|
|
|
62
|
+
// Style functions (var, calc, env, etc.) are unresolved at pattern-match
|
|
63
|
+
// time — their actual values won't be known until runtime variable
|
|
64
|
+
// resolution. Accepting them in any type slot makes pattern matching
|
|
65
|
+
// less strict when variables are involved, but rejecting them would
|
|
66
|
+
// break variable-based shadows entirely (e.g. box-shadow: var(--shadow)
|
|
67
|
+
// where --shadow resolves to "0 4px 6px -1px #000").
|
|
68
|
+
if (isStyleFunction(value)) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
59
72
|
switch (type) {
|
|
60
73
|
case "string":
|
|
61
74
|
case "number":
|
|
@@ -39,6 +39,8 @@ export const animationShorthand = shorthandHandler(
|
|
|
39
39
|
[name],
|
|
40
40
|
[duration, name],
|
|
41
41
|
[name, duration],
|
|
42
|
+
[name, duration, timingFunction],
|
|
43
|
+
[duration, timingFunction, name],
|
|
42
44
|
[name, duration, iteration],
|
|
43
45
|
[name, duration, timingFunction, iteration],
|
|
44
46
|
[duration, delay, name],
|
|
@@ -67,7 +69,7 @@ export const animation: StyleFunctionResolver = (
|
|
|
67
69
|
) => {
|
|
68
70
|
const animationShortHandTuples = animationShorthand(
|
|
69
71
|
resolveValue,
|
|
70
|
-
value,
|
|
72
|
+
[value[2]],
|
|
71
73
|
get,
|
|
72
74
|
options,
|
|
73
75
|
);
|
|
@@ -86,6 +88,10 @@ export const animation: StyleFunctionResolver = (
|
|
|
86
88
|
return;
|
|
87
89
|
}
|
|
88
90
|
|
|
91
|
+
if (name === "none") {
|
|
92
|
+
return applyShorthand(animationShortHandTuples);
|
|
93
|
+
}
|
|
94
|
+
|
|
89
95
|
const keyframes = get(StyleCollection.keyframes(name));
|
|
90
96
|
|
|
91
97
|
const animation: Record<string, any> = {};
|
|
@@ -127,5 +133,5 @@ export const animationName: StyleFunctionResolver = (
|
|
|
127
133
|
options,
|
|
128
134
|
) => {
|
|
129
135
|
const shorthand: any = animation(resolveValue, value, get, options);
|
|
130
|
-
return shorthand
|
|
136
|
+
return shorthand?.animationName;
|
|
131
137
|
};
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
isCommaList,
|
|
3
|
+
isStyleDescriptorArray,
|
|
4
|
+
} from "react-native-css/utilities";
|
|
3
5
|
|
|
4
6
|
import type { StyleFunctionResolver } from "../resolve";
|
|
5
7
|
import { shorthandHandler } from "./_handler";
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
// "color" type accepts both strings ("#fff") and objects (PlatformColor from currentcolor).
|
|
10
|
+
// Using "string" here would reject platform color objects and silently drop the shadow.
|
|
11
|
+
const color = ["color", "color"] as const;
|
|
8
12
|
const offsetX = ["offsetX", "number"] as const;
|
|
9
13
|
const offsetY = ["offsetY", "number"] as const;
|
|
10
14
|
const blurRadius = ["blurRadius", "number"] as const;
|
|
11
15
|
const spreadDistance = ["spreadDistance", "number"] as const;
|
|
12
|
-
//
|
|
16
|
+
// Match the literal string "inset" - the array type checks if value is in array
|
|
17
|
+
const inset = ["inset", ["inset"]] as const;
|
|
13
18
|
|
|
14
19
|
const handler = shorthandHandler(
|
|
15
20
|
[
|
|
21
|
+
// Standard patterns (without inset)
|
|
16
22
|
[offsetX, offsetY, blurRadius, spreadDistance],
|
|
17
23
|
[offsetX, offsetY, blurRadius, spreadDistance, color],
|
|
18
24
|
[color, offsetX, offsetY],
|
|
19
25
|
[color, offsetX, offsetY, blurRadius, spreadDistance],
|
|
20
26
|
[offsetX, offsetY, color],
|
|
21
27
|
[offsetX, offsetY, blurRadius, color],
|
|
28
|
+
// Inset patterns - "inset" keyword at the beginning
|
|
29
|
+
[inset, offsetX, offsetY, blurRadius, spreadDistance],
|
|
30
|
+
[inset, offsetX, offsetY, blurRadius, spreadDistance, color],
|
|
31
|
+
[inset, offsetX, offsetY, blurRadius, color],
|
|
32
|
+
[inset, color, offsetX, offsetY, blurRadius, spreadDistance],
|
|
22
33
|
],
|
|
23
34
|
[],
|
|
24
35
|
"object",
|
|
25
36
|
);
|
|
26
37
|
|
|
38
|
+
const alreadyResolved = (value: unknown) => value;
|
|
39
|
+
|
|
27
40
|
export const boxShadow: StyleFunctionResolver = (
|
|
28
41
|
resolveValue,
|
|
29
42
|
func,
|
|
@@ -34,31 +47,25 @@ export const boxShadow: StyleFunctionResolver = (
|
|
|
34
47
|
|
|
35
48
|
if (!isStyleDescriptorArray(args)) {
|
|
36
49
|
return args;
|
|
37
|
-
} else {
|
|
38
|
-
return args
|
|
39
|
-
.flatMap(flattenShadowDescriptor)
|
|
40
|
-
.map((shadows) => {
|
|
41
|
-
if (shadows === undefined) {
|
|
42
|
-
return;
|
|
43
|
-
} else {
|
|
44
|
-
return omitTransparentShadows(
|
|
45
|
-
handler(resolveValue, shadows, get, options),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
.filter((v) => v !== undefined);
|
|
50
50
|
}
|
|
51
|
-
};
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
// A flat array of tokens (e.g. [0, 4, 6, -1, "#000"]) is a single shadow,
|
|
53
|
+
// written out or substituted from a variable. An array of arrays
|
|
54
|
+
// (e.g. [[0, 4, 6, -1, "#000"], [...]]) is a comma-separated list, one
|
|
55
|
+
// shadow per item. The compiler keeps the separator via the nested array.
|
|
56
|
+
const shadows = isCommaList(args) ? args : [args];
|
|
57
|
+
const result: unknown[] = [];
|
|
58
|
+
|
|
59
|
+
for (const shadow of shadows) {
|
|
60
|
+
const value = normalizeInsetValue(
|
|
61
|
+
// alreadyResolved rather than resolveValue: don't walk through tokens and resolve all shadows when we've already resolved this one
|
|
62
|
+
omitTransparentShadows(handler(alreadyResolved, shadow, get, options)),
|
|
63
|
+
);
|
|
64
|
+
if (value !== undefined) result.push(value);
|
|
58
65
|
}
|
|
59
66
|
|
|
60
|
-
return
|
|
61
|
-
}
|
|
67
|
+
return result;
|
|
68
|
+
};
|
|
62
69
|
|
|
63
70
|
function omitTransparentShadows(style: unknown) {
|
|
64
71
|
if (typeof style === "object" && style && "color" in style) {
|
|
@@ -69,3 +76,17 @@ function omitTransparentShadows(style: unknown) {
|
|
|
69
76
|
|
|
70
77
|
return style;
|
|
71
78
|
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Convert inset: "inset" to inset: true for React Native boxShadow.
|
|
82
|
+
*
|
|
83
|
+
* The shorthand handler matches the literal "inset" string and assigns it as the value.
|
|
84
|
+
* React Native's boxShadow expects inset to be a boolean.
|
|
85
|
+
*/
|
|
86
|
+
function normalizeInsetValue(style: unknown) {
|
|
87
|
+
if (typeof style === "object" && style && "inset" in style) {
|
|
88
|
+
return { ...style, inset: true };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return style;
|
|
92
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ShortHandSymbol } from "../constants";
|
|
2
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
3
|
+
|
|
4
|
+
function logicalWidth(start: string, end: string): StyleFunctionResolver {
|
|
5
|
+
return (resolve, descriptor) => {
|
|
6
|
+
const resolved = resolve(descriptor[2]);
|
|
7
|
+
const values: unknown[] = Array.isArray(resolved) ? resolved : [resolved];
|
|
8
|
+
if (
|
|
9
|
+
values.length < 1 ||
|
|
10
|
+
values.length > 2 ||
|
|
11
|
+
!values.every(
|
|
12
|
+
(value) =>
|
|
13
|
+
typeof value === "number" && Number.isFinite(value) && value >= 0,
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
return;
|
|
17
|
+
return {
|
|
18
|
+
[ShortHandSymbol]: true,
|
|
19
|
+
[start]: values[0],
|
|
20
|
+
[end]: values[1] ?? values[0],
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const borderBlockWidth = logicalWidth(
|
|
26
|
+
"borderTopWidth",
|
|
27
|
+
"borderBottomWidth",
|
|
28
|
+
);
|
|
29
|
+
export const borderInlineWidth = logicalWidth(
|
|
30
|
+
"borderStartWidth",
|
|
31
|
+
"borderEndWidth",
|
|
32
|
+
);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isStyleDescriptorArray } from "react-native-css/utilities";
|
|
2
|
+
|
|
1
3
|
import type { StyleFunctionResolver } from "../resolve";
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -8,16 +10,39 @@ export const transform: StyleFunctionResolver = (
|
|
|
8
10
|
resolveValue,
|
|
9
11
|
transformDescriptor,
|
|
10
12
|
) => {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return;
|
|
13
|
+
const args = transformDescriptor[2];
|
|
14
|
+
const entries: unknown[] = [];
|
|
15
|
+
|
|
16
|
+
// Anything but a transform entry, null included, leaves the declaration invalid at computed-value time, so the transform is none (css-variables-1 §3.1)
|
|
17
|
+
if (!isStyleDescriptorArray(args)) {
|
|
18
|
+
return appendEntries(entries, resolveValue(args)) ? entries : [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Each function in turn, rather than resolving the list into an array to copy again
|
|
22
|
+
for (const arg of args) {
|
|
23
|
+
if (!appendEntries(entries, resolveValue(arg))) return [];
|
|
22
24
|
}
|
|
25
|
+
|
|
26
|
+
return entries;
|
|
23
27
|
};
|
|
28
|
+
|
|
29
|
+
// A group from a resolver and the list a var() fallback holds each nest a level, while React Native takes a flat list of single-key objects. Returns false for anything but an entry
|
|
30
|
+
function appendEntries(entries: unknown[], value: unknown): boolean {
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
for (const item of value as unknown[]) {
|
|
33
|
+
if (!appendEntries(entries, item)) return false;
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (value === undefined || value === "initial") {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (typeof value === "object" && value !== null) {
|
|
43
|
+
entries.push(value);
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return false;
|
|
48
|
+
}
|