react-native-css 0.0.0-nightly.da5ce0f → 0.0.0-nightly.df32ce3
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 +24 -0
- 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 +107 -32
- 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 +103 -62
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +11 -8
- 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 +15 -4
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +16 -3
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +1 -3
- 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/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 +16 -3
- 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/metro/warnings.js +135 -0
- package/dist/commonjs/metro/warnings.js.map +1 -0
- package/dist/commonjs/native/api.js +13 -9
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/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 +60 -11
- 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 +61 -24
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +43 -29
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -1
- 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/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 +140 -14
- 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/root.js +18 -7
- package/dist/commonjs/native-internal/root.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/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/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +1 -1
- 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 +109 -34
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +2 -0
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +103 -62
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +10 -8
- 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 +15 -4
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +16 -3
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +1 -3
- 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/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 +16 -3
- 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/metro/warnings.js +131 -0
- package/dist/module/metro/warnings.js.map +1 -0
- package/dist/module/native/api.js +15 -11
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/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 +63 -14
- 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 +55 -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 +43 -29
- package/dist/module/native/styles/functions/color-mix.js.map +1 -1
- 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/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 +140 -14
- 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/root.js +18 -7
- package/dist/module/native-internal/root.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/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/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +1 -1
- 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 +6 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +2 -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 +7 -8
- 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/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +2 -10
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/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 +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 +14 -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.map +1 -1
- 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/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/root.d.ts +12 -0
- package/dist/typescript/commonjs/src/native-internal/root.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/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 +7 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +4 -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 +7 -8
- 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/index.d.ts +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +2 -10
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +5 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/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 +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 +14 -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 +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -1
- 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 -8
- 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 +13 -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 +65 -29
- 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 +159 -43
- package/src/compiler/compiler.types.ts +9 -0
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +190 -101
- package/src/compiler/lightningcss-loader.ts +16 -15
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +31 -4
- package/src/compiler/stylesheet.ts +23 -10
- package/src/compiler/supports.ts +1 -3
- package/src/components/FlatList.tsx +1 -0
- package/src/components/ImageBackground.tsx +2 -6
- package/src/components/KeyboardAvoidingView.tsx +2 -3
- 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 +7 -0
- package/src/metro/metro-transformer.ts +26 -8
- package/src/metro/typescript.ts +53 -6
- package/src/metro/warnings.ts +187 -0
- package/src/native/api.tsx +22 -17
- 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 +69 -14
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +76 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/functions/color-mix.ts +45 -39
- package/src/native/styles/functions/filters.ts +20 -6
- 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 +146 -15
- 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/root.ts +40 -13
- package/src/native-internal/style-collection.ts +1 -1
- package/src/native-internal/variables.tsx +6 -4
- 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 +6 -11
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +0 -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
|
@@ -19,6 +19,18 @@ var _supports = require("./supports.js");
|
|
|
19
19
|
|
|
20
20
|
const defaultLogger = (0, _debug.debug)("react-native-css:compiler");
|
|
21
21
|
|
|
22
|
+
// lightningcss reports this package's own at-rule as unknown
|
|
23
|
+
const OWN_AT_RULE_WARNING = "Unknown at rule: @nativeMapping";
|
|
24
|
+
|
|
25
|
+
// The warning is the only record of what lightningcss could not parse; only the first pass reads the author's CSS
|
|
26
|
+
function reportSyntaxWarnings(builder, warnings) {
|
|
27
|
+
for (const warning of warnings) {
|
|
28
|
+
if (warning.message !== OWN_AT_RULE_WARNING) {
|
|
29
|
+
builder.addSyntaxWarning(warning.message);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
22
34
|
/**
|
|
23
35
|
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
24
36
|
*
|
|
@@ -59,15 +71,38 @@ function compile(code, options = {}) {
|
|
|
59
71
|
*/
|
|
60
72
|
|
|
61
73
|
const vars = new Map();
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
|
|
75
|
+
// Determine the effective rem multiplier for compile-time inlining.
|
|
76
|
+
// If inlineRem is explicitly set, use that. Otherwise, scan for
|
|
77
|
+
// :root { font-size: Npx } in the CSS to allow CSS-based configuration.
|
|
78
|
+
let effectiveRem = options.inlineRem ?? undefined;
|
|
79
|
+
if (effectiveRem === undefined) {
|
|
80
|
+
const css = typeof code === "string" ? code : code.toString();
|
|
81
|
+
const match = css.match(/:root\s*\{[^}]*font-size:\s*([\d.]+)px/);
|
|
82
|
+
effectiveRem = match?.[1] ? parseFloat(match[1]) : 14;
|
|
83
|
+
options.inlineRem = effectiveRem;
|
|
84
|
+
}
|
|
85
|
+
const firstPassVisitor = {
|
|
86
|
+
Rule(rule) {
|
|
87
|
+
if (rule.type === "unknown" && ["cssInterop", "react-native"].includes(rule.value.name)) {
|
|
88
|
+
throw new Error(`Unsupported @${rule.value.name} configuration. Use the compiler inlineVariables.exclude option to preserve variables, @media (prefers-color-scheme: dark) for dark mode, and React Native Appearance.setColorScheme() for manual selection.`);
|
|
89
|
+
}
|
|
90
|
+
// Reject before variable inlining can erase an unsupported condition and
|
|
91
|
+
// accidentally turn its values into unconditional declarations.
|
|
92
|
+
if (rule.type === "style" && rule.value.selectors.some(selector => selector.some(part => part.type === "pseudo-class" && part.kind === "root") && selector.some(part => part.type === "class" || part.type === "attribute" && part.name === "class"))) {
|
|
93
|
+
throw new Error("Class-qualified :root selectors are unsupported on native. Use @media (prefers-color-scheme: dark) for dark mode, and React Native Appearance.setColorScheme() for manual selection.");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
if (effectiveRem !== false) {
|
|
98
|
+
const remMultiplier = effectiveRem;
|
|
64
99
|
firstPassVisitor.Length = length => {
|
|
65
|
-
if (length.unit !== "rem"
|
|
100
|
+
if (length.unit !== "rem") {
|
|
66
101
|
return length;
|
|
67
102
|
}
|
|
68
103
|
return {
|
|
69
104
|
unit: "px",
|
|
70
|
-
value: (0, _declarations.round)(length.value *
|
|
105
|
+
value: (0, _declarations.round)(length.value * remMultiplier)
|
|
71
106
|
};
|
|
72
107
|
};
|
|
73
108
|
}
|
|
@@ -94,7 +129,8 @@ function compile(code, options = {}) {
|
|
|
94
129
|
};
|
|
95
130
|
}
|
|
96
131
|
const {
|
|
97
|
-
code: firstPass
|
|
132
|
+
code: firstPass,
|
|
133
|
+
warnings: firstPassWarnings
|
|
98
134
|
} = lightningcss({
|
|
99
135
|
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
100
136
|
include: Features.DoublePositionGradients | Features.ColorFunction,
|
|
@@ -146,6 +182,7 @@ function compile(code, options = {}) {
|
|
|
146
182
|
filename: options.filename ?? "style.css",
|
|
147
183
|
projectRoot: options.projectRoot ?? process.cwd()
|
|
148
184
|
});
|
|
185
|
+
reportSyntaxWarnings(builder, firstPassWarnings);
|
|
149
186
|
return {
|
|
150
187
|
stylesheet: () => builder.getNativeStyleSheet(),
|
|
151
188
|
warnings: () => builder.getWarnings()
|
|
@@ -209,7 +246,9 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
209
246
|
const declarationBlock = value.declarations;
|
|
210
247
|
mapping = {
|
|
211
248
|
...mapping,
|
|
212
|
-
...(0, _atRules.parsePropAtRule)(value.rules)
|
|
249
|
+
...(0, _atRules.parsePropAtRule)(value.rules),
|
|
250
|
+
...(0, _atRules.parsePropDeclarations)(declarationBlock?.declarations),
|
|
251
|
+
...(0, _atRules.parsePropDeclarations)(declarationBlock?.importantDeclarations)
|
|
213
252
|
};
|
|
214
253
|
|
|
215
254
|
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
@@ -251,13 +290,15 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
251
290
|
}
|
|
252
291
|
}
|
|
253
292
|
break;
|
|
293
|
+
case "property":
|
|
294
|
+
extractPropertyRule(rule.value, builder);
|
|
295
|
+
break;
|
|
254
296
|
case "custom":
|
|
255
297
|
case "font-face":
|
|
256
298
|
case "font-palette-values":
|
|
257
299
|
case "font-feature-values":
|
|
258
300
|
case "namespace":
|
|
259
301
|
case "layer-statement":
|
|
260
|
-
case "property":
|
|
261
302
|
case "view-transition":
|
|
262
303
|
case "ignored":
|
|
263
304
|
case "unknown":
|
|
@@ -285,33 +326,16 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
285
326
|
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
286
327
|
*/
|
|
287
328
|
function extractMedia(mediaRule, builder, mapping) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
// Initialize an empty array to store screen media queries
|
|
291
|
-
const media = [];
|
|
292
|
-
|
|
293
|
-
// Iterate over all media queries in the mediaRule
|
|
329
|
+
// Comma separated queries are alternatives. Each branch inherits the outer
|
|
330
|
+
// conditions without adding its siblings as required conjunctions.
|
|
294
331
|
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not" ||
|
|
298
|
-
// If this is a @media not print {}
|
|
299
|
-
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
300
|
-
mediaQuery.mediaType !== "print" && mediaQuery.qualifier === "not" && mediaQuery.condition === null) {
|
|
332
|
+
const queryBuilder = builder.fork("media");
|
|
333
|
+
if (!(0, _mediaQuery.parseMediaQuery)(mediaQuery, queryBuilder)) {
|
|
301
334
|
continue;
|
|
302
335
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
for (const m of media) {
|
|
309
|
-
(0, _mediaQuery.parseMediaQuery)(m, builder);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
313
|
-
for (const rule of mediaRule.rules) {
|
|
314
|
-
extractRule(rule, builder, mapping);
|
|
336
|
+
for (const rule of mediaRule.rules) {
|
|
337
|
+
extractRule(rule, queryBuilder, mapping);
|
|
338
|
+
}
|
|
315
339
|
}
|
|
316
340
|
}
|
|
317
341
|
|
|
@@ -324,8 +348,13 @@ function extractContainer(containerRule, builder, mapping) {
|
|
|
324
348
|
builder = builder.fork("container");
|
|
325
349
|
|
|
326
350
|
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
351
|
+
const condition = (0, _containerQuery.parseContainerCondition)(containerRule.condition, builder);
|
|
352
|
+
if (!condition) {
|
|
353
|
+
// An unsupported condition must not turn into an unconditional container.
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
327
356
|
const query = {
|
|
328
|
-
m:
|
|
357
|
+
m: condition
|
|
329
358
|
};
|
|
330
359
|
if (containerRule.name) {
|
|
331
360
|
query.n = `c:${containerRule.name}`;
|
|
@@ -335,4 +364,50 @@ function extractContainer(containerRule, builder, mapping) {
|
|
|
335
364
|
extractRule(rule, builder, mapping);
|
|
336
365
|
}
|
|
337
366
|
}
|
|
367
|
+
function extractPropertyRule(propertyRule, builder) {
|
|
368
|
+
const {
|
|
369
|
+
initialValue,
|
|
370
|
+
name
|
|
371
|
+
} = propertyRule;
|
|
372
|
+
if (initialValue == null) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const varName = name.startsWith("--") ? name.slice(2) : name;
|
|
376
|
+
const value = parsePropertyInitialValue(initialValue, builder);
|
|
377
|
+
if (value !== undefined) {
|
|
378
|
+
builder.addRootVariable(varName, value);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
function parsePropertyInitialValue(component, builder) {
|
|
382
|
+
switch (component.type) {
|
|
383
|
+
case "length":
|
|
384
|
+
return (0, _declarations.parseLength)(component.value, builder);
|
|
385
|
+
case "number":
|
|
386
|
+
case "integer":
|
|
387
|
+
return (0, _declarations.round)(component.value);
|
|
388
|
+
case "percentage":
|
|
389
|
+
return `${(0, _declarations.round)(component.value * 100)}%`;
|
|
390
|
+
case "color":
|
|
391
|
+
return (0, _declarations.parseColor)(component.value, builder);
|
|
392
|
+
case "angle":
|
|
393
|
+
return (0, _declarations.parseAngle)(component.value, builder);
|
|
394
|
+
case "length-percentage":
|
|
395
|
+
return (0, _declarations.parseLength)(component.value, builder);
|
|
396
|
+
case "token-list":
|
|
397
|
+
return (0, _declarations.reduceParseUnparsed)(component.value, builder, "@property", false);
|
|
398
|
+
case "custom-ident":
|
|
399
|
+
case "literal":
|
|
400
|
+
return component.value;
|
|
401
|
+
case "repeated":
|
|
402
|
+
{
|
|
403
|
+
const results = component.value.components.map(c => parsePropertyInitialValue(c, builder)).filter(v => v !== undefined);
|
|
404
|
+
// Unwrap single-child repeated values so downstream consumers get a
|
|
405
|
+
// scalar instead of a 1-element array. For example, `<length>+` with
|
|
406
|
+
// initial-value `10px` should produce the same shape as `<length>`.
|
|
407
|
+
return results.length === 1 ? results[0] : results;
|
|
408
|
+
}
|
|
409
|
+
default:
|
|
410
|
+
return undefined;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
338
413
|
//# sourceMappingURL=compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeUtil","require","_debug","_atRules","_containerQuery","_declarations","_inlineVariables","_keyframes","_lightningcssLoader","_mediaQuery","_stylesheet","_supports","defaultLogger","debug","compile","code","options","logger","isLoggerEnabled","enabled","Boolean","features","Object","assign","selectorPrefix","startsWith","slice","JSON","stringify","process","env","NODE_ENV","toString","builder","StylesheetBuilder","lightningcss","Features","lightningcssLoader","vars","Map","firstPassVisitor","inlineRem","Length","length","unit","value","round","inlineVariables","exclusionList","exclude","Declaration","decl","property","name","includes","entry","get","count","type","set","StyleSheetExit","sheet","firstPass","TextEncoder","encode","include","DoublePositionGradients","ColorFunction","VendorPrefixes","visitor","filename","projectRoot","cwd","MAX_LOG_SIZE","subarray","customAtRules","body","Rule","rule","maybeMutateReactNativeOptions","rules","inspect","depth","colors","compact","extractRule","stylesheet","getNativeStyleSheet","warnings","getWarnings","mapping","extractKeyFrames","extractContainer","extractMedia","declarationBlock","declarations","newNestedRule","declaration","parseDeclaration","applyRuleToSelectors","importantDeclarations","important","parsePropAtRule","fork","selectors","newRule","nestedRule","layerRule","supportsConditionValid","condition","mediaRule","media","mediaQuery","query","mediaQueries","mediaType","qualifier","push","m","parseMediaQuery","containerRule","parseContainerCondition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,MAAM,KAAK,CAAC,EAAE;IACtB;EACF;EAEA,KAAK,MAAM2E,CAAC,IAAIP,KAAK,EAAE;IACrB,IAAAQ,2BAAe,EAACD,CAAC,EAAErF,OAAO,CAAC;EAC7B;;EAEA;EACA,KAAK,MAAM6C,IAAI,IAAIgC,SAAS,CAAC9B,KAAK,EAAE;IAClCK,WAAW,CAACP,IAAI,EAAE7C,OAAO,EAAEyD,OAAO,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASE,gBAAgBA,CACvB4B,aAA4B,EAC5BvF,OAA0B,EAC1ByD,OAAyB,EACzB;EACAzD,OAAO,GAAGA,OAAO,CAACsE,IAAI,CAAC,WAAW,CAAC;;EAEnC;EACA,MAAMU,KAAqB,GAAG;IAC5BK,CAAC,EAAE,IAAAG,uCAAuB,EAACD,aAAa,CAACX,SAAS,EAAE5E,OAAO;EAC7D,CAAC;EAED,IAAIuF,aAAa,CAACnE,IAAI,EAAE;IACtB4D,KAAK,CAACS,CAAC,GAAG,KAAKF,aAAa,CAACnE,IAAI,EAAE;EACrC;EAEApB,OAAO,CAAC0F,iBAAiB,CAACV,KAAK,CAAC;EAEhC,KAAK,MAAMnC,IAAI,IAAI0C,aAAa,CAACxC,KAAK,EAAE;IACtCK,WAAW,CAACP,IAAI,EAAE7C,OAAO,EAAEyD,OAAO,CAAC;EACrC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_nodeUtil","require","_debug","_atRules","_containerQuery","_declarations","_inlineVariables","_keyframes","_lightningcssLoader","_mediaQuery","_stylesheet","_supports","defaultLogger","debug","OWN_AT_RULE_WARNING","reportSyntaxWarnings","builder","warnings","warning","message","addSyntaxWarning","compile","code","options","logger","isLoggerEnabled","enabled","Boolean","features","Object","assign","selectorPrefix","startsWith","slice","JSON","stringify","process","env","NODE_ENV","toString","StylesheetBuilder","lightningcss","Features","lightningcssLoader","vars","Map","effectiveRem","inlineRem","undefined","css","match","parseFloat","firstPassVisitor","Rule","rule","type","includes","value","name","Error","selectors","some","selector","part","kind","remMultiplier","Length","length","unit","round","inlineVariables","exclusionList","exclude","Declaration","decl","property","entry","get","count","set","StyleSheetExit","sheet","firstPass","firstPassWarnings","TextEncoder","encode","include","DoublePositionGradients","ColorFunction","VendorPrefixes","visitor","filename","projectRoot","cwd","MAX_LOG_SIZE","subarray","customAtRules","body","maybeMutateReactNativeOptions","rules","inspect","depth","colors","compact","extractRule","stylesheet","getNativeStyleSheet","getWarnings","mapping","extractKeyFrames","extractContainer","extractMedia","declarationBlock","declarations","newNestedRule","declaration","parseDeclaration","applyRuleToSelectors","importantDeclarations","important","parsePropAtRule","parsePropDeclarations","fork","newRule","nestedRule","layerRule","supportsConditionValid","condition","extractPropertyRule","mediaRule","mediaQuery","query","mediaQueries","queryBuilder","parseMediaQuery","containerRule","parseContainerCondition","m","n","addContainerQuery","propertyRule","initialValue","varName","parsePropertyInitialValue","addRootVariable","component","parseLength","parseColor","parseAngle","reduceParseUnparsed","results","components","map","c","filter","v"],"sourceRoot":"../../../src","sources":["compiler/compiler.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAYA,IAAAE,QAAA,GAAAF,OAAA;AAYA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAQA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAzCA;;AA2CA,MAAMW,aAAa,GAAG,IAAAC,YAAK,EAAC,2BAA2B,CAAC;;AAExD;AACA,MAAMC,mBAAmB,GAAG,iCAAiC;;AAE7D;AACA,SAASC,oBAAoBA,CAC3BC,OAA0B,EAC1BC,QAAmB,EACb;EACN,KAAK,MAAMC,OAAO,IAA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AG,CAAC,GAAG;IAC3C,KAAK,OAAO;MACV,OAAO,IAAA0F,wBAAU,EAACF,SAAS,CAACxF,KAAK,EAAEzC,OAAO,CAAC;IAC7C,KAAK,OAAO;MACV,OAAO,IAAAoI,wBAAU,EAACH,SAAS,CAACxF,KAAK,EAAEzC,OAAO,CAAC;IAC7C,KAAK,mBAAmB;MACtB,OAAO,IAAAkI,yBAAW,EAACD,SAAS,CAACxF,KAAK,EAAEzC,OAAO,CAAC;IAC9C,KAAK,YAAY;MACf,OAAO,IAAAqI,iCAAmB,EAACJ,SAAS,CAACxF,KAAK,EAAEzC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC;IAC1E,KAAK,cAAc;IACnB,KAAK,SAAS;MACZ,OAAOiI,SAAS,CAACxF,KAAK;IACxB,KAAK,UAAU;MAAE;QACf,MAAM6F,OAAO,GAAGL,SAAS,CAACxF,KAAK,CAAC8F,UAAU,CACvCC,GAAG,CAAEC,CAAC,IAAKV,yBAAyB,CAACU,CAAC,EAAEzI,OAAO,CAAC,CAAC,CACjD0I,MAAM,CAAEC,CAAC,IAAwCA,CAAC,KAAK3G,SAAS,CAAC;QACpE;QACA;QACA;QACA,OAAOsG,OAAO,CAACnF,MAAM,KAAK,CAAC,GAAGmF,OAAO,CAAC,CAAC,CAAC,GAAGA,OAAO;MACpD;IACA;MACE,OAAOtG,SAAS;EACpB;AACF","ignoreList":[]}
|
|
@@ -24,7 +24,12 @@ function parseContainerQueryCondition(condition, builder) {
|
|
|
24
24
|
const query = parseContainerCondition(condition.value, builder);
|
|
25
25
|
return query ? ["!", query] : undefined;
|
|
26
26
|
case "operation":
|
|
27
|
-
const
|
|
27
|
+
const parsed = condition.conditions.map(c => parseContainerCondition(c, builder));
|
|
28
|
+
if (condition.operator === "and" && parsed.some(c => !c)) {
|
|
29
|
+
// Dropping a conjunct would broaden the query to unrelated containers.
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const conditions = parsed.filter(c => !!c);
|
|
28
33
|
if (conditions.length === 0) {
|
|
29
34
|
return;
|
|
30
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mediaQuery","require","parseContainerCondition","condition","builder","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","conditions","map","c","
|
|
1
|
+
{"version":3,"names":["_mediaQuery","require","parseContainerCondition","condition","builder","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","parsed","conditions","map","c","operator","filter","length","feature","name","parseMediaFeatureValue","parseMediaFeatureOperator","start","startOperator","end","endOperator"],"sourceRoot":"../../../src","sources":["compiler/container-query.ts"],"mappings":";;;;;;AAOA,IAAAA,WAAA,GAAAC,OAAA;AAPA;;AAaO,SAASC,uBAAuBA,CACrCC,SAAgC,EAChCC,OAA0B,EAC1B;EACA,IAAIC,cAAc,GAAGC,4BAA4B,CAACH,SAAS,EAAEC,OAAO,CAAC;;EAErE;EACA,IAAI,CAACC,cAAc,IAAIA,cAAc,CAACE,IAAI,CAAEC,CAAC,IAAKA,CAAC,KAAKC,SAAS,CAAC,EAAE;IAClE;EACF;EAEA,OAAOJ,cAAc;AACvB;AAEA,SAASC,4BAA4BA,CACnCH,SAAgC,EAChCC,OAA0B,EACE;EAC5B,QAAQD,SAAS,CAACO,IAAI;IACpB,KAAK,SAAS;MACZ,OAAOC,YAAY,CAACR,SAAS,CAACS,KAAK,EAAER,OAAO,CAAC;IAC/C,KAAK,KAAK;MACR,MAAMS,KAAK,GAAGX,uBAAuB,CAACC,SAAS,CAACS,KAAK,EAAER,OAAO,CAAC;MAC/D,OAAOS,KAAK,GAAG,CAAC,GAAG,EAAEA,KAAK,CAAC,GAAGJ,SAAS;IACzC,KAAK,WAAW;MACd,MAAMK,MAAM,GAAGX,SAAS,CAACY,UAAU,CAACC,GAAG,CAAEC,CAAC,IACxCf,uBAAuB,CAACe,CAAC,EAAEb,OAAO,CACpC,CAAC;MACD,IAAID,SAAS,CAACe,QAAQ,KAAK,KAAK,I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