react-native-css 0.0.0-nightly.d6f42ab → 0.0.0-nightly.eda2b28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/commonjs/babel/import-plugin.js +9 -3
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +16 -3
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +7 -2
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +92 -31
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +148 -56
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +13 -3
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +5 -0
- 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/FlatList.js +1 -0
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +2 -6
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +2 -3
- package/dist/commonjs/components/KeyboardAvoidingView.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/index.cjs +46 -1
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/jest/index.js +1 -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 +1 -1
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/typescript.js +26 -6
- package/dist/commonjs/metro/typescript.js.map +1 -1
- package/dist/commonjs/native/api.js +12 -8
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/react/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +12 -5
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +70 -15
- 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 +47 -23
- 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/functions/color-mix.js +64 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +18 -5
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
- package/dist/commonjs/native/styles/functions/index.js +11 -0
- package/dist/commonjs/native/styles/functions/index.js.map +1 -1
- package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +16 -1
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +5 -4
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +382 -28
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +10 -6
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +13 -0
- package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +45 -12
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/index.js +11 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +55 -43
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +1 -1
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +2 -2
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/commonjs/web/assign-style.js +4 -1
- package/dist/commonjs/web/assign-style.js.map +1 -1
- package/dist/module/babel/import-plugin.js +11 -5
- package/dist/module/babel/import-plugin.js.map +1 -1
- package/dist/module/babel/react-native-web.js +16 -4
- package/dist/module/babel/react-native-web.js.map +1 -1
- package/dist/module/babel/react-native.js +7 -2
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +33 -0
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +94 -33
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +147 -56
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +14 -2
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +13 -3
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +5 -0
- 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/FlatList.js +1 -0
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/ImageBackground.js +2 -6
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +2 -3
- package/dist/module/components/KeyboardAvoidingView.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/index.cjs +46 -1
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/jest/index.js +1 -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 +1 -1
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/typescript.js +26 -6
- package/dist/module/metro/typescript.js.map +1 -1
- package/dist/module/native/api.js +14 -10
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/react/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +13 -6
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +73 -18
- 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 +44 -22
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/functions/color-mix.js +59 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +16 -4
- package/dist/module/native/styles/functions/filters.js.map +1 -1
- package/dist/module/native/styles/functions/index.js +1 -0
- package/dist/module/native/styles/functions/index.js.map +1 -1
- package/dist/module/native/styles/functions/numeric-functions.js +4 -3
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +13 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +5 -4
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +383 -28
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +10 -6
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +9 -0
- package/dist/module/native/styles/scale-factor.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +11 -1
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +6 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/box-shadow.js +46 -12
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/native/styles/shorthands/index.js +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -1
- package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
- package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/module/native/styles/variables.js +55 -43
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +1 -1
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +2 -2
- package/dist/module/web/api.js.map +1 -1
- package/dist/module/web/assign-style.js +4 -1
- package/dist/module/web/assign-style.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -2
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.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/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +5 -3
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/api.d.ts +4 -8
- 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/react/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.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 +13 -3
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +2 -2
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +5 -4
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/index.d.ts +2 -2
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +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 +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +2 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/module/src/components/KeyboardAvoidingView.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/index.d.ts +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -4
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/module/src/native/api.d.ts +5 -9
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -4
- 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 +13 -3
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +7 -7
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +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 +2 -2
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +11 -6
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/index.d.ts +3 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +78 -29
- package/src/babel/import-plugin.ts +15 -4
- package/src/babel/react-native-web.ts +32 -3
- package/src/babel/react-native.ts +7 -1
- package/src/compiler/atRules.ts +44 -0
- package/src/compiler/compiler.ts +140 -42
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +279 -94
- package/src/compiler/lightningcss-loader.ts +21 -1
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +29 -3
- package/src/compiler/stylesheet.ts +6 -0
- package/src/compiler/supports.ts +2 -2
- package/src/components/FlatList.tsx +1 -0
- package/src/components/ImageBackground.tsx +2 -6
- package/src/components/KeyboardAvoidingView.tsx +2 -3
- package/src/components/SafeAreaProvider.tsx +1 -0
- package/src/components/index.cts +46 -1
- package/src/jest/index.ts +1 -1
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +2 -0
- package/src/metro/metro-transformer.ts +9 -6
- package/src/metro/typescript.ts +53 -6
- package/src/native/api.tsx +20 -14
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +13 -5
- package/src/native/react/useNativeCss.ts +79 -17
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +61 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/functions/color-mix.ts +74 -0
- package/src/native/styles/functions/filters.ts +20 -6
- package/src/native/styles/functions/index.ts +1 -0
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/string-functions.ts +18 -0
- package/src/native/styles/functions/transform-functions.ts +5 -4
- package/src/native/styles/index.ts +443 -36
- package/src/native/styles/resolve.ts +15 -11
- package/src/native/styles/scale-factor.ts +6 -0
- package/src/native/styles/shorthands/_handler.ts +14 -1
- package/src/native/styles/shorthands/animation.ts +8 -2
- package/src/native/styles/shorthands/box-shadow.ts +50 -15
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/variables.ts +48 -38
- package/src/native-internal/style-collection.ts +1 -1
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +4 -3
- package/src/utilities/style-descriptor.ts +11 -16
- package/src/web/api.tsx +7 -12
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +3 -20
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
- package/dist/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
|
@@ -27,6 +27,7 @@ exports.parseCalcArguments = parseCalcArguments;
|
|
|
27
27
|
exports.parseCalcFn = parseCalcFn;
|
|
28
28
|
exports.parseColor = parseColor;
|
|
29
29
|
exports.parseColorDeclaration = parseColorDeclaration;
|
|
30
|
+
exports.parseColorMix = parseColorMix;
|
|
30
31
|
exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
|
|
31
32
|
exports.parseCustomDeclaration = parseCustomDeclaration;
|
|
32
33
|
exports.parseDeclaration = parseDeclaration;
|
|
@@ -81,6 +82,7 @@ exports.round = round;
|
|
|
81
82
|
exports.unparsedFunction = unparsedFunction;
|
|
82
83
|
var _colorjs = _interopRequireDefault(require("colorjs.io"));
|
|
83
84
|
var _index = require("../utilities/index.js");
|
|
85
|
+
var _atRules = require("./atRules.js");
|
|
84
86
|
var _keyframes = require("./keyframes.js");
|
|
85
87
|
var _selectors = require("./selectors.js");
|
|
86
88
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -88,9 +90,23 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
88
90
|
|
|
89
91
|
const CommaSeparator = Symbol("CommaSeparator");
|
|
90
92
|
const propertyRename = {
|
|
91
|
-
"background-image": "experimental_backgroundImage"
|
|
93
|
+
"background-image": "experimental_backgroundImage",
|
|
94
|
+
// React Native has no border-inline-* props, but ships the equivalent
|
|
95
|
+
// RTL-aware border-start-* / border-end-* props
|
|
96
|
+
"border-inline-end-color": "border-end-color",
|
|
97
|
+
"border-inline-end-width": "border-end-width",
|
|
98
|
+
"border-inline-start-color": "border-start-color",
|
|
99
|
+
"border-inline-start-width": "border-start-width",
|
|
100
|
+
"border-block-start-width": "border-top-width",
|
|
101
|
+
"border-block-end-width": "border-bottom-width",
|
|
102
|
+
"font-variant-caps": "font-variant"
|
|
92
103
|
};
|
|
93
|
-
|
|
104
|
+
|
|
105
|
+
// React Native only supports a uniform borderStyle, so per-side border
|
|
106
|
+
// styles have no native equivalent and are dropped. "solid" is dropped
|
|
107
|
+
// silently as it matches React Native's default rendering.
|
|
108
|
+
const unsupportedLogicalStyles = new Set(["border-inline-style", "border-inline-start-style", "border-inline-end-style", "border-block-style", "border-block-start-style", "border-block-end-style"]);
|
|
109
|
+
const unparsedRuntimeParsing = new Set(["animation", "animation-name", "border", "border-block-width", "border-inline-width", "box-shadow", "filter", "line-height", "rotate", "scale", "text-shadow", "transform", "translate"]);
|
|
94
110
|
const parsers = {
|
|
95
111
|
"align-content": parseAlignContent,
|
|
96
112
|
"align-items": parseAlignItems,
|
|
@@ -114,10 +130,11 @@ const parsers = {
|
|
|
114
130
|
"border-block-color": parseBorderColor,
|
|
115
131
|
"border-block-end": parseBorderBlockEnd,
|
|
116
132
|
"border-block-end-color": parseColorDeclaration,
|
|
133
|
+
"border-block-end-style": parseBorderInlineStyle,
|
|
117
134
|
"border-block-end-width": parseBorderSideWidthDeclaration,
|
|
118
135
|
"border-block-start": parseBorderBlockStart,
|
|
119
136
|
"border-block-start-color": parseColorDeclaration,
|
|
120
|
-
"border-block-start-style":
|
|
137
|
+
"border-block-start-style": parseBorderInlineStyle,
|
|
121
138
|
"border-block-start-width": parseBorderSideWidthDeclaration,
|
|
122
139
|
"border-block-style": parseBorderBlockStyle,
|
|
123
140
|
"border-block-width": parseBorderBlockWidth,
|
|
@@ -320,8 +337,8 @@ function parseInsetInline({
|
|
|
320
337
|
value
|
|
321
338
|
}, builder) {
|
|
322
339
|
builder.addShorthand("inset-inline", {
|
|
323
|
-
"inset-
|
|
324
|
-
"inset-
|
|
340
|
+
"inset-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder),
|
|
341
|
+
"inset-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder)
|
|
325
342
|
});
|
|
326
343
|
}
|
|
327
344
|
function parseInset({
|
|
@@ -355,14 +372,14 @@ function parseBorderColor(declaration, builder) {
|
|
|
355
372
|
} else {
|
|
356
373
|
const start = parseColor(declaration.value.start, builder);
|
|
357
374
|
const end = parseColor(declaration.value.end, builder);
|
|
358
|
-
if (
|
|
375
|
+
if (declaration.property === "border-inline-color") {
|
|
376
|
+
builder.addDescriptor("border-start-color", start);
|
|
377
|
+
builder.addDescriptor("border-end-color", end);
|
|
378
|
+
} else if (start === end) {
|
|
359
379
|
builder.addDescriptor(declaration.property, start);
|
|
360
|
-
} else
|
|
380
|
+
} else {
|
|
361
381
|
builder.addDescriptor("border-top-color", start);
|
|
362
382
|
builder.addDescriptor("border-bottom-color", end);
|
|
363
|
-
} else {
|
|
364
|
-
builder.addDescriptor("border-left-color", start);
|
|
365
|
-
builder.addDescriptor("border-right-color", end);
|
|
366
383
|
}
|
|
367
384
|
}
|
|
368
385
|
}
|
|
@@ -396,53 +413,65 @@ function parseBorderBlock({
|
|
|
396
413
|
value
|
|
397
414
|
}, builder) {
|
|
398
415
|
builder.addDescriptor("border-block-color", parseColor(value.color, builder));
|
|
399
|
-
|
|
400
|
-
builder.addDescriptor("border-
|
|
416
|
+
const width = parseBorderSideWidth(value.width, builder);
|
|
417
|
+
builder.addDescriptor("border-top-width", width);
|
|
418
|
+
builder.addDescriptor("border-bottom-width", width);
|
|
419
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-style");
|
|
401
420
|
}
|
|
402
421
|
function parseBorderBlockStart({
|
|
403
422
|
value
|
|
404
423
|
}, builder) {
|
|
405
424
|
builder.addDescriptor("border-block-start-color", parseColor(value.color, builder));
|
|
406
|
-
builder.addDescriptor("border-
|
|
425
|
+
builder.addDescriptor("border-top-width", parseBorderSideWidth(value.width, builder));
|
|
426
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-start-style");
|
|
407
427
|
}
|
|
408
428
|
function parseBorderBlockEnd({
|
|
409
429
|
value
|
|
410
430
|
}, builder) {
|
|
411
431
|
builder.addDescriptor("border-block-end-color", parseColor(value.color, builder));
|
|
412
|
-
builder.addDescriptor("border-
|
|
432
|
+
builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
|
|
433
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-block-end-style");
|
|
413
434
|
}
|
|
414
435
|
function parseBorderInline({
|
|
415
436
|
value
|
|
416
437
|
}, builder) {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
builder.addDescriptor("border-
|
|
438
|
+
const color = parseColor(value.color, builder);
|
|
439
|
+
const width = parseBorderSideWidth(value.width, builder);
|
|
440
|
+
builder.addDescriptor("border-start-color", color);
|
|
441
|
+
builder.addDescriptor("border-end-color", color);
|
|
442
|
+
builder.addDescriptor("border-start-width", width);
|
|
443
|
+
builder.addDescriptor("border-end-width", width);
|
|
444
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-style");
|
|
420
445
|
}
|
|
421
446
|
function parseBorderInlineStart({
|
|
422
447
|
value
|
|
423
448
|
}, builder) {
|
|
424
|
-
builder.addDescriptor("border-
|
|
425
|
-
builder.addDescriptor("border-
|
|
426
|
-
builder
|
|
449
|
+
builder.addDescriptor("border-start-color", parseColor(value.color, builder));
|
|
450
|
+
builder.addDescriptor("border-start-width", parseBorderSideWidth(value.width, builder));
|
|
451
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-start-style");
|
|
427
452
|
}
|
|
428
453
|
function parseBorderInlineEnd({
|
|
429
454
|
value
|
|
430
455
|
}, builder) {
|
|
431
|
-
builder.addDescriptor("border-
|
|
432
|
-
builder.addDescriptor("border-
|
|
433
|
-
builder
|
|
456
|
+
builder.addDescriptor("border-end-color", parseColor(value.color, builder));
|
|
457
|
+
builder.addDescriptor("border-end-width", parseBorderSideWidth(value.width, builder));
|
|
458
|
+
dropUnsupportedInlineStyle(parseBorderStyle(value.style, builder), builder, "border-inline-end-style");
|
|
434
459
|
}
|
|
435
460
|
function parseBorderInlineWidth(declaration, builder) {
|
|
436
|
-
builder.addDescriptor("border-
|
|
461
|
+
builder.addDescriptor("border-start-width", parseBorderSideWidth(declaration.value.start, builder));
|
|
462
|
+
builder.addDescriptor("border-end-width", parseBorderSideWidth(declaration.value.end, builder));
|
|
437
463
|
}
|
|
438
464
|
function parseBorderInlineStyle(declaration, builder) {
|
|
439
465
|
if (typeof declaration.value === "string") {
|
|
440
|
-
|
|
441
|
-
} else if (declaration.value.start === declaration.value.end) {
|
|
442
|
-
builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value.start, builder));
|
|
466
|
+
dropUnsupportedInlineStyle(parseBorderStyle(declaration.value, builder), builder, declaration.property);
|
|
443
467
|
} else {
|
|
444
|
-
|
|
445
|
-
|
|
468
|
+
dropUnsupportedInlineStyle(parseBorderStyle(declaration.value.start, builder), builder, "border-inline-start-style");
|
|
469
|
+
dropUnsupportedInlineStyle(parseBorderStyle(declaration.value.end, builder), builder, "border-inline-end-style");
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function dropUnsupportedInlineStyle(style, builder, property) {
|
|
473
|
+
if (style !== undefined && style !== "solid") {
|
|
474
|
+
builder.addWarning("style", property, style);
|
|
446
475
|
}
|
|
447
476
|
}
|
|
448
477
|
function parseFlexFlow({
|
|
@@ -608,7 +637,7 @@ function parseScale({
|
|
|
608
637
|
}
|
|
609
638
|
function parseScaleValue(translate, prop, builder) {
|
|
610
639
|
if (translate === "none") {
|
|
611
|
-
return
|
|
640
|
+
return 1;
|
|
612
641
|
}
|
|
613
642
|
return parseLength(translate[prop], builder);
|
|
614
643
|
}
|
|
@@ -658,6 +687,10 @@ function parseUnparsedDeclaration(declaration, builder) {
|
|
|
658
687
|
builder.addWarning("property", property);
|
|
659
688
|
return;
|
|
660
689
|
}
|
|
690
|
+
if (unsupportedLogicalStyles.has(property)) {
|
|
691
|
+
builder.addWarning("property", property);
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
661
694
|
builder.setWarningProperty(property);
|
|
662
695
|
|
|
663
696
|
/**
|
|
@@ -694,7 +727,10 @@ function parseUnparsedDeclaration(declaration, builder) {
|
|
|
694
727
|
}
|
|
695
728
|
function parseCustomDeclaration(declaration, builder) {
|
|
696
729
|
const property = declaration.value.name;
|
|
697
|
-
if (
|
|
730
|
+
if ((0, _atRules.isMappingProperty)(property)) {
|
|
731
|
+
// Consumed before declarations so property order cannot affect mapping.
|
|
732
|
+
return;
|
|
733
|
+
} else if (property === "-webkit-line-clamp") {
|
|
698
734
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
699
735
|
} else if (property === "-rn-ripple-style") {
|
|
700
736
|
if (parseUnparsed(declaration.value.value, builder, property) === "borderless") {
|
|
@@ -715,6 +751,11 @@ function parseCustomDeclaration(declaration, builder) {
|
|
|
715
751
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
716
752
|
} else if (property === "corner-shape") {
|
|
717
753
|
parseCornerShape(declaration.value, builder);
|
|
754
|
+
} else if (property === "font-variant") {
|
|
755
|
+
const parsedFontVariant = parseFontVariantCaps(parseUnparsed(declaration.value.value, builder, property), builder);
|
|
756
|
+
if (parsedFontVariant !== undefined) {
|
|
757
|
+
builder.addDescriptor(property, parsedFontVariant);
|
|
758
|
+
}
|
|
718
759
|
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
719
760
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
720
761
|
} else {
|
|
@@ -862,6 +903,8 @@ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoPro
|
|
|
862
903
|
case "min":
|
|
863
904
|
case "clamp":
|
|
864
905
|
return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
|
|
906
|
+
case "color-mix":
|
|
907
|
+
return parseColorMix(tokenOrValue.value.arguments, builder, property);
|
|
865
908
|
default:
|
|
866
909
|
{
|
|
867
910
|
builder.addWarning("value", `${tokenOrValue.value.name}()`);
|
|
@@ -1165,7 +1208,19 @@ function parseFontColorDeclaration(declaration, builder) {
|
|
|
1165
1208
|
}
|
|
1166
1209
|
}
|
|
1167
1210
|
function parseColorDeclaration(declaration, builder) {
|
|
1168
|
-
builder.addDescriptor(declaration.property, parseColor(declaration.value, builder));
|
|
1211
|
+
builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, parseColor(declaration.value, builder));
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Lab/LCH/OKLab/OKLCH channels can be `NaN` when lightningcss resolves a
|
|
1216
|
+
* degenerate `color-mix()` at compile time (e.g. mixing black with
|
|
1217
|
+
* `transparent` in oklab yields `NaN` for the a/b chromaticity channels).
|
|
1218
|
+
* Passing `NaN` to colorjs.io produces an invalid string such as
|
|
1219
|
+
* `#NaNNaNNaN80`, which React Native silently discards. Per CSS Color 4 a
|
|
1220
|
+
* missing component is treated as `0`, so coerce `NaN` to `0`.
|
|
1221
|
+
*/
|
|
1222
|
+
function nanToZero(value) {
|
|
1223
|
+
return Number.isNaN(value) ? 0 : value;
|
|
1169
1224
|
}
|
|
1170
1225
|
function parseColor(cssColor, builder) {
|
|
1171
1226
|
if (typeof cssColor === "string") {
|
|
@@ -1218,28 +1273,28 @@ function parseColor(cssColor, builder) {
|
|
|
1218
1273
|
case "lab":
|
|
1219
1274
|
color = new _colorjs.default({
|
|
1220
1275
|
space: cssColor.type,
|
|
1221
|
-
coords: [cssColor.l, cssColor.a, cssColor.b],
|
|
1276
|
+
coords: [nanToZero(cssColor.l), nanToZero(cssColor.a), nanToZero(cssColor.b)],
|
|
1222
1277
|
alpha: cssColor.alpha
|
|
1223
1278
|
});
|
|
1224
1279
|
break;
|
|
1225
1280
|
case "lch":
|
|
1226
1281
|
color = new _colorjs.default({
|
|
1227
1282
|
space: cssColor.type,
|
|
1228
|
-
coords: [cssColor.l, cssColor.c, cssColor.h],
|
|
1283
|
+
coords: [nanToZero(cssColor.l), nanToZero(cssColor.c), nanToZero(cssColor.h)],
|
|
1229
1284
|
alpha: cssColor.alpha
|
|
1230
1285
|
});
|
|
1231
1286
|
break;
|
|
1232
1287
|
case "oklab":
|
|
1233
1288
|
color = new _colorjs.default({
|
|
1234
1289
|
space: cssColor.type,
|
|
1235
|
-
coords: [cssColor.l, cssColor.a, cssColor.b],
|
|
1290
|
+
coords: [nanToZero(cssColor.l), nanToZero(cssColor.a), nanToZero(cssColor.b)],
|
|
1236
1291
|
alpha: cssColor.alpha
|
|
1237
1292
|
});
|
|
1238
1293
|
break;
|
|
1239
1294
|
case "oklch":
|
|
1240
1295
|
color = new _colorjs.default({
|
|
1241
1296
|
space: cssColor.type,
|
|
1242
|
-
coords: [cssColor.l, cssColor.c, cssColor.h],
|
|
1297
|
+
coords: [nanToZero(cssColor.l), nanToZero(cssColor.c), nanToZero(cssColor.h)],
|
|
1243
1298
|
alpha: cssColor.alpha
|
|
1244
1299
|
});
|
|
1245
1300
|
break;
|
|
@@ -1548,25 +1603,17 @@ function parseBorderStyle(value, builder) {
|
|
|
1548
1603
|
function parseBorderBlockWidth(declaration, builder) {
|
|
1549
1604
|
const start = parseBorderSideWidth(declaration.value.start, builder);
|
|
1550
1605
|
const end = parseBorderSideWidth(declaration.value.end, builder);
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
} else {
|
|
1554
|
-
builder.addDescriptor("border-block-start-width", start);
|
|
1555
|
-
builder.addDescriptor("border-block-end-width", end);
|
|
1556
|
-
}
|
|
1606
|
+
builder.addDescriptor("border-top-width", start);
|
|
1607
|
+
builder.addDescriptor("border-bottom-width", end);
|
|
1557
1608
|
}
|
|
1558
1609
|
function parseBorderBlockStyle(declaration, builder) {
|
|
1559
1610
|
const start = parseBorderStyle(declaration.value.start, builder);
|
|
1560
1611
|
const end = parseBorderStyle(declaration.value.end, builder);
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
} else {
|
|
1564
|
-
builder.addDescriptor("border-block-start-style", start);
|
|
1565
|
-
builder.addDescriptor("border-block-end-style", end);
|
|
1566
|
-
}
|
|
1612
|
+
dropUnsupportedInlineStyle(start, builder, "border-block-start-style");
|
|
1613
|
+
dropUnsupportedInlineStyle(end, builder, "border-block-end-style");
|
|
1567
1614
|
}
|
|
1568
1615
|
function parseBorderSideWidthDeclaration(declaration, builder) {
|
|
1569
|
-
builder.addDescriptor(declaration.property, parseBorderSideWidth(declaration.value, builder));
|
|
1616
|
+
builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, parseBorderSideWidth(declaration.value, builder));
|
|
1570
1617
|
}
|
|
1571
1618
|
function parseBorderSideWidth(value, builder) {
|
|
1572
1619
|
if (value.type === "length") {
|
|
@@ -1595,14 +1642,14 @@ function parseFontFamily({
|
|
|
1595
1642
|
return value[0];
|
|
1596
1643
|
}
|
|
1597
1644
|
function parseLineHeightDeclaration(declaration, builder) {
|
|
1598
|
-
builder.addDescriptor("line-height",
|
|
1645
|
+
builder.addDescriptor("line-height", parseLineHeight(declaration.value, builder));
|
|
1599
1646
|
}
|
|
1600
1647
|
function parseLineHeight(value, builder) {
|
|
1601
1648
|
switch (value.type) {
|
|
1602
1649
|
case "normal":
|
|
1603
1650
|
return undefined;
|
|
1604
1651
|
case "number":
|
|
1605
|
-
return [{}, "em",
|
|
1652
|
+
return [{}, "em", value.value, 1];
|
|
1606
1653
|
case "length":
|
|
1607
1654
|
{
|
|
1608
1655
|
const length = value.value;
|
|
@@ -1914,6 +1961,51 @@ function parseCalcFn(name, tokens, builder, property) {
|
|
|
1914
1961
|
}
|
|
1915
1962
|
return;
|
|
1916
1963
|
}
|
|
1964
|
+
function parseColorMix(tokens, builder, property) {
|
|
1965
|
+
const [inToken, whitespace, colorSpace, comma, ...remaining] = tokens;
|
|
1966
|
+
const rest = remaining.filter(token => token.type !== "token" || !["white-space", "comment"].includes(token.value.type));
|
|
1967
|
+
if (typeof inToken !== "object" || inToken.type !== "token" || inToken.value.type !== "ident" || inToken.value.value !== "in") {
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1970
|
+
if (typeof whitespace !== "object" || whitespace.type !== "token" || whitespace.value.type !== "white-space") {
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1973
|
+
if (typeof comma !== "object" || comma.type !== "token" || comma.value.type !== "comma") {
|
|
1974
|
+
return;
|
|
1975
|
+
}
|
|
1976
|
+
const colorSpaceArg = parseUnparsed(colorSpace, builder, property);
|
|
1977
|
+
if (typeof colorSpaceArg !== "string") {
|
|
1978
|
+
return;
|
|
1979
|
+
}
|
|
1980
|
+
let nextToken = rest.shift();
|
|
1981
|
+
const leftColorArg = parseUnparsed(nextToken, builder, property);
|
|
1982
|
+
if (!leftColorArg) {
|
|
1983
|
+
return;
|
|
1984
|
+
}
|
|
1985
|
+
nextToken = rest.shift();
|
|
1986
|
+
let leftColorPercentage;
|
|
1987
|
+
if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
|
|
1988
|
+
leftColorPercentage = parseUnparsed(nextToken, builder, property);
|
|
1989
|
+
nextToken = rest.shift();
|
|
1990
|
+
}
|
|
1991
|
+
if (typeof nextToken !== "object" || nextToken.type !== "token" || nextToken.value.type !== "comma") {
|
|
1992
|
+
return;
|
|
1993
|
+
}
|
|
1994
|
+
nextToken = rest.shift();
|
|
1995
|
+
const rightColorArg = parseUnparsed(nextToken, builder, property);
|
|
1996
|
+
nextToken = rest.shift();
|
|
1997
|
+
let rightColorPercentage;
|
|
1998
|
+
if (nextToken?.type !== "token" || nextToken.value.type !== "comma") {
|
|
1999
|
+
rightColorPercentage = parseUnparsed(nextToken, builder, property);
|
|
2000
|
+
nextToken = rest.shift();
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
// We should have expired all tokens now
|
|
2004
|
+
if (nextToken) {
|
|
2005
|
+
return;
|
|
2006
|
+
}
|
|
2007
|
+
return [{}, "colorMix", [colorSpaceArg, leftColorArg, leftColorPercentage, rightColorArg, rightColorPercentage]];
|
|
2008
|
+
}
|
|
1917
2009
|
function parseCalcArguments([...args], builder, property) {
|
|
1918
2010
|
const parsed = [];
|
|
1919
2011
|
for (const arg of args) {
|
|
@@ -2168,7 +2260,7 @@ function kebabCase(str) {
|
|
|
2168
2260
|
return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase());
|
|
2169
2261
|
}
|
|
2170
2262
|
function parseBackgroundImage(declaration, builder) {
|
|
2171
|
-
builder.addDescriptor("experimental_backgroundImage", declaration.value.flatMap(image => {
|
|
2263
|
+
builder.addDescriptor("experimental_backgroundImage", [{}, "join", [declaration.value.flatMap(image => {
|
|
2172
2264
|
switch (image.type) {
|
|
2173
2265
|
case "gradient":
|
|
2174
2266
|
{
|
|
@@ -2179,7 +2271,7 @@ function parseBackgroundImage(declaration, builder) {
|
|
|
2179
2271
|
return ["none"];
|
|
2180
2272
|
}
|
|
2181
2273
|
return [];
|
|
2182
|
-
}));
|
|
2274
|
+
}), ", "]]);
|
|
2183
2275
|
return;
|
|
2184
2276
|
}
|
|
2185
2277
|
function parseGradient(gradient, builder) {
|
|
@@ -2215,10 +2307,10 @@ function parseGradientItem(item, builder) {
|
|
|
2215
2307
|
if (item.position) {
|
|
2216
2308
|
args.push(parseLength(item.position, builder));
|
|
2217
2309
|
}
|
|
2218
|
-
return [{}, "
|
|
2310
|
+
return [{}, "colorStop", args, 1];
|
|
2219
2311
|
}
|
|
2220
2312
|
case "hint":
|
|
2221
|
-
return parseLength(item.value, builder);
|
|
2313
|
+
return [{}, "gradientPosition", parseLength(item.value, builder), 1];
|
|
2222
2314
|
}
|
|
2223
2315
|
}
|
|
2224
2316
|
function parseObjectFit(declaration, builder) {
|
|
@@ -2277,7 +2369,7 @@ function parseFilter(declaration, builder) {
|
|
|
2277
2369
|
};
|
|
2278
2370
|
case "hue-rotate":
|
|
2279
2371
|
return {
|
|
2280
|
-
[value.type]: parseAngle(value.value, builder)
|
|
2372
|
+
[(0, _selectors.toRNProperty)(value.type)]: parseAngle(value.value, builder)
|
|
2281
2373
|
};
|
|
2282
2374
|
case "drop-shadow":
|
|
2283
2375
|
return [{}, (0, _selectors.toRNProperty)(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
|