react-native-css 0.0.0-nightly.008d479
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/LICENSE +20 -0
- package/README.md +330 -0
- package/dist/commonjs/babel/allowedModules.js +23 -0
- package/dist/commonjs/babel/allowedModules.js.map +1 -0
- package/dist/commonjs/babel/helpers.js +25 -0
- package/dist/commonjs/babel/helpers.js.map +1 -0
- package/dist/commonjs/babel/import-plugin.js +101 -0
- package/dist/commonjs/babel/import-plugin.js.map +1 -0
- package/dist/commonjs/babel/index.js +13 -0
- package/dist/commonjs/babel/index.js.map +1 -0
- package/dist/commonjs/babel/react-native-web.js +118 -0
- package/dist/commonjs/babel/react-native-web.js.map +1 -0
- package/dist/commonjs/babel/react-native.js +118 -0
- package/dist/commonjs/babel/react-native.js.map +1 -0
- package/dist/commonjs/compiler/atRules.js +108 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +338 -0
- package/dist/commonjs/compiler/compiler.js.map +1 -0
- package/dist/commonjs/compiler/compiler.types.js +4 -0
- package/dist/commonjs/compiler/compiler.types.js.map +1 -0
- package/dist/commonjs/compiler/container-query.js +63 -0
- package/dist/commonjs/compiler/container-query.js.map +1 -0
- package/dist/commonjs/compiler/declarations.js +2341 -0
- package/dist/commonjs/compiler/declarations.js.map +1 -0
- package/dist/commonjs/compiler/functions-web.js +44 -0
- package/dist/commonjs/compiler/functions-web.js.map +1 -0
- package/dist/commonjs/compiler/functions.js +59 -0
- package/dist/commonjs/compiler/functions.js.map +1 -0
- package/dist/commonjs/compiler/index.js +17 -0
- package/dist/commonjs/compiler/index.js.map +1 -0
- package/dist/commonjs/compiler/inheritance.test.js +78 -0
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -0
- package/dist/commonjs/compiler/inline-variables.js +142 -0
- package/dist/commonjs/compiler/inline-variables.js.map +1 -0
- package/dist/commonjs/compiler/keyframes.js +60 -0
- package/dist/commonjs/compiler/keyframes.js.map +1 -0
- package/dist/commonjs/compiler/lightningcss-loader.js +50 -0
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -0
- package/dist/commonjs/compiler/media-query.js +172 -0
- package/dist/commonjs/compiler/media-query.js.map +1 -0
- package/dist/commonjs/compiler/pseudo-elements.js +49 -0
- package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +504 -0
- package/dist/commonjs/compiler/selector-builder.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +414 -0
- package/dist/commonjs/compiler/selectors.js.map +1 -0
- package/dist/commonjs/compiler/split-by-delimiter.js +21 -0
- package/dist/commonjs/compiler/split-by-delimiter.js.map +1 -0
- package/dist/commonjs/compiler/stylesheet.js +478 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/compiler/supports.js +29 -0
- package/dist/commonjs/compiler/supports.js.map +1 -0
- package/dist/commonjs/components/ActivityIndicator.js +22 -0
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
- package/dist/commonjs/components/Button.js +22 -0
- package/dist/commonjs/components/Button.js.map +1 -0
- package/dist/commonjs/components/FlatList.js +20 -0
- package/dist/commonjs/components/FlatList.js.map +1 -0
- package/dist/commonjs/components/Image.js +17 -0
- package/dist/commonjs/components/Image.js.map +1 -0
- package/dist/commonjs/components/ImageBackground.js +22 -0
- package/dist/commonjs/components/ImageBackground.js.map +1 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js +19 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/commonjs/components/Pressable.js +17 -0
- package/dist/commonjs/components/Pressable.js.map +1 -0
- package/dist/commonjs/components/ScrollView.js +18 -0
- package/dist/commonjs/components/ScrollView.js.map +1 -0
- package/dist/commonjs/components/Switch.js +17 -0
- package/dist/commonjs/components/Switch.js.map +1 -0
- package/dist/commonjs/components/Text.js +17 -0
- package/dist/commonjs/components/Text.js.map +1 -0
- package/dist/commonjs/components/TextInput.js +22 -0
- package/dist/commonjs/components/TextInput.js.map +1 -0
- package/dist/commonjs/components/TouchableHighlight.js +17 -0
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -0
- package/dist/commonjs/components/TouchableOpacity.js +17 -0
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js +17 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/commonjs/components/View.js +17 -0
- package/dist/commonjs/components/View.js.map +1 -0
- package/dist/commonjs/components/VirtualizedList.js +20 -0
- package/dist/commonjs/components/VirtualizedList.js.map +1 -0
- package/dist/commonjs/components/copyComponentProperties.js +19 -0
- package/dist/commonjs/components/copyComponentProperties.js.map +1 -0
- package/dist/commonjs/components/index.cjs +265 -0
- package/dist/commonjs/components/index.cjs.map +1 -0
- package/dist/commonjs/components/index.js +148 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/components/react-native-safe-area-context.js +17 -0
- package/dist/commonjs/components/react-native-safe-area-context.js.map +1 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js +53 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/jest/expect.d.js +2 -0
- package/dist/commonjs/jest/expect.d.js.map +1 -0
- package/dist/commonjs/jest/index.js +55 -0
- package/dist/commonjs/jest/index.js.map +1 -0
- package/dist/commonjs/jest/setup.js +3 -0
- package/dist/commonjs/jest/setup.js.map +1 -0
- package/dist/commonjs/jest/setupAfterEnv.js +15 -0
- package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
- package/dist/commonjs/metro/index.js +60 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +27 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +38 -0
- package/dist/commonjs/metro/metro-transformer.js.map +1 -0
- package/dist/commonjs/metro/override.js +6 -0
- package/dist/commonjs/metro/override.js.map +1 -0
- package/dist/commonjs/metro/picocolors.js +71 -0
- package/dist/commonjs/metro/picocolors.js.map +1 -0
- package/dist/commonjs/metro/resolver.js +58 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/stringify.js +59 -0
- package/dist/commonjs/metro/stringify.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +47 -0
- package/dist/commonjs/metro/typescript.js.map +1 -0
- package/dist/commonjs/native/api.js +117 -0
- package/dist/commonjs/native/api.js.map +1 -0
- package/dist/commonjs/native/conditions/attributes.js +44 -0
- package/dist/commonjs/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/native/conditions/container-query.js +123 -0
- package/dist/commonjs/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/native/conditions/guards.js +33 -0
- package/dist/commonjs/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/native/conditions/index.js +40 -0
- package/dist/commonjs/native/conditions/index.js.map +1 -0
- package/dist/commonjs/native/conditions/media-query.js +98 -0
- package/dist/commonjs/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/native/index.js +28 -0
- package/dist/commonjs/native/index.js.map +1 -0
- package/dist/commonjs/native/objects.js +92 -0
- package/dist/commonjs/native/objects.js.map +1 -0
- package/dist/commonjs/native/react/interaction.js +63 -0
- package/dist/commonjs/native/react/interaction.js.map +1 -0
- package/dist/commonjs/native/react/rules.js +259 -0
- package/dist/commonjs/native/react/rules.js.map +1 -0
- package/dist/commonjs/native/react/useNativeCss.js +166 -0
- package/dist/commonjs/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/native/react-native-css-metro-override.js +39 -0
- package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
- package/dist/commonjs/native/reactivity.js +181 -0
- package/dist/commonjs/native/reactivity.js.map +1 -0
- package/dist/commonjs/native/reanimated.js +17 -0
- package/dist/commonjs/native/reanimated.js.map +1 -0
- package/dist/commonjs/native/styles/calculate-props.js +162 -0
- package/dist/commonjs/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/native/styles/constants.js +9 -0
- package/dist/commonjs/native/styles/constants.js.map +1 -0
- package/dist/commonjs/native/styles/defaults.js +69 -0
- package/dist/commonjs/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/native/styles/functions/animation-timing.js +34 -0
- package/dist/commonjs/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/commonjs/native/styles/functions/calc.js +125 -0
- package/dist/commonjs/native/styles/functions/calc.js.map +1 -0
- package/dist/commonjs/native/styles/functions/color-mix.js +50 -0
- package/dist/commonjs/native/styles/functions/color-mix.js.map +1 -0
- package/dist/commonjs/native/styles/functions/filters.js +84 -0
- package/dist/commonjs/native/styles/functions/filters.js.map +1 -0
- package/dist/commonjs/native/styles/functions/index.js +94 -0
- package/dist/commonjs/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/native/styles/functions/numeric-functions.js +32 -0
- package/dist/commonjs/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/platform-functions.js +46 -0
- package/dist/commonjs/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/string-functions.js +23 -0
- package/dist/commonjs/native/styles/functions/string-functions.js.map +1 -0
- package/dist/commonjs/native/styles/functions/transform-functions.js +121 -0
- package/dist/commonjs/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/commonjs/native/styles/index.js +345 -0
- package/dist/commonjs/native/styles/index.js.map +1 -0
- package/dist/commonjs/native/styles/line-height.js +25 -0
- package/dist/commonjs/native/styles/line-height.js.map +1 -0
- package/dist/commonjs/native/styles/resolve.js +107 -0
- package/dist/commonjs/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js +79 -0
- package/dist/commonjs/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/animation.js +61 -0
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/border.js +12 -0
- package/dist/commonjs/native/styles/shorthands/border.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/box-shadow.js +48 -0
- package/dist/commonjs/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/index.js +61 -0
- package/dist/commonjs/native/styles/shorthands/index.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/text-shadow.js +13 -0
- package/dist/commonjs/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/commonjs/native/styles/shorthands/transform.js +23 -0
- package/dist/commonjs/native/styles/shorthands/transform.js.map +1 -0
- package/dist/commonjs/native/styles/units.js +54 -0
- package/dist/commonjs/native/styles/units.js.map +1 -0
- package/dist/commonjs/native/styles/variables.js +79 -0
- package/dist/commonjs/native/styles/variables.js.map +1 -0
- package/dist/commonjs/native-internal/README.md +11 -0
- package/dist/commonjs/native-internal/index.js +39 -0
- package/dist/commonjs/native-internal/index.js.map +1 -0
- package/dist/commonjs/native-internal/root.js +34 -0
- package/dist/commonjs/native-internal/root.js.map +1 -0
- package/dist/commonjs/native-internal/style-collection.js +110 -0
- package/dist/commonjs/native-internal/style-collection.js.map +1 -0
- package/dist/commonjs/native-internal/variables.js +27 -0
- package/dist/commonjs/native-internal/variables.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/runtime.js +17 -0
- package/dist/commonjs/runtime.js.map +1 -0
- package/dist/commonjs/runtime.native.js +17 -0
- package/dist/commonjs/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime.types.js +6 -0
- package/dist/commonjs/runtime.types.js.map +1 -0
- package/dist/commonjs/utilities/dot-notation.types.js +2 -0
- package/dist/commonjs/utilities/dot-notation.types.js.map +1 -0
- package/dist/commonjs/utilities/index.js +39 -0
- package/dist/commonjs/utilities/index.js.map +1 -0
- package/dist/commonjs/utilities/specificity.js +44 -0
- package/dist/commonjs/utilities/specificity.js.map +1 -0
- package/dist/commonjs/utilities/style-descriptor.js +21 -0
- package/dist/commonjs/utilities/style-descriptor.js.map +1 -0
- package/dist/commonjs/web/api.js +89 -0
- package/dist/commonjs/web/api.js.map +1 -0
- package/dist/commonjs/web/assign-style.js +27 -0
- package/dist/commonjs/web/assign-style.js.map +1 -0
- package/dist/commonjs/web/index.js +18 -0
- package/dist/commonjs/web/index.js.map +1 -0
- package/dist/commonjs/web/metro.js +6 -0
- package/dist/commonjs/web/metro.js.map +1 -0
- package/dist/module/babel/allowedModules.js +19 -0
- package/dist/module/babel/allowedModules.js.map +1 -0
- package/dist/module/babel/helpers.js +21 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +97 -0
- package/dist/module/babel/import-plugin.js.map +1 -0
- package/dist/module/babel/index.js +9 -0
- package/dist/module/babel/index.js.map +1 -0
- package/dist/module/babel/react-native-web.js +112 -0
- package/dist/module/babel/react-native-web.js.map +1 -0
- package/dist/module/babel/react-native.js +112 -0
- package/dist/module/babel/react-native.js.map +1 -0
- package/dist/module/compiler/atRules.js +104 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/compiler.js +333 -0
- package/dist/module/compiler/compiler.js.map +1 -0
- package/dist/module/compiler/compiler.types.js +60 -0
- package/dist/module/compiler/compiler.types.js.map +1 -0
- package/dist/module/compiler/container-query.js +59 -0
- package/dist/module/compiler/container-query.js.map +1 -0
- package/dist/module/compiler/declarations.js +2260 -0
- package/dist/module/compiler/declarations.js.map +1 -0
- package/dist/module/compiler/functions-web.js +32 -0
- package/dist/module/compiler/functions-web.js.map +1 -0
- package/dist/module/compiler/functions.js +47 -0
- package/dist/module/compiler/functions.js.map +1 -0
- package/dist/module/compiler/index.js +9 -0
- package/dist/module/compiler/index.js.map +1 -0
- package/dist/module/compiler/inheritance.test.js +78 -0
- package/dist/module/compiler/inheritance.test.js.map +1 -0
- package/dist/module/compiler/inline-variables.js +138 -0
- package/dist/module/compiler/inline-variables.js.map +1 -0
- package/dist/module/compiler/keyframes.js +54 -0
- package/dist/module/compiler/keyframes.js.map +1 -0
- package/dist/module/compiler/lightningcss-loader.js +46 -0
- package/dist/module/compiler/lightningcss-loader.js.map +1 -0
- package/dist/module/compiler/media-query.js +166 -0
- package/dist/module/compiler/media-query.js.map +1 -0
- package/dist/module/compiler/pseudo-elements.js +44 -0
- package/dist/module/compiler/pseudo-elements.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +499 -0
- package/dist/module/compiler/selector-builder.js.map +1 -0
- package/dist/module/compiler/selectors.js +409 -0
- package/dist/module/compiler/selectors.js.map +1 -0
- package/dist/module/compiler/split-by-delimiter.js +17 -0
- package/dist/module/compiler/split-by-delimiter.js.map +1 -0
- package/dist/module/compiler/stylesheet.js +473 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/compiler/supports.js +25 -0
- package/dist/module/compiler/supports.js.map +1 -0
- package/dist/module/components/ActivityIndicator.js +18 -0
- package/dist/module/components/ActivityIndicator.js.map +1 -0
- package/dist/module/components/Button.js +18 -0
- package/dist/module/components/Button.js.map +1 -0
- package/dist/module/components/FlatList.js +16 -0
- package/dist/module/components/FlatList.js.map +1 -0
- package/dist/module/components/Image.js +13 -0
- package/dist/module/components/Image.js.map +1 -0
- package/dist/module/components/ImageBackground.js +18 -0
- package/dist/module/components/ImageBackground.js.map +1 -0
- package/dist/module/components/KeyboardAvoidingView.js +15 -0
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/module/components/Pressable.js +13 -0
- package/dist/module/components/Pressable.js.map +1 -0
- package/dist/module/components/ScrollView.js +14 -0
- package/dist/module/components/ScrollView.js.map +1 -0
- package/dist/module/components/Switch.js +13 -0
- package/dist/module/components/Switch.js.map +1 -0
- package/dist/module/components/Text.js +13 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TextInput.js +18 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/TouchableHighlight.js +13 -0
- package/dist/module/components/TouchableHighlight.js.map +1 -0
- package/dist/module/components/TouchableOpacity.js +13 -0
- package/dist/module/components/TouchableOpacity.js.map +1 -0
- package/dist/module/components/TouchableWithoutFeedback.js +13 -0
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/module/components/View.js +13 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/VirtualizedList.js +16 -0
- package/dist/module/components/VirtualizedList.js.map +1 -0
- package/dist/module/components/copyComponentProperties.js +15 -0
- package/dist/module/components/copyComponentProperties.js.map +1 -0
- package/dist/module/components/index.cjs +265 -0
- package/dist/module/components/index.cjs.map +1 -0
- package/dist/module/components/index.js +20 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-safe-area-context.js +4 -0
- package/dist/module/components/react-native-safe-area-context.js.map +1 -0
- package/dist/module/components/react-native-safe-area-context.native.js +36 -0
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/module/index.js +4 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/jest/expect.d.js +2 -0
- package/dist/module/jest/expect.d.js.map +1 -0
- package/dist/module/jest/index.js +49 -0
- package/dist/module/jest/index.js.map +1 -0
- package/dist/module/jest/setup.js +3 -0
- package/dist/module/jest/setup.js.map +1 -0
- package/dist/module/jest/setupAfterEnv.js +15 -0
- package/dist/module/jest/setupAfterEnv.js.map +1 -0
- package/dist/module/metro/index.js +55 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +22 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +34 -0
- package/dist/module/metro/metro-transformer.js.map +1 -0
- package/dist/module/metro/override.js +4 -0
- package/dist/module/metro/override.js.map +1 -0
- package/dist/module/metro/picocolors.js +67 -0
- package/dist/module/metro/picocolors.js.map +1 -0
- package/dist/module/metro/resolver.js +53 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/stringify.js +55 -0
- package/dist/module/metro/stringify.js.map +1 -0
- package/dist/module/metro/typescript.js +42 -0
- package/dist/module/metro/typescript.js.map +1 -0
- package/dist/module/native/api.js +85 -0
- package/dist/module/native/api.js.map +1 -0
- package/dist/module/native/conditions/attributes.js +40 -0
- package/dist/module/native/conditions/attributes.js.map +1 -0
- package/dist/module/native/conditions/container-query.js +117 -0
- package/dist/module/native/conditions/container-query.js.map +1 -0
- package/dist/module/native/conditions/guards.js +29 -0
- package/dist/module/native/conditions/guards.js.map +1 -0
- package/dist/module/native/conditions/index.js +36 -0
- package/dist/module/native/conditions/index.js.map +1 -0
- package/dist/module/native/conditions/media-query.js +93 -0
- package/dist/module/native/conditions/media-query.js.map +1 -0
- package/dist/module/native/index.js +5 -0
- package/dist/module/native/index.js.map +1 -0
- package/dist/module/native/objects.js +84 -0
- package/dist/module/native/objects.js.map +1 -0
- package/dist/module/native/react/interaction.js +59 -0
- package/dist/module/native/react/interaction.js.map +1 -0
- package/dist/module/native/react/rules.js +252 -0
- package/dist/module/native/react/rules.js.map +1 -0
- package/dist/module/native/react/useNativeCss.js +160 -0
- package/dist/module/native/react/useNativeCss.js.map +1 -0
- package/dist/module/native/react/usePassthrough.js +45 -0
- package/dist/module/native/react/usePassthrough.js.map +1 -0
- package/dist/module/native/react-native-css-metro-override.js +37 -0
- package/dist/module/native/react-native-css-metro-override.js.map +1 -0
- package/dist/module/native/reactivity.js +169 -0
- package/dist/module/native/reactivity.js.map +1 -0
- package/dist/module/native/reanimated.js +13 -0
- package/dist/module/native/reanimated.js.map +1 -0
- package/dist/module/native/styles/calculate-props.js +157 -0
- package/dist/module/native/styles/calculate-props.js.map +1 -0
- package/dist/module/native/styles/constants.js +5 -0
- package/dist/module/native/styles/constants.js.map +1 -0
- package/dist/module/native/styles/defaults.js +65 -0
- package/dist/module/native/styles/defaults.js.map +1 -0
- package/dist/module/native/styles/functions/animation-timing.js +30 -0
- package/dist/module/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/module/native/styles/functions/calc.js +120 -0
- package/dist/module/native/styles/functions/calc.js.map +1 -0
- package/dist/module/native/styles/functions/color-mix.js +45 -0
- package/dist/module/native/styles/functions/color-mix.js.map +1 -0
- package/dist/module/native/styles/functions/filters.js +70 -0
- package/dist/module/native/styles/functions/filters.js.map +1 -0
- package/dist/module/native/styles/functions/index.js +11 -0
- package/dist/module/native/styles/functions/index.js.map +1 -0
- package/dist/module/native/styles/functions/numeric-functions.js +25 -0
- package/dist/module/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/module/native/styles/functions/platform-functions.js +36 -0
- package/dist/module/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/module/native/styles/functions/string-functions.js +18 -0
- package/dist/module/native/styles/functions/string-functions.js.map +1 -0
- package/dist/module/native/styles/functions/transform-functions.js +114 -0
- package/dist/module/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/module/native/styles/index.js +341 -0
- package/dist/module/native/styles/index.js.map +1 -0
- package/dist/module/native/styles/line-height.js +20 -0
- package/dist/module/native/styles/line-height.js.map +1 -0
- package/dist/module/native/styles/resolve.js +102 -0
- package/dist/module/native/styles/resolve.js.map +1 -0
- package/dist/module/native/styles/shorthands/_handler.js +74 -0
- package/dist/module/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/module/native/styles/shorthands/animation.js +54 -0
- package/dist/module/native/styles/shorthands/animation.js.map +1 -0
- package/dist/module/native/styles/shorthands/border.js +8 -0
- package/dist/module/native/styles/shorthands/border.js.map +1 -0
- package/dist/module/native/styles/shorthands/box-shadow.js +43 -0
- package/dist/module/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/module/native/styles/shorthands/index.js +8 -0
- package/dist/module/native/styles/shorthands/index.js.map +1 -0
- package/dist/module/native/styles/shorthands/text-shadow.js +9 -0
- package/dist/module/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/module/native/styles/shorthands/transform.js +18 -0
- package/dist/module/native/styles/shorthands/transform.js.map +1 -0
- package/dist/module/native/styles/units.js +46 -0
- package/dist/module/native/styles/units.js.map +1 -0
- package/dist/module/native/styles/variables.js +75 -0
- package/dist/module/native/styles/variables.js.map +1 -0
- package/dist/module/native-internal/README.md +11 -0
- package/dist/module/native-internal/index.js +6 -0
- package/dist/module/native-internal/index.js.map +1 -0
- package/dist/module/native-internal/root.js +30 -0
- package/dist/module/native-internal/root.js.map +1 -0
- package/dist/module/native-internal/style-collection.js +95 -0
- package/dist/module/native-internal/style-collection.js.map +1 -0
- package/dist/module/native-internal/variables.js +22 -0
- package/dist/module/native-internal/variables.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/runtime.js +4 -0
- package/dist/module/runtime.js.map +1 -0
- package/dist/module/runtime.native.js +4 -0
- package/dist/module/runtime.native.js.map +1 -0
- package/dist/module/runtime.types.js +4 -0
- package/dist/module/runtime.types.js.map +1 -0
- package/dist/module/utilities/dot-notation.types.js +2 -0
- package/dist/module/utilities/dot-notation.types.js.map +1 -0
- package/dist/module/utilities/index.js +6 -0
- package/dist/module/utilities/index.js.map +1 -0
- package/dist/module/utilities/specificity.js +39 -0
- package/dist/module/utilities/specificity.js.map +1 -0
- package/dist/module/utilities/style-descriptor.js +16 -0
- package/dist/module/utilities/style-descriptor.js.map +1 -0
- package/dist/module/web/api.js +79 -0
- package/dist/module/web/api.js.map +1 -0
- package/dist/module/web/assign-style.js +23 -0
- package/dist/module/web/assign-style.js.map +1 -0
- package/dist/module/web/index.js +6 -0
- package/dist/module/web/index.js.map +1 -0
- package/dist/module/web/metro.js +5 -0
- package/dist/module/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
- package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/app.config.d.ts +4 -0
- package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/index.d.ts +2 -0
- package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +17 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +201 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +132 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +24 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +69 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -0
- 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/index.d.cts +2 -0
- package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +18 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +30 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +13 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +6 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/api.d.ts +26 -0
- package/dist/typescript/commonjs/src/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/attributes.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/objects.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/commonjs/src/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/reactivity.d.ts +52 -0
- package/dist/typescript/commonjs/src/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/reanimated.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/constants.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/commonjs/src/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/calc.d.ts.map +1 -0
- 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 +12 -0
- package/dist/typescript/commonjs/src/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts +9 -0
- package/dist/typescript/commonjs/src/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts +11 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/units.d.ts +6 -0
- package/dist/typescript/commonjs/src/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/native-internal/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/native-internal/root.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts +16 -0
- package/dist/typescript/commonjs/src/native-internal/style-collection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts +8 -0
- package/dist/typescript/commonjs/src/native-internal/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.native.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime.types.d.ts +49 -0
- package/dist/typescript/commonjs/src/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts +23 -0
- package/dist/typescript/commonjs/src/utilities/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/utilities/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/specificity.d.ts +13 -0
- package/dist/typescript/commonjs/src/utilities/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts +4 -0
- package/dist/typescript/commonjs/src/utilities/style-descriptor.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/api.d.ts +16 -0
- package/dist/typescript/commonjs/src/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/eslint.config.d.mts +2 -0
- package/dist/typescript/module/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/example/app.config.d.ts +4 -0
- package/dist/typescript/module/example/app.config.d.ts.map +1 -0
- package/dist/typescript/module/example/index.d.ts +2 -0
- package/dist/typescript/module/example/index.d.ts.map +1 -0
- package/dist/typescript/module/example/metro.config.d.ts +3 -0
- package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/module/example/postcss.config.d.mts +7 -0
- package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts +3 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/index.d.ts +4 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +17 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +201 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts +132 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/index.d.ts +7 -0
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +24 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +69 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +4 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Button.d.ts +4 -0
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/module/src/components/FlatList.d.ts +6 -0
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Image.d.ts +4 -0
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ImageBackground.d.ts +4 -0
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +4 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Pressable.d.ts +4 -0
- package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts +4 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Switch.d.ts +4 -0
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Text.d.ts +4 -0
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TextInput.d.ts +4 -0
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +4 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +4 -0
- package/dist/typescript/module/src/components/View.d.ts.map +1 -0
- package/dist/typescript/module/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -0
- 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.cts +2 -0
- package/dist/typescript/module/src/components/index.d.cts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +18 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +2 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +30 -0
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +11 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +13 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/override.d.ts +2 -0
- package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/module/src/native/api.d.ts +26 -0
- package/dist/typescript/module/src/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/attributes.d.ts +4 -0
- package/dist/typescript/module/src/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/native/index.d.ts +4 -0
- package/dist/typescript/module/src/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/objects.d.ts +5 -0
- package/dist/typescript/module/src/native/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/module/src/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/module/src/native/reactivity.d.ts +52 -0
- package/dist/typescript/module/src/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/native/reanimated.d.ts +5 -0
- package/dist/typescript/module/src/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/constants.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/module/src/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/calc.d.ts.map +1 -0
- 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 +12 -0
- package/dist/typescript/module/src/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/index.d.ts +9 -0
- package/dist/typescript/module/src/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/module/src/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/module/src/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts +11 -0
- package/dist/typescript/module/src/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +5 -0
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/module/src/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts +7 -0
- package/dist/typescript/module/src/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/units.d.ts +6 -0
- package/dist/typescript/module/src/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/index.d.ts +4 -0
- package/dist/typescript/module/src/native-internal/index.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/root.d.ts +11 -0
- package/dist/typescript/module/src/native-internal/root.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/style-collection.d.ts +16 -0
- package/dist/typescript/module/src/native-internal/style-collection.d.ts.map +1 -0
- package/dist/typescript/module/src/native-internal/variables.d.ts +8 -0
- package/dist/typescript/module/src/native-internal/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.d.ts +2 -0
- package/dist/typescript/module/src/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.native.d.ts +2 -0
- package/dist/typescript/module/src/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime.types.d.ts +49 -0
- package/dist/typescript/module/src/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts +23 -0
- package/dist/typescript/module/src/utilities/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/index.d.ts +4 -0
- package/dist/typescript/module/src/utilities/index.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/specificity.d.ts +13 -0
- package/dist/typescript/module/src/utilities/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts +4 -0
- package/dist/typescript/module/src/utilities/style-descriptor.d.ts.map +1 -0
- package/dist/typescript/module/src/web/api.d.ts +16 -0
- package/dist/typescript/module/src/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/web/index.d.ts +4 -0
- package/dist/typescript/module/src/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/web/metro.d.ts.map +1 -0
- package/package.json +304 -0
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +149 -0
- package/src/compiler/compiler.ts +379 -0
- package/src/compiler/compiler.types.ts +275 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3444 -0
- package/src/compiler/functions-web.ts +44 -0
- package/src/compiler/functions.ts +64 -0
- package/src/compiler/index.ts +7 -0
- package/src/compiler/inheritance.test.ts +121 -0
- package/src/compiler/inline-variables.ts +209 -0
- package/src/compiler/keyframes.ts +86 -0
- package/src/compiler/lightningcss-loader.ts +59 -0
- package/src/compiler/media-query.ts +251 -0
- package/src/compiler/pseudo-elements.ts +54 -0
- package/src/compiler/selector-builder.ts +592 -0
- package/src/compiler/selectors.ts +505 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +680 -0
- package/src/compiler/supports.ts +28 -0
- package/src/components/ActivityIndicator.tsx +30 -0
- package/src/components/Button.tsx +27 -0
- package/src/components/FlatList.tsx +31 -0
- package/src/components/Image.tsx +22 -0
- package/src/components/ImageBackground.tsx +30 -0
- package/src/components/KeyboardAvoidingView.tsx +27 -0
- package/src/components/Pressable.tsx +22 -0
- package/src/components/ScrollView.tsx +23 -0
- package/src/components/Switch.tsx +22 -0
- package/src/components/Text.tsx +22 -0
- package/src/components/TextInput.tsx +27 -0
- package/src/components/TouchableHighlight.tsx +25 -0
- package/src/components/TouchableOpacity.tsx +25 -0
- package/src/components/TouchableWithoutFeedback.tsx +25 -0
- package/src/components/View.tsx +22 -0
- package/src/components/VirtualizedList.tsx +37 -0
- package/src/components/copyComponentProperties.ts +21 -0
- package/src/components/index.cts +263 -0
- package/src/components/index.ts +17 -0
- package/src/components/react-native-safe-area-context.native.tsx +44 -0
- package/src/components/react-native-safe-area-context.tsx +1 -0
- package/src/index.ts +1 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +75 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +83 -0
- package/src/metro/injection-code.ts +34 -0
- package/src/metro/metro-transformer.ts +62 -0
- package/src/metro/override.ts +1 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +98 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/native/api.tsx +124 -0
- package/src/native/conditions/attributes.ts +54 -0
- package/src/native/conditions/container-query.ts +162 -0
- package/src/native/conditions/guards.ts +44 -0
- package/src/native/conditions/index.ts +55 -0
- package/src/native/conditions/media-query.ts +99 -0
- package/src/native/index.ts +3 -0
- package/src/native/objects.ts +109 -0
- package/src/native/react/interaction.ts +90 -0
- package/src/native/react/rules.ts +336 -0
- package/src/native/react/useNativeCss.ts +211 -0
- package/src/native/react/usePassthrough.ts +51 -0
- package/src/native/react-native-css-metro-override.ts +36 -0
- package/src/native/reactivity.ts +248 -0
- package/src/native/reanimated.ts +22 -0
- package/src/native/styles/calculate-props.ts +217 -0
- package/src/native/styles/constants.ts +2 -0
- package/src/native/styles/defaults.ts +79 -0
- package/src/native/styles/functions/animation-timing.ts +44 -0
- package/src/native/styles/functions/calc.ts +121 -0
- package/src/native/styles/functions/color-mix.ts +68 -0
- package/src/native/styles/functions/filters.ts +99 -0
- package/src/native/styles/functions/index.ts +8 -0
- package/src/native/styles/functions/numeric-functions.ts +38 -0
- package/src/native/styles/functions/platform-functions.ts +50 -0
- package/src/native/styles/functions/string-functions.ts +22 -0
- package/src/native/styles/functions/transform-functions.ts +85 -0
- package/src/native/styles/index.ts +474 -0
- package/src/native/styles/line-height.ts +25 -0
- package/src/native/styles/resolve.ts +164 -0
- package/src/native/styles/shorthands/_handler.ts +122 -0
- package/src/native/styles/shorthands/animation.ts +131 -0
- package/src/native/styles/shorthands/border.ts +10 -0
- package/src/native/styles/shorthands/box-shadow.ts +71 -0
- package/src/native/styles/shorthands/index.ts +5 -0
- package/src/native/styles/shorthands/text-shadow.ts +17 -0
- package/src/native/styles/shorthands/transform.ts +23 -0
- package/src/native/styles/units.ts +62 -0
- package/src/native/styles/variables.ts +88 -0
- package/src/native-internal/README.md +11 -0
- package/src/native-internal/index.ts +3 -0
- package/src/native-internal/root.ts +44 -0
- package/src/native-internal/style-collection.ts +148 -0
- package/src/native-internal/variables.tsx +36 -0
- package/src/runtime.native.ts +1 -0
- package/src/runtime.ts +1 -0
- package/src/runtime.types.ts +150 -0
- package/src/utilities/dot-notation.types.ts +125 -0
- package/src/utilities/index.ts +3 -0
- package/src/utilities/specificity.ts +45 -0
- package/src/utilities/style-descriptor.ts +24 -0
- package/src/web/api.tsx +120 -0
- package/src/web/assign-style.ts +26 -0
- package/src/web/index.ts +5 -0
- package/src/web/metro.ts +2 -0
- package/types.d.ts +73 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { getInteropRequireDefaultSource } from "./helpers.js";
|
|
5
|
+
import { handleReactNativeIdentifierRequire, handleReactNativeImport, handleReactNativeObjectPatternRequire } from "./react-native.js";
|
|
6
|
+
import { handleReactNativeWebIdentifierRequire, handleReactNativeWebImport, handleReactNativeWebObjectPatternRequire } from "./react-native-web.js";
|
|
7
|
+
export default function ({
|
|
8
|
+
types: t
|
|
9
|
+
}) {
|
|
10
|
+
const processed = new WeakSet();
|
|
11
|
+
const thisModuleDist = resolve(__dirname, "../../../dist");
|
|
12
|
+
const thisModuleSrc = resolve(__dirname, "../../../src");
|
|
13
|
+
function isFromThisModule(filename) {
|
|
14
|
+
return filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
name: "Rewrite react-native to react-native-css",
|
|
18
|
+
visitor: {
|
|
19
|
+
ImportDeclaration(path, state) {
|
|
20
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const statements = handleReactNativeImport(path.node, t, state.filename) ?? handleReactNativeWebImport(path.node, t, state.filename);
|
|
24
|
+
if (!statements) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
for (const statement of statements) {
|
|
28
|
+
processed.add(statement);
|
|
29
|
+
}
|
|
30
|
+
path.replaceWithMultiple(statements);
|
|
31
|
+
},
|
|
32
|
+
VariableDeclaration(path, state) {
|
|
33
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const firstDeclaration = path.node.declarations.at(0);
|
|
37
|
+
|
|
38
|
+
// We only handle single variable declarations for now.
|
|
39
|
+
if (path.node.declarations.length > 1) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Skip declarations that are not initialized. eg `let x;`
|
|
44
|
+
if (!firstDeclaration?.init) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const {
|
|
48
|
+
id,
|
|
49
|
+
init
|
|
50
|
+
} = firstDeclaration;
|
|
51
|
+
|
|
52
|
+
// We only handle `const <id> = <init>()`
|
|
53
|
+
if (!t.isCallExpression(init)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// We only handle `const id = <init>() OR const { <id> } = <init>()`
|
|
58
|
+
if (!(t.isIdentifier(id) || t.isObjectPattern(id))) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const initArg = init.arguments.at(0);
|
|
62
|
+
if (!initArg) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
let statements;
|
|
66
|
+
|
|
67
|
+
// `const <id> = require(<source>);`
|
|
68
|
+
if (t.isIdentifier(id) && t.isIdentifier(init.callee, {
|
|
69
|
+
name: "require"
|
|
70
|
+
}) && t.isStringLiteral(initArg)) {
|
|
71
|
+
statements = handleReactNativeIdentifierRequire(path, t, id.name, initArg.value, state.filename) ?? handleReactNativeWebIdentifierRequire(path, t, id.name, initArg.value, state.filename);
|
|
72
|
+
} else if (t.isObjectPattern(id) && t.isIdentifier(init.callee, {
|
|
73
|
+
name: "require"
|
|
74
|
+
}) && t.isStringLiteral(initArg)) {
|
|
75
|
+
statements = handleReactNativeObjectPatternRequire(path, t, id, initArg.value, state.filename) ?? handleReactNativeWebObjectPatternRequire(path, t, id, initArg.value, state.filename);
|
|
76
|
+
} else if (t.isIdentifier(id) && t.isIdentifier(init.callee, {
|
|
77
|
+
name: "_interopRequireDefault"
|
|
78
|
+
})) {
|
|
79
|
+
// `const <id> = _interopRequireDefault(require(<source>));`
|
|
80
|
+
const source = getInteropRequireDefaultSource(init, t);
|
|
81
|
+
if (!source) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
statements = handleReactNativeWebIdentifierRequire(path, t, id.name, source, state.filename);
|
|
85
|
+
}
|
|
86
|
+
if (!statements) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
for (const statement of statements) {
|
|
90
|
+
processed.add(statement);
|
|
91
|
+
}
|
|
92
|
+
path.replaceWithMultiple(statements);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=import-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolve","getInteropRequireDefaultSource","handleReactNativeIdentifierRequire","handleReactNativeImport","handleReactNativeObjectPatternRequire","handleReactNativeWebIdentifierRequire","handleReactNativeWebImport","handleReactNativeWebObjectPatternRequire","types","t","processed","WeakSet","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","name","visitor","ImportDeclaration","path","state","has","node","statements","statement","add","replaceWithMultiple","VariableDeclaration","firstDeclaration","declarations","at","length","init","id","isCallExpression","isIdentifier","isObjectPattern","initArg","arguments","callee","isStringLiteral","value","source"],"sourceRoot":"../../../src","sources":["babel/import-plugin.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,MAAM;AAK9B,SACEC,8BAA8B,QAGzB,cAAW;AAClB,SACEC,kCAAkC,EAClCC,uBAAuB,EACvBC,qCAAqC,QAChC,mBAAgB;AACvB,SACEC,qCAAqC,EACrCC,0BAA0B,EAC1BC,wCAAwC,QACnC,uBAAoB;AAE3B,eAAe,UAAU;EACvBC,KAAK,EAAEC;AAGT,CAAC,EAA0B;EACzB,MAAMC,SAAS,GAAG,IAAIC,OAAO,CAAC,CAAC;EAE/B,MAAMC,cAAc,GAAGZ,OAAO,CAACa,SAAS,EAAE,eAAe,CAAC;EAC1D,MAAMC,aAAa,GAAGd,OAAO,CAACa,SAAS,EAAE,cAAc,CAAC;EAExD,SAASE,gBAAgBA,CAACC,QAAgB,EAAW;IACnD,OACEA,QAAQ,CAACC,UAAU,CAACL,cAAc,CAAC,IAAII,QAAQ,CAACC,UAAU,CAACH,aAAa,CAAC;EAE7E;EAEA,OAAO;IACLI,IAAI,EAAE,0CAA0C;IAChDC,OAAO,EAAE;MACPC,iBAAiBA,CAACC,IAAI,EAAEC,KAAK,EAAQ;QACnC,IACEZ,SAAS,CAACa,GAAG,CAACF,IAAI,CAAC,IACnBX,SAAS,CAACa,GAAG,CAACF,IAAI,CAACG,IAAI,CAAC,IACxBT,gBAAgB,CAACO,KAAK,CAACN,QAAQ,CAAC,EAChC;UACA;QACF;QAEA,MAAMS,UAAU,GACdtB,uBAAuB,CAACkB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AAC,EACD0B,EAAE,CAACjB,IAAI,EACP0B,MAAM,EACNtB,KAAK,CAACN,QACR,CAAC;QACH;QAEA,IAAI,CAACS,UAAU,EAAE;UACf;QACF;QAEA,KAAK,MAAMC,SAAS,IAAID,UAAU,EAAE;UAClCf,SAAS,CAACiB,GAAG,CAACD,SAAS,CAAC;QAC1B;QAEAL,IAAI,CAACO,mBAAmB,CAACH,UAAU,CAAC;MACtC;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["plugins","require","default"],"sourceRoot":"../../../src","sources":["babel/index.ts"],"mappings":";;AAAA;AACA,eAAe,YAAY;EACzB,OAAO;IACLA,OAAO,EAAE,CACPC,OAAO,CAAC,iBAAiB,CAAC,CAACC,OAAO,EAClC,8BAA8B;EAElC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { allowedModules } from "./allowedModules.js";
|
|
5
|
+
function parseReactNativeWebSource(source, filename) {
|
|
6
|
+
if (source.startsWith(".")) {
|
|
7
|
+
source = resolve(filename, source);
|
|
8
|
+
const internalPath = source.split("react-native-web/dist")[1];
|
|
9
|
+
if (!internalPath) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Strip the absolute system filepath
|
|
14
|
+
source = `react-native-web/${internalPath}`;
|
|
15
|
+
}
|
|
16
|
+
if (source === "react-native-web") {
|
|
17
|
+
return {
|
|
18
|
+
source: "react-native-css/components"
|
|
19
|
+
};
|
|
20
|
+
} else if (source.startsWith("react-native-web/")) {
|
|
21
|
+
const name = source.split("/").at(-1);
|
|
22
|
+
if (!name || !allowedModules.has(name)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
source: `react-native-css/components/${name}`,
|
|
27
|
+
name
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
export function handleReactNativeWebImport(declaration, t, filename) {
|
|
33
|
+
const {
|
|
34
|
+
specifiers,
|
|
35
|
+
source
|
|
36
|
+
} = declaration;
|
|
37
|
+
const rnwSource = parseReactNativeWebSource(source.value, filename);
|
|
38
|
+
if (!rnwSource) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (specifiers.length === 0) {
|
|
42
|
+
return [t.importDeclaration([], t.stringLiteral("react-native-css/components"))];
|
|
43
|
+
}
|
|
44
|
+
const statements = [];
|
|
45
|
+
for (const specifier of specifiers) {
|
|
46
|
+
if (t.isImportDefaultSpecifier(specifier)) {
|
|
47
|
+
const {
|
|
48
|
+
source: newSource,
|
|
49
|
+
name
|
|
50
|
+
} = rnwSource;
|
|
51
|
+
if (!name) {
|
|
52
|
+
statements.push(t.importDeclaration([t.importDefaultSpecifier(specifier.local)], t.stringLiteral(newSource)));
|
|
53
|
+
} else {
|
|
54
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.local)], t.stringLiteral(`react-native-css/components/${name}`)));
|
|
55
|
+
}
|
|
56
|
+
} else if (t.isImportNamespaceSpecifier(specifier)) {
|
|
57
|
+
statements.push(t.importDeclaration([specifier], t.stringLiteral("react-native-css/components")));
|
|
58
|
+
} else {
|
|
59
|
+
const localName = t.isStringLiteral(specifier.imported) ? specifier.imported.value : specifier.imported.name;
|
|
60
|
+
if (!allowedModules.has(localName)) {
|
|
61
|
+
statements.push(t.importDeclaration([specifier], source));
|
|
62
|
+
} else {
|
|
63
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.imported)], t.stringLiteral(`react-native-css/components/${localName}`)));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return statements;
|
|
68
|
+
}
|
|
69
|
+
export function handleReactNativeWebIdentifierRequire(path, t, id, source, filename) {
|
|
70
|
+
const parsedSource = parseReactNativeWebSource(source, filename);
|
|
71
|
+
if (!parsedSource) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const {
|
|
75
|
+
source: newSource,
|
|
76
|
+
name
|
|
77
|
+
} = parsedSource;
|
|
78
|
+
if (name) {
|
|
79
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([name === id ? t.objectProperty(t.identifier(name), t.identifier(id), false, true) : t.objectProperty(t.identifier(name), t.identifier(id))]), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
80
|
+
} else {
|
|
81
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.identifier(id), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export function handleReactNativeWebObjectPatternRequire(path, t, id, source, filename) {
|
|
85
|
+
const parsedSource = parseReactNativeWebSource(source, filename);
|
|
86
|
+
|
|
87
|
+
// Don't handle `const { Text } = require('react-native-web/dist/cjs/Text');` - we only handle package exports
|
|
88
|
+
if (!parsedSource || parsedSource.name) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const statements = [];
|
|
92
|
+
for (const identifier of id.properties) {
|
|
93
|
+
if (t.isRestElement(identifier)) {
|
|
94
|
+
// Bail out on `const { ...rest } = require('react-native-web');`
|
|
95
|
+
// We need to exit as we do not handle `const { Text, ...rest } = require('react-native-web');`
|
|
96
|
+
return;
|
|
97
|
+
} else if (!(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))) {
|
|
98
|
+
// Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native-web');`
|
|
99
|
+
return;
|
|
100
|
+
} else {
|
|
101
|
+
const name = identifier.key.name;
|
|
102
|
+
if (!allowedModules.has(name)) {
|
|
103
|
+
statements.push(t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([identifier]), t.callExpression(t.identifier("require"), [t.stringLiteral(source)]))]));
|
|
104
|
+
} else {
|
|
105
|
+
const newSourceWithName = `react-native-css/components/${name}`;
|
|
106
|
+
statements.push(t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([t.objectProperty(t.identifier(name), t.identifier(identifier.value.name), false, true)]), t.callExpression(t.identifier("require"), [t.stringLiteral(newSourceWithName)]))]));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return statements;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=react-native-web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolve","allowedModules","parseReactNativeWebSource","source","filename","startsWith","internalPath","split","name","at","has","handleReactNativeWebImport","declaration","t","specifiers","rnwSource","value","length","importDeclaration","stringLiteral","statements","specifier","isImportDefaultSpecifier","newSource","push","importDefaultSpecifier","local","importSpecifier","isImportNamespaceSpecifier","localName","isStringLiteral","imported","handleReactNativeWebIdentifierRequire","path","id","parsedSource","variableDeclaration","node","kind","variableDeclarator","objectPattern","objectProperty","identifier","callExpression","handleReactNativeWebObjectPatternRequire","properties","isRestElement","isIdentifier","key","newSourceWithName"],"sourceRoot":"../../../src","sources":["babel/react-native-web.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,MAAM;AAU9B,SAASC,cAAc,QAAQ,qBAAkB;AAIjD,SAASC,yBAAyBA,CAACC,MAAc,EAAEC,QAAgB,EAAE;EACnE,IAAID,MAAM,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1BF,MAAM,GAAGH,OAAO,CAACI,QAAQ,EAAED,MAAM,CAAC;IAElC,MAAMG,YAAY,GAAGH,MAAM,CAACI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAC7D,IAAI,CAACD,YAAY,EAAE;MACjB;IACF;;IAEA;IACAH,MAAM,GAAG,oBAAoBG,YAAY,EAAE;EAC7C;EAEA,IAAIH,MAAM,KAAK,kBAAkB,EAAE;IACjC,OAAO;MAAEA,MAAM,EAAE;IAA8B,CAAC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K,CAACR,IAAI,CAAC,EACnC,KAAK,EACL,IACF,CAAC,CACF,CAAC,EACFK,CAAC,CAAC8B,cAAc,CAAC9B,CAAC,CAAC6B,UAAU,CAAC,SAAS,CAAC,EAAE,CACxC7B,CAAC,CAACM,aAAa,CAAC8B,iBAAiB,CAAC,CACnC,CACH,CAAC,CACF,CACH,CAAC;MACH;IACF;EACF;EAEA,OAAO7B,UAAU;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { dirname, resolve } from "path";
|
|
4
|
+
import { allowedModules } from "./allowedModules.js";
|
|
5
|
+
function parseReactNativeSource(source, filename) {
|
|
6
|
+
if (source.startsWith(".")) {
|
|
7
|
+
source = resolve(dirname(filename), source);
|
|
8
|
+
const internalPath = source.split("react-native/Libraries/Components/")[1];
|
|
9
|
+
if (!internalPath) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Strip the absolute system filepath
|
|
14
|
+
source = `react-native/Libraries/Components/${internalPath}`;
|
|
15
|
+
}
|
|
16
|
+
if (source === "react-native") {
|
|
17
|
+
return {
|
|
18
|
+
source: "react-native-css/components"
|
|
19
|
+
};
|
|
20
|
+
} else if (source.startsWith("react-native/")) {
|
|
21
|
+
const name = source.split("/").at(-1);
|
|
22
|
+
if (!name || !allowedModules.has(name)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
source: `react-native-css/components/${name}`,
|
|
27
|
+
name
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
export function handleReactNativeImport(declaration, t, filename) {
|
|
33
|
+
const {
|
|
34
|
+
specifiers,
|
|
35
|
+
source
|
|
36
|
+
} = declaration;
|
|
37
|
+
const rnwSource = parseReactNativeSource(source.value, filename);
|
|
38
|
+
if (!rnwSource) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (specifiers.length === 0) {
|
|
42
|
+
return [t.importDeclaration([], t.stringLiteral("react-native-css/components"))];
|
|
43
|
+
}
|
|
44
|
+
const statements = [];
|
|
45
|
+
for (const specifier of specifiers) {
|
|
46
|
+
if (t.isImportDefaultSpecifier(specifier)) {
|
|
47
|
+
const {
|
|
48
|
+
source: newSource,
|
|
49
|
+
name
|
|
50
|
+
} = rnwSource;
|
|
51
|
+
if (!name) {
|
|
52
|
+
statements.push(t.importDeclaration([t.importDefaultSpecifier(specifier.local)], t.stringLiteral(newSource)));
|
|
53
|
+
} else {
|
|
54
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.local)], t.stringLiteral(`react-native-css/components/${name}`)));
|
|
55
|
+
}
|
|
56
|
+
} else if (t.isImportNamespaceSpecifier(specifier)) {
|
|
57
|
+
statements.push(t.importDeclaration([specifier], t.stringLiteral("react-native-css/components")));
|
|
58
|
+
} else {
|
|
59
|
+
const localName = t.isStringLiteral(specifier.imported) ? specifier.imported.value : specifier.imported.name;
|
|
60
|
+
if (!allowedModules.has(localName)) {
|
|
61
|
+
statements.push(t.importDeclaration([specifier], source));
|
|
62
|
+
} else {
|
|
63
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.imported)], t.stringLiteral(`react-native-css/components/${localName}`)));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return statements;
|
|
68
|
+
}
|
|
69
|
+
export function handleReactNativeIdentifierRequire(path, t, id, source, filename) {
|
|
70
|
+
const parsedSource = parseReactNativeSource(source, filename);
|
|
71
|
+
if (!parsedSource) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const {
|
|
75
|
+
source: newSource,
|
|
76
|
+
name
|
|
77
|
+
} = parsedSource;
|
|
78
|
+
if (name) {
|
|
79
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([name === id ? t.objectProperty(t.identifier(name), t.identifier(id), false, true) : t.objectProperty(t.identifier(name), t.identifier(id))]), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
80
|
+
} else {
|
|
81
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.identifier(id), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export function handleReactNativeObjectPatternRequire(path, t, id, source, filename) {
|
|
85
|
+
const parsedSource = parseReactNativeSource(source, filename);
|
|
86
|
+
|
|
87
|
+
// Don't handle `const { Text } = require('react-native/Libraries/Text/Text');` - we only handle package exports
|
|
88
|
+
if (!parsedSource || parsedSource.name) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const statements = [];
|
|
92
|
+
for (const identifier of id.properties) {
|
|
93
|
+
if (t.isRestElement(identifier)) {
|
|
94
|
+
// Bail out on `const { ...rest } = require('react-native');`
|
|
95
|
+
// We need to exit as we do not handle `const { Text, ...rest } = require('react-native');`
|
|
96
|
+
return;
|
|
97
|
+
} else if (!(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))) {
|
|
98
|
+
// Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native');`
|
|
99
|
+
return;
|
|
100
|
+
} else {
|
|
101
|
+
const name = identifier.key.name;
|
|
102
|
+
if (!allowedModules.has(name)) {
|
|
103
|
+
statements.push(t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([identifier]), t.callExpression(t.identifier("require"), [t.stringLiteral(source)]))]));
|
|
104
|
+
} else {
|
|
105
|
+
const newSourceWithName = `react-native-css/components/${name}`;
|
|
106
|
+
statements.push(t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([t.objectProperty(t.identifier(name), t.identifier(identifier.value.name), false, true)]), t.callExpression(t.identifier("require"), [t.stringLiteral(newSourceWithName)]))]));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return statements;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=react-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dirname","resolve","allowedModules","parseReactNativeSource","source","filename","startsWith","internalPath","split","name","at","has","handleReactNativeImport","declaration","t","specifiers","rnwSource","value","length","importDeclaration","stringLiteral","statements","specifier","isImportDefaultSpecifier","newSource","push","importDefaultSpecifier","local","importSpecifier","isImportNamespaceSpecifier","localName","isStringLiteral","imported","handleReactNativeIdentifierRequire","path","id","parsedSource","variableDeclaration","node","kind","variableDeclarator","objectPattern","objectProperty","identifier","callExpression","handleReactNativeObjectPatternRequire","properties","isRestElement","isIdentifier","key","newSourceWithName"],"sourceRoot":"../../../src","sources":["babel/react-native.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,OAAO,QAAQ,MAAM;AAUvC,SAASC,cAAc,QAAQ,qBAAkB;AAIjD,SAASC,sBAAsBA,CAACC,MAAc,EAAEC,QAAgB,EAAE;EAChE,IAAID,MAAM,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1BF,MAAM,GAAGH,OAAO,CAACD,OAAO,CAACK,QAAQ,CAAC,EAAED,MAAM,CAAC;IAE3C,MAAMG,YAAY,GAAGH,MAAM,CAACI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC;IAC1E,IAAI,CAACD,YAAY,EAAE;MACjB;IACF;;IAEA;IACAH,MAAM,GAAG,qCAAqCG,YAAY,EAAE;EAC9D;EAEA,IAAIH,MAAM,KAAK,cAAc,EAAE;IAC7B,OAAO;MAAEA,MAAM,EAAE;IAA8B,CAAC;EAClD,CAAC,MAAM,IAAIA,MAAM,CAACE,UAAU,CAAC,eAAe,CAAC,EAAE;IAC7C,MAAMG,IAAI,GAAGL,MAAM,CAACI,KAAK,CAAC,GAAG,CAAC,CAACE,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,IAAI,CAACD,IAAI,IAAI,CAACP,cAAc,CAACS,GAAG,CAACF,IAAI,CAAC,EAAE;MACtC;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;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { toRNProperty } from "./selectors.js";
|
|
4
|
+
import { splitByDelimiter } from "./split-by-delimiter.js";
|
|
5
|
+
|
|
6
|
+
/***********************************************
|
|
7
|
+
* @react-native *
|
|
8
|
+
***********************************************/
|
|
9
|
+
|
|
10
|
+
export function maybeMutateReactNativeOptions(rule, _builder) {
|
|
11
|
+
if (rule.type !== "custom" || rule.value?.name !== "react-native") {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// TODO: Add inline options
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/***********************************************
|
|
19
|
+
* @nativeMapping *
|
|
20
|
+
***********************************************/
|
|
21
|
+
|
|
22
|
+
function isNativeMappingAtRule(rule) {
|
|
23
|
+
return rule.type === "unknown" && rule.value.name === "nativeMapping";
|
|
24
|
+
}
|
|
25
|
+
export function parsePropAtRule(rules) {
|
|
26
|
+
// Include any default mapping here
|
|
27
|
+
const mapping = {
|
|
28
|
+
"caret-color": ["cursorColor"],
|
|
29
|
+
"fill": ["fill"],
|
|
30
|
+
"stroke": ["stroke"],
|
|
31
|
+
"stroke-width": ["strokeWidth"],
|
|
32
|
+
"-webkit-line-clamp": ["numberOfLines"],
|
|
33
|
+
"-rn-ripple-color": ["android_ripple", "color"],
|
|
34
|
+
"-rn-ripple-style": ["android_ripple", "borderless"],
|
|
35
|
+
"-rn-ripple-radius": ["android_ripple", "radius"],
|
|
36
|
+
"-rn-ripple-layer": ["android_ripple", "foreground"]
|
|
37
|
+
};
|
|
38
|
+
if (!rules) return mapping;
|
|
39
|
+
for (const rule of rules) {
|
|
40
|
+
if (!isNativeMappingAtRule(rule)) continue;
|
|
41
|
+
if (rule.value.prelude.length > 0) {
|
|
42
|
+
const prelude = rule.value.prelude.filter(item => {
|
|
43
|
+
return item.value.type !== "white-space";
|
|
44
|
+
});
|
|
45
|
+
nativeMappingAtRuleBlock(prelude, mapping);
|
|
46
|
+
} else if (rule.value.block) {
|
|
47
|
+
// Remove all whitespace tokens
|
|
48
|
+
const blocks = rule.value.block.filter(item => {
|
|
49
|
+
return item.value.type !== "white-space";
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Separate each rule, delimited by a semicolon
|
|
53
|
+
const blockRules = splitByDelimiter(blocks, item => {
|
|
54
|
+
return item.value.type === "semicolon";
|
|
55
|
+
});
|
|
56
|
+
for (const block of blockRules) {
|
|
57
|
+
nativeMappingAtRuleBlock(block, mapping);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return mapping;
|
|
62
|
+
}
|
|
63
|
+
function nativeMappingAtRuleBlock(token, mapping = {}) {
|
|
64
|
+
let [from, to] = splitByDelimiter(token, item => {
|
|
65
|
+
return item.value.type === "colon";
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// @nativeMapping <to>; (has no from value)
|
|
69
|
+
if (!to) {
|
|
70
|
+
to = from;
|
|
71
|
+
from = [{
|
|
72
|
+
type: "token",
|
|
73
|
+
value: {
|
|
74
|
+
type: "ident",
|
|
75
|
+
value: "*"
|
|
76
|
+
}
|
|
77
|
+
}];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// We can only map from a single property
|
|
81
|
+
if (!from || from.length !== 1 || !to) {
|
|
82
|
+
return mapping;
|
|
83
|
+
}
|
|
84
|
+
const fromToken = from[0];
|
|
85
|
+
if (!fromToken || fromToken.value.type !== "ident") {
|
|
86
|
+
return mapping;
|
|
87
|
+
}
|
|
88
|
+
let value = to.flatMap((item, index) => {
|
|
89
|
+
switch (item.value.type) {
|
|
90
|
+
case "delim":
|
|
91
|
+
return index === 0 && item.value.value === "&" ? ["&"] : [];
|
|
92
|
+
case "ident":
|
|
93
|
+
return item.value.value.split(".").map(part => toRNProperty(part));
|
|
94
|
+
default:
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
if (value.length === 2 && value[0] === "&" && value[1]) {
|
|
99
|
+
value = value[1];
|
|
100
|
+
}
|
|
101
|
+
mapping[toRNProperty(fromToken.value.value)] = value;
|
|
102
|
+
return mapping;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=atRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["toRNProperty","splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isNativeMappingAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","nativeMappingAtRuleBlock","block","blocks","blockRules","token","from","to","fromToken","flatMap","index","split","map","part"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;AAQA,SAASA,YAAY,QAAQ,gBAAa;AAC1C,SAASC,gBAAgB,QAAQ,yBAAsB;;AAYvD;AACA;AACA;;AAcA,OAAO,SAASC,6BAA6BA,CAC3CC,IAA8B,EAC9BC,QAA2B,EAC3B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;;EAEA;AACF;;AAEA;AACA;AACA;;AAEA,SAASC,qBAAqBA,CAACL,IAAuB,EAAsB;EAC1E,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,eAAe;AACvE;AAEA,OAAO,SAASE,eAAeA,CAACC,KAA6B,EAAE;EAC7D;EACA,MAAMC,OAAyB,GAAG;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,oBAAoB,EAAE,CAAC,eAAe,CAAC;IACvC,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC/C,kBAAkB,EAAE,CAAC,gBAAgB,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