react-native-css 0.0.0-nightly.416840c → 0.0.0-nightly.4562bdf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -5
- package/dist/commonjs/babel/helpers.js +7 -0
- package/dist/commonjs/babel/helpers.js.map +1 -1
- package/dist/commonjs/babel/import-plugin.js +20 -8
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- package/dist/commonjs/babel/react-native-web.js +17 -4
- package/dist/commonjs/babel/react-native-web.js.map +1 -1
- package/dist/commonjs/babel/react-native.js +9 -4
- package/dist/commonjs/babel/react-native.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +35 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +198 -39
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +6 -1
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +248 -96
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/individual-transforms.js +129 -0
- package/dist/commonjs/compiler/individual-transforms.js.map +1 -0
- package/dist/commonjs/compiler/inline-variables.js +47 -1
- package/dist/commonjs/compiler/inline-variables.js.map +1 -1
- package/dist/commonjs/compiler/lightningcss-loader.js +15 -2
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +16 -6
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +18 -6
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +33 -9
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +2 -2
- package/dist/commonjs/compiler/supports.js.map +1 -1
- package/dist/commonjs/components/ActivityIndicator.js +4 -4
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
- package/dist/commonjs/components/Button.js +4 -4
- package/dist/commonjs/components/Button.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +5 -4
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/Image.js +4 -4
- package/dist/commonjs/components/Image.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +6 -10
- package/dist/commonjs/components/ImageBackground.js.map +1 -1
- package/dist/commonjs/components/KeyboardAvoidingView.js +6 -7
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/commonjs/components/Pressable.js +4 -4
- package/dist/commonjs/components/Pressable.js.map +1 -1
- package/dist/commonjs/components/SafeAreaProvider.js +13 -0
- package/dist/commonjs/components/SafeAreaProvider.js.map +1 -0
- package/dist/commonjs/components/ScrollView.js +4 -4
- package/dist/commonjs/components/ScrollView.js.map +1 -1
- package/dist/commonjs/components/Switch.js +4 -4
- package/dist/commonjs/components/Switch.js.map +1 -1
- package/dist/commonjs/components/Text.js +4 -4
- package/dist/commonjs/components/Text.js.map +1 -1
- package/dist/commonjs/components/TextInput.js +4 -4
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/TouchableHighlight.js +4 -4
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -1
- package/dist/commonjs/components/TouchableOpacity.js +4 -4
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -1
- package/dist/commonjs/components/TouchableWithoutFeedback.js +4 -4
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/commonjs/components/View.js +4 -4
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/components/VirtualizedList.js +4 -4
- package/dist/commonjs/components/VirtualizedList.js.map +1 -1
- package/dist/commonjs/components/copyComponentProperties.js +19 -0
- package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
- package/dist/commonjs/components/index.cjs +52 -4
- package/dist/commonjs/components/index.cjs.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.native.js +10 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/commonjs/jest/index.js +3 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/cache-version.js +43 -0
- package/dist/commonjs/metro/cache-version.js.map +1 -0
- package/dist/commonjs/metro/index.js +2 -0
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +16 -3
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/resolver.js +5 -3
- package/dist/commonjs/metro/resolver.js.map +1 -1
- package/dist/commonjs/metro/typescript.js +26 -6
- package/dist/commonjs/metro/typescript.js.map +1 -1
- package/dist/commonjs/metro/warnings.js +135 -0
- package/dist/commonjs/metro/warnings.js.map +1 -0
- package/dist/commonjs/native/api.js +21 -12
- package/dist/commonjs/native/api.js.map +1 -1
- package/dist/commonjs/native/conditions/attributes.js +16 -9
- package/dist/commonjs/native/conditions/attributes.js.map +1 -1
- package/dist/commonjs/native/conditions/container-query.js +11 -11
- package/dist/commonjs/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/native/conditions/guards.js +7 -0
- package/dist/commonjs/native/conditions/guards.js.map +1 -1
- package/dist/commonjs/native/conditions/media-query.js +1 -1
- package/dist/commonjs/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/native/objects.js +11 -18
- package/dist/commonjs/native/objects.js.map +1 -1
- package/dist/commonjs/native/react/interaction.js +10 -5
- package/dist/commonjs/native/react/interaction.js.map +1 -1
- package/dist/commonjs/native/react/rules.js +45 -38
- package/dist/commonjs/native/react/rules.js.map +1 -1
- package/dist/commonjs/native/react/useNativeCss.js +80 -19
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/native/react/usePassthrough.js +5 -2
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -1
- package/dist/commonjs/native/reactivity.js +150 -68
- package/dist/commonjs/native/reactivity.js.map +1 -1
- package/dist/commonjs/native/reanimated.js +15 -3
- package/dist/commonjs/native/reanimated.js.map +1 -1
- package/dist/commonjs/native/styles/calculate-props.js +139 -26
- package/dist/commonjs/native/styles/calculate-props.js.map +1 -1
- package/dist/commonjs/native/styles/functions/animation-timing.js +2 -1
- package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -1
- package/dist/commonjs/native/styles/functions/color-mix.js +68 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +19 -5
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -1
- package/dist/commonjs/native/styles/functions/index.js +11 -0
- package/dist/commonjs/native/styles/functions/index.js.map +1 -1
- package/dist/commonjs/native/styles/functions/numeric-functions.js +4 -3
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/platform-functions.js +2 -1
- package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/string-functions.js +22 -6
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -1
- package/dist/commonjs/native/styles/functions/transform-functions.js +95 -105
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/commonjs/native/styles/index.js +361 -34
- package/dist/commonjs/native/styles/index.js.map +1 -1
- package/dist/commonjs/native/styles/resolve.js +136 -19
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/scale-factor.js +12 -0
- package/dist/commonjs/native/styles/scale-factor.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +10 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -3
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +41 -20
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/index.js +11 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js +22 -0
- package/dist/commonjs/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/transform.js +31 -8
- package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -1
- package/dist/commonjs/native/styles/variables.js +173 -48
- package/dist/commonjs/native/styles/variables.js.map +1 -1
- package/dist/commonjs/native-internal/root.js +46 -7
- package/dist/commonjs/native-internal/root.js.map +1 -1
- package/dist/commonjs/native-internal/style-collection.js +56 -74
- package/dist/commonjs/native-internal/style-collection.js.map +1 -1
- package/dist/commonjs/native-internal/variables.js +1 -1
- package/dist/commonjs/native-internal/variables.js.map +1 -1
- package/dist/commonjs/utilities/dot-notation.types.js +4 -0
- package/dist/commonjs/utilities/equality.js +41 -0
- package/dist/commonjs/utilities/equality.js.map +1 -0
- package/dist/commonjs/utilities/index.js +11 -0
- package/dist/commonjs/utilities/index.js.map +1 -1
- package/dist/commonjs/utilities/specificity.js +12 -12
- package/dist/commonjs/utilities/specificity.js.map +1 -1
- package/dist/commonjs/utilities/style-descriptor.js +32 -8
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -1
- package/dist/commonjs/web/api.js +7 -4
- package/dist/commonjs/web/api.js.map +1 -1
- package/dist/commonjs/web/assign-style.js +4 -1
- package/dist/commonjs/web/assign-style.js.map +1 -1
- package/dist/module/babel/helpers.js +6 -0
- package/dist/module/babel/helpers.js.map +1 -1
- package/dist/module/babel/import-plugin.js +22 -10
- package/dist/module/babel/import-plugin.js.map +1 -1
- package/dist/module/babel/react-native-web.js +16 -4
- package/dist/module/babel/react-native-web.js.map +1 -1
- package/dist/module/babel/react-native.js +9 -4
- package/dist/module/babel/react-native.js.map +1 -1
- package/dist/module/compiler/atRules.js +33 -0
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +200 -41
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +4 -0
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/container-query.js +6 -1
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +247 -95
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/individual-transforms.js +125 -0
- package/dist/module/compiler/individual-transforms.js.map +1 -0
- package/dist/module/compiler/inline-variables.js +47 -1
- package/dist/module/compiler/inline-variables.js.map +1 -1
- package/dist/module/compiler/lightningcss-loader.js +14 -2
- package/dist/module/compiler/lightningcss-loader.js.map +1 -1
- package/dist/module/compiler/media-query.js +16 -6
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +18 -7
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +33 -9
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +2 -2
- package/dist/module/compiler/supports.js.map +1 -1
- package/dist/module/components/ActivityIndicator.js +3 -2
- package/dist/module/components/ActivityIndicator.js.map +1 -1
- package/dist/module/components/Button.js +3 -2
- package/dist/module/components/Button.js.map +1 -1
- package/dist/module/components/FlatList.js +4 -2
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/Image.js +3 -2
- package/dist/module/components/Image.js.map +1 -1
- package/dist/module/components/ImageBackground.js +5 -8
- package/dist/module/components/ImageBackground.js.map +1 -1
- package/dist/module/components/KeyboardAvoidingView.js +5 -5
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -1
- package/dist/module/components/Pressable.js +3 -2
- package/dist/module/components/Pressable.js.map +1 -1
- package/dist/module/components/SafeAreaProvider.js +4 -0
- package/dist/module/components/SafeAreaProvider.js.map +1 -0
- package/dist/module/components/ScrollView.js +3 -2
- package/dist/module/components/ScrollView.js.map +1 -1
- package/dist/module/components/Switch.js +3 -2
- package/dist/module/components/Switch.js.map +1 -1
- package/dist/module/components/Text.js +3 -2
- package/dist/module/components/Text.js.map +1 -1
- package/dist/module/components/TextInput.js +3 -2
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/TouchableHighlight.js +3 -2
- package/dist/module/components/TouchableHighlight.js.map +1 -1
- package/dist/module/components/TouchableOpacity.js +3 -2
- package/dist/module/components/TouchableOpacity.js.map +1 -1
- package/dist/module/components/TouchableWithoutFeedback.js +3 -2
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -1
- package/dist/module/components/View.js +3 -2
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/components/VirtualizedList.js +3 -2
- package/dist/module/components/VirtualizedList.js.map +1 -1
- package/dist/module/components/copyComponentProperties.js +15 -0
- package/dist/module/components/copyComponentProperties.js.map +1 -0
- package/dist/module/components/index.cjs +52 -4
- package/dist/module/components/index.cjs.map +1 -1
- package/dist/module/components/react-native-safe-area-context.native.js +9 -1
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/module/jest/index.js +3 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/cache-version.js +39 -0
- package/dist/module/metro/cache-version.js.map +1 -0
- package/dist/module/metro/index.js +2 -0
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +16 -3
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/resolver.js +5 -3
- package/dist/module/metro/resolver.js.map +1 -1
- package/dist/module/metro/typescript.js +26 -6
- package/dist/module/metro/typescript.js.map +1 -1
- package/dist/module/metro/warnings.js +131 -0
- package/dist/module/metro/warnings.js.map +1 -0
- package/dist/module/native/api.js +22 -14
- package/dist/module/native/api.js.map +1 -1
- package/dist/module/native/conditions/attributes.js +16 -9
- package/dist/module/native/conditions/attributes.js.map +1 -1
- package/dist/module/native/conditions/container-query.js +11 -11
- package/dist/module/native/conditions/container-query.js.map +1 -1
- package/dist/module/native/conditions/guards.js +7 -0
- package/dist/module/native/conditions/guards.js.map +1 -1
- package/dist/module/native/conditions/media-query.js +1 -1
- package/dist/module/native/conditions/media-query.js.map +1 -1
- package/dist/module/native/objects.js +11 -18
- package/dist/module/native/objects.js.map +1 -1
- package/dist/module/native/react/interaction.js +10 -5
- package/dist/module/native/react/interaction.js.map +1 -1
- package/dist/module/native/react/rules.js +46 -39
- package/dist/module/native/react/rules.js.map +1 -1
- package/dist/module/native/react/useNativeCss.js +83 -22
- package/dist/module/native/react/useNativeCss.js.map +1 -1
- package/dist/module/native/react/usePassthrough.js +5 -2
- package/dist/module/native/react/usePassthrough.js.map +1 -1
- package/dist/module/native/reactivity.js +131 -66
- package/dist/module/native/reactivity.js.map +1 -1
- package/dist/module/native/reanimated.js +15 -3
- package/dist/module/native/reanimated.js.map +1 -1
- package/dist/module/native/styles/calculate-props.js +139 -26
- package/dist/module/native/styles/calculate-props.js.map +1 -1
- package/dist/module/native/styles/functions/animation-timing.js +2 -1
- package/dist/module/native/styles/functions/animation-timing.js.map +1 -1
- package/dist/module/native/styles/functions/color-mix.js +63 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +17 -4
- package/dist/module/native/styles/functions/filters.js.map +1 -1
- package/dist/module/native/styles/functions/index.js +1 -0
- package/dist/module/native/styles/functions/index.js.map +1 -1
- package/dist/module/native/styles/functions/numeric-functions.js +4 -3
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -1
- package/dist/module/native/styles/functions/platform-functions.js +2 -1
- package/dist/module/native/styles/functions/platform-functions.js.map +1 -1
- package/dist/module/native/styles/functions/string-functions.js +19 -5
- package/dist/module/native/styles/functions/string-functions.js.map +1 -1
- package/dist/module/native/styles/functions/transform-functions.js +93 -104
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -1
- package/dist/module/native/styles/index.js +362 -34
- package/dist/module/native/styles/index.js.map +1 -1
- package/dist/module/native/styles/resolve.js +136 -19
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/scale-factor.js +8 -0
- package/dist/module/native/styles/scale-factor.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +11 -1
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +6 -3
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/native/styles/shorthands/box-shadow.js +43 -21
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/native/styles/shorthands/index.js +1 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -1
- package/dist/module/native/styles/shorthands/logical-border-width.js +18 -0
- package/dist/module/native/styles/shorthands/logical-border-width.js.map +1 -0
- package/dist/module/native/styles/shorthands/transform.js +31 -8
- package/dist/module/native/styles/shorthands/transform.js.map +1 -1
- package/dist/module/native/styles/variables.js +174 -50
- package/dist/module/native/styles/variables.js.map +1 -1
- package/dist/module/native-internal/root.js +44 -7
- package/dist/module/native-internal/root.js.map +1 -1
- package/dist/module/native-internal/style-collection.js +45 -75
- package/dist/module/native-internal/style-collection.js.map +1 -1
- package/dist/module/native-internal/variables.js +2 -2
- package/dist/module/native-internal/variables.js.map +1 -1
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/equality.js +37 -0
- package/dist/module/utilities/equality.js.map +1 -0
- package/dist/module/utilities/index.js +1 -0
- package/dist/module/utilities/index.js.map +1 -1
- package/dist/module/utilities/specificity.js +12 -12
- package/dist/module/utilities/specificity.js.map +1 -1
- package/dist/module/utilities/style-descriptor.js +30 -8
- package/dist/module/utilities/style-descriptor.js.map +1 -1
- package/dist/module/web/api.js +7 -4
- package/dist/module/web/api.js.map +1 -1
- package/dist/module/web/assign-style.js +4 -1
- package/dist/module/web/assign-style.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +4 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +1 -5
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +26 -12
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +3 -3
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/individual-transforms.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +2 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +10 -10
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Button.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +2 -2
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Image.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Pressable.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Switch.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Text.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +2 -4
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/View.d.ts +2 -6
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +2 -2
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts +5 -0
- package/dist/typescript/commonjs/src/components/copyComponentProperties.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +2 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +4 -12
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/commonjs/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +8 -4
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +9 -4
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/warnings.d.ts +13 -0
- package/dist/typescript/commonjs/src/metro/warnings.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/api.d.ts +5 -9
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts +2 -1
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/objects.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/rules.d.ts +7 -2
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +1 -4
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reactivity.d.ts +36 -18
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts +11 -2
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +16 -4
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +4 -1
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts +3 -2
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +45 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +2 -2
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime.types.d.ts +20 -15
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +3 -2
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/equality.d.ts +2 -0
- package/dist/typescript/commonjs/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +14 -1
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/api.d.ts +5 -5
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/helpers.d.ts +2 -1
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +2 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +6 -3
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +3 -7
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +27 -13
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +5 -5
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/index.d.ts +2 -2
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/individual-transforms.d.ts +10 -0
- package/dist/typescript/module/src/compiler/individual-transforms.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +2 -2
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +2 -2
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/media-query.d.ts +3 -3
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +3 -2
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selectors.d.ts +2 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +10 -10
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +2 -4
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Button.d.ts +2 -4
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts +2 -2
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Image.d.ts +2 -4
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts +2 -4
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -1
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +2 -4
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Pressable.d.ts +2 -4
- package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -1
- package/dist/typescript/module/src/components/SafeAreaProvider.d.ts +2 -0
- package/dist/typescript/module/src/components/SafeAreaProvider.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts +2 -4
- package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Switch.d.ts +2 -6
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Text.d.ts +2 -6
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TextInput.d.ts +2 -4
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +2 -4
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -1
- package/dist/typescript/module/src/components/View.d.ts +2 -6
- package/dist/typescript/module/src/components/View.d.ts.map +1 -1
- package/dist/typescript/module/src/components/VirtualizedList.d.ts +2 -2
- package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/copyComponentProperties.d.ts +5 -0
- package/dist/typescript/module/src/components/copyComponentProperties.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +16 -16
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +2 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +4 -12
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/cache-version.d.ts +8 -0
- package/dist/typescript/module/src/metro/cache-version.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +9 -5
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +10 -5
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/warnings.d.ts +13 -0
- package/dist/typescript/module/src/metro/warnings.d.ts.map +1 -0
- package/dist/typescript/module/src/native/api.d.ts +6 -10
- package/dist/typescript/module/src/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +2 -2
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/guards.d.ts +4 -3
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/index.d.ts +3 -3
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +1 -1
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +3 -3
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/objects.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/rules.d.ts +9 -4
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +5 -8
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts +1 -1
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reactivity.d.ts +36 -18
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +13 -4
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/color-mix.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +8 -7
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +3 -1
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/index.d.ts +20 -8
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/resolve.d.ts +7 -4
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/scale-factor.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +2 -2
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -5
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/shorthands/logical-border-width.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts +1 -1
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/variables.d.ts +4 -3
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/index.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/root.d.ts +46 -1
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +3 -3
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -1
- package/dist/typescript/module/src/native-internal/variables.d.ts +2 -2
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.d.ts +1 -1
- package/dist/typescript/module/src/runtime.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts +1 -1
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime.types.d.ts +20 -15
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +3 -2
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/equality.d.ts +2 -0
- package/dist/typescript/module/src/utilities/equality.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/index.d.ts +4 -3
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/specificity.d.ts +2 -2
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +14 -1
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -1
- package/dist/typescript/module/src/web/api.d.ts +5 -5
- package/dist/typescript/module/src/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -1
- package/dist/typescript/module/src/web/index.d.ts +3 -3
- package/dist/typescript/module/src/web/index.d.ts.map +1 -1
- package/node/babel.mjs +4 -0
- package/node/compiler.mjs +2 -0
- package/node/metro.mjs +2 -0
- package/package.json +81 -33
- package/src/babel/helpers.ts +8 -1
- package/src/babel/import-plugin.ts +31 -16
- package/src/babel/react-native-web.ts +32 -4
- package/src/babel/react-native.ts +9 -4
- package/src/compiler/atRules.ts +44 -0
- package/src/compiler/compiler.ts +282 -50
- package/src/compiler/compiler.types.ts +30 -12
- package/src/compiler/container-query.ts +8 -3
- package/src/compiler/declarations.ts +499 -241
- package/src/compiler/individual-transforms.ts +129 -0
- package/src/compiler/inline-variables.ts +67 -0
- package/src/compiler/lightningcss-loader.ts +21 -1
- package/src/compiler/media-query.ts +20 -9
- package/src/compiler/selector-builder.ts +34 -7
- package/src/compiler/stylesheet.ts +51 -15
- package/src/compiler/supports.ts +2 -2
- package/src/components/ActivityIndicator.tsx +8 -5
- package/src/components/Button.tsx +8 -3
- package/src/components/FlatList.tsx +14 -4
- package/src/components/Image.tsx +8 -3
- package/src/components/ImageBackground.tsx +10 -11
- package/src/components/KeyboardAvoidingView.tsx +10 -8
- package/src/components/Pressable.tsx +8 -3
- package/src/components/SafeAreaProvider.tsx +1 -0
- package/src/components/ScrollView.tsx +8 -5
- package/src/components/Switch.tsx +8 -3
- package/src/components/Text.tsx +8 -3
- package/src/components/TextInput.tsx +8 -3
- package/src/components/TouchableHighlight.tsx +8 -5
- package/src/components/TouchableOpacity.tsx +8 -5
- package/src/components/TouchableWithoutFeedback.tsx +8 -5
- package/src/components/View.tsx +8 -3
- package/src/components/VirtualizedList.tsx +17 -5
- package/src/components/copyComponentProperties.ts +21 -0
- package/src/components/index.cts +52 -4
- package/src/components/react-native-safe-area-context.native.tsx +20 -0
- package/src/jest/index.ts +7 -3
- package/src/metro/cache-version.ts +48 -0
- package/src/metro/index.ts +11 -4
- package/src/metro/metro-transformer.ts +26 -8
- package/src/metro/resolver.ts +10 -3
- package/src/metro/typescript.ts +53 -6
- package/src/metro/warnings.ts +187 -0
- package/src/native/api.tsx +32 -18
- package/src/native/conditions/attributes.ts +26 -9
- package/src/native/conditions/container-query.ts +11 -9
- package/src/native/conditions/guards.ts +13 -1
- package/src/native/conditions/media-query.ts +1 -1
- package/src/native/objects.ts +12 -22
- package/src/native/react/interaction.ts +11 -6
- package/src/native/react/rules.ts +58 -45
- package/src/native/react/useNativeCss.ts +100 -22
- package/src/native/react/usePassthrough.ts +3 -2
- package/src/native/reactivity.ts +169 -71
- package/src/native/reanimated.ts +24 -5
- package/src/native/styles/calculate-props.ts +179 -28
- package/src/native/styles/functions/animation-timing.ts +3 -1
- package/src/native/styles/functions/color-mix.ts +82 -0
- package/src/native/styles/functions/filters.ts +21 -6
- package/src/native/styles/functions/index.ts +1 -0
- package/src/native/styles/functions/numeric-functions.ts +7 -6
- package/src/native/styles/functions/platform-functions.ts +3 -1
- package/src/native/styles/functions/string-functions.ts +25 -5
- package/src/native/styles/functions/transform-functions.ts +111 -64
- package/src/native/styles/index.ts +425 -43
- package/src/native/styles/resolve.ts +188 -29
- package/src/native/styles/scale-factor.ts +9 -0
- package/src/native/styles/shorthands/_handler.ts +14 -1
- package/src/native/styles/shorthands/animation.ts +8 -2
- package/src/native/styles/shorthands/box-shadow.ts +46 -25
- package/src/native/styles/shorthands/index.ts +1 -0
- package/src/native/styles/shorthands/logical-border-width.ts +32 -0
- package/src/native/styles/shorthands/transform.ts +36 -11
- package/src/native/styles/variables.ts +251 -45
- package/src/native-internal/root.ts +83 -13
- package/src/native-internal/style-collection.ts +64 -95
- package/src/native-internal/variables.tsx +6 -4
- package/src/runtime.types.ts +38 -29
- package/src/utilities/dot-notation.types.ts +12 -4
- package/src/utilities/equality.ts +41 -0
- package/src/utilities/index.ts +1 -0
- package/src/utilities/specificity.ts +13 -12
- package/src/utilities/style-descriptor.ts +36 -14
- package/src/web/api.tsx +17 -13
- package/src/web/assign-style.ts +2 -1
- package/types.d.ts +14 -31
- package/dist/commonjs/compiler/inheritance.test.js +0 -78
- package/dist/commonjs/compiler/inheritance.test.js.map +0 -1
- package/dist/module/compiler/inheritance.test.js +0 -78
- package/dist/module/compiler/inheritance.test.js.map +0 -1
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/eslint.config.d.mts +0 -2
- package/dist/typescript/commonjs/eslint.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/app.config.d.ts +0 -4
- package/dist/typescript/commonjs/example/app.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/index.d.ts +0 -2
- package/dist/typescript/commonjs/example/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/metro.config.d.ts +0 -3
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/commonjs/example/postcss.config.d.mts +0 -7
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/commonjs/example/src/App.d.ts +0 -3
- package/dist/typescript/commonjs/example/src/App.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +0 -1
- package/dist/typescript/module/.config/eslint.config.d.mts +0 -3
- package/dist/typescript/module/.config/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/eslint.config.d.mts +0 -2
- package/dist/typescript/module/eslint.config.d.mts.map +0 -1
- package/dist/typescript/module/example/app.config.d.ts +0 -4
- package/dist/typescript/module/example/app.config.d.ts.map +0 -1
- package/dist/typescript/module/example/index.d.ts +0 -2
- package/dist/typescript/module/example/index.d.ts.map +0 -1
- package/dist/typescript/module/example/metro.config.d.ts +0 -3
- package/dist/typescript/module/example/metro.config.d.ts.map +0 -1
- package/dist/typescript/module/example/postcss.config.d.mts +0 -7
- package/dist/typescript/module/example/postcss.config.d.mts.map +0 -1
- package/dist/typescript/module/example/src/App.d.ts +0 -3
- package/dist/typescript/module/example/src/App.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +0 -1
- package/src/compiler/inheritance.test.ts +0 -121
|
@@ -4,10 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
+
SafeAreaView: true,
|
|
7
8
|
SafeAreaProvider: true
|
|
8
9
|
};
|
|
9
10
|
exports.SafeAreaProvider = SafeAreaProvider;
|
|
11
|
+
exports.SafeAreaView = void 0;
|
|
10
12
|
var _react = require("react");
|
|
13
|
+
var _reactNativeCss = require("react-native-css");
|
|
11
14
|
var _nativeInternal = require("react-native-css/native-internal");
|
|
12
15
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
13
16
|
Object.keys(_reactNativeSafeAreaContext).forEach(function (key) {
|
|
@@ -21,7 +24,14 @@ Object.keys(_reactNativeSafeAreaContext).forEach(function (key) {
|
|
|
21
24
|
}
|
|
22
25
|
});
|
|
23
26
|
});
|
|
27
|
+
var _copyComponentProperties = require("./copyComponentProperties.js");
|
|
24
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
+
const safeAreaViewMapping = {
|
|
30
|
+
className: "style"
|
|
31
|
+
};
|
|
32
|
+
const SafeAreaView = exports.SafeAreaView = (0, _copyComponentProperties.copyComponentProperties)(_reactNativeSafeAreaContext.SafeAreaView, props => {
|
|
33
|
+
return (0, _reactNativeCss.useCssElement)(_reactNativeSafeAreaContext.SafeAreaView, props, safeAreaViewMapping);
|
|
34
|
+
});
|
|
25
35
|
function SafeAreaProvider({
|
|
26
36
|
children,
|
|
27
37
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_nativeInternal","_reactNativeSafeAreaContext","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_jsxRuntime","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeCss","_nativeInternal","_reactNativeSafeAreaContext","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_copyComponentProperties","_jsxRuntime","safeAreaViewMapping","className","SafeAreaView","copyComponentProperties","OriginalSafeAreaView","props","useCssElement","SafeAreaProvider","children","jsx","SafeAreaEnv","insets","useSafeAreaInsets","parentVars","useContext","VariableContext","value","useMemo","bottom","left","right","top","VariableContextProvider"],"sourceRoot":"../../../src","sources":["components/react-native-safe-area-context.native.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAKA,IAAAE,eAAA,GAAAF,OAAA;AAIA,IAAAG,2BAAA,GAAAH,OAAA;AAUAI,MAAA,CAAAC,IAAA,CAAAF,2BAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,2BAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,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ACN,KAAK,EAAEA,KAAM;IAAAR,QAAA,EAAEA;EAAQ,CAA0B,CAAC;AAE/E","ignoreList":[]}
|
|
@@ -10,12 +10,14 @@ var _reactNative = require("react-native");
|
|
|
10
10
|
var _nodeUtil = require("node:util");
|
|
11
11
|
var _compiler = require("react-native-css/compiler");
|
|
12
12
|
var _native = require("react-native-css/native");
|
|
13
|
+
var _nativeInternal = require("react-native-css/native-internal");
|
|
13
14
|
var _reactivity = require("../native/reactivity.js");
|
|
14
15
|
const testID = exports.testID = "react-native-css";
|
|
15
16
|
beforeEach(() => {
|
|
16
17
|
_native.StyleCollection.styles.clear();
|
|
18
|
+
(0, _nativeInternal.resetVariableRegistries)();
|
|
17
19
|
_reactivity.dimensions.set(_reactNative.Dimensions.get("window"));
|
|
18
|
-
_reactNative.Appearance.setColorScheme(
|
|
20
|
+
_reactNative.Appearance.setColorScheme("unspecified");
|
|
19
21
|
_reactivity.colorScheme.set(null);
|
|
20
22
|
});
|
|
21
23
|
const debugDefault = Boolean(process.env.REACT_NATIVE_CSS_TEST_DEBUG && typeof process.env.NODE_OPTIONS === "string" && process.env.NODE_OPTIONS.includes("--inspect"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_nodeUtil","_compiler","_native","_reactivity","testID","exports","beforeEach","StyleCollection","styles","clear","dimensions","set","Dimensions","get","Appearance","setColorScheme","colorScheme","debugDefault","Boolean","process","env","REACT_NATIVE_CSS_TEST_DEBUG","NODE_OPTIONS","includes","registerCSS","css","options","debug","compiled","compileWithAutoDebug","console","log","inspect","stylesheet","warnings","depth","colors","compact","inject","logger","text","startsWith","undefined","compile"],"sourceRoot":"../../../src","sources":["jest/index.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_nodeUtil","_compiler","_native","_nativeInternal","_reactivity","testID","exports","beforeEach","StyleCollection","styles","clear","resetVariableRegistries","dimensions","set","Dimensions","get","Appearance","setColorScheme","colorScheme","debugDefault","Boolean","process","env","REACT_NATIVE_CSS_TEST_DEBUG","NODE_OPTIONS","includes","registerCSS","css","options","debug","compiled","compileWithAutoDebug","console","log","inspect","stylesheet","warnings","depth","colors","compact","inject","logger","text","startsWith","undefined","compile"],"sourceRoot":"../../../src","sources":["jest/index.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AAWO,MAAMM,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,kBAAkB;AAExCE,UAAU,CAAC,MAAM;EACfC,uBAAe,CAACC,MAAM,CAACC,KAAK,CAAC,CAAC;EAC9B,IAAAC,uCAAuB,EAAC,CAAC;EACzBC,sBAAU,CAACC,GAAG,CAACC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAAC;EACxCC,uBAAU,CAACC,cAAc,CACvB,aACF,CAAC;EACDC,uBAAW,CAACL,GAAG,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,MAAMM,YAAY,GAAGC,OAAO,CAC1BC,OAAO,CAACC,GAAG,CAACC,2BAA2B,IACrC,OAAOF,OAAO,CAACC,GAAG,CAACE,YAAY,KAAK,QAAQ,IAC5CH,OAAO,CAACC,GAAG,CAACE,YAAY,CAACC,QAAQ,CAAC,WAAW,CACjD,CAAC;AAEM,SAASC,WAAWA,CACzBC,GAAW,EACXC,OAA0D,GAAG,CAAC,CAAC,EAC/D;EACA,MAAM;IAAEC,KAAK,GAAGV;EAAa,CAAC,GAAGS,OAAO;EACxC,MAAME,QAAQ,GAAGC,oBAAoB,CAACJ,GAAG,EAAEC,OAAO,CAAC;EAEnD,IAAIC,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CACT,mBAAmB,IAAAC,iBAAO,EACxB;MACEC,UAAU,EAAEL,QAAQ,CAACK,UAAU,CAAC,CAAC;MACjCC,QAAQ,EAAEN,QAAQ,CAACM,QAAQ,CAAC;IAC9B,CAAC,EACD;MAAEC,KAAK,EAAE,IAAI;MAAEC,MAAM,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAM,CAC9C,CAAC,EACH,CAAC;EACH;EAEA/B,uBAAe,CAACgC,MAAM,CAACV,QAAQ,CAACK,UAAU,CAAC,CAAC,CAAC;EAE7C,OAAOL,QAAQ;AACjB;AAEO,SAASC,oBAAoBA,CAClCJ,GAAW,EACX;EACEE,KAAK,GAAGV,YAAY;EACpB,GAAGS;AAC0D,CAAC,GAAG,CAAC,CAAC,EACrE;EACA,MAAMa,MAAM,GAAGZ,KAAK,GACfa,IAAY,IAAK;IAChB;IACA,IAAIA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,IAAId,KAAK,KAAK,SAAS,EAAE;MAC/CG,OAAO,CAACC,GAAG,CAAC,gBAAgBS,IAAI,EAAE,CAAC;IACrC;EACF,CAAC,GACDE,SAAS;EAEb,OAAO,IAAAC,iBAAO,EAAClB,GAAG,EAAE;IAAE,GAAGC,OAAO;IAAEa;EAAO,CAAC,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCacheVersion = getCacheVersion;
|
|
7
|
+
var _nodeCrypto = require("node:crypto");
|
|
8
|
+
var _nodeFs = require("node:fs");
|
|
9
|
+
var _nodePath = require("node:path");
|
|
10
|
+
/**
|
|
11
|
+
* Expo's supervising worker bypasses a custom worker's getCacheKey hook.
|
|
12
|
+
* Put the engine fingerprint in Metro's top level cacheVersion instead so
|
|
13
|
+
* both supervised and direct workers invalidate compiled CSS after an update.
|
|
14
|
+
*/
|
|
15
|
+
function getCacheVersion(cacheVersion, options) {
|
|
16
|
+
const root = (0, _nodePath.dirname)(__dirname);
|
|
17
|
+
const hash = (0, _nodeCrypto.createHash)("sha256");
|
|
18
|
+
function visit(directory) {
|
|
19
|
+
for (const entry of (0, _nodeFs.readdirSync)(directory, {
|
|
20
|
+
withFileTypes: true
|
|
21
|
+
}).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
22
|
+
const file = (0, _nodePath.join)(directory, entry.name);
|
|
23
|
+
if (entry.isDirectory()) {
|
|
24
|
+
if (!["__tests__", "__fixtures__", "__mocks__"].includes(entry.name)) {
|
|
25
|
+
visit(file);
|
|
26
|
+
}
|
|
27
|
+
} else if (entry.isFile() && /\.[cm]?[jt]sx?$/.test(entry.name) && !/\.d\.[cm]?ts$/.test(entry.name) && !/\.(test|spec)\.[cm]?[jt]sx?$/.test(entry.name)) {
|
|
28
|
+
// Relative names keep identical installations independent of location.
|
|
29
|
+
hash.update((0, _nodePath.relative)(root, file).split("\\").join("/"));
|
|
30
|
+
hash.update("\0");
|
|
31
|
+
hash.update((0, _nodeFs.readFileSync)(file));
|
|
32
|
+
hash.update("\0");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Cover transitive engine helpers as well as the transformer itself. Maps,
|
|
38
|
+
// declarations, and tests do not affect the generated application code.
|
|
39
|
+
visit(root);
|
|
40
|
+
hash.update(JSON.stringify(options ?? {}));
|
|
41
|
+
return `${cacheVersion ?? ""}:react-native-css:${hash.digest("hex")}`;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=cache-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nodeCrypto","require","_nodeFs","_nodePath","getCacheVersion","cacheVersion","options","root","dirname","__dirname","hash","createHash","visit","directory","entry","readdirSync","withFileTypes","sort","a","b","name","file","join","isDirectory","includes","isFile","test","update","relative","split","readFileSync","JSON","stringify","digest"],"sourceRoot":"../../../src","sources":["metro/cache-version.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAIA;AACA;AACA;AACA;AACA;AACO,SAASG,eAAeA,CAC7BC,YAAgC,EAChCC,OAAoC,EACpC;EACA,MAAMC,IAAI,GAAG,IAAAC,iBAAO,EAACC,SAAS,CAAC;EAC/B,MAAMC,IAAI,GAAG,IAAAC,sBAAU,EAAC,QAAQ,CAAC;EAEjC,SAASC,KAAKA,CAACC,SAAiB,EAAE;IAChC,KAAK,MAAMC,KAAK,IAAI,IAAAC,mBAAW,EAACF,SAAS,EAAE;MAAEG,aAAa,EAAE;IAAK,CAAC,CAAC,CAACC,IAAI,CACtE,CAACC,CAAC,EAAEC,CAAC,KAAMD,CAAC,CAACE,IAAI,GAAGD,CAAC,CAACC,IAAI,GAAG,CAAC,CAAC,GAAGF,CAAC,CAACE,IAAI,GAAGD,CAAC,CAACC,IAAI,GAAG,CAAC,GAAG,CAC1D,CAAC,EAAE;MACD,MAAMC,IAAI,GAAG,IAAAC,cAAI,EAACT,SAAS,EAAEC,KAAK,CAACM,IAAI,CAAC;MACxC,IAAIN,KAAK,CAACS,WAAW,CAAC,CAAC,EAAE;QACvB,IAAI,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACV,KAAK,CAACM,IAAI,CAAC,EAAE;UACpER,KAAK,CAACS,IAAI,CAAC;QACb;MACF,CAAC,MAAM,IACLP,KAAK,CAACW,MAAM,CAAC,CAAC,IACd,iBAAiB,CAACC,IAAI,CAACZ,KAAK,CAACM,IAAI,CAAC,IAClC,CAAC,eAAe,CAACM,IAAI,CAACZ,KAAK,CAACM,IAAI,CAAC,IACjC,CAAC,8BAA8B,CAACM,IAAI,CAACZ,KAAK,CAACM,IAAI,CAAC,EAChD;QACA;QACAV,IAAI,CAACiB,MAAM,CAAC,IAAAC,kBAAQ,EAACrB,IAAI,EAAEc,IAAI,CAAC,CAACQ,KAAK,CAAC,IAAI,CAAC,CAACP,IAAI,CAAC,GAAG,CAAC,CAAC;QACvDZ,IAAI,CAACiB,MAAM,CAAC,IAAI,CAAC;QACjBjB,IAAI,CAACiB,MAAM,CAAC,IAAAG,oBAAY,EAACT,IAAI,CAAC,CAAC;QAC/BX,IAAI,CAACiB,MAAM,CAAC,IAAI,CAAC;MACnB;IACF;EACF;;EAEA;EACA;EACAf,KAAK,CAACL,IAAI,CAAC;EACXG,IAAI,CAACiB,MAAM,CAACI,IAAI,CAACC,SAAS,CAAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;EAC1C,OAAO,GAAGD,YAAY,IAAI,EAAE,qBAAqBK,IAAI,CAACuB,MAAM,CAAC,KAAK,CAAC,EAAE;AACvE","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.withReactNativeCSS = withReactNativeCSS;
|
|
7
7
|
var _nodeProcess = require("node:process");
|
|
8
|
+
var _cacheVersion = require("./cache-version.js");
|
|
8
9
|
var _resolver = require("./resolver.js");
|
|
9
10
|
var _typescript = require("./typescript.js");
|
|
10
11
|
/* eslint-disable */
|
|
@@ -32,6 +33,7 @@ function withReactNativeCSS(config, options) {
|
|
|
32
33
|
}
|
|
33
34
|
return {
|
|
34
35
|
...config,
|
|
36
|
+
cacheVersion: (0, _cacheVersion.getCacheVersion)(config.cacheVersion, options),
|
|
35
37
|
transformerPath: require.resolve("./metro-transformer"),
|
|
36
38
|
transformer: {
|
|
37
39
|
...config.transformer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeProcess","require","_resolver","_typescript","metroOverrideResolution","type","filePath","resolve","withReactNativeCSS","config","options","Number","versions","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","setupTypeScript","transformerPath","transformer","reactNativeCSS","resolver","sourceExts","resolveRequest","context","moduleName","platform","includes","parentResolver","webResolver","nativeResolver","resolved"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,
|
|
1
|
+
{"version":3,"names":["_nodeProcess","require","_cacheVersion","_resolver","_typescript","metroOverrideResolution","type","filePath","resolve","withReactNativeCSS","config","options","Number","versions","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","setupTypeScript","cacheVersion","getCacheVersion","transformerPath","transformer","reactNativeCSS","resolver","sourceExts","resolveRequest","context","moduleName","platform","includes","parentResolver","webResolver","nativeResolver","resolved"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AARA;;AAyBA,MAAMI,uBAAuB,GAAG;EAC9BC,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEN,OAAO,CAACO,OAAO,CAAC,YAAY;AACxC,CAAC;AAEM,SAASC,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,OAAOD,kBAAkB,CAAC,MAAMC,MAAM,CAAC,CAAC,EAAEC,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,IAAIC,MAAM,CAACC,qBAAQ,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;IAC5C,MAAM,IAAIC,KAAK,CAAC,2CAA2C,CAAC;EAC9D;EAEA,MAAM;IACJC,2BAA2B;IAC3BC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
8
|
var _index = require("../compiler/index.js");
|
|
9
9
|
var _injectionCode = require("./injection-code.js");
|
|
10
|
+
var _warnings = require("./warnings.js");
|
|
10
11
|
const worker =
|
|
11
12
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
13
|
require(_metroConfig.unstable_transformerPath);
|
|
@@ -20,11 +21,23 @@ async function transform(config, projectRoot, filePath, data, options) {
|
|
|
20
21
|
platform: "web"
|
|
21
22
|
});
|
|
22
23
|
const css = cssFile.output[0].data.css.code.toString();
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
const {
|
|
25
|
+
warnings: warningLevel,
|
|
26
|
+
...compilerOptions
|
|
27
|
+
} = config.reactNativeCSS ?? {};
|
|
28
|
+
const compiled = (0, _index.compile)(css, {
|
|
29
|
+
...compilerOptions,
|
|
25
30
|
filename: filePath,
|
|
26
31
|
projectRoot: projectRoot
|
|
27
|
-
})
|
|
32
|
+
});
|
|
33
|
+
const productionJS = compiled.stylesheet();
|
|
34
|
+
|
|
35
|
+
// Nothing downstream of the transformer sees the compile result, so this is the one place a build can report it
|
|
36
|
+
(0, _warnings.reportCompilerWarnings)(compiled.warnings(), {
|
|
37
|
+
filename: filePath,
|
|
38
|
+
projectRoot,
|
|
39
|
+
level: warningLevel
|
|
40
|
+
});
|
|
28
41
|
data = Buffer.from((0, _injectionCode.getNativeInjectionCode)([], [productionJS]));
|
|
29
42
|
const transform = await worker.transform(config, projectRoot, `${filePath}.js`, data, options);
|
|
30
43
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_metroConfig","require","_index","_injectionCode","worker","unstable_transformerPath","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","
|
|
1
|
+
{"version":3,"names":["_metroConfig","require","_index","_injectionCode","_warnings","worker","unstable_transformerPath","transform","config","projectRoot","filePath","data","options","isCss","type","test","platform","cssFile","css","output","code","toString","warnings","warningLevel","compilerOptions","reactNativeCSS","compiled","compile","filename","productionJS","stylesheet","reportCompilerWarnings","level","Buffer","from","getNativeInjectionCode","skipCache"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAMA,MAAMI,MAAM;AACV;AACAJ,OAAO,CAACK,qCAAwB,CAA4C;AAEvE,eAAeC,SAASA,CAC7BC,MAIC,EACDC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAA2B,EACC;EAC5B,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,KAAK,OAAO,IAAI,iBAAiB,CAACC,IAAI,CAACL,QAAQ,CAAC;EAE1E,IAAIE,OAAO,CAACI,QAAQ,KAAK,KAAK,IAAI,CAACH,KAAK,EAAE;IACxC,OAAOR,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACvE;EAEA,MAAMK,OAAO,GAAI,MAAMZ,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAE;IAC3E,GAAGC,OAAO;IACVI,QAAQ,EAAE;EACZ,CAAC,CAEA;EAED,MAAME,GAAG,GAAGD,OAAO,CAACE,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,CAACE,IAAI,CAACC,QAAQ,CAAC,CAAC;EAEtD,MAAM;IAAEC,QAAQ,EAAEC,YAAY;IAAE,GAAGC;EAAgB,CAAC,GAClDhB,MAAM,CAACiB,cAAc,IAAI,CAAC,CAAC;EAE7B,MAAMC,QAAQ,GAAG,IAAAC,cAAO,EAACT,GAAG,EAAE;IAC5B,GAAGM,eAAe;IAClBI,QAAQ,EAAElB,QAAQ;IAClBD,WAAW,EAAEA;EACf,CAAC,CAAC;EAEF,MAAMoB,YAAY,GAAGH,QAAQ,CAACI,UAAU,CAAC,CAAC;;EAE1C;EACA,IAAAC,gCAAsB,EAACL,QAAQ,CAACJ,QAAQ,CAAC,CAAC,EAAE;IAC1CM,QAAQ,EAAElB,QAAQ;IAClBD,WAAW;IACXuB,KAAK,EAAET;EACT,CAAC,CAAC;EAEFZ,IAAI,GAAGsB,MAAM,CAACC,IAAI,CAAC,IAAAC,qCAAsB,EAAC,EAAE,EAAE,CAACN,YAAY,CAAC,CAAC,CAAC;EAE9D,MAAMtB,SAAS,GAAG,MAAMF,MAAM,CAACE,SAAS,CACtCC,MAAM,EACNC,WAAW,EACX,GAAGC,QAAQ,KAAK,EAChBC,IAAI,EACJC,OACF,CAAC;;EAED;EACCL,SAAS,CAASY,MAAM,CAAC,CAAC,CAAC,CAACR,IAAI,CAACO,GAAG,GAAG;IACtCkB,SAAS,EAAE,IAAI;IACfhB,IAAI,EAAE;EACR,CAAC;EAED,OAAOb,SAAS;AAClB","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ function isFromThisModule(filename) {
|
|
|
15
15
|
function nativeResolver(resolver, context, moduleName, platform) {
|
|
16
16
|
const resolution = resolver(context, moduleName, platform);
|
|
17
17
|
const isInternal = isFromThisModule(context.originModulePath);
|
|
18
|
-
const isReactNativeIndex = context.originModulePath.endsWith(
|
|
18
|
+
const isReactNativeIndex = context.originModulePath.endsWith(`${_nodePath.sep}react-native${_nodePath.sep}index.js`);
|
|
19
19
|
if (isInternal || resolution.type !== "sourceFile" || isReactNativeIndex) {
|
|
20
20
|
return resolution;
|
|
21
21
|
}
|
|
@@ -40,7 +40,9 @@ function webResolver(resolver, context, moduleName, platform) {
|
|
|
40
40
|
// Only operate on source files
|
|
41
41
|
resolution.type !== "sourceFile" ||
|
|
42
42
|
// Skip anything that isn't importing from `react-native-web`
|
|
43
|
-
!resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}`)
|
|
43
|
+
!resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}`) ||
|
|
44
|
+
// Skip internal react-native-web files
|
|
45
|
+
resolution.filePath.includes(`${_nodePath.sep}react-native-web${_nodePath.sep}dist${_nodePath.sep}vendor`)) {
|
|
44
46
|
return resolution;
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -48,7 +50,7 @@ function webResolver(resolver, context, moduleName, platform) {
|
|
|
48
50
|
const segments = resolution.filePath.split(_nodePath.sep);
|
|
49
51
|
const isIndex = segments.at(-1)?.startsWith("index.");
|
|
50
52
|
const module = segments.at(-2);
|
|
51
|
-
if (!isIndex || !module || !_allowedModules.allowedModules.has(module)) {
|
|
53
|
+
if (!isIndex || !module || !_allowedModules.allowedModules.has(module) || module === "VirtualizedList") {
|
|
52
54
|
return resolution;
|
|
53
55
|
}
|
|
54
56
|
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodePath","require","_allowedModules","thisModuleDist","resolve","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","isInternal","originModulePath","isReactNativeIndex","endsWith","sep","type","filePath","includes","basename","split","at","module","allowedModules","has","webResolver","segments","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAQA,IAAAC,eAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAG,IAAAC,iBAAO,EAACC,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAG,IAAAF,iBAAO,EAACC,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACN,cAAc,CAAC,IAAIK,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAC1D,MAAME,UAAU,GAAGT,gBAAgB,CAACK,OAAO,CAACK,gBAAgB,CAAC;EAC7D,MAAMC,kBAAkB,GAAGN,OAAO,CAACK,gBAAgB,CAACE,QAAQ,CAC1D,
|
|
1
|
+
{"version":3,"names":["_nodePath","require","_allowedModules","thisModuleDist","resolve","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","isInternal","originModulePath","isReactNativeIndex","endsWith","sep","type","filePath","includes","basename","split","at","module","allowedModules","has","webResolver","segments","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAQA,IAAAC,eAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAG,IAAAC,iBAAO,EAACC,SAAS,EAAE,eAAe,CAAC;AAC1D,MAAMC,aAAa,GAAG,IAAAF,iBAAO,EAACC,SAAS,EAAE,cAAc,CAAC;AAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;EACnD,OACEA,QAAQ,CAACC,UAAU,CAACN,cAAc,CAAC,IAAIK,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;AAE7E;AAEO,SAASI,cAAcA,CAC5BC,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAC1D,MAAME,UAAU,GAAGT,gBAAgB,CAACK,OAAO,CAACK,gBAAgB,CAAC;EAC7D,MAAMC,kBAAkB,GAAGN,OAAO,CAACK,gBAAgB,CAACE,QAAQ,CAC1D,GAAGC,aAAG,eAAeA,aAAG,UAC1B,CAAC;EAED,IAAIJ,UAAU,IAAID,UAAU,CAACM,IAAI,KAAK,YAAY,IAAIH,kBAAkB,EA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AmBA,aAAG,OAAOA,aAAG,QAAQ,CAAC,EAC5E;IACA,OAAOL,UAAU;EACnB;;EAEA;EACA,MAAMgB,QAAQ,GAAGhB,UAAU,CAACO,QAAQ,CAACG,KAAK,CAACL,aAAG,CAAC;EAC/C,MAAMY,OAAO,GAAGD,QAAQ,CAACL,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEjB,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMkB,MAAM,GAAGI,QAAQ,CAACL,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IACE,CAACM,OAAO,IACR,CAACL,MAAM,IACP,CAACC,8BAAc,CAACC,GAAG,CAACF,MAAM,CAAC,IAC3BA,MAAM,KAAK,iBAAiB,EAC5B;IACA,OAAOZ,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+Be,MAAM,EAAE,EAAEb,QAAQ,CAAC;AAC7E","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setupTypeScript = setupTypeScript;
|
|
7
7
|
var _fs = require("fs");
|
|
8
|
+
var _nodePath = require("node:path");
|
|
8
9
|
var _commentJson = require("comment-json");
|
|
9
10
|
var _picocolors = require("./picocolors.js");
|
|
10
11
|
/* eslint-disable */
|
|
@@ -15,11 +16,15 @@ function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-na
|
|
|
15
16
|
if (!ts) {
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
|
-
const configFileName = ts.findConfigFile("
|
|
19
|
+
const configFileName = ts.findConfigFile((0, _nodePath.resolve)("."), ts.sys.fileExists, "tsconfig.json");
|
|
20
|
+
if (!configFileName) return;
|
|
21
|
+
const configDirectory = (0, _nodePath.dirname)((0, _nodePath.resolve)(configFileName));
|
|
22
|
+
const environmentFile = (0, _nodePath.resolve)(envPath);
|
|
23
|
+
const relativeEnvironmentFile = (0, _nodePath.relative)(configDirectory, environmentFile);
|
|
19
24
|
const userConfig = (0, _commentJson.parse)((0, _fs.readFileSync)(configFileName, {
|
|
20
25
|
encoding: "utf-8"
|
|
21
26
|
}));
|
|
22
|
-
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig)) {
|
|
27
|
+
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig) || Object.prototype.toString.call(userConfig) !== "[object Object]") {
|
|
23
28
|
return;
|
|
24
29
|
}
|
|
25
30
|
const output = [];
|
|
@@ -30,17 +35,32 @@ function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-na
|
|
|
30
35
|
// NOTE: This file should not be edited and should be committed with your source code. It is generated by ${name}. If you need to move or disable this file, please see the documentation.`);
|
|
31
36
|
output.push(`Created ${(0, _picocolors.cyan)(envPath)}`);
|
|
32
37
|
}
|
|
33
|
-
userConfig.include
|
|
34
|
-
|
|
35
|
-
userConfig.include.push(envPath);
|
|
38
|
+
if (Array.isArray(userConfig.include) && !(Array.isArray(userConfig.files) && userConfig.files.includes(relativeEnvironmentFile)) && !userConfig.include.includes(relativeEnvironmentFile)) {
|
|
39
|
+
userConfig.include.push(relativeEnvironmentFile);
|
|
36
40
|
updatedConfig = true;
|
|
37
41
|
output.push(`Updated ${configFileName} to include the ${(0, _picocolors.cyan)(envPath)} file`);
|
|
38
42
|
}
|
|
43
|
+
|
|
44
|
+
// Resolve inheritance on a copy so comments and the user's own settings survive.
|
|
45
|
+
const effectiveConfig = ts.parseJsonConfigFileContent(JSON.parse(JSON.stringify(userConfig)), ts.sys, configDirectory, {}, (0, _nodePath.resolve)(configFileName));
|
|
46
|
+
if (!effectiveConfig.fileNames.some(file => (0, _nodePath.resolve)(file) === environmentFile)) {
|
|
47
|
+
// A files entry can include the declaration even when inherited include or
|
|
48
|
+
// exclude settings omit it. Preserve the original implicit include as well.
|
|
49
|
+
if (effectiveConfig.raw.include === undefined && effectiveConfig.raw.files === undefined) {
|
|
50
|
+
userConfig.include = new _commentJson.CommentArray("**/*");
|
|
51
|
+
}
|
|
52
|
+
userConfig.files ??= new _commentJson.CommentArray(...(effectiveConfig.raw.files || []));
|
|
53
|
+
if (Array.isArray(userConfig.files) && !userConfig.files.includes(relativeEnvironmentFile)) {
|
|
54
|
+
userConfig.files.push(relativeEnvironmentFile);
|
|
55
|
+
updatedConfig = true;
|
|
56
|
+
output.push(`Updated ${configFileName} to include the ${(0, _picocolors.cyan)(envPath)} file`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
39
59
|
if (updatedConfig) {
|
|
40
60
|
(0, _fs.writeFileSync)(configFileName, (0, _commentJson.stringify)(userConfig, null, 2));
|
|
41
61
|
}
|
|
42
62
|
if (output.length) {
|
|
43
|
-
console.log(`${(0, _picocolors.cyan)((0, _picocolors.bold)("
|
|
63
|
+
console.log(`${(0, _picocolors.cyan)((0, _picocolors.bold)("Nativewind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
|
|
44
64
|
}
|
|
45
65
|
} catch {}
|
|
46
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fs","require","_commentJson","_picocolors","setupTypeScript","envPath","name","ts","configFileName","findConfigFile","sys","fileExists","userConfig","parse","readFileSync","encoding","Array","isArray","output","updatedConfig","existsSync","writeFileSync","push","cyan","include","
|
|
1
|
+
{"version":3,"names":["_fs","require","_nodePath","_commentJson","_picocolors","setupTypeScript","envPath","name","ts","configFileName","findConfigFile","resolve","sys","fileExists","configDirectory","dirname","environmentFile","relativeEnvironmentFile","relative","userConfig","parse","readFileSync","encoding","Array","isArray","Object","prototype","toString","call","output","updatedConfig","existsSync","writeFileSync","push","cyan","include","files","includes","effectiveConfig","parseJsonConfigFileContent","JSON","stringify","fileNames","some","file","raw","undefined","CommentArray","length","console","log","bold","join"],"sourceRoot":"../../../src","sources":["metro/typescript.ts"],"mappings":";;;;;;AACA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GA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CAACpB,uBAAuB,CAAC,EACnD;QACAE,UAAU,CAACiB,KAAK,CAACH,IAAI,CAAChB,uBAAuB,CAAC;QAC9Ca,aAAa,GAAG,IAAI;QACpBD,MAAM,CAACI,IAAI,CACT,WAAWxB,cAAc,mBAAmB,IAAAyB,gBAAI,EAAC5B,OAAO,CAAC,OAC3D,CAAC;MACH;IACF;IAEA,IAAIwB,aAAa,EAAE;MACjB,IAAAE,iBAAa,EAACvB,cAAc,EAAE,IAAAgC,sBAAS,EAACtB,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D;IAEA,IAAIU,MAAM,CAACmB,MAAM,EAAE;MACjBC,OAAO,CAACC,GAAG,CACT,GAAG,IAAAhB,gBAAI,EAAC,IAAAiB,gBAAI,EAAC,YAAY,CAAC,CAAC,2EAA2EtB,MAAM,CAACuB,IAAI,CAAC,QAAQ,CAAC,EAC7H,CAAC;IACH;EACF,CAAC,CAAC,MAAM,CAAC;AACX","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatCompilerWarnings = formatCompilerWarnings;
|
|
7
|
+
exports.reportCompilerWarnings = reportCompilerWarnings;
|
|
8
|
+
var _path = require("path");
|
|
9
|
+
/** "summary" prints one capped block per CSS file, "verbose" lists every entry, "none" prints nothing */
|
|
10
|
+
|
|
11
|
+
const SUMMARY_ENTRY_LIMIT = 10;
|
|
12
|
+
const SUMMARY_VALUE_LIMIT = 5;
|
|
13
|
+
const SUMMARY_VALUE_LENGTH_LIMIT = 60;
|
|
14
|
+
const PREFIX = "react-native-css";
|
|
15
|
+
|
|
16
|
+
// Metro re-transforms a CSS file on every rebuild, so a file's block prints again only when its warnings change
|
|
17
|
+
const lastReportedByFile = new Map();
|
|
18
|
+
|
|
19
|
+
// Metro forwards each transform worker's stderr to the bundler's terminal, and a warning never fails the build
|
|
20
|
+
function reportCompilerWarnings(warnings, options) {
|
|
21
|
+
const {
|
|
22
|
+
filename,
|
|
23
|
+
projectRoot,
|
|
24
|
+
level = "summary"
|
|
25
|
+
} = options;
|
|
26
|
+
if (level === "none") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const message = formatCompilerWarnings(warnings, {
|
|
30
|
+
displayPath: toDisplayPath(filename, projectRoot),
|
|
31
|
+
verbose: level === "verbose"
|
|
32
|
+
});
|
|
33
|
+
if (message === undefined) {
|
|
34
|
+
lastReportedByFile.delete(filename);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (lastReportedByFile.get(filename) === message) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
lastReportedByFile.set(filename, message);
|
|
41
|
+
console.warn(message);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Plain text: Metro's transform workers write to a pipe, where colour would never render
|
|
45
|
+
function formatCompilerWarnings(warnings, options) {
|
|
46
|
+
const {
|
|
47
|
+
displayPath,
|
|
48
|
+
verbose = false
|
|
49
|
+
} = options;
|
|
50
|
+
const droppedCount = (warnings.properties?.length ?? 0) + (warnings.functions?.length ?? 0) + Object.values(warnings.values ?? {}).reduce((total, entries) => total + entries.length, 0);
|
|
51
|
+
|
|
52
|
+
// A syntax warning sends the reader to their stylesheet rather than to what React Native lacks, so it is counted apart
|
|
53
|
+
const syntaxCount = warnings.syntax?.length ?? 0;
|
|
54
|
+
if (droppedCount === 0 && syntaxCount === 0) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
const properties = limit(unique(warnings.properties), verbose);
|
|
58
|
+
const functions = limit(unique(warnings.functions), verbose);
|
|
59
|
+
const rendered = renderValues(warnings.values, verbose);
|
|
60
|
+
const values = limit(rendered.entries, verbose);
|
|
61
|
+
const syntax = limit(unique(warnings.syntax), verbose);
|
|
62
|
+
const claims = [];
|
|
63
|
+
if (droppedCount > 0) {
|
|
64
|
+
claims.push(`${droppedCount} ${pluralize(droppedCount, "declaration")} dropped, no React Native equivalent`);
|
|
65
|
+
}
|
|
66
|
+
if (syntaxCount > 0) {
|
|
67
|
+
claims.push(`${syntaxCount} syntax ${pluralize(syntaxCount, "warning")}`);
|
|
68
|
+
}
|
|
69
|
+
const lines = [`${PREFIX}: ${displayPath} - ${claims.join("; ")}`];
|
|
70
|
+
if (syntax.shown.length > 0) {
|
|
71
|
+
lines.push(` syntax: ${syntax.shown.join("; ")}${suffix(syntax.hidden)}`);
|
|
72
|
+
}
|
|
73
|
+
if (properties.shown.length > 0) {
|
|
74
|
+
lines.push(` properties: ${properties.shown.join(", ")}${suffix(properties.hidden)}`);
|
|
75
|
+
}
|
|
76
|
+
if (values.shown.length > 0) {
|
|
77
|
+
lines.push(` values: ${values.shown.join("; ")}${suffix(values.hidden)}`);
|
|
78
|
+
}
|
|
79
|
+
if (functions.shown.length > 0) {
|
|
80
|
+
lines.push(` functions: ${functions.shown.join(", ")}${suffix(functions.hidden)}`);
|
|
81
|
+
}
|
|
82
|
+
if (properties.hidden + values.hidden + functions.hidden + rendered.hidden + syntax.hidden > 0) {
|
|
83
|
+
lines.push(` Set reactNativeCSS.warnings to "verbose" for the full list, or "none" to silence this.`);
|
|
84
|
+
}
|
|
85
|
+
return lines.join("\n");
|
|
86
|
+
}
|
|
87
|
+
function toDisplayPath(filename, projectRoot) {
|
|
88
|
+
const relativePath = (0, _path.relative)(projectRoot, filename);
|
|
89
|
+
return relativePath === "" || relativePath.startsWith("..") ? filename : relativePath;
|
|
90
|
+
}
|
|
91
|
+
function renderValues(values, verbose) {
|
|
92
|
+
let hidden = 0;
|
|
93
|
+
const entries = [];
|
|
94
|
+
const recordedByProperty = values ?? {};
|
|
95
|
+
for (const property of Object.keys(recordedByProperty).sort()) {
|
|
96
|
+
const distinct = unique(recordedByProperty[property]);
|
|
97
|
+
const shown = verbose ? distinct : distinct.slice(0, SUMMARY_VALUE_LIMIT);
|
|
98
|
+
hidden += distinct.length - shown.length;
|
|
99
|
+
const rendered = shown.map(value => truncate(value, verbose));
|
|
100
|
+
entries.push(`${property}: ${rendered.join(", ")}${suffix(distinct.length - shown.length)}`);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
entries,
|
|
104
|
+
hidden
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function limit(entries, verbose) {
|
|
108
|
+
if (verbose || entries.length <= SUMMARY_ENTRY_LIMIT) {
|
|
109
|
+
return {
|
|
110
|
+
shown: entries,
|
|
111
|
+
hidden: 0
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
shown: entries.slice(0, SUMMARY_ENTRY_LIMIT),
|
|
116
|
+
hidden: entries.length - SUMMARY_ENTRY_LIMIT
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function suffix(hidden) {
|
|
120
|
+
return hidden > 0 ? ` (+${hidden} more)` : "";
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Code-unit order rather than localeCompare, whose collation varies with the ICU build
|
|
124
|
+
function unique(entries) {
|
|
125
|
+
return entries ? [...new Set(entries)].sort() : [];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// An unresolved calc() is recorded as its whole lightningcss node, hundreds of characters long
|
|
129
|
+
function truncate(value, verbose) {
|
|
130
|
+
return verbose || value.length <= SUMMARY_VALUE_LENGTH_LIMIT ? value : `${value.slice(0, SUMMARY_VALUE_LENGTH_LIMIT)}...`;
|
|
131
|
+
}
|
|
132
|
+
function pluralize(count, noun) {
|
|
133
|
+
return count === 1 ? noun : `${noun}s`;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=warnings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_path","require","SUMMARY_ENTRY_LIMIT","SUMMARY_VALUE_LIMIT","SUMMARY_VALUE_LENGTH_LIMIT","PREFIX","lastReportedByFile","Map","reportCompilerWarnings","warnings","options","filename","projectRoot","level","message","formatCompilerWarnings","displayPath","toDisplayPath","verbose","undefined","delete","get","set","console","warn","droppedCount","properties","length","functions","Object","values","reduce","total","entries","syntaxCount","syntax","limit","unique","rendered","renderValues","claims","push","pluralize","lines","join","shown","suffix","hidden","relativePath","relative","startsWith","recordedByProperty","property","keys","sort","distinct","slice","map","value","truncate","Set","count","noun"],"sourceRoot":"../../../src","sources":["metro/warnings.ts"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA;;AAGA,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,0BAA0B,GAAG,EAAE;AAErC,MAAMC,MAAM,GAAG,kBAAkB;;AAEjC;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAiB,CAAC;;AAEpD;AACO,SAASC,sBAAsBA,CACpCC,QAA0B,EAC1BC,OAIC,EACK;EACN,MAAM;IAAEC,QAAQ;IAAEC,WAAW;IAAEC,KAAK,GAAG;EAAU,CAAC,GAAGH,OAAO;EAE5D,IAAIG,KAAK,KAAK,MAAM,EAAE;IACpB;EACF;EAEA,MAAMC,OAAO,GAAGC,sBAAsB,CAACN,QAAQ,EAAE;IAC/CO,WAAW,EAAEC,aAAa,CAACN,QAAQ,EAAEC,WAAW,CAAC;IACjDM,OAAO,EAAEL,KAAK,KAAK;EACrB,CAAC,CAAC;EAEF,IAAIC,OAAO,KAAKK,SAAS,EAAE;IACzBb,kBAAkB,CAACc,MAAM,CAACT,QAAQ,CAAC;IACnC;EACF;EAEA,IAAIL,kBAAkB,CAACe,GAAG,CAACV,QAAQ,CAAC,KAAKG,OAAO,EAAE;IAChD;EACF;EAEAR,kBAAkB,CAACgB,GAAG,CAACX,QAAQ,EAAEG,OAAO,CAAC;EAEzCS,OAAO,CAACC,IAAI,CAACV,OAAO,CAAC;AACvB;;AAEA;AACO,SAASC,sBAAsBA,CACpCN,QAA0B,EAC1BC,OAA+D,EAC3C;EACpB,MA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AAC5B;AAEA,SAASX,KAAKA,CAAIH,OAAY,EAAEf,OAAgB,EAAE;EAChD,IAAIA,OAAO,IAAIe,OAAO,CAACN,MAAM,IAAIzB,mBAAmB,EAAE;IACpD,OAAO;MAAE2C,KAAK,EAAEZ,OAAO;MAAEc,MAAM,EAAE;IAAE,CAAC;EACtC;EAEA,OAAO;IACLF,KAAK,EAAEZ,OAAO,CAACuB,KAAK,CAAC,CAAC,EAAEtD,mBAAmB,CAAC;IAC5C6C,MAAM,EAAEd,OAAO,CAACN,MAAM,GAAGzB;EAC3B,CAAC;AACH;AAEA,SAAS4C,MAAMA,CAACC,MAAc,EAAU;EACtC,OAAOA,MAAM,GAAG,CAAC,GAAG,MAAMA,MAAM,QAAQ,GAAG,EAAE;AAC/C;;AAEA;AACA,SAASV,MAAMA,CAACJ,OAA6B,EAAY;EACvD,OAAOA,OAAO,GAAG,CAAC,GAAG,IAAI2B,GAAG,CAAC3B,OAAO,CAAC,CAAC,CAACqB,IAAI,CAAC,CAAC,GAAG,EAAE;AACpD;;AAEA;AACA,SAASK,QAAQA,CAACD,KAAa,EAAExC,OAAgB,EAAU;EACzD,OAAOA,OAAO,IAAIwC,KAAK,CAAC/B,MAAM,IAAIvB,0BAA0B,GACxDsD,KAAK,GACL,GAAGA,KAAK,CAACF,KAAK,CAAC,CAAC,EAAEpD,0BAA0B,CAAC,KAAK;AACxD;AAEA,SAASsC,SAASA,CAACmB,KAAa,EAAEC,IAAY,EAAU;EACtD,OAAOD,KAAK,KAAK,CAAC,GAAGC,IAAI,GAAG,GAAGA,IAAI,GAAG;AACxC","ignoreList":[]}
|
|
@@ -34,19 +34,24 @@ exports.vars = vars;
|
|
|
34
34
|
var _react = require("react");
|
|
35
35
|
var _reactNative = require("react-native");
|
|
36
36
|
var _nativeInternal = require("react-native-css/native-internal");
|
|
37
|
+
var _utilities = require("react-native-css/utilities");
|
|
37
38
|
var _useNativeCss = require("./react/useNativeCss.js");
|
|
38
39
|
var _usePassthrough = require("./react/usePassthrough.js");
|
|
39
40
|
var _reactivity = require("./reactivity.js");
|
|
40
41
|
var _resolve = require("./styles/resolve.js");
|
|
41
42
|
/* eslint-disable */
|
|
42
43
|
|
|
44
|
+
const defaultMapping = {
|
|
45
|
+
className: "style"
|
|
46
|
+
};
|
|
47
|
+
|
|
43
48
|
/**
|
|
44
49
|
* Generates a new Higher-Order component the wraps the base component and applies the styles.
|
|
45
50
|
* This is added to the `interopComponents` map so that it can be used in the `wrapJSX` function
|
|
46
51
|
* @param baseComponent
|
|
47
52
|
* @param mapping
|
|
48
53
|
*/
|
|
49
|
-
const styled = (baseComponent, mapping, options) => {
|
|
54
|
+
const styled = (baseComponent, mapping = defaultMapping, options) => {
|
|
50
55
|
let component;
|
|
51
56
|
// const type = getComponentType(baseComponent);
|
|
52
57
|
|
|
@@ -70,7 +75,7 @@ const colorScheme = exports.colorScheme = {
|
|
|
70
75
|
return _reactivity.colorScheme.get() ?? _reactNative.Appearance.getColorScheme() ?? "light";
|
|
71
76
|
},
|
|
72
77
|
set(value) {
|
|
73
|
-
return _reactivity.colorScheme.set(value);
|
|
78
|
+
return _reactivity.colorScheme.set(value === "light" || value === "dark" ? value : null);
|
|
74
79
|
}
|
|
75
80
|
};
|
|
76
81
|
const useUnstableNativeVariable = exports.useUnstableNativeVariable = useNativeVariable;
|
|
@@ -84,22 +89,26 @@ function useNativeVariable(name) {
|
|
|
84
89
|
name = name.slice(2);
|
|
85
90
|
}
|
|
86
91
|
const inheritedVariables = (0, _react.useContext)(_nativeInternal.VariableContext);
|
|
87
|
-
const [
|
|
92
|
+
const [, forceUpdate] = (0, _react.useState)(0);
|
|
93
|
+
const [effect] = (0, _react.useState)(() => {
|
|
88
94
|
const effect = {
|
|
89
95
|
observers: new Set(),
|
|
90
|
-
run: () =>
|
|
91
|
-
...state
|
|
92
|
-
}))
|
|
96
|
+
run: () => forceUpdate(state => state + 1)
|
|
93
97
|
};
|
|
94
98
|
const get = observable => observable.get(effect);
|
|
95
|
-
return {
|
|
96
|
-
...effect,
|
|
99
|
+
return Object.assign(effect, {
|
|
97
100
|
get
|
|
98
|
-
};
|
|
101
|
+
});
|
|
99
102
|
});
|
|
100
|
-
|
|
103
|
+
(0, _react.useEffect)(() => {
|
|
104
|
+
// React StrictMode replays setup after cleanup without another render.
|
|
105
|
+
if (effect.observers.size === 0) forceUpdate(state => state + 1);
|
|
106
|
+
return () => (0, _reactivity.cleanupEffect)(effect);
|
|
107
|
+
}, [effect]);
|
|
108
|
+
(0, _reactivity.cleanupEffect)(effect);
|
|
109
|
+
return (0, _utilities.commaListItems)((0, _resolve.resolveValue)([{}, "var", [name]], effect.get, {
|
|
101
110
|
inheritedVariables
|
|
102
|
-
});
|
|
111
|
+
}));
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
/**
|
|
@@ -108,6 +117,6 @@ function useNativeVariable(name) {
|
|
|
108
117
|
function vars(variables) {
|
|
109
118
|
return Object.assign({
|
|
110
119
|
[_reactivity.VAR_SYMBOL]: "inline"
|
|
111
|
-
},
|
|
120
|
+
}, (0, _reactivity.toVariableRecord)(variables));
|
|
112
121
|
}
|
|
113
122
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_nativeInternal","_useNativeCss","_usePassthrough","_reactivity","_resolve","styled","baseComponent","mapping","options","component","configs","mappingToConfig","passThrough","props","usePassthrough","useNativeCss","name","displayName","exports","colorScheme","get","colorSchemeObs","Appearance","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","useState","startsWith","slice","inheritedVariables","useContext","VariableContext","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_nativeInternal","_utilities","_useNativeCss","_usePassthrough","_reactivity","_resolve","defaultMapping","className","styled","baseComponent","mapping","options","component","configs","mappingToConfig","passThrough","props","usePassthrough","useNativeCss","name","displayName","exports","colorScheme","get","colorSchemeObs","Appearance","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","useState","startsWith","slice","inheritedVariables","useContext","VariableContext","forceUpdate","effect","observers","Set","run","state","observable","Object","assign","useEffect","size","cleanupEffect","commaListItems","resolveValue","vars","variables","VAR_SYMBOL","toVariableRecord"],"sourceRoot":"../../../src","sources":["native/api.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAUA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAQA,IAAAO,QAAA,GAAAP,OAAA;AA1BA;;AAoCA,MAAMQ,cAAsE,GAAG;EAC7EC,SAAS,EAAE;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,MAAc,GAAGA,CAC5BC,aAAkC,EAClCC,OAAiC,GAAGJ,cAAc,EAClDK,OAAuB,KACpB;EACH,IAAIC,SAAc;EAClB;;EAEA,MAAMC,OAAO,GAAG,IAAAC,6BAAe,EAACJ,OAAO,CAAC;EAExC,IAAIC,OAAO,EAAEI,WAAW,EAAE;IACxBH,SAAS,GAAII,KAA0B,IAAK;MAC1C,OAAO,IAAAC,8BAAc,EAACR,aAAa,EAAEO,KAAK,EAAEH,OAAO,CAAC;IACtD,CAAC;EACH,CAAC,MAAM;IACLD,SAAS,GAAII,KAA0B,IAAK;MAC1C,OAAO,IAAAE,0BAAY,EAACT,aAAa,EAAEO,KAAK,EAAEH,OAAO,CAAC;IACpD,CAAC;EACH;EAEA,MAAMM,IAAI,GAAGV,aAAa,CAACW,WAAW,IAAIX,aAAa,CAACU,IAAI,IAAI,SAAS;EACzEP,SAAS,CAACQ,WAAW,GAAG,cAAcD,IAAI,EAAE;EAC5C,OAAOP,SAAS;AAClB,CAAC;AAACS,OA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