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
|
@@ -37,6 +37,7 @@ import type {
|
|
|
37
37
|
} from "lightningcss";
|
|
38
38
|
|
|
39
39
|
import { isStyleFunction } from "../utilities";
|
|
40
|
+
import { isMappingProperty } from "./atRules";
|
|
40
41
|
import type {
|
|
41
42
|
StyleDescriptor,
|
|
42
43
|
StyleFunction,
|
|
@@ -62,12 +63,54 @@ type Parser<T extends Declaration["property"] = Declaration["property"]> = (
|
|
|
62
63
|
|
|
63
64
|
const propertyRename: Record<string, string> = {
|
|
64
65
|
"background-image": "experimental_backgroundImage",
|
|
66
|
+
// React Native has no border-inline-* props, but ships the equivalent
|
|
67
|
+
// RTL-aware border-start-* / border-end-* props
|
|
68
|
+
"border-inline-end-color": "border-end-color",
|
|
69
|
+
"border-inline-end-width": "border-end-width",
|
|
70
|
+
"border-inline-start-color": "border-start-color",
|
|
71
|
+
"border-inline-start-width": "border-start-width",
|
|
72
|
+
"border-block-start-width": "border-top-width",
|
|
73
|
+
"border-block-end-width": "border-bottom-width",
|
|
74
|
+
"font-variant-caps": "font-variant",
|
|
75
|
+
// React Native maps paddingBlock/paddingInline to the same Yoga edges as
|
|
76
|
+
// paddingVertical/paddingHorizontal, but Android's TextInput only sees the
|
|
77
|
+
// latter and otherwise keeps its theme padding
|
|
78
|
+
"padding-block": "padding-vertical",
|
|
79
|
+
"padding-inline": "padding-horizontal",
|
|
65
80
|
};
|
|
66
81
|
|
|
82
|
+
// React Native only supports a uniform borderStyle, so per-side border
|
|
83
|
+
// styles have no native equivalent and are dropped. "solid" is dropped
|
|
84
|
+
// silently as it matches React Native's default rendering.
|
|
85
|
+
const unsupportedLogicalStyles = new Set([
|
|
86
|
+
"border-inline-style",
|
|
87
|
+
"border-inline-start-style",
|
|
88
|
+
"border-inline-end-style",
|
|
89
|
+
"border-block-style",
|
|
90
|
+
"border-block-start-style",
|
|
91
|
+
"border-block-end-style",
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
// One key set per property, so a later declaration replaces an earlier one; Android and iOS rank borderBlockColor against borderTopColor oppositely
|
|
95
|
+
const blockColorEdges = [
|
|
96
|
+
"border-top-color",
|
|
97
|
+
"border-bottom-color",
|
|
98
|
+
] as const satisfies readonly [string, string];
|
|
99
|
+
|
|
100
|
+
// React Native has no borderInlineColor, so the RTL-aware pair is the inline axis's only target
|
|
101
|
+
const inlineColorEdges = [
|
|
102
|
+
"border-start-color",
|
|
103
|
+
"border-end-color",
|
|
104
|
+
] as const satisfies readonly [string, string];
|
|
105
|
+
|
|
67
106
|
const unparsedRuntimeParsing = new Set([
|
|
68
107
|
"animation",
|
|
108
|
+
"animation-name",
|
|
69
109
|
"border",
|
|
110
|
+
"border-block-width",
|
|
111
|
+
"border-inline-width",
|
|
70
112
|
"box-shadow",
|
|
113
|
+
"filter",
|
|
71
114
|
"line-height",
|
|
72
115
|
"rotate",
|
|
73
116
|
"scale",
|
|
@@ -76,6 +119,12 @@ const unparsedRuntimeParsing = new Set([
|
|
|
76
119
|
"translate",
|
|
77
120
|
]);
|
|
78
121
|
|
|
122
|
+
// css-transforms-2 §3: the translate and scale properties take an optional z, which the functions of the same name do not
|
|
123
|
+
const INDIVIDUAL_TRANSFORM_RESOLVERS: ReadonlyMap<string, string> = new Map([
|
|
124
|
+
["scale", "individualScale"],
|
|
125
|
+
["translate", "individualTranslate"],
|
|
126
|
+
]);
|
|
127
|
+
|
|
79
128
|
const parsers: {
|
|
80
129
|
[K in Declaration["property"]]?: Parser<K>;
|
|
81
130
|
} = {
|
|
@@ -101,10 +150,11 @@ const parsers: {
|
|
|
101
150
|
"border-block-color": parseBorderColor,
|
|
102
151
|
"border-block-end": parseBorderBlockEnd,
|
|
103
152
|
"border-block-end-color": parseColorDeclaration,
|
|
153
|
+
"border-block-end-style": parseBorderInlineStyle,
|
|
104
154
|
"border-block-end-width": parseBorderSideWidthDeclaration,
|
|
105
155
|
"border-block-start": parseBorderBlockStart,
|
|
106
156
|
"border-block-start-color": parseColorDeclaration,
|
|
107
|
-
"border-block-start-style":
|
|
157
|
+
"border-block-start-style": parseBorderInlineStyle,
|
|
108
158
|
"border-block-start-width": parseBorderSideWidthDeclaration,
|
|
109
159
|
"border-block-style": parseBorderBlockStyle,
|
|
110
160
|
"border-block-width": parseBorderBlockWidth,
|
|
@@ -289,7 +339,7 @@ function parseWithParser(declaration: Declaration, builder: StylesheetBuilder) {
|
|
|
289
339
|
if (declaration.property in parsers) {
|
|
290
340
|
const parser = parsers[declaration.property] as Parser;
|
|
291
341
|
|
|
292
|
-
builder.
|
|
342
|
+
builder.descriptorProperties = [declaration.property];
|
|
293
343
|
|
|
294
344
|
builder.setWarningProperty(declaration.property);
|
|
295
345
|
const value = parser(declaration, builder, declaration.property);
|
|
@@ -320,11 +370,11 @@ function parseInsetInline(
|
|
|
320
370
|
builder: StylesheetBuilder,
|
|
321
371
|
) {
|
|
322
372
|
builder.addShorthand("inset-inline", {
|
|
323
|
-
"inset-
|
|
373
|
+
"inset-inline-start": parseLengthPercentageOrAuto(
|
|
324
374
|
value.inlineStart,
|
|
325
375
|
builder,
|
|
326
376
|
),
|
|
327
|
-
"inset-
|
|
377
|
+
"inset-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder),
|
|
328
378
|
});
|
|
329
379
|
}
|
|
330
380
|
|
|
@@ -364,6 +414,16 @@ function parseBorderRadius(
|
|
|
364
414
|
});
|
|
365
415
|
}
|
|
366
416
|
|
|
417
|
+
// light-dark() addresses its dark half to descriptorProperties, so a parser that expands onto other properties names them
|
|
418
|
+
function parseColorFor(
|
|
419
|
+
targets: readonly string[],
|
|
420
|
+
cssColor: CssColor,
|
|
421
|
+
builder: StylesheetBuilder,
|
|
422
|
+
) {
|
|
423
|
+
builder.descriptorProperties = targets;
|
|
424
|
+
return parseColor(cssColor, builder);
|
|
425
|
+
}
|
|
426
|
+
|
|
367
427
|
function parseBorderColor(
|
|
368
428
|
declaration: DeclarationType<
|
|
369
429
|
"border-color" | "border-block-color" | "border-inline-color"
|
|
@@ -378,18 +438,20 @@ function parseBorderColor(
|
|
|
378
438
|
"border-right-color": parseColor(declaration.value.right, builder),
|
|
379
439
|
});
|
|
380
440
|
} else {
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
441
|
+
// Each edge parses its own colour, so a light-dark() component opens its dark rule over the edge it feeds
|
|
442
|
+
const [startProperty, endProperty] =
|
|
443
|
+
declaration.property === "border-inline-color"
|
|
444
|
+
? inlineColorEdges
|
|
445
|
+
: blockColorEdges;
|
|
446
|
+
|
|
447
|
+
builder.addDescriptor(
|
|
448
|
+
startProperty,
|
|
449
|
+
parseColorFor([startProperty], declaration.value.start, builder),
|
|
450
|
+
);
|
|
451
|
+
builder.addDescriptor(
|
|
452
|
+
endProperty,
|
|
453
|
+
parseColorFor([endProperty], declaration.value.end, builder),
|
|
454
|
+
);
|
|
393
455
|
}
|
|
394
456
|
}
|
|
395
457
|
|
|
@@ -436,14 +498,17 @@ function parseBorderBlock(
|
|
|
436
498
|
{ value }: DeclarationType<"border-block">,
|
|
437
499
|
builder: StylesheetBuilder,
|
|
438
500
|
) {
|
|
439
|
-
|
|
440
|
-
builder
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
);
|
|
444
|
-
builder.addDescriptor(
|
|
445
|
-
|
|
501
|
+
const color = parseColorFor(blockColorEdges, value.color, builder);
|
|
502
|
+
const width = parseBorderSideWidth(value.width, builder);
|
|
503
|
+
|
|
504
|
+
builder.addDescriptor(blockColorEdges[0], color);
|
|
505
|
+
builder.addDescriptor(blockColorEdges[1], color);
|
|
506
|
+
builder.addDescriptor("border-top-width", width);
|
|
507
|
+
builder.addDescriptor("border-bottom-width", width);
|
|
508
|
+
dropUnsupportedInlineStyle(
|
|
446
509
|
parseBorderStyle(value.style, builder),
|
|
510
|
+
builder,
|
|
511
|
+
"border-block-style",
|
|
447
512
|
);
|
|
448
513
|
}
|
|
449
514
|
|
|
@@ -456,9 +521,14 @@ function parseBorderBlockStart(
|
|
|
456
521
|
parseColor(value.color, builder),
|
|
457
522
|
);
|
|
458
523
|
builder.addDescriptor(
|
|
459
|
-
"border-
|
|
524
|
+
"border-top-width",
|
|
460
525
|
parseBorderSideWidth(value.width, builder),
|
|
461
526
|
);
|
|
527
|
+
dropUnsupportedInlineStyle(
|
|
528
|
+
parseBorderStyle(value.style, builder),
|
|
529
|
+
builder,
|
|
530
|
+
"border-block-start-style",
|
|
531
|
+
);
|
|
462
532
|
}
|
|
463
533
|
|
|
464
534
|
function parseBorderBlockEnd(
|
|
@@ -470,26 +540,31 @@ function parseBorderBlockEnd(
|
|
|
470
540
|
parseColor(value.color, builder),
|
|
471
541
|
);
|
|
472
542
|
builder.addDescriptor(
|
|
473
|
-
"border-
|
|
543
|
+
"border-bottom-width",
|
|
474
544
|
parseBorderSideWidth(value.width, builder),
|
|
475
545
|
);
|
|
546
|
+
dropUnsupportedInlineStyle(
|
|
547
|
+
parseBorderStyle(value.style, builder),
|
|
548
|
+
builder,
|
|
549
|
+
"border-block-end-style",
|
|
550
|
+
);
|
|
476
551
|
}
|
|
477
552
|
|
|
478
553
|
function parseBorderInline(
|
|
479
554
|
{ value }: DeclarationType<"border-inline">,
|
|
480
555
|
builder: StylesheetBuilder,
|
|
481
556
|
) {
|
|
482
|
-
builder
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
);
|
|
486
|
-
builder.addDescriptor(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
builder.addDescriptor(
|
|
491
|
-
"border-inline-style",
|
|
557
|
+
const color = parseColor(value.color, builder);
|
|
558
|
+
const width = parseBorderSideWidth(value.width, builder);
|
|
559
|
+
|
|
560
|
+
builder.addDescriptor("border-start-color", color);
|
|
561
|
+
builder.addDescriptor("border-end-color", color);
|
|
562
|
+
builder.addDescriptor("border-start-width", width);
|
|
563
|
+
builder.addDescriptor("border-end-width", width);
|
|
564
|
+
dropUnsupportedInlineStyle(
|
|
492
565
|
parseBorderStyle(value.style, builder),
|
|
566
|
+
builder,
|
|
567
|
+
"border-inline-style",
|
|
493
568
|
);
|
|
494
569
|
}
|
|
495
570
|
|
|
@@ -497,17 +572,15 @@ function parseBorderInlineStart(
|
|
|
497
572
|
{ value }: DeclarationType<"border-inline-start">,
|
|
498
573
|
builder: StylesheetBuilder,
|
|
499
574
|
) {
|
|
575
|
+
builder.addDescriptor("border-start-color", parseColor(value.color, builder));
|
|
500
576
|
builder.addDescriptor(
|
|
501
|
-
"border-
|
|
502
|
-
parseColor(value.color, builder),
|
|
503
|
-
);
|
|
504
|
-
builder.addDescriptor(
|
|
505
|
-
"border-inline-start-width",
|
|
577
|
+
"border-start-width",
|
|
506
578
|
parseBorderSideWidth(value.width, builder),
|
|
507
579
|
);
|
|
508
|
-
|
|
509
|
-
"border-inline-start-style",
|
|
580
|
+
dropUnsupportedInlineStyle(
|
|
510
581
|
parseBorderStyle(value.style, builder),
|
|
582
|
+
builder,
|
|
583
|
+
"border-inline-start-style",
|
|
511
584
|
);
|
|
512
585
|
}
|
|
513
586
|
|
|
@@ -515,17 +588,15 @@ function parseBorderInlineEnd(
|
|
|
515
588
|
{ value }: DeclarationType<"border-inline-end">,
|
|
516
589
|
builder: StylesheetBuilder,
|
|
517
590
|
) {
|
|
591
|
+
builder.addDescriptor("border-end-color", parseColor(value.color, builder));
|
|
518
592
|
builder.addDescriptor(
|
|
519
|
-
"border-
|
|
520
|
-
parseColor(value.color, builder),
|
|
521
|
-
);
|
|
522
|
-
builder.addDescriptor(
|
|
523
|
-
"border-inline-end-width",
|
|
593
|
+
"border-end-width",
|
|
524
594
|
parseBorderSideWidth(value.width, builder),
|
|
525
595
|
);
|
|
526
|
-
|
|
527
|
-
"border-inline-end-style",
|
|
596
|
+
dropUnsupportedInlineStyle(
|
|
528
597
|
parseBorderStyle(value.style, builder),
|
|
598
|
+
builder,
|
|
599
|
+
"border-inline-end-style",
|
|
529
600
|
);
|
|
530
601
|
}
|
|
531
602
|
|
|
@@ -534,9 +605,13 @@ export function parseBorderInlineWidth(
|
|
|
534
605
|
builder: StylesheetBuilder,
|
|
535
606
|
) {
|
|
536
607
|
builder.addDescriptor(
|
|
537
|
-
"border-
|
|
608
|
+
"border-start-width",
|
|
538
609
|
parseBorderSideWidth(declaration.value.start, builder),
|
|
539
610
|
);
|
|
611
|
+
builder.addDescriptor(
|
|
612
|
+
"border-end-width",
|
|
613
|
+
parseBorderSideWidth(declaration.value.end, builder),
|
|
614
|
+
);
|
|
540
615
|
}
|
|
541
616
|
|
|
542
617
|
export function parseBorderInlineStyle(
|
|
@@ -544,31 +619,41 @@ export function parseBorderInlineStyle(
|
|
|
544
619
|
| "border-inline-style"
|
|
545
620
|
| "border-inline-start-style"
|
|
546
621
|
| "border-inline-end-style"
|
|
622
|
+
| "border-block-start-style"
|
|
623
|
+
| "border-block-end-style"
|
|
547
624
|
>,
|
|
548
625
|
builder: StylesheetBuilder,
|
|
549
626
|
) {
|
|
550
627
|
if (typeof declaration.value === "string") {
|
|
551
|
-
|
|
552
|
-
declaration.property,
|
|
628
|
+
dropUnsupportedInlineStyle(
|
|
553
629
|
parseBorderStyle(declaration.value, builder),
|
|
554
|
-
|
|
555
|
-
} else if (declaration.value.start === declaration.value.end) {
|
|
556
|
-
builder.addDescriptor(
|
|
630
|
+
builder,
|
|
557
631
|
declaration.property,
|
|
558
|
-
parseBorderStyle(declaration.value.start, builder),
|
|
559
632
|
);
|
|
560
633
|
} else {
|
|
561
|
-
|
|
562
|
-
"border-inline-start-style",
|
|
634
|
+
dropUnsupportedInlineStyle(
|
|
563
635
|
parseBorderStyle(declaration.value.start, builder),
|
|
636
|
+
builder,
|
|
637
|
+
"border-inline-start-style",
|
|
564
638
|
);
|
|
565
|
-
|
|
566
|
-
"border-inline-end-style",
|
|
639
|
+
dropUnsupportedInlineStyle(
|
|
567
640
|
parseBorderStyle(declaration.value.end, builder),
|
|
641
|
+
builder,
|
|
642
|
+
"border-inline-end-style",
|
|
568
643
|
);
|
|
569
644
|
}
|
|
570
645
|
}
|
|
571
646
|
|
|
647
|
+
function dropUnsupportedInlineStyle(
|
|
648
|
+
style: string | undefined,
|
|
649
|
+
builder: StylesheetBuilder,
|
|
650
|
+
property: string,
|
|
651
|
+
) {
|
|
652
|
+
if (style !== undefined && style !== "solid") {
|
|
653
|
+
builder.addWarning("style", property, style);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
572
657
|
function parseFlexFlow(
|
|
573
658
|
{ value }: DeclarationType<"flex-flow">,
|
|
574
659
|
builder: StylesheetBuilder,
|
|
@@ -649,7 +734,7 @@ function parsePaddingBlock(
|
|
|
649
734
|
{ value }: DeclarationType<"padding-block">,
|
|
650
735
|
builder: StylesheetBuilder,
|
|
651
736
|
) {
|
|
652
|
-
builder.addShorthand("padding-
|
|
737
|
+
builder.addShorthand("padding-vertical", {
|
|
653
738
|
"padding-block-start": parseLengthPercentageOrAuto(
|
|
654
739
|
value.blockStart,
|
|
655
740
|
builder,
|
|
@@ -662,7 +747,7 @@ function parsePaddingInline(
|
|
|
662
747
|
{ value }: DeclarationType<"padding-inline">,
|
|
663
748
|
builder: StylesheetBuilder,
|
|
664
749
|
) {
|
|
665
|
-
builder.addShorthand("padding-
|
|
750
|
+
builder.addShorthand("padding-horizontal", {
|
|
666
751
|
"padding-inline-start": parseLengthPercentageOrAuto(
|
|
667
752
|
value.inlineStart,
|
|
668
753
|
builder,
|
|
@@ -689,146 +774,131 @@ function parseFont(
|
|
|
689
774
|
builder.addDescriptor("font-weight", parseFontWeight(value.weight, builder));
|
|
690
775
|
}
|
|
691
776
|
|
|
777
|
+
type TransformFunction = Extract<
|
|
778
|
+
StyleFunction,
|
|
779
|
+
[Record<never, never>, string, StyleDescriptor]
|
|
780
|
+
>;
|
|
781
|
+
|
|
782
|
+
// An argument React Native has no equivalent for leaves the declaration invalid there, and an invalid declaration is ignored (CSS 2.2 §4.2)
|
|
783
|
+
function hasUnconvertibleArgument(
|
|
784
|
+
functions: readonly TransformFunction[],
|
|
785
|
+
): boolean {
|
|
786
|
+
return functions.some(([, , argument]) => argument === undefined);
|
|
787
|
+
}
|
|
788
|
+
|
|
692
789
|
function parseTransform(
|
|
693
790
|
{ value }: DeclarationType<"transform">,
|
|
694
791
|
builder: StylesheetBuilder,
|
|
695
792
|
) {
|
|
696
|
-
|
|
697
|
-
{
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
case "skew":
|
|
752
|
-
return [
|
|
753
|
-
[{}, "skewX", parseAngle(t.value[0], builder)],
|
|
754
|
-
[{}, "skewY", parseAngle(t.value[1], builder)],
|
|
755
|
-
];
|
|
756
|
-
case "skewX":
|
|
757
|
-
return [[{}, "skewX", parseAngle(t.value, builder)]];
|
|
758
|
-
case "skewY":
|
|
759
|
-
return [[{}, "skewY", parseAngle(t.value, builder)]];
|
|
760
|
-
case "translateZ":
|
|
761
|
-
case "translate3d":
|
|
762
|
-
case "scaleZ":
|
|
763
|
-
case "scale3d":
|
|
764
|
-
case "rotate3d":
|
|
765
|
-
case "matrix":
|
|
766
|
-
case "matrix3d":
|
|
767
|
-
return [[]];
|
|
768
|
-
}
|
|
769
|
-
}),
|
|
770
|
-
]);
|
|
771
|
-
return;
|
|
793
|
+
const functions = value.flatMap((t): TransformFunction[] => {
|
|
794
|
+
switch (t.type) {
|
|
795
|
+
case "perspective":
|
|
796
|
+
return [[{}, "perspective", parseLength(t.value, builder)]];
|
|
797
|
+
case "translate":
|
|
798
|
+
return [
|
|
799
|
+
[{}, "translateX", parseLength(t.value[0], builder)],
|
|
800
|
+
[{}, "translateY", parseLength(t.value[1], builder)],
|
|
801
|
+
];
|
|
802
|
+
case "translateX":
|
|
803
|
+
return [[{}, "translateX", parseLength(t.value, builder)]];
|
|
804
|
+
case "translateY":
|
|
805
|
+
return [[{}, "translateY", parseLength(t.value, builder)]];
|
|
806
|
+
case "rotate":
|
|
807
|
+
return [[{}, "rotate", parseAngle(t.value, builder)]];
|
|
808
|
+
case "rotateX":
|
|
809
|
+
return [[{}, "rotateX", parseAngle(t.value, builder)]];
|
|
810
|
+
case "rotateY":
|
|
811
|
+
return [[{}, "rotateY", parseAngle(t.value, builder)]];
|
|
812
|
+
case "rotateZ":
|
|
813
|
+
return [[{}, "rotateZ", parseAngle(t.value, builder)]];
|
|
814
|
+
case "scale":
|
|
815
|
+
return [
|
|
816
|
+
[{}, "scaleX", parseLength(t.value[0], builder)],
|
|
817
|
+
[{}, "scaleY", parseLength(t.value[1], builder)],
|
|
818
|
+
];
|
|
819
|
+
case "scaleX":
|
|
820
|
+
return [[{}, "scaleX", parseLength(t.value, builder)]];
|
|
821
|
+
case "scaleY":
|
|
822
|
+
return [[{}, "scaleY", parseLength(t.value, builder)]];
|
|
823
|
+
case "skew":
|
|
824
|
+
return [
|
|
825
|
+
[{}, "skewX", parseAngle(t.value[0], builder)],
|
|
826
|
+
[{}, "skewY", parseAngle(t.value[1], builder)],
|
|
827
|
+
];
|
|
828
|
+
case "skewX":
|
|
829
|
+
return [[{}, "skewX", parseAngle(t.value, builder)]];
|
|
830
|
+
case "skewY":
|
|
831
|
+
return [[{}, "skewY", parseAngle(t.value, builder)]];
|
|
832
|
+
case "translateZ":
|
|
833
|
+
case "translate3d":
|
|
834
|
+
case "scaleZ":
|
|
835
|
+
case "scale3d":
|
|
836
|
+
case "rotate3d":
|
|
837
|
+
case "matrix":
|
|
838
|
+
case "matrix3d":
|
|
839
|
+
return [];
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
if (hasUnconvertibleArgument(functions)) {
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
builder.addDescriptor("transform", [{}, "transform", functions]);
|
|
772
848
|
}
|
|
773
849
|
|
|
774
850
|
function parseTranslate(
|
|
775
851
|
{ value }: DeclarationType<"translate">,
|
|
776
852
|
builder: StylesheetBuilder,
|
|
777
853
|
) {
|
|
778
|
-
|
|
779
|
-
{},
|
|
780
|
-
"
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
854
|
+
const translations: TransformFunction[] = [
|
|
855
|
+
[{}, "translateX", parseTranslateProp(value, "x", builder)],
|
|
856
|
+
[{}, "translateY", parseTranslateProp(value, "y", builder)],
|
|
857
|
+
];
|
|
858
|
+
|
|
859
|
+
if (hasUnconvertibleArgument(translations)) {
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
builder.addDescriptor("translate", translations);
|
|
788
864
|
}
|
|
789
865
|
|
|
790
866
|
function parseRotate(
|
|
791
867
|
{ value }: DeclarationType<"rotate">,
|
|
792
868
|
builder: StylesheetBuilder,
|
|
793
869
|
) {
|
|
870
|
+
const angle = parseAngle(value.angle, builder);
|
|
871
|
+
const rotations: TransformFunction[] = [];
|
|
872
|
+
|
|
794
873
|
if (value.x) {
|
|
795
|
-
|
|
796
|
-
{},
|
|
797
|
-
"rotateX",
|
|
798
|
-
parseAngle(value.angle, builder),
|
|
799
|
-
]);
|
|
874
|
+
rotations.push([{}, "rotateX", angle]);
|
|
800
875
|
}
|
|
801
876
|
|
|
802
877
|
if (value.y) {
|
|
803
|
-
|
|
804
|
-
{},
|
|
805
|
-
"rotateY",
|
|
806
|
-
parseAngle(value.angle, builder),
|
|
807
|
-
]);
|
|
878
|
+
rotations.push([{}, "rotateY", angle]);
|
|
808
879
|
}
|
|
809
880
|
|
|
810
881
|
if (value.z) {
|
|
811
|
-
|
|
812
|
-
{},
|
|
813
|
-
"rotateZ",
|
|
814
|
-
parseAngle(value.angle, builder),
|
|
815
|
-
]);
|
|
882
|
+
rotations.push([{}, "rotateZ", angle]);
|
|
816
883
|
}
|
|
884
|
+
|
|
885
|
+
if (hasUnconvertibleArgument(rotations)) {
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
builder.addDescriptor(
|
|
890
|
+
"rotate",
|
|
891
|
+
rotations.length === 1 ? rotations[0] : rotations,
|
|
892
|
+
);
|
|
817
893
|
}
|
|
818
894
|
|
|
819
895
|
function parseScale(
|
|
820
896
|
{ value }: DeclarationType<"scale">,
|
|
821
897
|
builder: StylesheetBuilder,
|
|
822
898
|
) {
|
|
823
|
-
builder.addDescriptor("
|
|
824
|
-
{},
|
|
825
|
-
"
|
|
826
|
-
parseScaleValue(value, "x", builder),
|
|
827
|
-
]);
|
|
828
|
-
builder.addDescriptor("scaleY", [
|
|
829
|
-
{},
|
|
830
|
-
"scaleY",
|
|
831
|
-
parseScaleValue(value, "y", builder),
|
|
899
|
+
builder.addDescriptor("scale", [
|
|
900
|
+
[{}, "scaleX", parseScaleValue(value, "x", builder)],
|
|
901
|
+
[{}, "scaleY", parseScaleValue(value, "y", builder)],
|
|
832
902
|
]);
|
|
833
903
|
}
|
|
834
904
|
|
|
@@ -838,7 +908,7 @@ export function parseScaleValue(
|
|
|
838
908
|
builder: StylesheetBuilder,
|
|
839
909
|
): StyleDescriptor {
|
|
840
910
|
if (translate === "none") {
|
|
841
|
-
return
|
|
911
|
+
return 1;
|
|
842
912
|
}
|
|
843
913
|
|
|
844
914
|
return parseLength(translate[prop], builder);
|
|
@@ -916,6 +986,11 @@ export function parseUnparsedDeclaration(
|
|
|
916
986
|
return;
|
|
917
987
|
}
|
|
918
988
|
|
|
989
|
+
if (unsupportedLogicalStyles.has(property)) {
|
|
990
|
+
builder.addWarning("property", property);
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
|
|
919
994
|
builder.setWarningProperty(property);
|
|
920
995
|
|
|
921
996
|
/**
|
|
@@ -926,10 +1001,28 @@ export function parseUnparsedDeclaration(
|
|
|
926
1001
|
property = rename;
|
|
927
1002
|
}
|
|
928
1003
|
|
|
1004
|
+
// A var() axis colour lands on its edge pair as two declarations, so a later edge colour replaces it in cascade order
|
|
1005
|
+
const edges =
|
|
1006
|
+
property === "border-inline-color"
|
|
1007
|
+
? inlineColorEdges
|
|
1008
|
+
: property === "border-block-color"
|
|
1009
|
+
? blockColorEdges
|
|
1010
|
+
: undefined;
|
|
1011
|
+
|
|
1012
|
+
if (edges) {
|
|
1013
|
+
builder.descriptorProperties = edges;
|
|
1014
|
+
const value = parseUnparsed(declaration.value.value, builder, property);
|
|
1015
|
+
const pair =
|
|
1016
|
+
Array.isArray(value) && !isStyleFunction(value) && value.length === 2;
|
|
1017
|
+
builder.addDescriptor(edges[0], pair ? value[0] : value);
|
|
1018
|
+
builder.addDescriptor(edges[1], pair ? value[1] : value);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
929
1022
|
/**
|
|
930
1023
|
* Unparsed shorthand properties need to be parsed at runtime
|
|
931
1024
|
*/
|
|
932
|
-
builder.
|
|
1025
|
+
builder.descriptorProperties = [property];
|
|
933
1026
|
|
|
934
1027
|
if (unparsedRuntimeParsing.has(property)) {
|
|
935
1028
|
const args = parseUnparsed(declaration.value.value, builder, property);
|
|
@@ -937,7 +1030,12 @@ export function parseUnparsedDeclaration(
|
|
|
937
1030
|
if (property === "animation") {
|
|
938
1031
|
builder.addDescriptor("animation", [{}, property, args]);
|
|
939
1032
|
} else {
|
|
940
|
-
builder.addDescriptor(property, [
|
|
1033
|
+
builder.addDescriptor(property, [
|
|
1034
|
+
{},
|
|
1035
|
+
INDIVIDUAL_TRANSFORM_RESOLVERS.get(property) ?? toRNProperty(property),
|
|
1036
|
+
args,
|
|
1037
|
+
1,
|
|
1038
|
+
]);
|
|
941
1039
|
}
|
|
942
1040
|
} else {
|
|
943
1041
|
const value = parseUnparsed(declaration.value.value, builder, property);
|
|
@@ -966,7 +1064,10 @@ export function parseCustomDeclaration(
|
|
|
966
1064
|
) {
|
|
967
1065
|
const property = declaration.value.name;
|
|
968
1066
|
|
|
969
|
-
if (property
|
|
1067
|
+
if (isMappingProperty(property)) {
|
|
1068
|
+
// Consumed before declarations so property order cannot affect mapping.
|
|
1069
|
+
return;
|
|
1070
|
+
} else if (property === "-webkit-line-clamp") {
|
|
970
1071
|
builder.addDescriptor(
|
|
971
1072
|
property,
|
|
972
1073
|
parseUnparsed(declaration.value.value, builder, property),
|
|
@@ -997,6 +1098,24 @@ export function parseCustomDeclaration(
|
|
|
997
1098
|
);
|
|
998
1099
|
} else if (property === "corner-shape") {
|
|
999
1100
|
parseCornerShape(declaration.value, builder);
|
|
1101
|
+
} else if (property === "font-variant") {
|
|
1102
|
+
const parsedFontVariant = parseFontVariantCaps(
|
|
1103
|
+
parseUnparsed(
|
|
1104
|
+
declaration.value.value,
|
|
1105
|
+
builder,
|
|
1106
|
+
property,
|
|
1107
|
+
) as FontVariantCaps,
|
|
1108
|
+
builder,
|
|
1109
|
+
);
|
|
1110
|
+
if (parsedFontVariant !== undefined) {
|
|
1111
|
+
builder.addDescriptor(property, parsedFontVariant);
|
|
1112
|
+
}
|
|
1113
|
+
} else if (
|
|
1114
|
+
property.startsWith("--") &&
|
|
1115
|
+
isSoleInitial(declaration.value.value)
|
|
1116
|
+
) {
|
|
1117
|
+
// css-variables-1 §2.2: the guaranteed-invalid value, which still overrides an earlier declaration
|
|
1118
|
+
builder.addDescriptor(property, [{}, "initial"]);
|
|
1000
1119
|
} else if (
|
|
1001
1120
|
validProperties.has(property) ||
|
|
1002
1121
|
property.startsWith("--") ||
|
|
@@ -1011,6 +1130,18 @@ export function parseCustomDeclaration(
|
|
|
1011
1130
|
}
|
|
1012
1131
|
}
|
|
1013
1132
|
|
|
1133
|
+
function isSoleInitial(tokens: TokenOrValue[]) {
|
|
1134
|
+
const value = tokens.filter(
|
|
1135
|
+
(token) => token.type !== "token" || token.value.type !== "white-space",
|
|
1136
|
+
);
|
|
1137
|
+
return (
|
|
1138
|
+
value.length === 1 &&
|
|
1139
|
+
value[0]?.type === "token" &&
|
|
1140
|
+
value[0].value.type === "ident" &&
|
|
1141
|
+
value[0].value.value.toLowerCase() === "initial"
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1014
1145
|
export function reduceParseUnparsed(
|
|
1015
1146
|
tokenOrValues: TokenOrValue[],
|
|
1016
1147
|
builder: StylesheetBuilder,
|
|
@@ -1039,8 +1170,9 @@ export function reduceParseUnparsed(
|
|
|
1039
1170
|
}
|
|
1040
1171
|
}
|
|
1041
1172
|
|
|
1042
|
-
// Groups are the tokens grouped together by comma location
|
|
1043
|
-
//
|
|
1173
|
+
// Groups are the tokens grouped together by comma location. Each stays an
|
|
1174
|
+
// array, so a one-token item of a comma-separated list stays distinct from
|
|
1175
|
+
// a token of a space-separated one (css-variables-1 §2.1)
|
|
1044
1176
|
groups = groups.flatMap((group): StyleDescriptor[] => {
|
|
1045
1177
|
if (!Array.isArray(group)) {
|
|
1046
1178
|
return [];
|
|
@@ -1054,7 +1186,7 @@ export function reduceParseUnparsed(
|
|
|
1054
1186
|
if (first === undefined) {
|
|
1055
1187
|
return [];
|
|
1056
1188
|
} else {
|
|
1057
|
-
return [first];
|
|
1189
|
+
return [[first]];
|
|
1058
1190
|
}
|
|
1059
1191
|
} else if (
|
|
1060
1192
|
// This is a special case for <ratio> values
|
|
@@ -1066,13 +1198,19 @@ export function reduceParseUnparsed(
|
|
|
1066
1198
|
)
|
|
1067
1199
|
) {
|
|
1068
1200
|
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
1069
|
-
return [group.join(" ")];
|
|
1201
|
+
return [[group.join(" ")]];
|
|
1070
1202
|
} else {
|
|
1071
1203
|
return [group];
|
|
1072
1204
|
}
|
|
1073
1205
|
});
|
|
1074
1206
|
|
|
1075
|
-
|
|
1207
|
+
if (groups.length !== 1) {
|
|
1208
|
+
return groups;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
// A lone group is the value, and a lone token the group
|
|
1212
|
+
const group = groups[0] as StyleDescriptor[];
|
|
1213
|
+
return group.length === 1 ? group[0] : group;
|
|
1076
1214
|
}
|
|
1077
1215
|
|
|
1078
1216
|
export function unparsedFunction(
|
|
@@ -1228,6 +1366,8 @@ export function parseUnparsed(
|
|
|
1228
1366
|
builder,
|
|
1229
1367
|
property,
|
|
1230
1368
|
);
|
|
1369
|
+
case "color-mix":
|
|
1370
|
+
return parseColorMix(tokenOrValue.value.arguments, builder, property);
|
|
1231
1371
|
default: {
|
|
1232
1372
|
builder.addWarning("value", `${tokenOrValue.value.name}()`);
|
|
1233
1373
|
return;
|
|
@@ -1440,6 +1580,7 @@ export function parseLength(
|
|
|
1440
1580
|
switch (length.type) {
|
|
1441
1581
|
case "calc": {
|
|
1442
1582
|
// TODO: Add the calc polyfill
|
|
1583
|
+
builder.addWarning("value", "calc()");
|
|
1443
1584
|
return undefined;
|
|
1444
1585
|
}
|
|
1445
1586
|
case "number": {
|
|
@@ -1592,11 +1733,23 @@ export function parseColorDeclaration(
|
|
|
1592
1733
|
builder: StylesheetBuilder,
|
|
1593
1734
|
) {
|
|
1594
1735
|
builder.addDescriptor(
|
|
1595
|
-
declaration.property,
|
|
1736
|
+
propertyRename[declaration.property] ?? declaration.property,
|
|
1596
1737
|
parseColor(declaration.value, builder),
|
|
1597
1738
|
);
|
|
1598
1739
|
}
|
|
1599
1740
|
|
|
1741
|
+
/**
|
|
1742
|
+
* Lab/LCH/OKLab/OKLCH channels can be `NaN` when lightningcss resolves a
|
|
1743
|
+
* degenerate `color-mix()` at compile time (e.g. mixing black with
|
|
1744
|
+
* `transparent` in oklab yields `NaN` for the a/b chromaticity channels).
|
|
1745
|
+
* Passing `NaN` to colorjs.io produces an invalid string such as
|
|
1746
|
+
* `#NaNNaNNaN80`, which React Native silently discards. Per CSS Color 4 a
|
|
1747
|
+
* missing component is treated as `0`, so coerce `NaN` to `0`.
|
|
1748
|
+
*/
|
|
1749
|
+
function nanToZero(value: number): number {
|
|
1750
|
+
return Number.isNaN(value) ? 0 : value;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1600
1753
|
export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
|
|
1601
1754
|
if (typeof cssColor === "string") {
|
|
1602
1755
|
if (namedColors.has(cssColor)) {
|
|
@@ -1651,28 +1804,44 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
|
|
|
1651
1804
|
case "lab":
|
|
1652
1805
|
color = new Color({
|
|
1653
1806
|
space: cssColor.type,
|
|
1654
|
-
coords: [
|
|
1807
|
+
coords: [
|
|
1808
|
+
nanToZero(cssColor.l),
|
|
1809
|
+
nanToZero(cssColor.a),
|
|
1810
|
+
nanToZero(cssColor.b),
|
|
1811
|
+
],
|
|
1655
1812
|
alpha: cssColor.alpha,
|
|
1656
1813
|
});
|
|
1657
1814
|
break;
|
|
1658
1815
|
case "lch":
|
|
1659
1816
|
color = new Color({
|
|
1660
1817
|
space: cssColor.type,
|
|
1661
|
-
coords: [
|
|
1818
|
+
coords: [
|
|
1819
|
+
nanToZero(cssColor.l),
|
|
1820
|
+
nanToZero(cssColor.c),
|
|
1821
|
+
nanToZero(cssColor.h),
|
|
1822
|
+
],
|
|
1662
1823
|
alpha: cssColor.alpha,
|
|
1663
1824
|
});
|
|
1664
1825
|
break;
|
|
1665
1826
|
case "oklab":
|
|
1666
1827
|
color = new Color({
|
|
1667
1828
|
space: cssColor.type,
|
|
1668
|
-
coords: [
|
|
1829
|
+
coords: [
|
|
1830
|
+
nanToZero(cssColor.l),
|
|
1831
|
+
nanToZero(cssColor.a),
|
|
1832
|
+
nanToZero(cssColor.b),
|
|
1833
|
+
],
|
|
1669
1834
|
alpha: cssColor.alpha,
|
|
1670
1835
|
});
|
|
1671
1836
|
break;
|
|
1672
1837
|
case "oklch":
|
|
1673
1838
|
color = new Color({
|
|
1674
1839
|
space: cssColor.type,
|
|
1675
|
-
coords: [
|
|
1840
|
+
coords: [
|
|
1841
|
+
nanToZero(cssColor.l),
|
|
1842
|
+
nanToZero(cssColor.c),
|
|
1843
|
+
nanToZero(cssColor.h),
|
|
1844
|
+
],
|
|
1676
1845
|
alpha: cssColor.alpha,
|
|
1677
1846
|
});
|
|
1678
1847
|
break;
|
|
@@ -1740,7 +1909,13 @@ export function parseColor(cssColor: CssColor, builder: StylesheetBuilder) {
|
|
|
1740
1909
|
if (!hexColors || colorPrecision) {
|
|
1741
1910
|
return color?.toString({ precision: colorPrecision ?? 3 });
|
|
1742
1911
|
} else {
|
|
1743
|
-
|
|
1912
|
+
// Clip out-of-gamut channels, as React Native and every browser do, so a
|
|
1913
|
+
// folded color matches the same color resolved at runtime. toString()
|
|
1914
|
+
// alone would gamut map it with the CSS Color 4 algorithm instead.
|
|
1915
|
+
return color
|
|
1916
|
+
?.to("srgb")
|
|
1917
|
+
.toGamut({ method: "clip" })
|
|
1918
|
+
.toString({ format: "hex" });
|
|
1744
1919
|
}
|
|
1745
1920
|
}
|
|
1746
1921
|
|
|
@@ -2120,12 +2295,8 @@ export function parseBorderBlockWidth(
|
|
|
2120
2295
|
const start = parseBorderSideWidth(declaration.value.start, builder);
|
|
2121
2296
|
const end = parseBorderSideWidth(declaration.value.end, builder);
|
|
2122
2297
|
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
} else {
|
|
2126
|
-
builder.addDescriptor("border-block-start-width", start);
|
|
2127
|
-
builder.addDescriptor("border-block-end-width", end);
|
|
2128
|
-
}
|
|
2298
|
+
builder.addDescriptor("border-top-width", start);
|
|
2299
|
+
builder.addDescriptor("border-bottom-width", end);
|
|
2129
2300
|
}
|
|
2130
2301
|
|
|
2131
2302
|
function parseBorderBlockStyle(
|
|
@@ -2135,12 +2306,8 @@ function parseBorderBlockStyle(
|
|
|
2135
2306
|
const start = parseBorderStyle(declaration.value.start, builder);
|
|
2136
2307
|
const end = parseBorderStyle(declaration.value.end, builder);
|
|
2137
2308
|
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
} else {
|
|
2141
|
-
builder.addDescriptor("border-block-start-style", start);
|
|
2142
|
-
builder.addDescriptor("border-block-end-style", end);
|
|
2143
|
-
}
|
|
2309
|
+
dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
|
|
2310
|
+
dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
|
|
2144
2311
|
}
|
|
2145
2312
|
|
|
2146
2313
|
export function parseBorderSideWidthDeclaration(
|
|
@@ -2148,7 +2315,7 @@ export function parseBorderSideWidthDeclaration(
|
|
|
2148
2315
|
builder: StylesheetBuilder,
|
|
2149
2316
|
) {
|
|
2150
2317
|
builder.addDescriptor(
|
|
2151
|
-
declaration.property,
|
|
2318
|
+
propertyRename[declaration.property] ?? declaration.property,
|
|
2152
2319
|
parseBorderSideWidth(declaration.value, builder),
|
|
2153
2320
|
);
|
|
2154
2321
|
}
|
|
@@ -2192,12 +2359,10 @@ export function parseLineHeightDeclaration(
|
|
|
2192
2359
|
declaration: DeclarationType<"line-height">,
|
|
2193
2360
|
builder: StylesheetBuilder,
|
|
2194
2361
|
) {
|
|
2195
|
-
builder.addDescriptor(
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
1,
|
|
2200
|
-
]);
|
|
2362
|
+
builder.addDescriptor(
|
|
2363
|
+
"line-height",
|
|
2364
|
+
parseLineHeight(declaration.value, builder),
|
|
2365
|
+
);
|
|
2201
2366
|
}
|
|
2202
2367
|
|
|
2203
2368
|
export function parseLineHeight(
|
|
@@ -2208,7 +2373,7 @@ export function parseLineHeight(
|
|
|
2208
2373
|
case "normal":
|
|
2209
2374
|
return undefined;
|
|
2210
2375
|
case "number":
|
|
2211
|
-
return [{}, "em",
|
|
2376
|
+
return [{}, "em", value.value, 1];
|
|
2212
2377
|
case "length": {
|
|
2213
2378
|
const length = value.value;
|
|
2214
2379
|
|
|
@@ -2221,7 +2386,7 @@ export function parseLineHeight(
|
|
|
2221
2386
|
"style",
|
|
2222
2387
|
"line-height",
|
|
2223
2388
|
typeof length.value === "number"
|
|
2224
|
-
? length.value
|
|
2389
|
+
? String(length.value)
|
|
2225
2390
|
: JSON.stringify(length.value),
|
|
2226
2391
|
);
|
|
2227
2392
|
return;
|
|
@@ -2314,13 +2479,6 @@ export function parseFontVariantCaps(
|
|
|
2314
2479
|
return undefined;
|
|
2315
2480
|
}
|
|
2316
2481
|
|
|
2317
|
-
export function parseLengthOrCoercePercentageToRuntime(
|
|
2318
|
-
value: Length | DimensionPercentageFor_LengthValue | NumberOrPercentage,
|
|
2319
|
-
builder: StylesheetBuilder,
|
|
2320
|
-
): StyleDescriptor {
|
|
2321
|
-
return parseLength(value, builder);
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
2482
|
export function parseGap(
|
|
2325
2483
|
declaration: DeclarationType<"gap" | "column-gap" | "row-gap">,
|
|
2326
2484
|
builder: StylesheetBuilder,
|
|
@@ -2633,6 +2791,102 @@ export function parseCalcFn(
|
|
|
2633
2791
|
return;
|
|
2634
2792
|
}
|
|
2635
2793
|
|
|
2794
|
+
export function parseColorMix(
|
|
2795
|
+
tokens: TokenOrValue[],
|
|
2796
|
+
builder: StylesheetBuilder,
|
|
2797
|
+
property: string,
|
|
2798
|
+
): StyleDescriptor {
|
|
2799
|
+
const [inToken, whitespace, colorSpace, comma, ...remaining] = tokens;
|
|
2800
|
+
const rest = remaining.filter(
|
|
2801
|
+
(token) =>
|
|
2802
|
+
token.type !== "token" ||
|
|
2803
|
+
!["white-space", "comment"].includes(token.value.type),
|
|
2804
|
+
);
|
|
2805
|
+
if (
|
|
2806
|
+
typeof inToken !== "object" ||
|
|
2807
|
+
inToken.type !== "token" ||
|
|
2808
|
+
inToken.value.type !== "ident" ||
|
|
2809
|
+
inToken.value.value !== "in"
|
|
2810
|
+
) {
|
|
2811
|
+
return;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
if (
|
|
2815
|
+
typeof whitespace !== "object" ||
|
|
2816
|
+
whitespace.type !== "token" ||
|
|
2817
|
+
whitespace.value.type !== "white-space"
|
|
2818
|
+
) {
|
|
2819
|
+
return;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
if (
|
|
2823
|
+
typeof comma !== "object" ||
|
|
2824
|
+
comma.type !== "token" ||
|
|
2825
|
+
comma.value.type !== "comma"
|
|
2826
|
+
) {
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
|
|
2831
|
+
if (typeof colorSpaceArg !== "string") {
|
|
2832
|
+
return;
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
let nextToken = rest.shift();
|
|
2836
|
+
|
|
2837
|
+
const leftColorArg = parseUnparsed(nextToken, builder, property);
|
|
2838
|
+
|
|
2839
|
+
if (!leftColorArg) {
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
nextToken = rest.shift();
|
|
2844
|
+
|
|
2845
|
+
let leftColorPercentage: StyleDescriptor | undefined;
|
|
2846
|
+
if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
|
|
2847
|
+
leftColorPercentage = parseUnparsed(nextToken, builder, property);
|
|
2848
|
+
nextToken = rest.shift();
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2851
|
+
if (
|
|
2852
|
+
typeof nextToken !== "object" ||
|
|
2853
|
+
nextToken.type !== "token" ||
|
|
2854
|
+
nextToken.value.type !== "comma"
|
|
2855
|
+
) {
|
|
2856
|
+
return;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
nextToken = rest.shift();
|
|
2860
|
+
|
|
2861
|
+
const rightColorArg = parseUnparsed(nextToken, builder, property);
|
|
2862
|
+
|
|
2863
|
+
nextToken = rest.shift();
|
|
2864
|
+
let rightColorPercentage: StyleDescriptor | undefined;
|
|
2865
|
+
if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
|
|
2866
|
+
rightColorPercentage = parseUnparsed(nextToken, builder, property);
|
|
2867
|
+
nextToken = rest.shift();
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
// We should have expired all tokens now
|
|
2871
|
+
if (nextToken) {
|
|
2872
|
+
return;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
return [
|
|
2876
|
+
{},
|
|
2877
|
+
"colorMix",
|
|
2878
|
+
// Omitted weights must not leave holes: Metro serializes them as null,
|
|
2879
|
+
// which the native resolver rejects.
|
|
2880
|
+
[
|
|
2881
|
+
colorSpaceArg,
|
|
2882
|
+
leftColorArg,
|
|
2883
|
+
leftColorPercentage,
|
|
2884
|
+
rightColorArg,
|
|
2885
|
+
rightColorPercentage,
|
|
2886
|
+
].filter((arg) => arg !== undefined),
|
|
2887
|
+
];
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2636
2890
|
export function parseCalcArguments(
|
|
2637
2891
|
[...args]: TokenOrValue[],
|
|
2638
2892
|
builder: StylesheetBuilder,
|
|
@@ -2755,10 +3009,10 @@ export function parseUnresolvedColor(
|
|
|
2755
3009
|
{},
|
|
2756
3010
|
"rgba",
|
|
2757
3011
|
[
|
|
2758
|
-
round(color.r * 255),
|
|
2759
|
-
round(color.g * 255),
|
|
2760
|
-
round(color.b * 255),
|
|
2761
|
-
parseUnparsed(color.alpha, builder, property),
|
|
3012
|
+
[round(color.r * 255)],
|
|
3013
|
+
[round(color.g * 255)],
|
|
3014
|
+
[round(color.b * 255)],
|
|
3015
|
+
[parseUnparsed(color.alpha, builder, property)],
|
|
2762
3016
|
],
|
|
2763
3017
|
];
|
|
2764
3018
|
case "hsl":
|
|
@@ -2766,10 +3020,10 @@ export function parseUnresolvedColor(
|
|
|
2766
3020
|
{},
|
|
2767
3021
|
color.type,
|
|
2768
3022
|
[
|
|
2769
|
-
color.h,
|
|
2770
|
-
color.s,
|
|
2771
|
-
color.l,
|
|
2772
|
-
parseUnparsed(color.alpha, builder, property),
|
|
3023
|
+
[color.h],
|
|
3024
|
+
[color.s],
|
|
3025
|
+
[color.l],
|
|
3026
|
+
[parseUnparsed(color.alpha, builder, property)],
|
|
2773
3027
|
],
|
|
2774
3028
|
];
|
|
2775
3029
|
case "light-dark": {
|
|
@@ -3007,21 +3261,25 @@ function parseBackgroundImage(
|
|
|
3007
3261
|
declaration: DeclarationType<"background-image">,
|
|
3008
3262
|
builder: StylesheetBuilder,
|
|
3009
3263
|
) {
|
|
3010
|
-
builder.addDescriptor(
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3264
|
+
builder.addDescriptor("experimental_backgroundImage", [
|
|
3265
|
+
{},
|
|
3266
|
+
"join",
|
|
3267
|
+
[
|
|
3268
|
+
declaration.value.flatMap((image): StyleDescriptor[] => {
|
|
3269
|
+
switch (image.type) {
|
|
3270
|
+
case "gradient": {
|
|
3271
|
+
const gradient = parseGradient(image.value, builder);
|
|
3272
|
+
return gradient ? [gradient] : [];
|
|
3273
|
+
}
|
|
3274
|
+
case "none":
|
|
3275
|
+
return ["none"];
|
|
3017
3276
|
}
|
|
3018
|
-
case "none":
|
|
3019
|
-
return ["none"];
|
|
3020
|
-
}
|
|
3021
3277
|
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3278
|
+
return [];
|
|
3279
|
+
}),
|
|
3280
|
+
", ",
|
|
3281
|
+
],
|
|
3282
|
+
]);
|
|
3025
3283
|
return;
|
|
3026
3284
|
}
|
|
3027
3285
|
|
|
@@ -3035,8 +3293,8 @@ function parseGradient(
|
|
|
3035
3293
|
{},
|
|
3036
3294
|
"linear-gradient",
|
|
3037
3295
|
[
|
|
3038
|
-
parseLineDirection(gradient.direction, builder),
|
|
3039
|
-
...gradient.items.map((item) => parseGradientItem(item, builder)),
|
|
3296
|
+
[parseLineDirection(gradient.direction, builder)],
|
|
3297
|
+
...gradient.items.map((item) => [parseGradientItem(item, builder)]),
|
|
3040
3298
|
],
|
|
3041
3299
|
];
|
|
3042
3300
|
}
|
|
@@ -3076,10 +3334,10 @@ function parseGradientItem(
|
|
|
3076
3334
|
args.push(parseLength(item.position, builder));
|
|
3077
3335
|
}
|
|
3078
3336
|
|
|
3079
|
-
return [{}, "
|
|
3337
|
+
return [{}, "colorStop", args, 1];
|
|
3080
3338
|
}
|
|
3081
3339
|
case "hint":
|
|
3082
|
-
return parseLength(item.value, builder);
|
|
3340
|
+
return [{}, "gradientPosition", parseLength(item.value, builder), 1];
|
|
3083
3341
|
}
|
|
3084
3342
|
}
|
|
3085
3343
|
|
|
@@ -3179,7 +3437,7 @@ function parseFilter(
|
|
|
3179
3437
|
} as unknown as StyleDescriptor;
|
|
3180
3438
|
case "hue-rotate":
|
|
3181
3439
|
return {
|
|
3182
|
-
[value.type]: parseAngle(value.value, builder),
|
|
3440
|
+
[toRNProperty(value.type)]: parseAngle(value.value, builder),
|
|
3183
3441
|
} as unknown as StyleDescriptor;
|
|
3184
3442
|
case "drop-shadow":
|
|
3185
3443
|
return [
|