react-native-css 0.0.0-nightly.0acc293 → 0.0.0-nightly.0b4380e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -5
- package/dist/commonjs/babel/helpers.js +7 -0
- package/dist/commonjs/babel/helpers.js.map +1 -1
- package/dist/commonjs/babel/import-plugin.js +20 -8
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +17 -4
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +9 -4
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +188 -38
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +149 -57
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inline-variables.js +47 -1
- package/dist/commonjs/compiler/inline-variables.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +16 -4
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +18 -3
- 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 +49 -1
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/jest/index.js +3 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/cache-version.js +43 -0
- package/dist/commonjs/metro/cache-version.js.map +1 -0
- package/dist/commonjs/metro/index.js +2 -0
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +16 -3
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/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/guards.js +7 -0
- package/dist/commonjs/native/conditions/guards.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/react/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +45 -38
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +80 -19
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/native/react/usePassthrough.js +5 -2
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
- package/dist/commonjs/native/reactivity.js +64 -24
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/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 +165 -48
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/root.js +46 -7
- package/dist/commonjs/native-internal/root.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +22 -37
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/native-internal/variables.js +1 -1
- package/dist/commonjs/native-internal/variables.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/equality.js +41 -0
- package/dist/commonjs/utilities/equality.js.map +1 -0
- package/dist/commonjs/utilities/index.js +11 -0
- package/dist/commonjs/utilities/index.js.map +1 -1
- package/dist/commonjs/utilities/style-descriptor.js +4 -9
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +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/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 +190 -40
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +2 -0
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +148 -57
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inline-variables.js +47 -1
- package/dist/module/compiler/inline-variables.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +14 -2
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +16 -5
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +18 -3
- 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 +49 -1
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/jest/index.js +3 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/cache-version.js +39 -0
- package/dist/module/metro/cache-version.js.map +1 -0
- package/dist/module/metro/index.js +2 -0
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +16 -3
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/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/guards.js +7 -0
- package/dist/module/native/conditions/guards.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/react/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +46 -39
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +83 -22
- package/dist/module/native/react/useNativeCss.js.map +1 -1
- package/dist/module/native/react/usePassthrough.js +5 -2
- package/dist/module/native/react/usePassthrough.js.map +1 -1
- package/dist/module/native/reactivity.js +58 -22
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/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 +166 -50
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/root.js +44 -7
- package/dist/module/native-internal/root.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +10 -37
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/native-internal/variables.js +2 -2
- package/dist/module/native-internal/variables.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/equality.js +37 -0
- package/dist/module/utilities/equality.js.map +1 -0
- package/dist/module/utilities/index.js +1 -0
- package/dist/module/utilities/index.js.map +1 -1
- package/dist/module/utilities/style-descriptor.js +4 -9
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +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/helpers.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +13 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -2
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +2 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +8 -8
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/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/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/conditions/guards.d.ts +2 -1
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.d.ts +7 -2
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +0 -3
- 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 +15 -3
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +5 -4
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts +3 -2
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +38 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +11 -6
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/equality.d.ts +2 -0
- package/dist/typescript/commonjs/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +14 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +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 +2 -2
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +3 -2
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +8 -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/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/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 +4 -3
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +9 -4
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +4 -7
- 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 +15 -3
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +9 -8
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/variables.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +39 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +11 -6
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +2 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/equality.d.ts +2 -0
- package/dist/typescript/module/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/index.d.ts +4 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +79 -31
- 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 +266 -49
- package/src/compiler/compiler.types.ts +17 -0
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +280 -95
- package/src/compiler/inline-variables.ts +67 -0
- package/src/compiler/lightningcss-loader.ts +21 -1
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +32 -5
- package/src/compiler/stylesheet.ts +35 -10
- 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 +49 -1
- package/src/jest/index.ts +3 -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/guards.ts +13 -1
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +58 -45
- package/src/native/react/useNativeCss.ts +95 -21
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +79 -24
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/functions/color-mix.ts +74 -0
- package/src/native/styles/functions/filters.ts +20 -6
- package/src/native/styles/functions/index.ts +1 -0
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/string-functions.ts +18 -0
- package/src/native/styles/functions/transform-functions.ts +5 -4
- package/src/native/styles/index.ts +444 -37
- package/src/native/styles/resolve.ts +15 -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 +242 -45
- package/src/native-internal/root.ts +83 -13
- package/src/native-internal/style-collection.ts +21 -46
- package/src/native-internal/variables.tsx +6 -4
- package/src/runtime.types.ts +17 -15
- package/src/utilities/dot-notation.types.ts +4 -3
- package/src/utilities/equality.ts +41 -0
- package/src/utilities/index.ts +1 -0
- package/src/utilities/style-descriptor.ts +11 -16
- package/src/web/api.tsx +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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["allowedModules","resolveImportSource","parseReactNativeSource","source","filename","startsWith","internalPath","split","name","at","has","handleReactNativeImport","declaration","t","specifiers","importKind","rnwSource","value","length","importDeclaration","stringLiteral","statements","specifier","isImportDefaultSpecifier","newSource","push","importDefaultSpecifier","local","importSpecifier","identifier","isImportNamespaceSpecifier","localName","isStringLiteral","imported","handleReactNativeIdentifierRequire","path","id","parsedSource","variableDeclaration","node","kind","variableDeclarator","objectPattern","objectProperty","callExpression","handleReactNativeObjectPatternRequire","properties","isRestElement","computed","isIdentifier","key","newSourceWithName"],"sourceRoot":"../../../src","sources":["babel/react-native.ts"],"mappings":";;AAQA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,mBAAmB,QAAQ,cAAW;AAI/C,SAASC,sBAAsBA,CAACC,MAAc,EAAEC,QAAgB,EAAE;EAChE,IAAID,MAAM,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1BF,MAAM,GAAGF,mBAAmB,CAACG,QAAQ,EAAED,MAAM,CAAC;IAE9C,MAAMG,YAAY,GAAGH,MAAM,CAACI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC;IAC1E,IAAI,CAACD,YAAY,EAAE;MACjB;IACF;;IAEA;IACAH,MAAM,GAAG,qCAAqCG,YAAY,EAAE;EAC9D;EAEA,IAAIH,MAAM,KAAK,cAAc,EAAE;IAC7B,OAAO;MAAEA,MAAM,EAAE;IAA8B,CAAC;EAClD,CAAC,MAAM,IAAIA,MAAM,CAACE,UAAU,CAAC,eAAe,CAAC,EAAE;IAC7C,MAAMG,IAAI,GAAGL,MAAM,CAACI,KAAK,CAAC,GAAG,CAAC,CAACE,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,IAAI,CAACD,IAAI,IAAI,CAACR,cAAc,CAACU,GAAG,CAACF,IAAI,CAAC,EAAE;MACtC;IACF;IAEA,OAAO;MACLL,MAAM,EAAE,+BAA+BK,IAAI,EAAE;MAC7CA;IACF,CAAC;EACH;EAEA;AACF;AAEA,OAAO,SAASG,uBAAuBA,CACrCC,WAA8B,EAC9BC,CAAa,EACbT,QAAgB,EACS;EACzB,MAAM;IAAEU,UAAU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AC,EAAE,CACxChB,CAAC,CAACO,aAAa,CAAC+B,iBAAiB,CAAC,CACnC,CACH,CAAC,CACF,CACH,CAAC;MACH;IACF;EACF;EAEA,OAAO9B,UAAU;AACnB","ignoreList":[]}
|
|
@@ -60,6 +60,39 @@ export function parsePropAtRule(rules) {
|
|
|
60
60
|
}
|
|
61
61
|
return mapping;
|
|
62
62
|
}
|
|
63
|
+
const mappingProperty = "-rn-native-mapping";
|
|
64
|
+
export function isMappingProperty(name) {
|
|
65
|
+
return name === mappingProperty || name.startsWith(`${mappingProperty}-`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Declaration metadata survives the optimizer flattening nested at rules. */
|
|
69
|
+
export function parsePropDeclarations(declarations = []) {
|
|
70
|
+
const mapping = {};
|
|
71
|
+
for (const declaration of declarations) {
|
|
72
|
+
if (declaration.property !== "custom" || !isMappingProperty(declaration.value.name)) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const {
|
|
76
|
+
name,
|
|
77
|
+
value
|
|
78
|
+
} = declaration.value;
|
|
79
|
+
const target = value.filter(item => item.type === "token" && item.value.type !== "white-space");
|
|
80
|
+
if (target.length === 0) continue;
|
|
81
|
+
nativeMappingAtRuleBlock([{
|
|
82
|
+
type: "token",
|
|
83
|
+
value: {
|
|
84
|
+
type: "ident",
|
|
85
|
+
value: name === mappingProperty ? "*" : name.slice(mappingProperty.length + 1)
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
type: "token",
|
|
89
|
+
value: {
|
|
90
|
+
type: "colon"
|
|
91
|
+
}
|
|
92
|
+
}, ...target], mapping);
|
|
93
|
+
}
|
|
94
|
+
return mapping;
|
|
95
|
+
}
|
|
63
96
|
function nativeMappingAtRuleBlock(token, mapping = {}) {
|
|
64
97
|
let [from, to] = splitByDelimiter(token, item => {
|
|
65
98
|
return item.value.type === "colon";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["toRNProperty","splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isNativeMappingAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","nativeMappingAtRuleBlock","block","blocks","blockRules","token","from","to","fromToken","flatMap","index","split","map","part"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["toRNProperty","splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isNativeMappingAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","nativeMappingAtRuleBlock","block","blocks","blockRules","mappingProperty","isMappingProperty","startsWith","parsePropDeclarations","declarations","declaration","property","target","slice","token","from","to","fromToken","flatMap","index","split","map","part"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;AASA,SAASA,YAAY,QAAQ,gBAAa;AAC1C,SAASC,gBAAgB,QAAQ,yBAAsB;;AAYvD;AACA;AACA;;AAcA,OAAO,SAASC,6BAA6BA,CAC3CC,IAA8B,EAC9BC,QAA2B,EAC3B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;;EAEA;AACF;;AAEA;AACA;AACA;;AAEA,SAASC,qBAAqBA,CAACL,IAAuB,EAAsB;EAC1E,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,eAAe;AACvE;AAEA,OAAO,SAASE,eAAeA,CAACC,KAA6B,EAAE;EAC7D;EACA,MAAMC,OAAyB,GAAG;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,oBAAoB,EAAE,CAAC,eAAe,CAAC;IACvC,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC/C,kBA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|
|
@@ -3,17 +3,30 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
import { inspect } from "node:util";
|
|
5
5
|
import { debug } from "debug";
|
|
6
|
-
import { maybeMutateReactNativeOptions, parsePropAtRule } from "./atRules.js";
|
|
6
|
+
import { maybeMutateReactNativeOptions, parsePropAtRule, parsePropDeclarations } from "./atRules.js";
|
|
7
7
|
import { parseContainerCondition } from "./container-query.js";
|
|
8
|
-
import { parseDeclaration, round } from "./declarations.js";
|
|
8
|
+
import { parseAngle, parseColor, parseDeclaration, parseLength, reduceParseUnparsed, round } from "./declarations.js";
|
|
9
9
|
import { inlineVariables } from "./inline-variables.js";
|
|
10
10
|
import { extractKeyFrames } from "./keyframes.js";
|
|
11
11
|
import { lightningcssLoader } from "./lightningcss-loader.js";
|
|
12
12
|
import { parseMediaQuery } from "./media-query.js";
|
|
13
|
+
import { isUniversalSelector } from "./selector-builder.js";
|
|
13
14
|
import { StylesheetBuilder } from "./stylesheet.js";
|
|
14
15
|
import { supportsConditionValid } from "./supports.js";
|
|
15
16
|
const defaultLogger = debug("react-native-css:compiler");
|
|
16
17
|
|
|
18
|
+
// lightningcss reports this package's own at-rule as unknown
|
|
19
|
+
const OWN_AT_RULE_WARNING = "Unknown at rule: @nativeMapping";
|
|
20
|
+
|
|
21
|
+
// The warning is the only record of what lightningcss could not parse; only the first pass reads the author's CSS
|
|
22
|
+
function reportSyntaxWarnings(builder, warnings) {
|
|
23
|
+
for (const warning of warnings) {
|
|
24
|
+
if (warning.message !== OWN_AT_RULE_WARNING) {
|
|
25
|
+
builder.addSyntaxWarning(warning.message);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
/**
|
|
18
31
|
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
19
32
|
*
|
|
@@ -54,15 +67,54 @@ export function compile(code, options = {}) {
|
|
|
54
67
|
*/
|
|
55
68
|
|
|
56
69
|
const vars = new Map();
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
|
|
71
|
+
// Determine the effective rem multiplier for compile-time inlining.
|
|
72
|
+
// If inlineRem is explicitly set, use that. Otherwise, scan for
|
|
73
|
+
// :root { font-size: Npx } in the CSS to allow CSS-based configuration.
|
|
74
|
+
let effectiveRem = options.inlineRem ?? undefined;
|
|
75
|
+
if (effectiveRem === undefined) {
|
|
76
|
+
const css = typeof code === "string" ? code : code.toString();
|
|
77
|
+
const match = css.match(/:root\s*\{[^}]*font-size:\s*([\d.]+)px/);
|
|
78
|
+
effectiveRem = match?.[1] ? parseFloat(match[1]) : 14;
|
|
79
|
+
options.inlineRem = effectiveRem;
|
|
80
|
+
}
|
|
81
|
+
const inlining = options.inlineVariables !== false;
|
|
82
|
+
const firstPassVisitor = {
|
|
83
|
+
// Registered from the first pass, since lightningcss prints only the last @property of a name, valid or not
|
|
84
|
+
StyleSheetExit(sheet) {
|
|
85
|
+
const nonInheriting = registerProperties(collectRegistrations(sheet.rules), builder);
|
|
86
|
+
if (!inlining) {
|
|
87
|
+
return sheet;
|
|
88
|
+
}
|
|
89
|
+
const universalDeclarations = countUniversalDeclarations(sheet.rules);
|
|
90
|
+
|
|
91
|
+
// A non-inheriting property has one value on every element only when universal rules are all that declare it
|
|
92
|
+
const runtimeVariables = new Set(Array.from(nonInheriting).filter(name => {
|
|
93
|
+
const declarations = vars.get(name)?.count;
|
|
94
|
+
return declarations === undefined || universalDeclarations.get(name) !== declarations;
|
|
95
|
+
}));
|
|
96
|
+
return inlineVariables(sheet, vars, runtimeVariables);
|
|
97
|
+
},
|
|
98
|
+
Rule(rule) {
|
|
99
|
+
if (rule.type === "unknown" && ["cssInterop", "react-native"].includes(rule.value.name)) {
|
|
100
|
+
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.`);
|
|
101
|
+
}
|
|
102
|
+
// Reject before variable inlining can erase an unsupported condition and
|
|
103
|
+
// accidentally turn its values into unconditional declarations.
|
|
104
|
+
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"))) {
|
|
105
|
+
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.");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
if (effectiveRem !== false) {
|
|
110
|
+
const remMultiplier = effectiveRem;
|
|
59
111
|
firstPassVisitor.Length = length => {
|
|
60
|
-
if (length.unit !== "rem"
|
|
61
|
-
return
|
|
112
|
+
if (length.unit !== "rem") {
|
|
113
|
+
return undefined;
|
|
62
114
|
}
|
|
63
115
|
return {
|
|
64
116
|
unit: "px",
|
|
65
|
-
value: round(length.value *
|
|
117
|
+
value: round(length.value * remMultiplier)
|
|
66
118
|
};
|
|
67
119
|
};
|
|
68
120
|
}
|
|
@@ -84,12 +136,10 @@ export function compile(code, options = {}) {
|
|
|
84
136
|
vars.set(decl.value.name, entry);
|
|
85
137
|
}
|
|
86
138
|
};
|
|
87
|
-
firstPassVisitor.StyleSheetExit = sheet => {
|
|
88
|
-
return inlineVariables(sheet, vars);
|
|
89
|
-
};
|
|
90
139
|
}
|
|
91
140
|
const {
|
|
92
|
-
code: firstPass
|
|
141
|
+
code: firstPass,
|
|
142
|
+
warnings: firstPassWarnings
|
|
93
143
|
} = lightningcss({
|
|
94
144
|
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
95
145
|
include: Features.DoublePositionGradients | Features.ColorFunction,
|
|
@@ -115,7 +165,6 @@ export function compile(code, options = {}) {
|
|
|
115
165
|
const visitor = {
|
|
116
166
|
Rule(rule) {
|
|
117
167
|
maybeMutateReactNativeOptions(rule, builder);
|
|
118
|
-
return rule;
|
|
119
168
|
},
|
|
120
169
|
StyleSheetExit(sheet) {
|
|
121
170
|
if (isLoggerEnabled) {
|
|
@@ -132,7 +181,6 @@ export function compile(code, options = {}) {
|
|
|
132
181
|
// We have processed this rule, so now delete it from the AST
|
|
133
182
|
}
|
|
134
183
|
logger(`Exiting lightningcss`);
|
|
135
|
-
return sheet;
|
|
136
184
|
}
|
|
137
185
|
};
|
|
138
186
|
lightningcss({
|
|
@@ -141,6 +189,7 @@ export function compile(code, options = {}) {
|
|
|
141
189
|
filename: options.filename ?? "style.css",
|
|
142
190
|
projectRoot: options.projectRoot ?? process.cwd()
|
|
143
191
|
});
|
|
192
|
+
reportSyntaxWarnings(builder, firstPassWarnings);
|
|
144
193
|
return {
|
|
145
194
|
stylesheet: () => builder.getNativeStyleSheet(),
|
|
146
195
|
warnings: () => builder.getWarnings()
|
|
@@ -204,7 +253,9 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
204
253
|
const declarationBlock = value.declarations;
|
|
205
254
|
mapping = {
|
|
206
255
|
...mapping,
|
|
207
|
-
...parsePropAtRule(value.rules)
|
|
256
|
+
...parsePropAtRule(value.rules),
|
|
257
|
+
...parsePropDeclarations(declarationBlock?.declarations),
|
|
258
|
+
...parsePropDeclarations(declarationBlock?.importantDeclarations)
|
|
208
259
|
};
|
|
209
260
|
|
|
210
261
|
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
@@ -246,13 +297,13 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
246
297
|
}
|
|
247
298
|
}
|
|
248
299
|
break;
|
|
300
|
+
case "property":
|
|
249
301
|
case "custom":
|
|
250
302
|
case "font-face":
|
|
251
303
|
case "font-palette-values":
|
|
252
304
|
case "font-feature-values":
|
|
253
305
|
case "namespace":
|
|
254
306
|
case "layer-statement":
|
|
255
|
-
case "property":
|
|
256
307
|
case "view-transition":
|
|
257
308
|
case "ignored":
|
|
258
309
|
case "unknown":
|
|
@@ -280,33 +331,16 @@ function extractRule(rule, builder, mapping = {}) {
|
|
|
280
331
|
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
281
332
|
*/
|
|
282
333
|
function extractMedia(mediaRule, builder, mapping) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
// Initialize an empty array to store screen media queries
|
|
286
|
-
const media = [];
|
|
287
|
-
|
|
288
|
-
// Iterate over all media queries in the mediaRule
|
|
334
|
+
// Comma separated queries are alternatives. Each branch inherits the outer
|
|
335
|
+
// conditions without adding its siblings as required conjunctions.
|
|
289
336
|
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not" ||
|
|
293
|
-
// If this is a @media not print {}
|
|
294
|
-
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
295
|
-
mediaQuery.mediaType !== "print" && mediaQuery.qualifier === "not" && mediaQuery.condition === null) {
|
|
337
|
+
const queryBuilder = builder.fork("media");
|
|
338
|
+
if (!parseMediaQuery(mediaQuery, queryBuilder)) {
|
|
296
339
|
continue;
|
|
297
340
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
for (const m of media) {
|
|
304
|
-
parseMediaQuery(m, builder);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
308
|
-
for (const rule of mediaRule.rules) {
|
|
309
|
-
extractRule(rule, builder, mapping);
|
|
341
|
+
for (const rule of mediaRule.rules) {
|
|
342
|
+
extractRule(rule, queryBuilder, mapping);
|
|
343
|
+
}
|
|
310
344
|
}
|
|
311
345
|
}
|
|
312
346
|
|
|
@@ -319,8 +353,13 @@ function extractContainer(containerRule, builder, mapping) {
|
|
|
319
353
|
builder = builder.fork("container");
|
|
320
354
|
|
|
321
355
|
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
356
|
+
const condition = parseContainerCondition(containerRule.condition, builder);
|
|
357
|
+
if (!condition) {
|
|
358
|
+
// An unsupported condition must not turn into an unconditional container.
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
322
361
|
const query = {
|
|
323
|
-
m:
|
|
362
|
+
m: condition
|
|
324
363
|
};
|
|
325
364
|
if (containerRule.name) {
|
|
326
365
|
query.n = `c:${containerRule.name}`;
|
|
@@ -330,4 +369,115 @@ function extractContainer(containerRule, builder, mapping) {
|
|
|
330
369
|
extractRule(rule, builder, mapping);
|
|
331
370
|
}
|
|
332
371
|
}
|
|
372
|
+
|
|
373
|
+
// Browsers register the last @property of a name, in a layer, in @container and under an @supports that holds, and one in @media only while it matches
|
|
374
|
+
function collectRegistrations(rules, conditional = false, registrations = new Map()) {
|
|
375
|
+
for (const rule of rules) {
|
|
376
|
+
switch (rule.type) {
|
|
377
|
+
case "property":
|
|
378
|
+
if (!conditional) {
|
|
379
|
+
registrations.set(rule.value.name, rule.value);
|
|
380
|
+
}
|
|
381
|
+
break;
|
|
382
|
+
case "media":
|
|
383
|
+
collectRegistrations(rule.value.rules, true, registrations);
|
|
384
|
+
break;
|
|
385
|
+
case "supports":
|
|
386
|
+
collectRegistrations(rule.value.rules, conditional || !supportsConditionValid(rule.value.condition), registrations);
|
|
387
|
+
break;
|
|
388
|
+
case "container":
|
|
389
|
+
case "layer-block":
|
|
390
|
+
collectRegistrations(rule.value.rules, conditional, registrations);
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return registrations;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// Registers the properties whose initial value has a descriptor, and returns the names that do not inherit
|
|
398
|
+
function registerProperties(registrations, builder) {
|
|
399
|
+
const nonInheriting = new Set();
|
|
400
|
+
for (const [name, {
|
|
401
|
+
inherits,
|
|
402
|
+
initialValue
|
|
403
|
+
}] of registrations) {
|
|
404
|
+
const value = initialValue == null ? undefined : parsePropertyInitialValue(initialValue, builder);
|
|
405
|
+
|
|
406
|
+
// Left unregistered, since without its initial value the property would fall back where CSS gives that value
|
|
407
|
+
if (initialValue != null && value === undefined) {
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
builder.registerProperty(name.slice(2), inherits, value);
|
|
411
|
+
if (!inherits) {
|
|
412
|
+
nonInheriting.add(name);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return nonInheriting;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Counts each custom property's declarations in universal rules every element shares: at the top level, in a layer or under an @supports, whose declarations the inliner reads too, and not under @media or @container
|
|
419
|
+
function countUniversalDeclarations(rules, counts = new Map()) {
|
|
420
|
+
for (const rule of rules) {
|
|
421
|
+
switch (rule.type) {
|
|
422
|
+
case "style":
|
|
423
|
+
if (rule.value.selectors.some(isUniversalSelector)) {
|
|
424
|
+
const {
|
|
425
|
+
declarations = [],
|
|
426
|
+
importantDeclarations = []
|
|
427
|
+
} = rule.value.declarations ?? {};
|
|
428
|
+
for (const declaration of [...declarations, ...importantDeclarations]) {
|
|
429
|
+
if (declaration.property === "custom") {
|
|
430
|
+
const {
|
|
431
|
+
name
|
|
432
|
+
} = declaration.value;
|
|
433
|
+
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
break;
|
|
438
|
+
case "layer-block":
|
|
439
|
+
countUniversalDeclarations(rule.value.rules, counts);
|
|
440
|
+
break;
|
|
441
|
+
case "supports":
|
|
442
|
+
countUniversalDeclarations(rule.value.rules, counts);
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return counts;
|
|
447
|
+
}
|
|
448
|
+
function parsePropertyInitialValue(component, builder) {
|
|
449
|
+
switch (component.type) {
|
|
450
|
+
case "length":
|
|
451
|
+
return parseLength(component.value, builder);
|
|
452
|
+
case "number":
|
|
453
|
+
case "integer":
|
|
454
|
+
return round(component.value);
|
|
455
|
+
case "percentage":
|
|
456
|
+
return `${round(component.value * 100)}%`;
|
|
457
|
+
case "color":
|
|
458
|
+
return parseColor(component.value, builder);
|
|
459
|
+
case "angle":
|
|
460
|
+
return parseAngle(component.value, builder);
|
|
461
|
+
case "length-percentage":
|
|
462
|
+
return parseLength(component.value, builder);
|
|
463
|
+
case "token-list":
|
|
464
|
+
return reduceParseUnparsed(component.value, builder, "@property", false);
|
|
465
|
+
case "custom-ident":
|
|
466
|
+
case "literal":
|
|
467
|
+
return component.value;
|
|
468
|
+
case "repeated":
|
|
469
|
+
{
|
|
470
|
+
const results = component.value.components.map(item => parsePropertyInitialValue(item, builder));
|
|
471
|
+
if (results.includes(undefined)) {
|
|
472
|
+
return undefined;
|
|
473
|
+
}
|
|
474
|
+
// Unwrap single-child repeated values so downstream consumers get a
|
|
475
|
+
// scalar instead of a 1-element array. For example, `<length>+` with
|
|
476
|
+
// initial-value `10px` should produce the same shape as `<length>`.
|
|
477
|
+
return results.length === 1 ? results[0] : results;
|
|
478
|
+
}
|
|
479
|
+
default:
|
|
480
|
+
return undefined;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
333
483
|
//# sourceMappingURL=compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["inspect","debug","maybeMutateReactNativeOptions","parsePropAtRule","parseContainerCondition","parseDeclaration","round","inlineVariables","extractKeyFrames","lightningcssLoader","parseMediaQuery","StylesheetBuilder","supportsConditionValid","defaultLogger","compile","code","options","logger","isLoggerEnabled","enabled","Boolean","features","Object","assign","selectorPrefix","startsWith","slice","JSON","stringify","process","env","NODE_ENV","toString","builder","lightningcss","Features","vars","Map","firstPassVisitor","inlineRem","Length","length","unit","value","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","rules","depth","colors","compact","extractRule","stylesheet","getNativeStyleSheet","warnings","getWarnings","mapping","extractContainer","extractMedia","declarationBlock","declarations","newNestedRule","declaration","applyRuleToSelectors","importantDeclarations","important","fork","selectors","newRule","nestedRule","layerRule","condition","mediaRule","media","mediaQuery","query","mediaQueries","mediaType","qualifier","push","m","containerRule","n","addContainerQuery"],"sourceRoot":"../../../src","sources":["compiler/compiler.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,QAAQ,WAAW;AAEnC,SAASC,KAAK,QAAQ,OAAO;AAU7B,SAASC,6BAA6B,EAAEC,eAAe,QAAQ,cAAW;AAO1E,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,gBAAgB,EAAEC,KAAK,QAAQ,mBAAgB;AACxD,SAASC,eAAe,QAAQ,uBAAoB;AACpD,SAASC,gBAAgB,QAAQ,gBAAa;AAC9C,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,eAAe,QAAQ,kBAAe;AAC/C,SAASC,iBAAiB,QAAQ,iBAAc;AAChD,SAASC,sBAAsB,QAAQ,eAAY;AAEnD,MAAMC,aAAa,GAAGZ,KAAK,CAAC,2BAA2B,CAAC;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,OAAOA,CAACC,IAAqB,EAAEC,OAAwB,GAAG,CAAC,CAAC,EAAE;EAC5E,MAAM;IAAEC,MAAM,GAAGJ;EAAc,CAAC,GAAGG,OAAO;EAE1C,MAAME,eAAe,GACnB,SAAS,IAAID,MAAM,GAAGA,MAAM,CAACE,OAAO,GAAGC,OAAO,CAACH,MAAM,CAAC;EAExD,MAAMI,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEP,OAAO,CAACK,QAAQ,CAAC;EAEpD,IAAIL,OAAO,CAACQ,cAAc,IAAIR,OAAO,CAACQ,cAAc,CAACC,UAAU,CAAC,GAAG,CAAC,EAAE;IACpET,OAAO,CAACQ,cAAc,GAAGR,OAAO,CAACQ,cAAc,CAACE,KAAK,CAAC,CAAC,CA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U,CAACI,SAAS,KAAK,KAAK,IAC9BJ,UAAU,CAACH,SAAS,KAAK,IAAK,EAChC;MACA;IACF;IAEAE,KAAK,CAACM,IAAI,CAACL,UAAU,CAAC;EACxB;EAEA,IAAID,KAAK,CAAC5D,MAAM,KAAK,CAAC,EAAE;IACtB;EACF;EAEA,KAAK,MAAMmE,CAAC,IAAIP,KAAK,EAAE;IACrB3F,eAAe,CAACkG,CAAC,EAAE3E,OAAO,CAAC;EAC7B;;EAEA;EACA,KAAK,MAAMyC,IAAI,IAAI0B,SAAS,CAACzB,KAAK,EAAE;IAClCI,WAAW,CAACL,IAAI,EAAEzC,OAAO,EAAEmD,OAAO,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACvBwB,aAA4B,EAC5B5E,OAA0B,EAC1BmD,OAAyB,EACzB;EACAnD,OAAO,GAAGA,OAAO,CAAC6D,IAAI,CAAC,WAAW,CAAC;;EAEnC;EACA,MAAMS,KAAqB,GAAG;IAC5BK,CAAC,EAAExG,uBAAuB,CAACyG,aAAa,CAACV,SAAS,EAAElE,OAAO;EAC7D,CAAC;EAED,IAAI4E,aAAa,CAAC5D,IAAI,EAAE;IACtBsD,KAAK,CAACO,CAAC,GAAG,KAAKD,aAAa,CAAC5D,IAAI,EAAE;EACrC;EAEAhB,OAAO,CAAC8E,iBAAiB,CAACR,KAAK,CAAC;EAEhC,KAAK,MAAM7B,IAAI,IAAImC,aAAa,CAAClC,KAAK,EAAE;IACtCI,WAAW,CAACL,IAAI,EAAEzC,OAAO,EAAEmD,OAAO,CAAC;EACrC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["inspect","debug","maybeMutateReactNativeOptions","parsePropAtRule","parsePropDeclarations","parseContainerCondition","parseAngle","parseColor","parseDeclaration","parseLength","reduceParseUnparsed","round","inlineVariables","extractKeyFrames","lightningcssLoader","parseMediaQuery","isUniversalSelector","StylesheetBuilder","supportsConditionValid","defaultLogger","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","lightningcss","Features","vars","Map","effectiveRem","inlineRem","undefined","css","match","parseFloat","inlining","firstPassVisitor","StyleSheetExit","sheet","nonInheriting","registerProperties","collectRegistrations","rules","universalDeclarations","countUniversalDeclarations","runtimeVariables","Set","Array","from","filter","name","declarations","get","count","Rule","rule","type","includes","value","Error","selectors","some","selector","part","kind","remMultiplier","Length","length","unit","exclusionList","exclude","Declaration","decl","property","entry","set","firstPass","firstPassWarnings","TextEncoder","encode","include","DoublePositionGradients","ColorFunction","VendorPrefixes","visitor","filename","projectRoot","cwd","MAX_LOG_SIZE","subarray","customAtRules","body","depth","colors","compact","extractRule","stylesheet","getNativeStyleSheet","getWarnings","mapping","extractContainer","extractMedia","declarationBlock","newNestedRule","declaration","applyRuleToSelectors","importantDeclarations","important","fork","newRule","nestedRule","layerRule","condition","mediaRule","mediaQuery","query","mediaQueries","queryBuilder","containerRule","m","n","addContainerQuery","conditional","registrations","inherits","initialValue","parsePropertyInitialValue","registerProperty","add","counts","component","results","components","map","item"],"sourceRoot":"../../../src","sources":["compiler/compiler.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,QAAQ,WAAW;AAEnC,SAASC,KAAK,QAAQ,OAAO;AAY7B,SACEC,6BAA6B,EAC7BC,eAAe,EACfC,qBAAqB,QAChB,cAAW;AAQlB,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SACEC,UAAU,EACVC,UAAU,EACVC,gBAAgB,EAChBC,WAAW,EACXC,mBAAmB,EACnBC,KAAK,QACA,mBAAgB;AACvB,SAASC,eAAe,QAAQ,uBAAoB;AACpD,SAASC,gBAAgB,QAAQ,gBAAa;AAC9C,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,eAAe,QAAQ,kBAAe;AAC/C,SAASC,mBA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,KAAK,SAAS;MACZ,OAAOX,KAAK,CAAC4I,SAAS,CAACxE,KAAK,CAAC;IAC/B,KAAK,YAAY;MACf,OAAO,GAAGpE,KAAK,CAAC4I,SAAS,CAACxE,KAAK,GAAG,GAAG,CAAC,GAAG;IAC3C,KAAK,OAAO;MACV,OAAOxE,UAAU,CAACgJ,SAAS,CAACxE,KAAK,EAAEzD,OAAO,CAAC;IAC7C,KAAK,OAAO;MACV,OAAOhB,UAAU,CAACiJ,SAAS,CAACxE,KAAK,EAAEzD,OAAO,CAAC;IAC7C,KAAK,mBAAmB;MACtB,OAAOb,WAAW,CAAC8I,SAAS,CAACxE,KAAK,EAAEzD,OAAO,CAAC;IAC9C,KAAK,YAAY;MACf,OAAOZ,mBAAmB,CAAC6I,SAAS,CAACxE,KAAK,EAAEzD,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC;IAC1E,KAAK,cAAc;IACnB,KAAK,SAAS;MACZ,OAAOiI,SAAS,CAACxE,KAAK;IACxB,KAAK,UAAU;MAAE;QACf,MAAMyE,OAAO,GAAGD,SAAS,CAACxE,KAAK,CAAC0E,UAAU,CAACC,GAAG,CAAEC,IAAI,IAClDR,yBAAyB,CAACQ,IAAI,EAAErI,OAAO,CACzC,CAAC;QACD,IAAIkI,OAAO,CAAC1E,QAAQ,CAAC1B,SAAS,CAAC,EAAE;UAC/B,OAAOA,SAAS;QAClB;QACA;QACA;QACA;QACA,OAAOoG,OAAO,CAAChE,MAAM,KAAK,CAAC,GAAGgE,OAAO,CAAC,CAAC,CAAC,GAAGA,OAAO;MACpD;IACA;MACE,OAAOpG,SAAS;EACpB;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VAR_SYMBOL"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAAA;;AAOA,SAASA,UAAU,QAAQ,yBAAsB;;AAmBjD;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["VAR_SYMBOL"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAAA;;AAOA,SAASA,UAAU,QAAQ,yBAAsB;;AAmBjD;;AASA;AACA;AACA;;AAkBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwFA;;AA2BA;;AAMA;;AAwCS;;AAMkE;;AAI3E;;AAUA;;AAEA;AACA;AACA;AACA;AACA;;AAIA;;AAKA;;AAEA;;AAGA;AACA;AACA;;AAKA;AACA;AACA","ignoreList":[]}
|
|
@@ -20,7 +20,12 @@ function parseContainerQueryCondition(condition, builder) {
|
|
|
20
20
|
const query = parseContainerCondition(condition.value, builder);
|
|
21
21
|
return query ? ["!", query] : undefined;
|
|
22
22
|
case "operation":
|
|
23
|
-
const
|
|
23
|
+
const parsed = condition.conditions.map(c => parseContainerCondition(c, builder));
|
|
24
|
+
if (condition.operator === "and" && parsed.some(c => !c)) {
|
|
25
|
+
// Dropping a conjunct would broaden the query to unrelated containers.
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const conditions = parsed.filter(c => !!c);
|
|
24
29
|
if (conditions.length === 0) {
|
|
25
30
|
return;
|
|
26
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseMediaFeatureOperator","parseMediaFeatureValue","parseContainerCondition","condition","builder","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","conditions","map","c","
|
|
1
|
+
{"version":3,"names":["parseMediaFeatureOperator","parseMediaFeatureValue","parseContainerCondition","condition","builder","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","parsed","conditions","map","c","operator","filter","length","feature","name","start","startOperator","end","endOperator"],"sourceRoot":"../../../src","sources":["compiler/container-query.ts"],"mappings":";;AAAA;;AAOA,SACEA,yBAAyB,EACzBC,sBAAsB,QACjB,kBAAe;AAGtB,OAAO,SAASC,uBAAuBA,CACrCC,SAAgC,EAChCC,OAA0B,EAC1B;EACA,IA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